diff --git a/config/autoload/global.php b/config/autoload/global.php index c115568b2e86cbe745072b1191938453df62a491..6f0304443cc732a32109a67582dc21bc8e79926a 100755 --- a/config/autoload/global.php +++ b/config/autoload/global.php @@ -99,25 +99,23 @@ return array( ], ], - 'pcru' => [ // Référenciel PCRU (Fichiers contenant les données officielles) 'polecompetitivite' => __DIR__ .'/../../install/pcru-pole-competitivite.json', 'sourcefinancement' => __DIR__ .'/../../install/pcru-sources-financement.json', 'contracttype' => __DIR__ .'/../../install/pcru-contracts-types.json', + 'typesetablissement' => __DIR__ .'/../../install/pcru-types-etablissement.json', // Paramètres de la POOL d'envoi PCRU - 'files_path' => __DIR__.'/../../tmp', // Dossier où seront gérés les fichiers à envoyer - 'filename_contrats' => 'SitePMA_UniCaen.csv', // Nom du fichier CSV (contrats) - 'filename_partenaires' => 'SitePMA_UniCaen.PARTENAIRES.csv', // Nom du fichier (Partenaires) + 'repertoire_sftp' => '/Echanges', // Chemin absolu du dossier du serveur SFTP PCRU distant dans lequel les fichiers seront déposés + 'filename_contrats' => 'SitePMA_UniCaen.iso.csv', // Nom du fichier CSV (contrats) + 'filename_partenaires' => 'SitePMA_UniCaen-PARTENAIRE.iso.csv', // Nom du fichier (Partenaires) 'filename_csv_ok' => 'DEPOT-CSV.OK', // Nom du fichier (Marqueur de dépot CSV) + 'filename_csv_partenaire_ok' => 'DEPOT-CSV-PARTENAIRE.OK', // Nom du fichier (Marqueur de dépot CSV partenaire) 'filename_pdf_ok' => 'DEPOT-PDF.OK', // Nom du fichier (Marqueur de dépot PDF) - 'pool_current' => 'waiting', // Nom du dossier où sont stoqués les fichiers avant envoi - 'pool_effective' => 'uploaded', // Nom du dossier où sont stoqués les fichiers avant envoi - 'pool_history' => 'send-%s', // Nom des dossiers archivés - 'pool_log' => 'pcru.log', // Nom du fichier de log - 'pool_lock' => 'PCRU.LOCK', // Nom du fichier de verrouillage 'filename_errors' => 'DEPOT-CSV.ERRORS.json', // Nom du fichier d'erreur PCRU + 'filename_retour_pcru_ok' => 'RETOUR-PCRU.OK', // Nom du fichier (Marqueur de retour OK de la part de PCRU) + 'filename_retour_pcru_ok_csv' => 'RETOUR-PCRU.csv', // Nom du fichier (Marqueur de retour PCRU contenant la liste les contrats dont il manque le fichier pdf) ], 'htmltopdfrenderer' => [ diff --git a/config/autoload/oscar.yml.dist b/config/autoload/oscar.yml.dist index 069b591f0ae151707395bafba3ed5fdabb55b01d..dafbb321798dbee817c06ab16f0e2d1ffc175171 100644 --- a/config/autoload/oscar.yml.dist +++ b/config/autoload/oscar.yml.dist @@ -46,9 +46,6 @@ oscar: document_admin_oscar: "/var/documents/public" document_request: "/var/documents/request" - pcru: - files_path: '/var/documents/pcru' - # Modèle pour la génération des documents timesheet_person_month_template: '/var/application/data/templates/timesheet_person_month.default.html.php' timesheet_period_template: '/var/application/data/templates/timesheet_period.default.html.php' diff --git a/doc/images/pcru-config2.png b/doc/images/pcru-config2.png new file mode 100644 index 0000000000000000000000000000000000000000..39243dfee05cf7dd89e7499201455608a618a708 Binary files /dev/null and b/doc/images/pcru-config2.png differ diff --git a/doc/images/pcru-correspondance-contrats.png b/doc/images/pcru-correspondance-contrats.png new file mode 100644 index 0000000000000000000000000000000000000000..b64594822b671ece0a6eada53a3a6683eb2dd8d0 Binary files /dev/null and b/doc/images/pcru-correspondance-contrats.png differ diff --git a/doc/images/pcru-droits.png b/doc/images/pcru-droits.png new file mode 100644 index 0000000000000000000000000000000000000000..93bc2ab34b5d463442319a02c5ebafe6db25c4ef Binary files /dev/null and b/doc/images/pcru-droits.png differ diff --git a/doc/images/pcru-erreurs.png b/doc/images/pcru-erreurs.png new file mode 100644 index 0000000000000000000000000000000000000000..4de689963fbc3c50d8fd3d45392fcded8ebd49c4 Binary files /dev/null and b/doc/images/pcru-erreurs.png differ diff --git a/doc/images/pcru-erreurs2.png b/doc/images/pcru-erreurs2.png new file mode 100644 index 0000000000000000000000000000000000000000..a70b00048b3c2c558100855c1fc69d15cbe931ea Binary files /dev/null and b/doc/images/pcru-erreurs2.png differ diff --git a/doc/images/pcru-fiche-activite.png b/doc/images/pcru-fiche-activite.png new file mode 100644 index 0000000000000000000000000000000000000000..24dbf7801508158b438806ed6d4ec13dbd12b832 Binary files /dev/null and b/doc/images/pcru-fiche-activite.png differ diff --git a/doc/images/pcru-formulaire.png b/doc/images/pcru-formulaire.png new file mode 100644 index 0000000000000000000000000000000000000000..7cdb0363f15f8343774155f465a120fb097e2afb Binary files /dev/null and b/doc/images/pcru-formulaire.png differ diff --git a/doc/images/pcru-historique.png b/doc/images/pcru-historique.png new file mode 100644 index 0000000000000000000000000000000000000000..67779be1dfb599ddc0b6f7a02b9960863f4a1956 Binary files /dev/null and b/doc/images/pcru-historique.png differ diff --git a/doc/images/pcru-liste-types-contrats.png b/doc/images/pcru-liste-types-contrats.png new file mode 100644 index 0000000000000000000000000000000000000000..50d828af70775c81f3d8214244c82e3fc7e4a5b4 Binary files /dev/null and b/doc/images/pcru-liste-types-contrats.png differ diff --git a/doc/images/pcru-liste-types-etablissement.png b/doc/images/pcru-liste-types-etablissement.png new file mode 100644 index 0000000000000000000000000000000000000000..69541f4f8ef0347f26d2345ad705a99046df96cf Binary files /dev/null and b/doc/images/pcru-liste-types-etablissement.png differ diff --git a/doc/images/pcru-options.png b/doc/images/pcru-options.png new file mode 100644 index 0000000000000000000000000000000000000000..072aa1201f669219d0fc88d9c484220b11c74d52 Binary files /dev/null and b/doc/images/pcru-options.png differ diff --git a/doc/images/pcru-sftp.png b/doc/images/pcru-sftp.png new file mode 100644 index 0000000000000000000000000000000000000000..120049d1ed243f584f0301a586e5fe1848ee95e0 Binary files /dev/null and b/doc/images/pcru-sftp.png differ diff --git a/doc/images/pcru-suivi.png b/doc/images/pcru-suivi.png new file mode 100644 index 0000000000000000000000000000000000000000..f61cbd6940b984af34115e5f1a34f31361ca3617 Binary files /dev/null and b/doc/images/pcru-suivi.png differ diff --git a/doc/images/pcru-types-etablissements.png b/doc/images/pcru-types-etablissements.png new file mode 100644 index 0000000000000000000000000000000000000000..815f59ef35ee96255f19668b75d7814ad9a7cace Binary files /dev/null and b/doc/images/pcru-types-etablissements.png differ diff --git a/doc/pcru.md b/doc/pcru.md new file mode 100644 index 0000000000000000000000000000000000000000..fd99d99c07fa9b5be7ddd502cd87daa8e4133263 --- /dev/null +++ b/doc/pcru.md @@ -0,0 +1,246 @@ +# Module PCRU + +Le module PCRU d'OSCAR permet d'automatiser la soumission des contrats de recherche depuis OSCAR vers les systèmes PCRU, afin d'éviter aux gestionnaires d'avoir à réaliser une double saisie. + +Le fonctionnement nominal est le suivant : + - l'établissement contacte PCRU pour demander un accès au serveur SFTP permettant le dépôt automatique de fichiers CSV par OSCAR, + - l'administrateur OSCAR renseigne les informations de connexion au serveur SFTP dans la configuration (login, mot de passe...), + - l'administrateur OSCAR configure un CRON qui chaque jour va déclencher le dépôt automatique d'un fichier CSV contenant les nouvelles activités sur le serveur SFTP de PCRU, + - les gestionnaires activent le transfert vers PCRU pour les activités concernées. + +Au cas où la solution SFTP n'est pas fonctionnelle, un processus manuel de contournement est possible en téléversant manuellement les fichiers CSV sur le site web PCRU : + - les gestionnaires activent le transfert vers PCRU pour les activités concernées, + - l'administrateur OSCAR télécharge les fichiers CSV et PDFs à envoyer à PCRU puis téléverse les fichiers sur le site web PCRU (https://pcru.dr14.cnrs.fr), + - l'administrateur vérifie la bonne intégration des activités sur le site web PCRU puis met à jour par des requêtes SQL le statut des activités ainsi déposées. + + +## Configuration du module PCRU + +### Gestion des privilèges + +![PCRU gestion des privilèges](./images/pcru-droits.png) + +De nouveaux droits sont à configurer dans la page *Gestion des privilèges*. + +Pour les administrateurs, il faut ajouter les droits suivants : + - Maintenance > Peut visualiser la liste des données PCRU + - Maintenance > Peut déclencher manuellement le transfert des donnèes vers PCRU + +Pour les gestionnaires, il faut ajouter les droits suivants : + - Activité de recherche > Permet d'afficher les informations PCRU de l'activité de recherche + - Activité de recherche > Permet d'activer les données PCRU pour une activité + +### Configuration des référentiels + +![PCRU configuration du module](./images/pcru-config2.png) + +Quand on soumet des informations à PCRU, certains champs attendent une valeur parmi une liste bien précise définie par PCRU. Toutefois il n'existe pas aujourd'hui d'API permettant de récupérer automatiquement ces valeurs. Si ces valeurs venaient à évoluer, l'administrateur OSCAR devra donc les intégrer à la main. Par exemple, si un gestionnaire indique ne pas pouvoir soumettre une activité à PCRU car le pôle de compétitivité concerné n'apparaît pas dans la liste affichée par OSCAR alors qu'il est bien disponible sur le site de PCRU, cela indique que l'administrateur devra mettre à jour ce référentiel. + +Les quatres référentiels sont les suivants : + - types de contrats, + - pôles de compétitivité, + - sources de financement, + - et types d'établissement (pour le fichier des partenaires). + +Pour mettre à jour les référentiels, cliquer sur le bouton ne suffit pas (pas de solution automatique à ce jour). L'administrateur doit d'abord : + - aller sur le site de PCRU pour récupérer (manuellement) les listes des référentiels à jour. Sur la page https://pcru.dr14.cnrs.fr/Contrats/Importation.aspx on peut déplier des listes déroulantes pour voir les types de contrats, les pôles de compétitivité et les sources de financement. +![PCRU liste des types de contrats](./images/pcru-liste-types-contrats.png) + + - Sur la page https://pcru.dr14.cnrs.fr/Partenaires/Importation.aspx on peut voir la liste des types d'établissement. + ![PCRU liste des types d'établissements](./images/pcru-liste-types-etablissement.png) + + - L'administrateur doit ensuite comparer ces listes avec les valeurs actuellement disponibles dans OSCAR pour voir s'il est nécessaire de les mettre à jour, s'il en manque. L'interface d'administration permet de visualiser ces valeurs. Elles sont enregistrées dans les tables de la base de données appelées *pcrutypecontract*, *pcrupolecompetitivite*, *pcrusourcefinancement* et *pcrutypeetablissement*. + + - Si des valeurs doivent être mises à jour ou ajoutées, l'administrateur peut directement modifier les valeurs dans les tables en base de données ou bien passer par l'import de fichiers JSON. + - L'import de fichiers JSON permet uniquement d'ajouter de nouvelles valeurs, et non de modifier des intitulés existants. Pour passer par l'import de fichiers JSON, l'administrateur doit modifier les fichiers (*pcru-contracts-types.json*, *pcru-pole-competitivite.json*, *pcru-sources-financement.json* et *pcru-types-etablissement.json*) dans le répertoire *oscar/install/* avec les nouvelles valeurs. Il doit ensuite demander à OSCAR de mettre à jour la base de données en créant les nouvelles valeurs présentes dans ces fichiers JSON. En cliquant sur le bouton *"Mettre à jour les référentiels"* sur la page d'administration dans la partie consacrée au module PCRU, tous les référentiels seront mis à jour. Pour ne mettre à jour qu'un seul référentiel, il faut d'abord aller sur la page de visualisation des valeurs de ce référentiel en cliquant sur le bouton *"Voir"*, puis cliquer sur le bouton bleu au pied de la page *"Actualiser depuis le fichier JSON dans oscar/install"*. + ![PCRU types établissements](./images/pcru-types-etablissements.png) + +#### Configuration des correspondances des types de contrat +Le référentiel des types de contrats a un fonctionnement particulier par rapport aux autres. + +Tout contrat envoyé à PCRU doit avoir un type de contrat parmi la liste définie par PCRU. Pour faire gagner du temps aux gestionnaires, il est possible de configurer une correspondance entre un type OSCAR et un type PCRU. Cela va permettre au système de pré-remplir automatiquement le champ *type de contrat* à envoyer à PCRU à partir du type OSCAR et ainsi éviter au gestionnaire d'avoir à le remplir à la main. + +![PCRU correspondance des types de contrats](./images/pcru-correspondance-contrats.png) + + +### Configuration des autres correspondances + +![PCRU options](./images/pcru-options.png) + +En cliquant sur le bouton *Configurer* en haut à droite de la fiche Module PCRU, on arrive sur une page permettant de configurer d'autres correspondances entre OSCAR et PCRU. À nouveau, ces correspondances ont pour objectif de permettre la sélection automatique de valeurs afin de faire gagner du temps aux gestionnaires lors de la saisie des informations à envoyer à PCRU. Les options sont les suivantes : + + - **Type pour le contrat signé** : on choisit ici le type de document OSCAR (par exemple *Contrat Version Définitive Signée*) qui sera utilisé pour déterminer automatiquement, parmi les documents de l'activité, lequel représente le contrat signé. Ce fichier PDF sera envoyé à PCRU. + - **Responsable scientifique** : on choisit ici le rôle OSCAR (le plus souvent *Responsable scientifique*) qui sera utilisé pour déterminer automatiquement, parmi les personnes liées à l'activité, laquelle est la responsable scientifique. Son nom sera envoyé à PCRU. + - **Partenaires** : on choisit ici le ou les rôles OSCAR (par exemple *Partenaire*) qui seront utilisés pour déterminer automatiquement, parmi les organisations liées à l'activité, lesquelles sont des partenaires. Leurs noms (libellé court) seront envoyés à PCRU. + - **Partenaire principal** : on choisit ici le ou les rôles OSCAR (par exemple *Co-contractant*) qui seront utilisés pour déterminer automatiquement, parmi les organisations liées à l'activité, laquelle est la partenaire principale. Cette organisation devra avoir ses informations correctement renseignées pour pouvoir être envoyée (numéro SIREN ou SIRET ou TVA intra ou DUNS, type d'établissement, adresse...) + - **Unité(s)** : on choisit ici le ou les rôles OSCAR (le plus souvent *Laboratoire*) qui seront utilisés pour déterminer automatiquement, parmi les organisations liées à l'activité, laquelle est le laboratoire du CNRS. Cette organisation devra avoir au moins son code UMR (labintel) de renseigné, et dans l'idéal son code RNSR. + +### Activation du module PCRU +Pour activer le module PCRU, il faut activer la checkbox (*Module Actif*) tout en haut de la page de configuration du module. + +### Configuration de la connexion au serveur SFTP + +![PCRU SFTP](./images/pcru-sftp.png) + +Sur cette page on peut renseigner les différentes valeurs, obtenues de la part de PCRU, et permettant à OSCAR de se connecter au serveur SFTP de PCRU. + +Une fois la configuration réalisée, on peut vérifier que la connexion fonctionne en lançant la commande `php bin/oscar.php check:config` ou en allant sur la page d'administration de vérification de la configuration. + +### Configuration du CRON pour l'envoi automatique des activités à PCRU + +La commande oscar `php bin/oscar.php pcru:process-ftp` permet de déclencher un échange avec le serveur SFTP de PCRU et peut donc être configurée via un CRON pour s'exécuter une fois par jour. Toutefois il est recommandé de gérer les échanges manuellement au moins au début pour vérifier que tout fonctionne correctement. + +## Activation de la transmission vers PCRU pour une activité + +Maintenant que nous avons vu comment configurer le module PCRU, nous allons voir comment l'utiliser au quotidien. + +Pour activer la transmission vers PCRU pour une activité, le gestionnaire (ayant les droits) devra cliquer sur le bouton *Accès aux informations PCRU* à partir de la fiche Activité. +![PCRU fiche activité](./images/pcru-fiche-activite.png) + +Les gestionnaires accèderont alors à une page *Informations PCRU* contenant un grand fomulaire avec toutes les informations demandées par PCRU (33 champs). On peut choisir d'utiliser les valeurs par défaut déterminées automatiquement par OSCAR ou bien remplacer manuellement certaines valeurs en décochant les cases à cocher correspondantes. + +![PCRU activité formulaire](./images/pcru-formulaire.png) + +Une fois toutes les erreurs corrigées, le gestionnaire devra cocher tout en bas du formulaire la case *"Activer l'envoi vers PCRU"* pour que cette activité soit envoyée à PCRU. L'activité sera alors envoyée à PCRU la prochaine fois que le CRON s'exécutera ou que l'administrateur déclenchera manuellement l'échange avec PCRU. + +## Page d'administration de suivi des échanges PCRU +Via le menu Administration > Maintenance des données > Processus PCRU, on peut accéder à la page de suivi des échanges PCRU. + +![PCRU suivi](./images/pcru-suivi.png) + +Cette page contient de nombreuses informations. + +### Récapitulatif des états/statuts des activités +Un tableau liste les activités pour lequel un gestionnaire a coché la case *"Activer l'envoi à PCRU"* et indique leur statut. + +Lorsqu'un gestionnaire enregistre pour la première fois le formulaire PCRU, cela créé une nouvelle ligne dans la table *activitypcruinformations* en base de données, liée à cette activité. La colonne *status* de cette table contient le statut de l'envoi PCRU pour cette activité. Tant que la case *"Activer l'envoi à PCRU"* n'est pas cochée, l'activité n'apparaît pas dans la liste. + +Une activité peut passer par les statuts suivants : + - **jamais-envoyee** (pastille jaune) : indique que l'activité n'a pas encore été envoyée à PCRU. + - si la case *"Activer l'envoi à PCRU"* n'est pas cochée, l'activité n'apparaît pas dans la liste + - si l'activité contient des erreurs, une pastille rouge l'indique et l'activité ne sera pas envoyée tant qu'elles ne seront pas corrigées + - **envoyee-attente-retour-pcru** (pastille verte) : indique que les informations de l'activité ont été déposées dans le fichier CSV sur le serveur SFTP PCRU et que nous sommes en attente d'un retour de PCRU concernant l'intégration de cette activité. Cela survient lorsque l'envoi était activé pour l'activité, qu'elle n'avait pas d'erreur, et que l'administrateur a déclenché un envoi (manuel ou en CRON). + - **retour-pcru-ok** (pastille verte) : PCRU a confirmé la bonne intégration de cette activité en déposant sur le serveur SFTP le fichier marqueur RETOUR-PCRU.OK. Il n'y a plus rien à faire concernant cette activité. Elle disparaîtra de la liste au bout de 6 mois (Les activités de plus de 6 mois dont la bonne intégration a été confirmée par PCRU n'apparaissent pas dans la liste). + - **retour-pcru-erreurs** (pastille rouge) : PCRU a indiqué l'échec de l'intégration de cette activité en déposant sur le serveur SFTP le fichier DEPOT-CSV.ERRORS.json et en indiquant dans son contenu que cette activité précisément est en erreur. Les erreurs particulières remontées seront affichées sur la page *Informations PCRU* de l'activité. Résoudre la situation demande une intervention manuelle. Cette partie est détaillée plus loin dans cette documentation. + +![PCRU erreurs](./images/pcru-erreurs.png) + +![PCRU erreurs détail](./images/pcru-erreurs2.png) + +```mermaid +flowchart TD + jamais-envoyee(Encore jamais envoyée) -->|Si sans erreurs et qu'un échange est déclenché| envoyee-attente-retour-pcru{Envoyée, attente retour PCRU} + envoyee-attente-retour-pcru -->|Si PCRU déposé le fichier RETOUR-PCRU.OK| retour-pcru-ok(Retour PCRU OK) + envoyee-attente-retour-pcru -->|Si PCRU déposé le fichier DEPOT-CSV.ERRORS.json| retour-pcru-erreurs(Retour PCRU erreurs) +``` + +### Bouton de déclenchement d'un échange + +Cliquer sur le bouton "🔁 Déclencher un échange avec le serveur SFTP PCRU (envoi des activités en attente et relève des réponses de PCRU)" ou bien exécuter la commande `php bin/oscar.php pcru:process-ftp` va délencher le processus suivant : + + - tentative de connexion au serveur SFTP de PCRU + - liste des fichiers présents et en fonction : + - si aucun fichier n'est présent, et que des activité avaient été envoyées, cela signifie qu'elles ont été correctement intégrées par PCRU. Les activité encore au statut `envoyee-attente-retour-pcru` passent alors au statut `retour-pcru-ok` + - si les fichiers présents sont ceux qui avaient été déposés lors du dernier échange, c'est que nous sommes toujours en attente d'un retour de PCRU. Alors le processus s'arrête là. + - si un fichier d'erreur (`DEPOT-CSV.ERRORS.json`) a été déposé par PCRU, alors ce fichier est analysé. Les activité en erreurs passent au statut `retour-pcru-erreurs` tandis que celles qui ne sont pas mentionnées dans le fichier passent au statut `retour-pcru-ok`. Le processus s'arrête alors, et la résolution des erreurs va nécessiter une intervention manuelle de l'administrateur OSCAR. + - tant tous les autres cas, le processus s'arrête en erreur car ils ne sont pas sensés se produire et nécessitent une intervention ou un contrôle manuel (fichier inconnu qui apparaît par exemple) + - Si le répertoire du serveur SFTP est vide, alors OSCAR va tenter d'envoyer des activités en attente d'envoi. Pour chacune d'entre elle, il va d'abord vérifier si elles sont en erreur ou non, et seules celles qui ne sont pas en erreurs seront déposées sur le serveur. Les fichiers suivants sont déposés : + - un fichier CSV avec les informations des contrats + - un fichier CSV avec les partenaires principaux (ceux dont toutes les informations ont bien été renseignées) + - les documents PDFs des contrats signés + - les fichiers vides "marqueurs" OK + +La zone "Historique des échanges" contient les informations détaillant les échanges ayant eu lieu au cours des 6 derniers mois. Il est possible de cliquer sur la description pour obtenir davantage de détail en dépliant la zone. + +![PCRU historique](./images/pcru-historique.png) + +### Procédure à suivre en cas de retour d'erreur PCRU + +Lorsque PCRU indique par le dépôt du fichier `DEPOT-CSV.ERRORS.json` avoir échoué à intégrer automatiquement certaines activité car elle contiennent des erreurs, il faut procéder ainsi : + - Récupérer le fichier `DEPOT-CSV.ERRORS.json`, en faire une copie et analyser son contenu + - Les activité dont le statut est `envoyee-attente-retour-pcru` et qui n'apparaissent pas dans ce fichier ont normalement été correctement intégrées. Il faut vérifier sur le site de PCRU que c'est bien le cas, puis les passer au statut `retour-pcru-ok` par une requête SQL modifiant le champ `status` de la table `activitypcruinformations`. + - Pour les autres, il faut analyser l'origine de l'erreur et la corriger : + - si l'activité a été partiellement intégrée sur le site de PCRU, il est possible de la corriger directement sur le site de PCRU puis la passer au statut `retour-pcru-ok` dans OSCAR + - si elle n'a pas été intégrée du tout par PCRU, il est possible de la repasser au statut `jamais-envoyee` par deux possibilités. Toutefois pensez bien à noter l'origine des erreurs car ces requêtes suppriment cette information de la BDD : + - recommencer toute la saisie PCRU à zéro pour cette activité en supprimant toutes les informations PCRU : + +```sql +delete from activitypcruinformations where activity_id = ?; +``` + +- - conserver les informations saisies par le gestionnaire via la requête suivante : + +```sql + +update + activitypcruinformations +set + status = 'jamais-envoyee', + datepremierdepot = null, + dateenvoifichiercontrat = null, + envoiobjet = NULL, + envoilabintel = NULL, + envoirnsr = NULL, + envoisigle = NULL, + envoinumcontrat = NULL, + envoiequipe = NULL, + envoitypecontrat = NULL, + envoiacronyme = NULL, + envoicontratsassocies = NULL, + envoiresponsablescientifique = NULL, + envoiemployeurresponsablescientifique = NULL, + envoicoordinateurconsortium = NULL, + envoipartenaires = NULL, + envoipartenaireprincipal = NULL, + envoiidpartenaireprincipal = NULL, + envoisourcefinancement = NULL, + envoilieuexecution = NULL, + envoidatedernieresignature = NULL, + envoiduree = NULL, + envoidatedebut = NULL, + envoidatefin = NULL, + envoimontantpercuunite = NULL, + envoicontributionfinanceur = NULL, + envoimontanttotal = NULL, + envoivalidepolecompetitivite = NULL, + envoipolecompetitivite = NULL, + envoicommentaires = NULL, + envoipia = NULL, + envoireference = NULL, + envoiaccordcadre = NULL, + envoicifre = NULL, + envoichaireindustrielle = NULL, + envoipresencepartenaireindustriel = NULL, + erreurs = NULL +where + activity_id = ?; +``` + + - il faut alors modifier l'information qui causait l'erreur puis ré-envoyer l'activité. + + +### Procédure d'intégration manuelle (sans passer par le serveur SFTP) + +Il est possible de télécharger les données au format attendu par PCRU pour pouvoir ensuite les intégrer manuellement sur le site web de PCRU. +Il faut pour cela cliquer sur le bouton + - Télécharger les documents pour ensuite les téléverser manuellement sur le site web PCRU : + - 📥 Uniquement les activités en attente d'envoi + +Un zip est alors téléchargé, avec les activité en attente d'envoi, contenant les fichiers qui sont normalement déposés sur le serveur SFTP (sans les fichiers vides marqueurs OK) : + - un fichier CSV avec les informations des contrats + - un fichier CSV avec les partenaires principaux (ceux dont toutes les informations ont bien été renseignées) + - les documents PDFs des contrats signés + +Le fichier des partenaires page "Importer de nouveaux Partenaires :" https://pcru.dr14.cnrs.fr/Partenaires/Importation.aspx + +Le fichier des contrats peut alors être importé sur le site de PCRU, page "Importer des données de contrats à partir d'un tableau CSV :" https://pcru.dr14.cnrs.fr/Contrats/Importation.aspx + +Et ensuite les PDFs peuvent être téléversé sur la page "Importation multiple de fichiers PDF :" https://pcru.dr14.cnrs.fr/Documents/Importation.aspx dans la limite de 20 Mo par fichier et 200 Mo au total. + +Attention à bien vérifier les erreurs à chaque étape : + - Si l'import d'un des partenaire échoue, l'import de son contrat risque ensuite d'échouer. + - Si l'import d'un contrat échoue, l'import de son fichier PDF risque ensuite d'échouer. + +Il faut ensuite manuellement mettre à jour le statut des activité ainsi importées via une requête SQL. Pour chaque activité dont l'import a réussi, il faut passer la ligne de la table `activitypcruinformations` correspondante du `status` "`jamais-envoyee`" vers le `status` "`retour-pcru-ok`". Attention à ne pas modifier à l'aveugle toutes les lignes ayant le statut "`jamais-envoyee`" car celles qui contiennent des erreurs n'ont pas été téléchargées dans le zip. + +Si nécessaire, il est possible d'extraire les informations PCRU pour toutes les activités ayant déjà eu des informations PCRU et pas seulement celles étant dans le statut "`jamais-envoyee`" (en attente d'envoi) en cliquant sur le bouton "🗃 L'intégralité des activités". diff --git a/front/src/AdministrationPcru.vue b/front/src/AdministrationPcru.vue index eb08911fa6f9efb32ea34a138e9e3c8d6320aac6..262f1e28ecad2b1ebd870d619516c7f3a95cc8a5 100644 --- a/front/src/AdministrationPcru.vue +++ b/front/src/AdministrationPcru.vue @@ -31,11 +31,6 @@ Accès FTP -
- - Le transfert FTP n'est pas encore activé dans cette version -
-
@@ -87,20 +82,55 @@
+
+ + Les fichiers de la clé privée et de la clé publique doivent être déposés dans le répertoire oscar/config/autoload/ et être accessible en lecture à l'utilisateur du serveur web. +
+
-
+
- +
- Clef SSH + Nom du fichier contenant la clé privée SSH
- +
+
+
+
+ +
+
+ Nom du fichier contenant la clé publique SSH +
+ +
+
+
+
+ +
+
+
+ +
+
+ Mot de passe de la clé privée SSH +
+ +
+
+
+
@@ -173,7 +203,29 @@

- Oscar utilisera le(s) rôle(s) {{ configuration.pcru_partner_roles.join(", ") }} des oragnisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).

+ Oscar utilisera le(s) rôle(s) {{ configuration.pcru_partner_roles.join(", ") }} des organisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).

+
+
+ +
+
+
+ + Partenaire principal +
+ +
+ + +
+
+

+ + Oscar utilisera le(s) rôle(s) {{ configuration.pcru_partenaire_principal_roles.join(", ") }} des organisations de la fiche activité pour extraire le partenaire principal.


@@ -198,7 +250,7 @@

- Oscar utilisera le(s) rôle(s) {{ configuration.pcru_unit_roles.join(", ") }} des oragnisations de la fiche activité pour extraire le code URM.

+ Oscar utilisera le(s) rôle(s) {{ configuration.pcru_unit_roles.join(", ") }} des organisations de la fiche activité pour extraire les codes UMR (labintel) et RNSR.

@@ -267,8 +319,11 @@ export default { formData.append('port', this.configuration.pcru_port); formData.append('user', this.configuration.pcru_user); formData.append('pass', this.configuration.pcru_pass); - formData.append('ssh', this.configuration.pcru_ssh); + formData.append('ssh_private', this.configuration.pcru_ssh_private); + formData.append('ssh_public', this.configuration.pcru_ssh_public); + formData.append('ssh_private_pass', this.configuration.pcru_ssh_private_pass); formData.append('pcru_partner_roles', this.configuration.pcru_partner_roles); + formData.append('pcru_partenaire_principal_roles', this.configuration.pcru_partenaire_principal_roles); formData.append('pcru_unit_roles', this.configuration.pcru_unit_roles); formData.append('pcru_incharge_role', this.configuration.pcru_incharge_role); formData.append('pcru_contract_type', this.configuration.pcru_contract_type); diff --git a/install/pcru-contracts-types.json b/install/pcru-contracts-types.json index 6662e5905085c9d6abb8fd9b6175d48b744654b9..3218c1ee64e910d3f7aa83e28fb51540af036858 100644 --- a/install/pcru-contracts-types.json +++ b/install/pcru-contracts-types.json @@ -5,16 +5,16 @@ "Autre", "Avenant", "Contrat de collaboration de recherche", - "Contrat de coproduction d'œuvre audiovisuelle", + "Contrat de coprod d'oeuvre audiovisuelle", "Contrat de mise à disposition de personnel", + "Contrat de prestations de service", "Contrat équipe-conseil", "Contrat plan état région", - "Convention de GIS", + "Convention-cadre", "Convention de maturation", - "Convention de prestations de service", "Convention de mise à dispo. de matériel", "Convention de reversement", - "Convention générale de partenariat", + "Convention GIS", "Laboratoires communs", "MOU", "Subvention / Aide" diff --git a/install/pcru-pole-competitivite.json b/install/pcru-pole-competitivite.json index c5f0d805dea3fa8a6e593db7c42bb861fde98e3b..b40a343935521b53bd8183cbf782966e0c1e61dc 100644 --- a/install/pcru-pole-competitivite.json +++ b/install/pcru-pole-competitivite.json @@ -18,7 +18,7 @@ "Cosmetic Valley", "Derbi", "DREAM Eau & Milieu", - "Eau", + "EAU", "Elastopôle", "Elopsys", "EMC2", @@ -43,6 +43,7 @@ "MicroTechniques", "Minalogic", "Mov'eo", + "Non-précisé", "Nov@log", "Nucléaire Bourgogne", "Nutrition Santé Longévité", diff --git a/install/pcru-sources-financement.json b/install/pcru-sources-financement.json index 566799eba9b4cbdce9e5e0b6251d523f2b9b5451..b48ea6f0953b1ba8d9305ad2fbd48d96cc7d47d6 100644 --- a/install/pcru-sources-financement.json +++ b/install/pcru-sources-financement.json @@ -7,7 +7,7 @@ "Contrats de recherche industriels", "Contrats sans financement", "CPER", - "Financements de l’innovation", + "Financements de l'innovation", "Financements internationaux", "Fondations, associations, mécénats", "Fonds structurels européens", diff --git a/install/pcru-types-etablissement.json b/install/pcru-types-etablissement.json new file mode 100644 index 0000000000000000000000000000000000000000..6dca3ce9a8fd04e9ff20393f82a3d700ba35c622 --- /dev/null +++ b/install/pcru-types-etablissement.json @@ -0,0 +1,9 @@ +[ + "Autre", + "CNRS", + "Enseignement supérieur", + "Privé étranger", + "Privé français", + "Public étranger", + "Public français" +] \ No newline at end of file diff --git a/module/Oscar/config/module.config.php b/module/Oscar/config/module.config.php index fd6074a022a75831ff29b85c7f3a4f4eb4b0a363..aab55b03223793f624dfdd5672693f2f0d5ad91b 100755 --- a/module/Oscar/config/module.config.php +++ b/module/Oscar/config/module.config.php @@ -80,6 +80,7 @@ return array( 'typeDocumentApi', 'numerotation', 'parameters', + 'pcruTypesEtablissement', 'polesCompetitivite', 'privileges2', 'planComptableLoaded', @@ -175,8 +176,6 @@ return array( 'spentSynthesisActivity', 'personsAccessDeep', 'pcru', - 'pcruInfos', - "pcruList", "traces", "apiUi", "timesheet", @@ -371,6 +370,12 @@ return array( 'roles' => ['user'], ], + [ + 'controller' => 'Pcru', + 'action' => ['api', 'pcruInformations', 'pcruTransmissions', 'download'], + 'roles' => ['user'], + ], + //////////////////////////////////////////////////////////////// // PERSON /////////////////////////////////////////////////////////////// @@ -596,6 +601,8 @@ return array( \Oscar\Service\OrganizationService::class => \Oscar\Service\OrganizationServiceFactory::class, \Oscar\Service\OscarConfigurationService::class => \Oscar\Service\OscarConfigurationServiceFactory::class, \Oscar\Service\OscarUserContext::class => \Oscar\Service\OscarUserContextFactory::class, + \Oscar\Service\PcruFtpService::class => \Oscar\Service\PcruFtpServiceFactory::class, + \Oscar\Service\PcruInformationsService::class => \Oscar\Service\PcruInformationsServiceFactory::class, \Oscar\Service\PCRUService::class => \Oscar\Service\PCRUServiceFactory::class, \Oscar\Service\PersonService::class => \Oscar\Service\PersonServiceFactory::class, \Oscar\Service\ProjectService::class => \Oscar\Service\ProjectServiceFactory::class, @@ -644,6 +651,7 @@ return array( 'TabDocument' => \Oscar\Controller\TabDocumentControllerFactory::class, 'Notification' => \Oscar\Controller\NotificationControllerFactory::class, 'Organization' => \Oscar\Controller\OrganizationControllerFactory::class, + 'Pcru' => \Oscar\Controller\PcruControllerFactory::class, 'Project' => \Oscar\Controller\ProjectControllerFactory::class, 'Public' => \Oscar\Controller\PublicControllerFactory::class, 'Timesheet' => \Oscar\Controller\TimesheetControllerFactory::class, diff --git a/module/Oscar/config/routes.yml b/module/Oscar/config/routes.yml index 95b396c264e2d46ed76b0730f87da502e96c65f8..3b0bc1b00c162bdc71c0808c1955a4892583b9ae 100644 --- a/module/Oscar/config/routes.yml +++ b/module/Oscar/config/routes.yml @@ -999,12 +999,13 @@ contract: defaults: action: api - pcru-list: + pcru-transmissions: type: segment options: - route: /transmission-pcru + route: /transmissions-pcru defaults: - action: pcruList + controller: Pcru + action: pcruTransmissions gant: type: segment @@ -1035,12 +1036,13 @@ contract: defaults: action: show - pcru-infos: + pcru-informations: type: segment options: - route: /pcru-infos/:id + route: /pcru-informations/:id defaults: - action: pcruInfos + controller: Pcru + action: pcruInformations estimated-spent: type: segment @@ -2184,6 +2186,14 @@ administration: action: sourcesFinancement may_terminate: true + # PCRU / CNRS - Types d'établissement + pcru-types-etablissement: + type: segment + options: + route: /pcru-types-etablissement + defaults: + action: pcruTypesEtablissement + may_terminate: true activity-notes: type: literal @@ -2214,3 +2224,24 @@ activity-mots-cles: route: /api defaults: action: api + +pcru: + type: literal + options: + route: /pcru + defaults: + controller: Pcru + may_terminate: false + child_routes: + api: + type: segment + options: + route: /api + defaults: + action: api + download: + type: segment + options: + route: /telecharger + defaults: + action: download diff --git a/module/Oscar/src/Oscar/Command/OscarCheckConfigCommand.php b/module/Oscar/src/Oscar/Command/OscarCheckConfigCommand.php index 383080c56c6b6c160e6abfb6275c06ddb6e19446..2defce82e798183e6214e120a435921a1dd4e19a 100644 --- a/module/Oscar/src/Oscar/Command/OscarCheckConfigCommand.php +++ b/module/Oscar/src/Oscar/Command/OscarCheckConfigCommand.php @@ -326,9 +326,6 @@ class OscarCheckConfigCommand extends OscarCommandAbstract $pathDocuments = $config->getConfiguration('oscar.mailer.template'); $this->checkPath($io, $pathDocuments, "Modèle de mail > TEMPLATE"); - - $pathDocuments = $config->getConfiguration('oscar.pcru.files_path'); - $this->checkPath($io, $pathDocuments, "Documents temporaires PCRU"); } catch (OscarException $e) { $io->error(sprintf("Configuration manquante : %s", $e->getMessage())); return self::FAILURE; @@ -498,6 +495,130 @@ class OscarCheckConfigCommand extends OscarCommandAbstract return self::FAILURE; } + $io->section(" ### PCRU : "); + + $pcru_enabled = $oscarConfig->getEditableConfKey('pcru_enabled', false); + if (!$pcru_enabled) { + $io->writeln("Le module PCRU n'est pas activé\n"); + } else { + + try { + + $repertoireDistant = $oscarConfig->getConfiguration('pcru.repertoire_sftp'); + $oscarConfig->getConfiguration('pcru.filename_contrats'); + $oscarConfig->getConfiguration('pcru.filename_csv_ok'); + $oscarConfig->getConfiguration('pcru.filename_retour_pcru_ok'); + $oscarConfig->getConfiguration('pcru.filename_retour_pcru_ok_csv'); + $oscarConfig->getConfiguration('pcru.filename_pdf_ok'); + + $pcru_host = $oscarConfig->getEditableConfKey('pcru_host'); + if (mb_strlen(trim($pcru_host)) == 0) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Hôte (clé pcru_host)'); + } + $pcru_port = $oscarConfig->getEditableConfKey('pcru_port'); + if (mb_strlen(trim($pcru_port)) == 0) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Port (clé pcru_port)'); + } + $pcru_user = $oscarConfig->getEditableConfKey('pcru_user'); + if (mb_strlen(trim($pcru_user)) == 0) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Identifiant (clé pcru_user)'); + } + $pcru_pass = $oscarConfig->getEditableConfKey('pcru_pass'); + $has_pcru_pass = mb_strlen(trim($pcru_pass)) > 0; + + $pcru_ssh_private = $oscarConfig->getEditableConfKey('pcru_ssh_private'); + $has_pcru_ssh_private = mb_strlen(trim($pcru_ssh_private)) > 0; + + $pcru_ssh_public = $oscarConfig->getEditableConfKey('pcru_ssh_public'); + $has_pcru_ssh_public = mb_strlen(trim($pcru_ssh_public)) > 0; + + if ($has_pcru_ssh_private && !$has_pcru_ssh_public) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé publique SSH (clé pcru_ssh_public). Si le nom de la clé privée est renseigné alors le nom de la clé publique doit l\'être aussi.'); + } + if (!$has_pcru_ssh_private && $has_pcru_ssh_public) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé privée SSH (clé pcru_ssh_private). Si le nom de la clé publique est renseigné alors le nom de la clé privée doit l\'être aussi.'); + } + if (!$has_pcru_ssh_private && !$has_pcru_pass) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Mot de passe (clé pcru_pass). Un mode d\'authentification doit être configuré : mot de passe utilisateur et/ou clé public/privée.'); + } + + $pcru_ssh_private_pass = trim($oscarConfig->getEditableConfKey('pcru_ssh_private_pass')); + + $autoload_dir = realpath(__DIR__.'/../../../../../config/autoload/'); + $ssh_private_key_file_path = $autoload_dir.'/' . $pcru_ssh_private; + if ($has_pcru_ssh_private){ + if (!file_exists($ssh_private_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_private sensé contenir la clé privée SSH n'existe pas."); + } else if (!is_readable($ssh_private_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_private contenant la clé privée SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + } + } + + $ssh_public_key_file_path = $autoload_dir.'/' . $pcru_ssh_public; + if ($has_pcru_ssh_public){ + if (!file_exists($ssh_public_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_public sensé contenir la clé publique SSH n'existe pas."); + } else if (!is_readable($ssh_public_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_public contenant la clé publique SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + } + } + + // Après avoir vérifié les clés de configuration, on regarde si le serveur SFTP est joignable. + $conn = ssh2_connect($pcru_host, $pcru_port); + if (!$conn) { + throw new OscarException("Impossible de se connecter au serveur SFTP PCRU : hôte non joignable. Hôte : $pcru_host, Port : $pcru_port"); + } + + // Connexion en utilisant une clé SSH + if ($has_pcru_ssh_private) { + if (!@ssh2_auth_pubkey_file($conn, $pcru_user, + $ssh_public_key_file_path, + $ssh_private_key_file_path, $pcru_ssh_private_pass)) { + + if (!$has_pcru_pass) { + // Si la connexion échoue, et qu'on n'a pas de mot de passe utilisateur, on arrête là + ssh2_disconnect($conn); + throw new OscarException("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvaise clé SSH (privée, publique, ou mauvais mot de passe de la clé) ? Mot de passe utilisateur manquant ?"); + } + // Car sinon, même si la connexion avec clé a échoué c'est peut-être simplement parcequ'il s'agit d'une connexion clé + mot de passe utilisateur, auquel cas la connexion devrait réussir lors de la prochaine étape, ssh2_auth_password + // Voir ce commentaire : https://www.php.net/manual/en/function.ssh2-auth-pubkey-file.php#126939 + } + } + + if ($has_pcru_pass) { + if (!ssh2_auth_password($conn, $pcru_user, $pcru_pass)) { + ssh2_disconnect($conn); + throw new OscarException("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvais utilisateur ou mot de passe ?"); + } + } + + $sftp = ssh2_sftp($conn); + if (!$sftp) { + ssh2_disconnect($conn); + throw new OscarException("Échec de l'initialisation du sous-système SFTP"); + } + + $dir = 'ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/'; + $handle = opendir($dir); + if (!$handle) { + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw new OscarException("Impossible d'ouvrir le répertoire $repertoireDistant sur le serveur SFTP."); + } + closedir($handle); + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + + $io->writeln("Connexion au serveur SFTP PCRU OK\n"); + + } catch (\Exception $e) { + $io->error( + "PCRU FAIL, Impossible de se connecter au serveur SFTP PCRU : \n Erreur : " . $e + ); + return self::FAILURE; + } + } + return self::SUCCESS; } diff --git a/module/Oscar/src/Oscar/Command/OscarPcruCreateFileActivityCommand.php b/module/Oscar/src/Oscar/Command/OscarPcruCreateFileActivityCommand.php deleted file mode 100644 index 67cb4fd43a4b6bd7efa8d1545c40a1ea32276203..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Command/OscarPcruCreateFileActivityCommand.php +++ /dev/null @@ -1,67 +0,0 @@ -setDescription("Envoi des données PCRU.") - ->addArgument('oscarid', InputOption::VALUE_REQUIRED, 'N° Oscar') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->addOutputStyle($output); - - /** @var OscarConfigurationService $configuration */ - $configuration = $this->getServicemanager()->get(OscarConfigurationService::class); - - /** @var PCRUService $pcruService */ - $pcruService = $this->getServicemanager()->get(PCRUService::class); - - /** @var SymfonyStyle $io */ - $io = new SymfonyStyle($input, $output); - - // Récupération des données - $numeroOscar = $input->getArgument('oscarid'); - - if( !$numeroOscar ){ - $io->error("Vous devez renseigner un IDOSCAR"); - - $activities = $pcruService->getActivitiesAvailable(); - - $io->title("Informations PCRU disponibles"); - if( count($activities) == 0 ){ - $io->warning("Aucune activité n'a de données PCRU prête"); - } - $out = []; - - } - - /** @var PCRUService $pcruService */ - $pcruService = $this->getServicemanager()->get(PCRUService::class); - - $fileContent = $pcruService->generateFileContentForActivity($numeroOscar, true); - - echo $fileContent; - - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Command/OscarPcruGenerateDataActivityCommand.php b/module/Oscar/src/Oscar/Command/OscarPcruGenerateDataActivityCommand.php deleted file mode 100644 index b519696a9008218fc637ae0af59e97cb3f06cf74..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Command/OscarPcruGenerateDataActivityCommand.php +++ /dev/null @@ -1,63 +0,0 @@ -setDescription("Génération des données PCRU pour l'envoi.") - ->addOption('path', 'd', InputOption::VALUE_OPTIONAL, 'Dossier où créer les fichiers à transmettre (Utilise la dossier en configuration par défaut)') - ->addOption('purge', 'p', InputOption::VALUE_OPTIONAL, "Une fois le transfert terminé, les fichiers sont supprimés localement", false); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->addOutputStyle($output); -// /** @var OscarConfigurationService $configuration */ -// $configuration = $this->getServicemanager()->get(OscarConfigurationService::class); - /** @var ProjectGrantService $activityService */ - $activityService = $this->getServicemanager()->get(ProjectGrantService::class); - - /** @var PCRUService $pcruService */ - $pcruService = $activityService->getPCRUService(); - - /** @var SymfonyStyle $io */ - $io = new SymfonyStyle($input, $output); - - $path = $input->getOption('path'); - if( !$path ) - $path = $pcruService->getOscarConfigurationService()->getPcruDirectoryForUpload(); - - - try { - $io->title("Build files fr PCRU into $path"); - $pcruCsv = $pcruService->generatePcruFiles(null, $io); - echo $pcruCsv->makeZip(); - } catch (\Exception $e) { - $io->error($e->getMessage()); - } - - return 0; - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Command/OscarPcruSendCommand.php b/module/Oscar/src/Oscar/Command/OscarPcruProcessFtpCommand.php similarity index 55% rename from module/Oscar/src/Oscar/Command/OscarPcruSendCommand.php rename to module/Oscar/src/Oscar/Command/OscarPcruProcessFtpCommand.php index 0d7474eae0afc51feab61d8315b401f6f647446a..a92cba18bad4ca25c39c932316016c8fd92dae3e 100644 --- a/module/Oscar/src/Oscar/Command/OscarPcruSendCommand.php +++ b/module/Oscar/src/Oscar/Command/OscarPcruProcessFtpCommand.php @@ -3,27 +3,23 @@ namespace Oscar\Command; - +use Oscar\Exception\OscarPCRUException; use Oscar\Service\OscarConfigurationService; use Oscar\Service\OscarUserContext; -use Oscar\Service\PCRUService; -use Oscar\Service\PersonService; +use Oscar\Service\PcruFtpService; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; -class OscarPcruSendCommand extends OscarCommandAbstract +class OscarPcruProcessFtpCommand extends OscarCommandAbstract { - protected static $defaultName = 'pcru:send'; + protected static $defaultName = 'pcru:process-ftp'; protected function configure() { - $this - ->setDescription("Envoi des données PCRU.") - ->addOption('oscarid', 'u', InputOption::VALUE_OPTIONAL, 'N° Oscar', '') - ; + $this->setDescription("Délencher un échange FTP avec PCRU."); } protected function execute(InputInterface $input, OutputInterface $output) @@ -33,16 +29,27 @@ class OscarPcruSendCommand extends OscarCommandAbstract /** @var OscarConfigurationService $configuration */ $configuration = $this->getServicemanager()->get(OscarConfigurationService::class); - /** @var PCRUService $pcruService */ - $pcruService = $this->getServicemanager()->get(PCRUService::class); + /** @var PcruFtpService $pcruFtpService */ + $pcruFtpService = $this->getServicemanager()->get(PcruFtpService::class); /** @var SymfonyStyle $io */ $io = new SymfonyStyle($input, $output); if( !$configuration->getPcruEnabled() ){ $io->error("Le module PCRU n'est pas actif"); + return self::FAILURE; } else { - var_dump($pcruService->upload()); + $logs = []; + try { + $logs = $pcruFtpService->processPcruFtp(); + } catch (OscarPCRUException $e) { + $logs = $e->details; + } + foreach ($logs as $log) { + $io->writeln($log); + } } + + return self::SUCCESS; } } \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Command/OscarPcruUploadCommand.php b/module/Oscar/src/Oscar/Command/OscarPcruUploadCommand.php deleted file mode 100644 index da9e4a2648cb48ea4b79b703ab622a2d2a7bb6bd..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Command/OscarPcruUploadCommand.php +++ /dev/null @@ -1,81 +0,0 @@ -setDescription("Envoi desdonnées PCRU.") - ->addArgument('path', InputArgument::REQUIRED, 'Emplacement où créer les fichiers à transmettre') - ->addOption('purge', 'p', InputOption::VALUE_OPTIONAL, "Une fois le transfert terminé, les fichiers sont supprimés localement", false); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->addOutputStyle($output); -// /** @var OscarConfigurationService $configuration */ -// $configuration = $this->getServicemanager()->get(OscarConfigurationService::class); - /** @var ProjectGrantService $activityService */ - $activityService = $this->getServicemanager()->get(ProjectGrantService::class); - - /** @var PCRUService $pcruService */ - $pcruService = $activityService->getPCRUService(); - - /** @var SymfonyStyle $io */ - $io = new SymfonyStyle($input, $output); - - $path = realpath($input->getArgument('path')); - - if (!$path) { - $io->error("Cet emplacement n'est pas accessible"); - exit(1); - } - - try { - $pcruService->upload($path, $io); - -// $contactCsv = $path.DIRECTORY_SEPARATOR.'contrat.csv'; -// $io->title($contactCsv); -// if (($handle = fopen($contactCsv, "r")) !== FALSE) { -// $row = 0; -// while (($data = fgetcsv($handle, 0, ";")) !== FALSE) { -// if( $row == 0 ) { -// $row++; continue; -// } -// // N° Oscar -// $numOscar = $data[3]; -// $info = $pcruService->getInfosByNumOscar($numOscar); -// -// -// } -// fclose($handle); -// } - - } catch (\Exception $e) { - $io->error($e->getMessage()); - } - - return 0; - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Controller/AdministrationCheckConfigController.php b/module/Oscar/src/Oscar/Controller/AdministrationCheckConfigController.php index bfc8b31600a3e00a3983c571b713bc06412c50ef..dfb02d63ac988c8bfd78d33084d6b423f6abb3cb 100644 --- a/module/Oscar/src/Oscar/Controller/AdministrationCheckConfigController.php +++ b/module/Oscar/src/Oscar/Controller/AdministrationCheckConfigController.php @@ -3,6 +3,7 @@ namespace Oscar\Controller; use Doctrine\ORM\Tools\SchemaValidator; +use Oscar\Exception\OscarException; use Oscar\Provider\Privileges; use Oscar\Service\administration\CheckConfigService; use Oscar\Strategy\Search\ActivityElasticSearch; @@ -150,8 +151,7 @@ class AdministrationCheckConfigController extends AbstractOscarController $files = [['file' => 'oscar.paths.document_oscar'], ['file' => 'oscar.paths.document_admin_oscar'], ['file' => 'oscar.paths.timesheet_modele'], - ['file' => 'oscar.mailer.template'], - ['file' => 'oscar.pcru.files_path']]; + ['file' => 'oscar.mailer.template']]; foreach ($files as & $file) { $file_error = NULL; @@ -223,7 +223,7 @@ class AdministrationCheckConfigController extends AbstractOscarController $searchClass = $config->getConfiguration('oscar.strategy.activity.search_engine.class'); // ELASTIC SEARCH - if ($searchClass == ActivityElasticSearch::class) { + if ($searchClass == 'Oscar\Strategy\Search\ElasticActivitySearch') { $nodesUrl = $config->getConfiguration('oscar.strategy.activity.search_engine.params'); @@ -338,6 +338,120 @@ class AdministrationCheckConfigController extends AbstractOscarController $ldap_error = "LDAP FAIL, Impossible de se connecter au serveur LDAP : \n Erreur : " . $e; } + $pcru_error = NULL; + $pcru_enabled = $this->getOscarConfigurationService()->getEditableConfKey('pcru_enabled', false); + if ($pcru_enabled) { + try { + $repertoireDistant = $this->getOscarConfigurationService()->getConfiguration('pcru.repertoire_sftp'); + $this->getOscarConfigurationService()->getConfiguration('pcru.filename_contrats'); + $this->getOscarConfigurationService()->getConfiguration('pcru.filename_csv_ok'); + $this->getOscarConfigurationService()->getConfiguration('pcru.filename_retour_pcru_ok'); + $this->getOscarConfigurationService()->getConfiguration('pcru.filename_retour_pcru_ok_csv'); + $this->getOscarConfigurationService()->getConfiguration('pcru.filename_pdf_ok'); + + $pcru_host = $this->getEditableConfKey('pcru_host'); + if (mb_strlen(trim($pcru_host)) == 0) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Hôte (clé pcru_host)'); + } + $pcru_port = $this->getEditableConfKey('pcru_port'); + if (mb_strlen(trim($pcru_port)) == 0) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Port (clé pcru_port)'); + } + $pcru_user = $this->getEditableConfKey('pcru_user'); + if (mb_strlen(trim($pcru_user)) == 0) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Identifiant (clé pcru_user)'); + } + $pcru_pass = $this->getEditableConfKey('pcru_pass'); + $has_pcru_pass = mb_strlen(trim($pcru_pass)) > 0; + + $pcru_ssh_private = $this->getEditableConfKey('pcru_ssh_private'); + $has_pcru_ssh_private = mb_strlen(trim($pcru_ssh_private)) > 0; + + $pcru_ssh_public = $this->getEditableConfKey('pcru_ssh_public'); + $has_pcru_ssh_public = mb_strlen(trim($pcru_ssh_public)) > 0; + + if ($has_pcru_ssh_private && !$has_pcru_ssh_public) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé publique SSH (clé pcru_ssh_public). Si le nom de la clé privée est renseigné alors le nom de la clé publique doit l\'être aussi.'); + } + if (!$has_pcru_ssh_private && $has_pcru_ssh_public) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé privée SSH (clé pcru_ssh_private). Si le nom de la clé publique est renseigné alors le nom de la clé privée doit l\'être aussi.'); + } + if (!$has_pcru_ssh_private && !$has_pcru_pass) { + throw new OscarException('Configuration manquante : PCRU > Accès FTP > Mot de passe (clé pcru_pass). Un mode d\'authentification doit être configuré : mot de passe utilisateur et/ou clé public/privée.'); + } + + $pcru_ssh_private_pass = trim($this->getEditableConfKey('pcru_ssh_private_pass')); + + $autoload_dir = realpath(__DIR__.'/../../../../../config/autoload/'); + $ssh_private_key_file_path = $autoload_dir.'/' . $pcru_ssh_private; + if ($has_pcru_ssh_private){ + if (!file_exists($ssh_private_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_private sensé contenir la clé privée SSH n'existe pas."); + } else if (!is_readable($ssh_private_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_private contenant la clé privée SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + } + } + + $ssh_public_key_file_path = $autoload_dir.'/' . $pcru_ssh_public; + if ($has_pcru_ssh_public){ + if (!file_exists($ssh_public_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_public sensé contenir la clé publique SSH n'existe pas."); + } else if (!is_readable($ssh_public_key_file_path)) { + throw new OscarException("Le fichier config/autoload/$pcru_ssh_public contenant la clé publique SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + } + } + + // Après avoir vérifié les clés de configuration, on regarde si le serveur SFTP est joignable. + $conn = ssh2_connect($pcru_host, $pcru_port); + if (!$conn) { + throw new OscarException("Impossible de se connecter au serveur SFTP PCRU : hôte non joignable. Hôte : $pcru_host, Port : $pcru_port"); + } + + // Connexion en utilisant une clé SSH + if ($has_pcru_ssh_private) { + if (!@ssh2_auth_pubkey_file($conn, $pcru_user, + $ssh_public_key_file_path, + $ssh_private_key_file_path, $pcru_ssh_private_pass)) { + + if (!$has_pcru_pass) { + // Si la connexion échoue, et qu'on n'a pas de mot de passe utilisateur, on arrête là + ssh2_disconnect($conn); + throw new OscarException("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvaise clé SSH (privée, publique, ou mauvais mot de passe de la clé) ? Mot de passe utilisateur manquant ?"); + } + // Car sinon, même si la connexion avec clé a échoué c'est peut-être simplement parcequ'il s'agit d'une connexion clé + mot de passe utilisateur, auquel cas la connexion devrait réussir lors de la prochaine étape, ssh2_auth_password + // Voir ce commentaire : https://www.php.net/manual/en/function.ssh2-auth-pubkey-file.php#126939 + } + } + + if ($has_pcru_pass) { + if (!ssh2_auth_password($conn, $pcru_user, $pcru_pass)) { + ssh2_disconnect($conn); + throw new OscarException("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvais utilisateur ou mot de passe ?"); + } + } + + $sftp = ssh2_sftp($conn); + if (!$sftp) { + ssh2_disconnect($conn); + throw new OscarException("Échec de l'initialisation du sous-système SFTP"); + } + + $dir = 'ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/'; + $handle = opendir($dir); + if (!$handle) { + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw new OscarException("Impossible d'ouvrir le répertoire $repertoireDistant sur le serveur SFTP."); + } + closedir($handle); + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + + } catch (OscarException $e) { + $pcru_error = "PCRU FAIL: " . $e->getMessage(); + } + } + return [ 'build' => \Oscar\OscarVersion::getBuild(), 'config_path_real' => $configPathReal, @@ -373,7 +487,9 @@ class AdministrationCheckConfigController extends AbstractOscarController 'worker_error' => $worker_error, 'worker_gearman_host' => $worker_gearman_host, 'worker_response' => $worker_response, - 'ldap_error' => $ldap_error + 'ldap_error' => $ldap_error, + 'pcru_error' => $pcru_error, + 'pcru_enabled' => $pcru_enabled ]; } diff --git a/module/Oscar/src/Oscar/Controller/AdministrationController.php b/module/Oscar/src/Oscar/Controller/AdministrationController.php index 2e967aceb62127f6c0c388a9a557c3b9be512b62..75d89e9f618a8bf6dc3b0fbd45562d2acf0ec5f6 100644 --- a/module/Oscar/src/Oscar/Controller/AdministrationController.php +++ b/module/Oscar/src/Oscar/Controller/AdministrationController.php @@ -678,6 +678,7 @@ class AdministrationController extends AbstractOscarController implements UsePro $this->getPCRUService()->updateTypeContrat(); $this->getPCRUService()->updatePoleCompetitivite(); $this->getPCRUService()->updateSourcesFinancement(); + $this->getPCRUService()->updatePcruTypesEtablissement(); $this->flashMessenger()->addSuccessMessage('Les référentiels PCRU ont été mis à jour'); $this->redirect()->toRoute('administration/accueil'); return []; @@ -1874,7 +1875,9 @@ class AdministrationController extends AbstractOscarController implements UsePro ), 'pcru_user' => $this->getOscarConfigurationService()->getEditableConfKey('pcru_user', ''), 'pcru_pass' => $this->getOscarConfigurationService()->getEditableConfKey('pcru_pass', ''), - 'pcru_ssh' => $this->getOscarConfigurationService()->getEditableConfKey('pcru_ssh', ''), + 'pcru_ssh_private' => $this->getOscarConfigurationService()->getEditableConfKey('pcru_ssh_private', ''), + 'pcru_ssh_public' => $this->getOscarConfigurationService()->getEditableConfKey('pcru_ssh_public', ''), + 'pcru_ssh_private_pass' => $this->getOscarConfigurationService()->getEditableConfKey('pcru_ssh_private_pass', ''), 'pcru_port' => $this->getOscarConfigurationService()->getEditableConfKey( 'pcru_port', 31000 @@ -1883,6 +1886,7 @@ class AdministrationController extends AbstractOscarController implements UsePro // Conf 'pcru_incharge_role' => $this->getOscarConfigurationService()->getPcruInChargeRole(), 'pcru_partner_roles' => $this->getOscarConfigurationService()->getPcruPartnerRoles(), + 'pcru_partenaire_principal_roles' => $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles(), 'pcru_unit_roles' => $this->getOscarConfigurationService()->getPcruUnitRoles(), 'pcru_contract_type' => $this->getOscarConfigurationService()->getPcruContractType(), @@ -1900,21 +1904,34 @@ class AdministrationController extends AbstractOscarController implements UsePro if ($this->getRequest()->isPost()) { $this->getLoggerService()->info("Modification de la configuration PCRU"); $data = [ - 'pcru_enabled' => $this->params()->fromPost('pcru_enabled') == 'true' ? true : false, - 'pcru_host' => $this->params()->fromPost('host'), - 'pcru_port' => $this->params()->fromPost('port'), - 'pcru_user' => $this->params()->fromPost('user'), - 'pcru_pass' => $this->params()->fromPost('pass'), - 'pcru_ssh' => $this->params()->fromPost('ssh'), + 'pcru_enabled' => $this->params()->fromPost('pcru_enabled') == 'true' ? true : false, + 'pcru_host' => $this->params()->fromPost('host'), + 'pcru_port' => $this->params()->fromPost('port'), + 'pcru_user' => $this->params()->fromPost('user'), + 'pcru_pass' => $this->params()->fromPost('pass'), + 'pcru_ssh_private' => $this->params()->fromPost('ssh_private'), + 'pcru_ssh_public' => $this->params()->fromPost('ssh_public'), + 'pcru_ssh_private_pass' => $this->params()->fromPost('ssh_private_pass'), ]; $partnerRolesPosted = $this->params()->fromPost('pcru_partner_roles', []); + $partenairePrincipalRolesPosted = $this->params()->fromPost('pcru_partenaire_principal_roles', []); $unitRolesPosted = $this->params()->fromPost('pcru_unit_roles', []); $inchargeRolePosted = $this->params()->fromPost('pcru_incharge_role', ''); $contractType = $this->params()->fromPost('pcru_contract_type', ''); - $data['pcru_partner_roles'] = explode(',', $partnerRolesPosted); - $data['pcru_unit_roles'] = explode(',', $unitRolesPosted); + $data['pcru_partner_roles'] = []; + if (mb_strlen(trim($partnerRolesPosted)) > 0) { + $data['pcru_partner_roles'] = explode(',', $partnerRolesPosted); + } + $data['pcru_partenaire_principal_roles'] = []; + if (mb_strlen(trim($partenairePrincipalRolesPosted)) > 0) { + $data['pcru_partenaire_principal_roles'] = explode(',', $partenairePrincipalRolesPosted); + } + $data['pcru_unit_roles'] = []; + if (mb_strlen(trim($unitRolesPosted)) > 0) { + $data['pcru_unit_roles'] = explode(',', $unitRolesPosted); + } $data['pcru_incharge_role'] = $inchargeRolePosted; $data['pcru_incharge_role'] = $inchargeRolePosted; $data['pcru_contract_type'] = $contractType; @@ -1963,4 +1980,20 @@ class AdministrationController extends AbstractOscarController implements UsePro 'datas' => $this->getProjectGrantService()->getPcruSourceFinancement() ]; } + + /** + * Administration des types d'établissement PCRU + * + * @return array + */ + public function pcruTypesEtablissementAction() + { + if ($this->params()->fromQuery('action') == 'update') { + $this->getPcruService()->updatePcruTypesEtablissement(); + return $this->redirect()->toRoute('administration/pcru-types-etablissement'); + } + return [ + 'datas' => $this->getProjectGrantService()->getPcruTypesEtablissement() + ]; + } } \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Controller/OrganizationController.php b/module/Oscar/src/Oscar/Controller/OrganizationController.php index 2f6b265347b1ebc69198c0622fb73c8eaee979a2..44b1f36a0d6d708f2ac15189865b8b5f5e01a734 100644 --- a/module/Oscar/src/Oscar/Controller/OrganizationController.php +++ b/module/Oscar/src/Oscar/Controller/OrganizationController.php @@ -496,7 +496,8 @@ class OrganizationController extends AbstractOscarController implements UseOrgan { $form = new OrganizationIdentificationForm( $this->getOrganizationService(), - $this->getOrganizationService()->getOrganizationTypesObject() + $this->getOrganizationService()->getOrganizationTypesObject(), + $this->getOrganizationService()->getOrganizationTypesEtablissementPcruObject() ); $form->configureRequired($this->getOscarConfigurationService()->getRequiredOrganization()); $entity = new Organization(); @@ -882,7 +883,8 @@ class OrganizationController extends AbstractOscarController implements UseOrgan $form = new OrganizationIdentificationForm( $this->getOrganizationService(), - $this->getOrganizationService()->getOrganizationTypesObject() + $this->getOrganizationService()->getOrganizationTypesObject(), + $this->getOrganizationService()->getOrganizationTypesEtablissementPcruObject() ); $form->configureRequired($this->getOscarConfigurationService()->getRequiredOrganization()); $form->init(); diff --git a/module/Oscar/src/Oscar/Controller/PcruController.php b/module/Oscar/src/Oscar/Controller/PcruController.php new file mode 100644 index 0000000000000000000000000000000000000000..bde00fa6d34961d2885d422b7709ca472e1b49e9 --- /dev/null +++ b/module/Oscar/src/Oscar/Controller/PcruController.php @@ -0,0 +1,657 @@ +pcruFtpService; + } + + /** + * @param PcruFtpService $pcruFtpService + */ + public function setPcruFtpService(PcruFtpService $pcruFtpService): void + { + $this->pcruFtpService = $pcruFtpService; + } + + /** @var PcruInformationsService */ + private $pcruInformationsService; + + /** + * @return PcruInformationsService + */ + public function getPcruInformationsService(): PcruInformationsService + { + return $this->pcruInformationsService; + } + + /** + * @param PcruInformationsService $pcruInformationsService + */ + public function setPcruInformationsService(PcruInformationsService $pcruInformationsService): void + { + $this->pcruInformationsService = $pcruInformationsService; + } + + /** + * @return OscarConfigurationService + */ + public function getOscarConfigurationService(): OscarConfigurationService + { + return $this->oscarConfigurationService; + } + + /** + * @param OscarConfigurationService $oscarConfigurationService + */ + public function setOscarConfigurationService(OscarConfigurationService $oscarConfigurationService): void + { + $this->oscarConfigurationService = $oscarConfigurationService; + } + + public function apiAction() + { + try { + + if ($this->getRequest()->getMethod() == "GET") { + $action = $this->getRequest()->getQuery('action'); + + if ($action == "transmissions-pcru") { + $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_LIST); + + $infos = []; + + $sql = " + select + a.id as activityId, + a.label, + a.description, + pcru.id as activitypcruinformationsid, + pcru.status, + pcru.dateupdated, + pcru.datepremierdepot, + pcru.dateenvoifichiercontrat + from + activitypcruinformations pcru + left join + activity a on a.id = pcru.activity_id + where + pcru.envoiactif is true + and (pcru.dateupdated > now() - interval '6' month + or pcru.status not in ('retour-pcru-ok', 'retour-pcru-ok-mais-fichier-manquant') + or dateenvoifichiercontrat is null) + order by + pcru.dateupdated desc; + "; + + $infos = $this->getEntityManager()->getConnection() + ->executeQuery($sql)->fetchAllAssociative(); + + + foreach ($infos as &$info) { + $info['activityUrl'] = $this->url()->fromRoute('contract/show', ['id' => $info['activityid']]); + $info['activityPcruUrl'] = $this->url()->fromRoute('contract/pcru-informations', ['id' => $info['activityid']]); + + + $info['enErreur'] = false; + if ($info['status'] === ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE) { + + $activity = $this->getEntityManager() + ->getRepository(Activity::class) + ->findOneBy(array('id' => $info['activityid'])); + + $pcruInformationComplete = $this->pcruInformationsService->getPcruInformationsForActivity($activity, $this->url()); + $info['enErreur'] = $pcruInformationComplete->enErreur; + $info['fichierContratManquant'] = $pcruInformationComplete->avertissementFichierContratManquant != NULL; + } + + $dateupdated = new \DateTime($info['dateupdated']); + $dateupdated->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $info['dateupdated'] = $dateupdated->format(\DateTime::ATOM); + + if ($info['datepremierdepot'] != NULL) { + $datepremierdepot = new \DateTime($info['datepremierdepot']); + $datepremierdepot->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $info['datepremierdepot'] = $datepremierdepot->format(\DateTime::ATOM); + } + + if ($info['dateenvoifichiercontrat'] != NULL) { + $dateenvoifichiercontrat = new \DateTime($info['dateenvoifichiercontrat']); + $dateenvoifichiercontrat->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $info['dateenvoifichiercontrat'] = $dateenvoifichiercontrat->format(\DateTime::ATOM); + } + } + + $sql = " + select + id, + createdat, + titre, + status, + details + from + pcruftplog + where + createdat > now() - interval '6' month + order by + createdat DESC; + "; + $stm = $this->getEntityManager()->getConnection()->prepare($sql); + $logs = $stm->executeQuery()->fetchAllAssociative(); + + foreach ($logs as &$log) { + $createdat = new \DateTime($log['createdat']); + $createdat->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $info['createdat'] = $createdat->format(\DateTime::ATOM); + } + + $response = new JsonModel(); + $response->setVariables(['transmissionsPcru' => $infos, 'logs' => $logs]); + return $response; + } + + } else if ($this->getRequest()->getMethod() == "POST") { + $action_json = json_decode($this->getRequest()->getContent()); + + if ($action_json->action == "enregistrer") { + $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU); + + $activity = $this->getEntityManager() + ->getRepository(Activity::class) + ->findOneBy(array('id' => $action_json->activityId)); + if (!$activity) { + throw new \Exception("L'activité demandée n'existe pas. Veuillez actualiser la page."); + } + + $pcruInformations = $activity->getPcruInformations(); + if ($pcruInformations === NULL) { + $pcruInformations = new ActivityPcruInformations(); + $pcruInformations->setActivity($activity); + } else if ($pcruInformations->getStatus() !== ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE) { + throw new \Exception("L'activité a déjà été envoyée à PCRU, il n'est plus possible de modifier ces informations."); + } + + $a = $action_json->activityPcruInformations; + $pcruInformations->setUtiliserObjetParDefaut($a->utiliserObjetParDefaut); + $pcruInformations->setObjet($a->objet); + $pcruInformations->setUtiliserLabintelParDefaut($a->utiliserLabintelParDefaut); + $pcruInformations->setLabintel($a->labintel); + $pcruInformations->setUtiliserRnsrParDefaut($a->utiliserRnsrParDefaut); + $pcruInformations->setRnsr($a->rnsr); + $pcruInformations->setUtiliserSigleParDefaut($a->utiliserSigleParDefaut); + $pcruInformations->setSigle($a->sigle); + $pcruInformations->setUtiliserNumContratParDefaut($a->utiliserNumContratParDefaut); + $pcruInformations->setNumContrat($a->numContrat); + $pcruInformations->setEquipe($a->equipe); + if ($a->envoiActif && !$pcruInformations->isEnvoiActif()) { + $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU_ACTIVATE); + $pcruInformations->dateActivationEnvoi = new \DateTime(); + } + $pcruInformations->setEnvoiActif($a->envoiActif); + $pcruInformations->setUtiliserTypeContratParDefaut($a->utiliserTypeContratParDefaut); + if ($a->pcruTypeContractId) { + $pcruTypeContract = $this->getEntityManager() + ->getRepository(PcruTypeContract::class) + ->findOneBy(array('id' => $a->pcruTypeContractId)); + if (!$pcruTypeContract) { + throw new \Exception("Le type de contrat PCRU demandé n'existe pas. Veuillez actualiser la page."); + } + $pcruInformations->setPcruTypeContract($pcruTypeContract); + } else { + $pcruInformations->setPcruTypeContract(NULL); + } + $pcruInformations->setUtiliserAcronymeParDefaut($a->utiliserAcronymeParDefaut); + $pcruInformations->setAcronyme($a->acronyme); + $pcruInformations->setContratsAssocies($a->contratsAssocies); + $pcruInformations->setUtiliserResponsableScientifiqueParDefaut($a->utiliserResponsableScientifiqueParDefaut); + $pcruInformations->setResponsableScientifique($a->responsableScientifique); + $pcruInformations->setEmployeurResponsableScientifique($a->employeurResponsableScientifique); + $pcruInformations->setCoordinateurConsortium(NULL); + if ($a->coordinateurConsortium) { + if ($a->coordinateurConsortium == "true") { + $pcruInformations->setCoordinateurConsortium(true); + } else if ($a->coordinateurConsortium == "false") { + $pcruInformations->setCoordinateurConsortium(false); + } + } + $pcruInformations->setUtiliserPartenairesParDefaut($a->utiliserPartenairesParDefaut); + $pcruInformations->setPartenaires($a->partenaires); + $pcruInformations->setUtiliserPartenairePrincipalParDefaut($a->utiliserPartenairePrincipalParDefaut); + $pcruInformations->setPartenairePrincipal($a->partenairePrincipal); + $pcruInformations->setUtiliserIdPartenairePrincipalParDefaut($a->utiliserIdPartenairePrincipalParDefaut); + $pcruInformations->setIdPartenairePrincipal($a->idPartenairePrincipal); + $pcruInformations->setLieuExecution($a->lieuExecution); + $pcruInformations->setUtiliserDateDerniereSignatureParDefaut($a->utiliserDateDerniereSignatureParDefaut); + $pcruInformations->setDateDerniereSignature($a->dateDerniereSignature); + $pcruInformations->setDuree(NULL); + if ($a->duree) { + $pcruInformations->setDuree($a->duree); + } + $pcruInformations->setUtiliserDateDebutParDefaut($a->utiliserDateDebutParDefaut); + $pcruInformations->setDateDebut($a->dateDebut); + $pcruInformations->setUtiliserDateFinParDefaut($a->utiliserDateFinParDefaut); + $pcruInformations->setDateFin($a->dateFin); + $pcruInformations->setMontantPercuUnite(NULL); + if ($a->montantPercuUnite || $a->montantPercuUnite === 0) { + $pcruInformations->setMontantPercuUnite($a->montantPercuUnite); + } + $pcruInformations->setContributionFinanceur(NULL); + if ($a->contributionFinanceur || $a->contributionFinanceur === 0) { + $pcruInformations->setContributionFinanceur($a->contributionFinanceur); + } + $pcruInformations->setUtiliserMontantTotalParDefaut($a->utiliserMontantTotalParDefaut); + $pcruInformations->setMontantTotal(NULL); + if ($a->montantTotal || $a->montantTotal === 0) { + $pcruInformations->setMontantTotal($a->montantTotal); + } + $pcruInformations->setCommentaires($a->commentaires); + $pcruInformations->setPia(NULL); + if ($a->pia) { + if ($a->pia == "true") { + $pcruInformations->setPia(true); + } else if ($a->pia == "false") { + $pcruInformations->setPia(false); + } + } + $pcruInformations->setUtiliserReferenceParDefaut($a->utiliserReferenceParDefaut); + $pcruInformations->setReference($a->reference); + $pcruInformations->setAccordCadre(NULL); + if ($a->accordCadre) { + if ($a->accordCadre == "true") { + $pcruInformations->setAccordCadre(true); + } else if ($a->accordCadre == "false") { + $pcruInformations->setAccordCadre(false); + } + } + $pcruInformations->setCifre(false); + if ($a->cifre == "true") { + $pcruInformations->setCifre(true); + } + $pcruInformations->setChaireIndustrielle(NULL); + if ($a->chaireIndustrielle) { + if ($a->chaireIndustrielle == "true") { + $pcruInformations->setChaireIndustrielle(true); + } else if ($a->chaireIndustrielle == "false") { + $pcruInformations->setChaireIndustrielle(false); + } + } + $pcruInformations->setPresencePartenaireIndustriel(NULL); + if ($a->presencePartenaireIndustriel) { + if ($a->presencePartenaireIndustriel == "true") { + $pcruInformations->setPresencePartenaireIndustriel(true); + } else if ($a->presencePartenaireIndustriel == "false") { + $pcruInformations->setPresencePartenaireIndustriel(false); + } + } + + $pcruInformations->setDateUpdated(new \DateTime()); + $this->getEntityManager()->persist($pcruInformations); + $this->getEntityManager()->flush(); + $this->getEntityManager()->refresh($activity); + + $response = new JsonModel(); + $response->setVariables( + [ + 'pcru' => $this->pcruInformationsService->getPcruInformationsForActivity($activity, $this->url()) + ]); + return $response; + + } else if ($action_json->action == "transferer") { + + $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_UPLOAD); + + $logs = $this->getPcruFtpService()->processPcruFtp(); + + $response = new JsonModel(); + $response->setVariables(['logs' => $logs]); + return $response; + } + } + + $response = new Response(); + $response->setStatusCode(Response::STATUS_CODE_405); + $response->setContent("Method Not Allowed."); + return $response; + + } catch (OscarPCRUException $e) { + $response = new Response(); + $response->setStatusCode(Response::STATUS_CODE_500); + header('Content-type: application/json; charset=utf-8'); + $responseJson = new JsonModel(); + $responseJson->setVariables(['logs' => $e->details]); + $response->setContent($responseJson->serialize()); + return $response; + } catch (Throwable $e) { + $response = new Response(); + $response->setStatusCode(Response::STATUS_CODE_500); + $response->setContent($e->getMessage()); + return $response; + } + } + + public function pcruInformationsAction() { + $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU); + if (!$this->getOscarConfigurationService()->getPcruEnabled()) { + throw new OscarException("Le module PCRU n'est pas activé"); + } + return [ + 'urlActivity' => $this->url()->fromRoute('contract/show', ['id' => $this->params()->fromRoute('id')]), + 'urlPcruApi' => $this->url()->fromRoute('pcru/api') + ]; + } + + public function pcruTransmissionsAction() { + $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_LIST); + if (!$this->getOscarConfigurationService()->getPcruEnabled()) { + throw new OscarException("Le module PCRU n'est pas activé"); + } + return [ + 'urlPcruApi' => $this->url()->fromRoute('pcru/api') + ]; + } + + public function downloadAction() + { + $status = $this->getRequest()->getQuery('status'); + + $nomFichierContrats = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_contrats'); + $nomFichierPartenaires = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_partenaires'); + + $tmpNum = uniqid(); + + $activitesAEnvoyer = []; + if ($status === ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE) { + $sql = " + select + a.id as activityid, + pcru.id AS activitypcruinformationsId + from + activitypcruinformations pcru + left join + activity a on a.id = pcru.activity_id + where + pcru.envoiactif is TRUE + AND pcru.status = ? + order by + pcru.dateupdated DESC; + "; + $activitesAEnvoyer = $this->getEntityManager()->getConnection() + ->executeQuery($sql, + [ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE], + ["string"])->fetchAllAssociative(); + } else { + $sql = " + select + a.id as activityid, + pcru.id AS activitypcruinformationsId + from + activitypcruinformations pcru + left join + activity a on a.id = pcru.activity_id + where + pcru.envoiactif is TRUE + order by + pcru.dateupdated DESC; + "; + $activitesAEnvoyer = $this->getEntityManager()->getConnection() + ->executeQuery($sql)->fetchAllAssociative(); + } + + if (count($activitesAEnvoyer) === 0) { + throw new OscarPCRUException("Aucune activité à envoyer"); + } + + $activitesAEnvoyerValides = []; + foreach ($activitesAEnvoyer as $a) { + $activity = $this->getEntityManager() + ->getRepository(Activity::class) + ->findOneBy(array('id' => $a['activityid'])); + + $pcruInformationComplete = $this->pcruInformationsService->getPcruInformationsForActivity($activity); + if (!$pcruInformationComplete->enErreur) { + $a['pcruInformation'] = $pcruInformationComplete->pcruInformation; + $a['cheminFichierContrat'] = $pcruInformationComplete->cheminFichierContrat; + $activitesAEnvoyerValides[] = $a; + } + } + + if (count($activitesAEnvoyerValides) === 0) { + throw new OscarPCRUException("Aucune activité valide à envoyer"); + } + + $contratsFilePath = '/tmp/' . $tmpNum . '-' . $nomFichierContrats; + $stream = fopen($contratsFilePath, 'w'); + if (!$stream) { + throw new OscarPCRUException("Impossible d'ouvrir le fichier " . $contratsFilePath . " en écriture."); + } + + // Écriture du BOM pour que PCRU comprenne que c'est un fichier encodé en UTF-8 + $r = fwrite($stream, pack("CCC",0xef,0xbb,0xbf)); + if (!$r) { + throw new OscarPCRUException("Impossible d'écrire le BOM dans le fichier " . $contratsFilePath); + } + + $r = fputcsv($stream, ['Objet', 'CodeLabintelUnite', 'CodeRNSRUnite', 'SigleUnite', 'ReferenceGestionnaire', 'Equipe', 'TypeContrat', 'Acronyme', 'ContratsAssocies', 'NomRespScientifique', 'EmployeurRespScientifique', 'RespScientifiqueEstCoordonnateur', 'Partenaires', 'PartenairePrincipal', 'IdPartenairePrincipal', 'SourceFinancement', 'LieuExecution', 'DateDerniereSignature', 'Duree', 'DateDebut', 'DateFin', 'MontantPercuUnite', 'ContributionFinanceur', 'MontantTotal', 'ValideParPoleCompetitivite', 'PoleCompetitivite', 'Commentaires', 'PIA', 'ReferenceNonGestionnaire', 'AccordCadre', 'Cifre', 'ChaireIndustrielle', 'PresencePartenaireIndustriel'], ';'); + if (!$r) { + throw new OscarPCRUException("Impossible d'écrire dans le fichier " . $contratsFilePath); + } + + foreach ($activitesAEnvoyerValides as $a) { + $line = []; + $line[] = $a['pcruInformation']->objet; + $line[] = $a['pcruInformation']->labintel; + $line[] = $a['pcruInformation']->rnsr; + $line[] = $a['pcruInformation']->sigle; + $line[] = $a['pcruInformation']->numContrat; + $line[] = $a['pcruInformation']->equipe; + $line[] = $a['pcruInformation']->typeContrat; + $line[] = $a['pcruInformation']->acronyme; + $line[] = $a['pcruInformation']->contratsAssocies; + $line[] = $a['pcruInformation']->responsableScientifique; + $line[] = $a['pcruInformation']->employeurResponsableScientifique; + $line[] = $a['pcruInformation']->coordinateurConsortium === NULL ? NULL : ($a['pcruInformation']->coordinateurConsortium ? "True" : "False"); + $line[] = $a['pcruInformation']->partenaires; + $line[] = $a['pcruInformation']->partenairePrincipal; + $line[] = preg_replace('/\s+/', '', $a['pcruInformation']->idPartenairePrincipal); + $line[] = $a['pcruInformation']->sourceFinancement; + $line[] = $a['pcruInformation']->lieuExecution; + $line[] = $a['pcruInformation']->dateDerniereSignature; + $line[] = $a['pcruInformation']->duree; + $line[] = $a['pcruInformation']->dateDebut; + $line[] = $a['pcruInformation']->dateFin; + $line[] = $a['pcruInformation']->montantPercuUnite; + $line[] = $a['pcruInformation']->contributionFinanceur; + $line[] = $a['pcruInformation']->montantTotal; + $line[] = $a['pcruInformation']->validePoleCompetitivite ? 'True' : 'False'; + $line[] = $a['pcruInformation']->poleCompetitivite; + $line[] = $a['pcruInformation']->commentaires; + $line[] = $a['pcruInformation']->pia === NULL ? NULL : ($a['pcruInformation']->pia ? "True" : "False"); + $line[] = $a['pcruInformation']->reference; + $line[] = $a['pcruInformation']->accordCadre === NULL ? NULL : ($a['pcruInformation']->accordCadre ? "True" : "False"); + $line[] = $a['pcruInformation']->cifre ? 'True' : 'False'; + $line[] = $a['pcruInformation']->chaireIndustrielle === NULL ? NULL : ($a['pcruInformation']->chaireIndustrielle ? "True" : "False"); + $line[] = $a['pcruInformation']->presencePartenaireIndustriel === NULL ? NULL : ($a['pcruInformation']->presencePartenaireIndustriel ? "True" : "False"); + $r = fputcsv($stream, $line, ';'); + if (!$r) { + throw new OscarPCRUException("Impossible d'écrire dans le fichier " . $contratsFilePath); + } + } + + $r = fclose($stream); + if (!$r) { + throw new OscarPCRUException("Impossible de fermer le fichier " . $contratsFilePath); + } + + $partenairesAEnvoyer = []; + foreach ($activitesAEnvoyerValides as $a) { + $activity = $this->getEntityManager() + ->getRepository(Activity::class) + ->findOneBy(array('id' => $a['activityid'])); + + $pcruPartenairePrincipalRoles = $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles(); + if ($pcruPartenairePrincipalRoles != NULL && count($pcruPartenairePrincipalRoles) > 0) { + $partenaires = $activity->getOrganizationsWithOneRoleIn($pcruPartenairePrincipalRoles); + if (count($partenaires) == 1) { + + $partenaire = $partenaires[0]; + $avertissements = []; + if (mb_strlen(trim($partenaire->getShortName())) == 0) { + $avertissements[] = "Le nom court doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getFullName())) == 0) { + $avertissements[] = "Le nom complet doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getCodePcru())) == 0) { + $avertissements[] = "Le numéro SIRET, la TVA Intracommunautaire ou le DUNS doit être renseigné"; + } + if ($partenaire->getTypeEtablissementPcruObj() == NULL) { + $avertissements[] = "Le type d'établissement PCRU doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getStreet1())) == 0) { + $avertissements[] = "L'adresse (rue 1) doit être renseignée"; + } + if (mb_strlen(trim($partenaire->getZipCode())) == 0) { + $avertissements[] = "Le code postal doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getCity())) == 0) { + $avertissements[] = "La ville doit être renseignée"; + } + if (mb_strlen(trim($partenaire->getCountry())) == 0) { + $avertissements[] = "Le pays doit être renseigné"; + } + if (count($avertissements) == 0) { + $dejaDansLaListe = false; + foreach ($partenairesAEnvoyer as $p) { + if ($p->getId() == $partenaire->getId()) { + $dejaDansLaListe = true; + break; + } + } + if (!$dejaDansLaListe) { + $partenairesAEnvoyer[] = $partenaire; + } + } + } + } + } + + $partenairesFilePath = '/tmp/' . $tmpNum . '-' . $nomFichierPartenaires; + if (count($partenairesAEnvoyer) > 0) { + $stream = fopen($partenairesFilePath, 'w'); + if (!$stream) { + throw new OscarPCRUException("Impossible d'ouvrir le fichier " . $partenairesFilePath); + } + + // Écriture du BOM pour que PCRU comprenne que c'est un fichier encodé en UTF-8 + $r = fwrite($stream, pack("CCC",0xef,0xbb,0xbf)); + if (!$r) { + throw new OscarPCRUException("Impossible d'écrire le BOM dans le fichier " . $partenairesFilePath); + } + + $r = fputcsv($stream, ['LibelleCourt', 'LibelleLong', 'Siren', 'Siret', 'TvaIntra', 'Duns', 'TypeEtablissement', 'Adresse', 'CodePostal', 'Ville', 'Pays'], ';'); + if (!$r) { + throw new OscarPCRUException("Impossible d'écrire dans le fichier " . $partenairesFilePath); + } + + foreach ($partenairesAEnvoyer as $p) { + $line = []; + $line[] = $p->getShortName(); + $line[] = $p->getFullName(); + $line[] = ""; + $line[] = preg_replace('/\s+/', '', $p->getSiret()); + $line[] = preg_replace('/\s+/', '', $p->getTvaintra()); + $line[] = preg_replace('/\s+/', '', $p->getDuns()); + $line[] = $p->getTypeEtablissementPcruObj()->getLabel(); + $line[] = $p->getStreet1(); + $line[] = $p->getZipCode(); + $line[] = $p->getCity(); + $line[] = $p->getCountry(); + + $r = fputcsv($stream, $line, ';'); + if (!$r) { + throw new OscarPCRUException("Impossible d'écrire dans le fichier " . $partenairesFilePath); + } + } + + $r = fclose($stream); + if (!$r) { + throw new OscarPCRUException("Impossible de fermer le fichier " . $partenairesFilePath); + } + } + + + $ziptmp = "/tmp/" . $tmpNum . "-oscar-pcru-export.zip"; + $zip = new \ZipArchive(); + if ($zip->open($ziptmp, \ZipArchive::CREATE) !== true) { + throw new OscarPCRUException("Impossible de créer l'archive"); + } + $zip->addFile($contratsFilePath, $nomFichierContrats); + if (count($partenairesAEnvoyer) > 0) { + $zip->addFile($partenairesFilePath, $nomFichierPartenaires); + } + + foreach ($activitesAEnvoyerValides as $a) { + if (!$a['cheminFichierContrat']) { + continue; + } + $docpath = $this->getOscarConfigurationService()->getDocumentDropLocation() + . DIRECTORY_SEPARATOR + . $a['cheminFichierContrat']; + $pdfFileName = $a['pcruInformation']->numContrat . '.pdf'; + $zip->addFile($docpath, $pdfFileName); + } + + $zip->close(); + + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename="oscar-pcru-export-' . $tmpNum . '.zip"'); + header('Expires: 0'); + header('Cache-Control: must-revalidate'); + header('Pragma: public'); + readfile($ziptmp); + + if (count($partenairesAEnvoyer) > 0) { + unlink($partenairesFilePath); + } + unlink($contratsFilePath); + unlink($ziptmp); + + exit; + } + +} diff --git a/module/Oscar/src/Oscar/Controller/PcruControllerFactory.php b/module/Oscar/src/Oscar/Controller/PcruControllerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..d9144ce2645f9b188f7fa84554fed23c60b254d6 --- /dev/null +++ b/module/Oscar/src/Oscar/Controller/PcruControllerFactory.php @@ -0,0 +1,26 @@ +setEntityManager($container->get(EntityManager::class)); + $c->setOscarUserContextService($container->get(OscarUserContext::class)); + $c->setLoggerService($container->get('Logger')); + $c->setPcruFtpService($container->get(PcruFtpService::class)); + $c->setPcruInformationsService($container->get(PcruInformationsService::class)); + $c->setOscarConfigurationService($container->get(OscarConfigurationService::class)); + return $c; + } +} diff --git a/module/Oscar/src/Oscar/Controller/ProjectGrantController.php b/module/Oscar/src/Oscar/Controller/ProjectGrantController.php index af41d47e5e31e47ea413359be49d4aeb7c036f9d..f89e1cd8bfc1c1872748483782f4763f95e500e0 100644 --- a/module/Oscar/src/Oscar/Controller/ProjectGrantController.php +++ b/module/Oscar/src/Oscar/Controller/ProjectGrantController.php @@ -17,7 +17,6 @@ use Laminas\Http\Response; use Oscar\Entity\Activity; use Oscar\Entity\ActivityOrganization; use Oscar\Entity\ActivityPayment; -use Oscar\Entity\ActivityPcruInfos; use Oscar\Entity\ActivityPerson; use Oscar\Entity\ActivityRequest; use Oscar\Entity\ActivityRequestRepository; @@ -41,7 +40,6 @@ use Oscar\Entity\ValidationPeriod; use Oscar\Entity\ValidationPeriodRepository; use Oscar\Exception\OscarException; use Oscar\Factory\ActivityGantJson; -use Oscar\Form\ActivityInfosPcruForm; use Oscar\Form\ProjectGrantForm; use Oscar\Form\SignedDocumentForm; use Oscar\Formatter\ActivityPaymentFormatter; @@ -49,7 +47,6 @@ use Oscar\Formatter\ActivityToJsonFormatter; use Oscar\Formatter\CSVDownloader; use Oscar\Formatter\JSONFormatter; use Oscar\Formatter\OscarFormatterConst; -use Oscar\Hydrator\PcruInfosFormHydrator; use Oscar\OscarVersion; use Oscar\Provider\Privileges; use Oscar\Service\ActivityAvenantsService; @@ -2797,65 +2794,6 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif return $view; } - /** - * Affiche la liste des activités soumises à un processus PCRU. - * - * @return array - */ - public function pcruListAction() - { - $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_LIST); - $accessUpload = $this->getOscarUserContextService()->hasPrivileges(Privileges::MAINTENANCE_PCRU_UPLOAD); - $pcruInfos = $this->getProjectGrantService()->getPCRUService()->getPcruInfos(); - $methods = $this->getHttpXMethod(); - - if ($methods == 'GET') { - $action = $this->params()->fromQuery('a'); - - // Recherche des activités - if ($action == 'search') { - $search = $this->params()->fromQuery('search'); - $idsActivities = $this->getProjectGrantService()->search($search); - $activities = []; - /** @var Activity $activity */ - foreach ($this->getProjectGrantService()->getActivitiesByIds($idsActivities) as $activity) { - $a = $activity->toArray(); - $a['pcru'] = []; - $a['pcruenable'] = false; - $activities[] = $a; - } - return $this->jsonOutput(["activities" => $activities]); - } - - // Aperçu PCRU - if ($action == 'preview') { - $activity_id = $this->params()->fromQuery('activity_id'); - $activity = $this->getProjectGrantService()->getActivityById($activity_id); - $preview = $this->getProjectGrantService()->getPCRUService()->getPreview($activity); - return $this->jsonOutput(["preview" => $preview]); - } - - if ($action == 'download') { - $pcru = $this->getProjectGrantService()->getPCRUService()->downloadPCRUSendableFile(); - } - } - elseif ($methods == "POST") { - $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_UPLOAD); - $action = $this->params()->fromPost('action'); - if ($action == 'upload') { - $this->getProjectGrantService()->getPCRUService()->upload(); - $this->redirect()->toRoute('contract/pcru-list'); - } - } - - return [ - 'downloadable' => $this->getProjectGrantService()->getPCRUService()->hasDownload(), - 'uploadable' => !$this->getProjectGrantService()->getPCRUService()->hasUploadInProgress( - ) && $accessUpload, - 'pcruInfos' => $pcruInfos - ]; - } - public function timesheetAction() { /** @var Activity $activity */ @@ -2922,122 +2860,6 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif ]; } - /** - * Gestion/récapitulatif des informations PCRU - * - * @return array|Response - * @throws OscarException - * @throws \Doctrine\ORM\ORMException - * @throws \Doctrine\ORM\OptimisticLockException - */ - public function pcruInfosAction() - { - /** @var Activity $activity */ - $activity = $this->getActivityFromRoute(); - - // Accès - $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU, $activity); - - if ($this->params()->fromQuery("a") == "reset") { - $this->getProjectGrantService()->getPCRUService()->resetTmpPcruInfos($activity); - $this->redirect()->toRoute('contract/pcru-infos', ['id' => $activity->getId()]); - } - - if ($this->params()->fromQuery("a") == "activate") { - // Formulaire - $form = new ActivityInfosPcruForm($this->getProjectGrantService(), $activity); - $preview = $this->getProjectGrantService()->getPCRUService()->getPreview($activity); - $pcruInfos = $preview['infos']; - $form->init(); - $form->bind($pcruInfos); - - if ($this->getRequest()->getMethod() == "POST") { - $posted = $this->getRequest()->getPost(); - $form->setData($posted); - if ($form->isValid()) { - $this->getProjectGrantService()->getPCRUService()->activateActivity($activity, $pcruInfos); - return $this->redirect()->toRoute('contract/pcru-infos', ['id' => $activity->getId()]); - } - else { - } - } - - $preview['form'] = $form; - $preview['activity'] = $activity; - $view = new ViewModel($preview); - $view->setTemplate('oscar/activity/pcruinfos-form.phtml'); - - return $view; - } - - if ($this->params()->fromQuery("a") == "edit") { - // Formulaire - $form = new ActivityInfosPcruForm($this->getProjectGrantService(), $activity); - $preview = $this->getProjectGrantService()->getPCRUService()->getPreview($activity); - $pcruInfos = $preview['infos']; - $form->init(); - $form->bind($pcruInfos); - - if ($this->getRequest()->getMethod() == "POST") { - $posted = $this->getRequest()->getPost(); - $form->setData($posted); - if ($form->isValid()) { - $this->getProjectGrantService()->getPCRUService()->updatePcruInfos($activity, $pcruInfos); - return $this->redirect()->toRoute('contract/pcru-infos', ['id' => $activity->getId()]); - } - else { - } - } - - $preview['form'] = $form; - $preview['mode'] = "edit"; - $preview['activity'] = $activity; - $view = new ViewModel($preview); - $view->setTemplate('oscar/activity/pcruinfos-form.phtml'); - - return $view; - } - - $method = $this->getHttpXMethod(); - - if ($method == 'POST') { - $action = $this->params()->fromPost('action'); - $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU_ACTIVATE, $activity); - switch ($action) { - case 'remove-waiting'; - $idActivityPcruInfo = intval($this->params()->fromPost('activitypcruinfo_id')); - $this->getProjectGrantService()->getPCRUService()->removeWaiting($idActivityPcruInfo); - $this->redirect()->toRoute('contract/show', ['id' => $activity->getId()]); - - case 'add-pool': - $this->getProjectGrantService()->getPCRUService()->addToPool($activity); - break; - - case 'download-pcru': - $this->getProjectGrantService()->getPCRUService()->downloadOne($activity); - break; - } - return $this->redirect()->toRoute('contract/pcru-infos', ['id' => $activity->getId()]); - } - - $return = $this->getProjectGrantService()->getPCRUService()->getPreview($activity); - - $return['contratSignedType'] = $this->getOscarConfigurationService() - ->getOptionalConfiguration('pcru_contrat_type', "Contrat Version Définitive Signée"); - - /** @var ActivityPcruInfos $pcruInfos */ - $pcruInfos = $return['infos']; - - if ($pcruInfos->isWaiting()) { - $return['deletable'] = true; - $return['activitypcruinfo_id'] = $pcruInfos->getId(); - } - - $return['poolopen'] = $this->getProjectGrantService()->getPCRUService()->isPoolOpen(); - - return $return; - } - public function mergeAction() { return $this->getResponseNotImplemented(); diff --git a/module/Oscar/src/Oscar/Entity/Activity.php b/module/Oscar/src/Oscar/Entity/Activity.php index 9b876f769416939878209a6ffb4385a1c293dc89..f17f85bf1469cdf54980e05ef169a69833a08aa2 100644 --- a/module/Oscar/src/Oscar/Entity/Activity.php +++ b/module/Oscar/src/Oscar/Entity/Activity.php @@ -527,12 +527,11 @@ class Activity implements ResourceInterface */ private $estimatedSpentLines; - /** * Informations complémentaires PCRU - * @OneToOne(targetEntity="ActivityPcruInfos", mappedBy="activity", orphanRemoval=true, cascade={"remove"}) + * @OneToOne(targetEntity="ActivityPcruInformations", mappedBy="activity", orphanRemoval=true, cascade={"remove"}) */ - private $pcruInfo; + private $pcruInformations; /** * @var String @@ -984,17 +983,17 @@ class Activity implements ResourceInterface /** * @return mixed */ - public function getPcruInfo() + public function getPcruInformations() { - return $this->pcruInfo; + return $this->pcruInformations; } /** - * @param mixed $pcruInfo + * @param mixed $pcruInformations */ - public function setPcruInfo($pcruInfo): self + public function setPcruInformations($pcruInformations): self { - $this->pcruInfo = $pcruInfo; + $this->pcruInformations = $pcruInformations; return $this; } diff --git a/module/Oscar/src/Oscar/Entity/ActivityPcruInformations.php b/module/Oscar/src/Oscar/Entity/ActivityPcruInformations.php new file mode 100644 index 0000000000000000000000000000000000000000..e1ff4427f9e7737d2703d5d491ca61111367b395 --- /dev/null +++ b/module/Oscar/src/Oscar/Entity/ActivityPcruInformations.php @@ -0,0 +1,1686 @@ +dateUpdated = new \DateTime(); + } + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @return Activity + */ + public function getActivity(): Activity + { + return $this->activity; + } + + /** + * @param Activity $activity + */ + public function setActivity(Activity $activity): self + { + $this->activity = $activity; + return $this; + } + + /** + * @return bool + */ + public function isUtiliserObjetParDefaut() + { + return $this->utiliserObjetParDefaut; + } + + /** + * @param bool $utiliserObjetParDefaut + */ + public function setUtiliserObjetParDefaut(bool $utiliserObjetParDefaut): self + { + $this->utiliserObjetParDefaut = $utiliserObjetParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getObjet(): ?string + { + return $this->objet; + } + + /** + * @param ?string $objet + */ + public function setObjet(?string $objet): self + { + $objet = self::trimToNull($objet); + if ($objet == NULL) { + $this->objet = NULL; + } else { + $this->objet = mb_substr($objet, 0, 1000); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserLabintelParDefaut() + { + return $this->utiliserLabintelParDefaut; + } + + /** + * @param bool $utiliserLabintelParDefaut + */ + public function setUtiliserLabintelParDefaut(bool $utiliserLabintelParDefaut): self + { + $this->utiliserLabintelParDefaut = $utiliserLabintelParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getLabintel(): ?string + { + return $this->labintel; + } + + /** + * @param ?string $labintel + */ + public function setLabintel(?string $labintel): self + { + $labintel = self::trimToNull($labintel); + if ($labintel == NULL) { + $this->labintel = NULL; + } else { + $this->labintel = mb_substr($labintel, 0, 10); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserRnsrParDefaut() + { + return $this->utiliserRnsrParDefaut; + } + + /** + * @param bool $utiliserRnsrParDefaut + */ + public function setUtiliserRnsrParDefaut(bool $utiliserRnsrParDefaut): self + { + $this->utiliserRnsrParDefaut = $utiliserRnsrParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getRnsr(): ?string + { + return $this->rnsr; + } + + /** + * @param ?string $rnsr + */ + public function setRnsr(?string $rnsr): self + { + $rnsr = self::trimToNull($rnsr); + if ($rnsr == NULL) { + $this->rnsr = NULL; + } else { + $this->rnsr = mb_substr($rnsr, 0, self::RNSR_MAX_LENGTH); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserSigleParDefaut() + { + return $this->utiliserSigleParDefaut; + } + + /** + * @param bool $utiliserSigleParDefaut + */ + public function setUtiliserSigleParDefaut(bool $utiliserSigleParDefaut): self + { + $this->utiliserSigleParDefaut = $utiliserSigleParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getSigle(): ?string + { + return $this->sigle; + } + + /** + * @param ?string $sigle + */ + public function setSigle(?string $sigle): self + { + $sigle = self::trimToNull($sigle); + if ($sigle == NULL) { + $this->sigle = NULL; + } else { + $this->sigle = mb_substr($sigle, 0, 20); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserNumContratParDefaut() + { + return $this->utiliserNumContratParDefaut; + } + + /** + * @param bool $utiliserNumContratParDefaut + */ + public function setUtiliserNumContratParDefaut(bool $utiliserNumContratParDefaut): self + { + $this->utiliserNumContratParDefaut = $utiliserNumContratParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getNumContrat(): ?string + { + return $this->numContrat; + } + + /** + * @param ?string $numContrat + */ + public function setNumContrat(?string $numContrat): self + { + $numContrat = self::trimToNull($numContrat); + if ($numContrat == NULL) { + $this->numContrat = NULL; + } else { + $this->numContrat = mb_substr($numContrat, 0, 30); + } + return $this; + } + + /** + * @return ?string + */ + public function getEquipe(): ?string + { + return $this->equipe; + } + + /** + * @param ?string $equipe + */ + public function setEquipe(?string $equipe): self + { + $equipe = self::trimToNull($equipe); + if ($equipe == NULL) { + $this->equipe = NULL; + } else { + $this->equipe = mb_substr($equipe, 0, 150); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserTypeContratParDefaut() + { + return $this->utiliserTypeContratParDefaut; + } + + /** + * @param bool $utiliserTypeContratParDefaut + */ + public function setUtiliserTypeContratParDefaut(bool $utiliserTypeContratParDefaut): self + { + $this->utiliserTypeContratParDefaut = $utiliserTypeContratParDefaut; + return $this; + } + + /** + * @return PcruTypeContract + */ + public function getPcruTypeContract(): ?PcruTypeContract + { + return $this->pcruTypeContract; + } + + /** + * @param PcruTypeContract $pcruTypeContract + */ + public function setPcruTypeContract(?PcruTypeContract $pcruTypeContract): self + { + $this->pcruTypeContract = $pcruTypeContract; + return $this; + } + + /** + * @return bool + */ + public function isUtiliserAcronymeParDefaut() + { + return $this->utiliserAcronymeParDefaut; + } + + /** + * @param bool $utiliserAcronymeParDefaut + */ + public function setUtiliserAcronymeParDefaut(bool $utiliserAcronymeParDefaut): self + { + $this->utiliserAcronymeParDefaut = $utiliserAcronymeParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getAcronyme(): ?string + { + return $this->acronyme; + } + + /** + * @param ?string $acronyme + */ + public function setAcronyme(?string $acronyme): self + { + $acronyme = self::trimToNull($acronyme); + if ($acronyme == NULL) { + $this->acronyme = NULL; + } else { + $this->acronyme = mb_substr($acronyme, 0, 50); + } + return $this; + } + + /** + * @return ?string + */ + public function getContratsAssocies(): ?string + { + return $this->contratsAssocies; + } + + /** + * @param ?string $contratsAssocies + */ + public function setContratsAssocies(?string $contratsAssocies): self + { + $contratsAssocies = self::trimToNull($contratsAssocies); + if ($contratsAssocies == NULL) { + $this->contratsAssocies = NULL; + } else { + $this->contratsAssocies = mb_substr($contratsAssocies, 0, 300); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserResponsableScientifiqueParDefaut() + { + return $this->utiliserResponsableScientifiqueParDefaut; + } + + /** + * @param bool $utiliserResponsableScientifiqueParDefaut + */ + public function setUtiliserResponsableScientifiqueParDefaut(bool $utiliserResponsableScientifiqueParDefaut): self + { + $this->utiliserResponsableScientifiqueParDefaut = $utiliserResponsableScientifiqueParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getResponsableScientifique(): ?string + { + return $this->responsableScientifique; + } + + /** + * @param ?string $responsableScientifique + */ + public function setResponsableScientifique(?string $responsableScientifique): self + { + $responsableScientifique = self::trimToNull($responsableScientifique); + if ($responsableScientifique == NULL) { + $this->responsableScientifique = NULL; + } else { + $this->responsableScientifique = mb_substr($responsableScientifique, 0, 50); + } + return $this; + } + + /** + * @return ?string + */ + public function getEmployeurResponsableScientifique(): ?string + { + return $this->employeurResponsableScientifique; + } + + /** + * @param ?string $employeurResponsableScientifique + */ + public function setEmployeurResponsableScientifique(?string $employeurResponsableScientifique): self + { + $employeurResponsableScientifique = self::trimToNull($employeurResponsableScientifique); + if ($employeurResponsableScientifique == NULL) { + $this->employeurResponsableScientifique = NULL; + } else { + $this->employeurResponsableScientifique = mb_substr($employeurResponsableScientifique, 0, 50); + } + return $this; + } + + /** + * @return ?bool + */ + public function isCoordinateurConsortium() + { + return $this->coordinateurConsortium; + } + + /** + * @param ?bool $coordinateurConsortium + */ + public function setCoordinateurConsortium(?bool $coordinateurConsortium): self + { + $this->coordinateurConsortium = $coordinateurConsortium; + return $this; + } + + /** + * @return bool + */ + public function isUtiliserPartenairesParDefaut() + { + return $this->utiliserPartenairesParDefaut; + } + + /** + * @param bool $utiliserPartenairesParDefaut + */ + public function setUtiliserPartenairesParDefaut(bool $utiliserPartenairesParDefaut): self + { + $this->utiliserPartenairesParDefaut = $utiliserPartenairesParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getPartenaires(): ?string + { + return $this->partenaires; + } + + /** + * @param ?string $partenaires + */ + public function setPartenaires(?string $partenaires): self + { + $partenaires = self::trimToNull($partenaires); + if ($partenaires == NULL) { + $this->partenaires = NULL; + } else { + $this->partenaires = mb_substr($partenaires, 0, 200); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserPartenairePrincipalParDefaut() + { + return $this->utiliserPartenairePrincipalParDefaut; + } + + /** + * @param bool $utiliserPartenairePrincipalParDefaut + */ + public function setUtiliserPartenairePrincipalParDefaut(bool $utiliserPartenairePrincipalParDefaut): self + { + $this->utiliserPartenairePrincipalParDefaut = $utiliserPartenairePrincipalParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getPartenairePrincipal(): ?string + { + return $this->partenairePrincipal; + } + + /** + * @param ?string $partenairePrincipal + */ + public function setPartenairePrincipal(?string $partenairePrincipal): self + { + $partenairePrincipal = self::trimToNull($partenairePrincipal); + if ($partenairePrincipal == NULL) { + $this->partenairePrincipal = NULL; + } else { + $this->partenairePrincipal = mb_substr($partenairePrincipal, 0, self::PARTENAIRE_PRINCIPAL_MAX_LENGTH); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserIdPartenairePrincipalParDefaut() + { + return $this->utiliserIdPartenairePrincipalParDefaut; + } + + /** + * @param bool $utiliserIdPartenairePrincipalParDefaut + */ + public function setUtiliserIdPartenairePrincipalParDefaut(bool $utiliserIdPartenairePrincipalParDefaut): self + { + $this->utiliserIdPartenairePrincipalParDefaut = $utiliserIdPartenairePrincipalParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getIdPartenairePrincipal(): ?string + { + return $this->idPartenairePrincipal; + } + + /** + * @param ?string $idPartenairePrincipal + */ + public function setIdPartenairePrincipal(?string $idPartenairePrincipal): self + { + $idPartenairePrincipal = self::trimToNull($idPartenairePrincipal); + if ($idPartenairePrincipal == NULL) { + $this->idPartenairePrincipal = NULL; + } else { + $this->idPartenairePrincipal = mb_substr($idPartenairePrincipal, 0, self::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH); + } + return $this; + } + + /** + * @return ?string + */ + public function getLieuExecution(): ?string + { + return $this->lieuExecution; + } + + /** + * @param ?string $lieuExecution + */ + public function setLieuExecution(?string $lieuExecution): self + { + $lieuExecution = self::trimToNull($lieuExecution); + if ($lieuExecution == NULL) { + $this->lieuExecution = NULL; + } else { + $this->lieuExecution = mb_substr($lieuExecution, 0, self::LIEU_EXECUTION_MAX_LENGTH); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserDateDerniereSignatureParDefaut() + { + return $this->utiliserDateDerniereSignatureParDefaut; + } + + /** + * @param bool $utiliserDateDerniereSignatureParDefaut + */ + public function setUtiliserDateDerniereSignatureParDefaut(bool $utiliserDateDerniereSignatureParDefaut): self + { + $this->utiliserDateDerniereSignatureParDefaut = $utiliserDateDerniereSignatureParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getDateDerniereSignature(): ?string + { + return $this->dateDerniereSignature; + } + + /** + * @param ?string $dateDerniereSignature + */ + public function setDateDerniereSignature(?string $dateDerniereSignature): self + { + $dateDerniereSignature = self::trimToNull($dateDerniereSignature); + if ($dateDerniereSignature == NULL) { + $this->dateDerniereSignature = NULL; + } else { + $this->dateDerniereSignature = mb_substr($dateDerniereSignature, 0, 10); + } + return $this; + } + + /** + * @return ?float + */ + public function getDuree(): ?float + { + return $this->duree; + } + + /** + * @param ?float $duree + */ + public function setDuree(?float $duree): self + { + $this->duree = $duree; + return $this; + } + + /** + * @return bool + */ + public function isUtiliserDateDebutParDefaut() + { + return $this->utiliserDateDebutParDefaut; + } + + /** + * @param bool $utiliserDateDebutParDefaut + */ + public function setUtiliserDateDebutParDefaut(bool $utiliserDateDebutParDefaut): self + { + $this->utiliserDateDebutParDefaut = $utiliserDateDebutParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getDateDebut(): ?string + { + return $this->dateDebut; + } + + /** + * @param ?string $dateDebut + */ + public function setDateDebut(?string $dateDebut): self + { + $dateDebut = self::trimToNull($dateDebut); + if ($dateDebut == NULL) { + $this->dateDebut = NULL; + } else { + $this->dateDebut = mb_substr($dateDebut, 0, 10); + } + return $this; + } + + /** + * @return bool + */ + public function isUtiliserDateFinParDefaut() + { + return $this->utiliserDateFinParDefaut; + } + + /** + * @param bool $utiliserDateFinParDefaut + */ + public function setUtiliserDateFinParDefaut(bool $utiliserDateFinParDefaut): self + { + $this->utiliserDateFinParDefaut = $utiliserDateFinParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getDateFin(): ?string + { + return $this->dateFin; + } + + /** + * @param ?string $dateFin + */ + public function setDateFin(?string $dateFin): self + { + $dateFin = self::trimToNull($dateFin); + if ($dateFin == NULL) { + $this->dateFin = NULL; + } else { + $this->dateFin = mb_substr($dateFin, 0, 10); + } + return $this; + } + + /** + * @return ?float + */ + public function getMontantPercuUnite(): ?float + { + return $this->montantPercuUnite; + } + + /** + * @param ?float $montantPercuUnite + */ + public function setMontantPercuUnite(?float $montantPercuUnite): self + { + $this->montantPercuUnite = $montantPercuUnite; + return $this; + } + + /** + * @return ?float + */ + public function getContributionFinanceur(): ?float + { + return $this->contributionFinanceur; + } + + /** + * @param ?float $contributionFinanceur + */ + public function setContributionFinanceur(?float $contributionFinanceur): self + { + $this->contributionFinanceur = $contributionFinanceur; + return $this; + } + + /** + * @return bool + */ + public function isUtiliserMontantTotalParDefaut() + { + return $this->utiliserMontantTotalParDefaut; + } + + /** + * @param bool $utiliserMontantTotalParDefaut + */ + public function setUtiliserMontantTotalParDefaut(bool $utiliserMontantTotalParDefaut): self + { + $this->utiliserMontantTotalParDefaut = $utiliserMontantTotalParDefaut; + return $this; + } + + /** + * @return ?float + */ + public function getMontantTotal(): ?float + { + return $this->montantTotal; + } + + /** + * @param ?float $montantTotal + */ + public function setMontantTotal(?float $montantTotal): self + { + $this->montantTotal = $montantTotal; + return $this; + } + + /** + * @return ?string + */ + public function getCommentaires(): ?string + { + return $this->commentaires; + } + + /** + * @param ?string $commentaires + */ + public function setCommentaires(?string $commentaires): self + { + $commentaires = self::trimToNull($commentaires); + if ($commentaires == NULL) { + $this->commentaires = NULL; + } else { + $this->commentaires = mb_substr($commentaires, 0, self::COMMENTAIRES_MAX_LENGTH); + } + return $this; + } + + /** + * @return ?bool + */ + public function isPia() + { + return $this->pia; + } + + /** + * @param ?bool $pia + */ + public function setPia(?bool $pia): self + { + $this->pia = $pia; + return $this; + } + + /** + * @return bool + */ + public function isUtiliserReferenceParDefaut() + { + return $this->utiliserReferenceParDefaut; + } + + /** + * @param bool $utiliserReferenceParDefaut + */ + public function setUtiliserReferenceParDefaut(bool $utiliserReferenceParDefaut): self + { + $this->utiliserReferenceParDefaut = $utiliserReferenceParDefaut; + return $this; + } + + /** + * @return ?string + */ + public function getReference(): ?string + { + return $this->reference; + } + + /** + * @param ?string $reference + */ + public function setReference(?string $reference): self + { + $reference = self::trimToNull($reference); + if ($reference == NULL) { + $this->reference = NULL; + } else { + $this->reference = mb_substr($reference, 0, self::REFERENCE_MAX_LENGTH); + } + return $this; + } + + /** + * @return ?bool + */ + public function isAccordCadre() + { + return $this->accordCadre; + } + + /** + * @param ?bool $accordCadre + */ + public function setAccordCadre(?bool $accordCadre): self + { + $this->accordCadre = $accordCadre; + return $this; + } + + /** + * @return bool + */ + public function isCifre() + { + return $this->cifre; + } + + /** + * @param bool $cifre + */ + public function setCifre(bool $cifre): self + { + $this->cifre = $cifre; + return $this; + } + + /** + * @return ?bool + */ + public function isChaireIndustrielle() + { + return $this->chaireIndustrielle; + } + + /** + * @param ?bool $chaireIndustrielle + */ + public function setChaireIndustrielle(?bool $chaireIndustrielle): self + { + $this->chaireIndustrielle = $chaireIndustrielle; + return $this; + } + + /** + * @return ?bool + */ + public function isPresencePartenaireIndustriel() + { + return $this->presencePartenaireIndustriel; + } + + /** + * @param ?bool $presencePartenaireIndustriel + */ + public function setPresencePartenaireIndustriel(?bool $presencePartenaireIndustriel): self + { + $this->presencePartenaireIndustriel = $presencePartenaireIndustriel; + return $this; + } + + /** + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus(string $status): self + { + $this->status = $status; + return $this; + } + + /** + * @return bool + */ + public function isEnvoiActif(): bool + { + return $this->envoiActif; + } + + /** + * @param bool $envoiActif + */ + public function setEnvoiActif(bool $envoiActif): self + { + $this->envoiActif = $envoiActif; + return $this; + } + + /** + * @return \DateTime + */ + public function getDateUpdated(): \DateTime + { + return $this->dateUpdated; + } + + /** + * @param \DateTime $dateUpdated + */ + public function setDateUpdated(\DateTime $dateUpdated): self + { + $this->dateUpdated = $dateUpdated; + return $this; + } + + /** + * @return ?\DateTime + */ + public function getDatePremierDepot(): ?\DateTime + { + return $this->datePremierDepot; + } + + /** + * @param ?\DateTime $datePremierDepot + */ + public function setDatePremierDepot(?\DateTime $datePremierDepot): self + { + $this->datePremierDepot = $datePremierDepot; + return $this; + } + + public function toArray() :array + { + $out = []; + $out['id'] = $this->getId(); + $out['utiliserObjetParDefaut'] = $this->isUtiliserObjetParDefaut(); + $out['objet'] = $this->getObjet(); + $out['utiliserLabintelParDefaut'] = $this->isUtiliserLabintelParDefaut(); + $out['labintel'] = $this->getLabintel(); + $out['utiliserRnsrParDefaut'] = $this->isUtiliserRnsrParDefaut(); + $out['rnsr'] = $this->getRnsr(); + $out['utiliserSigleParDefaut'] = $this->isUtiliserSigleParDefaut(); + $out['sigle'] = $this->getSigle(); + $out['utiliserNumContratParDefaut'] = $this->isUtiliserNumContratParDefaut(); + $out['numContrat'] = $this->getNumContrat(); + $out['equipe'] = $this->getEquipe(); + $out['utiliserTypeContratParDefaut'] = $this->isUtiliserTypeContratParDefaut(); + if ($this->pcruTypeContract != NULL) { + $out['pcruTypeContractId'] = $this->pcruTypeContract->getId(); + } else { + $out['pcruTypeContractId'] = NULL; + } + $out['utiliserAcronymeParDefaut'] = $this->isUtiliserAcronymeParDefaut(); + $out['acronyme'] = $this->getAcronyme(); + $out['contratsAssocies'] = $this->getContratsAssocies(); + $out['utiliserResponsableScientifiqueParDefaut'] = $this->isUtiliserResponsableScientifiqueParDefaut(); + $out['responsableScientifique'] = $this->getResponsableScientifique(); + $out['employeurResponsableScientifique'] = $this->getEmployeurResponsableScientifique(); + $out['coordinateurConsortium'] = $this->isCoordinateurConsortium() === NULL ? NULL : ($this->isCoordinateurConsortium() ? "true" : "false"); + $out['utiliserPartenairesParDefaut'] = $this->isUtiliserPartenairesParDefaut(); + $out['partenaires'] = $this->getPartenaires(); + $out['utiliserPartenairePrincipalParDefaut'] = $this->isUtiliserPartenairePrincipalParDefaut(); + $out['partenairePrincipal'] = $this->getPartenairePrincipal(); + $out['utiliserIdPartenairePrincipalParDefaut'] = $this->isUtiliserIdPartenairePrincipalParDefaut(); + $out['idPartenairePrincipal'] = $this->getIdPartenairePrincipal(); + $out['lieuExecution'] = $this->getLieuExecution(); + $out['utiliserDateDerniereSignatureParDefaut'] = $this->isUtiliserDateDerniereSignatureParDefaut(); + $out['dateDerniereSignature'] = $this->getDateDerniereSignature(); + $out['duree'] = $this->getDuree(); + $out['utiliserDateDebutParDefaut'] = $this->isUtiliserDateDebutParDefaut(); + $out['dateDebut'] = $this->getDateDebut(); + $out['utiliserDateFinParDefaut'] = $this->isUtiliserDateFinParDefaut(); + $out['dateFin'] = $this->getDateFin(); + $out['montantPercuUnite'] = $this->getMontantPercuUnite(); + $out['contributionFinanceur'] = $this->getContributionFinanceur(); + $out['utiliserMontantTotalParDefaut'] = $this->isUtiliserMontantTotalParDefaut(); + $out['montantTotal'] = $this->getMontantTotal(); + $out['commentaires'] = $this->getCommentaires(); + $out['pia'] = $this->isPia() === NULL ? NULL : ($this->isPia() ? "true" : "false"); + $out['utiliserReferenceParDefaut'] = $this->isUtiliserReferenceParDefaut(); + $out['reference'] = $this->getReference(); + $out['accordCadre'] = $this->isAccordCadre() === NULL ? NULL : ($this->isAccordCadre() ? "true" : "false"); + $out['cifre'] = $this->isCifre() ? "true" : "false"; + $out['chaireIndustrielle'] = $this->isChaireIndustrielle() === NULL ? NULL : ($this->isChaireIndustrielle() ? "true" : "false"); + $out['presencePartenaireIndustriel'] = $this->isPresencePartenaireIndustriel() === NULL ? NULL : ($this->isPresencePartenaireIndustriel() ? "true" : "false"); + $out['status'] = $this->getStatus(); + $out['envoiActif'] = $this->isEnvoiActif(); + $dateupdated = $this->getDateUpdated(); + $dateupdated->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $out['dateUpdated'] = $dateupdated->format(\DateTime::ATOM); + $dateActivationEnvoi = $this->dateActivationEnvoi; + $out['dateActivationEnvoi'] = NULL; + if ($dateActivationEnvoi != NULL) { + $dateActivationEnvoi->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $out['dateActivationEnvoi'] = $dateActivationEnvoi->format(\DateTime::ATOM); + } + $datepremierdepot = $this->getDatePremierDepot(); + $out['datePremierDepot'] = NULL; + if ($datepremierdepot != NULL) { + $datepremierdepot->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $out['datePremierDepot'] = $datepremierdepot->format(\DateTime::ATOM); + } + $dateRetourOK = $this->dateRetourOK; + $out['dateRetourOK'] = NULL; + if ($dateRetourOK != NULL) { + $dateRetourOK->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $out['dateRetourOK'] = $dateRetourOK->format(\DateTime::ATOM); + } + $dateRetourOKMaisContratManquant = $this->dateRetourOKMaisContratManquant; + $out['dateRetourOKMaisContratManquant'] = NULL; + if ($dateRetourOKMaisContratManquant != NULL) { + $dateRetourOKMaisContratManquant->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $out['dateRetourOKMaisContratManquant'] = $dateRetourOKMaisContratManquant->format(\DateTime::ATOM); + } + $dateEnvoiFichierContrat = $this->dateEnvoiFichierContrat; + $out['dateEnvoiFichierContrat'] = NULL; + if ($dateEnvoiFichierContrat != NULL) { + $dateEnvoiFichierContrat->setTimezone(new \DateTimeZone( date_default_timezone_get() )); + $out['dateEnvoiFichierContrat'] = $dateEnvoiFichierContrat->format(\DateTime::ATOM); + } + $out['envoiObjet'] = $this->envoiObjet; + $out['envoiLabintel'] = $this->envoiLabintel; + $out['envoiRnsr'] = $this->envoiRnsr; + $out['envoiSigle'] = $this->envoiSigle; + $out['envoiNumContrat'] = $this->envoiNumContrat; + $out['envoiEquipe'] = $this->envoiEquipe; + $out['envoiTypeContrat'] = $this->envoiTypeContrat; + $out['envoiAcronyme'] = $this->envoiAcronyme; + $out['envoiContratsAssocies'] = $this->envoiContratsAssocies; + $out['envoiResponsableScientifique'] = $this->envoiResponsableScientifique; + $out['envoiEmployeurResponsableScientifique'] = $this->envoiEmployeurResponsableScientifique; + $out['envoiCoordinateurConsortium'] = $this->envoiCoordinateurConsortium; + $out['envoiPartenaires'] = $this->envoiPartenaires; + $out['envoiPartenairePrincipal'] = $this->envoiPartenairePrincipal; + $out['envoiIdPartenairePrincipal'] = $this->envoiIdPartenairePrincipal; + $out['envoiSourceFinancement'] = $this->envoiSourceFinancement; + $out['envoiLieuExecution'] = $this->envoiLieuExecution; + $out['envoiDateDerniereSignature'] = $this->envoiDateDerniereSignature; + $out['envoiDuree'] = $this->envoiDuree; + $out['envoiDateDebut'] = $this->envoiDateDebut; + $out['envoiDateFin'] = $this->envoiDateFin; + $out['envoiMontantPercuUnite'] = $this->envoiMontantPercuUnite; + $out['envoiContributionFinanceur'] = $this->envoiContributionFinanceur; + $out['envoiMontantTotal'] = $this->envoiMontantTotal; + $out['envoiValidePoleCompetitivite'] = $this->envoiValidePoleCompetitivite; + $out['envoiPoleCompetitivite'] = $this->envoiPoleCompetitivite; + $out['envoiCommentaires'] = $this->envoiCommentaires; + $out['envoiPia'] = $this->envoiPia; + $out['envoiReference'] = $this->envoiReference; + $out['envoiAccordCadre'] = $this->envoiAccordCadre; + $out['envoiCifre'] = $this->envoiCifre; + $out['envoiChaireIndustrielle'] = $this->envoiChaireIndustrielle; + $out['envoiPresencePartenaireIndustriel'] = $this->envoiPresencePartenaireIndustriel; + $out['erreurs'] = $this->erreurs; + return $out; + } + + static private function trimToNull(?string $s) : ?string { + if ($s === NULL) { + return NULL; + } + $t = trim($s); + if ($t === '') { + return NULL; + } + return $t; + } +} diff --git a/module/Oscar/src/Oscar/Entity/ActivityPcruInformationsRepository.php b/module/Oscar/src/Oscar/Entity/ActivityPcruInformationsRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..47008aa3f0cee28930e5fc3a8592687233410e22 --- /dev/null +++ b/module/Oscar/src/Oscar/Entity/ActivityPcruInformationsRepository.php @@ -0,0 +1,9 @@ + "Aperçu", - self::STATUS_ERROR_DATA => "ERREUR (Oscar)", - self::STATUS_SEND_READY => "Prêt pour l'envoi", - self::STATUS_FILE_READY => "Fichier prêt (Attente du transfert)", - self::STATUS_SEND_PENDING => "Envoyé", - self::STATUS_ERROR_REMOTE => "ERREUR (PCRU)", - self::STATUS_CONTRACT_SEND_PENDING => "En attente d'envoi du contrat", - self::STATUS_CONTRACT_ERROR_REMOTE => "PCRU en retourné une erreur concernant le contrat", - self::STATUS_DONE => "OK", - ]; - } - return self::$status_str[$status]; - } - - /** - * ActivityPcruInfos constructor. - * @param string $status - */ - public function __construct() - { - $this->status = self::STATUS_PREVIEW; - } - - public function __toString() - { - return sprintf( - "[%s] %s : %s (%s) - %s:%s", - $this->getNumContratTutelleGestionnaire(), - $this->getAcronyme(), - $this->getObjet(), - $this->getResponsableScientifique(), - $this->getStatus(), - $this->getStatusStr() - ); - } - - public function isWaiting(): bool - { - return $this->getStatus() == self::STATUS_FILE_READY; - } - - public function toArray(?EntityManager $entityManager = null): array - { - $partenairePrincipal = ""; - if ($this->getIdPartenairePrincipal() && $entityManager) { - $partenairePrincipal = $entityManager->getRepository(Organization::class)->getOrganizationByCodePCRU($this->getIdPartenairePrincipal()); - } - $out = []; - $out['Objet'] = $this->getObjet(); - $out['CodeUniteLabintel'] = $this->getCodeUniteLabintel(); - $out['SigleUnite'] = $this->getSigleUnite(); - $out['NumContratTutelleGestionnaire'] = $this->getNumContratTutelleGestionnaire(); - $out['Equipe'] = $this->getEquipe(); - $out['TypeContrat'] = $this->getTypeContrat() ? $this->getTypeContrat()->getLabel() : "Aucun"; - $out['Acronyme'] = $this->getAcronyme(); - $out['ContratsAssocies'] = $this->getContratsAssocies(); - $out['ResponsableScientifique'] = $this->getResponsableScientifique(); - $out['EmployeurResponsableScientifique'] = $this->getEmployeurResponsableScientifique(); - $out['CoordinateurConsortium'] = $this->isCoordinateurConsortium() ? 'True' : 'False'; - $out['Partenaires'] = $this->getPartenaires(); - $out['PartenairePrincipal'] = "$partenairePrincipal"; - $out['IdPartenairePrincipal'] = $this->getIdPartenairePrincipal(); - $out['SourceFinancement'] = $this->getSourceFinancement() ? $this->getSourceFinancement()->getLabel() : ""; - $out['LieuExecution'] = $this->getLieuExecution(); - $out['DateDerniereSignature'] = DateTimeUtils::toStr($this->getDateDerniereSignature(), 'd-m-Y'); - $out['Duree'] = $this->getDuree(); - $out['DateDebut'] = DateTimeUtils::toStr($this->getDateDebut(), 'd-m-Y'); - $out['DateFin'] = DateTimeUtils::toStr($this->getDateFin(), 'd-m-Y'); - $out['MontantPercuUnite'] = $this->getMontantPercuUnite(); - $out['CoutTotalEtude'] = $this->getCoutTotalEtude(); - $out['MontantTotal'] = $this->getMontantTotal(); - $out['ValidePoleCompetivite'] = $this->isValidePoleCompetivite() ? "True" : "False"; - $out['PoleCompetivite'] = $this->getPoleCompetivite(); - $out['Commentaires'] = $this->getCommentaires(); - $out['Pia'] = $this->isPia() ? "True" : "False"; - $out['Reference'] = $this->getReference(); - $out['AccordCadre'] = $this->isAccordCadre() ? "True" : "False"; - $out['Cifre'] = $this->getCifre(); - $out['ChaireIndustrielle'] = $this->getChaireIndustrielle(); - $out['PresencePartenaireIndustriel'] = $this->isPresencePartenaireIndustriel(); - return $out; - } - - public function validation(OscarConfigurationService $oscarConfigurationService): array - { - $this->error = []; - $this->warnings = []; - $datas = $this->toArray(); - - $out = []; - $out['Objet'] = self::VALIDATION_ERROR; // Requis - $out['CodeUniteLabintel'] = self::VALIDATION_ERROR; // Requis - $out['SigleUnite'] = self::VALIDATION_EMPTY; - $out['NumContratTutelleGestionnaire'] = self::VALIDATION_ERROR; // Requis - $out['Equipe'] = self::VALIDATION_EMPTY; - $out['TypeContrat'] = self::VALIDATION_ERROR; - $out['Acronyme'] = self::VALIDATION_EMPTY; - $out['ContratsAssocies'] = self::VALIDATION_EMPTY; - $out['ResponsableScientifique'] = self::VALIDATION_ERROR; // Requis - $out['EmployeurResponsableScientifique'] = self::VALIDATION_EMPTY; - $out['CoordinateurConsortium'] = self::VALIDATION_EMPTY; - $out['Partenaires'] = self::VALIDATION_EMPTY; - $out['PartenairePrincipal'] = self::VALIDATION_ERROR; // Requis - $out['IdPartenairePrincipal'] = self::VALIDATION_EMPTY; - $out['SourceFinancement'] = self::VALIDATION_ERROR; // Requis - $out['LieuExecution'] = self::VALIDATION_ERROR; // Requis - $out['DateDerniereSignature'] = self::VALIDATION_ERROR; // Requis - $out['Duree'] = self::VALIDATION_EMPTY; - $out['DateDebut'] = self::VALIDATION_ERROR; // Requis - $out['DateFin'] = self::VALIDATION_ERROR; // Requis - $out['MontantPercuUnite'] = self::VALIDATION_ERROR; // Requis - $out['CoutTotalEtude'] = self::VALIDATION_EMPTY; - $out['MontantTotal'] = self::VALIDATION_EMPTY; - $out['ValidePoleCompetivite'] = self::VALIDATION_EMPTY; - $out['PoleCompetivite'] = self::VALIDATION_EMPTY; - $out['Commentaires'] = self::VALIDATION_EMPTY; - $out['Pia'] = self::VALIDATION_EMPTY; - $out['Reference'] = self::VALIDATION_EMPTY; - $out['AccordCadre'] = self::VALIDATION_EMPTY; - $out['Cifre'] = self::VALIDATION_EMPTY; - $out['ChaireIndustrielle'] = self::VALIDATION_EMPTY; - $out['PresencePartenaireIndustriel'] = self::VALIDATION_EMPTY; - $out['contract_signed'] = self::VALIDATION_ERROR; - - - $disabledFields = [ - 'Equipe','ContratsAssocies', 'EmployeurResponsableScientifique', - 'CoordinateurConsortium','Partenaires', 'PartenairePrincipal', - 'IdPartenairePrincipal','LieuExecution', 'Duree', - 'MontantPercuUnite','CoutTotalEtude', 'Commentaires', - 'Pia','AccordCadre', 'Cifre', - 'ChaireIndustrielle','PresencePartenaireIndustriel' - ]; - - foreach ($disabledFields as $unusedField) { - $out[$unusedField] = self::VALIDATION_DISABLED; - } - - if ($datas['Objet']) { - $out['Objet'] = self::VALIDATION_VALID; - } - - if ($datas['CodeUniteLabintel']) { - $out['CodeUniteLabintel'] = self::VALIDATION_VALID; - } - - if ($datas['SigleUnite']) { - $out['SigleUnite'] = self::VALIDATION_VALID; - } - - if ($datas['NumContratTutelleGestionnaire']) { - $out['NumContratTutelleGestionnaire'] = self::VALIDATION_VALID; - } - - if ($datas['NumContratTutelleGestionnaire']) { - $out['NumContratTutelleGestionnaire'] = self::VALIDATION_VALID; - } - - if ($datas['TypeContrat'] != 'Aucun') { - $out['TypeContrat'] = self::VALIDATION_VALID; - } - - if ($datas['Acronyme']) { - $out['Acronyme'] = self::VALIDATION_VALID; - } - - if ($datas['ResponsableScientifique']) { - $out['ResponsableScientifique'] = self::VALIDATION_VALID; - } - - if ($datas['EmployeurResponsableScientifique']) { - $out['EmployeurResponsableScientifique'] = self::VALIDATION_VALID; - } - - if ($datas['PartenairePrincipal']) { - $out['PartenairePrincipal'] = self::VALIDATION_VALID; - } - - if ($datas['SourceFinancement']) { - $out['SourceFinancement'] = self::VALIDATION_VALID; - } - - if ($datas['LieuExecution']) { - $out['LieuExecution'] = self::VALIDATION_VALID; - } - - if ($datas['DateDerniereSignature']) { - $out['DateDerniereSignature'] = self::VALIDATION_VALID; - } - - if ($datas['DateDebut']) { - $out['DateDebut'] = self::VALIDATION_VALID; - } - - if ($datas['DateFin']) { - $out['DateFin'] = self::VALIDATION_VALID; - } - - if ($datas['MontantTotal']) { - $out['MontantTotal'] = self::VALIDATION_VALID; - } - - - if ($datas['ValidePoleCompetivite'] == true) { - $out['ValidePoleCompetivite'] = self::VALIDATION_VALID; - $out['PoleCompetivite'] = self::VALIDATION_ERROR; - if ($out['PoleCompetivite']) { - $out['PoleCompetivite'] = self::VALIDATION_VALID; - } - } - - if ($datas['Reference']) { - $out['Reference'] = self::VALIDATION_VALID; - } - - - if ($this->getDocumentId()) { - $out['document_signed'] = self::VALIDATION_VALID; - $out['contrat_signed'] = self::VALIDATION_VALID; - } else { - $this->addError("Le document du contrat est indisponible"); - } - - foreach ($out as $champ => $state) { - if ($champ == 'contract_signed') { - continue; - } - if ($state == self::VALIDATION_ERROR) { - $this->status = self::STATUS_ERROR_DATA; - $this->addError($this->getMessage($champ)); - } - } - - return $out; - } - - private static $messages; - - protected function getMessage($champ) - { - if (self::$messages === null) { - self::$messages = []; - self::$messages['SourceFinancement'] = "La source de financement est manquante, vous pouvez la renseigner depuis la fiche activité"; - self::$messages['TypeContrat'] = "Le type de contrat est manquant. Vous pouvez automatiser la correspondance Oscar/PCRU depuis l'interface d'administration et éditer le type manuellement"; - self::$messages['DateDerniereSignature'] = "La date de signature est manquante, vous pouvez la renseigner depuis la fiche activité"; - self::$messages['CodeUniteLabintel'] = "Le code de l'unité de recherche (Labintel) est manquant, il peut être complété depuis la fiche organisation (type UMR XXXX)"; - } - - if (array_key_exists($champ, self::$messages)) { - return self::$messages[$champ]; - } else { - return sprintf("Le champ %s n'est pas renseigné.", $champ); - } - } - - /** - * @return mixed - */ - public function getId() - { - return $this->id; - } - - /** - * @return Activity - */ - public function getActivity(): Activity - { - return $this->activity; - } - - /** - * @param Activity $activity - */ - public function setActivity(Activity $activity): self - { - $this->activity = $activity; - return $this; - } - - /** - * @return string - */ - public function getObjet(): string - { - return $this->objet; - } - - /** - * @param string $objet - */ - public function setObjet(string $objet): self - { - $this->objet = mb_substr($objet, 0, 1000); - return $this; - } - - /** - * @return string - */ - public function getCodeUniteLabintel(): string - { - return $this->codeUniteLabintel; - } - - /** - * @param string $codeUniteLabintel - */ - public function setCodeUniteLabintel(string $codeUniteLabintel): self - { - $this->codeUniteLabintel = mb_substr($codeUniteLabintel, 0, 10); - return $this; - } - - /** - * @return string - */ - public function getSigleUnite(): string - { - return $this->sigleUnite; - } - - /** - * @param string $sigleUnite - */ - public function setSigleUnite(string $sigleUnite): self - { - $this->sigleUnite = mb_substr($sigleUnite, 0, 20); - ; - return $this; - } - - /** - * @return string - */ - public function getNumContratTutelleGestionnaire(): string - { - return $this->numContratTutelleGestionnaire; - } - - public function isSendable(): bool - { - return $this->getStatus() == self::STATUS_SEND_READY; - } - - /** - * @param string $numContratTutelleGestionnaire - */ - public function setNumContratTutelleGestionnaire(string $numContratTutelleGestionnaire): self - { - $this->numContratTutelleGestionnaire = $numContratTutelleGestionnaire; - return $this; - } - - /** - * @return string - */ - public function getEquipe(): string - { - return $this->equipe; - } - - /** - * @param string $equipe - */ - public function setEquipe(string $equipe): self - { - $this->equipe = mb_substr($equipe, 0, 150); - return $this; - } - - /** - * @return PcruTypeContract - */ - public function getTypeContrat(): ?PcruTypeContract - { - return $this->typeContrat; - } - - /** - * @param PcruTypeContract $typeContrat - */ - public function setTypeContrat(?PcruTypeContract $typeContrat): self - { - $this->typeContrat = $typeContrat; - return $this; - } - - /** - * @return string - */ - public function getAcronyme(): string - { - return $this->acronyme; - } - - /** - * @param string $acronyme - */ - public function setAcronyme(string $acronyme): self - { - $this->acronyme = mb_substr($acronyme, 0, 10); - return $this; - } - - /** - * @return string - */ - public function getContratsAssocies(): string - { - return $this->contratsAssocies; - } - - /** - * @param string $contratsAssocies - */ - public function setContratsAssocies(string $contratsAssocies): self - { - $this->contratsAssocies = $contratsAssocies; - return $this; - } - - /** - * @return string - */ - public function getResponsableScientifique(): string - { - return $this->responsableScientifique; - } - - /** - * @param string $responsableScientifique - */ - public function setResponsableScientifique(string $responsableScientifique): self - { - $this->responsableScientifique = mb_substr($responsableScientifique, 0, 50); - return $this; - } - - /** - * @return string - */ - public function getEmployeurResponsableScientifique(): string - { - return $this->employeurResponsableScientifique; - } - - /** - * @param string $employeurResponsableScientifique - */ - public function setEmployeurResponsableScientifique(string $employeurResponsableScientifique): self - { - $this->employeurResponsableScientifique = mb_substr($employeurResponsableScientifique, 0, 50); - return $this; - } - - /** - * @return bool - */ - public function isCoordinateurConsortium(): bool - { - return $this->coordinateurConsortium; - } - - /** - * @param bool $coordinateurConsortium - */ - public function setCoordinateurConsortium(bool $coordinateurConsortium): self - { - $this->coordinateurConsortium = $coordinateurConsortium; - return $this; - } - - /** - * @return bool - */ - public function getPartenaires(): string - { - return $this->partenaires; - } - - /** - * @param string $partenaires - */ - public function setPartenaires($partenaires): self - { - $this->partenaires = $partenaires; - return $this; - } - - /** - * @return bool - */ - public function getPartenairePrincipal(): string - { - return $this->partenairePrincipal; - } - - /** - * @param bool $partenairePrincipal - */ - public function setPartenairePrincipal(string $partenairePrincipal): self - { - $this->partenairePrincipal = mb_substr($partenairePrincipal, 0, 50); - return $this; - } - - /** - * @return string - */ - public function getIdPartenairePrincipal(): string - { - return $this->idPartenairePrincipal; - } - - /** - * @param string $idPartenairePrincipal - */ - public function setIdPartenairePrincipal(string $idPartenairePrincipal): self - { - $this->idPartenairePrincipal = mb_substr($idPartenairePrincipal, 0, 50); - return $this; - } - - /** - * @return PcruSourceFinancement | null - */ - public function getSourceFinancement() - { - return $this->sourceFinancement; - } - - /** - * @param PcruSourceFinancement $souceFinancement - */ - public function setSourceFinancement($souceFinancement): self - { - $this->sourceFinancement = $souceFinancement; - return $this; - } - - /** - * @return string - */ - public function getLieuExecution(): string - { - return $this->lieuExecution; - } - - /** - * @param string $lieuExecution - */ - public function setLieuExecution(string $lieuExecution): self - { - $this->lieuExecution = mb_substr($lieuExecution, 0, 50); - return $this; - } - - /** - * @return \DateTime - */ - public function getDateDerniereSignature() - { - return $this->dateDerniereSignature; - } - - public function getDateDerniereSignatureStr(): string - { - return $this->getDateDerniereSignature() ? $this->getDateDerniereSignature()->format('Y-m-d') : ""; - } - - /** - * @param \DateTime $dateDerniereSignature - */ - public function setDateDerniereSignature($dateDerniereSignature): self - { - $this->dateDerniereSignature = $dateDerniereSignature; - return $this; - } - - /** - * @return string - */ - public function getDuree() - { - return $this->duree; - } - - /** - * @param string $duree - */ - public function setDuree($duree): self - { - $this->duree = $duree; - return $this; - } - - /** - * @return \DateTime - */ - public function getDateDebut() - { - return $this->dateDebut; - } - - public function getDateDebutStr(): string - { - return $this->getDateDebut() ? $this->getDateDebut()->format('Y-m-d') : ""; - } - - /** - * @param \DateTime $dateDebut - */ - public function setDateDebut($dateDebut): self - { - $this->dateDebut = $dateDebut; - return $this; - } - - /** - * @return \DateTime - */ - public function getDateFin() - { - return $this->dateFin; - } - - public function getDateFinStr(): string - { - return $this->getDateFin() ? $this->getDateFin()->format('Y-m-d') : ""; - } - - /** - * @param \DateTime $dateFin - */ - public function setDateFin($dateFin): self - { - $this->dateFin = $dateFin; - return $this; - } - - /** - * @return string - */ - public function getMontantPercuUnite(): string - { - return $this->montantPercuUnite; - } - - /** - * @param string $montantPercuUnite - */ - public function setMontantPercuUnite(string $montantPercuUnite): self - { - $this->montantPercuUnite = $montantPercuUnite; - return $this; - } - - /** - * @return string - */ - public function getCoutTotalEtude(): string - { - return $this->coutTotalEtude; - } - - /** - * @param string $coutTotalEtude - */ - public function setCoutTotalEtude(string $coutTotalEtude): self - { - $this->coutTotalEtude = $coutTotalEtude; - return $this; - } - - /** - * @return string - */ - public function getMontantTotal(): string - { - return $this->montantTotal; - } - - /** - * @param string $montantTotal - */ - public function setMontantTotal(string $montantTotal): self - { - $this->montantTotal = $montantTotal; - return $this; - } - - /** - * @return bool - */ - public function isValidePoleCompetivite(): bool - { - return $this->validePoleCompetivite; - } - - /** - * @param bool $validePoleCompetivite - */ - public function setValidePoleCompetivite(bool $validePoleCompetivite): self - { - $this->validePoleCompetivite = $validePoleCompetivite; - return $this; - } - - /** - * @return string - */ - public function getPoleCompetivite(): string - { - return $this->poleCompetivite; - } - - /** - * @param string $poleCompetivite - */ - public function setPoleCompetivite(string $poleCompetivite): self - { - $this->poleCompetivite = $poleCompetivite; - return $this; - } - - /** - * @return string - */ - public function getCommentaires(): string - { - return $this->commentaires; - } - - /** - * @param string $commentaires - */ - public function setCommentaires(string $commentaires): self - { - $this->commentaires = $commentaires; - return $this; - } - - /** - * @return bool - */ - public function isPia(): bool - { - return $this->pia; - } - - /** - * @param bool $pia - */ - public function setPia(bool $pia): self - { - $this->pia = $pia; - return $this; - } - - /** - * @return string - */ - public function getReference(): string - { - return $this->reference; - } - - /** - * @param string $reference - */ - public function setReference(string $reference): self - { - $this->reference = mb_substr($reference, 0, 100); - return $this; - } - - /** - * @return bool - */ - public function isAccordCadre(): bool - { - return $this->accordCadre; - } - - /** - * @param bool $accordCadre - */ - public function setAccordCadre(bool $accordCadre): self - { - $this->accordCadre = $accordCadre; - return $this; - } - - /** - * @return string - */ - public function getCifre(): string - { - return $this->cifre; - } - - /** - * @param string $cifre - */ - public function setCifre(string $cifre): self - { - $this->cifre = mb_substr($cifre, 0, 100); - return $this; - } - - /** - * @return string - */ - public function getChaireIndustrielle(): string - { - return $this->chaireIndustrielle; - } - - /** - * @param string $chaireIndustrielle - */ - public function setChaireIndustrielle(string $chaireIndustrielle): self - { - $this->chaireIndustrielle = mb_substr($chaireIndustrielle, 0, 8); - return $this; - } - - /** - * @return string - */ - public function isPresencePartenaireIndustriel(): bool - { - return $this->PresencePartenaireIndustriel; - } - - - - /** - * @return int - */ - public function getDocumentId(): ?int - { - return $this->documentId; - } - - /** - * @param int $documentId - */ - public function setDocumentId(?int $documentId): self - { - $this->documentId = $documentId; - return $this; - } - - /** - * @param bool $PresencePartenaireIndustriel - */ - public function setPresencePartenaireIndustriel(bool $PresencePartenaireIndustriel): self - { - $this->PresencePartenaireIndustriel = $PresencePartenaireIndustriel; - return $this; - } - - public function getSignedFileName() - { - return $this->getNumContratTutelleGestionnaire() . ".pdf"; - } - - private $documentPath = null; - - public function setDocumentPath($path) - { - $this->documentPath = $path; - return $this; - } - - public function getDocumentPath() - { - return $this->documentPath; - } - - /** - * @return string - */ - public function getStatus(): string - { - return $this->status; - } - - /** - * @return string - */ - public function getStatusStr(): string - { - return self::statusStr($this->getStatus()); - } - - /** - * @param string $status - */ - public function setStatus(string $status): self - { - $this->status = $status; - return $this; - } - - /** - * @return array - */ - public function getError(): ?array - { - return $this->error; - } - - public function addError($errorMessage): self - { - $this->error[] = $errorMessage; - $this->setStatus(self::STATUS_ERROR_DATA); - return $this; - } - - /** - * @param array $error - */ - public function setError(?array $error): self - { - $this->error = $error; - return $this; - } - - public function getWarnings(): ?array - { - return $this->warnings; - } - - public function addWarning(string $warningMessage): self - { - $this->warnings[] = $warningMessage; - return $this; - } - - public function setWarnings(?array $warnings): self - { - $this->warnings = $warnings; - return $this; - } - - /** - * @return string - */ - public function getErrorsRemote(): ?string - { - return $this->errorsRemote; - } - - /** - * @param string $errorsRemote - */ - public function setErrorsRemote(?string $errorsRemote): self - { - $this->errorsRemote = $errorsRemote; - return $this; - } - - public function hasErrors(): bool - { - return $this->errorsRemote != null; - } - - public function clearErrors(): void - { - $this->errorsRemote = null; - } -} diff --git a/module/Oscar/src/Oscar/Entity/ActivityPcruInfosRepository.php b/module/Oscar/src/Oscar/Entity/ActivityPcruInfosRepository.php deleted file mode 100644 index 7e720367f5930abc4db737515f5730abdcf4b290..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Entity/ActivityPcruInfosRepository.php +++ /dev/null @@ -1,58 +0,0 @@ -createQueryBuilder('i') - ->where('i.status = :status') - ->setParameter('status', ActivityPcruInfos::STATUS_SEND_READY); - return $qb->getQuery()->getResult(); - } - - /** - * Retourne la liste des envois en erreur - * @return void - */ - public function getPcruInfoActivityInError() - { - $qb = $this->createQueryBuilder('i'); - return $qb->getQuery()->getResult(); - } - - public function getPcruInfoActivityUnDone() - { - $status = [ActivityPcruInfos::STATUS_DRAFT, ActivityPcruInfos::STATUS_DONE]; - $qb = $this->createQueryBuilder('i'); - $qb->where('i.status not in (:status)') - ->setParameters(["status" => $status]); - return $qb->getQuery()->getResult(); - } - - public function getInfoActivity(int $activity_id): ActivityPcruInfos - { - $qb = $this->createQueryBuilder('i') - ->where('i.activity = :activity_id') - ->setParameter('activity_id', $activity_id); - - return $qb->getQuery()->getSingleResult(); - } - - public function getPcruInfoActivityFromOscarId(string $oscarId): ActivityPcruInfos - { - $qb = $this->createQueryBuilder('i') - ->where('i.numContratTutelleGestionnaire = :oscarid') - ->setParameter('oscarid', $oscarId); - - return $qb->getQuery()->getSingleResult(); - } -} diff --git a/module/Oscar/src/Oscar/Entity/Organization.php b/module/Oscar/src/Oscar/Entity/Organization.php index 188cd0673b9010014eca8bdb0e5eebe0124daff6..578adac3a7bf4faf7593753263976a71c2e062a8 100644 --- a/module/Oscar/src/Oscar/Entity/Organization.php +++ b/module/Oscar/src/Oscar/Entity/Organization.php @@ -285,6 +285,14 @@ class Organization implements ResourceInterface, IConnectedObject */ protected $typeObj; + /** + * Type d'établissement PCRU (Objet). + * + * @var PcruTypeEtablissement + * @ORM\ManyToOne(targetEntity="PcruTypeEtablissement") + */ + protected $typeEtablissementPcruObj; + /** * Groupe (SIFAC). * @@ -560,6 +568,23 @@ class Organization implements ResourceInterface, IConnectedObject return $this; } + /** + * @return PcruTypeEtablissement + */ + public function getTypeEtablissementPcruObj() + { + return $this->typeEtablissementPcruObj; + } + + /** + * @param PcruTypeEtablissement $typeEtablissementPcruObj + */ + public function setTypeEtablissementPcruObj($typeEtablissementPcruObj) + { + $this->typeEtablissementPcruObj = $typeEtablissementPcruObj; + return $this; + } + /** * @return mixed */ diff --git a/module/Oscar/src/Oscar/Entity/PcruFtpLog.php b/module/Oscar/src/Oscar/Entity/PcruFtpLog.php new file mode 100644 index 0000000000000000000000000000000000000000..fd88591f0f54dfd5dde7580a9f7c19af399ef8b4 --- /dev/null +++ b/module/Oscar/src/Oscar/Entity/PcruFtpLog.php @@ -0,0 +1,123 @@ +createdAt = new \DateTime(); + } + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus(string $status): self + { + $this->status = $status; + return $this; + } + + /** + * @return ?string + */ + public function getTitre(): ?string + { + return $this->titre; + } + + /** + * @param ?string $titre + */ + public function setTitre(?string $titre): self + { + $this->titre = $titre; + return $this; + } + + /** + * @return ?string + */ + public function getDetails(): ?string + { + return $this->details; + } + + /** + * @param ?string $details + */ + public function setDetails(?string $details): self + { + $this->details = $details; + return $this; + } + + /** + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + return $this->createdAt; + } +} diff --git a/module/Oscar/src/Oscar/Entity/PcruFtpLogRepository.php b/module/Oscar/src/Oscar/Entity/PcruFtpLogRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..f16133c3a2536af72926da0f85c0350b537a1b98 --- /dev/null +++ b/module/Oscar/src/Oscar/Entity/PcruFtpLogRepository.php @@ -0,0 +1,9 @@ +createQueryBuilder('ppc'); - $query->select('ppc.label'); + $query->select('ppc.label')->orderBy('ppc.label', 'ASC'); $entities = $query->getQuery()->getResult(); return array_map('current', $entities); } diff --git a/module/Oscar/src/Oscar/Entity/PcruTypeEtablissement.php b/module/Oscar/src/Oscar/Entity/PcruTypeEtablissement.php new file mode 100644 index 0000000000000000000000000000000000000000..c5792dd158c64af2e9457a133c20cc244eb7c7c5 --- /dev/null +++ b/module/Oscar/src/Oscar/Entity/PcruTypeEtablissement.php @@ -0,0 +1,57 @@ +id; + } + + /** + * @return string + */ + public function getLabel(): string + { + return $this->label; + } + + /** + * @param string $label + */ + public function setLabel(string $label): self + { + $this->label = $label; + return $this; + } + + function __toString() + { + return $this->getLabel(); + } +} diff --git a/module/Oscar/src/Oscar/Entity/PcruTypeEtablissementRepository.php b/module/Oscar/src/Oscar/Entity/PcruTypeEtablissementRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..f56d5f411acd7c25983c224737d8355ceaa13adb --- /dev/null +++ b/module/Oscar/src/Oscar/Entity/PcruTypeEtablissementRepository.php @@ -0,0 +1,26 @@ +createQueryBuilder('pte'); + $query->select('pte.label'); + $entities = $query->getQuery()->getResult(); + return array_map('current', $entities); + } + + /** + * @param string $label + * @return PcruTypeEtablissement|null + */ + public function getByLabel(string $label): ?PcruTypeEtablissement + { + return $this->findOneByLabel($label); + } +} diff --git a/module/Oscar/src/Oscar/Exception/OscarPCRUException.php b/module/Oscar/src/Oscar/Exception/OscarPCRUException.php index 2612814e321f45990faa91c16f596b8922bb2194..8d32d171f9cb8974995648dc0e791f7ded6f5f24 100644 --- a/module/Oscar/src/Oscar/Exception/OscarPCRUException.php +++ b/module/Oscar/src/Oscar/Exception/OscarPCRUException.php @@ -6,5 +6,5 @@ namespace Oscar\Exception; class OscarPCRUException extends OscarException { - + public $details = array(); } \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Factory/ActivityPcruInfoFromActivityFactory.php b/module/Oscar/src/Oscar/Factory/ActivityPcruInfoFromActivityFactory.php deleted file mode 100644 index 34ab837c96059e963d37fa5bcb0a7bf01e74e7c0..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Factory/ActivityPcruInfoFromActivityFactory.php +++ /dev/null @@ -1,216 +0,0 @@ -oscarConfigurationService = $oscarConfigurationService; - $this->entityManager = $entityManager; - } - - - /** - * Création des données PCRU à partir des données de l'activité. - * - * @param Activity $activity - * @return ActivityPcruInfos - * @throws \Doctrine\ORM\NonUniqueResultException - */ - public function createNew(Activity $activity): ActivityPcruInfos - { - // Données PCRU - $activityPcruInfos = new ActivityPcruInfos(); - - // Erreurs métiers - $errors = []; - - // --- Recherche automatique de l'Unité (Laboratoire) - - // Intitulé du rôle "Laboratoire" pour PCRU - $roleStructureToFind = $this->oscarConfigurationService->getPcruUnitRoles(); - $rolePartnerToFind = $this->oscarConfigurationService->getPcruPartnerRoles(); - - // Donnèes trouvées - $codeUniteLabintel = ""; - $sigleUnit = ""; - $idPartenairePrincipal = ""; - $labelPartenairePrincipal = ""; - - // Récupération des laboratoires - - $structures = $activity->getOrganizationsWithOneRoleIn($roleStructureToFind); - - if (count($structures) == 0) { - $activityPcruInfos->addError( - "Aucune structure " . implode("/", $roleStructureToFind) . " pour cette activité ." - ); - } - - $organizationsParsed = []; - - /** @var ActivityOrganization $unite */ - foreach ($activity->getOrganizationsWithOneRoleIn($roleStructureToFind) as $unite) { - $organizationsParsed[] = (string)$unite; - if ($unite->getLabintel()) { - $codeUniteLabintel = $unite->getLabintel(); - $sigleUnit = $unite->getShortName(); - } - } - - $partners = []; - /** @var Organization $partner */ - foreach ($activity->getOrganizationsWithOneRoleIn($rolePartnerToFind) as $partner) { - if ($partner->getCodePcru()) { - if ($idPartenairePrincipal == "") { - $idPartenairePrincipal = $partner->getCodePcru(); - $labelPartenairePrincipal = (string) $partner; - } else { - $partners[] = $partner->getCodePcru(); - } - } - } - if ($codeUniteLabintel == "") { - $activityPcruInfos->addError( - "Aucune des structures trouvées (" .implode("/", $roleStructureToFind).") n'ont de code LABINTEL valide" - ); - } - - // --- Recherche automatique du responsable scientifique - $roleRSToFind = $this->oscarConfigurationService->getPcruInChargeRole(); - $responsable = ""; - - /** @var ActivityPerson $personActivity */ - foreach ($activity->getPersonsWithRole($roleRSToFind) as $personActivity) { - $responsable = $personActivity->getPerson()->getFirstname() . " " . strtoupper( - $personActivity->getPerson()->getLastname() - ); - } - - // Document signé - $typeDocumentSigne = $this->oscarConfigurationService->getPcruContractType(); - $documentSigned = null; - $documentId = null; - - /** @var ContractDocument $document */ - foreach ($activity->getDocuments() as $document) { - if ($document->getTypeDocument()->getLabel() == $typeDocumentSigne) { - // Test sur les versions - if ($documentSigned != null) { - // On regarde si on est pas entrain de parser une ancienne version du fichier - if ($documentName == $document->getFileName()) { - continue; - } - $activityPcruInfos->addError("Il y'a plusieurs $typeDocumentSigne sur cette activité"); - } else { - $documentSigned = $document->getPath(); - $documentName = $document->getFileName(); - $documentId = $document->getId(); - } - } - } - - if (!$documentSigned) { - $activityPcruInfos->addError( - "Oscar n'a pas trouvé de document '$typeDocumentSigne' à utiliser pour la soumission PCRU." - ); - } - - /** @var PcruTypeContractRepository $pcruContractTypeRepository */ - $pcruContractTypeRepository = $this->entityManager->getRepository(PcruTypeContract::class); - - $activityPcruInfos->setActivity($activity) - ->setDocumentPath($documentSigned) - ->setDocumentId($documentId) - ->setSigleUnite($sigleUnit) - ->setPartenaires(implode('|', $partners)) - ->setPoleCompetivite($activity->getPcruPoleCompetitiviteStr()) - ->setNumContratTutelleGestionnaire($activity->getOscarNum()) - ->setValidePoleCompetivite($activity->isPcruPolePoleCompetitiviteStr()) - ->setSourceFinancement($activity->getPcruSourceFinancementStr()) - ->setIdPartenairePrincipal($idPartenairePrincipal) - ->setResponsableScientifique($responsable) - ->setCodeUniteLabintel($codeUniteLabintel) - ->setObjet($activity->getLabel()) - ->setAcronyme($activity->getAcronym()) - ->setMontantTotal($activity->getAmount()) - ->setDateDebut($activity->getDateStart()) - ->setDateFin($activity->getDateEnd()) - ->setDateDerniereSignature($activity->getDateSigned()) - ->setReference($activity->getOscarNum()); - - // Patch (si le type d'activité est inconnu) - if ($activity->getActivityType()) { - $pcruType = $pcruContractTypeRepository->getPcruContractForActivityTypeChained( - $activity->getActivityType() - ); - $activityPcruInfos->setTypeContrat($pcruType); - } - - return $activityPcruInfos; - } - - public function getHeaders() - { - return [ - 'Objet' => "Intitulé de l'activité", - 'CodeUniteLabintel' => 'Code LABINTEL (extrait depuis la fiche organisation)', - 'SigleUnite' => 'Extrait depuis la fiche organisation (nom court)', - 'NumContratTutelleGestionnaire' => 'N°Oscar', - 'Equipe' => 'off', - 'TypeContrat' => '', - 'Acronyme' => "Acronyme du projet de l'activité", - 'ContratsAssocies' => 'off', - 'ResponsableScientifique' => 'Nom de la personne ayant le rôle "'. $this->oscarConfigurationService->getPcruInChargeRole() . '"', - 'EmployeurResponsableScientifique' => 'off', - 'CoordinateurConsortium' => 'off', - 'Partenaires' => 'off', - 'PartenairePrincipal' => 'off', - 'IdPartenairePrincipal' => 'off', - 'SourceFinancement' => 'Extrait de la fiche activité', - 'LieuExecution' => 'off', - 'DateDerniereSignature' => 'Extrait de la fiche activité', - 'Duree' => 'off', - 'DateDebut' => 'Extrait de la fiche activité', - 'DateFin' => 'Extrait de la fiche activité', - 'MontantPercuUnite' => 'off', - 'CoutTotalEtude' => 'off', - 'MontantTotal' => 'Extrait de la fiche activité', - 'ValidePoleCompetivite' => 'Extrait de la fiche activité', - 'PoleCompetivite' => 'Extrait de la fiche activité', - 'Commentaires' => 'off', - 'Pia' => 'off', - 'Reference' => '', - 'AccordCadre' => 'off', - 'Cifre' => 'off', - 'ChaireIndustrielle' => 'off', - 'PresencePartenaireIndustriel' => 'off', - ]; - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Form/ActivityInfosPcruForm.php b/module/Oscar/src/Oscar/Form/ActivityInfosPcruForm.php deleted file mode 100644 index b24f6b51c829a0ffea2bb076ed75acfd23367e9f..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Form/ActivityInfosPcruForm.php +++ /dev/null @@ -1,492 +0,0 @@ - - * @copyright Certic (c) 2021 - */ -class ActivityInfosPcruForm extends \Laminas\Form\Form implements InputFilterProviderInterface -{ - - private $projectGrantService; - private $activity; - - function __construct(ProjectGrantService $projectGrantService, Activity $activity) - { - parent::__construct('activityinfospcru'); - $this->projectGrantService = $projectGrantService; - $this->activity = $activity; - } - - public function init(){ - $this->setHydrator(new ActivityInfosPCRUFormHydrator($this->projectGrantService)); - - $this->add(array( - 'name' => 'objet', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - 'readonly' => "readonly" - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'codeunitelabintel', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'sigleunite', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'numcontrattutellegestionnaire', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - 'readonly' => "readonly" - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'equipe', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - - $this->add(array( - 'name' => 'typecontrat', - 'type' => 'Select', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ], - 'value_options' => $this->projectGrantService->getPcruTypeContractSelect() - ) - )); - - $this->add(array( - 'name' => 'acronyme', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'contratsassocies', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'responsablescientifique', - 'type' => 'Select', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ], - 'value_options' => $this->projectGrantService->getPCRUService()->getResponsableScientifiques($this->activity) - ) - )); - - $this->add(array( - 'name' => 'employeurresponsablescientifique', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'coordinateurconsortium', - 'type' => 'Checkbox', - 'attributes' => [ - 'class' => 'checkbox', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'partenaires', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'partenaireprincipal', - 'type' => 'Select', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ], - 'value_options' => $this->projectGrantService->getPCRUService()->getActivityPartenaires($this->activity) - ) - )); - - - $this->add(array( - 'name' => 'idpartenaireprincipal', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - 'readonly' => 'readonly' - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'sourcefinancement', - 'type' => 'Select', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'value_options' => $this->projectGrantService->getPcruSourceFinancementSelect(), - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'lieuexecution', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'datedernieresignature', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'duree', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'datedebut', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'datefin', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'montantpercuunite', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'couttotaletude', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'montanttotal', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'datedebut', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'polecompetivite', - 'type' => 'Select', - 'attributes' => [ - - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ], - 'value_options' => $this->projectGrantService->getPcruPoleCompetitiviteSelect() - ) - )); - - $this->add(array( - 'name' => 'validepolecompetivite', - 'type' => 'Checkbox', - 'attributes' => [ - - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'commentaires', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'pia', - 'type' => 'Checkbox', - 'attributes' => [ - 'class' => '', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'reference', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - 'readonly' => "readonly" - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'accordcadre', - 'type' => 'Checkbox', - 'attributes' => [ - - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'cifre', - 'type' => 'Checkbox', - 'attributes' => [ - - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'chaireindustrielle', - 'type' => 'Text', - 'attributes' => [ - 'class' => 'form-control', - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - $this->add(array( - 'name' => 'presencepartenaireindustriel', - 'type' => 'Checkbox', - 'attributes' => [ - ], - 'options' => array( - 'label_attributes' => [ - 'class' => 'form-label required' - ] - ) - )); - - - } - - public function getInputFilterSpecification() - { - return [ - 'dateStart'=> [ - 'required' => false, - ], - - 'dateEnd'=> [ - 'required' => false, - ], - - 'polecompetivite'=> [ - 'required' => false, - ] - ]; - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Form/OrganizationIdentificationForm.php b/module/Oscar/src/Oscar/Form/OrganizationIdentificationForm.php index 91aae4f918c03ab7f421120e505489f8b297b6d7..127d3c88f09ecc5b8f30969afca4831eec5c764f 100644 --- a/module/Oscar/src/Oscar/Form/OrganizationIdentificationForm.php +++ b/module/Oscar/src/Oscar/Form/OrganizationIdentificationForm.php @@ -20,16 +20,18 @@ class OrganizationIdentificationForm extends \Laminas\Form\Form implements Input private $connectors = []; private $types = []; + private $typesEtablissementPcru = []; private $countries = []; private bool $countryRequired = false; private bool $typeRequired = false; - public function __construct(OrganizationService $organizationService, $types = []) + public function __construct(OrganizationService $organizationService, $types = [], $typesEtablissementPcru = []) { parent::__construct('organization'); $this->connectors = $organizationService->getConnectorsList(); $this->countries = $organizationService->getCountriesIso366Labels(); $this->types = $types; + $this->typesEtablissementPcru = $typesEtablissementPcru; } public function configureRequired(array $params): void @@ -40,7 +42,7 @@ class OrganizationIdentificationForm extends \Laminas\Form\Form implements Input public function init(): void { - $this->setHydrator(new OrganizationFormHydrator($this->connectors, $this->types, $this->countries)); + $this->setHydrator(new OrganizationFormHydrator($this->connectors, $this->types, $this->typesEtablissementPcru, $this->countries)); $typesSelect = []; $typesSelect[] = ""; @@ -49,6 +51,13 @@ class OrganizationIdentificationForm extends \Laminas\Form\Form implements Input $typesSelect[$id] = (string)$t; } + $typesEtablissementPcruSelect = []; + $typesEtablissementPcruSelect[] = ""; + + foreach ($this->typesEtablissementPcru as $id=>$t ){ + $typesEtablissementPcruSelect[$id] = (string)$t; + } + $this->add(array( 'name' => 'id', 'type' => 'Hidden', @@ -82,6 +91,18 @@ class OrganizationIdentificationForm extends \Laminas\Form\Form implements Input 'type' => 'Select' ]); + // Type établissement PCRU + $this->add([ + 'name' => 'typeEtablissementPcruObj', + 'options' => [ + 'label' => 'Type d\'établissement PCRU', + 'value_options' => $typesEtablissementPcruSelect + ], + 'attributes' => [ + 'class' => 'form-control' + ], + 'type'=>'Select' + ]); $shortName = new Element\Text('shortName'); $shortName->setAttributes([ diff --git a/module/Oscar/src/Oscar/Formatter/PCRU/ActivityPcruInfosToFormArray.php b/module/Oscar/src/Oscar/Formatter/PCRU/ActivityPcruInfosToFormArray.php deleted file mode 100644 index a7bf37053191ed2acfaae573394265d72613d7aa..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Formatter/PCRU/ActivityPcruInfosToFormArray.php +++ /dev/null @@ -1,51 +0,0 @@ - $activityPcruInfos->getId(), - 'objet' => $activityPcruInfos->getObjet(), - 'codeUniteLabintel' => $activityPcruInfos->getCodeUniteLabintel(), - 'sigleUnite' => $activityPcruInfos->getSigleUnite(), - 'numContratTutelleGestionnaire' => $activityPcruInfos->getNumContratTutelleGestionnaire(), - 'equipe' => $activityPcruInfos->getEquipe(), - 'typeContrat' => $activityPcruInfos->getTypeContrat(), - 'acronyme' => $activityPcruInfos->getAcronyme(), - 'contratsAssocies' => $activityPcruInfos->getContratsAssocies(), - 'responsableScientifique' => $activityPcruInfos->getResponsableScientifique(), - 'employeurResponsableScientifique' => $activityPcruInfos->getEmployeurResponsableScientifique(), - 'coordinateurConsortium' => $activityPcruInfos->isCoordinateurConsortium(), - 'partenaires' => $activityPcruInfos->getPartenaires(), - 'partenairePrincipal' => $activityPcruInfos->isPartenairePrincipal(), - 'idPartenairePrincipal' => $activityPcruInfos->getIdPartenairePrincipal(), - 'sourceFinancement' => $activityPcruInfos->getSourceFinancement(), - 'lieuExecution' => $activityPcruInfos->getLieuExecution(), - 'dateDerniereSignature' => DateTimeUtils::toStr($activityPcruInfos->getDateDerniereSignature(), 'd-m-Y'), - 'duree' => $activityPcruInfos->getDuree(), - 'dateDebut' => DateTimeUtils::toStr($activityPcruInfos->getDateDebut(), 'd-m-Y'), - 'dateFin' => DateTimeUtils::toStr($activityPcruInfos->getDateFin(), 'd-m-Y'), - 'montantPercuUnite' => $activityPcruInfos->getMontantPercuUnite(), - 'coutTotalEtude' => $activityPcruInfos->getCoutTotalEtude(), - 'montantTotal' => $activityPcruInfos->getMontantTotal(), - 'validePoleCompetivite' => $activityPcruInfos->isValidePoleCompetivite(), - 'poleCompetivite' => $activityPcruInfos->getPoleCompetivite(), - 'commentaires' => $activityPcruInfos->getCommentaires(), - 'pia' => $activityPcruInfos->isPia(), - 'reference' => $activityPcruInfos->getReference(), - 'accordCadre' => $activityPcruInfos->isAccordCadre(), - 'cifre' => $activityPcruInfos->getCifre(), - 'chaireIndustrielle' => $activityPcruInfos->getChaireIndustrielle(), - 'presencepartenaireindustriel' => $activityPcruInfos->isPresencePartenaireIndustriel(), - ]; - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Formatter/PCRU/ActivityToPCRUFormatter.php b/module/Oscar/src/Oscar/Formatter/PCRU/ActivityToPCRUFormatter.php deleted file mode 100644 index 773be3acf2aaedea77ea9bbc540f4856591577d5..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Formatter/PCRU/ActivityToPCRUFormatter.php +++ /dev/null @@ -1,47 +0,0 @@ -getLabel(), 1000); - - $output['CodeUniteLabintel'] = ''; - $output['SigleUnite'] = ''; - - $output['NumContratTutelleGestionnaire'] = $activity->getOscarNum(); - $output['TypeContrat'] = ''; // TODO Type de contrat PCRU - $output['Acronyme'] = StringUtils::truncate($activity->getAcronym(), 50); - - $output['ContratsAssocies'] = ''; // TODO Identifiants des tutelles de gestion - $output['ResponsableScientifique'] = ''; // TODO Identifiants des tutelles de gestion - $output['EmployeurResponsableScientifique'] = ''; // TODO - $output['CoordinateurConsortium'] = ''; // TODO - $output['Partenaires'] = ''; // TODO - $output['PartenairePrincipal'] = ''; // TODO - $output['IdPartenairePrincipal'] = ''; // TODO - $output['SourceFinancement'] = ''; // TODO - - $output['LieuExecution'] = ''; // TODO - - $output['DateDerniereSignature'] = ''; // TODO - - // Temps - $output['Duree'] = ''; // TODO - $output['DateDebut'] = ''; // TODO - $output['DateFin'] = ''; // TODO - - // Tunasse - $output['MontantPercuUnite'] = ''; // TODO - $output['CoutTotalEtude'] = ''; // TODO - - return $output; - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Hydrator/ActivityInfosPCRUFormHydrator.php b/module/Oscar/src/Oscar/Hydrator/ActivityInfosPCRUFormHydrator.php deleted file mode 100644 index a16bda370ec2f952af00aafd99619cbd67fad702..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Hydrator/ActivityInfosPCRUFormHydrator.php +++ /dev/null @@ -1,127 +0,0 @@ - - * @copyright Certic (c) 2021 - */ - -namespace Oscar\Hydrator; - - -use Oscar\Entity\ActivityPcruInfos; -use Oscar\Service\ProjectGrantService; -use Laminas\Hydrator\HydratorInterface; - -class ActivityInfosPCRUFormHydrator implements HydratorInterface -{ - private $projectGrantService; - - /** - * OrganizationFormHydrator constructor. - */ - public function __construct(ProjectGrantService $projectGrantService) - { - $this->projectGrantService = $projectGrantService; - } - - - /** - * @param array $data - * @param ActivityPcruInfos $object - */ - public function hydrate(array $data, $object) - { - $object->setObjet($data['objet']); - $object->setCodeUniteLabintel($data['codeunitelabintel']); - $object->setSigleUnite($data['sigleunite']); - //$object->setFullName($data['fullname']); - $object->setNumContratTutelleGestionnaire($data['numcontrattutellegestionnaire']); - $object->setReference($data['reference']); - $object->setEquipe($data['equipe']); - - $typeContrat = $this->projectGrantService->getPcruTypeContratRepository()->getPcruTypeContratByLabel( - $data['typecontrat'] - ); - $object->setTypeContrat($typeContrat); - - $object->setAcronyme($data["acronyme"]); - $object->setContratsAssocies($data["contratsassocies"]); - $object->setResponsableScientifique($data["responsablescientifique"]); - $object->setEmployeurResponsableScientifique($data["employeurresponsablescientifique"]); - $object->setCoordinateurConsortium($data["coordinateurconsortium"]); - $object->setPartenaires($data["partenaires"]); - $object->setPartenairePrincipal($data["partenaireprincipal"]); - $object->setIdPartenairePrincipal($data["idpartenaireprincipal"]); - - $sourceFinancement = $this->projectGrantService->getPcruSourceFinancementRepository()->findOneByLabel( - $data['sourcefinancement'] - ); - $object->setSourceFinancement($sourceFinancement); - - $dateSignature = $data["datedernieresignature"] ? new \DateTime($data["datedernieresignature"]) : null; - $object->setDateDerniereSignature($dateSignature); - - $object->setDuree($data["duree"]); - - $dateDebut = $data["datedebut"] ? new \DateTime($data["datedebut"]) : null; - $object->setDateDebut($dateDebut); - - $dateFin = $data["datefin"] ? new \DateTime($data["datefin"]) : null; - $object->setDateDebut($dateFin); - - $object->setMontantPercuUnite(floatval($data["montantpercuunite"])); - $object->setCoutTotalEtude(floatval($data["couttotaletude"])); - $object->setMontantTotal(floatval($data["montanttotal"])); - $object->setValidePoleCompetivite($data["validepolecompetivite"]); - $object->setPoleCompetivite($data["polecompetivite"]); - $object->setCommentaires($data["commentaires"]); - $object->setPia($data["pia"]); - $object->setAccordCadre($data["accordcadre"]); - $object->setCifre($data["cifre"]); - $object->setChaireIndustrielle($data["chaireindustrielle"]); - $object->setPresencePartenaireIndustriel($data["presencepartenaireindustriel"]); - - return $object; - } - - /** - * @param ActivityPcruInfos $object - * @return array - */ - public function extract(object $object): array - { - $datas = [ - 'objet' => $object->getObjet(), - 'codeunitelabintel' => $object->getCodeUniteLabintel(), - 'sigleunite' => $object->getSigleUnite(), - 'numcontrattutellegestionnaire' => $object->getNumContratTutelleGestionnaire(), - 'reference' => $object->getReference(), - 'equipe' => $object->getEquipe(), - "typecontrat" => $object->getTypeContrat() ? $object->getTypeContrat()->getLabel() : "", - "acronyme" => $object->getAcronyme(), - "contratsassocies" => $object->getContratsAssocies(), - "responsablescientifique" => $object->getResponsableScientifique(), - "employeurresponsablescientifique" => $object->getEmployeurResponsableScientifique(), - "coordinateurconsortium" => $object->isCoordinateurConsortium(), - "partenaires" => $object->getPartenaires(), - "partenaireprincipal" => $object->getIdPartenairePrincipal(), - "idpartenaireprincipal" => $object->getIdPartenairePrincipal(), - "sourcefinancement" => $object->getSourceFinancement(), - "datedernieresignature" => $object->getDateDerniereSignatureStr(), - "duree" => $object->getDuree(), - "datedebut" => $object->getDateDebutStr(), - "datefin" => $object->getDateFinStr(), - "montantpercuunite" => $object->getMontantPercuUnite(), - "montanttotal" => $object->getMontantTotal(), - "validepolecompetivite" => $object->isValidePoleCompetivite(), - "polecompetivite" => $object->getPoleCompetivite(), - "commentaires" => $object->getCommentaires(), - "pia" => $object->isPia(), - "accordcadre" => $object->isAccordCadre(), - "cifre" => $object->getCifre(), - "chaireindustrielle" => $object->getChaireIndustrielle(), - "presencepartenaireindustriel" => $object->isPresencePartenaireIndustriel(), - ]; - - return $datas; - } -} diff --git a/module/Oscar/src/Oscar/Hydrator/OrganizationFormHydrator.php b/module/Oscar/src/Oscar/Hydrator/OrganizationFormHydrator.php index 88ec03db0de50e71c0d7c252d3fc9065a5771137..5517602487c6026241383b694ba46aed9f4c9e15 100644 --- a/module/Oscar/src/Oscar/Hydrator/OrganizationFormHydrator.php +++ b/module/Oscar/src/Oscar/Hydrator/OrganizationFormHydrator.php @@ -15,6 +15,7 @@ class OrganizationFormHydrator implements HydratorInterface { private $connectors; private $types; + private $typesEtablissementPcru; private $countries; /** @@ -22,10 +23,11 @@ class OrganizationFormHydrator implements HydratorInterface * @param $connectors * @param $types */ - public function __construct($connectors, $types, $countries) + public function __construct($connectors, $types, $typesEtablissementPcru, $countries) { $this->connectors = $connectors; $this->types = $types; + $this->typesEtablissementPcru = $typesEtablissementPcru; $this->countries = $countries; } @@ -37,8 +39,10 @@ class OrganizationFormHydrator implements HydratorInterface public function hydrate(array $data, $object) { $type = array_key_exists($data['typeObj'], $this->types) ? $this->types[$data['typeObj']] : null; + $typeEtablissementPcru = array_key_exists($data['typeEtablissementPcruObj'], $this->typesEtablissementPcru) ? $this->typesEtablissementPcru[$data['typeEtablissementPcruObj']] : null; $object->setTypeObj($type); + $object->setTypeEtablissementPcruObj($typeEtablissementPcru); $object->setShortName($data['shortName']); $object->setCode($data['code']); $object->setSiret($data['siret']); @@ -92,6 +96,7 @@ class OrganizationFormHydrator implements HydratorInterface 'tvaintra' => $object->getTvaintra(), 'typeObj' => $object->getTypeObj() ? $object->getTypeObj()->getId() : null, + 'typeEtablissementPcruObj' => $object->getTypeEtablissementPcruObj() ? $object->getTypeEtablissementPcruObj()->getId() : null, 'siret' => $object->getSiret(), 'fullname' => $object->getFullName(), 'dateStart' => $object->getDateStart() ? $object->getDateStart()->format('Y-m-d') : '', diff --git a/module/Oscar/src/Oscar/Service/OrganizationService.php b/module/Oscar/src/Oscar/Service/OrganizationService.php index a1b2c02c0239642a4855fe2e71a4eed59db29d7f..29320a7957fcac0878fd1b371586ece1b7014b00 100644 --- a/module/Oscar/src/Oscar/Service/OrganizationService.php +++ b/module/Oscar/src/Oscar/Service/OrganizationService.php @@ -23,6 +23,7 @@ use Oscar\Entity\OrganizationRole; use Oscar\Entity\OrganizationRoleRepository; use Oscar\Entity\OrganizationType; use Oscar\Entity\OrganizationTypeRepository; +use Oscar\Entity\PcruTypeEtablissement; use Oscar\Entity\Person; use Oscar\Entity\ProjectPartner; use Oscar\Entity\Role; @@ -647,6 +648,18 @@ class OrganizationService implements UseOscarConfigurationService, UseEntityMana return $options; } + + public function getOrganizationTypesEtablissementPcruObject() + { + $options = []; + + $types = $this->getEntityManager()->getRepository(PcruTypeEtablissement::class)->findBy([], ['label' => 'ASC']); + foreach ($types as $type) { + $options[$type->getId()] = $type; + } + return $options; + } + public function getOrganizationTypesSelect() { $options = []; diff --git a/module/Oscar/src/Oscar/Service/OscarConfigurationService.php b/module/Oscar/src/Oscar/Service/OscarConfigurationService.php index 71bdb2f08cdd87b275853f1a5063bf89f5efd630..84688fd3b9a3a08bada47662c6f79818770c4a08 100644 --- a/module/Oscar/src/Oscar/Service/OscarConfigurationService.php +++ b/module/Oscar/src/Oscar/Service/OscarConfigurationService.php @@ -653,6 +653,7 @@ class OscarConfigurationService implements ServiceLocatorAwareInterface const PCRU_UNITE_ROLE_DEFAULT = 'Laboratoire'; const PCRU_PARTNER_ROLE_DEFAULT = 'Partenaire'; + const PCRU_PARTENAIRE_PRINCIPAL_ROLE_DEFAULT = 'Partenaire'; const PCRU_INCHARGE_ROLE_DEFAULT = 'Responsable scientifique'; /** @@ -677,6 +678,14 @@ class OscarConfigurationService implements ServiceLocatorAwareInterface return $this->getEditableConfKey('pcru_partner_roles', [self::PCRU_PARTNER_ROLE_DEFAULT]); } + /** + * @return string + */ + public function getPcruPartenairePrincipalRoles(): array + { + return $this->getEditableConfKey('pcru_partenaire_principal_roles', [self::PCRU_PARTENAIRE_PRINCIPAL_ROLE_DEFAULT]); + } + /** * @return string */ @@ -746,133 +755,6 @@ class OscarConfigurationService implements ServiceLocatorAwareInterface return $this->saveEditableConfKey(self::financial_description, $description); } - /** - * Retourne le dossier racine PCRU. - * - * @return string - * @throws OscarException - */ - public function getPcruRootDirectory(): string - { - static $pcru_root = null; - if ($pcru_root === null) { - // Test de la racine PCRU - $path = realpath($this->getConfiguration('pcru.files_path')); - if (!file_exists($path)) { - throw new OscarException( - "Erreur de configuration PCRU : Le dossier de traitement temporaire n'existe pas" - ); - } - if (!is_dir($path)) { - throw new OscarException( - "Erreur de configuration PCRU : Le dossier de traitement temporaire doit être un dossier" - ); - } - if (!is_writable($path)) { - throw new OscarException( - "Erreur de configuration PCRU : Le dossier de traitement doit être accessible en écriture" - ); - } - $pcru_root = $path; - } - return $pcru_root; - } - - /** - * Retourne le dossier où sont archivés les fichiers avant l'envoi PCRU. - * - * @return string - * @throws OscarException - */ - public function getPcruDirectoryForUpload(): string - { - static $pcru_pool = null; - if ($pcru_pool === null) { - // Test de la racine PCRU - $path = $this->getPcruRootDirectory() . DIRECTORY_SEPARATOR . $this->getConfiguration('pcru.pool_current'); - - if (!file_exists($path)) { - if (!@mkdir($path)) { - throw new OscarException("Erreur de configuration PCRU : Impossible de créer le dossier d'envoi"); - } - } - - if (!is_dir($path)) { - throw new OscarException("Erreur de configuration PCRU : Le dossier d'envoi doit être un dossier"); - } - - if (!is_writable($path)) { - throw new OscarException( - "Erreur de configuration PCRU : Le dossier d'envoi doit être accessible en écriture" - ); - } - - $pcru_pool = $path; - } - return $pcru_pool; - } - - public function getPcruDirectoryForUploadEffective(): string - { - return $this->getPcruRootDirectory() - . DIRECTORY_SEPARATOR - . $this->getConfiguration('pcru.pool_effective'); - } - - public function getPcruPoolLockFile(): string - { - return $this->getPcruDirectoryForUpload() - . DIRECTORY_SEPARATOR - . $this->getConfiguration('pcru.pool_lock'); - } - - public function getPcruLogPoolFile(): string - { - return $this->getPcruDirectoryForUpload() - . DIRECTORY_SEPARATOR - . $this->getConfiguration('pcru.pool_log'); - } - - /** - * @param bool $withPath - * @return string - * @throws OscarException - */ - public function getPcruContratFile($withPath = true): string - { - return $withPath ? - $this->getPcruDirectoryForUpload() - . DIRECTORY_SEPARATOR - . $this->getConfiguration('pcru.filename_contrats') - : - $this->getConfiguration('pcru.filename_contrats'); - } - - public function getPcruSendCsvOkFile(): string - { - return $this->getConfiguration('pcru.filename_csv_ok'); - } - - public function getPcruSendPdfOkFile(): string - { - return $this->getConfiguration('pcru.filename_pdf_ok'); - } - - /** - * @param bool $withPath - * @return string - * @throws OscarException - */ - public function getPcruPartenaireFile($withPath = true): string - { - return $withPath ? - $this->getPcruDirectoryForUpload() - . DIRECTORY_SEPARATOR - . $this->getConfiguration('pcru.filename_partenaires') - : - $this->getConfiguration('pcru.filename_partenaires'); - } - /** * Retourne le chemin absolue du stockage des documents sans catégorie/non-privé (Activités de recherche). * diff --git a/module/Oscar/src/Oscar/Service/PCRUService.php b/module/Oscar/src/Oscar/Service/PCRUService.php index 20b81af1a5fc01b3ad798bb4650197e43bad2565..91bc2d46646128bc4350edebfb68a658be234763 100644 --- a/module/Oscar/src/Oscar/Service/PCRUService.php +++ b/module/Oscar/src/Oscar/Service/PCRUService.php @@ -3,22 +3,11 @@ namespace Oscar\Service; - -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; -use Doctrine\ORM\NoResultException; -use Oscar\Entity\Activity; -use Oscar\Entity\ActivityOrganization; -use Oscar\Entity\ActivityPcruInfos; -use Oscar\Entity\ActivityPcruInfosRepository; -use Oscar\Entity\ActivityRepository; -use Oscar\Entity\ContractDocument; -use Oscar\Entity\Organization; use Oscar\Entity\PcruPoleCompetitivite; use Oscar\Entity\PcruSourceFinancement; use Oscar\Entity\PcruTypeContract; +use Oscar\Entity\PcruTypeEtablissement; use Oscar\Exception\OscarException; -use Oscar\Exception\OscarPCRUException; -use Oscar\Factory\ActivityPcruInfoFromActivityFactory; use Oscar\Traits\UseEntityManager; use Oscar\Traits\UseEntityManagerTrait; use Oscar\Traits\UseLoggerService; @@ -27,1066 +16,12 @@ use Oscar\Traits\UseOscarConfigurationService; use Oscar\Traits\UseOscarConfigurationServiceTrait; use Oscar\Traits\UseServiceContainer; use Oscar\Traits\UseServiceContainerTrait; -use Oscar\Utils\PCRUCvsFile; -use Oscar\Validator\PCRUPartnerValidator; -use Oscar\Validator\PCRUUnitValidator; -use Oscar\Validator\PCRUValidator; use PHPUnit\Exception; -use Symfony\Component\Console\Style\SymfonyStyle; class PCRUService implements UseLoggerService, UseOscarConfigurationService, UseEntityManager, UseServiceContainer { use UseEntityManagerTrait, UseOscarConfigurationServiceTrait, UseLoggerServiceTrait, UseServiceContainerTrait; - /// 0. Services et Paramètres - - /** - * @return ProjectGrantService - */ - public function getProjectGrantService() - { - return $this->getServiceContainer()->get(ProjectGrantService::class); - } - - /** - * @return ActivityPcruInfosRepository - */ - public function getActivityPCRUInfoRepository() - { - return $this->getEntityManager()->getRepository(ActivityPcruInfos::class); - } - - - /** - * / Paramètres - * 'files_path' => __DIR__.'/../../tmp', - * 'filename_contrats' => 'contrat.csv', - * 'filename_partenaires' => 'partenaire.csv', - */ - public function getDirectoryForUpload(): string - { - return $this->getOscarConfigurationService()->getPcruDirectoryForUpload(); - } - - /** - * @param bool $withPath - * @return string - * @throws OscarException - */ - public function getContratFile($withPath = true): string - { - return $this->getOscarConfigurationService()->getPcruContratFile($withPath); - } - - /** - * @param bool $withPath - * @return string - * @throws OscarException - */ - public function getPartenaireFile($withPath = true): string - { - return $this->getOscarConfigurationService()->getPcruPartenaireFile($withPath); - } - - public function getParenairesHeaders(): array - { - return [ - "LibelleCourt", - "LibelleLong", - "Siren", - "Siret", - "TvaIntra", - "Duns", - "TypeEtablissement", - "Adresse", - "CodePostal", - "Ville", - "Pays", - ]; - } - - public function getPartenaireData(Organization $organization): array - { - return [ - $organization->getShortName(), - $organization->getFullName(), - "", - $organization->getSiret(), - $organization->getTvaintra(), - $organization->getDuns(), - "1", - $organization->getStreet1(), - $organization->getZipCode(), - $organization->getCity(), - $organization->getCountry() - ]; - } - - public function getOrganizationByCodePCRU($codePcru): ?Organization - { - return $this->getEntityManager()->getRepository(Organization::class)->getOrganizationByCodePCRU($codePcru); - } - - /////////////////////////// Gestion des étapes - /// - const STEP_0_NOTHING_TO_DO = 'STEP_0_NOTHING_TO_DO'; - const STEP_1_CONTRACT_CSV_READY_TO_SEND = 'STEP_1_CONTRACT_CSV_READY_TO_SEND'; - const STEP_2_CONTRACT_CSV_WAIT_PCRU_RESPONSE = 'STEP_2_CONTRACT_CSV_WAIT_PCRU_RESPONSE'; - const STEP_3_CONTRACT_CSV_ERROR_PCRU_RESPONSE = 'STEP_3_CONTRACT_CSV_ERROR_PCRU_RESPONSE'; - const STEP_4_CONTRACT_CSV_OK_PCRU_RESPONSE = 'STEP_4_CONTRACT_CSV_OK_PCRU_RESPONSE'; - const STEP_5_CONTRACT_PDF_READY_TO_SEND = 'STEP_5_CONTRACT_PDF_READY_TO_SEND'; - const STEP_6_CONTRACT_PDF_WAIT_PCRU_RESPONSE = 'STEP_6_CONTRACT_PDF_WAIT_PCRU_RESPONSE'; - - public function getCurrentStep() :string - { - var_dump($this->getDirectoryForUpload()); - die(); - } - - public function process() :void - { - - } - - /// - - /// 1. Récupération des donnèes PCRU - - /** - * @param null $settings - * @return ActivityPcruInfos[] - */ - public function getPcruInfos($settings = null): array - { - return $this->getActivityPCRUInfoRepository()->findAll(); - } - - /** - * Activation de PCRU pour une activité de recherche. - * - * @param Activity $activity - * @param false $json - * @throws OscarException - * @throws \Doctrine\ORM\ORMException - * @throws \Doctrine\ORM\OptimisticLockException - */ - public function activateActivity(Activity $activity, ?ActivityPcruInfos $pcruInfos = null, $json = false): void - { - if (!$this->getOscarConfigurationService()->getPcruEnabled()) { - throw new OscarException("Le module PCR n'est pas activé"); - } - - if ($pcruInfos == null) { - $factory = new ActivityPcruInfoFromActivityFactory( - $this->getOscarConfigurationService(), - $this->getEntityManager() - ); - $pcruInfos = $factory->createNew($activity); - } - - // Contrôle des informations - $pcruValidation = new PCRUValidator($this->getOscarConfigurationService(), $this->getEntityManager()); - $validation = $pcruValidation->validate($pcruInfos); - if (count($pcruValidation->getErrors()) > 0) { - throw new OscarException( - "Impossible d'activer PCRU pour cette activité, des données sont manquantes/erronées" - ); - } - - try { - $pcruInfos->setStatus(ActivityPcruInfos::STATUS_SEND_READY); - $this->getEntityManager()->persist($pcruInfos); - $this->getEntityManager()->flush($pcruInfos); - } catch (UniqueConstraintViolationException $e) { - throw new OscarException("Les donnèes PCRU de cette activité existent déjà"); - } - - if ($this->isPoolOpen()) { - $this->addToPool($pcruInfos); - } - } - - - public function updatePcruInfos(Activity $activity, ?ActivityPcruInfos $pcruInfos = null, $json = false): void - { - if (!$this->getOscarConfigurationService()->getPcruEnabled()) { - throw new OscarException("Le module PCR n'est pas activé"); - } - - if ($pcruInfos == null) { - $factory = new ActivityPcruInfoFromActivityFactory( - $this->getOscarConfigurationService(), - $this->getEntityManager() - ); - $pcruInfos = $factory->createNew($activity); - } - - try { - $pcruInfos->setStatus(ActivityPcruInfos::STATUS_DRAFT); - $pcruValidation = new PCRUValidator($this->getOscarConfigurationService(), $this->getEntityManager()); - $validation = $pcruValidation->validate($pcruInfos); - - $this->getEntityManager()->persist($pcruInfos); - $this->getEntityManager()->flush($pcruInfos); - } catch (UniqueConstraintViolationException $e) { - throw new OscarException("Les donnèes PCRU de cette activité existent déjà"); - } catch (\Exception $e) { - throw new OscarException(sprintf("Une erreur est survenue lors de l'enregistrement des données PCRU : %s", $e->getMessage())); - } - } - - /** - * @return bool - */ - public function isPoolOpen(): bool - { - $lockfile = $this->getOscarConfigurationService()->getPcruPoolLockFile(); - return !file_exists($lockfile); - } - - /** - * Télécharge un aperçu des documents PCRU pour l'activité donnée. - * - * @param Activity $activity - */ - public function downloadOne(Activity $activity): void - { - $num = $activity->getOscarNum(); - - $ziptmp = "/tmp/pcru-preview-zip-$num-" . uniqid() . ".zip"; - $csvtmp = "/tmp/pcru-preview-csv-$num-" . uniqid() . ".csv"; - $pdftmp = "/tmp/pcru-preview-pdf-$num-" . uniqid() . ".pdf"; - $orgtmp = "/tmp/pcru-preview-org-$num-" . uniqid() . ".csv"; - - // Récupération des données - $pcruInfos = $this->getPcruInfosActivity($activity); - - - if (!$pcruInfos) { - $factory = new ActivityPcruInfoFromActivityFactory( - $this->getOscarConfigurationService(), - $this->getEntityManager() - ); - $pcruInfos = $factory->createNew($activity); - } - - $csvFile = new PCRUCvsFile($this); - $csvFile->addEntry($pcruInfos); - $csvFile->writeContratsCsv($csvtmp, $this->getEntityManager()); - $csvFile->writePartenairesCSV($orgtmp); - - file_put_contents($pdftmp, $csvFile->getDocumentSignedFromPcruInfo($pcruInfos)); - - // Création de l'archive - $zip = new \ZipArchive(); - if ($zip->open($ziptmp, \ZipArchive::CREATE) !== true) { - throw new OscarPCRUException("Impossible de créer l'archive"); - } - $zip->addFile($csvtmp, $this->getOscarConfigurationService()->getPcruContratFile(false)); - if (file_exists($orgtmp)) { - $zip->addFile($orgtmp, $this->getOscarConfigurationService()->getPcruPartenaireFile(false)); - } - $zip->addFile($pdftmp, $num . '.pdf'); - $zip->close(); - - header('Content-Description: File Transfer'); - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="oscar-pcru-preview-' . $num . '.zip"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate'); - header('Pragma: public'); - readfile($ziptmp); - - unlink($csvtmp); - unlink($pdftmp); - unlink($ziptmp); - exit; - } - - /** - * Suppression d'un contrat en attente. - * - * @param int $idActivityPcruInfo - * @throws OscarException - * @throws \Doctrine\ORM\ORMException - * @throws \Doctrine\ORM\OptimisticLockException - */ - public function removeWaiting(int $idActivityPcruInfo): void - { - // Récupération du PCRUInfo et vérifier l'état - /** @var ActivityPcruInfos $pcruInfo */ - $pcruInfo = $this->getActivityPCRUInfoRepository()->find($idActivityPcruInfo); - - $this->getLoggerService()->debug("Suppression PCRU (en attente)"); - - if ($pcruInfo == null) { - throw new OscarException("Informations PCRU introuvable (id = $idActivityPcruInfo)"); - } - - if (!$pcruInfo->isWaiting()) { - throw new OscarException( - "Impossible de réinitialiser des informations PCRU qui ne sont pas en attente d'envoi" - ); - } - - // Retirer du CSV - $csvFile = new PCRUCvsFile($this); - $csvFile->readCSV(); - $csvFile->purgeFiles(); - $csvFile->remove($pcruInfo); - $this->getEntityManager()->remove($pcruInfo); - $this->getEntityManager()->flush(); - $csvFile->generateFiles(); - } - - /** - * Ajoute une activité à la file d'attente du prochain envoi PCRU. - * - * @param $activityOrPcruInfos - * @throws OscarException - * @throws \Doctrine\ORM\ORMException - * @throws \Doctrine\ORM\OptimisticLockException - */ - public function addToPool($activityOrPcruInfos): void - { - if ($this->isPoolOpen()) { - $this->logPool("Ajout $activityOrPcruInfos à la pile d'envoi"); - // Récupération des données PCRU - $pcruInfos = null; - if (get_class($activityOrPcruInfos) == ActivityPcruInfos::class) { - $pcruInfos = $activityOrPcruInfos; - } elseif (get_class($activityOrPcruInfos) == Activity::class) { - $pcruInfos = $this->getPcruInfosActivity($activityOrPcruInfos); - } else { - $this->logPool("ERROR : type de données"); - throw new OscarPCRUException( - "Impossible d'ajouter ces donnèes au prochain envoi : Type de données incorrect." - ); - } - - try { - } catch (\Exception $e) { - $this->logPool("ERROR : " . $e->getMessage()); - throw new OscarPCRUException( - sprintf("Impossible de préparer %s pour l'envoi : %s", $pcruInfos, $e->getMessage()) - ); - } - } else { - throw new OscarPCRUException("Un envoi PCRU est déjà en cours"); - } - - if (!$pcruInfos->isSendable()) { - $err = "Les données PCRU pour " . $pcruInfos->getNumContratTutelleGestionnaire( - ) . " ne peuvent pas être envoyées : sont statut est " . $pcruInfos->getStatusStr(); - $this->logPool("ERROR : " . $err); - throw new OscarPCRUException($err); - } - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// Génération des documents - $csvFile = new PCRUCvsFile($this); - $csvFile->readCSV(); - if (!$csvFile->entryExist($pcruInfos)) { - $csvFile->addEntry($pcruInfos); - } - $csvFile->writeContratsCsv(); - $csvFile->writePartenairesCSV(); - $csvFile->writeContratsPDF(); - $pcruInfos->setStatus(ActivityPcruInfos::STATUS_FILE_READY); - $this->getEntityManager()->flush($pcruInfos); - } - - private $_logpool; - - public function logPool(string $message): void - { - if ($this->_logpool == null) { - $this->_logpool = fopen($this->getOscarConfigurationService()->getPcruLogPoolFile(), 'w'); - } - $msg = sprintf("%s \t%s\n", date('Y-m-d h:i:s'), $message); - fwrite($this->_logpool, $msg); - } - - public function __destruct() - { - if ($this->_logpool) { - fclose($this->_logpool); - } - } - - /** - * Retourne les informations PCRU de l'activité. - * - * @param Activity $activity - * @return ActivityPcruInfos|null - */ - public function getPcruInfosActivity(Activity $activity): ?ActivityPcruInfos - { - try { - return $this->getActivityPCRUInfoRepository()->getInfoActivity($activity->getId()); - } catch (NoResultException $e) { - return null; - } - } - - /** - * Retourne les informations PCRU à partir du numéro Oscar. - * - * @param $numOscar - * @return ActivityPcruInfos - */ - public function getInfosByNumOscar($numOscar): ?ActivityPcruInfos - { - return $this->getActivityPCRUInfoRepository()->findOneBy(['numContratTutelleGestionnaire' => $numOscar]); - } - - public function resetTmpPcruInfos(Activity $activity): void - { - $pcruInfos = $this->getPcruInfosActivity($activity); - if ($pcruInfos) { - $this->getEntityManager()->remove($pcruInfos); - $this->getEntityManager()->flush(); - } - } - - public function getContratPath(Activity $activity): string - { - } - - /** - * Retourne le type de document utilisé pour désigner les contrat définitif signé. - * - * @return string - */ - public function getContractSignedType(): string - { - } - - - /** - * Affichage des donnèes PCRU : - * - Si elles existent déjà, les donnèes affichées sont celle enregistrées en base de données. - * - Sinon, des donnèes temporaires sont créées pour l'affichage uniquement. - * - * @param Activity $activity - * @param false $json - * @return array - * @throws OscarException - */ - public function getPreview(Activity $activity, $json = false): array - { - if (!$this->getOscarConfigurationService()->getPcruEnabled()) { - throw new OscarException("Le module PCR n'est pas activé"); - } - - - // Récupération des données - $pcruInfos = $this->getPcruInfosActivity($activity); - $preview = false; - $factory = new ActivityPcruInfoFromActivityFactory( - $this->getOscarConfigurationService(), - $this->getEntityManager() - ); - - if (!$pcruInfos) { - $preview = true; - - $pcruInfos = $factory->createNew($activity); - } - - $headers = $factory->getHeaders(); - $datas = $pcruInfos->toArray($this->getEntityManager()); - - $pcruValidation = new PCRUValidator($this->getOscarConfigurationService(), $this->getEntityManager()); - $validation = $pcruValidation->validate($pcruInfos); - $documentPath = ""; - if( $pcruInfos->getDocumentId() ){ - $documentPath = $this->getDocumentPath($pcruInfos->getDocumentId()); - } - - // Contrôle des organisations - $validatorPartner = new PCRUPartnerValidator(); - foreach ($activity->getOrganizationsWithOneRoleIn($this->getOscarConfigurationService()->getPcruPartnerRoles()) as $partner) { - if( !$validatorPartner->isValid($partner) ){ - $msg = implode(',', $validatorPartner->getMessages()); - $pcruInfos->addError(sprintf($msg, $partner)); - } - } - - $validatorUnit = new PCRUUnitValidator(); - $unitValid = false; - - foreach ($activity->getOrganizationsWithOneRoleIn($this->getOscarConfigurationService()->getPcruUnitRoles()) as $partner) { - if( !$validatorUnit->isValid($partner) ){ - $msg = implode(',', $validatorUnit->getMessages()); - $pcruInfos->addWarning(sprintf($msg, $partner)); - } else { - echo "OK"; - $unitValid = true; - } - } - if( $unitValid === false ){ - $pcruInfos->addError("Aucune unité valide"); - } - - return [ - 'validations' => $validation, - 'headers' => $headers, - 'datas' => $datas, - 'activity' => $json ? $activity->toArray() : $activity, - 'documentPath' => $documentPath, - 'infos' => $pcruInfos, - 'errors' => $pcruInfos->getError(), - 'warnings' => $pcruInfos->getWarnings(), - 'status' => $pcruInfos->getStatus(), - 'preview' => $preview - ]; - } - - public function getDocumentPath($documentId): string - { - $baseLocation = $this->getOscarConfigurationService()->getDocumentDropLocation(); - /** @var ContractDocument $document */ - $document = $this->getEntityManager()->getRepository(ContractDocument::class)->find($documentId); - return $baseLocation . $document->getPath(); - } - - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - private $pcruDepotStrategy; - - public function generateFileContentForActivity($numOscar, $withHeader = false) - { - // Récupération de l'activité - /** @var ActivityRepository $activityRepository */ - $activityRepository = $this->getEntityManager()->getRepository(Activity::class); - - $activity = $activityRepository->getActivityByNumOscar($numOscar, true); - - $infos = $this->getDataFactory()->createNew($activity); - - $buffer = tmpfile(); - $tmpfile_path = stream_get_meta_data($buffer)['uri']; - - if ($withHeader == true) { - fputcsv($buffer, array_keys($this->getDataFactory()->getHeaders()), ';'); - } - - fputcsv($buffer, $infos->toArray($this->getEntityManager()), ";"); - - $content = file_get_contents($tmpfile_path); - - fclose($buffer); - - return $content; - } - - /** - * Récupération des partenaires éligibles PCRU. - * - * @param Activity $activity - * @return array - */ - public function getActivityPartenaires(Activity $activity): array - { - $out = []; - $out[""] = "Aucun"; - /** @var ActivityOrganization $org */ - foreach ($activity->getOrganizationsDeep() as $org) { - if ($org->getOrganization()->getCodePcru()) { - $out[$org->getOrganization()->getCodePcru()] = $org->getOrganization()->__toString(); - } - } - - return $out; - } - - /** - * Récupération des partenaires éligibles PCRU. - * - * @param Activity $activity - * @return array - */ - public function getResponsableScientifiques(Activity $activity): array - { - $roleStr = $this->getOscarConfigurationService()->getPcruInChargeRole(); - $out = []; - /** @var ActivityPerson $per */ - foreach ($activity->getPersonsDeep() as $per) { - if ($per->getRoleObj()->getRoleId() == $roleStr) { - $out[$per->getPerson()->getFullname()] = $per->getPerson()->getFullname(); - } - } - - return $out; - } - - /** - * @return ActivityPcruInfoFromActivityFactory - */ - protected function getDataFactory() - { - static $factory; - if ($factory === null) { - $factory = new ActivityPcruInfoFromActivityFactory( - $this->getOscarConfigurationService(), - $this->getEntityManager() - ); - } - return $factory; - } - - public function getHeaders(){ - return $this->getDataFactory()->getHeaders(); - } - - protected function getPCRUDepotStrategy() - { - if ($this->pcruDepotStrategy === null) { - // Récupération de la configuration PCRU dans la configuration Oscar - } - } - - protected function getConfiguration() - { - return $this->getOscarConfigurationService()->getPcruFtpInfos(); - } - - /** - * Connexion au serveur FTP PCRU. - * - * @return false|resource - * @throws OscarPCRUException - */ - public function getFtpAccess() - { - static $conn; - if ($conn == null) { - // Configuration FTP - $config = $this->getConfiguration(); - $this->log("FTP access to '" . $config['host'].":".$config['port']."'"); - $this->logPool("Connexion '".$config['host'].":".$config['port']."'"); - $conn = ssh2_connect($config['host'], $config['port']); - if ($conn == null) { - $err = error_get_last()['message']; - $this->logPool("Erreur : '". $err . "'"); - $this->error("Can't connect to '".$config['host']."') : $err"); - throw new \Exception("Impossible de se connecter au serveur FTP"); - } else { - $this->log("FTP access OK"); - $this->logPool("Success"); - } - } - - return $conn; - } - - /** - * Authentification au serveur FTP PCRU. - * - * @return false|resource - * @throws OscarPCRUException - */ - public function ftpConnect() - { - $config = $this->getConfiguration(); - $conn = $this->getFtpAccess(); - $this->log("FTP Authentification with '".$config['user']."'"); - $this->logPool("FTP Authentification '".$config['user']."' / '".$config['pass']."'"); - if (!ssh2_auth_password($conn, $config['user'], $config['pass'])) { - $err = error_get_last(); - $this->logPool("Error : '$err'"); - $this->error("Authentification fail : '$err'" ); - throw new OscarException("Echec de l'authentification"); - } else { - $this->log("FTP Authentification OK"); - $this->logPool("Authentification OK"); - } - return $conn; - } - - /** - * Retourne la liste des fichiers "en attente". - * - * @param bool $ignoreLogFile - * @return array - * @throws OscarException - */ - public function getUploadableFiles($ignoreLogFile = true) - { - $files = []; - $path = $this->getOscarConfigurationService()->getPcruDirectoryForUpload(); - - if ($handle = opendir($path)) { - while (false !== ($entry = readdir($handle))) { - if ($entry == '.' || $entry == '..') { - continue; - } - if ($entry == basename($this->getOscarConfigurationService()->getPcruLogPoolFile())) { - continue; - } - $filepath = $path . DIRECTORY_SEPARATOR . $entry; - if (!is_dir($filepath)) { - $files[] = [ - 'path' => $filepath, - 'name' => $entry - ]; - } - } - closedir($handle); - } - return $files; - } - - /** - * Retourne TRUE si des données en attente sont disponibles. - * - * @return bool - * @throws OscarException - */ - public function hasDownload() - { - return file_exists($this->getOscarConfigurationService()->getPcruContratFile()); - } - - /** - * Retourne TRUE si des données envoyées sont en attente d'un retour. - * - * @return bool - */ - public function hasUploadInProgress() - { - $path = $this->getOscarConfigurationService()->getPcruDirectoryForUploadEffective(); - return file_exists($path); - } - - protected function sftp_put_file($sftp_ressource, $file) :void - { - var_dump(is_readable($file)); - $filename = basename($file); - $data = file_get_contents($file); - $this->sftp_put_file_data($sftp_ressource, $filename, $data); - } - - protected function sftp_put_file_data($sftp_ressource, string $filename, string $data ) :void - { - $writer = fopen('ssh2.sftp://' . intval($sftp_ressource) . '/Echanges/' . $filename, 'w'); - if( fwrite($writer, $data) ){ - $this->logPool(" - OK write '$filename'"); - } else { - $errors = error_get_last(); - $err = 'Erreur inconnue'; - if( is_array($errors) ){ - $err = $errors['message']; - } - $this->logPool(" - ERROR write '$filename' : $err with '$data'"); - throw new \Exception($err); - } - fclose($writer); - } - - /** - * Chargement du fichier distant. - * - * @param $sftp_ressource - * @param $filename - * @return string - * @throws \Exception - */ - protected function sftp_get_file($sftp_ressource, $filename) :string - { - $fileURI = 'ssh2.sftp://' . intval($sftp_ressource) . '/Echanges/' . $filename; - $this->log("GET FILE '$filename' ($fileURI)"); - $reader = @fopen($fileURI, 'r'); - if( !$reader ){ - $this->log("File not found"); - throw new \Exception("Can't open '$filename'"); - } - if( ($content = fread($reader, filesize($fileURI))) ){ - return $content; - } else { - $errors = error_get_last(); - $err = 'Erreur inconnue'; - if( is_array($errors) ){ - $err = $errors['message']; - } - $this->error("ERROR FILE READ : '$err'"); - throw new \Exception($err); - } - fclose($reader); - return ""; - } - - protected function sftp_remove_file($sftp_ressource, $filename) :string - { - $fileURI = 'ssh2.sftp://' . intval($sftp_ressource) . '/Echanges/' . $filename; - $this->log("REMOVE FILE '$filename' ($fileURI)"); - if( unlink($fileURI) ){ - $this->log("REMOVE OK"); - return ""; - } else { - $this->error("REMOVE FAIL"); - } - return ""; - } - - const PCRU_ERRORS_JSON_FILE = 'DEPOT-CSV.ERRORS.json'; - - - public function checkLocalErrors() :void - { - $localErrors = $this->getActivityPCRUInfoRepository()->getPcruInfoActivityInError(); - /** @var ActivityPcruInfos $info */ - foreach ($localErrors as $info){ - echo " - " . $info->getStatus() . "\n"; - } - die(); - } - - /** - * Contrôle la présence d'un fichier d'erreur, le traite avant de le supprimer. - * - * @param $ftp_ressource - * @return void - * @throws \Doctrine\ORM\ORMException - * @throws \Doctrine\ORM\OptimisticLockException - */ - public function checkRemoteErrors($ftp_ressource) :void - { - $this->log("Check for remote errors..."); - try { - $content_get = $this->sftp_get_file($ftp_ressource, self::PCRU_ERRORS_JSON_FILE); - } catch (\Exception $e) { - throw new \Exception("NO_ERROR"); - } - - $this->log("Remote error result found..."); - // Patch caractère vide - $pos = strpos($content_get, ''); - if( $pos === 0 ){ - $this->log("ZWNBSP patch apply"); - $content_get = substr($content_get, 3); - } - - $json_errors = json_decode($content_get); - if( $json_errors === null ){ - $err = json_last_error_msg(); - $this->error("PARSE JSON FAIL : $err"); - throw new \Exception("JSON ERROR '$err' dans '$content_get'"); - } else { - foreach($json_errors->contratsWithErrors as $error){ - $activityOscarId = $error->id; - $errors = implode(', ', $error->errors ); - $this->log("Activity mark as error '$activityOscarId' : '$errors'"); - $pcruinfos = $this->getActivityPCRUInfoRepository()->getPcruInfoActivityFromOscarId($activityOscarId); - $pcruinfos->setErrorsRemote($errors) - ->setStatus(ActivityPcruInfos::STATUS_ERROR_DATA); - $this->getEntityManager()->flush(); - } - } - $this->sftp_remove_file($ftp_ressource,self::PCRU_ERRORS_JSON_FILE); - $this->sftp_remove_file($ftp_ressource,$this->getOscarConfigurationService()->getPcruContratFile()); - $this->sftp_remove_file($ftp_ressource,$this->getOscarConfigurationService()->getPcruPartenaireFile()); - - throw new \Exception("JSON ERROR"); - } - - public function upload(): array - { - $output = [ - "message" => "", - "errors" => [], - "logs" => [], - ]; - - $pcruActivities = $this->getActivityPCRUInfoRepository()->getPcruInfoActivityUnDone(); - - if( count($pcruActivities) == 0 ){ - $output['message'] = "Rien à faire"; - return $output; - } - - $status_global = null; - /** @var ActivityPcruInfos $pcruInfoActivity */ - foreach ($pcruActivities as $pcruInfoActivity) { - if( $status_global != null ) continue; - if( $pcruInfoActivity->getStatus() === ActivityPcruInfos::STATUS_ERROR_DATA ){ - $output['message'] = "Il y'a des erreurs dans le dernier envoi, merci de les corriger"; - return $output; - } - if( $pcruInfoActivity->getStatus() === ActivityPcruInfos::STATUS_SEND_PENDING ){ - $status_global = ActivityPcruInfos::STATUS_SEND_PENDING; - } - } - - $co = $this->ftpConnect(); - $sftp = ssh2_sftp($co); - - switch($status_global){ - case ActivityPcruInfos::STATUS_SEND_PENDING; - // TRAITEMENT du RETOUR - try { - $this->checkRemoteErrors($sftp); - } catch (\Exception $e) { - if( $e->getMessage() != 'NO_ERROR' ){ - die("Il y'a des erreurs"); - } - else { - - } - } - - } - - return $output; - - - die(); - - if ($this->hasUploadInProgress()) { - throw new OscarPCRUException("Une soumission PCRU est déjà en attente de traitement."); - } - - $files = $this->getUploadableFiles(true); - - if (count($files) <= 1) { - throw new OscarPCRUException("Aucune donnèes PCRU en attente."); - } - - $remotePath = 'Echanges'; - - // Lecture du fichier CSV pour tagguer les Informations PCRU à traiter - $infos = []; - $contractFile = $this->getOscarConfigurationService()->getPcruContratFile(); - if (!file_exists($contractFile)) { - throw new OscarPCRUException("Erreur PCRU : Les fichiers des contrats sont absents."); - } - - $first = true; - if (($handle = fopen($contractFile, "r")) !== false) { - while (($data = fgetcsv($handle, 1000, ";")) !== false) { - if ($first) { - $first = false; - continue; - } - $num = $data[3]; - $info = $this->getInfosByNumOscar($data[3]); - if ($info->getStatus() == ActivityPcruInfos::STATUS_FILE_READY) { - $info->setStatus(ActivityPcruInfos::STATUS_SEND_PENDING); - $this->getEntityManager()->flush($info); - $pdf = "$num.pdf"; - $infos[$pdf] = $info; - } else { - $err = "Erreur PCRU : Le contrat " . $data[3] . " n'a pas le bon statut..."; - $this->logPool($err); - $this->getLoggerService()->throwAdvancedLoggedError($err, ""); - throw new OscarException($err); - } - } - fclose($handle); - } - - $local_file = '/tmp/PCRU_MARKER.tmp'; - $remote_file = $remotePath . DIRECTORY_SEPARATOR . 'RETOUR-PCRU.OK'; - $pcruResponseFile = $remotePath . DIRECTORY_SEPARATOR . 'CONTRACT-PCRU.csv'; - - ////////////////////////////////////////// ETAPE 1 - $this->logPool("Envoi ETAPE 1 (Fichiers de base)"); - - $fileContractLocal = $this->getOscarConfigurationService()->getPcruContratFile(true); - //$filePartners = $this->getOscarConfigurationService()->getPcruPartenaireFile(true); - - $this->sftp_put_file($sftp, $fileContractLocal); - //$this->sftp_put_file($sftp, $filePartners); - - // création du marqueur - $this->sftp_put_file_data($sftp, $this->getOscarConfigurationService()->getPcruSendCsvOkFile(), "done"); - - - } - - /** - * Génère les donnèes PCRU à partir de l'activité - */ - public function generatePcruInfo(Activity $activity, $auto = false) - { - return ActivityPcruInfoFromActivityFactory::createNew($activity); - } - - /** - * Lecture du fichier PCRU - * @param $path - * @return PCRUCvsFile - * @throws OscarException - */ - public function readPcruCSV($path) - { - $pcruCsv = PCRUCvsFile::create($this)->setPath($path)->read(); - return $pcruCsv; - } - - /** - * Génération d'un fichier PCRU friendly pour l'envois des informations contractuel - * via FTP. - */ - public function generatePcruFiles($path = null, ?SymfonyStyle $io = null): PCRUCvsFile - { - // TODO Tester si des fichiers sont déjà en cours d'envoi 'CONTRAT.OK' - - $path == null ? $this->getOscarConfigurationService()->getPcruDirectoryForUpload() : $path; - $pcruFiles = PCRUCvsFile::create($this); - $pcruFiles->generateFiles(); - - return $pcruFiles; - } - - public function allReadyToGo() - { - } - - /** - * Téléchargement d'une archive ZIP avec les fichiers en attente d'envoi. - * - * @throws OscarException - */ - public function downloadPCRUSendableFile() - { - $files = $this->getUploadableFiles(false); - - $filename = "oscar-pcru-" . date('Ymd_His') . '.zip'; - $tmpfile = '/tmp/' . uniqid() . $filename; - $zip = new \ZipArchive(); - if ($zip->open($tmpfile, \ZipArchive::CREATE) !== true) { - throw new OscarException("Impossible de créer l'archive"); - } - - foreach ($files as $info) { - $zip->addFile($info['path'], $info['name']); - } - - $zip->close(); - - header('Content-Description: File Transfer'); - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="' . $filename . '"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate'); - header('Pragma: public'); - readfile($tmpfile); - exit; - } - - /** - * Retourne la liste des activités dont les données PCRU sont éligibles - * @return ActivityPcruInfos[] - */ - public function getActivitiesAvailable() - { - $pcruInfos = $this->getEntityManager()->getRepository(ActivityPcruInfos::class)->findAll(); - return $pcruInfos; - } - /////////////////////////////////////////////////////////////////////////////// /// /// MISE à JOUR des REFERENCIELS @@ -1192,6 +127,40 @@ class PCRUService implements UseLoggerService, UseOscarConfigurationService, Use return true; } + + public function updatePcruTypesEtablissement() + { + // Récupération du référenciel + $fichier = $this->getOscarConfigurationService()->getConfiguration('pcru.typesetablissement'); + if (!file_exists($fichier)) { + throw new OscarException( + "Le référenciel des types d'établissement n'est pas disponible (fichier '$fichier' inaccessible )." + ); + } + $types = json_decode(file_get_contents($fichier)); + + // Récupération des types d'établissement présents en BDD + $typesEtablissement = $this->getEntityManager()->getRepository(PcruTypeEtablissement::class)->findAll(); + $exist = []; + /** @var PcruTypeEtablissement $t */ + foreach ($typesEtablissement as $t) { + $exist[] = $t->getLabel(); + } + + // Comparaison + foreach ($types as $type) { + if (!in_array($type, $exist)) { + // Création du type manquant + $nouveauTypeEtablissement = new PcruTypeEtablissement(); + $this->getEntityManager()->persist($nouveauTypeEtablissement); + $nouveauTypeEtablissement->setLabel($type); + $this->getEntityManager()->flush($nouveauTypeEtablissement); + } + } + + return true; + } + protected function log( string $msg ): void { $this->getLoggerService()->info(sprintf('[process pcru - info] %s', $msg), []); diff --git a/module/Oscar/src/Oscar/Service/PcruFtpService.php b/module/Oscar/src/Oscar/Service/PcruFtpService.php new file mode 100644 index 0000000000000000000000000000000000000000..128f4c48a8b3678a48f8ac6bdc52b1e676afc502 --- /dev/null +++ b/module/Oscar/src/Oscar/Service/PcruFtpService.php @@ -0,0 +1,1256 @@ +pcruInformationsService; + } + + /** + * @param PcruInformationsService $pcruInformationsService + */ + public function setPcruInformationsService(PcruInformationsService $pcruInformationsService): void + { + $this->pcruInformationsService = $pcruInformationsService; + } + + public function processPcruFtp() + { + $logs = array(); + + try { + + $repertoireDistant = $this->getOscarConfigurationService()->getConfiguration('pcru.repertoire_sftp'); + $nomFichierContrats = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_contrats'); + $nomFichierContratsDeposesOK = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_csv_ok'); + $nomFichierRetourPcruOK = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_retour_pcru_ok'); + $nomFichierRetourPcruOKCsv = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_retour_pcru_ok_csv'); + $nomFichierDocumentsContratsPDFDeposesOK = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_pdf_ok'); + $nomFichierPartenaires = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_partenaires'); + $nomFichierPartenairesDeposesOK = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_csv_partenaire_ok'); + $nomFichierRetourPcruErreurs = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_errors'); + + $pcru_host = trim($this->getOscarConfigurationService()->getEditableConfKey('pcru_host')); + if (mb_strlen($pcru_host) == 0) { + $logs[] = $this->error('Configuration manquante : PCRU > Accès FTP > Hôte (clé pcru_host)'); + $e = new OscarPCRUException('Configuration manquante : PCRU > Accès FTP > Hôte (clé pcru_host)'); + $e->details = $logs; + throw $e; + } + $pcru_port = trim($this->getOscarConfigurationService()->getEditableConfKey('pcru_port')); + if (mb_strlen($pcru_port) == 0) { + $logs[] = $this->error('Configuration manquante : PCRU > Accès FTP > Port (clé pcru_port)'); + $e = new OscarPCRUException('Configuration manquante : PCRU > Accès FTP > Port (clé pcru_port)'); + $e->details = $logs; + throw $e; + } + $pcru_user = trim($this->getOscarConfigurationService()->getEditableConfKey('pcru_user')); + if (mb_strlen($pcru_user) == 0) { + $logs[] = $this->error('Configuration manquante : PCRU > Accès FTP > Identifiant (clé pcru_user)'); + $e = new OscarPCRUException('Configuration manquante : PCRU > Accès FTP > Identifiant (clé pcru_user)'); + $e->details = $logs; + throw $e; + } + $pcru_pass = trim($this->getOscarConfigurationService()->getEditableConfKey('pcru_pass')); + $has_pcru_pass = mb_strlen($pcru_pass) > 0; + + $pcru_ssh_private = trim($this->getOscarConfigurationService()->getEditableConfKey('pcru_ssh_private')); + $has_pcru_ssh_private = mb_strlen($pcru_ssh_private) > 0; + + $pcru_ssh_public = trim($this->getOscarConfigurationService()->getEditableConfKey('pcru_ssh_public')); + $has_pcru_ssh_public = mb_strlen($pcru_ssh_public) > 0; + + if ($has_pcru_ssh_private && !$has_pcru_ssh_public) { + $logs[] = $this->error('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé publique SSH (clé pcru_ssh_public). Si le nom de la clé privée est renseigné alors le nom de la clé publique doit l\'être aussi.'); + $e = new OscarPCRUException('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé publique SSH (clé pcru_ssh_public). Si le nom de la clé privée est renseigné alors le nom de la clé publique doit l\'être aussi.'); + $e->details = $logs; + throw $e; + } + if (!$has_pcru_ssh_private && $has_pcru_ssh_public) { + $logs[] = $this->error('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé privée SSH (clé pcru_ssh_private). Si le nom de la clé publique est renseigné alors le nom de la clé privée doit l\'être aussi.'); + $e = new OscarPCRUException('Configuration manquante : PCRU > Accès FTP > Nom du fichier contenant la clé privée SSH (clé pcru_ssh_private). Si le nom de la clé publique est renseigné alors le nom de la clé privée doit l\'être aussi.'); + $e->details = $logs; + throw $e; + } + if (!$has_pcru_ssh_private && !$has_pcru_pass) { + $logs[] = $this->error('Configuration manquante : PCRU > Accès FTP > Mot de passe (clé pcru_pass). Un mode d\'authentification doit être configuré : mot de passe utilisateur et/ou clé public/privée.'); + $e = new OscarPCRUException('Configuration manquante : PCRU > Accès FTP > Mot de passe (clé pcru_pass). Un mode d\'authentification doit être configuré : mot de passe utilisateur et/ou clé public/privée.'); + $e->details = $logs; + throw $e; + } + + $pcru_ssh_private_pass = trim($this->getOscarConfigurationService()->getEditableConfKey('pcru_ssh_private_pass')); + + $autoload_dir = realpath(__DIR__.'/../../../../../config/autoload/'); + $ssh_private_key_file_path = $autoload_dir.'/' . $pcru_ssh_private; + if ($has_pcru_ssh_private){ + if (!file_exists($ssh_private_key_file_path)) { + $logs[] = $this->error("Le fichier config/autoload/$pcru_ssh_private sensé contenir la clé privée SSH n'existe pas."); + $e = new OscarPCRUException("Le fichier config/autoload/$pcru_ssh_private sensé contenir la clé privée SSH n'existe pas."); + $e->details = $logs; + throw $e; + } else if (!is_readable($ssh_private_key_file_path)) { + $logs[] = $this->error("Le fichier config/autoload/$pcru_ssh_private contenant la clé privée SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + $e = new OscarPCRUException("Le fichier config/autoload/$pcru_ssh_private contenant la clé privée SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + $e->details = $logs; + throw $e; + } + } + + $ssh_public_key_file_path = $autoload_dir.'/' . $pcru_ssh_public; + if ($has_pcru_ssh_public){ + if (!file_exists($ssh_public_key_file_path)) { + $logs[] = $this->error("Le fichier config/autoload/$pcru_ssh_public sensé contenir la clé publique SSH n'existe pas."); + $e = new OscarPCRUException("Le fichier config/autoload/$pcru_ssh_public sensé contenir la clé publique SSH n'existe pas."); + $e->details = $logs; + throw $e; + } else if (!is_readable($ssh_public_key_file_path)) { + $logs[] = $this->error("Le fichier config/autoload/$pcru_ssh_public contenant la clé publique SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + $e = new OscarPCRUException("Le fichier config/autoload/$pcru_ssh_public contenant la clé publique SSH n'est pas accessible en lecture à l'utilisateur exécutant la commande de check:config."); + $e->details = $logs; + throw $e; + } + } + + // Après avoir vérifié les clés de configuration, on regarde si le serveur SFTP est joignable. + $conn = ssh2_connect($pcru_host, $pcru_port); + if (!$conn) { + $logs[] = $this->error("Impossible de se connecter au serveur SFTP PCRU : hôte non joignable. Hôte : $pcru_host, Port : $pcru_port"); + $e = new OscarPCRUException("Impossible de se connecter au serveur SFTP PCRU : hôte non joignable. Hôte : $pcru_host, Port : $pcru_port"); + $e->details = $logs; + throw $e; + } + $logs[] = $this->log("Le serveur est joignable"); + + // Connexion en utilisant une clé SSH + if ($has_pcru_ssh_private) { + $logs[] = $this->log("Tentative d'identification par clé SSH, utilisateur : '$pcru_user'"); + if (!@ssh2_auth_pubkey_file($conn, $pcru_user, + $ssh_public_key_file_path, + $ssh_private_key_file_path, $pcru_ssh_private_pass)) { + + if (!$has_pcru_pass) { + // Si la connexion échoue, et qu'on n'a pas de mot de passe utilisateur, on arrête là + $logs[] = $this->error("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvaise clé SSH (privée, publique, ou mauvais mot de passe de la clé) ? Mot de passe utilisateur manquant ?"); + $e = new OscarPCRUException("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvaise clé SSH (privée, publique, ou mauvais mot de passe de la clé) ? Mot de passe utilisateur manquant ?"); + $e->details = $logs; + ssh2_disconnect($conn); + throw $e; + } + // Car sinon, même si la connexion avec clé a échoué c'est peut-être simplement parcequ'il s'agit d'une connexion clé + mot de passe utilisateur, auquel cas la connexion devrait réussir lors de la prochaine étape, ssh2_auth_password + // Voir ce commentaire : https://www.php.net/manual/en/function.ssh2-auth-pubkey-file.php#126939 + } + } + + if ($has_pcru_pass) { + $logs[] = $this->log("Tentative d'identification par mot de passe, utilisateur : '$pcru_user'"); + if (!ssh2_auth_password($conn, $pcru_user, $pcru_pass)) { + $logs[] = $this->error("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvais utilisateur ou mot de passe ?"); + $e = new OscarPCRUException("Échec de l'identification au serveur SFTP PCRU : User : $pcru_user. Mauvais utilisateur ou mot de passe ?"); + $e->details = $logs; + ssh2_disconnect($conn); + throw $e; + } + } + + $logs[] = $this->log("Identification SFTP réussie"); + + $logs[] = $this->log("Initialisation du sous-système SFTP"); + $sftp = ssh2_sftp($conn); + if (!$sftp) { + $logs[] = $this->error("Échec de l'initialisation du sous-système SFTP"); + $e = new OscarPCRUException("Échec de l'initialisation du sous-système SFTP"); + $e->details = $logs; + ssh2_disconnect($conn); + throw $e; + } + $logs[] = $this->log("Initialisation du sous-système SFTP réussie"); + + + + + $logs[] = $this->log("Ouverture du répertoire " . $repertoireDistant . " sur le serveur SFTP"); + + $dir = 'ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/'; + $files = array(); + $handle = opendir($dir); + if (!$handle) { + $logs[] = $this->error("Impossible d'ouvrir le répertoire " . $repertoireDistant . " sur le serveur SFTP."); + $e = new OscarPCRUException("Impossible d'ouvrir le répertoire " . $repertoireDistant . " sur le serveur SFTP."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + $logs[] = $this->log("Ouverture du répertoire " . $repertoireDistant . " réussie"); + + $logs[] = $this->log("Parcours des fichiers du répertoire"); + while (false !== ($file = readdir($handle))) { + if(!is_dir($file)){ + $files[] = $file; + } + } + closedir($handle); + + if (count($files) === 0) { + + $sql = " + select + pcru.id AS activitypcruinformationsId + from + activitypcruinformations pcru + where + pcru.status = ? + "; + $activitesEnAttenteRetourPCRU = $this->getEntityManager()->getConnection() + ->executeQuery($sql, + [ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU], + ["string"])->fetchAllAssociative(); + + if (count($activitesEnAttenteRetourPCRU) !== 0) { + $logs[] = $this->log("Le serveur SFTP PCRU ne contient plus aucun fichier alors que certaines activité sont toujours en attente d'un retour de PCRU. Cela signifie qu'elles ont bien été intégrées."); + + $logs[] = $this->log("Mise à jour du statut des activités envoyées qui étaient en attente de retour PCRU. Elles vont passer du statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . " au statut " .ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + + $now = new \DateTime(); + $nb = $this->getEntityManager()->getConnection()->executeStatement(" + UPDATE + activitypcruinformations + SET + status = ?, + dateretourok = ?, + dateupdated = ? + WHERE status = ?; + ", [ActivityPcruInformations::STATUS_RETOUR_PCRU_OK, $now, $now, ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU], ["string", "datetime", "datetime", "string"]); + if ($nb == 0) { + $logs[] = $this->log("Aucune activitée n'est passée au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + } else if ($nb == 1) { + $logs[] = $this->log("Une activité est passée au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + } else { + $logs[] = $this->log($nb . " activités sont passées au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + } + } + + } else { + + // Il y a des fichier sur le serveur SFTP, voyons ce que c'est + + // On récupère les fichiers que l'on a déposé pour la dernière fois + $sql = " + select + p.fichiersdeposes + from + pcruftplog p + where + p.fichiersdeposes IS NOT NULL + order by id desc limit 1 + "; + $fichiersDeposesLines = $this->getEntityManager()->getConnection() + ->executeQuery($sql)->fetchAllAssociative(); + + $fichiersDeposes = []; + if (count($fichiersDeposesLines) === 1) { + $fichiersDeposes = explode(",", $fichiersDeposesLines[0]['fichiersdeposes']); + } + + foreach ($fichiersDeposes as $fichierDeposé) { + if ($fichierDeposé != $nomFichierContratsDeposesOK && !in_array($fichierDeposé, $files)) { + $logs[] = $this->error("Le serveur SFTP PCRU contient des fichiers, mais il manque l'un de ceux qu'Oscar avait déposé la dernière fois. Vérifiez manuellement le contenu du serveur SFTP."); + $e = new OscarPCRUException("Le serveur SFTP PCRU contient des fichiers, mais il manque l'un de ceux qu'Oscar avait déposé la dernière fois. Vérifiez manuellement le contenu du serveur SFTP."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + } + + if (count($fichiersDeposes) == count($files) && in_array($nomFichierContratsDeposesOK, $files)) { + $logs[] = $this->log("Seuls les fichiers que nous avons déposés la dernière fois sont présents sur le serveur FTP. Nous attendons donc toujours un retour de PCRU."); + $logs[] = $this->log("Fin du traitement et fermeture des connexions SFTP"); + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + + $pcruFtpLog = new PcruFtpLog(); + $pcruFtpLog->setStatus("succès"); + $pcruFtpLog->setTitre("Aucun envoi car nous sommes en attente d'un retour PCRU concernant le précédent envoi."); + $pcruFtpLog->setDetails(implode("\r\n", $logs)); + $this->getEntityManager()->persist($pcruFtpLog); + $this->getEntityManager()->flush(); + + return $logs; + } + + if ((count($files) == count($fichiersDeposes) + 1 && in_array($nomFichierRetourPcruOK, $files)) + || (count($files) == count($fichiersDeposes) + 2 && in_array($nomFichierRetourPcruOK, $files) && in_array($nomFichierRetourPcruOKCsv, $files))) { + + $logs[] = $this->log("Le fichier " . $nomFichierRetourPcruOK . " est présent sur le serveur SFTP, ce qui indique un retour OK de la part de PCRU."); + + // Intégration du fichier qui contient la liste les contrats dont il manque le fichier pdf + if (in_array($nomFichierRetourPcruOKCsv, $files)) { + $logs[] = $this->log("Cependant, le fichier " . $nomFichierRetourPcruOKCsv . " est présent sur le serveur SFTP, ce qui indique que certains contrats n'ont pas déposé de fichier PDF."); + + $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierRetourPcruOKCsv, 'r'); + if (!$stream) { + $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierRetourPcruOKCsv . " dans le répertoire " . $repertoireDistant . " en lecture sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierRetourPcruOKCsv . " dans le répertoire " . $repertoireDistant . " en lecture sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $first_line = true; + while (($data = fgetcsv($stream, NULL, ";")) !== FALSE) { + $reference = $data[0]; + if ($first_line) { + // Remove BOM https://stackoverflow.com/questions/39026992/how-do-i-read-a-utf-csv-file-in-php-with-a-bom + $first_line = false; + $reference = preg_replace(sprintf('/^%s/', pack('H*','EFBBBF')), "", $data[0]); + } + $reference = trim($reference); + + if ($reference == "Reference" || mb_strlen($reference) === 0) { + continue; + } + + $logs[] = $this->log("Mise à jour du statut de l'activité dont la référence est " . $reference . " qui était en attente de retour PCRU. Elle va passer du statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . " au statut " .ActivityPcruInformations::STATUS_RETOUR_PCRU_OK_MAIS_FICHIER_MANQUANT); + + + // On cherche l'id correspondant à la référence + $sql = " + select + id, + dateenvoifichiercontrat, + status + from + activitypcruinformations + where + envoinumcontrat = ? + "; + $activitesParReference = $this->getEntityManager()->getConnection() + ->executeQuery($sql, [$reference])->fetchAllAssociative(); + + $id = NULL; + if (count($activitesParReference) === 0) { + $logs[] = $this->error("Aucune activitée (activitypcruinformations) trouvée pour la référence " . $reference); + continue; + } else if (count($activitesParReference) > 1) { + $logs[] = $this->error("Plusieur activités (activitypcruinformations) trouvées pour la référence " . $reference); + continue; + } else { + $id = $activitesParReference[0]['id']; + if ($activitesParReference[0]['dateenvoifichiercontrat'] != NULL) { + $logs[] = $this->error("PCRU indique que le fichier contrat est manquant pour l'activité " . $reference . " alors que nous l'avons bien envoyé. Étrange."); + } + if ($activitesParReference[0]['status'] != ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU) { + $logs[] = $this->error("PCRU indique que le fichier contrat est manquant pour l'activité " . $reference . " alors que nous n'étions pas en attente d'un retour PCRU pour cette activité. Son statut était : " . $activitesParReference[0]['status'] . ". Étrange."); + } + } + + $now = new \DateTime(); + $this->getEntityManager()->getConnection()->executeStatement(" + UPDATE + activitypcruinformations + SET + status = ?, + dateretourokmaiscontratmanquant = ?, + dateupdated = ? + WHERE id = ?; + ", [ActivityPcruInformations::STATUS_RETOUR_PCRU_OK_MAIS_FICHIER_MANQUANT, $now, $now, $id], ["string", "datetime", "datetime", "integer"]); + } + + $r = fclose($stream); + if (!$r) { + $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierRetourPcruOKCsv . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierRetourPcruOKCsv . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + } + + $logs[] = $this->log("Mise à jour du statut des activités envoyées qui étaient en attente de retour PCRU. Elles vont passer du statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . " au statut " .ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + + $now = new \DateTime(); + $nb = $this->getEntityManager()->getConnection()->executeStatement(" + UPDATE + activitypcruinformations + SET + status = ?, + dateretourok = ?, + dateupdated = ? + WHERE status = ?; + ", [ActivityPcruInformations::STATUS_RETOUR_PCRU_OK, $now, $now, ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU], ["string", "datetime", "datetime", "string"]); + if ($nb == 0) { + $logs[] = $this->log("Aucune activitée n'est passée au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + } else if ($nb == 1) { + $logs[] = $this->log("Une activité est passée au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + } else { + $logs[] = $this->log($nb . " activités sont passées au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK); + } + + $logs[] = $this->log("Suppression des fichiers présents sur le serveur sftp."); + + foreach ($fichiersDeposes as $fichierDeposé) { + $this->supprimerFichier($sftp, $conn, $repertoireDistant, $fichierDeposé, $logs); + } + $this->supprimerFichier($sftp, $conn, $repertoireDistant, $nomFichierRetourPcruOK, $logs); + if (in_array($nomFichierRetourPcruOKCsv, $files)) { + $this->supprimerFichier($sftp, $conn, $repertoireDistant, $nomFichierRetourPcruOKCsv, $logs); + } + + } else if (((count($files) == count($fichiersDeposes) + 1 || count($files) == count($fichiersDeposes)) && in_array($nomFichierRetourPcruErreurs, $files))) { + + $logs[] = $this->log("Le fichier " . $nomFichierRetourPcruErreurs . " est présent sur le serveur SFTP, ce qui indique un retour en erreur de la part de PCRU."); + + $contenuFichierErreursBrutAvecBOM = file_get_contents('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierRetourPcruErreurs); + // On enlève le BOM pour pouvoir parser le JSON (sinon json_decode retourne NULL) + $contenuFichierErreursBrut = preg_replace(sprintf('/^%s/', pack('H*','EFBBBF')), "", $contenuFichierErreursBrutAvecBOM); + $contenuFichierErreurs = json_decode($contenuFichierErreursBrut); + if (!$contenuFichierErreurs) { + $logs[] = $this->error("Le fichier de retour d'erreurs PCRU " . $nomFichierRetourPcruErreurs . " ne semble pas être un fichier JSON valide. Pour débloquer la situation, vous pouvez ouvrir le fichier sur le serveur SFTP PCRU et voir ce qu'il contient."); + $e = new OscarPCRUException("Le fichier de retour d'erreurs PCRU " . $nomFichierRetourPcruErreurs . " ne semble pas être un fichier JSON valide."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + if (!property_exists($contenuFichierErreurs, "fileErrors") + || !is_array($contenuFichierErreurs->fileErrors) + || !property_exists($contenuFichierErreurs, "contratsWithErrors") + || !is_array($contenuFichierErreurs->contratsWithErrors)) { + $logs[] = $this->error("La structure du fichier JSON de retour d'erreurs PCRU " . $nomFichierRetourPcruErreurs . " ne correspond pas au format attendu. Pour débloquer la situation, vous pouvez ouvrir le fichier sur le serveur SFTP PCRU et voir ce qu'il contient."); + $e = new OscarPCRUException("La structure du fichier JSON de retour d'erreurs PCRU " . $nomFichierRetourPcruErreurs . " ne correspond pas au format attendu. Pour débloquer la situation, vous pouvez ouvrir le fichier sur le serveur SFTP PCRU et voir ce qu'il contient."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + if (count($contenuFichierErreurs->fileErrors) > 0) { + $logs[] = $this->error("PCRU indique dans le fichier d'erreur que le format du fichier CSV déposé par OSCAR est invalide. Ceci ne devrait pas arriver. Vous pouvez contacter l'équipe d'Oscar en fournissant le contenu du répertoire SFTP (entre autres le(s) fichier(s) CSV déposé(s) ainsi que le fichier JSON d'erreur PCRU)."); + $e = new OscarPCRUException("PCRU indique dans le fichier d'erreur que le format du fichier CSV déposé par OSCAR est invalide. Ceci ne devrait pas arriver. Vous pouvez contacter l'équipe d'Oscar en fournissant le contenu du répertoire SFTP (entre autres le(s) fichier(s) CSV déposé(s) ainsi que le fichier JSON d'erreur PCRU)."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + if (count($contenuFichierErreurs->contratsWithErrors) == 0) { + $logs[] = $this->error("Le fichier JSON de retour d'erreurs PCRU n'indique aucune erreur (ni fileErrors ni contratsWithErrors). Ceci ne devrait pas arriver. Vous pouvez contacter l'équipe d'Oscar en fournissant le contenu du répertoire SFTP (entre autres le(s) fichier(s) CSV déposé(s) ainsi que le fichier JSON d'erreur PCRU)."); + $e = new OscarPCRUException("Le fichier JSON de retour d'erreurs PCRU n'indique aucune erreur (ni fileErrors ni contratsWithErrors). Ceci ne devrait pas arriver. Vous pouvez contacter l'équipe d'Oscar en fournissant le contenu du répertoire SFTP (entre autres le(s) fichier(s) CSV déposé(s) ainsi que le fichier JSON d'erreur PCRU)."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + if (count($contenuFichierErreurs->contratsWithErrors) == 1) { + $logs[] = $this->log("Le fichier indique qu'une activité est en erreur."); + } else { + $logs[] = $this->log("Le fichier indique que " . count($contenuFichierErreurs->contratsWithErrors) . " activités sont en erreur."); + } + + $totalMisAJour = 0; + foreach ($contenuFichierErreurs->contratsWithErrors as $contratEnErreur) { + if (!property_exists($contratEnErreur, "id") + || mb_strlen(trim($contratEnErreur->id)) == 0 + || !property_exists($contratEnErreur, "errors") + || !is_array($contratEnErreur->errors)) { + $logs[] = $this->error("La structure contratsWithErrors du fichier JSON de retour d'erreurs PCRU " . $nomFichierRetourPcruErreurs . " ne correspond pas au format attendu. Pour débloquer la situation, vous pouvez ouvrir le fichier sur le serveur SFTP PCRU et voir ce qu'il contient."); + $e = new OscarPCRUException("La structure contratsWithErrors du fichier JSON de retour d'erreurs PCRU " . $nomFichierRetourPcruErreurs . " ne correspond pas au format attendu. Pour débloquer la situation, vous pouvez ouvrir le fichier sur le serveur SFTP PCRU et voir ce qu'il contient."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("L'activité " . $contratEnErreur->id . " va passer du statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . " au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_ERREURS); + $now = new \DateTime(); + $nb = $this->getEntityManager()->getConnection()->executeStatement(" + UPDATE + activitypcruinformations + SET + status = ?, + erreurs = ?, + dateupdated = ? + WHERE envoinumcontrat = ? + AND status = ?; + ", [ActivityPcruInformations::STATUS_RETOUR_PCRU_ERREURS, implode("\r\n", $contratEnErreur->errors), $now, $contratEnErreur->id, ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU], ["string", "string", "datetime", "string", "string"]); + if ($nb == 1) { + $logs[] = $this->log("Statut mis à jour pour une activité."); + } else if ($nb > 1) { + $logs[] = $this->log($nb . " activités ont eu leur statut mis à jour. Étrange."); + } + $totalMisAJour += $nb; + } + + if ($totalMisAJour == 0) { + $logs[] = $this->log("Aucune activité n'a été mise à jour. Cela signifie sans doute que le fichier d'erreur avait déjà été intégré."); + } + + $logs[] = $this->error("PCRU indique avoir échoué à intégrer automatiquement certaines activité car elle contiennent des erreurs. Pour débloquer la situation, il faut analyser puis corriger chaque activité en erreur (table activitypcruinformations, status = 'retour-pcru-erreurs'). Pour les autres activités déposées lors du dernier dépot (status = 'envoyee-attente-retour-pcru') il faut vérifier sur le site de PCRU qu'elles ont bien été intégrées puis les passer au statut 'retour-pcru-ok'. Consultez la documentation ou le support en cas de doute."); + $e = new OscarPCRUException("PCRU indique avoir échoué à intégrer automatiquement certaines activité car elle contiennent des erreurs. Pour débloquer la situation, il faut analyser puis corriger chaque activité en erreur (table activitypcruinformations, status = 'retour-pcru-erreurs'). Pour les autres activités déposées lors du dernier dépot (status = 'envoyee-attente-retour-pcru') il faut vérifier sur le site de PCRU qu'elles ont bien été intégrées puis les passer au statut 'retour-pcru-ok'. Consultez la documentation ou le support en cas de doute."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + + + } else { + $logs[] = $this->error("Le serveur SFTP PCRU contient des fichiers inconnus. Vérifiez manuellement le contenu du serveur SFTP."); + $e = new OscarPCRUException("Le serveur SFTP PCRU contient des fichiers inconnus. Vérifiez manuellement le contenu du serveur SFTP."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + } + + + $logs[] = $this->log("Le répertoire distant ne contient aucun fichier, Oscar peut déposer les activités en attente"); + + $logs[] = $this->log("Chargement des activités à envoyer : activités ayant activé l'envoi PCRU et n'ayant encore jamais été envoyées"); + + $sql = " + select + a.id as activityid, + pcru.id AS activitypcruinformationsId + from + activitypcruinformations pcru + left join + activity a on a.id = pcru.activity_id + where + pcru.envoiactif is TRUE + AND pcru.status = ? + order by + pcru.dateupdated DESC; + "; + $activitesAEnvoyer = $this->getEntityManager()->getConnection() + ->executeQuery($sql, + [ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE], + ["string"])->fetchAllAssociative(); + + $auMoinsUnFichierPDFAÉtéEnvoyé = false; + $fichiersDeposes = []; + $activitesAEnvoyerValidesNb = 0; + + $creerFichierMarqueurContrats = false; + $partenairesAEnvoyer = []; + $activitesAEnvoyerNb = count($activitesAEnvoyer); + if ($activitesAEnvoyerNb == 0) { + $logs[] = $this->log("Aucune activité en attente d'envoi."); + } else { + + if ($activitesAEnvoyerNb == 1) { + $logs[] = $this->log("Une activité à envoyer"); + } else { + $logs[] = $this->log($activitesAEnvoyerNb . " activités à envoyer"); + } + + $activitesAEnvoyerValides = []; + + foreach ($activitesAEnvoyer as $a) { + + $activity = $this->getEntityManager() + ->getRepository(Activity::class) + ->findOneBy(array('id' => $a['activityid'])); + + $pcruInformationComplete = $this->pcruInformationsService->getPcruInformationsForActivity($activity); + if (!$pcruInformationComplete->enErreur) { + $a['pcruInformation'] = $pcruInformationComplete->pcruInformation; + $a['cheminFichierContrat'] = $pcruInformationComplete->cheminFichierContrat; + $activitesAEnvoyerValides[] = $a; + } + } + + $activitesAEnvoyerValidesNb = count($activitesAEnvoyerValides); + $activitesEnErreurNb = $activitesAEnvoyerNb - $activitesAEnvoyerValidesNb; + if ($activitesEnErreurNb == 0) { + $logs[] = $this->log("Aucune activité n'est en erreur, toutes celles en attente seront envoyées"); + } else if ($activitesEnErreurNb == 1) { + $logs[] = $this->log("Une activité est en erreur et ne sera pas envoyée"); + } else { + $logs[] = $this->log($activitesEnErreurNb . " activités sont en erreur et ne seront pas envoyées"); + } + + if ($activitesAEnvoyerValidesNb == 0) { + $logs[] = $this->log("Aucune activité valide à envoyer"); + } else { + + if ($activitesAEnvoyerValidesNb == 1) { + $logs[] = $this->log("Une activité valide sera envoyée"); + } else { + $logs[] = $this->log($activitesAEnvoyerValidesNb . " activités valides seront envoyées"); + } + + $logs[] = $this->log("Ouverture du fichier " . $nomFichierContrats . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + + $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierContrats, 'w'); + if (!$stream) { + $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierContrats . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierContrats . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("Écriture des en-têtes du fichier CSV"); + + + // Écriture du BOM pour que PCRU comprenne que c'est un fichier encodé en UTF-8 + $r = fwrite($stream, pack("CCC",0xef,0xbb,0xbf)); + if (!$r) { + $logs[] = $this->error("Impossible d'écrire le BOM dans le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'écrire le BOM dans le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $r = fputcsv($stream, ['Objet', 'CodeLabintelUnite', 'CodeRNSRUnite', 'SigleUnite', 'ReferenceGestionnaire', 'Equipe', 'TypeContrat', 'Acronyme', 'ContratsAssocies', 'NomRespScientifique', 'EmployeurRespScientifique', 'RespScientifiqueEstCoordonnateur', 'Partenaires', 'PartenairePrincipal', 'IdPartenairePrincipal', 'SourceFinancement', 'LieuExecution', 'DateDerniereSignature', 'Duree', 'DateDebut', 'DateFin', 'MontantPercuUnite', 'ContributionFinanceur', 'MontantTotal', 'ValideParPoleCompetitivite', 'PoleCompetitivite', 'Commentaires', 'PIA', 'ReferenceNonGestionnaire', 'AccordCadre', 'Cifre', 'ChaireIndustrielle', 'PresencePartenaireIndustriel'], ';'); + if (!$r) { + $logs[] = $this->error("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("Écriture des activités"); + foreach ($activitesAEnvoyerValides as $a) { + $line = []; + $line[] = $a['pcruInformation']->objet; + $line[] = $a['pcruInformation']->labintel; + $line[] = $a['pcruInformation']->rnsr; + $line[] = $a['pcruInformation']->sigle; + $line[] = $a['pcruInformation']->numContrat; + $line[] = $a['pcruInformation']->equipe; + $line[] = $a['pcruInformation']->typeContrat; + $line[] = $a['pcruInformation']->acronyme; + $line[] = $a['pcruInformation']->contratsAssocies; + $line[] = $a['pcruInformation']->responsableScientifique; + $line[] = $a['pcruInformation']->employeurResponsableScientifique; + $line[] = $a['pcruInformation']->coordinateurConsortium === NULL ? NULL : ($a['pcruInformation']->coordinateurConsortium ? "True" : "False"); + $line[] = $a['pcruInformation']->partenaires; + $line[] = $a['pcruInformation']->partenairePrincipal; + $line[] = preg_replace('/\s+/', '', $a['pcruInformation']->idPartenairePrincipal); + $line[] = $a['pcruInformation']->sourceFinancement; + $line[] = $a['pcruInformation']->lieuExecution; + $line[] = $a['pcruInformation']->dateDerniereSignature; + $line[] = $a['pcruInformation']->duree; + $line[] = $a['pcruInformation']->dateDebut; + $line[] = $a['pcruInformation']->dateFin; + $line[] = $a['pcruInformation']->montantPercuUnite; + $line[] = $a['pcruInformation']->contributionFinanceur; + $line[] = $a['pcruInformation']->montantTotal; + $line[] = $a['pcruInformation']->validePoleCompetitivite ? 'True' : 'False'; + $line[] = $a['pcruInformation']->poleCompetitivite; + $line[] = $a['pcruInformation']->commentaires; + $line[] = $a['pcruInformation']->pia === NULL ? NULL : ($a['pcruInformation']->pia ? "True" : "False"); + $line[] = $a['pcruInformation']->reference; + $line[] = $a['pcruInformation']->accordCadre === NULL ? NULL : ($a['pcruInformation']->accordCadre ? "True" : "False"); + $line[] = $a['pcruInformation']->cifre ? 'True' : 'False'; + $line[] = $a['pcruInformation']->chaireIndustrielle === NULL ? NULL : ($a['pcruInformation']->chaireIndustrielle ? "True" : "False"); + $line[] = $a['pcruInformation']->presencePartenaireIndustriel === NULL ? NULL : ($a['pcruInformation']->presencePartenaireIndustriel ? "True" : "False"); + $r = fputcsv($stream, $line, ';'); + if (!$r) { + $logs[] = $this->error("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $nb = $this->getEntityManager()->getConnection()->executeStatement(" + UPDATE + activitypcruinformations + SET + envoiobjet = ?, + envoilabintel = ?, + envoirnsr = ?, + envoisigle = ?, + envoinumcontrat = ?, + envoiequipe = ?, + envoitypecontrat = ?, + envoiacronyme = ?, + envoicontratsassocies = ?, + envoiresponsablescientifique = ?, + envoiemployeurresponsablescientifique = ?, + envoicoordinateurconsortium = ?, + envoipartenaires = ?, + envoipartenaireprincipal = ?, + envoiidpartenaireprincipal = ?, + envoisourcefinancement = ?, + envoilieuexecution = ?, + envoidatedernieresignature = ?, + envoiduree = ?, + envoidatedebut = ?, + envoidatefin = ?, + envoimontantpercuunite = ?, + envoicontributionfinanceur = ?, + envoimontanttotal = ?, + envoivalidepolecompetitivite = ?, + envoipolecompetitivite = ?, + envoicommentaires = ?, + envoipia = ?, + envoireference = ?, + envoiaccordcadre = ?, + envoicifre = ?, + envoichaireindustrielle = ?, + envoipresencepartenaireindustriel = ? + WHERE id = ?; + ", [$a['pcruInformation']->objet, + $a['pcruInformation']->labintel, + $a['pcruInformation']->rnsr, + $a['pcruInformation']->sigle, + $a['pcruInformation']->numContrat, + $a['pcruInformation']->equipe, + $a['pcruInformation']->typeContrat, + $a['pcruInformation']->acronyme, + $a['pcruInformation']->contratsAssocies, + $a['pcruInformation']->responsableScientifique, + $a['pcruInformation']->employeurResponsableScientifique, + $a['pcruInformation']->coordinateurConsortium === NULL ? NULL : ($a['pcruInformation']->coordinateurConsortium ? "True" : "False"), + $a['pcruInformation']->partenaires, + $a['pcruInformation']->partenairePrincipal, + $a['pcruInformation']->idPartenairePrincipal, + $a['pcruInformation']->sourceFinancement, + $a['pcruInformation']->lieuExecution, + $a['pcruInformation']->dateDerniereSignature, + $a['pcruInformation']->duree, + $a['pcruInformation']->dateDebut, + $a['pcruInformation']->dateFin, + $a['pcruInformation']->montantPercuUnite, + $a['pcruInformation']->contributionFinanceur, + $a['pcruInformation']->montantTotal, + $a['pcruInformation']->validePoleCompetitivite ? 'True' : 'False', + $a['pcruInformation']->poleCompetitivite, + $a['pcruInformation']->commentaires, + $a['pcruInformation']->pia === NULL ? NULL : ($a['pcruInformation']->pia ? "True" : "False"), + $a['pcruInformation']->reference, + $a['pcruInformation']->accordCadre === NULL ? NULL : ($a['pcruInformation']->accordCadre ? "True" : "False"), + $a['pcruInformation']->cifre ? 'True' : 'False', + $a['pcruInformation']->chaireIndustrielle === NULL ? NULL : ($a['pcruInformation']->chaireIndustrielle ? "True" : "False"), + $a['pcruInformation']->presencePartenaireIndustriel === NULL ? NULL : ($a['pcruInformation']->presencePartenaireIndustriel ? "True" : "False"), + $a['activitypcruinformationsid']]); + } + + $logs[] = $this->log("Fermeture du fichier"); + $r = fclose($stream); + if (!$r) { + $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierContrats . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + $fichiersDeposes[] = $nomFichierContrats; + + + + if ($activitesAEnvoyerValidesNb == 1) { + $logs[] = $this->log("Une activité a été envoyée"); + } else { + $logs[] = $this->log($activitesAEnvoyerValidesNb . " activités ont été envoyées"); + } + + $creerFichierMarqueurContrats = true; + + $logs[] = $this->log("Mise à jour du statut des activités envoyées"); + + $ids = []; + foreach ($activitesAEnvoyerValides as $a) { + $ids[] = $a['activitypcruinformationsid']; + } + $now = new \DateTime(); + $nb = $this->getEntityManager()->getConnection()->executeStatement(" + UPDATE + activitypcruinformations + SET + status = ?, + dateupdated = ?, + datepremierdepot = ? + WHERE id IN (?); + ", [ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU, $now, $now, $ids], ["string", "datetime", "datetime", \Doctrine\DBAL\ArrayParameterType::INTEGER]); + if ($nb == 0) { + $logs[] = $this->log("Aucune activité n'est passée au statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . ". Très étrange."); + } else if ($nb == 1) { + $logs[] = $this->log("Une activité est passée au statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU); + } else { + $logs[] = $this->log($nb . " activités sont passées au statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU); + } + + /* Contrats signés PDF documents */ + $logs[] = $this->log("Envoi des documents PDF de contrats signés"); + foreach ($activitesAEnvoyerValides as $a) { + if (!$a['cheminFichierContrat']) { + $logs[] = $this->log("Envoi du PDF impossible pour l'activité " . $a['pcruInformation']->numContrat . " car elle n'a pas de PDF de contrat signé"); + continue; + } + + $pdfFileName = $this->envoyerUnDocumentPDFContrat($sftp, $conn, $a['cheminFichierContrat'], $repertoireDistant, $a['activitypcruinformationsid'], $a['pcruInformation']->numContrat, $logs); + + $fichiersDeposes[] = $pdfFileName; + $auMoinsUnFichierPDFAÉtéEnvoyé = true; + } + + foreach ($activitesAEnvoyerValides as $a) { + $activity = $this->getEntityManager() + ->getRepository(Activity::class) + ->findOneBy(array('id' => $a['activityid'])); + + $pcruPartenairePrincipalRoles = $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles(); + if ($pcruPartenairePrincipalRoles != NULL && count($pcruPartenairePrincipalRoles) > 0) { + $partenaires = $activity->getOrganizationsWithOneRoleIn($pcruPartenairePrincipalRoles); + if (count($partenaires) == 1) { + + $partenaire = $partenaires[0]; + $avertissements = []; + if (mb_strlen(trim($partenaire->getShortName())) == 0) { + $avertissements[] = "Le nom court doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getFullName())) == 0) { + $avertissements[] = "Le nom complet doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getCodePcru())) == 0) { + $avertissements[] = "Le numéro SIRET, la TVA Intracommunautaire ou le DUNS doit être renseigné"; + } + if ($partenaire->getTypeEtablissementPcruObj() == NULL) { + $avertissements[] = "Le type d'établissement PCRU doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getStreet1())) == 0) { + $avertissements[] = "L'adresse (rue 1) doit être renseignée"; + } + if (mb_strlen(trim($partenaire->getZipCode())) == 0) { + $avertissements[] = "Le code postal doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getCity())) == 0) { + $avertissements[] = "La ville doit être renseignée"; + } + if (mb_strlen(trim($partenaire->getCountry())) == 0) { + $avertissements[] = "Le pays doit être renseigné"; + } + if (count($avertissements) > 0) { + $logs[] = $this->log("Le partenaire " . mb_strlen(trim($partenaire->getShortName())) == 0 ? $partenaire->getFullName() : $partenaire->getShortName() . " ne sera pas transmis à PCRU car il manque des informations sur sa fiche."); + } else { + $dejaDansLaListe = false; + foreach ($partenairesAEnvoyer as $p) { + if ($p->getId() == $partenaire->getId()) { + $dejaDansLaListe = true; + break; + } + } + if (!$dejaDansLaListe) { + $partenairesAEnvoyer[] = $partenaire; + } + } + } + } + } + } + } + + $logs[] = $this->log("Envoi des documents PDF qui étaient manquant lors de précédents envois et indiqués par PCRU comme manquants"); + $sql = " + select + id as activitypcruinformationsid, + activity_id, + envoinumcontrat + from + activitypcruinformations + where + dateenvoifichiercontrat IS NULL + AND status = ? + "; + $activitesAvecContratARenvoyer = $this->getEntityManager()->getConnection() + ->executeQuery($sql, [ActivityPcruInformations::STATUS_RETOUR_PCRU_OK_MAIS_FICHIER_MANQUANT])->fetchAllAssociative(); + + if (count($activitesAvecContratARenvoyer) == 0) { + $logs[] = $this->log("Aucun document manquant à envoyer."); + } else { + $logs[] = $this->log(count($activitesAvecContratARenvoyer) . " activités marquées comme ayant un document manquant. Pour chacune, on vérifie si le document est maintenant présent et si oui on l'envoi à PCRU."); + } + + foreach ($activitesAvecContratARenvoyer as $a) { + + $activity = $this->getEntityManager() + ->getRepository(Activity::class) + ->findOneBy(array('id' => $a['activity_id'])); + + // Document signé + $typeDocumentSigne = $this->getOscarConfigurationService()->getPcruContractType(); + $logs[] = $this->log("Recherche du document de type " . $typeDocumentSigne . " pour l'activité ayant pour référence " . $activity->getOscarNum()); + + $documentsSigne = []; + /** @var ContractDocument $document */ + foreach ($activity->getDocuments() as $document) { + if ($document->getTypeDocument()->getLabel() == $typeDocumentSigne) { + // Test sur les versions + if (count($documentsSigne) > 0) { + // On regarde si on est pas entrain de parser une ancienne version du fichier + if ($documentsSigne[0]->getFileName() == $document->getFileName()) { + continue; + } + } + $documentsSigne[] = $document; + } + } + if (count($documentsSigne) > 1) { + $logs[] = $this->error("Impossible de déterminer automatiquement le fichier PDF de contrat signé à envoyer car il y a plusieurs documents de type '$typeDocumentSigne' sur cette activité"); + continue; + } else if (count($documentsSigne) == 0) { + $logs[] = $this->log("Impossible d'envoyer le fichier PDF de contrat signé car l'activité n'a aucun document de type '$typeDocumentSigne'"); + continue; + } else { + $fichiersDeposes[] = $this->envoyerUnDocumentPDFContrat($sftp, $conn, $documentsSigne[0]->getPath(), $repertoireDistant, $a['activitypcruinformationsid'], $a['envoinumcontrat'], $logs); + $auMoinsUnFichierPDFAÉtéEnvoyé = true; + } + } + + $creerFichierMarqueurPartenaires = false; + if (count($partenairesAEnvoyer) == 0) { + $logs[] = $this->log("Aucun partenaire à envoyer."); + } else { + if (count($partenairesAEnvoyer) == 1) { + $logs[] = $this->log("Un partenaire à envoyer."); + } else { + $logs[] = $this->log(count($partenairesAEnvoyer) . " partenaires à envoyer."); + } + + + $logs[] = $this->log("Ouverture du fichier " . $nomFichierPartenaires . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + + $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierPartenaires, 'w'); + if (!$stream) { + $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierPartenaires . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierPartenaires . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("Écriture des en-têtes du fichier CSV Partenaires"); + + // Écriture du BOM pour que PCRU comprenne que c'est un fichier encodé en UTF-8 + $r = fwrite($stream, pack("CCC",0xef,0xbb,0xbf)); + if (!$r) { + $logs[] = $this->error("Impossible d'écrire le BOM dans le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'écrire le BOM dans le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $r = fputcsv($stream, ['LibelleCourt', 'LibelleLong', 'Siren', 'Siret', 'TvaIntra', 'Duns', 'TypeEtablissement', 'Adresse', 'CodePostal', 'Ville', 'Pays'], ';'); + if (!$r) { + $logs[] = $this->error("Impossible d'écrire dans le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("Écriture des partenaires"); + foreach ($partenairesAEnvoyer as $p) { + $line = []; + $line[] = $p->getShortName(); + $line[] = $p->getFullName(); + $line[] = ""; + $line[] = preg_replace('/\s+/', '', $p->getSiret()); + $line[] = preg_replace('/\s+/', '', $p->getTvaintra()); + $line[] = preg_replace('/\s+/', '', $p->getDuns()); + $line[] = $p->getTypeEtablissementPcruObj()->getLabel(); + $line[] = $p->getStreet1(); + $line[] = $p->getZipCode(); + $line[] = $p->getCity(); + $line[] = $p->getCountry(); + + $r = fputcsv($stream, $line, ';'); + if (!$r) { + $logs[] = $this->error("Impossible d'écrire dans le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + } + + $logs[] = $this->log("Fermeture du fichier"); + $r = fclose($stream); + if (!$r) { + $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierPartenaires . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + $fichiersDeposes[] = $nomFichierPartenaires; + + + if (count($partenairesAEnvoyer) == 1) { + $logs[] = $this->log("Un partenaire a été envoyé."); + } else { + $logs[] = $this->log(count($partenairesAEnvoyer) . " partenaires ont été envoyés."); + } + + $creerFichierMarqueurPartenaires = true; + } + + if ($creerFichierMarqueurPartenaires) { + $logs[] = $this->log("Création du fichier marqueur partenaires OK : " . $nomFichierPartenairesDeposesOK); + $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierPartenairesDeposesOK, 'w'); + if (!$stream) { + $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierPartenairesDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierPartenairesDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("Fermeture du fichier marqueur partenaires OK"); + $r = fclose($stream); + if (!$r) { + $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierPartenairesDeposesOK . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierPartenairesDeposesOK . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + $fichiersDeposes[] = $nomFichierPartenairesDeposesOK; + } + + if ($creerFichierMarqueurContrats) { + $logs[] = $this->log("Création du fichier marqueur contrats OK : " . $nomFichierContratsDeposesOK); + $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierContratsDeposesOK, 'w'); + if (!$stream) { + $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierContratsDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierContratsDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("Fermeture du fichier marqueur contrats OK"); + $r = fclose($stream); + if (!$r) { + $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierContratsDeposesOK . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierContratsDeposesOK . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + $fichiersDeposes[] = $nomFichierContratsDeposesOK; + } + + if ($auMoinsUnFichierPDFAÉtéEnvoyé) { + $logs[] = $this->log("Création du fichier marqueur fichiers PDF contrats OK : " . $nomFichierDocumentsContratsPDFDeposesOK); + $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierDocumentsContratsPDFDeposesOK, 'w'); + if (!$stream) { + $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $logs[] = $this->log("Fermeture du fichier marqueur fichiers PDF contrats OK"); + $r = fclose($stream); + if (!$r) { + $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + $fichiersDeposes[] = $nomFichierDocumentsContratsPDFDeposesOK; + } + + $logs[] = $this->log("Fin du traitement, fermeture des connexions SFTP"); + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + + $pcruFtpLog = new PcruFtpLog(); + $pcruFtpLog->setStatus("succès"); + if ($activitesAEnvoyerValidesNb == 1) { + $pcruFtpLog->setTitre("Une activité a été envoyée"); + } else { + $pcruFtpLog->setTitre($activitesAEnvoyerValidesNb . " activités ont été envoyées"); + } + $pcruFtpLog->setDetails(implode("\r\n", $logs)); + $pcruFtpLog->fichiersDeposes = implode(",", $fichiersDeposes); + $this->getEntityManager()->persist($pcruFtpLog); + $this->getEntityManager()->flush(); + + return $logs; + + } catch (OscarPCRUException $e) { + + $pcruFtpLog = new PcruFtpLog(); + $pcruFtpLog->setStatus("erreur"); + $pcruFtpLog->setTitre($e->getMessage()); + if (count($e->details) > 0) { + $pcruFtpLog->setTitre($e->details[count($e->details) - 1]); + } + $pcruFtpLog->setDetails(implode("\r\n", $e->details)); + $this->getEntityManager()->persist($pcruFtpLog); + $this->getEntityManager()->flush(); + throw $e; + + } catch (\Exception $e) { + + $pcruFtpLog = new PcruFtpLog(); + $pcruFtpLog->setStatus("erreur"); + $pcruFtpLog->setTitre($e->getMessage()); + $pcruFtpLog->setDetails(implode("\r\n", $logs)); + $this->getEntityManager()->persist($pcruFtpLog); + $this->getEntityManager()->flush(); + + throw $e; + } catch (Throwable $e) { + + $pcruFtpLog = new PcruFtpLog(); + $pcruFtpLog->setStatus("erreur"); + $pcruFtpLog->setTitre($e->getMessage()); + $pcruFtpLog->setDetails(implode("\r\n", $logs)); + $this->getEntityManager()->persist($pcruFtpLog); + $this->getEntityManager()->flush(); + + throw $e; + } + } + + private function envoyerUnDocumentPDFContrat($sftp, $conn, $cheminFichierLocalDansDocumentDropLocation, $repertoireDistant, $activityPcruInformationsId, $reference, &$logs) { + $docpath = $this->getOscarConfigurationService()->getDocumentDropLocation() + . DIRECTORY_SEPARATOR + . $cheminFichierLocalDansDocumentDropLocation; + + $pdfFileName = $reference . '.pdf'; + + $logs[] = $this->log("Envoi du fichier " . $cheminFichierLocalDansDocumentDropLocation . ", renommé en " . $pdfFileName ); + + $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $pdfFileName, 'w'); + if (!$stream) { + $logs[] = $this->error("Impossible d'ouvrir le fichier " . $pdfFileName . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $pdfFileName . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $r = fwrite($stream, file_get_contents($docpath)); + if (!$r) { + $logs[] = $this->error("Impossible d'écrire dans le fichier " . $pdfFileName . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $pdfFileName . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + + $r = fclose($stream); + if (!$r) { + $logs[] = $this->error("Impossible de fermer le fichier " . $pdfFileName . " sur le serveur SFTP"); + $e = new OscarPCRUException("Impossible de fermer le fichier " . $pdfFileName . " sur le serveur SFTP"); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + $fichiersDeposes[] = $pdfFileName; + $logs[] = $this->log("Envoi du fichier " . $cheminFichierLocalDansDocumentDropLocation . ", renommé en " . $pdfFileName . " réussi"); + + + $now = new \DateTime(); + $nb = $this->getEntityManager()->getConnection()->executeStatement(" + UPDATE + activitypcruinformations + SET + dateenvoifichiercontrat = ?, + dateupdated = ? + WHERE id = ?; + ", [$now, $now, $activityPcruInformationsId], ["datetime", "datetime", "integer"]); + if ($nb == 0) { + $logs[] = $this->log("dateEnvoiFichierContrat mise à jour pour aucune activitée. Étrange."); + } else if ($nb == 1) { + $logs[] = $this->log("dateEnvoiFichierContrat mise à jour pour une activité."); + } else { + $logs[] = $this->log($nb . " activités ont eu leur dateEnvoiFichierContrat mise à jour. Étrange."); + } + + return $pdfFileName; + } + + private function supprimerFichier($sftp, $conn, $repertoireDistant, $fichier, &$logs) { + $logs[] = $this->log("Suppression du fichier " . $fichier); + $result = unlink('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $fichier); + if (!$result) { + $logs[] = $this->error("Impossible de supprimer le fichier " . $fichier . " sur le serveur SFTP."); + $e = new OscarPCRUException("Impossible de supprimer le fichier " . $fichier . " sur le serveur SFTP."); + $e->details = $logs; + ssh2_disconnect($sftp); + ssh2_disconnect($conn); + throw $e; + } + } + + protected function getConfiguration() + { + return $this->getOscarConfigurationService()->getPcruFtpInfos(); + } + + protected function log( string $msg ): string + { + $this->getLoggerService()->info(sprintf('[process pcru - info] %s', $msg), []); + return '[INFO] ' . $msg; + } + + protected function error( string $msg ): string + { + $this->getLoggerService()->error(sprintf('[process pcru - erro] %s', $msg), []); + return '[ERREUR] ' . $msg; + } +} diff --git a/module/Oscar/src/Oscar/Service/PcruFtpServiceFactory.php b/module/Oscar/src/Oscar/Service/PcruFtpServiceFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..f26da5073c2e55f627b15c31d176075b1b7feb86 --- /dev/null +++ b/module/Oscar/src/Oscar/Service/PcruFtpServiceFactory.php @@ -0,0 +1,20 @@ +setOscarConfigurationService($container->get(OscarConfigurationService::class)); + $s->setEntityManager($container->get(EntityManager::class)); + $s->setLoggerService($container->get('Logger')); + $s->setPcruInformationsService($container->get(PcruInformationsService::class)); + return $s; + } +} diff --git a/module/Oscar/src/Oscar/Service/PcruInformation.php b/module/Oscar/src/Oscar/Service/PcruInformation.php new file mode 100644 index 0000000000000000000000000000000000000000..1fb62743998317cf93f3ee51f3223d7a8be4ae4f --- /dev/null +++ b/module/Oscar/src/Oscar/Service/PcruInformation.php @@ -0,0 +1,182 @@ +oscarConfigurationService; + } + + /** + * @param OscarConfigurationService $oscarConfigurationService + */ + public function setOscarConfigurationService(OscarConfigurationService $oscarConfigurationService): void + { + $this->oscarConfigurationService = $oscarConfigurationService; + } + + /** + * + * @param Activity $activity + */ + public function getPcruInformationsForActivity(Activity $activity, ?Url $urlHelper = NULL): PcruInformationComplete + { + if (!$activity) { + throw new \Exception("L'activité demandée n'existe pas. Veuillez actualiser la page."); + } + + $typesContrat = $this->entityManager->getRepository(PcruTypeContract::class) + ->createQueryBuilder('t') + ->orderBy('t.label', 'ASC') + ->getQuery()->getResult(); + + $pcruInformationParDefaut = $this->getPcruInformationParDefaut($activity, $typesContrat, $urlHelper); + + $activityPcruInformations = $activity->getPcruInformations(); + if ($activityPcruInformations == null) { + $activityPcruInformations = new ActivityPcruInformations(); + } + $pasParDefautErreurs = $this->validatePasParDefaut($activityPcruInformations); + + $pcruInformation = new PcruInformation(); + $pcruInformation->objet = $activityPcruInformations->isUtiliserObjetParDefaut() ? $pcruInformationParDefaut->objet : $activityPcruInformations->getObjet(); + $pcruInformation->labintel = $activityPcruInformations->isUtiliserLabintelParDefaut() ? $pcruInformationParDefaut->labintel : $activityPcruInformations->getLabintel(); + $pcruInformation->rnsr = $activityPcruInformations->isUtiliserRnsrParDefaut() ? $pcruInformationParDefaut->rnsr : $activityPcruInformations->getRnsr(); + $pcruInformation->sigle = $activityPcruInformations->isUtiliserSigleParDefaut() ? $pcruInformationParDefaut->sigle : $activityPcruInformations->getSigle(); + $pcruInformation->numContrat = $activityPcruInformations->isUtiliserNumContratParDefaut() ? $pcruInformationParDefaut->numContrat : $activityPcruInformations->getNumContrat(); + $pcruInformation->equipe = $activityPcruInformations->getEquipe(); + $pcruInformation->typeContrat = $activityPcruInformations->isUtiliserTypeContratParDefaut() ? $pcruInformationParDefaut->typeContratLabel : ($activityPcruInformations->getPcruTypeContract() == NULL ? NULL : $activityPcruInformations->getPcruTypeContract()->getLabel()); + $pcruInformation->acronyme = $activityPcruInformations->isUtiliserAcronymeParDefaut() ? $pcruInformationParDefaut->acronyme : $activityPcruInformations->getAcronyme(); + $pcruInformation->contratsAssocies = $activityPcruInformations->getContratsAssocies(); + $pcruInformation->responsableScientifique = $activityPcruInformations->isUtiliserResponsableScientifiqueParDefaut() ? $pcruInformationParDefaut->responsableScientifique : $activityPcruInformations->getResponsableScientifique(); + $pcruInformation->employeurResponsableScientifique = $activityPcruInformations->getEmployeurResponsableScientifique(); + $pcruInformation->coordinateurConsortium = $activityPcruInformations->isCoordinateurConsortium(); + $pcruInformation->partenaires = $activityPcruInformations->isUtiliserPartenairesParDefaut() ? $pcruInformationParDefaut->partenaires : $activityPcruInformations->getPartenaires(); + $pcruInformation->partenairePrincipal = $activityPcruInformations->isUtiliserPartenairePrincipalParDefaut() ? $pcruInformationParDefaut->partenairePrincipal : $activityPcruInformations->getPartenairePrincipal(); + $pcruInformation->idPartenairePrincipal = $activityPcruInformations->isUtiliserIdPartenairePrincipalParDefaut() ? $pcruInformationParDefaut->idPartenairePrincipal : $activityPcruInformations->getIdPartenairePrincipal(); + $pcruInformation->sourceFinancement = $pcruInformationParDefaut->sourceFinancement; + $pcruInformation->lieuExecution = $activityPcruInformations->getLieuExecution(); + $pcruInformation->dateDerniereSignature = $activityPcruInformations->isUtiliserDateDerniereSignatureParDefaut() ? $pcruInformationParDefaut->dateDerniereSignature : $activityPcruInformations->getDateDerniereSignature(); + $pcruInformation->duree = $activityPcruInformations->getDuree(); + $pcruInformation->dateDebut = $activityPcruInformations->isUtiliserDateDebutParDefaut() ? $pcruInformationParDefaut->dateDebut : $activityPcruInformations->getDateDebut(); + $pcruInformation->dateFin = $activityPcruInformations->isUtiliserDateFinParDefaut() ? $pcruInformationParDefaut->dateFin : $activityPcruInformations->getDateFin(); + $pcruInformation->montantPercuUnite = $activityPcruInformations->getMontantPercuUnite(); + $pcruInformation->contributionFinanceur = $activityPcruInformations->getContributionFinanceur(); + $pcruInformation->montantTotal = $activityPcruInformations->isUtiliserMontantTotalParDefaut() ? $pcruInformationParDefaut->montantTotal : $activityPcruInformations->getMontantTotal(); + $pcruInformation->montantTotalDevise = $activityPcruInformations->isUtiliserMontantTotalParDefaut() ? $pcruInformationParDefaut->montantTotalDevise : 'Euro'; + $pcruInformation->validePoleCompetitivite = $pcruInformationParDefaut->validePoleCompetitivite; + $pcruInformation->poleCompetitivite = $pcruInformationParDefaut->poleCompetitivite; + $pcruInformation->commentaires = $activityPcruInformations->getCommentaires(); + $pcruInformation->pia = $activityPcruInformations->isPia(); + $pcruInformation->reference = $activityPcruInformations->isUtiliserReferenceParDefaut() ? $pcruInformationParDefaut->reference : $activityPcruInformations->getReference(); + $pcruInformation->accordCadre = $activityPcruInformations->isAccordCadre(); + $pcruInformation->cifre = $activityPcruInformations->isCifre(); + $pcruInformation->chaireIndustrielle = $activityPcruInformations->isChaireIndustrielle(); + $pcruInformation->presencePartenaireIndustriel = $activityPcruInformations->isPresencePartenaireIndustriel(); + + $erreurs = $this->validate($pcruInformation); + + // Erreurs concernant deux champs, un par défaut et un pas par défaut + if ($pcruInformation->duree === NULL && $activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($pcruInformationParDefaut->dateFin)) == 0) { + $pcruInformationParDefaut->dateFinErreurs[] = "Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."; + $pasParDefautErreurs['dureeErreurs'][] = "Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être."; + } + + if ($activityPcruInformations->isUtiliserDateDebutParDefaut() && count($pcruInformationParDefaut->dateDebutErreurs) == 0 && !$activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($activityPcruInformations->getDateFin())) != 0 && count($pasParDefautErreurs['dateFinErreurs']) == 0) { + $debut = \DateTime::createFromFormat('d-m-Y', $pcruInformationParDefaut->dateDebut); + $fin = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateFin()); + if ($fin < $debut) { + $pasParDefautErreurs['dateFinErreurs'][] = "La date de fin doit être postérieure à la date de début"; + } + } + if (!$activityPcruInformations->isUtiliserDateDebutParDefaut() && count($pasParDefautErreurs['dateDebutErreurs']) == 0 && $activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($pcruInformationParDefaut->dateFin)) != 0 && count($pcruInformationParDefaut->dateFinErreurs) == 0) { + $debut = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateDebut()); + $fin = \DateTime::createFromFormat('d-m-Y', $pcruInformationParDefaut->dateFin); + if ($fin < $debut) { + $pcruInformationParDefaut->dateFinErreurs[] = "La date de fin doit être postérieure à la date de début"; + } + } + + $pcruInformationComplete = new PcruInformationComplete(); + $pcruInformationComplete->pcruInformationParDefaut = $pcruInformationParDefaut; + $pcruInformationComplete->activityPcruInformations = array_merge($activityPcruInformations->toArray(), $pasParDefautErreurs); + $pcruInformationComplete->pcruInformation = $pcruInformation; + $pcruInformationComplete->erreurs = $erreurs; + $pcruInformationComplete->enErreur = count($erreurs) > 0; + + $pcruInformationComplete->unitRoles = $this->getOscarConfigurationService()->getPcruUnitRoles(); + + $pcruInformationComplete->typesContrat = []; + foreach ($typesContrat as $typeContrat) { + $pcruInformationComplete->typesContrat[] = ['id' => $typeContrat->getId(), 'label' => $typeContrat->getLabel()]; + } + + $pcruInformationComplete->roleResponsableScientifique = $this->getOscarConfigurationService()->getPcruInChargeRole(); + + $pcruInformationComplete->rolesPartenaires = $this->getOscarConfigurationService()->getPcruPartnerRoles(); + $pcruInformationComplete->rolesPartenairePrincipal = $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles(); + + // Document signé + $typeDocumentSigne = $this->getOscarConfigurationService()->getPcruContractType(); + $documentSigne = NULL; + /** @var ContractDocument $document */ + foreach ($activity->getDocuments() as $document) { + if ($document->getTypeDocument()->getLabel() == $typeDocumentSigne) { + // Test sur les versions + if ($documentSigne != null) { + // On regarde si on est pas entrain de parser une ancienne version du fichier + if ($documentSigne->getFileName() == $document->getFileName()) { + continue; + } + $pcruInformationComplete->avertissementFichierContratManquant = "Impossible de déterminer automatiquement le fichier PDF de contrat signé à envoyer car il y a plusieurs documents de type '$typeDocumentSigne' sur cette activité"; + break; + } else { + $documentSigne = $document; + } + } + } + if (!$documentSigne) { + $pcruInformationComplete->avertissementFichierContratManquant = "Impossible de déterminer automatiquement le fichier PDF de contrat signé à envoyer car l'activité n'a aucun document de type '$typeDocumentSigne'"; + $pcruInformationComplete->enErreur = true; + } else { + $pcruInformationComplete->cheminFichierContrat = $documentSigne->getPath(); + } + + return $pcruInformationComplete; + } + + private function getPcruInformationParDefaut(Activity $activity, $typesContrat, ?Url $urlHelper): PcruInformationParDefaut { + $pcruInformationParDefaut = new PcruInformationParDefaut(); + + $pcruInformationParDefaut->objet = $activity->getLabel(); + + $pcruUnitRoles = $this->getOscarConfigurationService()->getPcruUnitRoles(); + if (count($pcruUnitRoles) === 0) { + throw new \Exception("Veuillez renseigner dans la configuration la clé pcru_unit_roles. Cette clé décrit une liste de rôles (le plus souvent 'Laboratoire') que peuvent avoir les unité PCRU lorsque ces organisations sont liées à des activités. C'est ce qui nous permet de récupérer automatiquement les valeurs par défaut à envoyer à PCRU. Sinon les valeurs doivent être saisies à la main."); + } + + $pcruUnits = $activity->getOrganizationsWithOneRoleIn($pcruUnitRoles); + + if (count($pcruUnits) == 0) { + $pcruInformationParDefaut->unitePcruParDefautErreur = "Impossible de déterminer automatiquement une organisation (unité) PCRU par défaut car l'activité n'a aucun partenaire de type (" . implode(', ', $pcruUnitRoles) . ")"; + } else if (count($pcruUnits) == 1) { + if ($pcruUnits[0]->getLabintel() != null && trim($pcruUnits[0]->getLabintel()) !== '') { + $pcruInformationParDefaut->labintel = $pcruUnits[0]->getLabintel(); + } else { + $pcruInformationParDefaut->labintelParDefautErreur = "Impossible de déterminer automatiquement un code labintel par défaut car l'organisation " . $pcruUnits[0]->fullOrShortName() . " n'en a pas de renseigné."; + } + $pcruInformationParDefaut->sigle = $pcruUnits[0]->getShortName(); + if ($pcruUnits[0]->getRnsr() != null && trim($pcruUnits[0]->getRnsr()) !== '') { + $pcruInformationParDefaut->rnsr = $pcruUnits[0]->getRnsr(); + } else { + $pcruInformationParDefaut->rnsrParDefautErreur = "Impossible de déterminer automatiquement un RNSR par défaut car l'organisation " . $pcruUnits[0]->fullOrShortName() . " n'en a pas de renseigné."; + } + } else { + $organisationAvecUnCodeLabintel = []; + foreach ($pcruUnits as $pcruUnit) { + if ($pcruUnit->getLabintel() != null && trim($pcruUnit->getLabintel()) !== '') { + $organisationAvecUnCodeLabintel[] = $pcruUnit; + } + } + if (count($organisationAvecUnCodeLabintel) === 0) { + $pcruInformationParDefaut->unitePcruParDefautErreur = "Impossible de déterminer automatiquement une organisation (unité) PCRU par défaut car aucun des partenaires de type (" . implode(', ', $pcruUnitRoles) . ") de l'activité n'a de code labintel de renseigné"; + } else if (count($organisationAvecUnCodeLabintel) === 1) { + $pcruInformationParDefaut->labintel = $organisationAvecUnCodeLabintel[0]->getLabintel(); + $pcruInformationParDefaut->sigle = $organisationAvecUnCodeLabintel[0]->getShortName(); + if ($organisationAvecUnCodeLabintel[0]->getRnsr() != null && trim($organisationAvecUnCodeLabintel[0]->getRnsr()) !== '') { + $pcruInformationParDefaut->rnsr = $organisationAvecUnCodeLabintel[0]->getRnsr(); + } else { + $pcruInformationParDefaut->rnsrParDefautErreur = "Impossible de déterminer automatiquement un RNSR par défaut car l'organisation " . $organisationAvecUnCodeLabintel[0]->fullOrShortName() . " n'en a pas de renseigné."; + } + } else { + $pcruInformationParDefaut->unitePcruParDefautErreur = "Impossible de déterminer automatiquement une organisation (unité) PCRU par défaut car plusieurs partenaires de type (" . implode(', ', $pcruUnitRoles) . ") de l'activité ont un code labintel de renseigné."; + } + } + + $pcruInformationParDefaut->numContrat = $activity->getOscarNum(); + + $activityType = $activity->getActivityType(); + if ($activityType == NULL) { + $pcruInformationParDefaut->typeContratParDefautErreur = "Impossible de déterminer automatiquement le type de contrat car l'activité n'a pas de type"; + } else { + $typeContratParDefaut = []; + $typeContratParDefautToString = ""; + foreach ($typesContrat as $typeContrat) { + if ($typeContrat->getActivityType() && $typeContrat->getActivityType()->getId() === $activityType->getId()) { + $typeContratParDefaut[] = $typeContrat; + if ($typeContratParDefautToString != "") { + $typeContratParDefautToString .= ", "; + } + $typeContratParDefautToString .= "[" . $typeContrat->getId() . "] " . $typeContrat->getLabel(); + } + } + if (count($typeContratParDefaut) == 0) { + $pcruInformationParDefaut->typeContratParDefautErreur = "Impossible de déterminer automatiquement le type de contrat PCRU car aucune correspondance n'a été configurée pour le type de l'activité (" . $activityType->getLabel() . ")"; + } else if (count($typeContratParDefaut) == 1) { + $pcruInformationParDefaut->typeContratId = $typeContratParDefaut[0]->getId(); + $pcruInformationParDefaut->typeContratLabel = $typeContratParDefaut[0]->getLabel(); + } else { + $pcruInformationParDefaut->typeContratParDefautErreur = "Impossible de déterminer automatiquement le type de contrat PCRU car plusieurs correspondances PCRU (" . $typeContratParDefautToString . ") ont été configurées pour le type de l'activité dans Oscar (" . $activityType->getLabel() . ")"; + } + } + + $pcruInformationParDefaut->acronyme = $activity->getAcronym(); + + + $pcruInChargeRole = $this->getOscarConfigurationService()->getPcruInChargeRole(); + if ($pcruInChargeRole === NULL || mb_strlen(trim($pcruInChargeRole)) === 0) { + throw new \Exception("Veuillez renseigner dans la configuration la clé pcru_incharge_role. Cette clé décrit le nom du rôle correspondant au responsable scientifique dans l'application (le plus souvent c'est tout simplement 'Responsable scientifique'). C'est ce qui nous permet de récupérer automatiquement la valeur par défaut à envoyer à PCRU. Sinon la valeur doit être saisie à la main."); + } + $personsWithRole = $activity->getPersonsWithRole($pcruInChargeRole); + if (count($personsWithRole) == 0) { + $pcruInformationParDefaut->responsableScientifiqueParDefautErreur = "Impossible de déterminer automatiquement un reponsable scientifique par défaut car l'activité n'a aucun membre ayant le rôle (" . $pcruInChargeRole . ")"; + } else if (count($personsWithRole) == 1) { + $pcruInformationParDefaut->responsableScientifique = mb_strtoupper($personsWithRole[0]->getPerson()->getLastName()) . " " . $personsWithRole[0]->getPerson()->getFirstName(); + } else { + $pcruInformationParDefaut->responsableScientifiqueParDefautErreur = "Impossible de déterminer automatiquement un reponsable scientifique par défaut car l'activité a plusieurs membres ayant le rôle (" . $pcruInChargeRole . ")"; + } + + $pcruPartnerRoles = $this->getOscarConfigurationService()->getPcruPartnerRoles(); + if ($pcruPartnerRoles === NULL || count($pcruPartnerRoles) === 0) { + $pcruInformationParDefaut->partenairesParDefautErreur = "Impossible de déterminer automatiquement les partenaires par défaut car la clé pcru_partner_roles n'est pas renseignée dans la configuration. Cette clé décrit une liste de rôles (par exemple ['Partenaires']) que doivent avoir les organisations liées à l'activité pour être considérées comme des partenaires du point de vue de PCRU."; + } else { + $partenaires = $activity->getOrganizationsWithOneRoleIn($pcruPartnerRoles); + if (count($partenaires) == 0) { + $pcruInformationParDefaut->partenairesParDefautInfo = "Impossible de déterminer automatiquement les partenaires par défaut car l'activité n'a aucun partenaire de type (" . implode(', ', $pcruPartnerRoles) . ")"; + } else { + $pcruInformationParDefaut->partenaires = ""; + foreach ($partenaires as $partenaire) { + if ($pcruInformationParDefaut->partenaires != '') { + $pcruInformationParDefaut->partenaires .= ' | '; + } + $pcruInformationParDefaut->partenaires .= $partenaire->getShortName(); + } + } + } + + $pcruPartenairePrincipalRoles = $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles(); + if ($pcruPartenairePrincipalRoles === NULL || count($pcruPartenairePrincipalRoles) === 0) { + $pcruInformationParDefaut->partenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement le partenaire principal par défaut car la clé pcru_partenaire_principal_roles n'est pas renseignée dans la configuration. Cette clé décrit une liste de rôles (par exemple ['Partenaires']) que doit avoir une organisation liée à l'activité pour être considérée comme le partenaire principal du point de vue de PCRU."; + } else { + $partenaires = $activity->getOrganizationsWithOneRoleIn($pcruPartenairePrincipalRoles); + if (count($partenaires) == 0) { + $pcruInformationParDefaut->partenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement le partenaire principal par défaut car l'activité n'a aucun partenaire de type (" . implode(', ', $pcruPartenairePrincipalRoles) . ")"; + } else if (count($partenaires) == 1) { + + $pcruInformationParDefaut->partenairePrincipal = $partenaires[0]->getShortName(); + + if ($partenaires[0]->getCodePcru() == NULL || mb_strlen(trim($partenaires[0]->getCodePcru())) == 0) { + $pcruInformationParDefaut->idPartenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement l'identifiant du partenaire principal par défaut car l'organization ([" . $partenaires[0]->getId() . "] " . $partenaires[0]->getShortName() . ") n'a ni SIRET, ni TVA intracommunautaire ni DUNS."; + } else { + $pcruInformationParDefaut->idPartenairePrincipal = $partenaires[0]->getCodePcru(); + } + + $partenaire = $partenaires[0]; + $avertissements = []; + if (mb_strlen(trim($partenaire->getShortName())) == 0) { + $avertissements[] = "Le nom court doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getFullName())) == 0) { + $avertissements[] = "Le nom complet doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getCodePcru())) == 0) { + $avertissements[] = "Le numéro SIRET, la TVA Intracommunautaire ou le DUNS doit être renseigné"; + } + if ($partenaire->getTypeEtablissementPcruObj() == NULL) { + $avertissements[] = "Le type d'établissement PCRU doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getStreet1())) == 0) { + $avertissements[] = "L'adresse (rue 1) doit être renseignée"; + } + if (mb_strlen(trim($partenaire->getZipCode())) == 0) { + $avertissements[] = "Le code postal doit être renseigné"; + } + if (mb_strlen(trim($partenaire->getCity())) == 0) { + $avertissements[] = "La ville doit être renseignée"; + } + if (mb_strlen(trim($partenaire->getCountry())) == 0) { + $avertissements[] = "Le pays doit être renseigné"; + } + if (count($avertissements) > 0) { + $pcruInformationParDefaut->avertissementsPartenaires[] = [ + "nom" => mb_strlen(trim($partenaire->getShortName())) == 0 ? $partenaire->getFullName() : $partenaire->getShortName(), + "id" => $partenaire->getId(), + "url" => $urlHelper == NULL ? "" : $urlHelper->fromRoute('organization/edit', ['id' => $partenaire->getId()]), + "erreurs" => $avertissements + ]; + } + } else { + $pcruInformationParDefaut->partenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement le partenaire principal par défaut car l'activité a plusieurs partenaires de type (" . implode(', ', $pcruPartenairePrincipalRoles) . ")"; + } + } + + $pcruInformationParDefaut->sourceFinancement = $activity->getPcruSourceFinancement() ? $activity->getPcruSourceFinancement()->getLabel() : NULL; + + if ($activity->getDateSigned() != NULL) { + $pcruInformationParDefaut->dateDerniereSignature = $activity->getDateSigned()->format('d-m-Y'); + } else { + $pcruInformationParDefaut->dateDerniereSignatureParDefautErreur = "Impossible de déterminer automatiquement la date de dernière signature car la date de signature n'est pas renseignée dans la fiche de l'activité."; + } + + if ($activity->getDateStart() != NULL) { + $pcruInformationParDefaut->dateDebut = $activity->getDateStart()->format('d-m-Y'); + } else { + $pcruInformationParDefaut->dateDebutParDefautErreur = "Impossible de déterminer automatiquement la date de début car la date de début du contrat n'est pas renseignée dans la fiche de l'activité."; + } + + if ($activity->getDateEnd() != NULL) { + $pcruInformationParDefaut->dateFin = $activity->getDateEnd()->format('d-m-Y'); + } else { + $pcruInformationParDefaut->dateFinParDefautErreur = "Impossible de déterminer automatiquement la date de fin car la date de fin du contrat n'est pas renseignée dans la fiche de l'activité."; + } + + $pcruInformationParDefaut->montantTotal = $activity->getAmount(); + $pcruInformationParDefaut->montantTotalDevise = $activity->getCurrency()->getLabel(); + + $pcruInformationParDefaut->validePoleCompetitivite = $activity->isPcruValidPoleCompetitivite() ? true : false; + + if ($activity->getPcruPoleCompetitivite()) { + $pcruInformationParDefaut->poleCompetitivite = $activity->getPcruPoleCompetitivite()->getLabel(); + } + + $pcruInformationParDefaut->reference = $activity->getOscarNum(); + + $this->validateParDefaut($pcruInformationParDefaut); + + return $pcruInformationParDefaut; + } + + /** + * Validation des informations PCRU d'une activité + * + * @param PcruInformationParDefaut $info + */ + public function validateParDefaut(PcruInformationParDefaut $info) + { + if ($info->objet == NULL || mb_strlen(trim($info->objet)) == 0) { + $info->objetErreurs[] = 'Le champ Objet est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->objet)) > 1000) { + $info->objetErreurs[] = 'Le champ Objet doit faire moins de 1000 caractères'; + } + + if ($info->labintel == NULL || mb_strlen(trim($info->labintel)) == 0) { + $info->labintelErreurs[] = 'Le champ CodeLabintelUnite est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->labintel)) > 10) { + $info->labintelErreurs[] = 'Le champ CodeLabintelUnite doit faire moins de 10 caractères'; + } + + $info->rnsrErreurs = $this->validateField($info->rnsr, 'CodeRNSRUnite', ActivityPcruInformations::RNSR_MAX_LENGTH, true); + + if ($info->sigle != NULL && mb_strlen(trim($info->sigle)) > 20) { + $info->sigleErreurs[] = 'Le champ SigleUnite doit faire moins de 20 caractères'; + } + + if ($info->numContrat == NULL || mb_strlen(trim($info->numContrat)) == 0) { + $info->numContratErreurs[] = 'Le champ ReferenceGestionnaire est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->numContrat)) > 30) { + $info->numContratErreurs[] = 'Le champ ReferenceGestionnaire doit faire moins de 30 caractères'; + } + + if ($info->typeContratId == NULL) { + $info->typeContratErreurs[] = 'Le champ TypeContrat est obligatoire et doit être défini'; + } + + if ($info->acronyme != NULL && mb_strlen(trim($info->acronyme)) > 50) { + $info->acronymeErreurs[] = 'Le champ Acronyme doit faire moins de 50 caractères'; + } + + if ($info->responsableScientifique == NULL || mb_strlen(trim($info->responsableScientifique)) == 0) { + $info->responsableScientifiqueErreurs[] = 'Le champ NomRespScientifique est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->responsableScientifique)) > 50) { + $info->responsableScientifiqueErreurs[] = 'Le champ NomRespScientifique doit faire moins de 50 caractères'; + } + + if ($info->partenaires != NULL && mb_strlen(trim($info->partenaires)) > 200) { + $info->partenairesErreurs[] = 'Le champ Partenaires doit faire moins de 200 caractères'; + } + + $info->partenairePrincipalErreurs = $this->validateField($info->partenairePrincipal, 'PartenairePrincipal', ActivityPcruInformations::PARTENAIRE_PRINCIPAL_MAX_LENGTH); + + $info->idPartenairePrincipalErreurs = $this->validateField($info->idPartenairePrincipal, 'IdPrincipal', ActivityPcruInformations::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH); + + $info->sourceFinancementErreurs = $this->validateField($info->sourceFinancement, 'SourceFinancement', null); + + $info->dateDerniereSignatureErreurs = $this->validateDateField($info->dateDerniereSignature, 'DateDerniereSignature'); + + $info->dateDebutErreurs = $this->validateDateField($info->dateDebut, 'DateDebut'); + + $info->dateFinErreurs = $this->validateDateField($info->dateFin, 'DateFin', true); + + if (count($info->dateDebutErreurs) == 0 && count($info->dateFinErreurs) == 0 && mb_strlen(trim($info->dateFin)) != 0) { + $debut = \DateTime::createFromFormat('d-m-Y', $info->dateDebut); + $fin = \DateTime::createFromFormat('d-m-Y', $info->dateFin); + if ($fin < $debut) { + $info->dateFinErreurs[] = "La date de fin doit être postérieure à la date de début"; + } + } + + if ($this->aPlusDeDeuxDecimales($info->montantTotal)) { + $info->montantTotalErreurs[] = 'Le champ MontantTotal ne doit pas avoir plus de deux chiffres après la virgule'; + } + if ($info->montantTotalDevise != "Euro") { + $info->montantTotalErreurs[] = 'Le champ MontantTotal doit être en euros'; + } + + if ($info->validePoleCompetitivite && mb_strlen(trim($info->poleCompetitivite)) == 0) { + $info->poleCompetitiviteErreurs[] = 'Si le contrat est validé par un pôle de compétitivité alors le champ PoleCompetitivite est obligatoire'; + } + + $info->referenceErreurs = $this->validateField($info->reference, 'ReferenceNonGestionnaire', ActivityPcruInformations::REFERENCE_MAX_LENGTH, true); + } + + private function validateField(?string $fieldValue, string $fieldName, ?int $fieldMaxLength, bool $nullAllowed = false): array { + $erreurs = []; + if (!$nullAllowed && mb_strlen(trim($fieldValue)) == 0) { + $erreurs[] = 'Le champ ' . $fieldName . ' est obligatoire et doit être défini'; + } else if ($fieldValue != NULL && $fieldMaxLength != NULL && mb_strlen(trim($fieldValue)) > $fieldMaxLength) { + $erreurs[] = 'Le champ ' . $fieldName . ' doit faire moins de ' . $fieldMaxLength . ' caractères'; + } + return $erreurs; + } + + private function validateDateField(?string $date, string $fieldName, bool $nullAllowed = false): array { + $erreurs = []; + $format = 'd-m-Y'; + if (!$nullAllowed && mb_strlen(trim($date)) == 0) { + $erreurs[] = 'Le champ ' . $fieldName . ' est obligatoire et doit être défini'; + } else if (mb_strlen(trim($date)) != 0) { + $d = \DateTime::createFromFormat($format, $date); + // The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue. + if (!$d || strtolower($d->format($format)) !== strtolower($date)) { + $erreurs[] = 'Le champ ' . $fieldName . ' doit être une date valide au format jj-mm-aaaa'; + } + } + return $erreurs; + } + + public function validatePasParDefaut(ActivityPcruInformations $activityPcruInformations): array + { + $erreurs = []; + $erreurs['objetErreurs'] = []; + if (!$activityPcruInformations->isUtiliserObjetParDefaut()) { + if ($activityPcruInformations->getObjet() == NULL || mb_strlen(trim($activityPcruInformations->getObjet())) == 0) { + $erreurs['objetErreurs'][] = 'Le champ Objet est obligatoire et doit être défini'; + } else if (mb_strlen(trim($activityPcruInformations->getObjet())) > 1000) { + $erreurs['objetErreurs'][] = 'Le champ Objet doit faire moins de 1000 caractères'; + } + } + $erreurs['labintelErreurs'] = []; + if (!$activityPcruInformations->isUtiliserLabintelParDefaut()) { + if ($activityPcruInformations->getLabintel() == NULL || mb_strlen(trim($activityPcruInformations->getLabintel())) == 0) { + $erreurs['labintelErreurs'][] = 'Le champ CodeLabintelUnite est obligatoire et doit être défini'; + } else if (mb_strlen(trim($activityPcruInformations->getLabintel())) > 10) { + $erreurs['labintelErreurs'][] = 'Le champ CodeLabintelUnite doit faire moins de 10 caractères'; + } + } + $erreurs['rnsrErreurs'] = $this->validateField($activityPcruInformations->getRnsr(), 'CodeRNSRUnite', ActivityPcruInformations::RNSR_MAX_LENGTH, true); + $erreurs['sigleErreurs'] = []; + if (!$activityPcruInformations->isUtiliserSigleParDefaut()) { + if ($activityPcruInformations->getSigle() == NULL && mb_strlen(trim($activityPcruInformations->getSigle())) > 20) { + $erreurs['sigleErreurs'][] = 'Le champ SigleUnite doit faire moins de 20 caractères'; + } + } + $erreurs['numContratErreurs'] = []; + if (!$activityPcruInformations->isUtiliserNumContratParDefaut()) { + if ($activityPcruInformations->getNumContrat() == NULL || mb_strlen(trim($activityPcruInformations->getNumContrat())) == 0) { + $erreurs['numContratErreurs'][] = 'Le champ ReferenceGestionnaire est obligatoire et doit être défini'; + } else if (mb_strlen(trim($activityPcruInformations->getNumContrat())) > 30) { + $erreurs['numContratErreurs'][] = 'Le champ ReferenceGestionnaire doit faire moins de 30 caractères'; + } + } + $erreurs['equipeErreurs'] = []; + if ($activityPcruInformations->getEquipe() != NULL && mb_strlen(trim($activityPcruInformations->getEquipe())) > 150) { + $erreurs['equipeErreurs'][] = 'Le champ Equipe doit faire moins de 150 caractères'; + } + $erreurs['typeContratErreurs'] = []; + if (!$activityPcruInformations->isUtiliserTypeContratParDefaut() && $activityPcruInformations->getPcruTypeContract() == NULL) { + $erreurs['typeContratErreurs'][] = 'Le champ TypeContrat est obligatoire et doit être défini'; + } + $erreurs['acronymeErreurs'] = []; + if (!$activityPcruInformations->isUtiliserAcronymeParDefaut() && $activityPcruInformations->getAcronyme() != NULL && mb_strlen(trim($activityPcruInformations->getAcronyme())) > 50) { + $erreurs['acronymeErreurs'][] = 'Le champ Acronyme doit faire moins de 50 caractères'; + } + $erreurs['contratsAssociesErreurs'] = []; + if ($activityPcruInformations->getContratsAssocies() != NULL && mb_strlen(trim($activityPcruInformations->getContratsAssocies())) > 300) { + $erreurs['contratsAssociesErreurs'][] = 'Le champ ContratsAssocies doit faire moins de 300 caractères'; + } + $erreurs['responsableScientifiqueErreurs'] = []; + if (!$activityPcruInformations->isUtiliserResponsableScientifiqueParDefaut()) { + if ($activityPcruInformations->getResponsableScientifique() == NULL || mb_strlen(trim($activityPcruInformations->getResponsableScientifique())) == 0) { + $erreurs['responsableScientifiqueErreurs'][] = 'Le champ NomRespScientifique est obligatoire et doit être défini'; + } else if (mb_strlen(trim($activityPcruInformations->getResponsableScientifique())) > 50) { + $erreurs['responsableScientifiqueErreurs'][] = 'Le champ NomRespScientifique doit faire moins de 50 caractères'; + } + } + $erreurs['employeurResponsableScientifiqueErreurs'] = []; + if ($activityPcruInformations->getEmployeurResponsableScientifique() != NULL && mb_strlen(trim($activityPcruInformations->getEmployeurResponsableScientifique())) > 50) { + $erreurs['employeurResponsableScientifiqueErreurs'][] = 'Le champ EmployeurRespScientifique doit faire moins de 50 caractères'; + } + $erreurs['partenairesErreurs'] = []; + if (!$activityPcruInformations->isUtiliserPartenairesParDefaut() && $activityPcruInformations->getPartenaires() != NULL && mb_strlen(trim($activityPcruInformations->getPartenaires())) > 200) { + $erreurs['partenairesErreurs'][] = 'Le champ Partenaires doit faire moins de 200 caractères'; + } + + $erreurs['partenairePrincipalErreurs'] = []; + if (!$activityPcruInformations->isUtiliserPartenairePrincipalParDefaut()) { + $erreurs['partenairePrincipalErreurs'] = $this->validateField($activityPcruInformations->getPartenairePrincipal(), 'PartenairePrincipal', ActivityPcruInformations::PARTENAIRE_PRINCIPAL_MAX_LENGTH); + } + + $erreurs['idPartenairePrincipalErreurs'] = []; + if (!$activityPcruInformations->isUtiliserIdPartenairePrincipalParDefaut()) { + $erreurs['idPartenairePrincipalErreurs'] = $this->validateField($activityPcruInformations->getIdPartenairePrincipal(), 'IdPrincipal', ActivityPcruInformations::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH); + } + + $erreurs['lieuExecutionErreurs'] = $this->validateField($activityPcruInformations->getLieuExecution(), 'LieuExecution', ActivityPcruInformations::LIEU_EXECUTION_MAX_LENGTH, true); + + $erreurs['dateDerniereSignatureErreurs'] = []; + if (!$activityPcruInformations->isUtiliserDateDerniereSignatureParDefaut()) { + $erreurs['dateDerniereSignatureErreurs'] = $this->validateDateField($activityPcruInformations->getDateDerniereSignature(), 'DateDerniereSignature'); + } + + $erreurs['dureeErreurs'] = []; + if ($activityPcruInformations->getDuree() !== NULL) { + if ($activityPcruInformations->getDuree() > 999.5) { + $erreurs['dureeErreurs'][] = "Le champ Duree contient une valeur trop grande."; + } else if ($activityPcruInformations->getDuree() < 0.5) { + $erreurs['dureeErreurs'][] = "Le champ Duree ne peut pas être plus petit que 0,5 mois."; + } + $decimales = abs($activityPcruInformations->getDuree()) - floor(abs($activityPcruInformations->getDuree())); + if ($decimales != 0 && $decimales != 0.5) { + $erreurs['dureeErreurs'][] = "Si le champ Duree doit avoir une valeur après la virgule, ça ne peut être que 0,5"; + } + } + + $erreurs['dateDebutErreurs'] = []; + if (!$activityPcruInformations->isUtiliserDateDebutParDefaut()) { + $erreurs['dateDebutErreurs'] = $this->validateDateField($activityPcruInformations->getDateDebut(), 'DateDebut'); + } + + $erreurs['dateFinErreurs'] = []; + if (!$activityPcruInformations->isUtiliserDateFinParDefaut()) { + $erreurs['dateFinErreurs'] = $this->validateDateField($activityPcruInformations->getDateFin(), 'DateFin', true); + } + + if ($activityPcruInformations->getDuree() === NULL && !$activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($activityPcruInformations->getDateFin())) == 0) { + $erreurs['dateFinErreurs'][] = "Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."; + $erreurs['dureeErreurs'][] = "Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être."; + } + + if (!$activityPcruInformations->isUtiliserDateDebutParDefaut() && count($erreurs['dateDebutErreurs']) == 0 && !$activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($activityPcruInformations->getDateFin())) != 0 && count($erreurs['dateFinErreurs']) == 0) { + $debut = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateDebut()); + $fin = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateFin()); + if ($fin < $debut) { + $erreurs['dateFinErreurs'][] = "La date de fin doit être postérieure à la date de début"; + } + } + + $erreurs['montantPercuUniteErreurs'] = []; + if ($activityPcruInformations->getMontantPercuUnite() === NULL) { + $erreurs['montantPercuUniteErreurs'][] = 'Le champ MontantPercuUnite est obligatoire et doit être défini'; + } else { + if ($activityPcruInformations->getMontantPercuUnite() > 9999999999.99) { + $erreurs['montantPercuUniteErreurs'][] = "Le champ MontantPercuUnite contient une valeur trop grande."; + } else if ($activityPcruInformations->getMontantPercuUnite() < -9999999999.99) { + $erreurs['montantPercuUniteErreurs'][] = "Le champ MontantPercuUnite contient une valeur trop petite."; + } + } + + $erreurs['contributionFinanceurErreurs'] = []; + if ($activityPcruInformations->getContributionFinanceur() !== NULL) { + if ($activityPcruInformations->getContributionFinanceur() > 9999999999.99) { + $erreurs['contributionFinanceurErreurs'][] = "Le champ ContributionFinanceur contient une valeur trop grande."; + } else if ($activityPcruInformations->getContributionFinanceur() < -9999999999.99) { + $erreurs['contributionFinanceurErreurs'][] = "Le champ ContributionFinanceur contient une valeur trop petite."; + } + } + + $erreurs['montantTotalErreurs'] = []; + if ($activityPcruInformations->getMontantTotal() !== NULL) { + if ($activityPcruInformations->getMontantTotal() > 9999999999.99) { + $erreurs['montantTotalErreurs'][] = "Le champ MontantTotal contient une valeur trop grande."; + } else if ($activityPcruInformations->getMontantTotal() < -9999999999.99) { + $erreurs['montantTotalErreurs'][] = "Le champ MontantTotal contient une valeur trop petite."; + } + } + + $erreurs['commentairesErreurs'] = $this->validateField($activityPcruInformations->getCommentaires(), 'Commentaire', ActivityPcruInformations::COMMENTAIRES_MAX_LENGTH, true); + + $erreurs['referenceErreurs'] = []; + + if (!$activityPcruInformations->isUtiliserReferenceParDefaut()) { + $this->validateField($activityPcruInformations->getReference(), 'ReferenceNonGestionnaire', ActivityPcruInformations::REFERENCE_MAX_LENGTH, true); + } + + return $erreurs; + } + + /** + * Validation des informations PCRU d'une activité + * + * @param PcruInformation $info + */ + public function validate(PcruInformation $info): array + { + $errors = []; + $errorsObjet = []; + if ($info->objet == NULL || mb_strlen(trim($info->objet)) == 0) { + $errorsObjet[] = 'Le champ Objet est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->objet)) > 1000) { + $errorsObjet[] = 'Le champ Objet doit faire moins de 1000 caractères'; + } + if (count($errorsObjet) > 0) { + $errors['objet'] = $errorsObjet; + } + + $errorsLabintel = []; + if ($info->labintel == NULL || mb_strlen(trim($info->labintel)) == 0) { + $errorsLabintel[] = 'Le champ CodeLabintelUnite est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->labintel)) > 10) { + $errorsLabintel[] = 'Le champ CodeLabintelUnite doit faire moins de 10 caractères'; + } + if (count($errorsLabintel) > 0) { + $errors['labintel'] = $errorsLabintel; + } + + $errorsRnsr = $this->validateField($info->rnsr, 'CodeRNSRUnite', ActivityPcruInformations::RNSR_MAX_LENGTH, true); + if (count($errorsRnsr) > 0) { + $errors['rnsr'] = $errorsRnsr; + } + + $errorsSigle = []; + if ($info->sigle != NULL && mb_strlen(trim($info->sigle)) > 20) { + $errorsSigle[] = 'Le champ SigleUnite doit faire moins de 20 caractères'; + } + if (count($errorsSigle) > 0) { + $errors['sigle'] = $errorsSigle; + } + + $errorsNumContrat = []; + if ($info->numContrat == NULL || mb_strlen(trim($info->numContrat)) == 0) { + $errorsNumContrat[] = 'Le champ ReferenceGestionnaire est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->numContrat)) > 30) { + $errorsNumContrat[] = 'Le champ ReferenceGestionnaire doit faire moins de 30 caractères'; + } + if (count($errorsNumContrat) > 0) { + $errors['numContrat'] = $errorsNumContrat; + } + + $errorsEquipe = []; + if ($info->equipe != NULL && mb_strlen(trim($info->equipe)) > 150) { + $errorsEquipe[] = 'Le champ Equipe doit faire moins de 150 caractères'; + } + if (count($errorsEquipe) > 0) { + $errors['equipe'] = $errorsEquipe; + } + + $errorsTypeContrat = []; + if ($info->typeContrat == NULL) { + $errorsTypeContrat[] = 'Le champ TypeContrat est obligatoire et doit être défini'; + } + if (count($errorsTypeContrat) > 0) { + $errors['typeContrat'] = $errorsTypeContrat; + } + + $errorsAcronyme = []; + if ($info->acronyme != NULL && mb_strlen(trim($info->acronyme)) > 50) { + $errorsAcronyme[] = 'Le champ Acronyme doit faire moins de 50 caractères'; + } + if (count($errorsAcronyme) > 0) { + $errors['acronyme'] = $errorsAcronyme; + } + + $errorsContratsAssocies = []; + if ($info->contratsAssocies != NULL && mb_strlen(trim($info->contratsAssocies)) > 300) { + $errorsContratsAssocies[] = 'Le champ ContratsAssocies doit faire moins de 300 caractères'; + } + if (count($errorsContratsAssocies) > 0) { + $errors['contratsAssocies'] = $errorsContratsAssocies; + } + + $errorsResponsableScientifique = []; + if ($info->responsableScientifique == NULL || mb_strlen(trim($info->responsableScientifique)) == 0) { + $errorsResponsableScientifique[] = 'Le champ NomRespScientifique est obligatoire et doit être défini'; + } else if (mb_strlen(trim($info->responsableScientifique)) > 50) { + $errorsResponsableScientifique[] = 'Le champ NomRespScientifique doit faire moins de 50 caractères'; + } + if (count($errorsResponsableScientifique) > 0) { + $errors['responsableScientifique'] = $errorsResponsableScientifique; + } + + $errorsEmployeurResponsableScientifique = []; + if ($info->employeurResponsableScientifique != NULL && mb_strlen(trim($info->employeurResponsableScientifique)) > 50) { + $errorsEmployeurResponsableScientifique[] = 'Le champ EmployeurRespScientifique doit faire moins de 50 caractères'; + } + if (count($errorsEmployeurResponsableScientifique) > 0) { + $errors['employeurResponsableScientifique'] = $errorsEmployeurResponsableScientifique; + } + + $errorsPartenaires = []; + if ($info->partenaires != NULL && mb_strlen(trim($info->partenaires)) > 200) { + $errorsPartenaires[] = 'Le champ Partenaires doit faire moins de 200 caractères'; + } + if (count($errorsPartenaires) > 0) { + $errors['partenaires'] = $errorsPartenaires; + } + + $errorsPartenairePrincipal = $this->validateField($info->partenairePrincipal, 'PartenairePrincipal', ActivityPcruInformations::PARTENAIRE_PRINCIPAL_MAX_LENGTH); + if (count($errorsPartenairePrincipal) > 0) { + $errors['partenairePrincipal'] = $errorsPartenairePrincipal; + } + + $errorsIdPartenairePrincipal = $this->validateField($info->idPartenairePrincipal, 'IdPrincipal', ActivityPcruInformations::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH); + if (count($errorsIdPartenairePrincipal) > 0) { + $errors['idPartenairePrincipal'] = $errorsIdPartenairePrincipal; + } + + $errorsSourceFinancement = $this->validateField($info->sourceFinancement, 'SourceFinancement', null); + if (count($errorsSourceFinancement) > 0) { + $errors['sourceFinancement'] = $errorsSourceFinancement; + } + + // La spec dit que le champ est obligatoire, mais le formulaire de saisie de contrat sur le site web PCRU et les export CSV montrent qu'en fait non. + $errorsLieuExecution = $this->validateField($info->lieuExecution, 'LieuExecution', ActivityPcruInformations::LIEU_EXECUTION_MAX_LENGTH, true); + if (count($errorsLieuExecution) > 0) { + $errors['lieuExecution'] = $errorsLieuExecution; + } + + $errorsDateDerniereSignature = $this->validateDateField($info->dateDerniereSignature, 'DateDerniereSignature'); + if (count($errorsDateDerniereSignature) > 0) { + $errors['dateDerniereSignature'] = $errorsDateDerniereSignature; + } + + $errorsDuree = []; + if ($info->duree !== NULL) { + if ($info->duree > 999.5) { + $errorsDuree[] = "Le champ Duree contient une valeur trop grande."; + } else if ($info->duree < 0.5) { + $errorsDuree[] = "Le champ Duree ne peut pas être plus petit que 0,5 mois."; + } + $decimales = abs($info->duree) - floor(abs($info->duree)); + if ($decimales != 0 && $decimales != 0.5) { + $errorsDuree[] = "Si le champ Duree doit avoir une valeur après la virgule, ça ne peut être que 0,5"; + } + } else if (mb_strlen(trim($info->dateFin)) == 0) { + $errorsDuree[] = "Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être."; + } + if (count($errorsDuree) > 0) { + $errors['duree'] = $errorsDuree; + } + + $errorsDateDebut = $this->validateDateField($info->dateDebut, 'DateDebut'); + if (count($errorsDateDebut) > 0) { + $errors['dateDebut'] = $errorsDateDebut; + } + + $errorsDateFin = $this->validateDateField($info->dateFin, 'DateFin', true); + if (mb_strlen(trim($info->dateFin)) == 0 && $info->duree === NULL) { + $errorsDateFin[] = "Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."; + } + if (count($errorsDateDebut) == 0 && mb_strlen(trim($info->dateFin)) != 0 && count($errorsDateFin) == 0) { + $debut = \DateTime::createFromFormat('d-m-Y', $info->dateDebut); + $fin = \DateTime::createFromFormat('d-m-Y', $info->dateFin); + if ($fin < $debut) { + $errorsDateFin[] = "La date de fin doit être postérieure à la date de début"; + } + } + if (count($errorsDateFin) > 0) { + $errors['dateFin'] = $errorsDateFin; + } + + $errorsMontantPercuUnite = []; + if ($info->montantPercuUnite === NULL) { + $errorsMontantPercuUnite[] = "Le champ MontantPercuUnite est obligatoire et doit être défini"; + } else { + if ($info->montantPercuUnite > 9999999999.99) { + $errorsMontantPercuUnite[] = "Le champ MontantPercuUnite contient une valeur trop grande."; + } else if ($info->montantPercuUnite < -9999999999.99) { + $errorsMontantPercuUnite[] = "Le champ MontantPercuUnite contient une valeur trop petite."; + } + } + if (count($errorsMontantPercuUnite) > 0) { + $errors['montantPercuUnite'] = $errorsMontantPercuUnite; + } + + $errorsContributionFinanceur = []; + if ($info->contributionFinanceur !== NULL) { + if ($info->contributionFinanceur > 9999999999.99) { + $errorsContributionFinanceur[] = "Le champ ContributionFinanceur contient une valeur trop grande."; + } else if ($info->contributionFinanceur < -9999999999.99) { + $errorsContributionFinanceur[] = "Le champ ContributionFinanceur contient une valeur trop petite."; + } + } + if (count($errorsContributionFinanceur) > 0) { + $errors['contributionFinanceur'] = $errorsContributionFinanceur; + } + + $errorsMontantTotal = []; + if ($info->montantTotal !== NULL) { + if ($info->montantTotal > 9999999999.99) { + $errorsMontantTotal[] = "Le champ MontantTotal contient une valeur trop grande."; + } else if ($info->montantTotal < -9999999999.99) { + $errorsMontantTotal[] = "Le champ MontantTotal contient une valeur trop petite."; + } + if ($info->montantTotalDevise != "Euro") { + $errorsMontantTotal[] = 'Le champ MontantTotal doit être en euros'; + } + if ($this->aPlusDeDeuxDecimales($info->montantTotal)) { + $errorsMontantTotal[] = 'Le champ MontantTotal ne doit pas avoir plus de deux chiffres après la virgule'; + } + } + if (count($errorsMontantTotal) > 0) { + $errors['montantTotal'] = $errorsMontantTotal; + } + + $errorsPoleCompetitivite = []; + if ($info->validePoleCompetitivite && mb_strlen(trim($info->poleCompetitivite)) == 0) { + $errorsPoleCompetitivite[] = 'Si le contrat est validé par un pôle de compétitivité alors le champ PoleCompetitivite est obligatoire'; + } + if (count($errorsPoleCompetitivite) > 0) { + $errors['poleCompetitivite'] = $errorsPoleCompetitivite; + } + + $errorsCommentaires = $this->validateField($info->commentaires, 'Commentaire', ActivityPcruInformations::COMMENTAIRES_MAX_LENGTH, true); + if (count($errorsCommentaires) > 0) { + $errors['commentaires'] = $errorsCommentaires; + } + + $errorsReference = $this->validateField($info->reference, 'ReferenceNonGestionnaire', ActivityPcruInformations::REFERENCE_MAX_LENGTH, true); + if (count($errorsReference) > 0) { + $errors['reference'] = $errorsReference; + } + + return $errors; + } + + private function aPlusDeDeuxDecimales(float $f): bool { + return (abs($f) - floor(abs($f) * 100) / 100) !== 0.0; + } +} diff --git a/module/Oscar/src/Oscar/Service/PcruInformationsServiceFactory.php b/module/Oscar/src/Oscar/Service/PcruInformationsServiceFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..9c4b5b85d897fd2e607034d1e31911a992c6db82 --- /dev/null +++ b/module/Oscar/src/Oscar/Service/PcruInformationsServiceFactory.php @@ -0,0 +1,18 @@ +setOscarConfigurationService($container->get(OscarConfigurationService::class)); + $s->setEntityManager($container->get(EntityManager::class)); + return $s; + } +} diff --git a/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php b/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php index e50ae36fe0162cac80adf47b595fc74811bac8e3..bd93203ca4233d7507c5f87e55703240ba05f81f 100644 --- a/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php +++ b/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php @@ -14,6 +14,7 @@ use Oscar\Entity\ActivityNote; use Oscar\Entity\ActivityNoteRepository; use Oscar\Entity\ActivityOrganization; use Oscar\Entity\ActivityPayment; +use Oscar\Entity\ActivityPcruInformations; use Oscar\Entity\ActivityPerson; use Oscar\Entity\ActivityRepository; use Oscar\Entity\ActivityType; @@ -85,6 +86,7 @@ class ProjectGrantApiService implements UseEntityManager, const PERIMETER_SPENTS = 'spents'; const PERIMETER_TIMESHEETS = 'timesheets'; const PERIMETER_WORKPACKAGES = 'workpackages'; + const PERIMETER_PCRU = 'pcru'; /** * @return string[] @@ -106,6 +108,7 @@ class ProjectGrantApiService implements UseEntityManager, self::PERIMETER_SPENTS, self::PERIMETER_TIMESHEETS, self::PERIMETER_WORKPACKAGES, + self::PERIMETER_PCRU, ]; } @@ -399,6 +402,12 @@ class ProjectGrantApiService implements UseEntityManager, ) ]; break; + case 'pcru': + $credentials['pcru'] = [ + 'read' => $oscarUserContext->hasPrivileges(Privileges::ACTIVITY_PCRU, $activity), + 'edit' => $oscarUserContext->hasPrivileges(Privileges::ACTIVITY_PCRU_ACTIVATE, $activity) + ]; + break; } } @@ -483,6 +492,10 @@ class ProjectGrantApiService implements UseEntityManager, $urlPlugin ); break; + + case self::PERIMETER_PCRU: + $datas[self::PERIMETER_PCRU] = $this->getPcruActivity($activity, $urlPlugin); + break; } } @@ -553,7 +566,7 @@ class ProjectGrantApiService implements UseEntityManager, 'edit' => $urlPlugin->fromRoute('contract/edit', ['id' => $activity->getId()]), 'change_project' => $urlPlugin->fromRoute('contract/moveToProject', ['id' => $activity->getId()]), 'new_project' => $urlPlugin->fromRoute('project/new') . '?ids=' . $activity->getId(), - 'pcru' => $urlPlugin->fromRoute('contract/pcru-infos', ['id' => $activity->getId()]) + 'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()]) ] ]; } @@ -976,7 +989,9 @@ class ProjectGrantApiService implements UseEntityManager, 'enrolledLabel' => $activityOrganization->getOrganization()->getFullName(), 'past' => !$activityOrganization->isActive(), 'start' => $this->formatDateTime($activityOrganization->getDateStart()), - 'end' => $this->formatDateTime($activityOrganization->getDateEnd()) + 'end' => $this->formatDateTime($activityOrganization->getDateEnd()), + 'labintel' => $activityOrganization->getOrganization()->getLabintel(), + 'shortname' => $activityOrganization->getOrganization()->getShortName() ]; } return [ @@ -1094,6 +1109,18 @@ class ProjectGrantApiService implements UseEntityManager, return $out; } + /** + * @param Activity $activity + * @param Url|null $urlPlugin + * @return \Oscar\Service\PcruInformationComplete + */ + public function getPcruActivity(Activity $activity, ?Url $urlPlugin = null): \Oscar\Service\PcruInformationComplete + { + /** @var PcruInformationsService $pcruInformationsService */ + $pcruInformationsService = $this->getServiceContainer()->get(PcruInformationsService::class); + return $pcruInformationsService->getPcruInformationsForActivity($activity, $urlPlugin); + } + /** * @param Activity $activity * @param Url|null $urlPlugin diff --git a/module/Oscar/src/Oscar/Service/ProjectGrantService.php b/module/Oscar/src/Oscar/Service/ProjectGrantService.php index e67ceb508b6ca8b540b522e64aad089730b298dc..57809b612535e476af8864e244acd960663afc43 100644 --- a/module/Oscar/src/Oscar/Service/ProjectGrantService.php +++ b/module/Oscar/src/Oscar/Service/ProjectGrantService.php @@ -36,6 +36,8 @@ use Oscar\Entity\PcruSourceFinancement; use Oscar\Entity\PcruSourceFinancementRepository; use Oscar\Entity\PcruTypeContract; use Oscar\Entity\PcruTypeContractRepository; +use Oscar\Entity\PcruTypeEtablissement; +use Oscar\Entity\PcruTypeEtablissementRepository; use Oscar\Entity\Person; use Oscar\Entity\Project; use Oscar\Entity\Role; @@ -3450,12 +3452,16 @@ class ProjectGrantService implements UseGearmanJobLauncherService, UseOscarConfi /** @var PcruSourceFinancement $poleRepository */ $sourceFinancementRepository = $this->getEntityManager()->getRepository(PcruSourceFinancement::class); + $sourcesFinancement = $sourceFinancementRepository->createQueryBuilder('s') + ->orderBy('s.label', 'ASC') + ->getQuery()->getResult(); + $out = [ '' => 'Aucune' ]; /** @var PcruSourceFinancement $sourceFinancement */ - foreach ($sourceFinancementRepository->findAll() as $sourceFinancement) { + foreach ($sourcesFinancement as $sourceFinancement) { $out[$sourceFinancement->getLabel()] = $sourceFinancement->getLabel(); } @@ -3653,6 +3659,23 @@ class ProjectGrantService implements UseGearmanJobLauncherService, UseOscarConfi } } + /** + * @param string $format + * @return mixed + * @throws OscarException + */ + public function getPcruTypesEtablissement($format = AsArrayFormatter::ARRAY_FLAT) + { + /** @var PcruTypeEtablissementRepository $repository */ + $repository = $this->getEntityManager()->getRepository(PcruTypeEtablissement::class); + if ($format == AsArrayFormatter::ARRAY_FLAT) { + return $repository->getFlatArrayLabel(); + } + else { + throw new OscarException("Format pour la liste des types d'établissement PCRU non-disponible"); + } + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// /// REPOSITORY ACCESS diff --git a/module/Oscar/src/Oscar/Traits/UsePcruFtpService.php b/module/Oscar/src/Oscar/Traits/UsePcruFtpService.php new file mode 100644 index 0000000000000000000000000000000000000000..e72696653be5bf5e9a983865eb376b3ed95110c1 --- /dev/null +++ b/module/Oscar/src/Oscar/Traits/UsePcruFtpService.php @@ -0,0 +1,17 @@ +pcruFtpService; + } + + /** + * @param PcruFtpService $pcruFtpService + */ + public function setPcruFtpService(PcruFtpService $pcruFtpService): void + { + $this->pcruFtpService = $pcruFtpService; + } +} diff --git a/module/Oscar/src/Oscar/Traits/UsePcruInformationsService.php b/module/Oscar/src/Oscar/Traits/UsePcruInformationsService.php new file mode 100644 index 0000000000000000000000000000000000000000..94b9ab0823ba7bdaa87eb0e926254fbf978610a0 --- /dev/null +++ b/module/Oscar/src/Oscar/Traits/UsePcruInformationsService.php @@ -0,0 +1,17 @@ +pcruInformationsService; + } + + /** + * @param PcruInformationsService $pcruInformationsService + */ + public function setPcruInformationsService(PcruInformationsService $pcruInformationsService): void + { + $this->pcruInformationsService = $pcruInformationsService; + } +} diff --git a/module/Oscar/src/Oscar/Utils/PCRUCvsFile.php b/module/Oscar/src/Oscar/Utils/PCRUCvsFile.php deleted file mode 100644 index 2f976a4718bfbe1b6458069ee0f6fc43dfe60642..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Utils/PCRUCvsFile.php +++ /dev/null @@ -1,405 +0,0 @@ -pcruService = $pcruService; - $this->path = $directory == null ? $pcruService->getOscarConfigurationService()->getPcruDirectoryForUpload() : $directory; - $this->datas = []; - $this->logs = []; - $this->headers = $pcruService->getHeaders(); - } - - /** - * Ajoute l'entrée PCRU au cache. - * - * @param ActivityPcruInfos $info - * @return $this - */ - public function addEntry(ActivityPcruInfos $info): self - { - $this->datas[$info->getNumContratTutelleGestionnaire()] = $info; - return $this; - } - - /** - * @return ActivityPcruInfos[] - */ - public function getEntries(): array - { - return $this->datas; - } - - /** - * Retourne TRUE si la données PCRU est déjà référencée. - * - * @param ActivityPcruInfos $info - * @return bool - */ - public function entryExist(ActivityPcruInfos $info): bool - { - return array_key_exists($info->getNumContratTutelleGestionnaire(), $this->datas); - } - - public function read(): self - { - return $this->readCSV()->readBDD(); - } - - /** - * Extraction de la base de données des donnèes PCRU à envoyée. - */ - public function readBDD(): self - { - $this->log("Lecture depuis la base de données"); - $infos = $this->pcruService->getActivityPCRUInfoRepository()->getInfosSendable(); - $added = 0; - - /** @var ActivityPcruInfos $info */ - foreach ($infos as $info) { - if ($this->entryExist($info)) { - $this->log("PASSED $info est déjà prête."); - } else { - $this->addEntry($info); - $added++; - } - } - - $this->log(sprintf('%s nouvelle(s) entrée(s) ajoutée(s) depuis la BDD.', $added)); - - return $this; - } - - /** - * Extraction des données à partir du fichier CSV existant. - */ - public function readCSV(): self - { - $path = $this->pcruService->getOscarConfigurationService()->getPcruContratFile(); - - $this->log("Lecture à partir du fichier $path"); - - if (file_exists($path)) { - if (($handle = fopen($path, "r")) !== FALSE) { - $row = 0; - while (($data = fgetcsv($handle, 0, ";")) !== FALSE) { - // On saute le première ligne - if ($row == 0) { - $row++; - continue; - } - // Récupération de la donnée côté Oscar à partir du numéro Oscar - $numOscar = $data[3]; - $info = $this->pcruService->getInfosByNumOscar($numOscar); - - if ($info == null) { - $this->log("WARNING : L'activité $numOscar n'est pas dans les données PCRU"); - } else { - $this->addEntry($info); - $row++; - } - } - fclose($handle); - $this->log(sprintf('%s nouvelle(s) entrée(s) ajoutée(s) depuis le CSV.', ($row - 1))); - } - } else { - $this->log("Le fichier n'existe pas, il sera créé."); - } - return $this; - } - - /** - * @param $numOscar - * @return $this - */ - public function remove(ActivityPcruInfos $activityPcruInfo): self - { - if( array_key_exists($activityPcruInfo->getNumContratTutelleGestionnaire(), $this->datas) ){ - unset($this->datas[$activityPcruInfo->getNumContratTutelleGestionnaire()]); - $filedest = $this->path . DIRECTORY_SEPARATOR . $activityPcruInfo->getSignedFileName(); - unlink($filedest); - } - return $this; - } - - public function getLogs(): string - { - return implode("\n", $this->logs); - } - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// - /// GENERATION des FICHIERS - /// - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - public function purgeFiles() - { - $files = glob($this->pcruService->getOscarConfigurationService()->getPcruDirectoryForUpload() . DIRECTORY_SEPARATOR . '*'); - foreach($files as $file){ // iterate files - if(is_file($file)) { - unlink($file); // delete file - } - } - } - - public function generateFiles(): self - { - $this->readCSV() - ->readBDD() - ->writeContratsCsv() - ->writeContratsPDF(); - - return $this; - } - - /** - * écriture des données CSV. - * - * @return $this - * @throws \Oscar\Exception\OscarException - */ - public function writeContratsCsv($dest = null, EntityManager $em = null) - { - $headers = $this->getHeaders(); - if ($dest == null) { - $dest = $this->pcruService->getOscarConfigurationService()->getPcruContratFile(); - } - $handler = fopen($dest, 'w'); - fputcsv($handler, array_keys($this->getHeaders()), ';'); - foreach ($this->getData($em) as $data) { - fputcsv($handler, $data, ';'); - } - return $this; - } - - /** - * Retourne le contenu du document (Contrat Signé) référencé dans les informations PCRU. - * - * @param ActivityPcruInfos $pcruInfos - * @return string - * @throws OscarException - */ - public function getDocumentSignedFromPcruInfo(ActivityPcruInfos $pcruInfos): string - { - /** @var ContractDocument $document */ - $document = $this->pcruService->getEntityManager() - ->getRepository(ContractDocument::class) - ->find($pcruInfos->getDocumentId()); - - $docpath = $this->pcruService->getOscarConfigurationService()->getDocumentDropLocation() - . DIRECTORY_SEPARATOR - . $document->getPath(); - - return file_get_contents($docpath); - } - - /** - * @return $this - */ - public function writeContratsPDF() - { - $this->log("# Copie des contrats PDF dans " . $this->path); - $returnedInfos = []; - - /** @var ActivityPcruInfos $info */ - foreach ($this->getEntries() as $info) { - - // traitement du document - $filedest = $this->path . DIRECTORY_SEPARATOR . $info->getSignedFileName(); - - $doccontent = $this->getDocumentSignedFromPcruInfo($info); - - $this->log("Ajout du document"); - file_put_contents($filedest, $doccontent); - - $returnedInfos[] = $info; - } - - return $this; - } - - /** - * écriture du fichier des partenaires. - * - * @param null $dest - * @return $this - * @throws OscarException - */ - public function writePartenairesCSV($dest = null) - { - if ($dest == null) { - $dest = $this->pcruService->getOscarConfigurationService()->getPcruPartenaireFile(); - } - $this->log("# Création du fichier partenaires " . $dest); - $handler = fopen($dest, 'w'); - - $partenairesCodes = []; - /** @var ActivityPcruInfos $pcruInfo */ - foreach ($this->getEntries() as $pcruInfo) { - $codes = explode('|', $pcruInfo->getPartenaires()); - - foreach ($codes as $code) { - // TODO code PCRU - if ($code != '') { - if (!array_key_exists($code, $partenairesCodes)) { - try { - $partenairesCodes[$code] = $this->pcruService->getOrganizationByCodePCRU($code); - } catch (NoResultException $e) { - throw new OscarException("Impossible de trouver les données pour le partenaire $code"); - } catch (NonUniqueResultException $e) { - throw new OscarException("Plusieurs organisations partagent un même code: $code"); - } catch (\Exception $e) { - throw new OscarException("Un erreur est survenue la du chargement de l'organisations $code : " . $e->getMessage()); - } - } - } - } - } - - if (count($partenairesCodes) > 0) { - fputcsv($handler, $this->pcruService->getParenairesHeaders(), ';'); - foreach ($partenairesCodes as $organization) { - fputcsv($handler, $this->pcruService->getPartenaireData($organization), ';'); - } - } - - return $this; - } - - - public function makeZip(): ?string - { - $this->log("# Création d'un ZIP"); - $filename = "oscar-pcru-" . date('Ymd_His') . '.zip'; - $tmpfile = '/tmp/' . uniqid() . $filename; - - $this->log(" - Fichier temporaire : $tmpfile"); - - $zip = new \ZipArchive(); - if ($zip->open($tmpfile, \ZipArchive::CREATE) !== TRUE) { - throw new OscarException("Impossible de créer l'archive"); - } - - foreach ($this->pcruService->getUploadableFiles($this->path) as $info) { - $this->log(" - Ajout de : " . $info['name']); - $zip->addFile($info['path'], $info['name']); - } - - $zip->close(); - - echo file_get_contents($tmpfile); - - unlink($tmpfile); - - return null; - } - - public function downloadZip(): void - { - $filename = "oscar-pcru-" . date('Ymd_His') . '.zip'; - header('Content-Description: File Transfer'); - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="' . $filename . '"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate'); - header('Pragma: public'); - $this->makeZip(); - exit; - } - - /** - * Retourne les données sous le forme d'un tableau associatif. - * - * @return array - */ - public function getData(EntityManager $em = null): array - { - $datas = []; - - // Ajout des donnèes - /** @var ActivityPcruInfos $info */ - foreach ($this->datas as $info) { - $datas[] = $info->toArray($em); - } - - return $datas; - } - - - /** - * Retourne les en-têtes - * @return array - */ - public function getHeaders(): array - { - return $this->headers; - } - - public function printInSymfonyConsole(SymfonyStyle $symfonyStyle): void - { - $symfonyStyle->table($this->getHeaders(), $this->getData()); - } - - public function debug(string $str): void - { - echo $str; - } - - /** - * Ajoute en entrée aux logs - * @param string $str - */ - public function log(string $str): void - { - $this->pcruService->logPool($str); - } - - - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - /** - * Création et initalisation depuis un fichier CSV. - * - * @param string $path - * @return self - */ - public static function createFromPath(string $path, PCRUService $pcruService): PCRUCvsFile - { - throw new \Exception("DEPRECATED"); - } - - /** - * @param PCRUService $PCRUService - * @return static - */ - public static function create(PCRUService $PCRUService): PCRUCvsFile - { - return new self($PCRUService); - } -} \ No newline at end of file diff --git a/module/Oscar/src/Oscar/Validator/PCRUValidator.php b/module/Oscar/src/Oscar/Validator/PCRUValidator.php deleted file mode 100644 index a7335c20e9d48da6b8331c87561b2936b1503a42..0000000000000000000000000000000000000000 --- a/module/Oscar/src/Oscar/Validator/PCRUValidator.php +++ /dev/null @@ -1,231 +0,0 @@ -oscarConfigurationService = $oscarConfigurationService; - $this->entityManager = $entityManager; - $this->errors = []; - $this->warnings = []; - $this->status = ActivityPcruInfos::STATUS_DRAFT; - } - - protected function addError( $message ) :self - { - $this->errors[] = $message; - $this->status = self::VALIDATION_ERROR; - return $this; - } - - protected function addWarning( $message ) :self - { - $this->errors[] = $message; - return $this; - } - - public function getErrors() :array - { - return $this->errors; - } - - public function getWarnings() :array - { - return $this->warnings; - } - - public function hasErrors() :bool - { - return count($this->errors) > 0; - } - - public function hasWarnings() :bool - { - return count($this->warnings) > 0; - } - - public function validate( ActivityPcruInfos $activityPcruInfos ) :array - { - $this->error = []; - $datas = $activityPcruInfos->toArray(); - - $out = []; - $out['Objet'] = self::VALIDATION_ERROR; // Requis - $out['CodeUniteLabintel'] = self::VALIDATION_ERROR; // Requis - $out['SigleUnite'] = self::VALIDATION_EMPTY; - $out['NumContratTutelleGestionnaire'] = self::VALIDATION_ERROR; // Requis - $out['Equipe'] = self::VALIDATION_EMPTY; - $out['TypeContrat'] = self::VALIDATION_ERROR; - $out['Acronyme'] = self::VALIDATION_EMPTY; - $out['ContratsAssocies'] = self::VALIDATION_EMPTY; - $out['ResponsableScientifique'] = self::VALIDATION_ERROR; // Requis - $out['EmployeurResponsableScientifique'] = self::VALIDATION_EMPTY; - $out['CoordinateurConsortium'] = self::VALIDATION_EMPTY; - $out['Partenaires'] = self::VALIDATION_EMPTY; - $out['PartenairePrincipal'] = self::VALIDATION_ERROR; // Requis - $out['IdPartenairePrincipal'] = self::VALIDATION_EMPTY; - $out['SourceFinancement'] = self::VALIDATION_ERROR; // Requis - $out['LieuExecution'] = self::VALIDATION_ERROR; // Requis - $out['DateDerniereSignature'] = self::VALIDATION_ERROR; // Requis - $out['Duree'] = self::VALIDATION_EMPTY; - $out['DateDebut'] = self::VALIDATION_ERROR; // Requis - $out['DateFin'] = self::VALIDATION_ERROR; // Requis - $out['MontantPercuUnite'] = self::VALIDATION_ERROR; // Requis - $out['CoutTotalEtude'] = self::VALIDATION_EMPTY; - $out['MontantTotal'] = self::VALIDATION_EMPTY; - $out['ValidePoleCompetivite'] = self::VALIDATION_EMPTY; - $out['PoleCompetivite'] = self::VALIDATION_EMPTY; - $out['Commentaires'] = self::VALIDATION_EMPTY; - $out['Pia'] = self::VALIDATION_EMPTY; - $out['Reference'] = self::VALIDATION_EMPTY; - $out['AccordCadre'] = self::VALIDATION_EMPTY; - $out['Cifre'] = self::VALIDATION_EMPTY; - $out['ChaireIndustrielle'] = self::VALIDATION_EMPTY; - $out['PresencePartenaireIndustriel'] = self::VALIDATION_EMPTY; - $out['contract_signed'] = self::VALIDATION_ERROR; - - - $disabledFields = [ - 'Equipe','ContratsAssocies', 'EmployeurResponsableScientifique', - 'CoordinateurConsortium','Partenaires', 'PartenairePrincipal', - 'IdPartenairePrincipal','LieuExecution', 'Duree', - 'MontantPercuUnite','CoutTotalEtude', 'Commentaires', - 'Pia','AccordCadre', 'Cifre', - 'ChaireIndustrielle','PresencePartenaireIndustriel' - ]; - - foreach ($disabledFields as $unusedField) { - $out[$unusedField] = self::VALIDATION_DISABLED; - } - - if( $datas['Objet'] ) - $out['Objet'] = self::VALIDATION_VALID; - - if( $datas['CodeUniteLabintel'] ) - $out['CodeUniteLabintel'] = self::VALIDATION_VALID; - - if( $datas['SigleUnite'] ) - $out['SigleUnite'] = self::VALIDATION_VALID; - - if( $datas['NumContratTutelleGestionnaire'] ) - $out['NumContratTutelleGestionnaire'] = self::VALIDATION_VALID; - - if( $datas['NumContratTutelleGestionnaire'] ) - $out['NumContratTutelleGestionnaire'] = self::VALIDATION_VALID; - - if( $datas['TypeContrat'] != 'Aucun' ) - $out['TypeContrat'] = self::VALIDATION_VALID; - - if( $datas['Acronyme'] ) - $out['Acronyme'] = self::VALIDATION_VALID; - - if( $datas['ResponsableScientifique'] ) - $out['ResponsableScientifique'] = self::VALIDATION_VALID; - - if( $datas['EmployeurResponsableScientifique'] ) - $out['EmployeurResponsableScientifique'] = self::VALIDATION_VALID; - - if( $datas['PartenairePrincipal'] ) - $out['PartenairePrincipal'] = self::VALIDATION_VALID; - - if( $datas['SourceFinancement'] ) - $out['SourceFinancement'] = self::VALIDATION_VALID; - - if( $datas['LieuExecution'] ) - $out['LieuExecution'] = self::VALIDATION_VALID; - - if( $datas['DateDerniereSignature'] ) - $out['DateDerniereSignature'] = self::VALIDATION_VALID; - - if( $datas['DateDebut'] ) - $out['DateDebut'] = self::VALIDATION_VALID; - - if( $datas['DateFin'] ) - $out['DateFin'] = self::VALIDATION_VALID; - - if( $datas['MontantTotal'] ) - $out['MontantTotal'] = self::VALIDATION_VALID; - - - if( $datas['ValidePoleCompetivite'] == true ){ - $out['ValidePoleCompetivite'] = self::VALIDATION_VALID; - $out['PoleCompetivite'] = self::VALIDATION_ERROR; - if( $out['PoleCompetivite'] ){ - $out['PoleCompetivite'] = self::VALIDATION_VALID; - } - } - - if( $datas['Reference'] ) - $out['Reference'] = self::VALIDATION_VALID; - - - if( $activityPcruInfos->getDocumentId() ){ - $out['document_signed'] = self::VALIDATION_VALID; - $out['contrat_signed'] = self::VALIDATION_VALID; - } else { - $this->addError("Le document du contrat est indisponible"); - } - - foreach ($out as $champ=>$state) { - if( $champ == 'contract_signed') continue; - if( $state == self::VALIDATION_ERROR ){ - $this->status = self::VALIDATION_ERROR; - $this->addError($this->getMessage($champ)); - } - } - - return $out; - } - - - protected function getMessage( $champ ) :string - { - static $messages; - if( $messages === null ) { - $messages = []; - $messages['SourceFinancement'] = "La source de financement est manquante, vous pouvez la renseigner depuis la fiche activité"; - $messages['TypeContrat'] = "Le type de contrat est manquant. Vous pouvez automatiser la correspondance Oscar/PCRU depuis l'interface d'administration et éditer le type manuellement"; - $messages['DateDerniereSignature'] = "La date de signature est manquante, vous pouvez la renseigner depuis la fiche activité"; - $messages['CodeUniteLabintel'] = "Le code de l'unité de recherche (Labintel) est manquant, il peut être complété depuis la fiche organisation (type UMR XXXX)"; - } - - if( array_key_exists($champ, $messages) ){ - return $messages[$champ]; - } else { - return sprintf("Le champ %s n'est pas renseigné.", $champ); - } - } -} \ No newline at end of file diff --git a/module/Oscar/view/oscar/activity/pcruinfos-form.phtml b/module/Oscar/view/oscar/activity/pcruinfos-form.phtml deleted file mode 100644 index c001bc7b1161747faf86ec26281e4d435e4fef41..0000000000000000000000000000000000000000 --- a/module/Oscar/view/oscar/activity/pcruinfos-form.phtml +++ /dev/null @@ -1,366 +0,0 @@ - - * @date: 16/10/15 13:41 - * @copyright Certic (c) 2015 - */ -?> - -
-

- getProject()): ?> - - - getProject() ?> -
- - getId() ): ?> - getLabel() ?> (Modification) - - translate("Nouvelle activité") ?> - -

- - -
-

- - translate("Informations") ?> -

- form()->openTag($form->prepare()); ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Champ PCRUGéréValideValeur envoyéeInformations
1ObjetformElementErrors($form->get('objet'), ['class' => 'alert alert-danger']); ?>formInput($form->get('objet')); ?>
2CodeUniteLabintelformElementErrors($form->get('codeunitelabintel'), ['class' => 'alert alert-danger']); ?>formInput($form->get('codeunitelabintel')); ?>
3SigleUniteformElementErrors($form->get('sigleunite'), ['class' => 'alert alert-danger']); ?>formInput($form->get('sigleunite')); ?>
4NumContratTutelleGestionnaireformElementErrors($form->get('numcontrattutellegestionnaire'), ['class' => 'alert alert-danger']); ?>formInput($form->get('numcontrattutellegestionnaire')); ?>
5EquipeformElementErrors($form->get('equipe'), ['class' => 'alert alert-danger']); ?>formInput($form->get('equipe')); ?>
6TypeContratformElementErrors($form->get('typecontrat'), ['class' => 'alert alert-danger']); ?>formSelect($form->get('typecontrat')); ?>
7AcronymeformElementErrors($form->get('acronyme'), ['class' => 'alert alert-danger']); ?>formInput($form->get('acronyme')); ?>
8ContratsAssociesformElementErrors($form->get('contratsassocies'), ['class' => 'alert alert-danger']); ?>formInput($form->get('contratsassocies')); ?>
9ResponsableScientifiqueformElementErrors($form->get('responsablescientifique'), ['class' => 'alert alert-danger']); ?>formSelect($form->get('responsablescientifique')); ?>
10EmployeurResponsableScientifiqueformElementErrors($form->get('employeurresponsablescientifique'), ['class' => 'alert alert-danger']); ?>formInput($form->get('employeurresponsablescientifique')); ?>
11CoordinateurConsortiumformElementErrors($form->get('coordinateurconsortium'), ['class' => 'alert alert-danger']); ?>formCheckbox($form->get('coordinateurconsortium')); ?> - - Le Responsable scientifique est également le coordinateur du consortium -
12PartenairesformElementErrors($form->get('partenaires'), ['class' => 'alert alert-danger']); ?>formInput($form->get('partenaires')); ?>
13PartenairePrincipalformElementErrors($form->get('partenaireprincipal'), ['class' => 'alert alert-danger']); ?>formSelect($form->get('partenaireprincipal')); ?>
14IdPartenairePrincipalformElementErrors($form->get('idpartenaireprincipal'), ['class' => 'alert alert-danger']); ?>formInput($form->get('idpartenaireprincipal')); ?>
15SourceFinancementformElementErrors($form->get('sourcefinancement'), ['class' => 'alert alert-danger']); ?> - formSelect($form->get('sourcefinancement')); ?> -
16LieuExecutionformElementErrors($form->get('lieuexecution'), ['class' => 'alert alert-danger']); ?>formInput($form->get('lieuexecution')); ?>
17DateDerniereSignatureformElementErrors($form->get('datedernieresignature'), ['class' => 'alert alert-danger']); ?>formInput($form->get('datedernieresignature')); ?>
18DureeformElementErrors($form->get('duree'), ['class' => 'alert alert-danger']); ?>formInput($form->get('duree')); ?>
19DateDebutformElementErrors($form->get('datedebut'), ['class' => 'alert alert-danger']); ?>formInput($form->get('datedebut')); ?>
20DateFinformElementErrors($form->get('datefin'), ['class' => 'alert alert-danger']); ?>formInput($form->get('datefin')); ?>
21MontantPercuUniteformElementErrors($form->get('montantpercuunite'), ['class' => 'alert alert-danger']); ?>formInput($form->get('montantpercuunite')); ?>
22CoutTotalEtudeformElementErrors($form->get('couttotaletude'), ['class' => 'alert alert-danger']); ?>formInput($form->get('couttotaletude')); ?>
23MontantTotalformElementErrors($form->get('montanttotal'), ['class' => 'alert alert-danger']); ?>formInput($form->get('montanttotal')); ?>
24ValidePoleCompetiviteformElementErrors($form->get('validepolecompetivite'), ['class' => 'alert alert-danger']); ?>formCheckbox($form->get('validepolecompetivite')); ?>
25PoleCompetiviteformElementErrors($form->get('polecompetivite'), ['class' => 'alert alert-danger']); ?>formSelect($form->get('polecompetivite')); ?>
26CommentairesformElementErrors($form->get('commentaires'), ['class' => 'alert alert-danger']); ?>formTextarea($form->get('commentaires')); ?>
27PiaformElementErrors($form->get('pia'), ['class' => 'alert alert-danger']); ?>formCheckbox($form->get('pia')); ?>Est PIA ?
28ReferenceformElementErrors($form->get('reference'), ['class' => 'alert alert-danger']); ?>formInput($form->get('reference')); ?>
29AccordCadreformElementErrors($form->get('accordcadre'), ['class' => 'alert alert-danger']); ?>formCheckbox($form->get('accordcadre')); ?>
30CifreformElementErrors($form->get('cifre'), ['class' => 'alert alert-danger']); ?>formCheckbox($form->get('cifre')); ?>
31ChaireIndustrielleformElementErrors($form->get('chaireindustrielle'), ['class' => 'alert alert-danger']); ?>formInput($form->get('chaireindustrielle')); ?>
32PresencePartenaireIndustrielformElementErrors($form->get('presencepartenaireindustriel'), ['class' => 'alert alert-danger']); ?>formCheckbox($form->get('presencepartenaireindustriel')); ?>
- - - - form()->closeTag() ?> -
-
-
- diff --git a/module/Oscar/view/oscar/administration-check-config/check-config-home.phtml b/module/Oscar/view/oscar/administration-check-config/check-config-home.phtml index a9ba44bf863f512340e080bc3fbde69f683d62a2..ebae859391be286aa74f60badb789531cd82951d 100644 --- a/module/Oscar/view/oscar/administration-check-config/check-config-home.phtml +++ b/module/Oscar/view/oscar/administration-check-config/check-config-home.phtml @@ -199,4 +199,20 @@ +

### PCRU :

+ + + +
+ +
+ + + + + diff --git a/module/Oscar/view/oscar/administration/accueil.phtml b/module/Oscar/view/oscar/administration/accueil.phtml index 9437bbe87ece6841699f368f7c2cfcfbca9daece..ed3bcd46a6f1beb780eb93c07cd29b6554c187cb 100644 --- a/module/Oscar/view/oscar/administration/accueil.phtml +++ b/module/Oscar/view/oscar/administration/accueil.phtml @@ -602,7 +602,7 @@ -

Le modules PCRU permet de configurer l'envois automatique des contrats signés au système PCRU du +

Le module PCRU permet de configurer l'envoi automatique des contrats signés au système PCRU du CNRS


Référentiels PCRU

@@ -635,7 +635,7 @@
  • - Référenciel des pôles de compétitivité : + Référentiel des pôles de compétitivité : grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_SPENDTYPEGROUP_MANAGE)): ?> @@ -647,14 +647,14 @@
    - La liste des pôles de compétitivité est utilisée dans la fiche activité, elle est fournit par + La liste des pôles de compétitivité est utilisée dans la fiche activité, elle est fournie par le CNRS.
  • - Référenciel des sources de financement + Référentiel des sources de financement grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_SPENDTYPEGROUP_MANAGE)): ?> @@ -666,7 +666,26 @@
    - La liste des sources de financement est utilisée dans la fiche activité, elle est fournit par + La liste des sources de financement est utilisée dans la fiche activité, elle est fournie par + le CNRS. +
  • + +
  • + + + Référentiel des types d'établissement + + grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_SPENDTYPEGROUP_MANAGE)): ?> + + + Privilège insuffisant + +
    + La liste des types d'établissement est utilisée dans la fiche organisation, elle est fournie par le CNRS.
  • diff --git a/module/Oscar/view/oscar/administration/contrat-type-pcru.phtml b/module/Oscar/view/oscar/administration/contrat-type-pcru.phtml index 07bfdfb9ee26c47113df7b0368040fb022e95084..bbf6d785da4866b33e5ec7ffe170b7fb010f6b4c 100644 --- a/module/Oscar/view/oscar/administration/contrat-type-pcru.phtml +++ b/module/Oscar/view/oscar/administration/contrat-type-pcru.phtml @@ -3,7 +3,7 @@ - * - * - * - * - ***/ ?> \ No newline at end of file diff --git a/module/Oscar/view/oscar/project-grant/pcru-list.phtml b/module/Oscar/view/oscar/project-grant/pcru-list.phtml deleted file mode 100644 index 781a6090e8ce9af86987c429cd9c7c3b19e572da..0000000000000000000000000000000000000000 --- a/module/Oscar/view/oscar/project-grant/pcru-list.phtml +++ /dev/null @@ -1,103 +0,0 @@ -
    -

    - Activités PCRU -

    - -

    - Les activités présentes dans cet écran sont soumises à un processus PCRU.
    - Pour activer le processus PCRU d'une activité, rendez-vous sur la fiche activité, puis dans l'encart PCRU, cliquez sur informations PCRU, une fois dans le récapitulatif des informations, cliquez sur Activer PCRU -

    - -
    - Aucun processus PCRU en cours -
    - -
    - -
    -

    - getAcronyme() ?> - getObjet() ?> - getStatus()): - case 'file_wait': ?> - - - En attente de transfert - - - - - - Transférée (en attente d'un retour) - - - - - - Brouillon - - - - - - Erreur - - - -
    - - - - - Voir la fiche activité -

    - hasErrors() ): ?> -
    - getErrorsRemote() ?> -
    - - -
    - -
    - - - - - require(['vue', 'vue-resource', 'createprocessuspcru'], function(Vue,VueResource,CreateProcessusPCRU){ - new Vue({ - render(h){ - return h(CreateProcessusPCRU, { props: { - urlSearchActivities: '?a=search', - urlActivityPCRUCreate: '?a=create', - urlPreviewPCRU: '?a=preview' - }}) - } - }).$mount('#recherche') - }) - - /****/ ?> - -
    \ No newline at end of file diff --git a/module/Oscar/view/partials/menu-administration.phtml b/module/Oscar/view/partials/menu-administration.phtml index 4331591c29051e7c49a63d9c391cb0608711b844..2f3ccf437ee7d43d4510dce1e39a74a8973c1ca6 100644 --- a/module/Oscar/view/partials/menu-administration.phtml +++ b/module/Oscar/view/partials/menu-administration.phtml @@ -44,7 +44,7 @@ if( grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_PCRU_LIST) ):?>
  • - + translate("Processus PCRU") ?>
  • diff --git a/public/js/oscar/dist/AdministrationPcru.umd.js b/public/js/oscar/dist/AdministrationPcru.umd.js index 643ee8b0f7eb33596cfd5af3d9f8496ed79ba783..fcd70e90594f2c0ed66fdbc36073cc0ec237700d 100644 --- a/public/js/oscar/dist/AdministrationPcru.umd.js +++ b/public/js/oscar/dist/AdministrationPcru.umd.js @@ -96,91 +96,6 @@ return /******/ (function(modules) { // webpackBootstrap /************************************************************************/ /******/ ({ -/***/ "8875": -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller -// MIT license -// source: https://github.com/amiller-gh/currentScript-polyfill - -// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505 - -(function (root, factory) { - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}(typeof self !== 'undefined' ? self : this, function () { - function getCurrentScript () { - var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript') - // for chrome - if (!descriptor && 'currentScript' in document && document.currentScript) { - return document.currentScript - } - - // for other browsers with native support for currentScript - if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) { - return document.currentScript - } - - // IE 8-10 support script readyState - // IE 11+ & Firefox support stack trace - try { - throw new Error(); - } - catch (err) { - // Find the second match for the "at" string to get file src url from stack. - var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig, - ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig, - stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack), - scriptLocation = (stackDetails && stackDetails[1]) || false, - line = (stackDetails && stackDetails[2]) || false, - currentLocation = document.location.href.replace(document.location.hash, ''), - pageSource, - inlineScriptSourceRegExp, - inlineScriptSource, - scripts = document.getElementsByTagName('script'); // Live NodeList collection - - if (scriptLocation === currentLocation) { - pageSource = document.documentElement.outerHTML; - inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996&\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js&\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=417a28ea&\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://AdministrationPcru/webpack/universalModuleDefinition","webpack://AdministrationPcru/webpack/bootstrap","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://AdministrationPcru/./src/AdministrationPcru.vue?4780","webpack://AdministrationPcru/./src/components/PasswordField.vue?8819","webpack://AdministrationPcru/src/components/PasswordField.vue","webpack://AdministrationPcru/./src/components/PasswordField.vue?c578","webpack://AdministrationPcru/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://AdministrationPcru/./src/components/PasswordField.vue","webpack://AdministrationPcru/src/AdministrationPcru.vue","webpack://AdministrationPcru/./src/AdministrationPcru.vue?55fb","webpack://AdministrationPcru/./src/AdministrationPcru.vue","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;;AAEA;AACA;AACA,MAAM,KAAuC,EAAE,yBAQ5C;;AAEH;AACA;AACA,IAAI,qBAAuB;AAC3B;AACA;;AAEA;AACe,sDAAI;;;ACrBnB,+BAA+B,6BAA6B,qBAAqB,aAAa,4CAA4C,gCAAgC,wBAAwB,0BAA0B,sBAAsB,YAAY,qCAAqC,mCAAmC,UAAU,wCAAwC,8DAA8D,OAAO,6BAA6B,YAAY,kBAAkB,YAAY,uBAAuB,qHAAqH,uBAAuB,YAAY,8BAA8B,cAAc,aAAa,8GAA8G,SAAS,4DAA4D,WAAW,wIAAwI,KAAK,0BAA0B,0FAA0F,uBAAuB,iCAAiC,iBAAiB,wEAAwE,KAAK,kGAAkG,KAAK,oDAAoD,cAAc,mCAAmC,sBAAsB,sBAAsB,8DAA8D,YAAY,kBAAkB,YAAY,uBAAuB,sBAAsB,kBAAkB,YAAY,qCAAqC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wBAAwB,aAAa,wGAAwG,oCAAoC,wCAAwC,WAAW,sCAAsC,KAAK,yBAAyB,kCAAkC,gEAAgE,oBAAoB,kBAAkB,YAAY,qCAAqC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wBAAwB,aAAa,wGAAwG,oCAAoC,wCAAwC,WAAW,sCAAsC,KAAK,yBAAyB,kCAAkC,gEAAgE,oBAAoB,kBAAkB,YAAY,qCAAqC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wBAAwB,aAAa,wGAAwG,oCAAoC,wCAAwC,WAAW,sCAAsC,KAAK,yBAAyB,kCAAkC,gEAAgE,oBAAoB,kBAAkB,YAAY,qCAAqC,uBAAuB,OAAO,wEAAwE,KAAK,0BAA0B,uCAAuC,4BAA4B,kBAAkB,sBAAsB,yBAAyB,cAAc,6BAA6B,qBAAqB,YAAY,mCAAmC,wBAAwB,aAAa,sHAAsH,oCAAoC,sDAAsD,WAAW,6CAA6C,KAAK,yBAAyB,kCAAkC,uEAAuE,oBAAoB,kBAAkB,sBAAsB,yBAAyB,cAAc,6BAA6B,oBAAoB,YAAY,mCAAmC,wBAAwB,aAAa,oHAAoH,oCAAoC,oDAAoD,WAAW,4CAA4C,KAAK,yBAAyB,kCAAkC,sEAAsE,oBAAoB,kBAAkB,sBAAsB,yBAAyB,cAAc,6BAA6B,0BAA0B,YAAY,mCAAmC,iCAAiC,OAAO,qHAAqH,KAAK,0BAA0B,mDAAmD,wBAAwB,uBAAuB,sBAAsB,kBAAkB,YAAY,sCAAsC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,yBAAyB,aAAa,0HAA0H,oCAAoC,kBAAkB,KAAK,0BAA0B,kFAAkF,kBAAkB,kBAAkB,6CAA6C,WAAW,EAAE,gHAAgH,0DAA0D,oBAAoB,mBAAmB,cAAc,6BAA6B,eAAe,+BAA+B,UAAU,gCAAgC,6NAA6N,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,0BAA0B,aAAa,0HAA0H,oCAAoC,kBAAkB,KAAK,0BAA0B,kFAAkF,kBAAkB,kBAAkB,6CAA6C,WAAW,EAAE,gHAAgH,0DAA0D,oBAAoB,mBAAmB,cAAc,6BAA6B,eAAe,+BAA+B,UAAU,gCAAgC,8QAA8Q,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,2EAA2E,iBAAiB,yBAAyB,cAAc,aAAa,0HAA0H,SAAS,sDAAsD,WAAW,uKAAuK,KAAK,0BAA0B,gGAAgG,uBAAuB,iCAAiC,iBAAiB,8EAA8E,KAAK,wGAAwG,KAAK,0DAA0D,cAAc,sCAAsC,sCAAsC,2BAA2B,cAAc,+BAA+B,UAAU,gCAAgC,oRAAoR,yBAAyB,YAAY,mCAAmC,2EAA2E,iBAAiB,yBAAyB,cAAc,aAAa,oJAAoJ,SAAS,mEAAmE,WAAW,8MAA8M,KAAK,0BAA0B,6GAA6G,uBAAuB,iCAAiC,iBAAiB,2FAA2F,KAAK,qHAAqH,KAAK,uEAAuE,cAAc,sCAAsC,mDAAmD,2BAA2B,cAAc,+BAA+B,UAAU,gCAAgC,wPAAwP,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wEAAwE,iBAAiB,yBAAyB,cAAc,aAAa,oHAAoH,SAAS,mDAAmD,WAAW,8JAA8J,KAAK,0BAA0B,6FAA6F,uBAAuB,iCAAiC,iBAAiB,2EAA2E,KAAK,qGAAqG,KAAK,uDAAuD,cAAc,sCAAsC,mCAAmC,2BAA2B,gBAAgB,+BAA+B,UAAU,gCAAgC,gPAAgP,kCAAkC,eAAe,qCAAqC,gBAAgB,KAAK,yBAAyB,UAAU,0BAA0B;AAC3hZ;AACA,mCAAmC,6BAA6B,wBAAwB,0BAA0B;AAClH,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,sCAAsC;AAC5I,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,oCAAoC;AAC1I,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,iBAAiB,+BAA+B,UAAU,gCAAgC;AACrI,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,wBAAwB,uBAAuB;AAC1F,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC,aAAa,6BAA6B,iBAAiB,gCAAgC,UAAU,kCAAkC;AACxI,CAAC;;;;;;AChBD,IAAI,iDAAM,qBAAqB,6BAA6B,iBAAiB,yBAAyB,cAAc,6BAA6B,gBAAgB,+EAA+E,kDAAkD,YAAY,gCAAgC,UAAU,kCAAkC,0FAA0F,aAAa,oEAAoE,0CAA0C,0BAA0B,QAAQ,yEAAyE,WAAW,oBAAoB,KAAK,yBAAyB,kCAAkC,gCAAgC,cAAc,aAAa,oEAAoE,0CAA0C,0BAA0B,QAAQ,6EAA6E,WAAW,oBAAoB,KAAK,yBAAyB,kCAAkC,gCAAgC,YAAY,uCAAuC,yCAAyC,cAAc,wCAAwC,QAAQ,sDAAsD,KAAK,iCAAiC,+BAA+B,iCAAiC,UAAU,qCAAqC;AACrhD;AACA,IAAI,0DAAe;;;;;;;ACgBnB;AACA;AACA;;AAEA,IAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA,KAAK;;;AC5DgL,CAAgB,wHAAG,EAAC,C;;ACAzM;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC/F2F;AAC3B;AACL;;;AAG3D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,+CAAM;AACR,EAAE,iDAAM;AACR,EAAE,0DAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,mE;;;AC4Pf;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEuD;;AAEvD;AACA;;AAEe;;AAEf;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;;ACzWmL,CAAgB,2HAAG,EAAC,C;;ACAxG;AAC3B;AACL;;;AAGhE;AACuF;AACvF,IAAI,4BAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,mFAAS,Q;;AClBA;AACA;AACT,iGAAG;AACI","file":"AdministrationPcru.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AdministrationPcru\"] = factory();\n\telse\n\t\troot[\"AdministrationPcru\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fb15\");\n","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('section',{staticStyle:{\"position\":\"relative\",\"min-height\":\"100px\"}},[(_vm.configuration)?_c('div',{staticClass:\"container\"},[(_vm.loading)?_c('div',{staticClass:\"overlay\"},[_c('div',{staticClass:\"overlay-content\",class:{ 'text-success bold': _vm.success}},[_c('i',{staticClass:\"animate-spin icon-spinner\"}),_vm._v(\" \"+_vm._s(_vm.loading)+\" \")])]):_vm._e(),_c('form',{attrs:{\"action\":\"\",\"method\":\"post\"}},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3\"},[_vm._v(\" Module \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_enabled ? 'Actif' : 'Inactif'))])]),_c('div',{staticClass:\"col-md-9\"},[_c('div',{staticClass:\"material-switch\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_enabled),expression:\"configuration.pcru_enabled\"}],attrs:{\"id\":\"pcru_enabled\",\"name\":\"pcru_enabled\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.configuration.pcru_enabled)?_vm._i(_vm.configuration.pcru_enabled,null)>-1:(_vm.configuration.pcru_enabled)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_enabled,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_enabled\", $$c)}}}}),_c('label',{staticClass:\"label-primary\",attrs:{\"for\":\"pcru_enabled\"}})])])]),_c('section',{class:_vm.configuration.pcru_enabled ? 'enabled' : 'disabled'},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_vm._m(0),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"host\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(1),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_host),expression:\"configuration.pcru_host\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"host\",\"name\":\"host\"},domProps:{\"value\":(_vm.configuration.pcru_host)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_host\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"port\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(2),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_port),expression:\"configuration.pcru_port\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"port\",\"name\":\"port\"},domProps:{\"value\":(_vm.configuration.pcru_port)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_port\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(3),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_user),expression:\"configuration.pcru_user\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"user\",\"name\":\"user\"},domProps:{\"value\":(_vm.configuration.pcru_user)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_user\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('password-field',{attrs:{\"value\":_vm.configuration.pcru_pass,\"name\":'pass',\"text\":'Mot de passe'},on:{\"change\":function($event){_vm.configuration.pcru_pass = $event}}})],1)]),_vm._m(4),_c('div',{staticClass:\"row\"},[_c('div',[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh_private\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(5),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_ssh_private),expression:\"configuration.pcru_ssh_private\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"ssh_private\",\"name\":\"ssh_private\"},domProps:{\"value\":(_vm.configuration.pcru_ssh_private)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_ssh_private\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh_public\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(6),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_ssh_public),expression:\"configuration.pcru_ssh_public\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"ssh_public\",\"name\":\"ssh_public\"},domProps:{\"value\":(_vm.configuration.pcru_ssh_public)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_ssh_public\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh_private_pass\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(7),_c('password-field',{attrs:{\"value\":_vm.configuration.pcru_ssh_private_pass,\"name\":'ssh_private_pass',\"text\":'Mot de passe de la clé privée SSH'},on:{\"change\":function($event){_vm.configuration.pcru_ssh_private_pass = $event}}})],1)])])])]),_c('div',{staticClass:\"col-md-6\"},[_vm._m(8),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-10 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(9),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_contract_type),expression:\"configuration.pcru_contract_type\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_contract_type\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.contract_types),function(type){return _c('option',{key:type,domProps:{\"value\":type}},[_vm._v(_vm._s(type)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Le type de contrat \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_contract_type))]),_vm._v(\" sera utilisé par oscar pour selectionner le document à utiliser pour les données PCRU\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(10),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_incharge_role),expression:\"configuration.pcru_incharge_role\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_incharge_role\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.incharge_roles),function(role){return _c('option',{key:role,domProps:{\"value\":role}},[_vm._v(_vm._s(role)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar selectionnera les personnes avec le rôle \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_incharge_role))]),_vm._v(\" de la fiche activité pour extraire le \"),_c('em',[_vm._v(\"Responsable scientifique côté PCRU\")]),_vm._v(\".\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(11),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partner_roles),expression:\"configuration.pcru_partner_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partner_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partner_roles)?_vm._i(_vm.configuration.pcru_partner_roles,role)>-1:(_vm.configuration.pcru_partner_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partner_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partner_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partner_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(12),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partenaire_principal_roles),expression:\"configuration.pcru_partenaire_principal_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partenaire_principal_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partenaire_principal_roles)?_vm._i(_vm.configuration.pcru_partenaire_principal_roles,role)>-1:(_vm.configuration.pcru_partenaire_principal_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partenaire_principal_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partenaire_principal_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partenaire_principal_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le partenaire principal.\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(13),_vm._l((_vm.configuration.unit_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_unit_roles),expression:\"configuration.pcru_unit_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'unit_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_unit_roles)?_vm._i(_vm.configuration.pcru_unit_roles,role)>-1:(_vm.configuration.pcru_unit_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_unit_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'unit_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_unit_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire les codes UMR (labintel) et RNSR.\")])])])])])]),_c('nav',{staticClass:\"buttons text-center\"},[_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.performEdit}},[_c('i',{staticClass:\"icon-floppy\"}),_vm._v(\" Enregistrer \")])])])]):_vm._e()])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('h2',[_c('i',{staticClass:\"icon-upload\"}),_vm._v(\" Accès FTP\")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-building\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Hôte\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-logout\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Port\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Identifiant\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Les fichiers de la clé privée et de la clé publique doivent être déposés dans le répertoire oscar/config/autoload/ et être accessible en lecture à l'utilisateur du serveur web. \")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Nom du fichier contenant la clé privée SSH\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Nom du fichier contenant la clé publique SSH\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Mot de passe de la clé privée SSH\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('h2',[_c('i',{staticClass:\"icon-cog\"}),_vm._v(\" Options\")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Type pour le contrat signé\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Responsable scientifique\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire(s)\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire principal\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Unité(s)\")])])\n}]\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":_vm.name}},[_vm._v(\"Mot de passe \"+_vm._s(_vm.type)+\" / \"+_vm._s(_vm.value))]),_c('div',{staticClass:\"input-group input-lg password-field\"},[_c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-lock\"}),_vm._v(\" \"),_c('strong',[_vm._v(_vm._s(_vm.label))])]),(_vm.type == 'text')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"text\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.value=$event.target.value}}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"password\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.value=$event.target.value}}}),_c('div',{staticClass:\"input-group-addon\",class:{'password-displayed': _vm.type == 'text'},staticStyle:{\"cursor\":\"pointer\",\"background\":\"white\"},attrs:{\"title\":\"Afficher le mot de passe pendant 5 secondes\"},on:{\"click\":_vm.handlerShowPassword}},[(_vm.type == 'text')?_c('i',{staticClass:\"glyphicon icon-eye\"}):_c('i',{staticClass:\"glyphicon icon-eye-off\"})])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent(\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */,\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options =\n typeof scriptExports === 'function' ? scriptExports.options : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) {\n // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=309df7bb\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file diff --git a/public/js/oscar/dist/AdministrationPcru.umd.min.js b/public/js/oscar/dist/AdministrationPcru.umd.min.js index 1f2b71e83ee481ac99054c1f3d18500992fe458e..2255c183421b0b672fb1915ca6539e5000e3b861 100644 --- a/public/js/oscar/dist/AdministrationPcru.umd.min.js +++ b/public/js/oscar/dist/AdministrationPcru.umd.min.js @@ -1,2 +1,2 @@ -(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["AdministrationPcru"]=e():t["AdministrationPcru"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({8875:function(t,e,r){var n,i,s;(function(r,o){i=[],n=o,s="function"===typeof n?n.apply(e,i):n,void 0===s||(t.exports=s)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var r,n,i,s=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,o=/@([^@]*):(\d+):(\d+)\s*$/gi,a=s.exec(f.stack)||o.exec(f.stack),c=a&&a[1]||!1,l=a&&a[2]||!1,u=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");c===u&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996&\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js&\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=417a28ea&\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://AdministrationPcru/webpack/universalModuleDefinition","webpack://AdministrationPcru/webpack/bootstrap","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://AdministrationPcru/./src/AdministrationPcru.vue?4780","webpack://AdministrationPcru/./src/components/PasswordField.vue?8819","webpack://AdministrationPcru/src/components/PasswordField.vue","webpack://AdministrationPcru/./src/components/PasswordField.vue?c578","webpack://AdministrationPcru/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://AdministrationPcru/./src/components/PasswordField.vue","webpack://AdministrationPcru/src/AdministrationPcru.vue","webpack://AdministrationPcru/./src/AdministrationPcru.vue?55fb","webpack://AdministrationPcru/./src/AdministrationPcru.vue","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","currentScript","document","src","match","render","_vm","_c","_self","staticStyle","staticClass","class","success","_v","_s","loading","_e","attrs","configuration","pcru_enabled","directives","rawName","expression","domProps","Array","isArray","_i","on","$event","$$a","$$el","target","$$c","checked","$$v","$$i","$set","concat","slice","_m","composing","pcru_pass","pcru_ssh_private_pass","$$selectedVal","filter","options","selected","map","val","_value","multiple","_l","type","pcru_contract_type","role","pcru_incharge_role","index","pcru_partner_roles","join","pcru_partenaire_principal_roles","pcru_unit_roles","performEdit","staticRenderFns","label","handlerShowPassword","tempo","TYPE_PASSWORD","TYPE_TEXT","props","required","default","displayPassword","watch","$emit","methods","Promise","resolve","setTimeout","normalizeComponent","scriptExports","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","component","components","PasswordField","url","formData","FormData","append","pcru_host","pcru_port","pcru_user","pcru_ssh_private","pcru_ssh_public","$http","post","then","ok","fetch","data","configuration_pcru","handlerSuccess","foo","setInterval"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,IACQ,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,kBAAZC,QACdA,QAAQ,sBAAwBD,IAEhCD,EAAK,sBAAwBC,KAR/B,CASoB,qBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASO,GAG/DN,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAO,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASf,EAASgB,EAAMC,GAC3CV,EAAoBW,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASvB,GACX,qBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBQ,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAASjC,GAChC,IAAIgB,EAAShB,GAAUA,EAAO4B,WAC7B,WAAwB,OAAO5B,EAAO,YACtC,WAA8B,OAAOA,GAEtC,OADAM,EAAoBQ,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRV,EAAoBW,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG7B,EAAoBgC,EAAI,GAIjBhC,EAAoBA,EAAoBiC,EAAI,Q,oCChFrD,G,OAAsB,qBAAXC,OAAwB,CACjC,IAAIC,EAAgBD,OAAOE,SAASD,cAWhCE,EAAMF,GAAiBA,EAAcE,IAAIC,MAAM,2BAC/CD,IACF,IAA0BA,EAAI,IAKnB,ICrBXE,EAAS,WAAkB,IAAIC,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,UAAU,CAACE,YAAY,CAAC,SAAW,WAAW,aAAa,UAAU,CAAEH,EAAiB,cAAEC,EAAG,MAAM,CAACG,YAAY,aAAa,CAAEJ,EAAW,QAAEC,EAAG,MAAM,CAACG,YAAY,WAAW,CAACH,EAAG,MAAM,CAACG,YAAY,kBAAkBC,MAAM,CAAE,oBAAqBL,EAAIM,UAAU,CAACL,EAAG,IAAI,CAACG,YAAY,8BAA8BJ,EAAIO,GAAG,IAAIP,EAAIQ,GAAGR,EAAIS,SAAS,SAAST,EAAIU,KAAKT,EAAG,OAAO,CAACU,MAAM,CAAC,OAAS,GAAG,OAAS,SAAS,CAACV,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,YAAY,CAACJ,EAAIO,GAAG,YAAYN,EAAG,SAAS,CAACD,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIY,cAAcC,aAAe,QAAU,gBAAgBZ,EAAG,MAAM,CAACG,YAAY,YAAY,CAACH,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAA0B,aAAEI,WAAW,+BAA+BL,MAAM,CAAC,GAAK,eAAe,KAAO,eAAe,KAAO,YAAYM,SAAS,CAAC,QAAUC,MAAMC,QAAQnB,EAAIY,cAAcC,cAAcb,EAAIoB,GAAGpB,EAAIY,cAAcC,aAAa,OAAO,EAAGb,EAAIY,cAA0B,cAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIvB,EAAIY,cAAcC,aAAaW,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAI,KAAKC,EAAI7B,EAAIoB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,eAAgBW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,eAAgBW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY7B,EAAI8B,KAAK9B,EAAIY,cAAe,eAAgBc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,gBAAgBO,MAAM,CAAC,IAAM,wBAAwBV,EAAG,UAAU,CAACI,MAAML,EAAIY,cAAcC,aAAe,UAAY,YAAY,CAACZ,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,YAAY,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAAuB,UAAEI,WAAW,4BAA4BZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,OAAO,KAAO,QAAQM,SAAS,CAAC,MAASjB,EAAIY,cAAuB,WAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAiBlC,EAAI8B,KAAK9B,EAAIY,cAAe,YAAaU,EAAOG,OAAO9C,mBAAmBsB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAAuB,UAAEI,WAAW,4BAA4BZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,OAAO,KAAO,QAAQM,SAAS,CAAC,MAASjB,EAAIY,cAAuB,WAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAiBlC,EAAI8B,KAAK9B,EAAIY,cAAe,YAAaU,EAAOG,OAAO9C,mBAAmBsB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAAuB,UAAEI,WAAW,4BAA4BZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,OAAO,KAAO,QAAQM,SAAS,CAAC,MAASjB,EAAIY,cAAuB,WAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAiBlC,EAAI8B,KAAK9B,EAAIY,cAAe,YAAaU,EAAOG,OAAO9C,mBAAmBsB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,iBAAiB,CAACU,MAAM,CAAC,MAAQX,EAAIY,cAAcuB,UAAU,KAAO,OAAO,KAAO,gBAAgBd,GAAG,CAAC,OAAS,SAASC,GAAQtB,EAAIY,cAAcuB,UAAYb,OAAY,KAAKtB,EAAIiC,GAAG,GAAGhC,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,iBAAiBV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAA8B,iBAAEI,WAAW,mCAAmCZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,cAAc,KAAO,eAAeM,SAAS,CAAC,MAASjB,EAAIY,cAA8B,kBAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAiBlC,EAAI8B,KAAK9B,EAAIY,cAAe,mBAAoBU,EAAOG,OAAO9C,mBAAmBsB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,gBAAgBV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAA6B,gBAAEI,WAAW,kCAAkCZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,aAAa,KAAO,cAAcM,SAAS,CAAC,MAASjB,EAAIY,cAA6B,iBAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAiBlC,EAAI8B,KAAK9B,EAAIY,cAAe,kBAAmBU,EAAOG,OAAO9C,mBAAmBsB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,sBAAsBV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,iBAAiB,CAACU,MAAM,CAAC,MAAQX,EAAIY,cAAcwB,sBAAsB,KAAO,mBAAmB,KAAO,qCAAqCf,GAAG,CAAC,OAAS,SAASC,GAAQtB,EAAIY,cAAcwB,sBAAwBd,OAAY,WAAWrB,EAAG,MAAM,CAACG,YAAY,YAAY,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,2BAA2B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,GAAGhC,EAAG,SAAS,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAAgC,mBAAEI,WAAW,qCAAqCZ,YAAY,eAAeO,MAAM,CAAC,KAAO,GAAG,GAAK,IAAIU,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIe,EAAgBnB,MAAM5B,UAAUgD,OAAOzE,KAAKyD,EAAOG,OAAOc,SAAQ,SAASpE,GAAG,OAAOA,EAAEqE,YAAWC,KAAI,SAAStE,GAAG,IAAIuE,EAAM,WAAYvE,EAAIA,EAAEwE,OAASxE,EAAEQ,MAAM,OAAO+D,KAAO1C,EAAI8B,KAAK9B,EAAIY,cAAe,qBAAsBU,EAAOG,OAAOmB,SAAWP,EAAgBA,EAAc,OAAOrC,EAAI6C,GAAI7C,EAAIY,cAA4B,gBAAE,SAASkC,GAAM,OAAO7C,EAAG,SAAS,CAAChB,IAAI6D,EAAK7B,SAAS,CAAC,MAAQ6B,IAAO,CAAC9C,EAAIO,GAAGP,EAAIQ,GAAGsC,GAAM,UAAS,KAAK7C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBJ,EAAIO,GAAG,wBAAwBN,EAAG,SAAS,CAACD,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIY,cAAcmC,uBAAuB/C,EAAIO,GAAG,8FAA8FN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,IAAIhC,EAAG,SAAS,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAAgC,mBAAEI,WAAW,qCAAqCZ,YAAY,eAAeO,MAAM,CAAC,KAAO,GAAG,GAAK,IAAIU,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIe,EAAgBnB,MAAM5B,UAAUgD,OAAOzE,KAAKyD,EAAOG,OAAOc,SAAQ,SAASpE,GAAG,OAAOA,EAAEqE,YAAWC,KAAI,SAAStE,GAAG,IAAIuE,EAAM,WAAYvE,EAAIA,EAAEwE,OAASxE,EAAEQ,MAAM,OAAO+D,KAAO1C,EAAI8B,KAAK9B,EAAIY,cAAe,qBAAsBU,EAAOG,OAAOmB,SAAWP,EAAgBA,EAAc,OAAOrC,EAAI6C,GAAI7C,EAAIY,cAA4B,gBAAE,SAASoC,GAAM,OAAO/C,EAAG,SAAS,CAAChB,IAAI+D,EAAK/B,SAAS,CAAC,MAAQ+B,IAAO,CAAChD,EAAIO,GAAGP,EAAIQ,GAAGwC,GAAM,UAAS,KAAK/C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBJ,EAAIO,GAAG,oDAAoDN,EAAG,SAAS,CAACD,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIY,cAAcqC,uBAAuBjD,EAAIO,GAAG,2CAA2CN,EAAG,KAAK,CAACD,EAAIO,GAAG,wCAAwCP,EAAIO,GAAG,SAASN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,IAAIjC,EAAI6C,GAAI7C,EAAIY,cAA2B,eAAE,SAASoC,EAAKE,GAAO,OAAOjD,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAAgC,mBAAEI,WAAW,qCAAqCL,MAAM,CAAC,KAAO,WAAW,GAAK,uBAAyBuC,GAAOjC,SAAS,CAAC,MAAQ+B,EAAK,QAAU9B,MAAMC,QAAQnB,EAAIY,cAAcuC,oBAAoBnD,EAAIoB,GAAGpB,EAAIY,cAAcuC,mBAAmBH,IAAO,EAAGhD,EAAIY,cAAgC,oBAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIvB,EAAIY,cAAcuC,mBAAmB3B,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAIoB,EAAKnB,EAAI7B,EAAIoB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,qBAAsBW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,qBAAsBW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY7B,EAAI8B,KAAK9B,EAAIY,cAAe,qBAAsBc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,mBAAmBO,MAAM,CAAC,IAAM,uBAAyBuC,IAAQ,CAAClD,EAAIO,GAAGP,EAAIQ,GAAGwC,YAAc,GAAG/C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBJ,EAAIO,GAAG,mCAAmCN,EAAG,SAAS,CAACD,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIY,cAAcuC,mBAAmBC,KAAK,UAAUpD,EAAIO,GAAG,+HAA+HN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,IAAIjC,EAAI6C,GAAI7C,EAAIY,cAA2B,eAAE,SAASoC,EAAKE,GAAO,OAAOjD,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAA6C,gCAAEI,WAAW,kDAAkDL,MAAM,CAAC,KAAO,WAAW,GAAK,oCAAsCuC,GAAOjC,SAAS,CAAC,MAAQ+B,EAAK,QAAU9B,MAAMC,QAAQnB,EAAIY,cAAcyC,iCAAiCrD,EAAIoB,GAAGpB,EAAIY,cAAcyC,gCAAgCL,IAAO,EAAGhD,EAAIY,cAA6C,iCAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIvB,EAAIY,cAAcyC,gCAAgC7B,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAIoB,EAAKnB,EAAI7B,EAAIoB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,kCAAmCW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,kCAAmCW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY7B,EAAI8B,KAAK9B,EAAIY,cAAe,kCAAmCc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,mBAAmBO,MAAM,CAAC,IAAM,oCAAsCuC,IAAQ,CAAClD,EAAIO,GAAGP,EAAIQ,GAAGwC,YAAc,GAAG/C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBJ,EAAIO,GAAG,mCAAmCN,EAAG,SAAS,CAACD,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIY,cAAcyC,gCAAgCD,KAAK,UAAUpD,EAAIO,GAAG,sFAAsFN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACJ,EAAIiC,GAAG,IAAIjC,EAAI6C,GAAI7C,EAAIY,cAAwB,YAAE,SAASoC,EAAKE,GAAO,OAAOjD,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAIY,cAA6B,gBAAEI,WAAW,kCAAkCL,MAAM,CAAC,KAAO,WAAW,GAAK,oBAAsBuC,GAAOjC,SAAS,CAAC,MAAQ+B,EAAK,QAAU9B,MAAMC,QAAQnB,EAAIY,cAAc0C,iBAAiBtD,EAAIoB,GAAGpB,EAAIY,cAAc0C,gBAAgBN,IAAO,EAAGhD,EAAIY,cAA6B,iBAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIvB,EAAIY,cAAc0C,gBAAgB9B,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAIoB,EAAKnB,EAAI7B,EAAIoB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,kBAAmBW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI7B,EAAI8B,KAAK9B,EAAIY,cAAe,kBAAmBW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY7B,EAAI8B,KAAK9B,EAAIY,cAAe,kBAAmBc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,mBAAmBO,MAAM,CAAC,IAAM,oBAAsBuC,IAAQ,CAAClD,EAAIO,GAAGP,EAAIQ,GAAGwC,YAAc,KAAK/C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBJ,EAAIO,GAAG,mCAAmCN,EAAG,SAAS,CAACD,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIY,cAAc0C,gBAAgBF,KAAK,UAAUpD,EAAIO,GAAG,uGAAuGN,EAAG,MAAM,CAACG,YAAY,uBAAuB,CAACH,EAAG,SAAS,CAACG,YAAY,kBAAkBO,MAAM,CAAC,KAAO,UAAUU,GAAG,CAAC,MAAQrB,EAAIuD,cAAc,CAACtD,EAAG,IAAI,CAACG,YAAY,gBAAgBJ,EAAIO,GAAG,yBAAyBP,EAAIU,QAE7jZ8C,EAAkB,CAAC,WAAY,IAAIxD,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,KAAK,CAACA,EAAG,IAAI,CAACG,YAAY,gBAAgBJ,EAAIO,GAAG,iBACzH,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,4BAA4BJ,EAAIO,GAAG,KAAKN,EAAG,SAAS,CAACD,EAAIO,GAAG,aAC5K,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,0BAA0BJ,EAAIO,GAAG,KAAKN,EAAG,SAAS,CAACD,EAAIO,GAAG,aAC1K,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBJ,EAAIO,GAAG,KAAKN,EAAG,SAAS,CAACD,EAAIO,GAAG,oBACxK,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBJ,EAAIO,GAAG,yLAC5I,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBJ,EAAIO,GAAG,KAAKN,EAAG,SAAS,CAACD,EAAIO,GAAG,mDACxK,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBJ,EAAIO,GAAG,KAAKN,EAAG,SAAS,CAACD,EAAIO,GAAG,qDACxK,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBJ,EAAIO,GAAG,KAAKN,EAAG,SAAS,CAACD,EAAIO,GAAG,0CACxK,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,KAAK,CAACA,EAAG,IAAI,CAACG,YAAY,aAAaJ,EAAIO,GAAG,eACjG,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACD,EAAIO,GAAG,mCAC5J,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACD,EAAIO,GAAG,iCAC5J,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACD,EAAIO,GAAG,sBAC5J,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACD,EAAIO,GAAG,6BAC5J,WAAY,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACD,EAAIO,GAAG,kBCf1J,EAAS,WAAkB,IAAIP,EAAI1C,KAAK2C,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAMX,EAAI/B,OAAO,CAAC+B,EAAIO,GAAG,gBAAgBP,EAAIQ,GAAGR,EAAI8C,MAAM,MAAM9C,EAAIQ,GAAGR,EAAIrB,UAAUsB,EAAG,MAAM,CAACG,YAAY,uCAAuC,CAACH,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBJ,EAAIO,GAAG,KAAKN,EAAG,SAAS,CAACD,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIyD,YAAyB,QAAZzD,EAAI8C,KAAgB7C,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAS,MAAEgB,WAAW,UAAUZ,YAAY,eAAeD,YAAY,CAAC,cAAc,aAAaQ,MAAM,CAAC,KAAOX,EAAI/B,KAAK,KAAO,OAAO,YAAc,eAAe,GAAK+B,EAAI/B,MAAMgD,SAAS,CAAC,MAASjB,EAAS,OAAGqB,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,YAAiBlC,EAAIrB,MAAM2C,EAAOG,OAAO9C,WAAUsB,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC7C,KAAK,QAAQ8C,QAAQ,UAAUpC,MAAOqB,EAAS,MAAEgB,WAAW,UAAUZ,YAAY,eAAeD,YAAY,CAAC,cAAc,aAAaQ,MAAM,CAAC,KAAOX,EAAI/B,KAAK,KAAO,WAAW,YAAc,eAAe,GAAK+B,EAAI/B,MAAMgD,SAAS,CAAC,MAASjB,EAAS,OAAGqB,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,YAAiBlC,EAAIrB,MAAM2C,EAAOG,OAAO9C,WAAUsB,EAAG,MAAM,CAACG,YAAY,oBAAoBC,MAAM,CAAC,qBAAkC,QAAZL,EAAI8C,MAAgB3C,YAAY,CAAC,OAAS,UAAU,WAAa,SAASQ,MAAM,CAAC,MAAQ,+CAA+CU,GAAG,CAAC,MAAQrB,EAAI0D,sBAAsB,CAAc,QAAZ1D,EAAI8C,KAAgB7C,EAAG,IAAI,CAACG,YAAY,uBAAuBH,EAAG,IAAI,CAACG,YAAY,kCAEx/C,EAAkB,GCgBlB,IAAIuD,EAAQ,KACZ,MAAMC,EAAgB,WAChBC,EAAY,OAEH,OACXC,MAAO,CACH7F,KAAM,CAAE8F,UAAU,GAClBpF,MAAO,CAAEqF,QAAS,IAClBP,MAAO,CAAEO,QAAS,KAEtB,OACI,MAAO,CACHC,iBAAiB,EACjBnB,KAAMc,IAGdM,MAAO,CACH,MAAMxB,GACFpF,KAAK6G,MAAM,SAAUzB,GACrBpF,KAAK6G,MAAM,QAASzB,KAG5B0B,QAAS,CACL,sBAEkB,OAAVT,GACArG,KAAKwF,KAAOe,EACZF,EAAQ,IAAIU,QAASC,IACjBC,WAAY,KACRjH,KAAKwF,KAAOc,EACZD,EAAQ,MACT,SAGPA,EAAQ,KACRrG,KAAKwF,KAAOc,MCrDqK,ICMtL,SAASY,EACtBC,EACA1E,EACAyD,EACAkB,EACAC,EACAC,EACAC,EACAC,GAGA,IAoBIC,EApBAxC,EACuB,oBAAlBkC,EAA+BA,EAAclC,QAAUkC,EAuDhE,GApDI1E,IACFwC,EAAQxC,OAASA,EACjBwC,EAAQiB,gBAAkBA,EAC1BjB,EAAQyC,WAAY,GAIlBN,IACFnC,EAAQ0C,YAAa,GAInBL,IACFrC,EAAQ2C,SAAW,UAAYN,GAI7BC,GAEFE,EAAO,SAAUI,GAEfA,EACEA,GACC7H,KAAK8H,QAAU9H,KAAK8H,OAAOC,YAC3B/H,KAAKgI,QAAUhI,KAAKgI,OAAOF,QAAU9H,KAAKgI,OAAOF,OAAOC,WAEtDF,GAA0C,qBAAxBI,sBACrBJ,EAAUI,qBAGRZ,GACFA,EAAa9G,KAAKP,KAAM6H,GAGtBA,GAAWA,EAAQK,uBACrBL,EAAQK,sBAAsBC,IAAIZ,IAKtCtC,EAAQmD,aAAeX,GACdJ,IACTI,EAAOD,EACH,WACEH,EAAa9G,KACXP,MACCiF,EAAQ0C,WAAa3H,KAAKgI,OAAShI,MAAMqI,MAAMC,SAASC,aAG7DlB,GAGFI,EACF,GAAIxC,EAAQ0C,WAAY,CAGtB1C,EAAQuD,cAAgBf,EAExB,IAAIgB,EAAiBxD,EAAQxC,OAC7BwC,EAAQxC,OAAS,SAAkCiG,EAAGb,GAEpD,OADAJ,EAAKlH,KAAKsH,GACHY,EAAeC,EAAGb,QAEtB,CAEL,IAAIc,EAAW1D,EAAQ2D,aACvB3D,EAAQ2D,aAAeD,EAAW,GAAGlE,OAAOkE,EAAUlB,GAAQ,CAACA,GAInE,MAAO,CACL9H,QAASwH,EACTlC,QAASA,GCtFb,IAAI4D,EAAY,EACd,EACA,EACA,GACA,EACA,KACA,KACA,MAIa,EAAAA,E,QC+QA,OAEbC,WAAY,CACV,iBAAkBC,GAGpBvC,MAAO,CACLwC,IAAK,CAACvC,UAAU,IAGlB,OACE,MAAO,CACLwC,SAAU,KACV3F,cAAe,KACfH,QAAS,KACTH,SAAS,IAIb8D,QAAS,CAGP,cAEE9G,KAAKmD,QAAU,qCAEf,IAAI8F,EAAW,IAAIC,SACnBD,EAASE,OAAO,eAAgBnJ,KAAKsD,cAAcC,cACnD0F,EAASE,OAAO,OAAQnJ,KAAKsD,cAAc8F,WAC3CH,EAASE,OAAO,OAAQnJ,KAAKsD,cAAc+F,WAC3CJ,EAASE,OAAO,OAAQnJ,KAAKsD,cAAcgG,WAC3CL,EAASE,OAAO,OAAQnJ,KAAKsD,cAAcuB,WAC3CoE,EAASE,OAAO,cAAenJ,KAAKsD,cAAciG,kBAClDN,EAASE,OAAO,aAAcnJ,KAAKsD,cAAckG,iBACjDP,EAASE,OAAO,mBAAoBnJ,KAAKsD,cAAcwB,uBACvDmE,EAASE,OAAO,qBAAsBnJ,KAAKsD,cAAcuC,oBACzDoD,EAASE,OAAO,kCAAmCnJ,KAAKsD,cAAcyC,iCACtEkD,EAASE,OAAO,kBAAmBnJ,KAAKsD,cAAc0C,iBACtDiD,EAASE,OAAO,qBAAsBnJ,KAAKsD,cAAcqC,oBACzDsD,EAASE,OAAO,qBAAsBnJ,KAAKsD,cAAcmC,oBAEzDzF,KAAKyJ,MAAMC,KAAK1J,KAAKgJ,IAAKC,GAAUU,KAAKC,IACvC5J,KAAK6J,WAIT,eAAe7G,GACb,IAAI8G,EAAO9G,EAAQ8G,KACnB9J,KAAKsD,cAAgBwG,EAAKC,oBAG5B,QACE/J,KAAKgD,QAAU,GACfhD,KAAKmD,QAAU,iCACfnD,KAAKyJ,MAAMxI,IAAIjB,KAAKgJ,KAAKW,KACrBC,IACE5J,KAAKgK,eAAeJ,KAExBD,KAAKM,IACLjK,KAAKgD,SAAU,EACfhD,KAAKmD,QAAU,qBACf+G,YAAY,WACVlK,KAAKmD,QAAU,IACfvB,KAAK5B,MAAO,SAKpB,UACEA,KAAK6J,UCtW2L,ICOhM,EAAY,EACd,EACApH,EACAyD,GACA,EACA,KACA,KACA,MAIa,I,QChBA,kB","file":"AdministrationPcru.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AdministrationPcru\"] = factory();\n\telse\n\t\troot[\"AdministrationPcru\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fb15\");\n","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('section',{staticStyle:{\"position\":\"relative\",\"min-height\":\"100px\"}},[(_vm.configuration)?_c('div',{staticClass:\"container\"},[(_vm.loading)?_c('div',{staticClass:\"overlay\"},[_c('div',{staticClass:\"overlay-content\",class:{ 'text-success bold': _vm.success}},[_c('i',{staticClass:\"animate-spin icon-spinner\"}),_vm._v(\" \"+_vm._s(_vm.loading)+\" \")])]):_vm._e(),_c('form',{attrs:{\"action\":\"\",\"method\":\"post\"}},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3\"},[_vm._v(\" Module \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_enabled ? 'Actif' : 'Inactif'))])]),_c('div',{staticClass:\"col-md-9\"},[_c('div',{staticClass:\"material-switch\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_enabled),expression:\"configuration.pcru_enabled\"}],attrs:{\"id\":\"pcru_enabled\",\"name\":\"pcru_enabled\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.configuration.pcru_enabled)?_vm._i(_vm.configuration.pcru_enabled,null)>-1:(_vm.configuration.pcru_enabled)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_enabled,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_enabled\", $$c)}}}}),_c('label',{staticClass:\"label-primary\",attrs:{\"for\":\"pcru_enabled\"}})])])]),_c('section',{class:_vm.configuration.pcru_enabled ? 'enabled' : 'disabled'},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_vm._m(0),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"host\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(1),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_host),expression:\"configuration.pcru_host\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"host\",\"name\":\"host\"},domProps:{\"value\":(_vm.configuration.pcru_host)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_host\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"port\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(2),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_port),expression:\"configuration.pcru_port\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"port\",\"name\":\"port\"},domProps:{\"value\":(_vm.configuration.pcru_port)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_port\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(3),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_user),expression:\"configuration.pcru_user\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"user\",\"name\":\"user\"},domProps:{\"value\":(_vm.configuration.pcru_user)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_user\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('password-field',{attrs:{\"value\":_vm.configuration.pcru_pass,\"name\":'pass',\"text\":'Mot de passe'},on:{\"change\":function($event){_vm.configuration.pcru_pass = $event}}})],1)]),_vm._m(4),_c('div',{staticClass:\"row\"},[_c('div',[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh_private\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(5),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_ssh_private),expression:\"configuration.pcru_ssh_private\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"ssh_private\",\"name\":\"ssh_private\"},domProps:{\"value\":(_vm.configuration.pcru_ssh_private)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_ssh_private\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh_public\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(6),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_ssh_public),expression:\"configuration.pcru_ssh_public\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"ssh_public\",\"name\":\"ssh_public\"},domProps:{\"value\":(_vm.configuration.pcru_ssh_public)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.configuration, \"pcru_ssh_public\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh_private_pass\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(7),_c('password-field',{attrs:{\"value\":_vm.configuration.pcru_ssh_private_pass,\"name\":'ssh_private_pass',\"text\":'Mot de passe de la clé privée SSH'},on:{\"change\":function($event){_vm.configuration.pcru_ssh_private_pass = $event}}})],1)])])])]),_c('div',{staticClass:\"col-md-6\"},[_vm._m(8),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-10 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(9),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_contract_type),expression:\"configuration.pcru_contract_type\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_contract_type\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.contract_types),function(type){return _c('option',{key:type,domProps:{\"value\":type}},[_vm._v(_vm._s(type)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Le type de contrat \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_contract_type))]),_vm._v(\" sera utilisé par oscar pour selectionner le document à utiliser pour les données PCRU\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(10),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_incharge_role),expression:\"configuration.pcru_incharge_role\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_incharge_role\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.incharge_roles),function(role){return _c('option',{key:role,domProps:{\"value\":role}},[_vm._v(_vm._s(role)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar selectionnera les personnes avec le rôle \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_incharge_role))]),_vm._v(\" de la fiche activité pour extraire le \"),_c('em',[_vm._v(\"Responsable scientifique côté PCRU\")]),_vm._v(\".\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(11),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partner_roles),expression:\"configuration.pcru_partner_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partner_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partner_roles)?_vm._i(_vm.configuration.pcru_partner_roles,role)>-1:(_vm.configuration.pcru_partner_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partner_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partner_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partner_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(12),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partenaire_principal_roles),expression:\"configuration.pcru_partenaire_principal_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partenaire_principal_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partenaire_principal_roles)?_vm._i(_vm.configuration.pcru_partenaire_principal_roles,role)>-1:(_vm.configuration.pcru_partenaire_principal_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partenaire_principal_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partenaire_principal_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partenaire_principal_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le partenaire principal.\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(13),_vm._l((_vm.configuration.unit_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_unit_roles),expression:\"configuration.pcru_unit_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'unit_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_unit_roles)?_vm._i(_vm.configuration.pcru_unit_roles,role)>-1:(_vm.configuration.pcru_unit_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_unit_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'unit_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_unit_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire les codes UMR (labintel) et RNSR.\")])])])])])]),_c('nav',{staticClass:\"buttons text-center\"},[_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.performEdit}},[_c('i',{staticClass:\"icon-floppy\"}),_vm._v(\" Enregistrer \")])])])]):_vm._e()])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('h2',[_c('i',{staticClass:\"icon-upload\"}),_vm._v(\" Accès FTP\")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-building\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Hôte\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-logout\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Port\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Identifiant\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Les fichiers de la clé privée et de la clé publique doivent être déposés dans le répertoire oscar/config/autoload/ et être accessible en lecture à l'utilisateur du serveur web. \")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Nom du fichier contenant la clé privée SSH\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Nom du fichier contenant la clé publique SSH\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Mot de passe de la clé privée SSH\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('h2',[_c('i',{staticClass:\"icon-cog\"}),_vm._v(\" Options\")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Type pour le contrat signé\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Responsable scientifique\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire(s)\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire principal\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Unité(s)\")])])\n}]\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":_vm.name}},[_vm._v(\"Mot de passe \"+_vm._s(_vm.type)+\" / \"+_vm._s(_vm.value))]),_c('div',{staticClass:\"input-group input-lg password-field\"},[_c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-lock\"}),_vm._v(\" \"),_c('strong',[_vm._v(_vm._s(_vm.label))])]),(_vm.type == 'text')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"text\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.value=$event.target.value}}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"password\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.value=$event.target.value}}}),_c('div',{staticClass:\"input-group-addon\",class:{'password-displayed': _vm.type == 'text'},staticStyle:{\"cursor\":\"pointer\",\"background\":\"white\"},attrs:{\"title\":\"Afficher le mot de passe pendant 5 secondes\"},on:{\"click\":_vm.handlerShowPassword}},[(_vm.type == 'text')?_c('i',{staticClass:\"glyphicon icon-eye\"}):_c('i',{staticClass:\"glyphicon icon-eye-off\"})])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent(\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */,\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options =\n typeof scriptExports === 'function' ? scriptExports.options : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) {\n // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=309df7bb\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file diff --git a/public/js/oscar/vite/dist/assets/Activity-cc6ccf89.css b/public/js/oscar/vite/dist/assets/Activity-cc6ccf89.css new file mode 100644 index 0000000000000000000000000000000000000000..85554c544a4c2e49856af06fcf035b7413960196 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/Activity-cc6ccf89.css @@ -0,0 +1 @@ +.confirm-dialog[data-v-efd4eea6]{z-index:10000;.overlay-content[data-v-efd4eea6] {flex-basis: 30% !important; h3[data-v-efd4eea6] {border-bottom: thin solid #eee; margin: .25em .5em; padding: .25em .5em;} .overlay-message[data-v-efd4eea6] {font-size: 1.4em;} nav[data-v-efd4eea6] {height: 50px; width: 100%; padding: .25em .5em; margin: .25em .5em; border-top: thin solid #eee; display: flex; flex-wrap: wrap; justify-content: space-between; align-content: space-between; a.btn[data-v-efd4eea6] {}}}}.disabled[data-v-833d8759]{cursor:not-allowed;color:#aaa;text-decoration:line-through}.change[data-v-833d8759]{border:1px solid #CCC;padding:.3em;margin:.5em 0;border-left:solid #CCC 4px;display:flex;> div[data-v-833d8759] {flex: 1; display: flex; span.text[data-v-833d8759] {flex: 0; font-weight: bold; white-space: nowrap;} select[data-v-833d8759],div[data-v-833d8759]{flex: 1;}} > i[data-v-833d8759] {flex: 0;} > nav[data-v-833d8759] {flex: 0; border-top: solid #CCC 4px; text-align: center;} > div[data-v-833d8759] {flex: 1; display: flex;}}.avenant[data-v-833d8759]{border-left:#CCC 4px solid;&.status-100[data-v-833d8759]{border-color:#ccc}&.status-200[data-v-833d8759]{border-color:#2d7800}p[data-v-833d8759] {border-top: solid #CCC 1px; padding: .5em 2em;} nav[data-v-833d8759] {padding: .3em 0; border-top: solid #CCC 1px; text-align: center;} .modification[data-v-833d8759] {padding: 0 1em;}}.jalon[data-v-42de1793]{background:white;padding:.25em 1em;margin-bottom:.2em}.jalon .main[data-v-42de1793]{display:inline-block;font-size:1.2em;text-align:left;border-bottom:solid thin #ddd;padding:.1em .5em}.jalon.payment[data-v-42de1793]{background:rgba(255,255,255,.7)}.time-value[data-v-42de1793]{font-weight:600}.time-value .ago[data-v-42de1793]{font-weight:100}.list{margin:1em 0}.person-text[data-v-dfc2c1c6]{display:inline-block;position:relative;.info-bulle[data-v-dfc2c1c6] {display: none;} &[data-v-dfc2c1c6]:hover {.info-bulle[data-v-dfc2c1c6] {display: block;}}}.info-bulle[data-v-dfc2c1c6]{position:absolute;text-shadow:none;background-color:#000000b3;box-shadow:-4px 4px 8px #0000004d;header[data-v-dfc2c1c6] {background: #222; display: flex; .infos[data-v-dfc2c1c6] {font-size: 1.25em; padding: 4px .5em 4px .5em; font-weight: 700; .firstname[data-v-dfc2c1c6] {line-height: 16px; font-size: 16px; color: rgba(255,255,255,.8); font-style: italic;} .lastname[data-v-dfc2c1c6] {color: #fff; line-height: 36px; font-size: 30px;}}} .content[data-v-dfc2c1c6] {i[data-v-dfc2c1c6] {color: #999;} font-size: .9em; background: #fff; color: #111; padding: .3em 1em; > div[data-v-dfc2c1c6] {border-bottom: dotted 1px #777; &[data-v-dfc2c1c6]:last-child {border-bottom: none;}}} footer[data-v-dfc2c1c6] {font-size: .7em; padding: 0 .25em; border-top: 1px solid #DDD; background-color: #EEE; color: #555; text-align: right;}}.workpackage[data-v-7f36a26b]{max-width:31%;margin:1%}.vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit{width:1em}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.activity-fiche[data-v-8de60033]{position:relative;padding-bottom:4em}.section-infos[data-v-8de60033]{margin-top:1em;scroll-margin-top:120px}.section-infos:target h2[data-v-8de60033]{-webkit-animation-name:animation-8de60033;-webkit-animation-duration:2s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;-webkit-animation-play-state:running;animation-name:animation-8de60033;animation-duration:2s;animation-timing-function:ease-in-out;animation-iteration-count:1;animation-play-state:running}.section-infos>h2[data-v-8de60033]{border-bottom:1px solid #a2a7af;margin:0;padding:.2em 0;display:flex;justify-content:left;justify-content:space-between}@-webkit-keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}.activity-project[data-v-8de60033]{padding:.25em 1em .25em .25em;border-bottom:#eee solid thin}.activity-type[data-v-8de60033]{background:#EEE;padding:.25em 1em .25em .25em}.activity-type .icon-tag[data-v-8de60033]{color:#999}.type-chain span[data-v-8de60033]{font-weight:400}.type-chain span[data-v-8de60033]:last-child{font-weight:700}.type-chain span[data-v-8de60033]:last-child:after{content:""}.type-chain span[data-v-8de60033]{margin:auto}.type-chain span[data-v-8de60033]:after{content:" > ";color:#ccc}.buttons[data-v-8de60033]{padding:1em;text-align:right}header .line-bottom[data-v-8de60033]{border-bottom:#dee2ea thin solid;padding-bottom:1em}header h3[data-v-8de60033]{font-size:1em}header h4[data-v-8de60033]{color:#95afe3}header .texthighlight[data-v-8de60033]{color:#111}header .texthighlight strong[data-v-8de60033],header .texthighlight time[data-v-8de60033]{color:#000}.descriptionPacked[data-v-8de60033]{cursor:pointer;max-height:4em;overflow:hidden}.budget[data-v-8de60033]{border-left:#dee2ea thin solid}.budget .amount[data-v-8de60033]{font-size:1.4em;border-top:solid thin #EEE;border-bottom:solid thin #EEE}.budget .details[data-v-8de60033]{font-size:.8em}.budget .details small[data-v-8de60033]{display:block} diff --git a/public/js/oscar/vite/dist/assets/Activity-ed5cb27b.css b/public/js/oscar/vite/dist/assets/Activity-ed5cb27b.css deleted file mode 100644 index aedf910b084e5fa1ffce4da6641e6690113f222d..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/Activity-ed5cb27b.css +++ /dev/null @@ -1 +0,0 @@ -.confirm-dialog[data-v-efd4eea6]{z-index:10000}.confirm-dialog .overlay-content{h3[data-v-efd4eea6] {border-bottom: thin solid #eee; margin: .25em .5em; padding: .25em .5em;} .overlay-message[data-v-efd4eea6] {font-size: 1.4em;} nav {&[data-v-efd4eea6] {height: 50px; width: 100%; padding: .25em .5em; margin: .25em .5em; border-top: thin solid #eee; display: flex; flex-wrap: wrap; justify-content: space-between; align-content: space-between;} a.btn[data-v-efd4eea6] {}}}.confirm-dialog .overlay-content[data-v-efd4eea6]{flex-basis:30%!important}.disabled[data-v-833d8759]{cursor:not-allowed;color:#aaa;text-decoration:line-through}.change[data-v-833d8759]{border:1px solid #CCC;padding:.3em;margin:.5em 0;border-left:solid #CCC 4px;display:flex}.change>div{span.text[data-v-833d8759] {flex: 0; font-weight: bold; white-space: nowrap;} select[data-v-833d8759],div[data-v-833d8759]{flex: 1;}}.change>i[data-v-833d8759]{flex:0}.change>nav[data-v-833d8759]{flex:0;border-top:solid #CCC 4px;text-align:center}.change>div[data-v-833d8759]{flex:1;display:flex}.avenant{p[data-v-833d8759] {border-top: solid #CCC 1px; padding: .5em 2em;} nav[data-v-833d8759] {padding: .3em 0; border-top: solid #CCC 1px; text-align: center;} .modification[data-v-833d8759] {padding: 0 1em;}}.avenant[data-v-833d8759]{border-left:#CCC 4px solid}.avenant.status-100[data-v-833d8759]{border-color:#ccc}.avenant.status-200[data-v-833d8759]{border-color:#2d7800}.jalon[data-v-42de1793]{background:white;padding:.25em 1em;margin-bottom:.2em}.jalon .main[data-v-42de1793]{display:inline-block;font-size:1.2em;text-align:left;border-bottom:solid thin #ddd;padding:.1em .5em}.jalon.payment[data-v-42de1793]{background:rgba(255,255,255,.7)}.time-value[data-v-42de1793]{font-weight:600}.time-value .ago[data-v-42de1793]{font-weight:100}.list{margin:1em 0}.person-text[data-v-dfc2c1c6]{display:inline-block;position:relative}.person-text .info-bulle[data-v-dfc2c1c6]{display:none}.person-text:hover .info-bulle[data-v-dfc2c1c6]{display:block}.info-bulle{header {&[data-v-dfc2c1c6] {background: #222; display: flex;} .infos {&[data-v-dfc2c1c6] {font-size: 1.25em; padding: 4px .5em 4px .5em; font-weight: 700;} .firstname[data-v-dfc2c1c6] {line-height: 16px; font-size: 16px; color: rgba(255,255,255,.8); font-style: italic;} .lastname[data-v-dfc2c1c6] {color: #fff; line-height: 36px; font-size: 30px;}}} .content {&[data-v-dfc2c1c6] {font-size: .9em; background: #fff; color: #111; padding: .3em 1em;} i[data-v-dfc2c1c6] {color: #999;} > div {&[data-v-dfc2c1c6] {border-bottom: dotted 1px #777;} &[data-v-dfc2c1c6]:last-child {border-bottom: none;}}} footer[data-v-dfc2c1c6] {font-size: .7em; padding: 0 .25em; border-top: 1px solid #DDD; background-color: #EEE; color: #555; text-align: right;}}.info-bulle[data-v-dfc2c1c6]{position:absolute;text-shadow:none;background-color:#000000b3;box-shadow:-4px 4px 8px #0000004d}.workpackage[data-v-7f36a26b]{max-width:31%;margin:1%}.vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit{width:1em}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.activity-fiche[data-v-8de60033]{position:relative;padding-bottom:4em}.section-infos[data-v-8de60033]{margin-top:1em;scroll-margin-top:120px}.section-infos:target h2[data-v-8de60033]{-webkit-animation-name:animation-8de60033;-webkit-animation-duration:2s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;-webkit-animation-play-state:running;animation-name:animation-8de60033;animation-duration:2s;animation-timing-function:ease-in-out;animation-iteration-count:1;animation-play-state:running}.section-infos>h2[data-v-8de60033]{border-bottom:1px solid #a2a7af;margin:0;padding:.2em 0;display:flex;justify-content:left;justify-content:space-between}@-webkit-keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}.activity-project[data-v-8de60033]{padding:.25em 1em .25em .25em;border-bottom:#eee solid thin}.activity-type[data-v-8de60033]{background:#EEE;padding:.25em 1em .25em .25em}.activity-type .icon-tag[data-v-8de60033]{color:#999}.type-chain span[data-v-8de60033]{font-weight:400}.type-chain span[data-v-8de60033]:last-child{font-weight:700}.type-chain span[data-v-8de60033]:last-child:after{content:""}.type-chain span[data-v-8de60033]{margin:auto}.type-chain span[data-v-8de60033]:after{content:" > ";color:#ccc}.buttons[data-v-8de60033]{padding:1em;text-align:right}header .line-bottom[data-v-8de60033]{border-bottom:#dee2ea thin solid;padding-bottom:1em}header h3[data-v-8de60033]{font-size:1em}header h4[data-v-8de60033]{color:#95afe3}header .texthighlight[data-v-8de60033]{color:#111}header .texthighlight strong[data-v-8de60033],header .texthighlight time[data-v-8de60033]{color:#000}.descriptionPacked[data-v-8de60033]{cursor:pointer;max-height:4em;overflow:hidden}.budget[data-v-8de60033]{border-left:#dee2ea thin solid}.budget .amount[data-v-8de60033]{font-size:1.4em;border-top:solid thin #EEE;border-bottom:solid thin #EEE}.budget .details[data-v-8de60033]{font-size:.8em}.budget .details small[data-v-8de60033]{display:block} diff --git a/public/js/oscar/vite/dist/assets/ActivityDocument-be06c000.css b/public/js/oscar/vite/dist/assets/ActivityDocument-2deed9d1.css similarity index 86% rename from public/js/oscar/vite/dist/assets/ActivityDocument-be06c000.css rename to public/js/oscar/vite/dist/assets/ActivityDocument-2deed9d1.css index 08628604053cdf383a766dff9649c4f6591a1941..cd5c87292698b3b13126b3b2a0cc10ae570471d6 100644 --- a/public/js/oscar/vite/dist/assets/ActivityDocument-be06c000.css +++ b/public/js/oscar/vite/dist/assets/ActivityDocument-2deed9d1.css @@ -1 +1 @@ -.step-content[data-v-fc17618a]{border:thin solid #aaa;border-top:none;padding:1em}.card .alert[data-v-fc17618a]{padding:0 .5em;margin:.1em}.step[data-v-fc17618a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-fc17618a]{border-color:#900}.step .alert[data-v-fc17618a]{margin:0;padding:.25em 1em}.current[data-v-fc17618a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-fc17618a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-fc17618a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-fc17618a]:before{font-family:fontello;content:""}.stepHandler[data-v-fc17618a]:hover,.stepHandler[data-v-fc17618a]:focus{color:#333;background:#8E969F} +.step-content[data-v-fc17618a]{border:thin solid #aaa;border-top:none;padding:1em}.card .alert[data-v-fc17618a]{padding:0 .5em;margin:.1em}.step[data-v-fc17618a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-fc17618a]{border-color:#900}.step .alert[data-v-fc17618a]{margin:0;padding:.25em 1em}.current[data-v-fc17618a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-fc17618a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-fc17618a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-fc17618a]:before{font-family:fontello;content:"\e8a4"}.stepHandler[data-v-fc17618a]:hover,.stepHandler[data-v-fc17618a]:focus{color:#333;background:#8E969F} diff --git a/public/js/oscar/vite/dist/assets/ActivityNotes-57bb9039.css b/public/js/oscar/vite/dist/assets/ActivityNotes-57bb9039.css deleted file mode 100644 index a990cc4862568b30588a535e4f777c9c91b4701b..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/ActivityNotes-57bb9039.css +++ /dev/null @@ -1 +0,0 @@ -.note[data-v-543bfc57]{background-color:#fff;margin:0 0 .5em;padding:0}.note .note-header[data-v-543bfc57]{padding:.2em 1em;border-bottom:solid thin #DDD;display:flex;justify-content:space-between}.note .note-content[data-v-543bfc57]{padding:.2em 1em;white-space:pre-wrap;font-family:monospace} diff --git a/public/js/oscar/vite/dist/assets/ActivityNotes-b71891b4.css b/public/js/oscar/vite/dist/assets/ActivityNotes-b71891b4.css new file mode 100644 index 0000000000000000000000000000000000000000..c77a55c212f3bbed30ba1aaacba030c88ceff0b1 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/ActivityNotes-b71891b4.css @@ -0,0 +1 @@ +.note[data-v-543bfc57]{background-color:#fff;margin:0 0 .5em;padding:0;.note-header[data-v-543bfc57] {padding: .2em 1em; border-bottom: solid thin #DDD; display: flex; justify-content: space-between;} .note-content[data-v-543bfc57] {padding: .2em 1em; white-space: pre-wrap; font-family: monospace;}} diff --git a/public/js/oscar/vite/dist/assets/ActivityPcruInformations-cccdc180.css b/public/js/oscar/vite/dist/assets/ActivityPcruInformations-cccdc180.css new file mode 100644 index 0000000000000000000000000000000000000000..597d30db067be44e88e44f55e9cbad22dab8b1c9 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/ActivityPcruInformations-cccdc180.css @@ -0,0 +1 @@ +#form-table{background:white;padding:.5em;display:grid;grid-template-columns:.1fr .8fr .9fr 1fr 1fr .3fr 1fr;text-align:center}.header{font-weight:700}#form-table>*{border:1px solid #ddd;align-content:center}#form-table>label{margin-bottom:0}#donnees-envoyees-table{background:white;padding:.5em;display:grid;grid-template-columns:.1fr .9fr 1.4fr 1.4fr 1.3fr;text-align:center}#donnees-envoyees-table>*{border:1px solid #ddd;align-content:center}#donnees-envoyees-table>label{margin-bottom:0}.invalid{background-color:#f2dede;border:2px solid red}.invalidSpan{color:#a94442;font-weight:700}ul{margin-bottom:0}label{font-weight:400}form input[disabled],form select[disabled]{cursor:not-allowed}.info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.error{background-color:#f2dede;border-color:#ebccd1;color:#a94442;padding:15px;border:1px solid transparent}.success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}input.bold:not(.invalid){border:2px solid black}select.bold:not(.invalid){border:2px solid black} diff --git a/public/js/oscar/vite/dist/assets/DocumentsList-4af197b4.css b/public/js/oscar/vite/dist/assets/DocumentsList-4af197b4.css deleted file mode 100644 index bf115ea53f20f547321a896bde24bfc4f182a8e9..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/DocumentsList-4af197b4.css +++ /dev/null @@ -1 +0,0 @@ -.step-content[data-v-65e61e4a]{border:thin solid #aaa;border-top:none;padding:1em}.document-metas[data-v-65e61e4a]{display:flex;justify-content:space-between}.document-metas>*[data-v-65e61e4a]{flex:auto}.card .alert[data-v-65e61e4a]{padding:0 .5em;margin:.1em}.step[data-v-65e61e4a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-65e61e4a]{border-color:#900}.step .alert[data-v-65e61e4a]{margin:0;padding:.25em 1em}.current[data-v-65e61e4a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-65e61e4a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-65e61e4a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-65e61e4a]:before{font-family:fontello;content:""}.stepHandler[data-v-65e61e4a]:hover,.stepHandler[data-v-65e61e4a]:focus{color:#333;background:#8E969F}.process[data-v-65e61e4a],.signature[data-v-65e61e4a]{background:white;padding:.5em 1em;margin:1em;border:thin solid #92b2ae;border-left-width:8px}.signature h2[data-v-65e61e4a]{font-size:1.5em;margin:0;border-bottom:solid thin #c5c5c5;padding:.1em 0;display:flex}.signature h2 span[data-v-65e61e4a]{flex:1 1 auto}.signature h2 .status-flag[data-v-65e61e4a]{flex:0 0 6em;text-align:right}.buttons-bar[data-v-65e61e4a]{padding:.5em}.signature .recipient[data-v-65e61e4a]{display:block}.signature .recipient .title[data-v-65e61e4a]{display:flex}.recipient[data-v-65e61e4a]{border:solid thin #92b2ae;border-left-width:8px;text-shadow:4px -1px 0 rgb(255,255,255,.3);padding:.2em 0 .2em .5em;margin-right:.5em}.recipient label[data-v-65e61e4a]{display:flex;justify-content:space-between}.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .email[data-v-65e61e4a]{flex:0;margin-right:auto;text-align:right}.recipient label[data-v-65e61e4a]{display:flex;padding:0 1em 0 0;width:100%;color:#777}.recipient.selected[data-v-65e61e4a]{border-color:#12b368;background:#adfad8}.recipient.selected label[data-v-65e61e4a]{color:#000}.recipient .email[data-v-65e61e4a],.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .status-flag[data-v-65e61e4a]{flex:0 0 6em}.metas[data-v-65e61e4a]{display:inline-block;margin:0;padding:.5em 0}.metas .meta[data-v-65e61e4a]{display:inline-block;background:#d4dedd;padding:0 .5em;border-radius:8px}.recipient-signature[data-v-65e61e4a]{background:white;margin:.5em 0;padding:.7em 1em .1em;border-left:solid 4px #666666}.observer-inline[data-v-65e61e4a]{background:#e1ece6;display:inline-block;border-radius:4px;padding:0 .5em;margin:0 .3em}.recipient-signature h3[data-v-65e61e4a]{margin:0}.status:hover .status-text[data-v-65e61e4a]{opacity:1}.status .status-text[data-v-65e61e4a]{transition:opacity .3s;font-weight:700;color:#fff;text-shadow:-1px 1px 0 rgba(0,0,0,.5);margin:0;padding:0 .25em;font-size:.75em}.status-flag[data-v-65e61e4a]{display:none}.signature-status-501[data-v-65e61e4a]{border-color:#83243a}.signature-status-501 .status-text[data-v-65e61e4a],.signature-status-501 .status-flag[data-v-65e61e4a]{background-color:#83243a}.signature-status-501 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-401[data-v-65e61e4a]{border-left-color:#8d7260}.signature-status-401 .status-text[data-v-65e61e4a],.signature-status-401 .status-flag[data-v-65e61e4a]{background-color:#8d7260}.signature-status-401 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-105[data-v-65e61e4a]{border-left-color:#8eb4c9}.signature-status-105 .status-text[data-v-65e61e4a],.signature-status-105 .status-flag[data-v-65e61e4a]{background-color:#8eb4c9}.signature-status-105 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-101[data-v-65e61e4a]{border-left-color:#92b2ae}.signature-status-101 .status-text[data-v-65e61e4a],.signature-status-101 .status-flag[data-v-65e61e4a]{background-color:#92b2ae}.signature-status-101 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-201[data-v-65e61e4a]{border-left-color:#447c44}.signature-status-201 .status-text[data-v-65e61e4a],.signature-status-201 .status-flag[data-v-65e61e4a]{background-color:#447c44}.signature-status-201 .status-flag[data-v-65e61e4a]:before{content:""} diff --git a/public/js/oscar/vite/dist/assets/DocumentsList-4e009bf5.css b/public/js/oscar/vite/dist/assets/DocumentsList-4e009bf5.css new file mode 100644 index 0000000000000000000000000000000000000000..cdb9b712a688f9c141ab5eb4eee6248d40ba5875 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/DocumentsList-4e009bf5.css @@ -0,0 +1 @@ +.step-content[data-v-65e61e4a]{border:thin solid #aaa;border-top:none;padding:1em}.document-metas[data-v-65e61e4a]{display:flex;justify-content:space-between;>*[data-v-65e61e4a] {flex: auto;}}.card .alert[data-v-65e61e4a]{padding:0 .5em;margin:.1em}.step[data-v-65e61e4a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-65e61e4a]{border-color:#900}.step .alert[data-v-65e61e4a]{margin:0;padding:.25em 1em}.current[data-v-65e61e4a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-65e61e4a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-65e61e4a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-65e61e4a]:before{font-family:fontello;content:"\e8a4"}.stepHandler[data-v-65e61e4a]:hover,.stepHandler[data-v-65e61e4a]:focus{color:#333;background:#8E969F}.process[data-v-65e61e4a],.signature[data-v-65e61e4a]{background:white;padding:.5em 1em;margin:1em;border:thin solid #92b2ae;border-left-width:8px}.signature h2[data-v-65e61e4a]{font-size:1.5em;margin:0;border-bottom:solid thin #c5c5c5;padding:.1em 0;display:flex}.signature h2 span[data-v-65e61e4a]{flex:1 1 auto}.signature h2 .status-flag[data-v-65e61e4a]{flex:0 0 6em;text-align:right}.buttons-bar[data-v-65e61e4a]{padding:.5em}.signature .recipient[data-v-65e61e4a]{display:block}.signature .recipient .title[data-v-65e61e4a]{display:flex}.recipient[data-v-65e61e4a]{border:solid thin #92b2ae;border-left-width:8px;text-shadow:4px -1px 0 rgb(255,255,255,.3);padding:.2em 0 .2em .5em;margin-right:.5em}.recipient label[data-v-65e61e4a]{display:flex;justify-content:space-between}.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .email[data-v-65e61e4a]{flex:0;margin-right:auto;text-align:right}.recipient label[data-v-65e61e4a]{display:flex;padding:0 1em 0 0;width:100%;color:#777}.recipient.selected[data-v-65e61e4a]{border-color:#12b368;background:#adfad8}.recipient.selected label[data-v-65e61e4a]{color:#000}.recipient .email[data-v-65e61e4a],.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .status-flag[data-v-65e61e4a]{flex:0 0 6em}.metas[data-v-65e61e4a]{display:inline-block;margin:0;padding:.5em 0}.metas .meta[data-v-65e61e4a]{display:inline-block;background:#d4dedd;padding:0 .5em;border-radius:8px}.recipient-signature[data-v-65e61e4a]{background:white;margin:.5em 0;padding:.7em 1em .1em;border-left:solid 4px #666666}.observer-inline[data-v-65e61e4a]{background:#e1ece6;display:inline-block;border-radius:4px;padding:0 .5em;margin:0 .3em}.recipient-signature h3[data-v-65e61e4a]{margin:0}.status:hover .status-text[data-v-65e61e4a]{opacity:1}.status .status-text[data-v-65e61e4a]{transition:opacity .3s;font-weight:700;color:#fff;text-shadow:-1px 1px 0 rgba(0,0,0,.5);margin:0;padding:0 .25em;font-size:.75em}.status-flag[data-v-65e61e4a]{display:none}.signature-status-501[data-v-65e61e4a]{border-color:#83243a}.signature-status-501 .status-text[data-v-65e61e4a],.signature-status-501 .status-flag[data-v-65e61e4a]{background-color:#83243a}.signature-status-501 .status-flag[data-v-65e61e4a]:before{content:"\e85d"}.signature-status-401[data-v-65e61e4a]{border-left-color:#8d7260}.signature-status-401 .status-text[data-v-65e61e4a],.signature-status-401 .status-flag[data-v-65e61e4a]{background-color:#8d7260}.signature-status-401 .status-flag[data-v-65e61e4a]:before{content:"\e803"}.signature-status-105[data-v-65e61e4a]{border-left-color:#8eb4c9}.signature-status-105 .status-text[data-v-65e61e4a],.signature-status-105 .status-flag[data-v-65e61e4a]{background-color:#8eb4c9}.signature-status-105 .status-flag[data-v-65e61e4a]:before{content:"\e88d"}.signature-status-101[data-v-65e61e4a]{border-left-color:#92b2ae}.signature-status-101 .status-text[data-v-65e61e4a],.signature-status-101 .status-flag[data-v-65e61e4a]{background-color:#92b2ae}.signature-status-101 .status-flag[data-v-65e61e4a]:before{content:"\f252"}.signature-status-201[data-v-65e61e4a]{border-left-color:#447c44}.signature-status-201 .status-text[data-v-65e61e4a],.signature-status-201 .status-flag[data-v-65e61e4a]{background-color:#447c44}.signature-status-201 .status-flag[data-v-65e61e4a]:before{content:"\e87f"} diff --git a/public/js/oscar/vite/dist/assets/Loader-ee83f9da.css b/public/js/oscar/vite/dist/assets/Loader-ee83f9da.css new file mode 100644 index 0000000000000000000000000000000000000000..476bc1c2fcb2684264d0d10a47c81e0fe0783593 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/Loader-ee83f9da.css @@ -0,0 +1 @@ +.loader[data-v-573ae632]{background-color:#fffc;display:flex;align-items:center;justify-content:center;.message[data-v-573ae632] {text-align: center; font-size: 1em; font-weight: 600; -webkit-animation-name: animation-573ae632; -webkit-animation-duration: .5s; -webkit-animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; -webkit-animation-play-state: running; animation-name: animation-573ae632; animation-duration: .5s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-play-state: running; .from[data-v-573ae632] {font-size: .7em; font-weight: 300;}}}@-webkit-keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}} diff --git a/public/js/oscar/vite/dist/assets/Loader-f7bf6891.css b/public/js/oscar/vite/dist/assets/Loader-f7bf6891.css deleted file mode 100644 index 3cfa8cc30e40fd04c04c0a9fa42544803663f810..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/Loader-f7bf6891.css +++ /dev/null @@ -1 +0,0 @@ -.loader[data-v-573ae632]{background-color:#fffc;display:flex;align-items:center;justify-content:center}.loader .message[data-v-573ae632]{text-align:center;font-size:1em;font-weight:600;-webkit-animation-name:animation-573ae632;-webkit-animation-duration:.5s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;-webkit-animation-play-state:running;animation-name:animation-573ae632;animation-duration:.5s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-play-state:running}.loader .message .from[data-v-573ae632]{font-size:.7em;font-weight:300}@-webkit-keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}} diff --git a/public/js/oscar/vite/dist/assets/Modal-2266e1e2.css b/public/js/oscar/vite/dist/assets/Modal-2266e1e2.css new file mode 100644 index 0000000000000000000000000000000000000000..1ae316c5b0af9978695acb4620bb2791113d1713 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/Modal-2266e1e2.css @@ -0,0 +1 @@ +.overlay[data-v-8e477e4f]{z-index:5000;.overlay-content[data-v-8e477e4f] {height: 90vh; position: relative; .overlay-pending[data-v-8e477e4f] {font-weight: 600; min-height: 10em; line-height: 10em; text-align: center; -webkit-animation-name: animation-8e477e4f; -webkit-animation-duration: 1s; -webkit-animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; -webkit-animation-play-state: running; animation-name: animation-8e477e4f; animation-duration: 1s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-play-state: running;} .overlay-title[data-v-8e477e4f] {color: #333; padding: .25em; position: relative; height: 2em; .overlay-closer[data-v-8e477e4f] {position: absolute; right: 0em; top: 0;}} .overlay-buttons[data-v-8e477e4f] {text-align: center; padding: .5em 0 .3em 0; position: absolute; bottom: 0; left: 0; right: 0;} .overlay-body[data-v-8e477e4f] {border: thin solid #eee; background: #FEFEFE; margin: 1em; position: absolute; top: 2.5em; left: 0; right: 0; bottom: 2.5em; overflow: scroll;}}}@-webkit-keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}} diff --git a/public/js/oscar/vite/dist/assets/Modal-700b8a23.css b/public/js/oscar/vite/dist/assets/Modal-700b8a23.css deleted file mode 100644 index 435b0ec6d11c357688f6ba8df6b885adf8b3874d..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/Modal-700b8a23.css +++ /dev/null @@ -1 +0,0 @@ -.overlay[data-v-8e477e4f]{z-index:5000}.overlay .overlay-content[data-v-8e477e4f]{height:90vh;position:relative}.overlay .overlay-content .overlay-pending[data-v-8e477e4f]{font-weight:600;min-height:10em;line-height:10em;text-align:center;-webkit-animation-name:animation-8e477e4f;-webkit-animation-duration:1s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;-webkit-animation-play-state:running;animation-name:animation-8e477e4f;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-play-state:running}.overlay .overlay-content .overlay-title[data-v-8e477e4f]{color:#333;padding:.25em;position:relative;height:2em}.overlay .overlay-content .overlay-title .overlay-closer[data-v-8e477e4f]{position:absolute;right:0;top:0}.overlay .overlay-content .overlay-buttons[data-v-8e477e4f]{text-align:center;padding:.5em 0 .3em;position:absolute;bottom:0;left:0;right:0}.overlay .overlay-content .overlay-body[data-v-8e477e4f]{border:thin solid #eee;background:#FEFEFE;margin:1em;position:absolute;top:2.5em;left:0;right:0;bottom:2.5em;overflow:scroll}@-webkit-keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}} diff --git a/public/js/oscar/vite/dist/assets/PcruTransmissions-d5165e09.css b/public/js/oscar/vite/dist/assets/PcruTransmissions-d5165e09.css new file mode 100644 index 0000000000000000000000000000000000000000..301515bec5bd59e04b8a988f975756b216d1afb0 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/PcruTransmissions-d5165e09.css @@ -0,0 +1 @@ +.info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.warning{background-color:#fcf8e3;color:#8a6d3b}.error{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}td,th{padding:.5em}.button{border:1px solid;border-radius:4px;padding-left:.4em;padding-right:.4em}td span:not(:first-child){margin-left:.5em} diff --git a/public/js/oscar/vite/dist/assets/ProjectActivityLogs-934299c2.js b/public/js/oscar/vite/dist/assets/ProjectActivityLogs-a43a204c.js similarity index 88% rename from public/js/oscar/vite/dist/assets/ProjectActivityLogs-934299c2.js rename to public/js/oscar/vite/dist/assets/ProjectActivityLogs-a43a204c.js index 7f2e2f2722b2c4f2839839dfb6ce6a1897290a02..e9d4b85fd333dafa32bc028d0669580efc10d6b4 100644 --- a/public/js/oscar/vite/dist/assets/ProjectActivityLogs-934299c2.js +++ b/public/js/oscar/vite/dist/assets/ProjectActivityLogs-a43a204c.js @@ -1 +1 @@ -import{y as o}from"../vendor.js";import{m as e}from"../vendor2.js";import{A as i}from"../vendor11.js";import{t as m}from"../vendor19.js";import"../vendor5.js";import"../vendor7.js";import"../vendor14.js";import"../vendor16.js";let l=document.querySelector("#activity-logs");const r=o(i,{url:l.dataset.url});r.config.globalProperties.$filters={timeAgo(t){return e.timeAgo(t)},date(t){return e.date(t)},dateFull(t){return e.dateFull(t)},filesize(t){return filesize.filesize(t)},money(t){return money.money(t)},log(t){return m.log(t)}};r.mount("#activity-logs"); +import{A as o}from"../vendor.js";import{m as e}from"../vendor2.js";import{A as i}from"../vendor11.js";import{t as m}from"../vendor19.js";import"../vendor5.js";import"../vendor7.js";import"../vendor14.js";import"../vendor16.js";let l=document.querySelector("#activity-logs");const r=o(i,{url:l.dataset.url});r.config.globalProperties.$filters={timeAgo(t){return e.timeAgo(t)},date(t){return e.date(t)},dateFull(t){return e.dateFull(t)},filesize(t){return filesize.filesize(t)},money(t){return money.money(t)},log(t){return m.log(t)}};r.mount("#activity-logs"); diff --git a/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-283b86d9.js b/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-72e95239.js similarity index 83% rename from public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-283b86d9.js rename to public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-72e95239.js index 52742a8e5f1a8ddea9834dcfc5df37b3ad8c191b..87c09797a66499768e7b86bfced3ed0455cf12e4 100644 --- a/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-283b86d9.js +++ b/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-72e95239.js @@ -1 +1 @@ -import{y as n}from"../vendor.js";import{A as r}from"../vendor13.js";import{m as s}from"../vendor4.js";import"../vendor7.js";let e=document.querySelector("#depenses2");const o=n(r,{url:e.dataset.url,standalone:!0,datas:{},syncurl:e.dataset.syncurl});o.config.globalProperties.$filters={money:function(t){return s.money(t)}};console.log("DEPENSE2");console.log(e.dataset);o.mount("#depenses2"); +import{A as n}from"../vendor.js";import{A as r}from"../vendor13.js";import{m as s}from"../vendor4.js";import"../vendor7.js";let e=document.querySelector("#depenses2");const o=n(r,{url:e.dataset.url,standalone:!0,datas:{},syncurl:e.dataset.syncurl});o.config.globalProperties.$filters={money:function(t){return s.money(t)}};console.log("DEPENSE2");console.log(e.dataset);o.mount("#depenses2"); diff --git a/public/js/oscar/vite/dist/assets/TimesheetDeclaration-d2772701.css b/public/js/oscar/vite/dist/assets/TimesheetDeclaration-d2772701.css deleted file mode 100644 index 8d010070bbf84b7dab0250cd09651514ff250b1a..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/TimesheetDeclaration-d2772701.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.cartouche[data-v-45fb2e96]{white-space:nowrap;margin:0;border-radius:2px;box-shadow:none;font-size:.75em}.cartouche.training[data-v-45fb2e96]{background-color:#0b58a2}.cartouche.sickleave[data-v-45fb2e96]{background-color:olive}.cartouche.wp[data-v-45fb2e96]{background-color:#6a5999}.cartouche.conflict[data-v-45fb2e96]{background:#AA0000}.timesheet-item[data-v-c5ac47ec]{background:rgb(226.95,230.35,232.05);cursor:pointer;border:thin rgb(91.8,105.4,112.2) solid;margin:.3em 0;font-size:1em;display:flex;position:relative;transition:all .3s}.timesheet-item[data-v-c5ac47ec]>*{padding:.3em .5em}.timesheet-item .project-acronym[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-right:.8em;padding-left:.8em;color:#abb5ba;background:rgb(91.8,105.4,112.2);text-shadow:-1px 1px 0 rgba(0,0,0,.3);font-weight:700}.timesheet-item .project-acronym[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:rgba(255,255,255,0);transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .activity-label[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-left:1em;padding-right:1em;background:rgb(170.85,181.05,186.15);color:#171a1c;font-size:.8em;line-height:2em}.timesheet-item .activity-label[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1.2em;height:1.2em;background:rgb(91.8,105.4,112.2);transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .workpackage-infos[data-v-c5ac47ec]{transition:all .3s;position:relative;padding-left:1em}.timesheet-item .workpackage-infos[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:rgb(170.85,181.05,186.15);transform:rotate(45deg);position:absolute;left:-.6em;top:.5em;z-index:10000}.timesheet-item.selected[data-v-c5ac47ec],.timesheet-item[data-v-c5ac47ec]:hover{background:white;border:thin #0088cc solid;color:#08c}.timesheet-item.selected .project-acronym[data-v-c5ac47ec],.timesheet-item:hover .project-acronym[data-v-c5ac47ec]{color:#9df;background:#0088cc}.timesheet-item.selected .activity-label[data-v-c5ac47ec],.timesheet-item:hover .activity-label[data-v-c5ac47ec]{background:#66ccff;color:#023}.timesheet-item.selected .activity-label[data-v-c5ac47ec]:before,.timesheet-item:hover .activity-label[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#66ccff}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]{flex:1}.timesheet-item.horslots-item .activity-label[data-v-c5ac47ec]:before{content:none}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]:before{background:rgb(91.8,105.4,112.2);top:.8em}.timesheet-item.horslots-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item.horslots-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected[data-v-c5ac47ec]{box-shadow:.25em 0 .5em #08cc}.timesheet-item.selected .project-acronym[data-v-c5ac47ec]:before{background:white}.wp-duration{display:flex;border-bottom:thin solid white;align-items:center}.wp-duration strong small{font-weight:100}.wp-duration[class*=status-]{border-left:solid 4px #ddd}.wp-duration.status-5{border-left-color:#0b58a2}.wp-duration .icon-comment{color:#ccc}.wp-duration .icon-comment.with-comment{color:#000}.left{flex:0 0 35px;overflow:hidden;display:flex;flex-direction:column;padding-left:8px;border-left:solid #fff thin}.total{margin-left:auto;font-size:1.4em;font-weight:700;padding-right:.5em}.total em{font-size:.5em;font-weight:100;line-height:2em}[class*=icon-]{text-align:center}.icon-trash,.icon-edit{cursor:pointer;text-align:center}.icon-trash:hover,.icon-edit:hover{background:#0b58a2;color:#fff}.ui-timechooser[data-v-755f0c71]{background:white;border:solid 1px #ddd;max-width:450px;margin:0 auto}.ui-timechooser .percents[data-v-755f0c71]{border-bottom:1px solid #ddd;display:flex}.ui-timechooser .percents span[data-v-755f0c71]{flex:1 1 auto;padding:2px 4px;text-align:center;font-size:2em;cursor:pointer}.ui-timechooser .percents span[data-v-755f0c71]:hover,.ui-timechooser .percents span.selected[data-v-755f0c71]{background-color:#0b58a2;color:#fff}.ui-timechooser .hours[data-v-755f0c71]{font-size:48px;text-align:center;font-weight:700;display:flex;justify-items:center;justify-content:center;font-size:2em}.ui-timechooser .hours .sel[data-v-755f0c71]{border:thin solid #ddd;padding:0;display:flex;flex-direction:column}.ui-timechooser .hours .sel i[data-v-755f0c71]{font-size:1em;cursor:pointer;text-shadow:0 0 4px rgba(0,0,0,.1)}.ui-timechooser .hours .sel i[data-v-755f0c71]:hover{background:#5c9ccc;color:#fff}.ui-timechooser .hours .separator[data-v-755f0c71]{color:red}.repport-item .icon-attention-circled{display:none}.repport-item.excess{color:#900;border-left:4px solid red}.repport-item.excess .icon-attention-circled{display:inline-block}.interaction-off{cursor:default;pointer-events:none}.interactive-icon-big{font-size:32px;cursor:pointer}.card.locked,.card.closed{opacity:.7}.card.locked .week-header,.card.closed .week-header{cursor:default}.card.closed{opacity:.4}.card.closed .week-header{cursor:default}article.wp{font-size:1.2em}article.wp h3{font-size:1.2em;margin:0;padding:0}.has-titled-error{color:#8b0000;cursor:help}.menu-wps{box-shadow:0 0 1em #0000004d;font-size:12px;margin:0;padding:0}.menu-wps>li{cursor:pointer;display:flex;transition:background-color .5s ease-out;border-bottom:thin solid rgba(0,0,0,.4);padding:2px 4px;text-shadow:-1px 1px 0 rgba(0,0,0,.1)}.menu-wps>li .icon-angle-right{color:#fff;position:relative;left:-25px;opacity:0;transition:left .3s ease-out,opacity .5s ease-out;margin-left:auto}.menu-wps>li .acronym{font-weight:700}.menu-wps>li .acronym:after{content:":"}.menu-wps>li:hover,.menu-wps>li.selected{background:#0b58a2;color:#fff}.menu-wps>li:hover .icon-angle-right,.menu-wps>li.selected .icon-angle-right{left:0;opacity:1}.daymenu{position:fixed;background:white;z-index:100}.daymenu .selector{display:flex}.month-header{display:flex;line-height:30px;justify-content:center;justify-items:center}.month-header strong{font-weight:100;display:block;text-align:center;flex:0 0 14.285714286%;background:#efefef;color:#5c9ccc;border-left:solid thin #fff}.periode{display:flex;justify-content:flex-start}.periode strong{display:inline-block;width:10em;text-align:center}.week{border:solid 2px #fff;margin:2px 0}.week .days{background-image:url(/images/bg-lock.gif)}.week .days .day{background:#efefef}.week.selected{background:rgba(128,183,236,.25);border-color:#80b7ec;box-shadow:0 -4px 4px #0003}.week.selected .week-header{background-color:#80b7ec;color:#fff}.week.selected .week-header span{text-shadow:-1px 1px 0 rgba(0,0,0,.2)}.week.selected .day{border-color:#80b7ec}.week .day.error{background:#dd1144!important}.heure-total{display:inline-block;width:5em}.week-header,.month-header .week-header{background-color:#ffffff80;align-items:center;cursor:pointer;display:flex;text-align:left;font-size:1em;padding:0 .8em;justify-content:space-between}.week-header span,.month-header .week-header span{font-weight:700;flex:1}.week-header small.subtotal,.month-header .week-header small.subtotal{flex:0}.week-header small,.month-header .week-header small{justify-self:flex-end;flex:1;text-align:right;margin-left:auto}.week-header small em,.month-header .week-header small em{color:#5c646c}.table-recap.table-bordered{font-size:.7em}.table-recap.table-bordered h2,.table-recap.table-bordered h3{font-size:1.25em;margin:0}.table-recap.table-bordered th{font-weight:400}.table-recap.table-bordered th.total{text-align:right;font-weight:700;font-size:1.1em}.table-recap.table-bordered thead th:nth-child(odd){background-color:#efefef}.table-recap.table-bordered td:nth-child(odd){background-color:#efefef}.table-recap.table-bordered thead th{text-align:center}.table-recap.table-bordered tr td{text-align:right}.table-recap.table-bordered tr th,.table-recap.table-bordered tr td{padding:2px}.days{display:flex}.days .day{position:relative;background:rgba(255,255,255,.25);transition:background-color linear .3s;border:thin solid white;flex:0 0 14.285714286%;overflow:hidden;cursor:pointer;min-height:50px}.days .day .label{position:absolute;bottom:0;right:0;display:block;font-size:12px;text-align:right;text-shadow:-1px 1px 1px rgba(255,255,255,.3);color:#787171}.days .day .cartouche em{max-width:3em;overflow:hidden;display:inline-block;white-space:nowrap}.days .day:hover{background:white}.days .day.selected{background:#5c9ccc}.days .day.locked{cursor:not-allowed;background:rgba(204,204,204,.8)}.week:first-child .days{justify-content:flex-end}.week:last-child .days{justify-content:flex-start} diff --git a/public/js/oscar/vite/dist/assets/TimesheetDeclaration-da0c6213.css b/public/js/oscar/vite/dist/assets/TimesheetDeclaration-da0c6213.css new file mode 100644 index 0000000000000000000000000000000000000000..2180ed8bb6b9e8b3b0575f572a2ff76f5d7573b0 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/TimesheetDeclaration-da0c6213.css @@ -0,0 +1 @@ +@charset "UTF-8";.cartouche[data-v-45fb2e96]{white-space:nowrap;margin:0;border-radius:2px;box-shadow:none;font-size:.75em}.cartouche.training[data-v-45fb2e96]{background-color:#0b58a2}.cartouche.sickleave[data-v-45fb2e96]{background-color:olive}.cartouche.wp[data-v-45fb2e96]{background-color:#6a5999}.cartouche.conflict[data-v-45fb2e96]{background:#AA0000}.timesheet-item[data-v-c5ac47ec]{background:#e3e6e8;cursor:pointer;border:thin #5c6970 solid;margin:.3em 0;font-size:1em;display:flex;position:relative;transition:all .3s}.timesheet-item>*[data-v-c5ac47ec]{padding:.3em .5em}.timesheet-item .project-acronym[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-right:.8em;padding-left:.8em;color:#abb5ba;background:#5c6970;text-shadow:-1px 1px 0 rgba(0,0,0,.3);font-weight:700}.timesheet-item .project-acronym[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:rgba(255,255,255,0);transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .activity-label[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-left:1em;padding-right:1em;background:#abb5ba;color:#171a1c;font-size:.8em;line-height:2em}.timesheet-item .activity-label[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1.2em;height:1.2em;background:#5c6970;transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .workpackage-infos[data-v-c5ac47ec]{transition:all .3s;position:relative;padding-left:1em}.timesheet-item .workpackage-infos[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:#abb5ba;transform:rotate(45deg);position:absolute;left:-.6em;top:.5em;z-index:10000}.timesheet-item.selected[data-v-c5ac47ec],.timesheet-item[data-v-c5ac47ec]:hover{background:white;border:thin #0088cc solid;color:#08c}.timesheet-item.selected .project-acronym[data-v-c5ac47ec],.timesheet-item:hover .project-acronym[data-v-c5ac47ec]{color:#9df;background:#0088cc}.timesheet-item.selected .activity-label[data-v-c5ac47ec],.timesheet-item:hover .activity-label[data-v-c5ac47ec]{background:#66ccff;color:#023}.timesheet-item.selected .activity-label[data-v-c5ac47ec]:before,.timesheet-item:hover .activity-label[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#66ccff}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]{flex:1}.timesheet-item.horslots-item .activity-label[data-v-c5ac47ec]:before{content:none}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]:before{background:#5c6970;top:.8em}.timesheet-item.horslots-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item.horslots-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected[data-v-c5ac47ec]{box-shadow:.25em 0 .5em #08cc}.timesheet-item.selected .project-acronym[data-v-c5ac47ec]:before{background:white}.wp-duration{display:flex;border-bottom:thin solid white;align-items:center}.wp-duration strong small{font-weight:100}.wp-duration[class*=status-]{border-left:solid 4px #ddd}.wp-duration.status-5{border-left-color:#0b58a2}.wp-duration .icon-comment{color:#ccc}.wp-duration .icon-comment.with-comment{color:#000}.left{flex:0 0 35px;overflow:hidden;display:flex;flex-direction:column;padding-left:8px;border-left:solid #fff thin}.total{margin-left:auto;font-size:1.4em;font-weight:700;padding-right:.5em}.total em{font-size:.5em;font-weight:100;line-height:2em}[class*=icon-]{text-align:center}.icon-trash,.icon-edit{cursor:pointer;text-align:center}.icon-trash:hover,.icon-edit:hover{background:#0b58a2;color:#fff}.ui-timechooser[data-v-755f0c71]{background:white;border:solid 1px #ddd;max-width:450px;margin:0 auto}.ui-timechooser .percents[data-v-755f0c71]{border-bottom:1px solid #ddd;display:flex}.ui-timechooser .percents span[data-v-755f0c71]{flex:1 1 auto;padding:2px 4px;text-align:center;font-size:2em;cursor:pointer}.ui-timechooser .percents span[data-v-755f0c71]:hover,.ui-timechooser .percents span.selected[data-v-755f0c71]{background-color:#0b58a2;color:#fff}.ui-timechooser .hours[data-v-755f0c71]{font-size:48px;text-align:center;font-weight:700;display:flex;justify-items:center;justify-content:center;font-size:2em}.ui-timechooser .hours .sel[data-v-755f0c71]{border:thin solid #ddd;padding:0;display:flex;flex-direction:column}.ui-timechooser .hours .sel i[data-v-755f0c71]{font-size:1em;cursor:pointer;text-shadow:0 0 4px rgba(0,0,0,.1)}.ui-timechooser .hours .sel i[data-v-755f0c71]:hover{background:#5c9ccc;color:#fff}.ui-timechooser .hours .separator[data-v-755f0c71]{color:red}.repport-item .icon-attention-circled{display:none}.repport-item.excess{color:#900;border-left:4px solid red}.repport-item.excess .icon-attention-circled{display:inline-block}.interaction-off{cursor:default;pointer-events:none}.interactive-icon-big{font-size:32px;cursor:pointer}.card.locked,.card.closed{opacity:.7}.card.locked .week-header,.card.closed .week-header{cursor:default}.card.closed{opacity:.4}.card.closed .week-header{cursor:default}article.wp{font-size:1.2em}article.wp h3{font-size:1.2em;margin:0;padding:0}.has-titled-error{color:#8b0000;cursor:help}.menu-wps{box-shadow:0 0 1em #0000004d;font-size:12px;margin:0;padding:0}.menu-wps>li{cursor:pointer;display:flex;transition:background-color .5s ease-out;border-bottom:thin solid rgba(0,0,0,.4);padding:2px 4px;text-shadow:-1px 1px 0 rgba(0,0,0,.1)}.menu-wps>li .icon-angle-right{color:#fff;position:relative;left:-25px;opacity:0;transition:left .3s ease-out,opacity .5s ease-out;margin-left:auto}.menu-wps>li .acronym{font-weight:700}.menu-wps>li .acronym:after{content:":"}.menu-wps>li:hover,.menu-wps>li.selected{background:#0b58a2;color:#fff}.menu-wps>li:hover .icon-angle-right,.menu-wps>li.selected .icon-angle-right{left:0px;opacity:1}.daymenu{position:fixed;background:white;z-index:100}.daymenu .selector{display:flex}.month-header{display:flex;line-height:30px;justify-content:center;justify-items:center}.month-header strong{font-weight:100;display:block;text-align:center;flex:0 0 14.285714286%;background:#efefef;color:#5c9ccc;border-left:solid thin #fff}.periode{display:flex;justify-content:flex-start}.periode strong{display:inline-block;width:10em;text-align:center}.week{border:solid 2px #fff;margin:2px 0}.week .days{background-image:url(/images/bg-lock.gif)}.week .days .day{background:#efefef}.week.selected{background:rgba(128,183,236,.25);border-color:#80b7ec;box-shadow:0 -4px 4px #0003}.week.selected .week-header{background-color:#80b7ec;color:#fff}.week.selected .week-header span{text-shadow:-1px 1px 0 rgba(0,0,0,.2)}.week.selected .day{border-color:#80b7ec}.week .day.error{background:#dd1144!important}.heure-total{display:inline-block;width:5em}.week-header,.month-header .week-header{background-color:#ffffff80;align-items:center;cursor:pointer;display:flex;text-align:left;font-size:1em;padding:0 .8em;justify-content:space-between}.week-header span,.month-header .week-header span{font-weight:700;flex:1}.week-header small.subtotal,.month-header .week-header small.subtotal{flex:0}.week-header small,.month-header .week-header small{justify-self:flex-end;flex:1;text-align:right;margin-left:auto}.week-header small em,.month-header .week-header small em{color:#5c646c}.table-recap.table-bordered{font-size:.7em}.table-recap.table-bordered h2,.table-recap.table-bordered h3{font-size:1.25em;margin:0}.table-recap.table-bordered th{font-weight:400}.table-recap.table-bordered th.total{text-align:right;font-weight:700;font-size:1.1em}.table-recap.table-bordered thead th:nth-child(odd){background-color:#efefef}.table-recap.table-bordered td:nth-child(odd){background-color:#efefef}.table-recap.table-bordered thead th{text-align:center}.table-recap.table-bordered tr td{text-align:right}.table-recap.table-bordered tr th,.table-recap.table-bordered tr td{padding:2px}.days{display:flex}.days .day{position:relative;background:rgba(255,255,255,.25);transition:background-color linear .3s;border:thin solid white;flex:0 0 14.285714286%;overflow:hidden;cursor:pointer;min-height:50px}.days .day .label{position:absolute;bottom:0;right:0;display:block;font-size:12px;text-align:right;text-shadow:-1px 1px 1px rgba(255,255,255,.3);color:#787171}.days .day .cartouche em{max-width:3em;overflow:hidden;display:inline-block;white-space:nowrap}.days .day:hover{background:white}.days .day.selected{background:#5c9ccc}.days .day.locked{cursor:not-allowed;background:rgba(204,204,204,.8)}.week:first-child .days{justify-content:flex-end}.week:last-child .days{justify-content:flex-start} diff --git a/public/js/oscar/vite/dist/assets/TimesheetPersonResume-9b0a7e87.css b/public/js/oscar/vite/dist/assets/TimesheetPersonResume-9b0a7e87.css deleted file mode 100644 index 09d8d801c41eeeb1d69d0299254798fa1baed6d8..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/TimesheetPersonResume-9b0a7e87.css +++ /dev/null @@ -1 +0,0 @@ -.table{font-size:.9em;td {border: 0;}}.table td .table,.table th .table{background:rgba(255,255,255,.5)!important;border-left:none}.table .table tr:nth-child(2n){background-color:#ffffff80!important}.table tfoot{background-color:#738ccc33!important}.table tr .soustotal{display:table-cell;vertical-align:bottom!important}.table tbody th{white-space:nowrap;font-weight:400}tr.line-total{background:rgba(31,68,192,.1);border-top:1px solid #333333;border-left:none;font-size:1.1em}.table .table{border-width:thin;tr {border-left-width: thin;} th,td {border-left: none; border-right: solid thin #eee; padding: 2px;}}tr.line-total th{font-weight:400}.commentaires .commentaire{display:block;font-size:.9em}.declarations-resume{thead th {text-align: center; background: #0b93d5;} .yearrow {background: rgba(255,255,255,.8);} .icon-time {display: none;} .valid-95 {.icon-time {display: inline-block; color: #00cc66; &:before {content: "";}}} tbody tr {border-left: solid 4px #eee;} .valid-105 {.icon-time {display: inline-block; color: #3fd53f; &:before {content: "";}}} .error-95 {.icon-time {display: inline-block; color: #970000; &:before {content: "";}}} .error-105 {.icon-time {display: inline-block; color: #9e0505; &:before {content: "";}}} .valid-100 {.icon-time {display: inline-block; color: #00AA00;}} tr.optionnal {border-left-color: #5a5a5a;} tr.conflict {border-left-color: #CC0000; background: rgba(#990000,.1);} tr.validated {border-left-color: #00AA00; background: rgba(#00AA00,.1);} tr.validating {border-left-color: #0b93d5; background: rgba(#0b93d5,.1);}}.declarations-resume .heading-year th{font-size:2em;text-align:right} diff --git a/public/js/oscar/vite/dist/assets/TimesheetPersonResume-b4a958be.css b/public/js/oscar/vite/dist/assets/TimesheetPersonResume-b4a958be.css new file mode 100644 index 0000000000000000000000000000000000000000..41af3d5a65132d6a869e5cea25e6785268489723 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/TimesheetPersonResume-b4a958be.css @@ -0,0 +1 @@ +.table{font-size:.9em;td {border: 0;}}.table td .table,.table th .table{background:rgba(255,255,255,.5)!important;border-left:none}.table .table tr:nth-child(even){background-color:#ffffff80!important}.table tfoot{background-color:#738ccc33!important}.table tr .soustotal{display:table-cell;vertical-align:bottom!important}.table tbody th{white-space:nowrap;font-weight:400}tr.line-total{background:rgba(31,68,192,.1);border-top:1px solid #333333;border-left:none;font-size:1.1em}.table .table{border-width:thin;tr {border-left-width: thin;} th,td {border-left: none; border-right: solid thin #eee; padding: 2px;}}tr.line-total th{font-weight:400}.commentaires .commentaire{display:block;font-size:.9em}.declarations-resume{.heading-year th {font-size: 2em; text-align: right;} thead th {text-align: center; background: #0b93d5;} .yearrow {background: rgba(255,255,255,.8);} .icon-time {display: none;} .valid-95 {.icon-time {display: inline-block; color: #00cc66; &:before {content: "\e840";}}} tbody tr {border-left: solid 4px #eee;} .valid-105 {.icon-time {display: inline-block; color: #3fd53f; &:before {content: "\e843";}}} .error-95 {.icon-time {display: inline-block; color: #970000; &:before {content: "\e840";}}} .error-105 {.icon-time {display: inline-block; color: #9e0505; &:before {content: "\e843";}}} .valid-100 {.icon-time {display: inline-block; color: #00AA00;}} tr.optionnal {border-left-color: #5a5a5a;} tr.conflict {border-left-color: #CC0000; background: rgba(#990000,.1);} tr.validated {border-left-color: #00AA00; background: rgba(#00AA00,.1);} tr.validating {border-left-color: #0b93d5; background: rgba(#0b93d5,.1);}} diff --git a/public/js/oscar/vite/dist/assets/activity-60e009f3.js b/public/js/oscar/vite/dist/assets/activity-60e009f3.js deleted file mode 100644 index d7cc8ef73b8342fc9f2a97d83b2fd658db30bd39..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/activity-60e009f3.js +++ /dev/null @@ -1 +0,0 @@ -import{r as D,o as l,c as i,a as r,t as u,b as g,w,v as E,d as t,e as J,f as R,g as d,h,n as C,F as b,i as P,j as _,k as x,l as z,m as V,p as A,T as U,q as ee,s as te,S as se,u as ne,x as le,y as ie}from"../vendor.js";import{m as H}from"../vendor2.js";import{f as oe}from"../vendor3.js";import{m as re}from"../vendor4.js";import{M as G}from"../vendor5.js";import{D as T,P as ae}from"../vendor6.js";import{_ as S}from"../vendor7.js";import{A as W}from"../vendor8.js";import{O as de}from"../vendor9.js";import{A as ue}from"../vendor10.js";import{A as me}from"../vendor11.js";import{A as ce}from"../vendor12.js";import{A as pe}from"../vendor13.js";import{A as j}from"../vendor14.js";import{E as fe}from"../vendor15.js";import{g as O}from"../vendor16.js";import{L as ve}from"../vendor17.js";import{P as K}from"../vendor18.js";import{t as he}from"../vendor19.js";import"../vendor20.js";const ge={name:"AvenantDate",emits:["update:change"],props:["change"],computed:{date:{get(){return this.change.value},set(s){this.change.value=s,this.$emit("update:change",change)}}},components:{Datepicker:T}};function ye(s,e,a,k,n,o){const y=D("Datepicker");return l(),i("div",null,[r(u(a.change.label)+" : ",1),g(y,{modelValue:o.date,"onUpdate:modelValue":e[0]||(e[0]=v=>o.date=v)},null,8,["modelValue"])])}const ke=S(ge,[["render",ye]]),be={props:{modelValue:Number},data(){return{isEditing:!1,rawValue:"",formattedValue:""}},computed:{displayValue:{get(){return this.isEditing?this.rawValue:this.formattedValue},set(s){this.rawValue=s}}},watch:{modelValue:{immediate:!0,handler(s){this.isEditing||(this.formattedValue=this.formatCurrency(s),this.rawValue=(s??"").toString().replace(".",","))}}},methods:{formatCurrency(s){return new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}).format(s)},startEditing(){this.isEditing=!0,this.rawValue=(this.modelValue??"").toString().replace(".",",")},finishEditing(){this.isEditing=!1;let s=parseFloat(this.rawValue.replace(",","."))||0;this.$emit("update:modelValue",s)},updateRawValue(s){this.rawValue=s.target.value}}};function De(s,e,a,k,n,o){return w((l(),i("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=y=>o.displayValue=y),onFocus:e[1]||(e[1]=(...y)=>o.startEditing&&o.startEditing(...y)),onBlur:e[2]||(e[2]=(...y)=>o.finishEditing&&o.finishEditing(...y)),onInput:e[3]||(e[3]=(...y)=>o.updateRawValue&&o.updateRawValue(...y)),class:"form-control text-right"},null,544)),[[E,o.displayValue]])}const _e=S(be,[["render",De]]);const we={name:"ButtonConfirm",props:{class:{type:String,default:"btn btn-default"},checkbox:{type:Boolean,default:!1}},data(){return{modal:!1,checked:!1}},computed:{confirmEnabled(){return this.checkbox&&this.checked||this.checkbox===!1}},watch:{modal(s){this.checked=!1}},methods:{handlerClick(){this.$emit("click")},handlerCancel(){this.modal=!1,this.$emit("cancel")},handlerConfirm(){this.confirmEnabled&&(this.modal=!1,this.$emit("confirm"))}},activated(){console.log("ButtonConfirm activated")}},Ce={key:0,class:"overlay confirm-dialog"},Pe={class:"overlay-content"},Ae={class:"overlay-message"},Ue={key:0},Se={for:"confirm_ok",class:"checkbox"};function Me(s,e,a,k,n,o){return l(),i(b,null,[n.modal?(l(),i("div",Ce,[t("div",Pe,[t("h3",null,[e[5]||(e[5]=t("i",{class:"icon-attention-1"},null,-1)),J(s.$slots,"title",{},()=>[e[4]||(e[4]=r(" Confirmer ? "))],!0)]),t("div",Ae,[J(s.$slots,"message",{},()=>[e[6]||(e[6]=r(" Voulez-vous continuer ? "))],!0)]),a.checkbox?(l(),i("div",Ue,[t("label",Se,[w(t("input",{type:"checkbox",id:"confirm_ok","onUpdate:modelValue":e[0]||(e[0]=y=>n.checked=y)},null,512),[[R,n.checked]]),e[7]||(e[7]=r(" J'ai bien compris "))])])):d("",!0),t("nav",null,[t("a",{href:"#",onClick:e[1]||(e[1]=h((...y)=>o.handlerCancel&&o.handlerCancel(...y),["prevent"])),class:"btn btn-danger"},e[8]||(e[8]=[t("i",{class:"icon-block"},null,-1),r(" Annuler ")])),t("a",{href:"#",onClick:e[2]||(e[2]=h((...y)=>o.handlerConfirm&&o.handlerConfirm(...y),["prevent"])),class:C(["btn btn-success",{disabled:!o.confirmEnabled}])},e[9]||(e[9]=[t("i",{class:"icon-ok-circled"},null,-1),r(" Confirmer")]),2)])])])):d("",!0),t("a",{href:"#",class:C(a.class),onClick:e[3]||(e[3]=h(y=>n.modal=!0,["prevent"]))},[J(s.$slots,"default",{},()=>[e[10]||(e[10]=r("Texte par défaut"))],!0)],2)],64)}const Ee=S(we,[["render",Me],["__scopeId","data-v-efd4eea6"]]);const Ve={name:"ActivityAvenants",components:{ButtonConfirm:Ee,Amount:_e,AvenantDate:ke,Datepicker:T,Modal:G,OrganizationAutoComplete:de,PersonAutoCompleter:ae},props:["roles-person","roles-organization","currentPersons","currentOrganizations","avenants","manage"],data(){return{edit:null,selectedPerson:null}},computed:{modificationsEnabled(){return{personAdd:!0,personDel:!0,organizationAdd:!0,organizationDel:!0,changeAmount:!this.edit.modifications.find(s=>s.type=="changeAmount"),dateEnd:!this.edit.modifications.find(s=>s.type=="dateEnd")}},persons(){let s={};return this.currentPersons&&this.currentPersons.forEach(e=>{s.hasOwnProperty(e.enrolled)||(s[e.enrolled]={id:e.enrolled,firstName:e.firstName,lastName:e.lastName,roles:{}}),s[e.enrolled].hasOwnProperty(e.roleId)||(s[e.enrolled].roles[e.roleId]=e.roleLabel)}),s},organizations(){let s={};return this.currentOrganizations&&this.currentOrganizations.forEach(e=>{s.hasOwnProperty(e.enrolled)||(console.log(e),s[e.enrolled]={id:e.enrolled,label:e.enrolledLabel,roles:{}}),s[e.enrolled].hasOwnProperty(e.roleId)||(s[e.enrolled].roles[e.roleId]=e.roleLabel)}),s}},methods:{handlerConfirm(s,e,a){console.log("confirm",s),e.call(this,a)},handlerOk(s){console.log(JSON.stringify(s)),console.log(this.avenants.url_api)},handlerNew(){this.edit={id:null,dateAvenant:null,comment:"",previousFile:null,file:null,modifications:[]}},handlerEdit(s){this.edit={id:s.id,dateAvenant:s.date,comment:s.comment,previousFile:s.filename,file:null,modifications:JSON.parse(JSON.stringify(s.modifications))}},handlerCancel(){console.log("CANCEL"),this.edit=null},handlerSave(){let s=new FormData;s.append("id",this.edit.id??""),s.append("dateAvenant",this.edit.dateAvenant??""),s.append("comment",this.edit.comment??""),s.append("file",this.edit.file??""),s.append("modifications",this.edit.modifications?JSON.stringify(this.edit.modifications):"");let e="Mise à jour de l'avenant";this.edit.id?s.append("action","update"):(s.append("action","create"),e="Création de l'avenant"),W.post(this.avenants.url_api,s,{pendingMsg:e}).then(a=>{this.edit=null,this.fetch()})},handlerDelete(s){W.delete(s.url_api,{pendingMsg:"Suppression de l'avenant"}).then(e=>{this.fetch()})},handlerApplyAvenant(s){console.log("Application de l'avenant");let e=new FormData;e.append("id",s.id),e.append("action","apply");let a="Application de l'avenant";W.post(this.avenants.url_api,e,{pendingMsg:a,pendingBack:!1}).then(k=>{document.location.reload()})},handlerAddChange(s){if(this.edit)switch(s){case"dateEnd":this.edit.modifications.push({type:s,mode:"new",label:"Date de fin",value1:new Date().toISOString()});break;default:this.edit.modifications.push({type:s,mode:"new",label:"A définir",value1:null,valueObj:null,value2:null})}},handlerRemoveChange(s){let e=this.edit.modifications.indexOf(s);e>=0&&this.edit.modifications.splice(e,1)},handlerUpdatePersonChange(s,e){s.valueObj={id:e.id,firstName:e.firstName,lastName:e.lastName},s.value1=e.id},handlerUpdateOrganizationChange(s,e){console.log(JSON.stringify(s)),s.valueObj={id:e.id,label:e.label},s.value1=e.id},handlerSelectToDel(s,e){console.log("Changement de la personne à supprimer",s,e),s.value1=s.valueObj.id,s.value2=null},async handlerSelectFile(s){if(s.target.files.length===0){this.edit.file=null;return}this.edit.file=s.target.files[0]},fetch(){W.get(this.avenants.url_api,{pendingMsg:"Chargement des avenants"}).then(s=>{this.$emit("update",s.data.datas.avenants)})}},mounted(){console.log("mounted")}},xe={action:""},Ne={class:"form-group"},je={class:"form-group"},Oe={class:"btn-group"},ze={class:"dropdown-menu"},Re={class:"modifications unsaved"},Fe={class:"change"},Ie={key:0},We={key:1},Te={key:2},qe=["onUpdate:modelValue","onChange"],Le=["value"],Je=["onUpdate:modelValue"],He=["value"],Be={key:3},Ye={key:0,class:"cartouche"},Ge=["onClick"],Ke=["onUpdate:modelValue"],Xe=["value"],Qe={key:4},Ze=["onUpdate:modelValue","onChange"],$e=["value"],et=["onUpdate:modelValue"],tt=["value"],st={key:5},nt=["onUpdate:modelValue"],lt=["value"],it={key:6},ot=["onClick"],rt={class:"modifications saved"},at={class:"change"},dt={key:0,class:"icon-calendar"},ut={key:1,class:"icon-user"},mt={key:2,class:"icon-bank"},ct={key:3,class:"icon-user text-danger"},pt={key:4,class:"icon-building-filled"},ft={key:5,class:"icon-building-filled text-danger"},vt=["onClick"],ht={class:"form-group"},gt={key:0},yt={class:"form-group"},kt={class:"avenants"},bt={class:"admin-bar text-right"},Dt={key:0,class:"icon-ok-circled text-success"},_t={key:1,class:"icon-pencil"},wt={class:"modification small"},Ct={class:"change"},Pt={key:0,class:"icon-calendar"},At={key:1,class:"icon-user"},Ut={key:2,class:"icon-user text-danger"},St={key:3,class:"icon-bank"},Mt={key:4,class:"icon-building-filled"},Et={key:5,class:"icon-building-filled text-danger"},Vt={key:0},xt=["href"],Nt=["onClick"];function jt(s,e,a,k,n,o){const y=D("datepicker"),v=D("Datepicker"),c=D("Amount"),M=D("person-auto-completer"),q=D("organization-auto-complete"),L=D("modal"),I=D("ButtonConfirm");return l(),i(b,null,[g(L,{title:"Détails de l'avenant",visible:n.edit,onModalValid:o.handlerSave,onModalCancel:o.handlerCancel},{default:P(()=>[t("form",xe,[e[32]||(e[32]=t("div",{class:"alert alert-info"},[r(" Vous pourrez revenir modifier cet avenant plus tard tant qu'il est en mode "),t("strong",null,"brouillon"),r(". ")],-1)),t("div",Ne,[e[16]||(e[16]=t("label",{for:"dateAvenant"},"Date : ",-1)),e[17]||(e[17]=t("div",{class:"help"},[r(" Date de "),t("strong",null,"signature"),r(" de l'avenant ")],-1)),g(y,{modelValue:n.edit.dateAvenant,"onUpdate:modelValue":e[0]||(e[0]=m=>n.edit.dateAvenant=m),id:"dateAvenant"},null,8,["modelValue"])]),t("div",je,[e[27]||(e[27]=t("label",{for:"name",class:""},"Modifications : ",-1)),e[28]||(e[28]=t("br",null,null,-1)),t("div",Oe,[e[18]||(e[18]=t("button",{type:"button",class:"btn btn-default dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[r(" Ajouter une modification "),t("span",{class:"caret"})],-1)),t("ul",ze,[t("li",null,[t("a",{href:"#",onClick:e[1]||(e[1]=h(m=>o.handlerAddChange("personAdd"),["prevent"])),class:C(o.modificationsEnabled.personAdd?"":"disabled")},"Ajout d'une personne",2)]),t("li",null,[t("a",{href:"#",onClick:e[2]||(e[2]=h(m=>o.handlerAddChange("personDel"),["prevent"])),class:C(o.modificationsEnabled.personDel?"":"disabled")},"Suppression d'une personne",2)]),t("li",null,[t("a",{href:"#",onClick:e[3]||(e[3]=h(m=>o.handlerAddChange("organizationAdd"),["prevent"])),class:C(o.modificationsEnabled.organizationAdd?"":"disabled")},"Ajout d'une organisation",2)]),t("li",null,[t("a",{href:"#",onClick:e[4]||(e[4]=h(m=>o.handlerAddChange("organizationDel"),["prevent"])),class:C(o.modificationsEnabled.organizationDel?"":"disabled")},"Suppression d'une organisation",2)]),t("li",null,[t("a",{href:"#",onClick:e[5]||(e[5]=h(m=>o.handlerAddChange("changeAmount"),["prevent"])),class:C(o.modificationsEnabled.changeAmount?"":"disabled")},"Modification du montant",2)]),t("li",null,[t("a",{href:"#",onClick:e[6]||(e[6]=h(m=>o.handlerAddChange("dateEnd"),["prevent"])),class:C(o.modificationsEnabled.dateEnd?"":"disabled")},"Modification de la date de fin",2)])])]),t("section",Re,[(l(!0),i(b,null,_(n.edit.modifications.filter(m=>m.mode==="new"),m=>(l(),i("article",Fe,[m.type==="dateEnd"?(l(),i("div",Ie,[e[19]||(e[19]=t("span",{class:"text"}," Date de fin : ",-1)),t("span",null,[g(v,{modelValue:m.value1,"onUpdate:modelValue":f=>m.value1=f},null,8,["modelValue","onUpdate:modelValue"])])])):m.type==="changeAmount"?(l(),i("div",We,[e[20]||(e[20]=t("span",{class:"text"},"Nouveau montant : ",-1)),g(c,{modelValue:m.value1,"onUpdate:modelValue":f=>m.value1=f},null,8,["modelValue","onUpdate:modelValue"])])):m.type==="personDel"?(l(),i("div",Te,[e[21]||(e[21]=t("span",{class:"text"},"Suppression d'un membre",-1)),w(t("select",{name:"",id:"",onClick:e[7]||(e[7]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.valueObj=f,onChange:f=>o.handlerSelectToDel(m,f)},[(l(!0),i(b,null,_(o.persons,(f,N)=>(l(),i("option",{value:f},u(f.firstName)+" "+u(f.lastName),9,Le))),256))],40,qe),[[x,m.valueObj]]),m.valueObj?w((l(),i("select",{key:0,name:"",id:"",onClick:e[8]||(e[8]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.value2=f},[(l(!0),i(b,null,_(m.valueObj.roles,(f,N)=>(l(),i("option",{value:N},u(f),9,He))),256))],8,Je)),[[x,m.value2]]):d("",!0)])):m.type==="personAdd"?(l(),i("div",Be,[e[22]||(e[22]=t("span",{class:"text"}," Ajout d'une personne : ",-1)),m.valueObj?(l(),i("span",Ye,[r(u(m.valueObj.firstName)+" "+u(m.valueObj.lastName)+" ",1),t("i",{class:"icon-cancel-alt",onClick:f=>m.valueObj=null},null,8,Ge)])):(l(),z(M,{key:1,onPersonSelected:f=>o.handlerUpdatePersonChange(m,f)},null,8,["onPersonSelected"])),w(t("select",{name:"rolesPerson","onUpdate:modelValue":f=>m.value2=f,class:"form-control",onClick:e[9]||(e[9]=h(()=>{},["stop"]))},[(l(!0),i(b,null,_(s.rolesPerson,f=>(l(),i("option",{value:f.id},u(f.label),9,Xe))),256))],8,Ke),[[x,m.value2]])])):m.type==="organizationDel"?(l(),i("div",Qe,[e[23]||(e[23]=t("span",{class:"text"}," Suppression d'une organisation : ",-1)),w(t("select",{name:"",id:"",onClick:e[10]||(e[10]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.valueObj=f,class:"form-control",onChange:f=>o.handlerSelectToDel(m,f)},[(l(!0),i(b,null,_(o.organizations,(f,N)=>(l(),i("option",{value:f},u(f.label),9,$e))),256))],40,Ze),[[x,m.valueObj]]),m.valueObj?w((l(),i("select",{key:0,name:"",id:"",onClick:e[11]||(e[11]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.value2=f,class:"form-control"},[(l(!0),i(b,null,_(m.valueObj.roles,(f,N)=>(l(),i("option",{value:N},u(f),9,tt))),256))],8,et)),[[x,m.value2]]):d("",!0)])):m.type==="organizationAdd"?(l(),i("div",st,[e[24]||(e[24]=t("span",{class:"text"}," Ajout d'une organization : ",-1)),g(q,{onChange:f=>o.handlerUpdateOrganizationChange(m,f)},null,8,["onChange"]),w(t("select",{name:"rolesOrganization","onUpdate:modelValue":f=>m.value2=f,class:"form-control",onClick:e[12]||(e[12]=h(()=>{},["stop"]))},[(l(!0),i(b,null,_(s.rolesOrganization,f=>(l(),i("option",{value:f.id},u(f.label),9,lt))),256))],8,nt),[[x,m.value2]])])):(l(),i("div",it,u(m),1)),t("nav",null,[t("button",{class:"btn btn-xs btn-danger",onClick:h(f=>o.handlerRemoveChange(m),["prevent"])},e[25]||(e[25]=[t("i",{class:"icon-trash"},null,-1)]),8,ot)])]))),256))]),e[29]||(e[29]=t("hr",null,null,-1)),t("section",rt,[(l(!0),i(b,null,_(n.edit.modifications.filter(m=>m.mode!=="new"),m=>(l(),i("article",at,[t("div",null,[m.type==="dateEnd"?(l(),i("i",dt)):d("",!0),m.type==="personAdd"?(l(),i("i",ut)):d("",!0),m.type==="changeAmount"?(l(),i("i",mt)):d("",!0),m.type==="personDel"?(l(),i("i",ct)):d("",!0),m.type==="organizationAdd"?(l(),i("i",pt)):d("",!0),m.type==="organizationDel"?(l(),i("i",ft)):d("",!0),t("strong",null,u(m.info),1),t("small",null,[t("code",null," ("+u(m.type)+")",1)])]),t("nav",null,[t("button",{class:"btn btn-xs btn-danger",onClick:h(f=>o.handlerRemoveChange(m),["prevent"])},e[26]||(e[26]=[t("i",{class:"icon-trash"},null,-1)]),8,vt)])]))),256))])]),t("div",ht,[e[30]||(e[30]=t("label",{for:"name"},"Fichier",-1)),n.edit.previousFile?(l(),i("section",gt," Fichier précédent ")):d("",!0),t("input",{class:"form-control",type:"file",onChange:e[13]||(e[13]=(...m)=>o.handlerSelectFile&&o.handlerSelectFile(...m))},null,32)]),t("div",yt,[e[31]||(e[31]=t("label",{for:"name"},"Commentaire",-1)),w(t("textarea",{"onUpdate:modelValue":e[14]||(e[14]=m=>n.edit.comment=m),class:"form-control"},null,512),[[E,n.edit.comment]])])])]),_:1},8,["visible","onModalValid","onModalCancel"]),t("section",kt,[t("nav",bt,[a.manage?(l(),i("button",{key:0,class:"btn btn-xs btn-default",onClick:e[15]||(e[15]=(...m)=>o.handlerNew&&o.handlerNew(...m))}," Nouvel avenant ")):d("",!0)]),(l(!0),i(b,null,_(a.avenants.avenants,m=>(l(),i("article",{class:C(["avenant card","status-"+m.status])},[t("h4",null,[m.status==200?(l(),i("i",Dt)):d("",!0),m.status==100?(l(),i("i",_t)):d("",!0),t("strong",null,u(s.$filters.dateFull(m.date)),1),t("small",null," - "+u(m.status_text),1)]),t("section",wt,[(l(!0),i(b,null,_(m.modifications,f=>(l(),i("article",Ct,[f.type==="dateEnd"?(l(),i("i",Pt)):d("",!0),f.type==="personAdd"?(l(),i("i",At)):d("",!0),f.type==="personDel"?(l(),i("i",Ut)):d("",!0),f.type==="changeAmount"?(l(),i("i",St)):d("",!0),f.type==="organizationAdd"?(l(),i("i",Mt)):d("",!0),f.type==="organizationDel"?(l(),i("i",Et)):d("",!0),t("span",null,u(f.info),1)]))),256))]),m.comment?(l(),i("p",Vt,u(m.comment),1)):d("",!0),t("nav",null,[t("a",{href:m.url_download,class:"btn btn-xs btn-primary"},e[33]||(e[33]=[t("i",{class:"icon-file-pdf"},null,-1),r(" Télécharger")]),8,xt),a.manage?(l(),z(I,{key:0,onConfirm:f=>o.handlerDelete(m),class:C("btn btn-xs btn-danger"),checkbox:!0},{message:P(()=>e[34]||(e[34]=[r(" Supprimer "),t("strong",null,"définitivement",-1),r(" cet avenant ? ")])),default:P(()=>[e[35]||(e[35]=t("i",{class:"icon-trash"},null,-1)),e[36]||(e[36]=r(" Supprimer "))]),_:2},1032,["onConfirm"])):d("",!0),a.manage&&m.editable?(l(),i("a",{key:1,href:"#",class:"btn btn-xs btn-default",onClick:h(f=>o.handlerEdit(m),["prevent"])},e[37]||(e[37]=[t("i",{class:"icon-pencil"},null,-1),r(" Editer ")]),8,Nt)):d("",!0),m.status===100&&a.manage?(l(),z(I,{key:2,onConfirm:f=>o.handlerApplyAvenant(m),class:C("btn btn-xs btn-success")},{message:P(()=>e[38]||(e[38]=[r(" Confirmer l'application de l'avenant pour cette activité ? "),t("strong",null,"L'activité sera verrouillée",-1)])),default:P(()=>[e[39]||(e[39]=t("i",{class:"icon-trash"},null,-1)),e[40]||(e[40]=r(" Appliquer "))]),_:2},1032,["onConfirm"])):d("",!0)])],2))),256))])],64)}const Ot=S(Ve,[["render",jt],["__scopeId","data-v-833d8759"]]);const zt={props:{milestone:{required:!0},manage:{default:!1},progression:{default:!1}},computed:{finishedPerson(){let e=/\[Person:([0-9]*):(.*)\]/gm.exec(this.milestone.finishedBy);return e!==null?e[2]:""},statutText(){if(!this.milestone.type.finishable)return"";switch(this.milestone.finished){case 0:case null:return this.milestone.past?"EN RETARD":"A FAIRE";case 50:return"EN COURS";case 100:return"Validé";case 200:return"Sans suite";case 400:return"Refusé";default:return""}},owner(){return this.finishedPerson?finishedPerson[2]:"Unreadable data"},ownerId(){return this.finishedPerson?finishedPerson[1]:"Unreadble data"},finishable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished<100},cancelFinish(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0},progressable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&(this.milestone.finished==null||this.milestone.finished==0||this.milestone.finished==100)},inProgress(){return this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0&&this.milestone.finished<100},finished(){return this.milestone.type.finishable==!0&&this.milestone.finished>=100},late(){return this.finishable==!0&&this.milestone.past&&!this.finished},past(){return this.milestone.past},cssClass(){let s={finishable:this.finishable,finished:this.finished||this.milestone.done,late:this.late||this.milestone.late,payment:this.milestone.isPayment,inprogress:this.inProgress,canceled:this.milestone.finished==200,refused:this.milestone.finished==400,valided:this.milestone.finished==100,past:this.past};return s[this.milestone.type.facet]=!0,s}}},Rt={class:"main"},Ft={key:0},It=["datetime"],Wt={class:"ago"},Tt={key:0},qt={key:0},Lt={key:1,class:"details"},Jt={key:2};function Ht(s,e,a,k,n,o){return l(),i("article",{class:C(["jalon",o.cssClass])},[t("span",Rt,[o.statutText?(l(),i("strong",Ft," "+u(o.statutText),1)):d("",!0),t("time",{datetime:a.milestone.dateStart,class:"time-value"},[r(u(s.$filters.date(a.milestone.dateStart))+" ",1),t("span",Wt,"  ("+u(s.$filters.timeAgo(a.milestone.dateStart))+") ",1)],8,It)]),t("strong",{class:C(["card-title",{"text-private":a.milestone.isPayment}])},[r(u(a.milestone.type.label)+" ",1),o.inProgress?(l(),i("small",Tt,[e[7]||(e[7]=r(" (En cours par ")),t("strong",null,u(o.finishedPerson),1),e[8]||(e[8]=r(")"))])):d("",!0)],2),o.finished?(l(),i("p",qt,[t("strong",null,u(o.finishedPerson),1),e[9]||(e[9]=r(" a complété ce jalon"))])):d("",!0),a.milestone.comment?(l(),i("p",Lt,u(a.milestone.comment),1)):d("",!0),a.milestone.isPayment?d("",!0):(l(),i("nav",Jt,[o.cancelFinish?(l(),i("a",{key:0,href:"#",title:"Réinitialiser la progression",onClick:e[0]||(e[0]=h(y=>s.$emit("unvalid",a.milestone),["prevent"]))},e[10]||(e[10]=[t("i",{class:"icon-rewind-outline"},null,-1)]))):d("",!0),o.progressable?(l(),i("a",{key:1,href:"#",title:"Marquer comme en cours",onClick:e[1]||(e[1]=h(y=>s.$emit("inprogress",a.milestone),["prevent"]))},e[11]||(e[11]=[t("i",{class:"icon-cw-outline"},null,-1)]))):d("",!0),o.finishable?(l(),i("a",{key:2,href:"#",title:"Marquer comme terminé",onClick:e[2]||(e[2]=h(y=>s.$emit("valid",a.milestone),["prevent"]))},e[12]||(e[12]=[t("i",{class:"icon-ok-circled"},null,-1)]))):d("",!0),o.finishable?(l(),i("a",{key:3,href:"#",title:"Marquer comme sans suite",onClick:e[3]||(e[3]=h(y=>s.$emit("cancel",a.milestone),["prevent"]))},e[13]||(e[13]=[t("i",{class:"icon-archive"},null,-1)]))):d("",!0),o.finishable?(l(),i("a",{key:4,href:"#",title:"Marquer comme refusé",onClick:e[4]||(e[4]=h(y=>s.$emit("refused",a.milestone),["prevent"]))},e[14]||(e[14]=[t("i",{class:"icon-block"},null,-1)]))):d("",!0),a.manage?(l(),i("a",{key:5,href:"#",title:"Supprimer ce jalon",onClick:e[5]||(e[5]=h(y=>s.$emit("remove",a.milestone),["prevent"]))},e[15]||(e[15]=[t("i",{class:"icon-trash"},null,-1)]))):d("",!0),a.manage?(l(),i("a",{key:6,href:"#",title:"Modifier ce jalon",onClick:e[6]||(e[6]=h(y=>s.$emit("edit",a.milestone),["prevent"]))},e[16]||(e[16]=[t("i",{class:"icon-edit"},null,-1)]))):d("",!0)]))],2)}const Bt=S(zt,[["render",Ht],["__scopeId","data-v-42de1793"]]);const Yt={props:{url:{required:!0},manage:{required:!0},progression:{default:!1},items:{default:[],type:Array},types:{default:[],type:Array},payments:{required:!1,default:[],type:Array}},components:{milestone:Bt,datepicker:T},data(){return{error:null,formData:null,pendingMsg:"",creatable:!1,deleteMilestone:null,editMilestone:null,validMilestone:null,cancelMilestone:null,refusedMilestone:null,unvalidMilestone:null,inProgressMilestone:null,action:null,actionMessage:"",actionMilestone:null,model:{}}},computed:{types(){return this.types},milestones(){let s=[];return this.payments.forEach(e=>{let a=new Date,k=!1,n=!1,o;switch(e.status){case 1:a=e.datePredicted,a?(o="PRÉVU",k=V(e.datePredicted.date).unix(){s.push(e)}),s.sort((e,a)=>{let k=V(e.dateStart).unix(),n=V(a.dateStart).unix();return k-n}),s},payments(){return this.payments},formTypeFinishable(){return this.formData?this.types.find(s=>s.id==this.formData.type.id&&s.finishable):!1},groupedTypes(){let s={};return this.types.forEach(e=>{let a=e.facet;s.hasOwnProperty(a)||(s[a]={label:a,types:[]}),s[e.facet].types.push(e)}),s}},methods:{handlerValid(s){this.validMilestone=s},handlerInProgress(s){this.inProgressMilestone=s},handlerUnvalid(s){this.unvalidMilestone=s},handlerActionConfirm(s,e,a){this.actionMilestone=s,this.action=e,this.actionMessage=a},handlerActionCancel(){this.actionMilestone=null,this.action=null,this.actionMessage=""},handlerCancel(s){this.unvalidMilestone=s},handlerRemove(s){this.deleteMilestone=s},handlerEdit(s){this.editMilestone=s,this.formData={type:s.type,id:s.id,comment:s.comment,dateStart:V(s.dateStart).format("YYYY-MM-DD")}},handlerNew(){this.formData={id:0,type:JSON.parse(JSON.stringify(this.types[0])),dateStart:V().format("Y-M-D HH:mm:ss"),comment:""}},preformDelete(){this.pendingMsg="Suppression du jalon",A.delete(this.url+"?id="+this.deleteMilestone.id).then(s=>{this.fetch()},s=>{O.commit("addErrorAxios",s)}).then(s=>{this.pendingMsg=null,this.deleteMilestone=null})},performValid(s){var e={},a;switch(s){case"valid":this.pendingMsg="Validation du jalon",a=this.validMilestone;break;case"unvalid":this.pendingMsg="Réinitialisation du jalon",a=this.unvalidMilestone;break;case"inprogress":this.pendingMsg="Marquage du jalon comme en cours",a=this.inProgressMilestone;break;case"cancel":case"refused":a=this.actionMilestone;break;default:this.error="Action incorrecte";return}e.id=a.id,e.action=s,this.action=null,this.actionMessage="",this.actionMilestone=null,A.put(this.url,e).then(k=>{this.fetch()},k=>{O.commit("addErrorAxios",k)}).then(k=>{this.pendingMsg=null,this.validMilestone=null,this.unvalidMilestone=null,this.inProgressMilestone=null})},performSave(){this.pendingMsg=this.formData.id?"Enregistrement des modifications":"Création du nouveau jalon",this.formData.id?A.put(this.url,this.formData).then(s=>{this.fetch()},s=>{O.commit("addErrorAxios",s)}).then(s=>{this.pendingMsg=null,this.formData=null}):A.post(this.url,this.formData).then(s=>{this.fetch()},s=>{O.commit("addErrorAxios",s)}).then(s=>{this.pendingMsg=null,this.formData=null})},fetch(){this.pendingMsg="Chargement des jalons : "+this.url,A.get(this.url).then(s=>{this.$emit("update",s.data.datas.milestones.entities)},s=>{console.log(s),this.error="Impossible de charger les jalons de cette activités : "+s}).then(s=>{this.pendingMsg=""})}},mounted(){}},Gt={class:"milestones"},Kt={key:0,class:"error overlay"},Xt={class:"overlay-content"},Qt={key:0,class:"overlay"},Zt={class:"overlay-content"},$t={key:0},es={key:1},ts={class:"form-group"},ss=["label"],ns=["value"],ls={class:"help"},is={class:"form-group"},os={class:"form-group"},rs={key:0,class:"deleteconfirm overlay"},as={class:"overlay-content"},ds={key:0,class:"validconfirm overlay"},us={class:"overlay-content"},ms={key:0,class:"inprogressconfirm overlay"},cs={class:"overlay-content"},ps={key:0,class:"inprogressconfirm overlay"},fs={class:"overlay-content"},vs={key:0,class:"validconfirm overlay"},hs={class:"overlay-content"},gs={key:0,class:"alert alert-info"},ys={key:0,class:"admin-bar"},ks={key:1,class:"list"},bs={key:2,class:"alert"};function Ds(s,e,a,k,n,o){const y=D("datepicker"),v=D("milestone");return l(),i("section",Gt,[g(U,{name:"fade"},{default:P(()=>[n.error?(l(),i("div",Kt,[t("div",Xt,[e[22]||(e[22]=t("i",{class:"icon-warning-empty"},null,-1)),r(" "+u(n.error)+" ",1),e[23]||(e[23]=t("br",null,null,-1)),t("a",{href:"#",onClick:e[0]||(e[0]=c=>n.error=null),class:"btn btn-sm btn-default btn-xs"},e[21]||(e[21]=[t("i",{class:"icon-cancel-circled"},null,-1),r(" Fermer")]))])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.formData?(l(),i("div",Qt,[t("div",Zt,[t("h2",null,[e[25]||(e[25]=t("i",{class:"icon-calendar"},null,-1)),n.formData.id?(l(),i("span",$t,[e[24]||(e[24]=r("Modification du jalon ")),t("strong",null,u(n.formData.type.label),1)])):(l(),i("span",es,"Nouveau jalon"))]),t("div",ts,[e[27]||(e[27]=t("label",{for:""},"Type de jalon",-1)),w(t("select",{name:"",id:"","onUpdate:modelValue":e[1]||(e[1]=c=>n.formData.type.id=c),class:"form-control"},[(l(!0),i(b,null,_(o.groupedTypes,c=>(l(),i("optgroup",{label:c.label},[(l(!0),i(b,null,_(c.types,M=>(l(),i("option",{value:M.id},u(M.label),9,ns))),256))],8,ss))),256))],512),[[x,n.formData.type.id]]),w(t("p",ls,e[26]||(e[26]=[t("i",{class:"icon-info-circled"},null,-1),r(" Ce type de jalon inclut des méchanismes de validation pour marquer le jalon comme terminé ")]),512),[[ee,o.formTypeFinishable]])]),t("div",is,[e[28]||(e[28]=t("label",{for:""},"Date prévue pour le jalon",-1)),g(y,{modelValue:n.formData.dateStart,"onUpdate:modelValue":e[2]||(e[2]=c=>n.formData.dateStart=c),onInput:e[3]||(e[3]=c=>{n.formData.dateStart=c})},null,8,["modelValue"])]),t("div",os,[e[29]||(e[29]=t("label",{for:""},"Description",-1)),w(t("textarea",{"onUpdate:modelValue":e[4]||(e[4]=c=>n.formData.comment=c),class:"form-control"},null,512),[[E,n.formData.comment]])]),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[5]||(e[5]=(...c)=>o.performSave&&o.performSave(...c))},e[30]||(e[30]=[t("i",{class:"icon-floppy"},null,-1),r(" Enregistrer ")])),t("button",{class:"btn btn-default",onClick:e[6]||(e[6]=c=>n.formData=null)},e[31]||(e[31]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.deleteMilestone?(l(),i("div",rs,[t("div",as,[e[40]||(e[40]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(" Supprimer ce jalon ?")],-1)),t("p",null,[e[32]||(e[32]=r("Cette suppression sera ")),e[33]||(e[33]=t("strong",null,"définitive",-1)),e[34]||(e[34]=r(", si vous souhaitez signifier que ce jalon est réalisé, utilisez plutôt l'option ")),e[35]||(e[35]=t("em",null,"Marquer comme terminé",-1)),e[36]||(e[36]=r(". Si cette option n'est pas disponible, demandez à l'administrateur Oscar si vous avez les privilèges pour réaliser cette action ou si le type de jalon ")),t("strong",null,u(n.deleteMilestone.type.label),1),e[37]||(e[37]=r(" est correctement configuré."))]),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[7]||(e[7]=(...c)=>o.preformDelete&&o.preformDelete(...c))},e[38]||(e[38]=[t("i",{class:"icon-trash"},null,-1),r(" Supprimer ")])),t("button",{class:"btn btn-default",onClick:e[8]||(e[8]=c=>n.deleteMilestone=null)},e[39]||(e[39]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.validMilestone?(l(),i("div",ds,[t("div",us,[e[43]||(e[43]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(" Valider ce jalon ? ")],-1)),e[44]||(e[44]=t("p",null,"Les jalons marqués comme terminés ne feront pas l'objet de notifications ou d'alertes.",-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[9]||(e[9]=c=>o.performValid("valid"))},e[41]||(e[41]=[t("i",{class:"icon-ok-circled"},null,-1),r(" Marquer ce jalon comme terminé ")])),t("button",{class:"btn btn-default",onClick:e[10]||(e[10]=c=>n.validMilestone=null)},e[42]||(e[42]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.inProgressMilestone?(l(),i("div",ms,[t("div",cs,[e[47]||(e[47]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(' Marquer ce jalon "en cours" ? ')],-1)),e[48]||(e[48]=t("p",null,null,-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[11]||(e[11]=c=>o.performValid("inprogress"))},e[45]||(e[45]=[t("i",{class:"icon-cw-outline"},null,-1),r(" Marquer ce jalon comme en cours ")])),t("button",{class:"btn btn-default",onClick:e[12]||(e[12]=c=>n.inProgressMilestone=null)},e[46]||(e[46]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.actionMessage?(l(),i("div",ps,[t("div",fs,[t("h2",null,[e[49]||(e[49]=t("i",{class:"icon-help-circled"},null,-1)),r(" "+u(n.actionMessage)+" ? ",1)]),e[52]||(e[52]=t("p",null,"Les jalons marqués comme terminés (Validé, refusé ou sans suite) ne feront pas l'objet de notifications ou d'alertes",-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[13]||(e[13]=c=>o.performValid(n.action))},[e[50]||(e[50]=t("i",{class:"icon-cw-outline"},null,-1)),r(" "+u(n.actionMessage),1)]),t("button",{class:"btn btn-default",onClick:e[14]||(e[14]=(...c)=>o.handlerActionCancel&&o.handlerActionCancel(...c))},e[51]||(e[51]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.unvalidMilestone?(l(),i("div",vs,[t("div",hs,[e[55]||(e[55]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(" Invalider ce jalon ? ")],-1)),e[56]||(e[56]=t("p",null,"L'état d'avancement du jalon sera réinitialisé.",-1)),t("nav",null,[t("button",{class:"btn btn-success",onClick:e[15]||(e[15]=c=>o.performValid("unvalid"))},e[53]||(e[53]=[t("i",{class:"icon-ok-circled"},null,-1),r(" Réinitialiser la progression de ce jalon ")])),t("button",{class:"btn btn-danger",onClick:e[16]||(e[16]=c=>n.unvalidMilestone=null)},e[54]||(e[54]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.pendingMsg?(l(),i("div",gs,[e[57]||(e[57]=t("i",{class:"icon-spinner animate-spin"},null,-1)),r(" "+u(n.pendingMsg),1)])):d("",!0)]),_:1}),a.manage?(l(),i("nav",ys,[t("a",{href:"#",onClick:e[17]||(e[17]=h((...c)=>o.handlerNew&&o.handlerNew(...c),["prevent"])),class:"btn btn-xs btn-default"},e[58]||(e[58]=[t("i",{class:"icon-calendar-plus-o"},null,-1),r(" Nouveau Jalon ")])),t("a",{href:"#",onClick:e[18]||(e[18]=h((...c)=>o.fetch&&o.fetch(...c),["prevent"])),class:"btn btn-xs btn-warning"},e[59]||(e[59]=[t("i",{class:"icon-bug"},null,-1),r(" fetch ")]))])):d("",!0),o.milestones!=null?(l(),i("section",ks,[(l(!0),i(b,null,_(o.milestones,c=>(l(),z(v,{milestone:c,key:c.id,manage:a.manage,progression:a.progression,onValid:o.handlerValid,onUnvalid:o.handlerUnvalid,onInprogress:o.handlerInProgress,onCancel:e[19]||(e[19]=M=>o.handlerActionConfirm(M,"cancel","Marquer ce jalon comme sans suite")),onRefused:e[20]||(e[20]=M=>o.handlerActionConfirm(M,"refused","Marquer ce jalon comme refusé")),onRemove:o.handlerRemove,onEdit:o.handlerEdit},null,8,["milestone","manage","progression","onValid","onUnvalid","onInprogress","onRemove","onEdit"]))),128))])):(l(),i("div",bs," Aucun jalon "))])}const _s=S(Yt,[["render",Ds]]),ws={props:["payment","manage"],data(){return{}},computed:{late(){if(this.payment.status===1){if(!this.payment.datePredicted)return!0;let s=V().unix();return V(this.payment.datePredicted).unix()s.$emit("delete",a.payment),["prevent"])),title:"Supprimer ce versement"},e[7]||(e[7]=[t("i",{class:"icon-trash"},null,-1)])),t("a",{href:"#",class:"btn-edit",onClick:e[1]||(e[1]=h(y=>s.$emit("edit",a.payment),["prevent"])),title:"Modifier ce versement"},e[8]||(e[8]=[t("i",{class:"icon-pencil"},null,-1)]))])):d("",!0)]),t("p",js,u(a.payment.comment),1)],2)}const zs=S(ws,[["render",Os]]),Rs={props:["url","amount","currency","currencies","manage","payments"],data(){return{formData:null,deletePayment:null,error:"",pendingMsg:""}},components:{payment:zs,datepicker:T},computed:{total(){let s=0;return this.payments&&this.payments.forEach(e=>{let a=1;e.currency&&(a=e.rate),s+=e.amount/a}),Math.round(s*100)/100},currencySymbol(){return this.currency?this.currency.symbol:"€"},formHasError(){return!this.formData.amount||this.formData.status==2&&!this.formData.datePayment||this.formData.status==1&&!this.formData.datePredicted}},methods:{getPaymentDateValue(s){return s.status==2?s.datePayment?s.datePayment.date:null:s.status==1&&s.datePredicted?s.datePredicted.date:null},handlerNewPayment(){this.formData={id:null,amount:0,currencyId:1,rate:1,datePredicted:"",status:1,datePayment:"",codeTransaction:"",comment:""}},handlerDelete(s){this.deletePayment=s},handlerEdit(s){this.formData=JSON.parse(JSON.stringify(s)),this.formData.currencyId=s.currency.id,this.formData.datePayment=s.datePayment?V(s.datePayment.date).format("YYYY-MM-DD"):"",this.formData.datePredicted=s.datePredicted?V(s.datePredicted.date).format("YYYY-MM-DD"):"",this.formData.currencyId=s.currency.id},handlerFormUpdateRate(){let s=this.currencies.find(e=>e.id==this.formData.currencyId);s&&(this.formData.rate=s.rate)},performSave(){this.loading="Enregistrement du paiement",!this.formHasError&&(this.formData.id?A.post(this.url,this.formData).then(s=>{this.formData=null,this.fetch()},s=>{this.error=j.manageErrorResponse(s)}):A.put(this.url,this.formData).then(s=>{this.formData=null,this.fetch()},s=>{this.error=j.manageErrorResponse(s)}))},performDelete(){A.delete(this.url+"?id="+this.deletePayment.id).then(s=>{this.fetch()},s=>{this.error="Impossible de supprimer le versement : "+j.manageErrorResponse(s).message}).then(()=>{this.deletePayment=null})},fetch(){this.loading="Chargement des versements",A.get(this.url).then(s=>{this.$emit("update",s.data.datas.payments)},s=>{this.error=j.manageErrorResponse(s)}).finally(s=>this.loading=null)}},mounted(){}},Fs={class:"payments"},Is={key:0,class:"error overlay"},Ws={class:"overlay-content"},Ts={key:0,class:"pending overlay"},qs={class:"overlay-content"},Ls={key:0,class:"deleteconfirm overlay"},Js={class:"overlay-content"},Hs={key:0,class:"overlay"},Bs={class:"overlay-content"},Ys={key:0},Gs={key:1},Ks={class:"container"},Xs={class:"row"},Qs={class:"col-xs-6"},Zs={class:"form-group"},$s={key:0,class:"oscar-form-message error"},en={class:"col-xs-3"},tn={class:"form-group"},sn=["value"],nn={class:"col-xs-3"},ln={class:"form-group"},on={class:"row"},rn={class:"col-xs-6"},an={class:"form-group"},dn={key:0,class:"oscar-form-message error"},un={class:"col-xs-6"},mn={class:"form-group"},cn={class:"done"},pn={class:"row"},fn={class:"col-xs-6"},vn={class:"form-group"},hn={key:0,class:"oscar-form-message error"},gn={class:"col-xs-6"},yn={class:"form-group"},kn={class:"form-group"},bn={class:"text-center"},Dn={class:"btn-group"},_n={key:0,class:"admin-bar"},wn={class:"payment total"},Cn={class:"heading"},Pn={class:"amount text-private"},An={class:"date"},Un={class:"text-private"},Sn={key:1,class:"alert alert-danger alertAmount"},Mn={class:"amountPrevu text-private"},En={title:"Valeur exacte : getAmount() ?>",class:"text-private"};function Vn(s,e,a,k,n,o){const y=D("datepicker"),v=D("payment");return l(),i("section",Fs,[g(U,{name:"fade"},{default:P(()=>[n.error?(l(),i("div",Is,[t("div",Ws,[e[19]||(e[19]=t("i",{class:"icon-warning-empty"},null,-1)),r(" "+u(n.error)+" ",1),e[20]||(e[20]=t("br",null,null,-1)),t("a",{href:"#",onClick:e[0]||(e[0]=c=>n.error=null),class:"btn btn-default"},e[18]||(e[18]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Fermer")]))])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.pendingMsg?(l(),i("div",Ts,[t("div",qs,[e[21]||(e[21]=t("i",{class:"icon-spinner animate-spin"},null,-1)),r(" "+u(n.pendingMsg),1)])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.deletePayment?(l(),i("div",Ls,[t("div",Js,[e[24]||(e[24]=t("h3",null,[t("i",{class:"icon-help-circled"}),r(" Supprimer ce versement ?")],-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[1]||(e[1]=(...c)=>o.performDelete&&o.performDelete(...c))},e[22]||(e[22]=[t("i",{class:"icon-trash"},null,-1),r(" Supprimer ")])),t("button",{class:"btn btn-default",onClick:e[2]||(e[2]=c=>n.deletePayment=null)},e[23]||(e[23]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.formData?(l(),i("div",Hs,[t("div",Bs,[n.formData.id?(l(),i("h3",Ys,"Modification du versement")):(l(),i("h3",Gs,"Nouveau versement")),t("div",Ks,[t("div",Xs,[t("div",Qs,[t("div",Zs,[e[25]||(e[25]=t("label",{class:"control-label",for:"amount"},"Montant",-1)),w(t("input",{name:"amount",class:"form-control input-lg form-control","onUpdate:modelValue":e[3]||(e[3]=c=>n.formData.amount=c),type:"text"},null,512),[[E,n.formData.amount]]),n.formData.amount?d("",!0):(l(),i("div",$s," Vous devez indiquer un montant. "))])]),t("div",en,[t("div",tn,[e[26]||(e[26]=t("label",{class:"control-label"},"Devise pour le versement",-1)),w(t("select",{name:"currency",class:"form-control form-control","onUpdate:modelValue":e[4]||(e[4]=c=>n.formData.currencyId=c),onChange:e[5]||(e[5]=(...c)=>o.handlerFormUpdateRate&&o.handlerFormUpdateRate(...c))},[(l(!0),i(b,null,_(a.currencies,c=>(l(),i("option",{value:c.id},u(c.label),9,sn))),256))],544),[[x,n.formData.currencyId]])])]),t("div",nn,[t("div",ln,[e[27]||(e[27]=t("label",{class:"control-label"},"Taux",-1)),w(t("input",{name:"rate",class:"form-control form-control","onUpdate:modelValue":e[6]||(e[6]=c=>n.formData.rate=c),type:"text"},null,512),[[E,n.formData.rate]])])])]),t("div",on,[t("div",rn,[t("div",an,[e[28]||(e[28]=t("label",{class:"control-label"},"Date prévue",-1)),g(y,{modelValue:n.formData.datePredicted,"onUpdate:modelValue":e[7]||(e[7]=c=>n.formData.datePredicted=c),onInput:e[8]||(e[8]=c=>{n.formData.datePredicted=c})},null,8,["modelValue"]),n.formData.status==1&&!n.formData.datePredicted?(l(),i("div",dn," Les versements prévisionnels necessitent une date. ")):d("",!0)])]),t("div",un,[t("div",mn,[e[30]||(e[30]=t("label",{class:"control-label"},"Statut",-1)),w(t("select",{name:"status",class:"form-control form-control","onUpdate:modelValue":e[9]||(e[9]=c=>n.formData.status=c)},e[29]||(e[29]=[t("option",{value:"1",selected:"selected"},"Prévisionnel",-1),t("option",{value:"2"},"Réalisé",-1),t("option",{value:"3"},"Écart",-1)]),512),[[x,n.formData.status]])])])]),t("div",cn,[e[34]||(e[34]=t("h2",null,"Informations sur le versement effectif",-1)),t("div",pn,[t("div",fn,[t("div",vn,[e[31]||(e[31]=t("label",{class:"control-label"},"Date effective",-1)),g(y,{moment:s.moment,modelValue:n.formData.datePayment,"onUpdate:modelValue":e[10]||(e[10]=c=>n.formData.datePayment=c),onInput:e[11]||(e[11]=c=>{n.formData.datePayment=c})},null,8,["moment","modelValue"]),n.formData.status==2&&!n.formData.datePayment?(l(),i("div",hn," Les versements réalisés necessitent une date effective ")):d("",!0)])]),t("div",gn,[t("div",yn,[e[32]||(e[32]=t("label",{class:"control-label"},"N° de pièce",-1)),w(t("input",{name:"codeTransaction",class:"form-control form-control","onUpdate:modelValue":e[12]||(e[12]=c=>n.formData.codeTransaction=c),type:"text"},null,512),[[E,n.formData.codeTransaction]])]),e[33]||(e[33]=t("p",{class:"help"},"Numéro permettant d'identifier l'opération auprès des services comptables.",-1))])])]),t("div",kn,[e[35]||(e[35]=t("label",{class:"control-label"},"Commentaire",-1)),w(t("textarea",{name:"comment",class:"form-control form-control",placeholder:"Commentaire","onUpdate:modelValue":e[13]||(e[13]=c=>n.formData.comment=c)},null,512),[[E,n.formData.comment]])]),t("nav",bn,[t("nav",Dn,[t("a",{class:"btn btn-default button-back",href:"#",onClick:e[14]||(e[14]=h(c=>n.formData=null,["prevent"]))},"Annuler"),t("button",{class:C(["btn btn-primary",{disabled:o.formHasError}]),onClick:e[15]||(e[15]=h((...c)=>o.performSave&&o.performSave(...c),["prevent"]))}," Enregistrer ",2)])])])])])):d("",!0)]),_:1}),a.manage?(l(),i("nav",_n,[t("a",{href:"#",onClick:e[16]||(e[16]=h((...c)=>o.handlerNewPayment&&o.handlerNewPayment(...c),["prevent"])),class:"btn btn-default btn-xs"},e[36]||(e[36]=[t("i",{class:"icon-bank"},null,-1),r(" Nouveau versement")])),t("button",{class:"btn btn-warning btn-xs",onClick:e[17]||(e[17]=h((...c)=>o.fetch&&o.fetch(...c),["prevent"]))},e[37]||(e[37]=[t("i",{class:"icon-bug"},null,-1),r(" fetch ")]))])):d("",!0),(l(!0),i(b,null,_(a.payments,c=>(l(),z(v,{payment:c,key:c.id,manage:a.manage,onDelete:o.handlerDelete,onEdit:o.handlerEdit},null,8,["payment","manage","onDelete","onEdit"]))),128)),t("article",wn,[t("div",Cn,[t("strong",Pn,u(s.$filters.money(o.total))+" € ",1),t("span",An,[e[38]||(e[38]=r("/ ")),t("strong",Un,u(s.$filters.money(a.amount))+" €",1)])])]),o.total!=a.amount?(l(),i("div",Sn,[e[41]||(e[41]=t("p",null,[t("i",{class:"icon-attention-1"}),r(" Le total des versements prévus et réalisés ne semble pas correspondre avec le montant prévu initialement, Somme des versements :")],-1)),t("ul",null,[t("li",null,[t("strong",Mn,u(s.$filters.money(o.total))+" "+u(o.currencySymbol),1),e[39]||(e[39]=r(" en versement,"))]),t("li",null,[t("strong",En,u(s.$filters.money(a.amount))+" "+u(o.currencySymbol),1),e[40]||(e[40]=r(" prévu "))])])])):d("",!0)])}const xn=S(Rs,[["render",Vn]]);const Nn={name:"PersonCartouche",props:{person:{required:!0,type:Object}}},jn={class:"person-text"},On={class:"info-bulle"},zn=["src"],Rn={class:"infos"},Fn={class:"firstname"},In={class:"lastname"},Wn={class:"content"},Tn={style:{"white-space":"nowrap"}},qn={key:0},Ln={key:1},Jn={key:0},Hn={key:1},Bn={key:0},Yn={key:1},Gn={key:0},Kn=["href"],Xn={key:1};function Qn(s,e,a,k,n,o){return l(),i("span",jn,[r(u(a.person.label)+" ",1),t("div",On,[t("header",null,[t("figure",null,[t("img",{src:"https://www.gravatar.com/avatar/"+a.person.mailMd5+"?s=60",alt:""},null,8,zn)]),t("div",Rn,[t("div",Fn,u(a.person.firstName),1),t("div",In,u(a.person.lastName),1)])]),t("div",Wn,[t("div",Tn,[e[0]||(e[0]=t("i",{class:"icon-mail"},null,-1)),a.person.email?(l(),i("span",qn,u(a.person.email),1)):(l(),i("em",Ln,"Inconnu"))]),t("div",null,[e[1]||(e[1]=t("i",{class:"icon-phone-outline"},null,-1)),a.person.phone?(l(),i("span",Jn,u(a.person.phone),1)):(l(),i("em",Hn,"Inconnu"))]),t("div",null,[e[2]||(e[2]=t("i",{class:"icon-building-filled"},null,-1)),a.person.affectation?(l(),i("span",Bn,u(a.person.affectation),1)):(l(),i("em",Yn,"Inconnu"))]),a.person.ucbnSiteLocalisation?(l(),i("div",Gn,[e[3]||(e[3]=t("i",{class:"icon-direction"},null,-1)),t("span",null,u(a.person.ucbnSiteLocalisation),1)])):d("",!0)]),t("footer",null,[a.person.url?(l(),i("a",{key:0,href:a.person.url,class:"btn btn-primary btn-xs"},e[4]||(e[4]=[t("i",{class:"icon-zoom-in-outline"},null,-1),r(" Fiche")]),8,Kn)):(l(),i("code",Xn,u(a.person.id),1))])])])}const Zn=S(Nn,[["render",Qn],["__scopeId","data-v-dfc2c1c6"]]),$n={components:{PersonDisplay:K},props:{person:{default:function(){return{}}},editable:!1,allowTooltip:{default:!1}},computed:{duration(){return this.person.duration}},data(){return{canSave:!1,mode:"read",durationForm:666}},methods:{handlerKeyUp(){console.log(arguments)},handlerUpdate(){this.$emit("workpackagepersonupdate",this.person,this.durationForm),this.mode="read"},handlerEdit(){this.mode="edit",this.durationForm=this.person.duration},handlerCancel(){this.mode="read",this.durationForm=this.person.duration},handlerRemove(){this.$emit("workpackagepersondelete",this.person)}}},el={class:"workpackage-person"},tl={class:"displayname"},sl={class:"tempsdeclare temps"},nl={key:0},ll={key:1},il={class:"wp-hours"},ol={title:"Heure(s) saisie(s)",class:"wp-hour unsend"},rl={title:"Heure(s) validée(s)",class:"wp-hour validate"},al={key:0,title:"Heure(s) en cours de validation",class:"wp-hour validating"},dl={key:1,title:"Heure(s) en conflit",class:"wp-hour conflicts"},ul={title:"Heure(s) à valider",class:"wp-hour duration"};function ml(s,e,a,k,n,o){const y=D("PersonDisplay");return l(),i("article",el,[t("div",tl,[g(y,{person:a.person.person,"allow-tooltip":a.allowTooltip},null,8,["person","allow-tooltip"]),a.editable&&n.mode=="read"?(l(),i("a",{key:0,href:"#",onClick:e[0]||(e[0]=h(v=>o.handlerRemove(a.person),["prevent"])),class:"link",title:"Supprimer ce déclarant"},e[6]||(e[6]=[t("i",{class:"icon-trash"},null,-1)]))):d("",!0)]),t("div",sl,[a.editable&&n.mode=="edit"?(l(),i("div",nl,[e[9]||(e[9]=r(" Heures prévues : ")),w(t("input",{type:"integer","onUpdate:modelValue":e[1]||(e[1]=v=>n.durationForm=v),style:{width:"5em"},onKeyup:e[2]||(e[2]=te((...v)=>o.handlerUpdate&&o.handlerUpdate(...v),["13"]))},null,544),[[E,n.durationForm]]),t("a",{href:"#",onClick:e[3]||(e[3]=h((...v)=>o.handlerUpdate&&o.handlerUpdate(...v),["prevent"])),title:"Appliquer la modification des heures prévues"},e[7]||(e[7]=[t("i",{class:"icon-floppy"},null,-1)])),t("a",{href:"#",onClick:e[4]||(e[4]=h((...v)=>o.handlerCancel&&o.handlerCancel(...v),["prevent"])),title:"Annuler la modification des heures prévues"},e[8]||(e[8]=[t("i",{class:"icon-cancel-outline"},null,-1)]))])):(l(),i("span",ll,[t("strong",il,[t("span",ol,u(a.person.unsend|s.heures),1),t("span",rl,u(a.person.validate|s.heures),1),a.person.validating>0?(l(),i("span",al,u(a.person.validating|s.heures),1)):d("",!0),a.person.conflicts>0?(l(),i("span",dl,u(a.person.conflicts|s.heures),1)):d("",!0),t("span",ul,[r(" / "+u(a.person.duration|s.heures)+" ",1),a.editable&&n.mode=="read"?(l(),i("a",{key:0,href:"#",onClick:e[5]||(e[5]=h((...v)=>o.handlerEdit&&o.handlerEdit(...v),["prevent"])),title:"Modifier les heures prévues"},e[10]||(e[10]=[t("i",{class:"icon-pencil"},null,-1)]))):d("",!0)])])]))])])}const cl=S($n,[["render",ml]]),pl={components:{workpackageperson:cl},data(){return{mode:"read",canSave:!1,formData:{id:-1,code:"",label:"",description:""}}},created(){this.workpackage.id<0&&(this.mode="edit")},props:{workpackage:null,persons:{default:function(){return[]}},editable:!1,isValidateur:!1,allowTooltip:{default:!1}},watch:{},methods:{isDeclarant(s,e){return e.persons.find(a=>a.person.id===s.id)},handlerEditWorkPackage(){this.formData=JSON.parse(JSON.stringify(this.workpackage)),this.mode="edit"},handlerCancelEdit(){this.workpackage.id<0?this.$emit("workpackagecancelnew",this.workpackage):this.mode="read"},handlerDeleteWorkPackage(){this.$emit("workpackagedelete",this.workpackage)},handlerUpdateWorkPackage(s){if(this.formData.code)this.$emit("workpackageupdate",this.formData),this.mode="read";else return s.stopPropagation(),s.stopImmediatePropagation(),!1},handlerUpdate(s,e){this.$emit("workpackagepersonupdate",s,e)},handlerDelete(s){this.$emit("workpackagepersondelete",s)},roles(s){return s.roles.join(",")},tempsPrevu(s){return 0},tempsDeclare(s){return 0}}},fl={class:"workpackage"},vl={key:0},hl={key:1},gl={class:"form-group"},yl={class:"form-group"},kl={class:"form-group"},bl={class:"buttons"},Dl={key:1},_l={class:"workpackage-persons"},wl={key:0,class:"buttons"},Cl={class:"btn-group"},Pl={class:"dropdown-menu"},Al=["onClick"],Ul={key:1,class:"text-danger"};function Sl(s,e,a,k,n,o){const y=D("workpackageperson");return l(),i("article",fl,[n.mode=="edit"?(l(),i("form",{key:0,action:"",onSubmit:e[4]||(e[4]=h((...v)=>o.handlerUpdateWorkPackage&&o.handlerUpdateWorkPackage(...v),["prevent"]))},[t("h4",null,[a.workpackage.id>0?(l(),i("span",vl,"Modification du lot")):(l(),i("span",hl,"Nouveau lot")),r(" "+u(n.formData.label),1)]),t("div",gl,[e[7]||(e[7]=t("label",{for:""},"Code",-1)),e[8]||(e[8]=t("p",{class:"text-danger"},[r("Le code est "),t("strong",null,"utilisé pour l'affichage des créneaux"),r(" simplifiés, utilisez un code de préférence entre 3 et 5 caractères.")],-1)),w(t("input",{type:"text",placeholder:"CODE","onUpdate:modelValue":e[0]||(e[0]=v=>n.formData.code=v),class:"form-control"},null,512),[[E,n.formData.code]])]),t("div",yl,[e[9]||(e[9]=t("label",{for:""},"Intitulé",-1)),w(t("input",{type:"text",placeholder:"Intitulé","onUpdate:modelValue":e[1]||(e[1]=v=>n.formData.label=v),class:"form-control"},null,512),[[E,n.formData.label]])]),t("div",kl,[e[10]||(e[10]=t("label",{for:""},"Description",-1)),w(t("textarea",{type:"text",placeholder:"Description","onUpdate:modelValue":e[2]||(e[2]=v=>n.formData.description=v),class:"form-control"},null,512),[[E,n.formData.description]])]),t("div",bl,[t("button",{type:"submit",class:C(["btn btn-default btn-save",{disabled:!n.formData.code}])},"Enregistrer ",2),t("button",{type:"button",class:"btn btn-default",onClick:e[3]||(e[3]=(...v)=>o.handlerCancelEdit&&o.handlerCancelEdit(...v))},"Annuler")])],32)):d("",!0),n.mode=="read"?(l(),i("div",Dl,[t("h3",null,"["+u(a.workpackage.code)+"] "+u(a.workpackage.label),1),t("p",null,u(a.workpackage.description),1),t("section",_l,[e[11]||(e[11]=t("h4",null,[t("i",{class:"icon-calendar"}),r("Déclarants ")],-1)),(l(!0),i(b,null,_(a.workpackage.persons,v=>(l(),z(y,{key:v.id,"allow-tooltip":a.allowTooltip,person:v,editable:a.editable,onWorkpackagepersondelete:o.handlerDelete,onWorkpackagepersonupdate:o.handlerUpdate},null,8,["allow-tooltip","person","editable","onWorkpackagepersondelete","onWorkpackagepersonupdate"]))),128))]),a.editable&&a.persons.length?(l(),i("div",wl,[t("div",Cl,[e[12]||(e[12]=t("button",{type:"button",class:"btn btn-default btn-xs dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[r(" Ajouter un déclarant "),t("span",{class:"caret"})],-1)),t("ul",Pl,[(l(!0),i(b,null,_(a.persons,v=>(l(),i("li",{class:C({disabled:o.isDeclarant(v,a.workpackage)})},[t("a",{href:"#",onClick:h(c=>s.$emit("addperson",v.id,a.workpackage.id),["prevent"])},u(v.displayname),9,Al)],2))),256))])]),t("a",{href:"#",class:"btn btn-default btn-xs",onClick:e[5]||(e[5]=h((...v)=>o.handlerEditWorkPackage&&o.handlerEditWorkPackage(...v),["prevent"]))},e[13]||(e[13]=[t("i",{class:"icon-pencil"},null,-1),r("Modifier")])),t("a",{href:"#",class:"btn btn-default btn-xs",onClick:e[6]||(e[6]=h((...v)=>o.handlerDeleteWorkPackage&&o.handlerDeleteWorkPackage(...v),["prevent"]))},e[14]||(e[14]=[t("i",{class:"icon-trash"},null,-1),r("Supprimer")]))])):d("",!0),a.persons.length<=0?(l(),i("div",Ul,e[15]||(e[15]=[r(" Vous n'avez pas encore ajouté de membre à cette activité. "),t("strong",null,"Seul les membres d'une activité peuvent être identifiés comme déclarant",-1),r(". ")]))):d("",!0)])):d("",!0)])}const Ml=S(pl,[["render",Sl]]);const El={components:{Workpackage:Ml},data(){return{loading:!1,errors:[],isDeclarant:!1,isValidateur:!1,confirm:null,confirmData:null,confirmHandler:null,editedWorlpackage:null}},props:{url:{required:!0},editable:{required:!1,default:!1},allowTooltip:{default:!1},isValidateur:{required:!0},outsidePerson:{required:!0},persons:{required:!0},workpackages:{required:!0},debugEnabled:{default:!1}},methods:{handlerWorkPackageCancelNew(s){this.workpackages.splice(this.workpackages.indexOf(s),1)},handlerWorkPackageNew(){this.workpackages.push({id:-1,code:"Nouveau Lot",label:"",persons:[],description:""})},handlerConfirm(){console.log("handlerConfirm"),this.confirmHandler(this.confirmData),this.confirm=null},handlerWorkPackagePersonDelete(s){this.confirm="Supprimer le déclarant ?",this.confirmData=s,this.confirmHandler=this.handlerWorkPackagePersonDeleteDo},handlerWorkPackagePersonDeleteDo(s){A.delete(this.url+"?workpackagepersonid="+s.id).then(e=>{this.fetch()},e=>{this.errors.push("Impossible de supprimer le déclarant : "+e.body)})},handlerWorkPackageDelete(s){this.confirm="Supprimer le lot de travail ?",this.confirmData=s,this.confirmHandler=this.handlerWorkPackageDeleteDo},handlerWorkPackageDeleteDo(s){A.delete(this.url+"?workpackageid="+s.id).then(e=>{this.fetch()},e=>{this.errors.push("Impossible de supprimer le lot : "+e.body)})},handlerWorkPackageUpdate(s){var e=new FormData;for(var a in s)e.append(a,s[a]);if(s.id>0)console.log("MAJ du LOT"),e.append("workpackageid",s.id),A.post(this.url,e).then(k=>{this.fetch()},k=>{this.errors.push("Impossible de mettre à jour le lot de travail : "+k.body)});else{console.log("NOUVEAU du LOT ",this.url);let k=JSON.parse(JSON.stringify(s));k.workpackageid=-1,A.put(this.url,k).then(n=>{this.fetch()},n=>{this.errors.push("Impossible de créer le lot de travail : "+n.body)}).then(n=>this.fetch())}},handlerUpdateWorkPackagePerson(s,e){var a=new FormData;a.append("workpackagepersonid",s.id),a.append("duration",e),A.post(this.url,a).then(k=>{s.duration=e},k=>{this.errors.push("Impossible de mettre à jour les heures prévues : "+k.body)})},addperson(s,e){console.log(arguments);var a={idworkpackage:e,idperson:s};A.put(this.url,a).then(k=>{this.fetch()},k=>{this.errors.push("Impossible d'ajouter le déclarant : "+k.body)}).then(()=>this.loading=!1)},fetch(){this.loading="Chargement des lots de travails",console.log(this.url),A.get(this.url+"?v=2").then(s=>{console.log("Chargement des lots de travail : ",s);try{let e=s.data.datas.workpackages;this.$emit("update",e)}catch(e){this.errors.push("UI ERROR "+e)}},s=>{this.errors.push(j.manageErrorResponse(s).message)}).then(()=>this.loading=!1)},fetchPersons(){this.fetch()}}},Vl={key:0,class:"vue-loader"},xl={class:"alert alert-danger"},Nl=["onClick"],jl={key:0,class:"overlay"},Ol={class:"overlay-content"},zl={class:"overlay-title"},Rl={class:"buttons"},Fl={class:"admin-bar"},Il={class:"workpackages"};function Wl(s,e,a,k,n,o){const y=D("workpackage");return l(),i("section",null,[g(U,{name:"fade"},{default:P(()=>[n.errors.length?(l(),i("div",Vl,[(l(!0),i(b,null,_(n.errors,(v,c)=>(l(),i("div",xl,[r(u(v)+" ",1),t("a",{href:"",onClick:h(M=>n.errors.splice(c,1),["prevent"])},e[5]||(e[5]=[t("i",{class:"icon-cancel-outline"},null,-1)]),8,Nl)]))),256))])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.confirm?(l(),i("div",jl,[t("div",Ol,[t("div",zl,[r(u(n.confirm)+" ",1),t("a",{href:"#",class:"overlay-closer",onClick:e[0]||(e[0]=h(v=>n.confirm=null,["prevent"]))},"x")]),t("nav",Rl,[t("a",{href:"#",class:"btn btn-danger",onClick:e[1]||(e[1]=h(v=>n.confirm=null,["prevent"]))},"Annuler"),t("a",{href:"#",class:"btn btn-danger",onClick:e[2]||(e[2]=h(v=>o.handlerConfirm(),["prevent"]))},"Confirmer")])])])):d("",!0)]),_:1}),t("nav",Fl,[t("a",{href:"",class:"btn btn-primary btn-xs",onClick:e[3]||(e[3]=h((...v)=>o.handlerWorkPackageNew&&o.handlerWorkPackageNew(...v),["prevent"]))},e[6]||(e[6]=[t("i",{class:"icon-book"},null,-1),r(" Nouveau lot")])),a.debugEnabled?(l(),i("a",{key:0,href:"",class:"btn btn-warning btn-xs",onClick:e[4]||(e[4]=h((...v)=>o.fetch&&o.fetch(...v),["prevent"]))},e[7]||(e[7]=[t("i",{class:"icon-bug"},null,-1),r(" fetch")]))):d("",!0)]),t("section",Il,[(l(!0),i(b,null,_(a.workpackages,v=>(l(),z(y,{key:v.id,"allow-tooltip":a.allowTooltip,workpackage:v,persons:a.persons,editable:a.editable,"is-validateur":a.isValidateur,onAddperson:o.addperson,onWorkpackageupdate:o.handlerWorkPackageUpdate,onWorkpackagepersonupdate:o.handlerUpdateWorkPackagePerson,onWorkpackagepersondelete:o.handlerWorkPackagePersonDelete,onWorkpackagedelete:o.handlerWorkPackageDelete,onWorkpackagecancelnew:o.handlerWorkPackageCancelNew},null,8,["allow-tooltip","workpackage","persons","editable","is-validateur","onAddperson","onWorkpackageupdate","onWorkpackagepersonupdate","onWorkpackagepersondelete","onWorkpackagedelete","onWorkpackagecancelnew"]))),128))])])}const Tl=S(El,[["render",Wl],["__scopeId","data-v-7f36a26b"]]);A.defaults.headers.common.Accept="application/json";A.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const F="activities_sticky",ql={name:"Activity",components:{ActivityAvenants:Ot,ActivityNotes:ce,ActivityLogs:me,ActivityDocument:ue,ActivitySpentSynthesis:pe,EntityWithRole:fe,Loader:ve,Payments:xn,PersonCartouche:Zn,PersonDisplay:K,Milestones:_s,Modal:G,VueJsonPretty:se,WorkpackagesActivity:Tl},props:{url:{required:!0},debugEnabled:{required:!1,type:Boolean,default:!1}},data(){return{administration:null,avenants:null,budget:null,core:null,credentials:null,currencies:[],documents:[],milestones:[],milestonesTypes:[],milestonesUrl:null,milestonesUrlNotifications:null,notes:null,notes_url:null,payments:[],paymentsUrl:null,persons:null,personsUrl:null,personsUrlNew:null,rolesOrganizations:null,rolesPersons:null,timesheets:null,timesheetsDeclarers:null,timesheetsValidators:null,timesheetsUrl:null,timesheetsUrlSynthesis:null,organizations:null,organizationsUrl:null,organizationsUrlNew:null,workpackages:null,workpackagesUrl:null,spents:null,activity:{},duplicateDatas:null,sticky:[],descriptionFull:!1,debug_content:null,debug_displayed:!1,error:null,loading:!0}},computed:{personsWP(){if(this.persons){let s={};return this.persons.forEach(e=>{s.hasOwnProperty(e.enrolled)||(s[e.enrolled]={id:e.enrolled,displayname:e.enrolledLabel,firstname:e.firstname,lastname:e.lastname})}),Object.values(s)}else return[]},storage(){return localStorage.getItem(F)},isSticky(){return this.sticky.find(s=>s.id==this.core.id)},labelReduced(){let s=this.core.label;return s.length>50?s.substr(0,50)+"...":s}},methods:{performLock(s){A.post(this.url,{action:s}).then(e=>{this.fetch()},e=>{let a=j.manageErrorResponse(e).message;O.commit("addError",a)})},handlerUnlock(){this.performLock("lock")},handlerLock(){this.performLock("unlock")},testError(s,e="Une erreur affichée"){O.commit("addError",e)},handlerHelp(s){O.dispatch("displayHelp",s)},handlerDebug(s){this.debug_content=s,this.debug_displayed=!0},handlerDebugHide(){this.debug_displayed=!1},handlerDebugShow(s){this.debug_content=JSON.parse(JSON.stringify(s)),this.debug_displayed=!0},handlerError(s){this.error=s.message},handlerUpdateWorkpackages(s){this.workpackages=s.entities},handlerUpdateNotes(s){this.notes=s.entities},handlerUpdatePayments(s){this.payments=s.entities,this.currencies=s.currencies,this.paymentsUrl=s.url},handlerUpdateMilestones(s){this.milestones=s},handlerUpdatePersons(s){this.persons=s.datas.items},handlerUpdateOrganizations(s){this.organizations=s.datas.items},handlerUpdateDocuments(s){console.log(s),this.documents=s},handlerUpdateAvenants(s){console.log("AVENANTS",s),this.avenants=s},handlerPurgeSticky(){this.sticky=[],localStorage.removeItem(F)},toogleSticky(){this.isSticky?this.handlerUnSticky():this.handlerSticky()},handlerUnSticky(){this.sticky.forEach((s,e)=>{s.id==this.core.id&&this.sticky.splice(e,1)}),localStorage.setItem(F,JSON.stringify(this.sticky))},handlerSticky(){this.sticky.push({id:this.core.id,label:this.core.label,num:this.core.numOscar,location:document.location.href}),localStorage.setItem(F,JSON.stringify(this.sticky))},handlerNavigateSticky(s){s.location&&(document.location=s.location)},test(){console.log(localStorage.getItem())},fetch(){this.loading=!0,A.get(this.url).then(s=>{this.budget=s.data.activity.datas.budget,this.core=s.data.activity.datas.core,s.data.activity.datas.spents&&(this.spents=s.data.activity.datas.spents),s.data.activity.datas.avenants&&this.handlerUpdateAvenants(s.data.activity.datas.avenants),s.data.activity.datas.administration&&(this.administration=s.data.activity.datas.administration),s.data.activity.datas.documents&&this.handlerUpdateDocuments(s.data.activity.datas.documents),s.data.activity.datas.notes&&(this.notes=s.data.activity.datas.notes.entities,this.notes_url=s.data.activity.datas.notes.url),s.data.activity.datas.milestones&&(this.milestones=s.data.activity.datas.milestones.entities,this.milestonesTypes=s.data.activity.datas.milestones.types,this.milestonesUrl=s.data.activity.datas.milestones.url,this.milestonesUrlNotifications=s.data.activity.datas.milestones.urlNotifications),s.data.activity.datas.organizations&&(this.organizations=s.data.activity.datas.organizations.entities,this.organizationsUrl=s.data.activity.datas.organizations.url,this.organizationsUrlNew=s.data.activity.datas.organizations.urlNew,this.rolesOrganizations=s.data.activity.datas.organizations.roles),s.data.activity.datas.payments&&this.handlerUpdatePayments(s.data.activity.datas.payments),s.data.activity.datas.persons&&(this.persons=s.data.activity.datas.persons.entities,this.personsUrlNew=s.data.activity.datas.persons.urlNew,this.personsUrl=s.data.activity.datas.persons.url,this.rolesPersons=s.data.activity.datas.persons.roles),s.data.activity.datas.timesheets?(this.timesheets=s.data.activity.datas.timesheets,this.timesheetsValidators=s.data.activity.datas.timesheets.validators,this.timesheetsDeclarers=s.data.activity.datas.timesheets.declarers,this.timesheetsUrl=s.data.activity.datas.timesheets.url,this.timesheetsUrlSynthesis=s.data.activity.datas.timesheets.urlSynthesis):console.log("pas de donnée FEUILLE DE TEMPS"),s.data.activity.datas.workpackages?(this.workpackages=s.data.activity.datas.workpackages.entities,this.workpackagesUrl=s.data.activity.datas.workpackages.url):console.log("pas de donnée LOTS DE TRAVAIL"),this.credentials=s.data.activity.credentials},s=>{this.handlerError(j.manageErrorResponse(s))}).finally(s=>{this.loading=!1})},handlerDuplicate(){this.duplicateDatas={displayed:!1,keepPersons:!0,keepOrganizations:!0,keepMilestones:!0,keepWorkpackages:!1,keepAdmData:!1}},handlerDuplicateDo(){document.location=this.core.urls.duplicate+"?"+(this.duplicateDatas.keepPersons?"&keeppersons=on":"")+(this.duplicateDatas.keepOrganizations?"&keeporganizations=on":"")+(this.duplicateDatas.keepMilestones?"&keepmilestones=on":"")+(this.duplicateDatas.keepWorkpackages?"&keepworkpackage=on":"")+(this.duplicateDatas.keepAdmData?"&keepadmdata=on":"")},handlerShowProject(){this.activity.project.url_show&&(document.location=this.activity.project.url_show)}},mounted(){this.fetch();let s=localStorage.getItem(F);s?s=JSON.parse(s):s=[],this.sticky=s}},Ll={class:"alert alert-danger"},Jl={key:0,class:"overlay"},Hl={class:"overlay-content"},Bl={class:"row",style:{width:"80%"}},Yl={class:"col-md-6 col-md-offset-3"},Gl={class:"col-md-6 col-md-offset-3"},Kl={class:"list-group-item separator-bottom"},Xl={class:"material-switch pull-right"},Ql={class:"list-group-item separator-bottom"},Zl={class:"material-switch pull-right"},$l={class:"list-group-item separator-bottom"},ei={class:"material-switch pull-right"},ti={class:"list-group-item separator-bottom"},si={class:"material-switch pull-right"},ni={class:"list-group-item separator-bottom"},li={class:"material-switch pull-right"},ii={class:"text-center"},oi={key:1},ri={class:"navbar navbar-default navbar-fixed-top",style:{top:"50px","z-index":"500"}},ai={class:"container"},di={class:"navbar-header"},ui={class:"navbar-brand",href:"#"},mi={class:"collapse navbar-collapse",id:"bs-example-navbar-collapse-1"},ci={class:"nav navbar-nav"},pi={key:0,href:"#members"},fi={key:0,href:"#partners"},vi={key:0,href:"#documents"},hi={key:0,href:"#milestones"},gi={key:0,href:"#notes"},yi={key:0,href:"#payments"},ki={key:0,href:"#spents"},bi={key:0,href:"#timesheets"},Di={class:"nav navbar-nav navbar-right"},_i={class:"dropdown"},wi={class:"dropdown-menu"},Ci={key:0},Pi={key:1},Ai=["onClick"],Ui={key:0,class:"icon-link-ext"},Si={class:"jumbotron activity-header oscar-header",style:{"margin-top":"60px"}},Mi={class:"row line-bottom"},Ei={class:"col-md-9"},Vi={class:"activity-project"},xi={key:0},Ni={key:1},ji=["href"],Oi={key:0},zi={key:1},Ri={class:"activity-type"},Fi={class:"type-chain"},Ii={class:"col-md-3"},Wi={key:0,class:"budget"},Ti={class:"text-private amount"},qi={class:"details"},Li={class:"text-private"},Ji={key:0,class:"text-private"},Hi={class:"text-private"},Bi={class:"text-private"},Yi={class:"text-private"},Gi={class:"row"},Ki={class:"col-md-4"},Xi={class:"texthighlight baseline"},Qi={class:"aggo"},Zi={class:"aggo"},$i={class:"aggo"},eo={class:"aggo"},to={class:"col-md-4"},so={class:"texthighlight baseline"},no={key:0,class:"text-private"},lo={key:1,class:"text-private"},io={class:"texthighlight baseline"},oo={class:"col-md-4"},ro={class:"texthighlight baseline"},ao={class:"row line-bottom"},uo={class:"col-md-4"},mo={class:"texthighlight baseline"},co={class:"cartouche xs"},po={class:"texthighlight baseline"},fo={class:"cartouche complementary",style:{"line-break":"anywhere"}},vo={class:"row"},ho={class:"col-md-12"},go={class:"admin-bar"},yo={key:1},ko={key:0,class:"btn btn-default disabled"},bo=["href"],Do=["href"],_o=["href"],wo={class:"container-fluid"},Co={class:"col-md-8"},Po={key:0,class:"section-infos",id:"members"},Ao={key:1,class:"section-infos",id:"partners"},Uo={key:2,class:"section-infos",id:"avenants"},So={key:3,class:"section-infos",id:"documents"},Mo={key:4,class:"section-infos",id:"notes"},Eo={key:5,id:"timesheets",class:"section-infos"},Vo={key:0,class:"alert alert-info"},xo={key:1},No={class:"oscar-section"},jo={class:"oscar-section-content"},Oo=["href"],zo=["href"],Ro={key:0},Fo={class:"oscar-section"},Io={class:"oscar-section-content"},Wo={key:0},To=["href"],qo={key:0},Lo={key:1,class:"alert-warning alert"},Jo={class:"oscar-section"},Ho={class:"oscar-section-title"},Bo=["href"],Yo={class:"row oscar-section-content"},Go={class:"col-md-4"},Ko={key:0,class:"alert alert-warning"},Xo={class:"cartouche primary person"},Qo={class:"col-md-4"},Zo={key:0,class:"alert alert-warning"},$o={class:"cartouche person primary"},er={class:"col-md-4"},tr={key:0,class:"alert alert-warning"},sr={class:"cartouche person primary"},nr={class:"oscar-section"},lr={class:"oscar-section-content"},ir={class:"col-md-4"},or={key:0,id:"milestones",class:"section-infos"},rr=["href"],ar={key:1,id:"payments",class:"section-infos"},dr={key:2,id:"spents",class:"section-infos"},ur={key:0,class:"alert alert-warning"},mr={key:1},cr={class:"buttons xs"},pr=["href"],fr=["href"],vr={class:"section-infos"},hr=["href"],gr={key:0,class:"container-fluid activity-fiche"},yr={class:"row"},kr={class:"col-md-12"},br={key:2};function Dr(s,e,a,k,n,o){const y=D("loader"),v=D("VueJsonPretty"),c=D("modal"),M=D("EntityWithRole"),q=D("activity-avenants"),L=D("activity-document"),I=D("activity-notes"),m=D("PersonDisplay"),f=D("workpackages-activity"),N=D("Milestones"),Q=D("Payments"),Z=D("ActivitySpentSynthesis"),$=D("ActivityLogs");return l(),i(b,null,[g(y,{text:"Chargement de l'activité",visible:n.loading},null,8,["visible"]),g(c,{title:"Debugger","title-icon":"icon-bug",visible:n.debug_displayed,onModalCancel:e[1]||(e[1]=p=>n.debug_displayed=!1)},{buttons:P(()=>[t("button",{class:"btn btn-default",onClick:e[0]||(e[0]=(...p)=>o.handlerDebugHide&&o.handlerDebugHide(...p))},"FERMER")]),default:P(()=>[g(v,{data:n.debug_content},null,8,["data"])]),_:1},8,["visible"]),g(c,{title:"Une erreur est survenue","title-icon":"icon-bug",visible:n.error!=null},{buttons:P(()=>[t("button",{class:"btn btn-default",onClick:e[2]||(e[2]=p=>n.error=null)},"FERMER")]),default:P(()=>[t("div",Ll,u(n.error),1)]),_:1},8,["visible"]),n.duplicateDatas!=null?(l(),i("div",Jl,[t("div",Hl,[e[36]||(e[36]=t("h1",{class:"overlay-title"},"Dupliquer cette activité",-1)),t("a",{class:"overlay-closer",onClick:e[3]||(e[3]=p=>n.duplicateDatas=null)},"x"),t("div",Bl,[t("h1",Yl,[e[21]||(e[21]=t("small",null,"Options de copie pour",-1)),e[22]||(e[22]=r()),e[23]||(e[23]=t("br",null,null,-1)),t("strong",null,u(n.core.label),1)]),t("div",Gl,[t("div",Kl,[e[25]||(e[25]=t("strong",null,[t("i",{class:"icon-group"}),r(" Reprendre les personnes ")],-1)),t("div",Xl,[w(t("input",{id:"keeppersons",name:"keeppersons",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=p=>n.duplicateDatas.keepPersons=p)},null,512),[[R,n.duplicateDatas.keepPersons]]),e[24]||(e[24]=t("label",{for:"keeppersons",class:"label-primary"},null,-1))])]),t("div",Ql,[e[27]||(e[27]=t("strong",null,[t("i",{class:"icon-calendar"}),r(" Reprendre les jalons ")],-1)),t("div",Zl,[w(t("input",{id:"keepmilestones",name:"keepmilestones",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=p=>n.duplicateDatas.keepMilestones=p)},null,512),[[R,n.duplicateDatas.keepMilestones]]),e[26]||(e[26]=t("label",{for:"keepmilestones",class:"label-primary"},null,-1))])]),t("div",$l,[e[29]||(e[29]=t("strong",null,[t("i",{class:"icon-building-filled"}),r(" Reprendre les organisations ")],-1)),t("div",ei,[w(t("input",{id:"keeporganizations",name:"keeporganizations",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=p=>n.duplicateDatas.keepOrganizations=p)},null,512),[[R,n.duplicateDatas.keepOrganizations]]),e[28]||(e[28]=t("label",{for:"keeporganizations",class:"label-primary"},null,-1))])]),t("div",ti,[e[31]||(e[31]=t("strong",null,[t("i",{class:"icon-archive"}),r(" Reprendre les lots de travail ")],-1)),t("div",si,[w(t("input",{id:"keepworkpackages",name:"keepworkpackages",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=p=>n.duplicateDatas.keepWorkpackages=p)},null,512),[[R,n.duplicateDatas.keepWorkpackages]]),e[30]||(e[30]=t("label",{for:"keepworkpackages",class:"label-primary"},null,-1))])]),t("div",ni,[e[33]||(e[33]=t("strong",null,[t("i",{class:"icon-archive"}),r(" Reprendre les données de base ")],-1)),e[34]||(e[34]=t("br",null,null,-1)),e[35]||(e[35]=t("small",null,"Données du formulaire de créaton : Dates de début / fin, intitulé, description, type, etc...",-1)),t("div",li,[w(t("input",{id:"keepadmdata",name:"keepadmdata",type:"checkbox","onUpdate:modelValue":e[8]||(e[8]=p=>n.duplicateDatas.keepAdmData=p)},null,512),[[R,n.duplicateDatas.keepAdmData]]),e[32]||(e[32]=t("label",{for:"keepadmdata",class:"label-primary"},null,-1))])]),t("nav",ii,[t("a",{href:"#",class:"btn btn-primary",onClick:e[9]||(e[9]=p=>n.duplicateDatas=null)},"Annuler"),t("a",{href:"#",class:"btn btn-default",onClick:e[10]||(e[10]=(...p)=>o.handlerDuplicateDo&&o.handlerDuplicateDo(...p))},"Dupliquer l'activité")])])])])])):d("",!0),n.core&&n.credentials&&n.credentials.read?(l(),i("div",oi,[t("nav",ri,[t("div",ai,[t("div",di,[e[38]||(e[38]=ne('',1)),t("a",ui,[e[37]||(e[37]=t("i",{class:"icon-cube"},null,-1)),t("strong",null,u(n.core.numOscar),1),t("span",null," / "+u(o.labelReduced),1),t("i",{class:"icon-pin",style:le({opacity:o.isSticky?1:.3}),onClick:e[11]||(e[11]=(...p)=>o.toogleSticky&&o.toogleSticky(...p))},null,4)])]),t("div",mi,[t("ul",ci,[t("li",null,[n.credentials.persons.read?(l(),i("a",pi,"Membres")):d("",!0)]),t("li",null,[n.credentials.organizations.read?(l(),i("a",fi,"Partenaires")):d("",!0)]),t("li",null,[n.credentials.documents.read?(l(),i("a",vi,"Documents")):d("",!0)]),t("li",null,[n.credentials.milestones.read?(l(),i("a",hi,"Jalons")):d("",!0)]),t("li",null,[n.credentials.notes.read?(l(),i("a",gi,"Notes")):d("",!0)]),t("li",null,[n.credentials.budget.read?(l(),i("a",yi,"Versements")):d("",!0)]),t("li",null,[n.credentials.spents.read?(l(),i("a",ki,"Dépenses")):d("",!0)]),t("li",null,[n.credentials.timesheets.read?(l(),i("a",bi,"Feuilles de temps")):d("",!0)])]),t("ul",Di,[t("li",_i,[e[44]||(e[44]=t("a",{href:"#",class:"dropdown-toggle","data-toggle":"dropdown",role:"button","aria-haspopup":"true","aria-expanded":"false"},[t("i",{class:"icon-pin text-primary"}),t("span",{class:"caret"})],-1)),t("ul",wi,[o.isSticky?(l(),i("li",Ci,[t("a",{href:"#",onClick:e[12]||(e[12]=(...p)=>o.handlerUnSticky&&o.handlerUnSticky(...p))},"Désépingler")])):(l(),i("li",Pi,[t("a",{href:"#",onClick:e[13]||(e[13]=h((...p)=>o.handlerSticky&&o.handlerSticky(...p),["prevent"]))},e[39]||(e[39]=[t("i",{class:"icon-pin-outline"},null,-1),r(" Epingler")]))])),e[42]||(e[42]=t("li",{role:"separator",class:"divider"},null,-1)),(l(!0),i(b,null,_(n.sticky,p=>(l(),i("li",{class:C(p.id==n.core.id?"disabled":"")},[t("a",{href:"#",onClick:Y=>o.handlerNavigateSticky(p)},[e[40]||(e[40]=t("i",{class:"icon-cube"},null,-1)),t("strong",null,u(p.num),1),t("em",null,u(p.label),1),p.id!=n.core.id?(l(),i("i",Ui)):d("",!0)],8,Ai)],2))),256)),e[43]||(e[43]=t("li",{role:"separator",class:"divider"},null,-1)),t("li",null,[t("a",{href:"#",onClick:e[14]||(e[14]=h((...p)=>o.handlerPurgeSticky&&o.handlerPurgeSticky(...p),["prevent"]))},e[41]||(e[41]=[t("i",{class:"icon-trash"},null,-1),r(" Supprimer les épingles ")]))])])])])])])]),t("header",Si,[t("div",Mi,[t("div",Ei,[t("h4",Vi,[e[45]||(e[45]=t("i",{class:"icon-cubes"},null,-1)),e[46]||(e[46]=r("  ")),n.core.project===null?(l(),i("em",xi,"Aucun Projet")):(l(),i("span",Ni,[n.credentials.project.read?(l(),i("a",{key:0,href:n.core.project.url_show},[n.core.project.acronym?(l(),i("strong",Oi,u(n.core.project.acronym)+" ",1)):d("",!0),t("em",null,u(n.core.project.label),1)],8,ji)):(l(),i("span",zi,[t("strong",null,u(n.core.project.acronym),1),t("em",null,u(n.core.project.label),1)]))]))]),t("h3",null,[t("span",{class:C(["picto status-","status-"+n.core.status])},[t("i",{class:C(["icon","icon-"+n.core.status])},null,2),r(" "+u(n.core.status_label),1)],2),t("span",Ri,[e[47]||(e[47]=t("i",{class:"icon-tag"},null,-1)),t("span",Fi,[t("i",{class:C(n.core.type_slug)},null,2),(l(!0),i(b,null,_(n.core.type_chain,p=>(l(),i("span",null,u(p.label),1))),256))])])]),t("h1",null,[t("span",null,[e[48]||(e[48]=t("i",{class:"icon-cube"},null,-1)),r(" "+u(n.core.label),1)])])]),t("div",Ii,[n.budget&&n.credentials.budget.read?(l(),i("div",Wi,[e[54]||(e[54]=t("em",null,"Montant",-1)),t("strong",Ti,u(s.$filters.money(n.budget.montant))+" "+u(n.budget.currency.symbol),1),t("div",qi,[t("small",null,[e[49]||(e[49]=r(" Frais de gestion : ")),t("b",Li,u(n.budget.fraisDeGestion),1)]),t("small",null,[e[50]||(e[50]=r(" Part unité : ")),n.budget.fraisDeGestionPartUnite?(l(),i("b",Ji,u(n.budget.fraisDeGestionPartUnite),1)):d("",!0)]),t("small",null,[e[51]||(e[51]=r(" Part hébergeur : ")),t("b",Hi,u(n.budget.fraisDeGestionPartHebergeur),1)]),t("small",null,[e[52]||(e[52]=r(" Part Gestionnaire : ")),t("b",Bi,u(n.budget.fraisDeGestionPartGestionnaire),1)]),t("small",null,[e[53]||(e[53]=r(" TVA : ")),t("b",Yi,u(n.budget.tva),1)])])])):d("",!0)])]),n.core.description?(l(),i("p",{key:0,class:C(["baseline",{descriptionPacked:!n.descriptionFull}]),onClick:e[15]||(e[15]=p=>n.descriptionFull=!n.descriptionFull)},[t("small",null,u(n.core.description),1)],2)):d("",!0),t("div",Gi,[t("div",Ki,[e[62]||(e[62]=t("h4",null,[t("i",{class:"icon-calendar"}),r("Dates")],-1)),t("p",Xi,[e[55]||(e[55]=r(" Début : ")),t("time",null,u(s.$filters.date(n.core.dateStart)),1),t("small",Qi," ("+u(s.$filters.timeAgo(n.core.dateStart))+")",1),e[56]||(e[56]=t("br",null,null,-1)),e[57]||(e[57]=r(" Fin : ")),t("time",null,u(s.$filters.dateFull(n.core.dateEnd)),1),t("small",Zi," ("+u(s.$filters.timeAgo(n.core.dateEnd))+")",1),e[58]||(e[58]=t("br",null,null,-1)),e[59]||(e[59]=r(" Signé le : ")),t("time",null,u(s.$filters.dateFull(n.core.dateSigned)),1),t("small",$i," ("+u(s.$filters.timeAgo(n.core.dateSigned))+")",1),e[60]||(e[60]=t("br",null,null,-1)),e[61]||(e[61]=r(" Date de début des négociations : ")),t("time",null,u(s.$filters.dateFull(n.core.dateNegociation)),1),t("small",eo," ("+u(s.$filters.timeAgo(n.core.dateNegociation))+")",1)])]),t("div",to,[e[68]||(e[68]=t("h4",null,[t("i",{class:"icon-briefcase"}),r("Numérotations")],-1)),t("p",so,[e[63]||(e[63]=r(' N° Oscar" : ')),t("strong",null,u(n.core.numOscar),1),e[64]||(e[64]=t("br",null,null,-1)),e[65]||(e[65]=r(" Numéro financier : ")),n.core.pfi?(l(),i("strong",no,u(n.core.pfi),1)):(l(),i("strong",lo,"AUCUN")),e[66]||(e[66]=r(" - Ouverture du PFI le ")),t("time",null,u(s.$filters.dateFull(n.core.dateOpened)),1),e[67]||(e[67]=t("br",null,null,-1))]),(l(!0),i(b,null,_(n.core.numeros,(p,Y)=>(l(),i("p",io,[r(u(Y)+" : ",1),t("strong",null,u(p),1)]))),256))]),t("div",oo,[e[72]||(e[72]=t("h4",null,[t("i",{class:"icon-database-1"}),r("Divers")],-1)),t("p",ro,[e[69]||(e[69]=r(" Création ")),t("time",null,u(s.$filters.dateFull(n.core.dateCreated)),1),e[70]||(e[70]=t("br",null,null,-1)),e[71]||(e[71]=r(" Dernière MAJ ")),t("time",null,u(s.$filters.dateFull(n.core.dateUpdated)),1)])])]),t("div",ao,[t("div",uo,[e[76]||(e[76]=t("h4",null,[t("i",{class:"icon-tags"}),r("Métas-données")],-1)),t("p",mo,[e[73]||(e[73]=r(" Disciplines : ")),(l(!0),i(b,null,_(n.core.disciplines,p=>(l(),i("span",co,u(p),1))),256))]),t("p",po,[e[75]||(e[75]=r(" Mots clés : ")),(l(!0),i(b,null,_(n.core.motscles,p=>(l(),i("span",fo,[e[74]||(e[74]=t("i",{class:"icon-tag"},null,-1)),r(" "+u(p),1)]))),256))])])]),t("div",vo,[t("div",ho,[t("nav",go,[n.credentials.lock_edit?(l(),i(b,{key:0},[n.credentials.lock?(l(),i("a",{key:0,class:"btn btn-info",onClick:e[16]||(e[16]=p=>o.handlerLock())},e[77]||(e[77]=[t("i",{class:"icon-lock-open"},null,-1),r(" Déverrouiller")]))):(l(),i("a",{key:1,class:"btn btn-info",onClick:e[17]||(e[17]=p=>o.handlerUnlock())},e[78]||(e[78]=[t("i",{class:"icon-lock"},null,-1),r(" Vérrouiller")])))],64)):n.credentials.lock?(l(),i("span",yo,[n.credentials.lock?(l(),i("strong",ko,e[79]||(e[79]=[t("i",{class:"icon-lock"},null,-1),r(" VERROUILLEE ")]))):d("",!0)])):d("",!0),n.credentials.core.edit?(l(),i("a",{key:2,class:"btn btn-primary",href:n.core.urls.edit},e[80]||(e[80]=[t("i",{class:"icon-pencil"},null,-1),r(" Modifier les informations")]),8,bo)):d("",!0),n.credentials.core.change_project?(l(),i("a",{key:3,class:"btn btn-default",href:n.core.urls.change_project},e[81]||(e[81]=[t("i",{class:"icon-cubes"},null,-1),r(" Modifier le projet")]),8,Do)):d("",!0),n.credentials.core.new_project?(l(),i("a",{key:4,class:"btn btn-default",href:n.core.urls.new_project},e[82]||(e[82]=[t("i",{class:"icon-cubes"},null,-1),r(" Créer un nouveau projet")]),8,_o)):d("",!0),n.core.urls.duplicate?(l(),i("a",{key:5,class:"btn btn-default",onClick:e[18]||(e[18]=(...p)=>o.handlerDuplicate&&o.handlerDuplicate(...p))},e[83]||(e[83]=[t("i",{class:"icon-paste"},null,-1),r(" Dupliquer")]))):d("",!0),a.debugEnabled?(l(),i("a",{key:6,class:"btn btn-warning",onClick:e[19]||(e[19]=p=>o.handlerDebugShow(s.$data))},e[84]||(e[84]=[t("i",{class:"icon-bug"},null,-1),r(" Afficher le modèle")]))):d("",!0),a.debugEnabled?(l(),i("a",{key:7,class:"btn btn-warning",onClick:e[20]||(e[20]=(...p)=>o.fetch&&o.fetch(...p))},e[85]||(e[85]=[t("i",{class:"icon-bug"},null,-1),r(" Recharger le modèle")]))):d("",!0)])])])]),t("div",wo,[t("div",Co,[n.credentials.persons.read?(l(),i("section",Po,[e[86]||(e[86]=t("h2",null,[t("span",null,[t("i",{class:"icon-group"}),r("Membres")])],-1)),g(M,{title:"Personne",standalone:!1,"entity-link-show":n.credentials.persons.show,manage:n.credentials.persons.edit,roles:n.rolesPersons,items:n.persons,"url-new":n.personsUrlNew,url:n.personsUrl,"debug-enabled":a.debugEnabled,onUpdate:o.handlerUpdatePersons},null,8,["entity-link-show","manage","roles","items","url-new","url","debug-enabled","onUpdate"])])):d("",!0),n.credentials.organizations.read?(l(),i("section",Ao,[e[87]||(e[87]=t("h2",null,[t("span",null,[t("i",{class:"icon-building-filled"}),r("Partenaires")])],-1)),g(M,{title:"Organisation",standalone:!1,"debug-enabled":a.debugEnabled,"entity-link-show":n.credentials.organizations.show,manage:n.credentials.organizations.edit,roles:n.rolesOrganizations,items:n.organizations,url:n.organizationsUrl,"url-new":n.organizationsUrlNew,onUpdate:o.handlerUpdateOrganizations},null,8,["debug-enabled","entity-link-show","manage","roles","items","url","url-new","onUpdate"])])):d("",!0),n.credentials.avenants.read?(l(),i("section",Uo,[e[88]||(e[88]=t("h2",null,[t("span",null,[t("i",{class:"icon-hammer"}),r(" Avenants ")])],-1)),g(q,{avenants:n.avenants,"roles-person":n.rolesPersons,"roles-organization":n.rolesOrganizations,"current-persons":n.persons,"current-organizations":n.organizations,manage:n.credentials.avenants.edit,onUpdate:o.handlerUpdateAvenants},null,8,["avenants","roles-person","roles-organization","current-persons","current-organizations","manage","onUpdate"])])):d("",!0),n.credentials.documents.read?(l(),i("section",So,[e[89]||(e[89]=t("h2",null,[t("span",null,[t("i",{class:"icon-book"}),r("Documents")])],-1)),g(L,{onDebug:o.handlerDebug,onUpdated:o.handlerUpdateDocuments,"debug-enabled":a.debugEnabled,standalone:!0,"sa-tabs":n.documents.tabs,"sa-types":n.documents.typesDocuments,"sa-generated-documents":n.documents.generatedDocuments,"sa-computed-documents":n.documents.computedDocuments,"sa-process-datas":n.documents.processDatas,"sa-credentials":n.credentials.documents,url:n.documents.url,"url-upload-new-doc":n.documents.url_upload_new_doc,"url-sign-document":n.documents.url_sign_document},null,8,["onDebug","onUpdated","debug-enabled","sa-tabs","sa-types","sa-generated-documents","sa-computed-documents","sa-process-datas","sa-credentials","url","url-upload-new-doc","url-sign-document"])])):d("",!0),n.credentials.notes.read?(l(),i("section",Mo,[e[90]||(e[90]=t("h2",null,[t("span",null,[t("i",{class:"icon-comment"}),r("Notes")])],-1)),g(I,{url:n.notes_url,showallowed:n.credentials.notes.read,manageuserallowed:n.credentials.notes.edit,manageadminallowed:n.credentials.notes.manage,items:n.notes,onUpdate:o.handlerUpdateNotes},null,8,["url","showallowed","manageuserallowed","manageadminallowed","items","onUpdate"])])):d("",!0),n.credentials.timesheets.read?(l(),i("section",Eo,[e[103]||(e[103]=t("h2",{class:"section-title"},[t("span",null,[t("i",{class:"icon-book"}),r("Feuille de temps")])],-1)),n.timesheets.enabled?(l(),i("div",xo,[t("section",No,[e[94]||(e[94]=t("h3",{class:"oscar-section-title"},[t("span",null,[t("i",{class:"icon-calendar"}),r("Général")])],-1)),t("div",jo,[t("a",{href:n.timesheets.url,class:"btn btn-primary"},e[92]||(e[92]=[t("i",{class:"icon-calendar"},null,-1),r(" Informations générales et lots de travails ")]),8,Oo),t("a",{href:n.timesheets.urlSynthesis,class:"btn btn-default"},e[93]||(e[93]=[t("i",{class:"icon-book"},null,-1),r(" Résumé et documents ")]),8,zo)])]),n.workpackages?(l(),i("section",Ro,[t("div",Fo,[e[96]||(e[96]=t("h3",{class:"oscar-section-title"},[t("span",null,[t("i",{class:"icon-group"}),r("Déclarants")])],-1)),t("div",Io,[n.timesheets.declarers.length?(l(),i("div",Wo,[(l(!0),i(b,null,_(n.timesheetsDeclarers,p=>(l(),i("a",{href:p.url_details,class:C(["btn",p.hasDeclaration?"btn-primary":"btn-default"])},[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"]),p.hasDeclaration==!1?(l(),i("small",qo," (Aucune déclaration) ")):d("",!0)],10,To))),256))])):(l(),i("div",Lo,e[95]||(e[95]=[r(" Pour ajouter des déclarants, créez des "),t("strong",null,"Lots de travail",-1),r(" puis identifier les déclarants parmis les membres ")])))])]),t("div",Jo,[t("h3",Ho,[e[98]||(e[98]=t("span",{class:"text"},[t("i",{class:"icon-user-md"}),r(" Valideurs ")],-1)),t("nav",null,[t("a",{href:n.timesheets.url+"#validators",class:"btn btn-primary btn-xs"},e[97]||(e[97]=[t("i",{class:"icon-user-md"},null,-1),r(" Désigner des validateurs ")]),8,Bo)])]),t("div",Yo,[t("div",Go,[e[99]||(e[99]=t("h4",null,[t("i",{class:"icon-cube"}),r("Validation projet")],-1)),n.timesheets.validators.prj.length===0?(l(),i("div",Ko," Aucun validateur pour cette étape ")):d("",!0),t("div",null,[(l(!0),i(b,null,_(n.timesheetsValidators.prj,p=>(l(),i("span",Xo,[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])]),t("div",Qo,[e[100]||(e[100]=t("h4",null,[t("i",{class:"icon-beaker"}),r("Validation scientifique")],-1)),n.timesheets.validators.sci.length===0?(l(),i("div",Zo," Aucun validateur pour cette étape ")):d("",!0),(l(!0),i(b,null,_(n.timesheetsValidators.sci,p=>(l(),i("span",$o,[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))]),t("div",er,[e[101]||(e[101]=t("h4",null,[t("i",{class:"icon-book"}),r("Validation administrative")],-1)),n.timesheets.validators.adm.length===0?(l(),i("div",tr," Aucun validateur pour cette étape ")):d("",!0),(l(!0),i(b,null,_(n.timesheetsValidators.adm,p=>(l(),i("span",sr,[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])])]),t("div",nr,[e[102]||(e[102]=t("h3",{class:"oscar-section-title"},[t("span",null,[t("i",{class:"icon-archive"}),r("Lots de travail")])],-1)),r(" "+u(s.personWP)+" ",1),t("div",lr,[g(f,{"debug-enabled":a.debugEnabled,"allow-tooltip":n.credentials.persons.show,editable:n.credentials.workpackages.edit,workpackages:n.workpackages,url:n.workpackagesUrl,persons:o.personsWP,onUpdate:o.handlerUpdateWorkpackages},null,8,["debug-enabled","allow-tooltip","editable","workpackages","url","persons","onUpdate"])])])])):d("",!0)])):(l(),i("div",Vo,[e[91]||(e[91]=r(" Feuilles de temps non-disponible pour cette activité : ")),t("strong",null,u(n.timesheets.informations),1)]))])):d("",!0)]),t("aside",ir,[n.credentials.milestones.read?(l(),i("section",or,[e[105]||(e[105]=t("span",null,[t("h2",null,[t("i",{class:"icon-calendar"}),r("Jalons")])],-1)),g(N,{url:n.milestonesUrl,manage:n.credentials.milestones.edit,progression:n.credentials.milestones.progression,payments:n.payments,items:n.milestones,types:n.milestonesTypes,onUpdate:o.handlerUpdateMilestones},null,8,["url","manage","progression","payments","items","types","onUpdate"]),n.milestonesUrlNotifications?(l(),i("a",{key:0,href:n.milestonesUrlNotifications,class:"btn btn-primary"},e[104]||(e[104]=[t("i",{class:"icon-bell"},null,-1),r(" Voir les notifications planifiées ")]),8,rr)):d("",!0)])):d("",!0),n.credentials.payments.read?(l(),i("section",ar,[e[106]||(e[106]=t("h2",null,[t("span",null,[t("i",{class:"icon-bank"}),r("Versements")])],-1)),g(Q,{url:n.paymentsUrl,manage:n.credentials.payments.edit,amount:n.budget.amount,payments:n.payments,currencies:n.currencies,onDebug:o.handlerDebugShow,onUpdate:o.handlerUpdatePayments},null,8,["url","manage","amount","payments","currencies","onDebug","onUpdate"])])):d("",!0),n.credentials.spents.read?(l(),i("section",dr,[e[109]||(e[109]=t("h2",null,[t("span",null,[t("i",{class:"icon-bank"}),r("Dépenses")])],-1)),n.spents.enabled?(l(),i("div",mr,[g(Z,{standalone:!1,datas:n.spents},null,8,["datas"]),t("nav",cr,[n.credentials.spents.details?(l(),i("a",{key:0,href:n.spents.url_details,class:"btn btn-primary btn"},e[107]||(e[107]=[t("i",{class:"icon-file-excel"},null,-1),r(" Détails des dépenses")]),8,pr)):d("",!0),n.credentials.spents.previsionnel?(l(),i("a",{key:1,href:s.spentsUrlPrevisionnel,class:"btn btn-primary btn"},e[108]||(e[108]=[t("i",{class:"icon-file-excel"},null,-1),r(" Dépenses prévisionnelles (beta)")]),8,fr)):d("",!0)])])):(l(),i("div",ur," Dépenses indisponibles : "+u(n.spents.enabled_reason),1))])):d("",!0),t("section",vr,[e[110]||(e[110]=t("h2",null,"PCRU",-1)),t("a",{href:n.core.urls.pcru,class:"btn btn-primary btn-xs"}," Accès aux informations PCRU ",8,hr)])])]),n.credentials.administration.read?(l(),i("div",gr,[t("div",yr,[t("div",kr,[e[111]||(e[111]=t("h2",null,[t("span",null,[t("i",{class:"icon-cog"}),r("Technique")])],-1)),g($,{url:n.administration.url_logs},null,8,["url"])])])])):d("",!0)])):(l(),i("div",br," Données inaccessibles "))],64)}const _r=S(ql,[["render",Dr],["__scopeId","data-v-8de60033"]]);let B=document.querySelector("#activity");const X=ie(_r,{url:B.dataset.url,"debug-enabled":B.dataset.debugEnabled,manage:B.dataset.manage});X.config.globalProperties.$filters={timeAgo(s){return H.timeAgo(s)},date(s){return H.date(s)},dateFull(s){return H.dateFull(s)},filesize(s){return oe.filesize(s)},money(s){return re.money(s)},log(s){return he.log(s)}};X.mount("#activity"); diff --git a/public/js/oscar/vite/dist/assets/activity-d961ddb0.js b/public/js/oscar/vite/dist/assets/activity-d961ddb0.js new file mode 100644 index 0000000000000000000000000000000000000000..8516a72deb9f95dccfa278ce5f3bd3f8d15c4dd1 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/activity-d961ddb0.js @@ -0,0 +1 @@ +import{r as D,o as l,c as o,a,t as c,b as g,w as C,v as x,d as e,e as X,f as W,g as d,h as v,n as P,F as b,p as T,i as q,j as A,k as w,l as j,m as I,q as N,s as S,T as M,u as re,x as de,S as ce,y as ue,z as he,A as me}from"../vendor.js";import{m as Q}from"../vendor2.js";import{f as pe}from"../vendor3.js";import{m as _e}from"../vendor4.js";import{M as se}from"../vendor5.js";import{D as Y,P as fe}from"../vendor6.js";import{_ as E}from"../vendor7.js";import{A as B}from"../vendor8.js";import{O as ve}from"../vendor9.js";import{A as ge}from"../vendor10.js";import{A as ye}from"../vendor11.js";import{A as ke}from"../vendor12.js";import{A as be}from"../vendor13.js";import{A as z}from"../vendor14.js";import{E as De}from"../vendor15.js";import{g as R}from"../vendor16.js";import{L as we}from"../vendor17.js";import{P as ne}from"../vendor18.js";import{t as Ce}from"../vendor19.js";import"../vendor20.js";const Pe={name:"AvenantDate",emits:["update:change"],props:["change"],computed:{date:{get(){return this.change.value},set(t){this.change.value=t,this.$emit("update:change",change)}}},components:{Datepicker:Y}};function Ae(t,s,r,k,n,i){const y=D("Datepicker");return l(),o("div",null,[a(c(r.change.label)+" : ",1),g(y,{modelValue:i.date,"onUpdate:modelValue":s[0]||(s[0]=f=>i.date=f)},null,8,["modelValue"])])}const Ue=E(Pe,[["render",Ae]]),Se={props:{modelValue:Number},data(){return{isEditing:!1,rawValue:"",formattedValue:""}},computed:{displayValue:{get(){return this.isEditing?this.rawValue:this.formattedValue},set(t){this.rawValue=t}}},watch:{modelValue:{immediate:!0,handler(t){this.isEditing||(this.formattedValue=this.formatCurrency(t),this.rawValue=(t??"").toString().replace(".",","))}}},methods:{formatCurrency(t){return new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}).format(t)},startEditing(){this.isEditing=!0,this.rawValue=(this.modelValue??"").toString().replace(".",",")},finishEditing(){this.isEditing=!1;let t=parseFloat(this.rawValue.replace(",","."))||0;this.$emit("update:modelValue",t)},updateRawValue(t){this.rawValue=t.target.value}}};function Me(t,s,r,k,n,i){return C((l(),o("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=y=>i.displayValue=y),onFocus:s[1]||(s[1]=(...y)=>i.startEditing&&i.startEditing(...y)),onBlur:s[2]||(s[2]=(...y)=>i.finishEditing&&i.finishEditing(...y)),onInput:s[3]||(s[3]=(...y)=>i.updateRawValue&&i.updateRawValue(...y)),class:"form-control text-right"},null,544)),[[x,i.displayValue]])}const Ee=E(Se,[["render",Me]]);const Ve={name:"ButtonConfirm",props:{class:{type:String,default:"btn btn-default"},checkbox:{type:Boolean,default:!1}},data(){return{modal:!1,checked:!1}},computed:{confirmEnabled(){return this.checkbox&&this.checked||this.checkbox===!1}},watch:{modal(t){this.checked=!1}},methods:{handlerClick(){this.$emit("click")},handlerCancel(){this.modal=!1,this.$emit("cancel")},handlerConfirm(){this.confirmEnabled&&(this.modal=!1,this.$emit("confirm"))}},activated(){console.log("ButtonConfirm activated")}},$=t=>(T("data-v-efd4eea6"),t=t(),q(),t),xe={key:0,class:"overlay confirm-dialog"},Ne={class:"overlay-content"},je=$(()=>e("i",{class:"icon-attention-1"},null,-1)),Oe={class:"overlay-message"},ze={key:0},Re={for:"confirm_ok",class:"checkbox"},Ie=$(()=>e("i",{class:"icon-block"},null,-1)),Fe=$(()=>e("i",{class:"icon-ok-circled"},null,-1));function We(t,s,r,k,n,i){return l(),o(b,null,[n.modal?(l(),o("div",xe,[e("div",Ne,[e("h3",null,[je,X(t.$slots,"title",{},()=>[a(" Confirmer ? ")],!0)]),e("div",Oe,[X(t.$slots,"message",{},()=>[a(" Voulez-vous continuer ? ")],!0)]),r.checkbox?(l(),o("div",ze,[e("label",Re,[C(e("input",{type:"checkbox",id:"confirm_ok","onUpdate:modelValue":s[0]||(s[0]=y=>n.checked=y)},null,512),[[W,n.checked]]),a(" J'ai bien compris ")])])):d("",!0),e("nav",null,[e("a",{href:"#",onClick:s[1]||(s[1]=v((...y)=>i.handlerCancel&&i.handlerCancel(...y),["prevent"])),class:"btn btn-danger"},[Ie,a(" Annuler ")]),e("a",{href:"#",onClick:s[2]||(s[2]=v((...y)=>i.handlerConfirm&&i.handlerConfirm(...y),["prevent"])),class:P(["btn btn-success",{disabled:!i.confirmEnabled}])},[Fe,a(" Confirmer")],2)])])])):d("",!0),e("a",{href:"#",class:P(r.class),onClick:s[3]||(s[3]=v(y=>n.modal=!0,["prevent"]))},[X(t.$slots,"default",{},()=>[a("Texte par défaut")],!0)],2)],64)}const Te=E(Ve,[["render",We],["__scopeId","data-v-efd4eea6"]]);const qe={name:"ActivityAvenants",components:{ButtonConfirm:Te,Amount:Ee,AvenantDate:Ue,Datepicker:Y,Modal:se,OrganizationAutoComplete:ve,PersonAutoCompleter:fe},props:["roles-person","roles-organization","currentPersons","currentOrganizations","avenants","manage"],data(){return{edit:null,selectedPerson:null}},computed:{modificationsEnabled(){return{personAdd:!0,personDel:!0,organizationAdd:!0,organizationDel:!0,changeAmount:!this.edit.modifications.find(t=>t.type=="changeAmount"),dateEnd:!this.edit.modifications.find(t=>t.type=="dateEnd")}},persons(){let t={};return this.currentPersons&&this.currentPersons.forEach(s=>{t.hasOwnProperty(s.enrolled)||(t[s.enrolled]={id:s.enrolled,firstName:s.firstName,lastName:s.lastName,roles:{}}),t[s.enrolled].hasOwnProperty(s.roleId)||(t[s.enrolled].roles[s.roleId]=s.roleLabel)}),t},organizations(){let t={};return this.currentOrganizations&&this.currentOrganizations.forEach(s=>{t.hasOwnProperty(s.enrolled)||(console.log(s),t[s.enrolled]={id:s.enrolled,label:s.enrolledLabel,roles:{}}),t[s.enrolled].hasOwnProperty(s.roleId)||(t[s.enrolled].roles[s.roleId]=s.roleLabel)}),t}},methods:{handlerConfirm(t,s,r){console.log("confirm",t),s.call(this,r)},handlerOk(t){console.log(JSON.stringify(t)),console.log(this.avenants.url_api)},handlerNew(){this.edit={id:null,dateAvenant:null,comment:"",previousFile:null,file:null,modifications:[]}},handlerEdit(t){this.edit={id:t.id,dateAvenant:t.date,comment:t.comment,previousFile:t.filename,file:null,modifications:JSON.parse(JSON.stringify(t.modifications))}},handlerCancel(){console.log("CANCEL"),this.edit=null},handlerSave(){let t=new FormData;t.append("id",this.edit.id??""),t.append("dateAvenant",this.edit.dateAvenant??""),t.append("comment",this.edit.comment??""),t.append("file",this.edit.file??""),t.append("modifications",this.edit.modifications?JSON.stringify(this.edit.modifications):"");let s="Mise à jour de l'avenant";this.edit.id?t.append("action","update"):(t.append("action","create"),s="Création de l'avenant"),B.post(this.avenants.url_api,t,{pendingMsg:s}).then(r=>{this.edit=null,this.fetch()})},handlerDelete(t){B.delete(t.url_api,{pendingMsg:"Suppression de l'avenant"}).then(s=>{this.fetch()})},handlerApplyAvenant(t){console.log("Application de l'avenant");let s=new FormData;s.append("id",t.id),s.append("action","apply");let r="Application de l'avenant";B.post(this.avenants.url_api,s,{pendingMsg:r,pendingBack:!1}).then(k=>{document.location.reload()})},handlerAddChange(t){if(this.edit)switch(t){case"dateEnd":this.edit.modifications.push({type:t,mode:"new",label:"Date de fin",value1:new Date().toISOString()});break;default:this.edit.modifications.push({type:t,mode:"new",label:"A définir",value1:null,valueObj:null,value2:null})}},handlerRemoveChange(t){let s=this.edit.modifications.indexOf(t);s>=0&&this.edit.modifications.splice(s,1)},handlerUpdatePersonChange(t,s){t.valueObj={id:s.id,firstName:s.firstName,lastName:s.lastName},t.value1=s.id},handlerUpdateOrganizationChange(t,s){console.log(JSON.stringify(t)),t.valueObj={id:s.id,label:s.label},t.value1=s.id},handlerSelectToDel(t,s){console.log("Changement de la personne à supprimer",t,s),t.value1=t.valueObj.id,t.value2=null},async handlerSelectFile(t){if(t.target.files.length===0){this.edit.file=null;return}this.edit.file=t.target.files[0]},fetch(){B.get(this.avenants.url_api,{pendingMsg:"Chargement des avenants"}).then(t=>{this.$emit("update",t.data.datas.avenants)})}},mounted(){console.log("mounted")}},U=t=>(T("data-v-833d8759"),t=t(),q(),t),Le={action:""},Je=U(()=>e("div",{class:"alert alert-info"},[a(" Vous pourrez revenir modifier cet avenant plus tard tant qu'il est en mode "),e("strong",null,"brouillon"),a(". ")],-1)),He={class:"form-group"},Be=U(()=>e("label",{for:"dateAvenant"},"Date : ",-1)),Ye=U(()=>e("div",{class:"help"},[a(" Date de "),e("strong",null,"signature"),a(" de l'avenant ")],-1)),Ge={class:"form-group"},Ke=U(()=>e("label",{for:"name",class:""},"Modifications : ",-1)),Xe=U(()=>e("br",null,null,-1)),Qe={class:"btn-group"},Ze=U(()=>e("button",{type:"button",class:"btn btn-default dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[a(" Ajouter une modification "),e("span",{class:"caret"})],-1)),$e={class:"dropdown-menu"},et={class:"modifications unsaved"},tt={class:"change"},st={key:0},nt=U(()=>e("span",{class:"text"}," Date de fin : ",-1)),lt={key:1},ot=U(()=>e("span",{class:"text"},"Nouveau montant : ",-1)),it={key:2},at=U(()=>e("span",{class:"text"},"Suppression d'un membre",-1)),rt=["onUpdate:modelValue","onChange"],dt=["value"],ct=["onUpdate:modelValue"],ut=["value"],ht={key:3},mt=U(()=>e("span",{class:"text"}," Ajout d'une personne : ",-1)),pt={key:0,class:"cartouche"},_t=["onClick"],ft=["onUpdate:modelValue"],vt=["value"],gt={key:4},yt=U(()=>e("span",{class:"text"}," Suppression d'une organisation : ",-1)),kt=["onUpdate:modelValue","onChange"],bt=["value"],Dt=["onUpdate:modelValue"],wt=["value"],Ct={key:5},Pt=U(()=>e("span",{class:"text"}," Ajout d'une organization : ",-1)),At=["onUpdate:modelValue"],Ut=["value"],St={key:6},Mt=["onClick"],Et=U(()=>e("i",{class:"icon-trash"},null,-1)),Vt=[Et],xt=U(()=>e("hr",null,null,-1)),Nt={class:"modifications saved"},jt={class:"change"},Ot={key:0,class:"icon-calendar"},zt={key:1,class:"icon-user"},Rt={key:2,class:"icon-bank"},It={key:3,class:"icon-user text-danger"},Ft={key:4,class:"icon-building-filled"},Wt={key:5,class:"icon-building-filled text-danger"},Tt=["onClick"],qt=U(()=>e("i",{class:"icon-trash"},null,-1)),Lt=[qt],Jt={class:"form-group"},Ht=U(()=>e("label",{for:"name"},"Fichier",-1)),Bt={key:0},Yt={class:"form-group"},Gt=U(()=>e("label",{for:"name"},"Commentaire",-1)),Kt={class:"avenants"},Xt={class:"admin-bar text-right"},Qt={key:0,class:"icon-ok-circled text-success"},Zt={key:1,class:"icon-pencil"},$t={class:"modification small"},es={class:"change"},ts={key:0,class:"icon-calendar"},ss={key:1,class:"icon-user"},ns={key:2,class:"icon-user text-danger"},ls={key:3,class:"icon-bank"},os={key:4,class:"icon-building-filled"},is={key:5,class:"icon-building-filled text-danger"},as={key:0},rs=["href"],ds=U(()=>e("i",{class:"icon-file-pdf"},null,-1)),cs=U(()=>e("i",{class:"icon-trash"},null,-1)),us=U(()=>e("strong",null,"définitivement",-1)),hs=["onClick"],ms=U(()=>e("i",{class:"icon-pencil"},null,-1)),ps=U(()=>e("i",{class:"icon-trash"},null,-1)),_s=U(()=>e("strong",null,"L'activité sera verrouillée",-1));function fs(t,s,r,k,n,i){const y=D("datepicker"),f=D("Datepicker"),h=D("Amount"),V=D("person-auto-completer"),G=D("organization-auto-complete"),K=D("modal"),H=D("ButtonConfirm");return l(),o(b,null,[g(K,{title:"Détails de l'avenant",visible:n.edit,onModalValid:i.handlerSave,onModalCancel:i.handlerCancel},{default:A(()=>[e("form",Le,[Je,e("div",He,[Be,Ye,g(y,{modelValue:n.edit.dateAvenant,"onUpdate:modelValue":s[0]||(s[0]=u=>n.edit.dateAvenant=u),id:"dateAvenant"},null,8,["modelValue"])]),e("div",Ge,[Ke,Xe,e("div",Qe,[Ze,e("ul",$e,[e("li",null,[e("a",{href:"#",onClick:s[1]||(s[1]=v(u=>i.handlerAddChange("personAdd"),["prevent"])),class:P(i.modificationsEnabled.personAdd?"":"disabled")},"Ajout d'une personne",2)]),e("li",null,[e("a",{href:"#",onClick:s[2]||(s[2]=v(u=>i.handlerAddChange("personDel"),["prevent"])),class:P(i.modificationsEnabled.personDel?"":"disabled")},"Suppression d'une personne",2)]),e("li",null,[e("a",{href:"#",onClick:s[3]||(s[3]=v(u=>i.handlerAddChange("organizationAdd"),["prevent"])),class:P(i.modificationsEnabled.organizationAdd?"":"disabled")},"Ajout d'une organisation",2)]),e("li",null,[e("a",{href:"#",onClick:s[4]||(s[4]=v(u=>i.handlerAddChange("organizationDel"),["prevent"])),class:P(i.modificationsEnabled.organizationDel?"":"disabled")},"Suppression d'une organisation",2)]),e("li",null,[e("a",{href:"#",onClick:s[5]||(s[5]=v(u=>i.handlerAddChange("changeAmount"),["prevent"])),class:P(i.modificationsEnabled.changeAmount?"":"disabled")},"Modification du montant",2)]),e("li",null,[e("a",{href:"#",onClick:s[6]||(s[6]=v(u=>i.handlerAddChange("dateEnd"),["prevent"])),class:P(i.modificationsEnabled.dateEnd?"":"disabled")},"Modification de la date de fin",2)])])]),e("section",et,[(l(!0),o(b,null,w(n.edit.modifications.filter(u=>u.mode==="new"),u=>(l(),o("article",tt,[u.type==="dateEnd"?(l(),o("div",st,[nt,e("span",null,[g(f,{modelValue:u.value1,"onUpdate:modelValue":_=>u.value1=_},null,8,["modelValue","onUpdate:modelValue"])])])):u.type==="changeAmount"?(l(),o("div",lt,[ot,g(h,{modelValue:u.value1,"onUpdate:modelValue":_=>u.value1=_},null,8,["modelValue","onUpdate:modelValue"])])):u.type==="personDel"?(l(),o("div",it,[at,C(e("select",{name:"",id:"",onClick:s[7]||(s[7]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.valueObj=_,onChange:_=>i.handlerSelectToDel(u,_)},[(l(!0),o(b,null,w(i.persons,(_,O)=>(l(),o("option",{value:_},c(_.firstName)+" "+c(_.lastName),9,dt))),256))],40,rt),[[j,u.valueObj]]),u.valueObj?C((l(),o("select",{key:0,name:"",id:"",onClick:s[8]||(s[8]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.value2=_},[(l(!0),o(b,null,w(u.valueObj.roles,(_,O)=>(l(),o("option",{value:O},c(_),9,ut))),256))],8,ct)),[[j,u.value2]]):d("",!0)])):u.type==="personAdd"?(l(),o("div",ht,[mt,u.valueObj?(l(),o("span",pt,[a(c(u.valueObj.firstName)+" "+c(u.valueObj.lastName)+" ",1),e("i",{class:"icon-cancel-alt",onClick:_=>u.valueObj=null},null,8,_t)])):(l(),I(V,{key:1,onPersonSelected:_=>i.handlerUpdatePersonChange(u,_)},null,8,["onPersonSelected"])),C(e("select",{name:"rolesPerson","onUpdate:modelValue":_=>u.value2=_,class:"form-control",onClick:s[9]||(s[9]=v(()=>{},["stop"]))},[(l(!0),o(b,null,w(t.rolesPerson,_=>(l(),o("option",{value:_.id},c(_.label),9,vt))),256))],8,ft),[[j,u.value2]])])):u.type==="organizationDel"?(l(),o("div",gt,[yt,C(e("select",{name:"",id:"",onClick:s[10]||(s[10]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.valueObj=_,class:"form-control",onChange:_=>i.handlerSelectToDel(u,_)},[(l(!0),o(b,null,w(i.organizations,(_,O)=>(l(),o("option",{value:_},c(_.label),9,bt))),256))],40,kt),[[j,u.valueObj]]),u.valueObj?C((l(),o("select",{key:0,name:"",id:"",onClick:s[11]||(s[11]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.value2=_,class:"form-control"},[(l(!0),o(b,null,w(u.valueObj.roles,(_,O)=>(l(),o("option",{value:O},c(_),9,wt))),256))],8,Dt)),[[j,u.value2]]):d("",!0)])):u.type==="organizationAdd"?(l(),o("div",Ct,[Pt,g(G,{onChange:_=>i.handlerUpdateOrganizationChange(u,_)},null,8,["onChange"]),C(e("select",{name:"rolesOrganization","onUpdate:modelValue":_=>u.value2=_,class:"form-control",onClick:s[12]||(s[12]=v(()=>{},["stop"]))},[(l(!0),o(b,null,w(t.rolesOrganization,_=>(l(),o("option",{value:_.id},c(_.label),9,Ut))),256))],8,At),[[j,u.value2]])])):(l(),o("div",St,c(u),1)),e("nav",null,[e("button",{class:"btn btn-xs btn-danger",onClick:v(_=>i.handlerRemoveChange(u),["prevent"])},Vt,8,Mt)])]))),256))]),xt,e("section",Nt,[(l(!0),o(b,null,w(n.edit.modifications.filter(u=>u.mode!=="new"),u=>(l(),o("article",jt,[e("div",null,[u.type==="dateEnd"?(l(),o("i",Ot)):d("",!0),u.type==="personAdd"?(l(),o("i",zt)):d("",!0),u.type==="changeAmount"?(l(),o("i",Rt)):d("",!0),u.type==="personDel"?(l(),o("i",It)):d("",!0),u.type==="organizationAdd"?(l(),o("i",Ft)):d("",!0),u.type==="organizationDel"?(l(),o("i",Wt)):d("",!0),e("strong",null,c(u.info),1),e("small",null,[e("code",null," ("+c(u.type)+")",1)])]),e("nav",null,[e("button",{class:"btn btn-xs btn-danger",onClick:v(_=>i.handlerRemoveChange(u),["prevent"])},Lt,8,Tt)])]))),256))])]),e("div",Jt,[Ht,n.edit.previousFile?(l(),o("section",Bt," Fichier précédent ")):d("",!0),e("input",{class:"form-control",type:"file",onChange:s[13]||(s[13]=(...u)=>i.handlerSelectFile&&i.handlerSelectFile(...u))},null,32)]),e("div",Yt,[Gt,C(e("textarea",{"onUpdate:modelValue":s[14]||(s[14]=u=>n.edit.comment=u),class:"form-control"},null,512),[[x,n.edit.comment]])])])]),_:1},8,["visible","onModalValid","onModalCancel"]),e("section",Kt,[e("nav",Xt,[r.manage?(l(),o("button",{key:0,class:"btn btn-xs btn-default",onClick:s[15]||(s[15]=(...u)=>i.handlerNew&&i.handlerNew(...u))}," Nouvel avenant ")):d("",!0)]),(l(!0),o(b,null,w(r.avenants.avenants,u=>(l(),o("article",{class:P(["avenant card","status-"+u.status])},[e("h4",null,[u.status==200?(l(),o("i",Qt)):d("",!0),u.status==100?(l(),o("i",Zt)):d("",!0),e("strong",null,c(t.$filters.dateFull(u.date)),1),e("small",null," - "+c(u.status_text),1)]),e("section",$t,[(l(!0),o(b,null,w(u.modifications,_=>(l(),o("article",es,[_.type==="dateEnd"?(l(),o("i",ts)):d("",!0),_.type==="personAdd"?(l(),o("i",ss)):d("",!0),_.type==="personDel"?(l(),o("i",ns)):d("",!0),_.type==="changeAmount"?(l(),o("i",ls)):d("",!0),_.type==="organizationAdd"?(l(),o("i",os)):d("",!0),_.type==="organizationDel"?(l(),o("i",is)):d("",!0),e("span",null,c(_.info),1)]))),256))]),u.comment?(l(),o("p",as,c(u.comment),1)):d("",!0),e("nav",null,[e("a",{href:u.url_download,class:"btn btn-xs btn-primary"},[ds,a(" Télécharger")],8,rs),r.manage?(l(),I(H,{key:0,onConfirm:_=>i.handlerDelete(u),class:P("btn btn-xs btn-danger"),checkbox:!0},{message:A(()=>[a(" Supprimer "),us,a(" cet avenant ? ")]),default:A(()=>[cs,a(" Supprimer ")]),_:2},1032,["onConfirm"])):d("",!0),r.manage&&u.editable?(l(),o("a",{key:1,href:"#",class:"btn btn-xs btn-default",onClick:v(_=>i.handlerEdit(u),["prevent"])},[ms,a(" Editer ")],8,hs)):d("",!0),u.status===100&&r.manage?(l(),I(H,{key:2,onConfirm:_=>i.handlerApplyAvenant(u),class:P("btn btn-xs btn-success")},{message:A(()=>[a(" Confirmer l'application de l'avenant pour cette activité ? "),_s]),default:A(()=>[ps,a(" Appliquer ")]),_:2},1032,["onConfirm"])):d("",!0)])],2))),256))])],64)}const vs=E(qe,[["render",fs],["__scopeId","data-v-833d8759"]]);const gs={props:{milestone:{required:!0},manage:{default:!1},progression:{default:!1}},computed:{finishedPerson(){let s=/\[Person:([0-9]*):(.*)\]/gm.exec(this.milestone.finishedBy);return s!==null?s[2]:""},statutText(){if(!this.milestone.type.finishable)return"";switch(this.milestone.finished){case 0:case null:return this.milestone.past?"EN RETARD":"A FAIRE";case 50:return"EN COURS";case 100:return"Validé";case 200:return"Sans suite";case 400:return"Refusé";default:return""}},owner(){return this.finishedPerson?finishedPerson[2]:"Unreadable data"},ownerId(){return this.finishedPerson?finishedPerson[1]:"Unreadble data"},finishable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished<100},cancelFinish(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0},progressable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&(this.milestone.finished==null||this.milestone.finished==0||this.milestone.finished==100)},inProgress(){return this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0&&this.milestone.finished<100},finished(){return this.milestone.type.finishable==!0&&this.milestone.finished>=100},late(){return this.finishable==!0&&this.milestone.past&&!this.finished},past(){return this.milestone.past},cssClass(){let t={finishable:this.finishable,finished:this.finished||this.milestone.done,late:this.late||this.milestone.late,payment:this.milestone.isPayment,inprogress:this.inProgress,canceled:this.milestone.finished==200,refused:this.milestone.finished==400,valided:this.milestone.finished==100,past:this.past};return t[this.milestone.type.facet]=!0,t}}},F=t=>(T("data-v-42de1793"),t=t(),q(),t),ys={class:"main"},ks={key:0},bs=["datetime"],Ds={class:"ago"},ws={key:0},Cs={key:0},Ps={key:1,class:"details"},As={key:2},Us=F(()=>e("i",{class:"icon-rewind-outline"},null,-1)),Ss=[Us],Ms=F(()=>e("i",{class:"icon-cw-outline"},null,-1)),Es=[Ms],Vs=F(()=>e("i",{class:"icon-ok-circled"},null,-1)),xs=[Vs],Ns=F(()=>e("i",{class:"icon-archive"},null,-1)),js=[Ns],Os=F(()=>e("i",{class:"icon-block"},null,-1)),zs=[Os],Rs=F(()=>e("i",{class:"icon-trash"},null,-1)),Is=[Rs],Fs=F(()=>e("i",{class:"icon-edit"},null,-1)),Ws=[Fs];function Ts(t,s,r,k,n,i){return l(),o("article",{class:P(["jalon",i.cssClass])},[e("span",ys,[i.statutText?(l(),o("strong",ks," "+c(i.statutText),1)):d("",!0),e("time",{datetime:r.milestone.dateStart,class:"time-value"},[a(c(t.$filters.date(r.milestone.dateStart))+" ",1),e("span",Ds,"  ("+c(t.$filters.timeAgo(r.milestone.dateStart))+") ",1)],8,bs)]),e("strong",{class:P(["card-title",{"text-private":r.milestone.isPayment}])},[a(c(r.milestone.type.label)+" ",1),i.inProgress?(l(),o("small",ws,[a(" (En cours par "),e("strong",null,c(i.finishedPerson),1),a(")")])):d("",!0)],2),i.finished?(l(),o("p",Cs,[e("strong",null,c(i.finishedPerson),1),a(" a complété ce jalon")])):d("",!0),r.milestone.comment?(l(),o("p",Ps,c(r.milestone.comment),1)):d("",!0),r.milestone.isPayment?d("",!0):(l(),o("nav",As,[i.cancelFinish?(l(),o("a",{key:0,href:"#",title:"Réinitialiser la progression",onClick:s[0]||(s[0]=v(y=>t.$emit("unvalid",r.milestone),["prevent"]))},Ss)):d("",!0),i.progressable?(l(),o("a",{key:1,href:"#",title:"Marquer comme en cours",onClick:s[1]||(s[1]=v(y=>t.$emit("inprogress",r.milestone),["prevent"]))},Es)):d("",!0),i.finishable?(l(),o("a",{key:2,href:"#",title:"Marquer comme terminé",onClick:s[2]||(s[2]=v(y=>t.$emit("valid",r.milestone),["prevent"]))},xs)):d("",!0),i.finishable?(l(),o("a",{key:3,href:"#",title:"Marquer comme sans suite",onClick:s[3]||(s[3]=v(y=>t.$emit("cancel",r.milestone),["prevent"]))},js)):d("",!0),i.finishable?(l(),o("a",{key:4,href:"#",title:"Marquer comme refusé",onClick:s[4]||(s[4]=v(y=>t.$emit("refused",r.milestone),["prevent"]))},zs)):d("",!0),r.manage?(l(),o("a",{key:5,href:"#",title:"Supprimer ce jalon",onClick:s[5]||(s[5]=v(y=>t.$emit("remove",r.milestone),["prevent"]))},Is)):d("",!0),r.manage?(l(),o("a",{key:6,href:"#",title:"Modifier ce jalon",onClick:s[6]||(s[6]=v(y=>t.$emit("edit",r.milestone),["prevent"]))},Ws)):d("",!0)]))],2)}const qs=E(gs,[["render",Ts],["__scopeId","data-v-42de1793"]]);const Ls={props:{url:{required:!0},manage:{required:!0},progression:{default:!1},items:{default:[],type:Array},types:{default:[],type:Array},payments:{required:!1,default:[],type:Array}},components:{milestone:qs,datepicker:Y},data(){return{error:null,formData:null,pendingMsg:"",creatable:!1,deleteMilestone:null,editMilestone:null,validMilestone:null,cancelMilestone:null,refusedMilestone:null,unvalidMilestone:null,inProgressMilestone:null,action:null,actionMessage:"",actionMilestone:null,model:{}}},computed:{types(){return this.types},milestones(){let t=[];return this.payments.forEach(s=>{let r=new Date,k=!1,n=!1,i;switch(s.status){case 1:r=s.datePredicted,r?(i="PRÉVU",k=N(s.datePredicted.date).unix(){t.push(s)}),t.sort((s,r)=>{let k=N(s.dateStart).unix(),n=N(r.dateStart).unix();return k-n}),t},payments(){return this.payments},formTypeFinishable(){return this.formData?this.types.find(t=>t.id==this.formData.type.id&&t.finishable):!1},groupedTypes(){let t={};return this.types.forEach(s=>{let r=s.facet;t.hasOwnProperty(r)||(t[r]={label:r,types:[]}),t[s.facet].types.push(s)}),t}},methods:{handlerValid(t){this.validMilestone=t},handlerInProgress(t){this.inProgressMilestone=t},handlerUnvalid(t){this.unvalidMilestone=t},handlerActionConfirm(t,s,r){this.actionMilestone=t,this.action=s,this.actionMessage=r},handlerActionCancel(){this.actionMilestone=null,this.action=null,this.actionMessage=""},handlerCancel(t){this.unvalidMilestone=t},handlerRemove(t){this.deleteMilestone=t},handlerEdit(t){this.editMilestone=t,this.formData={type:t.type,id:t.id,comment:t.comment,dateStart:N(t.dateStart).format("YYYY-MM-DD")}},handlerNew(){this.formData={id:0,type:JSON.parse(JSON.stringify(this.types[0])),dateStart:N().format("Y-M-D HH:mm:ss"),comment:""}},preformDelete(){this.pendingMsg="Suppression du jalon",S.delete(this.url+"?id="+this.deleteMilestone.id).then(t=>{this.fetch()},t=>{R.commit("addErrorAxios",t)}).then(t=>{this.pendingMsg=null,this.deleteMilestone=null})},performValid(t){var s={},r;switch(t){case"valid":this.pendingMsg="Validation du jalon",r=this.validMilestone;break;case"unvalid":this.pendingMsg="Réinitialisation du jalon",r=this.unvalidMilestone;break;case"inprogress":this.pendingMsg="Marquage du jalon comme en cours",r=this.inProgressMilestone;break;case"cancel":case"refused":r=this.actionMilestone;break;default:this.error="Action incorrecte";return}s.id=r.id,s.action=t,this.action=null,this.actionMessage="",this.actionMilestone=null,S.put(this.url,s).then(k=>{this.fetch()},k=>{R.commit("addErrorAxios",k)}).then(k=>{this.pendingMsg=null,this.validMilestone=null,this.unvalidMilestone=null,this.inProgressMilestone=null})},performSave(){this.pendingMsg=this.formData.id?"Enregistrement des modifications":"Création du nouveau jalon",this.formData.id?S.put(this.url,this.formData).then(t=>{this.fetch()},t=>{R.commit("addErrorAxios",t)}).then(t=>{this.pendingMsg=null,this.formData=null}):S.post(this.url,this.formData).then(t=>{this.fetch()},t=>{R.commit("addErrorAxios",t)}).then(t=>{this.pendingMsg=null,this.formData=null})},fetch(){this.pendingMsg="Chargement des jalons : "+this.url,S.get(this.url).then(t=>{this.$emit("update",t.data.datas.milestones.entities)},t=>{console.log(t),this.error="Impossible de charger les jalons de cette activités : "+t}).then(t=>{this.pendingMsg=""})}},mounted(){}},Js={class:"milestones"},Hs={key:0,class:"error overlay"},Bs={class:"overlay-content"},Ys=e("i",{class:"icon-warning-empty"},null,-1),Gs=e("br",null,null,-1),Ks=e("i",{class:"icon-cancel-circled"},null,-1),Xs={key:0,class:"overlay"},Qs={class:"overlay-content"},Zs=e("i",{class:"icon-calendar"},null,-1),$s={key:0},en={key:1},tn={class:"form-group"},sn=e("label",{for:""},"Type de jalon",-1),nn=["label"],ln=["value"],on={class:"help"},an=e("i",{class:"icon-info-circled"},null,-1),rn={class:"form-group"},dn=e("label",{for:""},"Date prévue pour le jalon",-1),cn={class:"form-group"},un=e("label",{for:""},"Description",-1),hn=e("i",{class:"icon-floppy"},null,-1),mn=e("i",{class:"icon-cancel-outline"},null,-1),pn={key:0,class:"deleteconfirm overlay"},_n={class:"overlay-content"},fn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(" Supprimer ce jalon ?")],-1),vn=e("strong",null,"définitive",-1),gn=e("em",null,"Marquer comme terminé",-1),yn=e("i",{class:"icon-trash"},null,-1),kn=e("i",{class:"icon-cancel-outline"},null,-1),bn={key:0,class:"validconfirm overlay"},Dn={class:"overlay-content"},wn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(" Valider ce jalon ? ")],-1),Cn=e("p",null,"Les jalons marqués comme terminés ne feront pas l'objet de notifications ou d'alertes.",-1),Pn=e("i",{class:"icon-ok-circled"},null,-1),An=e("i",{class:"icon-cancel-outline"},null,-1),Un={key:0,class:"inprogressconfirm overlay"},Sn={class:"overlay-content"},Mn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(' Marquer ce jalon "en cours" ? ')],-1),En=e("p",null,null,-1),Vn=e("i",{class:"icon-cw-outline"},null,-1),xn=e("i",{class:"icon-cancel-outline"},null,-1),Nn={key:0,class:"inprogressconfirm overlay"},jn={class:"overlay-content"},On=e("i",{class:"icon-help-circled"},null,-1),zn=e("p",null,"Les jalons marqués comme terminés (Validé, refusé ou sans suite) ne feront pas l'objet de notifications ou d'alertes",-1),Rn=e("i",{class:"icon-cw-outline"},null,-1),In=e("i",{class:"icon-cancel-outline"},null,-1),Fn={key:0,class:"validconfirm overlay"},Wn={class:"overlay-content"},Tn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(" Invalider ce jalon ? ")],-1),qn=e("p",null,"L'état d'avancement du jalon sera réinitialisé.",-1),Ln=e("i",{class:"icon-ok-circled"},null,-1),Jn=e("i",{class:"icon-cancel-outline"},null,-1),Hn={key:0,class:"alert alert-info"},Bn=e("i",{class:"icon-spinner animate-spin"},null,-1),Yn={key:0,class:"admin-bar"},Gn=e("i",{class:"icon-calendar-plus-o"},null,-1),Kn=e("i",{class:"icon-bug"},null,-1),Xn={key:1,class:"list"},Qn={key:2,class:"alert"};function Zn(t,s,r,k,n,i){const y=D("datepicker"),f=D("milestone");return l(),o("section",Js,[g(M,{name:"fade"},{default:A(()=>[n.error?(l(),o("div",Hs,[e("div",Bs,[Ys,a(" "+c(n.error)+" ",1),Gs,e("a",{href:"#",onClick:s[0]||(s[0]=h=>n.error=null),class:"btn btn-sm btn-default btn-xs"},[Ks,a(" Fermer")])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.formData?(l(),o("div",Xs,[e("div",Qs,[e("h2",null,[Zs,n.formData.id?(l(),o("span",$s,[a("Modification du jalon "),e("strong",null,c(n.formData.type.label),1)])):(l(),o("span",en,"Nouveau jalon"))]),e("div",tn,[sn,C(e("select",{name:"",id:"","onUpdate:modelValue":s[1]||(s[1]=h=>n.formData.type.id=h),class:"form-control"},[(l(!0),o(b,null,w(i.groupedTypes,h=>(l(),o("optgroup",{label:h.label},[(l(!0),o(b,null,w(h.types,V=>(l(),o("option",{value:V.id},c(V.label),9,ln))),256))],8,nn))),256))],512),[[j,n.formData.type.id]]),C(e("p",on,[an,a(" Ce type de jalon inclut des méchanismes de validation pour marquer le jalon comme terminé ")],512),[[re,i.formTypeFinishable]])]),e("div",rn,[dn,g(y,{modelValue:n.formData.dateStart,"onUpdate:modelValue":s[2]||(s[2]=h=>n.formData.dateStart=h),onInput:s[3]||(s[3]=h=>{n.formData.dateStart=h})},null,8,["modelValue"])]),e("div",cn,[un,C(e("textarea",{"onUpdate:modelValue":s[4]||(s[4]=h=>n.formData.comment=h),class:"form-control"},null,512),[[x,n.formData.comment]])]),e("nav",null,[e("button",{class:"btn btn-default",onClick:s[5]||(s[5]=(...h)=>i.performSave&&i.performSave(...h))},[hn,a(" Enregistrer ")]),e("button",{class:"btn btn-default",onClick:s[6]||(s[6]=h=>n.formData=null)},[mn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.deleteMilestone?(l(),o("div",pn,[e("div",_n,[fn,e("p",null,[a("Cette suppression sera "),vn,a(", si vous souhaitez signifier que ce jalon est réalisé, utilisez plutôt l'option "),gn,a(". Si cette option n'est pas disponible, demandez à l'administrateur Oscar si vous avez les privilèges pour réaliser cette action ou si le type de jalon "),e("strong",null,c(n.deleteMilestone.type.label),1),a(" est correctement configuré.")]),e("nav",null,[e("button",{class:"btn btn-default",onClick:s[7]||(s[7]=(...h)=>i.preformDelete&&i.preformDelete(...h))},[yn,a(" Supprimer ")]),e("button",{class:"btn btn-default",onClick:s[8]||(s[8]=h=>n.deleteMilestone=null)},[kn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.validMilestone?(l(),o("div",bn,[e("div",Dn,[wn,Cn,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[9]||(s[9]=h=>i.performValid("valid"))},[Pn,a(" Marquer ce jalon comme terminé ")]),e("button",{class:"btn btn-default",onClick:s[10]||(s[10]=h=>n.validMilestone=null)},[An,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.inProgressMilestone?(l(),o("div",Un,[e("div",Sn,[Mn,En,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[11]||(s[11]=h=>i.performValid("inprogress"))},[Vn,a(" Marquer ce jalon comme en cours ")]),e("button",{class:"btn btn-default",onClick:s[12]||(s[12]=h=>n.inProgressMilestone=null)},[xn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.actionMessage?(l(),o("div",Nn,[e("div",jn,[e("h2",null,[On,a(" "+c(n.actionMessage)+" ? ",1)]),zn,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[13]||(s[13]=h=>i.performValid(n.action))},[Rn,a(" "+c(n.actionMessage),1)]),e("button",{class:"btn btn-default",onClick:s[14]||(s[14]=(...h)=>i.handlerActionCancel&&i.handlerActionCancel(...h))},[In,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.unvalidMilestone?(l(),o("div",Fn,[e("div",Wn,[Tn,qn,e("nav",null,[e("button",{class:"btn btn-success",onClick:s[15]||(s[15]=h=>i.performValid("unvalid"))},[Ln,a(" Réinitialiser la progression de ce jalon ")]),e("button",{class:"btn btn-danger",onClick:s[16]||(s[16]=h=>n.unvalidMilestone=null)},[Jn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.pendingMsg?(l(),o("div",Hn,[Bn,a(" "+c(n.pendingMsg),1)])):d("",!0)]),_:1}),r.manage?(l(),o("nav",Yn,[e("a",{href:"#",onClick:s[17]||(s[17]=v((...h)=>i.handlerNew&&i.handlerNew(...h),["prevent"])),class:"btn btn-xs btn-default"},[Gn,a(" Nouveau Jalon ")]),e("a",{href:"#",onClick:s[18]||(s[18]=v((...h)=>i.fetch&&i.fetch(...h),["prevent"])),class:"btn btn-xs btn-warning"},[Kn,a(" fetch ")])])):d("",!0),i.milestones!=null?(l(),o("section",Xn,[(l(!0),o(b,null,w(i.milestones,h=>(l(),I(f,{milestone:h,key:h.id,manage:r.manage,progression:r.progression,onValid:i.handlerValid,onUnvalid:i.handlerUnvalid,onInprogress:i.handlerInProgress,onCancel:s[19]||(s[19]=V=>i.handlerActionConfirm(V,"cancel","Marquer ce jalon comme sans suite")),onRefused:s[20]||(s[20]=V=>i.handlerActionConfirm(V,"refused","Marquer ce jalon comme refusé")),onRemove:i.handlerRemove,onEdit:i.handlerEdit},null,8,["milestone","manage","progression","onValid","onUnvalid","onInprogress","onRemove","onEdit"]))),128))])):(l(),o("div",Qn," Aucun jalon "))])}const $n=E(Ls,[["render",Zn]]),el={props:["payment","manage"],data(){return{}},computed:{late(){if(this.payment.status===1){if(!this.payment.datePredicted)return!0;let t=N().unix();return N(this.payment.datePredicted).unix()t.$emit("delete",r.payment),["prevent"])),title:"Supprimer ce versement"},pl),e("a",{href:"#",class:"btn-edit",onClick:s[1]||(s[1]=v(y=>t.$emit("edit",r.payment),["prevent"])),title:"Modifier ce versement"},fl)])):d("",!0)]),e("p",vl,c(r.payment.comment),1)],2)}const yl=E(el,[["render",gl]]),kl={props:["url","amount","currency","currencies","manage","payments"],data(){return{formData:null,deletePayment:null,error:"",pendingMsg:""}},components:{payment:yl,datepicker:Y},computed:{total(){let t=0;return this.payments&&this.payments.forEach(s=>{let r=1;s.currency&&(r=s.rate),t+=s.amount/r}),Math.round(t*100)/100},currencySymbol(){return this.currency?this.currency.symbol:"€"},formHasError(){return!this.formData.amount||this.formData.status==2&&!this.formData.datePayment||this.formData.status==1&&!this.formData.datePredicted}},methods:{getPaymentDateValue(t){return t.status==2?t.datePayment?t.datePayment.date:null:t.status==1&&t.datePredicted?t.datePredicted.date:null},handlerNewPayment(){this.formData={id:null,amount:0,currencyId:1,rate:1,datePredicted:"",status:1,datePayment:"",codeTransaction:"",comment:""}},handlerDelete(t){this.deletePayment=t},handlerEdit(t){this.formData=JSON.parse(JSON.stringify(t)),this.formData.currencyId=t.currency.id,this.formData.datePayment=t.datePayment?N(t.datePayment.date).format("YYYY-MM-DD"):"",this.formData.datePredicted=t.datePredicted?N(t.datePredicted.date).format("YYYY-MM-DD"):"",this.formData.currencyId=t.currency.id},handlerFormUpdateRate(){let t=this.currencies.find(s=>s.id==this.formData.currencyId);t&&(this.formData.rate=t.rate)},performSave(){this.loading="Enregistrement du paiement",!this.formHasError&&(this.formData.id?S.post(this.url,this.formData).then(t=>{this.formData=null,this.fetch()},t=>{this.error=z.manageErrorResponse(t)}):S.put(this.url,this.formData).then(t=>{this.formData=null,this.fetch()},t=>{this.error=z.manageErrorResponse(t)}))},performDelete(){S.delete(this.url+"?id="+this.deletePayment.id).then(t=>{this.fetch()},t=>{this.error="Impossible de supprimer le versement : "+z.manageErrorResponse(t).message}).then(()=>{this.deletePayment=null})},fetch(){this.loading="Chargement des versements",S.get(this.url).then(t=>{this.$emit("update",t.data.datas.payments)},t=>{this.error=z.manageErrorResponse(t)}).finally(t=>this.loading=null)}},mounted(){}},bl={class:"payments"},Dl={key:0,class:"error overlay"},wl={class:"overlay-content"},Cl=e("i",{class:"icon-warning-empty"},null,-1),Pl=e("br",null,null,-1),Al=e("i",{class:"icon-cancel-outline"},null,-1),Ul={key:0,class:"pending overlay"},Sl={class:"overlay-content"},Ml=e("i",{class:"icon-spinner animate-spin"},null,-1),El={key:0,class:"deleteconfirm overlay"},Vl={class:"overlay-content"},xl=e("h3",null,[e("i",{class:"icon-help-circled"}),a(" Supprimer ce versement ?")],-1),Nl=e("i",{class:"icon-trash"},null,-1),jl=e("i",{class:"icon-cancel-outline"},null,-1),Ol={key:0,class:"overlay"},zl={class:"overlay-content"},Rl={key:0},Il={key:1},Fl={class:"container"},Wl={class:"row"},Tl={class:"col-xs-6"},ql={class:"form-group"},Ll=e("label",{class:"control-label",for:"amount"},"Montant",-1),Jl={key:0,class:"oscar-form-message error"},Hl={class:"col-xs-3"},Bl={class:"form-group"},Yl=e("label",{class:"control-label"},"Devise pour le versement",-1),Gl=["value"],Kl={class:"col-xs-3"},Xl={class:"form-group"},Ql=e("label",{class:"control-label"},"Taux",-1),Zl={class:"row"},$l={class:"col-xs-6"},eo={class:"form-group"},to=e("label",{class:"control-label"},"Date prévue",-1),so={key:0,class:"oscar-form-message error"},no={class:"col-xs-6"},lo={class:"form-group"},oo=e("label",{class:"control-label"},"Statut",-1),io=e("option",{value:"1",selected:"selected"},"Prévisionnel",-1),ao=e("option",{value:"2"},"Réalisé",-1),ro=e("option",{value:"3"},"Écart",-1),co=[io,ao,ro],uo={class:"done"},ho=e("h2",null,"Informations sur le versement effectif",-1),mo={class:"row"},po={class:"col-xs-6"},_o={class:"form-group"},fo=e("label",{class:"control-label"},"Date effective",-1),vo={key:0,class:"oscar-form-message error"},go={class:"col-xs-6"},yo={class:"form-group"},ko=e("label",{class:"control-label"},"N° de pièce",-1),bo=e("p",{class:"help"},"Numéro permettant d'identifier l'opération auprès des services comptables.",-1),Do={class:"form-group"},wo=e("label",{class:"control-label"},"Commentaire",-1),Co={class:"text-center"},Po={class:"btn-group"},Ao={key:0,class:"admin-bar"},Uo=e("i",{class:"icon-bank"},null,-1),So=e("i",{class:"icon-bug"},null,-1),Mo={class:"payment total"},Eo={class:"heading"},Vo={class:"amount text-private"},xo={class:"date"},No={class:"text-private"},jo={key:1,class:"alert alert-danger alertAmount"},Oo=e("p",null,[e("i",{class:"icon-attention-1"}),a(" Le total des versements prévus et réalisés ne semble pas correspondre avec le montant prévu initialement, Somme des versements :")],-1),zo={class:"amountPrevu text-private"},Ro={title:"Valeur exacte : getAmount() ?>",class:"text-private"};function Io(t,s,r,k,n,i){const y=D("datepicker"),f=D("payment");return l(),o("section",bl,[g(M,{name:"fade"},{default:A(()=>[n.error?(l(),o("div",Dl,[e("div",wl,[Cl,a(" "+c(n.error)+" ",1),Pl,e("a",{href:"#",onClick:s[0]||(s[0]=h=>n.error=null),class:"btn btn-default"},[Al,a(" Fermer")])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.pendingMsg?(l(),o("div",Ul,[e("div",Sl,[Ml,a(" "+c(n.pendingMsg),1)])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.deletePayment?(l(),o("div",El,[e("div",Vl,[xl,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[1]||(s[1]=(...h)=>i.performDelete&&i.performDelete(...h))},[Nl,a(" Supprimer ")]),e("button",{class:"btn btn-default",onClick:s[2]||(s[2]=h=>n.deletePayment=null)},[jl,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.formData?(l(),o("div",Ol,[e("div",zl,[n.formData.id?(l(),o("h3",Rl,"Modification du versement")):(l(),o("h3",Il,"Nouveau versement")),e("div",Fl,[e("div",Wl,[e("div",Tl,[e("div",ql,[Ll,C(e("input",{name:"amount",class:"form-control input-lg form-control","onUpdate:modelValue":s[3]||(s[3]=h=>n.formData.amount=h),type:"text"},null,512),[[x,n.formData.amount]]),n.formData.amount?d("",!0):(l(),o("div",Jl," Vous devez indiquer un montant. "))])]),e("div",Hl,[e("div",Bl,[Yl,C(e("select",{name:"currency",class:"form-control form-control","onUpdate:modelValue":s[4]||(s[4]=h=>n.formData.currencyId=h),onChange:s[5]||(s[5]=(...h)=>i.handlerFormUpdateRate&&i.handlerFormUpdateRate(...h))},[(l(!0),o(b,null,w(r.currencies,h=>(l(),o("option",{value:h.id},c(h.label),9,Gl))),256))],544),[[j,n.formData.currencyId]])])]),e("div",Kl,[e("div",Xl,[Ql,C(e("input",{name:"rate",class:"form-control form-control","onUpdate:modelValue":s[6]||(s[6]=h=>n.formData.rate=h),type:"text"},null,512),[[x,n.formData.rate]])])])]),e("div",Zl,[e("div",$l,[e("div",eo,[to,g(y,{modelValue:n.formData.datePredicted,"onUpdate:modelValue":s[7]||(s[7]=h=>n.formData.datePredicted=h),onInput:s[8]||(s[8]=h=>{n.formData.datePredicted=h})},null,8,["modelValue"]),n.formData.status==1&&!n.formData.datePredicted?(l(),o("div",so," Les versements prévisionnels necessitent une date. ")):d("",!0)])]),e("div",no,[e("div",lo,[oo,C(e("select",{name:"status",class:"form-control form-control","onUpdate:modelValue":s[9]||(s[9]=h=>n.formData.status=h)},co,512),[[j,n.formData.status]])])])]),e("div",uo,[ho,e("div",mo,[e("div",po,[e("div",_o,[fo,g(y,{moment:t.moment,modelValue:n.formData.datePayment,"onUpdate:modelValue":s[10]||(s[10]=h=>n.formData.datePayment=h),onInput:s[11]||(s[11]=h=>{n.formData.datePayment=h})},null,8,["moment","modelValue"]),n.formData.status==2&&!n.formData.datePayment?(l(),o("div",vo," Les versements réalisés necessitent une date effective ")):d("",!0)])]),e("div",go,[e("div",yo,[ko,C(e("input",{name:"codeTransaction",class:"form-control form-control","onUpdate:modelValue":s[12]||(s[12]=h=>n.formData.codeTransaction=h),type:"text"},null,512),[[x,n.formData.codeTransaction]])]),bo])])]),e("div",Do,[wo,C(e("textarea",{name:"comment",class:"form-control form-control",placeholder:"Commentaire","onUpdate:modelValue":s[13]||(s[13]=h=>n.formData.comment=h)},null,512),[[x,n.formData.comment]])]),e("nav",Co,[e("nav",Po,[e("a",{class:"btn btn-default button-back",href:"#",onClick:s[14]||(s[14]=v(h=>n.formData=null,["prevent"]))},"Annuler"),e("button",{class:P(["btn btn-primary",{disabled:i.formHasError}]),onClick:s[15]||(s[15]=v((...h)=>i.performSave&&i.performSave(...h),["prevent"]))}," Enregistrer ",2)])])])])])):d("",!0)]),_:1}),r.manage?(l(),o("nav",Ao,[e("a",{href:"#",onClick:s[16]||(s[16]=v((...h)=>i.handlerNewPayment&&i.handlerNewPayment(...h),["prevent"])),class:"btn btn-default btn-xs"},[Uo,a(" Nouveau versement")]),e("button",{class:"btn btn-warning btn-xs",onClick:s[17]||(s[17]=v((...h)=>i.fetch&&i.fetch(...h),["prevent"]))},[So,a(" fetch ")])])):d("",!0),(l(!0),o(b,null,w(r.payments,h=>(l(),I(f,{payment:h,key:h.id,manage:r.manage,onDelete:i.handlerDelete,onEdit:i.handlerEdit},null,8,["payment","manage","onDelete","onEdit"]))),128)),e("article",Mo,[e("div",Eo,[e("strong",Vo,c(t.$filters.money(i.total))+" € ",1),e("span",xo,[a("/ "),e("strong",No,c(t.$filters.money(r.amount))+" €",1)])])]),i.total!=r.amount?(l(),o("div",jo,[Oo,e("ul",null,[e("li",null,[e("strong",zo,c(t.$filters.money(i.total))+" "+c(i.currencySymbol),1),a(" en versement,")]),e("li",null,[e("strong",Ro,c(t.$filters.money(r.amount))+" "+c(i.currencySymbol),1),a(" prévu ")])])])):d("",!0)])}const Fo=E(kl,[["render",Io]]);const Wo={name:"PersonCartouche",props:{person:{required:!0,type:Object}}},J=t=>(T("data-v-dfc2c1c6"),t=t(),q(),t),To={class:"person-text"},qo={class:"info-bulle"},Lo=["src"],Jo={class:"infos"},Ho={class:"firstname"},Bo={class:"lastname"},Yo={class:"content"},Go={style:{"white-space":"nowrap"}},Ko=J(()=>e("i",{class:"icon-mail"},null,-1)),Xo={key:0},Qo={key:1},Zo=J(()=>e("i",{class:"icon-phone-outline"},null,-1)),$o={key:0},ei={key:1},ti=J(()=>e("i",{class:"icon-building-filled"},null,-1)),si={key:0},ni={key:1},li={key:0},oi=J(()=>e("i",{class:"icon-direction"},null,-1)),ii=["href"],ai=J(()=>e("i",{class:"icon-zoom-in-outline"},null,-1)),ri={key:1};function di(t,s,r,k,n,i){return l(),o("span",To,[a(c(r.person.label)+" ",1),e("div",qo,[e("header",null,[e("figure",null,[e("img",{src:"https://www.gravatar.com/avatar/"+r.person.mailMd5+"?s=60",alt:""},null,8,Lo)]),e("div",Jo,[e("div",Ho,c(r.person.firstName),1),e("div",Bo,c(r.person.lastName),1)])]),e("div",Yo,[e("div",Go,[Ko,r.person.email?(l(),o("span",Xo,c(r.person.email),1)):(l(),o("em",Qo,"Inconnu"))]),e("div",null,[Zo,r.person.phone?(l(),o("span",$o,c(r.person.phone),1)):(l(),o("em",ei,"Inconnu"))]),e("div",null,[ti,r.person.affectation?(l(),o("span",si,c(r.person.affectation),1)):(l(),o("em",ni,"Inconnu"))]),r.person.ucbnSiteLocalisation?(l(),o("div",li,[oi,e("span",null,c(r.person.ucbnSiteLocalisation),1)])):d("",!0)]),e("footer",null,[r.person.url?(l(),o("a",{key:0,href:r.person.url,class:"btn btn-primary btn-xs"},[ai,a(" Fiche")],8,ii)):(l(),o("code",ri,c(r.person.id),1))])])])}const ci=E(Wo,[["render",di],["__scopeId","data-v-dfc2c1c6"]]),ui={components:{PersonDisplay:ne},props:{person:{default:function(){return{}}},editable:!1,allowTooltip:{default:!1}},computed:{duration(){return this.person.duration}},data(){return{canSave:!1,mode:"read",durationForm:666}},methods:{handlerKeyUp(){console.log(arguments)},handlerUpdate(){this.$emit("workpackagepersonupdate",this.person,this.durationForm),this.mode="read"},handlerEdit(){this.mode="edit",this.durationForm=this.person.duration},handlerCancel(){this.mode="read",this.durationForm=this.person.duration},handlerRemove(){this.$emit("workpackagepersondelete",this.person)}}},hi={class:"workpackage-person"},mi={class:"displayname"},pi=e("i",{class:"icon-trash"},null,-1),_i=[pi],fi={class:"tempsdeclare temps"},vi={key:0},gi=e("i",{class:"icon-floppy"},null,-1),yi=[gi],ki=e("i",{class:"icon-cancel-outline"},null,-1),bi=[ki],Di={key:1},wi={class:"wp-hours"},Ci={title:"Heure(s) saisie(s)",class:"wp-hour unsend"},Pi={title:"Heure(s) validée(s)",class:"wp-hour validate"},Ai={key:0,title:"Heure(s) en cours de validation",class:"wp-hour validating"},Ui={key:1,title:"Heure(s) en conflit",class:"wp-hour conflicts"},Si={title:"Heure(s) à valider",class:"wp-hour duration"},Mi=e("i",{class:"icon-pencil"},null,-1),Ei=[Mi];function Vi(t,s,r,k,n,i){const y=D("PersonDisplay");return l(),o("article",hi,[e("div",mi,[g(y,{person:r.person.person,"allow-tooltip":r.allowTooltip},null,8,["person","allow-tooltip"]),r.editable&&n.mode=="read"?(l(),o("a",{key:0,href:"#",onClick:s[0]||(s[0]=v(f=>i.handlerRemove(r.person),["prevent"])),class:"link",title:"Supprimer ce déclarant"},_i)):d("",!0)]),e("div",fi,[r.editable&&n.mode=="edit"?(l(),o("div",vi,[a(" Heures prévues : "),C(e("input",{type:"integer","onUpdate:modelValue":s[1]||(s[1]=f=>n.durationForm=f),style:{width:"5em"},onKeyup:s[2]||(s[2]=de((...f)=>i.handlerUpdate&&i.handlerUpdate(...f),["13"]))},null,544),[[x,n.durationForm]]),e("a",{href:"#",onClick:s[3]||(s[3]=v((...f)=>i.handlerUpdate&&i.handlerUpdate(...f),["prevent"])),title:"Appliquer la modification des heures prévues"},yi),e("a",{href:"#",onClick:s[4]||(s[4]=v((...f)=>i.handlerCancel&&i.handlerCancel(...f),["prevent"])),title:"Annuler la modification des heures prévues"},bi)])):(l(),o("span",Di,[e("strong",wi,[e("span",Ci,c(r.person.unsend|t.heures),1),e("span",Pi,c(r.person.validate|t.heures),1),r.person.validating>0?(l(),o("span",Ai,c(r.person.validating|t.heures),1)):d("",!0),r.person.conflicts>0?(l(),o("span",Ui,c(r.person.conflicts|t.heures),1)):d("",!0),e("span",Si,[a(" / "+c(r.person.duration|t.heures)+" ",1),r.editable&&n.mode=="read"?(l(),o("a",{key:0,href:"#",onClick:s[5]||(s[5]=v((...f)=>i.handlerEdit&&i.handlerEdit(...f),["prevent"])),title:"Modifier les heures prévues"},Ei)):d("",!0)])])]))])])}const xi=E(ui,[["render",Vi]]),Ni={components:{workpackageperson:xi},data(){return{mode:"read",canSave:!1,formData:{id:-1,code:"",label:"",description:""}}},created(){this.workpackage.id<0&&(this.mode="edit")},props:{workpackage:null,persons:{default:function(){return[]}},editable:!1,isValidateur:!1,allowTooltip:{default:!1}},watch:{},methods:{isDeclarant(t,s){return s.persons.find(r=>r.person.id===t.id)},handlerEditWorkPackage(){this.formData=JSON.parse(JSON.stringify(this.workpackage)),this.mode="edit"},handlerCancelEdit(){this.workpackage.id<0?this.$emit("workpackagecancelnew",this.workpackage):this.mode="read"},handlerDeleteWorkPackage(){this.$emit("workpackagedelete",this.workpackage)},handlerUpdateWorkPackage(t){if(this.formData.code)this.$emit("workpackageupdate",this.formData),this.mode="read";else return t.stopPropagation(),t.stopImmediatePropagation(),!1},handlerUpdate(t,s){this.$emit("workpackagepersonupdate",t,s)},handlerDelete(t){this.$emit("workpackagepersondelete",t)},roles(t){return t.roles.join(",")},tempsPrevu(t){return 0},tempsDeclare(t){return 0}}},ji={class:"workpackage"},Oi={key:0},zi={key:1},Ri={class:"form-group"},Ii=e("label",{for:""},"Code",-1),Fi=e("p",{class:"text-danger"},[a("Le code est "),e("strong",null,"utilisé pour l'affichage des créneaux"),a(" simplifiés, utilisez un code de préférence entre 3 et 5 caractères.")],-1),Wi={class:"form-group"},Ti=e("label",{for:""},"Intitulé",-1),qi={class:"form-group"},Li=e("label",{for:""},"Description",-1),Ji={class:"buttons"},Hi={key:1},Bi={class:"workpackage-persons"},Yi=e("h4",null,[e("i",{class:"icon-calendar"}),a("Déclarants ")],-1),Gi={key:0,class:"buttons"},Ki={class:"btn-group"},Xi=e("button",{type:"button",class:"btn btn-default btn-xs dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[a(" Ajouter un déclarant "),e("span",{class:"caret"})],-1),Qi={class:"dropdown-menu"},Zi=["onClick"],$i=e("i",{class:"icon-pencil"},null,-1),ea=e("i",{class:"icon-trash"},null,-1),ta={key:1,class:"text-danger"},sa=e("strong",null,"Seul les membres d'une activité peuvent être identifiés comme déclarant",-1);function na(t,s,r,k,n,i){const y=D("workpackageperson");return l(),o("article",ji,[n.mode=="edit"?(l(),o("form",{key:0,action:"",onSubmit:s[4]||(s[4]=v((...f)=>i.handlerUpdateWorkPackage&&i.handlerUpdateWorkPackage(...f),["prevent"]))},[e("h4",null,[r.workpackage.id>0?(l(),o("span",Oi,"Modification du lot")):(l(),o("span",zi,"Nouveau lot")),a(" "+c(n.formData.label),1)]),e("div",Ri,[Ii,Fi,C(e("input",{type:"text",placeholder:"CODE","onUpdate:modelValue":s[0]||(s[0]=f=>n.formData.code=f),class:"form-control"},null,512),[[x,n.formData.code]])]),e("div",Wi,[Ti,C(e("input",{type:"text",placeholder:"Intitulé","onUpdate:modelValue":s[1]||(s[1]=f=>n.formData.label=f),class:"form-control"},null,512),[[x,n.formData.label]])]),e("div",qi,[Li,C(e("textarea",{type:"text",placeholder:"Description","onUpdate:modelValue":s[2]||(s[2]=f=>n.formData.description=f),class:"form-control"},null,512),[[x,n.formData.description]])]),e("div",Ji,[e("button",{type:"submit",class:P(["btn btn-default btn-save",{disabled:!n.formData.code}])},"Enregistrer ",2),e("button",{type:"button",class:"btn btn-default",onClick:s[3]||(s[3]=(...f)=>i.handlerCancelEdit&&i.handlerCancelEdit(...f))},"Annuler")])],32)):d("",!0),n.mode=="read"?(l(),o("div",Hi,[e("h3",null,"["+c(r.workpackage.code)+"] "+c(r.workpackage.label),1),e("p",null,c(r.workpackage.description),1),e("section",Bi,[Yi,(l(!0),o(b,null,w(r.workpackage.persons,f=>(l(),I(y,{key:f.id,"allow-tooltip":r.allowTooltip,person:f,editable:r.editable,onWorkpackagepersondelete:i.handlerDelete,onWorkpackagepersonupdate:i.handlerUpdate},null,8,["allow-tooltip","person","editable","onWorkpackagepersondelete","onWorkpackagepersonupdate"]))),128))]),r.editable&&r.persons.length?(l(),o("div",Gi,[e("div",Ki,[Xi,e("ul",Qi,[(l(!0),o(b,null,w(r.persons,f=>(l(),o("li",{class:P({disabled:i.isDeclarant(f,r.workpackage)})},[e("a",{href:"#",onClick:v(h=>t.$emit("addperson",f.id,r.workpackage.id),["prevent"])},c(f.displayname),9,Zi)],2))),256))])]),e("a",{href:"#",class:"btn btn-default btn-xs",onClick:s[5]||(s[5]=v((...f)=>i.handlerEditWorkPackage&&i.handlerEditWorkPackage(...f),["prevent"]))},[$i,a("Modifier")]),e("a",{href:"#",class:"btn btn-default btn-xs",onClick:s[6]||(s[6]=v((...f)=>i.handlerDeleteWorkPackage&&i.handlerDeleteWorkPackage(...f),["prevent"]))},[ea,a("Supprimer")])])):d("",!0),r.persons.length<=0?(l(),o("div",ta,[a(" Vous n'avez pas encore ajouté de membre à cette activité. "),sa,a(". ")])):d("",!0)])):d("",!0)])}const la=E(Ni,[["render",na]]);const oa={components:{Workpackage:la},data(){return{loading:!1,errors:[],isDeclarant:!1,isValidateur:!1,confirm:null,confirmData:null,confirmHandler:null,editedWorlpackage:null}},props:{url:{required:!0},editable:{required:!1,default:!1},allowTooltip:{default:!1},isValidateur:{required:!0},outsidePerson:{required:!0},persons:{required:!0},workpackages:{required:!0},debugEnabled:{default:!1}},methods:{handlerWorkPackageCancelNew(t){this.workpackages.splice(this.workpackages.indexOf(t),1)},handlerWorkPackageNew(){this.workpackages.push({id:-1,code:"Nouveau Lot",label:"",persons:[],description:""})},handlerConfirm(){console.log("handlerConfirm"),this.confirmHandler(this.confirmData),this.confirm=null},handlerWorkPackagePersonDelete(t){this.confirm="Supprimer le déclarant ?",this.confirmData=t,this.confirmHandler=this.handlerWorkPackagePersonDeleteDo},handlerWorkPackagePersonDeleteDo(t){S.delete(this.url+"?workpackagepersonid="+t.id).then(s=>{this.fetch()},s=>{this.errors.push("Impossible de supprimer le déclarant : "+s.body)})},handlerWorkPackageDelete(t){this.confirm="Supprimer le lot de travail ?",this.confirmData=t,this.confirmHandler=this.handlerWorkPackageDeleteDo},handlerWorkPackageDeleteDo(t){S.delete(this.url+"?workpackageid="+t.id).then(s=>{this.fetch()},s=>{this.errors.push("Impossible de supprimer le lot : "+s.body)})},handlerWorkPackageUpdate(t){var s=new FormData;for(var r in t)s.append(r,t[r]);if(t.id>0)console.log("MAJ du LOT"),s.append("workpackageid",t.id),S.post(this.url,s).then(k=>{this.fetch()},k=>{this.errors.push("Impossible de mettre à jour le lot de travail : "+k.body)});else{console.log("NOUVEAU du LOT ",this.url);let k=JSON.parse(JSON.stringify(t));k.workpackageid=-1,S.put(this.url,k).then(n=>{this.fetch()},n=>{this.errors.push("Impossible de créer le lot de travail : "+n.body)}).then(n=>this.fetch())}},handlerUpdateWorkPackagePerson(t,s){var r=new FormData;r.append("workpackagepersonid",t.id),r.append("duration",s),S.post(this.url,r).then(k=>{t.duration=s},k=>{this.errors.push("Impossible de mettre à jour les heures prévues : "+k.body)})},addperson(t,s){console.log(arguments);var r={idworkpackage:s,idperson:t};S.put(this.url,r).then(k=>{this.fetch()},k=>{this.errors.push("Impossible d'ajouter le déclarant : "+k.body)}).then(()=>this.loading=!1)},fetch(){this.loading="Chargement des lots de travails",console.log(this.url),S.get(this.url+"?v=2").then(t=>{console.log("Chargement des lots de travail : ",t);try{let s=t.data.datas.workpackages;this.$emit("update",s)}catch(s){this.errors.push("UI ERROR "+s)}},t=>{this.errors.push(z.manageErrorResponse(t).message)}).then(()=>this.loading=!1)},fetchPersons(){this.fetch()}}},ee=t=>(T("data-v-7f36a26b"),t=t(),q(),t),ia={key:0,class:"vue-loader"},aa={class:"alert alert-danger"},ra=["onClick"],da=ee(()=>e("i",{class:"icon-cancel-outline"},null,-1)),ca=[da],ua={key:0,class:"overlay"},ha={class:"overlay-content"},ma={class:"overlay-title"},pa={class:"buttons"},_a={class:"admin-bar"},fa=ee(()=>e("i",{class:"icon-book"},null,-1)),va=ee(()=>e("i",{class:"icon-bug"},null,-1)),ga={class:"workpackages"};function ya(t,s,r,k,n,i){const y=D("workpackage");return l(),o("section",null,[g(M,{name:"fade"},{default:A(()=>[n.errors.length?(l(),o("div",ia,[(l(!0),o(b,null,w(n.errors,(f,h)=>(l(),o("div",aa,[a(c(f)+" ",1),e("a",{href:"",onClick:v(V=>n.errors.splice(h,1),["prevent"])},ca,8,ra)]))),256))])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.confirm?(l(),o("div",ua,[e("div",ha,[e("div",ma,[a(c(n.confirm)+" ",1),e("a",{href:"#",class:"overlay-closer",onClick:s[0]||(s[0]=v(f=>n.confirm=null,["prevent"]))},"x")]),e("nav",pa,[e("a",{href:"#",class:"btn btn-danger",onClick:s[1]||(s[1]=v(f=>n.confirm=null,["prevent"]))},"Annuler"),e("a",{href:"#",class:"btn btn-danger",onClick:s[2]||(s[2]=v(f=>i.handlerConfirm(),["prevent"]))},"Confirmer")])])])):d("",!0)]),_:1}),e("nav",_a,[e("a",{href:"",class:"btn btn-primary btn-xs",onClick:s[3]||(s[3]=v((...f)=>i.handlerWorkPackageNew&&i.handlerWorkPackageNew(...f),["prevent"]))},[fa,a(" Nouveau lot")]),r.debugEnabled?(l(),o("a",{key:0,href:"",class:"btn btn-warning btn-xs",onClick:s[4]||(s[4]=v((...f)=>i.fetch&&i.fetch(...f),["prevent"]))},[va,a(" fetch")])):d("",!0)]),e("section",ga,[(l(!0),o(b,null,w(r.workpackages,f=>(l(),I(y,{key:f.id,"allow-tooltip":r.allowTooltip,workpackage:f,persons:r.persons,editable:r.editable,"is-validateur":r.isValidateur,onAddperson:i.addperson,onWorkpackageupdate:i.handlerWorkPackageUpdate,onWorkpackagepersonupdate:i.handlerUpdateWorkPackagePerson,onWorkpackagepersondelete:i.handlerWorkPackagePersonDelete,onWorkpackagedelete:i.handlerWorkPackageDelete,onWorkpackagecancelnew:i.handlerWorkPackageCancelNew},null,8,["allow-tooltip","workpackage","persons","editable","is-validateur","onAddperson","onWorkpackageupdate","onWorkpackagepersonupdate","onWorkpackagepersondelete","onWorkpackagedelete","onWorkpackagecancelnew"]))),128))])])}const ka=E(oa,[["render",ya],["__scopeId","data-v-7f36a26b"]]);S.defaults.headers.common.Accept="application/json";S.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const L="activities_sticky",ba={name:"Activity",components:{ActivityAvenants:vs,ActivityNotes:ke,ActivityLogs:ye,ActivityDocument:ge,ActivitySpentSynthesis:be,EntityWithRole:De,Loader:we,Payments:Fo,PersonCartouche:ci,PersonDisplay:ne,Milestones:$n,Modal:se,VueJsonPretty:ce,WorkpackagesActivity:ka},props:{url:{required:!0},debugEnabled:{required:!1,type:Boolean,default:!1}},data(){return{administration:null,avenants:null,budget:null,core:null,credentials:null,currencies:[],documents:[],milestones:[],milestonesTypes:[],milestonesUrl:null,milestonesUrlNotifications:null,notes:null,notes_url:null,payments:[],paymentsUrl:null,persons:null,personsUrl:null,personsUrlNew:null,rolesOrganizations:null,rolesPersons:null,timesheets:null,timesheetsDeclarers:null,timesheetsValidators:null,timesheetsUrl:null,timesheetsUrlSynthesis:null,organizations:null,organizationsUrl:null,organizationsUrlNew:null,workpackages:null,workpackagesUrl:null,spents:null,activity:{},duplicateDatas:null,sticky:[],descriptionFull:!1,debug_content:null,debug_displayed:!1,error:null,loading:!0}},computed:{personsWP(){if(this.persons){let t={};return this.persons.forEach(s=>{t.hasOwnProperty(s.enrolled)||(t[s.enrolled]={id:s.enrolled,displayname:s.enrolledLabel,firstname:s.firstname,lastname:s.lastname})}),Object.values(t)}else return[]},storage(){return localStorage.getItem(L)},isSticky(){return this.sticky.find(t=>t.id==this.core.id)},labelReduced(){let t=this.core.label;return t.length>50?t.substr(0,50)+"...":t}},methods:{performLock(t){S.post(this.url,{action:t}).then(s=>{this.fetch()},s=>{let r=z.manageErrorResponse(s).message;R.commit("addError",r)})},handlerUnlock(){this.performLock("lock")},handlerLock(){this.performLock("unlock")},testError(t,s="Une erreur affichée"){R.commit("addError",s)},handlerHelp(t){R.dispatch("displayHelp",t)},handlerDebug(t){this.debug_content=t,this.debug_displayed=!0},handlerDebugHide(){this.debug_displayed=!1},handlerDebugShow(t){this.debug_content=JSON.parse(JSON.stringify(t)),this.debug_displayed=!0},handlerError(t){this.error=t.message},handlerUpdateWorkpackages(t){this.workpackages=t.entities},handlerUpdateNotes(t){this.notes=t.entities},handlerUpdatePayments(t){this.payments=t.entities,this.currencies=t.currencies,this.paymentsUrl=t.url},handlerUpdateMilestones(t){this.milestones=t},handlerUpdatePersons(t){this.persons=t.datas.items},handlerUpdateOrganizations(t){this.organizations=t.datas.items},handlerUpdateDocuments(t){console.log(t),this.documents=t},handlerUpdateAvenants(t){console.log("AVENANTS",t),this.avenants=t},handlerPurgeSticky(){this.sticky=[],localStorage.removeItem(L)},toogleSticky(){this.isSticky?this.handlerUnSticky():this.handlerSticky()},handlerUnSticky(){this.sticky.forEach((t,s)=>{t.id==this.core.id&&this.sticky.splice(s,1)}),localStorage.setItem(L,JSON.stringify(this.sticky))},handlerSticky(){this.sticky.push({id:this.core.id,label:this.core.label,num:this.core.numOscar,location:document.location.href}),localStorage.setItem(L,JSON.stringify(this.sticky))},handlerNavigateSticky(t){t.location&&(document.location=t.location)},test(){console.log(localStorage.getItem())},fetch(){this.loading=!0,S.get(this.url).then(t=>{this.budget=t.data.activity.datas.budget,this.core=t.data.activity.datas.core,t.data.activity.datas.spents&&(this.spents=t.data.activity.datas.spents),t.data.activity.datas.avenants&&this.handlerUpdateAvenants(t.data.activity.datas.avenants),t.data.activity.datas.administration&&(this.administration=t.data.activity.datas.administration),t.data.activity.datas.documents&&this.handlerUpdateDocuments(t.data.activity.datas.documents),t.data.activity.datas.notes&&(this.notes=t.data.activity.datas.notes.entities,this.notes_url=t.data.activity.datas.notes.url),t.data.activity.datas.milestones&&(this.milestones=t.data.activity.datas.milestones.entities,this.milestonesTypes=t.data.activity.datas.milestones.types,this.milestonesUrl=t.data.activity.datas.milestones.url,this.milestonesUrlNotifications=t.data.activity.datas.milestones.urlNotifications),t.data.activity.datas.organizations&&(this.organizations=t.data.activity.datas.organizations.entities,this.organizationsUrl=t.data.activity.datas.organizations.url,this.organizationsUrlNew=t.data.activity.datas.organizations.urlNew,this.rolesOrganizations=t.data.activity.datas.organizations.roles),t.data.activity.datas.payments&&this.handlerUpdatePayments(t.data.activity.datas.payments),t.data.activity.datas.persons&&(this.persons=t.data.activity.datas.persons.entities,this.personsUrlNew=t.data.activity.datas.persons.urlNew,this.personsUrl=t.data.activity.datas.persons.url,this.rolesPersons=t.data.activity.datas.persons.roles),t.data.activity.datas.timesheets?(this.timesheets=t.data.activity.datas.timesheets,this.timesheetsValidators=t.data.activity.datas.timesheets.validators,this.timesheetsDeclarers=t.data.activity.datas.timesheets.declarers,this.timesheetsUrl=t.data.activity.datas.timesheets.url,this.timesheetsUrlSynthesis=t.data.activity.datas.timesheets.urlSynthesis):console.log("pas de donnée FEUILLE DE TEMPS"),t.data.activity.datas.workpackages?(this.workpackages=t.data.activity.datas.workpackages.entities,this.workpackagesUrl=t.data.activity.datas.workpackages.url):console.log("pas de donnée LOTS DE TRAVAIL"),this.credentials=t.data.activity.credentials},t=>{this.handlerError(z.manageErrorResponse(t))}).finally(t=>{this.loading=!1})},handlerDuplicate(){this.duplicateDatas={displayed:!1,keepPersons:!0,keepOrganizations:!0,keepMilestones:!0,keepWorkpackages:!1,keepAdmData:!1}},handlerDuplicateDo(){document.location=this.core.urls.duplicate+"?"+(this.duplicateDatas.keepPersons?"&keeppersons=on":"")+(this.duplicateDatas.keepOrganizations?"&keeporganizations=on":"")+(this.duplicateDatas.keepMilestones?"&keepmilestones=on":"")+(this.duplicateDatas.keepWorkpackages?"&keepworkpackage=on":"")+(this.duplicateDatas.keepAdmData?"&keepadmdata=on":"")},handlerShowProject(){this.activity.project.url_show&&(document.location=this.activity.project.url_show)}},mounted(){this.fetch();let t=localStorage.getItem(L);t?t=JSON.parse(t):t=[],this.sticky=t}},m=t=>(T("data-v-8de60033"),t=t(),q(),t),Da={class:"alert alert-danger"},wa={key:0,class:"overlay"},Ca={class:"overlay-content"},Pa=m(()=>e("h1",{class:"overlay-title"},"Dupliquer cette activité",-1)),Aa={class:"row",style:{width:"80%"}},Ua={class:"col-md-6 col-md-offset-3"},Sa=m(()=>e("small",null,"Options de copie pour",-1)),Ma=m(()=>e("br",null,null,-1)),Ea={class:"col-md-6 col-md-offset-3"},Va={class:"list-group-item separator-bottom"},xa=m(()=>e("strong",null,[e("i",{class:"icon-group"}),a(" Reprendre les personnes ")],-1)),Na={class:"material-switch pull-right"},ja=m(()=>e("label",{for:"keeppersons",class:"label-primary"},null,-1)),Oa={class:"list-group-item separator-bottom"},za=m(()=>e("strong",null,[e("i",{class:"icon-calendar"}),a(" Reprendre les jalons ")],-1)),Ra={class:"material-switch pull-right"},Ia=m(()=>e("label",{for:"keepmilestones",class:"label-primary"},null,-1)),Fa={class:"list-group-item separator-bottom"},Wa=m(()=>e("strong",null,[e("i",{class:"icon-building-filled"}),a(" Reprendre les organisations ")],-1)),Ta={class:"material-switch pull-right"},qa=m(()=>e("label",{for:"keeporganizations",class:"label-primary"},null,-1)),La={class:"list-group-item separator-bottom"},Ja=m(()=>e("strong",null,[e("i",{class:"icon-archive"}),a(" Reprendre les lots de travail ")],-1)),Ha={class:"material-switch pull-right"},Ba=m(()=>e("label",{for:"keepworkpackages",class:"label-primary"},null,-1)),Ya={class:"list-group-item separator-bottom"},Ga=m(()=>e("strong",null,[e("i",{class:"icon-archive"}),a(" Reprendre les données de base ")],-1)),Ka=m(()=>e("br",null,null,-1)),Xa=m(()=>e("small",null,"Données du formulaire de créaton : Dates de début / fin, intitulé, description, type, etc...",-1)),Qa={class:"material-switch pull-right"},Za=m(()=>e("label",{for:"keepadmdata",class:"label-primary"},null,-1)),$a={class:"text-center"},er={key:1},tr={class:"navbar navbar-default navbar-fixed-top",style:{top:"50px","z-index":"500"}},sr={class:"container"},nr={class:"navbar-header"},lr=he('',1),or={class:"navbar-brand",href:"#"},ir=m(()=>e("i",{class:"icon-cube"},null,-1)),ar={class:"collapse navbar-collapse",id:"bs-example-navbar-collapse-1"},rr={class:"nav navbar-nav"},dr={key:0,href:"#members"},cr={key:0,href:"#partners"},ur={key:0,href:"#documents"},hr={key:0,href:"#milestones"},mr={key:0,href:"#notes"},pr={key:0,href:"#payments"},_r={key:0,href:"#spents"},fr={key:0,href:"#timesheets"},vr={class:"nav navbar-nav navbar-right"},gr={class:"dropdown"},yr=m(()=>e("a",{href:"#",class:"dropdown-toggle","data-toggle":"dropdown",role:"button","aria-haspopup":"true","aria-expanded":"false"},[e("i",{class:"icon-pin text-primary"}),e("span",{class:"caret"})],-1)),kr={class:"dropdown-menu"},br={key:0},Dr={key:1},wr=m(()=>e("i",{class:"icon-pin-outline"},null,-1)),Cr=m(()=>e("li",{role:"separator",class:"divider"},null,-1)),Pr=["onClick"],Ar=m(()=>e("i",{class:"icon-cube"},null,-1)),Ur={key:0,class:"icon-link-ext"},Sr=m(()=>e("li",{role:"separator",class:"divider"},null,-1)),Mr=m(()=>e("i",{class:"icon-trash"},null,-1)),Er={class:"jumbotron activity-header oscar-header",style:{"margin-top":"60px"}},Vr={class:"row line-bottom"},xr={class:"col-md-9"},Nr={class:"activity-project"},jr=m(()=>e("i",{class:"icon-cubes"},null,-1)),Or={key:0},zr={key:1},Rr=["href"],Ir={key:0},Fr={key:1},Wr={class:"activity-type"},Tr=m(()=>e("i",{class:"icon-tag"},null,-1)),qr={class:"type-chain"},Lr=m(()=>e("i",{class:"icon-cube"},null,-1)),Jr={class:"col-md-3"},Hr={key:0,class:"budget"},Br=m(()=>e("em",null,"Montant",-1)),Yr={class:"text-private amount"},Gr={class:"details"},Kr={class:"text-private"},Xr={key:0,class:"text-private"},Qr={class:"text-private"},Zr={class:"text-private"},$r={class:"text-private"},ed={class:"row"},td={class:"col-md-4"},sd=m(()=>e("h4",null,[e("i",{class:"icon-calendar"}),a("Dates")],-1)),nd={class:"texthighlight baseline"},ld={class:"aggo"},od=m(()=>e("br",null,null,-1)),id={class:"aggo"},ad=m(()=>e("br",null,null,-1)),rd={class:"aggo"},dd=m(()=>e("br",null,null,-1)),cd={class:"aggo"},ud={class:"col-md-4"},hd=m(()=>e("h4",null,[e("i",{class:"icon-briefcase"}),a("Numérotations")],-1)),md={class:"texthighlight baseline"},pd=m(()=>e("br",null,null,-1)),_d={key:0,class:"text-private"},fd={key:1,class:"text-private"},vd=m(()=>e("br",null,null,-1)),gd={class:"texthighlight baseline"},yd={class:"col-md-4"},kd=m(()=>e("h4",null,[e("i",{class:"icon-database-1"}),a("Divers")],-1)),bd={class:"texthighlight baseline"},Dd=m(()=>e("br",null,null,-1)),wd={class:"row line-bottom"},Cd={class:"col-md-4"},Pd=m(()=>e("h4",null,[e("i",{class:"icon-tags"}),a("Métas-données")],-1)),Ad={class:"texthighlight baseline"},Ud={class:"cartouche xs"},Sd={class:"texthighlight baseline"},Md={class:"cartouche complementary",style:{"line-break":"anywhere"}},Ed=m(()=>e("i",{class:"icon-tag"},null,-1)),Vd={class:"row"},xd={class:"col-md-12"},Nd={class:"admin-bar"},jd=m(()=>e("i",{class:"icon-lock-open"},null,-1)),Od=m(()=>e("i",{class:"icon-lock"},null,-1)),zd={key:1},Rd={key:0,class:"btn btn-default disabled"},Id=m(()=>e("i",{class:"icon-lock"},null,-1)),Fd=["href"],Wd=m(()=>e("i",{class:"icon-pencil"},null,-1)),Td=["href"],qd=m(()=>e("i",{class:"icon-cubes"},null,-1)),Ld=["href"],Jd=m(()=>e("i",{class:"icon-cubes"},null,-1)),Hd=m(()=>e("i",{class:"icon-paste"},null,-1)),Bd=m(()=>e("i",{class:"icon-bug"},null,-1)),Yd=m(()=>e("i",{class:"icon-bug"},null,-1)),Gd={class:"container-fluid"},Kd={class:"col-md-8"},Xd={key:0,class:"section-infos",id:"members"},Qd=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-group"}),a("Membres")])],-1)),Zd={key:1,class:"section-infos",id:"partners"},$d=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-building-filled"}),a("Partenaires")])],-1)),ec={key:2,class:"section-infos",id:"avenants"},tc=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-hammer"}),a(" Avenants ")])],-1)),sc={key:3,class:"section-infos",id:"documents"},nc=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-book"}),a("Documents")])],-1)),lc={key:4,class:"section-infos",id:"notes"},oc=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-comment"}),a("Notes")])],-1)),ic={key:5,id:"timesheets",class:"section-infos"},ac=m(()=>e("h2",{class:"section-title"},[e("span",null,[e("i",{class:"icon-book"}),a("Feuille de temps")])],-1)),rc={key:0,class:"alert alert-info"},dc={key:1},cc={class:"oscar-section"},uc=m(()=>e("h3",{class:"oscar-section-title"},[e("span",null,[e("i",{class:"icon-calendar"}),a("Général")])],-1)),hc={class:"oscar-section-content"},mc=["href"],pc=m(()=>e("i",{class:"icon-calendar"},null,-1)),_c=["href"],fc=m(()=>e("i",{class:"icon-book"},null,-1)),vc={key:0},gc={class:"oscar-section"},yc=m(()=>e("h3",{class:"oscar-section-title"},[e("span",null,[e("i",{class:"icon-group"}),a("Déclarants")])],-1)),kc={class:"oscar-section-content"},bc={key:0},Dc=["href"],wc={key:0},Cc={key:1,class:"alert-warning alert"},Pc=m(()=>e("strong",null,"Lots de travail",-1)),Ac={class:"oscar-section"},Uc={class:"oscar-section-title"},Sc=m(()=>e("span",{class:"text"},[e("i",{class:"icon-user-md"}),a(" Valideurs ")],-1)),Mc=["href"],Ec=m(()=>e("i",{class:"icon-user-md"},null,-1)),Vc={class:"row oscar-section-content"},xc={class:"col-md-4"},Nc=m(()=>e("h4",null,[e("i",{class:"icon-cube"}),a("Validation projet")],-1)),jc={key:0,class:"alert alert-warning"},Oc={class:"cartouche primary person"},zc={class:"col-md-4"},Rc=m(()=>e("h4",null,[e("i",{class:"icon-beaker"}),a("Validation scientifique")],-1)),Ic={key:0,class:"alert alert-warning"},Fc={class:"cartouche person primary"},Wc={class:"col-md-4"},Tc=m(()=>e("h4",null,[e("i",{class:"icon-book"}),a("Validation administrative")],-1)),qc={key:0,class:"alert alert-warning"},Lc={class:"cartouche person primary"},Jc={class:"oscar-section"},Hc=m(()=>e("h3",{class:"oscar-section-title"},[e("span",null,[e("i",{class:"icon-archive"}),a("Lots de travail")])],-1)),Bc={class:"oscar-section-content"},Yc={class:"col-md-4"},Gc={key:0,id:"milestones",class:"section-infos"},Kc=m(()=>e("span",null,[e("h2",null,[e("i",{class:"icon-calendar"}),a("Jalons")])],-1)),Xc=["href"],Qc=m(()=>e("i",{class:"icon-bell"},null,-1)),Zc={key:1,id:"payments",class:"section-infos"},$c=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-bank"}),a("Versements")])],-1)),eu={key:2,id:"spents",class:"section-infos"},tu=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-bank"}),a("Dépenses")])],-1)),su={key:0,class:"alert alert-warning"},nu={key:1},lu={class:"buttons xs"},ou=["href"],iu=m(()=>e("i",{class:"icon-file-excel"},null,-1)),au=["href"],ru=m(()=>e("i",{class:"icon-file-excel"},null,-1)),du={class:"section-infos"},cu=m(()=>e("h2",null,"PCRU",-1)),uu=["href"],hu={key:0,class:"container-fluid activity-fiche"},mu={class:"row"},pu={class:"col-md-12"},_u=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-cog"}),a("Technique")])],-1)),fu={key:2};function vu(t,s,r,k,n,i){const y=D("loader"),f=D("VueJsonPretty"),h=D("modal"),V=D("EntityWithRole"),G=D("activity-avenants"),K=D("activity-document"),H=D("activity-notes"),u=D("PersonDisplay"),_=D("workpackages-activity"),O=D("Milestones"),oe=D("Payments"),ie=D("ActivitySpentSynthesis"),ae=D("ActivityLogs");return l(),o(b,null,[g(y,{text:"Chargement de l'activité",visible:n.loading},null,8,["visible"]),g(h,{title:"Debugger","title-icon":"icon-bug",visible:n.debug_displayed,onModalCancel:s[1]||(s[1]=p=>n.debug_displayed=!1)},{buttons:A(()=>[e("button",{class:"btn btn-default",onClick:s[0]||(s[0]=(...p)=>i.handlerDebugHide&&i.handlerDebugHide(...p))},"FERMER")]),default:A(()=>[g(f,{data:n.debug_content},null,8,["data"])]),_:1},8,["visible"]),g(h,{title:"Une erreur est survenue","title-icon":"icon-bug",visible:n.error!=null},{buttons:A(()=>[e("button",{class:"btn btn-default",onClick:s[2]||(s[2]=p=>n.error=null)},"FERMER")]),default:A(()=>[e("div",Da,c(n.error),1)]),_:1},8,["visible"]),n.duplicateDatas!=null?(l(),o("div",wa,[e("div",Ca,[Pa,e("a",{class:"overlay-closer",onClick:s[3]||(s[3]=p=>n.duplicateDatas=null)},"x"),e("div",Aa,[e("h1",Ua,[Sa,a(),Ma,e("strong",null,c(n.core.label),1)]),e("div",Ea,[e("div",Va,[xa,e("div",Na,[C(e("input",{id:"keeppersons",name:"keeppersons",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=p=>n.duplicateDatas.keepPersons=p)},null,512),[[W,n.duplicateDatas.keepPersons]]),ja])]),e("div",Oa,[za,e("div",Ra,[C(e("input",{id:"keepmilestones",name:"keepmilestones",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=p=>n.duplicateDatas.keepMilestones=p)},null,512),[[W,n.duplicateDatas.keepMilestones]]),Ia])]),e("div",Fa,[Wa,e("div",Ta,[C(e("input",{id:"keeporganizations",name:"keeporganizations",type:"checkbox","onUpdate:modelValue":s[6]||(s[6]=p=>n.duplicateDatas.keepOrganizations=p)},null,512),[[W,n.duplicateDatas.keepOrganizations]]),qa])]),e("div",La,[Ja,e("div",Ha,[C(e("input",{id:"keepworkpackages",name:"keepworkpackages",type:"checkbox","onUpdate:modelValue":s[7]||(s[7]=p=>n.duplicateDatas.keepWorkpackages=p)},null,512),[[W,n.duplicateDatas.keepWorkpackages]]),Ba])]),e("div",Ya,[Ga,Ka,Xa,e("div",Qa,[C(e("input",{id:"keepadmdata",name:"keepadmdata",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=p=>n.duplicateDatas.keepAdmData=p)},null,512),[[W,n.duplicateDatas.keepAdmData]]),Za])]),e("nav",$a,[e("a",{href:"#",class:"btn btn-primary",onClick:s[9]||(s[9]=p=>n.duplicateDatas=null)},"Annuler"),e("a",{href:"#",class:"btn btn-default",onClick:s[10]||(s[10]=(...p)=>i.handlerDuplicateDo&&i.handlerDuplicateDo(...p))},"Dupliquer l'activité")])])])])])):d("",!0),n.core&&n.credentials&&n.credentials.read?(l(),o("div",er,[e("nav",tr,[e("div",sr,[e("div",nr,[lr,e("a",or,[ir,e("strong",null,c(n.core.numOscar),1),e("span",null," / "+c(i.labelReduced),1),e("i",{class:"icon-pin",style:ue({opacity:i.isSticky?1:.3}),onClick:s[11]||(s[11]=(...p)=>i.toogleSticky&&i.toogleSticky(...p))},null,4)])]),e("div",ar,[e("ul",rr,[e("li",null,[n.credentials.persons.read?(l(),o("a",dr,"Membres")):d("",!0)]),e("li",null,[n.credentials.organizations.read?(l(),o("a",cr,"Partenaires")):d("",!0)]),e("li",null,[n.credentials.documents.read?(l(),o("a",ur,"Documents")):d("",!0)]),e("li",null,[n.credentials.milestones.read?(l(),o("a",hr,"Jalons")):d("",!0)]),e("li",null,[n.credentials.notes.read?(l(),o("a",mr,"Notes")):d("",!0)]),e("li",null,[n.credentials.budget.read?(l(),o("a",pr,"Versements")):d("",!0)]),e("li",null,[n.credentials.spents.read?(l(),o("a",_r,"Dépenses")):d("",!0)]),e("li",null,[n.credentials.timesheets.read?(l(),o("a",fr,"Feuilles de temps")):d("",!0)])]),e("ul",vr,[e("li",gr,[yr,e("ul",kr,[i.isSticky?(l(),o("li",br,[e("a",{href:"#",onClick:s[12]||(s[12]=(...p)=>i.handlerUnSticky&&i.handlerUnSticky(...p))},"Désépingler")])):(l(),o("li",Dr,[e("a",{href:"#",onClick:s[13]||(s[13]=v((...p)=>i.handlerSticky&&i.handlerSticky(...p),["prevent"]))},[wr,a(" Epingler")])])),Cr,(l(!0),o(b,null,w(n.sticky,p=>(l(),o("li",{class:P(p.id==n.core.id?"disabled":"")},[e("a",{href:"#",onClick:te=>i.handlerNavigateSticky(p)},[Ar,e("strong",null,c(p.num),1),e("em",null,c(p.label),1),p.id!=n.core.id?(l(),o("i",Ur)):d("",!0)],8,Pr)],2))),256)),Sr,e("li",null,[e("a",{href:"#",onClick:s[14]||(s[14]=v((...p)=>i.handlerPurgeSticky&&i.handlerPurgeSticky(...p),["prevent"]))},[Mr,a(" Supprimer les épingles ")])])])])])])])]),e("header",Er,[e("div",Vr,[e("div",xr,[e("h4",Nr,[jr,a("  "),n.core.project===null?(l(),o("em",Or,"Aucun Projet")):(l(),o("span",zr,[n.credentials.project.read?(l(),o("a",{key:0,href:n.core.project.url_show},[n.core.project.acronym?(l(),o("strong",Ir,c(n.core.project.acronym)+" ",1)):d("",!0),e("em",null,c(n.core.project.label),1)],8,Rr)):(l(),o("span",Fr,[e("strong",null,c(n.core.project.acronym),1),e("em",null,c(n.core.project.label),1)]))]))]),e("h3",null,[e("span",{class:P(["picto status-","status-"+n.core.status])},[e("i",{class:P(["icon","icon-"+n.core.status])},null,2),a(" "+c(n.core.status_label),1)],2),e("span",Wr,[Tr,e("span",qr,[e("i",{class:P(n.core.type_slug)},null,2),(l(!0),o(b,null,w(n.core.type_chain,p=>(l(),o("span",null,c(p.label),1))),256))])])]),e("h1",null,[e("span",null,[Lr,a(" "+c(n.core.label),1)])])]),e("div",Jr,[n.budget&&n.credentials.budget.read?(l(),o("div",Hr,[Br,e("strong",Yr,c(t.$filters.money(n.budget.montant))+" "+c(n.budget.currency.symbol),1),e("div",Gr,[e("small",null,[a(" Frais de gestion : "),e("b",Kr,c(n.budget.fraisDeGestion),1)]),e("small",null,[a(" Part unité : "),n.budget.fraisDeGestionPartUnite?(l(),o("b",Xr,c(n.budget.fraisDeGestionPartUnite),1)):d("",!0)]),e("small",null,[a(" Part hébergeur : "),e("b",Qr,c(n.budget.fraisDeGestionPartHebergeur),1)]),e("small",null,[a(" Part Gestionnaire : "),e("b",Zr,c(n.budget.fraisDeGestionPartGestionnaire),1)]),e("small",null,[a(" TVA : "),e("b",$r,c(n.budget.tva),1)])])])):d("",!0)])]),n.core.description?(l(),o("p",{key:0,class:P(["baseline",{descriptionPacked:!n.descriptionFull}]),onClick:s[15]||(s[15]=p=>n.descriptionFull=!n.descriptionFull)},[e("small",null,c(n.core.description),1)],2)):d("",!0),e("div",ed,[e("div",td,[sd,e("p",nd,[a(" Début : "),e("time",null,c(t.$filters.date(n.core.dateStart)),1),e("small",ld," ("+c(t.$filters.timeAgo(n.core.dateStart))+")",1),od,a(" Fin : "),e("time",null,c(t.$filters.dateFull(n.core.dateEnd)),1),e("small",id," ("+c(t.$filters.timeAgo(n.core.dateEnd))+")",1),ad,a(" Signé le : "),e("time",null,c(t.$filters.dateFull(n.core.dateSigned)),1),e("small",rd," ("+c(t.$filters.timeAgo(n.core.dateSigned))+")",1),dd,a(" Date de début des négociations : "),e("time",null,c(t.$filters.dateFull(n.core.dateNegociation)),1),e("small",cd," ("+c(t.$filters.timeAgo(n.core.dateNegociation))+")",1)])]),e("div",ud,[hd,e("p",md,[a(' N° Oscar" : '),e("strong",null,c(n.core.numOscar),1),pd,a(" Numéro financier : "),n.core.pfi?(l(),o("strong",_d,c(n.core.pfi),1)):(l(),o("strong",fd,"AUCUN")),a(" - Ouverture du PFI le "),e("time",null,c(t.$filters.dateFull(n.core.dateOpened)),1),vd]),(l(!0),o(b,null,w(n.core.numeros,(p,te)=>(l(),o("p",gd,[a(c(te)+" : ",1),e("strong",null,c(p),1)]))),256))]),e("div",yd,[kd,e("p",bd,[a(" Création "),e("time",null,c(t.$filters.dateFull(n.core.dateCreated)),1),Dd,a(" Dernière MAJ "),e("time",null,c(t.$filters.dateFull(n.core.dateUpdated)),1)])])]),e("div",wd,[e("div",Cd,[Pd,e("p",Ad,[a(" Disciplines : "),(l(!0),o(b,null,w(n.core.disciplines,p=>(l(),o("span",Ud,c(p),1))),256))]),e("p",Sd,[a(" Mots clés : "),(l(!0),o(b,null,w(n.core.motscles,p=>(l(),o("span",Md,[Ed,a(" "+c(p),1)]))),256))])])]),e("div",Vd,[e("div",xd,[e("nav",Nd,[n.credentials.lock_edit?(l(),o(b,{key:0},[n.credentials.lock?(l(),o("a",{key:0,class:"btn btn-info",onClick:s[16]||(s[16]=p=>i.handlerLock())},[jd,a(" Déverrouiller")])):(l(),o("a",{key:1,class:"btn btn-info",onClick:s[17]||(s[17]=p=>i.handlerUnlock())},[Od,a(" Vérrouiller")]))],64)):n.credentials.lock?(l(),o("span",zd,[n.credentials.lock?(l(),o("strong",Rd,[Id,a(" VERROUILLEE ")])):d("",!0)])):d("",!0),n.credentials.core.edit?(l(),o("a",{key:2,class:"btn btn-primary",href:n.core.urls.edit},[Wd,a(" Modifier les informations")],8,Fd)):d("",!0),n.credentials.core.change_project?(l(),o("a",{key:3,class:"btn btn-default",href:n.core.urls.change_project},[qd,a(" Modifier le projet")],8,Td)):d("",!0),n.credentials.core.new_project?(l(),o("a",{key:4,class:"btn btn-default",href:n.core.urls.new_project},[Jd,a(" Créer un nouveau projet")],8,Ld)):d("",!0),n.core.urls.duplicate?(l(),o("a",{key:5,class:"btn btn-default",onClick:s[18]||(s[18]=(...p)=>i.handlerDuplicate&&i.handlerDuplicate(...p))},[Hd,a(" Dupliquer")])):d("",!0),r.debugEnabled?(l(),o("a",{key:6,class:"btn btn-warning",onClick:s[19]||(s[19]=p=>i.handlerDebugShow(t.$data))},[Bd,a(" Afficher le modèle")])):d("",!0),r.debugEnabled?(l(),o("a",{key:7,class:"btn btn-warning",onClick:s[20]||(s[20]=(...p)=>i.fetch&&i.fetch(...p))},[Yd,a(" Recharger le modèle")])):d("",!0)])])])]),e("div",Gd,[e("div",Kd,[n.credentials.persons.read?(l(),o("section",Xd,[Qd,g(V,{title:"Personne",standalone:!1,"entity-link-show":n.credentials.persons.show,manage:n.credentials.persons.edit,roles:n.rolesPersons,items:n.persons,"url-new":n.personsUrlNew,url:n.personsUrl,"debug-enabled":r.debugEnabled,onUpdate:i.handlerUpdatePersons},null,8,["entity-link-show","manage","roles","items","url-new","url","debug-enabled","onUpdate"])])):d("",!0),n.credentials.organizations.read?(l(),o("section",Zd,[$d,g(V,{title:"Organisation",standalone:!1,"debug-enabled":r.debugEnabled,"entity-link-show":n.credentials.organizations.show,manage:n.credentials.organizations.edit,roles:n.rolesOrganizations,items:n.organizations,url:n.organizationsUrl,"url-new":n.organizationsUrlNew,onUpdate:i.handlerUpdateOrganizations},null,8,["debug-enabled","entity-link-show","manage","roles","items","url","url-new","onUpdate"])])):d("",!0),n.credentials.avenants.read?(l(),o("section",ec,[tc,g(G,{avenants:n.avenants,"roles-person":n.rolesPersons,"roles-organization":n.rolesOrganizations,"current-persons":n.persons,"current-organizations":n.organizations,manage:n.credentials.avenants.edit,onUpdate:i.handlerUpdateAvenants},null,8,["avenants","roles-person","roles-organization","current-persons","current-organizations","manage","onUpdate"])])):d("",!0),n.credentials.documents.read?(l(),o("section",sc,[nc,g(K,{onDebug:i.handlerDebug,onUpdated:i.handlerUpdateDocuments,"debug-enabled":r.debugEnabled,standalone:!0,"sa-tabs":n.documents.tabs,"sa-types":n.documents.typesDocuments,"sa-generated-documents":n.documents.generatedDocuments,"sa-computed-documents":n.documents.computedDocuments,"sa-process-datas":n.documents.processDatas,"sa-credentials":n.credentials.documents,url:n.documents.url,"url-upload-new-doc":n.documents.url_upload_new_doc,"url-sign-document":n.documents.url_sign_document},null,8,["onDebug","onUpdated","debug-enabled","sa-tabs","sa-types","sa-generated-documents","sa-computed-documents","sa-process-datas","sa-credentials","url","url-upload-new-doc","url-sign-document"])])):d("",!0),n.credentials.notes.read?(l(),o("section",lc,[oc,g(H,{url:n.notes_url,showallowed:n.credentials.notes.read,manageuserallowed:n.credentials.notes.edit,manageadminallowed:n.credentials.notes.manage,items:n.notes,onUpdate:i.handlerUpdateNotes},null,8,["url","showallowed","manageuserallowed","manageadminallowed","items","onUpdate"])])):d("",!0),n.credentials.timesheets.read?(l(),o("section",ic,[ac,n.timesheets.enabled?(l(),o("div",dc,[e("section",cc,[uc,e("div",hc,[e("a",{href:n.timesheets.url,class:"btn btn-primary"},[pc,a(" Informations générales et lots de travails ")],8,mc),e("a",{href:n.timesheets.urlSynthesis,class:"btn btn-default"},[fc,a(" Résumé et documents ")],8,_c)])]),n.workpackages?(l(),o("section",vc,[e("div",gc,[yc,e("div",kc,[n.timesheets.declarers.length?(l(),o("div",bc,[(l(!0),o(b,null,w(n.timesheetsDeclarers,p=>(l(),o("a",{href:p.url_details,class:P(["btn",p.hasDeclaration?"btn-primary":"btn-default"])},[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"]),p.hasDeclaration==!1?(l(),o("small",wc," (Aucune déclaration) ")):d("",!0)],10,Dc))),256))])):(l(),o("div",Cc,[a(" Pour ajouter des déclarants, créez des "),Pc,a(" puis identifier les déclarants parmis les membres ")]))])]),e("div",Ac,[e("h3",Uc,[Sc,e("nav",null,[e("a",{href:n.timesheets.url+"#validators",class:"btn btn-primary btn-xs"},[Ec,a(" Désigner des validateurs ")],8,Mc)])]),e("div",Vc,[e("div",xc,[Nc,n.timesheets.validators.prj.length===0?(l(),o("div",jc," Aucun validateur pour cette étape ")):d("",!0),e("div",null,[(l(!0),o(b,null,w(n.timesheetsValidators.prj,p=>(l(),o("span",Oc,[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])]),e("div",zc,[Rc,n.timesheets.validators.sci.length===0?(l(),o("div",Ic," Aucun validateur pour cette étape ")):d("",!0),(l(!0),o(b,null,w(n.timesheetsValidators.sci,p=>(l(),o("span",Fc,[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))]),e("div",Wc,[Tc,n.timesheets.validators.adm.length===0?(l(),o("div",qc," Aucun validateur pour cette étape ")):d("",!0),(l(!0),o(b,null,w(n.timesheetsValidators.adm,p=>(l(),o("span",Lc,[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])])]),e("div",Jc,[Hc,a(" "+c(t.personWP)+" ",1),e("div",Bc,[g(_,{"debug-enabled":r.debugEnabled,"allow-tooltip":n.credentials.persons.show,editable:n.credentials.workpackages.edit,workpackages:n.workpackages,url:n.workpackagesUrl,persons:i.personsWP,onUpdate:i.handlerUpdateWorkpackages},null,8,["debug-enabled","allow-tooltip","editable","workpackages","url","persons","onUpdate"])])])])):d("",!0)])):(l(),o("div",rc,[a(" Feuilles de temps non-disponible pour cette activité : "),e("strong",null,c(n.timesheets.informations),1)]))])):d("",!0)]),e("aside",Yc,[n.credentials.milestones.read?(l(),o("section",Gc,[Kc,g(O,{url:n.milestonesUrl,manage:n.credentials.milestones.edit,progression:n.credentials.milestones.progression,payments:n.payments,items:n.milestones,types:n.milestonesTypes,onUpdate:i.handlerUpdateMilestones},null,8,["url","manage","progression","payments","items","types","onUpdate"]),n.milestonesUrlNotifications?(l(),o("a",{key:0,href:n.milestonesUrlNotifications,class:"btn btn-primary"},[Qc,a(" Voir les notifications planifiées ")],8,Xc)):d("",!0)])):d("",!0),n.credentials.payments.read?(l(),o("section",Zc,[$c,g(oe,{url:n.paymentsUrl,manage:n.credentials.payments.edit,amount:n.budget.amount,payments:n.payments,currencies:n.currencies,onDebug:i.handlerDebugShow,onUpdate:i.handlerUpdatePayments},null,8,["url","manage","amount","payments","currencies","onDebug","onUpdate"])])):d("",!0),n.credentials.spents.read?(l(),o("section",eu,[tu,n.spents.enabled?(l(),o("div",nu,[g(ie,{standalone:!1,datas:n.spents},null,8,["datas"]),e("nav",lu,[n.credentials.spents.details?(l(),o("a",{key:0,href:n.spents.url_details,class:"btn btn-primary btn"},[iu,a(" Détails des dépenses")],8,ou)):d("",!0),n.credentials.spents.previsionnel?(l(),o("a",{key:1,href:t.spentsUrlPrevisionnel,class:"btn btn-primary btn"},[ru,a(" Dépenses prévisionnelles (beta)")],8,au)):d("",!0)])])):(l(),o("div",su," Dépenses indisponibles : "+c(n.spents.enabled_reason),1))])):d("",!0),e("section",du,[cu,e("a",{href:n.core.urls.pcru,class:"btn btn-primary btn-xs"}," Accès aux informations PCRU ",8,uu)])])]),n.credentials.administration.read?(l(),o("div",hu,[e("div",mu,[e("div",pu,[_u,g(ae,{url:n.administration.url_logs},null,8,["url"])])])])):d("",!0)])):(l(),o("div",fu," Données inaccessibles "))],64)}const gu=E(ba,[["render",vu],["__scopeId","data-v-8de60033"]]);let Z=document.querySelector("#activity");const le=me(gu,{url:Z.dataset.url,"debug-enabled":Z.dataset.debugEnabled,manage:Z.dataset.manage});le.config.globalProperties.$filters={timeAgo(t){return Q.timeAgo(t)},date(t){return Q.date(t)},dateFull(t){return Q.dateFull(t)},filesize(t){return pe.filesize(t)},money(t){return _e.money(t)},log(t){return Ce.log(t)}};le.mount("#activity"); diff --git a/public/js/oscar/vite/dist/assets/activitydocuments-3139e448.js b/public/js/oscar/vite/dist/assets/activitydocuments-596bd3c4.js similarity index 90% rename from public/js/oscar/vite/dist/assets/activitydocuments-3139e448.js rename to public/js/oscar/vite/dist/assets/activitydocuments-596bd3c4.js index 6d2a3ca6755e2c56833915a0b6229f98c1af7ef7..8b4bec9f41c5508d097704d7b59a73a6db407f43 100644 --- a/public/js/oscar/vite/dist/assets/activitydocuments-3139e448.js +++ b/public/js/oscar/vite/dist/assets/activitydocuments-596bd3c4.js @@ -1 +1 @@ -import{y as i}from"../vendor.js";import{m as r}from"../vendor2.js";import{f as m}from"../vendor3.js";import{A as a}from"../vendor10.js";import"../vendor6.js";import"../vendor7.js";import"../vendor20.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";import"../vendor17.js";let e=document.querySelector("#activitydocuments");const o=i(a,{url:e.dataset.url,urlUploadNewDoc:e.dataset.urlUploadNewDoc,urlSignDocument:e.dataset.urlSignDocument,manage:e.dataset.manage});o.config.globalProperties.$filters={timeAgo(t){return r.timeAgo(t)},date(t){return r.date(t)},dateFull(t){return r.dateFull(t)},filesize(t){return m.filesize(t)}};o.mount("#activitydocuments"); +import{A as i}from"../vendor.js";import{m as r}from"../vendor2.js";import{f as m}from"../vendor3.js";import{A as a}from"../vendor10.js";import"../vendor6.js";import"../vendor7.js";import"../vendor20.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";import"../vendor17.js";let e=document.querySelector("#activitydocuments");const o=i(a,{url:e.dataset.url,urlUploadNewDoc:e.dataset.urlUploadNewDoc,urlSignDocument:e.dataset.urlSignDocument,manage:e.dataset.manage});o.config.globalProperties.$filters={timeAgo(t){return r.timeAgo(t)},date(t){return r.date(t)},dateFull(t){return r.dateFull(t)},filesize(t){return m.filesize(t)}};o.mount("#activitydocuments"); diff --git a/public/js/oscar/vite/dist/assets/activitymotscles-2e3e437b.js b/public/js/oscar/vite/dist/assets/activitymotscles-2e3e437b.js deleted file mode 100644 index 7ae805df84cf65e4d4386de2cfe9b18cf0c1db5a..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/activitymotscles-2e3e437b.js +++ /dev/null @@ -1 +0,0 @@ -import{p as y,r as C,o as n,c as i,b,d as l,a as p,g as u,F as c,j as h,w as x,v as w,h as k,t as m,n as L,y as M}from"../vendor.js";import{A as I}from"../vendor14.js";import{L as D}from"../vendor17.js";import{_ as E}from"../vendor7.js";const N={components:{Loader:D},props:{url:{default:null},activityid:{default:null},motsclesselectionnes:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(t=>t.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{touslesmotscles:[],error:null,loading:null,affichertouslesmotscles:!1,userInput:""}},methods:{motCléExiste(){for(const t of this.touslesmotscles)if(t.label.toLocaleLowerCase()==this.userInput.toLocaleLowerCase())return!0;return!1},créerMotClé(t){t.preventDefault(),this.affichertouslesmotscles=!1,this.loading="Création du mot clé",y.post(this.url+"?activity_id="+this.activityid,{action:"create",label:this.userInput.trim()}).then(e=>{let a=e.data;a.selected=!0,this.touslesmotscles.push(a),this.userInput=""},e=>{this.handleError(e)}).finally(()=>{this.loading=null})},onKeyDown(t){if(t.key==="Enter"){t.preventDefault();return}if(t.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(t){!t.target.classList.contains("undetouslesmotscles")&&!t.target.classList.contains("inputNouveauMotCle")&&!t.target.classList.contains("listeDeTousLesMotsCles")&&(this.affichertouslesmotscles=!1)},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?activity_id="+this.activityid).then(t=>{this.touslesmotscles=t.data.motscles;const e=JSON.parse(this.motsclesselectionnes);for(let a of this.touslesmotscles)e.includes(a.id)&&(a.selected=!0);this.loading=null},t=>{this.handleError(t),this.loading=null})},handleError(t){if(!t.response.data){this.error=t;return}if(t.response.headers.get("content-type").includes("text/html")){var e=document.createElement("html");e.innerHTML=t.response.data;const a=e.querySelector('[id="contenu-principal"]');if(a){this.error=a.innerHTML;return}const d=t.response.headers.get("content-length");if(d&&typeof d=="string"&&!isNaN(d)&&Number(d)<1e3){this.error=t.response.data;return}}this.error=I.manageErrorResponse(t)}},mounted(){document.addEventListener("mousedown",this.onMouseDown),this.fetch()},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},T={style:{position:"relative"}},z={key:0,class:"overlay",style:{"z-index":"101"}},A={class:"overlay-content",style:{"max-width":"50%"}},H={class:"alert-danger alert"},S=["innerHTML"],V={style:{display:"none"},name:"motscles[]",multiple:"",tabindex:"-1","aria-hidden":"true"},F=["value"],K={style:{display:"flex"}},j={style:{width:"50%","min-width":"50%"}},B={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},q={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},J={key:0,class:"selectedmotcle"},O=["onClick"],P={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},R={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0",position:"absolute","z-index":"1051",width:"50%"}},U={class:"listeDeTousLesMotsCles"},X=["onClick"],G={key:0,style:{padding:"6px"}},Q={style:{"max-width":"50%",overflow:"auto","margin-left":"10px"}},W=["disabled"],Y={key:0},Z={key:1,style:{"white-space":"preserve-spaces"}},$={key:0,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}},ee={key:1,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}};function te(t,e,a,d,o,r){const g=C("Loader");return n(),i("section",T,[b(g,{visible:o.loading!=null,text:o.loading},null,8,["visible","text"]),o.error?(n(),i("div",z,[l("div",A,[l("h2",null,[e[7]||(e[7]=p(" Erreur mots clés ")),l("span",{class:"overlay-closer",onClick:e[0]||(e[0]=s=>o.error=null)},"X")]),l("div",H,[e[8]||(e[8]=l("i",{class:"icon-attention-1"},null,-1)),l("div",{innerHTML:o.error},null,8,S)]),l("button",{class:"btn btn-default",onClick:e[1]||(e[1]=s=>o.error=null)},e[9]||(e[9]=[l("i",{class:"icon-cancel-outline"},null,-1),p(" Fermer ")]))])])):u("",!0),e[11]||(e[11]=l("label",null,"Mots clés",-1)),l("select",V,[(n(!0),i(c,null,h(o.touslesmotscles,s=>(n(),i(c,null,[s.selected?(n(),i("option",{key:0,value:s.id,selected:""},m(s.label),9,F)):u("",!0)],64))),256))]),l("div",K,[l("div",j,[l("span",B,[l("ul",q,[(n(!0),i(c,null,h(o.touslesmotscles,s=>(n(),i(c,null,[s.selected?(n(),i("li",J,[l("span",{onClick:_=>s.selected=!1},"×",8,O),p(m(s.label),1)])):u("",!0)],64))),256)),l("li",P,[x(l("input",{onFocusin:e[2]||(e[2]=(...s)=>r.clickInput&&r.clickInput(...s)),onClick:e[3]||(e[3]=(...s)=>r.clickInput&&r.clickInput(...s)),onKeydown:e[4]||(e[4]=(...s)=>r.onKeyDown&&r.onKeyDown(...s)),"onUpdate:modelValue":e[5]||(e[5]=s=>o.userInput=s),size:"1",class:"inputNouveauMotCle"},null,544),[[w,o.userInput]])])])]),o.affichertouslesmotscles?(n(),i("span",R,[l("ul",U,[(n(!0),i(c,null,h(o.touslesmotscles,s=>(n(),i(c,null,[s.label.toLocaleLowerCase().includes(o.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:L(["undetouslesmotscles",{selected:s.selected}]),onClick:_=>{s.selected=!s.selected,o.affichertouslesmotscles=!1,o.userInput=""}},m(s.label),11,X)):u("",!0)],64))),256)),r.aucunMotCleNeCorrespond?(n(),i("li",G,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)]),l("div",Q,[l("button",{class:"bouton",onClick:e[6]||(e[6]=k((...s)=>r.créerMotClé&&r.créerMotClé(...s),["stop"])),disabled:!o.userInput.trim()||r.motCléExiste()},[e[10]||(e[10]=p("Créer le nouveau mot clé : ")),o.userInput.trim()?u("",!0):(n(),i("span",Y,"∅")),o.userInput.trim()?(n(),i("span",Z,m(o.userInput.trim()),1)):u("",!0)],8,W),o.userInput.trim()?u("",!0):(n(),i("div",$,`ℹ️ Pour créer un nouveau mot clé, veuillez d'abord saisir son libellé dans le champ "Mots clés"`)),o.userInput.trim()&&r.motCléExiste()?(n(),i("div",ee,"ℹ️ Le mot clé existe déjà")):u("",!0)])])])}const se=E(N,[["render",te],["__scopeId","data-v-926a5c63"]]);let v="#activity-mots-cles",f=document.querySelector(v);const oe=M(se,{url:f.dataset.url,activityid:f.dataset.activityid,motsclesselectionnes:f.dataset.motsclesselectionnes});oe.mount(v); diff --git a/public/js/oscar/vite/dist/assets/activitymotscles-7b1fc39f.js b/public/js/oscar/vite/dist/assets/activitymotscles-7b1fc39f.js new file mode 100644 index 0000000000000000000000000000000000000000..61258674f8cb9a0662ed8ce84f42d5c834052211 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/activitymotscles-7b1fc39f.js @@ -0,0 +1 @@ +import{s as y,r as b,o as n,c as i,b as x,d as l,a as p,g as u,F as a,k as h,w,v as k,h as L,t as m,n as M,p as I,i as D,A as E}from"../vendor.js";import{A as N}from"../vendor14.js";import{L as T}from"../vendor17.js";import{_ as S}from"../vendor7.js";const z={components:{Loader:T},props:{url:{default:null},activityid:{default:null},motsclesselectionnes:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(e=>e.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{touslesmotscles:[],error:null,loading:null,affichertouslesmotscles:!1,userInput:""}},methods:{motCléExiste(){for(const e of this.touslesmotscles)if(e.label.toLocaleLowerCase()==this.userInput.toLocaleLowerCase())return!0;return!1},créerMotClé(e){e.preventDefault(),this.affichertouslesmotscles=!1,this.loading="Création du mot clé",y.post(this.url+"?activity_id="+this.activityid,{action:"create",label:this.userInput.trim()}).then(s=>{let c=s.data;c.selected=!0,this.touslesmotscles.push(c),this.userInput=""},s=>{this.handleError(s)}).finally(()=>{this.loading=null})},onKeyDown(e){if(e.key==="Enter"){e.preventDefault();return}if(e.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(e){!e.target.classList.contains("undetouslesmotscles")&&!e.target.classList.contains("inputNouveauMotCle")&&!e.target.classList.contains("listeDeTousLesMotsCles")&&(this.affichertouslesmotscles=!1)},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?activity_id="+this.activityid).then(e=>{this.touslesmotscles=e.data.motscles;const s=JSON.parse(this.motsclesselectionnes);for(let c of this.touslesmotscles)s.includes(c.id)&&(c.selected=!0);this.loading=null},e=>{this.handleError(e),this.loading=null})},handleError(e){if(!e.response.data){this.error=e;return}if(e.response.headers.get("content-type").includes("text/html")){var s=document.createElement("html");s.innerHTML=e.response.data;const c=s.querySelector('[id="contenu-principal"]');if(c){this.error=c.innerHTML;return}const d=e.response.headers.get("content-length");if(d&&typeof d=="string"&&!isNaN(d)&&Number(d)<1e3){this.error=e.response.data;return}}this.error=N.manageErrorResponse(e)}},mounted(){document.addEventListener("mousedown",this.onMouseDown),this.fetch()},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},_=e=>(I("data-v-926a5c63"),e=e(),D(),e),A={style:{position:"relative"}},H={key:0,class:"overlay",style:{"z-index":"101"}},V={class:"overlay-content",style:{"max-width":"50%"}},F={class:"alert-danger alert"},K=_(()=>l("i",{class:"icon-attention-1"},null,-1)),B=["innerHTML"],j=_(()=>l("i",{class:"icon-cancel-outline"},null,-1)),q=_(()=>l("label",null,"Mots clés",-1)),J={style:{display:"none"},name:"motscles[]",multiple:"",tabindex:"-1","aria-hidden":"true"},O=["value"],P={style:{display:"flex"}},R={style:{width:"50%","min-width":"50%"}},U={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},X={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},G={key:0,class:"selectedmotcle"},Q=["onClick"],W={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},Y={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0",position:"absolute","z-index":"1051",width:"50%"}},Z={class:"listeDeTousLesMotsCles"},$=["onClick"],ee={key:0,style:{padding:"6px"}},te={style:{"max-width":"50%",overflow:"auto","margin-left":"10px"}},se=["disabled"],oe={key:0},le={key:1,style:{"white-space":"preserve-spaces"}},ne={key:0,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}},ie={key:1,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}};function re(e,s,c,d,o,r){const g=b("Loader");return n(),i("section",A,[x(g,{visible:o.loading!=null,text:o.loading},null,8,["visible","text"]),o.error?(n(),i("div",H,[l("div",V,[l("h2",null,[p(" Erreur mots clés "),l("span",{class:"overlay-closer",onClick:s[0]||(s[0]=t=>o.error=null)},"X")]),l("div",F,[K,l("div",{innerHTML:o.error},null,8,B)]),l("button",{class:"btn btn-default",onClick:s[1]||(s[1]=t=>o.error=null)},[j,p(" Fermer ")])])])):u("",!0),q,l("select",J,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.selected?(n(),i("option",{key:0,value:t.id,selected:""},m(t.label),9,O)):u("",!0)],64))),256))]),l("div",P,[l("div",R,[l("span",U,[l("ul",X,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.selected?(n(),i("li",G,[l("span",{onClick:C=>t.selected=!1},"×",8,Q),p(m(t.label),1)])):u("",!0)],64))),256)),l("li",W,[w(l("input",{onFocusin:s[2]||(s[2]=(...t)=>r.clickInput&&r.clickInput(...t)),onClick:s[3]||(s[3]=(...t)=>r.clickInput&&r.clickInput(...t)),onKeydown:s[4]||(s[4]=(...t)=>r.onKeyDown&&r.onKeyDown(...t)),"onUpdate:modelValue":s[5]||(s[5]=t=>o.userInput=t),size:"1",class:"inputNouveauMotCle"},null,544),[[k,o.userInput]])])])]),o.affichertouslesmotscles?(n(),i("span",Y,[l("ul",Z,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.label.toLocaleLowerCase().includes(o.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:M(["undetouslesmotscles",{selected:t.selected}]),onClick:C=>{t.selected=!t.selected,o.affichertouslesmotscles=!1,o.userInput=""}},m(t.label),11,$)):u("",!0)],64))),256)),r.aucunMotCleNeCorrespond?(n(),i("li",ee,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)]),l("div",te,[l("button",{class:"bouton",onClick:s[6]||(s[6]=L((...t)=>r.créerMotClé&&r.créerMotClé(...t),["stop"])),disabled:!o.userInput.trim()||r.motCléExiste()},[p("Créer le nouveau mot clé : "),o.userInput.trim()?u("",!0):(n(),i("span",oe,"∅")),o.userInput.trim()?(n(),i("span",le,m(o.userInput.trim()),1)):u("",!0)],8,se),o.userInput.trim()?u("",!0):(n(),i("div",ne,`ℹ️ Pour créer un nouveau mot clé, veuillez d'abord saisir son libellé dans le champ "Mots clés"`)),o.userInput.trim()&&r.motCléExiste()?(n(),i("div",ie,"ℹ️ Le mot clé existe déjà")):u("",!0)])])])}const ue=S(z,[["render",re],["__scopeId","data-v-926a5c63"]]);let v="#activity-mots-cles",f=document.querySelector(v);const ce=E(ue,{url:f.dataset.url,activityid:f.dataset.activityid,motsclesselectionnes:f.dataset.motsclesselectionnes});ce.mount(v); diff --git a/public/js/oscar/vite/dist/assets/activitymotsclesadmin-696ec89a.js b/public/js/oscar/vite/dist/assets/activitymotsclesadmin-696ec89a.js deleted file mode 100644 index 0893608677ba054a1a9e8780bd43cad7324e6ad3..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/activitymotsclesadmin-696ec89a.js +++ /dev/null @@ -1 +0,0 @@ -import{o as n,c as i,d as t,a as d,g as c,F as v,j as C,t as r,w as g,v as M,n as D,k as L,p as y,r as _,z as E,b as h,h as S,y as A}from"../vendor.js";import{A as I}from"../vendor14.js";import{L as z}from"../vendor17.js";import{_ as k}from"../vendor7.js";const F={props:{touslesmotscles:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(o=>o.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{affichertouslesmotscles:!1,userInput:"",idMotCleCible:null,motsClesSelectionnes:new Set}},methods:{motCleParId(o){for(const e of this.touslesmotscles)if(e.id==o)return e;return null},onKeyDown(o){if(o.key==="Enter"){o.preventDefault();return}if(o.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(o){!o.target.classList.contains("undetouslesmotscles")&&!o.target.classList.contains("inputNouveauMotCle")&&!o.target.classList.contains("listeDeTousLesMotsCles")&&!o.target.classList.contains("labelDuMotCle")&&(this.affichertouslesmotscles=!1)}},mounted(){document.addEventListener("mousedown",this.onMouseDown)},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},N={key:0,class:"row"},T={class:"row",style:{"margin-bottom":"2em"}},V={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},j={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},q={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},H={key:0,class:"selectedmotcle"},K=["onClick"],P={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},X={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0","z-index":"1051"}},B={class:"listeDeTousLesMotsCles"},U=["onClick"],R={class:"labelDuMotCle"},G={key:0,style:{padding:"6px"}},J={key:1,class:"row"},O={class:"row"},Q={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},W=["value"],Y={key:2,class:"row"},Z={style:{"background-color":"#dff0d8","border-color":"#d6e9c6",color:"#3c763d",margin:"1em",padding:"1em"}},$={style:{"line-break":"anywhere"}},ee={key:0},te={style:{"line-break":"anywhere"}},se={key:0},le={style:{"line-break":"anywhere"}},oe={class:"row"},ne={class:"col-md-12"},ie={class:"buttons-bar"},re=["disabled"];function de(o,e,m,p,s,a){return n(),i("section",null,[t("h2",null,[e[8]||(e[8]=t("small",null,[t("i",{class:"icon-doc"}),t("span",null,"Fusionner des mots clés")],-1)),t("span",{class:"overlay-closer",onClick:e[0]||(e[0]=l=>o.$emit("close"))},"X")]),s.motsClesSelectionnes.size<2?(n(),i("div",N,e[9]||(e[9]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Veuillez sélectionner au moins deux mots clés à fusionner ")],-1)]))):c("",!0),t("div",T,[t("div",V,[e[10]||(e[10]=t("label",{for:"nouveauMotCle"},"Sélectionnez les mots clés à fusionner",-1)),t("div",null,[t("span",j,[t("ul",q,[(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)?(n(),i("li",H,[t("span",{onClick:b=>s.motsClesSelectionnes.delete(l.id)},"×",8,K),t("strong",null,r(l.label),1),d(" (id : "+r(l.id)+", "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+") ",1)])):c("",!0)],64))),256)),t("li",P,[g(t("input",{id:"nouveauMotCle",onFocusin:e[1]||(e[1]=(...l)=>a.clickInput&&a.clickInput(...l)),onClick:e[2]||(e[2]=(...l)=>a.clickInput&&a.clickInput(...l)),onKeydown:e[3]||(e[3]=(...l)=>a.onKeyDown&&a.onKeyDown(...l)),"onUpdate:modelValue":e[4]||(e[4]=l=>s.userInput=l),size:"1",class:"inputNouveauMotCle"},null,544),[[M,s.userInput]])])])]),s.affichertouslesmotscles?(n(),i("div",X,[t("ul",B,[(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[l.label.toLocaleLowerCase().includes(s.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:D(["undetouslesmotscles",{selected:s.motsClesSelectionnes.has(l.id)}]),onClick:b=>{s.motsClesSelectionnes.has(l.id)?s.motsClesSelectionnes.delete(l.id):s.motsClesSelectionnes.add(l.id),s.affichertouslesmotscles=!1,s.userInput=""}},[t("strong",R,r(l.label),1),d(" (id : "+r(l.id)+", "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+")",1)],10,U)):c("",!0)],64))),256)),a.aucunMotCleNeCorrespond?(n(),i("li",G,"Aucun mot clé existant correspondant")):c("",!0)])])):c("",!0)])])]),s.idMotCleCible?c("",!0):(n(),i("div",J,e[11]||(e[11]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Veuillez sélectionner le nom du mot clé qui remplacera tous les autres après la fusion ")],-1)]))),t("div",O,[t("div",Q,[e[13]||(e[13]=t("label",{for:"motCleCible"},"Sélectionnez le nom du mot clé qui remplacera tous les autres après la fusion",-1)),g(t("select",{id:"motCleCible","onUpdate:modelValue":e[5]||(e[5]=l=>s.idMotCleCible=l)},[e[12]||(e[12]=t("option",{value:""},null,-1)),(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)?(n(),i("option",{key:0,value:l.id},[t("strong",null,r(l.label),1),d(" (id : "+r(l.id)+", "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+")",1)],8,W)):c("",!0)],64))),256))],512),[[L,s.idMotCleCible]])])]),s.motsClesSelectionnes.size>=2&&s.idMotCleCible?(n(),i("div",Y,[t("div",Z,[e[14]||(e[14]=d(" En cliquant sur fusionner, le mot clé ")),t("strong",$,r(a.motCleParId(s.idMotCleCible).label),1),d(" (id: "+r(s.idMotCleCible)+", "+r(a.motCleParId(s.idMotCleCible).activity_count)+" activité"+r(a.motCleParId(s.idMotCleCible).activity_count>1?"s":"")+") va être ajouté : ",1),t("ul",null,[(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)&&l.id!=s.idMotCleCible?(n(),i("li",ee,[d("aux "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+" ayant le mot clé ",1),t("strong",te,r(l.label),1),d(" (id : "+r(l.id)+")",1)])):c("",!0)],64))),256))]),e[15]||(e[15]=d(" Ensuite, ces mots clés seront supprimés : ")),(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)&&l.id!=s.idMotCleCible?(n(),i("span",se,[t("strong",le," "+r(l.label),1),d(" (id : "+r(l.id)+")",1)])):c("",!0)],64))),256))])])):c("",!0),t("div",oe,[t("div",ne,[t("nav",ie,[t("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:e[6]||(e[6]=l=>o.$emit("close"))},e[16]||(e[16]=[t("i",{class:"icon-cancel-alt"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-success",disabled:s.motsClesSelectionnes.size<2||!s.idMotCleCible,onClick:e[7]||(e[7]=l=>o.$emit("fusion",Array.from(s.motsClesSelectionnes),s.idMotCleCible))},e[17]||(e[17]=[t("i",{class:"icon-valid"},null,-1),d(" Fusionner ")]),8,re)])])])])}const ue=k(F,[["render",de],["__scopeId","data-v-41814f90"]]);const ce={directives:{focus:o=>o.focus()},components:{Loader:z,ActivityMotsClesAdminFusion:ue},props:{url:{default:null}},computed:{motCleExisteDeja(){return this.editedMotCle&&this.editedMotCle.label&&this.touslesmotscles.filter(o=>o.label.toLocaleLowerCase()==this.editedMotCle.label.trim().toLocaleLowerCase()).length>0}},data(){return{touslesmotscles:[],error:null,loading:null,deleteData:null,editedMotCle:null,fusionEnCours:!1}},methods:{fusionner(o,e){this.fusionEnCours=!1,this.loading="Fusion des mots clés",y.post(this.url,{action:"fusion",idsToMerge:o,targetId:e}).then(()=>{this.fetch()},m=>{this.handleError(m)}).finally(()=>{this.loading=null})},applyEdit(){let o="create";this.editedMotCle.id&&(o="update"),this.loading=o=="create"?"Création du mot clé":"Modification du mot clé",y.post(this.url,{action:o,id:this.editedMotCle.id,label:this.editedMotCle.label.trim()}).then(()=>{this.fetch()},e=>{this.handleError(e)}).finally(()=>{this.loading=null,this.editedMotCle=null})},deleteMotCle(){this.loading="Suppression du mot clé",y.post(this.url,{action:"delete",id:this.deleteData.id}).then(()=>{this.touslesmotscles.splice(this.touslesmotscles.findIndex(o=>o.id===this.deleteData.id),1)},o=>{this.handleError(o)}).finally(()=>{this.loading=null,this.deleteData=null})},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?include_activity_count=true").then(o=>{this.touslesmotscles=o.data.motscles,this.loading=null},o=>{this.handleError(o),this.loading=null})},handleError(o){if(!o.response.data){this.error=o;return}if(o.response.headers.get("content-type").includes("text/html")){var e=document.createElement("html");e.innerHTML=o.response.data;const m=e.querySelector('[id="contenu-principal"]');if(m){this.error=m.innerHTML;return}const p=o.response.headers.get("content-length");if(p&&typeof p=="string"&&!isNaN(p)&&Number(p)<1e3){this.error=o.response.data;return}}this.error=I.manageErrorResponse(o)}},mounted(){this.fetch()}},ae={key:0,class:"overlay",style:{"z-index":"101"}},me={class:"overlay-content",style:{"max-width":"50%"}},ve={class:"alert-danger alert"},pe=["innerHTML"],Ce={style:{display:"flex","flex-direction":"row-reverse"}},ye={class:"title"},be={style:{display:"inline","line-break":"anywhere"}},fe=["onClick"],ge=["onClick"],_e={style:{"padding-left":"1em","padding-bottom":"0.3em"}},he={key:1,class:"overlay"},Me={class:"overlay-content"},ke={style:{"padding-right":"1em"}},xe={style:{"line-break":"anywhere"}},we={class:"alert-danger alert"},De={style:{"line-break":"anywhere"}},Le={key:0},Ee={key:1},Se={class:"row"},Ae={class:"col-md-12"},Ie={class:"buttons-bar"},ze={key:2,class:"overlay"},Fe={class:"overlay-content",style:{display:"flex","flex-direction":"column"}},Ne={key:0},Te={key:1},Ve={key:0,class:"row"},je={key:1,class:"row"},qe={class:"row",style:{"flex-grow":"2"}},He={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},Ke={class:"row"},Pe={class:"col-md-12"},Xe={class:"buttons-bar"},Be=["disabled"],Ue={key:3,class:"overlay"},Re={class:"overlay-content",style:{display:"flex","flex-direction":"column"}};function Ge(o,e,m,p,s,a){const l=_("Loader"),b=_("ActivityMotsClesAdminFusion"),w=E("focus");return n(),i("section",null,[h(l,{visible:s.loading!=null,text:s.loading},null,8,["visible","text"]),s.error?(n(),i("div",ae,[t("div",me,[t("h2",null,[e[13]||(e[13]=d(" Erreur mots clés ")),t("span",{class:"overlay-closer",onClick:e[0]||(e[0]=u=>s.error=null)},"X")]),t("div",ve,[e[14]||(e[14]=t("i",{class:"icon-attention-1"},null,-1)),t("div",{innerHTML:s.error},null,8,pe)]),t("button",{class:"btn btn-default",onClick:e[1]||(e[1]=u=>s.error=null)},e[15]||(e[15]=[t("i",{class:"icon-cancel-outline"},null,-1),d(" Fermer ")]))])])):c("",!0),e[33]||(e[33]=t("h1",null,[t("span",{class:"icon-tags"}),d(" Mots clés")],-1)),t("div",Ce,[t("button",{onClick:e[2]||(e[2]=u=>s.editedMotCle={}),class:"btn btn-primary"},e[16]||(e[16]=[t("span",{class:"icon-plus-circled"},null,-1),d(" Créer un nouveau mot clé")])),t("button",{onClick:e[3]||(e[3]=u=>s.fusionEnCours=!0),class:"btn btn-primary",style:{"margin-right":"1em"}},e[17]||(e[17]=[t("span",{class:"icon-tags"},null,-1),d(" Fusionner des mots clés")]))]),t("ol",null,[(n(!0),i(v,null,C(s.touslesmotscles,u=>(n(),i("li",null,[t("div",ye,[t("div",null,[t("span",null,"[id : "+r(u.id)+"]",1),e[18]||(e[18]=d()),t("h3",be,r(u.label),1)]),t("div",null,[t("button",{onClick:f=>s.editedMotCle={id:u.id,label:u.label},class:"cardbutton"},e[19]||(e[19]=[t("span",{class:"icon-pencil"},null,-1),d(" Éditer")]),8,fe),t("button",{onClick:f=>s.deleteData=u,class:"cardbutton"},e[20]||(e[20]=[t("span",{class:"icon-trash"},null,-1),d(" Supprimer")]),8,ge)])]),t("div",_e,r(u.activity_count)+" activité"+r(u.activity_count>1?"s":"")+" pour ce mot clé",1)]))),256))]),s.deleteData?(n(),i("div",he,[t("div",Me,[t("h2",ke,[d(" Suppression du mot clé : [id : "+r(s.deleteData.id)+'] "',1),t("span",xe,r(s.deleteData.label),1),e[21]||(e[21]=d('" ? ')),t("span",{class:"overlay-closer",onClick:e[4]||(e[4]=u=>s.deleteData=null)},"X")]),t("p",we,[e[22]||(e[22]=t("i",{class:"icon-attention-1"},null,-1)),d(" Souhaitez-vous supprimer le mot clé : [id : "+r(s.deleteData.id)+"] ",1),t("strong",De,r(s.deleteData.label),1),e[23]||(e[23]=d(" ? ")),e[24]||(e[24]=t("br",null,null,-1)),e[25]||(e[25]=d(" Actuellement attaché à ")),s.deleteData.activity_count>0?(n(),i("span",Le,[t("strong",null,r(s.deleteData.activity_count)+" activité"+r(s.deleteData.activity_count>1?"s":""),1)])):c("",!0),s.deleteData.activity_count==0?(n(),i("span",Ee,"aucune activité")):c("",!0)]),t("div",Se,[t("div",Ae,[t("nav",Ie,[t("button",{class:"btn",onClick:e[5]||(e[5]=u=>s.deleteData=null),style:{"margin-right":"1em"}},e[26]||(e[26]=[t("i",{class:"icon-cancel-alt"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-danger",onClick:e[6]||(e[6]=(...u)=>a.deleteMotCle&&a.deleteMotCle(...u))},e[27]||(e[27]=[t("i",{class:"icon-valid"},null,-1),d(" Confirmer ")]))])])])])])):c("",!0),s.editedMotCle?(n(),i("div",ze,[t("div",Fe,[t("h2",null,[t("small",null,[e[28]||(e[28]=t("i",{class:"icon-doc"},null,-1)),s.editedMotCle.id?c("",!0):(n(),i("span",Ne,"Création d'un nouveau mot clé")),s.editedMotCle.id?(n(),i("span",Te,"Modification d'un mot clé")):c("",!0)]),t("span",{class:"overlay-closer",onClick:e[7]||(e[7]=u=>s.editedMotCle=null)},"X")]),s.editedMotCle.label?c("",!0):(n(),i("div",Ve,e[29]||(e[29]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Veuillez saisir un libellé pour le mot clé ")],-1)]))),a.motCleExisteDeja?(n(),i("div",je,e[30]||(e[30]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Le mot clé saisi existe déjà ")],-1)]))):c("",!0),t("div",qe,[t("div",He,[g(t("input",{maxlength:"128","onUpdate:modelValue":e[8]||(e[8]=u=>s.editedMotCle.label=u),id:"content",class:"form-control",style:{"flex-grow":"2"}},null,512),[[w],[M,s.editedMotCle.label]])])]),t("div",Ke,[t("div",Pe,[t("nav",Xe,[t("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:e[9]||(e[9]=u=>s.editedMotCle=null)},e[31]||(e[31]=[t("i",{class:"icon-cancel-alt"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-success",onClick:e[10]||(e[10]=S(u=>a.applyEdit(),["prevent"])),disabled:!s.editedMotCle.label||a.motCleExisteDeja},e[32]||(e[32]=[t("i",{class:"icon-valid"},null,-1),d(" Enregistrer ")]),8,Be)])])])])])):c("",!0),s.fusionEnCours?(n(),i("div",Ue,[t("div",Re,[h(b,{onClose:e[11]||(e[11]=u=>s.fusionEnCours=!1),onFusion:e[12]||(e[12]=(u,f)=>a.fusionner(u,f)),touslesmotscles:s.touslesmotscles},null,8,["touslesmotscles"])])])):c("",!0)])}const Je=k(ce,[["render",Ge],["__scopeId","data-v-837865bb"]]);let x="#activity-mots-cles-admin",Oe=document.querySelector(x);const Qe=A(Je,{url:Oe.dataset.url});Qe.mount(x); diff --git a/public/js/oscar/vite/dist/assets/activitymotsclesadmin-70f45e39.js b/public/js/oscar/vite/dist/assets/activitymotsclesadmin-70f45e39.js new file mode 100644 index 0000000000000000000000000000000000000000..c22e31db23616c2f9afc8b107b74954f2da3415a --- /dev/null +++ b/public/js/oscar/vite/dist/assets/activitymotsclesadmin-70f45e39.js @@ -0,0 +1 @@ +import{o as n,c as i,d as e,g as u,F as m,k as C,t as c,a as r,w as g,v as x,n as I,l as A,p as w,i as D,s as y,r as M,B as z,b as k,h as F,A as N}from"../vendor.js";import{A as T}from"../vendor14.js";import{L as V}from"../vendor17.js";import{_ as L}from"../vendor7.js";const j={props:{touslesmotscles:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(l=>l.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{affichertouslesmotscles:!1,userInput:"",idMotCleCible:null,motsClesSelectionnes:new Set}},methods:{motCleParId(l){for(const s of this.touslesmotscles)if(s.id==l)return s;return null},onKeyDown(l){if(l.key==="Enter"){l.preventDefault();return}if(l.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(l){!l.target.classList.contains("undetouslesmotscles")&&!l.target.classList.contains("inputNouveauMotCle")&&!l.target.classList.contains("listeDeTousLesMotsCles")&&!l.target.classList.contains("labelDuMotCle")&&(this.affichertouslesmotscles=!1)}},mounted(){document.addEventListener("mousedown",this.onMouseDown)},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},p=l=>(w("data-v-41814f90"),l=l(),D(),l),q=p(()=>e("small",null,[e("i",{class:"icon-doc"}),e("span",null,"Fusionner des mots clés")],-1)),H={key:0,class:"row"},B=p(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Veuillez sélectionner au moins deux mots clés à fusionner ")],-1)),K=[B],P={class:"row",style:{"margin-bottom":"2em"}},X={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},U=p(()=>e("label",{for:"nouveauMotCle"},"Sélectionnez les mots clés à fusionner",-1)),R={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},G={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},J={key:0,class:"selectedmotcle"},O=["onClick"],Q={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},W={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0","z-index":"1051"}},Y={class:"listeDeTousLesMotsCles"},Z=["onClick"],$={class:"labelDuMotCle"},ee={key:0,style:{padding:"6px"}},te={key:1,class:"row"},se=p(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Veuillez sélectionner le nom du mot clé qui remplacera tous les autres après la fusion ")],-1)),le=[se],oe={class:"row"},ne={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},ie=p(()=>e("label",{for:"motCleCible"},"Sélectionnez le nom du mot clé qui remplacera tous les autres après la fusion",-1)),ce=p(()=>e("option",{value:""},null,-1)),re=["value"],de={key:2,class:"row"},ue={style:{"background-color":"#dff0d8","border-color":"#d6e9c6",color:"#3c763d",margin:"1em",padding:"1em"}},ae={style:{"line-break":"anywhere"}},_e={key:0},he={style:{"line-break":"anywhere"}},me={key:0},pe={style:{"line-break":"anywhere"}},ve={class:"row"},Ce={class:"col-md-12"},ye={class:"buttons-bar"},be=p(()=>e("i",{class:"icon-cancel-alt"},null,-1)),fe=["disabled"],ge=p(()=>e("i",{class:"icon-valid"},null,-1));function Me(l,s,h,v,t,a){return n(),i("section",null,[e("h2",null,[q,e("span",{class:"overlay-closer",onClick:s[0]||(s[0]=o=>l.$emit("close"))},"X")]),t.motsClesSelectionnes.size<2?(n(),i("div",H,K)):u("",!0),e("div",P,[e("div",X,[U,e("div",null,[e("span",R,[e("ul",G,[(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)?(n(),i("li",J,[e("span",{onClick:b=>t.motsClesSelectionnes.delete(o.id)},"×",8,O),e("strong",null,c(o.label),1),r(" (id : "+c(o.id)+", "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+") ",1)])):u("",!0)],64))),256)),e("li",Q,[g(e("input",{id:"nouveauMotCle",onFocusin:s[1]||(s[1]=(...o)=>a.clickInput&&a.clickInput(...o)),onClick:s[2]||(s[2]=(...o)=>a.clickInput&&a.clickInput(...o)),onKeydown:s[3]||(s[3]=(...o)=>a.onKeyDown&&a.onKeyDown(...o)),"onUpdate:modelValue":s[4]||(s[4]=o=>t.userInput=o),size:"1",class:"inputNouveauMotCle"},null,544),[[x,t.userInput]])])])]),t.affichertouslesmotscles?(n(),i("div",W,[e("ul",Y,[(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[o.label.toLocaleLowerCase().includes(t.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:I(["undetouslesmotscles",{selected:t.motsClesSelectionnes.has(o.id)}]),onClick:b=>{t.motsClesSelectionnes.has(o.id)?t.motsClesSelectionnes.delete(o.id):t.motsClesSelectionnes.add(o.id),t.affichertouslesmotscles=!1,t.userInput=""}},[e("strong",$,c(o.label),1),r(" (id : "+c(o.id)+", "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+")",1)],10,Z)):u("",!0)],64))),256)),a.aucunMotCleNeCorrespond?(n(),i("li",ee,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)])])]),t.idMotCleCible?u("",!0):(n(),i("div",te,le)),e("div",oe,[e("div",ne,[ie,g(e("select",{id:"motCleCible","onUpdate:modelValue":s[5]||(s[5]=o=>t.idMotCleCible=o)},[ce,(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)?(n(),i("option",{key:0,value:o.id},[e("strong",null,c(o.label),1),r(" (id : "+c(o.id)+", "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+")",1)],8,re)):u("",!0)],64))),256))],512),[[A,t.idMotCleCible]])])]),t.motsClesSelectionnes.size>=2&&t.idMotCleCible?(n(),i("div",de,[e("div",ue,[r(" En cliquant sur fusionner, le mot clé "),e("strong",ae,c(a.motCleParId(t.idMotCleCible).label),1),r(" (id: "+c(t.idMotCleCible)+", "+c(a.motCleParId(t.idMotCleCible).activity_count)+" activité"+c(a.motCleParId(t.idMotCleCible).activity_count>1?"s":"")+") va être ajouté : ",1),e("ul",null,[(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)&&o.id!=t.idMotCleCible?(n(),i("li",_e,[r("aux "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+" ayant le mot clé ",1),e("strong",he,c(o.label),1),r(" (id : "+c(o.id)+")",1)])):u("",!0)],64))),256))]),r(" Ensuite, ces mots clés seront supprimés : "),(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)&&o.id!=t.idMotCleCible?(n(),i("span",me,[e("strong",pe," "+c(o.label),1),r(" (id : "+c(o.id)+")",1)])):u("",!0)],64))),256))])])):u("",!0),e("div",ve,[e("div",Ce,[e("nav",ye,[e("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:s[6]||(s[6]=o=>l.$emit("close"))},[be,r(" Annuler ")]),e("button",{class:"btn btn-success",disabled:t.motsClesSelectionnes.size<2||!t.idMotCleCible,onClick:s[7]||(s[7]=o=>l.$emit("fusion",Array.from(t.motsClesSelectionnes),t.idMotCleCible))},[ge,r(" Fusionner ")],8,fe)])])])])}const ke=L(j,[["render",Me],["__scopeId","data-v-41814f90"]]);const xe={directives:{focus:l=>l.focus()},components:{Loader:V,ActivityMotsClesAdminFusion:ke},props:{url:{default:null}},computed:{motCleExisteDeja(){return this.editedMotCle&&this.editedMotCle.label&&this.touslesmotscles.filter(l=>l.label.toLocaleLowerCase()==this.editedMotCle.label.trim().toLocaleLowerCase()).length>0}},data(){return{touslesmotscles:[],error:null,loading:null,deleteData:null,editedMotCle:null,fusionEnCours:!1}},methods:{fusionner(l,s){this.fusionEnCours=!1,this.loading="Fusion des mots clés",y.post(this.url,{action:"fusion",idsToMerge:l,targetId:s}).then(()=>{this.fetch()},h=>{this.handleError(h)}).finally(()=>{this.loading=null})},applyEdit(){let l="create";this.editedMotCle.id&&(l="update"),this.loading=l=="create"?"Création du mot clé":"Modification du mot clé",y.post(this.url,{action:l,id:this.editedMotCle.id,label:this.editedMotCle.label.trim()}).then(()=>{this.fetch()},s=>{this.handleError(s)}).finally(()=>{this.loading=null,this.editedMotCle=null})},deleteMotCle(){this.loading="Suppression du mot clé",y.post(this.url,{action:"delete",id:this.deleteData.id}).then(()=>{this.touslesmotscles.splice(this.touslesmotscles.findIndex(l=>l.id===this.deleteData.id),1)},l=>{this.handleError(l)}).finally(()=>{this.loading=null,this.deleteData=null})},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?include_activity_count=true").then(l=>{this.touslesmotscles=l.data.motscles,this.loading=null},l=>{this.handleError(l),this.loading=null})},handleError(l){if(!l.response.data){this.error=l;return}if(l.response.headers.get("content-type").includes("text/html")){var s=document.createElement("html");s.innerHTML=l.response.data;const h=s.querySelector('[id="contenu-principal"]');if(h){this.error=h.innerHTML;return}const v=l.response.headers.get("content-length");if(v&&typeof v=="string"&&!isNaN(v)&&Number(v)<1e3){this.error=l.response.data;return}}this.error=T.manageErrorResponse(l)}},mounted(){this.fetch()}},_=l=>(w("data-v-837865bb"),l=l(),D(),l),we={key:0,class:"overlay",style:{"z-index":"101"}},De={class:"overlay-content",style:{"max-width":"50%"}},Le={class:"alert-danger alert"},Se=_(()=>e("i",{class:"icon-attention-1"},null,-1)),Ee=["innerHTML"],Ie=_(()=>e("i",{class:"icon-cancel-outline"},null,-1)),Ae=_(()=>e("h1",null,[e("span",{class:"icon-tags"}),r(" Mots clés")],-1)),ze={style:{display:"flex","flex-direction":"row-reverse"}},Fe=_(()=>e("span",{class:"icon-plus-circled"},null,-1)),Ne=_(()=>e("span",{class:"icon-tags"},null,-1)),Te={class:"title"},Ve={style:{display:"inline","line-break":"anywhere"}},je=["onClick"],qe=_(()=>e("span",{class:"icon-pencil"},null,-1)),He=["onClick"],Be=_(()=>e("span",{class:"icon-trash"},null,-1)),Ke={style:{"padding-left":"1em","padding-bottom":"0.3em"}},Pe={key:1,class:"overlay"},Xe={class:"overlay-content"},Ue={style:{"padding-right":"1em"}},Re={style:{"line-break":"anywhere"}},Ge={class:"alert-danger alert"},Je=_(()=>e("i",{class:"icon-attention-1"},null,-1)),Oe={style:{"line-break":"anywhere"}},Qe=_(()=>e("br",null,null,-1)),We={key:0},Ye={key:1},Ze={class:"row"},$e={class:"col-md-12"},et={class:"buttons-bar"},tt=_(()=>e("i",{class:"icon-cancel-alt"},null,-1)),st=_(()=>e("i",{class:"icon-valid"},null,-1)),lt={key:2,class:"overlay"},ot={class:"overlay-content",style:{display:"flex","flex-direction":"column"}},nt=_(()=>e("i",{class:"icon-doc"},null,-1)),it={key:0},ct={key:1},rt={key:0,class:"row"},dt=_(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Veuillez saisir un libellé pour le mot clé ")],-1)),ut=[dt],at={key:1,class:"row"},_t=_(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Le mot clé saisi existe déjà ")],-1)),ht=[_t],mt={class:"row",style:{"flex-grow":"2"}},pt={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},vt={class:"row"},Ct={class:"col-md-12"},yt={class:"buttons-bar"},bt=_(()=>e("i",{class:"icon-cancel-alt"},null,-1)),ft=["disabled"],gt=_(()=>e("i",{class:"icon-valid"},null,-1)),Mt={key:3,class:"overlay"},kt={class:"overlay-content",style:{display:"flex","flex-direction":"column"}};function xt(l,s,h,v,t,a){const o=M("Loader"),b=M("ActivityMotsClesAdminFusion"),E=z("focus");return n(),i("section",null,[k(o,{visible:t.loading!=null,text:t.loading},null,8,["visible","text"]),t.error?(n(),i("div",we,[e("div",De,[e("h2",null,[r(" Erreur mots clés "),e("span",{class:"overlay-closer",onClick:s[0]||(s[0]=d=>t.error=null)},"X")]),e("div",Le,[Se,e("div",{innerHTML:t.error},null,8,Ee)]),e("button",{class:"btn btn-default",onClick:s[1]||(s[1]=d=>t.error=null)},[Ie,r(" Fermer ")])])])):u("",!0),Ae,e("div",ze,[e("button",{onClick:s[2]||(s[2]=d=>t.editedMotCle={}),class:"btn btn-primary"},[Fe,r(" Créer un nouveau mot clé")]),e("button",{onClick:s[3]||(s[3]=d=>t.fusionEnCours=!0),class:"btn btn-primary",style:{"margin-right":"1em"}},[Ne,r(" Fusionner des mots clés")])]),e("ol",null,[(n(!0),i(m,null,C(t.touslesmotscles,d=>(n(),i("li",null,[e("div",Te,[e("div",null,[e("span",null,"[id : "+c(d.id)+"]",1),r(),e("h3",Ve,c(d.label),1)]),e("div",null,[e("button",{onClick:f=>t.editedMotCle={id:d.id,label:d.label},class:"cardbutton"},[qe,r(" Éditer")],8,je),e("button",{onClick:f=>t.deleteData=d,class:"cardbutton"},[Be,r(" Supprimer")],8,He)])]),e("div",Ke,c(d.activity_count)+" activité"+c(d.activity_count>1?"s":"")+" pour ce mot clé",1)]))),256))]),t.deleteData?(n(),i("div",Pe,[e("div",Xe,[e("h2",Ue,[r(" Suppression du mot clé : [id : "+c(t.deleteData.id)+'] "',1),e("span",Re,c(t.deleteData.label),1),r('" ? '),e("span",{class:"overlay-closer",onClick:s[4]||(s[4]=d=>t.deleteData=null)},"X")]),e("p",Ge,[Je,r(" Souhaitez-vous supprimer le mot clé : [id : "+c(t.deleteData.id)+"] ",1),e("strong",Oe,c(t.deleteData.label),1),r(" ? "),Qe,r(" Actuellement attaché à "),t.deleteData.activity_count>0?(n(),i("span",We,[e("strong",null,c(t.deleteData.activity_count)+" activité"+c(t.deleteData.activity_count>1?"s":""),1)])):u("",!0),t.deleteData.activity_count==0?(n(),i("span",Ye,"aucune activité")):u("",!0)]),e("div",Ze,[e("div",$e,[e("nav",et,[e("button",{class:"btn",onClick:s[5]||(s[5]=d=>t.deleteData=null),style:{"margin-right":"1em"}},[tt,r(" Annuler ")]),e("button",{class:"btn btn-danger",onClick:s[6]||(s[6]=(...d)=>a.deleteMotCle&&a.deleteMotCle(...d))},[st,r(" Confirmer ")])])])])])])):u("",!0),t.editedMotCle?(n(),i("div",lt,[e("div",ot,[e("h2",null,[e("small",null,[nt,t.editedMotCle.id?u("",!0):(n(),i("span",it,"Création d'un nouveau mot clé")),t.editedMotCle.id?(n(),i("span",ct,"Modification d'un mot clé")):u("",!0)]),e("span",{class:"overlay-closer",onClick:s[7]||(s[7]=d=>t.editedMotCle=null)},"X")]),t.editedMotCle.label?u("",!0):(n(),i("div",rt,ut)),a.motCleExisteDeja?(n(),i("div",at,ht)):u("",!0),e("div",mt,[e("div",pt,[g(e("input",{maxlength:"128","onUpdate:modelValue":s[8]||(s[8]=d=>t.editedMotCle.label=d),id:"content",class:"form-control",style:{"flex-grow":"2"}},null,512),[[E],[x,t.editedMotCle.label]])])]),e("div",vt,[e("div",Ct,[e("nav",yt,[e("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:s[9]||(s[9]=d=>t.editedMotCle=null)},[bt,r(" Annuler ")]),e("button",{class:"btn btn-success",onClick:s[10]||(s[10]=F(d=>a.applyEdit(),["prevent"])),disabled:!t.editedMotCle.label||a.motCleExisteDeja},[gt,r(" Enregistrer ")],8,ft)])])])])])):u("",!0),t.fusionEnCours?(n(),i("div",Mt,[e("div",kt,[k(b,{onClose:s[11]||(s[11]=d=>t.fusionEnCours=!1),onFusion:s[12]||(s[12]=(d,f)=>a.fusionner(d,f)),touslesmotscles:t.touslesmotscles},null,8,["touslesmotscles"])])])):u("",!0)])}const wt=L(xe,[["render",xt],["__scopeId","data-v-837865bb"]]);let S="#activity-mots-cles-admin",Dt=document.querySelector(S);const Lt=N(wt,{url:Dt.dataset.url});Lt.mount(S); diff --git a/public/js/oscar/vite/dist/assets/activitynotes-e551577c.js b/public/js/oscar/vite/dist/assets/activitynotes-fbb89777.js similarity index 86% rename from public/js/oscar/vite/dist/assets/activitynotes-e551577c.js rename to public/js/oscar/vite/dist/assets/activitynotes-fbb89777.js index ca898409a4d2b5fc2f3488b3c7f2138aac263202..8282a440f1021272b58d90f1204a010e96d73386 100644 --- a/public/js/oscar/vite/dist/assets/activitynotes-e551577c.js +++ b/public/js/oscar/vite/dist/assets/activitynotes-fbb89777.js @@ -1 +1 @@ -import{y as t}from"../vendor.js";import{A as o}from"../vendor12.js";import"../vendor17.js";import"../vendor7.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";let e="#activity-notes",a=document.querySelector(e);const l=t(o,{activityid:a.dataset.activityid,url:a.dataset.url,showallowed:a.dataset.showallowed=="1",manageuserallowed:a.dataset.manageuserallowed=="1",manageadminallowed:a.dataset.manageadminallowed=="1",userid:a.dataset.userid});l.mount(e); +import{A as t}from"../vendor.js";import{A as o}from"../vendor12.js";import"../vendor17.js";import"../vendor7.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";let e="#activity-notes",a=document.querySelector(e);const l=t(o,{activityid:a.dataset.activityid,url:a.dataset.url,showallowed:a.dataset.showallowed=="1",manageuserallowed:a.dataset.manageuserallowed=="1",manageadminallowed:a.dataset.manageadminallowed=="1",userid:a.dataset.userid});l.mount(e); diff --git a/public/js/oscar/vite/dist/assets/activitypcruinformations-563c4a56.js b/public/js/oscar/vite/dist/assets/activitypcruinformations-563c4a56.js new file mode 100644 index 0000000000000000000000000000000000000000..066248bc6dea5a74a420b4cfa6ac4af0721b5f86 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/activitypcruinformations-563c4a56.js @@ -0,0 +1 @@ +import{s as D,q as v,r as T,o as u,c as a,b as V,j as N,d as e,g as c,a as l,t as s,F as p,k as f,h as K,n as m,w as d,f as h,v as P,l as _,z as I,A as X}from"../vendor.js";import{A as O}from"../vendor14.js";import{L as W}from"../vendor17.js";import{M as J}from"../vendor5.js";import{_ as Q}from"../vendor7.js";D.defaults.headers.common.Accept="application/json";D.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const Z={name:"ActivityPcruInformations",components:{Loader:W,Modal:J},props:{urlActivity:{required:!0},urlPcruApi:{required:!0}},computed:{objetErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.objet||this.pcru.activityPcruInformations.objet.trim()==""?i.push("Le champ Objet est obligatoire et doit être défini"):this.pcru.activityPcruInformations.objet.trim().length>1e3&&i.push("Le champ Objet doit faire moins de 1000 caractères"),this.objetAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.objetErreurs))]),i},objetErreurs(){return this.pcru.activityPcruInformations.utiliserObjetParDefaut?this.pcru.pcruInformationParDefaut.objetErreurs:this.objetErreursPasParDefaut},labintelErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.labintel||this.pcru.activityPcruInformations.labintel.trim()==""?i.push("Le champ CodeLabintelUnite est obligatoire et doit être défini"):this.pcru.activityPcruInformations.labintel.trim().length>10&&i.push("Le champ CodeLabintelUnite doit faire moins de 10 caractères"),this.labintelAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.labintelErreurs))]),i},labintelErreurs(){return this.pcru.activityPcruInformations.utiliserLabintelParDefaut?this.pcru.pcruInformationParDefaut.labintelErreurs:this.labintelErreursPasParDefaut},rnsrErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.rnsr&&this.pcru.activityPcruInformations.rnsr.trim().length>this.pcru.rnsrMaxLength&&i.push("Le champ CodeRNSRUnite doit faire moins de "+this.pcru.rnsrMaxLength+" caractères"),this.rnsrAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.rnsrErreurs))]),i},rnsrErreurs(){return this.pcru.activityPcruInformations.utiliserRnsrParDefaut?this.pcru.pcruInformationParDefaut.rnsrErreurs:this.rnsrErreursPasParDefaut},sigleErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.sigle&&this.pcru.activityPcruInformations.sigle.trim().length>20&&i.push("Le champ SigleUnite doit faire moins de 20 caractères"),this.sigleAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.sigleErreurs))]),i},sigleErreurs(){return this.pcru.activityPcruInformations.utiliserSigleParDefaut?this.pcru.pcruInformationParDefaut.sigleErreurs:this.sigleErreursPasParDefaut},numContratErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.numContrat||this.pcru.activityPcruInformations.numContrat.trim()==""?i.push("Le champ ReferenceGestionnaire est obligatoire et doit être défini"):this.pcru.activityPcruInformations.numContrat.trim().length>30&&i.push("Le champ ReferenceGestionnaire doit faire moins de 30 caractères"),this.numContratAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.numContratErreurs))]),i},numContratErreurs(){return this.pcru.activityPcruInformations.utiliserNumContratParDefaut?this.pcru.pcruInformationParDefaut.numContratErreurs:this.numContratErreursPasParDefaut},equipeErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.equipe&&this.pcru.activityPcruInformations.equipe.trim().length>150&&i.push("Le champ Equipe doit faire moins de 150 caractères"),this.equipeAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.equipeErreurs))]),i},typeContratErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.pcruTypeContractId||i.push("Le champ TypeContrat est obligatoire et doit être défini"),this.typeContratAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.typeContratErreurs))]),i},typeContratErreurs(){return this.pcru.activityPcruInformations.utiliserTypeContratParDefaut?this.pcru.pcruInformationParDefaut.typeContratErreurs:this.typeContratErreursPasParDefaut},acronymeErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.acronyme&&this.pcru.activityPcruInformations.acronyme.trim().length>50&&i.push("Le champ Acronyme doit faire moins de 50 caractères"),this.acronymeAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.acronymeErreurs))]),i},acronymeErreurs(){return this.pcru.activityPcruInformations.utiliserAcronymeParDefaut?this.pcru.pcruInformationParDefaut.acronymeErreurs:this.acronymeErreursPasParDefaut},contratsAssociesErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.contratsAssocies&&this.pcru.activityPcruInformations.contratsAssocies.trim().length>300&&i.push("Le champ ContratsAssocies doit faire moins de 300 caractères"),this.contratsAssociesAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.contratsAssociesErreurs))]),i},responsableScientifiqueErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.responsableScientifique||this.pcru.activityPcruInformations.responsableScientifique.trim()==""?i.push("Le champ NomRespScientifique est obligatoire et doit être défini"):this.pcru.activityPcruInformations.responsableScientifique.trim().length>50&&i.push("Le champ NomRespScientifique doit faire moins de 50 caractères"),this.responsableScientifiqueAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.responsableScientifiqueErreurs))]),i},responsableScientifiqueErreurs(){return this.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut?this.pcru.pcruInformationParDefaut.responsableScientifiqueErreurs:this.responsableScientifiqueErreursPasParDefaut},employeurResponsableScientifiqueErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.employeurResponsableScientifique&&this.pcru.activityPcruInformations.employeurResponsableScientifique.trim().length>50&&i.push("Le champ EmployeurRespScientifique doit faire moins de 150 caractères"),this.employeurResponsableScientifiqueAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.employeurResponsableScientifiqueErreurs))]),i},partenairesErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.partenaires&&this.pcru.activityPcruInformations.partenaires.trim().length>200&&i.push("Le champ Partenaires doit faire moins de 200 caractères"),this.partenairesAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.partenairesErreurs))]),i},partenairesErreurs(){return this.pcru.activityPcruInformations.utiliserPartenairesParDefaut?this.pcru.pcruInformationParDefaut.partenairesErreurs:this.partenairesErreursPasParDefaut},partenairePrincipalErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.partenairePrincipal||this.pcru.activityPcruInformations.partenairePrincipal.trim()==""?i.push("Le champ PartenairePrincipal est obligatoire et doit être défini"):this.pcru.activityPcruInformations.partenairePrincipal.trim().length>this.pcru.partenairePrincipalMaxLength&&i.push("Le champ PartenairePrincipal doit faire moins de "+this.pcru.partenairePrincipalMaxLength+" caractères"),this.partenairePrincipalAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.partenairePrincipalErreurs))]),i},partenairePrincipalErreurs(){return this.pcru.activityPcruInformations.utiliserPartenairePrincipalParDefaut?this.pcru.pcruInformationParDefaut.partenairePrincipalErreurs:this.partenairePrincipalErreursPasParDefaut},idPartenairePrincipalErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.idPartenairePrincipal||this.pcru.activityPcruInformations.idPartenairePrincipal.trim()==""?i.push("Le champ IdPrincipal est obligatoire et doit être défini"):this.pcru.activityPcruInformations.idPartenairePrincipal&&this.pcru.activityPcruInformations.idPartenairePrincipal.trim().length>this.pcru.idPartenairePrincipalMaxLength&&i.push("Le champ IdPrincipal doit faire moins de "+this.pcru.idPartenairePrincipalMaxLength+" caractères"),this.idPartenairePrincipalAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.idPartenairePrincipalErreurs))]),i},idPartenairePrincipalErreurs(){return this.pcru.activityPcruInformations.utiliserIdPartenairePrincipalParDefaut?this.pcru.pcruInformationParDefaut.idPartenairePrincipalErreurs:this.idPartenairePrincipalErreursPasParDefaut},lieuExecutionErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.lieuExecution&&this.pcru.activityPcruInformations.lieuExecution.trim().length>this.pcru.lieuExecutionMaxLength&&i.push("Le champ LieuExecution doit faire moins de "+this.pcru.lieuExecutionMaxLength+" caractères"),this.lieuExecutionAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.lieuExecutionErreurs))]),i},dateDerniereSignatureErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.dateDerniereSignature||this.pcru.activityPcruInformations.dateDerniereSignature.trim()==""?i.push("Le champ DateDerniereSignature est obligatoire et doit être défini"):v(this.pcru.activityPcruInformations.dateDerniereSignature,"DD-MM-YYYY",!0).isValid()||i.push("Le champ DateDerniereSignature doit être une date valide au format jj-mm-aaaa"),this.dateDerniereSignatureAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.dateDerniereSignatureErreurs))]),i},dateDerniereSignatureErreurs(){return this.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut?this.pcru.pcruInformationParDefaut.dateDerniereSignatureErreurs:this.dateDerniereSignatureErreursPasParDefaut},dureeErreursPasParDefaut(){let i=[];if(this.pcru.activityPcruInformations.duree!=null&&this.pcru.activityPcruInformations.duree!=""){this.pcru.activityPcruInformations.duree>999.5&&i.push("Le champ Duree contient une valeur trop grande."),this.pcru.activityPcruInformations.duree<.5&&i.push("Le champ Duree ne peut pas être plus petit que 0,5 mois.");const n=Math.abs(this.pcru.activityPcruInformations.duree-Math.trunc(this.pcru.activityPcruInformations.duree));n!=0&&n!=.5&&i.push("Si le champ Duree doit avoir une valeur après la virgule, ça ne peut être que 0,5")}else(this.pcru.activityPcruInformations.utiliserDateFinParDefaut&&(!this.pcru.pcruInformationParDefaut.dateFin||this.pcru.pcruInformationParDefaut.dateFin.trim()=="")||!this.pcru.activityPcruInformations.utiliserDateFinParDefaut&&(!this.pcru.activityPcruInformations.dateFin||this.pcru.activityPcruInformations.dateFin.trim()==""))&&i.push("Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être.");return this.dureeAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.dureeErreurs))]),i},dateDebutErreursPasParDefaut(){let i=[];return!this.pcru.activityPcruInformations.dateDebut||this.pcru.activityPcruInformations.dateDebut.trim()==""?i.push("Le champ DateDebut est obligatoire et doit être défini"):v(this.pcru.activityPcruInformations.dateDebut,"DD-MM-YYYY",!0).isValid()||i.push("Le champ DateDebut doit être une date valide au format jj-mm-aaaa"),this.dateDebutAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.dateDebutErreurs))]),i},dateDebutErreurs(){return this.pcru.activityPcruInformations.utiliserDateDebutParDefaut?this.pcru.pcruInformationParDefaut.dateDebutErreurs:this.dateDebutErreursPasParDefaut},dateFinErreursParDefaut(){let i=this.pcru.pcruInformationParDefaut.dateFinErreurs;if(this.dateDebutErreurs.length==0&&this.pcru.pcruInformationParDefaut.dateFin&&v(this.pcru.pcruInformationParDefaut.dateFin,"DD-MM-YYYY",!0).isValid()){let n=this.pcru.pcruInformationParDefaut.dateDebut;this.pcru.activityPcruInformations.utiliserDateDebutParDefaut||(n=this.pcru.activityPcruInformations.dateDebut);const y=v(n,"DD-MM-YYYY",!0);v(this.pcru.pcruInformationParDefaut.dateFin,"DD-MM-YYYY",!0).isBefore(y)?i=[...new Set(i.concat(["La date de fin doit être postérieure à la date de début"]))]:i=i.filter(t=>t!=="La date de fin doit être postérieure à la date de début")}return this.pcru.activityPcruInformations.duree?i=i.filter(n=>n!=="Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."):this.pcru.pcruInformationParDefaut.dateFin||(i=[...new Set(i.concat(["Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."]))]),i},dateFinErreursPasParDefaut(){let i=[];if(!this.pcru.activityPcruInformations.dateFin&&!this.pcru.activityPcruInformations.duree&&i.push("Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."),this.pcru.activityPcruInformations.dateFin&&this.pcru.activityPcruInformations.dateFin.trim()!=""&&!v(this.pcru.activityPcruInformations.dateFin,"DD-MM-YYYY",!0).isValid()&&i.push("Le champ DateFin doit être une date valide au format jj-mm-aaaa"),i.length==0&&this.dateDebutErreurs.length==0){let n=this.pcru.pcruInformationParDefaut.dateDebut;this.pcru.activityPcruInformations.utiliserDateDebutParDefaut||(n=this.pcru.activityPcruInformations.dateDebut);const y=v(n,"DD-MM-YYYY",!0);v(this.pcru.activityPcruInformations.dateFin,"DD-MM-YYYY",!0).isBefore(y)&&i.push("La date de fin doit être postérieure à la date de début")}return this.dateFinAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.dateFinErreurs))]),i},dateFinErreurs(){return this.pcru.activityPcruInformations.utiliserDateFinParDefaut?this.dateFinErreursParDefaut:this.dateFinErreursPasParDefaut},montantPercuUniteErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.montantPercuUnite==null||typeof this.pcru.activityPcruInformations.montantPercuUnite!="number"?i.push("Le champ MontantPercuUnite est obligatoire et doit être défini"):this.pcru.activityPcruInformations.montantPercuUnite!=null&&this.pcru.activityPcruInformations.montantPercuUnite!=""&&(this.pcru.activityPcruInformations.montantPercuUnite>999999999999e-2&&i.push("Le champ MontantPercuUnite contient une valeur trop grande."),this.pcru.activityPcruInformations.montantPercuUnite<-999999999999e-2&&i.push("Le champ MontantPercuUnite contient une valeur trop petite.")),this.montantPercuUniteAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.montantPercuUniteErreurs))]),i},contributionFinanceurErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.contributionFinanceur!=null&&typeof this.pcru.activityPcruInformations.contributionFinanceur=="number"&&this.pcru.activityPcruInformations.contributionFinanceur!=""&&(this.pcru.activityPcruInformations.contributionFinanceur>999999999999e-2&&i.push("Le champ ContributionFinanceur contient une valeur trop grande."),this.pcru.activityPcruInformations.contributionFinanceur<-999999999999e-2&&i.push("Le champ ContributionFinanceur contient une valeur trop petite.")),this.contributionFinanceurAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.contributionFinanceurErreurs))]),i},montantTotalErreurs(){return this.pcru.activityPcruInformations.utiliserMontantTotalParDefaut?this.pcru.pcruInformationParDefaut.montantTotalErreurs:[]},commentairesErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.commentaires&&this.pcru.activityPcruInformations.commentaires.trim().length>this.pcru.commentairesMaxLength&&i.push("Le champ Commentaire doit faire moins de "+this.pcru.commentairesMaxLength+" caractères"),this.commentairesAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.commentairesErreurs))]),i},referenceErreursPasParDefaut(){let i=[];return this.pcru.activityPcruInformations.reference&&this.pcru.activityPcruInformations.reference.trim().length>this.pcru.referenceMaxLength&&i.push("Le champ ReferenceNonGestionnaire doit faire moins de "+this.pcru.referenceMaxLength+" caractères"),this.referenceAfficherLesErreursServeur&&(i=[...new Set(i.concat(this.pcru.activityPcruInformations.referenceErreurs))]),i},referenceErreurs(){return this.pcru.activityPcruInformations.utiliserReferenceParDefaut?this.pcru.pcruInformationParDefaut.referenceErreurs:this.referenceErreursPasParDefaut},toutesLesErreurs(){return this.objetErreurs.concat(this.labintelErreurs.concat(this.rnsrErreurs.concat(this.sigleErreurs.concat(this.numContratErreurs.concat(this.equipeErreursPasParDefaut.concat(this.typeContratErreurs.concat(this.acronymeErreurs.concat(this.contratsAssociesErreursPasParDefaut.concat(this.responsableScientifiqueErreurs.concat(this.employeurResponsableScientifiqueErreursPasParDefaut.concat(this.partenairesErreurs.concat(this.partenairePrincipalErreurs.concat(this.idPartenairePrincipalErreurs.concat(this.pcru.pcruInformationParDefaut.sourceFinancementErreurs.concat(this.lieuExecutionErreursPasParDefaut.concat(this.dateDerniereSignatureErreurs.concat(this.dureeErreursPasParDefaut.concat(this.dateDebutErreurs.concat(this.dateFinErreurs.concat(this.montantPercuUniteErreursPasParDefaut.concat(this.contributionFinanceurErreursPasParDefaut.concat(this.montantTotalErreurs.concat(this.pcru.pcruInformationParDefaut.poleCompetitiviteErreurs.concat(this.commentairesErreursPasParDefaut.concat(this.referenceErreurs)))))))))))))))))))))))))},erreursCoteServeur(){return this.pcru.enErreur}},data(){return{loading:"",error:null,pcru:null,objetAfficherLesErreursServeur:!0,labintelAfficherLesErreursServeur:!0,rnsrAfficherLesErreursServeur:!0,sigleAfficherLesErreursServeur:!0,numContratAfficherLesErreursServeur:!0,equipeAfficherLesErreursServeur:!0,typeContratAfficherLesErreursServeur:!0,acronymeAfficherLesErreursServeur:!0,contratsAssociesAfficherLesErreursServeur:!0,responsableScientifiqueAfficherLesErreursServeur:!0,employeurResponsableScientifiqueAfficherLesErreursServeur:!0,partenairesAfficherLesErreursServeur:!0,partenairePrincipalAfficherLesErreursServeur:!0,idPartenairePrincipalAfficherLesErreursServeur:!0,lieuExecutionAfficherLesErreursServeur:!0,dateDerniereSignatureAfficherLesErreursServeur:!0,dureeAfficherLesErreursServeur:!0,dateDebutAfficherLesErreursServeur:!0,dateFinAfficherLesErreursServeur:!0,montantPercuUniteAfficherLesErreursServeur:!0,contributionFinanceurAfficherLesErreursServeur:!0,montantTotalAfficherLesErreursServeur:!0,commentairesAfficherLesErreursServeur:!0,referenceAfficherLesErreursServeur:!0,activityId:null,envoiActif:!1,core:null,budget:null}},methods:{formatDate(i){return new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"medium"}).format(Date.parse(i))},checkObjetParDefaut(i){this.pcru.activityPcruInformations.utiliserObjetParDefaut?this.pcru.activityPcruInformations.objet=null:(this.pcru.activityPcruInformations.objet=this.pcru.pcruInformationParDefaut.objet.substring(0,1e3),document.getElementById("objet").focus())},checkLabintelParDefaut(i){this.pcru.activityPcruInformations.labintel=null,this.pcru.activityPcruInformations.utiliserLabintelParDefaut||(this.pcru.pcruInformationParDefaut.labintel!=null&&(this.pcru.activityPcruInformations.labintel=this.pcru.pcruInformationParDefaut.labintel.substring(0,10)),document.getElementById("labintel").focus())},checkRnsrParDefaut(i){this.pcru.activityPcruInformations.rnsr=null,this.pcru.activityPcruInformations.utiliserRnsrParDefaut||(this.pcru.pcruInformationParDefaut.rnsr!=null&&(this.pcru.activityPcruInformations.rnsr=this.pcru.pcruInformationParDefaut.rnsr.substring(0,this.pcru.dateRetourOKMaisContratManquantaxLength)),document.getElementById("rnsr").focus())},checkSigleParDefaut(i){this.pcru.activityPcruInformations.sigle=null,this.pcru.activityPcruInformations.utiliserSigleParDefaut||(this.pcru.pcruInformationParDefaut.sigle!=null&&(this.pcru.activityPcruInformations.sigle=this.pcru.pcruInformationParDefaut.sigle.substring(0,20)),document.getElementById("sigleunite").focus())},checkNumContratParDefaut(i){this.pcru.activityPcruInformations.numContrat=null,this.pcru.activityPcruInformations.utiliserNumContratParDefaut||(this.pcru.pcruInformationParDefaut.numContrat!=null&&(this.pcru.activityPcruInformations.numContrat=this.pcru.pcruInformationParDefaut.numContrat.substring(0,30)),document.getElementById("numcontrat").focus())},checkTypeContratParDefaut(i){this.pcru.activityPcruInformations.pcruTypeContractId=null,this.pcru.activityPcruInformations.utiliserTypeContratParDefaut||(this.pcru.pcruInformationParDefaut.typeContratId!=null&&(this.pcru.activityPcruInformations.pcruTypeContractId=this.pcru.pcruInformationParDefaut.typeContratId),document.getElementById("typeContrat").focus())},checkAcronymeParDefaut(i){this.pcru.activityPcruInformations.utiliserAcronymeParDefaut?this.pcru.activityPcruInformations.acronyme=null:(this.pcru.activityPcruInformations.acronyme=this.pcru.pcruInformationParDefaut.acronyme.substring(0,50),document.getElementById("acronyme").focus())},checkResponsableScientifiqueParDefaut(i){this.pcru.activityPcruInformations.responsableScientifique=null,this.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut||(this.pcru.pcruInformationParDefaut.responsableScientifique!=null&&(this.pcru.activityPcruInformations.responsableScientifique=this.pcru.pcruInformationParDefaut.responsableScientifique.substring(0,50)),document.getElementById("responsableScientifique").focus())},checkPartenairesParDefaut(i){this.pcru.activityPcruInformations.partenaires=null,this.pcru.activityPcruInformations.utiliserPartenairesParDefaut||(this.pcru.pcruInformationParDefaut.partenaires!=null&&(this.pcru.activityPcruInformations.partenaires=this.pcru.pcruInformationParDefaut.partenaires.substring(0,200)),document.getElementById("partenaires").focus())},checkPartenairePrincipalParDefaut(i){this.pcru.activityPcruInformations.partenairePrincipal=null,this.pcru.activityPcruInformations.utiliserPartenairePrincipalParDefaut||(this.pcru.pcruInformationParDefaut.partenairePrincipal!=null&&(this.pcru.activityPcruInformations.partenairePrincipal=this.pcru.pcruInformationParDefaut.partenairePrincipal.substring(0,this.pcru.partenairePrincipalMaxLength)),document.getElementById("partenairePrincipal").focus())},checkIdPartenairePrincipalParDefaut(i){this.pcru.activityPcruInformations.idPartenairePrincipal=null,this.pcru.activityPcruInformations.utiliserIdPartenairePrincipalParDefaut||(this.pcru.pcruInformationParDefaut.idPartenairePrincipal!=null&&(this.pcru.activityPcruInformations.idPartenairePrincipal=this.pcru.pcruInformationParDefaut.idPartenairePrincipal.substring(0,this.pcru.idPartenairePrincipalMaxLength)),document.getElementById("idPartenairePrincipal").focus())},checkDateDerniereSignatureParDefaut(i){this.pcru.activityPcruInformations.dateDerniereSignature=null,this.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut||(this.pcru.pcruInformationParDefaut.dateDerniereSignature!=null&&(this.pcru.activityPcruInformations.dateDerniereSignature=this.pcru.pcruInformationParDefaut.dateDerniereSignature.substring(0,10)),document.getElementById("dateDerniereSignature").focus())},checkDateDebutParDefaut(i){this.pcru.activityPcruInformations.dateDebut=null,this.pcru.activityPcruInformations.utiliserDateDebutParDefaut||(this.pcru.pcruInformationParDefaut.dateDebut!=null&&(this.pcru.activityPcruInformations.dateDebut=this.pcru.pcruInformationParDefaut.dateDebut.substring(0,10)),document.getElementById("dateDebut").focus())},checkDateFinParDefaut(i){this.pcru.activityPcruInformations.dateFin=null,this.pcru.activityPcruInformations.utiliserDateFinParDefaut||(this.pcru.pcruInformationParDefaut.dateFin!=null&&(this.pcru.activityPcruInformations.dateFin=this.pcru.pcruInformationParDefaut.dateFin.substring(0,10)),document.getElementById("dateFin").focus())},checkMontantTotalParDefaut(i){this.pcru.activityPcruInformations.montantTotal=null,this.pcru.activityPcruInformations.utiliserMontantTotalParDefaut||(this.pcru.pcruInformationParDefaut.montantTotal!==null&&(this.pcru.activityPcruInformations.montantTotal=this.pcru.pcruInformationParDefaut.montantTotal),document.getElementById("montantTotal").focus())},checkReferenceParDefaut(i){this.pcru.activityPcruInformations.reference=null,this.pcru.activityPcruInformations.utiliserReferenceParDefaut||(this.pcru.pcruInformationParDefaut.reference!=null&&(this.pcru.activityPcruInformations.reference=this.pcru.pcruInformationParDefaut.reference.substring(0,this.pcru.referenceMaxLength)),document.getElementById("reference").focus())},enregistrer(i){this.loading="Enregistrement des informations PCRU",D.post(this.urlPcruApi,{action:"enregistrer",activityId:this.activityId,activityPcruInformations:this.pcru.activityPcruInformations}).then(n=>{this.pcru=n.data.pcru,this.envoiActif=this.pcru.activityPcruInformations.envoiActif},n=>{this.handlerError(O.manageErrorResponse(n)),this.fetch()}).finally(()=>{this.loading=""})},handlerError(i){this.error=i.message},fetch(){this.loading="Chargement des informations de l'activité",D.get(this.urlActivity).then(i=>{this.core=i.data.activity.datas.core,this.budget=i.data.activity.datas.budget,this.activityId=i.data.activity.datas.core.id,this.pcru=i.data.activity.datas.pcru,this.envoiActif=this.pcru.activityPcruInformations.envoiActif},i=>{this.handlerError(O.manageErrorResponse(i))}).finally(i=>{this.loading=""})}},mounted(){this.fetch()}},$={class:"alert alert-danger"},ee={style:{display:"flex","justify-content":"space-between"}},te=e("h1",null,"Informations PCRU",-1),re={style:{"align-content":"center"}},ie=["href"],ne={key:0},ue={key:0,style:{padding:"1em"},class:"warning"},ae={key:1,style:{"margin-top":"1em",padding:"1em"},class:"warning"},se=e("b",null,"pas activé",-1),oe={key:2,class:"info",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},ce={key:3,class:"error",style:{"margin-top":"1em"}},le={key:4,class:"success",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},pe={key:5,class:"success",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},fe={key:6,class:"warning",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},de={key:7,class:"success",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},me={key:8,style:{padding:"1em","margin-top":"1em"},class:"error"},Pe={key:9,style:{padding:"1em","margin-top":"1em"},class:"warning"},he=["href"],ve={key:10,style:{padding:"1em","margin-top":"1em"},class:"error"},ye=e("b",null,"PCRU n'a pas réussi à intégrer automatiquement cette activité",-1),_e={style:{"margin-left":"1em","margin-top":"1em"}},De={key:11},Ie=e("div",{style:{display:"flex","justify-content":"space-between"}},[e("h2",null,"Historique")],-1),be={key:0},ge={key:1},Ee={key:2},Se={key:3},Le={key:12},Ce=e("div",{style:{display:"flex","justify-content":"space-between"}},[e("h2",null,"Données envoyées à PCRU")],-1),xe={id:"donnees-envoyees-table"},Re=I('Intitulé PCRUDescription PCRUOrigine de la valeur par défaut dans OscarValeur envoyée1Le titre/l’objet du contratL'intitulé de l'activité',9),ke={style:{"font-weight":"bold"}},Ae=e("span",null,"2",-1),qe=e("label",null,"CodeLabintelUnite",-1),Ue=e("span",null,"Le code gestionnaire (ex : codeLabintel) ou le code RNSR de l'unité du contrat",-1),je={style:{"font-weight":"bold"}},we=e("span",null,"3",-1),Fe=e("label",null,"CodeRNSRUnite",-1),Me=e("span",null,"Le répertoire national des structures de recherche",-1),Te={style:{"font-weight":"bold"}},Ve=e("span",null,"4",-1),Ne=e("label",null,"SigleUnite",-1),Oe=e("span",null,"Le sigle de l’unité du contrat",-1),Ye={style:{"font-weight":"bold"}},Be=e("span",null,"5",-1),ze=e("label",null,"ReferenceGestionnaire",-1),Ge=e("span",null,"La référence du contrat pour la tutelle qui en assure la gestion. Ce numéro ne peut être modifié que par les personnes appartenant à l’organisme gestionnaire.",-1),He=e("span",null,"N° Oscar",-1),Ke={style:{"font-weight":"bold"}},Xe=e("span",null,"6",-1),We=e("label",null,"Equipe",-1),Je=e("span",null,"Le nom de l’équipe concernée par le contrat (ou de la sous-unité)",-1),Qe=e("span",null,"Pas de valeur par défaut",-1),Ze={style:{"font-weight":"bold"}},$e=e("span",null,"7",-1),et=e("label",null,"TypeContrat",-1),tt=e("span",null,"Le type du contrat parmi la liste PCRU ",-1),rt=e("span",null,"Configuration des correspondances entre les types d'activités Oscar et les types de contrat PCRU",-1),it={style:{"font-weight":"bold"}},nt=e("span",null,"8",-1),ut=e("label",null,"Acronyme",-1),at=e("span",null,"L’acronyme du contrat",-1),st=e("span",null,"L'acronyme du projet de l'activité",-1),ot={style:{"font-weight":"bold"}},ct=e("span",null,"9",-1),lt=e("label",null,"ContratsAssocies",-1),pt=e("span",null,"Numéros de tutelle Gestionnaire des contrats associés séparés par une barre verticale (« | »)",-1),ft=e("span",null,"Pas de valeur par défaut",-1),dt={style:{"font-weight":"bold"}},mt=e("span",null,"10",-1),Pt=e("label",null,"NomRespScientifique",-1),ht=e("span",null,"Le nom du Responsable Scientifique",-1),vt={style:{"font-weight":"bold"}},yt=e("span",null,"11",-1),_t=e("label",null,"EmployeurRespScientifique",-1),Dt=e("span",null,"L'employeur du Responsable Scientifique",-1),It=e("span",null,"Pas de valeur par défaut",-1),bt={style:{"font-weight":"bold"}},gt=e("span",null,"12",-1),Et=e("label",null,"RespScientifiqueEstCoordonnateur",-1),St=e("span",null,"Indique si le responsable scientifique est aussi coordinateur du consortium",-1),Lt=e("span",null,"Pas de valeur par défaut",-1),Ct={style:{"font-weight":"bold"}},xt=e("span",null,"13",-1),Rt=e("label",null,"Partenaires",-1),kt=e("span",null,"Ensemble de partenaires du contrat séparés par une barre verticale (« | »)",-1),At={style:{"font-weight":"bold"}},qt=e("span",null,"14",-1),Ut=e("label",null,"PartenairePrincipal",-1),jt=e("span",null,"Le nom du Partenaire Principal",-1),wt={style:{"font-weight":"bold"}},Ft=e("span",null,"15",-1),Mt=e("label",null,"IdPrincipal",-1),Tt=e("span",null,"L'identifiant du Partenaire Principal (Référence du référentiel partenaire ou SIRET ou SIREN ou TVA intracommunautaire ou DUN)",-1),Vt=e("span",null,"Le SIRET ou le numéro de TVA intracommunautaire ou le N°DUNS du partenaire principal",-1),Nt={style:{"font-weight":"bold"}},Ot=e("span",null,"16",-1),Yt=e("label",null,"SourceFinancement",-1),Bt=e("span",null,"Le type de source de financement parmi la liste PCRU",-1),zt=e("span",null,"La source de financement (PCRU) définie sur la page de l'activité",-1),Gt={style:{"font-weight":"bold"}},Ht=e("span",null,"17",-1),Kt=e("label",null,"LieuExecution",-1),Xt=e("span",null,"Le lieu d’exécution de l’unité de recherche",-1),Wt=e("span",null,"Pas de valeur par défaut",-1),Jt={style:{"font-weight":"bold"}},Qt=e("span",null,"18",-1),Zt=e("label",null,"DateDerniereSignature",-1),$t=e("span",null,"La date de dernière signature",-1),er=e("span",null,"La date de signature de la fiche activité",-1),tr={style:{"font-weight":"bold"}},rr=e("span",null,"19",-1),ir=e("label",null,"Duree",-1),nr=e("span",null,"La durée du contrat en mois (minimum 0,5)",-1),ur=e("span",null,"Pas de valeur par défaut",-1),ar={style:{"font-weight":"bold"}},sr=e("span",null,"20",-1),or=e("label",null,"DateDebut",-1),cr=e("span",null,"La date de début du contrat",-1),lr=e("span",null,"La date de début du contrat de la fiche activité",-1),pr={style:{"font-weight":"bold"}},fr=e("span",null,"21",-1),dr=e("label",null,"DateFin",-1),mr=e("span",null,"La date de fin du contrat",-1),Pr=e("span",null,"La date de fin du contrat de la fiche activité",-1),hr={style:{"font-weight":"bold"}},vr=e("span",null,"22",-1),yr=e("label",null,"MontantPercuUnite",-1),_r=e("span",null,"Le montant perçu par l'unité",-1),Dr=e("span",null,"Pas de valeur par défaut",-1),Ir={style:{"font-weight":"bold"}},br=e("span",null,"23",-1),gr=e("label",null,"ContributionFinanceur",-1),Er=e("span",null,"La contribution du financeur du contrat",-1),Sr=e("span",null,"Pas de valeur par défaut",-1),Lr={style:{"font-weight":"bold"}},Cr=e("span",null,"24",-1),xr=e("label",null,"MontantTotal",-1),Rr=e("span",null,"Le montant total du contrat",-1),kr=e("span",null,"Le montant de l'activité",-1),Ar={style:{"font-weight":"bold"}},qr=e("span",null,"25",-1),Ur=e("label",null,"ValidePoleCompetitivite",-1),jr=e("span",null,"Indique si le contrat a été validé par un pôle de compétitivité",-1),wr=e("span",null,`La case "validé par le pôle de compétitivité (PCRU)" définie sur la page de l'activité`,-1),Fr={style:{"font-weight":"bold"}},Mr=e("span",null,"26",-1),Tr=e("label",null,"PoleCompetitivite",-1),Vr=e("span",null,"Le nom du pôle de compétitivité qui a validé le projet parmi la liste PCRU",-1),Nr=e("span",null,"Le pôle de compétitivité (PCRU) défini sur la page de l'activité",-1),Or={style:{"font-weight":"bold"}},Yr=e("span",null,"27",-1),Br=e("label",null,"Commentaire",-1),zr=e("span",null,"Commentaire du gestionnaire de contrat (information à destination des autres tutelles)",-1),Gr=e("span",null,"Pas de valeur par défaut",-1),Hr={style:{"font-weight":"bold"}},Kr=e("span",null,"28",-1),Xr=e("label",null,"Pia",-1),Wr=e("span",null,"Programme Investissement Avenir",-1),Jr=e("span",null,"Pas de valeur par défaut",-1),Qr={style:{"font-weight":"bold"}},Zr=e("span",null,"29",-1),$r=e("label",null,"ReferenceNonGestionnaire",-1),ei=e("span",null,"Votre propre référence désignant ce contrat",-1),ti=e("span",null,"N° Oscar",-1),ri={style:{"font-weight":"bold"}},ii=e("span",null,"30",-1),ni=e("label",null,"AccordCadre",-1),ui=e("span",null,"Accord cadre",-1),ai=e("span",null,"Pas de valeur par défaut",-1),si={style:{"font-weight":"bold"}},oi=e("span",null,"31",-1),ci=e("label",null,"Cifre",-1),li=e("span",null,[l("Contrat d'accompagnement d'une bourse "),e("abbr",{title:"Conventions Industrielles de Formation par la REcherche"},"Cifre")],-1),pi=e("span",null,"Pas de valeur par défaut",-1),fi={style:{"font-weight":"bold"}},di=e("span",null,"32",-1),mi=e("label",null,"ChaireIndustrielle",-1),Pi=e("span",null,"Chaire industrielle",-1),hi=e("span",null,"Pas de valeur par défaut",-1),vi={style:{"font-weight":"bold"}},yi=e("span",null,"33",-1),_i=e("label",null,"PresencePartenaireIndustriel",-1),Di=e("span",null,"Présence d’un partenaire industriel",-1),Ii=e("span",null,"Pas de valeur par défaut",-1),bi={style:{"font-weight":"bold"}},gi={key:13},Ei=e("div",{style:{display:"flex","justify-content":"space-between"}},[e("h2",null,"Données à envoyer à PCRU")],-1),Si={key:0,class:"error",style:{"margin-bottom":"1em"}},Li=I('
    Les champs marqués d'une étoile rouge * sont obligatoires.
    Les champs Durée et Date de Fin sont marqués de deux étoiles rouges ** pour indiquer qu'au moins l'un des 2 champs est obligatoire
    Si le contrat est validé par un pôle de compétitivité alors le champ PoleCompetitivite marqué de trois étoiles rouges *** est obligatoire
    ',1),Ci={id:"form-table"},xi=I('Intitulé PCRUDescription PCRUOrigine de la valeur par défaut dans OscarValeur par défautEnvoyer la valeur par défautValeur qui sera envoyée à la place de la valeur par défaut1Le titre/l’objet du contratL'intitulé de l'activité',11),Ri={key:0,style:{"text-align":"left",color:"#a94442"}},ki={key:1,style:{"background-color":"#d9edf7","border-color":"#bce8f1",color:"#31708f",margin:"0.2em","text-align":"left",padding:"0.2em"}},Ai=["href"],qi=e("li",null,"Ou décocher la case pour définir manuellement une autre valeur à envoyer à PCRU",-1),Ui=["disabled"],ji={key:0,style:{"text-align":"left",color:"#a94442"}},wi=["disabled"],Fi=e("span",null,"2",-1),Mi=e("label",{for:"labintel"},[l("CodeLabintelUnite"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),Ti=e("span",null,"Le code labintel de l’unité du contrat",-1),Vi={key:0,style:{"text-align":"left",color:"#a94442"}},Ni={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Oi={key:2,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Yi=["disabled"],Bi={key:0,style:{"text-align":"left",color:"#a94442"}},zi=["disabled"],Gi=e("span",null,"3",-1),Hi=e("label",{for:"rnsr"},"CodeRNSRUnite",-1),Ki=e("span",null,"Le répertoire national des structures de recherche",-1),Xi={key:0,style:{"text-align":"left",color:"#a94442"}},Wi={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Ji={key:2,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Qi=["disabled"],Zi={key:0,style:{"text-align":"left",color:"#a94442"}},$i=["disabled"],en=e("span",null,"4",-1),tn=e("label",{for:"sigleunite"},"SigleUnite",-1),rn=e("span",null,"Le sigle de l’unité du contrat",-1),nn={key:0,style:{"text-align":"left",color:"#a94442"}},un={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},an=["disabled"],sn={key:0,style:{"text-align":"left",color:"#a94442"}},on=["disabled"],cn=e("span",null,"5",-1),ln=e("label",{for:"numcontrat"},[l("ReferenceGestionnaire"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),pn=e("span",null,"La référence du contrat pour la tutelle qui en assure la gestion. Ce numéro ne peut être modifié que par les personnes appartenant à l’organisme gestionnaire.",-1),fn=e("span",null,"N° Oscar",-1),dn={key:0,style:{"text-align":"left",color:"#a94442"}},mn=["disabled"],Pn={key:0,style:{"text-align":"left",color:"#a94442"}},hn=["disabled"],vn=e("span",null,"6",-1),yn=e("label",{for:"equipe"},"Equipe",-1),_n=e("span",null,"Le nom de l’équipe concernée par le contrat (ou de la sous-unité)",-1),Dn=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),In=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),bn={key:0,style:{"text-align":"left",color:"#a94442"}},gn=["disabled"],En=e("span",null,"7",-1),Sn=e("label",{for:"typeContrat"},[l("TypeContrat"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),Ln=e("span",null,"Le type du contrat parmi la liste PCRU",-1),Cn=e("span",null,"Configuration des correspondances entre les types d'activités Oscar et les types de contrat PCRU",-1),xn={key:0,style:{"text-align":"left",color:"#a94442"}},Rn={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},kn=["disabled"],An={key:0,style:{"text-align":"left",color:"#a94442"}},qn=["disabled"],Un=["value"],jn=e("span",null,"8",-1),wn=e("label",{for:"acronyme"},"Acronyme",-1),Fn=e("span",null,"L’acronyme du contrat",-1),Mn=e("span",null,"L'acronyme du projet de l'activité",-1),Tn={key:0,style:{"text-align":"left",color:"#a94442"}},Vn=["disabled"],Nn={key:0,style:{"text-align":"left",color:"#a94442"}},On=["disabled"],Yn=e("span",null,"9",-1),Bn=e("label",{for:"contratsAssocies"},"ContratsAssocies",-1),zn=e("span",null,"Numéros de tutelle Gestionnaire des contrats associés séparés par une barre verticale (« | »)",-1),Gn=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),Hn=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),Kn={key:0,style:{"text-align":"left",color:"#a94442"}},Xn=["disabled"],Wn=e("span",null,"10",-1),Jn=e("label",{for:"responsableScientifique"},[l("NomRespScientifique"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),Qn=e("span",null,"Le nom du Responsable Scientifique",-1),Zn={key:0,style:{"text-align":"left",color:"#a94442"}},$n={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},eu=["disabled"],tu={key:0,style:{"text-align":"left",color:"#a94442"}},ru=["disabled"],iu=e("span",null,"11",-1),nu=e("label",{for:"employeurResponsableScientifique"},"EmployeurRespScientifique",-1),uu=e("span",null,"L'employeur du Responsable Scientifique",-1),au=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),su=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),ou={key:0,style:{"text-align":"left",color:"#a94442"}},cu=["disabled"],lu=e("span",null,"12",-1),pu=e("label",{for:"coordinateurConsortium"},"RespScientifiqueEstCoordonnateur",-1),fu=e("span",null,"Indique si le responsable scientifique est aussi coordinateur du consortium",-1),du=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),mu=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),Pu=["disabled"],hu=e("option",{value:""},null,-1),vu=e("option",{value:"true"},"Oui",-1),yu=e("option",{value:"false"},"Non",-1),_u=[hu,vu,yu],Du=e("span",null,"13",-1),Iu=e("label",{for:"partenaires"},"Partenaires",-1),bu=e("span",null,"Ensemble de partenaires du contrat séparés par une barre verticale (« | »)",-1),gu={key:0,style:{"text-align":"left",color:"#a94442"}},Eu={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Su={key:2,class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Lu=e("div",null,[e("input",{type:"checkbox",disabled:"",checked:""})],-1),Cu={class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},xu=["href"],Ru=e("span",null,"14",-1),ku=e("label",{for:"partenairePrincipal"},[l("PartenairePrincipal"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),Au=e("span",null,"Le nom du Partenaire Principal",-1),qu={key:0,style:{"text-align":"left",color:"#a94442"}},Uu={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},ju=e("div",null,[e("input",{type:"checkbox",disabled:"",checked:""})],-1),wu={style:{"grid-row-end":"span 2"}},Fu={class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Mu=["href"],Tu=e("span",null,"15",-1),Vu=e("label",{for:"idPartenairePrincipal"},[l("IdPrincipal"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),Nu=e("span",null,"L'identifiant du Partenaire Principal (Référence du référentiel partenaire ou SIRET ou SIREN ou TVA intracommunautaire ou DUN)",-1),Ou=e("span",null,"Le SIRET ou le numéro de TVA intracommunautaire ou le N°DUNS du partenaire principal",-1),Yu={key:0,style:{"text-align":"left",color:"#a94442"}},Bu={key:1,class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},zu=e("div",null,[e("input",{type:"checkbox",disabled:"",checked:""})],-1),Gu=e("span",null,"16",-1),Hu=e("label",null,[l("SourceFinancement"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),Ku=e("span",null,"Le type de source de financement parmi la liste PCRU",-1),Xu=e("span",null,"La source de financement (PCRU) définie sur la page de l'activité",-1),Wu={key:0,style:{"text-align":"left",color:"#a94442"}},Ju=e("div",null,[e("input",{type:"checkbox",disabled:"",checked:""})],-1),Qu={class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Zu=["href"],$u=e("span",null,"17",-1),ea=e("label",{for:"lieuExecution"},"LieuExecution",-1),ta=e("span",null,"Le lieu d’exécution de l’unité de recherche",-1),ra=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),ia=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),na={key:0,style:{"text-align":"left",color:"#a94442"}},ua=["disabled"],aa=e("span",null,"18",-1),sa=e("label",{for:"dateDerniereSignature"},[l("DateDerniereSignature"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),oa=e("span",null,"La date de dernière signature",-1),ca=e("span",null,"La date de signature de la fiche activité",-1),la={key:0,style:{"text-align":"left",color:"#a94442"}},pa={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},fa={key:2,class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},da=["href"],ma=["disabled"],Pa={key:0,style:{"text-align":"left",color:"#a94442"}},ha=["disabled"],va=e("span",null,"19",-1),ya=e("label",{for:"duree"},[l("Duree"),e("span",{style:{color:"red","font-weight":"bold"}},"**")],-1),_a=e("span",null,"La durée du contrat en mois (minimum 0,5)",-1),Da=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),Ia=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),ba={key:0,style:{"text-align":"left",color:"#a94442"}},ga={style:{display:"flex"}},Ea=["disabled"],Sa=e("span",{style:{"margin-left":"1em","margin-right":"1em"}},"mois",-1),La=e("span",null,"20",-1),Ca=e("label",{for:"dateDebut"},[l("DateDebut"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),xa=e("span",null,"La date de début du contrat",-1),Ra=e("span",null,"La date de début du contrat de la fiche activité",-1),ka={key:0,style:{"text-align":"left",color:"#a94442"}},Aa={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},qa={key:2,class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Ua=["href"],ja=["disabled"],wa={key:0,style:{"text-align":"left",color:"#a94442"}},Fa=["disabled"],Ma=e("span",null,"21",-1),Ta=e("label",{for:"dateFin"},[l("DateFin"),e("span",{style:{color:"red","font-weight":"bold"}},"**")],-1),Va=e("span",null,"La date de fin du contrat",-1),Na=e("span",null,"La date de fin du contrat de la fiche activité",-1),Oa={key:0,style:{"text-align":"left",color:"#a94442"}},Ya={key:1,class:"warning",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Ba={key:2,class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},za=["href"],Ga=["disabled"],Ha={key:0,style:{"text-align":"left",color:"#a94442"}},Ka=["disabled"],Xa=e("span",null,"22",-1),Wa=e("label",{for:"montantPercuUnite"},[l("MontantPercuUnite"),e("span",{style:{color:"red","font-weight":"bold"}},"*")],-1),Ja=e("span",null,"Le montant perçu par l'unité",-1),Qa=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),Za=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),$a={key:0,style:{"text-align":"left",color:"#a94442"}},es={style:{display:"flex"}},ts=["disabled"],rs=e("span",{style:{"margin-left":"1em","margin-right":"1em"}},[l("€ "),e("abbr",{title:"Hors Taxes"},"HT")],-1),is=e("span",null,"23",-1),ns=e("label",{for:"contributionFinanceur"},"ContributionFinanceur",-1),us=e("span",null,"La contribution du financeur du contrat",-1),as=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),ss=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),os={key:0,style:{"text-align":"left",color:"#a94442"}},cs={style:{display:"flex"}},ls=["disabled"],ps=e("span",{style:{"margin-left":"1em","margin-right":"1em"}},[l("€ "),e("abbr",{title:"Hors Taxes"},"HT")],-1),fs=e("span",null,"24",-1),ds=e("label",{for:"montantTotal"},"MontantTotal",-1),ms=e("span",null,"Le montant total du contrat",-1),Ps=e("span",null,"Le montant de l'activité",-1),hs={key:0,style:{"text-align":"left",color:"#a94442"}},vs=["disabled"],ys={style:{display:"flex"}},_s=["disabled"],Ds=e("span",{style:{"margin-left":"1em","margin-right":"1em"}},[l("€ "),e("abbr",{title:"Hors Taxes"},"HT")],-1),Is=e("span",null,"25",-1),bs=e("label",null,"ValidePoleCompetitivite",-1),gs=e("span",null,"Indique si le contrat a été validé par un pôle de compétitivité",-1),Es=e("span",null,`La case "validé par le pôle de compétitivité (PCRU)" définie sur la page de l'activité`,-1),Ss={class:"bold"},Ls=e("div",null,[e("input",{type:"checkbox",disabled:"",checked:""})],-1),Cs={class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},xs=["href"],Rs=e("span",null,"26",-1),ks=e("label",null,[l("PoleCompetitivite"),e("span",{style:{color:"red","font-weight":"bold"}},"***")],-1),As=e("span",null,"Le nom du pôle de compétitivité qui a validé le projet parmi la liste PCRU",-1),qs=e("span",null,"Le pôle de compétitivité (PCRU) défini sur la page de l'activité",-1),Us={key:0,style:{"text-align":"left",color:"#a94442"}},js=e("div",null,[e("input",{type:"checkbox",disabled:"",checked:""})],-1),ws={class:"info",style:{margin:"0.2em","text-align":"left",padding:"0.2em"}},Fs=["href"],Ms=e("span",null,"27",-1),Ts=e("label",{for:"commentaires"},"Commentaire",-1),Vs=e("span",null,"Commentaire du gestionnaire de contrat (information à destination des autres tutelles)",-1),Ns=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),Os=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),Ys={key:0,style:{"text-align":"left",color:"#a94442"}},Bs=["disabled"],zs=e("span",null,"28",-1),Gs=e("label",{for:"pia"},"Pia",-1),Hs=e("span",null,"Programme Investissement Avenir",-1),Ks=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),Xs=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),Ws=["disabled"],Js=e("option",{value:""},null,-1),Qs=e("option",{value:"true"},"Oui",-1),Zs=e("option",{value:"false"},"Non",-1),$s=[Js,Qs,Zs],eo=e("span",null,"29",-1),to=e("label",{for:"reference"},"ReferenceNonGestionnaire",-1),ro=e("span",null,"Votre propre référence désignant ce contrat",-1),io=e("span",null,"N° Oscar",-1),no={key:0,style:{"text-align":"left",color:"#a94442"}},uo=["disabled"],ao={key:0,style:{"text-align":"left",color:"#a94442"}},so=["disabled"],oo=e("span",null,"30",-1),co=e("label",{for:"accordCadre"},"AccordCadre",-1),lo=e("span",null,"Accord cadre",-1),po=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),fo=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),mo=["disabled"],Po=e("option",{value:""},null,-1),ho=e("option",{value:"true"},"Oui",-1),vo=e("option",{value:"false"},"Non",-1),yo=[Po,ho,vo],_o=e("span",null,"31",-1),Do=e("label",{for:"cifre"},"Cifre",-1),Io=e("span",null,[l("Contrat d'accompagnement d'une bourse "),e("abbr",{title:"Conventions Industrielles de Formation par la REcherche"},"Cifre")],-1),bo=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),go=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),Eo=["disabled"],So=e("option",{value:"true"},"Oui",-1),Lo=e("option",{value:"false"},"Non",-1),Co=[So,Lo],xo=e("span",null,"32",-1),Ro=e("label",{for:"accordCadre"},"ChaireIndustrielle",-1),ko=e("span",null,"Chaire industrielle",-1),Ao=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),qo=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),Uo=["disabled"],jo=e("option",{value:""},null,-1),wo=e("option",{value:"true"},"Oui",-1),Fo=e("option",{value:"false"},"Non",-1),Mo=[jo,wo,Fo],To=e("span",null,"33",-1),Vo=e("label",{for:"accordCadre"},"PresencePartenaireIndustriel",-1),No=e("span",null,"Présence d’un partenaire industriel ?",-1),Oo=e("span",{style:{"grid-column-end":"span 2"}},"Pas de valeur par défaut",-1),Yo=e("div",null,[e("input",{type:"checkbox",disabled:""})],-1),Bo=["disabled"],zo=e("option",{value:""},null,-1),Go=e("option",{value:"true"},"Oui",-1),Ho=e("option",{value:"false"},"Non",-1),Ko=[zo,Go,Ho],Xo={style:{"margin-left":"1em","margin-top":"1em"}},Wo=e("label",null,"Activer l'envoi vers PCRU :",-1),Jo=["disabled"],Qo={class:"row",style:{"margin-top":"1em"}},Zo={class:"col-md-12"},$o={class:"buttons-bar"},ec=["disabled"];function tc(i,n,y,b,t,o){var g,E,S,L,C,x,R,k,A,q,U,j,w,F,M;const z=T("loader"),G=T("modal");return u(),a(p,null,[V(z,{style:{position:"fixed"},text:t.loading,visible:t.loading!=""},null,8,["text","visible"]),V(G,{title:"Une erreur est survenue","title-icon":"icon-bug",visible:t.error!=null},{buttons:N(()=>[e("button",{class:"btn btn-default",onClick:n[0]||(n[0]=r=>t.error=null)},"FERMER")]),default:N(()=>[e("div",$,s(t.error),1)]),_:1},8,["visible"]),e("section",null,[e("div",ee,[te,e("div",re,[e("a",{href:y.urlActivity,class:"btn btn-default"},"← Retourner à la fiche activité",8,ie)])]),t.pcru?(u(),a("div",ne,[t.pcru.activityPcruInformations.status=="jamais-envoyee"?(u(),a("div",ue," Les informations de cette activité n'ont encore jamais été envoyées à PCRU. ")):c("",!0),t.pcru.activityPcruInformations.status=="jamais-envoyee"&&!t.envoiActif?(u(),a("div",ae,[l(" L'envoi de cette activité à PCRU n'est "),se,l(`. Pour activer l'envoi, cochez la case "Activer l'envoi vers PCRU" au bas du formulaire puis cliquez sur "Enregistrer". `)])):c("",!0),!o.erreursCoteServeur&&t.envoiActif&&t.pcru.activityPcruInformations.status=="jamais-envoyee"?(u(),a("div",oe," L'envoi à PCRU est activé pour cette activité. Les données partiront lors du prochain envoi programmé. Cette fiche a été modifiée pour la dernière fois le "+s(o.formatDate(t.pcru.activityPcruInformations.dateUpdated))+" Si ce message reste affiché plus de 24H, contactez votre administrateur Oscar. ",1)):c("",!0),t.pcru.activityPcruInformations.status=="jamais-envoyee"&&o.erreursCoteServeur&&t.envoiActif?(u(),a("div",ce," L'envoi à PCRU est activé pour cette activité, toutefois le formulaire contient des erreurs. Les informations ne pourront pas être envoyées à PCRU tant que les erreurs n'auront pas été corrigées. ")):c("",!0),t.pcru.activityPcruInformations.status=="envoyee-attente-retour-pcru"?(u(),a("div",le," Cette activité a été envoyée à PCRU le "+s(o.formatDate(t.pcru.activityPcruInformations.datePremierDepot))+". Nous sommes en attente d'un retour de la part de PCRU concernant l'intégration de cette activité. ",1)):c("",!0),t.pcru.activityPcruInformations.status=="retour-pcru-ok"?(u(),a("div",pe," PCRU a confirmé la bonne intégration de cette activité le "+s(o.formatDate(t.pcru.activityPcruInformations.dateUpdated))+". ",1)):c("",!0),t.pcru.activityPcruInformations.status=="retour-pcru-ok-mais-fichier-manquant"?(u(),a("div",fe," PCRU a confirmé la bonne intégration de cette activité le "+s(o.formatDate(t.pcru.activityPcruInformations.dateUpdated))+" tout en indiquant qu'il manque le fichier PDF du contrat. ",1)):c("",!0),t.pcru.activityPcruInformations.dateEnvoiFichierContrat?(u(),a("div",de," Le fichier PDF du contrat a bien été déposé à PCRU le "+s(o.formatDate(t.pcru.activityPcruInformations.dateEnvoiFichierContrat))+". ",1)):c("",!0),t.pcru.activityPcruInformations.status=="jamais-envoyee"&&t.pcru.avertissementFichierContratManquant?(u(),a("div",me,s(t.pcru.avertissementFichierContratManquant),1)):c("",!0),t.pcru.activityPcruInformations.status=="jamais-envoyee"&&t.pcru.pcruInformationParDefaut.avertissementsPartenaires.length>0?(u(),a("div",Pe,[l(" Impossible de transmettre à PCRU certains partenaires à cause des données manquantes suivantes : "),e("ul",null,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.avertissementsPartenaires,r=>(u(),a("li",null,[e("a",{href:r.url},s(r.nom),9,he),e("ul",null,[(u(!0),a(p,null,f(r.erreurs,H=>(u(),a("li",null,s(H),1))),256))])]))),256))])])):c("",!0),t.pcru.activityPcruInformations.status=="retour-pcru-erreurs"?(u(),a("div",ve,[ye,l(" à partir du fichier CSV déposé. Erreurs remontées par PCRU : "),e("p",_e,s(t.pcru.activityPcruInformations.erreurs),1)])):c("",!0),t.pcru.activityPcruInformations.dateActivationEnvoi?(u(),a("div",De,[Ie,e("ul",null,[e("li",null,"Envoi activé le "+s(o.formatDate(t.pcru.activityPcruInformations.dateActivationEnvoi)),1),t.pcru.activityPcruInformations.datePremierDepot?(u(),a("li",be,"Envoyée à PCRU le "+s(o.formatDate(t.pcru.activityPcruInformations.datePremierDepot)),1)):c("",!0),t.pcru.activityPcruInformations.dateRetourOK?(u(),a("li",ge,"Réponse OK de PCRU le "+s(o.formatDate(t.pcru.activityPcruInformations.dateRetourOK)),1)):c("",!0),t.pcru.activityPcruInformations.dateRetourOKMaisContratManquant?(u(),a("li",Ee,"Réponse OK mais document contrat PDF manquant de PCRU le "+s(o.formatDate(t.pcru.activityPcruInformations.dateRetourOKMaisContratManquant)),1)):c("",!0),t.pcru.activityPcruInformations.dateEnvoiFichierContrat?(u(),a("li",Se,"Document contrat PDF envoyé le "+s(o.formatDate(t.pcru.activityPcruInformations.dateEnvoiFichierContrat)),1)):c("",!0)])])):c("",!0),t.pcru.activityPcruInformations.status!="jamais-envoyee"?(u(),a("div",Le,[Ce,e("div",xe,[Re,e("span",ke,s(t.pcru.activityPcruInformations.envoiObjet),1),Ae,qe,Ue,e("span",null,[l("Le code labintel du partenaire ayant le rôle "),e("em",null,s(t.pcru.unitRoles.join(", ")),1)]),e("span",je,s(t.pcru.activityPcruInformations.envoiLabintel),1),we,Fe,Me,e("span",null,[l("Le numéro RNSR du partenaire ayant le rôle "),e("em",null,s(t.pcru.unitRoles.join(", ")),1)]),e("span",Te,s(t.pcru.activityPcruInformations.envoiRnsr),1),Ve,Ne,Oe,e("span",null,[l("Le nom court du partenaire ayant le rôle "),e("em",null,s(t.pcru.unitRoles.join(", ")),1)]),e("span",Ye,s(t.pcru.activityPcruInformations.envoiSigle),1),Be,ze,Ge,He,e("span",Ke,s(t.pcru.activityPcruInformations.envoiNumContrat),1),Xe,We,Je,Qe,e("span",Ze,s(t.pcru.activityPcruInformations.envoiEquipe),1),$e,et,tt,rt,e("span",it,s(t.pcru.activityPcruInformations.envoiTypeContrat),1),nt,ut,at,st,e("span",ot,s(t.pcru.activityPcruInformations.envoiAcronyme),1),ct,lt,pt,ft,e("span",dt,s(t.pcru.activityPcruInformations.envoiContratsAssocies),1),mt,Pt,ht,e("span",null,[l("Le membre de l'activité ayant le rôle "),e("em",null,s(t.pcru.roleResponsableScientifique),1)]),e("span",vt,s(t.pcru.activityPcruInformations.envoiResponsableScientifique),1),yt,_t,Dt,It,e("span",bt,s(t.pcru.activityPcruInformations.envoiEmployeurResponsableScientifique),1),gt,Et,St,Lt,e("span",Ct,s(t.pcru.activityPcruInformations.envoiCoordinateurConsortium),1),xt,Rt,kt,e("span",null,[l("Les partenaires de l'activité ayant l'un des rôles : "),e("em",null,s(t.pcru.rolesPartenaires.join(", ")),1)]),e("span",At,s(t.pcru.activityPcruInformations.envoiPartenaires),1),qt,Ut,jt,e("span",null,[l("Le nom court du partenaire de l'activité ayant l'un des rôles : "),e("em",null,s(t.pcru.rolesPartenairePrincipal.join(", ")),1)]),e("span",wt,s(t.pcru.activityPcruInformations.envoiPartenairePrincipal),1),Ft,Mt,Tt,Vt,e("span",Nt,s(t.pcru.activityPcruInformations.envoiIdPartenairePrincipal),1),Ot,Yt,Bt,zt,e("span",Gt,s(t.pcru.activityPcruInformations.envoiSourceFinancement),1),Ht,Kt,Xt,Wt,e("span",Jt,s(t.pcru.activityPcruInformations.envoiLieuExecution),1),Qt,Zt,$t,er,e("span",tr,s(t.pcru.activityPcruInformations.envoiDateDerniereSignature),1),rr,ir,nr,ur,e("span",ar,s(t.pcru.activityPcruInformations.envoiDuree),1),sr,or,cr,lr,e("span",pr,s(t.pcru.activityPcruInformations.envoiDateDebut),1),fr,dr,mr,Pr,e("span",hr,s(t.pcru.activityPcruInformations.envoiDateFin),1),vr,yr,_r,Dr,e("span",Ir,s(t.pcru.activityPcruInformations.envoiMontantPercuUnite),1),br,gr,Er,Sr,e("span",Lr,s(t.pcru.activityPcruInformations.envoiContributionFinanceur),1),Cr,xr,Rr,kr,e("span",Ar,s(t.pcru.activityPcruInformations.envoiMontantTotal),1),qr,Ur,jr,wr,e("span",Fr,s(t.pcru.activityPcruInformations.envoiValidePoleCompetitivite),1),Mr,Tr,Vr,Nr,e("span",Or,s(t.pcru.activityPcruInformations.envoiPoleCompetitivite),1),Yr,Br,zr,Gr,e("span",Hr,s(t.pcru.activityPcruInformations.envoiCommentaires),1),Kr,Xr,Wr,Jr,e("span",Qr,s(t.pcru.activityPcruInformations.envoiPia),1),Zr,$r,ei,ti,e("span",ri,s(t.pcru.activityPcruInformations.envoiReference),1),ii,ni,ui,ai,e("span",si,s(t.pcru.activityPcruInformations.envoiAccordCadre),1),oi,ci,li,pi,e("span",fi,s(t.pcru.activityPcruInformations.envoiCifre),1),di,mi,Pi,hi,e("span",vi,s(t.pcru.activityPcruInformations.envoiChaireIndustrielle),1),yi,_i,Di,Ii,e("span",bi,s(t.pcru.activityPcruInformations.envoiPresencePartenaireIndustriel),1)])])):c("",!0),t.pcru.activityPcruInformations.status=="jamais-envoyee"?(u(),a("div",gi,[Ei,o.toutesLesErreurs.length>0?(u(),a("div",Si,[l("Impossible d'envoyer les informations à PCRU, certaines valeurs ne sont pas valides : "),e("ul",null,[(u(!0),a(p,null,f(o.toutesLesErreurs,r=>(u(),a("li",null,s(r),1))),256))])])):c("",!0),e("form",{onSubmit:n[76]||(n[76]=K((...r)=>o.enregistrer&&o.enregistrer(...r),["prevent"])),style:{background:"white","padding-bottom":"1em","padding-top":"1em"}},[Li,e("div",Ci,[xi,e("div",null,[t.pcru.activityPcruInformations.utiliserObjetParDefaut&&t.pcru.pcruInformationParDefaut.objetErreurs.length>0?(u(),a("ul",Ri,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.objetErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserObjetParDefaut&&t.pcru.pcruInformationParDefaut.objetErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserObjetParDefaut})},s(t.pcru.pcruInformationParDefaut.objet),3),t.pcru.activityPcruInformations.utiliserObjetParDefaut&&t.pcru.pcruInformationParDefaut.objetErreurs.length>0?(u(),a("div",ki,[l(" Pour corriger cette valeur, vous pouvez : "),e("ul",null,[e("li",null,[l("Modifier l'intitulé de l'activité dans la "),e("a",{href:(E=(g=t.core)==null?void 0:g.urls)==null?void 0:E.edit},"fiche activité",8,Ai)]),qi])])):c("",!0)]),e("div",null,[t.pcru?d((u(),a("input",{key:0,type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=r=>t.pcru.activityPcruInformations.utiliserObjetParDefaut=r),onChange:n[2]||(n[2]=r=>o.checkObjetParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,Ui)),[[h,t.pcru.activityPcruInformations.utiliserObjetParDefaut]]):c("",!0)]),e("div",null,[!t.pcru.activityPcruInformations.utiliserObjetParDefaut&&o.objetErreursPasParDefaut.length>0?(u(),a("ul",ji,[(u(!0),a(p,null,f(o.objetErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserObjetParDefaut&&o.objetErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserObjetParDefaut}),id:"objet","onUpdate:modelValue":n[3]||(n[3]=r=>t.pcru.activityPcruInformations.objet=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserObjetParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"1000",onInput:n[4]||(n[4]=r=>t.objetAfficherLesErreursServeur=!1)},null,42,wi),[[P,t.pcru.activityPcruInformations.objet]])]),Fi,Mi,Ti,e("span",null,[l("Le code labintel du partenaire ayant le rôle "),e("em",null,s(t.pcru.unitRoles.join(", ")),1)]),e("div",null,[t.pcru.activityPcruInformations.utiliserLabintelParDefaut&&t.pcru.pcruInformationParDefaut.labintelErreurs.length>0?(u(),a("ul",Vi,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.labintelErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserLabintelParDefaut&&t.pcru.pcruInformationParDefaut.labintelErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserLabintelParDefaut})},s(t.pcru.pcruInformationParDefaut.labintel),3),t.pcru.pcruInformationParDefaut.unitePcruParDefautErreur?(u(),a("div",Ni,s(t.pcru.pcruInformationParDefaut.unitePcruParDefautErreur),1)):c("",!0),t.pcru.pcruInformationParDefaut.labintelParDefautErreur?(u(),a("div",Oi,s(t.pcru.pcruInformationParDefaut.labintelParDefautErreur),1)):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[5]||(n[5]=r=>t.pcru.activityPcruInformations.utiliserLabintelParDefaut=r),onChange:n[6]||(n[6]=r=>o.checkLabintelParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,Yi),[[h,t.pcru.activityPcruInformations.utiliserLabintelParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserLabintelParDefaut&&o.labintelErreursPasParDefaut.length>0?(u(),a("ul",Bi,[(u(!0),a(p,null,f(o.labintelErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserLabintelParDefaut&&o.labintelErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserLabintelParDefaut}),id:"labintel","onUpdate:modelValue":n[7]||(n[7]=r=>t.pcru.activityPcruInformations.labintel=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserLabintelParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"10",onInput:n[8]||(n[8]=r=>t.labintelAfficherLesErreursServeur=!1)},null,42,zi),[[P,t.pcru.activityPcruInformations.labintel]])]),Gi,Hi,Ki,e("span",null,[l("Le numéro RNSR du partenaire ayant le rôle "),e("em",null,s(t.pcru.unitRoles.join(", ")),1)]),e("div",null,[t.pcru.activityPcruInformations.utiliserRnsrParDefaut&&t.pcru.pcruInformationParDefaut.rnsrErreurs.length>0?(u(),a("ul",Xi,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.rnsrErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserRnsrParDefaut&&t.pcru.pcruInformationParDefaut.rnsrErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserRnsrParDefaut})},s(t.pcru.pcruInformationParDefaut.rnsr),3),t.pcru.pcruInformationParDefaut.unitePcruParDefautErreur?(u(),a("div",Wi,s(t.pcru.pcruInformationParDefaut.unitePcruParDefautErreur),1)):c("",!0),t.pcru.pcruInformationParDefaut.rnsrParDefautErreur?(u(),a("div",Ji,s(t.pcru.pcruInformationParDefaut.rnsrParDefautErreur),1)):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[9]||(n[9]=r=>t.pcru.activityPcruInformations.utiliserRnsrParDefaut=r),onChange:n[10]||(n[10]=r=>o.checkRnsrParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,Qi),[[h,t.pcru.activityPcruInformations.utiliserRnsrParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserRnsrParDefaut&&o.rnsrErreursPasParDefaut.length>0?(u(),a("ul",Zi,[(u(!0),a(p,null,f(o.rnsrErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserRnsrParDefaut&&o.rnsrErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserRnsrParDefaut}),id:"rnsr","onUpdate:modelValue":n[11]||(n[11]=r=>t.pcru.activityPcruInformations.rnsr=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserRnsrParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"10",onInput:n[12]||(n[12]=r=>t.rnsrAfficherLesErreursServeur=!1)},null,42,$i),[[P,t.pcru.activityPcruInformations.rnsr]])]),en,tn,rn,e("span",null,[l("Le nom court du partenaire ayant le rôle "),e("em",null,s(t.pcru.unitRoles.join(", ")),1)]),e("div",null,[t.pcru.activityPcruInformations.utiliserSigleParDefaut&&t.pcru.pcruInformationParDefaut.sigleErreurs.length>0?(u(),a("ul",nn,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.sigleErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserSigleParDefaut&&t.pcru.pcruInformationParDefaut.sigleErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserSigleParDefaut})},s(t.pcru.pcruInformationParDefaut.sigle),3),t.pcru.pcruInformationParDefaut.unitePcruParDefautErreur?(u(),a("div",un,s(t.pcru.pcruInformationParDefaut.unitePcruParDefautErreur),1)):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[13]||(n[13]=r=>t.pcru.activityPcruInformations.utiliserSigleParDefaut=r),onChange:n[14]||(n[14]=r=>o.checkSigleParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,an),[[h,t.pcru.activityPcruInformations.utiliserSigleParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserSigleParDefaut&&o.sigleErreursPasParDefaut.length>0?(u(),a("ul",sn,[(u(!0),a(p,null,f(o.sigleErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserSigleParDefaut&&o.sigleErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserSigleParDefaut}),id:"sigleunite","onUpdate:modelValue":n[15]||(n[15]=r=>t.pcru.activityPcruInformations.sigle=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserSigleParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"20",onInput:n[16]||(n[16]=r=>t.sigleAfficherLesErreursServeur=!1)},null,42,on),[[P,t.pcru.activityPcruInformations.sigle]])]),cn,ln,pn,fn,e("div",null,[t.pcru.activityPcruInformations.utiliserNumContratParDefaut&&t.pcru.pcruInformationParDefaut.numContratErreurs.length>0?(u(),a("ul",dn,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.numContratErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserNumContratParDefaut&&t.pcru.pcruInformationParDefaut.numContratErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserNumContratParDefaut})},s(t.pcru.pcruInformationParDefaut.numContrat),3)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[17]||(n[17]=r=>t.pcru.activityPcruInformations.utiliserNumContratParDefaut=r),onChange:n[18]||(n[18]=r=>o.checkNumContratParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,mn),[[h,t.pcru.activityPcruInformations.utiliserNumContratParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserNumContratParDefaut&&o.numContratErreursPasParDefaut.length>0?(u(),a("ul",Pn,[(u(!0),a(p,null,f(o.numContratErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserNumContratParDefaut&&o.numContratErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserNumContratParDefaut}),id:"numcontrat","onUpdate:modelValue":n[19]||(n[19]=r=>t.pcru.activityPcruInformations.numContrat=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserNumContratParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"30",onInput:n[20]||(n[20]=r=>t.numContratAfficherLesErreursServeur=!1)},null,42,hn),[[P,t.pcru.activityPcruInformations.numContrat]])]),vn,yn,_n,Dn,In,e("div",null,[o.equipeErreursPasParDefaut.length>0?(u(),a("ul",bn,[(u(!0),a(p,null,f(o.equipeErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:o.equipeErreursPasParDefaut.length>0,bold:!0}),id:"equipe","onUpdate:modelValue":n[21]||(n[21]=r=>t.pcru.activityPcruInformations.equipe=r),type:"text",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"150",onInput:n[22]||(n[22]=r=>t.equipeAfficherLesErreursServeur=!1)},null,42,gn),[[P,t.pcru.activityPcruInformations.equipe]])]),En,Sn,Ln,Cn,e("div",null,[t.pcru.activityPcruInformations.utiliserTypeContratParDefaut&&t.pcru.pcruInformationParDefaut.typeContratErreurs.length>0?(u(),a("ul",xn,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.typeContratErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserTypeContratParDefaut&&t.pcru.pcruInformationParDefaut.typeContratErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserTypeContratParDefaut})},s(t.pcru.pcruInformationParDefaut.typeContratLabel),3),t.pcru.pcruInformationParDefaut.typeContratParDefautErreur?(u(),a("div",Rn,s(t.pcru.pcruInformationParDefaut.typeContratParDefautErreur),1)):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[23]||(n[23]=r=>t.pcru.activityPcruInformations.utiliserTypeContratParDefaut=r),onChange:n[24]||(n[24]=r=>o.checkTypeContratParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,kn),[[h,t.pcru.activityPcruInformations.utiliserTypeContratParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserTypeContratParDefaut&&o.typeContratErreursPasParDefaut.length>0?(u(),a("ul",An,[(u(!0),a(p,null,f(o.typeContratErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("select",{id:"typeContrat","onUpdate:modelValue":n[25]||(n[25]=r=>t.pcru.activityPcruInformations.pcruTypeContractId=r),class:m({invalid:!t.pcru.activityPcruInformations.utiliserTypeContratParDefaut&&o.typeContratErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserTypeContratParDefaut}),disabled:t.pcru.activityPcruInformations.utiliserTypeContratParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",onChange:n[26]||(n[26]=r=>t.typeContratAfficherLesErreursServeur=!1)},[(u(!0),a(p,null,f(t.pcru.typesContrat,r=>(u(),a("option",{value:r.id},s(r.label),9,Un))),256))],42,qn),[[_,t.pcru.activityPcruInformations.pcruTypeContractId]])]),jn,wn,Fn,Mn,e("div",null,[t.pcru.activityPcruInformations.utiliserAcronymeParDefaut&&t.pcru.pcruInformationParDefaut.acronymeErreurs.length>0?(u(),a("ul",Tn,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.acronymeErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserAcronymeParDefaut&&t.pcru.pcruInformationParDefaut.acronymeErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserAcronymeParDefaut})},s(t.pcru.pcruInformationParDefaut.acronyme),3)]),e("div",null,[t.pcru?d((u(),a("input",{key:0,type:"checkbox","onUpdate:modelValue":n[27]||(n[27]=r=>t.pcru.activityPcruInformations.utiliserAcronymeParDefaut=r),onChange:n[28]||(n[28]=r=>o.checkAcronymeParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,Vn)),[[h,t.pcru.activityPcruInformations.utiliserAcronymeParDefaut]]):c("",!0)]),e("div",null,[!t.pcru.activityPcruInformations.utiliserAcronymeParDefaut&&o.acronymeErreursPasParDefaut.length>0?(u(),a("ul",Nn,[(u(!0),a(p,null,f(o.acronymeErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserAcronymeParDefaut&&o.acronymeErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserAcronymeParDefaut}),id:"acronyme","onUpdate:modelValue":n[29]||(n[29]=r=>t.pcru.activityPcruInformations.acronyme=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserAcronymeParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"50",onInput:n[30]||(n[30]=r=>t.acronymeAfficherLesErreursServeur=!1)},null,42,On),[[P,t.pcru.activityPcruInformations.acronyme]])]),Yn,Bn,zn,Gn,Hn,e("div",null,[o.contratsAssociesErreursPasParDefaut.length>0?(u(),a("ul",Kn,[(u(!0),a(p,null,f(o.contratsAssociesErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:o.contratsAssociesErreursPasParDefaut.length>0,bold:!0}),id:"contratsAssocies","onUpdate:modelValue":n[31]||(n[31]=r=>t.pcru.activityPcruInformations.contratsAssocies=r),type:"text",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"300",onInput:n[32]||(n[32]=r=>t.contratsAssociesAfficherLesErreursServeur=!1)},null,42,Xn),[[P,t.pcru.activityPcruInformations.contratsAssocies]])]),Wn,Jn,Qn,e("span",null,[l("Le membre de l'activité ayant le rôle "),e("em",null,s(t.pcru.roleResponsableScientifique),1)]),e("div",null,[t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut&&t.pcru.pcruInformationParDefaut.responsableScientifiqueErreurs.length>0?(u(),a("ul",Zn,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.responsableScientifiqueErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut&&t.pcru.pcruInformationParDefaut.responsableScientifiqueErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut})},s(t.pcru.pcruInformationParDefaut.responsableScientifique),3),t.pcru.pcruInformationParDefaut.responsableScientifiqueParDefautErreur?(u(),a("div",$n,s(t.pcru.pcruInformationParDefaut.responsableScientifiqueParDefautErreur),1)):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[33]||(n[33]=r=>t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut=r),onChange:n[34]||(n[34]=r=>o.checkResponsableScientifiqueParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,eu),[[h,t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut&&o.responsableScientifiqueErreursPasParDefaut.length>0?(u(),a("ul",tu,[(u(!0),a(p,null,f(o.responsableScientifiqueErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut&&o.responsableScientifiqueErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut}),id:"responsableScientifique","onUpdate:modelValue":n[35]||(n[35]=r=>t.pcru.activityPcruInformations.responsableScientifique=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"50",onInput:n[36]||(n[36]=r=>t.responsableScientifiqueAfficherLesErreursServeur=!1)},null,42,ru),[[P,t.pcru.activityPcruInformations.responsableScientifique]])]),iu,nu,uu,au,su,e("div",null,[o.employeurResponsableScientifiqueErreursPasParDefaut.length>0?(u(),a("ul",ou,[(u(!0),a(p,null,f(o.employeurResponsableScientifiqueErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:o.employeurResponsableScientifiqueErreursPasParDefaut.length>0,bold:!0}),id:"employeurResponsableScientifique","onUpdate:modelValue":n[37]||(n[37]=r=>t.pcru.activityPcruInformations.employeurResponsableScientifique=r),type:"text",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"50",onInput:n[38]||(n[38]=r=>t.employeurResponsableScientifiqueAfficherLesErreursServeur=!1)},null,42,cu),[[P,t.pcru.activityPcruInformations.employeurResponsableScientifique]])]),lu,pu,fu,du,mu,e("div",null,[d(e("select",{"onUpdate:modelValue":n[39]||(n[39]=r=>t.pcru.activityPcruInformations.coordinateurConsortium=r),class:"bold",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},_u,8,Pu),[[_,t.pcru.activityPcruInformations.coordinateurConsortium]])]),Du,Iu,bu,e("span",null,[l("Les partenaires de l'activité ayant l'un des rôles : "),e("em",null,s(t.pcru.rolesPartenaires.join(", ")),1)]),e("div",null,[t.pcru.activityPcruInformations.utiliserPartenairesParDefaut&&t.pcru.pcruInformationParDefaut.partenairesErreurs.length>0?(u(),a("ul",gu,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.partenairesErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserPartenairesParDefaut&&t.pcru.pcruInformationParDefaut.partenairesErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserPartenairesParDefaut})},s(t.pcru.pcruInformationParDefaut.partenaires),3),t.pcru.pcruInformationParDefaut.partenairesParDefautErreur?(u(),a("div",Eu,s(t.pcru.pcruInformationParDefaut.partenairesParDefautErreur),1)):c("",!0),t.pcru.pcruInformationParDefaut.partenairesParDefautInfo?(u(),a("div",Su,s(t.pcru.pcruInformationParDefaut.partenairesParDefautInfo),1)):c("",!0)]),Lu,e("div",null,[e("div",Cu,[l(" Pour définir ou modifier les partenaires, rendez-vous sur la "),e("a",{href:y.urlActivity},"fiche activité",8,xu)])]),Ru,ku,Au,e("span",null,[l("Le nom court du partenaire de l'activité ayant l'un des rôles : "),e("em",null,s(t.pcru.rolesPartenairePrincipal.join(", ")),1)]),e("div",null,[t.pcru.activityPcruInformations.utiliserPartenairePrincipalParDefaut&&t.pcru.pcruInformationParDefaut.partenairePrincipalErreurs.length>0?(u(),a("ul",qu,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.partenairePrincipalErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserPartenairePrincipalParDefaut&&t.pcru.pcruInformationParDefaut.partenairePrincipalErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserPartenairePrincipalParDefaut})},s(t.pcru.pcruInformationParDefaut.partenairePrincipal),3),t.pcru.pcruInformationParDefaut.partenairePrincipalParDefautErreur?(u(),a("div",Uu,s(t.pcru.pcruInformationParDefaut.partenairePrincipalParDefautErreur),1)):c("",!0)]),ju,e("div",wu,[e("div",Fu,[l(" Pour définir ou modifier le partenaire principal, rendez-vous sur la "),e("a",{href:y.urlActivity},"fiche activité",8,Mu)])]),Tu,Vu,Nu,Ou,e("div",null,[t.pcru.activityPcruInformations.utiliserIdPartenairePrincipalParDefaut&&t.pcru.pcruInformationParDefaut.idPartenairePrincipalErreurs.length>0?(u(),a("ul",Yu,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.idPartenairePrincipalErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserIdPartenairePrincipalParDefaut&&t.pcru.pcruInformationParDefaut.idPartenairePrincipalErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserIdPartenairePrincipalParDefaut})},s(t.pcru.pcruInformationParDefaut.idPartenairePrincipal),3),t.pcru.pcruInformationParDefaut.idPartenairePrincipalParDefautErreur?(u(),a("div",Bu,s(t.pcru.pcruInformationParDefaut.idPartenairePrincipalParDefautErreur),1)):c("",!0)]),zu,Gu,Hu,Ku,Xu,e("div",null,[t.pcru.pcruInformationParDefaut.sourceFinancementErreurs.length>0?(u(),a("ul",Wu,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.sourceFinancementErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.pcruInformationParDefaut.sourceFinancementErreurs.length>0,bold:!0})},s(t.pcru.pcruInformationParDefaut.sourceFinancement),3)]),Ju,e("div",null,[e("div",Qu,[l(" Pour définir ou modifier la source de financement PCRU, rendez-vous sur la "),e("a",{href:(L=(S=t.core)==null?void 0:S.urls)==null?void 0:L.edit},"fiche activité",8,Zu)])]),$u,ea,ta,ra,ia,e("div",null,[o.lieuExecutionErreursPasParDefaut.length>0?(u(),a("ul",na,[(u(!0),a(p,null,f(o.lieuExecutionErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:o.lieuExecutionErreursPasParDefaut.length>0,bold:!0}),id:"lieuExecution","onUpdate:modelValue":n[40]||(n[40]=r=>t.pcru.activityPcruInformations.lieuExecution=r),type:"text",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"150",onInput:n[41]||(n[41]=r=>t.lieuExecutionAfficherLesErreursServeur=!1)},null,42,ua),[[P,t.pcru.activityPcruInformations.lieuExecution]])]),aa,sa,oa,ca,e("div",null,[t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut&&t.pcru.pcruInformationParDefaut.dateDerniereSignatureErreurs.length>0?(u(),a("ul",la,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.dateDerniereSignatureErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut&&t.pcru.pcruInformationParDefaut.dateDerniereSignatureErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut})},s(t.pcru.pcruInformationParDefaut.dateDerniereSignature),3),t.pcru.pcruInformationParDefaut.dateDerniereSignatureParDefautErreur?(u(),a("div",pa,s(t.pcru.pcruInformationParDefaut.dateDerniereSignatureParDefautErreur),1)):c("",!0),t.pcru.pcruInformationParDefaut.dateDerniereSignatureParDefautErreur?(u(),a("div",fa,[l(" Pour définir ou modifier la date de signature, rendez-vous sur la "),e("a",{href:(x=(C=t.core)==null?void 0:C.urls)==null?void 0:x.edit},"fiche activité",8,da)])):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[42]||(n[42]=r=>t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut=r),onChange:n[43]||(n[43]=r=>o.checkDateDerniereSignatureParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,ma),[[h,t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut&&o.dateDerniereSignatureErreursPasParDefaut.length>0?(u(),a("ul",Pa,[(u(!0),a(p,null,f(o.dateDerniereSignatureErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut&&o.dateDerniereSignatureErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut}),id:"dateDerniereSignature","onUpdate:modelValue":n[44]||(n[44]=r=>t.pcru.activityPcruInformations.dateDerniereSignature=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"10",onInput:n[45]||(n[45]=r=>t.dateDerniereSignatureAfficherLesErreursServeur=!1)},null,42,ha),[[P,t.pcru.activityPcruInformations.dateDerniereSignature]])]),va,ya,_a,Da,Ia,e("div",null,[o.dureeErreursPasParDefaut.length>0?(u(),a("ul",ba,[(u(!0),a(p,null,f(o.dureeErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("div",ga,[d(e("input",{style:{"margin-left":"1em","text-align":"center"},class:m({invalid:o.dureeErreursPasParDefaut.length>0,bold:!0}),type:"number",step:"0.5",id:"duree","onUpdate:modelValue":n[46]||(n[46]=r=>t.pcru.activityPcruInformations.duree=r),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",max:"999.5",min:"0.5",onInput:n[47]||(n[47]=r=>{t.dureeAfficherLesErreursServeur=!1,t.dateFinAfficherLesErreursServeur=!1})},null,42,Ea),[[P,t.pcru.activityPcruInformations.duree]]),Sa])]),La,Ca,xa,Ra,e("div",null,[t.pcru.activityPcruInformations.utiliserDateDebutParDefaut&&t.pcru.pcruInformationParDefaut.dateDebutErreurs.length>0?(u(),a("ul",ka,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.dateDebutErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserDateDebutParDefaut&&t.pcru.pcruInformationParDefaut.dateDebutErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserDateDebutParDefaut})},s(t.pcru.pcruInformationParDefaut.dateDebut),3),t.pcru.pcruInformationParDefaut.dateDebutParDefautErreur?(u(),a("div",Aa,s(t.pcru.pcruInformationParDefaut.dateDebutParDefautErreur),1)):c("",!0),t.pcru.pcruInformationParDefaut.dateDebutParDefautErreur?(u(),a("div",qa,[l(" Pour définir ou modifier la date de début, rendez-vous sur la "),e("a",{href:(k=(R=t.core)==null?void 0:R.urls)==null?void 0:k.edit},"fiche activité",8,Ua)])):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[48]||(n[48]=r=>t.pcru.activityPcruInformations.utiliserDateDebutParDefaut=r),onChange:n[49]||(n[49]=r=>o.checkDateDebutParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,ja),[[h,t.pcru.activityPcruInformations.utiliserDateDebutParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserDateDebutParDefaut&&o.dateDebutErreursPasParDefaut.length>0?(u(),a("ul",wa,[(u(!0),a(p,null,f(o.dateDebutErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserDateDebutParDefaut&&o.dateDebutErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserDateDebutParDefaut}),id:"dateDebut","onUpdate:modelValue":n[50]||(n[50]=r=>t.pcru.activityPcruInformations.dateDebut=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserDateDebutParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"10",onInput:n[51]||(n[51]=r=>t.dateDebutAfficherLesErreursServeur=!1)},null,42,Fa),[[P,t.pcru.activityPcruInformations.dateDebut]])]),Ma,Ta,Va,Na,e("div",null,[t.pcru.activityPcruInformations.utiliserDateFinParDefaut&&o.dateFinErreursParDefaut.length>0?(u(),a("ul",Oa,[(u(!0),a(p,null,f(o.dateFinErreursParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserDateFinParDefaut&&o.dateFinErreursParDefaut.length>0,bold:t.pcru.activityPcruInformations.utiliserDateFinParDefaut})},s(t.pcru.pcruInformationParDefaut.dateFin),3),t.pcru.pcruInformationParDefaut.dateFinParDefautErreur?(u(),a("div",Ya,s(t.pcru.pcruInformationParDefaut.dateFinParDefautErreur),1)):c("",!0),t.pcru.pcruInformationParDefaut.dateFinParDefautErreur?(u(),a("div",Ba,[l(" Pour définir ou modifier la date de fin, rendez-vous sur la "),e("a",{href:(q=(A=t.core)==null?void 0:A.urls)==null?void 0:q.edit},"fiche activité",8,za)])):c("",!0)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[52]||(n[52]=r=>t.pcru.activityPcruInformations.utiliserDateFinParDefaut=r),onChange:n[53]||(n[53]=r=>o.checkDateFinParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,Ga),[[h,t.pcru.activityPcruInformations.utiliserDateFinParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserDateFinParDefaut&&o.dateFinErreursPasParDefaut.length>0?(u(),a("ul",Ha,[(u(!0),a(p,null,f(o.dateFinErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserDateFinParDefaut&&o.dateFinErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserDateFinParDefaut}),id:"dateFin","onUpdate:modelValue":n[54]||(n[54]=r=>t.pcru.activityPcruInformations.dateFin=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserDateFinParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"10",onInput:n[55]||(n[55]=r=>{t.dateFinAfficherLesErreursServeur=!1,t.dureeAfficherLesErreursServeur=!1})},null,42,Ka),[[P,t.pcru.activityPcruInformations.dateFin]])]),Xa,Wa,Ja,Qa,Za,e("div",null,[o.montantPercuUniteErreursPasParDefaut.length>0?(u(),a("ul",$a,[(u(!0),a(p,null,f(o.montantPercuUniteErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("div",es,[d(e("input",{style:{"margin-left":"1em","text-align":"center"},class:m({invalid:o.montantPercuUniteErreursPasParDefaut.length>0,bold:!0}),type:"number",step:"0.01",id:"montantPercuUnite","onUpdate:modelValue":n[56]||(n[56]=r=>t.pcru.activityPcruInformations.montantPercuUnite=r),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",max:"9999999999.99",min:"-9999999999.99",onInput:n[57]||(n[57]=r=>t.montantPercuUniteAfficherLesErreursServeur=!1)},null,42,ts),[[P,t.pcru.activityPcruInformations.montantPercuUnite]]),rs])]),is,ns,us,as,ss,e("div",null,[o.contributionFinanceurErreursPasParDefaut.length>0?(u(),a("ul",os,[(u(!0),a(p,null,f(o.contributionFinanceurErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("div",cs,[d(e("input",{style:{"margin-left":"1em","text-align":"center"},class:m({invalid:o.contributionFinanceurErreursPasParDefaut.length>0,bold:!0}),type:"number",step:"0.01",id:"contributionFinanceur","onUpdate:modelValue":n[58]||(n[58]=r=>t.pcru.activityPcruInformations.contributionFinanceur=r),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",max:"9999999999.99",min:"-9999999999.99",onInput:n[59]||(n[59]=r=>t.contributionFinanceurAfficherLesErreursServeur=!1)},null,42,ls),[[P,t.pcru.activityPcruInformations.contributionFinanceur]]),ps])]),fs,ds,ms,Ps,e("div",null,[t.pcru.activityPcruInformations.utiliserMontantTotalParDefaut&&t.pcru.pcruInformationParDefaut.montantTotalErreurs.length>0?(u(),a("ul",hs,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.montantTotalErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserMontantTotalParDefaut&&t.pcru.pcruInformationParDefaut.montantTotalErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserMontantTotalParDefaut})},s(t.pcru.pcruInformationParDefaut.montantTotal)+" "+s(t.budget.currency.symbol),3)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[60]||(n[60]=r=>t.pcru.activityPcruInformations.utiliserMontantTotalParDefaut=r),onChange:n[61]||(n[61]=r=>o.checkMontantTotalParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,vs),[[h,t.pcru.activityPcruInformations.utiliserMontantTotalParDefaut]])]),e("div",null,[e("div",ys,[d(e("input",{style:{"margin-left":"1em","text-align":"center"},class:m({bold:!t.pcru.activityPcruInformations.utiliserMontantTotalParDefaut}),type:"number",step:"0.01",id:"montantTotal","onUpdate:modelValue":n[62]||(n[62]=r=>t.pcru.activityPcruInformations.montantTotal=r),disabled:t.pcru.activityPcruInformations.utiliserMontantTotalParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",max:"9999999999.99",min:"-9999999999.99",onInput:n[63]||(n[63]=r=>t.montantTotalAfficherLesErreursServeur=!1)},null,42,_s),[[P,t.pcru.activityPcruInformations.montantTotal]]),Ds])]),Is,bs,gs,Es,e("div",null,[e("span",Ss,s(t.pcru.pcruInformationParDefaut.validePoleCompetitivite?"Oui":"Non"),1)]),Ls,e("div",null,[e("div",Cs,[l(" Pour définir ou modifier la validation du contrat par un pôle de compétitivité, rendez-vous sur la "),e("a",{href:(j=(U=t.core)==null?void 0:U.urls)==null?void 0:j.edit},"fiche activité",8,xs)])]),Rs,ks,As,qs,e("div",null,[t.pcru.pcruInformationParDefaut.poleCompetitiviteErreurs.length>0?(u(),a("ul",Us,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.poleCompetitiviteErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.pcruInformationParDefaut.poleCompetitiviteErreurs.length>0,bold:!0})},s(t.pcru.pcruInformationParDefaut.poleCompetitivite),3)]),js,e("div",null,[e("div",ws,[l(" Pour définir ou modifier le pôle de compétitivité PCRU, rendez-vous sur la "),e("a",{href:(F=(w=t.core)==null?void 0:w.urls)==null?void 0:F.edit},"fiche activité",8,Fs)])]),Ms,Ts,Vs,Ns,Os,e("div",null,[o.commentairesErreursPasParDefaut.length>0?(u(),a("ul",Ys,[(u(!0),a(p,null,f(o.commentairesErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:o.commentairesErreursPasParDefaut.length>0,bold:!0}),id:"commentaires","onUpdate:modelValue":n[64]||(n[64]=r=>t.pcru.activityPcruInformations.commentaires=r),type:"text",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"2000",onInput:n[65]||(n[65]=r=>t.commentairesAfficherLesErreursServeur=!1)},null,42,Bs),[[P,t.pcru.activityPcruInformations.commentaires]])]),zs,Gs,Hs,Ks,Xs,e("div",null,[d(e("select",{"onUpdate:modelValue":n[66]||(n[66]=r=>t.pcru.activityPcruInformations.pia=r),class:"bold",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},$s,8,Ws),[[_,t.pcru.activityPcruInformations.pia]])]),eo,to,ro,io,e("div",null,[t.pcru.activityPcruInformations.utiliserReferenceParDefaut&&t.pcru.pcruInformationParDefaut.referenceErreurs.length>0?(u(),a("ul",no,[(u(!0),a(p,null,f(t.pcru.pcruInformationParDefaut.referenceErreurs,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),e("span",{class:m({invalidSpan:t.pcru.activityPcruInformations.utiliserReferenceParDefaut&&t.pcru.pcruInformationParDefaut.referenceErreurs.length>0,bold:t.pcru.activityPcruInformations.utiliserReferenceParDefaut})},s(t.pcru.pcruInformationParDefaut.reference),3)]),e("div",null,[d(e("input",{type:"checkbox","onUpdate:modelValue":n[67]||(n[67]=r=>t.pcru.activityPcruInformations.utiliserReferenceParDefaut=r),onChange:n[68]||(n[68]=r=>o.checkReferenceParDefaut(r)),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,40,uo),[[h,t.pcru.activityPcruInformations.utiliserReferenceParDefaut]])]),e("div",null,[!t.pcru.activityPcruInformations.utiliserReferenceParDefaut&&o.referenceErreursPasParDefaut.length>0?(u(),a("ul",ao,[(u(!0),a(p,null,f(o.referenceErreursPasParDefaut,r=>(u(),a("li",null,s(r),1))),256))])):c("",!0),d(e("input",{style:{width:"100%"},class:m({invalid:!t.pcru.activityPcruInformations.utiliserReferenceParDefaut&&o.referenceErreursPasParDefaut.length>0,bold:!t.pcru.activityPcruInformations.utiliserReferenceParDefaut}),id:"reference","onUpdate:modelValue":n[69]||(n[69]=r=>t.pcru.activityPcruInformations.reference=r),type:"text",disabled:t.pcru.activityPcruInformations.utiliserReferenceParDefaut||t.pcru.activityPcruInformations.status!="jamais-envoyee",maxlength:"100",onInput:n[70]||(n[70]=r=>t.referenceAfficherLesErreursServeur=!1)},null,42,so),[[P,t.pcru.activityPcruInformations.reference]])]),oo,co,lo,po,fo,e("div",null,[d(e("select",{"onUpdate:modelValue":n[71]||(n[71]=r=>t.pcru.activityPcruInformations.accordCadre=r),class:"bold",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},yo,8,mo),[[_,t.pcru.activityPcruInformations.accordCadre]])]),_o,Do,Io,bo,go,e("div",null,[d(e("select",{"onUpdate:modelValue":n[72]||(n[72]=r=>t.pcru.activityPcruInformations.cifre=r),class:"bold",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},Co,8,Eo),[[_,t.pcru.activityPcruInformations.cifre]])]),xo,Ro,ko,Ao,qo,e("div",null,[d(e("select",{"onUpdate:modelValue":n[73]||(n[73]=r=>t.pcru.activityPcruInformations.chaireIndustrielle=r),class:"bold",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},Mo,8,Uo),[[_,t.pcru.activityPcruInformations.chaireIndustrielle]])]),To,Vo,No,Oo,Yo,e("div",null,[d(e("select",{"onUpdate:modelValue":n[74]||(n[74]=r=>t.pcru.activityPcruInformations.presencePartenaireIndustriel=r),class:"bold",disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},Ko,8,Bo),[[_,t.pcru.activityPcruInformations.presencePartenaireIndustriel]])])]),e("div",Xo,[Wo,d(e("input",{type:"checkbox",style:{"margin-left":"1em"},"onUpdate:modelValue":n[75]||(n[75]=r=>t.pcru.activityPcruInformations.envoiActif=r),disabled:t.pcru.activityPcruInformations.status!="jamais-envoyee"},null,8,Jo),[[h,t.pcru.activityPcruInformations.envoiActif]])]),e("div",Qo,[e("div",Zo,[e("nav",$o,[e("input",{class:"btn btn-default",type:"submit",value:"💾 Enregistrer",disabled:((M=t.pcru)==null?void 0:M.activityPcruInformations.status)!="jamais-envoyee"},null,8,ec)])])])],32)])):c("",!0)])):c("",!0)])],64)}const rc=Q(Z,[["render",tc]]);let B="#activity-pcru-informations",Y=document.querySelector(B);const ic=X(rc,{"url-activity":Y.dataset.urlActivity,"url-pcru-api":Y.dataset.urlPcruApi});ic.mount(B); diff --git a/public/js/oscar/vite/dist/assets/activityspentdetails-1ce1581e.js b/public/js/oscar/vite/dist/assets/activityspentdetails-1ce1581e.js deleted file mode 100644 index f659280b20fbb6a379921ba4298eecd7974c2ba3..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/activityspentdetails-1ce1581e.js +++ /dev/null @@ -1 +0,0 @@ -import{o as i,c as o,d as t,F as y,j as g,t as l,a as u,p as v,r as w,b as c,i as C,T as x,w as D,k as E,g as h,h as B,y as I}from"../vendor.js";import{_ as k}from"../vendor7.js";import{m as N}from"../vendor4.js";const S={props:{lines:{required:!0},total:{required:!0}},computed:{total_engage(){let n=0;return this.lines&&Object.keys(this.lines).forEach(e=>{n+=this.lines[e].montant_engage}),n},total_effectue(){let n=0;return this.lines&&Object.keys(this.lines).forEach(e=>{n+=this.lines[e].montant_effectue}),n}},methods:{handlerEditCompte(n){this.$emit("editcompte",n)}}},O={key:0,class:"list table table-condensed table-bordered table-condensed card"},F=["onClick"],P={class:"cartouche xs",title:"N°SIFAC"},j={key:0},A={key:1},L={key:2},R={style:{"text-align":"right"}},V={style:{"text-align":"right"}},T=["onClick"],z={style:{"font-weight":"bold","font-size":"1.2em"}},q={style:{"text-align":"right"}},G={style:{"text-align":"right"}},J={key:1,class:"alert alert-info"};function H(n,e,m,d,s,r){return i(),o("div",null,[Object.keys(m.lines).length?(i(),o("table",O,[e[6]||(e[6]=t("thead",null,[t("tr",null,[t("th",null,"N°"),t("th",null,"Ligne(s)"),t("th",null,"Statut"),t("th",null,"Type"),t("th",null,"Description"),t("th",{style:{width:"8%"}},"Montant engagé"),t("th",{style:{width:"8%"}},"Montant effectué"),t("th",{style:{width:"8%"}},"Compte Budgetaire"),t("th",{style:{width:"8%"}},"Compte"),t("th",{style:{width:"8%"}},"Date Comptable"),t("th",{style:{width:"8%"}},"Date paiement"),t("th",{style:{width:"8%"}},"Année")])],-1)),t("tbody",null,[(i(!0),o(y,null,g(m.lines,p=>(i(),o("tr",null,[t("td",null,l(p.numpiece),1),t("td",null,[t("button",{onClick:a=>n.$emit("detailsline",p),class:"btn btn-default xs"},l(p.details.length),9,F),(i(!0),o(y,null,g(p.numSifac,a=>(i(),o("span",P,l(a),1))),256))]),t("td",null,[p.btart=="0250"?(i(),o("span",j,e[0]||(e[0]=[t("i",{class:"icon-calculator"},null,-1),u(" Payé ")]))):p.btart=="0100"?(i(),o("span",A,e[1]||(e[1]=[t("i",{class:"icon-bank"},null,-1),u(" Engagé ")]))):(i(),o("span",L,e[2]||(e[2]=[t("i",{class:"icon-attention-1"},null,-1),u(" Inconnu ")]))),u(" "+l(p.btart),1)]),t("td",null,[t("small",null,l(p.types?p.types.join(","):""),1)]),t("td",null,[t("small",null,l(p.text.join(", ")),1)]),t("td",R,[t("strong",null,l(n.$filters.money(p.montant_engage)),1)]),t("td",V,[t("strong",null,l(n.$filters.money(p.montant_effectue)),1)]),t("td",null,l(p.compteBudgetaires.join(", ")),1),t("td",null,[(i(!0),o(y,null,g(p.comptes,a=>(i(),o("span",{class:"cartouche default xs",style:{"white-space":"nowrap"},onClick:f=>r.handlerEditCompte(a)},[u(l(a)+" ",1),e[3]||(e[3]=t("i",{class:"icon-edit"},null,-1))],8,T))),256))]),t("td",null,l(p.dateComptable),1),t("td",null,l(p.datePaiement),1),t("td",null,l(p.annee),1)]))),256))]),t("tfoot",null,[t("tr",z,[e[4]||(e[4]=t("td",{colspan:"5",style:{"text-align":"right"}},"Total :",-1)),t("td",q,l(n.$filters.money(r.total_engage)),1),t("td",G,l(n.$filters.money(r.total_effectue)),1),e[5]||(e[5]=t("td",{colspan:"2"}," ",-1))])])])):(i(),o("div",J," Aucune entrée "))])}const U=k(S,[["render",H]]),K={props:["url"],components:{SpentLinePFIGrouped:U},data(){return{state:"masse",error:null,pendingMsg:"",spentlines:null,masses:{},details:null,displayIgnored:!0,editCompte:null,informations:null,manageRecettes:!0,url_activity:null,url_sync:null,url_download:null,url_spentaffectation:null}},computed:{totalDepenses(){let n=0;for(let e in this.spentlines.synthesis)e!="0"&&e!="1"&&(n+=this.spentlines.synthesis[e].total);return n},byMasse(){let n={datas:{"N.B":{},recettes:{},ignorés:{}},totaux:{"N.B":0,recettes:0,ignorés:0}};for(let e in this.masses)n.datas[e]={},n.totaux[e]=0;if(this.spentlines)for(let e in this.spentlines.spents){let m=this.spentlines.spents[e],d=m.masse,s=m.btart;d=="1"&&(d="recettes"),d=="0"&&(d="ignorés");let r=m.numPiece;n.datas.hasOwnProperty(d)||(d="N.B"),n.datas[d].hasOwnProperty(r)||(n.datas[d][r]={ids:[],numpiece:r,numSifac:[],text:[],types:[],montant:0,montant_engage:0,montant_effectue:0,btart:s,compteBudgetaires:[],comptes:[],masse:[],dateComptable:m.dateComptable,datePaiement:m.datePaiement,annee:m.dateAnneeExercice,refPiece:m.refPiece,details:[]}),n.datas[d][r].details.push(m);let p=m.texteFacture,a=m.designation,f=m.type,b=m.compteGeneral,_=m.compteBudgetaire;n.datas[d][r].numSifac.indexOf(m.numSifac)==-1&&n.datas[d][r].numSifac.push(m.numSifac),n.datas[d][r].montant+=m.montant,n.datas[d][r].montant_effectue+=m.montant_effectue,n.datas[d][r].montant_engage+=m.montant_engage,p&&n.datas[d][r].text.indexOf(p)<0&&n.datas[d][r].text.push(p),a&&n.datas[d][r].text.indexOf(a)<0&&n.datas[d][r].text.push(a),f&&n.datas[d][r].types.indexOf(f)<0&&n.datas[d][r].types.push(f),b&&n.datas[d][r].comptes.indexOf(b)<0&&n.datas[d][r].comptes.push(b),_&&n.datas[d][r].compteBudgetaires.indexOf(_)<0&&n.datas[d][r].compteBudgetaires.push(_)}return n}},methods:{handlerEditCompte(n){this.editCompte=JSON.parse(JSON.stringify(this.spentlines.comptes[n]))},handlerDetailsLine(n){this.details=n},handlerAffectationCompte(n){let e={};e[n.codeFull]=n.annexe,this.editCompte=null,this.pendingMsg="Modification de la masse pour "+n.codeFull;let m=new FormData;m.append("affectation",JSON.stringify(e)),v.post(this.url_spentaffectation,m).then(d=>{this.editCompte=null,this.fetch()},d=>{d.status==403?this.error="Vous n'avez pas l'autorisation d'accès à ces informations.":this.error=d.data,this.pendingMsg=""})},fetch(){this.pendingMsg="Chargement des dépense",v.get(this.url).then(n=>{this.masses=n.data.spents.masses,this.spentlines=n.data.spents,this.informations=n.data.spents.informations,this.url_sync=n.data.spents.url_sync,this.url_activity=n.data.spents.url_activity,this.url_spentaffectation=n.data.spents.url_spentaffectation,this.url_download=n.data.spents.url_download},n=>{n.status==403?this.error="Vous n'avez pas l'autorisation d'accès à ces informations.":this.error="Impossible de charger les dépenses pour ce PFI : "+n.data}).then(n=>{this.pendingMsg=""})}},mounted(){this.fetch()}},Q={class:"spentlines"},W={key:0,class:"error overlay"},X={class:"overlay-content"},Y={key:0,class:"pending overlay"},Z={class:"overlay-content"},$={key:0,class:"overlay"},tt={class:"overlay-content"},et=["value"],nt={key:1,class:"overlay"},st={class:"overlay-content"},lt={class:"list table table-condensed table-bordered table-condensed card"},it={class:"text-small"},ot={style:{"text-align":"right"}},rt={style:{"text-align":"right"}},at={class:"container-fluid"},dt={class:"row"},ut={class:"col-md-3"},pt={key:0,class:"card"},mt={key:0,class:"table table-condensed card synthesis"},ht={style:{"text-align":"right"}},ft={style:{"text-align":"right"}},yt={style:{"text-align":"right"}},gt={style:{"text-align":"right"}},ct={style:{"text-align":"right"}},bt=["href"],_t=["action"],vt=["href"],Ct={key:1,class:"table table-condensed card synthesis"},xt=["href"],kt={style:{"text-align":"right"}},Mt={style:{"text-align":"right"}},wt={class:"total"},Dt={style:{"text-align":"right"}},Et={style:{"text-align":"right"}},Bt={key:0},It={href:"#repport-nb",class:"label label-info"},Nt={style:{"text-align":"right"}},St={style:{"text-align":"right"}},Ot={key:2},Ft={key:0,class:"table table-condensed card synthesis"},Pt={class:"label label-info xs",href:"#repport-1"},jt={style:{"text-align":"right"}},At={style:{"text-align":"right"}},Lt={key:3},Rt={key:0},Vt={key:1},Tt={key:0,class:"table table-condensed card synthesis"},zt={class:"label label-info",href:"#repport-0"},qt={style:{"text-align":"right"}},Gt={class:"col-md-9",style:{height:"80vh","overflow-y":"scroll"}},Jt={key:0},Ht=["id"],Ut={key:0},Kt={key:1},Qt={key:2};function Wt(n,e,m,d,s,r){const p=w("spent-line-p-f-i-grouped");return i(),o("section",Q,[c(x,{name:"fade"},{default:C(()=>[s.error?(i(),o("div",W,[t("div",X,[e[7]||(e[7]=t("i",{class:"icon-warning-empty"},null,-1)),u(" "+l(s.error)+" ",1),e[8]||(e[8]=t("br",null,null,-1)),t("a",{href:"#",onClick:e[0]||(e[0]=a=>s.error=null),class:"btn btn-sm btn-default btn-xs"},e[6]||(e[6]=[t("i",{class:"icon-cancel-circled"},null,-1),u(" Fermer")]))])])):h("",!0)]),_:1}),c(x,{name:"fade"},{default:C(()=>[s.pendingMsg?(i(),o("div",Y,[t("div",Z,[e[9]||(e[9]=t("i",{class:"icon-spinner animate-spin"},null,-1)),u(" "+l(s.pendingMsg),1)])])):h("",!0)]),_:1}),s.editCompte?(i(),o("div",$,[t("div",tt,[t("h3",null,[e[10]||(e[10]=t("i",{class:"icon-zoom-in-outline"},null,-1)),u("Modification de la masse : "+l(s.editCompte.code)+" - "+l(s.editCompte.label),1)]),e[15]||(e[15]=t("hr",null,null,-1)),D(t("select",{name:"","onUpdate:modelValue":e[1]||(e[1]=a=>s.editCompte.annexe=a)},[e[11]||(e[11]=t("option",{value:"0"},"Ignoré",-1)),e[12]||(e[12]=t("option",{value:"1"},"Recette",-1)),(i(!0),o(y,null,g(s.spentlines.masses,(a,f)=>(i(),o("option",{value:f},l(a),9,et))),256))],512),[[E,s.editCompte.annexe]]),t("button",{class:"btn btn-danger",onClick:e[2]||(e[2]=a=>s.editCompte=null)},e[13]||(e[13]=[t("i",{class:"icon-cancel-circled-outline"},null,-1),u("Annuler ")])),t("button",{class:"btn btn-success",onClick:e[3]||(e[3]=a=>r.handlerAffectationCompte(s.editCompte))},e[14]||(e[14]=[t("i",{class:"icon-valid"},null,-1),u("Valider ")]))])])):h("",!0),s.details?(i(),o("div",nt,[t("div",st,[e[17]||(e[17]=t("h3",null,[t("i",{class:"icon-zoom-in-outline"}),u("Détails des entrées comptables")],-1)),t("button",{class:"btn btn-default",onClick:e[4]||(e[4]=a=>s.details=null)},"Fermer"),t("table",lt,[e[16]||(e[16]=t("thead",null,[t("tr",null,[t("th",null,"ID"),t("th",null,"N°SIFAC"),t("th",null,"Btart"),t("th",null,"Description"),t("th",null,"Montant engagé"),t("th",null,"Montant effectué"),t("th",null,"Compte Budgetaire"),t("th",null,"Centre de profit"),t("th",null,"Compte général"),t("th",null,"Masse"),t("th",null,"Date comptable"),t("th",null,"Date paiement"),t("th",null,"Année")])],-1)),t("tbody",null,[(i(!0),o(y,null,g(s.details.details,a=>(i(),o("tr",it,[t("td",null,l(a.syncid),1),t("td",null,l(a.numSifac),1),t("td",null,l(a.btart),1),t("td",null,l(a.texteFacture|a.designation),1),t("td",ot,l(n.$filters.money(a.montant_engage)),1),t("td",rt,l(n.$filters.money(a.montant_effectue)),1),t("td",null,l(a.compteBudgetaire),1),t("td",null,l(a.centreFinancier),1),t("td",null,[t("strong",null,l(a.compteGeneral),1),u(" : "+l(a.type),1)]),t("td",null,[t("strong",null,l(a.masse),1)]),t("td",null,l(a.dateComptable),1),t("td",null,l(a.datePaiement),1),t("td",null,l(a.dateAnneeExercice),1)]))),256))])])])])):h("",!0),t("div",at,[t("div",dt,[t("div",ut,[e[36]||(e[36]=t("h3",null,[t("i",{class:"icon-help-circled"}),u(" Informations ")],-1)),s.informations?(i(),o("div",pt,[s.spentlines?(i(),o("table",mt,[t("tbody",null,[t("tr",null,[e[18]||(e[18]=t("th",null,[t("small",null,"PFI")],-1)),t("td",ht,l(s.informations.PFI),1)]),t("tr",null,[e[19]||(e[19]=t("th",null,[t("small",null,"N°OSCAR")],-1)),t("td",ft,l(s.informations.numOscar),1)]),t("tr",null,[e[20]||(e[20]=t("th",null,[t("small",null,"Montant")],-1)),t("td",yt,l(n.$filters.money(s.informations.amount)),1)]),t("tr",null,[e[22]||(e[22]=t("th",null,[t("small",null,"Projet")],-1)),t("td",gt,[t("strong",null,l(s.informations.projectacronym),1),e[21]||(e[21]=t("br",null,null,-1)),t("small",null,l(s.informations.project),1)])]),t("tr",null,[e[23]||(e[23]=t("th",null,[t("small",null,"Activité")],-1)),t("td",ct,[t("small",null,l(s.informations.label),1)])])])])):h("",!0),s.url_activity?(i(),o("a",{key:1,href:s.url_activity,class:"btn btn-default btn-xs"},e[24]||(e[24]=[t("i",{class:"icon-cube"},null,-1),u(" Revenir à l'activité")]),8,bt)):h("",!0),s.url_sync?(i(),o("form",{key:2,action:s.url_sync,method:"post",class:"form-inline"},e[25]||(e[25]=[t("input",{type:"hidden",name:"action",value:"update"},null,-1),t("button",{type:"submit",class:"btn btn-primary btn-xs"},[t("i",{class:"icon-signal"}),u(" Mettre à jour les données depuis SIFAC ")],-1)]),8,_t)):h("",!0),s.url_download?(i(),o("a",{key:3,href:s.url_download,class:"btn btn-default btn-xs"},e[26]||(e[26]=[t("i",{class:"icon-download"},null,-1),u(" Télécharger les données (Excel)")]),8,vt)):h("",!0)])):h("",!0),e[37]||(e[37]=t("h3",null,[t("i",{class:"icon-calculator"}),u("Dépenses")],-1)),s.spentlines?(i(),o("table",Ct,[e[29]||(e[29]=t("thead",null,[t("tr",null,[t("th",null,"Masse"),t("th",{style:{"text-align":"right"}},"Engagé"),t("th",{style:{"text-align":"right"}},"Effectué")])],-1)),t("tbody",null,[(i(!0),o(y,null,g(s.spentlines.masses,(a,f)=>(i(),o("tr",null,[t("th",null,[t("small",null,l(a),1),t("a",{class:"label label-info xs",href:"#repport-"+f},l(s.spentlines.synthesis[f].nbr_effectue)+" / "+l(s.spentlines.synthesis[f].nbr_engage),9,xt)]),t("td",kt,l(n.$filters.money(s.spentlines.synthesis[f].total_engage)),1),t("td",Mt,l(n.$filters.money(s.spentlines.synthesis[f].total_effectue)),1)]))),256))]),t("tbody",null,[t("tr",wt,[e[27]||(e[27]=t("th",null,"Total",-1)),t("td",Dt,l(n.$filters.money(s.spentlines.synthesis.totaux.engage)),1),t("td",Et,l(n.$filters.money(s.spentlines.synthesis.totaux.effectue)),1)])]),t("tbody",null,[s.spentlines.synthesis["N.B"].total!=0?(i(),o("tr",Bt,[t("th",null,[e[28]||(e[28]=t("small",null,[t("i",{class:"icon-attention"}),u(" Hors-masse")],-1)),t("a",It,l(s.spentlines.synthesis["N.B"].nbr),1)]),t("td",Nt,l(n.$filters.money(s.spentlines.synthesis["N.B"].total_engage)),1),t("td",St,l(n.$filters.money(s.spentlines.synthesis["N.B"].total_effectue)),1)])):h("",!0)])])):h("",!0),s.manageRecettes?(i(),o("div",Ot,[e[31]||(e[31]=t("h3",null,[t("i",{class:"icon-calculator"}),u("Recettes")],-1)),s.spentlines?(i(),o("table",Ft,[t("tbody",null,[t("tr",null,[t("th",null,[e[30]||(e[30]=u("Recette ")),t("a",Pt,l(s.spentlines.synthesis[1].nbr),1)]),t("td",jt,l(n.$filters.money(s.spentlines.synthesis[1].total_engage)),1),t("td",At,l(n.$filters.money(s.spentlines.synthesis[1].total_effectue)),1)])])])):h("",!0)])):h("",!0),n.manageIgnored&&s.spentlines.synthesis[0].total!=0?(i(),o("div",Lt,[t("a",{href:"#",onClick:e[5]||(e[5]=B(a=>s.displayIgnored=!s.displayIgnored,["prevent"]))},[s.displayIgnored?(i(),o("span",Rt,e[32]||(e[32]=[t("i",{class:"icon-eye-off"},null,-1),u(" Cacher")]))):(i(),o("span",Vt,e[33]||(e[33]=[t("i",{class:"icon-eye"},null,-1),u(" Montrer")]))),e[34]||(e[34]=u(" les données ignorées "))]),s.spentlines&&s.displayIgnored?(i(),o("table",Tt,[t("tbody",null,[t("tr",null,[t("th",null,[e[35]||(e[35]=u(" Ignorées ")),t("a",zt,l(s.spentlines.synthesis[0].nbr),1)]),t("td",qt,l(n.$filters.money(s.spentlines.synthesis[0].total)),1)])])])):h("",!0)])):h("",!0)]),t("div",Gt,[s.spentlines!=null?(i(),o("div",Jt,[(i(!0),o(y,null,g(s.masses,(a,f)=>(i(),o("div",null,[t("h3",{id:"repport-"+f},l(a),9,Ht),c(p,{lines:r.byMasse.datas[f],total:s.spentlines.synthesis[f].total,onEditcompte:r.handlerEditCompte,onDetailsline:r.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"])]))),256)),Object.keys(r.byMasse.datas["N.B"]).length>0?(i(),o("div",Ut,[e[38]||(e[38]=t("h3",{id:"repport-nb"},"Hors-masse",-1)),e[39]||(e[39]=t("div",{class:"alert alert-warning"},[t("i",{class:"icon-attention"}),u(" Les comptes des entrées suivantes ne sont pas qualifié. ")],-1)),c(p,{lines:r.byMasse.datas["N.B"],total:s.spentlines.synthesis["N.B"].total,onEditcompte:r.handlerEditCompte,onDetailsline:r.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"])])):h("",!0),s.manageRecettes&&Object.keys(r.byMasse.datas.recettes).length>0?(i(),o("div",Kt,[e[40]||(e[40]=t("h3",{id:"repport-1"},"Recettes",-1)),c(p,{lines:r.byMasse.datas.recettes,total:s.spentlines.synthesis[1].total_effectue,onEditcompte:r.handlerEditCompte,onDetailsline:r.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"]),u(" "+l(s.spentlines.synthesis),1)])):h("",!0),n.manageIgnored&&Object.keys(r.byMasse.datas.ignorés).length>0?(i(),o("div",Qt,[e[41]||(e[41]=t("h3",{id:"repport-0"},"Ignorés",-1)),c(p,{lines:r.byMasse.datas.ignorés,total:s.spentlines.synthesis[0].total,onEditcompte:r.handlerEditCompte,onDetailsline:r.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"])])):h("",!0)])):h("",!0)])])])])}const Xt=k(K,[["render",Wt]]);let Yt=document.querySelector("#depensesdetails");const M=I(Xt,{url:Yt.dataset.url});M.config.globalProperties.$filters={money:function(n){return N.money(n)}};M.mount("#depensesdetails"); diff --git a/public/js/oscar/vite/dist/assets/activityspentdetails-b123c2bb.js b/public/js/oscar/vite/dist/assets/activityspentdetails-b123c2bb.js new file mode 100644 index 0000000000000000000000000000000000000000..e778bcd8879a04f726eee59ad009b686840def01 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/activityspentdetails-b123c2bb.js @@ -0,0 +1 @@ +import{o as l,c as i,d as t,F as m,k as f,t as n,a as c,s as v,r as w,b as y,j as C,T as x,w as D,l as E,g as _,h as B,A as I}from"../vendor.js";import{_ as k}from"../vendor7.js";import{m as N}from"../vendor4.js";const S={props:{lines:{required:!0},total:{required:!0}},computed:{total_engage(){let e=0;return this.lines&&Object.keys(this.lines).forEach(d=>{e+=this.lines[d].montant_engage}),e},total_effectue(){let e=0;return this.lines&&Object.keys(this.lines).forEach(d=>{e+=this.lines[d].montant_effectue}),e}},methods:{handlerEditCompte(e){this.$emit("editcompte",e)}}},O={key:0,class:"list table table-condensed table-bordered table-condensed card"},F=t("thead",null,[t("tr",null,[t("th",null,"N°"),t("th",null,"Ligne(s)"),t("th",null,"Statut"),t("th",null,"Type"),t("th",null,"Description"),t("th",{style:{width:"8%"}},"Montant engagé"),t("th",{style:{width:"8%"}},"Montant effectué"),t("th",{style:{width:"8%"}},"Compte Budgetaire"),t("th",{style:{width:"8%"}},"Compte"),t("th",{style:{width:"8%"}},"Date Comptable"),t("th",{style:{width:"8%"}},"Date paiement"),t("th",{style:{width:"8%"}},"Année")])],-1),P=["onClick"],A={class:"cartouche xs",title:"N°SIFAC"},j={key:0},L=t("i",{class:"icon-calculator"},null,-1),R={key:1},V=t("i",{class:"icon-bank"},null,-1),T={key:2},z=t("i",{class:"icon-attention-1"},null,-1),q={style:{"text-align":"right"}},G={style:{"text-align":"right"}},J=["onClick"],H=t("i",{class:"icon-edit"},null,-1),U={style:{"font-weight":"bold","font-size":"1.2em"}},K=t("td",{colspan:"5",style:{"text-align":"right"}},"Total :",-1),Q={style:{"text-align":"right"}},W={style:{"text-align":"right"}},X=t("td",{colspan:"2"}," ",-1),Y={key:1,class:"alert alert-info"};function Z(e,d,h,r,s,o){return l(),i("div",null,[Object.keys(h.lines).length?(l(),i("table",O,[F,t("tbody",null,[(l(!0),i(m,null,f(h.lines,u=>(l(),i("tr",null,[t("td",null,n(u.numpiece),1),t("td",null,[t("button",{onClick:a=>e.$emit("detailsline",u),class:"btn btn-default xs"},n(u.details.length),9,P),(l(!0),i(m,null,f(u.numSifac,a=>(l(),i("span",A,n(a),1))),256))]),t("td",null,[u.btart=="0250"?(l(),i("span",j,[L,c(" Payé ")])):u.btart=="0100"?(l(),i("span",R,[V,c(" Engagé ")])):(l(),i("span",T,[z,c(" Inconnu ")])),c(" "+n(u.btart),1)]),t("td",null,[t("small",null,n(u.types?u.types.join(","):""),1)]),t("td",null,[t("small",null,n(u.text.join(", ")),1)]),t("td",q,[t("strong",null,n(e.$filters.money(u.montant_engage)),1)]),t("td",G,[t("strong",null,n(e.$filters.money(u.montant_effectue)),1)]),t("td",null,n(u.compteBudgetaires.join(", ")),1),t("td",null,[(l(!0),i(m,null,f(u.comptes,a=>(l(),i("span",{class:"cartouche default xs",style:{"white-space":"nowrap"},onClick:p=>o.handlerEditCompte(a)},[c(n(a)+" ",1),H],8,J))),256))]),t("td",null,n(u.dateComptable),1),t("td",null,n(u.datePaiement),1),t("td",null,n(u.annee),1)]))),256))]),t("tfoot",null,[t("tr",U,[K,t("td",Q,n(e.$filters.money(o.total_engage)),1),t("td",W,n(e.$filters.money(o.total_effectue)),1),X])])])):(l(),i("div",Y," Aucune entrée "))])}const $=k(S,[["render",Z]]),tt={props:["url"],components:{SpentLinePFIGrouped:$},data(){return{state:"masse",error:null,pendingMsg:"",spentlines:null,masses:{},details:null,displayIgnored:!0,editCompte:null,informations:null,manageRecettes:!0,url_activity:null,url_sync:null,url_download:null,url_spentaffectation:null}},computed:{totalDepenses(){let e=0;for(let d in this.spentlines.synthesis)d!="0"&&d!="1"&&(e+=this.spentlines.synthesis[d].total);return e},byMasse(){let e={datas:{"N.B":{},recettes:{},ignorés:{}},totaux:{"N.B":0,recettes:0,ignorés:0}};for(let d in this.masses)e.datas[d]={},e.totaux[d]=0;if(this.spentlines)for(let d in this.spentlines.spents){let h=this.spentlines.spents[d],r=h.masse,s=h.btart;r=="1"&&(r="recettes"),r=="0"&&(r="ignorés");let o=h.numPiece;e.datas.hasOwnProperty(r)||(r="N.B"),e.datas[r].hasOwnProperty(o)||(e.datas[r][o]={ids:[],numpiece:o,numSifac:[],text:[],types:[],montant:0,montant_engage:0,montant_effectue:0,btart:s,compteBudgetaires:[],comptes:[],masse:[],dateComptable:h.dateComptable,datePaiement:h.datePaiement,annee:h.dateAnneeExercice,refPiece:h.refPiece,details:[]}),e.datas[r][o].details.push(h);let u=h.texteFacture,a=h.designation,p=h.type,g=h.compteGeneral,b=h.compteBudgetaire;e.datas[r][o].numSifac.indexOf(h.numSifac)==-1&&e.datas[r][o].numSifac.push(h.numSifac),e.datas[r][o].montant+=h.montant,e.datas[r][o].montant_effectue+=h.montant_effectue,e.datas[r][o].montant_engage+=h.montant_engage,u&&e.datas[r][o].text.indexOf(u)<0&&e.datas[r][o].text.push(u),a&&e.datas[r][o].text.indexOf(a)<0&&e.datas[r][o].text.push(a),p&&e.datas[r][o].types.indexOf(p)<0&&e.datas[r][o].types.push(p),g&&e.datas[r][o].comptes.indexOf(g)<0&&e.datas[r][o].comptes.push(g),b&&e.datas[r][o].compteBudgetaires.indexOf(b)<0&&e.datas[r][o].compteBudgetaires.push(b)}return e}},methods:{handlerEditCompte(e){this.editCompte=JSON.parse(JSON.stringify(this.spentlines.comptes[e]))},handlerDetailsLine(e){this.details=e},handlerAffectationCompte(e){let d={};d[e.codeFull]=e.annexe,this.editCompte=null,this.pendingMsg="Modification de la masse pour "+e.codeFull;let h=new FormData;h.append("affectation",JSON.stringify(d)),v.post(this.url_spentaffectation,h).then(r=>{this.editCompte=null,this.fetch()},r=>{r.status==403?this.error="Vous n'avez pas l'autorisation d'accès à ces informations.":this.error=r.data,this.pendingMsg=""})},fetch(){this.pendingMsg="Chargement des dépense",v.get(this.url).then(e=>{this.masses=e.data.spents.masses,this.spentlines=e.data.spents,this.informations=e.data.spents.informations,this.url_sync=e.data.spents.url_sync,this.url_activity=e.data.spents.url_activity,this.url_spentaffectation=e.data.spents.url_spentaffectation,this.url_download=e.data.spents.url_download},e=>{e.status==403?this.error="Vous n'avez pas l'autorisation d'accès à ces informations.":this.error="Impossible de charger les dépenses pour ce PFI : "+e.data}).then(e=>{this.pendingMsg=""})}},mounted(){this.fetch()}},et={class:"spentlines"},st={key:0,class:"error overlay"},nt={class:"overlay-content"},lt=t("i",{class:"icon-warning-empty"},null,-1),it=t("br",null,null,-1),ot=t("i",{class:"icon-cancel-circled"},null,-1),at={key:0,class:"pending overlay"},rt={class:"overlay-content"},dt=t("i",{class:"icon-spinner animate-spin"},null,-1),ct={key:0,class:"overlay"},ut={class:"overlay-content"},ht=t("i",{class:"icon-zoom-in-outline"},null,-1),_t=t("hr",null,null,-1),pt=t("option",{value:"0"},"Ignoré",-1),mt=t("option",{value:"1"},"Recette",-1),ft=["value"],yt=t("i",{class:"icon-cancel-circled-outline"},null,-1),gt=t("i",{class:"icon-valid"},null,-1),bt={key:1,class:"overlay"},vt={class:"overlay-content"},Ct=t("h3",null,[t("i",{class:"icon-zoom-in-outline"}),c("Détails des entrées comptables")],-1),xt={class:"list table table-condensed table-bordered table-condensed card"},kt=t("thead",null,[t("tr",null,[t("th",null,"ID"),t("th",null,"N°SIFAC"),t("th",null,"Btart"),t("th",null,"Description"),t("th",null,"Montant engagé"),t("th",null,"Montant effectué"),t("th",null,"Compte Budgetaire"),t("th",null,"Centre de profit"),t("th",null,"Compte général"),t("th",null,"Masse"),t("th",null,"Date comptable"),t("th",null,"Date paiement"),t("th",null,"Année")])],-1),Mt={class:"text-small"},wt={style:{"text-align":"right"}},Dt={style:{"text-align":"right"}},Et={class:"container-fluid"},Bt={class:"row"},It={class:"col-md-3"},Nt=t("h3",null,[t("i",{class:"icon-help-circled"}),c(" Informations ")],-1),St={key:0,class:"card"},Ot={key:0,class:"table table-condensed card synthesis"},Ft=t("th",null,[t("small",null,"PFI")],-1),Pt={style:{"text-align":"right"}},At=t("th",null,[t("small",null,"N°OSCAR")],-1),jt={style:{"text-align":"right"}},Lt=t("th",null,[t("small",null,"Montant")],-1),Rt={style:{"text-align":"right"}},Vt=t("th",null,[t("small",null,"Projet")],-1),Tt={style:{"text-align":"right"}},zt=t("br",null,null,-1),qt=t("th",null,[t("small",null,"Activité")],-1),Gt={style:{"text-align":"right"}},Jt=["href"],Ht=t("i",{class:"icon-cube"},null,-1),Ut=["action"],Kt=t("input",{type:"hidden",name:"action",value:"update"},null,-1),Qt=t("button",{type:"submit",class:"btn btn-primary btn-xs"},[t("i",{class:"icon-signal"}),c(" Mettre à jour les données depuis SIFAC ")],-1),Wt=[Kt,Qt],Xt=["href"],Yt=t("i",{class:"icon-download"},null,-1),Zt=t("h3",null,[t("i",{class:"icon-calculator"}),c("Dépenses")],-1),$t={key:1,class:"table table-condensed card synthesis"},te=t("thead",null,[t("tr",null,[t("th",null,"Masse"),t("th",{style:{"text-align":"right"}},"Engagé"),t("th",{style:{"text-align":"right"}},"Effectué")])],-1),ee=["href"],se={style:{"text-align":"right"}},ne={style:{"text-align":"right"}},le={class:"total"},ie=t("th",null,"Total",-1),oe={style:{"text-align":"right"}},ae={style:{"text-align":"right"}},re={key:0},de=t("small",null,[t("i",{class:"icon-attention"}),c(" Hors-masse")],-1),ce={href:"#repport-nb",class:"label label-info"},ue={style:{"text-align":"right"}},he={style:{"text-align":"right"}},_e={key:2},pe=t("h3",null,[t("i",{class:"icon-calculator"}),c("Recettes")],-1),me={key:0,class:"table table-condensed card synthesis"},fe={class:"label label-info xs",href:"#repport-1"},ye={style:{"text-align":"right"}},ge={style:{"text-align":"right"}},be={key:3},ve={key:0},Ce=t("i",{class:"icon-eye-off"},null,-1),xe={key:1},ke=t("i",{class:"icon-eye"},null,-1),Me={key:0,class:"table table-condensed card synthesis"},we={class:"label label-info",href:"#repport-0"},De={style:{"text-align":"right"}},Ee={class:"col-md-9",style:{height:"80vh","overflow-y":"scroll"}},Be={key:0},Ie=["id"],Ne={key:0},Se=t("h3",{id:"repport-nb"},"Hors-masse",-1),Oe=t("div",{class:"alert alert-warning"},[t("i",{class:"icon-attention"}),c(" Les comptes des entrées suivantes ne sont pas qualifié. ")],-1),Fe={key:1},Pe=t("h3",{id:"repport-1"},"Recettes",-1),Ae={key:2},je=t("h3",{id:"repport-0"},"Ignorés",-1);function Le(e,d,h,r,s,o){const u=w("spent-line-p-f-i-grouped");return l(),i("section",et,[y(x,{name:"fade"},{default:C(()=>[s.error?(l(),i("div",st,[t("div",nt,[lt,c(" "+n(s.error)+" ",1),it,t("a",{href:"#",onClick:d[0]||(d[0]=a=>s.error=null),class:"btn btn-sm btn-default btn-xs"},[ot,c(" Fermer")])])])):_("",!0)]),_:1}),y(x,{name:"fade"},{default:C(()=>[s.pendingMsg?(l(),i("div",at,[t("div",rt,[dt,c(" "+n(s.pendingMsg),1)])])):_("",!0)]),_:1}),s.editCompte?(l(),i("div",ct,[t("div",ut,[t("h3",null,[ht,c("Modification de la masse : "+n(s.editCompte.code)+" - "+n(s.editCompte.label),1)]),_t,D(t("select",{name:"","onUpdate:modelValue":d[1]||(d[1]=a=>s.editCompte.annexe=a)},[pt,mt,(l(!0),i(m,null,f(s.spentlines.masses,(a,p)=>(l(),i("option",{value:p},n(a),9,ft))),256))],512),[[E,s.editCompte.annexe]]),t("button",{class:"btn btn-danger",onClick:d[2]||(d[2]=a=>s.editCompte=null)},[yt,c("Annuler ")]),t("button",{class:"btn btn-success",onClick:d[3]||(d[3]=a=>o.handlerAffectationCompte(s.editCompte))},[gt,c("Valider ")])])])):_("",!0),s.details?(l(),i("div",bt,[t("div",vt,[Ct,t("button",{class:"btn btn-default",onClick:d[4]||(d[4]=a=>s.details=null)},"Fermer"),t("table",xt,[kt,t("tbody",null,[(l(!0),i(m,null,f(s.details.details,a=>(l(),i("tr",Mt,[t("td",null,n(a.syncid),1),t("td",null,n(a.numSifac),1),t("td",null,n(a.btart),1),t("td",null,n(a.texteFacture|a.designation),1),t("td",wt,n(e.$filters.money(a.montant_engage)),1),t("td",Dt,n(e.$filters.money(a.montant_effectue)),1),t("td",null,n(a.compteBudgetaire),1),t("td",null,n(a.centreFinancier),1),t("td",null,[t("strong",null,n(a.compteGeneral),1),c(" : "+n(a.type),1)]),t("td",null,[t("strong",null,n(a.masse),1)]),t("td",null,n(a.dateComptable),1),t("td",null,n(a.datePaiement),1),t("td",null,n(a.dateAnneeExercice),1)]))),256))])])])])):_("",!0),t("div",Et,[t("div",Bt,[t("div",It,[Nt,s.informations?(l(),i("div",St,[s.spentlines?(l(),i("table",Ot,[t("tbody",null,[t("tr",null,[Ft,t("td",Pt,n(s.informations.PFI),1)]),t("tr",null,[At,t("td",jt,n(s.informations.numOscar),1)]),t("tr",null,[Lt,t("td",Rt,n(e.$filters.money(s.informations.amount)),1)]),t("tr",null,[Vt,t("td",Tt,[t("strong",null,n(s.informations.projectacronym),1),zt,t("small",null,n(s.informations.project),1)])]),t("tr",null,[qt,t("td",Gt,[t("small",null,n(s.informations.label),1)])])])])):_("",!0),s.url_activity?(l(),i("a",{key:1,href:s.url_activity,class:"btn btn-default btn-xs"},[Ht,c(" Revenir à l'activité")],8,Jt)):_("",!0),s.url_sync?(l(),i("form",{key:2,action:s.url_sync,method:"post",class:"form-inline"},Wt,8,Ut)):_("",!0),s.url_download?(l(),i("a",{key:3,href:s.url_download,class:"btn btn-default btn-xs"},[Yt,c(" Télécharger les données (Excel)")],8,Xt)):_("",!0)])):_("",!0),Zt,s.spentlines?(l(),i("table",$t,[te,t("tbody",null,[(l(!0),i(m,null,f(s.spentlines.masses,(a,p)=>(l(),i("tr",null,[t("th",null,[t("small",null,n(a),1),t("a",{class:"label label-info xs",href:"#repport-"+p},n(s.spentlines.synthesis[p].nbr_effectue)+" / "+n(s.spentlines.synthesis[p].nbr_engage),9,ee)]),t("td",se,n(e.$filters.money(s.spentlines.synthesis[p].total_engage)),1),t("td",ne,n(e.$filters.money(s.spentlines.synthesis[p].total_effectue)),1)]))),256))]),t("tbody",null,[t("tr",le,[ie,t("td",oe,n(e.$filters.money(s.spentlines.synthesis.totaux.engage)),1),t("td",ae,n(e.$filters.money(s.spentlines.synthesis.totaux.effectue)),1)])]),t("tbody",null,[s.spentlines.synthesis["N.B"].total!=0?(l(),i("tr",re,[t("th",null,[de,t("a",ce,n(s.spentlines.synthesis["N.B"].nbr),1)]),t("td",ue,n(e.$filters.money(s.spentlines.synthesis["N.B"].total_engage)),1),t("td",he,n(e.$filters.money(s.spentlines.synthesis["N.B"].total_effectue)),1)])):_("",!0)])])):_("",!0),s.manageRecettes?(l(),i("div",_e,[pe,s.spentlines?(l(),i("table",me,[t("tbody",null,[t("tr",null,[t("th",null,[c("Recette "),t("a",fe,n(s.spentlines.synthesis[1].nbr),1)]),t("td",ye,n(e.$filters.money(s.spentlines.synthesis[1].total_engage)),1),t("td",ge,n(e.$filters.money(s.spentlines.synthesis[1].total_effectue)),1)])])])):_("",!0)])):_("",!0),e.manageIgnored&&s.spentlines.synthesis[0].total!=0?(l(),i("div",be,[t("a",{href:"#",onClick:d[5]||(d[5]=B(a=>s.displayIgnored=!s.displayIgnored,["prevent"]))},[s.displayIgnored?(l(),i("span",ve,[Ce,c(" Cacher")])):(l(),i("span",xe,[ke,c(" Montrer")])),c(" les données ignorées ")]),s.spentlines&&s.displayIgnored?(l(),i("table",Me,[t("tbody",null,[t("tr",null,[t("th",null,[c(" Ignorées "),t("a",we,n(s.spentlines.synthesis[0].nbr),1)]),t("td",De,n(e.$filters.money(s.spentlines.synthesis[0].total)),1)])])])):_("",!0)])):_("",!0)]),t("div",Ee,[s.spentlines!=null?(l(),i("div",Be,[(l(!0),i(m,null,f(s.masses,(a,p)=>(l(),i("div",null,[t("h3",{id:"repport-"+p},n(a),9,Ie),y(u,{lines:o.byMasse.datas[p],total:s.spentlines.synthesis[p].total,onEditcompte:o.handlerEditCompte,onDetailsline:o.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"])]))),256)),Object.keys(o.byMasse.datas["N.B"]).length>0?(l(),i("div",Ne,[Se,Oe,y(u,{lines:o.byMasse.datas["N.B"],total:s.spentlines.synthesis["N.B"].total,onEditcompte:o.handlerEditCompte,onDetailsline:o.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"])])):_("",!0),s.manageRecettes&&Object.keys(o.byMasse.datas.recettes).length>0?(l(),i("div",Fe,[Pe,y(u,{lines:o.byMasse.datas.recettes,total:s.spentlines.synthesis[1].total_effectue,onEditcompte:o.handlerEditCompte,onDetailsline:o.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"]),c(" "+n(s.spentlines.synthesis),1)])):_("",!0),e.manageIgnored&&Object.keys(o.byMasse.datas.ignorés).length>0?(l(),i("div",Ae,[je,y(u,{lines:o.byMasse.datas.ignorés,total:s.spentlines.synthesis[0].total,onEditcompte:o.handlerEditCompte,onDetailsline:o.handlerDetailsLine},null,8,["lines","total","onEditcompte","onDetailsline"])])):_("",!0)])):_("",!0)])])])])}const Re=k(tt,[["render",Le]]);let Ve=document.querySelector("#depensesdetails");const M=I(Re,{url:Ve.dataset.url});M.config.globalProperties.$filters={money:function(e){return N.money(e)}};M.mount("#depensesdetails"); diff --git a/public/js/oscar/vite/dist/assets/activityspentsynthesis-ab25eb3e.js b/public/js/oscar/vite/dist/assets/activityspentsynthesis-841a21e7.js similarity index 80% rename from public/js/oscar/vite/dist/assets/activityspentsynthesis-ab25eb3e.js rename to public/js/oscar/vite/dist/assets/activityspentsynthesis-841a21e7.js index f8fedc38f8c1e5f632a39f45349de4a224d8359d..525919478ba99a4ea1637e13c1b8946ea69cd8c7 100644 --- a/public/js/oscar/vite/dist/assets/activityspentsynthesis-ab25eb3e.js +++ b/public/js/oscar/vite/dist/assets/activityspentsynthesis-841a21e7.js @@ -1 +1 @@ -import{y as r}from"../vendor.js";import{A as m}from"../vendor13.js";import{m as n}from"../vendor4.js";import"../vendor7.js";let e=document.querySelector("#depenses2");const t=r(m,{url:e.dataset.url,syncurl:e.dataset.syncurl});t.config.globalProperties.$filters={money:function(o){return n.money(o)}};t.mount("#depenses2"); +import{A as r}from"../vendor.js";import{A as m}from"../vendor13.js";import{m as n}from"../vendor4.js";import"../vendor7.js";let e=document.querySelector("#depenses2");const t=r(m,{url:e.dataset.url,syncurl:e.dataset.syncurl});t.config.globalProperties.$filters={money:function(o){return n.money(o)}};t.mount("#depenses2"); diff --git a/public/js/oscar/vite/dist/assets/activityworkpackage-db6bf6ca.js b/public/js/oscar/vite/dist/assets/activityworkpackage-5bc07c5a.js similarity index 81% rename from public/js/oscar/vite/dist/assets/activityworkpackage-db6bf6ca.js rename to public/js/oscar/vite/dist/assets/activityworkpackage-5bc07c5a.js index ddc11aa461b938d5beaf6decf59dae25671376c0..c099d12fb9a429e40c02424302a90d825201d6be 100644 --- a/public/js/oscar/vite/dist/assets/activityworkpackage-db6bf6ca.js +++ b/public/js/oscar/vite/dist/assets/activityworkpackage-5bc07c5a.js @@ -1 +1 @@ -import{o as t,c as e,y as o}from"../vendor.js";import{_ as r}from"../vendor7.js";const c={data(){return{foo:"bar"}}};function n(i,m,k,l,u,_){return t(),e("div",null,"Workpackage")}const p=r(c,[["render",n]]);let a=document.querySelector("#activityworkpackage");const s=o(p,{url:a.dataset.url,manage:a.dataset.manage});s.mount("#activityworkpackage"); +import{o as t,c as e,A as o}from"../vendor.js";import{_ as r}from"../vendor7.js";const c={data(){return{foo:"bar"}}};function n(i,m,k,l,u,_){return t(),e("div",null,"Workpackage")}const p=r(c,[["render",n]]);let a=document.querySelector("#activityworkpackage");const s=o(p,{url:a.dataset.url,manage:a.dataset.manage});s.mount("#activityworkpackage"); diff --git a/public/js/oscar/vite/dist/assets/adminroleorganization-20533524.js b/public/js/oscar/vite/dist/assets/adminroleorganization-20533524.js new file mode 100644 index 0000000000000000000000000000000000000000..5a96bc69d34d4ba77ce99ce7409cabd3f7dd098b --- /dev/null +++ b/public/js/oscar/vite/dist/assets/adminroleorganization-20533524.js @@ -0,0 +1 @@ +import{s as c,o as i,c as r,d as e,t as a,g as d,a as l,w as h,l as y,F as g,k as m,b as k,j as M,T as C,v as f,y as x,f as D,h as j,n as b,A as S}from"../vendor.js";import{_ as w}from"../vendor7.js";const A={data(){return{roles:[],loadingMsg:null,form:null,manage:!1,deleteRole:null,merged:null,merged_dest:null,doublons:null}},props:{url:{required:!0},manage:{default:!1}},computed:{loading(){return this.loadingMsg!=null}},methods:{mergeUi(o){this.merged_dest=null,this.merged=o},perfomDoublons(){let o={action:"doublons"};this.loadingMsg="Suppression des doublons...",c.post(this.url,o).then(t=>{this.fetch()},t=>{flashMessage("error",t.response.data)}).then(()=>{this.loadingMsg=null,this.doublons=null,this.fetch()})},performMerge(){let o={action:"merge",from:this.merged,to:this.merged_dest};this.loadingMsg="Fusion des rôles...",c.post(this.url,o).then(t=>{console.log("ok"),this.fetch()},t=>{console.log(t),flashMessage("error",t.response.data)}).then(()=>{this.loadingMsg=null,this.merged=null})},formNew(){this.form={label:"",description:"",principal:!1}},save(){this.form.id?(this.loadingMsg="Mise à jour du rôle...",c.put(this.url+"/"+this.form.id,this.form).then(o=>{for(let t=0;t{flashMessage("error",o.response.data)}).then(()=>{this.loadingMsg=null,this.form=null})):(this.loadingMsg="Ajout du nouveau rôle...",c.post(this.url+"",this.form).then(o=>{this.roles.push(o.data),flashMessage("success","le rôle a bien été ajouté.")},o=>{flashMessage("error",o.response.data)}).then(()=>{this.loadingMsg=null,this.form=null}))},performDelete(){this.loadingMsg="Suppression du rôle...";let o=this.deleteRole;c.delete(this.url+"/"+o.id,this.form).then(t=>{this.roles.splice(this.roles.indexOf(o),1),flashMessage("success","le rôle a bien été supprimé.")},t=>{flashMessage("error",t.response.data)}).then(()=>{this.loadingMsg=null,this.form=null,this.deleteRole=null})},remove(o){this.deleteRole=o},handlerDisplayDoublons(){this.loadingMsg="Chargement des doublons",c.get(this.url+"?a=doublon").then(o=>{this.doublons=o.data},o=>{flashMessage("error",o.body)}).then(()=>this.loadingMsg=null)},fetch(){this.loadingMsg="Chargement des rôles",c.get(this.url).then(o=>{this.roles=o.data},o=>{flashMessage("error",o.body)}).then(()=>this.loadingMsg=null)}},created(){this.fetch()}},N={key:0,class:"vue-loader"},z={key:1,class:"overlay"},R={class:"overlay-content container"},q={key:2,class:"overlay"},V={class:"overlay-content container"},U=["value"],O={key:0,class:"alert alert-danger"},T={key:3,class:"overlay"},B={class:"overlay-content container"},F=e("h3",null,"Dédoublonage des rôles",-1),L={class:"alert alert-info"},E={style:{"border-bottom":"solid thin #999"}},J=["title"],P=e("i",{class:"icon-building-filled"},null,-1),G={key:0},H=e("i",{class:"icon-tag"},null,-1),I=e("br",null,null,-1),K={key:0},Q=e("i",{class:"icon-cube"},null,-1),W={key:1},X=e("i",{class:"icon-cubes"},null,-1),Y={key:0,class:"form-wrapper"},Z={key:0},$={key:1},ee=e("i",{class:"glyphicon glyphicon-remove"},null,-1),se=[ee],te={class:"form-group"},le=e("label",null,"Nom du rôle",-1),ne={class:"form-group"},oe=e("p",{class:"alert alert-warning"},[e("i",{class:"icon-help-circled"}),l(" Un rôle définit comme principal débloque les droits des membres de l'organisation lorsqu'elle est affectée avec ce rôle à une activités ")],-1),ie={class:"form-group"},re=e("label",null,"Description",-1),ae={class:"buttons-bar"},ue={class:"btn-group"},de=e("button",{type:"submit",class:"btn btn-primary"},[e("i",{class:"icon-floppy"}),l(" Enregistrer ")],-1),ce=e("i",{class:"icon-block"},null,-1),he={class:"row"},ge={class:"col-md-8"},me={class:"card-title"},pe={key:0,class:"icon-asterisk"},_e={key:0,class:"alert alert-warning"},fe=e("i",{class:"icon-attention-1"},null,-1),be=e("strong",{style:{"text-decoration":"underline"}},"débloque les privilèges",-1),ve={key:1,class:"card-footer"},ye=["onClick"],ke=e("i",{class:"icon-pencil"},null,-1),Me=["onClick"],Ce=e("i",{class:"icon-fork"},null,-1),xe=["onClick"],De=e("i",{class:"icon-trash"},null,-1),je={class:"col-md-4"},Se=e("i",{class:"icon-circled-plus"},null,-1);function we(o,t,p,ze,n,u){return i(),r("section",null,[u.loading?(i(),r("div",N,[e("span",null,a(n.loadingMsg),1)])):d("",!0),n.deleteRole?(i(),r("div",z,[e("div",R,[e("h3",null,[l("Supprimer le role "),e("strong",null,a(n.deleteRole.label),1),l(" ?")]),e("nav",null,[e("button",{type:"button",class:"btn btn-danger",onClick:t[0]||(t[0]=s=>u.performDelete())},"Supprimer"),e("button",{type:"button",onClick:t[1]||(t[1]=s=>n.deleteRole=null),class:"btn btn-default"},"Annuler")])])])):d("",!0),n.merged?(i(),r("div",q,[e("div",V,[e("h3",null,[l("Migration du rôle "),e("strong",null,a(n.merged.label),1),l(" ?")]),l(" Migration du rôle "),e("strong",null,a(n.merged.label),1),l(" vers le rôle "),h(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>n.merged_dest=s)},[(i(!0),r(g,null,m(n.roles,s=>(i(),r("option",{value:s},a(s.label),9,U))),256))],512),[[y,n.merged_dest]]),n.merged_dest?(i(),r("div",O,[l(" Les utilisation du rôle "),e("strong",null,a(n.merged.label),1),l(" vont être remplacées par le rôle "),e("strong",null,a(n.merged_dest.label),1),l(", cette modification sera appliquées sur toutes les activités de recherche / projets. ")])):d("",!0),e("nav",null,[e("button",{type:"button",class:"btn btn-danger",onClick:t[3]||(t[3]=s=>u.performMerge())},"Migrer"),e("button",{type:"button",onClick:t[4]||(t[4]=s=>n.merged=null),class:"btn btn-default"},"Annuler")])])])):d("",!0),n.doublons?(i(),r("div",T,[e("div",B,[F,e("div",L,a(n.doublons.length)+" doublon(s) détécté dans les activités de recherche ",1),(i(!0),r(g,null,m(n.doublons,s=>(i(),r("article",E,[l(" L'organisation "),e("strong",{title:s.organization_fullname},[P,s.organization_code?(i(),r("code",G,"["+a(s.organization_code)+"]",1)):d("",!0),l(" "+a(s.organization_shortname||s.organization_fullname),1)],8,J),l(" est qualifiée "),e("strong",null,a(s.total)+" fois ",1),l(" avec le rôle "),e("strong",null,[H,l(a(s.label),1)]),l(),I,s.activity_id?(i(),r("span",K,[l(" sur l'activité "),e("strong",null,[Q,e("code",null,a(s.activity_oscarnum),1),e("span",null,a(s.activity_label),1)])])):(i(),r("span",W,[l(" sur le projet "),e("strong",null,[X,e("code",null,a(s.project_acronym),1),e("span",null,a(s.project_label),1)])]))]))),256)),e("nav",null,[e("button",{type:"button",class:"btn btn-danger",onClick:t[5]||(t[5]=s=>u.perfomDoublons())},"Dédoublonner"),e("button",{type:"button",onClick:t[6]||(t[6]=s=>n.doublons=null),class:"btn btn-default"},"Annuler")])])])):d("",!0),k(C,{name:"popup"},{default:M(()=>[n.form?(i(),r("div",Y,[e("form",{action:"",onSubmit:t[12]||(t[12]=j((...s)=>u.save&&u.save(...s),["prevent"])),class:"container oscar-form"},[e("header",null,[e("h1",null,[n.form.id?(i(),r("span",Z,[l("Modification de "),e("strong",null,a(n.form.label),1)])):(i(),r("span",$,"Nouveau rôle"))]),e("a",{href:"#",onClick:t[7]||(t[7]=s=>n.form=null),class:"closer"},se)]),e("div",te,[le,h(e("input",{id:"role_roleid",type:"text",class:"form-control",placeholder:"Role","onUpdate:modelValue":t[8]||(t[8]=s=>n.form.label=s),name:"label"},null,512),[[f,n.form.label]])]),e("div",ne,[e("label",null,[l("Principal ("),e("span",{style:x({"text-decoration":n.form.principal?"underline":"line-through"})},"Activation des privilèges",4),l(")")]),oe,h(e("input",{type:"checkbox",class:"form-control","onUpdate:modelValue":t[9]||(t[9]=s=>n.form.principal=s)},null,512),[[D,n.form.principal]])]),e("div",ie,[re,h(e("textarea",{class:"form-control","onUpdate:modelValue":t[10]||(t[10]=s=>n.form.description=s)},null,512),[[f,n.form.description]])]),e("footer",ae,[e("div",ue,[de,e("button",{type:"button",class:"btn btn-default",onClick:t[11]||(t[11]=s=>n.form=null)},[ce,l(" Annuler ")])])])],32)])):d("",!0)]),_:1}),e("div",he,[e("div",ge,[l(" Rôles : "),(i(!0),r(g,null,m(n.roles,s=>(i(),r("article",{class:b(["card xs",{active:s.principal}])},[e("h1",me,[e("span",null,[s.principal?(i(),r("i",pe)):d("",!0),l(" "+a(s.label)+" ",1),e("span",{class:b(["cartouche xs",{primary:s.in_activity||s.in_project}])},[e("strong",null,a(s.in_activity+s.in_project),1),l(" utilisation(s) ")],2)])]),s.principal?(i(),r("p",_e,[fe,l(" Ce rôle "),be,l(" de ces membres lorsqu'il est utilisé pour qualifier le rôle d'une organisation sur une activité/un projet ")])):d("",!0),e("p",null,a(s.description),1),p.manage?(i(),r("nav",ve,[e("button",{class:"btn btn-xs btn-default",onClick:_=>n.form=JSON.parse(JSON.stringify(s))},[ke,l(" Éditer ")],8,ye),e("button",{class:"btn btn-xs btn-info",onClick:_=>u.mergeUi(s)},[Ce,l(" Migrer ")],8,Me),e("button",{class:"btn btn-xs btn-danger",onClick:_=>u.remove(s)},[De,l(" Supprimer ")],8,xe)])):d("",!0)],2))),256))]),e("div",je,[l(" Outils "),e("button",{class:"btn btn-primary",onClick:t[13]||(t[13]=(...s)=>u.handlerDisplayDoublons&&u.handlerDisplayDoublons(...s))}," Afficher les doublons ")])]),p.manage?(i(),r("button",{key:4,onClick:t[14]||(t[14]=(...s)=>u.formNew&&u.formNew(...s)),class:"btn btn-default"},[Se,l(" Ajouter un nouveau rôle ")])):d("",!0)])}const Ae=w(A,[["render",we]]);let v=document.querySelector("#adminroleorganization");const Ne=S(Ae,{url:v.dataset.url,manage:v.dataset.manage});Ne.mount("#adminroleorganization"); diff --git a/public/js/oscar/vite/dist/assets/adminroleorganization-cbf876f6.js b/public/js/oscar/vite/dist/assets/adminroleorganization-cbf876f6.js deleted file mode 100644 index 9e0c538d24990f91b32e20da93e70a6fda7a3070..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/adminroleorganization-cbf876f6.js +++ /dev/null @@ -1 +0,0 @@ -import{p as g,o as i,c as r,d as l,t as u,g as d,a as t,w as m,k as c,F as p,j as f,b as M,i as C,T as x,v as y,x as D,f as j,h as S,n as h,y as w}from"../vendor.js";import{_ as N}from"../vendor7.js";const z={data(){return{roles:[],loadingMsg:null,form:null,manage:!1,deleteRole:null,merged:null,merged_dest:null,doublons:null}},props:{url:{required:!0},manage:{default:!1}},computed:{loading(){return this.loadingMsg!=null}},methods:{mergeUi(o){this.merged_dest=null,this.merged=o},perfomDoublons(){let o={action:"doublons"};this.loadingMsg="Suppression des doublons...",g.post(this.url,o).then(e=>{this.fetch()},e=>{flashMessage("error",e.response.data)}).then(()=>{this.loadingMsg=null,this.doublons=null,this.fetch()})},performMerge(){let o={action:"merge",from:this.merged,to:this.merged_dest};this.loadingMsg="Fusion des rôles...",g.post(this.url,o).then(e=>{console.log("ok"),this.fetch()},e=>{console.log(e),flashMessage("error",e.response.data)}).then(()=>{this.loadingMsg=null,this.merged=null})},formNew(){this.form={label:"",description:"",principal:!1}},save(){this.form.id?(this.loadingMsg="Mise à jour du rôle...",g.put(this.url+"/"+this.form.id,this.form).then(o=>{for(let e=0;e{flashMessage("error",o.response.data)}).then(()=>{this.loadingMsg=null,this.form=null})):(this.loadingMsg="Ajout du nouveau rôle...",g.post(this.url+"",this.form).then(o=>{this.roles.push(o.data),flashMessage("success","le rôle a bien été ajouté.")},o=>{flashMessage("error",o.response.data)}).then(()=>{this.loadingMsg=null,this.form=null}))},performDelete(){this.loadingMsg="Suppression du rôle...";let o=this.deleteRole;g.delete(this.url+"/"+o.id,this.form).then(e=>{this.roles.splice(this.roles.indexOf(o),1),flashMessage("success","le rôle a bien été supprimé.")},e=>{flashMessage("error",e.response.data)}).then(()=>{this.loadingMsg=null,this.form=null,this.deleteRole=null})},remove(o){this.deleteRole=o},handlerDisplayDoublons(){this.loadingMsg="Chargement des doublons",g.get(this.url+"?a=doublon").then(o=>{this.doublons=o.data},o=>{flashMessage("error",o.body)}).then(()=>this.loadingMsg=null)},fetch(){this.loadingMsg="Chargement des rôles",g.get(this.url).then(o=>{this.roles=o.data},o=>{flashMessage("error",o.body)}).then(()=>this.loadingMsg=null)}},created(){this.fetch()}},A={key:0,class:"vue-loader"},R={key:1,class:"overlay"},q={class:"overlay-content container"},V={key:2,class:"overlay"},U={class:"overlay-content container"},O=["value"],T={key:0,class:"alert alert-danger"},B={key:3,class:"overlay"},F={class:"overlay-content container"},L={class:"alert alert-info"},E={style:{"border-bottom":"solid thin #999"}},J=["title"],P={key:0},G={key:0},H={key:1},I={key:0,class:"form-wrapper"},K={key:0},Q={key:1},W={class:"form-group"},X={class:"form-group"},Y={class:"form-group"},Z={class:"buttons-bar"},_={class:"btn-group"},$={class:"row"},ee={class:"col-md-8"},le={class:"card-title"},se={key:0,class:"icon-asterisk"},te={key:0,class:"alert alert-warning"},ne={key:1,class:"card-footer"},oe=["onClick"],ie=["onClick"],re=["onClick"],ue={class:"col-md-4"};function ae(o,e,b,me,n,a){return i(),r("section",null,[a.loading?(i(),r("div",A,[l("span",null,u(n.loadingMsg),1)])):d("",!0),n.deleteRole?(i(),r("div",R,[l("div",q,[l("h3",null,[e[15]||(e[15]=t("Supprimer le role ")),l("strong",null,u(n.deleteRole.label),1),e[16]||(e[16]=t(" ?"))]),l("nav",null,[l("button",{type:"button",class:"btn btn-danger",onClick:e[0]||(e[0]=s=>a.performDelete())},"Supprimer"),l("button",{type:"button",onClick:e[1]||(e[1]=s=>n.deleteRole=null),class:"btn btn-default"},"Annuler")])])])):d("",!0),n.merged?(i(),r("div",V,[l("div",U,[l("h3",null,[e[17]||(e[17]=t("Migration du rôle ")),l("strong",null,u(n.merged.label),1),e[18]||(e[18]=t(" ?"))]),e[22]||(e[22]=t(" Migration du rôle ")),l("strong",null,u(n.merged.label),1),e[23]||(e[23]=t(" vers le rôle ")),m(l("select",{"onUpdate:modelValue":e[2]||(e[2]=s=>n.merged_dest=s)},[(i(!0),r(p,null,f(n.roles,s=>(i(),r("option",{value:s},u(s.label),9,O))),256))],512),[[c,n.merged_dest]]),n.merged_dest?(i(),r("div",T,[e[19]||(e[19]=t(" Les utilisation du rôle ")),l("strong",null,u(n.merged.label),1),e[20]||(e[20]=t(" vont être remplacées par le rôle ")),l("strong",null,u(n.merged_dest.label),1),e[21]||(e[21]=t(", cette modification sera appliquées sur toutes les activités de recherche / projets. "))])):d("",!0),l("nav",null,[l("button",{type:"button",class:"btn btn-danger",onClick:e[3]||(e[3]=s=>a.performMerge())},"Migrer"),l("button",{type:"button",onClick:e[4]||(e[4]=s=>n.merged=null),class:"btn btn-default"},"Annuler")])])])):d("",!0),n.doublons?(i(),r("div",B,[l("div",F,[e[35]||(e[35]=l("h3",null,"Dédoublonage des rôles",-1)),l("div",L,u(n.doublons.length)+" doublon(s) détécté dans les activités de recherche ",1),(i(!0),r(p,null,f(n.doublons,s=>(i(),r("article",E,[e[30]||(e[30]=t(" L'organisation ")),l("strong",{title:s.organization_fullname},[e[24]||(e[24]=l("i",{class:"icon-building-filled"},null,-1)),s.organization_code?(i(),r("code",P,"["+u(s.organization_code)+"]",1)):d("",!0),t(" "+u(s.organization_shortname||s.organization_fullname),1)],8,J),e[31]||(e[31]=t(" est qualifiée ")),l("strong",null,u(s.total)+" fois ",1),e[32]||(e[32]=t(" avec le rôle ")),l("strong",null,[e[25]||(e[25]=l("i",{class:"icon-tag"},null,-1)),t(u(s.label),1)]),e[33]||(e[33]=t()),e[34]||(e[34]=l("br",null,null,-1)),s.activity_id?(i(),r("span",G,[e[27]||(e[27]=t(" sur l'activité ")),l("strong",null,[e[26]||(e[26]=l("i",{class:"icon-cube"},null,-1)),l("code",null,u(s.activity_oscarnum),1),l("span",null,u(s.activity_label),1)])])):(i(),r("span",H,[e[29]||(e[29]=t(" sur le projet ")),l("strong",null,[e[28]||(e[28]=l("i",{class:"icon-cubes"},null,-1)),l("code",null,u(s.project_acronym),1),l("span",null,u(s.project_label),1)])]))]))),256)),l("nav",null,[l("button",{type:"button",class:"btn btn-danger",onClick:e[5]||(e[5]=s=>a.perfomDoublons())},"Dédoublonner"),l("button",{type:"button",onClick:e[6]||(e[6]=s=>n.doublons=null),class:"btn btn-default"},"Annuler")])])])):d("",!0),M(x,{name:"popup"},{default:C(()=>[n.form?(i(),r("div",I,[l("form",{action:"",onSubmit:e[12]||(e[12]=S((...s)=>a.save&&a.save(...s),["prevent"])),class:"container oscar-form"},[l("header",null,[l("h1",null,[n.form.id?(i(),r("span",K,[e[36]||(e[36]=t("Modification de ")),l("strong",null,u(n.form.label),1)])):(i(),r("span",Q,"Nouveau rôle"))]),l("a",{href:"#",onClick:e[7]||(e[7]=s=>n.form=null),class:"closer"},e[37]||(e[37]=[l("i",{class:"glyphicon glyphicon-remove"},null,-1)]))]),l("div",W,[e[38]||(e[38]=l("label",null,"Nom du rôle",-1)),m(l("input",{id:"role_roleid",type:"text",class:"form-control",placeholder:"Role","onUpdate:modelValue":e[8]||(e[8]=s=>n.form.label=s),name:"label"},null,512),[[y,n.form.label]])]),l("div",X,[l("label",null,[e[39]||(e[39]=t("Principal (")),l("span",{style:D({"text-decoration":n.form.principal?"underline":"line-through"})},"Activation des privilèges",4),e[40]||(e[40]=t(")"))]),e[41]||(e[41]=l("p",{class:"alert alert-warning"},[l("i",{class:"icon-help-circled"}),t(" Un rôle définit comme principal débloque les droits des membres de l'organisation lorsqu'elle est affectée avec ce rôle à une activités ")],-1)),m(l("input",{type:"checkbox",class:"form-control","onUpdate:modelValue":e[9]||(e[9]=s=>n.form.principal=s)},null,512),[[j,n.form.principal]])]),l("div",Y,[e[42]||(e[42]=l("label",null,"Description",-1)),m(l("textarea",{class:"form-control","onUpdate:modelValue":e[10]||(e[10]=s=>n.form.description=s)},null,512),[[y,n.form.description]])]),l("footer",Z,[l("div",_,[e[44]||(e[44]=l("button",{type:"submit",class:"btn btn-primary"},[l("i",{class:"icon-floppy"}),t(" Enregistrer ")],-1)),l("button",{type:"button",class:"btn btn-default",onClick:e[11]||(e[11]=s=>n.form=null)},e[43]||(e[43]=[l("i",{class:"icon-block"},null,-1),t(" Annuler ")]))])])],32)])):d("",!0)]),_:1}),l("div",$,[l("div",ee,[e[50]||(e[50]=t(" Rôles : ")),(i(!0),r(p,null,f(n.roles,s=>(i(),r("article",{class:h(["card xs",{active:s.principal}])},[l("h1",le,[l("span",null,[s.principal?(i(),r("i",se)):d("",!0),t(" "+u(s.label)+" ",1),l("span",{class:h(["cartouche xs",{primary:s.in_activity||s.in_project}])},[l("strong",null,u(s.in_activity+s.in_project),1),e[45]||(e[45]=t(" utilisation(s) "))],2)])]),s.principal?(i(),r("p",te,e[46]||(e[46]=[l("i",{class:"icon-attention-1"},null,-1),t(" Ce rôle "),l("strong",{style:{"text-decoration":"underline"}},"débloque les privilèges",-1),t(" de ces membres lorsqu'il est utilisé pour qualifier le rôle d'une organisation sur une activité/un projet ")]))):d("",!0),l("p",null,u(s.description),1),b.manage?(i(),r("nav",ne,[l("button",{class:"btn btn-xs btn-default",onClick:v=>n.form=JSON.parse(JSON.stringify(s))},e[47]||(e[47]=[l("i",{class:"icon-pencil"},null,-1),t(" Éditer ")]),8,oe),l("button",{class:"btn btn-xs btn-info",onClick:v=>a.mergeUi(s)},e[48]||(e[48]=[l("i",{class:"icon-fork"},null,-1),t(" Migrer ")]),8,ie),l("button",{class:"btn btn-xs btn-danger",onClick:v=>a.remove(s)},e[49]||(e[49]=[l("i",{class:"icon-trash"},null,-1),t(" Supprimer ")]),8,re)])):d("",!0)],2))),256))]),l("div",ue,[e[51]||(e[51]=t(" Outils ")),l("button",{class:"btn btn-primary",onClick:e[13]||(e[13]=(...s)=>a.handlerDisplayDoublons&&a.handlerDisplayDoublons(...s))}," Afficher les doublons ")])]),b.manage?(i(),r("button",{key:4,onClick:e[14]||(e[14]=(...s)=>a.formNew&&a.formNew(...s)),class:"btn btn-default"},e[52]||(e[52]=[l("i",{class:"icon-circled-plus"},null,-1),t(" Ajouter un nouveau rôle ")]))):d("",!0)])}const de=N(z,[["render",ae]]);let k=document.querySelector("#adminroleorganization");const ge=w(de,{url:k.dataset.url,manage:k.dataset.manage});ge.mount("#adminroleorganization"); diff --git a/public/js/oscar/vite/dist/assets/admintypedocument-1c0873ed.js b/public/js/oscar/vite/dist/assets/admintypedocument-1c0873ed.js deleted file mode 100644 index 3050a10189581654f6fb2eb0e7c01ebe114fbdcf..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/admintypedocument-1c0873ed.js +++ /dev/null @@ -1 +0,0 @@ -import{p,r as M,o as i,c as r,b as c,d as t,t as u,g as a,i as k,T as w,F as g,j as y,a as o,w as f,k as C,n as b,v as x,f as D,h as S,y as N}from"../vendor.js";import{O as T}from"../vendor21.js";import{_ as A}from"../vendor7.js";const V={components:{OscarDialog:T},props:{url:{required:!0},manage:!1,bootbox:{required:!0}},data(){return{types:[],loadingMsg:null,form:null,dialogDelete:{display:!1},untyped_documents:0,documents_location:"",documents_pcru_type:"",signatureflows:[],migrate_dest:null}},computed:{loading(){return this.loadingMsg!=null}},methods:{signatureFlow(n){return this.signatureflows.find(e=>e.id==n)},formNew(){this.form={label:"",description:""}},handlerEdit(n){this.form=JSON.parse(JSON.stringify(n))},handlerSave(){if(this.form.id){this.loadingMsg="Mise à jour du type de document...";let e={typedocumentid:this.form.id,label:this.form.label,signatureflow_id:this.form.signatureflow_id,description:this.form.description,default:this.form.default?"on":""};p.put(this.url+"",e).then(m=>{flashMessage("success","Type de document mis à jour"),this.fetch()},m=>{flashMessage("error",m.response.data)}).then(()=>{this.loadingMsg=null,this.form=null})}else{this.loadingMsg="Ajout d'un nouveau type de document...";var n=new FormData;n.append("label",this.form.label),n.append("description",this.form.description),n.append("default",this.form.default?"on":""),p.post(this.url,n).then(e=>{flashMessage("success","Type de document créé"),this.fetch()},e=>{flashMessage("error",e.response.data)}).then(()=>{this.loadingMsg=null,this.form=null})}},remove(n){this.dialogDelete.title="Supprimer ce type de document ?",this.dialogDelete.message=`La suppression du type de document '${n.label}' sera définitive.`,this.dialogDelete.display=!0,this.dialogDelete.onSuccess=()=>this.removeConfirm(n)},removeConfirm(n){this.loadingMsg="Suppression du type de document...",p.delete(this.url+"?typedocumentid="+n.id).then(e=>{this.fetch()},e=>{flashMessage("error",e.body)}).then(()=>{this.loadingMsg=null,this.form=null})},fetch(){this.loadingMsg="Chargement des types de documents",p.get(this.url).then(n=>{this.types=n.data.types,this.untyped_documents=n.data.untyped_documents,this.documents_location=n.data.documents_location,this.documents_pcru_type=n.data.documents_pcru_type,this.signatureflows=n.data.signatureflows}).catch(n=>flashMessage("error","Impossible de charger les types de documents : "+n)).finally(()=>{this.loadingMsg=null})}},created(){this.fetch()}},q={key:0,class:"vue-loader"},j={key:0,class:"form-wrapper"},E={key:0},F={key:1},O={class:"form-group"},I={class:"form-group"},L={for:"typedoc_default"},P={class:"buttons-bar"},U={class:"btn-group"},B={class:"row"},z={class:"col-md-8"},J={class:"card-title"},R={key:0},G=["href"],H={key:2},K={key:3,class:"cartouche info"},Q={key:0,class:"card-footer"},W=["onClick"],X=["onClick"],Y={class:"col-md-4"},Z={class:"cartouche"},$={key:0,class:"alert alert-danger"},ee={action:"",method:"post"},te={for:"migrator"},se=["value"];function ne(n,e,m,ie,l,d){const h=M("oscar-dialog");return i(),r("section",null,[c(h,{options:l.dialogDelete},null,8,["options"]),d.loading?(i(),r("div",q,[t("span",null,u(l.loadingMsg),1)])):a("",!0),c(w,{name:"popup"},{default:k(()=>[l.form?(i(),r("div",j,[t("form",{action:"",onSubmit:e[3]||(e[3]=S((...s)=>d.handlerSave&&d.handlerSave(...s),["prevent"])),class:"container oscar-form"},[t("header",null,[t("h1",null,[l.form-n.id?(i(),r("span",E,[e[6]||(e[6]=o("Modification de ")),t("strong",null,u(l.form.label),1)])):(i(),r("span",F,"Nouveau type de documents"))])]),t("div",O,[e[7]||(e[7]=t("label",null,"Intitulé",-1)),f(t("input",{id:"typedoc_label",type:"text",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=s=>l.form.label=s),name:"label"},null,512),[[x,l.form.label]])]),t("div",I,[t("label",L,[e[8]||(e[8]=o(" Par défaut ")),f(t("input",{id:"typedoc_default",type:"checkbox",class:"form-control","onUpdate:modelValue":e[1]||(e[1]=s=>l.form.default=s),name:"default"},null,512),[[D,l.form.default]])]),e[9]||(e[9]=t("div",{class:"alert alert-info"},[o(" L'option "),t("strong",null,"par défaut"),o(" définira ce type de document comme celui à utilisé si rien n'est précisé. Par exemple, lors des demandes d'activité, les documents envoyés par les utilisateurs seront qualifiés avec ce type (cela peut être modifié par la suite). ")],-1))]),t("footer",P,[t("div",U,[e[11]||(e[11]=t("button",{type:"submit",class:"btn btn-primary"},[t("i",{class:"icon-floppy"}),o(" Enregistrer ")],-1)),t("button",{type:"reset",class:"btn btn-default",onClick:e[2]||(e[2]=s=>l.form=null)},e[10]||(e[10]=[t("i",{class:"icon-floppy"},null,-1),o(" Annuler ")]))])])],32)])):a("",!0)]),_:1}),t("div",B,[t("div",z,[e[16]||(e[16]=t("h1",null,"Types de documents disponibles",-1)),(i(!0),r(g,null,y(l.types,s=>(i(),r("article",{class:b(["card xs",{"selected active":s.default}])},[t("h1",J,[t("span",null,[o(u(s.label)+" ",1),s.default?(i(),r("small",R," (par défaut)")):a("",!0),e[13]||(e[13]=o(" - ")),s.documents_total?(i(),r("a",{key:1,href:s.documents_view,title:"Afficher les activités contenant ce type de document"},u(s.documents_total)+" document(s) ",9,G)):(i(),r("em",H,"Aucun document")),s.signatureflow_id?(i(),r("span",K,[e[12]||(e[12]=o(" Procédure : ")),t("strong",null,u(d.signatureFlow(s.signatureflow_id).label),1)])):a("",!0)])]),m.manage?(i(),r("nav",Q,[t("button",{class:"btn btn-xs btn-primary",onClick:_=>d.handlerEdit(s)},e[14]||(e[14]=[t("i",{class:"icon-pencil"},null,-1),o(" Éditer ")]),8,W),t("button",{class:"btn btn-xs btn-default",onClick:_=>d.remove(s)},e[15]||(e[15]=[t("i",{class:"icon-trash"},null,-1),o(" Supprimer ")]),8,X)])):a("",!0)],2))),256))]),t("div",Y,[e[30]||(e[30]=t("h2",null,"Informations",-1)),e[31]||(e[31]=t("div",{class:"alert alert-info"},[o(" Les "),t("strong",null,"types de document"),o(" permettent de qualifier les documents ")],-1)),t("div",null,[t("p",null,[e[17]||(e[17]=o(" Emplacement où sont stoqués les documents :")),e[18]||(e[18]=t("br",null,null,-1)),t("code",Z,u(l.documents_location),1)]),t("p",null,[e[19]||(e[19]=o(" Type de document utilisé pour les envois PCRU :")),e[20]||(e[20]=t("br",null,null,-1)),t("strong",null,u(l.documents_pcru_type),1)])]),l.untyped_documents?(i(),r("div",$,[e[23]||(e[23]=t("h3",null,[t("i",{class:"icon-attention-1"}),o(" Documents non-typés détéctés")],-1)),e[24]||(e[24]=t("strong",null,"Attention",-1)),e[25]||(e[25]=o(", il y'a ")),t("strong",null,u(l.untyped_documents),1),e[26]||(e[26]=o(" documents sans type de document. Ils correspondent généralement à des documents envoyés via les demandes d'activités ou envoyés dans une version plus ancienne de Oscar. ")),e[27]||(e[27]=t("br",null,null,-1)),e[28]||(e[28]=o(" Vous pouvez leurs attribuer automatiquement un type avec la procédure ci-dessous : ")),e[29]||(e[29]=t("hr",null,null,-1)),t("form",ee,[e[22]||(e[22]=t("input",{type:"hidden",name:"action",value:"migrate"},null,-1)),t("label",te,[e[21]||(e[21]=o(" Migrer vers ce type ")),f(t("select",{"onUpdate:modelValue":e[4]||(e[4]=s=>l.migrate_dest=s),id:"migrator",class:"form-control",name:"destination"},[(i(!0),r(g,null,y(l.types,s=>(i(),r("option",{value:s.id},u(s.label),9,se))),256))],512),[[C,l.migrate_dest]])]),t("button",{type:"submit",class:b(["btn btn-success",{disabled:!l.migrate_dest}])}," Migrer les documents non-typés ",2)])])):a("",!0)])]),m.manage?(i(),r("button",{key:1,onClick:e[5]||(e[5]=(...s)=>d.formNew&&d.formNew(...s)),class:"btn btn-primary"},e[32]||(e[32]=[t("i",{class:"icon-circled-plus"},null,-1),o(" Ajouter ")]))):a("",!0)])}const oe=A(V,[["render",ne]]);let v=document.querySelector("#admintypedocument");const le=N(oe,{url:v.dataset.url,manage:v.dataset.manage});le.mount("#admintypedocument"); diff --git a/public/js/oscar/vite/dist/assets/admintypedocument-d2d32e46.js b/public/js/oscar/vite/dist/assets/admintypedocument-d2d32e46.js new file mode 100644 index 0000000000000000000000000000000000000000..54f86c701253bf24a0a469eecb826d4339d69931 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/admintypedocument-d2d32e46.js @@ -0,0 +1 @@ +import{s as m,r as M,o as i,c as r,b as h,d as e,t as a,g as u,j as k,T as w,F as _,k as f,a as n,w as p,l as C,n as g,v as x,f as D,h as S,A as N}from"../vendor.js";import{O as A}from"../vendor21.js";import{_ as T}from"../vendor7.js";const V={components:{OscarDialog:A},props:{url:{required:!0},manage:!1,bootbox:{required:!0}},data(){return{types:[],loadingMsg:null,form:null,dialogDelete:{display:!1},untyped_documents:0,documents_location:"",documents_pcru_type:"",signatureflows:[],migrate_dest:null}},computed:{loading(){return this.loadingMsg!=null}},methods:{signatureFlow(s){return this.signatureflows.find(o=>o.id==s)},formNew(){this.form={label:"",description:""}},handlerEdit(s){this.form=JSON.parse(JSON.stringify(s))},handlerSave(){if(this.form.id){this.loadingMsg="Mise à jour du type de document...";let o={typedocumentid:this.form.id,label:this.form.label,signatureflow_id:this.form.signatureflow_id,description:this.form.description,default:this.form.default?"on":""};m.put(this.url+"",o).then(c=>{flashMessage("success","Type de document mis à jour"),this.fetch()},c=>{flashMessage("error",c.response.data)}).then(()=>{this.loadingMsg=null,this.form=null})}else{this.loadingMsg="Ajout d'un nouveau type de document...";var s=new FormData;s.append("label",this.form.label),s.append("description",this.form.description),s.append("default",this.form.default?"on":""),m.post(this.url,s).then(o=>{flashMessage("success","Type de document créé"),this.fetch()},o=>{flashMessage("error",o.response.data)}).then(()=>{this.loadingMsg=null,this.form=null})}},remove(s){this.dialogDelete.title="Supprimer ce type de document ?",this.dialogDelete.message=`La suppression du type de document '${s.label}' sera définitive.`,this.dialogDelete.display=!0,this.dialogDelete.onSuccess=()=>this.removeConfirm(s)},removeConfirm(s){this.loadingMsg="Suppression du type de document...",m.delete(this.url+"?typedocumentid="+s.id).then(o=>{this.fetch()},o=>{flashMessage("error",o.body)}).then(()=>{this.loadingMsg=null,this.form=null})},fetch(){this.loadingMsg="Chargement des types de documents",m.get(this.url).then(s=>{this.types=s.data.types,this.untyped_documents=s.data.untyped_documents,this.documents_location=s.data.documents_location,this.documents_pcru_type=s.data.documents_pcru_type,this.signatureflows=s.data.signatureflows}).catch(s=>flashMessage("error","Impossible de charger les types de documents : "+s)).finally(()=>{this.loadingMsg=null})}},created(){this.fetch()}},q={key:0,class:"vue-loader"},j={key:0,class:"form-wrapper"},E={key:0},F={key:1},O={class:"form-group"},I=e("label",null,"Intitulé",-1),L={class:"form-group"},P={for:"typedoc_default"},U=e("div",{class:"alert alert-info"},[n(" L'option "),e("strong",null,"par défaut"),n(" définira ce type de document comme celui à utilisé si rien n'est précisé. Par exemple, lors des demandes d'activité, les documents envoyés par les utilisateurs seront qualifiés avec ce type (cela peut être modifié par la suite). ")],-1),B={class:"buttons-bar"},z={class:"btn-group"},J=e("button",{type:"submit",class:"btn btn-primary"},[e("i",{class:"icon-floppy"}),n(" Enregistrer ")],-1),R=e("i",{class:"icon-floppy"},null,-1),G={class:"row"},H={class:"col-md-8"},K=e("h1",null,"Types de documents disponibles",-1),Q={class:"card-title"},W={key:0},X=["href"],Y={key:2},Z={key:3,class:"cartouche info"},$={key:0,class:"card-footer"},ee=["onClick"],te=e("i",{class:"icon-pencil"},null,-1),se=["onClick"],oe=e("i",{class:"icon-trash"},null,-1),ne={class:"col-md-4"},le=e("h2",null,"Informations",-1),ie=e("div",{class:"alert alert-info"},[n(" Les "),e("strong",null,"types de document"),n(" permettent de qualifier les documents ")],-1),re=e("br",null,null,-1),ae={class:"cartouche"},de=e("br",null,null,-1),ue={key:0,class:"alert alert-danger"},ce=e("h3",null,[e("i",{class:"icon-attention-1"}),n(" Documents non-typés détéctés")],-1),me=e("strong",null,"Attention",-1),pe=e("br",null,null,-1),he=e("hr",null,null,-1),_e={action:"",method:"post"},fe=e("input",{type:"hidden",name:"action",value:"migrate"},null,-1),ge={for:"migrator"},ye=["value"],be=e("i",{class:"icon-circled-plus"},null,-1);function ve(s,o,c,we,l,d){const b=M("oscar-dialog");return i(),r("section",null,[h(b,{options:l.dialogDelete},null,8,["options"]),d.loading?(i(),r("div",q,[e("span",null,a(l.loadingMsg),1)])):u("",!0),h(w,{name:"popup"},{default:k(()=>[l.form?(i(),r("div",j,[e("form",{action:"",onSubmit:o[3]||(o[3]=S((...t)=>d.handlerSave&&d.handlerSave(...t),["prevent"])),class:"container oscar-form"},[e("header",null,[e("h1",null,[l.form-s.id?(i(),r("span",E,[n("Modification de "),e("strong",null,a(l.form.label),1)])):(i(),r("span",F,"Nouveau type de documents"))])]),e("div",O,[I,p(e("input",{id:"typedoc_label",type:"text",class:"form-control","onUpdate:modelValue":o[0]||(o[0]=t=>l.form.label=t),name:"label"},null,512),[[x,l.form.label]])]),e("div",L,[e("label",P,[n(" Par défaut "),p(e("input",{id:"typedoc_default",type:"checkbox",class:"form-control","onUpdate:modelValue":o[1]||(o[1]=t=>l.form.default=t),name:"default"},null,512),[[D,l.form.default]])]),U]),e("footer",B,[e("div",z,[J,e("button",{type:"reset",class:"btn btn-default",onClick:o[2]||(o[2]=t=>l.form=null)},[R,n(" Annuler ")])])])],32)])):u("",!0)]),_:1}),e("div",G,[e("div",H,[K,(i(!0),r(_,null,f(l.types,t=>(i(),r("article",{class:g(["card xs",{"selected active":t.default}])},[e("h1",Q,[e("span",null,[n(a(t.label)+" ",1),t.default?(i(),r("small",W," (par défaut)")):u("",!0),n(" - "),t.documents_total?(i(),r("a",{key:1,href:t.documents_view,title:"Afficher les activités contenant ce type de document"},a(t.documents_total)+" document(s) ",9,X)):(i(),r("em",Y,"Aucun document")),t.signatureflow_id?(i(),r("span",Z,[n(" Procédure : "),e("strong",null,a(d.signatureFlow(t.signatureflow_id).label),1)])):u("",!0)])]),c.manage?(i(),r("nav",$,[e("button",{class:"btn btn-xs btn-primary",onClick:v=>d.handlerEdit(t)},[te,n(" Éditer ")],8,ee),e("button",{class:"btn btn-xs btn-default",onClick:v=>d.remove(t)},[oe,n(" Supprimer ")],8,se)])):u("",!0)],2))),256))]),e("div",ne,[le,ie,e("div",null,[e("p",null,[n(" Emplacement où sont stoqués les documents :"),re,e("code",ae,a(l.documents_location),1)]),e("p",null,[n(" Type de document utilisé pour les envois PCRU :"),de,e("strong",null,a(l.documents_pcru_type),1)])]),l.untyped_documents?(i(),r("div",ue,[ce,me,n(", il y'a "),e("strong",null,a(l.untyped_documents),1),n(" documents sans type de document. Ils correspondent généralement à des documents envoyés via les demandes d'activités ou envoyés dans une version plus ancienne de Oscar. "),pe,n(" Vous pouvez leurs attribuer automatiquement un type avec la procédure ci-dessous : "),he,e("form",_e,[fe,e("label",ge,[n(" Migrer vers ce type "),p(e("select",{"onUpdate:modelValue":o[4]||(o[4]=t=>l.migrate_dest=t),id:"migrator",class:"form-control",name:"destination"},[(i(!0),r(_,null,f(l.types,t=>(i(),r("option",{value:t.id},a(t.label),9,ye))),256))],512),[[C,l.migrate_dest]])]),e("button",{type:"submit",class:g(["btn btn-success",{disabled:!l.migrate_dest}])}," Migrer les documents non-typés ",2)])])):u("",!0)])]),c.manage?(i(),r("button",{key:1,onClick:o[5]||(o[5]=(...t)=>d.formNew&&d.formNew(...t)),class:"btn btn-primary"},[be,n(" Ajouter ")])):u("",!0)])}const Me=T(V,[["render",ve]]);let y=document.querySelector("#admintypedocument");const ke=N(Me,{url:y.dataset.url,manage:y.dataset.manage});ke.mount("#admintypedocument"); diff --git a/public/js/oscar/vite/dist/assets/admintypeorganization-082a21a6.js b/public/js/oscar/vite/dist/assets/admintypeorganization-082a21a6.js new file mode 100644 index 0000000000000000000000000000000000000000..2f9f7d0e2da072006812b2ecb6d7df97a1c1dcb5 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/admintypeorganization-082a21a6.js @@ -0,0 +1 @@ +import{r as v,o as s,c as r,d as e,t as d,a as m,n as N,h as _,F as z,k as b,m as V,g as D,s as f,b as u,j as p,T as y,w as g,u as T,v as M,l as R,A}from"../vendor.js";import{A as k}from"../vendor14.js";import{g as C}from"../vendor16.js";import{_ as w}from"../vendor7.js";import{M as O}from"../vendor5.js";const q={components:{},props:{creatable:{default:!1},organizationtype:{required:!0}}},I={class:"card card-xs"},B={class:"card-title"},U={class:""},F={class:"text-right"},L=["href"],X=e("i",{class:"icon-floppy"},null,-1),j=e("i",{class:"icon-trash"},null,-1),H={key:0,class:"sub"};function W(n,t,a,x,i,l){const h=v("organization-type-item",!0);return s(),r("article",I,[e("h3",B,[e("span",U,[e("code",null,"["+d(a.organizationtype.id)+"]",1),m(" "+d(a.organizationtype.label)+" ",1),e("span",{class:N(["sup-info",a.organizationtype.count?"primary":"neutral"])},d(a.organizationtype.id),3)]),e("nav",F,[e("small",null,[e("a",{href:"/organization?t[]="+a.organizationtype.id},"Voir les organisations",8,L),e("a",{href:"#",onClick:t[0]||(t[0]=_(c=>n.$emit("edit",a.organizationtype),["prevent"]))},[X,m(" Modifier")]),e("a",{href:"#",onClick:t[1]||(t[1]=_(c=>n.$emit("remove",a.organizationtype),["prevent"]))},[j,m(" Supprimer")])])])]),e("p",null,d(a.organizationtype.description),1),a.organizationtype.children.length?(s(),r("section",H,[(s(!0),r(z,null,b(a.organizationtype.children,c=>(s(),V(h,{onEdit:t[2]||(t[2]=o=>n.$emit("edit",o)),onRemove:t[3]||(t[3]=o=>n.$emit("remove",o)),organizationtype:c,key:c.id},null,8,["organizationtype"]))),128))])):D("",!0)])}const G=w(q,[["render",W]]);f.defaults.headers.common["X-Requested-With"]="XMLHttpRequest ";const J={props:{url:{required:!0},manage:{default:!1}},components:{Modal:O,organizationtypeitem:G},data(){return{organizationtypes:[],error:null,pendingMsg:"",formData:null,loading:!1,creatable:!1}},methods:{remove(n){f.delete(this.url+"/"+n.id).then(t=>{this.getOrganizationtypes()},t=>{C.commit("addError",k.manageErrorResponse(t).message)})},edit(n){this.formData=n},save(){f.post(this.url,this.formData).then(n=>{this.getOrganizationtypes()},n=>{C.commit("addError",k.manageErrorResponse(n).message)}).then(n=>{this.pendingMsg="",this.formData=null})},handlerNew(){this.formData={id:"",label:"",description:"",root_id:""}},getOrganizationtypes(){this.pendingMsg="Chargement des types d'organisation : "+this.url,f.get(this.url).then(n=>{this.organizationtypes=n.data.organizationtypes,console.log("SUCCESS",n)},n=>{this.error="Impossible de charger les types d'oganisations : "+n.body}).then(n=>{this.pendingMsg=""})}},mounted(){this.getOrganizationtypes()}},K={class:"organizationtype"},P={key:0,class:"error overlay"},Q={class:"overlay-content"},Y=e("i",{class:"icon-warning-empty"},null,-1),Z=e("br",null,null,-1),$=e("i",{class:"icon-cancel-circled"},null,-1),ee={key:0,class:"pending overlay"},te={class:"overlay-content"},oe=e("i",{class:"icon-spinner animate-spin"},null,-1),ne={class:"form-group"},ie=e("label",{for:"form_label"},"Intitulé",-1),ae={class:"form-group"},se=e("label",{for:"form_label"},"Sous Type de : ",-1),re=e("option",{value:""},"Aucun",-1),le=["value"],de={class:"form-group"},me=e("label",{for:"form_description"},"Description",-1),ce={class:"text-right"},ue=e("i",{class:"icon-building-filled"},null,-1);function pe(n,t,a,x,i,l){const h=v("modal"),c=v("organizationtypeitem");return s(),r("section",K,[u(y,{name:"fade"},{default:p(()=>[i.error?(s(),r("div",P,[e("div",Q,[Y,m(" "+d(i.error)+" ",1),Z,e("a",{href:"#",onClick:t[0]||(t[0]=o=>i.error=null),class:"btn btn-default"},[$,m(" Fermer")])])])):D("",!0)]),_:1}),u(y,{name:"fade"},{default:p(()=>[i.pendingMsg?(s(),r("div",ee,[e("div",te,[oe,m(" "+d(i.pendingMsg),1)])])):D("",!0)]),_:1}),u(y,{name:"fade"},{default:p(()=>[u(h,{title:"Type d'organisation",visible:i.formData,onModalCancel:t[5]||(t[5]=o=>i.formData=null),onModalValid:l.save},{default:p(()=>[e("form",{action:"",class:"form",onSubmit:t[4]||(t[4]=_((...o)=>l.save&&l.save(...o),["prevent"]))},[e("div",ne,[ie,g(e("input",{class:"form-control","onUpdate:modelValue":t[1]||(t[1]=o=>i.formData.label=o),id:"form_label",placeholder:"Intitulé"},null,512),[[M,i.formData.label]])]),e("div",ae,[se,g(e("select",{name:"root_id",id:"","onUpdate:modelValue":t[2]||(t[2]=o=>i.formData.root_id=o),class:"form-control"},[re,(s(!0),r(z,null,b(i.organizationtypes,(o,_e)=>(s(),r("option",{value:o.id},d(o.label),9,le))),256))],512),[[R,i.formData.root_id]])]),e("div",de,[me,g(e("textarea",{class:"form-control","onUpdate:modelValue":t[3]||(t[3]=o=>i.formData.description=o),id:"form_description",placeholder:""},null,512),[[M,i.formData.description]])])],32)]),_:1},8,["visible","onModalValid"])]),_:1}),(s(!0),r(z,null,b(i.organizationtypes,o=>(s(),V(c,{organizationtype:o,key:o.id,creatable:i.creatable,onEdit:l.edit,onRemove:l.remove},null,8,["organizationtype","creatable","onEdit","onRemove"]))),128)),e("nav",ce,[g(e("a",{href:"#",onClick:t[6]||(t[6]=_((...o)=>l.handlerNew&&l.handlerNew(...o),["prevent"])),class:"btn btn-primary"},[ue,m(" Nouveau type d'organisation ")],512),[[T,a.manage]])])])}const ge=w(J,[["render",pe]]);let E="#admintypeorganization",S=document.querySelector(E);const fe=A(ge,{url:S.dataset.url,manage:S.dataset.manage});fe.mount(E); diff --git a/public/js/oscar/vite/dist/assets/admintypeorganization-aeb4f3d9.js b/public/js/oscar/vite/dist/assets/admintypeorganization-aeb4f3d9.js deleted file mode 100644 index da4a99ff99aa077de854a87ccfc4bbb2d35b0f36..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/admintypeorganization-aeb4f3d9.js +++ /dev/null @@ -1 +0,0 @@ -import{r as b,o as a,c as s,d as t,t as d,a as m,n as N,h as v,F as h,j as _,l as V,g as D,p as y,b as p,i as g,T as z,w as f,q as T,v as M,k as R,y as q}from"../vendor.js";import{A as k}from"../vendor14.js";import{g as C}from"../vendor16.js";import{_ as w}from"../vendor7.js";import{M as O}from"../vendor5.js";const A={components:{},props:{creatable:{default:!1},organizationtype:{required:!0}}},I={class:"card card-xs"},B={class:"card-title"},U={class:""},F={class:"text-right"},L=["href"],X={key:0,class:"sub"};function j(n,e,r,x,i,l){const c=b("organization-type-item",!0);return a(),s("article",I,[t("h3",B,[t("span",U,[t("code",null,"["+d(r.organizationtype.id)+"]",1),m(" "+d(r.organizationtype.label)+" ",1),t("span",{class:N(["sup-info",r.organizationtype.count?"primary":"neutral"])},d(r.organizationtype.id),3)]),t("nav",F,[t("small",null,[t("a",{href:"/organization?t[]="+r.organizationtype.id},"Voir les organisations",8,L),t("a",{href:"#",onClick:e[0]||(e[0]=v(u=>n.$emit("edit",r.organizationtype),["prevent"]))},e[4]||(e[4]=[t("i",{class:"icon-floppy"},null,-1),m(" Modifier")])),t("a",{href:"#",onClick:e[1]||(e[1]=v(u=>n.$emit("remove",r.organizationtype),["prevent"]))},e[5]||(e[5]=[t("i",{class:"icon-trash"},null,-1),m(" Supprimer")]))])])]),t("p",null,d(r.organizationtype.description),1),r.organizationtype.children.length?(a(),s("section",X,[(a(!0),s(h,null,_(r.organizationtype.children,u=>(a(),V(c,{onEdit:e[2]||(e[2]=o=>n.$emit("edit",o)),onRemove:e[3]||(e[3]=o=>n.$emit("remove",o)),organizationtype:u,key:u.id},null,8,["organizationtype"]))),128))])):D("",!0)])}const H=w(A,[["render",j]]);y.defaults.headers.common["X-Requested-With"]="XMLHttpRequest ";const W={props:{url:{required:!0},manage:{default:!1}},components:{Modal:O,organizationtypeitem:H},data(){return{organizationtypes:[],error:null,pendingMsg:"",formData:null,loading:!1,creatable:!1}},methods:{remove(n){y.delete(this.url+"/"+n.id).then(e=>{this.getOrganizationtypes()},e=>{C.commit("addError",k.manageErrorResponse(e).message)})},edit(n){this.formData=n},save(){y.post(this.url,this.formData).then(n=>{this.getOrganizationtypes()},n=>{C.commit("addError",k.manageErrorResponse(n).message)}).then(n=>{this.pendingMsg="",this.formData=null})},handlerNew(){this.formData={id:"",label:"",description:"",root_id:""}},getOrganizationtypes(){this.pendingMsg="Chargement des types d'organisation : "+this.url,y.get(this.url).then(n=>{this.organizationtypes=n.data.organizationtypes,console.log("SUCCESS",n)},n=>{this.error="Impossible de charger les types d'oganisations : "+n.body}).then(n=>{this.pendingMsg=""})}},mounted(){this.getOrganizationtypes()}},G={class:"organizationtype"},J={key:0,class:"error overlay"},K={class:"overlay-content"},P={key:0,class:"pending overlay"},Q={class:"overlay-content"},Y={class:"form-group"},Z={class:"form-group"},$=["value"],ee={class:"form-group"},te={class:"text-right"};function oe(n,e,r,x,i,l){const c=b("modal"),u=b("organizationtypeitem");return a(),s("section",G,[p(z,{name:"fade"},{default:g(()=>[i.error?(a(),s("div",J,[t("div",K,[e[8]||(e[8]=t("i",{class:"icon-warning-empty"},null,-1)),m(" "+d(i.error)+" ",1),e[9]||(e[9]=t("br",null,null,-1)),t("a",{href:"#",onClick:e[0]||(e[0]=o=>i.error=null),class:"btn btn-default"},e[7]||(e[7]=[t("i",{class:"icon-cancel-circled"},null,-1),m(" Fermer")]))])])):D("",!0)]),_:1}),p(z,{name:"fade"},{default:g(()=>[i.pendingMsg?(a(),s("div",P,[t("div",Q,[e[10]||(e[10]=t("i",{class:"icon-spinner animate-spin"},null,-1)),m(" "+d(i.pendingMsg),1)])])):D("",!0)]),_:1}),p(z,{name:"fade"},{default:g(()=>[p(c,{title:"Type d'organisation",visible:i.formData,onModalCancel:e[5]||(e[5]=o=>i.formData=null),onModalValid:l.save},{default:g(()=>[t("form",{action:"",class:"form",onSubmit:e[4]||(e[4]=v((...o)=>l.save&&l.save(...o),["prevent"]))},[t("div",Y,[e[11]||(e[11]=t("label",{for:"form_label"},"Intitulé",-1)),f(t("input",{class:"form-control","onUpdate:modelValue":e[1]||(e[1]=o=>i.formData.label=o),id:"form_label",placeholder:"Intitulé"},null,512),[[M,i.formData.label]])]),t("div",Z,[e[13]||(e[13]=t("label",{for:"form_label"},"Sous Type de : ",-1)),f(t("select",{name:"root_id",id:"","onUpdate:modelValue":e[2]||(e[2]=o=>i.formData.root_id=o),class:"form-control"},[e[12]||(e[12]=t("option",{value:""},"Aucun",-1)),(a(!0),s(h,null,_(i.organizationtypes,(o,re)=>(a(),s("option",{value:o.id},d(o.label),9,$))),256))],512),[[R,i.formData.root_id]])]),t("div",ee,[e[14]||(e[14]=t("label",{for:"form_description"},"Description",-1)),f(t("textarea",{class:"form-control","onUpdate:modelValue":e[3]||(e[3]=o=>i.formData.description=o),id:"form_description",placeholder:""},null,512),[[M,i.formData.description]])])],32)]),_:1},8,["visible","onModalValid"])]),_:1}),(a(!0),s(h,null,_(i.organizationtypes,o=>(a(),V(u,{organizationtype:o,key:o.id,creatable:i.creatable,onEdit:l.edit,onRemove:l.remove},null,8,["organizationtype","creatable","onEdit","onRemove"]))),128)),t("nav",te,[f(t("a",{href:"#",onClick:e[6]||(e[6]=v((...o)=>l.handlerNew&&l.handlerNew(...o),["prevent"])),class:"btn btn-primary"},e[15]||(e[15]=[t("i",{class:"icon-building-filled"},null,-1),m(" Nouveau type d'organisation ")]),512),[[T,r.manage]])])])}const ne=w(W,[["render",oe]]);let E="#admintypeorganization",S=document.querySelector(E);const ie=q(ne,{url:S.dataset.url,manage:S.dataset.manage});ie.mount(E); diff --git a/public/js/oscar/vite/dist/assets/authentification-09edda39.js b/public/js/oscar/vite/dist/assets/authentification-09edda39.js deleted file mode 100644 index 2780be86ea51bde3edd019e2bc8956e5443a1aaf..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/authentification-09edda39.js +++ /dev/null @@ -1 +0,0 @@ -import{m as U,o,c as n,d as s,g as m,a as i,t as d,w as R,k as C,F as p,j as g,h as k,n as v,v as E,y as w}from"../vendor.js";import{m as y}from"../vendor2.js";import{f as A}from"../vendor3.js";import{m as L}from"../vendor4.js";import{A as c}from"../vendor8.js";import{_ as x}from"../vendor7.js";import{t as F}from"../vendor19.js";import"../vendor14.js";import"../vendor16.js";const N={props:{url:{required:!0}},data(){return{orderby:"lastLogin",orderbyDirection:-1,search:"",logs:null,selectedUser:null,loading:!1,error:null,addRoleUser:null,addRoleId:1,addRoleError:null,deleteDatas:null,deleteError:null,roles:[],users:[],urlLogs:null,urlRoles:null}},methods:{getRoleId(l){return this.roles.find(e=>e.roleId==l)},handlerDeleteRole(l,e){this.deleteError=null,this.deleteDatas={user:l,role:e}},performDeleteRole(){let l=this.deleteDatas.user.id,e=this.getRoleId(this.deleteDatas.role).id;this.loading=!0,this.addRoleError=null,c.deleteParams(this.urlRoles,{authentification_id:l,role_id:e}).then(u=>{this.deleteDatas.user.roles=u.data.roles,this.deleteDatas=null,this.deleteError=null},u=>{this.deleteError=u.body}).then(u=>{this.loading=!1})},performAddRole(){if(this.loading=!0,this.addRoleError=null,this.addRoleUser.id&&this.addRoleId){var l=new FormData;l.append("authentification_id",this.addRoleUser.id),l.append("role_id",this.addRoleId),c.post(this.urlRoles,l).then(e=>{this.addRoleUser.roles=e.data.roles,this.addRoleUser=null,this.addRoleError=null},e=>{this.addRoleError=e.body}).then(e=>{this.loading=!1})}},updateOrderBy(l){l==this.orderby?this.orderbyDirection*=-1:(this.orderbyDirection=-1,this.orderby=l)},handlerClick(l){this.selectedUser=l,this.loading=!0,c.get(this.urlLogs+l.id).then(e=>{this.logs=e.data},e=>{console.log(e)}).then(()=>{this.loading=!1})},fetch(){c.get(this.url).then(l=>{this.roles=l.data.roles,this.users=l.data.users,this.urlLogs=l.data.urlLogs,this.urlRoles=l.data.urlRoles})}},computed:{usersFiltered(){var l=[];return this.search!=""?this.users.forEach(e=>{var u=e.displayName+e.email+e.username;u.indexOf(this.search)>-1&&l.push(e)}):l=this.users,l.sort((e,u)=>e[this.orderby]==u[this.orderby]?0:e[this.orderby]{var b=U(u.dateCreated.date),t=b.format("dddd D MMMM YYYY")+", "+b.fromNow();(e==null||e.day!=t)&&(e={day:t,logs:[]},l.push(e)),e.logs.push(u)})}return l}},mounted(){console.log("fetch"),this.fetch()}},I={id:"authentifications"},M={key:0,class:"vue-loader"},B={key:1},z={key:0,class:"alert alert-danger"},O={class:"text-right"},T={key:1,class:"overlay"},V={class:"row"},j={class:"col-md-6 col-md-offset-3"},P={key:2,class:"overlay"},Y={class:"row"},q={class:"col-md-6 col-md-offset-3"},S={key:0,class:"alert alert-danger"},H=["value"],G={class:"row"},J={class:"col-md-4"},K={class:"oscar-sorter row"},Q={class:"input-group"},W={class:"ui-user"},X={class:"users"},Z=["onClick"],_={class:"card-title"},$={class:"card-content"},ee={class:"text-highlight"},se={key:0},le={key:1},te={class:"roles"},re={class:"cartouche"},oe={class:"addon"},ne=["onClick"],ie=["onClick"],de={key:0,class:"logs"},ue={key:0},ae={key:1,class:"text-warning"},me={key:2},pe={key:3,class:"text-danger"},ge={key:4,class:"alert alert-danger"},fe={key:5,class:"alert alert-warning"},he={class:"card"},ve={class:"text-highlight"},ye=["innerHTML"],ce={key:7};function be(l,e,u,b,t,a){return o(),n("section",I,[t.loading?(o(),n("div",M,e[10]||(e[10]=[s("span",null,"Chargement",-1)]))):m("",!0),t.users?(o(),n("section",B,[e[47]||(e[47]=s("h1",null,[s("i",{class:"icon-group"}),i(" Comptes")],-1)),e[48]||(e[48]=s("p",{class:"oscar-help"}," Seules les personnes qui se sont authentifiées au moins une fois et les comptes spéciaux sont affichés. ",-1)),t.error?(o(),n("div",z,[s("p",O,[s("i",{class:"icon-cancel-outline",onClick:e[0]||(e[0]=r=>t.error=null),style:{float:"right",cursor:"pointer"}})]),i(" "+d(t.error),1)])):m("",!0),t.deleteDatas?(o(),n("div",T,[s("div",V,[s("div",j,[s("h3",null,[e[11]||(e[11]=s("i",{class:"icon-attention-1"},null,-1)),e[12]||(e[12]=i(" Supprimer le rôle ")),s("strong",null,d(t.deleteDatas.role),1),e[13]||(e[13]=i()),e[14]||(e[14]=s("br",null,null,-1)),e[15]||(e[15]=i(" pour le compte ")),s("strong",null,d(t.deleteDatas.user.displayName),1),e[16]||(e[16]=i(" ? "))]),e[17]||(e[17]=s("p",{class:"alert alert-danger"},[i(" Cette suppression "),s("strong",null,"est définitive"),i(", ce compte, si c'est le votre, pourrez ne plus pouvoir accéder à l'application. Êtes-vous sûr ? ")],-1)),e[18]||(e[18]=s("hr",null,null,-1)),s("nav",null,[s("button",{class:"btn btn-danger",onClick:e[1]||(e[1]=r=>a.performDeleteRole())},"Supprimer définitivement"),s("button",{onClick:e[2]||(e[2]=r=>t.deleteDatas=null),class:"btn btn-default"},"Annuler")])])])])):m("",!0),t.addRoleUser?(o(),n("div",P,[s("form",{action:"",class:"overlay-content container",onSubmit:e[5]||(e[5]=k(r=>a.performAddRole(),["prevent"]))},[s("div",Y,[s("div",q,[s("h3",null,[e[19]||(e[19]=i("Ajouter un rôle au compte : ")),s("strong",null,d(t.addRoleUser.displayName),1)]),t.addRoleError?(o(),n("div",S,d(t.addRoleError),1)):m("",!0),e[21]||(e[21]=i(" Rôle : ")),R(s("select",{"onUpdate:modelValue":e[3]||(e[3]=r=>t.addRoleId=r)},[(o(!0),n(p,null,g(t.roles,r=>(o(),n("option",{value:r.id},d(r.roleId),9,H))),256))],512),[[C,t.addRoleId]]),e[22]||(e[22]=s("hr",null,null,-1)),s("nav",null,[e[20]||(e[20]=s("button",{type:"submit",class:"btn btn-default"},"Ajouter",-1)),s("button",{type:"reset",onClick:e[4]||(e[4]=r=>t.addRoleUser=null),class:"btn btn-primary"},"Annuler")])])])],32)])):m("",!0),s("div",G,[s("div",J,[s("nav",K,[e[23]||(e[23]=s("i",{class:"icon-sort"},null,-1)),e[24]||(e[24]=i(" Trie : ")),s("a",{href:"#",class:v(["oscar-sorter-item",{active:t.orderby=="lastLogin"}]),onClick:e[6]||(e[6]=r=>a.updateOrderBy("lastLogin"))},"Dernière connexion",2),s("a",{href:"#",class:v(["oscar-sorter-item",{active:t.orderby=="email"}]),onClick:e[7]||(e[7]=r=>a.updateOrderBy("email"))},"Email",2),s("a",{href:"#",class:v(["oscar-sorter-item",{active:t.orderby=="displayName"}]),onClick:e[8]||(e[8]=r=>a.updateOrderBy("displayName"))},"Nom",2)]),s("div",Q,[e[25]||(e[25]=s("span",{class:"input-group-addon",id:"basic-addon1"},[s("i",{class:"icon-zoom-in-outline"})],-1)),R(s("input",{type:"search","onUpdate:modelValue":e[9]||(e[9]=r=>t.search=r),class:"form-control",placeholder:"Recherche dans les authentification"},null,512),[[E,t.search]])])]),e[26]||(e[26]=s("div",{class:"col-md-8"},"   ",-1))]),s("div",W,[s("section",X,[e[34]||(e[34]=s("hr",null,null,-1)),(o(!0),n(p,null,g(a.usersFiltered,(r,f)=>(o(),n("article",{class:v(["card xs",{selected:t.selectedUser==r,error:r.error,warning:r.warning}]),onClick:h=>a.handlerClick(r)},[s("h3",_,d(r.displayName)+" ("+d(r.username)+") ",1),s("div",$,[s("small",ee,[e[28]||(e[28]=s("i",{class:"icon-mail"},null,-1)),s("small",null,d(r.email),1),e[29]||(e[29]=s("br",null,null,-1)),e[30]||(e[30]=i(" Dernière connexion : ")),r.lastLogin?(o(),n("span",se,d(r.lastLogin),1)):(o(),n("span",le," Jamais ")),e[31]||(e[31]=s("br",null,null,-1)),r.person?(o(),n(p,{key:2},[e[27]||(e[27]=i(" Dans les activités oscar : ")),s("strong",null,d(r.person.displayname),1)],64)):m("",!0)]),s("div",te,[e[33]||(e[33]=i(" Rôles (implicites) : ")),(o(!0),n(p,null,g(r.roles,h=>(o(),n("span",re,[i(d(h)+" ",1),s("span",oe,[s("i",{class:"icon-trash",onClick:k(De=>a.handlerDeleteRole(r,h),["prevent","stop"])},null,8,ne)])]))),256)),s("div",{class:"btn btn-default btn-xs",onClick:h=>t.addRoleUser=r},e[32]||(e[32]=[s("i",{class:"icon-user"},null,-1),i(" Ajouter un rôle ")]),8,ie)])])],10,Z))),256))]),t.logs?(o(),n("section",de,[s("h2",null,d(t.selectedUser.displayName),1),e[38]||(e[38]=i(" Identifiant : ")),s("code",null,d(t.selectedUser.username),1),e[39]||(e[39]=s("br",null,null,-1)),e[40]||(e[40]=i(" Email : ")),s("code",null,d(t.selectedUser.email),1),e[41]||(e[41]=s("br",null,null,-1)),e[42]||(e[42]=i(" Dernière connexion : ")),t.selectedUser.lastLogin?(o(),n("span",ue,[s("code",null,d(l.$filters.dateFull(t.selectedUser.lastLogin)),1),e[35]||(e[35]=i(" à ")),s("code",null,d(l.$filters.time(t.selectedUser.lastLogin)),1)])):(o(),n("strong",ae," inconnue ")),e[43]||(e[43]=s("br",null,null,-1)),e[44]||(e[44]=i(" Personne associée : ")),t.selectedUser.person?(o(),n("code",me,d(t.selectedUser.person.displayname),1)):(o(),n("strong",pe,"non trouvée")),e[45]||(e[45]=s("br",null,null,-1)),t.selectedUser.error?(o(),n("div",ge,d(t.selectedUser.error),1)):m("",!0),t.selectedUser.warning?(o(),n("div",fe,d(t.selectedUser.warning),1)):m("",!0),e[46]||(e[46]=s("h3",null,[s("i",{class:"icon-signal"}),i(" Activités du compte ")],-1)),a.logsFiltered.length?(o(!0),n(p,{key:6},g(a.logsFiltered,r=>(o(),n("section",null,[s("h3",null,d(r.day),1),(o(!0),n(p,null,g(r.logs,f=>(o(),n("article",he,[s("div",ve,[s("small",null,d(l.$filters.log(f.dateCreated.date)),1),e[36]||(e[36]=i(" - depuis l'IP ")),s("strong",null,d(f.ip),1)]),s("p",{innerHTML:l.$filters.log(f.message)},null,8,ye)]))),256))]))),256)):(o(),n("section",ce,e[37]||(e[37]=[s("p",{class:"alert alert-info"},"Aucune donnée",-1)])))])):m("",!0)])])):m("",!0)])}const Re=x(N,[["render",be]]);let ke=document.querySelector("#authentification");const D=w(Re,{url:ke.dataset.url});D.config.globalProperties.$filters={timeAgo(l){return y.timeAgo(l)},time(l){return y.time(l)},date(l){return y.date(l)},dateFull(l){return y.dateFull(l)},filesize(l){return A.filesize(l)},money(l){return L.money(l)},log(l){return F.log(l)}};D.mount("#authentification"); diff --git a/public/js/oscar/vite/dist/assets/authentification-a6bb467f.js b/public/js/oscar/vite/dist/assets/authentification-a6bb467f.js new file mode 100644 index 0000000000000000000000000000000000000000..aea858c8486aeaee417b396e0c565978b633d602 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/authentification-a6bb467f.js @@ -0,0 +1 @@ +import{q as D,o as r,c as n,g as u,d as e,a as d,t as i,w as b,l as U,F as h,k as _,h as R,n as g,v as C,A}from"../vendor.js";import{m as f}from"../vendor2.js";import{f as E}from"../vendor3.js";import{m as w}from"../vendor4.js";import{A as v}from"../vendor8.js";import{_ as L}from"../vendor7.js";import{t as x}from"../vendor19.js";import"../vendor14.js";import"../vendor16.js";const F={props:{url:{required:!0}},data(){return{orderby:"lastLogin",orderbyDirection:-1,search:"",logs:null,selectedUser:null,loading:!1,error:null,addRoleUser:null,addRoleId:1,addRoleError:null,deleteDatas:null,deleteError:null,roles:[],users:[],urlLogs:null,urlRoles:null}},methods:{getRoleId(t){return this.roles.find(s=>s.roleId==t)},handlerDeleteRole(t,s){this.deleteError=null,this.deleteDatas={user:t,role:s}},performDeleteRole(){let t=this.deleteDatas.user.id,s=this.getRoleId(this.deleteDatas.role).id;this.loading=!0,this.addRoleError=null,v.deleteParams(this.urlRoles,{authentification_id:t,role_id:s}).then(a=>{this.deleteDatas.user.roles=a.data.roles,this.deleteDatas=null,this.deleteError=null},a=>{this.deleteError=a.body}).then(a=>{this.loading=!1})},performAddRole(){if(this.loading=!0,this.addRoleError=null,this.addRoleUser.id&&this.addRoleId){var t=new FormData;t.append("authentification_id",this.addRoleUser.id),t.append("role_id",this.addRoleId),v.post(this.urlRoles,t).then(s=>{this.addRoleUser.roles=s.data.roles,this.addRoleUser=null,this.addRoleError=null},s=>{this.addRoleError=s.body}).then(s=>{this.loading=!1})}},updateOrderBy(t){t==this.orderby?this.orderbyDirection*=-1:(this.orderbyDirection=-1,this.orderby=t)},handlerClick(t){this.selectedUser=t,this.loading=!0,v.get(this.urlLogs+t.id).then(s=>{this.logs=s.data},s=>{console.log(s)}).then(()=>{this.loading=!1})},fetch(){v.get(this.url).then(t=>{this.roles=t.data.roles,this.users=t.data.users,this.urlLogs=t.data.urlLogs,this.urlRoles=t.data.urlRoles})}},computed:{usersFiltered(){var t=[];return this.search!=""?this.users.forEach(s=>{var a=s.displayName+s.email+s.username;a.indexOf(this.search)>-1&&t.push(s)}):t=this.users,t.sort((s,a)=>s[this.orderby]==a[this.orderby]?0:s[this.orderby]{var y=D(a.dateCreated.date),l=y.format("dddd D MMMM YYYY")+", "+y.fromNow();(s==null||s.day!=l)&&(s={day:l,logs:[]},t.push(s)),s.logs.push(a)})}return t}},mounted(){console.log("fetch"),this.fetch()}},N={id:"authentifications"},I={key:0,class:"vue-loader"},M=e("span",null,"Chargement",-1),B=[M],z={key:1},O=e("h1",null,[e("i",{class:"icon-group"}),d(" Comptes")],-1),T=e("p",{class:"oscar-help"}," Seules les personnes qui se sont authentifiées au moins une fois et les comptes spéciaux sont affichés. ",-1),V={key:0,class:"alert alert-danger"},q={class:"text-right"},P={key:1,class:"overlay"},Y={class:"row"},j={class:"col-md-6 col-md-offset-3"},S=e("i",{class:"icon-attention-1"},null,-1),H=e("br",null,null,-1),G=e("p",{class:"alert alert-danger"},[d(" Cette suppression "),e("strong",null,"est définitive"),d(", ce compte, si c'est le votre, pourrez ne plus pouvoir accéder à l'application. Êtes-vous sûr ? ")],-1),J=e("hr",null,null,-1),K={key:2,class:"overlay"},Q={class:"row"},W={class:"col-md-6 col-md-offset-3"},X={key:0,class:"alert alert-danger"},Z=["value"],$=e("hr",null,null,-1),ee=e("button",{type:"submit",class:"btn btn-default"},"Ajouter",-1),se={class:"row"},te={class:"col-md-4"},le={class:"oscar-sorter row"},oe=e("i",{class:"icon-sort"},null,-1),re={class:"input-group"},ne=e("span",{class:"input-group-addon",id:"basic-addon1"},[e("i",{class:"icon-zoom-in-outline"})],-1),ie=e("div",{class:"col-md-8"},"   ",-1),de={class:"ui-user"},ae={class:"users"},ce=e("hr",null,null,-1),ue=["onClick"],he={class:"card-title"},_e={class:"card-content"},me={class:"text-highlight"},pe=e("i",{class:"icon-mail"},null,-1),ge=e("br",null,null,-1),fe={key:0},ve={key:1},ye=e("br",null,null,-1),be={class:"roles"},Re={class:"cartouche"},ke={class:"addon"},De=["onClick"],Ue=["onClick"],Ce=e("i",{class:"icon-user"},null,-1),Ae={key:0,class:"logs"},Ee=e("br",null,null,-1),we=e("br",null,null,-1),Le={key:0},xe={key:1,class:"text-warning"},Fe=e("br",null,null,-1),Ne={key:2},Ie={key:3,class:"text-danger"},Me=e("br",null,null,-1),Be={key:4,class:"alert alert-danger"},ze={key:5,class:"alert alert-warning"},Oe=e("h3",null,[e("i",{class:"icon-signal"}),d(" Activités du compte ")],-1),Te={class:"card"},Ve={class:"text-highlight"},qe=["innerHTML"],Pe={key:7},Ye=e("p",{class:"alert alert-info"},"Aucune donnée",-1),je=[Ye];function Se(t,s,a,y,l,c){return r(),n("section",N,[l.loading?(r(),n("div",I,B)):u("",!0),l.users?(r(),n("section",z,[O,T,l.error?(r(),n("div",V,[e("p",q,[e("i",{class:"icon-cancel-outline",onClick:s[0]||(s[0]=o=>l.error=null),style:{float:"right",cursor:"pointer"}})]),d(" "+i(l.error),1)])):u("",!0),l.deleteDatas?(r(),n("div",P,[e("div",Y,[e("div",j,[e("h3",null,[S,d(" Supprimer le rôle "),e("strong",null,i(l.deleteDatas.role),1),d(),H,d(" pour le compte "),e("strong",null,i(l.deleteDatas.user.displayName),1),d(" ? ")]),G,J,e("nav",null,[e("button",{class:"btn btn-danger",onClick:s[1]||(s[1]=o=>c.performDeleteRole())},"Supprimer définitivement"),e("button",{onClick:s[2]||(s[2]=o=>l.deleteDatas=null),class:"btn btn-default"},"Annuler")])])])])):u("",!0),l.addRoleUser?(r(),n("div",K,[e("form",{action:"",class:"overlay-content container",onSubmit:s[5]||(s[5]=R(o=>c.performAddRole(),["prevent"]))},[e("div",Q,[e("div",W,[e("h3",null,[d("Ajouter un rôle au compte : "),e("strong",null,i(l.addRoleUser.displayName),1)]),l.addRoleError?(r(),n("div",X,i(l.addRoleError),1)):u("",!0),d(" Rôle : "),b(e("select",{"onUpdate:modelValue":s[3]||(s[3]=o=>l.addRoleId=o)},[(r(!0),n(h,null,_(l.roles,o=>(r(),n("option",{value:o.id},i(o.roleId),9,Z))),256))],512),[[U,l.addRoleId]]),$,e("nav",null,[ee,e("button",{type:"reset",onClick:s[4]||(s[4]=o=>l.addRoleUser=null),class:"btn btn-primary"},"Annuler")])])])],32)])):u("",!0),e("div",se,[e("div",te,[e("nav",le,[oe,d(" Trie : "),e("a",{href:"#",class:g(["oscar-sorter-item",{active:l.orderby=="lastLogin"}]),onClick:s[6]||(s[6]=o=>c.updateOrderBy("lastLogin"))},"Dernière connexion",2),e("a",{href:"#",class:g(["oscar-sorter-item",{active:l.orderby=="email"}]),onClick:s[7]||(s[7]=o=>c.updateOrderBy("email"))},"Email",2),e("a",{href:"#",class:g(["oscar-sorter-item",{active:l.orderby=="displayName"}]),onClick:s[8]||(s[8]=o=>c.updateOrderBy("displayName"))},"Nom",2)]),e("div",re,[ne,b(e("input",{type:"search","onUpdate:modelValue":s[9]||(s[9]=o=>l.search=o),class:"form-control",placeholder:"Recherche dans les authentification"},null,512),[[C,l.search]])])]),ie]),e("div",de,[e("section",ae,[ce,(r(!0),n(h,null,_(c.usersFiltered,(o,m)=>(r(),n("article",{class:g(["card xs",{selected:l.selectedUser==o,error:o.error,warning:o.warning}]),onClick:p=>c.handlerClick(o)},[e("h3",he,i(o.displayName)+" ("+i(o.username)+") ",1),e("div",_e,[e("small",me,[pe,e("small",null,i(o.email),1),ge,d(" Dernière connexion : "),o.lastLogin?(r(),n("span",fe,i(o.lastLogin),1)):(r(),n("span",ve," Jamais ")),ye,o.person?(r(),n(h,{key:2},[d(" Dans les activités oscar : "),e("strong",null,i(o.person.displayname),1)],64)):u("",!0)]),e("div",be,[d(" Rôles (implicites) : "),(r(!0),n(h,null,_(o.roles,p=>(r(),n("span",Re,[d(i(p)+" ",1),e("span",ke,[e("i",{class:"icon-trash",onClick:R(Je=>c.handlerDeleteRole(o,p),["prevent","stop"])},null,8,De)])]))),256)),e("div",{class:"btn btn-default btn-xs",onClick:p=>l.addRoleUser=o},[Ce,d(" Ajouter un rôle ")],8,Ue)])])],10,ue))),256))]),l.logs?(r(),n("section",Ae,[e("h2",null,i(l.selectedUser.displayName),1),d(" Identifiant : "),e("code",null,i(l.selectedUser.username),1),Ee,d(" Email : "),e("code",null,i(l.selectedUser.email),1),we,d(" Dernière connexion : "),l.selectedUser.lastLogin?(r(),n("span",Le,[e("code",null,i(t.$filters.dateFull(l.selectedUser.lastLogin)),1),d(" à "),e("code",null,i(t.$filters.time(l.selectedUser.lastLogin)),1)])):(r(),n("strong",xe," inconnue ")),Fe,d(" Personne associée : "),l.selectedUser.person?(r(),n("code",Ne,i(l.selectedUser.person.displayname),1)):(r(),n("strong",Ie,"non trouvée")),Me,l.selectedUser.error?(r(),n("div",Be,i(l.selectedUser.error),1)):u("",!0),l.selectedUser.warning?(r(),n("div",ze,i(l.selectedUser.warning),1)):u("",!0),Oe,c.logsFiltered.length?(r(!0),n(h,{key:6},_(c.logsFiltered,o=>(r(),n("section",null,[e("h3",null,i(o.day),1),(r(!0),n(h,null,_(o.logs,m=>(r(),n("article",Te,[e("div",Ve,[e("small",null,i(t.$filters.log(m.dateCreated.date)),1),d(" - depuis l'IP "),e("strong",null,i(m.ip),1)]),e("p",{innerHTML:t.$filters.log(m.message)},null,8,qe)]))),256))]))),256)):(r(),n("section",Pe,je))])):u("",!0)])])):u("",!0)])}const He=L(F,[["render",Se]]);let Ge=document.querySelector("#authentification");const k=A(He,{url:Ge.dataset.url});k.config.globalProperties.$filters={timeAgo(t){return f.timeAgo(t)},time(t){return f.time(t)},date(t){return f.date(t)},dateFull(t){return f.dateFull(t)},filesize(t){return E.filesize(t)},money(t){return w.money(t)},log(t){return x.log(t)}};k.mount("#authentification"); diff --git a/public/js/oscar/vite/dist/assets/declarerslist-a1389633.js b/public/js/oscar/vite/dist/assets/declarerslist-a1389633.js new file mode 100644 index 0000000000000000000000000000000000000000..32e4a8903aec49054843f62f87bbeed1e9ffd2db --- /dev/null +++ b/public/js/oscar/vite/dist/assets/declarerslist-a1389633.js @@ -0,0 +1 @@ +import{s as D,o as r,c as n,b as v,j as b,T as g,d as e,w as C,l as N,F as h,k as _,t as a,g as p,a as f,h as k,n as m,A as O}from"../vendor.js";import{_ as T}from"../vendor7.js";import{D as P}from"../vendor22.js";const E={props:{urlRecallDeclarer:{required:!0}},data(){return{declarers:null,period:null,error:null,loading:!1,infosPerson:null,months:{1:"Janvier",2:"Février",3:"Mars",4:"Avril",5:"Mai",6:"Juin",7:"Juillet",8:"Aout",9:"Septembre",10:"Octobre",11:"Novembre",12:"Décembre"}}},computed:{years(){let o=[];for(let s=this.period.year-5;s<=this.period.year+5;s++)o.push(s);return o}},methods:{DurationFilter(){return DurationFilter},recall(o,s){console.log(o,s.periodCode,this.urlRecallDeclarer)},details(o){D.get(o.url_details).then(s=>{this.infosPerson=s.data})},organize(o){let s={activities:{},others:{}};return Object.keys(o.activities).forEach(i=>{var c=o.activities[i];s.activities[i]={acronym:c.acronym,id:c.id,label:c.label,total:c.total,workpackages:{},days:{}}}),Object.keys(o.workpackages).forEach(i=>{var c=o.workpackages[i];s.activities[c.activity_id].workpackages[i]={code:c.code,id:c.id,label:c.label,total:c.total,days:{}}}),Object.keys(o.otherWP).forEach(i=>{var c=o.otherWP[i];s.others[i]={label:c.label,code:c.code,total:c.total,days:{}}}),Object.keys(o.days).forEach(i=>{var c=o.days[i];c.declarations&&c.declarations.forEach(l=>{var d=l.wp_id,t=l.activity_id,u=l.duration;s.activities[t].days.hasOwnProperty(i)||(s.activities[t].days[i]=0),s.activities[t].days[i]+=u,s.activities[t].workpackages[d].days.hasOwnProperty(i)||(s.activities[t].workpackages[d].days[i]=0),s.activities[t].workpackages[d].days[i]+=u}),c.othersWP&&c.othersWP.forEach(l=>{var d=l.code,t=l.duration;s.others[d].days.hasOwnProperty(i)||(s.others[d].days[i]=0),s.others[d].days[i]+=t})}),s},fetch(o=null){this.loading="Chargement de la période";let s=this.urlRecallDeclarer+"?f=json"+(o?"&period="+o:"");D.get(s).then(i=>{i.data&&i.data.declarers?(this.declarers=i.data.declarers.sort((c,l)=>c.lastName.localeCompare(l.lastName)),this.period=i.data.period):this.error="Soucis lors du chargement des données"},i=>{this.error=i.body}).then(i=>{this.loading=!1})},nextPeriod(){let o,s;this.period.month==12?(o=1,s=this.period.year+1):(o=this.period.month+1,s=this.period.year),this.fetch(s+"-"+o)},previousPeriod(){let o,s;this.period.month==1?(o=12,s=this.period.year-1):(o=this.period.month-1,s=this.period.year),this.fetch(s+"-"+o)},changePeriod(){let o=this.period.year+"-"+this.period.month;this.fetch(o)}},mounted(){this.fetch()}},j={key:0,class:"overlay"},M={class:"overlay-content",style:{"flex-basis":"90%","max-height":"90%"}},S=e("br",null,null,-1),A=e("i",{class:"icon-cancel-outline"},null,-1),J=[A],V={class:"table bordered table table-condensed"},z=e("th",null," ~",-1),L={style:{"font-weight":"100"}},R=e("th",{class:"total"}," Total",-1),W=["colspan"],B=e("i",{class:"icon-cube"},null,-1),q={class:"row-label"},U=e("i",{class:"icon-archive"},null,-1),H={key:0},G={key:1},I={class:"total"},K={class:"row-total"},Q=e("th",null,"Total",-1),X=["colspan"],Y={class:"total"},Z=["colspan"],$=e("h4",null,[e("i",{class:"icon-tags"}),f("Hors-lot")],-1),ee=[$],te={class:"row-label"},se={key:0},oe={key:1},le={class:"total"},re={class:"row-total"},ne=e("th",{class:"row-label"},"Total",-1),ie={key:0,class:"overlay"},ae={class:"alert alert-danger"},ce=e("i",{class:"icon-cancel-outline"},null,-1),de=[ce],ue={key:0,class:"overlay"},he=e("div",{class:"overlay-content"},[e("p",null,[e("i",{class:"icon-spinner animate-spin"}),f(" Chargement de la période")])],-1),_e=[he],fe={class:"navbar navbar-default"},pe={key:0,class:"button-group"},ye=e("span",null,"Période : ",-1),me=["value"],ve=["value"],be={key:0,class:"list"},ge={class:"card",style:{display:"flex"}},ke={style:{width:"48px",flex:"0"}},Pe=["src"],we={style:{flex:"1","padding-left":".25em"}},De={class:"lastname"},Ce={class:"firstname"},Ne=["onClick"],xe=e("i",{class:"icon-calendar"},null,-1),Fe=e("br",null,null,-1),Oe={class:"tags",style:{flex:"1"}},Te={class:"tag cartouche xs"},Ee=e("i",{class:"icon-cubes"},null,-1),je={style:{flex:"1"}},Me={class:"cartouche secondary1"},Se=e("i",{class:"icon-calendar"},null,-1),Ae=e("small",null,"Saisie : ",-1),Je={class:"addon"},Ve=e("br",null,null,-1),ze=e("i",{class:"icon-paper-plane"},null,-1),Le={class:"actions",style:{width:"175px"}},Re=["href"],We=e("i",{class:"icon-user"},"Fiche personne",-1),Be=[We];function qe(o,s,i,c,l,d){return r(),n("section",null,[v(g,{name:"fade"},{default:b(()=>[l.infosPerson?(r(),n("div",j,[e("div",M,[e("h3",null,[f(" Détails pour "),e("strong",null,a(l.infosPerson.person),1),S,f(" pour "),e("strong",null,a(o.$filters.period(l.infosPerson.period)),1),e("a",{href:"#",onClick:s[0]||(s[0]=k(t=>l.infosPerson=null,["prevent"]))},J)]),e("table",V,[e("thead",null,[e("tr",null,[z,(r(!0),n(h,null,_(l.infosPerson.days,(t,u)=>(r(),n("th",null,[e("small",L,a(t.label),1),f(" "+a(t.i),1)]))),256)),R])]),(r(!0),n(h,null,_(d.organize(l.infosPerson).activities,t=>(r(),n("tbody",null,[e("tr",null,[e("th",{colspan:l.infosPerson.dayNbr+2},[e("h4",null,[B,f(a(t.acronym),1)])],8,W)]),(r(!0),n(h,null,_(t.workpackages,u=>(r(),n("tr",null,[e("th",q,[U,f(a(u.code),1)]),(r(!0),n(h,null,_(l.infosPerson.days,(y,w)=>(r(),n("td",{class:m(["day",{off:y.locked}])},[u.days[w]?(r(),n("strong",H,a(o.$filters.formatDuration(u.days[w])),1)):(r(),n("small",G,"0.0"))],2))),256)),e("th",I,a(o.$filters.formatDuration(u.total)),1)]))),256)),e("tr",K,[Q,e("td",{colspan:l.infosPerson.dayNbr}," ",8,X),e("th",Y,a(o.$filters.formatDuration(t.total)),1)])]))),256)),e("tbody",null,[e("tr",null,[e("th",{colspan:l.infosPerson.dayNbr+2},ee,8,Z)]),(r(!0),n(h,null,_(d.organize(l.infosPerson).others,t=>(r(),n("tr",null,[e("th",te,a(t.label),1),(r(!0),n(h,null,_(l.infosPerson.days,(u,y)=>(r(),n("td",{class:m(["day",{off:u.locked}])},[t.days[y]?(r(),n("strong",se,a(o.$filters.formatDuration(t.days[y])),1)):(r(),n("small",oe,"0.0"))],2))),256)),e("th",le,a(o.$filters.formatDuration(t.total)),1)]))),256))]),e("tfoot",null,[e("tr",re,[ne,(r(!0),n(h,null,_(l.infosPerson.days,(t,u)=>(r(),n("th",{class:m(["day",{off:t.locked}])},[e("small",null,a(o.$filters.formatDuration(t.total)),1)],2))),256)),e("th",null,a(o.$filters.formatDuration(l.infosPerson.total)),1)])])])])])):p("",!0)]),_:1}),v(g,{name:"fade"},{default:b(()=>[l.error?(r(),n("div",ie,[e("div",ae,[e("h3",null,[f("Erreur "),e("a",{href:"#",onClick:s[1]||(s[1]=k(t=>l.error=null,["prevent"])),class:"float-right"},de)]),e("p",null,a(l.error),1)])])):p("",!0)]),_:1}),v(g,{name:"fade"},{default:b(()=>[l.loading?(r(),n("div",ue,_e)):p("",!0)]),_:1}),e("nav",fe,[l.period?(r(),n("div",pe,[e("button",{class:"btn btn-default",onClick:s[2]||(s[2]=t=>d.previousPeriod())}," <"),ye,C(e("select",{name:"mois","onUpdate:modelValue":s[3]||(s[3]=t=>l.period.month=t),onChange:s[4]||(s[4]=t=>d.changePeriod())},[(r(!0),n(h,null,_(l.months,(t,u)=>(r(),n("option",{value:u},a(t),9,me))),256))],544),[[N,l.period.month]]),C(e("select",{name:"mois","onUpdate:modelValue":s[5]||(s[5]=t=>l.period.year=t),onChange:s[6]||(s[6]=t=>d.changePeriod())},[(r(!0),n(h,null,_(d.years,t=>(r(),n("option",{value:t},a(t),9,ve))),256))],544),[[N,l.period.year]]),e("strong",null,a(l.period.periodLabel),1),e("button",{class:"btn btn-default",onClick:s[7]||(s[7]=t=>d.nextPeriod())}," >")])):p("",!0)]),l.declarers?(r(),n("div",be,[(r(!0),n(h,null,_(l.declarers,t=>(r(),n("article",ge,[e("span",ke,[e("img",{class:"thumb32",src:"//www.gravatar.com/avatar/"+t.mailMd5+"?s=48",alt:""},null,8,Pe)]),e("span",we,[e("strong",De,a(t.lastName),1),e("em",Ce,a(t.firstName),1),e("a",{href:"#",class:"link",onClick:k(u=>d.details(t),["prevent"])},[xe,f("Détails")],8,Ne),Fe,e("small",null,a(t.affectation),1)]),e("span",Oe,[(r(!0),n(h,null,_(t.projects,u=>(r(),n("span",Te,[Ee,f(a(u),1)]))),256))]),e("span",je,[e("strong",Me,[Se,Ae,e("strong",null,a(o.$filters.percent(100/t.details.waitingTotal*t.details.total))+" %",1),e("span",Je,a(o.$filters.round1(t.details.total))+" / "+a(o.$filters.round1(t.details.waitingTotal)),1)]),Ve,e("strong",{class:m(["cartouche xs secondary1",t.details.state])},[ze,e("small",null,[f("État : "),e("strong",null,a(t.details.stateText),1)])],2)]),e("nav",Le,[t.url_person?(r(),n("a",{key:0,class:"btn btn-default btn-xs",href:t.url_person},Be,8,Re)):p("",!0)])]))),256))])):p("",!0)])}const Ue=T(E,[["render",qe]]),He={"01":"Janvier","02":"Février","03":"Mars","04":"Avril","05":"Mai","06":"Juin","07":"Juillet","08":"Aout","09":"Septembre",10:"Octobre",11:"Novembre",12:"Décembre"},Ge={period(o){let s=o.split("-");return He[s[1]]+" "+s[0]}};let x="#declarers-list",Ie=document.querySelector(x);const F=O(Ue,{urlRecallDeclarer:Ie.dataset.entrypoint});F.config.globalProperties.$filters={round1(o){return P.round1(o)},percent(o){return P.percent(o)},formatDuration(o){return P.formatDuration(o)},period(o){return Ge.period(o)}};F.mount(x); diff --git a/public/js/oscar/vite/dist/assets/declarerslist-b893a403.js b/public/js/oscar/vite/dist/assets/declarerslist-b893a403.js deleted file mode 100644 index 385913f2f5fa03528dd67bc2510052231992c093..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/declarerslist-b893a403.js +++ /dev/null @@ -1 +0,0 @@ -import{p as D,o,c as n,b,i as g,T as k,d as t,w as C,k as N,F as f,j as p,t as a,g as y,a as h,h as P,n as v,y as O}from"../vendor.js";import{_ as T}from"../vendor7.js";import{D as _}from"../vendor22.js";const E={props:{urlRecallDeclarer:{required:!0}},data(){return{declarers:null,period:null,error:null,loading:!1,infosPerson:null,months:{1:"Janvier",2:"Février",3:"Mars",4:"Avril",5:"Mai",6:"Juin",7:"Juillet",8:"Aout",9:"Septembre",10:"Octobre",11:"Novembre",12:"Décembre"}}},computed:{years(){let l=[];for(let e=this.period.year-5;e<=this.period.year+5;e++)l.push(e);return l}},methods:{DurationFilter(){return DurationFilter},recall(l,e){console.log(l,e.periodCode,this.urlRecallDeclarer)},details(l){D.get(l.url_details).then(e=>{this.infosPerson=e.data})},organize(l){let e={activities:{},others:{}};return Object.keys(l.activities).forEach(i=>{var d=l.activities[i];e.activities[i]={acronym:d.acronym,id:d.id,label:d.label,total:d.total,workpackages:{},days:{}}}),Object.keys(l.workpackages).forEach(i=>{var d=l.workpackages[i];e.activities[d.activity_id].workpackages[i]={code:d.code,id:d.id,label:d.label,total:d.total,days:{}}}),Object.keys(l.otherWP).forEach(i=>{var d=l.otherWP[i];e.others[i]={label:d.label,code:d.code,total:d.total,days:{}}}),Object.keys(l.days).forEach(i=>{var d=l.days[i];d.declarations&&d.declarations.forEach(r=>{var u=r.wp_id,s=r.activity_id,c=r.duration;e.activities[s].days.hasOwnProperty(i)||(e.activities[s].days[i]=0),e.activities[s].days[i]+=c,e.activities[s].workpackages[u].days.hasOwnProperty(i)||(e.activities[s].workpackages[u].days[i]=0),e.activities[s].workpackages[u].days[i]+=c}),d.othersWP&&d.othersWP.forEach(r=>{var u=r.code,s=r.duration;e.others[u].days.hasOwnProperty(i)||(e.others[u].days[i]=0),e.others[u].days[i]+=s})}),e},fetch(l=null){this.loading="Chargement de la période";let e=this.urlRecallDeclarer+"?f=json"+(l?"&period="+l:"");D.get(e).then(i=>{i.data&&i.data.declarers?(this.declarers=i.data.declarers.sort((d,r)=>d.lastName.localeCompare(r.lastName)),this.period=i.data.period):this.error="Soucis lors du chargement des données"},i=>{this.error=i.body}).then(i=>{this.loading=!1})},nextPeriod(){let l,e;this.period.month==12?(l=1,e=this.period.year+1):(l=this.period.month+1,e=this.period.year),this.fetch(e+"-"+l)},previousPeriod(){let l,e;this.period.month==1?(l=12,e=this.period.year-1):(l=this.period.month-1,e=this.period.year),this.fetch(e+"-"+l)},changePeriod(){let l=this.period.year+"-"+this.period.month;this.fetch(l)}},mounted(){this.fetch()}},j={key:0,class:"overlay"},M={class:"overlay-content",style:{"flex-basis":"90%","max-height":"90%"}},S={class:"table bordered table table-condensed"},J={style:{"font-weight":"100"}},V=["colspan"],A={class:"row-label"},z={key:0},L={key:1},R={class:"total"},W={class:"row-total"},B=["colspan"],q={class:"total"},U=["colspan"],H={class:"row-label"},G={key:0},I={key:1},K={class:"total"},Q={class:"row-total"},X={key:0,class:"overlay"},Y={class:"alert alert-danger"},Z={key:0,class:"overlay"},$={class:"navbar navbar-default"},ee={key:0,class:"button-group"},te=["value"],se=["value"],le={key:0,class:"list"},re={class:"card",style:{display:"flex"}},oe={style:{width:"48px",flex:"0"}},ne=["src"],ie={style:{flex:"1","padding-left":".25em"}},ae={class:"lastname"},de={class:"firstname"},ue=["onClick"],ce={class:"tags",style:{flex:"1"}},fe={class:"tag cartouche xs"},pe={style:{flex:"1"}},he={class:"cartouche secondary1"},ye={class:"addon"},me={class:"actions",style:{width:"175px"}},ve=["href"];function be(l,e,i,d,r,u){return o(),n("section",null,[b(k,{name:"fade"},{default:g(()=>[r.infosPerson?(o(),n("div",j,[t("div",M,[t("h3",null,[e[9]||(e[9]=h(" Détails pour ")),t("strong",null,a(r.infosPerson.person),1),e[10]||(e[10]=t("br",null,null,-1)),e[11]||(e[11]=h(" pour ")),t("strong",null,a(l.$filters.period(r.infosPerson.period)),1),t("a",{href:"#",onClick:e[0]||(e[0]=P(s=>r.infosPerson=null,["prevent"]))},e[8]||(e[8]=[t("i",{class:"icon-cancel-outline"},null,-1)]))]),t("table",S,[t("thead",null,[t("tr",null,[e[12]||(e[12]=t("th",null," ~",-1)),(o(!0),n(f,null,p(r.infosPerson.days,(s,c)=>(o(),n("th",null,[t("small",J,a(s.label),1),h(" "+a(s.i),1)]))),256)),e[13]||(e[13]=t("th",{class:"total"}," Total",-1))])]),(o(!0),n(f,null,p(u.organize(r.infosPerson).activities,s=>(o(),n("tbody",null,[t("tr",null,[t("th",{colspan:r.infosPerson.dayNbr+2},[t("h4",null,[e[14]||(e[14]=t("i",{class:"icon-cube"},null,-1)),h(a(s.acronym),1)])],8,V)]),(o(!0),n(f,null,p(s.workpackages,c=>(o(),n("tr",null,[t("th",A,[e[15]||(e[15]=t("i",{class:"icon-archive"},null,-1)),h(a(c.code),1)]),(o(!0),n(f,null,p(r.infosPerson.days,(m,w)=>(o(),n("td",{class:v(["day",{off:m.locked}])},[c.days[w]?(o(),n("strong",z,a(l.$filters.formatDuration(c.days[w])),1)):(o(),n("small",L,"0.0"))],2))),256)),t("th",R,a(l.$filters.formatDuration(c.total)),1)]))),256)),t("tr",W,[e[16]||(e[16]=t("th",null,"Total",-1)),t("td",{colspan:r.infosPerson.dayNbr}," ",8,B),t("th",q,a(l.$filters.formatDuration(s.total)),1)])]))),256)),t("tbody",null,[t("tr",null,[t("th",{colspan:r.infosPerson.dayNbr+2},e[17]||(e[17]=[t("h4",null,[t("i",{class:"icon-tags"}),h("Hors-lot")],-1)]),8,U)]),(o(!0),n(f,null,p(u.organize(r.infosPerson).others,s=>(o(),n("tr",null,[t("th",H,a(s.label),1),(o(!0),n(f,null,p(r.infosPerson.days,(c,m)=>(o(),n("td",{class:v(["day",{off:c.locked}])},[s.days[m]?(o(),n("strong",G,a(l.$filters.formatDuration(s.days[m])),1)):(o(),n("small",I,"0.0"))],2))),256)),t("th",K,a(l.$filters.formatDuration(s.total)),1)]))),256))]),t("tfoot",null,[t("tr",Q,[e[18]||(e[18]=t("th",{class:"row-label"},"Total",-1)),(o(!0),n(f,null,p(r.infosPerson.days,(s,c)=>(o(),n("th",{class:v(["day",{off:s.locked}])},[t("small",null,a(l.$filters.formatDuration(s.total)),1)],2))),256)),t("th",null,a(l.$filters.formatDuration(r.infosPerson.total)),1)])])])])])):y("",!0)]),_:1}),b(k,{name:"fade"},{default:g(()=>[r.error?(o(),n("div",X,[t("div",Y,[t("h3",null,[e[20]||(e[20]=h("Erreur ")),t("a",{href:"#",onClick:e[1]||(e[1]=P(s=>r.error=null,["prevent"])),class:"float-right"},e[19]||(e[19]=[t("i",{class:"icon-cancel-outline"},null,-1)]))]),t("p",null,a(r.error),1)])])):y("",!0)]),_:1}),b(k,{name:"fade"},{default:g(()=>[r.loading?(o(),n("div",Z,e[21]||(e[21]=[t("div",{class:"overlay-content"},[t("p",null,[t("i",{class:"icon-spinner animate-spin"}),h(" Chargement de la période")])],-1)]))):y("",!0)]),_:1}),t("nav",$,[r.period?(o(),n("div",ee,[t("button",{class:"btn btn-default",onClick:e[2]||(e[2]=s=>u.previousPeriod())}," <"),e[22]||(e[22]=t("span",null,"Période : ",-1)),C(t("select",{name:"mois","onUpdate:modelValue":e[3]||(e[3]=s=>r.period.month=s),onChange:e[4]||(e[4]=s=>u.changePeriod())},[(o(!0),n(f,null,p(r.months,(s,c)=>(o(),n("option",{value:c},a(s),9,te))),256))],544),[[N,r.period.month]]),C(t("select",{name:"mois","onUpdate:modelValue":e[5]||(e[5]=s=>r.period.year=s),onChange:e[6]||(e[6]=s=>u.changePeriod())},[(o(!0),n(f,null,p(u.years,s=>(o(),n("option",{value:s},a(s),9,se))),256))],544),[[N,r.period.year]]),t("strong",null,a(r.period.periodLabel),1),t("button",{class:"btn btn-default",onClick:e[7]||(e[7]=s=>u.nextPeriod())}," >")])):y("",!0)]),r.declarers?(o(),n("div",le,[(o(!0),n(f,null,p(r.declarers,s=>(o(),n("article",re,[t("span",oe,[t("img",{class:"thumb32",src:"//www.gravatar.com/avatar/"+s.mailMd5+"?s=48",alt:""},null,8,ne)]),t("span",ie,[t("strong",ae,a(s.lastName),1),t("em",de,a(s.firstName),1),t("a",{href:"#",class:"link",onClick:P(c=>u.details(s),["prevent"])},e[23]||(e[23]=[t("i",{class:"icon-calendar"},null,-1),h("Détails")]),8,ue),e[24]||(e[24]=t("br",null,null,-1)),t("small",null,a(s.affectation),1)]),t("span",ce,[(o(!0),n(f,null,p(s.projects,c=>(o(),n("span",fe,[e[25]||(e[25]=t("i",{class:"icon-cubes"},null,-1)),h(a(c),1)]))),256))]),t("span",pe,[t("strong",he,[e[26]||(e[26]=t("i",{class:"icon-calendar"},null,-1)),e[27]||(e[27]=t("small",null,"Saisie : ",-1)),t("strong",null,a(l.$filters.percent(100/s.details.waitingTotal*s.details.total))+" %",1),t("span",ye,a(l.$filters.round1(s.details.total))+" / "+a(l.$filters.round1(s.details.waitingTotal)),1)]),e[30]||(e[30]=t("br",null,null,-1)),t("strong",{class:v(["cartouche xs secondary1",s.details.state])},[e[29]||(e[29]=t("i",{class:"icon-paper-plane"},null,-1)),t("small",null,[e[28]||(e[28]=h("État : ")),t("strong",null,a(s.details.stateText),1)])],2)]),t("nav",me,[s.url_person?(o(),n("a",{key:0,class:"btn btn-default btn-xs",href:s.url_person},e[31]||(e[31]=[t("i",{class:"icon-user"},"Fiche personne",-1)]),8,ve)):y("",!0)])]))),256))])):y("",!0)])}const ge=T(E,[["render",be]]),ke={"01":"Janvier","02":"Février","03":"Mars","04":"Avril","05":"Mai","06":"Juin","07":"Juillet","08":"Aout","09":"Septembre",10:"Octobre",11:"Novembre",12:"Décembre"},Pe={period(l){let e=l.split("-");return ke[e[1]]+" "+e[0]}};let x="#declarers-list",_e=document.querySelector(x);const F=O(ge,{urlRecallDeclarer:_e.dataset.entrypoint});F.config.globalProperties.$filters={round1(l){return _.round1(l)},percent(l){return _.percent(l)},formatDuration(l){return _.formatDuration(l)},period(l){return Pe.period(l)}};F.mount(x); diff --git a/public/js/oscar/vite/dist/assets/documentsindex-15fb2a66.js b/public/js/oscar/vite/dist/assets/documentsindex-15fb2a66.js new file mode 100644 index 0000000000000000000000000000000000000000..57fa2f0d6ac5a0d465f8fa90eee140503cff267c --- /dev/null +++ b/public/js/oscar/vite/dist/assets/documentsindex-15fb2a66.js @@ -0,0 +1 @@ +import{s as b,r as D,o as r,c as l,d as e,t as u,w as p,v as k,l as g,F as T,k as F,g as d,a as h,b as S,A as x}from"../vendor.js";import{m as f}from"../vendor2.js";import{f as A}from"../vendor3.js";import{D as C}from"../vendor20.js";import{_ as N}from"../vendor7.js";import"../vendor6.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";var m=null;const V={components:{DocumentsList:C},props:{manage:{default:!1},url:{required:!0}},data(){return{documents:[],tabsWithDocuments:[],typesDocuments:[],totalDocuments:0,totalPages:0,currentPage:1,loading:!0,error:null,filterType:null,filterActivity:"",filterSign:""}},computed:{displayedPages(){},filtersTypes(){let t={};return this.typesDocuments.forEach(s=>{t[s.id]=s.label}),t},packedDocuments(){let t={};if(this.documents)for(const[s,a]of Object.entries(this.documents)){let c=a.fileName;t.hasOwnProperty(c)?t[c].versions.push(a):(a.versions=[],t[c]=a)}return t}},methods:{onResponse(t){this.tabsWithDocuments=t.data.tabsWithDocuments,this.typesDocuments=t.data.typesDocuments,this.documents=t.data.documents,this.totalPages=t.data.total_pages,this.totalDocuments=t.data.total,this.currentPage=t.data.page,this.loading=!1},fetch(t=!1,s=null){let a=this.currentPage;this.loading=!0,t?a=1:s!==null&&(a=s),b.get(this.url+"&page="+a+"&type="+this.filterType+"&sign="+this.filterSign+"&s="+this.filterActivity).then(c=>{this.onResponse(c)},c=>{this.error=c})},fetchPage(t){this.fetch(!1,t)},fetchFiltered(){this.fetch(!0,!1)},handlerInput(t){m&&clearTimeout(m),m=setTimeout(()=>{this.fetchFiltered(),clearTimeout(m)},1e3)}},mounted(){this.fetch()}},I={class:"documents-content"},R={class:"documents-pager"},W={class:"row"},w={class:"col-md-6"},z={class:"input-group"},B=e("span",{class:"input-group-addon"},[e("i",{class:"icon-cubes"}),h(" Recherche textuelle ")],-1),O={class:"col-md-3"},U={class:"input-group"},j=e("span",{class:"input-group-addon"},[e("i",{class:"icon-tag"}),h(" Type ")],-1),q=e("option",{value:"0"},"Ignorer",-1),E=["value"],L={class:"col-md-3"},M={class:"input-group"},K=e("span",{class:"input-group-addon"},[e("i",{class:"icon-edit"}),h(" Signature ")],-1),G=e("option",{value:""},"Ignorer",-1),H=e("option",{value:"1"},"Avec",-1),J=e("option",{value:"0"},"Sans",-1),Q=[G,H,J],X={"aria-label":"Page navigation"},Y={class:"pagination"},Z={key:0,class:"page-item"},$=e("span",{"aria-hidden":"true"},"««",-1),ee=[$],te={key:1,class:"page-item"},se=e("span",{"aria-hidden":"true"},"«",-1),oe=[se],ie={class:"page-item"},ne={href:"#","aria-label":"infos"},re=e("span",{"aria-hidden":"true"},"»",-1),le=[re],ae=e("span",{"aria-hidden":"true"},"»»",-1),ce=[ae],ue={key:0,class:"card card-danger"},de=e("i",{class:"icon-attention-1"},null,-1),he={key:1,class:"card text-center"},me=e("i",{class:"icon-spinner animate-spin"},null,-1),pe={key:2,class:"tab-content"};function fe(t,s,a,c,o,n){const y=D("documents-list");return r(),l("section",I,[e("div",R,u(o.filterActivity),1),e("div",W,[e("div",w,[e("div",z,[B,p(e("input",{type:"text",placeholder:"Recherche dans l'activité",class:"form-control",onInput:s[0]||(s[0]=(...i)=>n.handlerInput&&n.handlerInput(...i)),"onUpdate:modelValue":s[1]||(s[1]=i=>o.filterActivity=i)},null,544),[[k,o.filterActivity]])])]),e("div",O,[e("div",U,[j,p(e("select",{name:"filterType",id:"filterType","onUpdate:modelValue":s[2]||(s[2]=i=>o.filterType=i),class:"form-control",onChange:s[3]||(s[3]=(...i)=>n.fetchFiltered&&n.fetchFiltered(...i))},[q,(r(!0),l(T,null,F(n.filtersTypes,(i,P)=>(r(),l("option",{value:P},u(i),9,E))),256))],544),[[g,o.filterType]])])]),e("div",L,[e("div",M,[K,p(e("select",{name:"filterSign",id:"filterSign","onUpdate:modelValue":s[4]||(s[4]=i=>o.filterSign=i),class:"form-control",onChange:s[5]||(s[5]=(...i)=>n.fetchFiltered&&n.fetchFiltered(...i))},Q,544),[[g,o.filterSign]])])])]),e("nav",X,[e("ul",Y,[o.currentPage>10?(r(),l("li",Z,[e("a",{href:"#","aria-label":"Previous",onClick:s[6]||(s[6]=i=>n.fetchPage(o.currentPage-10))},ee)])):d("",!0),o.currentPage>1?(r(),l("li",te,[e("a",{href:"#","aria-label":"Previous",onClick:s[7]||(s[7]=i=>n.fetchPage(o.currentPage-1))},oe)])):d("",!0),e("li",ie,[e("a",ne,u(o.totalDocuments)+" document(s) au total / page "+u(o.currentPage)+" sur "+u(o.totalPages),1)]),e("li",null,[o.currentPagen.fetchPage(o.currentPage+1))},le)):d("",!0)]),e("li",null,[o.currentPagen.fetchPage(o.currentPage+10))},ce)):d("",!0)])])]),o.error?(r(),l("div",ue,[de,h(" "+u(o.error),1)])):d("",!0),o.loading?(r(),l("div",he,[me,h(" Chargement ici ")])):(r(),l("div",pe,[S(y,{documents:n.packedDocuments,tabs:o.tabsWithDocuments,types:o.typesDocuments,"display-button-sign":!1,"display-activity":!0,onFetch:n.fetch},null,8,["documents","tabs","types","onFetch"])]))])}const ge=N(V,[["render",fe]]);let _=document.querySelector("#documents");const v=x(ge,{url:_.dataset.url,manage:_.dataset.manage});v.config.globalProperties.$filters={timeAgo(t){return f.timeAgo(t)},date(t){return f.date(t)},dateFull(t){return f.dateFull(t)},filesize(t){return A.filesize(t)}};v.mount("#documents"); diff --git a/public/js/oscar/vite/dist/assets/documentsindex-67bba6f4.js b/public/js/oscar/vite/dist/assets/documentsindex-67bba6f4.js deleted file mode 100644 index a97d90112ca2efb98e84187f3d08d35b93653eca..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/documentsindex-67bba6f4.js +++ /dev/null @@ -1 +0,0 @@ -import{p as D,r as k,o,c as l,d as t,t as d,a as c,w as f,v as T,k as h,F,j as S,g as m,b as x,y as A}from"../vendor.js";import{m as g}from"../vendor2.js";import{f as C}from"../vendor3.js";import{D as _}from"../vendor20.js";import{_ as N}from"../vendor7.js";import"../vendor6.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";var p=null;const V={components:{DocumentsList:_},props:{manage:{default:!1},url:{required:!0}},data(){return{documents:[],tabsWithDocuments:[],typesDocuments:[],totalDocuments:0,totalPages:0,currentPage:1,loading:!0,error:null,filterType:null,filterActivity:"",filterSign:""}},computed:{displayedPages(){},filtersTypes(){let s={};return this.typesDocuments.forEach(e=>{s[e.id]=e.label}),s},packedDocuments(){let s={};if(this.documents)for(const[e,a]of Object.entries(this.documents)){let u=a.fileName;s.hasOwnProperty(u)?s[u].versions.push(a):(a.versions=[],s[u]=a)}return s}},methods:{onResponse(s){this.tabsWithDocuments=s.data.tabsWithDocuments,this.typesDocuments=s.data.typesDocuments,this.documents=s.data.documents,this.totalPages=s.data.total_pages,this.totalDocuments=s.data.total,this.currentPage=s.data.page,this.loading=!1},fetch(s=!1,e=null){let a=this.currentPage;this.loading=!0,s?a=1:e!==null&&(a=e),D.get(this.url+"&page="+a+"&type="+this.filterType+"&sign="+this.filterSign+"&s="+this.filterActivity).then(u=>{this.onResponse(u)},u=>{this.error=u})},fetchPage(s){this.fetch(!1,s)},fetchFiltered(){this.fetch(!0,!1)},handlerInput(s){p&&clearTimeout(p),p=setTimeout(()=>{this.fetchFiltered(),clearTimeout(p)},1e3)}},mounted(){this.fetch()}},I={class:"documents-content"},R={class:"documents-pager"},W={class:"row"},j={class:"col-md-6"},w={class:"input-group"},z={class:"col-md-3"},B={class:"input-group"},O=["value"],U={class:"col-md-3"},q={class:"input-group"},E={"aria-label":"Page navigation"},L={class:"pagination"},M={key:0,class:"page-item"},K={key:1,class:"page-item"},G={class:"page-item"},H={href:"#","aria-label":"infos"},J={key:0,class:"card card-danger"},Q={key:1,class:"card text-center"},X={key:2,class:"tab-content"};function Y(s,e,a,u,i,r){const P=k("documents-list");return o(),l("section",I,[t("div",R,d(i.filterActivity),1),t("div",W,[t("div",j,[t("div",w,[e[10]||(e[10]=t("span",{class:"input-group-addon"},[t("i",{class:"icon-cubes"}),c(" Recherche textuelle ")],-1)),f(t("input",{type:"text",placeholder:"Recherche dans l'activité",class:"form-control",onInput:e[0]||(e[0]=(...n)=>r.handlerInput&&r.handlerInput(...n)),"onUpdate:modelValue":e[1]||(e[1]=n=>i.filterActivity=n)},null,544),[[T,i.filterActivity]])])]),t("div",z,[t("div",B,[e[12]||(e[12]=t("span",{class:"input-group-addon"},[t("i",{class:"icon-tag"}),c(" Type ")],-1)),f(t("select",{name:"filterType",id:"filterType","onUpdate:modelValue":e[2]||(e[2]=n=>i.filterType=n),class:"form-control",onChange:e[3]||(e[3]=(...n)=>r.fetchFiltered&&r.fetchFiltered(...n))},[e[11]||(e[11]=t("option",{value:"0"},"Ignorer",-1)),(o(!0),l(F,null,S(r.filtersTypes,(n,b)=>(o(),l("option",{value:b},d(n),9,O))),256))],544),[[h,i.filterType]])])]),t("div",U,[t("div",q,[e[14]||(e[14]=t("span",{class:"input-group-addon"},[t("i",{class:"icon-edit"}),c(" Signature ")],-1)),f(t("select",{name:"filterSign",id:"filterSign","onUpdate:modelValue":e[4]||(e[4]=n=>i.filterSign=n),class:"form-control",onChange:e[5]||(e[5]=(...n)=>r.fetchFiltered&&r.fetchFiltered(...n))},e[13]||(e[13]=[t("option",{value:""},"Ignorer",-1),t("option",{value:"1"},"Avec",-1),t("option",{value:"0"},"Sans",-1)]),544),[[h,i.filterSign]])])])]),t("nav",E,[t("ul",L,[i.currentPage>10?(o(),l("li",M,[t("a",{href:"#","aria-label":"Previous",onClick:e[6]||(e[6]=n=>r.fetchPage(i.currentPage-10))},e[15]||(e[15]=[t("span",{"aria-hidden":"true"},"««",-1)]))])):m("",!0),i.currentPage>1?(o(),l("li",K,[t("a",{href:"#","aria-label":"Previous",onClick:e[7]||(e[7]=n=>r.fetchPage(i.currentPage-1))},e[16]||(e[16]=[t("span",{"aria-hidden":"true"},"«",-1)]))])):m("",!0),t("li",G,[t("a",H,d(i.totalDocuments)+" document(s) au total / page "+d(i.currentPage)+" sur "+d(i.totalPages),1)]),t("li",null,[i.currentPager.fetchPage(i.currentPage+1))},e[17]||(e[17]=[t("span",{"aria-hidden":"true"},"»",-1)]))):m("",!0)]),t("li",null,[i.currentPager.fetchPage(i.currentPage+10))},e[18]||(e[18]=[t("span",{"aria-hidden":"true"},"»»",-1)]))):m("",!0)])])]),i.error?(o(),l("div",J,[e[19]||(e[19]=t("i",{class:"icon-attention-1"},null,-1)),c(" "+d(i.error),1)])):m("",!0),i.loading?(o(),l("div",Q,e[20]||(e[20]=[t("i",{class:"icon-spinner animate-spin"},null,-1),c(" Chargement ici ")]))):(o(),l("div",X,[x(P,{documents:r.packedDocuments,tabs:i.tabsWithDocuments,types:i.typesDocuments,"display-button-sign":!1,"display-activity":!0,onFetch:r.fetch},null,8,["documents","tabs","types","onFetch"])]))])}const Z=N(V,[["render",Y]]);let v=document.querySelector("#documents");const y=A(Z,{url:v.dataset.url,manage:v.dataset.manage});y.config.globalProperties.$filters={timeAgo(s){return g.timeAgo(s)},date(s){return g.date(s)},dateFull(s){return g.dateFull(s)},filesize(s){return C.filesize(s)}};y.mount("#documents"); diff --git a/public/js/oscar/vite/dist/assets/documentsobserved-a8fe03be.js b/public/js/oscar/vite/dist/assets/documentsobserved-817c2fdd.js similarity index 76% rename from public/js/oscar/vite/dist/assets/documentsobserved-a8fe03be.js rename to public/js/oscar/vite/dist/assets/documentsobserved-817c2fdd.js index 1833201fee890eee5626d9bfb199ac67b82b037c..f3b54d95a111970c788e0ebe27302b43624b763b 100644 --- a/public/js/oscar/vite/dist/assets/documentsobserved-a8fe03be.js +++ b/public/js/oscar/vite/dist/assets/documentsobserved-817c2fdd.js @@ -1 +1 @@ -import{p as a,r as m,o as i,c as l,d as u,b as d,y as p}from"../vendor.js";import{m as t}from"../vendor2.js";import{f}from"../vendor3.js";import{D as _}from"../vendor20.js";import{_ as h}from"../vendor7.js";import"../vendor6.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";const g={components:{DocumentsList:_},props:{manage:{default:!1},url:{required:!0}},data(){return{documents:[]}},methods:{fetch(){console.log("fetch()"),a.get(this.url).then(e=>{this.documents=e.data.documents})}},mounted(){this.fetch()}},F={class:"documents-content"},b={class:"tab-content"};function v(e,D,x,z,n,r){const c=m("documents-list");return i(),l("section",F,[u("div",b,[d(c,{documents:n.documents,"display-activity":!0,onFetchall:r.fetch},null,8,["documents","onFetchall"])])])}const y=h(g,[["render",v]]);let o=document.querySelector("#documents");const s=p(y,{url:o.dataset.url,manage:o.dataset.manage});s.config.globalProperties.$filters={timeAgo(e){return t.timeAgo(e)},date(e){return t.date(e)},dateFull(e){return t.dateFull(e)},filesize(e){return f.filesize(e)}};s.mount("#documents"); +import{s as a,r as m,o as i,c as l,d as u,b as d,A as p}from"../vendor.js";import{m as t}from"../vendor2.js";import{f}from"../vendor3.js";import{D as _}from"../vendor20.js";import{_ as h}from"../vendor7.js";import"../vendor6.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";const g={components:{DocumentsList:_},props:{manage:{default:!1},url:{required:!0}},data(){return{documents:[]}},methods:{fetch(){console.log("fetch()"),a.get(this.url).then(e=>{this.documents=e.data.documents})}},mounted(){this.fetch()}},F={class:"documents-content"},b={class:"tab-content"};function v(e,D,x,y,n,r){const c=m("documents-list");return i(),l("section",F,[u("div",b,[d(c,{documents:n.documents,"display-activity":!0,onFetchall:r.fetch},null,8,["documents","onFetchall"])])])}const A=h(g,[["render",v]]);let o=document.querySelector("#documents");const s=p(A,{url:o.dataset.url,manage:o.dataset.manage});s.config.globalProperties.$filters={timeAgo(e){return t.timeAgo(e)},date(e){return t.date(e)},dateFull(e){return t.dateFull(e)},filesize(e){return f.filesize(e)}};s.mount("#documents"); diff --git a/public/js/oscar/vite/dist/assets/organizationfiche-974d2695.js b/public/js/oscar/vite/dist/assets/organizationfiche-974d2695.js deleted file mode 100644 index 5e90e3ddd5caa64b500b592ca3f87bcba82b4ee0..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/organizationfiche-974d2695.js +++ /dev/null @@ -1,2 +0,0 @@ -import{p as d,o as t,c as i,d as e,t as s,a as r,g as m,F as f,y as p}from"../vendor.js";import{_ as c}from"../vendor7.js";d.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const _={props:{entrypoint:{required:!0}},data(){return{infos:null,loading:"Initialisation"}},methods:{loadInfos(){this.loading="Chargement des données",d.get(this.entrypoint+"?a=infos").then(l=>{this.infos=l.data.infos}).finally(l=>{this.loading=""})}}},g={key:0,class:"loader"},h={key:1},y={class:"type"},v={class:"fullname"},C={title:"Code interne"},I={class:"row"},k={class:"col-md-4"},S={key:0};function x(l,n,N,w,o,a){return t(),i(f,null,[o.loading?(t(),i("div",g," Chargement ")):(t(),i("header",h,[e("h2",null,[n[1]||(n[1]=e("small",{class:"parents"}," PARENTS ICI ",-1)),e("small",y," Type: "+s(o.infos.type),1),e("div",v,[e("code",C,s(o.infos.code),1),e("strong",null,s(o.infos.shortname),1),e("em",null,s(o.infos.longname),1)])]),n[2]||(n[2]=r(" Données de la structures "))])),e("section",I,[n[4]||(n[4]=e("div",{class:"col-md-8"},[e("h3",null,"Sous-Structures"),r(" Structures / Pesonnel "),e("h3",null,"Personnel")],-1)),e("div",k,[n[3]||(n[3]=e("h3",null,"Informations",-1)),o.infos?(t(),i("pre",S," "+s(o.infos)+` - `,1)):m("",!0)])]),n[5]||(n[5]=r(" FICHE ")),e("footer",null,[e("button",{onClick:n[0]||(n[0]=(...u)=>a.loadInfos&&a.loadInfos(...u))}," Charger ")])],64)}const F=c(_,[["render",x]]);let q=document.querySelector("#organization-view");const z=p(F,{entrypoint:q.dataset.entrypoint});z.mount("#organization-view"); diff --git a/public/js/oscar/vite/dist/assets/organizationfiche-9bee7979.js b/public/js/oscar/vite/dist/assets/organizationfiche-9bee7979.js new file mode 100644 index 0000000000000000000000000000000000000000..860e162d4b159fa7cbf197984c2d103f0f3933f2 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/organizationfiche-9bee7979.js @@ -0,0 +1,2 @@ +import{s as c,o as n,c as t,d as e,t as s,a as l,g as _,F as u,A as h}from"../vendor.js";import{_ as m}from"../vendor7.js";c.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const f={props:{entrypoint:{required:!0}},data(){return{infos:null,loading:"Initialisation"}},methods:{loadInfos(){this.loading="Chargement des données",c.get(this.entrypoint+"?a=infos").then(i=>{this.infos=i.data.infos}).finally(i=>{this.loading=""})}}},p={key:0,class:"loader"},g={key:1},y=e("small",{class:"parents"}," PARENTS ICI ",-1),v={class:"type"},C={class:"fullname"},I={title:"Code interne"},k={class:"row"},S=e("div",{class:"col-md-8"},[e("h3",null,"Sous-Structures"),l(" Structures / Pesonnel "),e("h3",null,"Personnel")],-1),x={class:"col-md-4"},F=e("h3",null,"Informations",-1),q={key:0};function z(i,a,B,D,o,r){return n(),t(u,null,[o.loading?(n(),t("div",p," Chargement ")):(n(),t("header",g,[e("h2",null,[y,e("small",v," Type: "+s(o.infos.type),1),e("div",C,[e("code",I,s(o.infos.code),1),e("strong",null,s(o.infos.shortname),1),e("em",null,s(o.infos.longname),1)])]),l(" Données de la structures ")])),e("section",k,[S,e("div",x,[F,o.infos?(n(),t("pre",q," "+s(o.infos)+` + `,1)):_("",!0)])]),l(" FICHE "),e("footer",null,[e("button",{onClick:a[0]||(a[0]=(...d)=>r.loadInfos&&r.loadInfos(...d))}," Charger ")])],64)}const N=m(f,[["render",z]]);let w=document.querySelector("#organization-view");const A=h(N,{entrypoint:w.dataset.entrypoint});A.mount("#organization-view"); diff --git a/public/js/oscar/vite/dist/assets/organizations_roled-3f3c28c3.js b/public/js/oscar/vite/dist/assets/organizations_roled-fc3b4fe4.js similarity index 83% rename from public/js/oscar/vite/dist/assets/organizations_roled-3f3c28c3.js rename to public/js/oscar/vite/dist/assets/organizations_roled-fc3b4fe4.js index cab04acecb4499c4576a6fdb673722b2c6468b3a..bdd324970eb4889b10aa9d5aab58e6e80af5b62b 100644 --- a/public/js/oscar/vite/dist/assets/organizations_roled-3f3c28c3.js +++ b/public/js/oscar/vite/dist/assets/organizations_roled-fc3b4fe4.js @@ -1 +1 @@ -import{y as o}from"../vendor.js";import{E as r}from"../vendor15.js";import"../vendor6.js";import"../vendor7.js";import"../vendor17.js";import"../vendor9.js";import"../vendor5.js";import"../vendor18.js";import"../vendor16.js";import"../vendor14.js";let t=document.querySelector("#organizations_roled");const i=o(r,{url:t.dataset.url,title:t.dataset.title});i.mount("#organizations_roled"); +import{A as o}from"../vendor.js";import{E as r}from"../vendor15.js";import"../vendor6.js";import"../vendor7.js";import"../vendor17.js";import"../vendor9.js";import"../vendor5.js";import"../vendor18.js";import"../vendor16.js";import"../vendor14.js";let t=document.querySelector("#organizations_roled");const i=o(r,{url:t.dataset.url,title:t.dataset.title});i.mount("#organizations_roled"); diff --git a/public/js/oscar/vite/dist/assets/organizationsuborganizations-39797503.js b/public/js/oscar/vite/dist/assets/organizationsuborganizations-39797503.js deleted file mode 100644 index 552e05a95f21dd04a6fac8c12af440f8b4aeafa0..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/organizationsuborganizations-39797503.js +++ /dev/null @@ -1 +0,0 @@ -import{p as c,r as b,o as s,c as o,g as i,b as p,d as t,a as g,t as l,h as z,F as m,j as h,y as S}from"../vendor.js";import{O as y}from"../vendor9.js";import{O}from"../vendor21.js";import{_ as k}from"../vendor7.js";const C={props:{url:{require:!0}},components:{OrganizationAutoComplete:y,OscarDialog:O},data(){return{selectedId:null,remote:"Initialisation",error:"",organizations:[],dialogDelete:null,manage:!1,manageSubOragnization:null}},methods:{fetch(){this.remote="Chargement des sous-structures",c.get(this.url).then(r=>{this.remote="",this.organizations=r.data.organizations,this.manage=r.data.manage},r=>{this.remote="",this.error="Impossible de charger les sous-structures : "+r.response.data})},handlerNew(){this.manageSubOragnization={idOrganization:null}},handlerRemoveSubStructure(r){this.remote="Suppression de la sous-structure",this.dialogDelete={dispayed:!0,title:"Suppression de la sous-structure",message:"Retirer '"+r.label+"' des sous-structures ?",onSuccess:()=>{console.log("sub structure",r),this.remote="Suppression de la sous-structure",c.delete(this.url+"?idsubstructure="+r.id).then(e=>{this.remote="",this.fetch()},e=>{this.remote="",this.error="Impossible de supprimer la sous-structure : "+e.response.data}).finally(e=>{this.manageSubOragnization=null})}}},handlerChange(r){this.manageSubOragnization.idOrganization=r.id},handlerSave(){this.remote="Chargement des sous-structures";let r=new FormData;r.append("idSubStructure",this.manageSubOragnization.idOrganization),c.post(this.url,r).then(e=>{this.remote="",this.fetch()},e=>{this.remote="",this.error=e.response.data}).finally(e=>{this.manageSubOragnization=null})}},mounted(){this.fetch()}},N={key:0},V={key:1,class:"overlay"},w={class:"overlay-content",style:{overflow:"visible"}},x={class:"buttons-bar"},D={key:2,class:"alert alert-danger"},I={class:"suborganizations"},A={class:"card suborganization"},F={class:"card-title"},R={class:"organization-code code"},j={class:"organization-shortname"},B={class:"card-title-subsection"},q={class:"organization-longname"},E={key:0,class:"card-content"},L={key:0},M={key:1,class:"card-content suborganizations"},P={class:"card-footer buttons-bar"},T=["href"],U=["onClick"];function G(r,e,K,Q,a,d){const _=b("oscar-dialog"),v=b("organization-auto-complete");return s(),o(m,null,[a.remote?(s(),o("div",N," Chargement ")):i("",!0),p(_,{options:a.dialogDelete},null,8,["options"]),a.manageSubOragnization?(s(),o("div",V,[t("div",w,[e[7]||(e[7]=t("h2",null,"Nouvelle sous-structure",-1)),p(v,{modelValue:a.manageSubOragnization.selectedId,"onUpdate:modelValue":e[0]||(e[0]=n=>a.manageSubOragnization.selectedId=n),onChange:d.handlerChange},null,8,["modelValue","onChange"]),t("div",x,[t("button",{class:"btn btn-danger",onClick:e[1]||(e[1]=n=>a.manageSubOragnization=null)},e[5]||(e[5]=[t("i",{class:"icon-cancel-circled"},null,-1),g(" Annuler ")])),t("button",{class:"btn btn-success",onClick:e[2]||(e[2]=(...n)=>d.handlerSave&&d.handlerSave(...n))},e[6]||(e[6]=[t("i",{class:"icon-floppy"},null,-1),g(" Enregistrer ")]))])])])):i("",!0),a.error?(s(),o("div",D,[g(l(a.error)+" ",1),e[8]||(e[8]=t("hr",null,null,-1)),t("a",{href:"#",onClick:e[3]||(e[3]=z(n=>a.error="",["prevent"]))},"Fermer")])):i("",!0),t("section",I,[(s(!0),o(m,null,h(a.organizations,n=>(s(),o("article",A,[t("h2",F,[t("code",R,l(n.code),1),t("strong",j,l(n.shortname),1),t("span",B,[t("i",q,l(n.longname),1)])]),n.persons.length!=0?(s(),o("section",E,[e[10]||(e[10]=t("h4",null," Personnel ",-1)),(s(!0),o(m,null,h(n.persons,u=>(s(),o("div",null,[e[9]||(e[9]=t("i",{class:"icon-user"},null,-1)),t("strong",null,l(u.label),1),u.roles.length?(s(),o("em",L," ("+l(u.roles.join(", "))+") ",1)):i("",!0)]))),256))])):i("",!0),n.organizations.length!=0?(s(),o("section",M,[e[13]||(e[13]=t("h4",null," Sous-structure ",-1)),(s(!0),o(m,null,h(n.organizations,u=>(s(),o("div",null,[e[11]||(e[11]=t("i",{class:"icon-building"},null,-1)),t("strong",null,l(u.shortname),1),e[12]||(e[12]=g("   ")),t("em",null,l(u.longname),1)]))),256))])):i("",!0),t("nav",P,[t("a",{href:n.show,class:"btn btn-info btn-xs"},e[14]||(e[14]=[t("i",{class:"icon-link-outline"},null,-1),g(" Voir la fiche ")]),8,T),a.manage?(s(),o("a",{key:0,href:"#",class:"btn btn-danger btn-xs",onClick:z(u=>d.handlerRemoveSubStructure(n),["prevent"])},e[15]||(e[15]=[t("i",{class:"icon-trash"},null,-1),g(" Retirer ")]),8,U)):i("",!0)])]))),256))]),a.manage?(s(),o("button",{key:3,class:"btn btn-primary",onClick:e[4]||(e[4]=(...n)=>d.handlerNew&&d.handlerNew(...n))}," Ajouter une sous-structure ")):i("",!0)],64)}const H=k(C,[["render",G]]);let f=document.querySelector("#suborganizations");const J=S(H,{url:f.dataset.url,manage:f.dataset.manage});J.mount("#suborganizations"); diff --git a/public/js/oscar/vite/dist/assets/organizationsuborganizations-ff9fde48.js b/public/js/oscar/vite/dist/assets/organizationsuborganizations-ff9fde48.js new file mode 100644 index 0000000000000000000000000000000000000000..ef5da955d071e156bf5b5ab63c19986c03301f46 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/organizationsuborganizations-ff9fde48.js @@ -0,0 +1 @@ +import{s as g,r as _,o as n,c as o,g as i,b,d as e,a as d,t as l,h as p,F as h,k as m,A as S}from"../vendor.js";import{O}from"../vendor9.js";import{O as y}from"../vendor21.js";import{_ as k}from"../vendor7.js";const C={props:{url:{require:!0}},components:{OrganizationAutoComplete:O,OscarDialog:y},data(){return{selectedId:null,remote:"Initialisation",error:"",organizations:[],dialogDelete:null,manage:!1,manageSubOragnization:null}},methods:{fetch(){this.remote="Chargement des sous-structures",g.get(this.url).then(r=>{this.remote="",this.organizations=r.data.organizations,this.manage=r.data.manage},r=>{this.remote="",this.error="Impossible de charger les sous-structures : "+r.response.data})},handlerNew(){this.manageSubOragnization={idOrganization:null}},handlerRemoveSubStructure(r){this.remote="Suppression de la sous-structure",this.dialogDelete={dispayed:!0,title:"Suppression de la sous-structure",message:"Retirer '"+r.label+"' des sous-structures ?",onSuccess:()=>{console.log("sub structure",r),this.remote="Suppression de la sous-structure",g.delete(this.url+"?idsubstructure="+r.id).then(t=>{this.remote="",this.fetch()},t=>{this.remote="",this.error="Impossible de supprimer la sous-structure : "+t.response.data}).finally(t=>{this.manageSubOragnization=null})}}},handlerChange(r){this.manageSubOragnization.idOrganization=r.id},handlerSave(){this.remote="Chargement des sous-structures";let r=new FormData;r.append("idSubStructure",this.manageSubOragnization.idOrganization),g.post(this.url,r).then(t=>{this.remote="",this.fetch()},t=>{this.remote="",this.error=t.response.data}).finally(t=>{this.manageSubOragnization=null})}},mounted(){this.fetch()}},N={key:0},V={key:1,class:"overlay"},w={class:"overlay-content",style:{overflow:"visible"}},x=e("h2",null,"Nouvelle sous-structure",-1),D={class:"buttons-bar"},I=e("i",{class:"icon-cancel-circled"},null,-1),A=e("i",{class:"icon-floppy"},null,-1),F={key:2,class:"alert alert-danger"},R=e("hr",null,null,-1),B={class:"suborganizations"},j={class:"card suborganization"},q={class:"card-title"},E={class:"organization-code code"},L={class:"organization-shortname"},M={class:"card-title-subsection"},P={class:"organization-longname"},T={key:0,class:"card-content"},U=e("h4",null," Personnel ",-1),G=e("i",{class:"icon-user"},null,-1),H={key:0},J={key:1,class:"card-content suborganizations"},K=e("h4",null," Sous-structure ",-1),Q=e("i",{class:"icon-building"},null,-1),W={class:"card-footer buttons-bar"},X=["href"],Y=e("i",{class:"icon-link-outline"},null,-1),Z=["onClick"],$=e("i",{class:"icon-trash"},null,-1);function ee(r,t,ne,oe,a,c){const f=_("oscar-dialog"),v=_("organization-auto-complete");return n(),o(h,null,[a.remote?(n(),o("div",N," Chargement ")):i("",!0),b(f,{options:a.dialogDelete},null,8,["options"]),a.manageSubOragnization?(n(),o("div",V,[e("div",w,[x,b(v,{modelValue:a.manageSubOragnization.selectedId,"onUpdate:modelValue":t[0]||(t[0]=s=>a.manageSubOragnization.selectedId=s),onChange:c.handlerChange},null,8,["modelValue","onChange"]),e("div",D,[e("button",{class:"btn btn-danger",onClick:t[1]||(t[1]=s=>a.manageSubOragnization=null)},[I,d(" Annuler ")]),e("button",{class:"btn btn-success",onClick:t[2]||(t[2]=(...s)=>c.handlerSave&&c.handlerSave(...s))},[A,d(" Enregistrer ")])])])])):i("",!0),a.error?(n(),o("div",F,[d(l(a.error)+" ",1),R,e("a",{href:"#",onClick:t[3]||(t[3]=p(s=>a.error="",["prevent"]))},"Fermer")])):i("",!0),e("section",B,[(n(!0),o(h,null,m(a.organizations,s=>(n(),o("article",j,[e("h2",q,[e("code",E,l(s.code),1),e("strong",L,l(s.shortname),1),e("span",M,[e("i",P,l(s.longname),1)])]),s.persons.length!=0?(n(),o("section",T,[U,(n(!0),o(h,null,m(s.persons,u=>(n(),o("div",null,[G,e("strong",null,l(u.label),1),u.roles.length?(n(),o("em",H," ("+l(u.roles.join(", "))+") ",1)):i("",!0)]))),256))])):i("",!0),s.organizations.length!=0?(n(),o("section",J,[K,(n(!0),o(h,null,m(s.organizations,u=>(n(),o("div",null,[Q,e("strong",null,l(u.shortname),1),d("   "),e("em",null,l(u.longname),1)]))),256))])):i("",!0),e("nav",W,[e("a",{href:s.show,class:"btn btn-info btn-xs"},[Y,d(" Voir la fiche ")],8,X),a.manage?(n(),o("a",{key:0,href:"#",class:"btn btn-danger btn-xs",onClick:p(u=>c.handlerRemoveSubStructure(s),["prevent"])},[$,d(" Retirer ")],8,Z)):i("",!0)])]))),256))]),a.manage?(n(),o("button",{key:3,class:"btn btn-primary",onClick:t[4]||(t[4]=(...s)=>c.handlerNew&&c.handlerNew(...s))}," Ajouter une sous-structure ")):i("",!0)],64)}const te=k(C,[["render",ee]]);let z=document.querySelector("#suborganizations");const se=S(te,{url:z.dataset.url,manage:z.dataset.manage});se.mount("#suborganizations"); diff --git a/public/js/oscar/vite/dist/assets/oscar-css-1c3ee0fe.css b/public/js/oscar/vite/dist/assets/oscar-css-1c3ee0fe.css new file mode 100644 index 0000000000000000000000000000000000000000..9cca802a5386fc948a81cc6bd7f79322c8d3dbef --- /dev/null +++ b/public/js/oscar/vite/dist/assets/oscar-css-1c3ee0fe.css @@ -0,0 +1 @@ +body{background-color:#d2d2d2;background-blend-mode:lighten}body:not(.privatize) #btn-toggle-private .on{display:inline-block}.oscar-section{background-color:#fff}.oscar-section h3{border-bottom:solid thin #ddd;padding:.25em}.oscar-section .oscar-section-title{display:flex;align-items:center;justify-content:space-between}.oscar-section .oscar-section-content{padding:.25em}#btn-toggle-private .on,#btn-toggle-private .off{display:none}.privatize .text-private{transition:.3s;filter:blur(8px)!important}.privatize .person .text-private{filter:blur(3px)!important}.privatize #btn-toggle-private .off{display:inline-block}.cartouche.person .lastname{font-weight:600}.btn-help{font-size:.75em}.admin-bar{padding:.3em;position:relative;left:-10px;transition:all .2s linear;text-align:right;opacity:.7;filter:grayscale(.7)}.admin-bar:before{text-shadow:-1px 1px 1px rgba(0,0,0,.3);display:inline-block;padding:0 .3em 0 0;font-family:fontello;content:"\e86e";color:#eee}.admin-bar:hover{left:0;filter:grayscale(0);opacity:1}.sup-info{position:relative;border-radius:.5em;display:inline-block;padding:.2em .3em;line-height:1em;font-size:.7em;bottom:.6em}.sup-info.primary{background-color:#0a53be;color:#fff}.sup-info.neutral{background-color:#9baab2;color:#314752}.oscar-tooltip[data-v-d8bdbc35]{position:absolute;background:rgba(255,255,255,.8);box-shadow:none;color:#111;z-index:9000;width:auto;height:auto;border:solid thin #ddd;box-shadow:-2px 2px 8px #0000004d;border-radius:4px;h3[data-v-d8bdbc35] {margin: 0; padding: 0 1em 0 0; display: flex; align-items: center; background: white; img[data-v-d8bdbc35] {height: 60px; width: 60px; display: inline-block;} .fullname[data-v-d8bdbc35] {font-size: .8em; display: inline-block; line-height: 25px; .lastname[data-v-d8bdbc35] {line-height: 35px; font-size: 1.5em; display: block;}}} .content[data-v-d8bdbc35] {padding: .5em;}}.oscar-pending-fullscreen[data-v-b2829b7e]{background:rgba(255,255,255,.9);font-size:1em;position:fixed;z-index:20000;bottom:0;right:0;left:0;top:0;padding:.3em 1em;color:#333;display:flex;align-items:center;justify-content:center;.content[data-v-b2829b7e] {border: none;}}.oscar-error-fullscreen[data-v-b2829b7e]{background:rgba(255,255,255,.9);font-size:1em;position:fixed;z-index:20000;bottom:0;right:0;left:0;top:0;padding:.3em 1em;color:#333;display:flex;align-items:center;justify-content:center;.content[data-v-b2829b7e] {min-width: 50vw; max-width: 80vw; color: white; background: #b40a0a; box-shadow: 0 0 .2em rgba(0,0,0,.5); padding: 0; h3[data-v-b2829b7e] {margin: 0; border-bottom: white thin solid; font-weight: 700; padding: .3em; display: flex; span[data-v-b2829b7e] {flex: 1;} nav[data-v-b2829b7e] {flex: 0; text-align: right; a[data-v-b2829b7e] {font-size: .8em; color: white;}}} pre[data-v-b2829b7e] {padding: 0; margin: .3em 1em;}}}.oscar-pending[data-v-b2829b7e]{background:white;font-size:1em;position:fixed;z-index:10000;bottom:0;right:0;padding:.3em 1em;border-radius:8px 0 0;transition:bottom .25s ease-in-out;background:rgba(224,226,238,1);color:#333;width:25vw;height:auto}.oscar-errors[data-v-b2829b7e]{transition:bottom .25s ease-in-out;position:fixed;bottom:-30vh;left:0px;background:rgba(129,10,10,.7);color:#fff;z-index:9000;width:60vw;height:calc(30vh + 40px);.errors[data-v-b2829b7e] {height: 30vw; overflow-y: scroll;} h3[data-v-b2829b7e] {height: 40px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; margin: 0; padding: .25em 1em .25em .25em; border-bottom: solid 1px rgba(129,10,10,.7); background: rgba(129,10,10,.7); .links[data-v-b2829b7e] {display: flex; a[data-v-b2829b7e] {color: white; margin-left: 1em;}}} .errors[data-v-b2829b7e] {list-style: none; padding: .25em 1em;} .error[data-v-b2829b7e] {border-bottom: 1px solid rgba(129,10,10,1); .time[data-v-b2829b7e] {flex: 0 0; line-height: 1.8em; font-size: .75em; padding-right: 1em;} .message[data-v-b2829b7e] {flex: 1;} display: flex; justify-content: space-between; padding: .25em 1em; &[data-v-b2829b7e]:nth-child(even) {background-color: rgba(129,10,10,.5);} opacity: .7; &[data-v-b2829b7e]:hover {opacity: 1; background-color: rgba(129,10,10,1);}} &.full[data-v-b2829b7e] {bottom: 0px;}} diff --git a/public/js/oscar/vite/dist/assets/oscar-css-84bc208b.css b/public/js/oscar/vite/dist/assets/oscar-css-84bc208b.css deleted file mode 100644 index 80137f4fcc50ca23d49bcb8b35810c37b0d904e3..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/oscar-css-84bc208b.css +++ /dev/null @@ -1 +0,0 @@ -body{background-color:#d2d2d2;background-blend-mode:lighten}body:not(.privatize) #btn-toggle-private .on{display:inline-block}.oscar-section{background-color:#fff}.oscar-section h3{border-bottom:solid thin #ddd;padding:.25em}.oscar-section .oscar-section-title{display:flex;align-items:center;justify-content:space-between}.oscar-section .oscar-section-content{padding:.25em}#btn-toggle-private .on,#btn-toggle-private .off{display:none}.privatize .text-private{transition:.3s;filter:blur(8px)!important}.privatize .person .text-private{filter:blur(3px)!important}.privatize #btn-toggle-private .off{display:inline-block}.cartouche.person .lastname{font-weight:600}.btn-help{font-size:.75em}.admin-bar{padding:.3em;position:relative;left:-10px;transition:all .2s linear;text-align:right;opacity:.7;filter:grayscale(.7)}.admin-bar:before{text-shadow:-1px 1px 1px rgba(0,0,0,.3);display:inline-block;padding:0 .3em 0 0;font-family:fontello;content:"";color:#eee}.admin-bar:hover{left:0;filter:grayscale(0);opacity:1}.sup-info{position:relative;border-radius:.5em;display:inline-block;padding:.2em .3em;line-height:1em;font-size:.7em;bottom:.6em}.sup-info.primary{background-color:#0a53be;color:#fff}.sup-info.neutral{background-color:#9baab2;color:#314752}.oscar-tooltip{h3 {&[data-v-d8bdbc35] {margin: 0; padding: 0 1em 0 0; display: flex; align-items: center; background: white;} img[data-v-d8bdbc35] {height: 60px; width: 60px; display: inline-block;} .fullname {&[data-v-d8bdbc35] {font-size: .8em; display: inline-block; line-height: 25px;} .lastname[data-v-d8bdbc35] {line-height: 35px; font-size: 1.5em; display: block;}}} .content[data-v-d8bdbc35] {padding: .5em;}}.oscar-tooltip[data-v-d8bdbc35]{position:absolute;background:rgba(255,255,255,.8);box-shadow:none;color:#111;z-index:9000;width:auto;height:auto;border:solid thin #ddd;box-shadow:-2px 2px 8px #0000004d;border-radius:4px}.oscar-pending-fullscreen[data-v-b2829b7e]{background:rgba(255,255,255,.9);font-size:1em;position:fixed;z-index:20000;bottom:0;right:0;left:0;top:0;padding:.3em 1em;color:#333;display:flex;align-items:center;justify-content:center}.oscar-pending-fullscreen .content[data-v-b2829b7e]{border:none}.oscar-error-fullscreen[data-v-b2829b7e]{background:rgba(255,255,255,.9);font-size:1em;position:fixed;z-index:20000;bottom:0;right:0;left:0;top:0;padding:.3em 1em;color:#333;display:flex;align-items:center;justify-content:center}.oscar-error-fullscreen .content{h3 {&[data-v-b2829b7e] {margin: 0; border-bottom: white thin solid; font-weight: 700; padding: .3em; display: flex;} span[data-v-b2829b7e] {flex: 1;} nav {&[data-v-b2829b7e] {flex: 0; text-align: right;} a[data-v-b2829b7e] {font-size: .8em; color: white;}}} pre[data-v-b2829b7e] {padding: 0; margin: .3em 1em;}}.oscar-error-fullscreen .content[data-v-b2829b7e]{min-width:50vw;max-width:80vw;color:#fff;background:#b40a0a;box-shadow:0 0 .2em #00000080;padding:0}.oscar-pending[data-v-b2829b7e]{background:white;font-size:1em;position:fixed;z-index:10000;bottom:0;right:0;padding:.3em 1em;border-radius:8px 0 0;transition:bottom .25s ease-in-out;background:rgba(224,226,238,1);color:#333;width:25vw;height:auto}.oscar-errors{h3 {&[data-v-b2829b7e] {height: 40px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; margin: 0; padding: .25em 1em .25em .25em; border-bottom: solid 1px rgba(129,10,10,.7); background: rgba(129,10,10,.7);} .links {&[data-v-b2829b7e] {display: flex;} a[data-v-b2829b7e] {color: white; margin-left: 1em;}}} .errors[data-v-b2829b7e] {list-style: none; padding: .25em 1em;} .error {&[data-v-b2829b7e] {border-bottom: 1px solid rgba(129,10,10,1); display: flex; justify-content: space-between; padding: .25em 1em; opacity: .7;} .time[data-v-b2829b7e] {flex: 0 0; line-height: 1.8em; font-size: .75em; padding-right: 1em;} .message[data-v-b2829b7e] {flex: 1;} &[data-v-b2829b7e]:nth-child(even) {background-color: rgba(129,10,10,.5);} &[data-v-b2829b7e]:hover {opacity: 1; background-color: rgba(129,10,10,1);}} &.full[data-v-b2829b7e] {bottom: 0px;}}.oscar-errors[data-v-b2829b7e]{transition:bottom .25s ease-in-out;position:fixed;bottom:-30vh;left:0;background:rgba(129,10,10,.7);color:#fff;z-index:9000;width:60vw;height:calc(30vh + 40px)}.oscar-errors .errors[data-v-b2829b7e]{height:30vw;overflow-y:scroll} diff --git a/public/js/oscar/vite/dist/assets/oscarcss-10fdd0ac.js b/public/js/oscar/vite/dist/assets/oscarcss-10fdd0ac.js deleted file mode 100644 index cb58560f81452539f2823b53b825e409c179abf3..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/oscarcss-10fdd0ac.js +++ /dev/null @@ -1 +0,0 @@ -import{o as n,l as x,i as E,T as w,c as o,d as r,a as d,t as i,g as u,x as C,n as z,h as m,F as p,j as f,y}from"../vendor.js";import{g as a}from"../vendor16.js";import{_ as I}from"../vendor7.js";import{m as h}from"../vendor2.js";import{f as P}from"../vendor3.js";import{m as T}from"../vendor4.js";import{t as R}from"../vendor19.js";import"../vendor14.js";let v=null;const q={name:"oscar-tooltip",props:{},data(){return{inside:!1,displayed:!1}},computed:{show(){return this.display||this.inside},display(){return this.tooltipInfo?this.tooltipInfo.display:!1},x(){return this.tooltipInfo?this.tooltipInfo.x+"px":0},y(){return this.tooltipInfo?this.tooltipInfo.y+"px":0},tooltipInfo(){return a.getters.tooltipInfos}},methods:{handlerInside(){this.inside=!0},handlerOutside(){this.inside=!1}},watch:{show(){this.show?(this.displayed=!0,clearTimeout(v)):v=setTimeout(()=>{this.displayed=!1},250)}}},L={key:0},B=["src"],M={class:"fullname"},V={class:"text-private lastname"},A={class:"content"},D={key:0,class:"email"},N={class:"text-private"},O={key:1,class:"location"},j={key:2,class:"affectation"},H=["href"];function X(l,e,g,_,c,t){return n(),x(w,{name:"fade",mode:"out"},{default:E(()=>[c.displayed?(n(),o("div",{key:0,class:"oscar-tooltip",style:C({left:t.x,top:t.y}),onMouseenter:e[0]||(e[0]=(...s)=>t.handlerInside&&t.handlerInside(...s)),onMouseleave:e[1]||(e[1]=(...s)=>t.handlerOutside&&t.handlerOutside(...s))},[t.tooltipInfo&&t.tooltipInfo.type==="person"?(n(),o("div",L,[r("h3",null,[r("img",{src:"https://gravatar.com/avatar/"+t.tooltipInfo.gravatar,alt:"",width:"30",height:"30",class:"gravatar-img"},null,8,B),r("span",M,[d(i(t.tooltipInfo.firstname)+" ",1),r("strong",V,i(t.tooltipInfo.lastname),1)])]),r("div",A,[t.tooltipInfo.email?(n(),o("div",D,[e[2]||(e[2]=r("i",{class:"icon-mail"},null,-1)),r("span",N,i(t.tooltipInfo.email),1)])):u("",!0),t.tooltipInfo.location?(n(),o("div",O,[e[3]||(e[3]=r("i",{class:"icon-location"},null,-1)),d(" "+i(t.tooltipInfo.location),1)])):u("",!0),t.tooltipInfo.affectation?(n(),o("div",j,[e[4]||(e[4]=r("i",{class:"icon-building-filled"},null,-1)),d(" "+i(t.tooltipInfo.affectation),1)])):u("",!0)]),r("nav",null,[t.tooltipInfo.url_show?(n(),o("a",{key:0,class:"btn btn-default btn-xs",href:t.tooltipInfo.url_show},"Voir la fiche",8,H)):u("",!0)])])):u("",!0)],36)):u("",!0)]),_:1})}const G=I(q,[["render",X],["__scopeId","data-v-d8bdbc35"]]);const J={name:"oscar-error",props:{},data(){return{display:!0}},computed:{errors(){return a.getters.errors},pending(){return a.getters.pending},pendingFullScreen(){return a.getters.pendingFullScreen},errorFullScreen(){return a.getters.errorFullScreen}},watch:{errors(){this.display=!0},errorFullScreen(){this.display=!1}},methods:{handlerRemoveError(l){a.dispatch("removeError",l)},handlerPurge(){a.dispatch("removeErrors")},handlerReduce(){this.display=!1},handlerCloseErrorFullScreen(){a.commit("removeErrorFullScreen")}}},K={class:"label"},Q={class:"links"},U={class:"errors"},W={class:"error"},Y={class:"time"},Z={class:"message"},$=["onClick"],ee={key:1,class:"oscar-error-fullscreen"},te={class:"content"},re={key:2,class:"oscar-pending-fullscreen"},le={class:"content"},se={class:"oscar-pending"};function ne(l,e,g,_,c,t){return n(),o(p,null,[t.errors.length?(n(),o("div",{key:0,class:z(["oscar-errors",{full:c.display}]),onMouseenter:e[2]||(e[2]=s=>c.display=!0)},[r("h3",null,[r("span",K,[e[4]||(e[4]=r("i",{class:"icon-bug"},null,-1)),e[5]||(e[5]=d(" Erreurs ")),r("sup",null,i(t.errors.length),1)]),r("small",Q,[r("a",{href:"#",onClick:e[0]||(e[0]=m((...s)=>t.handlerReduce&&t.handlerReduce(...s),["prevent"]))},e[6]||(e[6]=[r("i",{class:"icon-angle-down"},null,-1),d("Réduire")])),r("a",{href:"#",onClick:e[1]||(e[1]=m((...s)=>t.handlerPurge&&t.handlerPurge(...s),["prevent"]))},e[7]||(e[7]=[r("i",{class:"icon-trash"},null,-1),d("Purger")]))])]),r("ul",U,[(n(!0),o(p,null,f(t.errors,(s,F)=>(n(),o("li",W,[r("time",Y,i(s.time),1),r("span",Z,i(s.message),1),r("i",{class:"icon-cancel-outline",onClick:ae=>t.handlerRemoveError(F)},null,8,$)]))),256))])],34)):u("",!0),t.errorFullScreen?(n(),o("div",ee,[r("div",te,[r("h3",null,[e[8]||(e[8]=r("span",null,[r("i",{class:"icon-attention-circled"}),d("Erreur")],-1)),r("nav",null,[r("a",{href:"#",onClick:e[3]||(e[3]=m((...s)=>t.handlerCloseErrorFullScreen&&t.handlerCloseErrorFullScreen(...s),["prevent"]))},"X")])]),r("pre",null,i(t.errorFullScreen),1)])])):u("",!0),t.pendingFullScreen&&t.pending&&t.pending.length?(n(),o("div",re,[r("div",le,[(n(!0),o(p,null,f(t.pending,s=>(n(),o("div",null,[e[9]||(e[9]=r("i",{class:"icon-spinner animate-spin"},null,-1)),d(" "+i(s),1)]))),256))])])):u("",!0),r("div",se,[(n(!0),o(p,null,f(t.pending,s=>(n(),o("div",null,[e[10]||(e[10]=r("i",{class:"icon-spinner animate-spin"},null,-1)),d(" "+i(s),1)]))),256))])],64)}const oe=I(J,[["render",ne],["__scopeId","data-v-b2829b7e"]]);let S=document.querySelector("#oscar-core");a.state.urlPerson=S.dataset.urlPerson;const b=y(G,{tooltip:S.dataset.tooltip=="on"}),ie=y(oe,{});b.config.globalProperties.$filters={timeAgo(l){return h.timeAgo(l)},date(l){return h.date(l)},dateFull(l){return h.dateFull(l)},filesize(l){return P.filesize(l)},money(l){return T.money(l)},log(l){return R.log(l)}};b.mount("#oscar-core");ie.mount("#oscar-errors");document.querySelector("#btn-toggle-private").addEventListener("click",l=>{l.preventDefault(),k("switch")});function k(l=null){let e=localStorage.getItem("privatize");l!==null&&(e=!document.querySelector("body").classList.contains("privatize")?"1":"0",localStorage.setItem("privatize",e)),e==="1"?document.querySelector("body").classList.add("privatize"):document.querySelector("body").classList.remove("privatize")}k(); diff --git a/public/js/oscar/vite/dist/assets/oscarcss-71927fdb.js b/public/js/oscar/vite/dist/assets/oscarcss-71927fdb.js new file mode 100644 index 0000000000000000000000000000000000000000..ee560c22bb9131bc965827368f6a585a84aefaae --- /dev/null +++ b/public/js/oscar/vite/dist/assets/oscarcss-71927fdb.js @@ -0,0 +1 @@ +import{o,m as z,j as P,T,c as n,d as t,a as d,t as a,g as c,y as R,p as S,i as b,n as q,h,F as _,k as m,A as k}from"../vendor.js";import{g as i}from"../vendor16.js";import{_ as F}from"../vendor7.js";import{m as f}from"../vendor2.js";import{f as L}from"../vendor3.js";import{m as A}from"../vendor4.js";import{t as B}from"../vendor19.js";import"../vendor14.js";let I=null;const M={name:"oscar-tooltip",props:{},data(){return{inside:!1,displayed:!1}},computed:{show(){return this.display||this.inside},display(){return this.tooltipInfo?this.tooltipInfo.display:!1},x(){return this.tooltipInfo?this.tooltipInfo.x+"px":0},y(){return this.tooltipInfo?this.tooltipInfo.y+"px":0},tooltipInfo(){return i.getters.tooltipInfos}},methods:{handlerInside(){this.inside=!0},handlerOutside(){this.inside=!1}},watch:{show(){this.show?(this.displayed=!0,clearTimeout(I)):I=setTimeout(()=>{this.displayed=!1},250)}}},g=r=>(S("data-v-d8bdbc35"),r=r(),b(),r),V={key:0},D=["src"],N={class:"fullname"},O={class:"text-private lastname"},j={class:"content"},H={key:0,class:"email"},X=g(()=>t("i",{class:"icon-mail"},null,-1)),G={class:"text-private"},J={key:1,class:"location"},K=g(()=>t("i",{class:"icon-location"},null,-1)),Q={key:2,class:"affectation"},U=g(()=>t("i",{class:"icon-building-filled"},null,-1)),W=["href"];function Y(r,s,v,y,p,e){return o(),z(T,{name:"fade",mode:"out"},{default:P(()=>[p.displayed?(o(),n("div",{key:0,class:"oscar-tooltip",style:R({left:e.x,top:e.y}),onMouseenter:s[0]||(s[0]=(...l)=>e.handlerInside&&e.handlerInside(...l)),onMouseleave:s[1]||(s[1]=(...l)=>e.handlerOutside&&e.handlerOutside(...l))},[e.tooltipInfo&&e.tooltipInfo.type==="person"?(o(),n("div",V,[t("h3",null,[t("img",{src:"https://gravatar.com/avatar/"+e.tooltipInfo.gravatar,alt:"",width:"30",height:"30",class:"gravatar-img"},null,8,D),t("span",N,[d(a(e.tooltipInfo.firstname)+" ",1),t("strong",O,a(e.tooltipInfo.lastname),1)])]),t("div",j,[e.tooltipInfo.email?(o(),n("div",H,[X,t("span",G,a(e.tooltipInfo.email),1)])):c("",!0),e.tooltipInfo.location?(o(),n("div",J,[K,d(" "+a(e.tooltipInfo.location),1)])):c("",!0),e.tooltipInfo.affectation?(o(),n("div",Q,[U,d(" "+a(e.tooltipInfo.affectation),1)])):c("",!0)]),t("nav",null,[e.tooltipInfo.url_show?(o(),n("a",{key:0,class:"btn btn-default btn-xs",href:e.tooltipInfo.url_show},"Voir la fiche",8,W)):c("",!0)])])):c("",!0)],36)):c("",!0)]),_:1})}const Z=F(M,[["render",Y],["__scopeId","data-v-d8bdbc35"]]);const $={name:"oscar-error",props:{},data(){return{display:!0}},computed:{errors(){return i.getters.errors},pending(){return i.getters.pending},pendingFullScreen(){return i.getters.pendingFullScreen},errorFullScreen(){return i.getters.errorFullScreen}},watch:{errors(){this.display=!0},errorFullScreen(){this.display=!1}},methods:{handlerRemoveError(r){i.dispatch("removeError",r)},handlerPurge(){i.dispatch("removeErrors")},handlerReduce(){this.display=!1},handlerCloseErrorFullScreen(){i.commit("removeErrorFullScreen")}}},u=r=>(S("data-v-b2829b7e"),r=r(),b(),r),ee={class:"label"},te=u(()=>t("i",{class:"icon-bug"},null,-1)),re={class:"links"},se=u(()=>t("i",{class:"icon-angle-down"},null,-1)),le=u(()=>t("i",{class:"icon-trash"},null,-1)),oe={class:"errors"},ne={class:"error"},ae={class:"time"},ie={class:"message"},ce=["onClick"],de={key:1,class:"oscar-error-fullscreen"},ue={class:"content"},pe=u(()=>t("span",null,[t("i",{class:"icon-attention-circled"}),d("Erreur")],-1)),_e={key:2,class:"oscar-pending-fullscreen"},he={class:"content"},me=u(()=>t("i",{class:"icon-spinner animate-spin"},null,-1)),fe={class:"oscar-pending"},ge=u(()=>t("i",{class:"icon-spinner animate-spin"},null,-1));function ve(r,s,v,y,p,e){return o(),n(_,null,[e.errors.length?(o(),n("div",{key:0,class:q(["oscar-errors",{full:p.display}]),onMouseenter:s[2]||(s[2]=l=>p.display=!0)},[t("h3",null,[t("span",ee,[te,d(" Erreurs "),t("sup",null,a(e.errors.length),1)]),t("small",re,[t("a",{href:"#",onClick:s[0]||(s[0]=h((...l)=>e.handlerReduce&&e.handlerReduce(...l),["prevent"]))},[se,d("Réduire")]),t("a",{href:"#",onClick:s[1]||(s[1]=h((...l)=>e.handlerPurge&&e.handlerPurge(...l),["prevent"]))},[le,d("Purger")])])]),t("ul",oe,[(o(!0),n(_,null,m(e.errors,(l,C)=>(o(),n("li",ne,[t("time",ae,a(l.time),1),t("span",ie,a(l.message),1),t("i",{class:"icon-cancel-outline",onClick:Se=>e.handlerRemoveError(C)},null,8,ce)]))),256))])],34)):c("",!0),e.errorFullScreen?(o(),n("div",de,[t("div",ue,[t("h3",null,[pe,t("nav",null,[t("a",{href:"#",onClick:s[3]||(s[3]=h((...l)=>e.handlerCloseErrorFullScreen&&e.handlerCloseErrorFullScreen(...l),["prevent"]))},"X")])]),t("pre",null,a(e.errorFullScreen),1)])])):c("",!0),e.pendingFullScreen&&e.pending&&e.pending.length?(o(),n("div",_e,[t("div",he,[(o(!0),n(_,null,m(e.pending,l=>(o(),n("div",null,[me,d(" "+a(l),1)]))),256))])])):c("",!0),t("div",fe,[(o(!0),n(_,null,m(e.pending,l=>(o(),n("div",null,[ge,d(" "+a(l),1)]))),256))])],64)}const ye=F($,[["render",ve],["__scopeId","data-v-b2829b7e"]]);let x=document.querySelector("#oscar-core");i.state.urlPerson=x.dataset.urlPerson;const w=k(Z,{tooltip:x.dataset.tooltip=="on"}),Ie=k(ye,{});w.config.globalProperties.$filters={timeAgo(r){return f.timeAgo(r)},date(r){return f.date(r)},dateFull(r){return f.dateFull(r)},filesize(r){return L.filesize(r)},money(r){return A.money(r)},log(r){return B.log(r)}};w.mount("#oscar-core");Ie.mount("#oscar-errors");document.querySelector("#btn-toggle-private").addEventListener("click",r=>{r.preventDefault(),E("switch")});function E(r=null){let s=localStorage.getItem("privatize");r!==null&&(s=!document.querySelector("body").classList.contains("privatize")?"1":"0",localStorage.setItem("privatize",s)),s==="1"?document.querySelector("body").classList.add("privatize"):document.querySelector("body").classList.remove("privatize")}E(); diff --git a/public/js/oscar/vite/dist/assets/pcrutransmissions-cbfcb0fa.js b/public/js/oscar/vite/dist/assets/pcrutransmissions-cbfcb0fa.js new file mode 100644 index 0000000000000000000000000000000000000000..0052ef144ea89eb8318973bebf1e07a3db7e669e --- /dev/null +++ b/public/js/oscar/vite/dist/assets/pcrutransmissions-cbfcb0fa.js @@ -0,0 +1 @@ +import{s as m,r as h,o as s,c as r,b as _,j as f,d as e,g as n,F as d,k as p,h as R,a as c,t as l,A as k}from"../vendor.js";import{A as g}from"../vendor14.js";import{L as C}from"../vendor17.js";import{M as U}from"../vendor5.js";import{_ as w}from"../vendor7.js";m.defaults.headers.common.Accept="application/json";m.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const x={name:"PcruTransmissions",components:{Loader:C,Modal:U},props:{urlPcruApi:{required:!0}},computed:{},data(){return{loading:"",error:null,transmissions:[],logs:[]}},methods:{formatDate(a){return new Intl.DateTimeFormat(void 0,{dateStyle:"short",timeStyle:"medium"}).format(Date.parse(a))},transferer(){this.loading="Transfert vers PCRU",m.post(this.urlPcruApi,{action:"transferer"}).then(a=>{this.fetch()},a=>{const o=g.manageErrorResponse(a);o.message&&o.message.logs&&o.message.logs.constructor===Array&&o.message.logs.length>0?(this.error=o.message.logs[o.message.logs.length-1],this.fetch()):this.error=o.message}).finally(()=>{this.loading=""})},fetch(){this.loading="Chargement des informations de l'activité",m.get(this.urlPcruApi+"?action=transmissions-pcru").then(a=>{this.transmissions=a.data.transmissionsPcru,this.logs=a.data.logs},a=>{this.error=g.manageErrorResponse(a).message}).finally(a=>{this.loading=""})}},mounted(){this.fetch()}},A={class:"alert alert-danger"},q=e("h1",null,"Activités ayant activé la transmission PCRU",-1),D={class:"info",style:{padding:"1em"}},E={key:0},j={key:1},S=e("p",null,[c("Pour activer le processus PCRU d'une activité, rendez-vous sur la fiche activité, puis dans l'encart PCRU, cliquez sur "),e("b",null,"informations PCRU"),c(", une fois dans le récapitulatif des informations, cliquez sur "),e("b",null,"Activer l'envoi à PCRU pour cette activité")],-1),T=e("p",null,"Les activités de plus de 6 mois dont la bonne intégration a été confirmée par PCRU n'apparaissent pas.",-1),F={key:0,style:{background:"white","margin-top":"1em",width:"100%"}},L=e("thead",{style:{background:"#e2e4e6"}},[e("tr",null,[e("th",{scope:"col"},"Activité"),e("th",{scope:"col",style:{"max-width":"20em"}},"Description"),e("th",{scope:"col"},"Statut"),e("th",{scope:"col"},"Dernière mise à jour")])],-1),M={scope:"row"},N=["href"],V={style:{"max-width":"20em"}},z={key:0,class:"warning button"},B={key:1,class:"info button"},H={key:2,class:"error button"},I=["href"],K={key:3,class:"error button"},O={key:4,class:"success button"},X={key:5,class:"success button"},W={key:6,class:"warning button"},G={key:7,class:"success button"},J={key:8,class:"error button"},Q=["href"],Y={style:{"margin-top":"1em",width:"100%",display:"flex","justify-content":"space-between","flex-wrap":"wrap",gap:"1em"}},Z=e("div",null,[e("p",null,"Télécharger les documents pour ensuite les téléverser manuellement sur le site web PCRU :"),e("a",{class:"btn btn-primary",href:"/pcru/telecharger?status=jamais-envoyee"},"📥 Uniquement les activités en attente d'envoi"),c(),e("br"),e("a",{class:"btn btn-primary",style:{"margin-top":"1em"},href:"/pcru/telecharger"},"🗃 L'intégralité des activités")],-1),$=e("input",{class:"btn btn-primary",type:"submit",value:"🔁 Déclencher un échange avec le serveur SFTP PCRU (envoi des activités en attente et relève des réponses de PCRU)"},null,-1),ee=[$],te=e("h2",null,"Historique des échanges",-1),se=e("p",null,"Seuls les échanges ayant eu lieu au cours des 6 derniers mois sont affichés.",-1),re={style:{background:"white","padding-top":"1em","padding-bottom":"1em"}},ne={style:{"margin-top":"0.5em"}},oe={style:{display:"flex"}},ae={key:0,class:"error button",style:{"margin-left":"1em"}},ie={key:1,class:"success button",style:{"margin-left":"1em"}},le={style:{"margin-left":"1em"}},ue={style:{display:"list-item",cursor:"pointer"}};function ce(a,o,he,_e,i,u){const v=h("loader"),b=h("modal");return s(),r(d,null,[_(v,{text:i.loading,visible:i.loading!=""},null,8,["text","visible"]),_(b,{title:"Une erreur est survenue","title-icon":"icon-bug",visible:i.error!=null},{buttons:f(()=>[e("button",{class:"btn btn-default",onClick:o[0]||(o[0]=t=>i.error=null)},"FERMER")]),default:f(()=>[e("div",A,l(i.error),1)]),_:1},8,["visible"]),q,e("div",D,[i.transmissions.length?(s(),r("p",E,"Les activités présentes dans cet écran sont soumises à un processus PCRU.")):n("",!0),i.transmissions.length?n("",!0):(s(),r("p",j,"Aucun activité n'a activé la transmission PCRU.")),S]),T,i.transmissions.length?(s(),r("table",F,[L,e("tbody",null,[(s(!0),r(d,null,p(i.transmissions,t=>(s(),r("tr",null,[e("th",M,[e("a",{href:t.activityUrl},l(t.label),9,N)]),e("td",V,l(t.description),1),e("td",null,[t.status=="jamais-envoyee"?(s(),r("span",z,"Encore jamais envoyée")):n("",!0),t.status=="jamais-envoyee"&&!t.enErreur?(s(),r("span",B,"Sera transmise lors du prochain envoi")):n("",!0),t.status=="jamais-envoyee"&&t.enErreur?(s(),r("span",H,[c("Ne sera pas envoyée tant qu'elle contiendra des "),e("a",{href:t.activityPcruUrl},"erreurs",8,I)])):n("",!0),t.status=="jamais-envoyee"&&t.fichierContratManquant?(s(),r("span",K,"Fichier contrat manquant")):n("",!0),t.status=="envoyee-attente-retour-pcru"?(s(),r("span",O,"Envoyée le "+l(u.formatDate(t.datepremierdepot))+", attente retour PCRU",1)):n("",!0),t.status=="retour-pcru-ok"?(s(),r("span",X,"Retour PCRU : OK")):n("",!0),t.status=="retour-pcru-ok-mais-fichier-manquant"?(s(),r("span",W,"Retour PCRU : OK mais fichier contrat manquant")):n("",!0),t.dateenvoifichiercontrat?(s(),r("span",G,"Fichier contrat envoyé")):n("",!0),t.status=="retour-pcru-erreurs"?(s(),r("span",J,[c("Retour PCRU "),e("a",{href:t.activityPcruUrl},"ERREURS",8,Q)])):n("",!0)]),e("td",null,l(u.formatDate(t.dateupdated)),1)]))),256))])])):n("",!0),e("div",Y,[Z,e("form",{onSubmit:o[1]||(o[1]=R((...t)=>u.transferer&&u.transferer(...t),["prevent"]))},ee,32)]),te,se,e("div",re,[e("ul",null,[(s(!0),r(d,null,p(i.logs,t=>(s(),r("li",ne,[e("div",oe,[e("span",null,l(u.formatDate(t.createdat)),1),t.status=="erreur"?(s(),r("span",ae,l(t.status),1)):n("",!0),t.status=="succès"?(s(),r("span",ie,l(t.status),1)):n("",!0),e("details",le,[e("summary",ue,l(t.titre),1),e("p",null,[e("ul",null,[(s(!0),r(d,null,p(t.details.split(/\r?\n/),P=>(s(),r("li",null,l(P),1))),256))])])])])]))),256))])])],64)}const de=w(x,[["render",ce]]);let y="#pcru-transmissions",me=document.querySelector(y);const pe=k(de,{"url-pcru-api":me.dataset.urlPcruApi});pe.mount(y); diff --git a/public/js/oscar/vite/dist/assets/persons_roled-a64a3a69.js b/public/js/oscar/vite/dist/assets/persons_roled-8fe5f491.js similarity index 83% rename from public/js/oscar/vite/dist/assets/persons_roled-a64a3a69.js rename to public/js/oscar/vite/dist/assets/persons_roled-8fe5f491.js index c8f034ff38fe47d9c471d053e93cffb2e2ee6657..fef9efc88cd6fc9c36fcc7527d01e35c11159395 100644 --- a/public/js/oscar/vite/dist/assets/persons_roled-a64a3a69.js +++ b/public/js/oscar/vite/dist/assets/persons_roled-8fe5f491.js @@ -1 +1 @@ -import{y as o}from"../vendor.js";import{E as r}from"../vendor15.js";import"../vendor6.js";import"../vendor7.js";import"../vendor17.js";import"../vendor9.js";import"../vendor5.js";import"../vendor18.js";import"../vendor16.js";import"../vendor14.js";let t=document.querySelector("#persons_roled");const e=o(r,{url:t.dataset.url,title:t.dataset.title});e.mount("#persons_roled"); +import{A as o}from"../vendor.js";import{E as r}from"../vendor15.js";import"../vendor6.js";import"../vendor7.js";import"../vendor17.js";import"../vendor9.js";import"../vendor5.js";import"../vendor18.js";import"../vendor16.js";import"../vendor14.js";let t=document.querySelector("#persons_roled");const e=o(r,{url:t.dataset.url,title:t.dataset.title});e.mount("#persons_roled"); diff --git a/public/js/oscar/vite/dist/assets/sticky-43d0d9fa.js b/public/js/oscar/vite/dist/assets/sticky-43d0d9fa.js new file mode 100644 index 0000000000000000000000000000000000000000..20922951acfa2a8e3c3e6fe8bfc80c285ed480e1 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/sticky-43d0d9fa.js @@ -0,0 +1 @@ +import{o,c,d as e,F as l,k as d,t as r,g as h,a as u,A as y}from"../vendor.js";import{_ as k}from"../vendor7.js";const i="activities_sticky",p={name:"Sticky",computed:{storage(){return localStorage.getItem(i)},isSticky(){return this.sticky.find(t=>t.id==this.activity.infos.id)}},data(){return{sticky:[]}},methods:{handlerPurgeSticky(){this.sticky=[],localStorage.removeItem(i)},toogleSticky(){this.isSticky?this.handlerUnSticky():this.handlerSticky()},handlerUnSticky(){this.sticky.forEach((t,a)=>{t.id==this.activity.infos.id&&this.sticky.splice(a,1)}),localStorage.setItem(i,JSON.stringify(this.sticky))},handlerSticky(){this.sticky.push({id:this.activity.infos.id,label:this.activity.infos.label,num:this.activity.infos.numOscar,location:document.location.href}),localStorage.setItem(i,JSON.stringify(this.sticky))},handlerNavigateSticky(t){t.location&&(document.location=t.location)}},mounted(){let t=localStorage.getItem(i);t?t=JSON.parse(t):t=[],this.sticky=t}},m={key:0,class:"btn-group"},f=e("button",{type:"button",class:"btn btn-default dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[e("i",{class:"icon-cube"}),u(" Accès rapide "),e("span",{class:"caret"})],-1),g={class:"dropdown-menu"},_=["href"],S=e("i",{class:"icon-cube"},null,-1),b=e("i",{class:"icon-link-ext"},null,-1);function v(t,a,I,O,n,w){return n.sticky.length?(o(),c("span",m,[f,e("ul",g,[(o(!0),c(l,null,d(n.sticky,s=>(o(),c("li",null,[e("a",{href:s.location},[S,e("strong",null,r(s.num),1),e("em",null,r(s.label),1),b],8,_)]))),256))])])):h("",!0)}const N=k(p,[["render",v]]);document.querySelector("#sticky");const x=y(N,{});x.mount("#sticky"); diff --git a/public/js/oscar/vite/dist/assets/sticky-f851c7f2.js b/public/js/oscar/vite/dist/assets/sticky-f851c7f2.js deleted file mode 100644 index 030a22ca14994ed7123803a88176178c8bb5ddaf..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/sticky-f851c7f2.js +++ /dev/null @@ -1 +0,0 @@ -import{o as n,c as a,d as i,a as l,F as d,j as y,t as r,g as u,y as k}from"../vendor.js";import{_ as p}from"../vendor7.js";const s="activities_sticky",h={name:"Sticky",computed:{storage(){return localStorage.getItem(s)},isSticky(){return this.sticky.find(t=>t.id==this.activity.infos.id)}},data(){return{sticky:[]}},methods:{handlerPurgeSticky(){this.sticky=[],localStorage.removeItem(s)},toogleSticky(){this.isSticky?this.handlerUnSticky():this.handlerSticky()},handlerUnSticky(){this.sticky.forEach((t,e)=>{t.id==this.activity.infos.id&&this.sticky.splice(e,1)}),localStorage.setItem(s,JSON.stringify(this.sticky))},handlerSticky(){this.sticky.push({id:this.activity.infos.id,label:this.activity.infos.label,num:this.activity.infos.numOscar,location:document.location.href}),localStorage.setItem(s,JSON.stringify(this.sticky))},handlerNavigateSticky(t){t.location&&(document.location=t.location)}},mounted(){let t=localStorage.getItem(s);t?t=JSON.parse(t):t=[],this.sticky=t}},m={key:0,class:"btn-group"},f={class:"dropdown-menu"},g=["href"];function S(t,e,v,N,c,x){return c.sticky.length?(n(),a("span",m,[e[2]||(e[2]=i("button",{type:"button",class:"btn btn-default dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[i("i",{class:"icon-cube"}),l(" Accès rapide "),i("span",{class:"caret"})],-1)),i("ul",f,[(n(!0),a(d,null,y(c.sticky,o=>(n(),a("li",null,[i("a",{href:o.location},[e[0]||(e[0]=i("i",{class:"icon-cube"},null,-1)),i("strong",null,r(o.num),1),i("em",null,r(o.label),1),e[1]||(e[1]=i("i",{class:"icon-link-ext"},null,-1))],8,g)]))),256))])])):u("",!0)}const _=p(h,[["render",S]]);document.querySelector("#sticky");const b=k(_,{});b.mount("#sticky"); diff --git a/public/js/oscar/vite/dist/assets/timesheetdeclarations-7cf9abf1.js b/public/js/oscar/vite/dist/assets/timesheetdeclarations-7cf9abf1.js new file mode 100644 index 0000000000000000000000000000000000000000..ec683e65c101b66a0b47b3e1aadb95ff491a1458 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/timesheetdeclarations-7cf9abf1.js @@ -0,0 +1,2 @@ +import{o as i,c as r,d as e,t as c,a as d,g as _,F as f,k as p,n as m,y as z,p as Y,i as A,h as k,r as w,w as C,u as L,b as D,m as H,s as K,q as E,j as V,T as I,v as S,A as X}from"../vendor.js";import{_ as M}from"../vendor7.js";import{A as W}from"../vendor8.js";import{m as q}from"../vendor2.js";import{f as G}from"../vendor3.js";import{m as Q}from"../vendor4.js";import"../vendor14.js";import"../vendor16.js";const Z={name:"TimesheetMonthDay",props:{others:{required:!0},day:{required:!0},projectscolors:{required:!0,default:null}},data(){return{colors:["#093b8c","#098c29","#8c2109","#4c098c","#8c0971","#8c6f09"]}},filters:{duration(t){let s=Math.floor(t),o=Math.round((t-s)*60);return o<10&&(o="0"+o),s+":"+o}},computed:{groupProject(){let t={};return this.day.declarations&&this.day.declarations.forEach(s=>{t.hasOwnProperty(s.acronym)||(t[s.acronym]={label:s.label,acronym:s.acronym,duration:0,status_id:s.status_id,color:this.getProjectColor(s.acronym)}),t[s.acronym].duration+=s.duration}),t}},methods:{getProjectColor(t){return this.projectscolors&&this.projectscolors.hasOwnProperty(t)?this.projectscolors[t]:"#8c0971"},totalOther(t){let s=0;return this.day[t].forEach(o=>{s+=o.duration}),s},handlerClick(){this.$emit("selectDay",this.day)},handlerRightClick(t){this.$emit("daymenu",t,this.day)}}},N=t=>(Y("data-v-45fb2e96"),t=t(),A(),t),$={class:"label"},ee={key:0,class:"text-danger"},te=N(()=>e("i",{class:"icon-attention"},null,-1)),se=["title"],le={key:0,class:"icon-draft"},ne={class:"addon"},oe={key:0,class:"icon-draft"},ie={class:"addon"},ae=["title"],re=N(()=>e("i",{class:"icon-minus-circled"},null,-1)),ce=["title"],de=N(()=>e("i",{class:"icon-lock"},null,-1));function ue(t,s,o,h,l,a){return i(),r("div",{class:m(["day",{locked:o.day.locked,error:o.day.total>o.day.maxLength}]),onClick:s[0]||(s[0]=(...u)=>a.handlerClick&&a.handlerClick(...u))},[e("span",$,c(o.day.i),1),o.day.total>o.day.maxLength?(i(),r("span",ee,[te,d(" Erreur ")])):_("",!0),(i(!0),r(f,null,p(a.groupProject,u=>(i(),r("span",{class:"cartouche wp xs",title:u.label,style:z({"background-color":u.color})},[u.status_id==null?(i(),r("i",le)):(i(),r("i",{key:1,class:m("icon-"+u.status_id)},null,2)),d(" "+c(u.acronym)+" ",1),e("span",ne,c(t.$filters.duration2(u.duration,o.day.dayLength)),1)],12,se))),256)),e("span",null,[(i(!0),r(f,null,p(o.day.othersWP,u=>(i(),r("span",{class:m(["cartouche xs",u.code])},[u.validations==null?(i(),r("i",oe)):(i(),r("i",{key:1,class:m("icon-"+u.status_id)},null,2)),d(" "+c(u.label)+" ",1),e("span",ie,c(t.$filters.duration2(u.duration,o.day.dayLength)),1)],2))),256))]),o.day.closed?(i(),r("span",{key:1,title:o.day.lockedReason,style:{"font-size":".7em"}},[re,d(" Fermé ")],8,ae)):o.day.locked?(i(),r("span",{key:2,title:o.day.lockedReason,style:{"font-size":".7em"}},[de,d(" Verrouillé ")],8,ce)):_("",!0),d("   ")],2)}const he=M(Z,[["render",ue],["__scopeId","data-v-45fb2e96"]]);const _e={props:{workpackages:{default:[]},selection:{required:!0},others:{required:!0},usevalidation:{default:!1}},data(){return{showSelector:!1,selection:null}},computed:{hasSelected(){return this.selection!=null},selectedCode(){return this.selection?this.selection.code:""},selectedLabel(){return this.selection?this.selection.label:""},selectedIcon(){return this.selection&&this.selection.icon?this.selection.code:""},selectedDescription(){return this.selection?this.selection.description:""}},methods:{handlerSelectWP(t){this.selection=t,this.usevalidation||this.handlerValidSelection()},handlerValidSelection(){this.selection&&(this.showSelector=!1,this.$emit("select",this.selection))},handlerSelectOther(t){console.log("selection",t),this.selection=t,this.usevalidation||this.handlerValidSelection()}}},x=t=>(Y("data-v-c5ac47ec"),t=t(),A(),t),me={key:0,class:"overlay"},ye={class:"overlay-content"},fe=x(()=>e("p",null,"Choisissez un type de créneau : ",-1)),pe={class:"row"},ke={class:"col-md-6"},ve=x(()=>e("h3",null,[e("i",{class:"icon-cube"}),d(" Activités")],-1)),ge=["onClick"],be=["title"],Pe=x(()=>e("i",{class:"icon-cube"},null,-1)),Ce=["title"],De={class:"workpackage-infos"},We={class:"code"},je={class:"workpackage-label"},we={class:"col-md-6"},Me=x(()=>e("h3",null,"Hors activité (Hors-lot)",-1)),xe=["onClick"],Ee={class:"project-acronym"},Se={class:"workpackage-infos"},Le={class:"dropdown"},Te={key:0,class:"info"},Oe=x(()=>e("br",null,null,-1)),Ve={class:"text-light"},Ie={key:1,class:"info"},qe=x(()=>e("span",{class:"caret"},null,-1));function ze(t,s,o,h,l,a){return i(),r("div",null,[l.showSelector?(i(),r("div",me,[e("div",ye,[fe,e("div",pe,[e("div",ke,[ve,(i(!0),r(f,null,p(o.workpackages,u=>(i(),r("article",{class:m(["timesheet-item",{selected:l.selection&&l.selection.id==u.id,disabled:!u.validation_up}]),onClick:k(g=>a.handlerSelectWP(u),["prevent"])},[e("abbr",{title:t.project,class:"project-acronym"},[Pe,d(" "+c(u.acronym),1)],8,be),e("span",{class:"activity-label",title:u.activity},c(t.$filters.strReduce(u.activity)),9,Ce),e("strong",De,[e("span",We,c(u.code),1),e("small",je,c(u.label),1)])],10,ge))),256))]),e("div",we,[Me,(i(!0),r(f,null,p(o.others,u=>(i(),r("article",{class:m(["timesheet-item horslots-item",{selected:l.selection==u,disabled:!u.validation_up}]),onClick:k(g=>a.handlerSelectOther(u),["prevent"])},[e("span",Ee,[e("i",{class:m("icon-"+u.code)},null,2),d(" "+c(u.label),1)]),e("small",Se,c(u.description),1)],10,xe))),256))])]),e("nav",null,[e("button",{class:"btn btn-default",onClick:s[0]||(s[0]=u=>l.showSelector=!1)},"Annuler"),o.usevalidation?(i(),r("button",{key:0,class:m(["btn btn-primary",l.selection?"":"disabled"]),onClick:s[1]||(s[1]=u=>a.handlerValidSelection())},"Valider ",2)):_("",!0)])])])):_("",!0),e("div",Le,[e("button",{class:"btn-lg btn btn-default dropdown-toggle",type:"button",onClick:s[2]||(s[2]=k(u=>l.showSelector=!0,["prevent"]))},[a.hasSelected?(i(),r("span",Te,[e("i",{class:m(a.selectedIcon?"icon-"+a.selectedIcon:"icon-archive")},null,2),e("strong",null,c(a.selectedCode),1),d(),e("em",null,c(t.$filters.strReduce(a.selectedLabel)),1),Oe,e("small",Ve,c(t.$filters.strReduce(a.selectedDescription)),1)])):(i(),r("em",Ie,"Lot de travail/Activité...")),qe])])])}const R=M(_e,[["render",ze],["__scopeId","data-v-c5ac47ec"]]),He={name:"TimesheetMonthDeclarationItem",props:{d:{required:!0},dayLength:{required:!0}}},Ye={class:"infos"},Ae=e("i",{class:"icon-archive"},null,-1),Ne=["title"],Ue=e("i",{class:"icon-angle-right"},null,-1),Re=["title"],Fe=e("br",null,null,-1),Je=e("i",{class:"icon-cubes"},null,-1),Be={class:"status"},Ke={key:0,class:"text-danger"},Xe={class:"total"},Ge={class:"left buttons-icon"};function Qe(t,s,o,h,l,a){return i(),r("article",{class:m(["card card-xs xs wp-duration","status-"+o.d.status_id])},[e("span",Ye,[e("strong",null,[Ae,e("abbr",{title:o.d.project},c(o.d.acronym),9,Ne),Ue,d(" "+c(o.d.wpCode)+" ",1),e("i",{class:m(["icon-comment",o.d.comment?"with-comment":""]),title:o.d.comment},null,10,Re)]),Fe,e("small",null,[Je,d(" "+c(o.d.label),1)]),e("div",Be,[e("i",{class:m("icon-"+o.d.status_id)},null,2),d(" "+c(t.$filters.statusLabel(o.d.status_id))+" ",1),o.d.validations.conflict?(i(),r("span",Ke,c(o.d.validations.conflict),1)):_("",!0)])]),e("div",Xe,c(t.$filters.duration2(o.d.duration)),1),e("div",Ge,[e("i",{class:m(["icon-trash",o.d.credentials.deletable!=!0?"disabled":""]),onClick:s[0]||(s[0]=u=>t.$emit("removetimesheet",o.d))},null,2),e("i",{class:m(["icon-edit",o.d.credentials.editable!=!0?"disabled":""]),onClick:s[1]||(s[1]=u=>t.$emit("edittimesheet",o.d))},null,2)])],2)}const Ze=M(He,[["render",Qe]]);const $e={name:"TimesheetMonthDayDetails",components:{wpselector:R,day:Ze},props:{workPackages:{require:!0},others:{require:!0},editable:{required:!0},day:{require:!0},selection:{require:!0},label:{require:!0},dayExcess:{require:!0},copiable:{default:null}},data(){return{formAdd:!1,debug:!1}},computed:{isExceed(){return this.total>this.day.dayLength},totalWP(){let t=0;return this.day.declarations.forEach(s=>{t+=s.duration}),t},totalHWP(){let t=0;return this.day.othersWP&&this.day.othersWP.forEach(s=>{t+=s.duration}),t},totalJour(){return this.totalWP+this.totalHWP},enseignements(){let t=0;return this.day.teaching.forEach(s=>{t+=s.duration}),t},abs(){let t=0;return this.day.vacations.forEach(s=>{t+=s.duration}),t},learn(){let t=0;return this.day.training.forEach(s=>{t+=s.duration}),t},other(){let t=0;return this.day.infos.forEach(s=>{t+=s.duration}),t},sickleave(){let t=0;return this.day.sickleave.forEach(s=>{t+=s.sickleave}),t},research(){let t=0;return this.day.research.forEach(s=>{t+=s.research}),t}},methods:{addToWorkpackage(t){this.$emit("addtowp",t)},hasDeclarationHWP(t){return this.day[t]&&this.day[t].length},duration2(t){return"duration2: "+t}}},et={class:"text"},tt=e("i",{class:"icon-calendar"},null,-1),st={class:"right-menu"},lt=e("i",{class:"icon-docs"},null,-1),nt=[lt],ot=e("i",{class:"icon-paste"},null,-1),it=[ot],at=e("i",{class:"icon-angle-left"},null,-1),rt={class:"alert alert-danger"},ct=e("i",{class:"icon-attention"},null,-1),dt={class:"alert alert-danger"},ut=e("i",{class:"icon-attention"},null,-1),ht=e("strong",null,"excède la durée autorisée",-1),_t={key:0},mt=e("h3",null,[e("i",{class:"icon-archive"}),d(" Heures identifiées sur des lots")],-1),yt={class:"wp-duration card xs"},ft=e("span",null,[e("strong",null,[e("i",{class:"icon-archive"}),d(" Total"),e("br"),e("small",null,"sur les lot de travail")])],-1),pt={class:"total"},kt={class:"text-large text-xl"},vt=e("div",{class:"left"},null,-1),gt=e("hr",null,null,-1),bt={key:1,class:"othersWP"},Pt=e("h3",null,[e("i",{class:"icon-tags"}),d(" Heures Hors-Lots")],-1),Ct={class:"wp-duration card xs"},Dt=e("br",null,null,-1),Wt={class:"total"},jt={class:"left buttons-icon"},wt=["onClick"],Mt=["onClick"],xt=e("hr",null,null,-1),Et={class:"wp-duration card xl"},St=e("strong",null,[d(" Total de la journée"),e("br")],-1),Lt={class:"total"};function Tt(t,s,o,h,l,a){const u=w("wpselector"),g=w("day");return i(),r("div",{class:m(["day-details",{locked:o.day.locked}])},[e("h3",{onClick:s[2]||(s[2]=k(v=>t.$emit("debug",o.day),["stop","prevent","shift"])),class:"title-with-menu"},[e("div",et,[tt,d(),e("strong",null,c(o.label),1)]),e("nav",st,[C(e("a",{href:"#",onClick:s[0]||(s[0]=k(v=>t.$emit("copy",o.day),["prevent"])),title:"Copier les créneaux"},nt,512),[[L,o.day.othersWP||o.day.declarations.length]]),C(e("a",{href:"#",onClick:s[1]||(s[1]=k(v=>t.$emit("paste",o.day),["prevent"]))},it,512),[[L,o.copiable]])])]),e("a",{href:"#",onClick:s[3]||(s[3]=k(v=>t.$emit("cancel"),["prevent"])),class:"btn btn-xs btn-default"},[at,d(" Retour ")]),C(e("div",rt,[ct,d(" Cette journée est verrouillée "),e("strong",null,c(o.day.lockedReason),1)],512),[[L,o.day.locked]]),C(e("div",dt,[ut,d(" Le temps déclaré "),ht,d(". Vous ne pourrez pas soumettre votre feuille de temps. ")],512),[[L,o.day.total>o.day.maxLength]]),o.editable?(i(),r("div",_t,[d(" Compléter avec : "),D(u,{others:o.others,workpackages:o.workPackages,onSelect:a.addToWorkpackage,selection:o.selection},null,8,["others","workpackages","onSelect","selection"])])):_("",!0),e("section",null,[o.day.declarations.length?(i(),r(f,{key:0},[mt,(i(!0),r(f,null,p(o.day.declarations,v=>(i(),H(g,{d:v,key:v.id,"day-length":o.day.dayLength,onDebug:s[4]||(s[4]=P=>t.$emit("debug",P)),onRemovetimesheet:s[5]||(s[5]=P=>t.$emit("removetimesheet",P)),onEdittimesheet:s[6]||(s[6]=P=>t.$emit("edittimesheet",P,o.day))},null,8,["d","day-length"]))),128)),e("article",yt,[ft,e("div",pt,[e("span",kt,c(t.$filters.duration2(a.totalWP,o.day.dayLength)),1)]),vt]),gt],64)):_("",!0),o.day.othersWP?(i(),r("section",bt,[Pt,(i(!0),r(f,null,p(o.day.othersWP,v=>(i(),r("article",Ct,[e("strong",null,[e("i",{class:m("icon-"+v.code)},null,2),d(" "+c(o.others[v.label]?o.others[v.label].label:v.label),1),Dt,e("small",null,c(v.description),1)]),e("div",Wt,c(t.$filters.duration2(v.duration,o.day.dayLength)),1),e("div",jt,[e("i",{class:m(["icon-trash",o.day.editable!=!0?"disabled":""]),onClick:P=>t.$emit("removetimesheet",v)},null,10,wt),e("i",{class:m(["icon-edit",o.day.editable!=!0?"disabled":""]),onClick:P=>t.$emit("edittimesheet",v,o.day)},null,10,Mt)])]))),256)),xt])):_("",!0),e("article",Et,[St,e("div",Lt,c(t.$filters.duration2(a.totalJour,o.day.dayLength)),1)])])],2)}const Ot=M($e,[["render",Tt]]);const Vt={props:{defaultDuration:{default:7},baseTime:{default:7.5},declarationInHours:{required:!0,default:!1},pas:{default:10},fill:{default:0}},data(){return{hours:0,minutes:0,duration:0}},computed:{displayHours(){return Math.floor(this.duration)},displayMinutes(){return Math.round((this.duration-this.displayHours)*60)},displayPercent(){return Math.round(100/this.baseTime*this.duration)}},methods:{standardizeDuration(t){return Math.round(t/this.pas)*this.pas/60},moreMinutes(){this.duration=this.standardizeDuration(this.duration*60+this.pas),this.emitUpdate()},lessMinutes(){this.duration=this.standardizeDuration(this.duration*60-this.pas),this.emitUpdate()},moreHours(){this.duration+=1,this.emitUpdate()},lessHours(){this.duration-=1,this.duration<0&&(this.duration=0),this.emitUpdate()},applyDuration(t){this.duration=t,this.emitUpdate()},roundMinutes(t){return Math.round(t/this.pas)*this.pas},applyPercent(t){this.duration=this.baseTime*t/100,this.emitUpdate()},emitUpdate(){console.log("emitUpdate");let t=Math.floor(this.duration),s=this.duration-t;this.$emit("timeupdate",{h:t,m:s})}},mounted(){console.log("Mounted"),this.duration=this.defaultDuration}},T=t=>(Y("data-v-755f0c71"),t=t(),A(),t),It={class:"ui-timechooser"},qt={class:"percents"},zt={key:0,class:"hours",style:{}},Ht={class:"hour sel"},Yt=T(()=>e("i",{class:"icon-angle-up"},null,-1)),At=[Yt],Nt=T(()=>e("i",{class:"icon-angle-down"},null,-1)),Ut=[Nt],Rt=T(()=>e("span",{class:"separator"},":",-1)),Ft={class:"minutes sel"},Jt=T(()=>e("i",{class:"icon-angle-up"},null,-1)),Bt=[Jt],Kt=T(()=>e("i",{class:"icon-angle-down"},null,-1)),Xt=[Kt];function Gt(t,s,o,h,l,a){return i(),r("div",It,[e("div",qt,[o.fill>0?(i(),r("span",{key:0,onClick:s[0]||(s[0]=k(u=>a.applyDuration(o.fill),["prevent","stop"]))},"Remplir")):_("",!0),e("span",{onClick:s[1]||(s[1]=k(u=>a.applyPercent(100),["prevent","stop"])),class:m(a.displayPercent=="100"?"selected":"")},"100%",2),e("span",{onClick:s[2]||(s[2]=k(u=>a.applyPercent(75),["prevent","stop"])),class:m(a.displayPercent=="75"?"selected":"")},"75%",2),e("span",{onClick:s[3]||(s[3]=k(u=>a.applyPercent(50),["prevent","stop"])),class:m(a.displayPercent=="50"?"selected":"")},"50%",2),e("span",{onClick:s[4]||(s[4]=k(u=>a.applyPercent(25),["prevent","stop"])),class:m(a.displayPercent=="25"?"selected":"")},"25%",2)]),o.declarationInHours?(i(),r("div",zt,[e("span",Ht,[e("span",{onClick:s[5]||(s[5]=k(u=>a.moreHours(),["prevent","stop"]))},At),d(" "+c(a.displayHours)+" ",1),e("span",{onClick:s[6]||(s[6]=k(u=>a.lessHours(),["prevent","stop"]))},Ut)]),Rt,e("span",Ft,[e("span",{onClick:s[7]||(s[7]=k(u=>a.moreMinutes(),["prevent","stop"]))},Bt),d(" "+c(a.displayMinutes)+" ",1),e("span",{onClick:s[8]||(s[8]=k(u=>a.lessMinutes(),["prevent","stop"]))},Xt)])])):_("",!0)])}const Qt=M(Vt,[["render",Gt],["__scopeId","data-v-755f0c71"]]);K.defaults.headers.common["X-Requested-With"]="XMLHttpRequest ";const Zt={name:"TimesheetMonth",props:{declarationInHours:{type:Boolean,default:!1},defaultYear:{type:Number,default:new Date().getFullYear()},defaultMonth:{type:Number,default:new Date().getMonth()},url:{type:String,required:!0},urlValidation:{type:String,required:!0},urlImport:{type:String,required:!0}},components:{timesheetmonthday:he,timesheetmonthdaydetails:Ot,timechooser:Qt,wpselector:R},data(){return{editWindow:{display:!1,wp:null,type:"infos"},commentEdited:null,commentEditedLabel:"",commentEditedContent:"",configureColor:!1,_colorsProjects:null,colors:["#0b098c","#09518c","#09858c","#098c66","#098c27","#818c09","#8c6d09","#8c4e09","#8c1109","#8c0971","#8c6f09"],copyClipboard:null,clipboardDataDay:null,showHours:!0,loading:!1,debug:null,help:!1,popup:"",screensend:null,sendaction:null,error:"",commentaire:"",fillSelectedWP:null,ts:null,month:null,year:null,dayLength:null,selectedWeek:null,rejectPeriod:null,selectedDayData:null,dayMenuLeft:50,dayMenuTop:50,dayMenu:"none",selectedWP:null,selectionWP:null,selectedTime:null,dayMenuSelected:null,dayMenuTime:0,editedTimesheet:null,fillMonthWP:null}},filters:{date(t,s="ddd DD MMMM YYYY"){var o=E(t);return o.format(s)},datefull(t,s="ddd DD MMMM YYYY"){var o=E(t);return o.format(s)},day(t,s="ddd DD"){var o=E(t);return o.format(s)}},computed:{selectedDay(){if(this.ts&&this.ts.days){for(let t in this.ts.days)if(this.ts.days[t].data===this.selectedDayData)return this.ts.days[t]}return null},projectsColors(){return this._colorsProjects},recapsend(){let t={},s={},o={};return Object.keys(this.ts.otherWP).forEach(h=>{let l=this.ts.otherWP[h];s[l.code]={id:l.code,code:l.code,label:l.label,days:{},total:l.total,comment:l.comment},o[l.code]=l.comment}),Object.keys(this.ts.activities).forEach(h=>{let l=this.ts.activities[h],a=l.project_id,u=l.project,g=l.comment;o[l.id]=g,this.screensend&&this.screensend.hasOwnProperty(h)&&(g=this.screensend[h]),t.hasOwnProperty(a)||(t[a]={label:u,id:a,activities:{}}),t[a].activities.hasOwnProperty(l.id)||(t[a].activities[l.id]={id:l.id,label:l.label,acronym:l.acronym,total:l.total,days:{},workpackages:{},comment:g})}),Object.keys(this.ts.workpackages).forEach(h=>{let l=this.ts.workpackages[h],a=l.project_id,u=l.activity_id;t[a]&&t[a].activities[u]&&(t[a].activities[u].workpackages[l.id]={label:l.code,description:l.label,total:l.total,days:{}})}),Object.keys(this.ts.days).forEach(h=>{let l=this.ts.days[h];l.declarations.forEach(a=>{let u=a.activity_id,g=a.project_id,v=a.wp_id;t[g].activities[u].days.hasOwnProperty(h)||(t[g].activities[u].days[h]=0),t[g].activities[u].workpackages[v].days.hasOwnProperty(h)||(t[g].activities[u].workpackages[v].days[h]=0),t[g].activities[u].days[h]+=a.duration,t[g].activities[u].workpackages[v].days[h]+=a.duration}),l.othersWP&&l.othersWP.forEach(a=>{let u=a.code;s.hasOwnProperty(u)||(s[u]={days:{},total:0}),s[u].days.hasOwnProperty(h)||(s[u].days[h]=0),s[u].days[h]+=a.duration,s[u].total+=a.duration})}),{lot:t,comments:o,hl:s}},monthRest(){return this.monthLength-this.ts.total},monthLength(){let t=0;for(let s in this.ts.days)t+=this.ts.days[s].dayLength;return t},dayLabel(){return this.selectedDay?E(this.selectedDay.data).format("dddd DD MMMM YYYY"):""},fillDayValue(){let t=this.selectedDay.dayLength-this.selectedDay.duration;return t<0&&(t=0),t},mois(){return E(this.ts.from).format("MMMM YYYY")},periodCode(){return this.ts.from.substr(0,7)},cssDayMenu(){return{display:this.dayMenu,top:this.dayMenuTop+"px",left:this.dayMenuLeft+"px"}},totalWP(){let t=0;for(let s in this.ts.otherWP)this.ts.otherWP[s].total&&(t+=this.ts.otherWP[s].total);return t},weeks(){let t=[];if(this.ts&&this.ts.days){let o=this.ts.days[1].week,h={label:o,days:[],total:0,totalOpen:0,weekLength:0,editable:this.ts.editable,drafts:0,weekExcess:this.ts.weekExcess};for(let l in this.ts.days){let a=this.ts.days[l];o!=a.week&&(t.push(h),h={label:a.week,days:[],total:0,totalOpen:0,weekLength:0,drafts:0,weekExcess:this.ts.weekExcess}),o=a.week,h.total+=a.duration,a.locked||a.closed||(h.totalOpen+=a.dayLength),a.declarations&&a.declarations.forEach(u=>{u.status_id==2&&h.drafts++}),a.closed||(h.weekLength+=a.dayLength),h.days.push(a)}h.days.length&&t.push(h)}return t}},methods:{handledEditComment(t,s){this.commentEditedLabel=s.label,this.commentEdited=s,this.commentEditedContent=s.comment},handlerSendComment(){if(this.ts.editable){var t,s,o;this.commentEdited.id?(t="wp",s=this.commentEdited.id,o=""):(t="hl",o=this.commentEdited.code,s="");let h={action:"comment",period:this.ts.period,type:t,id:s,code:o,content:this.commentEditedContent};W.post(this.url,h).then(l=>{this.fetch()}).then(l=>{this.selectedWeek=null,this.screensend=null,this.loading=!1,this.commentEdited=null})}},getAcronymColor(t){return this._colorsProjects.hasOwnProperty(t)?this._colorsProjects[t]:"#333333"},handlerChangeColor(t,s){let o=JSON.parse(JSON.stringify(this._colorsProjects));o[t]=s.target.value,this._colorsProjects=o,window.localStorage&&window.localStorage.setItem("colorsprojects",JSON.stringify(this._colorsProjects)),this.$forceUpdate()},handlerFillMonth(t){let s=[];Object.keys(this.ts.days).forEach(o=>{let h=this.ts.days[o];h.closed||h.locked||h.duration>=h.dayLength||s.push({day:h.date,wpId:t.id,code:t.code,commentaire:"",duration:(h.dayLength-h.duration)*60})}),this.performAddDays(s)},handlerPasteDay(t){let s=[];this.clipboardDataDay.forEach(o=>{let h=JSON.parse(JSON.stringify(o));h.day=t.datefull,s.push(h)}),this.performAddDays(s)},handlerCopyDay(t){let s=[];t.declarations&&t.declarations.forEach(o=>{s.push({code:o.wpCode,comment:o.comment,duration:o.duration*60,wpId:o.wp_id})}),t.othersWP&&t.othersWP.forEach(o=>{s.push({code:o.code,comment:"",duration:o.duration*60,wpId:null})}),this.clipboardDataDay=s},editTimesheet(t,s){console.log("editTimesheet",t.duration),this.editedTimesheet=t,this.commentaire=t.comment,this.selectedDayData=s.data,this.dayMenuTime=t.duration,t.wp_id?this.selectionWP=this.getWorkpackageById(t.wp_id):t.code&&(this.selectionWP=this.getHorsLotByCode(t.code))},getHorsLotByCode(t){return this.ts.otherWP[t]},getWorkpackageById(t){return this.ts.workpackages[t]},reSendPeriod(t){this.validateMonth("resend")},validateMonth(t="sendmonth"){W.get(this.urlValidation+"?year="+this.ts.year+"&month="+this.ts.month).then(s=>{this.sendMonth(t)}).catch(s=>{this.error=s.body}).then(s=>{this.selectedWeek=null})},sendMonth(t="sendmonth"){if(this.sendaction=t,!(this.ts.submitable==!0||this.ts.hasConflict==!0)){this.error="Vous ne pouvez pas soumettre vos déclarations pour cette période : "+this.ts.submitableInfos;return}let s={};Object.keys(this.ts.activities).forEach(o=>{this.ts.activities[o].comment?s[o]=[this.ts.activities[o].comment]:Object.keys(this.ts.days).forEach(h=>{this.ts.days[h].declarations.forEach(a=>{if(a.activity_id==o){let u=a.activity_id;s.hasOwnProperty(u)||(s[u]=[]),a.comment&&s[u].indexOf(a.comment)<0&&s[u].push(a.comment)}})})}),Object.keys(this.ts.otherWP).forEach(o=>{this.ts.otherWP[o].comment?s[o]=[this.ts.otherWP[o].comment]:Object.keys(this.ts.days).forEach(h=>{this.ts.days[h].declarations.forEach(a=>{if(a.activity_id==o){let u=a.code;s.hasOwnProperty(u)||(s[u]=[]),a.comment&&s[u].indexOf(a.comment)<0&&s[u].push(a.comment)}})})}),Object.keys(s).forEach(o=>{s[o]=" - "+s[o].join(` + - `)}),this.screensend=s},sendMonthProceed(){var t={};t.action=this.sendaction,t.comments=this.screensend,t.from=this.ts.from,t.to=this.ts.to,W.post(this.url,t).then(s=>{console.log("ENVOI OK"),this.selectedWeek=null,this.screensend=null,this.loading=!1,this.fetch()})},fillWeek(t,s){let o=[];t.days.forEach(h=>{h.closed||h.locked||h.duration>=h.dayLength||o.push({day:h.date,wpId:s.id,code:s.code,commentaire:this.commentaire,duration:(h.dayLength-h.duration)*60})}),this.performAddDays(o)},fillDay(){},selectWeek(t){this.selectedDayData=null,this.selectedWeek=t},deleteWeek(t){let s=[];t.days.forEach(o=>{o.declarations.forEach(h=>{s.push(h.id)}),o.othersWP&&o.othersWP.forEach(h=>{s.push(h.id)})}),this.performDelete(s)},deleteTimesheet(t){this.performDelete([t.id])},handlerPasteWeek(t){let s=[];t.days.forEach(o=>{this.clipboardData.forEach(h=>{if(h.day==o.day){let l=JSON.parse(JSON.stringify(h));l.day=o.datefull,s.push(l)}})}),this.performAddDays(s)},handlerCopyWeek(t){let s=[];t.days.forEach(o=>{o.declarations&&o.declarations.forEach(h=>{s.push({code:h.wpCode,comment:h.comment,duration:h.duration*60,day:o.day,wpId:h.wp_id})}),o.othersWP&&o.othersWP.forEach(h=>{s.push({code:h.code,comment:"",duration:h.duration*60,day:o.day,wpId:null})})}),this.clipboardData=s},handlerSaveMenuTime(){let t=[{id:this.editedTimesheet?this.editedTimesheet.id:null,day:this.selectedDay.date,wpId:this.selectionWP.id,duration:this.dayMenuTime*60,comment:this.commentaire,code:this.selectionWP.code}];this.performAddDays(t)},performAddDays(t){let s={};s.timesheets=JSON.parse(JSON.stringify(t)),s.action="add",W.post(this.url,s).then(()=>{this.fetch(!1)}).finally(()=>{this.selectedWeek=null,this.selectionWP=null,this.loading=!1,this.commentaire="",this.editedTimesheet=null})},performDelete(t){this.loading="Suppression des créneaux",W.delete(this.url+"&id="+t.join(","),{pendingMsg:"Suppression de créneau"}).then(()=>{this.fetch(!1)}).finally(()=>{this.selectedWeek=null,this.loading=!1})},handlerDayUpdated(){let t=arguments[0];this.dayMenuTime=t.h+t.m},handlerSelectWP(t){this.selectedWP=t,this.selectionWP=t,this.dayMenu="none"},hideWpSelector(){this.selectedWP=null,this.selectedTime=null,this.dayMenu="none"},handlerKeyDown(t){},handlerClick(){this.hideWpSelector()},handlerWpFromDetails(t){this.handlerSelectWP(t)},handlerDayMenu(t,s){this.dayMenuLeft=t.clientX,this.dayMenuTop=t.clientY,this.dayMenu="block",this.selectedDayData=s.data},handlerSelectDay(t){console.log("Selection du jour",t.data),this.selectedDayData=t.data},nextYear(){this.year+=1,this.fetch(!0)},nextMonth(){this.month+=1,this.month>12?(this.month=1,this.nextYear()):this.fetch(!0)},prevYear(){this.year-=1,this.fetch(!0)},prevMonth(){this.month-=1,this.month<1?(this.month=12,this.prevYear()):this.fetch(!0)},fetch(t=!0){t&&(this.selectedDayData=null,this.selectedWeek=null);let s;this.selectedDay&&(s=this.selectedDay.i),W.get(this.url+"&month="+this.month+"&year="+this.year,{pendingMsg:"Chargement de la période de déclaration"}).then(o=>{this.dayLength=o.data.dayLength,s&&(this.selectedDay=this.ts.days[s]),this.selectedWP=null,this.selectionWP=null,this.fillSelectedWP=null,this.ts=o.data})}},mounted(){this.month=this.defaultMonth,this.year=this.defaultYear,this.dayLength=this.defaultDayLength,window.localStorage&&(window.localStorage.getItem("colorsprojects")?this._colorsProjects=JSON.parse(window.localStorage.getItem("colorsprojects")):this._colorsProjects={}),this.fetch(!0)}},$t={key:0,class:"overlay"},es={class:"overlay-content"},ts=e("i",{class:"icon-comment"},null,-1),ss=e("div",{class:"alert alert-info"}," Le commentaire saisi sera repris dans le feuille de temps ",-1),ls={class:"buttons"},ns=e("i",{class:"icon-floppy"},null,-1),os=e("i",{class:"icon-cancel-outline"},null,-1),is={key:0,class:"overlay"},as={class:"overlay-content"},rs=e("i",{class:"icon-paper-plane"},null,-1),cs={class:"table table-bordered table-recap"},ds=e("th",{colspan:"2"}," ",-1),us=e("br",null,null,-1),hs=e("th",null," Total ",-1),_s={class:"activity-line"},ms=["colspan"],ys=e("i",{class:"icon-cube"},null,-1),fs=e("th",{colspan:"2"}," ",-1),ps=["colspan"],ks=e("td",null," ",-1),vs={class:"workpackage-line"},gs={colspan:"2"},bs=e("i",{class:"icon-archive"},null,-1),Ps={key:0},Cs={key:1},Ds={class:"total"},Ws={class:"activity-line-total"},js=e("th",{colspan:"2"},"Total",-1),ws={key:0},Ms={key:1},xs={class:"total"},Es=["colspan"],Ss=e("h3",null,[e("i",{class:"icon-tags"}),e("strong",null,"Hors-Lot")],-1),Ls=[Ss],Ts={class:"workpackage-line"},Os=e("td",null,"   ",-1),Vs={key:0},Is={key:1},qs={class:"total"},zs=["colspan"],Hs=e("h3",null,[e("strong",null,"Total")],-1),Ys=[Hs],As={class:"total-line"},Ns=e("th",{colspan:"2"}," = ",-1),Us={key:0},Rs={key:1},Fs={class:"total"},Js=e("i",{class:"icon-cube"},null,-1),Bs=e("strong",null,"Commentaires : ",-1),Ks=e("br",null,null,-1),Xs=["onUpdate:modelValue"],Gs=["onUpdate:modelValue"],Qs={class:"buttons"},Zs={key:0,class:"overlay"},$s={class:"overlay-content"},el=e("h2",null,[e("i",{class:"icon-tags"}),d(" Couleurs des activités ")],-1),tl=e("p",{class:"alert alert-help"}," Vous pouvez ici modifier les couleurs de projets affichés dans le calendrier ",-1),sl={class:"addon"},ll=["onChange","onUpdate:modelValue"],nl=e("hr",null,null,-1),ol={class:"buttons"},il=e("i",{class:"icon-cancel-alt"},null,-1),al={key:0,class:"overlay",style:{"z-index":"2002"}},rl={class:"content container overlay-content"},cl=e("h2",null,[e("i",{class:"icon-attention-1"}),d(" Oups !")],-1),dl={class:"alert alert-danger"},ul=e("p",{class:"text-danger"}," Si ce message ne vous aide pas, transmettez le à l'administrateur Oscar. ",-1),hl={class:"buttons"},_l={key:1,class:"overlay",style:{"z-index":"2002"}},ml={class:"content container overlay-content"},yl=e("h2",null,[e("i",{class:"icon-attention-1"}),d(" Déclaration rejetée !")],-1),fl={key:0},pl=e("strong",null,"Motif : ",-1),kl={key:1},vl=e("strong",null,"Motif : ",-1),gl={key:2},bl=e("strong",null,"Motif : ",-1),Pl={class:"buttons"},Cl={key:2,class:"overlay",style:{"z-index":"2001"}},Dl={class:"content container overlay-content"},Wl=e("h2",null,"Historique",-1),jl={class:"alert alert-info"},wl={class:"buttons"},Ml={key:3,class:"overlay",style:{"z-index":"2002"}},xl={class:"content container overlay-content"},El=e("h2",null,[e("i",{class:"icon-help-circled"}),d(" Informations légales")],-1),Sl=e("p",null,[d(" Dans le cadre des projets soumis aux feuilles de temps, l'organisme financeur impose la justification des heures, "),e("strong",null,"incluant les activités hors-projets"),d(". Le culum des heures déclarées doit respecter le cadre légale : "),e("br")],-1),Ll={key:0},Tl=e("em",null,"normal",-1),Ol=e("strong",null,"maximum légale",-1),Vl=e("strong",null,"maximum légale",-1),Il=e("strong",null,"maximum légale",-1),ql=e("p",null,[d(" Selon les modalités de financement, les dépacements (même en éxcédent) peuvent être considérés comme des "),e("em",null,"irrégularité"),d(" pouvant déclencher la suspension ou le remboursement des financements engagés ou à venir. ")],-1),zl={class:"buttons"},Hl={key:4,class:"overlay",style:{"z-index":"2002"}},Yl={class:"content container overlay-content"},Al=e("h2",null,[e("i",{class:"icon-bug"}),d(" Debug")],-1),Nl={class:"alert alert-info",style:{"white-space":"pre","font-size":"12px"}},Ul={class:"buttons"},Rl={key:5,class:"overlay",style:{"z-index":"2001"}},Fl={class:"content container overlay-content"},Jl={key:0},Bl=e("small",null,"Déclaration pour le lot",-1),Kl=e("i",{class:"icon-archive"},null,-1),Xl={key:1},Gl=e("small",null,"Déclaration hors-lot pour",-1),Ql={key:0,class:"alert alert-danger"},Zl={key:1},$l=e("i",{class:"icon-calendar"},null,-1),en=e("br",null,null,-1),tn={class:"row"},sn={class:"col-md-6"},ln=e("h4",null,"Temps",-1),nn={class:"col-md-6"},on=e("h4",null,"Commentaire",-1),an={class:"buttons"},rn=e("i",{class:"icon-block"},null,-1),cn=e("i",{class:"icon-floppy"},null,-1),dn={key:6,class:"container-fluid",style:{"margin-bottom":"5em"}},un={class:"month col-lg-8"},hn=e("i",{class:"icon-cog"},null,-1),_n={class:"periode"},mn=e("i",{class:"icon-angle-left"},null,-1),yn=[mn],fn=e("i",{class:"icon-angle-right"},null,-1),pn=[fn],kn=["href","title"],vn=e("i",{class:"icon-calendar"},null,-1),gn=e("br",null,null,-1),bn={key:0},Pn={class:"month"},Cn=e("header",{class:"month-header"},[e("strong",null,"Lundi"),e("strong",null,"Mardi"),e("strong",null,"Mercredi"),e("strong",null,"Jeudi"),e("strong",null,"Vendredi"),e("strong",null,"Samedi"),e("strong",null,"Dimanche")],-1),Dn={class:"weeks"},Wn=["onClick"],jn=e("em",null,"Cumul des heures : ",-1),wn=["title"],Mn={key:0,class:"icon-attention-1"},xn={class:"days"},En={class:"col-lg-4"},Sn={key:1},Ln={class:"text"},Tn=e("i",{class:"icon-calendar"},null,-1),On={key:0,class:"right-menu"},Vn=e("i",{class:"icon-docs"},null,-1),In=[Vn],qn=e("i",{class:"icon-paste"},null,-1),zn=[qn],Hn=e("i",{class:"icon-angle-left"},null,-1),Yn=e("h4",null,"Jours : ",-1),An=["onClick"],Nn={class:""},Un=e("i",{class:"icon-calendar"},null,-1),Rn={key:0,class:"icon-minus-circled"},Fn={key:1,class:"icon-lock"},Jn={key:2,class:"icon-ok-circled",style:{color:"#2d7800"}},Bn={key:3,class:"icon-help-circled",style:{color:"#777777"}},Kn=e("i",{class:"icon-attention-circled",style:{color:"red"},title:"Les heures déclarées dépassent la limite légales"},null,-1),Xn={class:"text-large"},Gn={class:"card xs total"},Qn={class:"week-header"},Zn={class:""},$n=e("i",{class:"icon-clock"},null,-1),eo=e("br",null,null,-1),to={key:0,class:"text-thin"},so=e("i",{class:"icon-attention-1"},null,-1),lo={class:"text-big"},no={key:0,class:"alert alert-danger"},oo=e("i",{class:"icon-attention-1"},null,-1),io={key:1,class:"buttons-bar"},ao=e("i",{class:"icon-trash"},null,-1),ro={key:2},co=e("i",{class:"icon-help-circled"},null,-1),uo={key:2},ho=e("i",{class:"icon-calendar"},null,-1),_o={key:0},mo=e("p",null,[e("i",{class:"icon-help-circled"}),d(" Vous pouvez compléter automatiquement ce mois avec : ")],-1),yo=e("hr",null,null,-1),fo={class:"card xs"},po=["onClick"],ko={key:0,class:"icon-ok-circled",style:{color:"#999"}},vo={key:1,class:"icon-attention-circled",style:{color:"#993d00"},title:"La déclaration est incomplète pour cette période"},go={key:2,class:"icon-ok-circled",style:{color:"#2d7800"}},bo=["title"],Po={key:0,class:"icon-attention-1"},Co={class:"card xs total interaction-off"},Do={class:"week-header"},Wo=e("span",{class:"text-big text-xxl"},"Total",-1),jo={class:"text-large"},wo={key:2,class:"alert alert-danger"},Mo=e("i",{class:"icon-attention-circled"},null,-1),xo=e("hr",null,null,-1),Eo=e("h4",null,[e("i",{class:"icon-tags"}),d(" Hors-lot")],-1),So={class:"card xs"},Lo={class:"week-header"},To={key:0},Oo={key:1,class:"icon-cube",title:"Validation projet en attente"},Vo={key:2,class:"icon-beaker",title:"Validation scientifique en attente"},Io={key:3,class:"icon-hammer",title:"Validation administrative en attente"},qo={key:4,class:"icon-minus-circled",title:"Il y'a un problème dans la déclaration"},zo={key:5,class:"icon-ok-circled",title:"Cette déclaration est valide"},Ho=e("br",null,null,-1),Yo={class:"text-thin"},Ao=["onClick"],No=e("i",{class:"icon-chat-alt"},null,-1),Uo={class:"text-large"},Ro={class:"card xs total interaction-off"},Fo={class:"week-header"},Jo=e("span",{class:"text-big text-xxl"},"Total",-1),Bo={class:"text-large"},Ko=e("h4",null,[e("i",{class:"icon-cubes"}),d(" Activités pour cette période")],-1),Xo={key:3,class:"alert alert-info"},Go={class:"card xs"},Qo={class:"week-header"},Zo={key:0},$o={key:1,class:"icon-cube",title:"Validation projet en attente"},ei={key:2,class:"icon-beaker",title:"Validation scientifique en attente"},ti={key:3,class:"icon-hammer",title:"Validation administrative en attente"},si={key:4,class:"icon-minus-circled",title:"Il y'a un problème dans la déclaration"},li={key:5,class:"icon-ok-circled",title:"Cette déclaration est valide"},ni=e("br",null,null,-1),oi={class:"text-thin"},ii=["onClick"],ai=e("i",{class:"icon-chat-alt"},null,-1),ri={class:"subtotal"},ci={class:"text-large"},di={class:"card xs total interaction-off"},ui={class:"week-header"},hi=e("span",null,[e("strong",{class:"text-big text-xxl"},"Total"),e("br"),e("small",null,"Pour les activités soumises aux déclarations")],-1),_i={class:"text-large"},mi={key:5},yi=e("h3",null,"Procédures de validation pour cette période",-1),fi={class:"card card-xs"},pi={key:0,class:"icon-ok-circled"},ki={key:1,class:"icon-minus-circled"},vi={key:2,class:"icon-history"},gi=["onClick"],bi=["onClick"],Pi={class:"buttons-bar"},Ci={key:0,class:"icon-spinner animate-spin"},Di={key:1,class:"icon-upload"},Wi={key:2},ji={key:3},wi={key:1},Mi=e("br",null,null,-1);function xi(t,s,o,h,l,a){const u=w("timechooser"),g=w("timesheetmonthday"),v=w("timesheetmonthdaydetails"),P=w("wpselector");return i(),r("section",{onClick:s[32]||(s[32]=(...n)=>a.handlerClick&&a.handlerClick(...n)),onKeyup:s[33]||(s[33]=(...n)=>a.handlerKeyDown&&a.handlerKeyDown(...n))},[D(I,{name:"fade"},{default:V(()=>[l.commentEdited?(i(),r("div",$t,[e("div",es,[e("h2",null,[ts,d(" Commentaire pour "),e("strong",null,c(l.commentEditedLabel),1),d(" pour "),e("em",null,c(a.mois),1)]),ss,C(e("textarea",{name:"comment",class:m(["form-control",{disabled:!l.ts.editable}]),id:"",cols:"30",rows:"10","onUpdate:modelValue":s[0]||(s[0]=n=>l.commentEditedContent=n)},null,2),[[S,l.commentEditedContent]]),e("nav",ls,[e("button",{class:m(["btn btn-primary",{disabled:!l.ts.editable}]),onClick:s[1]||(s[1]=(...n)=>a.handlerSendComment&&a.handlerSendComment(...n))},[ns,d(" Enregistrer le commentaire ")],2),e("button",{class:"btn btn-default",onClick:s[2]||(s[2]=n=>l.commentEdited=null)},[os,d("Annuler ")])])])])):_("",!0)]),_:1}),D(I,{name:"fade"},{default:V(()=>[l.screensend?(i(),r("div",is,[e("div",as,[e("h2",null,[rs,d(" Soumettre la déclaration pour "),e("strong",null,c(a.mois),1)]),e("table",cs,[e("thead",null,[e("tr",null,[ds,(i(!0),r(f,null,p(l.ts.days,n=>(i(),r("th",null,[e("small",null,c(n.label),1),us,e("strong",null,c(n.i),1)]))),256)),hs])]),(i(!0),r(f,null,p(a.recapsend.lot,n=>(i(),r("tbody",null,[(i(!0),r(f,null,p(n.activities,y=>(i(),r(f,null,[e("tr",_s,[e("th",{colspan:l.ts.dayNbr+3},[e("h3",null,[e("strong",null,[ys,d(" ["+c(y.acronym)+"] "+c(y.label),1)])])],8,ms)]),e("tr",null,[fs,e("td",{colspan:l.ts.dayNbr},"   ",8,ps),ks]),(i(!0),r(f,null,p(y.workpackages,b=>(i(),r("tr",vs,[e("th",gs,[bs,d(" "+c(b.label),1)]),(i(!0),r(f,null,p(l.ts.days,O=>(i(),r("td",null,[b.days[O.i]?(i(),r("strong",Ps,c(t.$filters.duration2(b.days[O.i],O.dayLength)),1)):(i(),r("small",Cs,"-"))]))),256)),e("th",Ds,c(t.$filters.duration2(b.total,a.monthLength)),1)]))),256)),e("tr",Ws,[js,(i(!0),r(f,null,p(l.ts.days,b=>(i(),r("td",null,[y.days[b.i]?(i(),r("strong",ws,c(t.$filters.duration2(y.days[b.i],b.dayLength)),1)):(i(),r("small",Ms,"-"))]))),256)),e("th",xs,c(t.$filters.duration2(y.total,a.monthLength)),1)])],64))),256))]))),256)),e("tbody",null,[e("tr",null,[e("th",{colspan:l.ts.dayNbr+3},Ls,8,Es)]),(i(!0),r(f,null,p(a.recapsend.hl,n=>(i(),r("tr",Ts,[e("th",null,[e("i",{class:m("icon-"+n.code)},null,2),d(" "+c(n.label),1)]),Os,(i(!0),r(f,null,p(l.ts.days,y=>(i(),r("td",null,[n.days[y.i]?(i(),r("strong",Vs,c(t.$filters.duration2(n.days[y.i],y.dayLength)),1)):(i(),r("small",Is,"-"))]))),256)),e("th",qs,c(t.$filters.duration2(n.total,a.monthLength)),1)]))),256))]),e("tbody",null,[e("tr",null,[e("th",{colspan:l.ts.dayNbr+3},Ys,8,zs)]),e("tr",As,[Ns,(i(!0),r(f,null,p(l.ts.days,n=>(i(),r("td",null,[n.total?(i(),r("strong",Us,c(t.$filters.duration2(n.total,n.dayLength)),1)):(i(),r("small",Rs,"-"))]))),256)),e("th",Fs,c(t.$filters.duration2(l.ts.total,a.monthLength)),1)])])]),(i(!0),r(f,null,p(a.recapsend.lot,n=>(i(),r("div",null,[(i(!0),r(f,null,p(n.activities,y=>(i(),r("div",null,[e("h5",null,[e("strong",null,[Js,d(" ["+c(y.acronym)+"] "+c(y.label),1)])]),Bs,Ks,C(e("textarea",{class:"form-control","onUpdate:modelValue":b=>l.screensend[y.id]=b,style:{"max-width":"100%"}},null,8,Xs),[[S,l.screensend[y.id]]])]))),256))]))),256)),(i(!0),r(f,null,p(a.recapsend.hl,n=>(i(),r("div",null,[e("h5",null,[e("strong",null,[e("i",{class:m(["icon","icon-"+n.code])},null,2),d(" "+c(n.label),1)])]),C(e("textarea",{class:"form-control","onUpdate:modelValue":y=>l.screensend[n.code]=y,style:{"max-width":"100%"}},null,8,Gs),[[S,l.screensend[n.code]]])]))),256)),e("nav",Qs,[e("button",{class:"btn btn-primary",onClick:s[3]||(s[3]=(...n)=>a.sendMonthProceed&&a.sendMonthProceed(...n))},"Envoyer la déclaration"),e("button",{class:"btn btn-default",onClick:s[4]||(s[4]=n=>l.screensend=null)},"Annuler")])])])):_("",!0)]),_:1}),D(I,{name:"fade"},{default:V(()=>[l.configureColor?(i(),r("div",Zs,[e("div",$s,[el,tl,(i(!0),r(f,null,p(l.ts.activities,n=>(i(),r("article",null,[e("strong",{class:"cartouche",style:z({"background-color":a.getAcronymColor(n.acronym)})},[d(c(n.acronym)+" ",1),e("em",sl,c(t.$filters.strReduce(n.label,50)),1)],4),C(e("input",{type:"color",onChange:y=>a.handlerChangeColor(n.acronym,y),"onUpdate:modelValue":y=>l._colorsProjects[n.acronym]=y},null,40,ll),[[S,l._colorsProjects[n.acronym]]])]))),256)),nl,e("nav",ol,[e("button",{class:"btn btn-primary",onClick:s[5]||(s[5]=n=>l.configureColor=!1)},[il,d(" Terminé ")])])])])):_("",!0)]),_:1}),l.error?(i(),r("div",al,[e("div",rl,[cl,e("pre",dl,c(l.error),1),ul,e("nav",hl,[e("button",{class:"btn btn-primary",onClick:s[6]||(s[6]=n=>l.error="")},"Fermer")])])])):_("",!0),l.rejectPeriod?(i(),r("div",_l,[e("div",ml,[yl,l.rejectPeriod.rejectadmin_at?(i(),r("div",fl,[e("p",null,[d("Déclaration rejetée administrativement par "),e("strong",null,c(l.rejectPeriod.rejectadmin_by),1),d(" le "),e("time",null,c(l.rejectPeriod.rejectadmin_at),1)]),e("pre",null,[pl,d(c(l.rejectPeriod.rejectadmin_message),1)])])):l.rejectPeriod.rejectsci_at?(i(),r("div",kl,[e("p",null,[d("Déclaration rejetée scientifiquement par "),e("strong",null,c(l.rejectPeriod.rejectsci_by),1),d(" le "),e("time",null,c(l.rejectPeriod.rejectsci_at),1)]),e("pre",null,[vl,d(c(l.rejectPeriod.rejectsci_message),1)])])):l.rejectPeriod.rejectactivity_at?(i(),r("div",gl,[e("p",null,[d("Déclaration rejetée par "),e("strong",null,c(l.rejectPeriod.rejectactivity_by),1),d(" le "),e("time",null,c(l.rejectPeriod.rejectactivity_at),1)]),e("pre",null,[bl,d(c(l.rejectPeriod.rejectactivity_message),1)])])):_("",!0),e("nav",Pl,[e("button",{class:"btn btn-primary",onClick:s[7]||(s[7]=n=>l.rejectPeriod=null)},"Fermer")])])])):_("",!0),l.popup?(i(),r("div",Cl,[e("div",Dl,[Wl,e("pre",jl,c(l.popup),1),e("nav",wl,[e("button",{class:"btn btn-primary",onClick:s[8]||(s[8]=n=>l.popup="")},"Fermer")])])])):_("",!0),l.help?(i(),r("div",Ml,[e("div",xl,[El,Sl,l.ts?(i(),r("ul",Ll,[e("li",null,[d("Durée "),Tl,d(" d'une journée : "),e("strong",null,c(l.ts.daylength|t.duration),1)]),e("li",null,[d("Durée "),Ol,d(" d'une journée : "),e("strong",null,c(l.ts.dayExcess|t.duration),1)]),e("li",null,[d("Durée "),Vl,d(" d'une semaine : "),e("strong",null,c(l.ts.weekExcess|t.duration),1)]),e("li",null,[d("Durée "),Il,d(" d'un mois : "),e("strong",null,c(l.ts.monthExcess|t.duration),1)])])):_("",!0),ql,e("nav",zl,[e("button",{class:"btn btn-primary",onClick:s[9]||(s[9]=n=>l.help="")},"Fermer")])])])):_("",!0),l.debug?(i(),r("div",Hl,[e("div",Yl,[Al,e("pre",Nl,c(l.debug),1),e("nav",Ul,[e("button",{class:"btn btn-primary",onClick:s[10]||(s[10]=n=>l.debug="")},"Fermer")])])])):_("",!0),a.selectedDay&&l.selectionWP&&l.selectionWP.code?(i(),r("div",Rl,[e("div",Fl,[e("section",null,[l.selectionWP.id?(i(),r("h3",Jl,[Bl,e("strong",null,[Kl,e("abbr",null,c(l.selectionWP.code),1),d(" "+c(l.selectionWP.label),1)])])):(i(),r("h3",Xl,[Gl,e("strong",null,[e("i",{class:m("icon-"+l.selectionWP.code)},null,2),d(" "+c(l.selectionWP.label),1)])]))]),l.selectionWP.validation_up!=!0?(i(),r("div",Ql," Vous ne pouvez plus ajouter de créneaux pour ce lot sur cette période ")):(i(),r("div",Zl,[e("p",null,[$l,d(" Journée : "),e("strong",null,c(t.$filters.date(a.selectedDay.date)),1),en]),e("div",tn,[e("div",sn,[ln,D(u,{onTimeupdate:a.handlerDayUpdated,declarationInHours:o.declarationInHours,baseTime:a.selectedDay.dayLength,fill:a.fillDayValue,"default-duration":l.dayMenuTime},null,8,["onTimeupdate","declarationInHours","baseTime","fill","default-duration"])]),e("div",nn,[on,C(e("textarea",{class:"form-control textarea","onUpdate:modelValue":s[11]||(s[11]=n=>l.commentaire=n)},null,512),[[S,l.commentaire]])])])])),e("nav",an,[e("button",{class:"btn btn-default",onClick:s[12]||(s[12]=n=>l.selectionWP=null)},[rn,d(" Annuler ")]),l.selectionWP.validation_up==!0?(i(),r("button",{key:0,class:"btn btn-primary",onClick:s[13]||(s[13]=(...n)=>a.handlerSaveMenuTime&&a.handlerSaveMenuTime(...n))},[cn,d(" Valider ")])):_("",!0)])])])):_("",!0),l.ts?(i(),r("section",dn,[e("div",un,[e("h2",null,[d(" Déclarations de temps pour "),e("strong",null,c(l.ts.person),1),e("small",{style:{position:"absolute",right:"0","font-size":"14px",cursor:"pointer"},onClick:s[14]||(s[14]=n=>l.configureColor=!0)},[d(" Options "),hn])]),e("h3",_n,[d("Période "),e("a",{href:"#",onClick:s[15]||(s[15]=k((...n)=>a.prevMonth&&a.prevMonth(...n),["prevent"]))},yn),e("strong",{onClick:s[16]||(s[16]=k(n=>l.debug=l.ts,["shift"]))},c(a.mois),1),e("a",{href:"#",onClick:s[17]||(s[17]=k((...n)=>a.nextMonth&&a.nextMonth(...n),["prevent"]))},pn),o.urlImport?(i(),r("a",{key:0,class:m(["btn btn-default",{disabled:!l.ts.submitable}]),href:o.urlImport+"&period="+a.periodCode,title:l.ts.submitable?"":"Vous ne pouvez pas importer pour cette période"},[vn,d(" Importer un calendrier"),gn,l.ts.submitable?_("",!0):(i(),r("small",bn," Vous ne pouvez pas importer pour une période en cours/déjà envoyée "))],10,kn)):_("",!0)]),e("div",Pn,[Cn,e("div",Dn,[l.ts?(i(!0),r(f,{key:0},p(a.weeks,n=>(i(),r("section",{class:m(["week",l.selectedWeek&&l.selectedWeek.label==n.label?"selected":""])},[e("header",{class:"week-header",onClick:y=>a.selectWeek(n)},[e("span",null,"Semaine "+c(n.label),1),e("small",null,[jn,e("strong",{class:m(n.total>n.weekExcess?"has-titled-error":""),title:n.total>n.weekExcess?"Les heures excédentaires risques d'être ignorées lors d'une justification financière dans le cadre des projets soumis aux feuilles de temps":""},[n.total>n.weekExcess?(i(),r("i",Mn)):_("",!0),d(" "+c(t.$filters.duration2(n.total,n.weekLength)),1)],10,wn)])],8,Wn),e("div",xn,[(i(!0),r(f,null,p(n.days,y=>(i(),H(g,{class:m(a.selectedDay==y?"selected":""),others:l.ts.otherWP,projectscolors:l._colorsProjects,onSelectDay:b=>a.handlerSelectDay(y),onDaymenu:a.handlerDayMenu,onDebug:s[18]||(s[18]=b=>l.debug=b),day:y,key:y.date},null,8,["class","others","projectscolors","onSelectDay","onDaymenu","day"]))),128))])],2))),256)):_("",!0)])])]),e("section",En,[a.selectedDay?(i(),H(v,{key:0,day:a.selectedDay,workPackages:l.ts.workpackages,others:l.ts.otherWP,selection:l.selectionWP,editable:l.ts.editable,label:a.dayLabel,"day-excess":l.ts.dayExcess,copiable:l.clipboardDataDay,onDebug:s[19]||(s[19]=n=>l.debug=n),onCopy:a.handlerCopyDay,onPaste:a.handlerPasteDay,onCancel:s[20]||(s[20]=n=>l.selectedDayData=null),onRemovetimesheet:a.deleteTimesheet,onEdittimesheet:a.editTimesheet,onAddtowp:s[21]||(s[21]=n=>a.handlerWpFromDetails(n))},null,8,["day","workPackages","others","selection","editable","label","day-excess","copiable","onCopy","onPaste","onRemovetimesheet","onEdittimesheet"])):l.selectedWeek?(i(),r("div",Sn,[e("h3",{onClick:s[24]||(s[24]=k(n=>l.debug=l.selectedWeek,["shift"])),class:"title-with-menu"},[e("div",Ln,[Tn,e("strong",null,"Semaine "+c(l.selectedWeek.label),1)]),l.ts.editable?(i(),r("nav",On,[e("a",{href:"#",onClick:s[22]||(s[22]=n=>a.handlerCopyWeek(l.selectedWeek)),title:"Copier les créneaux de la semaine"},In),C(e("a",{href:"#",onClick:s[23]||(s[23]=n=>a.handlerPasteWeek(l.selectedWeek)),title:"Coller les créneaux"},zn,512),[[L,t.clipboardData]])])):_("",!0)]),e("a",{class:"btn btn-default",onClick:s[25]||(s[25]=n=>l.selectedWeek=null)},[Hn,d(" Revenir au mois ")]),Yn,(i(!0),r(f,null,p(l.selectedWeek.days,n=>(i(),r("article",{class:m(["card xs total repport-item",{locked:n.locked,closed:n.closed,excess:n.duration>l.ts.dayExcess}]),onClick:y=>a.handlerSelectDay(n)},[e("div",{class:m(["week-header",{"text-thin":n.closed||n.locked}])},[e("span",Nn,[Un,n.closed?(i(),r("i",Rn)):n.locked?(i(),r("i",Fn)):n.total>n.amplitudemin&&n.totall.ts.weekExcess?(i(),r("div",no,[oo,d(" Vos déclarations pour cette semaine dépasse la limite légale fixée à "),e("strong",null,c(l.ts.weekExcess|t.duration),1),d(" heures. ")])):_("",!0),l.selectedWeek.total>0?(i(),r("nav",io,[l.ts.editable?(i(),r("button",{key:0,class:"btn btn-danger btn-xs",onClick:s[26]||(s[26]=n=>a.deleteWeek(l.selectedWeek))},[ao,d(" Supprimer les déclarations non-envoyées ")])):_("",!0)])):_("",!0),l.selectedWeek.total{l.fillSelectedWP=n,a.fillWeek(l.selectedWeek,l.fillSelectedWP)}),usevalidation:!0},null,8,["others","workpackages","selection"])])):_("",!0)])):(i(),r("div",uo,[e("h3",{onClick:s[28]||(s[28]=k(n=>l.debug=l.ts,["prevent","shift","stop"]))},[ho,d(" Mois de "),e("strong",null,c(a.mois),1)]),a.monthRest>0&&l.ts.periodFinished?(i(),r("section",_o,[mo,D(P,{others:l.ts.otherWP,workpackages:l.ts.workpackages,selection:l.fillMonthWP,usevalidation:!0,onSelect:s[29]||(s[29]=n=>{l.fillMonthWP=n,a.handlerFillMonth(l.fillMonthWP)})},null,8,["others","workpackages","selection"])])):_("",!0),yo,l.ts?(i(!0),r(f,{key:1},p(a.weeks,n=>(i(),r("section",fo,[e("header",{class:"week-header",onClick:y=>a.selectWeek(n)},[e("span",null,[d(" Semaine "+c(n.label)+" ",1),n.totaln.weekExcess?(i(),r("i",vo)):(i(),r("i",go))]),e("small",null,[e("strong",{class:m(n.total>n.weekExcess?"has-titled-error":""),title:n.total>n.weekExcess?"Les décalarations dépassent la limite légales et risques d'être ignorées lors d'une justification financière dans le cadre des projets soumis aux feuilles de temps":""},[n.total>n.weekExcess?(i(),r("i",Po)):_("",!0),d(" "+c(t.$filters.duration2(n.total,n.weekLength)),1)],10,bo)])],8,po)]))),256)):_("",!0),e("section",Co,[e("div",Do,[Wo,e("small",null,[e("strong",jo,c(t.$filters.duration2(l.ts.total,a.monthLength)),1)])])]),l.ts.total>l.ts.monthExcess?(i(),r("div",wo,[Mo,d(" Les heures mensuelles dépassent le cadre légale fixé à "),e("strong",null,c(l.ts.monthExcess|t.duration),1),d(" heures. ")])):_("",!0),xo,Eo,(i(!0),r(f,null,p(l.ts.otherWP,(n,y)=>(i(),r("section",So,[e("div",Lo,[e("span",null,[e("i",{class:m("icon-"+n.code)},null,2),d(" "+c(n.label)+" ",1),n.validation_state==null?(i(),r("i",To)):n.validation_state.status=="send-prj"?(i(),r("i",Oo)):n.validation_state.status=="send-sci"?(i(),r("i",Vo)):n.validation_state.status=="send-adm"?(i(),r("i",Io)):n.validation_state.status=="conflict"?(i(),r("i",qo)):n.validation_state.status=="valid"?(i(),r("i",zo)):_("",!0),Ho,e("em",Yo,c(n.description),1),e("button",{class:"btn btn-default btn-xs",onClick:k(b=>a.handledEditComment("hl",n),["prevent"])},[No,d(" Commentaire ")],8,Ao)]),e("small",null,[e("strong",Uo,c(t.$filters.duration2(n.total,a.monthLength)),1)])])]))),256)),e("section",Ro,[e("div",Fo,[Jo,e("small",null,[e("strong",Bo,c(t.$filters.duration2(a.totalWP,a.monthLength)),1)])])]),Ko,l.ts.activities.length==0?(i(),r("p",Xo," Vous n'être identifié comme déclarant sur aucune activité pour cette période. Si cette situation vous semble anormale, prenez contact avec votre responsable scientifique. ")):(i(!0),r(f,{key:4},p(l.ts.activities,n=>(i(),r("section",Go,[e("div",Qo,[e("span",null,[e("strong",null,c(n.acronym),1),e("span",{class:"icon-tag",style:z({color:l._colorsProjects[n.acronym]}),onClick:s[30]||(s[30]=y=>l.configureColor=!0)}," ",4),n.validation_state==null?(i(),r("i",Zo)):n.validation_state.status=="send-prj"?(i(),r("i",$o)):n.validation_state.status=="send-sci"?(i(),r("i",ei)):n.validation_state.status=="send-adm"?(i(),r("i",ti)):n.validation_state.status=="conflict"?(i(),r("i",si)):n.validation_state.status=="valid"?(i(),r("i",li)):_("",!0),ni,e("em",oi,c(n.label),1),e("button",{class:"btn btn-default btn-xs",onClick:k(y=>a.handledEditComment("prj",n),["prevent"])},[ai,d(" Commentaire ")],8,ii)]),e("small",ri,[e("strong",ci,c(t.$filters.duration2(n.total,a.monthLength)),1)])])]))),256)),e("section",di,[e("div",ui,[hi,e("small",null,[e("strong",_i,c(t.$filters.duration2(l.ts.periodDeclarations,a.monthLength)),1)])])]),l.ts.periodsValidations.length?(i(),r("div",mi,[yi,(i(!0),r(f,null,p(l.ts.periodsValidations,n=>(i(),r("section",fi,[n.status=="valid"?(i(),r("i",pi)):n.status=="conflict"?(i(),r("i",ki)):(i(),r("i",vi)),d(" "+c(n.label)+" ",1),e("a",{href:"#",onClick:y=>l.popup=n.log},"Historique",8,gi),n.status=="conflict"&&(n.rejectadmin_message||n.rejectsci_message||n.rejectactivity_message)?(i(),r("a",{key:3,href:"#",onClick:y=>l.rejectPeriod=n},"Détails sur le rejet",8,bi)):_("",!0)]))),256))])):_("",!0)])),e("nav",Pi,[l.ts.submitable?(i(),r("button",{key:0,class:m(["btn btn-primary",{disabled:!l.ts.submitable,enabled:l.ts.submitable&&!l.loading}]),style:{"margin-left":"auto"},onClick:s[31]||(s[31]=n=>a.validateMonth())},[l.loading?(i(),r("i",Ci)):(i(),r("i",Di)),l.ts.hasConflict?(i(),r("span",Wi,"Réenvoyer")):(i(),r("span",ji,"Soumettre mes déclarations"))],2)):(i(),r("span",wi,[d(" Vous ne pouvez pas soumettre cette période"),Mi,e("small",null,c(l.ts.submitableInfos),1)]))])])])):_("",!0)],32)}const Ei=M(Zt,[["render",xi]]);let F="#timesheet-declaration",j=document.querySelector(F);const J=j.dataset.declarationInHours==="true",B=X(Ei,{url:j.dataset.url,"url-validation":j.dataset.urlValidation,"url-import":j.dataset.urlImport,"default-year":j.dataset.defaultYear,"default-month":j.dataset.defaultMonth,"declaration-in-hours":J}),U={"send-prj":"Validation projet","send-sci":"Validation scientifique","send-adm":"Validation administrative",conflict:"Conflit",valid:"Validé"};B.config.globalProperties.$filters={timeAgo(t){return q.timeAgo(t)},date(t){return q.date(t)},dateFull(t){return q.dateFull(t)},filesize(t){return G.filesize(t)},money(t){return Q.money(t)},duration2(t,s){if(J){let o=60*t,h=Math.floor(o/60),l=o%60;return l<10&&(l="0"+l),`${h}:${l}`}else return s===void 0?t:t===0?0:Math.round(100/s*t)+"%"},strReduce(t,s=20){return t.length>s?t.substring(0,s-3)+"...":t},statusLabel(t){return U.hasOwnProperty(t)?U[t]:"Brouillon"}};B.mount(F); diff --git a/public/js/oscar/vite/dist/assets/timesheetdeclarations-8f08433e.js b/public/js/oscar/vite/dist/assets/timesheetdeclarations-8f08433e.js deleted file mode 100644 index d4d1e193f713ece31bd87d61d728991ec3083a94..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/timesheetdeclarations-8f08433e.js +++ /dev/null @@ -1,2 +0,0 @@ -import{o,c as a,d as t,t as u,a as d,g as h,F as p,j as k,n as y,x as q,h as g,r as M,w as D,q as S,b as W,l as z,p as U,m as x,i as T,T as O,v as E,y as R}from"../vendor.js";import{_ as w}from"../vendor7.js";import{A as _}from"../vendor8.js";import{m as V}from"../vendor2.js";import{f as F}from"../vendor3.js";import{m as J}from"../vendor4.js";import"../vendor14.js";import"../vendor16.js";const B={name:"TimesheetMonthDay",props:{others:{required:!0},day:{required:!0},projectscolors:{required:!0,default:null}},data(){return{colors:["#093b8c","#098c29","#8c2109","#4c098c","#8c0971","#8c6f09"]}},filters:{duration(s){let e=Math.floor(s),i=Math.round((s-e)*60);return i<10&&(i="0"+i),e+":"+i}},computed:{groupProject(){let s={};return this.day.declarations&&this.day.declarations.forEach(e=>{s.hasOwnProperty(e.acronym)||(s[e.acronym]={label:e.label,acronym:e.acronym,duration:0,status_id:e.status_id,color:this.getProjectColor(e.acronym)}),s[e.acronym].duration+=e.duration}),s}},methods:{getProjectColor(s){return this.projectscolors&&this.projectscolors.hasOwnProperty(s)?this.projectscolors[s]:"#8c0971"},totalOther(s){let e=0;return this.day[s].forEach(i=>{e+=i.duration}),e},handlerClick(){this.$emit("selectDay",this.day)},handlerRightClick(s){this.$emit("daymenu",s,this.day)}}},K={class:"label"},X={key:0,class:"text-danger"},G=["title"],Q={key:0,class:"icon-draft"},Z={class:"addon"},$={key:0,class:"icon-draft"},ee={class:"addon"},te=["title"],se=["title"];function le(s,e,i,m,l,r){return o(),a("div",{class:y(["day",{locked:i.day.locked,error:i.day.total>i.day.maxLength}]),onClick:e[0]||(e[0]=(...c)=>r.handlerClick&&r.handlerClick(...c))},[t("span",K,u(i.day.i),1),i.day.total>i.day.maxLength?(o(),a("span",X,e[1]||(e[1]=[t("i",{class:"icon-attention"},null,-1),d(" Erreur ")]))):h("",!0),(o(!0),a(p,null,k(r.groupProject,c=>(o(),a("span",{class:"cartouche wp xs",title:c.label,style:q({"background-color":c.color})},[c.status_id==null?(o(),a("i",Q)):(o(),a("i",{key:1,class:y("icon-"+c.status_id)},null,2)),d(" "+u(c.acronym)+" ",1),t("span",Z,u(s.$filters.duration2(c.duration,i.day.dayLength)),1)],12,G))),256)),t("span",null,[(o(!0),a(p,null,k(i.day.othersWP,c=>(o(),a("span",{class:y(["cartouche xs",c.code])},[c.validations==null?(o(),a("i",$)):(o(),a("i",{key:1,class:y("icon-"+c.status_id)},null,2)),d(" "+u(c.label)+" ",1),t("span",ee,u(s.$filters.duration2(c.duration,i.day.dayLength)),1)],2))),256))]),i.day.closed?(o(),a("span",{key:1,title:i.day.lockedReason,style:{"font-size":".7em"}},e[2]||(e[2]=[t("i",{class:"icon-minus-circled"},null,-1),d(" Fermé ")]),8,te)):i.day.locked?(o(),a("span",{key:2,title:i.day.lockedReason,style:{"font-size":".7em"}},e[3]||(e[3]=[t("i",{class:"icon-lock"},null,-1),d(" Verrouillé ")]),8,se)):h("",!0),e[4]||(e[4]=d("   "))],2)}const ne=w(B,[["render",le],["__scopeId","data-v-45fb2e96"]]);const ie={props:{workpackages:{default:[]},selection:{required:!0},others:{required:!0},usevalidation:{default:!1}},data(){return{showSelector:!1,selection:null}},computed:{hasSelected(){return this.selection!=null},selectedCode(){return this.selection?this.selection.code:""},selectedLabel(){return this.selection?this.selection.label:""},selectedIcon(){return this.selection&&this.selection.icon?this.selection.code:""},selectedDescription(){return this.selection?this.selection.description:""}},methods:{handlerSelectWP(s){this.selection=s,this.usevalidation||this.handlerValidSelection()},handlerValidSelection(){this.selection&&(this.showSelector=!1,this.$emit("select",this.selection))},handlerSelectOther(s){console.log("selection",s),this.selection=s,this.usevalidation||this.handlerValidSelection()}}},oe={key:0,class:"overlay"},re={class:"overlay-content"},ae={class:"row"},de={class:"col-md-6"},ue=["onClick"],ce=["title"],me=["title"],he={class:"workpackage-infos"},ye={class:"code"},fe={class:"workpackage-label"},pe={class:"col-md-6"},ke=["onClick"],ge={class:"project-acronym"},ve={class:"workpackage-infos"},be={class:"dropdown"},Pe={key:0,class:"info"},Ce={class:"text-light"},De={key:1,class:"info"};function We(s,e,i,m,l,r){return o(),a("div",null,[l.showSelector?(o(),a("div",oe,[t("div",re,[e[6]||(e[6]=t("p",null,"Choisissez un type de créneau : ",-1)),t("div",ae,[t("div",de,[e[4]||(e[4]=t("h3",null,[t("i",{class:"icon-cube"}),d(" Activités")],-1)),(o(!0),a(p,null,k(i.workpackages,c=>(o(),a("article",{class:y(["timesheet-item",{selected:l.selection&&l.selection.id==c.id,disabled:!c.validation_up}]),onClick:g(b=>r.handlerSelectWP(c),["prevent"])},[t("abbr",{title:s.project,class:"project-acronym"},[e[3]||(e[3]=t("i",{class:"icon-cube"},null,-1)),d(" "+u(c.acronym),1)],8,ce),t("span",{class:"activity-label",title:c.activity},u(s.$filters.strReduce(c.activity)),9,me),t("strong",he,[t("span",ye,u(c.code),1),t("small",fe,u(c.label),1)])],10,ue))),256))]),t("div",pe,[e[5]||(e[5]=t("h3",null,"Hors activité (Hors-lot)",-1)),(o(!0),a(p,null,k(i.others,c=>(o(),a("article",{class:y(["timesheet-item horslots-item",{selected:l.selection==c,disabled:!c.validation_up}]),onClick:g(b=>r.handlerSelectOther(c),["prevent"])},[t("span",ge,[t("i",{class:y("icon-"+c.code)},null,2),d(" "+u(c.label),1)]),t("small",ve,u(c.description),1)],10,ke))),256))])]),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[0]||(e[0]=c=>l.showSelector=!1)},"Annuler"),i.usevalidation?(o(),a("button",{key:0,class:y(["btn btn-primary",l.selection?"":"disabled"]),onClick:e[1]||(e[1]=c=>r.handlerValidSelection())},"Valider ",2)):h("",!0)])])])):h("",!0),t("div",be,[t("button",{class:"btn-lg btn btn-default dropdown-toggle",type:"button",onClick:e[2]||(e[2]=g(c=>l.showSelector=!0,["prevent"]))},[r.hasSelected?(o(),a("span",Pe,[t("i",{class:y(r.selectedIcon?"icon-"+r.selectedIcon:"icon-archive")},null,2),t("strong",null,u(r.selectedCode),1),e[7]||(e[7]=d()),t("em",null,u(s.$filters.strReduce(r.selectedLabel)),1),e[8]||(e[8]=t("br",null,null,-1)),t("small",Ce,u(s.$filters.strReduce(r.selectedDescription)),1)])):(o(),a("em",De,"Lot de travail/Activité...")),e[9]||(e[9]=t("span",{class:"caret"},null,-1))])])])}const I=w(ie,[["render",We],["__scopeId","data-v-c5ac47ec"]]),_e={name:"TimesheetMonthDeclarationItem",props:{d:{required:!0},dayLength:{required:!0}}},je={class:"infos"},Me=["title"],we=["title"],xe={class:"status"},Ee={key:0,class:"text-danger"},Se={class:"total"},Le={class:"left buttons-icon"};function Te(s,e,i,m,l,r){return o(),a("article",{class:y(["card card-xs xs wp-duration","status-"+i.d.status_id])},[t("span",je,[t("strong",null,[e[2]||(e[2]=t("i",{class:"icon-archive"},null,-1)),t("abbr",{title:i.d.project},u(i.d.acronym),9,Me),e[3]||(e[3]=t("i",{class:"icon-angle-right"},null,-1)),d(" "+u(i.d.wpCode)+" ",1),t("i",{class:y(["icon-comment",i.d.comment?"with-comment":""]),title:i.d.comment},null,10,we)]),e[5]||(e[5]=t("br",null,null,-1)),t("small",null,[e[4]||(e[4]=t("i",{class:"icon-cubes"},null,-1)),d(" "+u(i.d.label),1)]),t("div",xe,[t("i",{class:y("icon-"+i.d.status_id)},null,2),d(" "+u(s.$filters.statusLabel(i.d.status_id))+" ",1),i.d.validations.conflict?(o(),a("span",Ee,u(i.d.validations.conflict),1)):h("",!0)])]),t("div",Se,u(s.$filters.duration2(i.d.duration)),1),t("div",Le,[t("i",{class:y(["icon-trash",i.d.credentials.deletable!=!0?"disabled":""]),onClick:e[0]||(e[0]=c=>s.$emit("removetimesheet",i.d))},null,2),t("i",{class:y(["icon-edit",i.d.credentials.editable!=!0?"disabled":""]),onClick:e[1]||(e[1]=c=>s.$emit("edittimesheet",i.d))},null,2)])],2)}const Oe=w(_e,[["render",Te]]);const Ve={name:"TimesheetMonthDayDetails",components:{wpselector:I,day:Oe},props:{workPackages:{require:!0},others:{require:!0},editable:{required:!0},day:{require:!0},selection:{require:!0},label:{require:!0},dayExcess:{require:!0},copiable:{default:null}},data(){return{formAdd:!1,debug:!1}},computed:{isExceed(){return this.total>this.day.dayLength},totalWP(){let s=0;return this.day.declarations.forEach(e=>{s+=e.duration}),s},totalHWP(){let s=0;return this.day.othersWP&&this.day.othersWP.forEach(e=>{s+=e.duration}),s},totalJour(){return this.totalWP+this.totalHWP},enseignements(){let s=0;return this.day.teaching.forEach(e=>{s+=e.duration}),s},abs(){let s=0;return this.day.vacations.forEach(e=>{s+=e.duration}),s},learn(){let s=0;return this.day.training.forEach(e=>{s+=e.duration}),s},other(){let s=0;return this.day.infos.forEach(e=>{s+=e.duration}),s},sickleave(){let s=0;return this.day.sickleave.forEach(e=>{s+=e.sickleave}),s},research(){let s=0;return this.day.research.forEach(e=>{s+=e.research}),s}},methods:{addToWorkpackage(s){this.$emit("addtowp",s)},hasDeclarationHWP(s){return this.day[s]&&this.day[s].length},duration2(s){return"duration2: "+s}}},qe={class:"text"},ze={class:"right-menu"},He={class:"alert alert-danger"},Ie={class:"alert alert-danger"},Ye={key:0},Ae={class:"wp-duration card xs"},Ne={class:"total"},Ue={class:"text-large text-xl"},Re={key:1,class:"othersWP"},Fe={class:"wp-duration card xs"},Je={class:"total"},Be={class:"left buttons-icon"},Ke=["onClick"],Xe=["onClick"],Ge={class:"wp-duration card xl"},Qe={class:"total"};function Ze(s,e,i,m,l,r){const c=M("wpselector"),b=M("day");return o(),a("div",{class:y(["day-details",{locked:i.day.locked}])},[t("h3",{onClick:e[2]||(e[2]=g(v=>s.$emit("debug",i.day),["stop","prevent","shift"])),class:"title-with-menu"},[t("div",qe,[e[7]||(e[7]=t("i",{class:"icon-calendar"},null,-1)),e[8]||(e[8]=d()),t("strong",null,u(i.label),1)]),t("nav",ze,[D(t("a",{href:"#",onClick:e[0]||(e[0]=g(v=>s.$emit("copy",i.day),["prevent"])),title:"Copier les créneaux"},e[9]||(e[9]=[t("i",{class:"icon-docs"},null,-1)]),512),[[S,i.day.othersWP||i.day.declarations.length]]),D(t("a",{href:"#",onClick:e[1]||(e[1]=g(v=>s.$emit("paste",i.day),["prevent"]))},e[10]||(e[10]=[t("i",{class:"icon-paste"},null,-1)]),512),[[S,i.copiable]])])]),t("a",{href:"#",onClick:e[3]||(e[3]=g(v=>s.$emit("cancel"),["prevent"])),class:"btn btn-xs btn-default"},e[11]||(e[11]=[t("i",{class:"icon-angle-left"},null,-1),d(" Retour ")])),D(t("div",He,[e[12]||(e[12]=t("i",{class:"icon-attention"},null,-1)),e[13]||(e[13]=d(" Cette journée est verrouillée ")),t("strong",null,u(i.day.lockedReason),1)],512),[[S,i.day.locked]]),D(t("div",Ie,e[14]||(e[14]=[t("i",{class:"icon-attention"},null,-1),d(" Le temps déclaré "),t("strong",null,"excède la durée autorisée",-1),d(". Vous ne pourrez pas soumettre votre feuille de temps. ")]),512),[[S,i.day.total>i.day.maxLength]]),i.editable?(o(),a("div",Ye,[e[15]||(e[15]=d(" Compléter avec : ")),W(c,{others:i.others,workpackages:i.workPackages,onSelect:r.addToWorkpackage,selection:i.selection},null,8,["others","workpackages","onSelect","selection"])])):h("",!0),t("section",null,[i.day.declarations.length?(o(),a(p,{key:0},[e[18]||(e[18]=t("h3",null,[t("i",{class:"icon-archive"}),d(" Heures identifiées sur des lots")],-1)),(o(!0),a(p,null,k(i.day.declarations,v=>(o(),z(b,{d:v,key:v.id,"day-length":i.day.dayLength,onDebug:e[4]||(e[4]=C=>s.$emit("debug",C)),onRemovetimesheet:e[5]||(e[5]=C=>s.$emit("removetimesheet",C)),onEdittimesheet:e[6]||(e[6]=C=>s.$emit("edittimesheet",C,i.day))},null,8,["d","day-length"]))),128)),t("article",Ae,[e[16]||(e[16]=t("span",null,[t("strong",null,[t("i",{class:"icon-archive"}),d(" Total"),t("br"),t("small",null,"sur les lot de travail")])],-1)),t("div",Ne,[t("span",Ue,u(s.$filters.duration2(r.totalWP,i.day.dayLength)),1)]),e[17]||(e[17]=t("div",{class:"left"},null,-1))]),e[19]||(e[19]=t("hr",null,null,-1))],64)):h("",!0),i.day.othersWP?(o(),a("section",Re,[e[21]||(e[21]=t("h3",null,[t("i",{class:"icon-tags"}),d(" Heures Hors-Lots")],-1)),(o(!0),a(p,null,k(i.day.othersWP,v=>(o(),a("article",Fe,[t("strong",null,[t("i",{class:y("icon-"+v.code)},null,2),d(" "+u(i.others[v.label]?i.others[v.label].label:v.label),1),e[20]||(e[20]=t("br",null,null,-1)),t("small",null,u(v.description),1)]),t("div",Je,u(s.$filters.duration2(v.duration,i.day.dayLength)),1),t("div",Be,[t("i",{class:y(["icon-trash",i.day.editable!=!0?"disabled":""]),onClick:C=>s.$emit("removetimesheet",v)},null,10,Ke),t("i",{class:y(["icon-edit",i.day.editable!=!0?"disabled":""]),onClick:C=>s.$emit("edittimesheet",v,i.day)},null,10,Xe)])]))),256)),e[22]||(e[22]=t("hr",null,null,-1))])):h("",!0),t("article",Ge,[e[23]||(e[23]=t("strong",null,[d(" Total de la journée"),t("br")],-1)),t("div",Qe,u(s.$filters.duration2(r.totalJour,i.day.dayLength)),1)])])],2)}const $e=w(Ve,[["render",Ze]]);const et={props:{defaultDuration:{default:7},baseTime:{default:7.5},declarationInHours:{required:!0,default:!1},pas:{default:10},fill:{default:0}},data(){return{hours:0,minutes:0,duration:0}},computed:{displayHours(){return Math.floor(this.duration)},displayMinutes(){return Math.round((this.duration-this.displayHours)*60)},displayPercent(){return Math.round(100/this.baseTime*this.duration)}},methods:{standardizeDuration(s){return Math.round(s/this.pas)*this.pas/60},moreMinutes(){this.duration=this.standardizeDuration(this.duration*60+this.pas),this.emitUpdate()},lessMinutes(){this.duration=this.standardizeDuration(this.duration*60-this.pas),this.emitUpdate()},moreHours(){this.duration+=1,this.emitUpdate()},lessHours(){this.duration-=1,this.duration<0&&(this.duration=0),this.emitUpdate()},applyDuration(s){this.duration=s,this.emitUpdate()},roundMinutes(s){return Math.round(s/this.pas)*this.pas},applyPercent(s){this.duration=this.baseTime*s/100,this.emitUpdate()},emitUpdate(){console.log("emitUpdate");let s=Math.floor(this.duration),e=this.duration-s;this.$emit("timeupdate",{h:s,m:e})}},mounted(){console.log("Mounted"),this.duration=this.defaultDuration}},tt={class:"ui-timechooser"},st={class:"percents"},lt={key:0,class:"hours",style:{}},nt={class:"hour sel"},it={class:"minutes sel"};function ot(s,e,i,m,l,r){return o(),a("div",tt,[t("div",st,[i.fill>0?(o(),a("span",{key:0,onClick:e[0]||(e[0]=g(c=>r.applyDuration(i.fill),["prevent","stop"]))},"Remplir")):h("",!0),t("span",{onClick:e[1]||(e[1]=g(c=>r.applyPercent(100),["prevent","stop"])),class:y(r.displayPercent=="100"?"selected":"")},"100%",2),t("span",{onClick:e[2]||(e[2]=g(c=>r.applyPercent(75),["prevent","stop"])),class:y(r.displayPercent=="75"?"selected":"")},"75%",2),t("span",{onClick:e[3]||(e[3]=g(c=>r.applyPercent(50),["prevent","stop"])),class:y(r.displayPercent=="50"?"selected":"")},"50%",2),t("span",{onClick:e[4]||(e[4]=g(c=>r.applyPercent(25),["prevent","stop"])),class:y(r.displayPercent=="25"?"selected":"")},"25%",2)]),i.declarationInHours?(o(),a("div",lt,[t("span",nt,[t("span",{onClick:e[5]||(e[5]=g(c=>r.moreHours(),["prevent","stop"]))},e[9]||(e[9]=[t("i",{class:"icon-angle-up"},null,-1)])),d(" "+u(r.displayHours)+" ",1),t("span",{onClick:e[6]||(e[6]=g(c=>r.lessHours(),["prevent","stop"]))},e[10]||(e[10]=[t("i",{class:"icon-angle-down"},null,-1)]))]),e[13]||(e[13]=t("span",{class:"separator"},":",-1)),t("span",it,[t("span",{onClick:e[7]||(e[7]=g(c=>r.moreMinutes(),["prevent","stop"]))},e[11]||(e[11]=[t("i",{class:"icon-angle-up"},null,-1)])),d(" "+u(r.displayMinutes)+" ",1),t("span",{onClick:e[8]||(e[8]=g(c=>r.lessMinutes(),["prevent","stop"]))},e[12]||(e[12]=[t("i",{class:"icon-angle-down"},null,-1)]))])])):h("",!0)])}const rt=w(et,[["render",ot],["__scopeId","data-v-755f0c71"]]);U.defaults.headers.common["X-Requested-With"]="XMLHttpRequest ";const at={name:"TimesheetMonth",props:{declarationInHours:{type:Boolean,default:!1},defaultYear:{type:Number,default:new Date().getFullYear()},defaultMonth:{type:Number,default:new Date().getMonth()},url:{type:String,required:!0},urlValidation:{type:String,required:!0},urlImport:{type:String,required:!0}},components:{timesheetmonthday:ne,timesheetmonthdaydetails:$e,timechooser:rt,wpselector:I},data(){return{editWindow:{display:!1,wp:null,type:"infos"},commentEdited:null,commentEditedLabel:"",commentEditedContent:"",configureColor:!1,_colorsProjects:null,colors:["#0b098c","#09518c","#09858c","#098c66","#098c27","#818c09","#8c6d09","#8c4e09","#8c1109","#8c0971","#8c6f09"],copyClipboard:null,clipboardDataDay:null,showHours:!0,loading:!1,debug:null,help:!1,popup:"",screensend:null,sendaction:null,error:"",commentaire:"",fillSelectedWP:null,ts:null,month:null,year:null,dayLength:null,selectedWeek:null,rejectPeriod:null,selectedDayData:null,dayMenuLeft:50,dayMenuTop:50,dayMenu:"none",selectedWP:null,selectionWP:null,selectedTime:null,dayMenuSelected:null,dayMenuTime:0,editedTimesheet:null,fillMonthWP:null}},filters:{date(s,e="ddd DD MMMM YYYY"){var i=x(s);return i.format(e)},datefull(s,e="ddd DD MMMM YYYY"){var i=x(s);return i.format(e)},day(s,e="ddd DD"){var i=x(s);return i.format(e)}},computed:{selectedDay(){if(this.ts&&this.ts.days){for(let s in this.ts.days)if(this.ts.days[s].data===this.selectedDayData)return this.ts.days[s]}return null},projectsColors(){return this._colorsProjects},recapsend(){let s={},e={},i={};return Object.keys(this.ts.otherWP).forEach(m=>{let l=this.ts.otherWP[m];e[l.code]={id:l.code,code:l.code,label:l.label,days:{},total:l.total,comment:l.comment},i[l.code]=l.comment}),Object.keys(this.ts.activities).forEach(m=>{let l=this.ts.activities[m],r=l.project_id,c=l.project,b=l.comment;i[l.id]=b,this.screensend&&this.screensend.hasOwnProperty(m)&&(b=this.screensend[m]),s.hasOwnProperty(r)||(s[r]={label:c,id:r,activities:{}}),s[r].activities.hasOwnProperty(l.id)||(s[r].activities[l.id]={id:l.id,label:l.label,acronym:l.acronym,total:l.total,days:{},workpackages:{},comment:b})}),Object.keys(this.ts.workpackages).forEach(m=>{let l=this.ts.workpackages[m],r=l.project_id,c=l.activity_id;s[r]&&s[r].activities[c]&&(s[r].activities[c].workpackages[l.id]={label:l.code,description:l.label,total:l.total,days:{}})}),Object.keys(this.ts.days).forEach(m=>{let l=this.ts.days[m];l.declarations.forEach(r=>{let c=r.activity_id,b=r.project_id,v=r.wp_id;s[b].activities[c].days.hasOwnProperty(m)||(s[b].activities[c].days[m]=0),s[b].activities[c].workpackages[v].days.hasOwnProperty(m)||(s[b].activities[c].workpackages[v].days[m]=0),s[b].activities[c].days[m]+=r.duration,s[b].activities[c].workpackages[v].days[m]+=r.duration}),l.othersWP&&l.othersWP.forEach(r=>{let c=r.code;e.hasOwnProperty(c)||(e[c]={days:{},total:0}),e[c].days.hasOwnProperty(m)||(e[c].days[m]=0),e[c].days[m]+=r.duration,e[c].total+=r.duration})}),{lot:s,comments:i,hl:e}},monthRest(){return this.monthLength-this.ts.total},monthLength(){let s=0;for(let e in this.ts.days)s+=this.ts.days[e].dayLength;return s},dayLabel(){return this.selectedDay?x(this.selectedDay.data).format("dddd DD MMMM YYYY"):""},fillDayValue(){let s=this.selectedDay.dayLength-this.selectedDay.duration;return s<0&&(s=0),s},mois(){return x(this.ts.from).format("MMMM YYYY")},periodCode(){return this.ts.from.substr(0,7)},cssDayMenu(){return{display:this.dayMenu,top:this.dayMenuTop+"px",left:this.dayMenuLeft+"px"}},totalWP(){let s=0;for(let e in this.ts.otherWP)this.ts.otherWP[e].total&&(s+=this.ts.otherWP[e].total);return s},weeks(){let s=[];if(this.ts&&this.ts.days){let i=this.ts.days[1].week,m={label:i,days:[],total:0,totalOpen:0,weekLength:0,editable:this.ts.editable,drafts:0,weekExcess:this.ts.weekExcess};for(let l in this.ts.days){let r=this.ts.days[l];i!=r.week&&(s.push(m),m={label:r.week,days:[],total:0,totalOpen:0,weekLength:0,drafts:0,weekExcess:this.ts.weekExcess}),i=r.week,m.total+=r.duration,r.locked||r.closed||(m.totalOpen+=r.dayLength),r.declarations&&r.declarations.forEach(c=>{c.status_id==2&&m.drafts++}),r.closed||(m.weekLength+=r.dayLength),m.days.push(r)}m.days.length&&s.push(m)}return s}},methods:{handledEditComment(s,e){this.commentEditedLabel=e.label,this.commentEdited=e,this.commentEditedContent=e.comment},handlerSendComment(){if(this.ts.editable){var s,e,i;this.commentEdited.id?(s="wp",e=this.commentEdited.id,i=""):(s="hl",i=this.commentEdited.code,e="");let m={action:"comment",period:this.ts.period,type:s,id:e,code:i,content:this.commentEditedContent};_.post(this.url,m).then(l=>{this.fetch()}).then(l=>{this.selectedWeek=null,this.screensend=null,this.loading=!1,this.commentEdited=null})}},getAcronymColor(s){return this._colorsProjects.hasOwnProperty(s)?this._colorsProjects[s]:"#333333"},handlerChangeColor(s,e){let i=JSON.parse(JSON.stringify(this._colorsProjects));i[s]=e.target.value,this._colorsProjects=i,window.localStorage&&window.localStorage.setItem("colorsprojects",JSON.stringify(this._colorsProjects)),this.$forceUpdate()},handlerFillMonth(s){let e=[];Object.keys(this.ts.days).forEach(i=>{let m=this.ts.days[i];m.closed||m.locked||m.duration>=m.dayLength||e.push({day:m.date,wpId:s.id,code:s.code,commentaire:"",duration:(m.dayLength-m.duration)*60})}),this.performAddDays(e)},handlerPasteDay(s){let e=[];this.clipboardDataDay.forEach(i=>{let m=JSON.parse(JSON.stringify(i));m.day=s.datefull,e.push(m)}),this.performAddDays(e)},handlerCopyDay(s){let e=[];s.declarations&&s.declarations.forEach(i=>{e.push({code:i.wpCode,comment:i.comment,duration:i.duration*60,wpId:i.wp_id})}),s.othersWP&&s.othersWP.forEach(i=>{e.push({code:i.code,comment:"",duration:i.duration*60,wpId:null})}),this.clipboardDataDay=e},editTimesheet(s,e){console.log("editTimesheet",s.duration),this.editedTimesheet=s,this.commentaire=s.comment,this.selectedDayData=e.data,this.dayMenuTime=s.duration,s.wp_id?this.selectionWP=this.getWorkpackageById(s.wp_id):s.code&&(this.selectionWP=this.getHorsLotByCode(s.code))},getHorsLotByCode(s){return this.ts.otherWP[s]},getWorkpackageById(s){return this.ts.workpackages[s]},reSendPeriod(s){this.validateMonth("resend")},validateMonth(s="sendmonth"){_.get(this.urlValidation+"?year="+this.ts.year+"&month="+this.ts.month).then(e=>{this.sendMonth(s)}).catch(e=>{this.error=e.body}).then(e=>{this.selectedWeek=null})},sendMonth(s="sendmonth"){if(this.sendaction=s,!(this.ts.submitable==!0||this.ts.hasConflict==!0)){this.error="Vous ne pouvez pas soumettre vos déclarations pour cette période : "+this.ts.submitableInfos;return}let e={};Object.keys(this.ts.activities).forEach(i=>{this.ts.activities[i].comment?e[i]=[this.ts.activities[i].comment]:Object.keys(this.ts.days).forEach(m=>{this.ts.days[m].declarations.forEach(r=>{if(r.activity_id==i){let c=r.activity_id;e.hasOwnProperty(c)||(e[c]=[]),r.comment&&e[c].indexOf(r.comment)<0&&e[c].push(r.comment)}})})}),Object.keys(this.ts.otherWP).forEach(i=>{this.ts.otherWP[i].comment?e[i]=[this.ts.otherWP[i].comment]:Object.keys(this.ts.days).forEach(m=>{this.ts.days[m].declarations.forEach(r=>{if(r.activity_id==i){let c=r.code;e.hasOwnProperty(c)||(e[c]=[]),r.comment&&e[c].indexOf(r.comment)<0&&e[c].push(r.comment)}})})}),Object.keys(e).forEach(i=>{e[i]=" - "+e[i].join(` - - `)}),this.screensend=e},sendMonthProceed(){var s={};s.action=this.sendaction,s.comments=this.screensend,s.from=this.ts.from,s.to=this.ts.to,_.post(this.url,s).then(e=>{console.log("ENVOI OK"),this.selectedWeek=null,this.screensend=null,this.loading=!1,this.fetch()})},fillWeek(s,e){let i=[];s.days.forEach(m=>{m.closed||m.locked||m.duration>=m.dayLength||i.push({day:m.date,wpId:e.id,code:e.code,commentaire:this.commentaire,duration:(m.dayLength-m.duration)*60})}),this.performAddDays(i)},fillDay(){},selectWeek(s){this.selectedDayData=null,this.selectedWeek=s},deleteWeek(s){let e=[];s.days.forEach(i=>{i.declarations.forEach(m=>{e.push(m.id)}),i.othersWP&&i.othersWP.forEach(m=>{e.push(m.id)})}),this.performDelete(e)},deleteTimesheet(s){this.performDelete([s.id])},handlerPasteWeek(s){let e=[];s.days.forEach(i=>{this.clipboardData.forEach(m=>{if(m.day==i.day){let l=JSON.parse(JSON.stringify(m));l.day=i.datefull,e.push(l)}})}),this.performAddDays(e)},handlerCopyWeek(s){let e=[];s.days.forEach(i=>{i.declarations&&i.declarations.forEach(m=>{e.push({code:m.wpCode,comment:m.comment,duration:m.duration*60,day:i.day,wpId:m.wp_id})}),i.othersWP&&i.othersWP.forEach(m=>{e.push({code:m.code,comment:"",duration:m.duration*60,day:i.day,wpId:null})})}),this.clipboardData=e},handlerSaveMenuTime(){let s=[{id:this.editedTimesheet?this.editedTimesheet.id:null,day:this.selectedDay.date,wpId:this.selectionWP.id,duration:this.dayMenuTime*60,comment:this.commentaire,code:this.selectionWP.code}];this.performAddDays(s)},performAddDays(s){let e={};e.timesheets=JSON.parse(JSON.stringify(s)),e.action="add",_.post(this.url,e).then(()=>{this.fetch(!1)}).finally(()=>{this.selectedWeek=null,this.selectionWP=null,this.loading=!1,this.commentaire="",this.editedTimesheet=null})},performDelete(s){this.loading="Suppression des créneaux",_.delete(this.url+"&id="+s.join(","),{pendingMsg:"Suppression de créneau"}).then(()=>{this.fetch(!1)}).finally(()=>{this.selectedWeek=null,this.loading=!1})},handlerDayUpdated(){let s=arguments[0];this.dayMenuTime=s.h+s.m},handlerSelectWP(s){this.selectedWP=s,this.selectionWP=s,this.dayMenu="none"},hideWpSelector(){this.selectedWP=null,this.selectedTime=null,this.dayMenu="none"},handlerKeyDown(s){},handlerClick(){this.hideWpSelector()},handlerWpFromDetails(s){this.handlerSelectWP(s)},handlerDayMenu(s,e){this.dayMenuLeft=s.clientX,this.dayMenuTop=s.clientY,this.dayMenu="block",this.selectedDayData=e.data},handlerSelectDay(s){console.log("Selection du jour",s.data),this.selectedDayData=s.data},nextYear(){this.year+=1,this.fetch(!0)},nextMonth(){this.month+=1,this.month>12?(this.month=1,this.nextYear()):this.fetch(!0)},prevYear(){this.year-=1,this.fetch(!0)},prevMonth(){this.month-=1,this.month<1?(this.month=12,this.prevYear()):this.fetch(!0)},fetch(s=!0){s&&(this.selectedDayData=null,this.selectedWeek=null);let e;this.selectedDay&&(e=this.selectedDay.i),_.get(this.url+"&month="+this.month+"&year="+this.year,{pendingMsg:"Chargement de la période de déclaration"}).then(i=>{this.dayLength=i.data.dayLength,e&&(this.selectedDay=this.ts.days[e]),this.selectedWP=null,this.selectionWP=null,this.fillSelectedWP=null,this.ts=i.data})}},mounted(){this.month=this.defaultMonth,this.year=this.defaultYear,this.dayLength=this.defaultDayLength,window.localStorage&&(window.localStorage.getItem("colorsprojects")?this._colorsProjects=JSON.parse(window.localStorage.getItem("colorsprojects")):this._colorsProjects={}),this.fetch(!0)}},dt={key:0,class:"overlay"},ut={class:"overlay-content"},ct={class:"buttons"},mt={key:0,class:"overlay"},ht={class:"overlay-content"},yt={class:"table table-bordered table-recap"},ft={class:"activity-line"},pt=["colspan"],kt=["colspan"],gt={class:"workpackage-line"},vt={colspan:"2"},bt={key:0},Pt={key:1},Ct={class:"total"},Dt={class:"activity-line-total"},Wt={key:0},_t={key:1},jt={class:"total"},Mt=["colspan"],wt={class:"workpackage-line"},xt={key:0},Et={key:1},St={class:"total"},Lt=["colspan"],Tt={class:"total-line"},Ot={key:0},Vt={key:1},qt={class:"total"},zt=["onUpdate:modelValue"],Ht=["onUpdate:modelValue"],It={class:"buttons"},Yt={key:0,class:"overlay"},At={class:"overlay-content"},Nt={class:"addon"},Ut=["onChange","onUpdate:modelValue"],Rt={class:"buttons"},Ft={key:0,class:"overlay",style:{"z-index":"2002"}},Jt={class:"content container overlay-content"},Bt={class:"alert alert-danger"},Kt={class:"buttons"},Xt={key:1,class:"overlay",style:{"z-index":"2002"}},Gt={class:"content container overlay-content"},Qt={key:0},Zt={key:1},$t={key:2},es={class:"buttons"},ts={key:2,class:"overlay",style:{"z-index":"2001"}},ss={class:"content container overlay-content"},ls={class:"alert alert-info"},ns={class:"buttons"},is={key:3,class:"overlay",style:{"z-index":"2002"}},os={class:"content container overlay-content"},rs={key:0},as={class:"buttons"},ds={key:4,class:"overlay",style:{"z-index":"2002"}},us={class:"content container overlay-content"},cs={class:"alert alert-info",style:{"white-space":"pre","font-size":"12px"}},ms={class:"buttons"},hs={key:5,class:"overlay",style:{"z-index":"2001"}},ys={class:"content container overlay-content"},fs={key:0},ps={key:1},ks={key:0,class:"alert alert-danger"},gs={key:1},vs={class:"row"},bs={class:"col-md-6"},Ps={class:"col-md-6"},Cs={class:"buttons"},Ds={key:6,class:"container-fluid",style:{"margin-bottom":"5em"}},Ws={class:"month col-lg-8"},_s={class:"periode"},js=["href","title"],Ms={key:0},ws={class:"month"},xs={class:"weeks"},Es=["onClick"],Ss=["title"],Ls={key:0,class:"icon-attention-1"},Ts={class:"days"},Os={class:"col-lg-4"},Vs={key:1},qs={class:"text"},zs={key:0,class:"right-menu"},Hs=["onClick"],Is={class:""},Ys={key:0,class:"icon-minus-circled"},As={key:1,class:"icon-lock"},Ns={key:2,class:"icon-ok-circled",style:{color:"#2d7800"}},Us={key:3,class:"icon-help-circled",style:{color:"#777777"}},Rs={class:"text-large"},Fs={class:"card xs total"},Js={class:"week-header"},Bs={class:""},Ks={key:0,class:"text-thin"},Xs={class:"text-big"},Gs={key:0,class:"alert alert-danger"},Qs={key:1,class:"buttons-bar"},Zs={key:2},$s={key:2},el={key:0},tl={class:"card xs"},sl=["onClick"],ll={key:0,class:"icon-ok-circled",style:{color:"#999"}},nl={key:1,class:"icon-attention-circled",style:{color:"#993d00"},title:"La déclaration est incomplète pour cette période"},il={key:2,class:"icon-ok-circled",style:{color:"#2d7800"}},ol=["title"],rl={key:0,class:"icon-attention-1"},al={class:"card xs total interaction-off"},dl={class:"week-header"},ul={class:"text-large"},cl={key:2,class:"alert alert-danger"},ml={class:"card xs"},hl={class:"week-header"},yl={key:0},fl={key:1,class:"icon-cube",title:"Validation projet en attente"},pl={key:2,class:"icon-beaker",title:"Validation scientifique en attente"},kl={key:3,class:"icon-hammer",title:"Validation administrative en attente"},gl={key:4,class:"icon-minus-circled",title:"Il y'a un problème dans la déclaration"},vl={key:5,class:"icon-ok-circled",title:"Cette déclaration est valide"},bl={class:"text-thin"},Pl=["onClick"],Cl={class:"text-large"},Dl={class:"card xs total interaction-off"},Wl={class:"week-header"},_l={class:"text-large"},jl={key:3,class:"alert alert-info"},Ml={class:"card xs"},wl={class:"week-header"},xl={key:0},El={key:1,class:"icon-cube",title:"Validation projet en attente"},Sl={key:2,class:"icon-beaker",title:"Validation scientifique en attente"},Ll={key:3,class:"icon-hammer",title:"Validation administrative en attente"},Tl={key:4,class:"icon-minus-circled",title:"Il y'a un problème dans la déclaration"},Ol={key:5,class:"icon-ok-circled",title:"Cette déclaration est valide"},Vl={class:"text-thin"},ql=["onClick"],zl={class:"subtotal"},Hl={class:"text-large"},Il={class:"card xs total interaction-off"},Yl={class:"week-header"},Al={class:"text-large"},Nl={key:5},Ul={class:"card card-xs"},Rl={key:0,class:"icon-ok-circled"},Fl={key:1,class:"icon-minus-circled"},Jl={key:2,class:"icon-history"},Bl=["onClick"],Kl=["onClick"],Xl={class:"buttons-bar"},Gl={key:0,class:"icon-spinner animate-spin"},Ql={key:1,class:"icon-upload"},Zl={key:2},$l={key:3},en={key:1};function tn(s,e,i,m,l,r){const c=M("timechooser"),b=M("timesheetmonthday"),v=M("timesheetmonthdaydetails"),C=M("wpselector");return o(),a("section",{onClick:e[32]||(e[32]=(...n)=>r.handlerClick&&r.handlerClick(...n)),onKeyup:e[33]||(e[33]=(...n)=>r.handlerKeyDown&&r.handlerKeyDown(...n))},[W(O,{name:"fade"},{default:T(()=>[l.commentEdited?(o(),a("div",dt,[t("div",ut,[t("h2",null,[e[34]||(e[34]=t("i",{class:"icon-comment"},null,-1)),e[35]||(e[35]=d(" Commentaire pour ")),t("strong",null,u(l.commentEditedLabel),1),e[36]||(e[36]=d(" pour ")),t("em",null,u(r.mois),1)]),e[39]||(e[39]=t("div",{class:"alert alert-info"}," Le commentaire saisi sera repris dans le feuille de temps ",-1)),D(t("textarea",{name:"comment",class:y(["form-control",{disabled:!l.ts.editable}]),id:"",cols:"30",rows:"10","onUpdate:modelValue":e[0]||(e[0]=n=>l.commentEditedContent=n)},null,2),[[E,l.commentEditedContent]]),t("nav",ct,[t("button",{class:y(["btn btn-primary",{disabled:!l.ts.editable}]),onClick:e[1]||(e[1]=(...n)=>r.handlerSendComment&&r.handlerSendComment(...n))},e[37]||(e[37]=[t("i",{class:"icon-floppy"},null,-1),d(" Enregistrer le commentaire ")]),2),t("button",{class:"btn btn-default",onClick:e[2]||(e[2]=n=>l.commentEdited=null)},e[38]||(e[38]=[t("i",{class:"icon-cancel-outline"},null,-1),d("Annuler ")]))])])])):h("",!0)]),_:1}),W(O,{name:"fade"},{default:T(()=>[l.screensend?(o(),a("div",mt,[t("div",ht,[t("h2",null,[e[40]||(e[40]=t("i",{class:"icon-paper-plane"},null,-1)),e[41]||(e[41]=d(" Soumettre la déclaration pour ")),t("strong",null,u(r.mois),1)]),t("table",yt,[t("thead",null,[t("tr",null,[e[43]||(e[43]=t("th",{colspan:"2"}," ",-1)),(o(!0),a(p,null,k(l.ts.days,n=>(o(),a("th",null,[t("small",null,u(n.label),1),e[42]||(e[42]=t("br",null,null,-1)),t("strong",null,u(n.i),1)]))),256)),e[44]||(e[44]=t("th",null," Total ",-1))])]),(o(!0),a(p,null,k(r.recapsend.lot,n=>(o(),a("tbody",null,[(o(!0),a(p,null,k(n.activities,f=>(o(),a(p,null,[t("tr",ft,[t("th",{colspan:l.ts.dayNbr+3},[t("h3",null,[t("strong",null,[e[45]||(e[45]=t("i",{class:"icon-cube"},null,-1)),d(" ["+u(f.acronym)+"] "+u(f.label),1)])])],8,pt)]),t("tr",null,[e[46]||(e[46]=t("th",{colspan:"2"}," ",-1)),t("td",{colspan:l.ts.dayNbr},"   ",8,kt),e[47]||(e[47]=t("td",null," ",-1))]),(o(!0),a(p,null,k(f.workpackages,P=>(o(),a("tr",gt,[t("th",vt,[e[48]||(e[48]=t("i",{class:"icon-archive"},null,-1)),d(" "+u(P.label),1)]),(o(!0),a(p,null,k(l.ts.days,L=>(o(),a("td",null,[P.days[L.i]?(o(),a("strong",bt,u(s.$filters.duration2(P.days[L.i],L.dayLength)),1)):(o(),a("small",Pt,"-"))]))),256)),t("th",Ct,u(s.$filters.duration2(P.total,r.monthLength)),1)]))),256)),t("tr",Dt,[e[49]||(e[49]=t("th",{colspan:"2"},"Total",-1)),(o(!0),a(p,null,k(l.ts.days,P=>(o(),a("td",null,[f.days[P.i]?(o(),a("strong",Wt,u(s.$filters.duration2(f.days[P.i],P.dayLength)),1)):(o(),a("small",_t,"-"))]))),256)),t("th",jt,u(s.$filters.duration2(f.total,r.monthLength)),1)])],64))),256))]))),256)),t("tbody",null,[t("tr",null,[t("th",{colspan:l.ts.dayNbr+3},e[50]||(e[50]=[t("h3",null,[t("i",{class:"icon-tags"}),t("strong",null,"Hors-Lot")],-1)]),8,Mt)]),(o(!0),a(p,null,k(r.recapsend.hl,n=>(o(),a("tr",wt,[t("th",null,[t("i",{class:y("icon-"+n.code)},null,2),d(" "+u(n.label),1)]),e[51]||(e[51]=t("td",null,"   ",-1)),(o(!0),a(p,null,k(l.ts.days,f=>(o(),a("td",null,[n.days[f.i]?(o(),a("strong",xt,u(s.$filters.duration2(n.days[f.i],f.dayLength)),1)):(o(),a("small",Et,"-"))]))),256)),t("th",St,u(s.$filters.duration2(n.total,r.monthLength)),1)]))),256))]),t("tbody",null,[t("tr",null,[t("th",{colspan:l.ts.dayNbr+3},e[52]||(e[52]=[t("h3",null,[t("strong",null,"Total")],-1)]),8,Lt)]),t("tr",Tt,[e[53]||(e[53]=t("th",{colspan:"2"}," = ",-1)),(o(!0),a(p,null,k(l.ts.days,n=>(o(),a("td",null,[n.total?(o(),a("strong",Ot,u(s.$filters.duration2(n.total,n.dayLength)),1)):(o(),a("small",Vt,"-"))]))),256)),t("th",qt,u(s.$filters.duration2(l.ts.total,r.monthLength)),1)])])]),(o(!0),a(p,null,k(r.recapsend.lot,n=>(o(),a("div",null,[(o(!0),a(p,null,k(n.activities,f=>(o(),a("div",null,[t("h5",null,[t("strong",null,[e[54]||(e[54]=t("i",{class:"icon-cube"},null,-1)),d(" ["+u(f.acronym)+"] "+u(f.label),1)])]),e[55]||(e[55]=t("strong",null,"Commentaires : ",-1)),e[56]||(e[56]=t("br",null,null,-1)),D(t("textarea",{class:"form-control","onUpdate:modelValue":P=>l.screensend[f.id]=P,style:{"max-width":"100%"}},null,8,zt),[[E,l.screensend[f.id]]])]))),256))]))),256)),(o(!0),a(p,null,k(r.recapsend.hl,n=>(o(),a("div",null,[t("h5",null,[t("strong",null,[t("i",{class:y(["icon","icon-"+n.code])},null,2),d(" "+u(n.label),1)])]),D(t("textarea",{class:"form-control","onUpdate:modelValue":f=>l.screensend[n.code]=f,style:{"max-width":"100%"}},null,8,Ht),[[E,l.screensend[n.code]]])]))),256)),t("nav",It,[t("button",{class:"btn btn-primary",onClick:e[3]||(e[3]=(...n)=>r.sendMonthProceed&&r.sendMonthProceed(...n))},"Envoyer la déclaration"),t("button",{class:"btn btn-default",onClick:e[4]||(e[4]=n=>l.screensend=null)},"Annuler")])])])):h("",!0)]),_:1}),W(O,{name:"fade"},{default:T(()=>[l.configureColor?(o(),a("div",Yt,[t("div",At,[e[58]||(e[58]=t("h2",null,[t("i",{class:"icon-tags"}),d(" Couleurs des activités ")],-1)),e[59]||(e[59]=t("p",{class:"alert alert-help"}," Vous pouvez ici modifier les couleurs de projets affichés dans le calendrier ",-1)),(o(!0),a(p,null,k(l.ts.activities,n=>(o(),a("article",null,[t("strong",{class:"cartouche",style:q({"background-color":r.getAcronymColor(n.acronym)})},[d(u(n.acronym)+" ",1),t("em",Nt,u(s.$filters.strReduce(n.label,50)),1)],4),D(t("input",{type:"color",onChange:f=>r.handlerChangeColor(n.acronym,f),"onUpdate:modelValue":f=>l._colorsProjects[n.acronym]=f},null,40,Ut),[[E,l._colorsProjects[n.acronym]]])]))),256)),e[60]||(e[60]=t("hr",null,null,-1)),t("nav",Rt,[t("button",{class:"btn btn-primary",onClick:e[5]||(e[5]=n=>l.configureColor=!1)},e[57]||(e[57]=[t("i",{class:"icon-cancel-alt"},null,-1),d(" Terminé ")]))])])])):h("",!0)]),_:1}),l.error?(o(),a("div",Ft,[t("div",Jt,[e[61]||(e[61]=t("h2",null,[t("i",{class:"icon-attention-1"}),d(" Oups !")],-1)),t("pre",Bt,u(l.error),1),e[62]||(e[62]=t("p",{class:"text-danger"}," Si ce message ne vous aide pas, transmettez le à l'administrateur Oscar. ",-1)),t("nav",Kt,[t("button",{class:"btn btn-primary",onClick:e[6]||(e[6]=n=>l.error="")},"Fermer")])])])):h("",!0),l.rejectPeriod?(o(),a("div",Xt,[t("div",Gt,[e[72]||(e[72]=t("h2",null,[t("i",{class:"icon-attention-1"}),d(" Déclaration rejetée !")],-1)),l.rejectPeriod.rejectadmin_at?(o(),a("div",Qt,[t("p",null,[e[63]||(e[63]=d("Déclaration rejetée administrativement par ")),t("strong",null,u(l.rejectPeriod.rejectadmin_by),1),e[64]||(e[64]=d(" le ")),t("time",null,u(l.rejectPeriod.rejectadmin_at),1)]),t("pre",null,[e[65]||(e[65]=t("strong",null,"Motif : ",-1)),d(u(l.rejectPeriod.rejectadmin_message),1)])])):l.rejectPeriod.rejectsci_at?(o(),a("div",Zt,[t("p",null,[e[66]||(e[66]=d("Déclaration rejetée scientifiquement par ")),t("strong",null,u(l.rejectPeriod.rejectsci_by),1),e[67]||(e[67]=d(" le ")),t("time",null,u(l.rejectPeriod.rejectsci_at),1)]),t("pre",null,[e[68]||(e[68]=t("strong",null,"Motif : ",-1)),d(u(l.rejectPeriod.rejectsci_message),1)])])):l.rejectPeriod.rejectactivity_at?(o(),a("div",$t,[t("p",null,[e[69]||(e[69]=d("Déclaration rejetée par ")),t("strong",null,u(l.rejectPeriod.rejectactivity_by),1),e[70]||(e[70]=d(" le ")),t("time",null,u(l.rejectPeriod.rejectactivity_at),1)]),t("pre",null,[e[71]||(e[71]=t("strong",null,"Motif : ",-1)),d(u(l.rejectPeriod.rejectactivity_message),1)])])):h("",!0),t("nav",es,[t("button",{class:"btn btn-primary",onClick:e[7]||(e[7]=n=>l.rejectPeriod=null)},"Fermer")])])])):h("",!0),l.popup?(o(),a("div",ts,[t("div",ss,[e[73]||(e[73]=t("h2",null,"Historique",-1)),t("pre",ls,u(l.popup),1),t("nav",ns,[t("button",{class:"btn btn-primary",onClick:e[8]||(e[8]=n=>l.popup="")},"Fermer")])])])):h("",!0),l.help?(o(),a("div",is,[t("div",os,[e[86]||(e[86]=t("h2",null,[t("i",{class:"icon-help-circled"}),d(" Informations légales")],-1)),e[87]||(e[87]=t("p",null,[d(" Dans le cadre des projets soumis aux feuilles de temps, l'organisme financeur impose la justification des heures, "),t("strong",null,"incluant les activités hors-projets"),d(". Le culum des heures déclarées doit respecter le cadre légale : "),t("br")],-1)),l.ts?(o(),a("ul",rs,[t("li",null,[e[74]||(e[74]=d("Durée ")),e[75]||(e[75]=t("em",null,"normal",-1)),e[76]||(e[76]=d(" d'une journée : ")),t("strong",null,u(l.ts.daylength|s.duration),1)]),t("li",null,[e[77]||(e[77]=d("Durée ")),e[78]||(e[78]=t("strong",null,"maximum légale",-1)),e[79]||(e[79]=d(" d'une journée : ")),t("strong",null,u(l.ts.dayExcess|s.duration),1)]),t("li",null,[e[80]||(e[80]=d("Durée ")),e[81]||(e[81]=t("strong",null,"maximum légale",-1)),e[82]||(e[82]=d(" d'une semaine : ")),t("strong",null,u(l.ts.weekExcess|s.duration),1)]),t("li",null,[e[83]||(e[83]=d("Durée ")),e[84]||(e[84]=t("strong",null,"maximum légale",-1)),e[85]||(e[85]=d(" d'un mois : ")),t("strong",null,u(l.ts.monthExcess|s.duration),1)])])):h("",!0),e[88]||(e[88]=t("p",null,[d(" Selon les modalités de financement, les dépacements (même en éxcédent) peuvent être considérés comme des "),t("em",null,"irrégularité"),d(" pouvant déclencher la suspension ou le remboursement des financements engagés ou à venir. ")],-1)),t("nav",as,[t("button",{class:"btn btn-primary",onClick:e[9]||(e[9]=n=>l.help="")},"Fermer")])])])):h("",!0),l.debug?(o(),a("div",ds,[t("div",us,[e[89]||(e[89]=t("h2",null,[t("i",{class:"icon-bug"}),d(" Debug")],-1)),t("pre",cs,u(l.debug),1),t("nav",ms,[t("button",{class:"btn btn-primary",onClick:e[10]||(e[10]=n=>l.debug="")},"Fermer")])])])):h("",!0),r.selectedDay&&l.selectionWP&&l.selectionWP.code?(o(),a("div",hs,[t("div",ys,[t("section",null,[l.selectionWP.id?(o(),a("h3",fs,[e[91]||(e[91]=t("small",null,"Déclaration pour le lot",-1)),t("strong",null,[e[90]||(e[90]=t("i",{class:"icon-archive"},null,-1)),t("abbr",null,u(l.selectionWP.code),1),d(" "+u(l.selectionWP.label),1)])])):(o(),a("h3",ps,[e[92]||(e[92]=t("small",null,"Déclaration hors-lot pour",-1)),t("strong",null,[t("i",{class:y("icon-"+l.selectionWP.code)},null,2),d(" "+u(l.selectionWP.label),1)])]))]),l.selectionWP.validation_up!=!0?(o(),a("div",ks," Vous ne pouvez plus ajouter de créneaux pour ce lot sur cette période ")):(o(),a("div",gs,[t("p",null,[e[93]||(e[93]=t("i",{class:"icon-calendar"},null,-1)),e[94]||(e[94]=d(" Journée : ")),t("strong",null,u(s.$filters.date(r.selectedDay.date)),1),e[95]||(e[95]=t("br",null,null,-1))]),t("div",vs,[t("div",bs,[e[96]||(e[96]=t("h4",null,"Temps",-1)),W(c,{onTimeupdate:r.handlerDayUpdated,declarationInHours:i.declarationInHours,baseTime:r.selectedDay.dayLength,fill:r.fillDayValue,"default-duration":l.dayMenuTime},null,8,["onTimeupdate","declarationInHours","baseTime","fill","default-duration"])]),t("div",Ps,[e[97]||(e[97]=t("h4",null,"Commentaire",-1)),D(t("textarea",{class:"form-control textarea","onUpdate:modelValue":e[11]||(e[11]=n=>l.commentaire=n)},null,512),[[E,l.commentaire]])])])])),t("nav",Cs,[t("button",{class:"btn btn-default",onClick:e[12]||(e[12]=n=>l.selectionWP=null)},e[98]||(e[98]=[t("i",{class:"icon-block"},null,-1),d(" Annuler ")])),l.selectionWP.validation_up==!0?(o(),a("button",{key:0,class:"btn btn-primary",onClick:e[13]||(e[13]=(...n)=>r.handlerSaveMenuTime&&r.handlerSaveMenuTime(...n))},e[99]||(e[99]=[t("i",{class:"icon-floppy"},null,-1),d(" Valider ")]))):h("",!0)])])])):h("",!0),l.ts?(o(),a("section",Ds,[t("div",Ws,[t("h2",null,[e[101]||(e[101]=d(" Déclarations de temps pour ")),t("strong",null,u(l.ts.person),1),t("small",{style:{position:"absolute",right:"0","font-size":"14px",cursor:"pointer"},onClick:e[14]||(e[14]=n=>l.configureColor=!0)},e[100]||(e[100]=[d(" Options "),t("i",{class:"icon-cog"},null,-1)]))]),t("h3",_s,[e[107]||(e[107]=d("Période ")),t("a",{href:"#",onClick:e[15]||(e[15]=g((...n)=>r.prevMonth&&r.prevMonth(...n),["prevent"]))},e[102]||(e[102]=[t("i",{class:"icon-angle-left"},null,-1)])),t("strong",{onClick:e[16]||(e[16]=g(n=>l.debug=l.ts,["shift"]))},u(r.mois),1),t("a",{href:"#",onClick:e[17]||(e[17]=g((...n)=>r.nextMonth&&r.nextMonth(...n),["prevent"]))},e[103]||(e[103]=[t("i",{class:"icon-angle-right"},null,-1)])),i.urlImport?(o(),a("a",{key:0,class:y(["btn btn-default",{disabled:!l.ts.submitable}]),href:i.urlImport+"&period="+r.periodCode,title:l.ts.submitable?"":"Vous ne pouvez pas importer pour cette période"},[e[104]||(e[104]=t("i",{class:"icon-calendar"},null,-1)),e[105]||(e[105]=d(" Importer un calendrier")),e[106]||(e[106]=t("br",null,null,-1)),l.ts.submitable?h("",!0):(o(),a("small",Ms," Vous ne pouvez pas importer pour une période en cours/déjà envoyée "))],10,js)):h("",!0)]),t("div",ws,[e[109]||(e[109]=t("header",{class:"month-header"},[t("strong",null,"Lundi"),t("strong",null,"Mardi"),t("strong",null,"Mercredi"),t("strong",null,"Jeudi"),t("strong",null,"Vendredi"),t("strong",null,"Samedi"),t("strong",null,"Dimanche")],-1)),t("div",xs,[l.ts?(o(!0),a(p,{key:0},k(r.weeks,n=>(o(),a("section",{class:y(["week",l.selectedWeek&&l.selectedWeek.label==n.label?"selected":""])},[t("header",{class:"week-header",onClick:f=>r.selectWeek(n)},[t("span",null,"Semaine "+u(n.label),1),t("small",null,[e[108]||(e[108]=t("em",null,"Cumul des heures : ",-1)),t("strong",{class:y(n.total>n.weekExcess?"has-titled-error":""),title:n.total>n.weekExcess?"Les heures excédentaires risques d'être ignorées lors d'une justification financière dans le cadre des projets soumis aux feuilles de temps":""},[n.total>n.weekExcess?(o(),a("i",Ls)):h("",!0),d(" "+u(s.$filters.duration2(n.total,n.weekLength)),1)],10,Ss)])],8,Es),t("div",Ts,[(o(!0),a(p,null,k(n.days,f=>(o(),z(b,{class:y(r.selectedDay==f?"selected":""),others:l.ts.otherWP,projectscolors:l._colorsProjects,onSelectDay:P=>r.handlerSelectDay(f),onDaymenu:r.handlerDayMenu,onDebug:e[18]||(e[18]=P=>l.debug=P),day:f,key:f.date},null,8,["class","others","projectscolors","onSelectDay","onDaymenu","day"]))),128))])],2))),256)):h("",!0)])])]),t("section",Os,[r.selectedDay?(o(),z(v,{key:0,day:r.selectedDay,workPackages:l.ts.workpackages,others:l.ts.otherWP,selection:l.selectionWP,editable:l.ts.editable,label:r.dayLabel,"day-excess":l.ts.dayExcess,copiable:l.clipboardDataDay,onDebug:e[19]||(e[19]=n=>l.debug=n),onCopy:r.handlerCopyDay,onPaste:r.handlerPasteDay,onCancel:e[20]||(e[20]=n=>l.selectedDayData=null),onRemovetimesheet:r.deleteTimesheet,onEdittimesheet:r.editTimesheet,onAddtowp:e[21]||(e[21]=n=>r.handlerWpFromDetails(n))},null,8,["day","workPackages","others","selection","editable","label","day-excess","copiable","onCopy","onPaste","onRemovetimesheet","onEdittimesheet"])):l.selectedWeek?(o(),a("div",Vs,[t("h3",{onClick:e[24]||(e[24]=g(n=>l.debug=l.selectedWeek,["shift"])),class:"title-with-menu"},[t("div",qs,[e[110]||(e[110]=t("i",{class:"icon-calendar"},null,-1)),t("strong",null,"Semaine "+u(l.selectedWeek.label),1)]),l.ts.editable?(o(),a("nav",zs,[t("a",{href:"#",onClick:e[22]||(e[22]=n=>r.handlerCopyWeek(l.selectedWeek)),title:"Copier les créneaux de la semaine"},e[111]||(e[111]=[t("i",{class:"icon-docs"},null,-1)])),D(t("a",{href:"#",onClick:e[23]||(e[23]=n=>r.handlerPasteWeek(l.selectedWeek)),title:"Coller les créneaux"},e[112]||(e[112]=[t("i",{class:"icon-paste"},null,-1)]),512),[[S,s.clipboardData]])])):h("",!0)]),t("a",{class:"btn btn-default",onClick:e[25]||(e[25]=n=>l.selectedWeek=null)},e[113]||(e[113]=[t("i",{class:"icon-angle-left"},null,-1),d(" Revenir au mois ")])),e[127]||(e[127]=t("h4",null,"Jours : ",-1)),(o(!0),a(p,null,k(l.selectedWeek.days,n=>(o(),a("article",{class:y(["card xs total repport-item",{locked:n.locked,closed:n.closed,excess:n.duration>l.ts.dayExcess}]),onClick:f=>r.handlerSelectDay(n)},[t("div",{class:y(["week-header",{"text-thin":n.closed||n.locked}])},[t("span",Is,[e[114]||(e[114]=t("i",{class:"icon-calendar"},null,-1)),n.closed?(o(),a("i",Ys)):n.locked?(o(),a("i",As)):n.total>n.amplitudemin&&n.totall.ts.weekExcess?(o(),a("div",Gs,[e[120]||(e[120]=t("i",{class:"icon-attention-1"},null,-1)),e[121]||(e[121]=d(" Vos déclarations pour cette semaine dépasse la limite légale fixée à ")),t("strong",null,u(l.ts.weekExcess|s.duration),1),e[122]||(e[122]=d(" heures. "))])):h("",!0),l.selectedWeek.total>0?(o(),a("nav",Qs,[l.ts.editable?(o(),a("button",{key:0,class:"btn btn-danger btn-xs",onClick:e[26]||(e[26]=n=>r.deleteWeek(l.selectedWeek))},e[123]||(e[123]=[t("i",{class:"icon-trash"},null,-1),d(" Supprimer les déclarations non-envoyées ")]))):h("",!0)])):h("",!0),l.selectedWeek.total{l.fillSelectedWP=n,r.fillWeek(l.selectedWeek,l.fillSelectedWP)}),usevalidation:!0},null,8,["others","workpackages","selection"])])):h("",!0)])):(o(),a("div",$s,[t("h3",{onClick:e[28]||(e[28]=g(n=>l.debug=l.ts,["prevent","shift","stop"]))},[e[128]||(e[128]=t("i",{class:"icon-calendar"},null,-1)),e[129]||(e[129]=d(" Mois de ")),t("strong",null,u(r.mois),1)]),r.monthRest>0&&l.ts.periodFinished?(o(),a("section",el,[e[130]||(e[130]=t("p",null,[t("i",{class:"icon-help-circled"}),d(" Vous pouvez compléter automatiquement ce mois avec : ")],-1)),W(C,{others:l.ts.otherWP,workpackages:l.ts.workpackages,selection:l.fillMonthWP,usevalidation:!0,onSelect:e[29]||(e[29]=n=>{l.fillMonthWP=n,r.handlerFillMonth(l.fillMonthWP)})},null,8,["others","workpackages","selection"])])):h("",!0),e[142]||(e[142]=t("hr",null,null,-1)),l.ts?(o(!0),a(p,{key:1},k(r.weeks,n=>(o(),a("section",tl,[t("header",{class:"week-header",onClick:f=>r.selectWeek(n)},[t("span",null,[d(" Semaine "+u(n.label)+" ",1),n.totaln.weekExcess?(o(),a("i",nl)):(o(),a("i",il))]),t("small",null,[t("strong",{class:y(n.total>n.weekExcess?"has-titled-error":""),title:n.total>n.weekExcess?"Les décalarations dépassent la limite légales et risques d'être ignorées lors d'une justification financière dans le cadre des projets soumis aux feuilles de temps":""},[n.total>n.weekExcess?(o(),a("i",rl)):h("",!0),d(" "+u(s.$filters.duration2(n.total,n.weekLength)),1)],10,ol)])],8,sl)]))),256)):h("",!0),t("section",al,[t("div",dl,[e[131]||(e[131]=t("span",{class:"text-big text-xxl"},"Total",-1)),t("small",null,[t("strong",ul,u(s.$filters.duration2(l.ts.total,r.monthLength)),1)])])]),l.ts.total>l.ts.monthExcess?(o(),a("div",cl,[e[132]||(e[132]=t("i",{class:"icon-attention-circled"},null,-1)),e[133]||(e[133]=d(" Les heures mensuelles dépassent le cadre légale fixé à ")),t("strong",null,u(l.ts.monthExcess|s.duration),1),e[134]||(e[134]=d(" heures. "))])):h("",!0),e[143]||(e[143]=t("hr",null,null,-1)),e[144]||(e[144]=t("h4",null,[t("i",{class:"icon-tags"}),d(" Hors-lot")],-1)),(o(!0),a(p,null,k(l.ts.otherWP,(n,f)=>(o(),a("section",ml,[t("div",hl,[t("span",null,[t("i",{class:y("icon-"+n.code)},null,2),d(" "+u(n.label)+" ",1),n.validation_state==null?(o(),a("i",yl)):n.validation_state.status=="send-prj"?(o(),a("i",fl)):n.validation_state.status=="send-sci"?(o(),a("i",pl)):n.validation_state.status=="send-adm"?(o(),a("i",kl)):n.validation_state.status=="conflict"?(o(),a("i",gl)):n.validation_state.status=="valid"?(o(),a("i",vl)):h("",!0),e[136]||(e[136]=t("br",null,null,-1)),t("em",bl,u(n.description),1),t("button",{class:"btn btn-default btn-xs",onClick:g(P=>r.handledEditComment("hl",n),["prevent"])},e[135]||(e[135]=[t("i",{class:"icon-chat-alt"},null,-1),d(" Commentaire ")]),8,Pl)]),t("small",null,[t("strong",Cl,u(s.$filters.duration2(n.total,r.monthLength)),1)])])]))),256)),t("section",Dl,[t("div",Wl,[e[137]||(e[137]=t("span",{class:"text-big text-xxl"},"Total",-1)),t("small",null,[t("strong",_l,u(s.$filters.duration2(r.totalWP,r.monthLength)),1)])])]),e[145]||(e[145]=t("h4",null,[t("i",{class:"icon-cubes"}),d(" Activités pour cette période")],-1)),l.ts.activities.length==0?(o(),a("p",jl," Vous n'être identifié comme déclarant sur aucune activité pour cette période. Si cette situation vous semble anormale, prenez contact avec votre responsable scientifique. ")):(o(!0),a(p,{key:4},k(l.ts.activities,n=>(o(),a("section",Ml,[t("div",wl,[t("span",null,[t("strong",null,u(n.acronym),1),t("span",{class:"icon-tag",style:q({color:l._colorsProjects[n.acronym]}),onClick:e[30]||(e[30]=f=>l.configureColor=!0)}," ",4),n.validation_state==null?(o(),a("i",xl)):n.validation_state.status=="send-prj"?(o(),a("i",El)):n.validation_state.status=="send-sci"?(o(),a("i",Sl)):n.validation_state.status=="send-adm"?(o(),a("i",Ll)):n.validation_state.status=="conflict"?(o(),a("i",Tl)):n.validation_state.status=="valid"?(o(),a("i",Ol)):h("",!0),e[139]||(e[139]=t("br",null,null,-1)),t("em",Vl,u(n.label),1),t("button",{class:"btn btn-default btn-xs",onClick:g(f=>r.handledEditComment("prj",n),["prevent"])},e[138]||(e[138]=[t("i",{class:"icon-chat-alt"},null,-1),d(" Commentaire ")]),8,ql)]),t("small",zl,[t("strong",Hl,u(s.$filters.duration2(n.total,r.monthLength)),1)])])]))),256)),t("section",Il,[t("div",Yl,[e[140]||(e[140]=t("span",null,[t("strong",{class:"text-big text-xxl"},"Total"),t("br"),t("small",null,"Pour les activités soumises aux déclarations")],-1)),t("small",null,[t("strong",Al,u(s.$filters.duration2(l.ts.periodDeclarations,r.monthLength)),1)])])]),l.ts.periodsValidations.length?(o(),a("div",Nl,[e[141]||(e[141]=t("h3",null,"Procédures de validation pour cette période",-1)),(o(!0),a(p,null,k(l.ts.periodsValidations,n=>(o(),a("section",Ul,[n.status=="valid"?(o(),a("i",Rl)):n.status=="conflict"?(o(),a("i",Fl)):(o(),a("i",Jl)),d(" "+u(n.label)+" ",1),t("a",{href:"#",onClick:f=>l.popup=n.log},"Historique",8,Bl),n.status=="conflict"&&(n.rejectadmin_message||n.rejectsci_message||n.rejectactivity_message)?(o(),a("a",{key:3,href:"#",onClick:f=>l.rejectPeriod=n},"Détails sur le rejet",8,Kl)):h("",!0)]))),256))])):h("",!0)])),t("nav",Xl,[l.ts.submitable?(o(),a("button",{key:0,class:y(["btn btn-primary",{disabled:!l.ts.submitable,enabled:l.ts.submitable&&!l.loading}]),style:{"margin-left":"auto"},onClick:e[31]||(e[31]=n=>r.validateMonth())},[l.loading?(o(),a("i",Gl)):(o(),a("i",Ql)),l.ts.hasConflict?(o(),a("span",Zl,"Réenvoyer")):(o(),a("span",$l,"Soumettre mes déclarations"))],2)):(o(),a("span",en,[e[146]||(e[146]=d(" Vous ne pouvez pas soumettre cette période")),e[147]||(e[147]=t("br",null,null,-1)),t("small",null,u(l.ts.submitableInfos),1)]))])])])):h("",!0)],32)}const sn=w(at,[["render",tn]]);let Y="#timesheet-declaration",j=document.querySelector(Y);const A=j.dataset.declarationInHours==="true",N=R(sn,{url:j.dataset.url,"url-validation":j.dataset.urlValidation,"url-import":j.dataset.urlImport,"default-year":j.dataset.defaultYear,"default-month":j.dataset.defaultMonth,"declaration-in-hours":A}),H={"send-prj":"Validation projet","send-sci":"Validation scientifique","send-adm":"Validation administrative",conflict:"Conflit",valid:"Validé"};N.config.globalProperties.$filters={timeAgo(s){return V.timeAgo(s)},date(s){return V.date(s)},dateFull(s){return V.dateFull(s)},filesize(s){return F.filesize(s)},money(s){return J.money(s)},duration2(s,e){if(A){let i=60*s,m=Math.floor(i/60),l=i%60;return l<10&&(l="0"+l),`${m}:${l}`}else return e===void 0?s:s===0?0:Math.round(100/e*s)+"%"},strReduce(s,e=20){return s.length>e?s.substring(0,e-3)+"...":s},statusLabel(s){return H.hasOwnProperty(s)?H[s]:"Brouillon"}};N.mount(Y); diff --git a/public/js/oscar/vite/dist/assets/timesheetpersonresume-14fb87b2.js b/public/js/oscar/vite/dist/assets/timesheetpersonresume-14fb87b2.js new file mode 100644 index 0000000000000000000000000000000000000000..08a9fd3e95dc1bde4dd25a7fff19a83f45b60656 --- /dev/null +++ b/public/js/oscar/vite/dist/assets/timesheetpersonresume-14fb87b2.js @@ -0,0 +1 @@ +import{o as s,c as l,d as t,t as o,g as _,F as m,k as f,n as y,a as u,A as D}from"../vendor.js";import{A as x}from"../vendor8.js";import{_ as O}from"../vendor7.js";import{m as P}from"../vendor2.js";import{D as w}from"../vendor22.js";import"../vendor14.js";import"../vendor16.js";const A={props:{url:{required:!0},timesheetpreview:{default:!1},timesheetexcel:{default:!1}},data(){return{debug:null,datas:null}},computed:{years(){let i={};return Object.keys(this.datas.periods).forEach(h=>{if(!this.datas.periods[h].futur){let d=this.datas.periods[h],v=h.split("-"),r=v[0];v[1],i.hasOwnProperty(r)||(i[r]={periods:{},total:0,periodDuration:0,total_activities:0,total_horslots:0,total_activities_details:{},total_horslots_details:{}});let c=i[r];c.periods[h]=d,c.total+=d.total,c.periodDuration+=d.periodDuration,c.total_activities+=d.total_activities,c.total_horslots+=d.total_horslots,d.horslots_details&&Object.keys(d.horslots_details).forEach(a=>{c.total_horslots_details.hasOwnProperty(a)||(c.total_horslots_details[a]={total:0,days:0,events:0}),c.total_horslots_details[a].total+=d.horslots_details[a].total}),d.activities_details&&Object.keys(d.activities_details).forEach(a=>{d.activities_details[a],c.total_activities_details.hasOwnProperty(a)||(c.total_activities_details[a]={total:0,days:0,events:0}),c.total_activities_details[a].total+=d.activities_details[a].total,c.total_activities_details[a].days+=d.activities_details[a].days.length,c.total_activities_details[a].events+=d.activities_details[a].events})}}),i},periods(){let i=[];return Object.keys(this.datas.periods).forEach(h=>{i.push(this.datas.periods[h])}),i}},methods:{getActivity(i){},fetch(){x.get(this.url,{pendingMsg:"Chargement des feuilles de temps"}).then(i=>{this.datas=i.data},i=>{})}},mounted(){console.log("mounted",this.url),this.fetch()}},j={key:0},T=t("h1",null,"Vos déclarations",-1),C={key:0,class:"overlay"},F={class:"overlay-content"},V={class:"table declarations-resume"},E=t("thead",null,[t("tr",null,[t("th",null,"Période"),t("th",null,"Déclarations"),t("th",null,"Com"),t("th",null,"Activité"),t("th",null,"Hors-lots"),t("th",null,"Total"),t("th",null,"Actions")])],-1),q={class:"heading-year"},N={colspan:"7"},R={class:"yearrow"},B={class:"period"},$=["onClick"],z={key:0,class:"icon-ellipsis",title:"Aucune déclaration requise pour cette période"},S={key:1,class:"icon-attention-1",title:"Il faut déclarer pour cette période"},H={key:2,class:"icon-calendar",title:"Procédure de déclaration en cours"},L={class:"required"},M={key:0},Y={key:0},G={key:0},J={class:"cartouche"},Q=t("i",{class:"icon-user"},null,-1),U={key:1,class:"btn-group btn-group-sm"},W=t("a",{href:"#",class:"btn",style:{color:"#555","pointer-events":"none"}},[t("i",{class:"icon-calendar"}),u(" Feuille de temps ")],-1),X=["href"],Z=t("i",{class:"icon-file-excel"},null,-1),K=["href"],I=t("i",{class:"icon-file-pdf"},null,-1),tt={key:2},et={key:1},st={key:0,class:"commentaires"},lt={class:"commentaire"},ot={key:1},it={class:"soustotal"},at={class:"table-condensed table table-packed"},nt=t("i",{class:"icon-cube"},null,-1),rt=["title"],dt={key:0},ct={key:1},_t={key:0},ut={key:1},ht={class:"text-right"},mt={key:0},ft=t("th",null,"Total",-1),vt={colspan:"3",class:"text-right"},gt={class:"soustotal text-right"},bt={key:0,class:"table-condensed table"},yt={key:0},kt=t("th",null,"Total",-1),pt={key:1},Dt={class:"soustotal total text-right",style:{"white-space":"nowrap"}},xt=t("i",{class:"icon-time icon-clock"},null,-1),Ot={class:"total text-right"},Pt={class:"text-danger"},wt={key:0},At=["href"],jt=t("i",{class:"icon-edit"},null,-1),Tt=["href"],Ct=t("i",{class:"icon-zoom-in-outline"},null,-1),Ft=["href"],Vt=t("i",{class:"icon-calendar"},null,-1),Et=["href"],qt=t("i",{class:"icon-file-pdf"},null,-1),Nt={class:"line-total"},Rt=t("th",null,"-",-1),Bt=t("th",null,"-",-1),$t={class:"soustotal"},zt={class:"table-condensed table"},St=t("i",{class:"icon-cube"},null,-1),Ht={class:"text-right"},Lt=t("th",null,"Total",-1),Mt=t("td",null,"-",-1),Yt=t("td",null,"-",-1),Gt={class:"text-right"},Jt={class:"text-right soustotal"},Qt={class:"table-condensed table"},Ut={class:"text-right"},Wt=t("th",null,"Total",-1),Xt=t("td",null,"-",-1),Zt=t("td",null,"-",-1),Kt={class:"text-right"},It={class:"text-right soustotal"},te=t("th",null," ",-1),ee={key:1};function se(i,h,d,v,r,c){return r.datas?(s(),l("div",j,[T,r.debug?(s(),l("div",C,[t("div",F,[t("button",{onClick:h[0]||(h[0]=a=>r.debug=null)},"close"),t("pre",null,o(r.debug),1)])])):_("",!0),t("table",V,[E,(s(!0),l(m,null,f(c.years,(a,b)=>(s(),l(m,null,[t("tr",q,[t("th",N,o(b),1)]),t("tbody",R,[(s(!0),l(m,null,f(a.periods,e=>(s(),l("tr",{class:y({"valid-100":e.total==e.periodDuration,"valid-95":e.total>=e.periodDuration*.95&&e.totale.periodDuration,"error-105":e.total>e.periodDuration*1.05,"error-95":e.totalr.debug=e},[e.activities_id.length==0?(s(),l("i",z)):_("",!0),e.activities_id.length&&!e.validations_id.length&&e.past?(s(),l("i",S)):_("",!0),e.activities_id.length&&e.validations_id.length?(s(),l("i",H)):_("",!0),u(" "+o(i.$filters.period(e.period)),1)],8,$)]),t("td",L,[e.activities_id.length?(s(),l("em",M,[e.validations_id.length?(s(),l("span",Y,[t("i",{class:y("icon-"+e.validation_state)},null,2),e.validators.length?(s(),l("small",G,[u(" Validateur(s) : "),(s(!0),l(m,null,f(e.validators,n=>(s(),l("strong",J,[Q,u(" "+o(n),1)]))),256))])):_("",!0)])):_("",!0),e.validation_state=="valid"?(s(),l("span",U,[W,d.timesheetexcel?(s(),l("a",{key:0,href:"/feuille-de-temps/excel?action=export&period="+e.period+"&personid="+e.person_id,class:"btn btn-primary btn-sm"},[Z,u(" Excel ")],8,X)):_("",!0),e.validation_state=="valid"?(s(),l("a",{key:1,href:"/feuille-de-temps/excel?action=export2&period="+e.period+"&personid="+e.person_id,class:"btn btn-primary btn-sm"},[I,u(" PDF ")],8,K)):_("",!0)])):_("",!0),e.validations_id.length==0?(s(),l("em",tt," Pas de déclaration envoyée ")):_("",!0)])):(s(),l("em",et," Facultatif "))]),t("td",null,[e.commentaires&&e.commentaires.length?(s(),l("p",st,[(s(!0),l(m,null,f(e.commentaires,n=>(s(),l("span",lt,o(n),1))),256))])):(s(),l("em",ot," Aucun "))]),t("td",it,[t("table",at,[t("tbody",null,[(s(!0),l(m,null,f(e.activities_id,n=>(s(),l("tr",null,[t("th",null,[nt,t("span",{title:r.datas.activities[n].acronym+" : "+r.datas.activities[n].label},o(r.datas.activities[n].acronym),9,rt)]),t("td",null,[e.activities_details&&e.activities_details[n]?(s(),l("em",dt,o(e.activities_details[n].days.length)+" jr ",1)):(s(),l("small",ct," Rien "))]),t("td",null,[e.activities_details&&e.activities_details[n]?(s(),l("em",_t,o(e.activities_details[n].events)+" cr ",1)):(s(),l("small",ut," Rien "))]),t("td",ht,[t("strong",null,o(i.$filters.formatDuration(e.total_activities_details[n])),1)])]))),256))]),t("tfoot",null,[e.activities_details&&Object.keys(e.activities_details).length>1?(s(),l("tr",mt,[ft,t("td",vt,[t("strong",null,o(i.$filters.formatDuration(e.total_activities)),1)])])):_("",!0)])])]),t("td",gt,[e.horslots_details&&Object.keys(e.horslots_details).length?(s(),l("table",bt,[(s(!0),l(m,null,f(e.horslots_details,(n,p)=>(s(),l("tr",null,[t("th",null,o(r.datas.horslots[p].label),1),t("td",null,[t("strong",null,o(i.$filters.formatDuration(n.total)),1)])]))),256)),e.horslots_details&&Object.keys(e.horslots_details).length>1?(s(),l("tfoot",yt,[t("tr",null,[kt,t("td",null,[t("strong",null,o(i.$filters.formatDuration(e.total_horslots)),1)])])])):_("",!0)])):(s(),l("small",pt," Vide "))]),t("td",Dt,[xt,t("strong",null,o(i.$filters.formatDuration(e.total)),1),u(),t("small",null,"/ "+o(i.$filters.formatDuration(e.periodDuration)),1)]),t("td",Ot,[t("em",Pt,o(e.error),1),r.datas.owner?(s(),l("span",wt,[e.validation_state=="conflict"?(s(),l("a",{key:0,class:"xs btn btn-primary btn-xs",href:"/feuille-de-temps/declarant?month="+e.month+"&year="+e.year},[jt,u(" Corriger ")],8,At)):e.validations_id.length>0?(s(),l("a",{key:1,class:"xs btn btn-default btn-xs",href:"/feuille-de-temps/declarant?month="+e.month+"&year="+e.year},[Ct,u(" Visualiser ")],8,Tt)):(s(),l("a",{key:2,class:"xs btn btn-primary btn-xs",href:"/feuille-de-temps/declarant?month="+e.month+"&year="+e.year},[Vt,u(" Déclarer ")],8,Ft))])):_("",!0),d.timesheetpreview&&e.validation_state!="valid"?(s(),l("a",{key:1,href:"/feuille-de-temps/excel?action=export2&period="+e.period+"&personid="+r.datas.person_id,class:"btn btn-default btn-sm"},[qt,u(" Prévisualiser (PDF) ")],8,Et)):_("",!0)])],2))),256)),t("tr",Nt,[t("th",null,[u(" Total "),t("strong",null,o(b),1)]),Rt,Bt,t("th",$t,[t("table",zt,[(s(!0),l(m,null,f(a.total_activities_details,(e,n)=>(s(),l("tr",null,[t("th",null,[St,u(o(r.datas.activities[n].acronym),1)]),t("td",null,[t("small",null,o(e.days)+" jr",1)]),t("td",null,[t("small",null,o(e.events)+" cr",1)]),t("td",Ht,[t("strong",null,o(i.$filters.formatDuration(e.total)),1)])]))),256)),t("tfoot",null,[t("tr",null,[Lt,Mt,Yt,t("td",Gt,[t("strong",null,o(i.$filters.formatDuration(a.total_activities)),1)])])])])]),t("th",Jt,[t("table",Qt,[(s(!0),l(m,null,f(a.total_horslots_details,(e,n)=>(s(),l("tr",null,[t("th",null,o(r.datas.horslots[n].label),1),t("td",null,[t("small",null,o(e.days)+" jr",1)]),t("td",null,[t("small",null,o(e.events)+" cr",1)]),t("td",Ut,[t("strong",null,o(i.$filters.formatDuration(e.total)),1)])]))),256)),t("tfoot",null,[t("tr",null,[Wt,Xt,Zt,t("td",Kt,[t("strong",null,o(i.$filters.formatDuration(a.total_horslots)),1)])])])])]),t("th",It,[t("strong",null,o(i.$filters.formatDuration(a.total)),1),t("small",null,"/ "+o(i.$filters.formatDuration(a.periodDuration)),1)]),te])])],64))),256))])])):(s(),l("div",ee," NO DATA "+o(r.datas),1))}const le=O(A,[["render",se]]);let g=document.querySelector("#timesheet-resume");const k=D(le,{url:g.dataset.url,timesheetpreview:g.dataset.timesheetpreview,timesheetexcel:g.dataset.timesheetexcel});k.config.globalProperties.$filters={period(i){return P.period(i)},formatDuration(i){return w.formatDuration(i)}};k.mount("#timesheet-resume"); diff --git a/public/js/oscar/vite/dist/assets/timesheetpersonresume-70795659.js b/public/js/oscar/vite/dist/assets/timesheetpersonresume-70795659.js deleted file mode 100644 index 183b946245ba2f3c1f1067fb059af0edcc6fb989..0000000000000000000000000000000000000000 --- a/public/js/oscar/vite/dist/assets/timesheetpersonresume-70795659.js +++ /dev/null @@ -1 +0,0 @@ -import{o as l,c as o,d as t,t as i,g as c,F as m,j as f,n as y,a as h,y as D}from"../vendor.js";import{A as x}from"../vendor8.js";import{_ as O}from"../vendor7.js";import{m as P}from"../vendor2.js";import{D as j}from"../vendor22.js";import"../vendor14.js";import"../vendor16.js";const w={props:{url:{required:!0},timesheetpreview:{default:!1},timesheetexcel:{default:!1}},data(){return{debug:null,datas:null}},computed:{years(){let n={};return Object.keys(this.datas.periods).forEach(s=>{if(!this.datas.periods[s].futur){let u=this.datas.periods[s],v=s.split("-"),d=v[0];v[1],n.hasOwnProperty(d)||(n[d]={periods:{},total:0,periodDuration:0,total_activities:0,total_horslots:0,total_activities_details:{},total_horslots_details:{}});let _=n[d];_.periods[s]=u,_.total+=u.total,_.periodDuration+=u.periodDuration,_.total_activities+=u.total_activities,_.total_horslots+=u.total_horslots,u.horslots_details&&Object.keys(u.horslots_details).forEach(a=>{_.total_horslots_details.hasOwnProperty(a)||(_.total_horslots_details[a]={total:0,days:0,events:0}),_.total_horslots_details[a].total+=u.horslots_details[a].total}),u.activities_details&&Object.keys(u.activities_details).forEach(a=>{u.activities_details[a],_.total_activities_details.hasOwnProperty(a)||(_.total_activities_details[a]={total:0,days:0,events:0}),_.total_activities_details[a].total+=u.activities_details[a].total,_.total_activities_details[a].days+=u.activities_details[a].days.length,_.total_activities_details[a].events+=u.activities_details[a].events})}}),n},periods(){let n=[];return Object.keys(this.datas.periods).forEach(s=>{n.push(this.datas.periods[s])}),n}},methods:{getActivity(n){},fetch(){x.get(this.url,{pendingMsg:"Chargement des feuilles de temps"}).then(n=>{this.datas=n.data},n=>{})}},mounted(){console.log("mounted",this.url),this.fetch()}},A={key:0},T={key:0,class:"overlay"},C={class:"overlay-content"},F={class:"table declarations-resume"},V={class:"heading-year"},E={colspan:"7"},q={class:"yearrow"},N={class:"period"},R=["onClick"],B={key:0,class:"icon-ellipsis",title:"Aucune déclaration requise pour cette période"},$={key:1,class:"icon-attention-1",title:"Il faut déclarer pour cette période"},z={key:2,class:"icon-calendar",title:"Procédure de déclaration en cours"},S={class:"required"},H={key:0},L={key:0},M={key:0},Y={class:"cartouche"},G={key:1,class:"btn-group btn-group-sm"},J=["href"],Q=["href"],U={key:2},W={key:1},X={key:0,class:"commentaires"},Z={class:"commentaire"},K={key:1},I={class:"soustotal"},tt={class:"table-condensed table table-packed"},et=["title"],st={key:0},lt={key:1},ot={key:0},it={key:1},nt={class:"text-right"},at={key:0},rt={colspan:"3",class:"text-right"},dt={class:"soustotal text-right"},ut={key:0,class:"table-condensed table"},_t={key:0},ct={key:1},ht={class:"soustotal total text-right",style:{"white-space":"nowrap"}},mt={class:"total text-right"},ft={class:"text-danger"},vt={key:0},gt=["href"],bt=["href"],yt=["href"],kt=["href"],pt={class:"line-total"},Dt={class:"soustotal"},xt={class:"table-condensed table"},Ot={class:"text-right"},Pt={class:"text-right"},jt={class:"text-right soustotal"},wt={class:"table-condensed table"},At={class:"text-right"},Tt={class:"text-right"},Ct={class:"text-right soustotal"},Ft={key:1};function Vt(n,s,u,v,d,_){return d.datas?(l(),o("div",A,[s[27]||(s[27]=t("h1",null,"Vos déclarations",-1)),d.debug?(l(),o("div",T,[t("div",C,[t("button",{onClick:s[0]||(s[0]=a=>d.debug=null)},"close"),t("pre",null,i(d.debug),1)])])):c("",!0),t("table",F,[s[26]||(s[26]=t("thead",null,[t("tr",null,[t("th",null,"Période"),t("th",null,"Déclarations"),t("th",null,"Com"),t("th",null,"Activité"),t("th",null,"Hors-lots"),t("th",null,"Total"),t("th",null,"Actions")])],-1)),(l(!0),o(m,null,f(_.years,(a,b)=>(l(),o(m,null,[t("tr",V,[t("th",E,i(b),1)]),t("tbody",q,[(l(!0),o(m,null,f(a.periods,e=>(l(),o("tr",{class:y({"valid-100":e.total==e.periodDuration,"valid-95":e.total>=e.periodDuration*.95&&e.totale.periodDuration,"error-105":e.total>e.periodDuration*1.05,"error-95":e.totald.debug=e},[e.activities_id.length==0?(l(),o("i",B)):c("",!0),e.activities_id.length&&!e.validations_id.length&&e.past?(l(),o("i",$)):c("",!0),e.activities_id.length&&e.validations_id.length?(l(),o("i",z)):c("",!0),h(" "+i(n.$filters.period(e.period)),1)],8,R)]),t("td",S,[e.activities_id.length?(l(),o("em",H,[e.validations_id.length?(l(),o("span",L,[t("i",{class:y("icon-"+e.validation_state)},null,2),e.validators.length?(l(),o("small",M,[s[2]||(s[2]=h(" Validateur(s) : ")),(l(!0),o(m,null,f(e.validators,r=>(l(),o("strong",Y,[s[1]||(s[1]=t("i",{class:"icon-user"},null,-1)),h(" "+i(r),1)]))),256))])):c("",!0)])):c("",!0),e.validation_state=="valid"?(l(),o("span",G,[s[5]||(s[5]=t("a",{href:"#",class:"btn",style:{color:"#555","pointer-events":"none"}},[t("i",{class:"icon-calendar"}),h(" Feuille de temps ")],-1)),u.timesheetexcel?(l(),o("a",{key:0,href:"/feuille-de-temps/excel?action=export&period="+e.period+"&personid="+e.person_id,class:"btn btn-primary btn-sm"},s[3]||(s[3]=[t("i",{class:"icon-file-excel"},null,-1),h(" Excel ")]),8,J)):c("",!0),e.validation_state=="valid"?(l(),o("a",{key:1,href:"/feuille-de-temps/excel?action=export2&period="+e.period+"&personid="+e.person_id,class:"btn btn-primary btn-sm"},s[4]||(s[4]=[t("i",{class:"icon-file-pdf"},null,-1),h(" PDF ")]),8,Q)):c("",!0)])):c("",!0),e.validations_id.length==0?(l(),o("em",U," Pas de déclaration envoyée ")):c("",!0)])):(l(),o("em",W," Facultatif "))]),t("td",null,[e.commentaires&&e.commentaires.length?(l(),o("p",X,[(l(!0),o(m,null,f(e.commentaires,r=>(l(),o("span",Z,i(r),1))),256))])):(l(),o("em",K," Aucun "))]),t("td",I,[t("table",tt,[t("tbody",null,[(l(!0),o(m,null,f(e.activities_id,r=>(l(),o("tr",null,[t("th",null,[s[6]||(s[6]=t("i",{class:"icon-cube"},null,-1)),t("span",{title:d.datas.activities[r].acronym+" : "+d.datas.activities[r].label},i(d.datas.activities[r].acronym),9,et)]),t("td",null,[e.activities_details&&e.activities_details[r]?(l(),o("em",st,i(e.activities_details[r].days.length)+" jr ",1)):(l(),o("small",lt," Rien "))]),t("td",null,[e.activities_details&&e.activities_details[r]?(l(),o("em",ot,i(e.activities_details[r].events)+" cr ",1)):(l(),o("small",it," Rien "))]),t("td",nt,[t("strong",null,i(n.$filters.formatDuration(e.total_activities_details[r])),1)])]))),256))]),t("tfoot",null,[e.activities_details&&Object.keys(e.activities_details).length>1?(l(),o("tr",at,[s[7]||(s[7]=t("th",null,"Total",-1)),t("td",rt,[t("strong",null,i(n.$filters.formatDuration(e.total_activities)),1)])])):c("",!0)])])]),t("td",dt,[e.horslots_details&&Object.keys(e.horslots_details).length?(l(),o("table",ut,[(l(!0),o(m,null,f(e.horslots_details,(r,p)=>(l(),o("tr",null,[t("th",null,i(d.datas.horslots[p].label),1),t("td",null,[t("strong",null,i(n.$filters.formatDuration(r.total)),1)])]))),256)),e.horslots_details&&Object.keys(e.horslots_details).length>1?(l(),o("tfoot",_t,[t("tr",null,[s[8]||(s[8]=t("th",null,"Total",-1)),t("td",null,[t("strong",null,i(n.$filters.formatDuration(e.total_horslots)),1)])])])):c("",!0)])):(l(),o("small",ct," Vide "))]),t("td",ht,[s[9]||(s[9]=t("i",{class:"icon-time icon-clock"},null,-1)),t("strong",null,i(n.$filters.formatDuration(e.total)),1),s[10]||(s[10]=h()),t("small",null,"/ "+i(n.$filters.formatDuration(e.periodDuration)),1)]),t("td",mt,[t("em",ft,i(e.error),1),d.datas.owner?(l(),o("span",vt,[e.validation_state=="conflict"?(l(),o("a",{key:0,class:"xs btn btn-primary btn-xs",href:"/feuille-de-temps/declarant?month="+e.month+"&year="+e.year},s[11]||(s[11]=[t("i",{class:"icon-edit"},null,-1),h(" Corriger ")]),8,gt)):e.validations_id.length>0?(l(),o("a",{key:1,class:"xs btn btn-default btn-xs",href:"/feuille-de-temps/declarant?month="+e.month+"&year="+e.year},s[12]||(s[12]=[t("i",{class:"icon-zoom-in-outline"},null,-1),h(" Visualiser ")]),8,bt)):(l(),o("a",{key:2,class:"xs btn btn-primary btn-xs",href:"/feuille-de-temps/declarant?month="+e.month+"&year="+e.year},s[13]||(s[13]=[t("i",{class:"icon-calendar"},null,-1),h(" Déclarer ")]),8,yt))])):c("",!0),u.timesheetpreview&&e.validation_state!="valid"?(l(),o("a",{key:1,href:"/feuille-de-temps/excel?action=export2&period="+e.period+"&personid="+d.datas.person_id,class:"btn btn-default btn-sm"},s[14]||(s[14]=[t("i",{class:"icon-file-pdf"},null,-1),h(" Prévisualiser (PDF) ")]),8,kt)):c("",!0)])],2))),256)),t("tr",pt,[t("th",null,[s[15]||(s[15]=h(" Total ")),t("strong",null,i(b),1)]),s[23]||(s[23]=t("th",null,"-",-1)),s[24]||(s[24]=t("th",null,"-",-1)),t("th",Dt,[t("table",xt,[(l(!0),o(m,null,f(a.total_activities_details,(e,r)=>(l(),o("tr",null,[t("th",null,[s[16]||(s[16]=t("i",{class:"icon-cube"},null,-1)),h(i(d.datas.activities[r].acronym),1)]),t("td",null,[t("small",null,i(e.days)+" jr",1)]),t("td",null,[t("small",null,i(e.events)+" cr",1)]),t("td",Ot,[t("strong",null,i(n.$filters.formatDuration(e.total)),1)])]))),256)),t("tfoot",null,[t("tr",null,[s[17]||(s[17]=t("th",null,"Total",-1)),s[18]||(s[18]=t("td",null,"-",-1)),s[19]||(s[19]=t("td",null,"-",-1)),t("td",Pt,[t("strong",null,i(n.$filters.formatDuration(a.total_activities)),1)])])])])]),t("th",jt,[t("table",wt,[(l(!0),o(m,null,f(a.total_horslots_details,(e,r)=>(l(),o("tr",null,[t("th",null,i(d.datas.horslots[r].label),1),t("td",null,[t("small",null,i(e.days)+" jr",1)]),t("td",null,[t("small",null,i(e.events)+" cr",1)]),t("td",At,[t("strong",null,i(n.$filters.formatDuration(e.total)),1)])]))),256)),t("tfoot",null,[t("tr",null,[s[20]||(s[20]=t("th",null,"Total",-1)),s[21]||(s[21]=t("td",null,"-",-1)),s[22]||(s[22]=t("td",null,"-",-1)),t("td",Tt,[t("strong",null,i(n.$filters.formatDuration(a.total_horslots)),1)])])])])]),t("th",Ct,[t("strong",null,i(n.$filters.formatDuration(a.total)),1),t("small",null,"/ "+i(n.$filters.formatDuration(a.periodDuration)),1)]),s[25]||(s[25]=t("th",null," ",-1))])])],64))),256))])])):(l(),o("div",Ft," NO DATA "+i(d.datas),1))}const Et=O(w,[["render",Vt]]);let g=document.querySelector("#timesheet-resume");const k=D(Et,{url:g.dataset.url,timesheetpreview:g.dataset.timesheetpreview,timesheetexcel:g.dataset.timesheetexcel});k.config.globalProperties.$filters={period(n){return P.period(n)},formatDuration(n){return j.formatDuration(n)}};k.mount("#timesheet-resume"); diff --git a/public/js/oscar/vite/dist/manifest.json b/public/js/oscar/vite/dist/manifest.json index f4f33ca27e22a1f82507430aff691a91f8c1e9fc..b7ad7ac5d4e9668f795cc3160db9edad5466f063 100644 --- a/public/js/oscar/vite/dist/manifest.json +++ b/public/js/oscar/vite/dist/manifest.json @@ -1,6 +1,6 @@ { "ActivityDocument.css": { - "file": "assets/ActivityDocument-be06c000.css", + "file": "assets/ActivityDocument-2deed9d1.css", "src": "ActivityDocument.css" }, "ActivityLogs.css": { @@ -8,19 +8,19 @@ "src": "ActivityLogs.css" }, "ActivityNotes.css": { - "file": "assets/ActivityNotes-57bb9039.css", + "file": "assets/ActivityNotes-b71891b4.css", "src": "ActivityNotes.css" }, "DocumentsList.css": { - "file": "assets/DocumentsList-4af197b4.css", + "file": "assets/DocumentsList-4e009bf5.css", "src": "DocumentsList.css" }, "Loader.css": { - "file": "assets/Loader-f7bf6891.css", + "file": "assets/Loader-ee83f9da.css", "src": "Loader.css" }, "Modal.css": { - "file": "assets/Modal-700b8a23.css", + "file": "assets/Modal-2266e1e2.css", "src": "Modal.css" }, "_vendor.js": { @@ -28,7 +28,7 @@ }, "_vendor10.js": { "css": [ - "assets/ActivityDocument-be06c000.css" + "assets/ActivityDocument-2deed9d1.css" ], "file": "vendor10.js", "imports": [ @@ -55,7 +55,7 @@ }, "_vendor12.js": { "css": [ - "assets/ActivityNotes-57bb9039.css" + "assets/ActivityNotes-b71891b4.css" ], "file": "vendor12.js", "imports": [ @@ -97,7 +97,7 @@ }, "_vendor17.js": { "css": [ - "assets/Loader-f7bf6891.css" + "assets/Loader-ee83f9da.css" ], "file": "vendor17.js", "imports": [ @@ -124,7 +124,7 @@ }, "_vendor20.js": { "css": [ - "assets/DocumentsList-4af197b4.css" + "assets/DocumentsList-4e009bf5.css" ], "file": "vendor20.js", "imports": [ @@ -153,7 +153,7 @@ }, "_vendor5.js": { "css": [ - "assets/Modal-700b8a23.css" + "assets/Modal-2266e1e2.css" ], "file": "vendor5.js", "imports": [ @@ -187,14 +187,14 @@ ] }, "src/Activity.css": { - "file": "assets/Activity-ed5cb27b.css", + "file": "assets/Activity-cc6ccf89.css", "src": "src/Activity.css" }, "src/Activity.js": { "css": [ - "assets/Activity-ed5cb27b.css" + "assets/Activity-cc6ccf89.css" ], - "file": "assets/activity-60e009f3.js", + "file": "assets/activity-d961ddb0.js", "imports": [ "_vendor.js", "_vendor2.js", @@ -221,7 +221,7 @@ "src": "src/Activity.js" }, "src/ActivityDocuments.js": { - "file": "assets/activitydocuments-3139e448.js", + "file": "assets/activitydocuments-596bd3c4.js", "imports": [ "_vendor.js", "_vendor2.js", @@ -246,7 +246,7 @@ "css": [ "assets/ActivityMotsCles-67bc6dce.css" ], - "file": "assets/activitymotscles-2e3e437b.js", + "file": "assets/activitymotscles-7b1fc39f.js", "imports": [ "_vendor.js", "_vendor14.js", @@ -264,7 +264,7 @@ "css": [ "assets/ActivityMotsClesAdmin-7828ebc8.css" ], - "file": "assets/activitymotsclesadmin-696ec89a.js", + "file": "assets/activitymotsclesadmin-70f45e39.js", "imports": [ "_vendor.js", "_vendor14.js", @@ -275,7 +275,7 @@ "src": "src/ActivityMotsClesAdmin.js" }, "src/ActivityNotes.js": { - "file": "assets/activitynotes-e551577c.js", + "file": "assets/activitynotes-fbb89777.js", "imports": [ "_vendor.js", "_vendor12.js", @@ -288,8 +288,27 @@ "isEntry": true, "src": "src/ActivityNotes.js" }, + "src/ActivityPcruInformations.css": { + "file": "assets/ActivityPcruInformations-cccdc180.css", + "src": "src/ActivityPcruInformations.css" + }, + "src/ActivityPcruInformations.js": { + "css": [ + "assets/ActivityPcruInformations-cccdc180.css" + ], + "file": "assets/activitypcruinformations-563c4a56.js", + "imports": [ + "_vendor.js", + "_vendor14.js", + "_vendor17.js", + "_vendor5.js", + "_vendor7.js" + ], + "isEntry": true, + "src": "src/ActivityPcruInformations.js" + }, "src/ActivitySpentDetails.js": { - "file": "assets/activityspentdetails-1ce1581e.js", + "file": "assets/activityspentdetails-b123c2bb.js", "imports": [ "_vendor.js", "_vendor7.js", @@ -299,7 +318,7 @@ "src": "src/ActivitySpentDetails.js" }, "src/ActivitySpentSynthesis.js": { - "file": "assets/activityspentsynthesis-ab25eb3e.js", + "file": "assets/activityspentsynthesis-841a21e7.js", "imports": [ "_vendor.js", "_vendor13.js", @@ -310,7 +329,7 @@ "src": "src/ActivitySpentSynthesis.js" }, "src/ActivityWorkpackage.js": { - "file": "assets/activityworkpackage-db6bf6ca.js", + "file": "assets/activityworkpackage-5bc07c5a.js", "imports": [ "_vendor.js", "_vendor7.js" @@ -319,7 +338,7 @@ "src": "src/ActivityWorkpackage.js" }, "src/AdminRoleOrganization.js": { - "file": "assets/adminroleorganization-cbf876f6.js", + "file": "assets/adminroleorganization-20533524.js", "imports": [ "_vendor.js", "_vendor7.js" @@ -328,7 +347,7 @@ "src": "src/AdminRoleOrganization.js" }, "src/AdminTypeDocument.js": { - "file": "assets/admintypedocument-1c0873ed.js", + "file": "assets/admintypedocument-d2d32e46.js", "imports": [ "_vendor.js", "_vendor21.js", @@ -338,7 +357,7 @@ "src": "src/AdminTypeDocument.js" }, "src/AdminTypeOrganization.js": { - "file": "assets/admintypeorganization-aeb4f3d9.js", + "file": "assets/admintypeorganization-082a21a6.js", "imports": [ "_vendor.js", "_vendor14.js", @@ -350,7 +369,7 @@ "src": "src/AdminTypeOrganization.js" }, "src/Authentification.js": { - "file": "assets/authentification-09edda39.js", + "file": "assets/authentification-a6bb467f.js", "imports": [ "_vendor.js", "_vendor2.js", @@ -373,7 +392,7 @@ "css": [ "assets/DeclarersList-87a946a0.css" ], - "file": "assets/declarerslist-b893a403.js", + "file": "assets/declarerslist-a1389633.js", "imports": [ "_vendor.js", "_vendor7.js", @@ -383,7 +402,7 @@ "src": "src/DeclarersList.js" }, "src/DocumentsIndex.js": { - "file": "assets/documentsindex-67bba6f4.js", + "file": "assets/documentsindex-15fb2a66.js", "imports": [ "_vendor.js", "_vendor2.js", @@ -399,7 +418,7 @@ "src": "src/DocumentsIndex.js" }, "src/DocumentsObserved.js": { - "file": "assets/documentsobserved-a8fe03be.js", + "file": "assets/documentsobserved-817c2fdd.js", "imports": [ "_vendor.js", "_vendor2.js", @@ -415,7 +434,7 @@ "src": "src/DocumentsObserved.js" }, "src/EntityWithRoleOrganizations.js": { - "file": "assets/organizations_roled-3f3c28c3.js", + "file": "assets/organizations_roled-fc3b4fe4.js", "imports": [ "_vendor.js", "_vendor15.js", @@ -432,7 +451,7 @@ "src": "src/EntityWithRoleOrganizations.js" }, "src/EntityWithRolePersons.js": { - "file": "assets/persons_roled-a64a3a69.js", + "file": "assets/persons_roled-8fe5f491.js", "imports": [ "_vendor.js", "_vendor15.js", @@ -456,7 +475,7 @@ "css": [ "assets/OrganizationFiche-058e2475.css" ], - "file": "assets/organizationfiche-974d2695.js", + "file": "assets/organizationfiche-9bee7979.js", "imports": [ "_vendor.js", "_vendor7.js" @@ -472,7 +491,7 @@ "css": [ "assets/OrganizationSubOrganizations-b532b187.css" ], - "file": "assets/organizationsuborganizations-39797503.js", + "file": "assets/organizationsuborganizations-ff9fde48.js", "imports": [ "_vendor.js", "_vendor9.js", @@ -482,8 +501,27 @@ "isEntry": true, "src": "src/OrganizationSubOrganizations.js" }, + "src/PcruTransmissions.css": { + "file": "assets/PcruTransmissions-d5165e09.css", + "src": "src/PcruTransmissions.css" + }, + "src/PcruTransmissions.js": { + "css": [ + "assets/PcruTransmissions-d5165e09.css" + ], + "file": "assets/pcrutransmissions-cbfcb0fa.js", + "imports": [ + "_vendor.js", + "_vendor14.js", + "_vendor17.js", + "_vendor5.js", + "_vendor7.js" + ], + "isEntry": true, + "src": "src/PcruTransmissions.js" + }, "src/ProjectActivityLogs.js": { - "file": "assets/ProjectActivityLogs-934299c2.js", + "file": "assets/ProjectActivityLogs-a43a204c.js", "imports": [ "_vendor.js", "_vendor2.js", @@ -498,7 +536,7 @@ "src": "src/ProjectActivityLogs.js" }, "src/ProjectActivitySpentSynthesis.js": { - "file": "assets/ProjectActivitySpentSynthesis-283b86d9.js", + "file": "assets/ProjectActivitySpentSynthesis-72e95239.js", "imports": [ "_vendor.js", "_vendor13.js", @@ -509,7 +547,7 @@ "src": "src/ProjectActivitySpentSynthesis.js" }, "src/Sticky.js": { - "file": "assets/sticky-f851c7f2.js", + "file": "assets/sticky-43d0d9fa.js", "imports": [ "_vendor.js", "_vendor7.js" @@ -518,14 +556,14 @@ "src": "src/Sticky.js" }, "src/TimesheetDeclaration.css": { - "file": "assets/TimesheetDeclaration-d2772701.css", + "file": "assets/TimesheetDeclaration-da0c6213.css", "src": "src/TimesheetDeclaration.css" }, "src/TimesheetDeclaration.js": { "css": [ - "assets/TimesheetDeclaration-d2772701.css" + "assets/TimesheetDeclaration-da0c6213.css" ], - "file": "assets/timesheetdeclarations-8f08433e.js", + "file": "assets/timesheetdeclarations-7cf9abf1.js", "imports": [ "_vendor.js", "_vendor7.js", @@ -540,14 +578,14 @@ "src": "src/TimesheetDeclaration.js" }, "src/TimesheetPersonResume.css": { - "file": "assets/TimesheetPersonResume-9b0a7e87.css", + "file": "assets/TimesheetPersonResume-b4a958be.css", "src": "src/TimesheetPersonResume.css" }, "src/TimesheetPersonResume.js": { "css": [ - "assets/TimesheetPersonResume-9b0a7e87.css" + "assets/TimesheetPersonResume-b4a958be.css" ], - "file": "assets/timesheetpersonresume-70795659.js", + "file": "assets/timesheetpersonresume-14fb87b2.js", "imports": [ "_vendor.js", "_vendor8.js", @@ -561,14 +599,14 @@ "src": "src/TimesheetPersonResume.js" }, "src/oscar-css.css": { - "file": "assets/oscar-css-84bc208b.css", + "file": "assets/oscar-css-1c3ee0fe.css", "src": "src/oscar-css.css" }, "src/oscar-css.js": { "css": [ - "assets/oscar-css-84bc208b.css" + "assets/oscar-css-1c3ee0fe.css" ], - "file": "assets/oscarcss-10fdd0ac.js", + "file": "assets/oscarcss-71927fdb.js", "imports": [ "_vendor.js", "_vendor16.js", diff --git a/public/js/oscar/vite/dist/vendor.js b/public/js/oscar/vite/dist/vendor.js index 28d620c56cdd27e441af1cecbae3ed5cb241c8b1..2172bb432de2855dde1ead2e148345cb1a7f61b9 100644 --- a/public/js/oscar/vite/dist/vendor.js +++ b/public/js/oscar/vite/dist/vendor.js @@ -1,42 +1,23 @@ -/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Wa(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ye={},Cr=[],At=()=>{},a_=()=>!1,Ui=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ja=e=>e.startsWith("onUpdate:"),$e=Object.assign,Ua=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},l_=Object.prototype.hasOwnProperty,Te=(e,t)=>l_.call(e,t),te=Array.isArray,Yr=e=>Es(e)==="[object Map]",jr=e=>Es(e)==="[object Set]",Su=e=>Es(e)==="[object Date]",ae=e=>typeof e=="function",He=e=>typeof e=="string",It=e=>typeof e=="symbol",Ne=e=>e!==null&&typeof e=="object",Rc=e=>(Ne(e)||ae(e))&&ae(e.then)&&ae(e.catch),Pc=Object.prototype.toString,Es=e=>Pc.call(e),u_=e=>Es(e).slice(8,-1),Ac=e=>Es(e)==="[object Object]",Ha=e=>He(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ds=Wa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},c_=/-(\w)/g,xt=Hi(e=>e.replace(c_,(t,n)=>n?n.toUpperCase():"")),f_=/\B([A-Z])/g,Vn=Hi(e=>e.replace(f_,"-$1").toLowerCase()),Vi=Hi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Io=Hi(e=>e?`on${Vi(e)}`:""),jn=(e,t)=>!Object.is(e,t),ui=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Si=e=>{const t=parseFloat(e);return isNaN(t)?e:t},d_=e=>{const t=He(e)?Number(e):NaN;return isNaN(t)?e:t};let bu;const $i=()=>bu||(bu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Va(e){if(te(e)){const t={};for(let n=0;n{if(n){const r=n.split(m_);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function $a(e){let t="";if(He(e))t=e;else if(te(e))for(let n=0;nRs(n,t))}const Ic=e=>!!(e&&e.__v_isRef===!0),v_=e=>He(e)?e:e==null?"":te(e)||Ne(e)&&(e.toString===Pc||!ae(e.toString))?Ic(e)?v_(e.value):JSON.stringify(e,Wc,2):String(e),Wc=(e,t)=>Ic(t)?Wc(e,t.value):Yr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i],o)=>(n[Wo(r,o)+" =>"]=i,n),{})}:jr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Wo(n))}:It(t)?Wo(t):Ne(t)&&!te(t)&&!Ac(t)?String(t):t,Wo=(e,t="")=>{var n;return It(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let gt;class jc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=gt,!t&>&&(this.index=(gt.scopes||(gt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(ms){let t=ms;for(ms=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;hs;){let t=hs;for(hs=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function $c(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Bc(e){let t,n=e.depsTail,r=n;for(;r;){const i=r.prevDep;r.version===-1?(r===n&&(n=i),qa(r),O_(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function aa(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Gc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Gc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===gs))return;e.globalVersion=gs;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!aa(e)){e.flags&=-3;return}const n=Ee,r=Ft;Ee=e,Ft=!0;try{$c(e);const i=e.fn(e._value);(t.version===0||jn(i,e._value))&&(e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ee=n,Ft=r,Bc(e),e.flags&=-3}}function qa(e,t=!1){const{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)qa(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function O_(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ft=!0;const zc=[];function $n(){zc.push(Ft),Ft=!1}function Bn(){const e=zc.pop();Ft=e===void 0?!0:e}function Ou(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let gs=0;class k_{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ka{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ee||!Ft||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new k_(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,qc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=r)}return n}trigger(t){this.version++,gs++,this.notify(t)}notify(t){Ga();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{za()}}}function qc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)qc(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const la=new WeakMap,ar=Symbol(""),ua=Symbol(""),ws=Symbol("");function tt(e,t,n){if(Ft&&Ee){let r=la.get(e);r||la.set(e,r=new Map);let i=r.get(n);i||(r.set(n,i=new Ka),i.map=r,i.key=n),i.track()}}function yn(e,t,n,r,i,o){const l=la.get(e);if(!l){gs++;return}const c=d=>{d&&d.trigger()};if(Ga(),t==="clear")l.forEach(c);else{const d=te(e),p=d&&Ha(n);if(d&&n==="length"){const m=Number(r);l.forEach((y,v)=>{(v==="length"||v===ws||!It(v)&&v>=m)&&c(y)})}else switch((n!==void 0||l.has(void 0))&&c(l.get(n)),p&&c(l.get(ws)),t){case"add":d?p&&c(l.get("length")):(c(l.get(ar)),Yr(e)&&c(l.get(ua)));break;case"delete":d||(c(l.get(ar)),Yr(e)&&c(l.get(ua)));break;case"set":Yr(e)&&c(l.get(ar));break}}za()}function br(e){const t=Me(e);return t===e?t:(tt(t,"iterate",ws),Tt(e)?t:t.map(nt))}function Bi(e){return tt(e=Me(e),"iterate",ws),e}const M_={__proto__:null,[Symbol.iterator](){return Uo(this,Symbol.iterator,nt)},concat(...e){return br(this).concat(...e.map(t=>te(t)?br(t):t))},entries(){return Uo(this,"entries",e=>(e[1]=nt(e[1]),e))},every(e,t){return fn(this,"every",e,t,void 0,arguments)},filter(e,t){return fn(this,"filter",e,t,n=>n.map(nt),arguments)},find(e,t){return fn(this,"find",e,t,nt,arguments)},findIndex(e,t){return fn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return fn(this,"findLast",e,t,nt,arguments)},findLastIndex(e,t){return fn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return fn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ho(this,"includes",e)},indexOf(...e){return Ho(this,"indexOf",e)},join(e){return br(this).join(e)},lastIndexOf(...e){return Ho(this,"lastIndexOf",e)},map(e,t){return fn(this,"map",e,t,void 0,arguments)},pop(){return is(this,"pop")},push(...e){return is(this,"push",e)},reduce(e,...t){return ku(this,"reduce",e,t)},reduceRight(e,...t){return ku(this,"reduceRight",e,t)},shift(){return is(this,"shift")},some(e,t){return fn(this,"some",e,t,void 0,arguments)},splice(...e){return is(this,"splice",e)},toReversed(){return br(this).toReversed()},toSorted(e){return br(this).toSorted(e)},toSpliced(...e){return br(this).toSpliced(...e)},unshift(...e){return is(this,"unshift",e)},values(){return Uo(this,"values",nt)}};function Uo(e,t,n){const r=Bi(e),i=r[t]();return r!==e&&!Tt(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.value&&(o.value=n(o.value)),o}),i}const D_=Array.prototype;function fn(e,t,n,r,i,o){const l=Bi(e),c=l!==e&&!Tt(e),d=l[t];if(d!==D_[t]){const y=d.apply(e,o);return c?nt(y):y}let p=n;l!==e&&(c?p=function(y,v){return n.call(this,nt(y),v,e)}:n.length>2&&(p=function(y,v){return n.call(this,y,v,e)}));const m=d.call(l,p,r);return c&&i?i(m):m}function ku(e,t,n,r){const i=Bi(e);let o=n;return i!==e&&(Tt(e)?n.length>3&&(o=function(l,c,d){return n.call(this,l,c,d,e)}):o=function(l,c,d){return n.call(this,l,nt(c),d,e)}),i[t](o,...r)}function Ho(e,t,n){const r=Me(e);tt(r,"iterate",ws);const i=r[t](...n);return(i===-1||i===!1)&&Qa(n[0])?(n[0]=Me(n[0]),r[t](...n)):i}function is(e,t,n=[]){$n(),Ga();const r=Me(e)[t].apply(e,n);return za(),Bn(),r}const T_=Wa("__proto__,__v_isRef,__isVue"),Kc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(It));function x_(e){It(e)||(e=String(e));const t=Me(this);return tt(t,"has",e),t.hasOwnProperty(e)}class Zc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(i?o?I_:ef:o?Xc:Qc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const l=te(t);if(!i){let d;if(l&&(d=M_[n]))return d;if(n==="hasOwnProperty")return x_}const c=Reflect.get(t,n,it(t)?t:r);return(It(n)?Kc.has(n):T_(n))||(i||tt(t,"get",n),o)?c:it(c)?l&&Ha(n)?c:c.value:Ne(c)?i?tf(c):Ps(c):c}}class Jc extends Zc{constructor(t=!1){super(!1,t)}set(t,n,r,i){let o=t[n];if(!this._isShallow){const d=ur(o);if(!Tt(r)&&!ur(r)&&(o=Me(o),r=Me(r)),!te(t)&&it(o)&&!it(r))return d?!1:(o.value=r,!0)}const l=te(t)&&Ha(n)?Number(n)e,ri=e=>Reflect.getPrototypeOf(e);function R_(e,t,n){return function(...r){const i=this.__v_raw,o=Me(i),l=Yr(o),c=e==="entries"||e===Symbol.iterator&&l,d=e==="keys"&&l,p=i[e](...r),m=n?ca:t?fa:nt;return!t&&tt(o,"iterate",d?ua:ar),{next(){const{value:y,done:v}=p.next();return v?{value:y,done:v}:{value:c?[m(y[0]),m(y[1])]:m(y),done:v}},[Symbol.iterator](){return this}}}}function si(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function P_(e,t){const n={get(i){const o=this.__v_raw,l=Me(o),c=Me(i);e||(jn(i,c)&&tt(l,"get",i),tt(l,"get",c));const{has:d}=ri(l),p=t?ca:e?fa:nt;if(d.call(l,i))return p(o.get(i));if(d.call(l,c))return p(o.get(c));o!==l&&o.get(i)},get size(){const i=this.__v_raw;return!e&&tt(Me(i),"iterate",ar),Reflect.get(i,"size",i)},has(i){const o=this.__v_raw,l=Me(o),c=Me(i);return e||(jn(i,c)&&tt(l,"has",i),tt(l,"has",c)),i===c?o.has(i):o.has(i)||o.has(c)},forEach(i,o){const l=this,c=l.__v_raw,d=Me(c),p=t?ca:e?fa:nt;return!e&&tt(d,"iterate",ar),c.forEach((m,y)=>i.call(o,p(m),p(y),l))}};return $e(n,e?{add:si("add"),set:si("set"),delete:si("delete"),clear:si("clear")}:{add(i){!t&&!Tt(i)&&!ur(i)&&(i=Me(i));const o=Me(this);return ri(o).has.call(o,i)||(o.add(i),yn(o,"add",i,i)),this},set(i,o){!t&&!Tt(o)&&!ur(o)&&(o=Me(o));const l=Me(this),{has:c,get:d}=ri(l);let p=c.call(l,i);p||(i=Me(i),p=c.call(l,i));const m=d.call(l,i);return l.set(i,o),p?jn(o,m)&&yn(l,"set",i,o):yn(l,"add",i,o),this},delete(i){const o=Me(this),{has:l,get:c}=ri(o);let d=l.call(o,i);d||(i=Me(i),d=l.call(o,i)),c&&c.call(o,i);const p=o.delete(i);return d&&yn(o,"delete",i,void 0),p},clear(){const i=Me(this),o=i.size!==0,l=i.clear();return o&&yn(i,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=R_(i,e,t)}),n}function Za(e,t){const n=P_(e,t);return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(Te(n,i)&&i in r?n:r,i,o)}const A_={get:Za(!1,!1)},F_={get:Za(!1,!0)},L_={get:Za(!0,!1)};const Qc=new WeakMap,Xc=new WeakMap,ef=new WeakMap,I_=new WeakMap;function W_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function j_(e){return e.__v_skip||!Object.isExtensible(e)?0:W_(u_(e))}function Ps(e){return ur(e)?e:Ja(e,!1,Y_,A_,Qc)}function U_(e){return Ja(e,!1,E_,F_,Xc)}function tf(e){return Ja(e,!0,N_,L_,ef)}function Ja(e,t,n,r,i){if(!Ne(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const l=j_(e);if(l===0)return e;const c=new Proxy(e,l===2?r:n);return i.set(e,c),c}function Nr(e){return ur(e)?Nr(e.__v_raw):!!(e&&e.__v_isReactive)}function ur(e){return!!(e&&e.__v_isReadonly)}function Tt(e){return!!(e&&e.__v_isShallow)}function Qa(e){return e?!!e.__v_raw:!1}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}function H_(e){return!Te(e,"__v_skip")&&Object.isExtensible(e)&&Fc(e,"__v_skip",!0),e}const nt=e=>Ne(e)?Ps(e):e,fa=e=>Ne(e)?tf(e):e;function it(e){return e?e.__v_isRef===!0:!1}function V_(e){return $_(e,!1)}function $_(e,t){return it(e)?e:new B_(e,t)}class B_{constructor(t,n){this.dep=new Ka,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Me(t),this._value=n?t:nt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Tt(t)||ur(t);t=r?t:Me(t),jn(t,n)&&(this._rawValue=t,this._value=r?t:nt(t),this.dep.trigger())}}function G_(e){return it(e)?e.value:e}const z_={get:(e,t,n)=>t==="__v_raw"?e:G_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return it(i)&&!it(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function nf(e){return Nr(e)?e:new Proxy(e,z_)}class q_{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ka(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return Vc(this,!0),!0}get value(){const t=this.dep.track();return Gc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function K_(e,t,n=!1){let r,i;return ae(e)?r=e:(r=e.get,i=e.set),new q_(r,i,n)}const ii={},bi=new WeakMap;let nr;function Z_(e,t=!1,n=nr){if(n){let r=bi.get(n);r||bi.set(n,r=[]),r.push(e)}}function J_(e,t,n=Ye){const{immediate:r,deep:i,once:o,scheduler:l,augmentJob:c,call:d}=n,p=x=>i?x:Tt(x)||i===!1||i===0?_n(x,1):_n(x);let m,y,v,M,T=!1,F=!1;if(it(e)?(y=()=>e.value,T=Tt(e)):Nr(e)?(y=()=>p(e),T=!0):te(e)?(F=!0,T=e.some(x=>Nr(x)||Tt(x)),y=()=>e.map(x=>{if(it(x))return x.value;if(Nr(x))return p(x);if(ae(x))return d?d(x,2):x()})):ae(e)?t?y=d?()=>d(e,2):e:y=()=>{if(v){$n();try{v()}finally{Bn()}}const x=nr;nr=m;try{return d?d(e,3,[M]):e(M)}finally{nr=x}}:y=At,t&&i){const x=y,j=i===!0?1/0:i;y=()=>_n(x(),j)}const D=b_(),H=()=>{m.stop(),D&&D.active&&Ua(D.effects,m)};if(o&&t){const x=t;t=(...j)=>{x(...j),H()}}let I=F?new Array(e.length).fill(ii):ii;const O=x=>{if(!(!(m.flags&1)||!m.dirty&&!x))if(t){const j=m.run();if(i||T||(F?j.some((K,re)=>jn(K,I[re])):jn(j,I))){v&&v();const K=nr;nr=m;try{const re=[j,I===ii?void 0:F&&I[0]===ii?[]:I,M];d?d(t,3,re):t(...re),I=j}finally{nr=K}}}else m.run()};return c&&c(O),m=new Uc(y),m.scheduler=l?()=>l(O,!1):O,M=x=>Z_(x,!1,m),v=m.onStop=()=>{const x=bi.get(m);if(x){if(d)d(x,4);else for(const j of x)j();bi.delete(m)}},t?r?O(!0):I=m.run():l?l(O.bind(null,!0),!0):m.run(),H.pause=m.pause.bind(m),H.resume=m.resume.bind(m),H.stop=H,H}function _n(e,t=1/0,n){if(t<=0||!Ne(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,it(e))_n(e.value,t,n);else if(te(e))for(let r=0;r{_n(r,t,n)});else if(Ac(e)){for(const r in e)_n(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&_n(e[r],t,n)}return e}/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function As(e,t,n,r){try{return r?e(...r):e()}catch(i){Gi(i,t,n)}}function Wt(e,t,n,r){if(ae(e)){const i=As(e,t,n,r);return i&&Rc(i)&&i.catch(o=>{Gi(o,t,n)}),i}if(te(e)){const i=[];for(let o=0;o>>1,i=ft[r],o=vs(i);o=vs(n)?ft.push(e):ft.splice(X_(t),0,e),e.flags|=1,of()}}function of(){Oi||(Oi=rf.then(lf))}function eg(e){te(e)?Er.push(...e):Pn&&e.id===-1?Pn.splice(Dr+1,0,e):e.flags&1||(Er.push(e),e.flags|=1),of()}function Mu(e,t,n=qt+1){for(;nvs(n)-vs(r));if(Er.length=0,Pn){Pn.push(...t);return}for(Pn=t,Dr=0;Dre.id==null?e.flags&2?-1:1/0:e.id;function lf(e){const t=At;try{for(qt=0;qt{r._d&&Au(-1);const o=ki(t);let l;try{l=e(...i)}finally{ki(o),r._d&&Au(1)}return l};return r._n=!0,r._c=!0,r._d=!0,r}function Qk(e,t){if(Ze===null)return e;const n=Ji(Ze),r=e.dirs||(e.dirs=[]);for(let i=0;ie.__isTeleport,An=Symbol("_leaveCb"),oi=Symbol("_enterCb");function rg(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return gf(()=>{e.isMounted=!0}),wf(()=>{e.isUnmounting=!0}),e}const Mt=[Function,Array],ff={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Mt,onEnter:Mt,onAfterEnter:Mt,onEnterCancelled:Mt,onBeforeLeave:Mt,onLeave:Mt,onAfterLeave:Mt,onLeaveCancelled:Mt,onBeforeAppear:Mt,onAppear:Mt,onAfterAppear:Mt,onAppearCancelled:Mt},df=e=>{const t=e.subTree;return t.component?df(t.component):t},sg={name:"BaseTransition",props:ff,setup(e,{slots:t}){const n=n0(),r=rg();return()=>{const i=t.default&&pf(t.default(),!0);if(!i||!i.length)return;const o=hf(i),l=Me(e),{mode:c}=l;if(r.isLeaving)return Vo(o);const d=Du(o);if(!d)return Vo(o);let p=da(d,l,r,n,y=>p=y);d.type!==dt&&Ss(d,p);let m=n.subTree&&Du(n.subTree);if(m&&m.type!==dt&&!sr(d,m)&&df(n).type!==dt){let y=da(m,l,r,n);if(Ss(m,y),c==="out-in"&&d.type!==dt)return r.isLeaving=!0,y.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete y.afterLeave,m=void 0},Vo(o);c==="in-out"&&d.type!==dt?y.delayLeave=(v,M,T)=>{const F=mf(r,m);F[String(m.key)]=m,v[An]=()=>{M(),v[An]=void 0,delete p.delayedLeave,m=void 0},p.delayedLeave=()=>{T(),delete p.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return o}}};function hf(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==dt){t=n;break}}return t}const ig=sg;function mf(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function da(e,t,n,r,i){const{appear:o,mode:l,persisted:c=!1,onBeforeEnter:d,onEnter:p,onAfterEnter:m,onEnterCancelled:y,onBeforeLeave:v,onLeave:M,onAfterLeave:T,onLeaveCancelled:F,onBeforeAppear:D,onAppear:H,onAfterAppear:I,onAppearCancelled:O}=t,x=String(e.key),j=mf(n,e),K=(Q,ie)=>{Q&&Wt(Q,r,9,ie)},re=(Q,ie)=>{const we=ie[1];K(Q,ie),te(Q)?Q.every(U=>U.length<=1)&&we():Q.length<=1&&we()},se={mode:l,persisted:c,beforeEnter(Q){let ie=d;if(!n.isMounted)if(o)ie=D||d;else return;Q[An]&&Q[An](!0);const we=j[x];we&&sr(e,we)&&we.el[An]&&we.el[An](),K(ie,[Q])},enter(Q){let ie=p,we=m,U=y;if(!n.isMounted)if(o)ie=H||p,we=I||m,U=O||y;else return;let fe=!1;const Re=Q[oi]=Xe=>{fe||(fe=!0,Xe?K(U,[Q]):K(we,[Q]),se.delayedLeave&&se.delayedLeave(),Q[oi]=void 0)};ie?re(ie,[Q,Re]):Re()},leave(Q,ie){const we=String(e.key);if(Q[oi]&&Q[oi](!0),n.isUnmounting)return ie();K(v,[Q]);let U=!1;const fe=Q[An]=Re=>{U||(U=!0,ie(),Re?K(F,[Q]):K(T,[Q]),Q[An]=void 0,j[we]===e&&delete j[we])};j[we]=e,M?re(M,[Q,fe]):fe()},clone(Q){const ie=da(Q,t,n,r,i);return i&&i(ie),ie}};return se}function Vo(e){if(zi(e))return e=Hn(e),e.children=null,e}function Du(e){if(!zi(e))return cf(e.type)&&e.children?hf(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ae(n.default))return n.default()}}function Ss(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ss(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function pf(e,t=!1,n){let r=[],i=0;for(let o=0;o1)for(let o=0;o$e({name:e.name},t,{setup:e}))():e}function yf(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mi(e,t,n,r,i=!1){if(te(e)){e.forEach((T,F)=>Mi(T,t&&(te(t)?t[F]:t),n,r,i));return}if(Rr(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Mi(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Ji(r.component):r.el,l=i?null:o,{i:c,r:d}=e,p=t&&t.r,m=c.refs===Ye?c.refs={}:c.refs,y=c.setupState,v=Me(y),M=y===Ye?()=>!1:T=>Te(v,T);if(p!=null&&p!==d&&(He(p)?(m[p]=null,M(p)&&(y[p]=null)):it(p)&&(p.value=null)),ae(d))As(d,c,12,[l,m]);else{const T=He(d),F=it(d);if(T||F){const D=()=>{if(e.f){const H=T?M(d)?y[d]:m[d]:d.value;i?te(H)&&Ua(H,o):te(H)?H.includes(o)||H.push(o):T?(m[d]=[o],M(d)&&(y[d]=m[d])):(d.value=[o],e.k&&(m[e.k]=d.value))}else T?(m[d]=l,M(d)&&(y[d]=l)):F&&(d.value=l,e.k&&(m[e.k]=l))};l?(D.id=-1,_t(D,n)):D()}}}$i().requestIdleCallback;$i().cancelIdleCallback;const Rr=e=>!!e.type.__asyncLoader,zi=e=>e.type.__isKeepAlive;function ag(e,t){_f(e,"a",t)}function lg(e,t){_f(e,"da",t)}function _f(e,t,n=Qe){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(qi(t,r,n),n){let i=n.parent;for(;i&&i.parent;)zi(i.parent.vnode)&&ug(r,t,n,i),i=i.parent}}function ug(e,t,n,r){const i=qi(t,e,r,!0);vf(()=>{Ua(r[t],i)},n)}function qi(e,t,n=Qe,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...l)=>{$n();const c=Fs(n),d=Wt(t,n,e,l);return c(),Bn(),d});return r?i.unshift(o):i.push(o),o}}const kn=e=>(t,n=Qe)=>{(!ks||e==="sp")&&qi(e,(...r)=>t(...r),n)},cg=kn("bm"),gf=kn("m"),fg=kn("bu"),dg=kn("u"),wf=kn("bum"),vf=kn("um"),hg=kn("sp"),mg=kn("rtg"),pg=kn("rtc");function yg(e,t=Qe){qi("ec",e,t)}const Sf="components",_g="directives";function Xk(e,t){return bf(Sf,e,!0,t)||e}const gg=Symbol.for("v-ndc");function e1(e){return bf(_g,e)}function bf(e,t,n=!0,r=!1){const i=Ze||Qe;if(i){const o=i.type;if(e===Sf){const c=a0(o,!1);if(c&&(c===t||c===xt(t)||c===Vi(xt(t))))return o}const l=Tu(i[e]||o[e],t)||Tu(i.appContext[e],t);return!l&&r?o:l}}function Tu(e,t){return e&&(e[t]||e[xt(t)]||e[Vi(xt(t))])}function t1(e,t,n,r){let i;const o=n&&n[r],l=te(e);if(l||He(e)){const c=l&&Nr(e);let d=!1;c&&(d=!Tt(e),e=Bi(e)),i=new Array(e.length);for(let p=0,m=e.length;pt(c,d,void 0,o&&o[d]));else{const c=Object.keys(e);i=new Array(c.length);for(let d=0,p=c.length;dOs(t)?!(t.type===dt||t.type===wt&&!Of(t.children)):!0)?e:null}const ha=e=>e?$f(e)?Ji(e):ha(e.parent):null,ps=$e(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ha(e.parent),$root:e=>ha(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>el(e),$forceUpdate:e=>e.f||(e.f=()=>{Xa(e.update)}),$nextTick:e=>e.n||(e.n=sf.bind(e.proxy)),$watch:e=>Ug.bind(e)}),$o=(e,t)=>e!==Ye&&!e.__isScriptSetup&&Te(e,t),wg={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:l,type:c,appContext:d}=e;let p;if(t[0]!=="$"){const M=l[t];if(M!==void 0)switch(M){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if($o(r,t))return l[t]=1,r[t];if(i!==Ye&&Te(i,t))return l[t]=2,i[t];if((p=e.propsOptions[0])&&Te(p,t))return l[t]=3,o[t];if(n!==Ye&&Te(n,t))return l[t]=4,n[t];ma&&(l[t]=0)}}const m=ps[t];let y,v;if(m)return t==="$attrs"&&tt(e.attrs,"get",""),m(e);if((y=c.__cssModules)&&(y=y[t]))return y;if(n!==Ye&&Te(n,t))return l[t]=4,n[t];if(v=d.config.globalProperties,Te(v,t))return v[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return $o(i,t)?(i[t]=n,!0):r!==Ye&&Te(r,t)?(r[t]=n,!0):Te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},l){let c;return!!n[l]||e!==Ye&&Te(e,l)||$o(t,l)||(c=o[0])&&Te(c,l)||Te(r,l)||Te(ps,l)||Te(i.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function xu(e){return te(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ma=!0;function vg(e){const t=el(e),n=e.proxy,r=e.ctx;ma=!1,t.beforeCreate&&Cu(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:l,watch:c,provide:d,inject:p,created:m,beforeMount:y,mounted:v,beforeUpdate:M,updated:T,activated:F,deactivated:D,beforeDestroy:H,beforeUnmount:I,destroyed:O,unmounted:x,render:j,renderTracked:K,renderTriggered:re,errorCaptured:se,serverPrefetch:Q,expose:ie,inheritAttrs:we,components:U,directives:fe,filters:Re}=t;if(p&&Sg(p,r,null),l)for(const ke in l){const ve=l[ke];ae(ve)&&(r[ke]=ve.bind(n))}if(i){const ke=i.call(n,n);Ne(ke)&&(e.data=Ps(ke))}if(ma=!0,o)for(const ke in o){const ve=o[ke],Ot=ae(ve)?ve.bind(n,n):ae(ve.get)?ve.get.bind(n,n):At,Je=!ae(ve)&&ae(ve.set)?ve.set.bind(n):At,Nt=sl({get:Ot,set:Je});Object.defineProperty(r,ke,{enumerable:!0,configurable:!0,get:()=>Nt.value,set:at=>Nt.value=at})}if(c)for(const ke in c)kf(c[ke],r,n,ke);if(d){const ke=ae(d)?d.call(n):d;Reflect.ownKeys(ke).forEach(ve=>{Tg(ve,ke[ve])})}m&&Cu(m,e,"c");function Pe(ke,ve){te(ve)?ve.forEach(Ot=>ke(Ot.bind(n))):ve&&ke(ve.bind(n))}if(Pe(cg,y),Pe(gf,v),Pe(fg,M),Pe(dg,T),Pe(ag,F),Pe(lg,D),Pe(yg,se),Pe(pg,K),Pe(mg,re),Pe(wf,I),Pe(vf,x),Pe(hg,Q),te(ie))if(ie.length){const ke=e.exposed||(e.exposed={});ie.forEach(ve=>{Object.defineProperty(ke,ve,{get:()=>n[ve],set:Ot=>n[ve]=Ot})})}else e.exposed||(e.exposed={});j&&e.render===At&&(e.render=j),we!=null&&(e.inheritAttrs=we),U&&(e.components=U),fe&&(e.directives=fe),Q&&yf(e)}function Sg(e,t,n=At){te(e)&&(e=pa(e));for(const r in e){const i=e[r];let o;Ne(i)?"default"in i?o=ci(i.from||r,i.default,!0):o=ci(i.from||r):o=ci(i),it(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):t[r]=o}}function Cu(e,t,n){Wt(te(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function kf(e,t,n,r){let i=r.includes(".")?Lf(n,r):()=>n[r];if(He(e)){const o=t[e];ae(o)&&Ar(i,o)}else if(ae(e))Ar(i,e.bind(n));else if(Ne(e))if(te(e))e.forEach(o=>kf(o,t,n,r));else{const o=ae(e.handler)?e.handler.bind(n):t[e.handler];ae(o)&&Ar(i,o,e)}}function el(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,c=o.get(t);let d;return c?d=c:!i.length&&!n&&!r?d=t:(d={},i.length&&i.forEach(p=>Di(d,p,l,!0)),Di(d,t,l)),Ne(t)&&o.set(t,d),d}function Di(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&Di(e,o,n,!0),i&&i.forEach(l=>Di(e,l,n,!0));for(const l in t)if(!(r&&l==="expose")){const c=bg[l]||n&&n[l];e[l]=c?c(e[l],t[l]):t[l]}return e}const bg={data:Yu,props:Nu,emits:Nu,methods:fs,computed:fs,beforeCreate:ct,created:ct,beforeMount:ct,mounted:ct,beforeUpdate:ct,updated:ct,beforeDestroy:ct,beforeUnmount:ct,destroyed:ct,unmounted:ct,activated:ct,deactivated:ct,errorCaptured:ct,serverPrefetch:ct,components:fs,directives:fs,watch:kg,provide:Yu,inject:Og};function Yu(e,t){return t?e?function(){return $e(ae(e)?e.call(this,this):e,ae(t)?t.call(this,this):t)}:t:e}function Og(e,t){return fs(pa(e),pa(t))}function pa(e){if(te(e)){const t={};for(let n=0;n1)return n&&ae(t)?t.call(r&&r.proxy):t}}const Df={},Tf=()=>Object.create(Df),xf=e=>Object.getPrototypeOf(e)===Df;function xg(e,t,n,r=!1){const i={},o=Tf();e.propsDefaults=Object.create(null),Cf(e,t,i,o);for(const l in e.propsOptions[0])l in i||(i[l]=void 0);n?e.props=r?i:U_(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Cg(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:l}}=e,c=Me(i),[d]=e.propsOptions;let p=!1;if((r||l>0)&&!(l&16)){if(l&8){const m=e.vnode.dynamicProps;for(let y=0;y{d=!0;const[v,M]=Yf(y,t,!0);$e(l,v),M&&c.push(...M)};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!o&&!d)return Ne(e)&&r.set(e,Cr),Cr;if(te(o))for(let m=0;me[0]==="_"||e==="$stable",tl=e=>te(e)?e.map(Kt):[Kt(e)],Ng=(e,t,n)=>{if(t._n)return t;const r=tg((...i)=>tl(t(...i)),n);return r._c=!1,r},Ef=(e,t,n)=>{const r=e._ctx;for(const i in e){if(Nf(i))continue;const o=e[i];if(ae(o))t[i]=Ng(i,o,r);else if(o!=null){const l=tl(o);t[i]=()=>l}}},Rf=(e,t)=>{const n=tl(t);e.slots.default=()=>n},Pf=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},Eg=(e,t,n)=>{const r=e.slots=Tf();if(e.vnode.shapeFlag&32){const i=t._;i?(Pf(r,t,n),n&&Fc(r,"_",i,!0)):Ef(t,r)}else t&&Rf(e,t)},Rg=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,l=Ye;if(r.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:Pf(i,t,n):(o=!t.$stable,Ef(t,i)),l=t}else t&&(Rf(e,t),l={default:1});if(o)for(const c in i)!Nf(c)&&l[c]==null&&delete i[c]},_t=qg;function Pg(e){return Ag(e)}function Ag(e,t){const n=$i();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:l,createText:c,createComment:d,setText:p,setElementText:m,parentNode:y,nextSibling:v,setScopeId:M=At,insertStaticContent:T}=e,F=(_,w,k,E=null,C=null,Y=null,W=void 0,L=null,R=!!w.dynamicChildren)=>{if(_===w)return;_&&!sr(_,w)&&(E=mr(_),at(_,C,Y,!0),_=null),w.patchFlag===-2&&(R=!1,w.dynamicChildren=null);const{type:N,ref:ne,shapeFlag:V}=w;switch(N){case Zi:D(_,w,k,E);break;case dt:H(_,w,k,E);break;case fi:_==null&&I(w,k,E,W);break;case wt:U(_,w,k,E,C,Y,W,L,R);break;default:V&1?j(_,w,k,E,C,Y,W,L,R):V&6?fe(_,w,k,E,C,Y,W,L,R):(V&64||V&128)&&N.process(_,w,k,E,C,Y,W,L,R,Cn)}ne!=null&&C&&Mi(ne,_&&_.ref,Y,w||_,!w)},D=(_,w,k,E)=>{if(_==null)r(w.el=c(w.children),k,E);else{const C=w.el=_.el;w.children!==_.children&&p(C,w.children)}},H=(_,w,k,E)=>{_==null?r(w.el=d(w.children||""),k,E):w.el=_.el},I=(_,w,k,E)=>{[_.el,_.anchor]=T(_.children,w,k,E,_.el,_.anchor)},O=({el:_,anchor:w},k,E)=>{let C;for(;_&&_!==w;)C=v(_),r(_,k,E),_=C;r(w,k,E)},x=({el:_,anchor:w})=>{let k;for(;_&&_!==w;)k=v(_),i(_),_=k;i(w)},j=(_,w,k,E,C,Y,W,L,R)=>{w.type==="svg"?W="svg":w.type==="math"&&(W="mathml"),_==null?K(w,k,E,C,Y,W,L,R):Q(_,w,C,Y,W,L,R)},K=(_,w,k,E,C,Y,W,L)=>{let R,N;const{props:ne,shapeFlag:V,transition:Z,dirs:q}=_;if(R=_.el=l(_.type,Y,ne&&ne.is,ne),V&8?m(R,_.children):V&16&&se(_.children,R,null,E,C,Bo(_,Y),W,L),q&&Jn(_,null,E,"created"),re(R,_,_.scopeId,W,E),ne){for(const De in ne)De!=="value"&&!ds(De)&&o(R,De,null,ne[De],Y,E);"value"in ne&&o(R,"value",null,ne.value,Y),(N=ne.onVnodeBeforeMount)&&Gt(N,E,_)}q&&Jn(_,null,E,"beforeMount");const de=Fg(C,Z);de&&Z.beforeEnter(R),r(R,w,k),((N=ne&&ne.onVnodeMounted)||de||q)&&_t(()=>{N&&Gt(N,E,_),de&&Z.enter(R),q&&Jn(_,null,E,"mounted")},C)},re=(_,w,k,E,C)=>{if(k&&M(_,k),E)for(let Y=0;Y{for(let N=R;N<_.length;N++){const ne=_[N]=L?Fn(_[N]):Kt(_[N]);F(null,ne,w,k,E,C,Y,W,L)}},Q=(_,w,k,E,C,Y,W)=>{const L=w.el=_.el;let{patchFlag:R,dynamicChildren:N,dirs:ne}=w;R|=_.patchFlag&16;const V=_.props||Ye,Z=w.props||Ye;let q;if(k&&Qn(k,!1),(q=Z.onVnodeBeforeUpdate)&&Gt(q,k,w,_),ne&&Jn(w,_,k,"beforeUpdate"),k&&Qn(k,!0),(V.innerHTML&&Z.innerHTML==null||V.textContent&&Z.textContent==null)&&m(L,""),N?ie(_.dynamicChildren,N,L,k,E,Bo(w,C),Y):W||ve(_,w,L,null,k,E,Bo(w,C),Y,!1),R>0){if(R&16)we(L,V,Z,k,C);else if(R&2&&V.class!==Z.class&&o(L,"class",null,Z.class,C),R&4&&o(L,"style",V.style,Z.style,C),R&8){const de=w.dynamicProps;for(let De=0;De{q&&Gt(q,k,w,_),ne&&Jn(w,_,k,"updated")},E)},ie=(_,w,k,E,C,Y,W)=>{for(let L=0;L{if(w!==k){if(w!==Ye)for(const Y in w)!ds(Y)&&!(Y in k)&&o(_,Y,w[Y],null,C,E);for(const Y in k){if(ds(Y))continue;const W=k[Y],L=w[Y];W!==L&&Y!=="value"&&o(_,Y,L,W,C,E)}"value"in k&&o(_,"value",w.value,k.value,C)}},U=(_,w,k,E,C,Y,W,L,R)=>{const N=w.el=_?_.el:c(""),ne=w.anchor=_?_.anchor:c("");let{patchFlag:V,dynamicChildren:Z,slotScopeIds:q}=w;q&&(L=L?L.concat(q):q),_==null?(r(N,k,E),r(ne,k,E),se(w.children||[],k,ne,C,Y,W,L,R)):V>0&&V&64&&Z&&_.dynamicChildren?(ie(_.dynamicChildren,Z,k,C,Y,W,L),(w.key!=null||C&&w===C.subTree)&&Af(_,w,!0)):ve(_,w,k,ne,C,Y,W,L,R)},fe=(_,w,k,E,C,Y,W,L,R)=>{w.slotScopeIds=L,_==null?w.shapeFlag&512?C.ctx.activate(w,k,E,W,R):Re(w,k,E,C,Y,W,R):Xe(_,w,R)},Re=(_,w,k,E,C,Y,W)=>{const L=_.component=t0(_,E,C);if(zi(_)&&(L.ctx.renderer=Cn),r0(L,!1,W),L.asyncDep){if(C&&C.registerDep(L,Pe,W),!_.el){const R=L.subTree=st(dt);H(null,R,w,k)}}else Pe(L,_,w,k,C,Y,W)},Xe=(_,w,k)=>{const E=w.component=_.component;if(Gg(_,w,k))if(E.asyncDep&&!E.asyncResolved){ke(E,w,k);return}else E.next=w,E.update();else w.el=_.el,E.vnode=w},Pe=(_,w,k,E,C,Y,W)=>{const L=()=>{if(_.isMounted){let{next:V,bu:Z,u:q,parent:de,vnode:De}=_;{const Ke=Ff(_);if(Ke){V&&(V.el=De.el,ke(_,V,W)),Ke.asyncDep.then(()=>{_.isUnmounted||L()});return}}let ye=V,ce;Qn(_,!1),V?(V.el=De.el,ke(_,V,W)):V=De,Z&&ui(Z),(ce=V.props&&V.props.onVnodeBeforeUpdate)&&Gt(ce,de,V,De),Qn(_,!0);const Ge=Go(_),ht=_.subTree;_.subTree=Ge,F(ht,Ge,y(ht.el),mr(ht),_,C,Y),V.el=Ge.el,ye===null&&zg(_,Ge.el),q&&_t(q,C),(ce=V.props&&V.props.onVnodeUpdated)&&_t(()=>Gt(ce,de,V,De),C)}else{let V;const{el:Z,props:q}=w,{bm:de,m:De,parent:ye,root:ce,type:Ge}=_,ht=Rr(w);if(Qn(_,!1),de&&ui(de),!ht&&(V=q&&q.onVnodeBeforeMount)&&Gt(V,ye,w),Qn(_,!0),Z&&Kr){const Ke=()=>{_.subTree=Go(_),Kr(Z,_.subTree,_,C,null)};ht&&Ge.__asyncHydrate?Ge.__asyncHydrate(Z,_,Ke):Ke()}else{ce.ce&&ce.ce._injectChildStyle(Ge);const Ke=_.subTree=Go(_);F(null,Ke,k,E,_,C,Y),w.el=Ke.el}if(De&&_t(De,C),!ht&&(V=q&&q.onVnodeMounted)){const Ke=w;_t(()=>Gt(V,ye,Ke),C)}(w.shapeFlag&256||ye&&Rr(ye.vnode)&&ye.vnode.shapeFlag&256)&&_.a&&_t(_.a,C),_.isMounted=!0,w=k=E=null}};_.scope.on();const R=_.effect=new Uc(L);_.scope.off();const N=_.update=R.run.bind(R),ne=_.job=R.runIfDirty.bind(R);ne.i=_,ne.id=_.uid,R.scheduler=()=>Xa(ne),Qn(_,!0),N()},ke=(_,w,k)=>{w.component=_;const E=_.vnode.props;_.vnode=w,_.next=null,Cg(_,w.props,E,k),Rg(_,w.children,k),$n(),Mu(_),Bn()},ve=(_,w,k,E,C,Y,W,L,R=!1)=>{const N=_&&_.children,ne=_?_.shapeFlag:0,V=w.children,{patchFlag:Z,shapeFlag:q}=w;if(Z>0){if(Z&128){Je(N,V,k,E,C,Y,W,L,R);return}else if(Z&256){Ot(N,V,k,E,C,Y,W,L,R);return}}q&8?(ne&16&&Gn(N,C,Y),V!==N&&m(k,V)):ne&16?q&16?Je(N,V,k,E,C,Y,W,L,R):Gn(N,C,Y,!0):(ne&8&&m(k,""),q&16&&se(V,k,E,C,Y,W,L,R))},Ot=(_,w,k,E,C,Y,W,L,R)=>{_=_||Cr,w=w||Cr;const N=_.length,ne=w.length,V=Math.min(N,ne);let Z;for(Z=0;Zne?Gn(_,C,Y,!0,!1,V):se(w,k,E,C,Y,W,L,R,V)},Je=(_,w,k,E,C,Y,W,L,R)=>{let N=0;const ne=w.length;let V=_.length-1,Z=ne-1;for(;N<=V&&N<=Z;){const q=_[N],de=w[N]=R?Fn(w[N]):Kt(w[N]);if(sr(q,de))F(q,de,k,null,C,Y,W,L,R);else break;N++}for(;N<=V&&N<=Z;){const q=_[V],de=w[Z]=R?Fn(w[Z]):Kt(w[Z]);if(sr(q,de))F(q,de,k,null,C,Y,W,L,R);else break;V--,Z--}if(N>V){if(N<=Z){const q=Z+1,de=qZ)for(;N<=V;)at(_[N],C,Y,!0),N++;else{const q=N,de=N,De=new Map;for(N=de;N<=Z;N++){const Ve=w[N]=R?Fn(w[N]):Kt(w[N]);Ve.key!=null&&De.set(Ve.key,N)}let ye,ce=0;const Ge=Z-de+1;let ht=!1,Ke=0;const en=new Array(Ge);for(N=0;N=Ge){at(Ve,C,Y,!0);continue}let lt;if(Ve.key!=null)lt=De.get(Ve.key);else for(ye=de;ye<=Z;ye++)if(en[ye-de]===0&&sr(Ve,w[ye])){lt=ye;break}lt===void 0?at(Ve,C,Y,!0):(en[lt-de]=N+1,lt>=Ke?Ke=lt:ht=!0,F(Ve,w[lt],k,null,C,Y,W,L,R),ce++)}const zn=ht?Lg(en):Cr;for(ye=zn.length-1,N=Ge-1;N>=0;N--){const Ve=de+N,lt=w[Ve],Hs=Ve+1{const{el:Y,type:W,transition:L,children:R,shapeFlag:N}=_;if(N&6){Nt(_.component.subTree,w,k,E);return}if(N&128){_.suspense.move(w,k,E);return}if(N&64){W.move(_,w,k,Cn);return}if(W===wt){r(Y,w,k);for(let V=0;VL.enter(Y),C);else{const{leave:V,delayLeave:Z,afterLeave:q}=L,de=()=>r(Y,w,k),De=()=>{V(Y,()=>{de(),q&&q()})};Z?Z(Y,de,De):De()}else r(Y,w,k)},at=(_,w,k,E=!1,C=!1)=>{const{type:Y,props:W,ref:L,children:R,dynamicChildren:N,shapeFlag:ne,patchFlag:V,dirs:Z,cacheIndex:q}=_;if(V===-2&&(C=!1),L!=null&&Mi(L,null,k,_,!0),q!=null&&(w.renderCache[q]=void 0),ne&256){w.ctx.deactivate(_);return}const de=ne&1&&Z,De=!Rr(_);let ye;if(De&&(ye=W&&W.onVnodeBeforeUnmount)&&Gt(ye,w,_),ne&6)J(_.component,k,E);else{if(ne&128){_.suspense.unmount(k,E);return}de&&Jn(_,null,w,"beforeUnmount"),ne&64?_.type.remove(_,w,k,Cn,E):N&&!N.hasOnce&&(Y!==wt||V>0&&V&64)?Gn(N,w,k,!1,!0):(Y===wt&&V&384||!C&&ne&16)&&Gn(R,w,k),E&&hr(_)}(De&&(ye=W&&W.onVnodeUnmounted)||de)&&_t(()=>{ye&&Gt(ye,w,_),de&&Jn(_,null,w,"unmounted")},k)},hr=_=>{const{type:w,el:k,anchor:E,transition:C}=_;if(w===wt){Tn(k,E);return}if(w===fi){x(_);return}const Y=()=>{i(k),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(_.shapeFlag&1&&C&&!C.persisted){const{leave:W,delayLeave:L}=C,R=()=>W(k,Y);L?L(_.el,Y,R):R()}else Y()},Tn=(_,w)=>{let k;for(;_!==w;)k=v(_),i(_),_=k;i(w)},J=(_,w,k)=>{const{bum:E,scope:C,job:Y,subTree:W,um:L,m:R,a:N}=_;Ru(R),Ru(N),E&&ui(E),C.stop(),Y&&(Y.flags|=8,at(W,_,w,k)),L&&_t(L,w),_t(()=>{_.isUnmounted=!0},w),w&&w.pendingBranch&&!w.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===w.pendingId&&(w.deps--,w.deps===0&&w.resolve())},Gn=(_,w,k,E=!1,C=!1,Y=0)=>{for(let W=Y;W<_.length;W++)at(_[W],w,k,E,C)},mr=_=>{if(_.shapeFlag&6)return mr(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const w=v(_.anchor||_.el),k=w&&w[ng];return k?v(k):w};let xn=!1;const zr=(_,w,k)=>{_==null?w._vnode&&at(w._vnode,null,null,!0):F(w._vnode||null,_,w,null,null,null,k),w._vnode=_,xn||(xn=!0,Mu(),af(),xn=!1)},Cn={p:F,um:at,m:Nt,r:hr,mt:Re,mc:se,pc:ve,pbc:ie,n:mr,o:e};let qr,Kr;return t&&([qr,Kr]=t(Cn)),{render:zr,hydrate:qr,createApp:Dg(zr,qr)}}function Bo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Qn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Af(e,t,n=!1){const r=e.children,i=t.children;if(te(r)&&te(i))for(let o=0;o>1,e[n[c]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,l=n[o-1];o-- >0;)n[o]=l,l=t[l];return n}function Ff(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ff(t)}function Ru(e){if(e)for(let t=0;tci(Ig);function jg(e,t){return nl(e,null,t)}function Ar(e,t,n){return nl(e,t,n)}function nl(e,t,n=Ye){const{immediate:r,deep:i,flush:o,once:l}=n,c=$e({},n),d=t&&r||!t&&o!=="post";let p;if(ks){if(o==="sync"){const M=Wg();p=M.__watcherHandles||(M.__watcherHandles=[])}else if(!d){const M=()=>{};return M.stop=At,M.resume=At,M.pause=At,M}}const m=Qe;c.call=(M,T,F)=>Wt(M,m,T,F);let y=!1;o==="post"?c.scheduler=M=>{_t(M,m&&m.suspense)}:o!=="sync"&&(y=!0,c.scheduler=(M,T)=>{T?M():Xa(M)}),c.augmentJob=M=>{t&&(M.flags|=4),y&&(M.flags|=2,m&&(M.id=m.uid,M.i=m))};const v=J_(e,t,c);return ks&&(p?p.push(v):d&&v()),v}function Ug(e,t,n){const r=this.proxy,i=He(e)?e.includes(".")?Lf(r,e):()=>r[e]:e.bind(r,r);let o;ae(t)?o=t:(o=t.handler,n=t);const l=Fs(this),c=nl(i,o.bind(r),n);return l(),c}function Lf(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;it==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${xt(t)}Modifiers`]||e[`${Vn(t)}Modifiers`];function Vg(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Ye;let i=n;const o=t.startsWith("update:"),l=o&&Hg(r,t.slice(7));l&&(l.trim&&(i=n.map(m=>He(m)?m.trim():m)),l.number&&(i=n.map(Si)));let c,d=r[c=Io(t)]||r[c=Io(xt(t))];!d&&o&&(d=r[c=Io(Vn(t))]),d&&Wt(d,e,6,i);const p=r[c+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Wt(p,e,6,i)}}function If(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let l={},c=!1;if(!ae(e)){const d=p=>{const m=If(p,t,!0);m&&(c=!0,$e(l,m))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!o&&!c?(Ne(e)&&r.set(e,null),null):(te(o)?o.forEach(d=>l[d]=null):$e(l,o),Ne(e)&&r.set(e,l),l)}function Ki(e,t){return!e||!Ui(t)?!1:(t=t.slice(2).replace(/Once$/,""),Te(e,t[0].toLowerCase()+t.slice(1))||Te(e,Vn(t))||Te(e,t))}function Go(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[o],slots:l,attrs:c,emit:d,render:p,renderCache:m,props:y,data:v,setupState:M,ctx:T,inheritAttrs:F}=e,D=ki(e);let H,I;try{if(n.shapeFlag&4){const x=i||r,j=x;H=Kt(p.call(j,x,m,y,M,v,T)),I=c}else{const x=t;H=Kt(x.length>1?x(y,{attrs:c,slots:l,emit:d}):x(y,null)),I=t.props?c:$g(c)}}catch(x){ys.length=0,Gi(x,e,1),H=st(dt)}let O=H;if(I&&F!==!1){const x=Object.keys(I),{shapeFlag:j}=O;x.length&&j&7&&(o&&x.some(ja)&&(I=Bg(I,o)),O=Hn(O,I,!1,!0))}return n.dirs&&(O=Hn(O,null,!1,!0),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&Ss(O,n.transition),H=O,ki(D),H}const $g=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ui(n))&&((t||(t={}))[n]=e[n]);return t},Bg=(e,t)=>{const n={};for(const r in e)(!ja(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Gg(e,t,n){const{props:r,children:i,component:o}=e,{props:l,children:c,patchFlag:d}=t,p=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&d>=0){if(d&1024)return!0;if(d&16)return r?Pu(r,l,p):!!l;if(d&8){const m=t.dynamicProps;for(let y=0;ye.__isSuspense;function qg(e,t){t&&t.pendingBranch?te(e)?t.effects.push(...e):t.effects.push(e):eg(e)}const wt=Symbol.for("v-fgt"),Zi=Symbol.for("v-txt"),dt=Symbol.for("v-cmt"),fi=Symbol.for("v-stc"),ys=[];let vt=null;function _a(e=!1){ys.push(vt=e?null:[])}function Kg(){ys.pop(),vt=ys[ys.length-1]||null}let bs=1;function Au(e,t=!1){bs+=e,e<0&&vt&&t&&(vt.hasOnce=!0)}function jf(e){return e.dynamicChildren=bs>0?vt||Cr:null,Kg(),bs>0&&vt&&vt.push(e),e}function r1(e,t,n,r,i,o){return jf(Hf(e,t,n,r,i,o,!0))}function ga(e,t,n,r,i){return jf(st(e,t,n,r,i,!0))}function Os(e){return e?e.__v_isVNode===!0:!1}function sr(e,t){return e.type===t.type&&e.key===t.key}const Uf=({key:e})=>e??null,di=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?He(e)||it(e)||ae(e)?{i:Ze,r:e,k:t,f:!!n}:e:null);function Hf(e,t=null,n=null,r=0,i=null,o=e===wt?0:1,l=!1,c=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Uf(t),ref:t&&di(t),scopeId:uf,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ze};return c?(rl(d,n),o&128&&e.normalize(d)):n&&(d.shapeFlag|=He(n)?8:16),bs>0&&!l&&vt&&(d.patchFlag>0||o&6)&&d.patchFlag!==32&&vt.push(d),d}const st=Zg;function Zg(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===gg)&&(e=dt),Os(e)){const c=Hn(e,t,!0);return n&&rl(c,n),bs>0&&!o&&vt&&(c.shapeFlag&6?vt[vt.indexOf(e)]=c:vt.push(c)),c.patchFlag=-2,c}if(l0(e)&&(e=e.__vccOpts),t){t=Jg(t);let{class:c,style:d}=t;c&&!He(c)&&(t.class=$a(c)),Ne(d)&&(Qa(d)&&!te(d)&&(d=$e({},d)),t.style=Va(d))}const l=He(e)?1:Wf(e)?128:cf(e)?64:Ne(e)?4:ae(e)?2:0;return Hf(e,t,n,r,i,l,o,!0)}function Jg(e){return e?Qa(e)||xf(e)?$e({},e):e:null}function Hn(e,t,n=!1,r=!1){const{props:i,ref:o,patchFlag:l,children:c,transition:d}=e,p=t?Qg(i||{},t):i,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Uf(p),ref:t&&t.ref?n&&o?te(o)?o.concat(di(t)):[o,di(t)]:di(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==wt?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Hn(e.ssContent),ssFallback:e.ssFallback&&Hn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&r&&Ss(m,d.clone(m)),m}function Vf(e=" ",t=0){return st(Zi,null,e,t)}function s1(e,t){const n=st(fi,null,e);return n.staticCount=t,n}function i1(e="",t=!1){return t?(_a(),ga(dt,null,e)):st(dt,null,e)}function Kt(e){return e==null||typeof e=="boolean"?st(dt):te(e)?st(wt,null,e.slice()):Os(e)?Fn(e):st(Zi,null,String(e))}function Fn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Hn(e)}function rl(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(te(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),rl(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!xf(t)?t._ctx=Ze:i===3&&Ze&&(Ze.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ae(t)?(t={default:t,_ctx:Ze},n=32):(t=String(t),r&64?(n=16,t=[Vf(t)]):n=8);e.children=t,e.shapeFlag|=n}function Qg(...e){const t={};for(let n=0;nQe||Ze;let Ti,wa;{const e=$i(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),o=>{i.length>1?i.forEach(l=>l(o)):i[0](o)}};Ti=t("__VUE_INSTANCE_SETTERS__",n=>Qe=n),wa=t("__VUE_SSR_SETTERS__",n=>ks=n)}const Fs=e=>{const t=Qe;return Ti(e),e.scope.on(),()=>{e.scope.off(),Ti(t)}},Fu=()=>{Qe&&Qe.scope.off(),Ti(null)};function $f(e){return e.vnode.shapeFlag&4}let ks=!1;function r0(e,t=!1,n=!1){t&&wa(t);const{props:r,children:i}=e.vnode,o=$f(e);xg(e,r,o,t),Eg(e,i,n);const l=o?s0(e,t):void 0;return t&&wa(!1),l}function s0(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,wg);const{setup:r}=n;if(r){$n();const i=e.setupContext=r.length>1?o0(e):null,o=Fs(e),l=As(r,e,0,[e.props,i]),c=Rc(l);if(Bn(),o(),(c||e.sp)&&!Rr(e)&&yf(e),c){if(l.then(Fu,Fu),t)return l.then(d=>{Lu(e,d,t)}).catch(d=>{Gi(d,e,0)});e.asyncDep=l}else Lu(e,l,t)}else Bf(e,t)}function Lu(e,t,n){ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ne(t)&&(e.setupState=nf(t)),Bf(e,n)}let Iu;function Bf(e,t,n){const r=e.type;if(!e.render){if(!t&&Iu&&!r.render){const i=r.template||el(e).template;if(i){const{isCustomElement:o,compilerOptions:l}=e.appContext.config,{delimiters:c,compilerOptions:d}=r,p=$e($e({isCustomElement:o,delimiters:c},l),d);r.render=Iu(i,p)}}e.render=r.render||At}{const i=Fs(e);$n();try{vg(e)}finally{Bn(),i()}}}const i0={get(e,t){return tt(e,"get",""),e[t]}};function o0(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,i0),slots:e.slots,emit:e.emit,expose:t}}function Ji(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(nf(H_(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ps)return ps[n](e)},has(t,n){return n in t||n in ps}})):e.proxy}function a0(e,t=!0){return ae(e)?e.displayName||e.name:e.name||t&&e.__name}function l0(e){return ae(e)&&"__vccOpts"in e}const sl=(e,t)=>K_(e,t,ks);function u0(e,t,n){const r=arguments.length;return r===2?Ne(t)&&!te(t)?Os(t)?st(e,null,[t]):st(e,t):st(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Os(n)&&(n=[n]),st(e,t,n))}const c0="3.5.13";/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let va;const Wu=typeof window<"u"&&window.trustedTypes;if(Wu)try{va=Wu.createPolicy("vue",{createHTML:e=>e})}catch{}const Gf=va?e=>va.createHTML(e):e=>e,f0="http://www.w3.org/2000/svg",d0="http://www.w3.org/1998/Math/MathML",mn=typeof document<"u"?document:null,ju=mn&&mn.createElement("template"),h0={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?mn.createElementNS(f0,e):t==="mathml"?mn.createElementNS(d0,e):n?mn.createElement(e,{is:n}):mn.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>mn.createTextNode(e),createComment:e=>mn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const l=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{ju.innerHTML=Gf(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const c=ju.content;if(r==="svg"||r==="mathml"){const d=c.firstChild;for(;d.firstChild;)c.appendChild(d.firstChild);c.removeChild(d)}t.insertBefore(c,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Rn="transition",os="animation",Ms=Symbol("_vtc"),zf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},m0=$e({},ff,zf),p0=e=>(e.displayName="Transition",e.props=m0,e),o1=p0((e,{slots:t})=>u0(ig,y0(e),t)),Xn=(e,t=[])=>{te(e)?e.forEach(n=>n(...t)):e&&e(...t)},Uu=e=>e?te(e)?e.some(t=>t.length>1):e.length>1:!1;function y0(e){const t={};for(const U in e)U in zf||(t[U]=e[U]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:d=o,appearActiveClass:p=l,appearToClass:m=c,leaveFromClass:y=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:M=`${n}-leave-to`}=e,T=_0(i),F=T&&T[0],D=T&&T[1],{onBeforeEnter:H,onEnter:I,onEnterCancelled:O,onLeave:x,onLeaveCancelled:j,onBeforeAppear:K=H,onAppear:re=I,onAppearCancelled:se=O}=t,Q=(U,fe,Re,Xe)=>{U._enterCancelled=Xe,er(U,fe?m:c),er(U,fe?p:l),Re&&Re()},ie=(U,fe)=>{U._isLeaving=!1,er(U,y),er(U,M),er(U,v),fe&&fe()},we=U=>(fe,Re)=>{const Xe=U?re:I,Pe=()=>Q(fe,U,Re);Xn(Xe,[fe,Pe]),Hu(()=>{er(fe,U?d:o),dn(fe,U?m:c),Uu(Xe)||Vu(fe,r,F,Pe)})};return $e(t,{onBeforeEnter(U){Xn(H,[U]),dn(U,o),dn(U,l)},onBeforeAppear(U){Xn(K,[U]),dn(U,d),dn(U,p)},onEnter:we(!1),onAppear:we(!0),onLeave(U,fe){U._isLeaving=!0;const Re=()=>ie(U,fe);dn(U,y),U._enterCancelled?(dn(U,v),Gu()):(Gu(),dn(U,v)),Hu(()=>{U._isLeaving&&(er(U,y),dn(U,M),Uu(x)||Vu(U,r,D,Re))}),Xn(x,[U,Re])},onEnterCancelled(U){Q(U,!1,void 0,!0),Xn(O,[U])},onAppearCancelled(U){Q(U,!0,void 0,!0),Xn(se,[U])},onLeaveCancelled(U){ie(U),Xn(j,[U])}})}function _0(e){if(e==null)return null;if(Ne(e))return[zo(e.enter),zo(e.leave)];{const t=zo(e);return[t,t]}}function zo(e){return d_(e)}function dn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ms]||(e[Ms]=new Set)).add(t)}function er(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ms];n&&(n.delete(t),n.size||(e[Ms]=void 0))}function Hu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let g0=0;function Vu(e,t,n,r){const i=e._endId=++g0,o=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:l,timeout:c,propCount:d}=w0(e,t);if(!l)return r();const p=l+"end";let m=0;const y=()=>{e.removeEventListener(p,v),o()},v=M=>{M.target===e&&++m>=d&&y()};setTimeout(()=>{m(n[T]||"").split(", "),i=r(`${Rn}Delay`),o=r(`${Rn}Duration`),l=$u(i,o),c=r(`${os}Delay`),d=r(`${os}Duration`),p=$u(c,d);let m=null,y=0,v=0;t===Rn?l>0&&(m=Rn,y=l,v=o.length):t===os?p>0&&(m=os,y=p,v=d.length):(y=Math.max(l,p),m=y>0?l>p?Rn:os:null,v=m?m===Rn?o.length:d.length:0);const M=m===Rn&&/\b(transform|all)(,|$)/.test(r(`${Rn}Property`).toString());return{type:m,timeout:y,propCount:v,hasTransform:M}}function $u(e,t){for(;e.lengthBu(n)+Bu(e[r])))}function Bu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Gu(){return document.body.offsetHeight}function v0(e,t,n){const r=e[Ms];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const xi=Symbol("_vod"),qf=Symbol("_vsh"),a1={beforeMount(e,{value:t},{transition:n}){e[xi]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):as(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),as(e,!0),r.enter(e)):r.leave(e,()=>{as(e,!1)}):as(e,t))},beforeUnmount(e,{value:t}){as(e,t)}};function as(e,t){e.style.display=t?e[xi]:"none",e[qf]=!t}const S0=Symbol(""),b0=/(^|;)\s*display\s*:/;function O0(e,t,n){const r=e.style,i=He(n);let o=!1;if(n&&!i){if(t)if(He(t))for(const l of t.split(";")){const c=l.slice(0,l.indexOf(":")).trim();n[c]==null&&hi(r,c,"")}else for(const l in t)n[l]==null&&hi(r,l,"");for(const l in n)l==="display"&&(o=!0),hi(r,l,n[l])}else if(i){if(t!==n){const l=r[S0];l&&(n+=";"+l),r.cssText=n,o=b0.test(n)}}else t&&e.removeAttribute("style");xi in e&&(e[xi]=o?r.display:"",e[qf]&&(r.display="none"))}const zu=/\s*!important$/;function hi(e,t,n){if(te(n))n.forEach(r=>hi(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=k0(e,t);zu.test(n)?e.setProperty(Vn(r),n.replace(zu,""),"important"):e[r]=n}}const qu=["Webkit","Moz","ms"],qo={};function k0(e,t){const n=qo[t];if(n)return n;let r=xt(t);if(r!=="filter"&&r in e)return qo[t]=r;r=Vi(r);for(let i=0;iKo||(x0.then(()=>Ko=0),Ko=Date.now());function Y0(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Wt(N0(r,n.value),t,5,[r])};return n.value=e,n.attached=C0(),n}function N0(e,t){if(te(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const ec=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,E0=(e,t,n,r,i,o)=>{const l=i==="svg";t==="class"?v0(e,r,l):t==="style"?O0(e,n,r):Ui(t)?ja(t)||D0(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):R0(e,t,r,l))?(Ju(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Zu(e,t,r,l,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!He(r))?Ju(e,xt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Zu(e,t,r,l))};function R0(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&ec(t)&&ae(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return ec(t)&&He(n)?!1:t in e}const Wr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return te(t)?n=>ui(t,n):t};function P0(e){e.target.composing=!0}function tc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const vn=Symbol("_assign"),l1={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[vn]=Wr(i);const o=r||i.props&&i.props.type==="number";Ln(e,t?"change":"input",l=>{if(l.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=Si(c)),e[vn](c)}),n&&Ln(e,"change",()=>{e.value=e.value.trim()}),t||(Ln(e,"compositionstart",P0),Ln(e,"compositionend",tc),Ln(e,"change",tc))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:o}},l){if(e[vn]=Wr(l),e.composing)return;const c=(o||e.type==="number")&&!/^0\d/.test(e.value)?Si(e.value):e.value,d=t??"";c!==d&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||i&&e.value.trim()===d)||(e.value=d))}},u1={deep:!0,created(e,t,n){e[vn]=Wr(n),Ln(e,"change",()=>{const r=e._modelValue,i=Ds(e),o=e.checked,l=e[vn];if(te(r)){const c=Ba(r,i),d=c!==-1;if(o&&!d)l(r.concat(i));else if(!o&&d){const p=[...r];p.splice(c,1),l(p)}}else if(jr(r)){const c=new Set(r);o?c.add(i):c.delete(i),l(c)}else l(Kf(e,o))})},mounted:nc,beforeUpdate(e,t,n){e[vn]=Wr(n),nc(e,t,n)}};function nc(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(te(t))i=Ba(t,r.props.value)>-1;else if(jr(t))i=t.has(r.props.value);else{if(t===n)return;i=Rs(t,Kf(e,!0))}e.checked!==i&&(e.checked=i)}const c1={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=jr(t);Ln(e,"change",()=>{const o=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?Si(Ds(l)):Ds(l));e[vn](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,sf(()=>{e._assigning=!1})}),e[vn]=Wr(r)},mounted(e,{value:t}){rc(e,t)},beforeUpdate(e,t,n){e[vn]=Wr(n)},updated(e,{value:t}){e._assigning||rc(e,t)}};function rc(e,t){const n=e.multiple,r=te(t);if(!(n&&!r&&!jr(t))){for(let i=0,o=e.options.length;iString(p)===String(c)):l.selected=Ba(t,c)>-1}else l.selected=t.has(c);else if(Rs(Ds(l),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ds(e){return"_value"in e?e._value:e.value}function Kf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const A0=["ctrl","shift","alt","meta"],F0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>A0.some(n=>e[`${n}Key`]&&!t.includes(n))},f1=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(i,...o)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=i=>{if(!("key"in i))return;const o=Vn(i.key);if(t.some(l=>l===o||L0[l]===o))return e(i)})},I0=$e({patchProp:E0},h0);let sc;function W0(){return sc||(sc=Pg(I0))}const h1=(...e)=>{const t=W0().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=U0(r);if(!i)return;const o=t._component;!ae(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const l=n(i,!1,j0(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),l},t};function j0(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function U0(e){return He(e)?document.querySelector(e):e}//! moment.js +function yo(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}function _o(e){if(Q(e)){const t={};for(let n=0;n{if(n){const r=n.split(gy);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function go(e){let t="";if(Ve(e))t=e;else if(Q(e))for(let n=0;nbs(n,t))}const Zk=e=>Ve(e)?e:e==null?"":Q(e)||Ce(e)&&(e.toString===lc||!ae(e.toString))?JSON.stringify(e,ac,2):String(e),ac=(e,t)=>t&&t.__v_isRef?ac(e,t.value):br(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:Er(t)?{[`Set(${t.size})`]:[...t.values()]}:Ce(t)&&!Q(t)&&!uc(t)?String(t):t,Re={},vr=[],Nt=()=>{},Oy=()=>!1,My=/^on[^a-z]/,Ti=e=>My.test(e),vo=e=>e.startsWith("onUpdate:"),Je=Object.assign,bo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Dy=Object.prototype.hasOwnProperty,_e=(e,t)=>Dy.call(e,t),Q=Array.isArray,br=e=>Ss(e)==="[object Map]",Er=e=>Ss(e)==="[object Set]",Ql=e=>Ss(e)==="[object Date]",ae=e=>typeof e=="function",Ve=e=>typeof e=="string",ls=e=>typeof e=="symbol",Ce=e=>e!==null&&typeof e=="object",oc=e=>Ce(e)&&ae(e.then)&&ae(e.catch),lc=Object.prototype.toString,Ss=e=>lc.call(e),Ty=e=>Ss(e).slice(8,-1),uc=e=>Ss(e)==="[object Object]",So=e=>Ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qs=yo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),xi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},xy=/-(\w)/g,Vt=xi(e=>e.replace(xy,(t,n)=>n?n.toUpperCase():"")),Cy=/\B([A-Z])/g,nr=xi(e=>e.replace(Cy,"-$1").toLowerCase()),Ci=xi(e=>e.charAt(0).toUpperCase()+e.slice(1)),ka=xi(e=>e?`on${Ci(e)}`:""),us=(e,t)=>!Object.is(e,t),Xs=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},fi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Yy=e=>{const t=Ve(e)?Number(e):NaN;return isNaN(t)?e:t};let Xl;const Ny=()=>Xl||(Xl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Tt;class cc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Tt,!t&&Tt&&(this.index=(Tt.scopes||(Tt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Tt;try{return Tt=this,t()}finally{Tt=n}}}on(){Tt=this}off(){Tt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},fc=e=>(e.w&Rn)>0,dc=e=>(e.n&Rn)>0,Ay=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(p==="length"||p>=h)&&f.push(m)})}else switch(n!==void 0&&f.push(l.get(n)),t){case"add":Q(e)?So(n)&&f.push(l.get("length")):(f.push(l.get(Xn)),br(e)&&f.push(l.get(Ha)));break;case"delete":Q(e)||(f.push(l.get(Xn)),br(e)&&f.push(l.get(Ha)));break;case"set":br(e)&&f.push(l.get(Xn));break}if(f.length===1)f[0]&&Va(f[0]);else{const h=[];for(const m of f)m&&h.push(...m);Va(ko(h))}}function Va(e,t){const n=Q(e)?e:[...e];for(const r of n)r.computed&&tu(r);for(const r of n)r.computed||tu(r)}function tu(e,t){(e!==xt||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Ly=yo("__proto__,__v_isRef,__isVue"),pc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ls)),Iy=Mo(),Wy=Mo(!1,!0),jy=Mo(!0),nu=Uy();function Uy(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Se(this);for(let o=0,l=this.length;o{e[t]=function(...n){Pr();const r=Se(this)[t].apply(this,n);return Rr(),r}}),e}function Hy(e){const t=Se(this);return lt(t,"has",e),t.hasOwnProperty(e)}function Mo(e=!1,t=!1){return function(r,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&o===(e?t?s_:vc:t?wc:gc).get(r))return r;const l=Q(r);if(!e){if(l&&_e(nu,i))return Reflect.get(nu,i,o);if(i==="hasOwnProperty")return Hy}const f=Reflect.get(r,i,o);return(ls(i)?pc.has(i):Ly(i))||(e||lt(r,"get",i),t)?f:et(f)?l&&So(i)?f:f.value:Ce(f)?e?bc(f):ks(f):f}}const Vy=yc(),$y=yc(!0);function yc(e=!1){return function(n,r,i,o){let l=n[r];if(xr(l)&&et(l)&&!et(i))return!1;if(!e&&(!di(i)&&!xr(i)&&(l=Se(l),i=Se(i)),!Q(n)&&et(l)&&!et(i)))return l.value=i,!0;const f=Q(n)&&So(r)?Number(r)e,Yi=e=>Reflect.getPrototypeOf(e);function $s(e,t,n=!1,r=!1){e=e.__v_raw;const i=Se(e),o=Se(t);n||(t!==o&<(i,"get",t),lt(i,"get",o));const{has:l}=Yi(i),f=r?Do:n?Co:cs;if(l.call(i,t))return f(e.get(t));if(l.call(i,o))return f(e.get(o));e!==i&&e.get(t)}function Bs(e,t=!1){const n=this.__v_raw,r=Se(n),i=Se(e);return t||(e!==i&<(r,"has",e),lt(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Gs(e,t=!1){return e=e.__v_raw,!t&<(Se(e),"iterate",Xn),Reflect.get(e,"size",e)}function ru(e){e=Se(e);const t=Se(this);return Yi(t).has.call(t,e)||(t.add(e),mn(t,"add",e,e)),this}function su(e,t){t=Se(t);const n=Se(this),{has:r,get:i}=Yi(n);let o=r.call(n,e);o||(e=Se(e),o=r.call(n,e));const l=i.call(n,e);return n.set(e,t),o?us(t,l)&&mn(n,"set",e,t):mn(n,"add",e,t),this}function iu(e){const t=Se(this),{has:n,get:r}=Yi(t);let i=n.call(t,e);i||(e=Se(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&mn(t,"delete",e,void 0),o}function au(){const e=Se(this),t=e.size!==0,n=e.clear();return t&&mn(e,"clear",void 0,void 0),n}function zs(e,t){return function(r,i){const o=this,l=o.__v_raw,f=Se(l),h=t?Do:e?Co:cs;return!e&<(f,"iterate",Xn),l.forEach((m,p)=>r.call(i,h(m),h(p),o))}}function qs(e,t,n){return function(...r){const i=this.__v_raw,o=Se(i),l=br(o),f=e==="entries"||e===Symbol.iterator&&l,h=e==="keys"&&l,m=i[e](...r),p=n?Do:t?Co:cs;return!t&<(o,"iterate",h?Ha:Xn),{next(){const{value:w,done:v}=m.next();return v?{value:w,done:v}:{value:f?[p(w[0]),p(w[1])]:p(w),done:v}},[Symbol.iterator](){return this}}}}function kn(e){return function(...t){return e==="delete"?!1:this}}function Zy(){const e={get(o){return $s(this,o)},get size(){return Gs(this)},has:Bs,add:ru,set:su,delete:iu,clear:au,forEach:zs(!1,!1)},t={get(o){return $s(this,o,!1,!0)},get size(){return Gs(this)},has:Bs,add:ru,set:su,delete:iu,clear:au,forEach:zs(!1,!0)},n={get(o){return $s(this,o,!0)},get size(){return Gs(this,!0)},has(o){return Bs.call(this,o,!0)},add:kn("add"),set:kn("set"),delete:kn("delete"),clear:kn("clear"),forEach:zs(!0,!1)},r={get(o){return $s(this,o,!0,!0)},get size(){return Gs(this,!0)},has(o){return Bs.call(this,o,!0)},add:kn("add"),set:kn("set"),delete:kn("delete"),clear:kn("clear"),forEach:zs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=qs(o,!1,!1),n[o]=qs(o,!0,!1),t[o]=qs(o,!1,!0),r[o]=qs(o,!0,!0)}),[e,n,t,r]}const[Jy,Qy,Xy,e_]=Zy();function To(e,t){const n=t?e?e_:Xy:e?Qy:Jy;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_e(n,i)&&i in r?n:r,i,o)}const t_={get:To(!1,!1)},n_={get:To(!1,!0)},r_={get:To(!0,!1)},gc=new WeakMap,wc=new WeakMap,vc=new WeakMap,s_=new WeakMap;function i_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function a_(e){return e.__v_skip||!Object.isExtensible(e)?0:i_(Ty(e))}function ks(e){return xr(e)?e:xo(e,!1,_c,t_,gc)}function o_(e){return xo(e,!1,Ky,n_,wc)}function bc(e){return xo(e,!0,qy,r_,vc)}function xo(e,t,n,r,i){if(!Ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const l=a_(e);if(l===0)return e;const f=new Proxy(e,l===2?r:n);return i.set(e,f),f}function Sr(e){return xr(e)?Sr(e.__v_raw):!!(e&&e.__v_isReactive)}function xr(e){return!!(e&&e.__v_isReadonly)}function di(e){return!!(e&&e.__v_isShallow)}function Sc(e){return Sr(e)||xr(e)}function Se(e){const t=e&&e.__v_raw;return t?Se(t):e}function kc(e){return ci(e,"__v_skip",!0),e}const cs=e=>Ce(e)?ks(e):e,Co=e=>Ce(e)?bc(e):e;function Oc(e){Nn&&xt&&(e=Se(e),mc(e.dep||(e.dep=ko())))}function Mc(e,t){e=Se(e);const n=e.dep;n&&Va(n)}function et(e){return!!(e&&e.__v_isRef===!0)}function l_(e){return u_(e,!1)}function u_(e,t){return et(e)?e:new c_(e,t)}class c_{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Se(t),this._value=n?t:cs(t)}get value(){return Oc(this),this._value}set value(t){const n=this.__v_isShallow||di(t)||xr(t);t=n?t:Se(t),us(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:cs(t),Mc(this))}}function f_(e){return et(e)?e.value:e}const d_={get:(e,t,n)=>f_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return et(i)&&!et(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Dc(e){return Sr(e)?e:new Proxy(e,d_)}var Tc;class h_{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Tc]=!1,this._dirty=!0,this.effect=new Oo(t,()=>{this._dirty||(this._dirty=!0,Mc(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=Se(this);return Oc(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Tc="__v_isReadonly";function m_(e,t,n=!1){let r,i;const o=ae(e);return o?(r=e,i=Nt):(r=e.get,i=e.set),new h_(r,i,o||!i,n)}function En(e,t,n,r){let i;try{i=r?e(...r):e()}catch(o){Ni(o,t,n)}return i}function gt(e,t,n,r){if(ae(e)){const o=En(e,t,n,r);return o&&oc(o)&&o.catch(l=>{Ni(l,t,n)}),o}const i=[];for(let o=0;o>>1;ds(Xe[r])jt&&Xe.splice(t,1)}function w_(e){Q(e)?kr.push(...e):(!on||!on.includes(e,e.allowRecurse?qn+1:qn))&&kr.push(e),Cc()}function ou(e,t=fs?jt+1:0){for(;tds(n)-ds(r)),qn=0;qne.id==null?1/0:e.id,v_=(e,t)=>{const n=ds(e)-ds(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Nc(e){$a=!1,fs=!0,Xe.sort(v_);const t=Nt;try{for(jt=0;jtVe(M)?M.trim():M)),w&&(i=n.map(fi))}let f,h=r[f=ka(t)]||r[f=ka(Vt(t))];!h&&o&&(h=r[f=ka(nr(t))]),h&>(h,e,6,i);const m=r[f+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,gt(m,e,6,i)}}function Ec(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let l={},f=!1;if(!ae(e)){const h=m=>{const p=Ec(m,t,!0);p&&(f=!0,Je(l,p))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!o&&!f?(Ce(e)&&r.set(e,null),null):(Q(o)?o.forEach(h=>l[h]=null):Je(l,o),Ce(e)&&r.set(e,l),l)}function Ei(e,t){return!e||!Ti(t)?!1:(t=t.slice(2).replace(/Once$/,""),_e(e,t[0].toLowerCase()+t.slice(1))||_e(e,nr(t))||_e(e,t))}let Ze=null,Pi=null;function hi(e){const t=Ze;return Ze=e,Pi=e&&e.type.__scopeId||null,t}function Jk(e){Pi=e}function Qk(){Pi=null}function S_(e,t=Ze,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&_u(-1);const o=hi(t);let l;try{l=e(...i)}finally{hi(o),r._d&&_u(1)}return l};return r._n=!0,r._c=!0,r._d=!0,r}function Oa(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[l],slots:f,attrs:h,emit:m,render:p,renderCache:w,data:v,setupState:M,ctx:D,inheritAttrs:Y}=e;let A,G;const X=hi(e);try{if(n.shapeFlag&4){const F=i||r;A=Wt(p.call(F,F,w,o,M,v,D)),G=h}else{const F=t;A=Wt(F.length>1?F(o,{attrs:h,slots:f,emit:m}):F(o,null)),G=t.props?h:k_(h)}}catch(F){as.length=0,Ni(F,e,1),A=tt(wt)}let S=A;if(G&&Y!==!1){const F=Object.keys(G),{shapeFlag:ee}=S;F.length&&ee&7&&(l&&F.some(vo)&&(G=O_(G,l)),S=An(S,G))}return n.dirs&&(S=An(S),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&(S.transition=n.transition),A=S,hi(X),A}const k_=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ti(n))&&((t||(t={}))[n]=e[n]);return t},O_=(e,t)=>{const n={};for(const r in e)(!vo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function M_(e,t,n){const{props:r,children:i,component:o}=e,{props:l,children:f,patchFlag:h}=t,m=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return r?lu(r,l,m):!!l;if(h&8){const p=t.dynamicProps;for(let w=0;we.__isSuspense;function x_(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):w_(e)}function C_(e,t){if(He){let n=He.provides;const r=He.parent&&He.parent.provides;r===n&&(n=He.provides=Object.create(r)),n[e]=t}}function ei(e,t,n=!1){const r=He||Ze;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&ae(t)?t.call(r.proxy):t}}function Y_(e,t){return Eo(e,null,t)}const Ks={};function Or(e,t,n){return Eo(e,t,n)}function Eo(e,t,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:l}=Re){const f=Ry()===(He==null?void 0:He.scope)?He:null;let h,m=!1,p=!1;if(et(e)?(h=()=>e.value,m=di(e)):Sr(e)?(h=()=>e,r=!0):Q(e)?(p=!0,m=e.some(S=>Sr(S)||di(S)),h=()=>e.map(S=>{if(et(S))return S.value;if(Sr(S))return Jn(S);if(ae(S))return En(S,f,2)})):ae(e)?t?h=()=>En(e,f,2):h=()=>{if(!(f&&f.isUnmounted))return w&&w(),gt(e,f,3,[v])}:h=Nt,t&&r){const S=h;h=()=>Jn(S())}let w,v=S=>{w=G.onStop=()=>{En(S,f,4)}},M;if(ms)if(v=Nt,t?n&>(t,f,3,[h(),p?[]:void 0,v]):h(),i==="sync"){const S=Dg();M=S.__watcherHandles||(S.__watcherHandles=[])}else return Nt;let D=p?new Array(e.length).fill(Ks):Ks;const Y=()=>{if(G.active)if(t){const S=G.run();(r||m||(p?S.some((F,ee)=>us(F,D[ee])):us(S,D)))&&(w&&w(),gt(t,f,3,[S,D===Ks?void 0:p&&D[0]===Ks?[]:D,v]),D=S)}else G.run()};Y.allowRecurse=!!t;let A;i==="sync"?A=Y:i==="post"?A=()=>at(Y,f&&f.suspense):(Y.pre=!0,f&&(Y.id=f.uid),A=()=>No(Y));const G=new Oo(h,A);t?n?Y():D=G.run():i==="post"?at(G.run.bind(G),f&&f.suspense):G.run();const X=()=>{G.stop(),f&&f.scope&&bo(f.scope.effects,G)};return M&&M.push(X),X}function N_(e,t,n){const r=this.proxy,i=Ve(e)?e.includes(".")?Pc(r,e):()=>r[e]:e.bind(r,r);let o;ae(t)?o=t:(o=t.handler,n=t);const l=He;Cr(this);const f=Eo(i,o.bind(r),n);return l?Cr(l):er(),f}function Pc(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Jn(n,t)});else if(uc(e))for(const n in e)Jn(e[n],t);return e}function E_(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ic(()=>{e.isMounted=!0}),Wc(()=>{e.isUnmounting=!0}),e}const pt=[Function,Array],P_={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:pt,onEnter:pt,onAfterEnter:pt,onEnterCancelled:pt,onBeforeLeave:pt,onLeave:pt,onAfterLeave:pt,onLeaveCancelled:pt,onBeforeAppear:pt,onAppear:pt,onAfterAppear:pt,onAppearCancelled:pt},setup(e,{slots:t}){const n=_g(),r=E_();let i;return()=>{const o=t.default&&Fc(t.default(),!0);if(!o||!o.length)return;let l=o[0];if(o.length>1){for(const Y of o)if(Y.type!==wt){l=Y;break}}const f=Se(e),{mode:h}=f;if(r.isLeaving)return Ma(l);const m=uu(l);if(!m)return Ma(l);const p=Ba(m,f,r,n);Ga(m,p);const w=n.subTree,v=w&&uu(w);let M=!1;const{getTransitionKey:D}=m.type;if(D){const Y=D();i===void 0?i=Y:Y!==i&&(i=Y,M=!0)}if(v&&v.type!==wt&&(!Kn(m,v)||M)){const Y=Ba(v,f,r,n);if(Ga(v,Y),h==="out-in")return r.isLeaving=!0,Y.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},Ma(l);h==="in-out"&&m.type!==wt&&(Y.delayLeave=(A,G,X)=>{const S=Ac(r,v);S[String(v.key)]=v,A._leaveCb=()=>{G(),A._leaveCb=void 0,delete p.delayedLeave},p.delayedLeave=X})}return l}}},Rc=P_;function Ac(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ba(e,t,n,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:f,onEnter:h,onAfterEnter:m,onEnterCancelled:p,onBeforeLeave:w,onLeave:v,onAfterLeave:M,onLeaveCancelled:D,onBeforeAppear:Y,onAppear:A,onAfterAppear:G,onAppearCancelled:X}=t,S=String(e.key),F=Ac(n,e),ee=(j,ue)=>{j&>(j,r,9,ue)},oe=(j,ue)=>{const se=ue[1];ee(j,ue),Q(j)?j.every(Ye=>Ye.length<=1)&&se():j.length<=1&&se()},le={mode:o,persisted:l,beforeEnter(j){let ue=f;if(!n.isMounted)if(i)ue=Y||f;else return;j._leaveCb&&j._leaveCb(!0);const se=F[S];se&&Kn(e,se)&&se.el._leaveCb&&se.el._leaveCb(),ee(ue,[j])},enter(j){let ue=h,se=m,Ye=p;if(!n.isMounted)if(i)ue=A||h,se=G||m,Ye=X||p;else return;let H=!1;const ce=j._enterCb=We=>{H||(H=!0,We?ee(Ye,[j]):ee(se,[j]),le.delayedLeave&&le.delayedLeave(),j._enterCb=void 0)};ue?oe(ue,[j,ce]):ce()},leave(j,ue){const se=String(e.key);if(j._enterCb&&j._enterCb(!0),n.isUnmounting)return ue();ee(w,[j]);let Ye=!1;const H=j._leaveCb=ce=>{Ye||(Ye=!0,ue(),ce?ee(D,[j]):ee(M,[j]),j._leaveCb=void 0,F[se]===e&&delete F[se])};F[se]=e,v?oe(v,[j,H]):H()},clone(j){return Ba(j,t,n,r)}};return le}function Ma(e){if(Ri(e))return e=An(e),e.children=null,e}function uu(e){return Ri(e)?e.children?e.children[0]:void 0:e}function Ga(e,t){e.shapeFlag&6&&e.component?Ga(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Fc(e,t=!1,n){let r=[],i=0;for(let o=0;o1)for(let o=0;o!!e.type.__asyncLoader,Ri=e=>e.type.__isKeepAlive;function A_(e,t){Lc(e,"a",t)}function F_(e,t){Lc(e,"da",t)}function Lc(e,t,n=He){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Ai(t,r,n),n){let i=n.parent;for(;i&&i.parent;)Ri(i.parent.vnode)&&L_(r,t,n,i),i=i.parent}}function L_(e,t,n,r){const i=Ai(t,e,r,!0);jc(()=>{bo(r[t],i)},n)}function Ai(e,t,n=He,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...l)=>{if(n.isUnmounted)return;Pr(),Cr(n);const f=gt(t,n,e,l);return er(),Rr(),f});return r?i.unshift(o):i.push(o),o}}const yn=e=>(t,n=He)=>(!ms||e==="sp")&&Ai(e,(...r)=>t(...r),n),I_=yn("bm"),Ic=yn("m"),W_=yn("bu"),j_=yn("u"),Wc=yn("bum"),jc=yn("um"),U_=yn("sp"),H_=yn("rtg"),V_=yn("rtc");function $_(e,t=He){Ai("ec",e,t)}function Xk(e,t){const n=Ze;if(n===null)return e;const r=Ii(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;ot(l,f,void 0,o&&o[f]));else{const l=Object.keys(e);i=new Array(l.length);for(let f=0,h=l.length;fpi(t)?!(t.type===wt||t.type===yt&&!Vc(t.children)):!0)?e:null}const za=e=>e?sf(e)?Ii(e)||e.proxy:za(e.parent):null,is=Je(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>za(e.parent),$root:e=>za(e.root),$emit:e=>e.emit,$options:e=>Po(e),$forceUpdate:e=>e.f||(e.f=()=>No(e.update)),$nextTick:e=>e.n||(e.n=y_.bind(e.proxy)),$watch:e=>N_.bind(e)}),Da=(e,t)=>e!==Re&&!e.__isScriptSetup&&_e(e,t),z_={get({_:e},t){const{ctx:n,setupState:r,data:i,props:o,accessCache:l,type:f,appContext:h}=e;let m;if(t[0]!=="$"){const M=l[t];if(M!==void 0)switch(M){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(Da(r,t))return l[t]=1,r[t];if(i!==Re&&_e(i,t))return l[t]=2,i[t];if((m=e.propsOptions[0])&&_e(m,t))return l[t]=3,o[t];if(n!==Re&&_e(n,t))return l[t]=4,n[t];qa&&(l[t]=0)}}const p=is[t];let w,v;if(p)return t==="$attrs"&<(e,"get",t),p(e);if((w=f.__cssModules)&&(w=w[t]))return w;if(n!==Re&&_e(n,t))return l[t]=4,n[t];if(v=h.config.globalProperties,_e(v,t))return v[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return Da(i,t)?(i[t]=n,!0):r!==Re&&_e(r,t)?(r[t]=n,!0):_e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},l){let f;return!!n[l]||e!==Re&&_e(e,l)||Da(t,l)||(f=o[0])&&_e(f,l)||_e(r,l)||_e(is,l)||_e(i.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let qa=!0;function q_(e){const t=Po(e),n=e.proxy,r=e.ctx;qa=!1,t.beforeCreate&&fu(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:l,watch:f,provide:h,inject:m,created:p,beforeMount:w,mounted:v,beforeUpdate:M,updated:D,activated:Y,deactivated:A,beforeDestroy:G,beforeUnmount:X,destroyed:S,unmounted:F,render:ee,renderTracked:oe,renderTriggered:le,errorCaptured:j,serverPrefetch:ue,expose:se,inheritAttrs:Ye,components:H,directives:ce,filters:We}=t;if(m&&K_(m,r,null,e.appContext.config.unwrapInjectedRef),l)for(const Me in l){const we=l[Me];ae(we)&&(r[Me]=we.bind(n))}if(i){const Me=i.call(n,n);Ce(Me)&&(e.data=ks(Me))}if(qa=!0,o)for(const Me in o){const we=o[Me],ht=ae(we)?we.bind(n,n):ae(we.get)?we.get.bind(n,n):Nt,qe=!ae(we)&&ae(we.set)?we.set.bind(n):Nt,kt=Fo({get:ht,set:qe});Object.defineProperty(r,Me,{enumerable:!0,configurable:!0,get:()=>kt.value,set:rt=>kt.value=rt})}if(f)for(const Me in f)$c(f[Me],r,n,Me);if(h){const Me=ae(h)?h.call(n):h;Reflect.ownKeys(Me).forEach(we=>{C_(we,Me[we])})}p&&fu(p,e,"c");function Ne(Me,we){Q(we)?we.forEach(ht=>Me(ht.bind(n))):we&&Me(we.bind(n))}if(Ne(I_,w),Ne(Ic,v),Ne(W_,M),Ne(j_,D),Ne(A_,Y),Ne(F_,A),Ne($_,j),Ne(V_,oe),Ne(H_,le),Ne(Wc,X),Ne(jc,F),Ne(U_,ue),Q(se))if(se.length){const Me=e.exposed||(e.exposed={});se.forEach(we=>{Object.defineProperty(Me,we,{get:()=>n[we],set:ht=>n[we]=ht})})}else e.exposed||(e.exposed={});ee&&e.render===Nt&&(e.render=ee),Ye!=null&&(e.inheritAttrs=Ye),H&&(e.components=H),ce&&(e.directives=ce)}function K_(e,t,n=Nt,r=!1){Q(e)&&(e=Ka(e));for(const i in e){const o=e[i];let l;Ce(o)?"default"in o?l=ei(o.from||i,o.default,!0):l=ei(o.from||i):l=ei(o),et(l)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>l.value,set:f=>l.value=f}):t[i]=l}}function fu(e,t,n){gt(Q(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function $c(e,t,n,r){const i=r.includes(".")?Pc(n,r):()=>n[r];if(Ve(e)){const o=t[e];ae(o)&&Or(i,o)}else if(ae(e))Or(i,e.bind(n));else if(Ce(e))if(Q(e))e.forEach(o=>$c(o,t,n,r));else{const o=ae(e.handler)?e.handler.bind(n):t[e.handler];ae(o)&&Or(i,o,e)}}function Po(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,f=o.get(t);let h;return f?h=f:!i.length&&!n&&!r?h=t:(h={},i.length&&i.forEach(m=>mi(h,m,l,!0)),mi(h,t,l)),Ce(t)&&o.set(t,h),h}function mi(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&mi(e,o,n,!0),i&&i.forEach(l=>mi(e,l,n,!0));for(const l in t)if(!(r&&l==="expose")){const f=Z_[l]||n&&n[l];e[l]=f?f(e[l],t[l]):t[l]}return e}const Z_={data:du,props:Gn,emits:Gn,methods:Gn,computed:Gn,beforeCreate:it,created:it,beforeMount:it,mounted:it,beforeUpdate:it,updated:it,beforeDestroy:it,beforeUnmount:it,destroyed:it,unmounted:it,activated:it,deactivated:it,errorCaptured:it,serverPrefetch:it,components:Gn,directives:Gn,watch:Q_,provide:du,inject:J_};function du(e,t){return t?e?function(){return Je(ae(e)?e.call(this,this):e,ae(t)?t.call(this,this):t)}:t:e}function J_(e,t){return Gn(Ka(e),Ka(t))}function Ka(e){if(Q(e)){const t={};for(let n=0;n0)&&!(l&16)){if(l&8){const p=e.vnode.dynamicProps;for(let w=0;w{h=!0;const[v,M]=Gc(w,t,!0);Je(l,v),M&&f.push(...M)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!o&&!h)return Ce(e)&&r.set(e,vr),vr;if(Q(o))for(let p=0;p-1,M[1]=Y<0||D-1||_e(M,"default"))&&f.push(w)}}}const m=[l,f];return Ce(e)&&r.set(e,m),m}function hu(e){return e[0]!=="$"}function mu(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function pu(e,t){return mu(e)===mu(t)}function yu(e,t){return Q(t)?t.findIndex(n=>pu(n,e)):ae(t)&&pu(t,e)?0:-1}const zc=e=>e[0]==="_"||e==="$stable",Ro=e=>Q(e)?e.map(Wt):[Wt(e)],tg=(e,t,n)=>{if(t._n)return t;const r=S_((...i)=>Ro(t(...i)),n);return r._c=!1,r},qc=(e,t,n)=>{const r=e._ctx;for(const i in e){if(zc(i))continue;const o=e[i];if(ae(o))t[i]=tg(i,o,r);else if(o!=null){const l=Ro(o);t[i]=()=>l}}},Kc=(e,t)=>{const n=Ro(t);e.slots.default=()=>n},ng=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Se(t),ci(t,"_",n)):qc(t,e.slots={})}else e.slots={},t&&Kc(e,t);ci(e.slots,Li,1)},rg=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,l=Re;if(r.shapeFlag&32){const f=t._;f?n&&f===1?o=!1:(Je(i,t),!n&&f===1&&delete i._):(o=!t.$stable,qc(t,i)),l=t}else t&&(Kc(e,t),l={default:1});if(o)for(const f in i)!zc(f)&&!(f in l)&&delete i[f]};function Zc(){return{app:null,config:{isNativeTag:Oy,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let sg=0;function ig(e,t){return function(r,i=null){ae(r)||(r=Object.assign({},r)),i!=null&&!Ce(i)&&(i=null);const o=Zc(),l=new Set;let f=!1;const h=o.app={_uid:sg++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:Tg,get config(){return o.config},set config(m){},use(m,...p){return l.has(m)||(m&&ae(m.install)?(l.add(m),m.install(h,...p)):ae(m)&&(l.add(m),m(h,...p))),h},mixin(m){return o.mixins.includes(m)||o.mixins.push(m),h},component(m,p){return p?(o.components[m]=p,h):o.components[m]},directive(m,p){return p?(o.directives[m]=p,h):o.directives[m]},mount(m,p,w){if(!f){const v=tt(r,i);return v.appContext=o,p&&t?t(v,m):e(v,m,w),f=!0,h._container=m,m.__vue_app__=h,Ii(v.component)||v.component.proxy}},unmount(){f&&(e(null,h._container),delete h._container.__vue_app__)},provide(m,p){return o.provides[m]=p,h}};return h}}function Ja(e,t,n,r,i=!1){if(Q(e)){e.forEach((v,M)=>Ja(v,t&&(Q(t)?t[M]:t),n,r,i));return}if(ss(r)&&!i)return;const o=r.shapeFlag&4?Ii(r.component)||r.component.proxy:r.el,l=i?null:o,{i:f,r:h}=e,m=t&&t.r,p=f.refs===Re?f.refs={}:f.refs,w=f.setupState;if(m!=null&&m!==h&&(Ve(m)?(p[m]=null,_e(w,m)&&(w[m]=null)):et(m)&&(m.value=null)),ae(h))En(h,f,12,[l,p]);else{const v=Ve(h),M=et(h);if(v||M){const D=()=>{if(e.f){const Y=v?_e(w,h)?w[h]:p[h]:h.value;i?Q(Y)&&bo(Y,o):Q(Y)?Y.includes(o)||Y.push(o):v?(p[h]=[o],_e(w,h)&&(w[h]=p[h])):(h.value=[o],e.k&&(p[e.k]=h.value))}else v?(p[h]=l,_e(w,h)&&(w[h]=l)):M&&(h.value=l,e.k&&(p[e.k]=l))};l?(D.id=-1,at(D,n)):D()}}}const at=x_;function ag(e){return og(e)}function og(e,t){const n=Ny();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:l,createText:f,createComment:h,setText:m,setElementText:p,parentNode:w,nextSibling:v,setScopeId:M=Nt,insertStaticContent:D}=e,Y=(y,g,k,C=null,x=null,R=null,I=!1,P=null,L=!!g.dynamicChildren)=>{if(y===g)return;y&&!Kn(y,g)&&(C=ar(y),rt(y,x,R,!0),y=null),g.patchFlag===-2&&(L=!1,g.dynamicChildren=null);const{type:T,ref:q,shapeFlag:B}=g;switch(T){case Fi:A(y,g,k,C);break;case wt:G(y,g,k,C);break;case ti:y==null&&X(g,k,C,I);break;case yt:H(y,g,k,C,x,R,I,P,L);break;default:B&1?ee(y,g,k,C,x,R,I,P,L):B&6?ce(y,g,k,C,x,R,I,P,L):(B&64||B&128)&&T.process(y,g,k,C,x,R,I,P,L,qt)}q!=null&&x&&Ja(q,y&&y.ref,R,g||y,!g)},A=(y,g,k,C)=>{if(y==null)r(g.el=f(g.children),k,C);else{const x=g.el=y.el;g.children!==y.children&&m(x,g.children)}},G=(y,g,k,C)=>{y==null?r(g.el=h(g.children||""),k,C):g.el=y.el},X=(y,g,k,C)=>{[y.el,y.anchor]=D(y.children,g,k,C,y.el,y.anchor)},S=({el:y,anchor:g},k,C)=>{let x;for(;y&&y!==g;)x=v(y),r(y,k,C),y=x;r(g,k,C)},F=({el:y,anchor:g})=>{let k;for(;y&&y!==g;)k=v(y),i(y),y=k;i(g)},ee=(y,g,k,C,x,R,I,P,L)=>{I=I||g.type==="svg",y==null?oe(g,k,C,x,R,I,P,L):ue(y,g,x,R,I,P,L)},oe=(y,g,k,C,x,R,I,P)=>{let L,T;const{type:q,props:B,shapeFlag:K,transition:ne,dirs:te}=y;if(L=y.el=l(y.type,R,B&&B.is,B),K&8?p(L,y.children):K&16&&j(y.children,L,null,C,x,R&&q!=="foreignObject",I,P),te&&Un(y,null,C,"created"),le(L,y,y.scopeId,I,C),B){for(const ve in B)ve!=="value"&&!Qs(ve)&&o(L,ve,null,B[ve],R,y.children,C,x,Ot);"value"in B&&o(L,"value",null,B.value),(T=B.onVnodeBeforeMount)&&It(T,C,y)}te&&Un(y,null,C,"beforeMount");const De=(!x||x&&!x.pendingBranch)&&ne&&!ne.persisted;De&&ne.beforeEnter(L),r(L,g,k),((T=B&&B.onVnodeMounted)||De||te)&&at(()=>{T&&It(T,C,y),De&&ne.enter(L),te&&Un(y,null,C,"mounted")},x)},le=(y,g,k,C,x)=>{if(k&&M(y,k),C)for(let R=0;R{for(let T=L;T{const P=g.el=y.el;let{patchFlag:L,dynamicChildren:T,dirs:q}=g;L|=y.patchFlag&16;const B=y.props||Re,K=g.props||Re;let ne;k&&Hn(k,!1),(ne=K.onVnodeBeforeUpdate)&&It(ne,k,g,y),q&&Un(g,y,k,"beforeUpdate"),k&&Hn(k,!0);const te=x&&g.type!=="foreignObject";if(T?se(y.dynamicChildren,T,P,k,C,te,R):I||we(y,g,P,null,k,C,te,R,!1),L>0){if(L&16)Ye(P,g,B,K,k,C,x);else if(L&2&&B.class!==K.class&&o(P,"class",null,K.class,x),L&4&&o(P,"style",B.style,K.style,x),L&8){const De=g.dynamicProps;for(let ve=0;ve{ne&&It(ne,k,g,y),q&&Un(g,y,k,"updated")},C)},se=(y,g,k,C,x,R,I)=>{for(let P=0;P{if(k!==C){if(k!==Re)for(const P in k)!Qs(P)&&!(P in C)&&o(y,P,k[P],null,I,g.children,x,R,Ot);for(const P in C){if(Qs(P))continue;const L=C[P],T=k[P];L!==T&&P!=="value"&&o(y,P,T,L,I,g.children,x,R,Ot)}"value"in C&&o(y,"value",k.value,C.value)}},H=(y,g,k,C,x,R,I,P,L)=>{const T=g.el=y?y.el:f(""),q=g.anchor=y?y.anchor:f("");let{patchFlag:B,dynamicChildren:K,slotScopeIds:ne}=g;ne&&(P=P?P.concat(ne):ne),y==null?(r(T,k,C),r(q,k,C),j(g.children,k,q,x,R,I,P,L)):B>0&&B&64&&K&&y.dynamicChildren?(se(y.dynamicChildren,K,k,x,R,I,P),(g.key!=null||x&&g===x.subTree)&&Jc(y,g,!0)):we(y,g,k,q,x,R,I,P,L)},ce=(y,g,k,C,x,R,I,P,L)=>{g.slotScopeIds=P,y==null?g.shapeFlag&512?x.ctx.activate(g,k,C,I,L):We(g,k,C,x,R,I,L):dt(y,g,L)},We=(y,g,k,C,x,R,I)=>{const P=y.component=yg(y,C,x);if(Ri(y)&&(P.ctx.renderer=qt),gg(P),P.asyncDep){if(x&&x.registerDep(P,Ne),!y.el){const L=P.subTree=tt(wt);G(null,L,g,k)}return}Ne(P,y,g,k,x,R,I)},dt=(y,g,k)=>{const C=g.component=y.component;if(M_(y,g,k))if(C.asyncDep&&!C.asyncResolved){Me(C,g,k);return}else C.next=g,g_(C.update),C.update();else g.el=y.el,C.vnode=g},Ne=(y,g,k,C,x,R,I)=>{const P=()=>{if(y.isMounted){let{next:q,bu:B,u:K,parent:ne,vnode:te}=y,De=q,ve;Hn(y,!1),q?(q.el=te.el,Me(y,q,I)):q=te,B&&Xs(B),(ve=q.props&&q.props.onVnodeBeforeUpdate)&&It(ve,ne,q,te),Hn(y,!0);const Ee=Oa(y),fe=y.subTree;y.subTree=Ee,Y(fe,Ee,w(fe.el),ar(fe),y,x,R),q.el=Ee.el,De===null&&D_(y,Ee.el),K&&at(K,x),(ve=q.props&&q.props.onVnodeUpdated)&&at(()=>It(ve,ne,q,te),x)}else{let q;const{el:B,props:K}=g,{bm:ne,m:te,parent:De}=y,ve=ss(g);if(Hn(y,!1),ne&&Xs(ne),!ve&&(q=K&&K.onVnodeBeforeMount)&&It(q,De,g),Hn(y,!0),B&&Ur){const Ee=()=>{y.subTree=Oa(y),Ur(B,y.subTree,y,x,null)};ve?g.type.__asyncLoader().then(()=>!y.isUnmounted&&Ee()):Ee()}else{const Ee=y.subTree=Oa(y);Y(null,Ee,k,C,y,x,R),g.el=Ee.el}if(te&&at(te,x),!ve&&(q=K&&K.onVnodeMounted)){const Ee=g;at(()=>It(q,De,Ee),x)}(g.shapeFlag&256||De&&ss(De.vnode)&&De.vnode.shapeFlag&256)&&y.a&&at(y.a,x),y.isMounted=!0,g=k=C=null}},L=y.effect=new Oo(P,()=>No(T),y.scope),T=y.update=()=>L.run();T.id=y.uid,Hn(y,!0),T()},Me=(y,g,k)=>{g.component=y;const C=y.vnode.props;y.vnode=g,y.next=null,eg(y,g.props,C,k),rg(y,g.children,k),Pr(),ou(),Rr()},we=(y,g,k,C,x,R,I,P,L=!1)=>{const T=y&&y.children,q=y?y.shapeFlag:0,B=g.children,{patchFlag:K,shapeFlag:ne}=g;if(K>0){if(K&128){qe(T,B,k,C,x,R,I,P,L);return}else if(K&256){ht(T,B,k,C,x,R,I,P,L);return}}ne&8?(q&16&&Ot(T,x,R),B!==T&&p(k,B)):q&16?ne&16?qe(T,B,k,C,x,R,I,P,L):Ot(T,x,R,!0):(q&8&&p(k,""),ne&16&&j(B,k,C,x,R,I,P,L))},ht=(y,g,k,C,x,R,I,P,L)=>{y=y||vr,g=g||vr;const T=y.length,q=g.length,B=Math.min(T,q);let K;for(K=0;Kq?Ot(y,x,R,!0,!1,B):j(g,k,C,x,R,I,P,L,B)},qe=(y,g,k,C,x,R,I,P,L)=>{let T=0;const q=g.length;let B=y.length-1,K=q-1;for(;T<=B&&T<=K;){const ne=y[T],te=g[T]=L?Tn(g[T]):Wt(g[T]);if(Kn(ne,te))Y(ne,te,k,null,x,R,I,P,L);else break;T++}for(;T<=B&&T<=K;){const ne=y[B],te=g[K]=L?Tn(g[K]):Wt(g[K]);if(Kn(ne,te))Y(ne,te,k,null,x,R,I,P,L);else break;B--,K--}if(T>B){if(T<=K){const ne=K+1,te=neK)for(;T<=B;)rt(y[T],x,R,!0),T++;else{const ne=T,te=T,De=new Map;for(T=te;T<=K;T++){const ze=g[T]=L?Tn(g[T]):Wt(g[T]);ze.key!=null&&De.set(ze.key,T)}let ve,Ee=0;const fe=K-te+1;let Kt=!1,Hr=0;const Ft=new Array(fe);for(T=0;T=fe){rt(ze,x,R,!0);continue}let Ke;if(ze.key!=null)Ke=De.get(ze.key);else for(ve=te;ve<=K;ve++)if(Ft[ve-te]===0&&Kn(ze,g[ve])){Ke=ve;break}Ke===void 0?rt(ze,x,R,!0):(Ft[Ke-te]=T+1,Ke>=Hr?Hr=Ke:Kt=!0,Y(ze,g[Ke],k,null,x,R,I,P,L),Ee++)}const or=Kt?lg(Ft):vr;for(ve=or.length-1,T=fe-1;T>=0;T--){const ze=te+T,Ke=g[ze],Ln=ze+1{const{el:R,type:I,transition:P,children:L,shapeFlag:T}=y;if(T&6){kt(y.component.subTree,g,k,C);return}if(T&128){y.suspense.move(g,k,C);return}if(T&64){I.move(y,g,k,qt);return}if(I===yt){r(R,g,k);for(let B=0;BP.enter(R),x);else{const{leave:B,delayLeave:K,afterLeave:ne}=P,te=()=>r(R,g,k),De=()=>{B(R,()=>{te(),ne&&ne()})};K?K(R,te,De):De()}else r(R,g,k)},rt=(y,g,k,C=!1,x=!1)=>{const{type:R,props:I,ref:P,children:L,dynamicChildren:T,shapeFlag:q,patchFlag:B,dirs:K}=y;if(P!=null&&Ja(P,null,k,y,!0),q&256){g.ctx.deactivate(y);return}const ne=q&1&&K,te=!ss(y);let De;if(te&&(De=I&&I.onVnodeBeforeUnmount)&&It(De,g,y),q&6)z(y.component,k,C);else{if(q&128){y.suspense.unmount(k,C);return}ne&&Un(y,null,g,"beforeUnmount"),q&64?y.type.remove(y,g,k,x,qt,C):T&&(R!==yt||B>0&&B&64)?Ot(T,g,k,!1,!0):(R===yt&&B&384||!x&&q&16)&&Ot(L,g,k),C&&ir(y)}(te&&(De=I&&I.onVnodeUnmounted)||ne)&&at(()=>{De&&It(De,g,y),ne&&Un(y,null,g,"unmounted")},k)},ir=y=>{const{type:g,el:k,anchor:C,transition:x}=y;if(g===yt){wn(k,C);return}if(g===ti){F(y);return}const R=()=>{i(k),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(y.shapeFlag&1&&x&&!x.persisted){const{leave:I,delayLeave:P}=x,L=()=>I(k,R);P?P(y.el,R,L):L()}else R()},wn=(y,g)=>{let k;for(;y!==g;)k=v(y),i(y),y=k;i(g)},z=(y,g,k)=>{const{bum:C,scope:x,update:R,subTree:I,um:P}=y;C&&Xs(C),x.stop(),R&&(R.active=!1,rt(I,y,g,k)),P&&at(P,g),at(()=>{y.isUnmounted=!0},g),g&&g.pendingBranch&&!g.isUnmounted&&y.asyncDep&&!y.asyncResolved&&y.suspenseId===g.pendingId&&(g.deps--,g.deps===0&&g.resolve())},Ot=(y,g,k,C=!1,x=!1,R=0)=>{for(let I=R;Iy.shapeFlag&6?ar(y.component.subTree):y.shapeFlag&128?y.suspense.next():v(y.anchor||y.el),Fn=(y,g,k)=>{y==null?g._vnode&&rt(g._vnode,null,null,!0):Y(g._vnode||null,y,g,null,null,null,k),ou(),Yc(),g._vnode=y},qt={p:Y,um:rt,m:kt,r:ir,mt:We,mc:j,pc:we,pbc:se,n:ar,o:e};let jr,Ur;return t&&([jr,Ur]=t(qt)),{render:Fn,hydrate:jr,createApp:ig(Fn,jr)}}function Hn({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Jc(e,t,n=!1){const r=e.children,i=t.children;if(Q(r)&&Q(i))for(let o=0;o>1,e[n[f]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,l=n[o-1];o-- >0;)n[o]=l,l=t[l];return n}const ug=e=>e.__isTeleport,yt=Symbol(void 0),Fi=Symbol(void 0),wt=Symbol(void 0),ti=Symbol(void 0),as=[];let Ct=null;function Qc(e=!1){as.push(Ct=e?null:[])}function cg(){as.pop(),Ct=as[as.length-1]||null}let hs=1;function _u(e){hs+=e}function Xc(e){return e.dynamicChildren=hs>0?Ct||vr:null,cg(),hs>0&&Ct&&Ct.push(e),e}function sO(e,t,n,r,i,o){return Xc(nf(e,t,n,r,i,o,!0))}function ef(e,t,n,r,i){return Xc(tt(e,t,n,r,i,!0))}function pi(e){return e?e.__v_isVNode===!0:!1}function Kn(e,t){return e.type===t.type&&e.key===t.key}const Li="__vInternal",tf=({key:e})=>e??null,ni=({ref:e,ref_key:t,ref_for:n})=>e!=null?Ve(e)||et(e)||ae(e)?{i:Ze,r:e,k:t,f:!!n}:e:null;function nf(e,t=null,n=null,r=0,i=null,o=e===yt?0:1,l=!1,f=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&tf(t),ref:t&&ni(t),scopeId:Pi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ze};return f?(Ao(h,n),o&128&&e.normalize(h)):n&&(h.shapeFlag|=Ve(n)?8:16),hs>0&&!l&&Ct&&(h.patchFlag>0||o&6)&&h.patchFlag!==32&&Ct.push(h),h}const tt=fg;function fg(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===G_)&&(e=wt),pi(e)){const f=An(e,t,!0);return n&&Ao(f,n),hs>0&&!o&&Ct&&(f.shapeFlag&6?Ct[Ct.indexOf(e)]=f:Ct.push(f)),f.patchFlag|=-2,f}if(kg(e)&&(e=e.__vccOpts),t){t=dg(t);let{class:f,style:h}=t;f&&!Ve(f)&&(t.class=go(f)),Ce(h)&&(Sc(h)&&!Q(h)&&(h=Je({},h)),t.style=_o(h))}const l=Ve(e)?1:T_(e)?128:ug(e)?64:Ce(e)?4:ae(e)?2:0;return nf(e,t,n,r,i,l,o,!0)}function dg(e){return e?Sc(e)||Li in e?Je({},e):e:null}function An(e,t,n=!1){const{props:r,ref:i,patchFlag:o,children:l}=e,f=t?hg(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&tf(f),ref:t&&t.ref?n&&i?Q(i)?i.concat(ni(t)):[i,ni(t)]:ni(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==yt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&An(e.ssContent),ssFallback:e.ssFallback&&An(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function rf(e=" ",t=0){return tt(Fi,null,e,t)}function iO(e,t){const n=tt(ti,null,e);return n.staticCount=t,n}function aO(e="",t=!1){return t?(Qc(),ef(wt,null,e)):tt(wt,null,e)}function Wt(e){return e==null||typeof e=="boolean"?tt(wt):Q(e)?tt(yt,null,e.slice()):typeof e=="object"?Tn(e):tt(Fi,null,String(e))}function Tn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:An(e)}function Ao(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Q(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Ao(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(Li in t)?t._ctx=Ze:i===3&&Ze&&(Ze.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ae(t)?(t={default:t,_ctx:Ze},n=32):(t=String(t),r&64?(n=16,t=[rf(t)]):n=8);e.children=t,e.shapeFlag|=n}function hg(...e){const t={};for(let n=0;nHe||Ze,Cr=e=>{He=e,e.scope.on()},er=()=>{He&&He.scope.off(),He=null};function sf(e){return e.vnode.shapeFlag&4}let ms=!1;function gg(e,t=!1){ms=t;const{props:n,children:r}=e.vnode,i=sf(e);X_(e,n,i,t),ng(e,r);const o=i?wg(e,t):void 0;return ms=!1,o}function wg(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=kc(new Proxy(e.ctx,z_));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?bg(e):null;Cr(e),Pr();const o=En(r,e,0,[e.props,i]);if(Rr(),er(),oc(o)){if(o.then(er,er),t)return o.then(l=>{gu(e,l,t)}).catch(l=>{Ni(l,e,0)});e.asyncDep=o}else gu(e,o,t)}else af(e,t)}function gu(e,t,n){ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)&&(e.setupState=Dc(t)),af(e,n)}let wu;function af(e,t,n){const r=e.type;if(!e.render){if(!t&&wu&&!r.render){const i=r.template||Po(e).template;if(i){const{isCustomElement:o,compilerOptions:l}=e.appContext.config,{delimiters:f,compilerOptions:h}=r,m=Je(Je({isCustomElement:o,delimiters:f},l),h);r.render=wu(i,m)}}e.render=r.render||Nt}Cr(e),Pr(),q_(e),Rr(),er()}function vg(e){return new Proxy(e.attrs,{get(t,n){return lt(e,"get","$attrs"),t[n]}})}function bg(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=vg(e))},slots:e.slots,emit:e.emit,expose:t}}function Ii(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Dc(kc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in is)return is[n](e)},has(t,n){return n in t||n in is}}))}function Sg(e,t=!0){return ae(e)?e.displayName||e.name:e.name||t&&e.__name}function kg(e){return ae(e)&&"__vccOpts"in e}const Fo=(e,t)=>m_(e,t,ms);function Og(e,t,n){const r=arguments.length;return r===2?Ce(t)&&!Q(t)?pi(t)?tt(e,null,[t]):tt(e,t):tt(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&pi(n)&&(n=[n]),tt(e,t,n))}const Mg=Symbol(""),Dg=()=>ei(Mg),Tg="3.2.47",xg="http://www.w3.org/2000/svg",Zn=typeof document<"u"?document:null,vu=Zn&&Zn.createElement("template"),Cg={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Zn.createElementNS(xg,e):Zn.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Zn.createTextNode(e),createComment:e=>Zn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Zn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const l=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{vu.innerHTML=r?`${e}`:e;const f=vu.content;if(r){const h=f.firstChild;for(;h.firstChild;)f.appendChild(h.firstChild);f.removeChild(h)}t.insertBefore(f,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Yg(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Ng(e,t,n){const r=e.style,i=Ve(n);if(n&&!i){if(t&&!Ve(t))for(const o in t)n[o]==null&&Qa(r,o,"");for(const o in n)Qa(r,o,n[o])}else{const o=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=o)}}const bu=/\s*!important$/;function Qa(e,t,n){if(Q(n))n.forEach(r=>Qa(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Eg(e,t);bu.test(n)?e.setProperty(nr(r),n.replace(bu,""),"important"):e[r]=n}}const Su=["Webkit","Moz","ms"],Ta={};function Eg(e,t){const n=Ta[t];if(n)return n;let r=Vt(t);if(r!=="filter"&&r in e)return Ta[t]=r;r=Ci(r);for(let i=0;ixa||(Ig.then(()=>xa=0),xa=Date.now());function jg(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gt(Ug(r,n.value),t,5,[r])};return n.value=e,n.attached=Wg(),n}function Ug(e,t){if(Q(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Mu=/^on[a-z]/,Hg=(e,t,n,r,i=!1,o,l,f,h)=>{t==="class"?Yg(e,r,i):t==="style"?Ng(e,n,r):Ti(t)?vo(t)||Fg(e,t,n,r,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Vg(e,t,r,i))?Rg(e,t,r,o,l,f,h):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Pg(e,t,r,i))};function Vg(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Mu.test(t)&&ae(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Mu.test(t)&&Ve(n)?!1:t in e}const On="transition",Qr="animation",of=(e,{slots:t})=>Og(Rc,$g(e),t);of.displayName="Transition";const lf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};of.props=Je({},Rc.props,lf);const Vn=(e,t=[])=>{Q(e)?e.forEach(n=>n(...t)):e&&e(...t)},Du=e=>e?Q(e)?e.some(t=>t.length>1):e.length>1:!1;function $g(e){const t={};for(const H in e)H in lf||(t[H]=e[H]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:h=o,appearActiveClass:m=l,appearToClass:p=f,leaveFromClass:w=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:M=`${n}-leave-to`}=e,D=Bg(i),Y=D&&D[0],A=D&&D[1],{onBeforeEnter:G,onEnter:X,onEnterCancelled:S,onLeave:F,onLeaveCancelled:ee,onBeforeAppear:oe=G,onAppear:le=X,onAppearCancelled:j=S}=t,ue=(H,ce,We)=>{$n(H,ce?p:f),$n(H,ce?m:l),We&&We()},se=(H,ce)=>{H._isLeaving=!1,$n(H,w),$n(H,M),$n(H,v),ce&&ce()},Ye=H=>(ce,We)=>{const dt=H?le:X,Ne=()=>ue(ce,H,We);Vn(dt,[ce,Ne]),Tu(()=>{$n(ce,H?h:o),Mn(ce,H?p:f),Du(dt)||xu(ce,r,Y,Ne)})};return Je(t,{onBeforeEnter(H){Vn(G,[H]),Mn(H,o),Mn(H,l)},onBeforeAppear(H){Vn(oe,[H]),Mn(H,h),Mn(H,m)},onEnter:Ye(!1),onAppear:Ye(!0),onLeave(H,ce){H._isLeaving=!0;const We=()=>se(H,ce);Mn(H,w),qg(),Mn(H,v),Tu(()=>{H._isLeaving&&($n(H,w),Mn(H,M),Du(F)||xu(H,r,A,We))}),Vn(F,[H,We])},onEnterCancelled(H){ue(H,!1),Vn(S,[H])},onAppearCancelled(H){ue(H,!0),Vn(j,[H])},onLeaveCancelled(H){se(H),Vn(ee,[H])}})}function Bg(e){if(e==null)return null;if(Ce(e))return[Ca(e.enter),Ca(e.leave)];{const t=Ca(e);return[t,t]}}function Ca(e){return Yy(e)}function Mn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function $n(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Tu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Gg=0;function xu(e,t,n,r){const i=e._endId=++Gg,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:l,timeout:f,propCount:h}=zg(e,t);if(!l)return r();const m=l+"end";let p=0;const w=()=>{e.removeEventListener(m,v),o()},v=M=>{M.target===e&&++p>=h&&w()};setTimeout(()=>{p(n[D]||"").split(", "),i=r(`${On}Delay`),o=r(`${On}Duration`),l=Cu(i,o),f=r(`${Qr}Delay`),h=r(`${Qr}Duration`),m=Cu(f,h);let p=null,w=0,v=0;t===On?l>0&&(p=On,w=l,v=o.length):t===Qr?m>0&&(p=Qr,w=m,v=h.length):(w=Math.max(l,m),p=w>0?l>m?On:Qr:null,v=p?p===On?o.length:h.length:0);const M=p===On&&/\b(transform|all)(,|$)/.test(r(`${On}Property`).toString());return{type:p,timeout:w,propCount:v,hasTransform:M}}function Cu(e,t){for(;e.lengthYu(n)+Yu(e[r])))}function Yu(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function qg(){return document.body.offsetHeight}const Yr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?n=>Xs(t,n):t};function Kg(e){e.target.composing=!0}function Nu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const oO={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=Yr(i);const o=r||i.props&&i.props.type==="number";xn(e,t?"change":"input",l=>{if(l.target.composing)return;let f=e.value;n&&(f=f.trim()),o&&(f=fi(f)),e._assign(f)}),n&&xn(e,"change",()=>{e.value=e.value.trim()}),t||(xn(e,"compositionstart",Kg),xn(e,"compositionend",Nu),xn(e,"change",Nu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},o){if(e._assign=Yr(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&fi(e.value)===t))return;const l=t??"";e.value!==l&&(e.value=l)}},lO={deep:!0,created(e,t,n){e._assign=Yr(n),xn(e,"change",()=>{const r=e._modelValue,i=ps(e),o=e.checked,l=e._assign;if(Q(r)){const f=wo(r,i),h=f!==-1;if(o&&!h)l(r.concat(i));else if(!o&&h){const m=[...r];m.splice(f,1),l(m)}}else if(Er(r)){const f=new Set(r);o?f.add(i):f.delete(i),l(f)}else l(uf(e,o))})},mounted:Eu,beforeUpdate(e,t,n){e._assign=Yr(n),Eu(e,t,n)}};function Eu(e,{value:t,oldValue:n},r){e._modelValue=t,Q(t)?e.checked=wo(t,r.props.value)>-1:Er(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=bs(t,uf(e,!0)))}const uO={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=Er(t);xn(e,"change",()=>{const o=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?fi(ps(l)):ps(l));e._assign(e.multiple?i?new Set(o):o:o[0])}),e._assign=Yr(r)},mounted(e,{value:t}){Pu(e,t)},beforeUpdate(e,t,n){e._assign=Yr(n)},updated(e,{value:t}){Pu(e,t)}};function Pu(e,t){const n=e.multiple;if(!(n&&!Q(t)&&!Er(t))){for(let r=0,i=e.options.length;r-1:o.selected=t.has(l);else if(bs(ps(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ps(e){return"_value"in e?e._value:e.value}function uf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Zg=["ctrl","shift","alt","meta"],Jg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Zg.some(n=>e[`${n}Key`]&&!t.includes(n))},cO=(e,t)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=nr(n.key);if(t.some(i=>i===r||Qg[i]===r))return e(n)},dO={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Xr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Xr(e,!0),r.enter(e)):r.leave(e,()=>{Xr(e,!1)}):Xr(e,t))},beforeUnmount(e,{value:t}){Xr(e,t)}};function Xr(e,t){e.style.display=t?e._vod:"none"}const Xg=Je({patchProp:Hg},Cg);let Ru;function e0(){return Ru||(Ru=ag(Xg))}const hO=(...e)=>{const t=e0().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=t0(r);if(!i)return;const o=t._component;!ae(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const l=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),l},t};function t0(e){return Ve(e)?document.querySelector(e):e}//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var Zf;function $(){return Zf.apply(null,arguments)}function H0(e){Zf=e}function jt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function lr(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function be(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function il(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(be(e,t))return!1;return!0}function mt(e){return e===void 0}function On(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ls(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Jf(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ul=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ai=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Jo={},Fr={};function X(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Fr[e]=i),t&&(Fr[t[0]]=function(){return Jt(i.apply(this,arguments),t[1],t[2])}),n&&(Fr[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function q0(e){var t=e.match(ul),n,r;for(n=0,r=t.length;n=0&&ai.test(e);)e=e.replace(ai,r),ai.lastIndex=0,n-=1;return e}var K0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Z0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ul).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var J0="Invalid date";function Q0(){return this._invalidDate}var X0="%d",ew=/\d{1,2}/;function tw(e){return this._ordinal.replace("%d",e)}var nw={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function rw(e,t,n,r){var i=this._relativeTime[n];return Xt(i)?i(e,t,n,r):i.replace(/%d/i,e)}function sw(e,t){var n=this._relativeTime[e>0?"future":"past"];return Xt(n)?n(t):n.replace(/%s/i,t)}var ac={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Yt(e){return typeof e=="string"?ac[e]||ac[e.toLowerCase()]:void 0}function cl(e){var t={},n,r;for(r in e)be(e,r)&&(n=Yt(r),n&&(t[n]=e[r]));return t}var iw={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ow(e){var t=[],n;for(n in e)be(e,n)&&t.push({unit:n,priority:iw[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var td=/\d/,bt=/\d\d/,nd=/\d{3}/,fl=/\d{4}/,Xi=/[+-]?\d{6}/,Le=/\d\d?/,rd=/\d\d\d\d?/,sd=/\d\d\d\d\d\d?/,eo=/\d{1,3}/,dl=/\d{1,4}/,to=/[+-]?\d{1,6}/,Ur=/\d+/,no=/[+-]?\d+/,aw=/Z|[+-]\d\d:?\d\d/gi,ro=/Z|[+-]\d\d(?::?\d\d)?/gi,lw=/[+-]?\d+(\.\d{1,3})?/,Ws=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Hr=/^[1-9]\d?/,hl=/^([1-9]\d|\d)/,Ci;Ci={};function z(e,t,n){Ci[e]=Xt(t)?t:function(r,i){return r&&n?n:t}}function uw(e,t){return be(Ci,e)?Ci[e](t._strict,t._locale):new RegExp(cw(e))}function cw(e){return Sn(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,o){return n||r||i||o}))}function Sn(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Dt(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function me(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Dt(t)),n}var ka={};function Ce(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),On(t)&&(r=function(o,l){l[t]=me(o)}),i=e.length,n=0;n68?1900:2e3)};var id=Vr("FullYear",!0);function mw(){return so(this.year())}function Vr(e,t){return function(n){return n!=null?(od(this,e,n),$.updateOffset(this,t),this):Ts(this,e)}}function Ts(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function od(e,t,n){var r,i,o,l,c;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,l=e.month(),c=e.date(),c=c===29&&l===1&&!so(o)?28:c,i?r.setUTCFullYear(o,l,c):r.setFullYear(o,l,c)}}function pw(e){return e=Yt(e),Xt(this[e])?this[e]():this}function yw(e,t){if(typeof e=="object"){e=cl(e);var n=ow(e),r,i=n.length;for(r=0;r=0?(c=new Date(e+400,t,n,r,i,o,l),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,r,i,o,l),c}function xs(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Yi(e,t,n){var r=7+t-n,i=(7+xs(e,0,r).getUTCDay()-t)%7;return-i+r-1}function dd(e,t,n,r,i){var o=(7+n-r)%7,l=Yi(e,r,i),c=1+7*(t-1)+o+l,d,p;return c<=0?(d=e-1,p=_s(d)+c):c>_s(e)?(d=e+1,p=c-_s(e)):(d=e,p=c),{year:d,dayOfYear:p}}function Cs(e,t,n){var r=Yi(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,o,l;return i<1?(l=e.year()-1,o=i+bn(l,t,n)):i>bn(e.year(),t,n)?(o=i-bn(e.year(),t,n),l=e.year()+1):(l=e.year(),o=i),{week:o,year:l}}function bn(e,t,n){var r=Yi(e,t,n),i=Yi(e+1,t,n);return(_s(e)-r+i)/7}X("w",["ww",2],"wo","week");X("W",["WW",2],"Wo","isoWeek");z("w",Le,Hr);z("ww",Le,bt);z("W",Le,Hr);z("WW",Le,bt);js(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=me(e)});function Cw(e){return Cs(e,this._week.dow,this._week.doy).week}var Yw={dow:0,doy:6};function Nw(){return this._week.dow}function Ew(){return this._week.doy}function Rw(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Pw(e){var t=Cs(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}X("d",0,"do","day");X("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});X("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});X("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});X("e",0,0,"weekday");X("E",0,0,"isoWeekday");z("d",Le);z("e",Le);z("E",Le);z("dd",function(e,t){return t.weekdaysMinRegex(e)});z("ddd",function(e,t){return t.weekdaysShortRegex(e)});z("dddd",function(e,t){return t.weekdaysRegex(e)});js(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ue(n).invalidWeekday=e});js(["d","e","E"],function(e,t,n,r){t[r]=me(e)});function Aw(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Fw(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function pl(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Lw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),hd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Iw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ww=Ws,jw=Ws,Uw=Ws;function Hw(e,t){var n=jt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?pl(n,this._week.dow):e?n[e.day()]:n}function Vw(e){return e===!0?pl(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function $w(e){return e===!0?pl(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Bw(e,t,n){var r,i,o,l=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Qt([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(i=Ue.call(this._weekdaysParse,l),i!==-1?i:null):t==="ddd"?(i=Ue.call(this._shortWeekdaysParse,l),i!==-1?i:null):(i=Ue.call(this._minWeekdaysParse,l),i!==-1?i:null):t==="dddd"?(i=Ue.call(this._weekdaysParse,l),i!==-1||(i=Ue.call(this._shortWeekdaysParse,l),i!==-1)?i:(i=Ue.call(this._minWeekdaysParse,l),i!==-1?i:null)):t==="ddd"?(i=Ue.call(this._shortWeekdaysParse,l),i!==-1||(i=Ue.call(this._weekdaysParse,l),i!==-1)?i:(i=Ue.call(this._minWeekdaysParse,l),i!==-1?i:null)):(i=Ue.call(this._minWeekdaysParse,l),i!==-1||(i=Ue.call(this._weekdaysParse,l),i!==-1)?i:(i=Ue.call(this._shortWeekdaysParse,l),i!==-1?i:null))}function Gw(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Bw.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Qt([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function zw(e){if(!this.isValid())return e!=null?this:NaN;var t=Ts(this,"Day");return e!=null?(e=Aw(e,this.localeData()),this.add(e-t,"d")):t}function qw(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Kw(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Fw(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Zw(e){return this._weekdaysParseExact?(be(this,"_weekdaysRegex")||yl.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(be(this,"_weekdaysRegex")||(this._weekdaysRegex=Ww),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Jw(e){return this._weekdaysParseExact?(be(this,"_weekdaysRegex")||yl.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(be(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jw),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qw(e){return this._weekdaysParseExact?(be(this,"_weekdaysRegex")||yl.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(be(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Uw),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function yl(){function e(m,y){return y.length-m.length}var t=[],n=[],r=[],i=[],o,l,c,d,p;for(o=0;o<7;o++)l=Qt([2e3,1]).day(o),c=Sn(this.weekdaysMin(l,"")),d=Sn(this.weekdaysShort(l,"")),p=Sn(this.weekdays(l,"")),t.push(c),n.push(d),r.push(p),i.push(c),i.push(d),i.push(p);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function _l(){return this.hours()%12||12}function Xw(){return this.hours()||24}X("H",["HH",2],0,"hour");X("h",["hh",2],0,_l);X("k",["kk",2],0,Xw);X("hmm",0,0,function(){return""+_l.apply(this)+Jt(this.minutes(),2)});X("hmmss",0,0,function(){return""+_l.apply(this)+Jt(this.minutes(),2)+Jt(this.seconds(),2)});X("Hmm",0,0,function(){return""+this.hours()+Jt(this.minutes(),2)});X("Hmmss",0,0,function(){return""+this.hours()+Jt(this.minutes(),2)+Jt(this.seconds(),2)});function md(e,t){X(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}md("a",!0);md("A",!1);function pd(e,t){return t._meridiemParse}z("a",pd);z("A",pd);z("H",Le,hl);z("h",Le,Hr);z("k",Le,Hr);z("HH",Le,bt);z("hh",Le,bt);z("kk",Le,bt);z("hmm",rd);z("hmmss",sd);z("Hmm",rd);z("Hmmss",sd);Ce(["H","HH"],qe);Ce(["k","kk"],function(e,t,n){var r=me(e);t[qe]=r===24?0:r});Ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Ce(["h","hh"],function(e,t,n){t[qe]=me(e),ue(n).bigHour=!0});Ce("hmm",function(e,t,n){var r=e.length-2;t[qe]=me(e.substr(0,r)),t[Pt]=me(e.substr(r)),ue(n).bigHour=!0});Ce("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[qe]=me(e.substr(0,r)),t[Pt]=me(e.substr(r,2)),t[wn]=me(e.substr(i)),ue(n).bigHour=!0});Ce("Hmm",function(e,t,n){var r=e.length-2;t[qe]=me(e.substr(0,r)),t[Pt]=me(e.substr(r))});Ce("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[qe]=me(e.substr(0,r)),t[Pt]=me(e.substr(r,2)),t[wn]=me(e.substr(i))});function ev(e){return(e+"").toLowerCase().charAt(0)==="p"}var tv=/[ap]\.?m?\.?/i,nv=Vr("Hours",!0);function rv(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var yd={calendar:B0,longDateFormat:K0,invalidDate:J0,ordinal:X0,dayOfMonthOrdinalParse:ew,relativeTime:nw,months:gw,monthsShort:ad,week:Yw,weekdays:Lw,weekdaysMin:Iw,weekdaysShort:hd,meridiemParse:tv},We={},ls={},Ys;function sv(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=io(o.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&sv(o,r)>=n-1)break;n--}t++}return Ys}function ov(e){return!!(e&&e.match("^[^/\\\\]*$"))}function io(e){var t=null,n;if(We[e]===void 0&&typeof module<"u"&&module&&module.exports&&ov(e))try{t=Ys._abbr,n=require,n("./locale/"+e),Un(t)}catch{We[e]=null}return We[e]}function Un(e,t){var n;return e&&(mt(t)?n=Mn(e):n=gl(e,t),n?Ys=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ys._abbr}function gl(e,t){if(t!==null){var n,r=yd;if(t.abbr=e,We[e]!=null)Xf("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=We[e]._config;else if(t.parentLocale!=null)if(We[t.parentLocale]!=null)r=We[t.parentLocale]._config;else if(n=io(t.parentLocale),n!=null)r=n._config;else return ls[t.parentLocale]||(ls[t.parentLocale]=[]),ls[t.parentLocale].push({name:e,config:t}),null;return We[e]=new ll(ba(r,t)),ls[e]&&ls[e].forEach(function(i){gl(i.name,i.config)}),Un(e),We[e]}else return delete We[e],null}function av(e,t){if(t!=null){var n,r,i=yd;We[e]!=null&&We[e].parentLocale!=null?We[e].set(ba(We[e]._config,t)):(r=io(e),r!=null&&(i=r._config),t=ba(i,t),r==null&&(t.abbr=e),n=new ll(t),n.parentLocale=We[e],We[e]=n),Un(e)}else We[e]!=null&&(We[e].parentLocale!=null?(We[e]=We[e].parentLocale,e===Un()&&Un(e)):We[e]!=null&&delete We[e]);return We[e]}function Mn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ys;if(!jt(e)){if(t=io(e),t)return t;e=[e]}return iv(e)}function lv(){return Oa(We)}function wl(e){var t,n=e._a;return n&&ue(e).overflow===-2&&(t=n[gn]<0||n[gn]>11?gn:n[Zt]<1||n[Zt]>ml(n[ot],n[gn])?Zt:n[qe]<0||n[qe]>24||n[qe]===24&&(n[Pt]!==0||n[wn]!==0||n[ir]!==0)?qe:n[Pt]<0||n[Pt]>59?Pt:n[wn]<0||n[wn]>59?wn:n[ir]<0||n[ir]>999?ir:-1,ue(e)._overflowDayOfYear&&(tZt)&&(t=Zt),ue(e)._overflowWeeks&&t===-1&&(t=dw),ue(e)._overflowWeekday&&t===-1&&(t=hw),ue(e).overflow=t),e}var uv=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,cv=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fv=/Z|[+-]\d\d(?::?\d\d)?/,li=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Qo=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],dv=/^\/?Date\((-?\d+)/i,hv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,mv={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function _d(e){var t,n,r=e._i,i=uv.exec(r)||cv.exec(r),o,l,c,d,p=li.length,m=Qo.length;if(i){for(ue(e).iso=!0,t=0,n=p;t_s(l)||e._dayOfYear===0)&&(ue(e)._overflowDayOfYear=!0),n=xs(l,0,e._dayOfYear),e._a[gn]=n.getUTCMonth(),e._a[Zt]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[qe]===24&&e._a[Pt]===0&&e._a[wn]===0&&e._a[ir]===0&&(e._nextDay=!0,e._a[qe]=0),e._d=(e._useUTC?xs:xw).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qe]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(ue(e).weekdayMismatch=!0)}}function bv(e){var t,n,r,i,o,l,c,d,p;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,l=4,n=Tr(t.GG,e._a[ot],Cs(Fe(),1,4).year),r=Tr(t.W,1),i=Tr(t.E,1),(i<1||i>7)&&(d=!0)):(o=e._locale._week.dow,l=e._locale._week.doy,p=Cs(Fe(),o,l),n=Tr(t.gg,e._a[ot],p.year),r=Tr(t.w,p.week),t.d!=null?(i=t.d,(i<0||i>6)&&(d=!0)):t.e!=null?(i=t.e+o,(t.e<0||t.e>6)&&(d=!0)):i=o),r<1||r>bn(n,o,l)?ue(e)._overflowWeeks=!0:d!=null?ue(e)._overflowWeekday=!0:(c=dd(n,r,i,o,l),e._a[ot]=c.year,e._dayOfYear=c.dayOfYear)}$.ISO_8601=function(){};$.RFC_2822=function(){};function Sl(e){if(e._f===$.ISO_8601){_d(e);return}if(e._f===$.RFC_2822){gd(e);return}e._a=[],ue(e).empty=!0;var t=""+e._i,n,r,i,o,l,c=t.length,d=0,p,m;for(i=ed(e._f,e._locale).match(ul)||[],m=i.length,n=0;n0&&ue(e).unusedInput.push(l),t=t.slice(t.indexOf(r)+r.length),d+=r.length),Fr[o]?(r?ue(e).empty=!1:ue(e).unusedTokens.push(o),fw(o,r,e)):e._strict&&!r&&ue(e).unusedTokens.push(o);ue(e).charsLeftOver=c-d,t.length>0&&ue(e).unusedInput.push(t),e._a[qe]<=12&&ue(e).bigHour===!0&&e._a[qe]>0&&(ue(e).bigHour=void 0),ue(e).parsedDateParts=e._a.slice(0),ue(e).meridiem=e._meridiem,e._a[qe]=Ov(e._locale,e._a[qe],e._meridiem),p=ue(e).era,p!==null&&(e._a[ot]=e._locale.erasConvertYear(p,e._a[ot])),vl(e),wl(e)}function Ov(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function kv(e){var t,n,r,i,o,l,c=!1,d=e._f.length;if(d===0){ue(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Qi()});function Sd(e,t){var n,r;if(t.length===1&&jt(t[0])&&(t=t[0]),!t.length)return Fe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Bv(){if(!mt(this._isDSTShifted))return this._isDSTShifted;var e={},t;return al(e,this),e=wd(e),e._a?(t=e._isUTC?Qt(e._a):Fe(e._a),this._isDSTShifted=this.isValid()&&Fv(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Gv(){return this.isValid()?!this._isUTC:!1}function zv(){return this.isValid()?this._isUTC:!1}function Od(){return this.isValid()?this._isUTC&&this._offset===0:!1}var qv=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Kv=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ht(e,t){var n=e,r=null,i,o,l;return pi(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:On(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=qv.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:me(r[Zt])*i,h:me(r[qe])*i,m:me(r[Pt])*i,s:me(r[wn])*i,ms:me(Ma(r[ir]*1e3))*i}):(r=Kv.exec(e))?(i=r[1]==="-"?-1:1,n={y:tr(r[2],i),M:tr(r[3],i),w:tr(r[4],i),d:tr(r[5],i),h:tr(r[6],i),m:tr(r[7],i),s:tr(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(l=Zv(Fe(n.from),Fe(n.to)),n={},n.ms=l.milliseconds,n.M=l.months),o=new oo(n),pi(e)&&be(e,"_locale")&&(o._locale=e._locale),pi(e)&&be(e,"_isValid")&&(o._isValid=e._isValid),o}Ht.fn=oo.prototype;Ht.invalid=Av;function tr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function uc(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Zv(e,t){var n;return e.isValid()&&t.isValid()?(t=Ol(t,e),e.isBefore(t)?n=uc(e,t):(n=uc(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function kd(e,t){return function(n,r){var i,o;return r!==null&&!isNaN(+r)&&(Xf(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),i=Ht(n,r),Md(this,i,e),this}}function Md(e,t,n,r){var i=t._milliseconds,o=Ma(t._days),l=Ma(t._months);e.isValid()&&(r=r??!0,l&&ud(e,Ts(e,"Month")+l*n),o&&od(e,"Date",Ts(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&$.updateOffset(e,o||l))}var Jv=kd(1,"add"),Qv=kd(-1,"subtract");function Dd(e){return typeof e=="string"||e instanceof String}function Xv(e){return Ut(e)||Ls(e)||Dd(e)||On(e)||tS(e)||eS(e)||e===null||e===void 0}function eS(e){var t=lr(e)&&!il(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,l=r.length;for(i=0;in.valueOf():n.valueOf()9999?mi(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Xt(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",mi(n,"Z")):mi(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function pS(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+i+o)}function yS(e){e||(e=this.isUtc()?$.defaultFormatUtc:$.defaultFormat);var t=mi(this,e);return this.localeData().postformat(t)}function _S(e,t){return this.isValid()&&(Ut(e)&&e.isValid()||Fe(e).isValid())?Ht({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function gS(e){return this.from(Fe(),e)}function wS(e,t){return this.isValid()&&(Ut(e)&&e.isValid()||Fe(e).isValid())?Ht({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function vS(e){return this.to(Fe(),e)}function Td(e){var t;return e===void 0?this._locale._abbr:(t=Mn(e),t!=null&&(this._locale=t),this)}var xd=Ct("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Cd(){return this._locale}var Ni=1e3,Lr=60*Ni,Ei=60*Lr,Yd=(365*400+97)*24*Ei;function Ir(e,t){return(e%t+t)%t}function Nd(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Yd:new Date(e,t,n).valueOf()}function Ed(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Yd:Date.UTC(e,t,n)}function SS(e){var t,n;if(e=Yt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Ed:Nd,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ir(t+(this._isUTC?0:this.utcOffset()*Lr),Ei);break;case"minute":t=this._d.valueOf(),t-=Ir(t,Lr);break;case"second":t=this._d.valueOf(),t-=Ir(t,Ni);break}return this._d.setTime(t),$.updateOffset(this,!0),this}function bS(e){var t,n;if(e=Yt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Ed:Nd,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ei-Ir(t+(this._isUTC?0:this.utcOffset()*Lr),Ei)-1;break;case"minute":t=this._d.valueOf(),t+=Lr-Ir(t,Lr)-1;break;case"second":t=this._d.valueOf(),t+=Ni-Ir(t,Ni)-1;break}return this._d.setTime(t),$.updateOffset(this,!0),this}function OS(){return this._d.valueOf()-(this._offset||0)*6e4}function kS(){return Math.floor(this.valueOf()/1e3)}function MS(){return new Date(this.valueOf())}function DS(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function TS(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function xS(){return this.isValid()?this.toISOString():null}function CS(){return ol(this)}function YS(){return In({},ue(this))}function NS(){return ue(this).overflow}function ES(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}X("N",0,0,"eraAbbr");X("NN",0,0,"eraAbbr");X("NNN",0,0,"eraAbbr");X("NNNN",0,0,"eraName");X("NNNNN",0,0,"eraNarrow");X("y",["y",1],"yo","eraYear");X("y",["yy",2],0,"eraYear");X("y",["yyy",3],0,"eraYear");X("y",["yyyy",4],0,"eraYear");z("N",kl);z("NN",kl);z("NNN",kl);z("NNNN",VS);z("NNNNN",$S);Ce(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ue(n).era=i:ue(n).invalidEra=e});z("y",Ur);z("yy",Ur);z("yyy",Ur);z("yyyy",Ur);z("yo",BS);Ce(["y","yy","yyy","yyyy"],ot);Ce(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ot]=n._locale.eraYearOrdinalParse(e,i):t[ot]=parseInt(e,10)});function RS(e,t){var n,r,i,o=this._eras||Mn("en")._eras;for(n=0,r=o.length;n=0)return o[r]}function AS(e,t){var n=e.since<=e.until?1:-1;return t===void 0?$(e.since).year():$(e.since).year()+(t-e.offset)*n}function FS(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eo&&(t=o),QS.call(this,e,t,n,r,i))}function QS(e,t,n,r,i){var o=dd(e,t,n,r,i),l=xs(o.year,0,o.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}X("Q",0,"Qo","quarter");z("Q",td);Ce("Q",function(e,t){t[gn]=(me(e)-1)*3});function XS(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}X("D",["DD",2],"Do","date");z("D",Le,Hr);z("DD",Le,bt);z("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Ce(["D","DD"],Zt);Ce("Do",function(e,t){t[Zt]=me(e.match(Le)[0])});var Pd=Vr("Date",!0);X("DDD",["DDDD",3],"DDDo","dayOfYear");z("DDD",eo);z("DDDD",nd);Ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=me(e)});function eb(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}X("m",["mm",2],0,"minute");z("m",Le,hl);z("mm",Le,bt);Ce(["m","mm"],Pt);var tb=Vr("Minutes",!1);X("s",["ss",2],0,"second");z("s",Le,hl);z("ss",Le,bt);Ce(["s","ss"],wn);var nb=Vr("Seconds",!1);X("S",0,0,function(){return~~(this.millisecond()/100)});X(0,["SS",2],0,function(){return~~(this.millisecond()/10)});X(0,["SSS",3],0,"millisecond");X(0,["SSSS",4],0,function(){return this.millisecond()*10});X(0,["SSSSS",5],0,function(){return this.millisecond()*100});X(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});X(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});X(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});X(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});z("S",eo,td);z("SS",eo,bt);z("SSS",eo,nd);var Wn,Ad;for(Wn="SSSS";Wn.length<=9;Wn+="S")z(Wn,Ur);function rb(e,t){t[ir]=me(("0."+e)*1e3)}for(Wn="S";Wn.length<=9;Wn+="S")Ce(Wn,rb);Ad=Vr("Milliseconds",!1);X("z",0,0,"zoneAbbr");X("zz",0,0,"zoneName");function sb(){return this._isUTC?"UTC":""}function ib(){return this._isUTC?"Coordinated Universal Time":""}var A=Is.prototype;A.add=Jv;A.calendar=sS;A.clone=iS;A.diff=dS;A.endOf=bS;A.format=yS;A.from=_S;A.fromNow=gS;A.to=wS;A.toNow=vS;A.get=pw;A.invalidAt=NS;A.isAfter=oS;A.isBefore=aS;A.isBetween=lS;A.isSame=uS;A.isSameOrAfter=cS;A.isSameOrBefore=fS;A.isValid=CS;A.lang=xd;A.locale=Td;A.localeData=Cd;A.max=Cv;A.min=xv;A.parsingFlags=YS;A.set=yw;A.startOf=SS;A.subtract=Qv;A.toArray=DS;A.toObject=TS;A.toDate=MS;A.toISOString=mS;A.inspect=pS;typeof Symbol<"u"&&Symbol.for!=null&&(A[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});A.toJSON=xS;A.toString=hS;A.unix=kS;A.valueOf=OS;A.creationData=ES;A.eraName=FS;A.eraNarrow=LS;A.eraAbbr=IS;A.eraYear=WS;A.year=id;A.isLeapYear=mw;A.weekYear=GS;A.isoWeekYear=zS;A.quarter=A.quarters=XS;A.month=cd;A.daysInMonth=Mw;A.week=A.weeks=Rw;A.isoWeek=A.isoWeeks=Pw;A.weeksInYear=ZS;A.weeksInWeekYear=JS;A.isoWeeksInYear=qS;A.isoWeeksInISOWeekYear=KS;A.date=Pd;A.day=A.days=zw;A.weekday=qw;A.isoWeekday=Kw;A.dayOfYear=eb;A.hour=A.hours=nv;A.minute=A.minutes=tb;A.second=A.seconds=nb;A.millisecond=A.milliseconds=Ad;A.utcOffset=Iv;A.utc=jv;A.local=Uv;A.parseZone=Hv;A.hasAlignedHourOffset=Vv;A.isDST=$v;A.isLocal=Gv;A.isUtcOffset=zv;A.isUtc=Od;A.isUTC=Od;A.zoneAbbr=sb;A.zoneName=ib;A.dates=Ct("dates accessor is deprecated. Use date instead.",Pd);A.months=Ct("months accessor is deprecated. Use month instead",cd);A.years=Ct("years accessor is deprecated. Use year instead",id);A.zone=Ct("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Wv);A.isDSTShifted=Ct("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Bv);function ob(e){return Fe(e*1e3)}function ab(){return Fe.apply(null,arguments).parseZone()}function Fd(e){return e}var Oe=ll.prototype;Oe.calendar=G0;Oe.longDateFormat=Z0;Oe.invalidDate=Q0;Oe.ordinal=tw;Oe.preparse=Fd;Oe.postformat=Fd;Oe.relativeTime=rw;Oe.pastFuture=sw;Oe.set=$0;Oe.eras=RS;Oe.erasParse=PS;Oe.erasConvertYear=AS;Oe.erasAbbrRegex=US;Oe.erasNameRegex=jS;Oe.erasNarrowRegex=HS;Oe.months=Sw;Oe.monthsShort=bw;Oe.monthsParse=kw;Oe.monthsRegex=Tw;Oe.monthsShortRegex=Dw;Oe.week=Cw;Oe.firstDayOfYear=Ew;Oe.firstDayOfWeek=Nw;Oe.weekdays=Hw;Oe.weekdaysMin=$w;Oe.weekdaysShort=Vw;Oe.weekdaysParse=Gw;Oe.weekdaysRegex=Zw;Oe.weekdaysShortRegex=Jw;Oe.weekdaysMinRegex=Qw;Oe.isPM=ev;Oe.meridiem=rv;function Ri(e,t,n,r){var i=Mn(),o=Qt().set(r,t);return i[n](o,e)}function Ld(e,t,n){if(On(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ri(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Ri(e,r,n,"month");return i}function Dl(e,t,n,r){typeof e=="boolean"?(On(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,On(t)&&(n=t,t=void 0),t=t||"");var i=Mn(),o=e?i._week.dow:0,l,c=[];if(n!=null)return Ri(t,(n+o)%7,r,"day");for(l=0;l<7;l++)c[l]=Ri(t,(l+o)%7,r,"day");return c}function lb(e,t){return Ld(e,t,"months")}function ub(e,t){return Ld(e,t,"monthsShort")}function cb(e,t,n){return Dl(e,t,n,"weekdays")}function fb(e,t,n){return Dl(e,t,n,"weekdaysShort")}function db(e,t,n){return Dl(e,t,n,"weekdaysMin")}Un("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=me(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});$.lang=Ct("moment.lang is deprecated. Use moment.locale instead.",Un);$.langData=Ct("moment.langData is deprecated. Use moment.localeData instead.",Mn);var hn=Math.abs;function hb(){var e=this._data;return this._milliseconds=hn(this._milliseconds),this._days=hn(this._days),this._months=hn(this._months),e.milliseconds=hn(e.milliseconds),e.seconds=hn(e.seconds),e.minutes=hn(e.minutes),e.hours=hn(e.hours),e.months=hn(e.months),e.years=hn(e.years),this}function Id(e,t,n,r){var i=Ht(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function mb(e,t){return Id(this,e,t,1)}function pb(e,t){return Id(this,e,t,-1)}function cc(e){return e<0?Math.floor(e):Math.ceil(e)}function yb(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,o,l,c,d;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=cc(Ta(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Dt(e/1e3),r.seconds=i%60,o=Dt(i/60),r.minutes=o%60,l=Dt(o/60),r.hours=l%24,t+=Dt(l/24),d=Dt(Wd(t)),n+=d,t-=cc(Ta(d)),c=Dt(n/12),n%=12,r.days=t,r.months=n,r.years=c,this}function Wd(e){return e*4800/146097}function Ta(e){return e*146097/4800}function _b(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Yt(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Wd(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ta(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Dn(e){return function(){return this.as(e)}}var jd=Dn("ms"),gb=Dn("s"),wb=Dn("m"),vb=Dn("h"),Sb=Dn("d"),bb=Dn("w"),Ob=Dn("M"),kb=Dn("Q"),Mb=Dn("y"),Db=jd;function Tb(){return Ht(this)}function xb(e){return e=Yt(e),this.isValid()?this[e+"s"]():NaN}function fr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Cb=fr("milliseconds"),Yb=fr("seconds"),Nb=fr("minutes"),Eb=fr("hours"),Rb=fr("days"),Pb=fr("months"),Ab=fr("years");function Fb(){return Dt(this.days()/7)}var pn=Math.round,xr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Lb(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Ib(e,t,n,r){var i=Ht(e).abs(),o=pn(i.as("s")),l=pn(i.as("m")),c=pn(i.as("h")),d=pn(i.as("d")),p=pn(i.as("M")),m=pn(i.as("w")),y=pn(i.as("y")),v=o<=n.ss&&["s",o]||o0,v[4]=r,Lb.apply(null,v)}function Wb(e){return e===void 0?pn:typeof e=="function"?(pn=e,!0):!1}function jb(e,t){return xr[e]===void 0?!1:t===void 0?xr[e]:(xr[e]=t,e==="s"&&(xr.ss=t-1),!0)}function Ub(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=xr,i,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},xr,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),o=Ib(this,!n,r,i),n&&(o=i.pastFuture(+this,o)),i.postformat(o)}var Xo=Math.abs;function Or(e){return(e>0)-(e<0)||+e}function lo(){if(!this.isValid())return this.localeData().invalidDate();var e=Xo(this._milliseconds)/1e3,t=Xo(this._days),n=Xo(this._months),r,i,o,l,c=this.asSeconds(),d,p,m,y;return c?(r=Dt(e/60),i=Dt(r/60),e%=60,r%=60,o=Dt(n/12),n%=12,l=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=c<0?"-":"",p=Or(this._months)!==Or(c)?"-":"",m=Or(this._days)!==Or(c)?"-":"",y=Or(this._milliseconds)!==Or(c)?"-":"",d+"P"+(o?p+o+"Y":"")+(n?p+n+"M":"")+(t?m+t+"D":"")+(i||r||e?"T":"")+(i?y+i+"H":"")+(r?y+r+"M":"")+(e?y+l+"S":"")):"P0D"}var ge=oo.prototype;ge.isValid=Pv;ge.abs=hb;ge.add=mb;ge.subtract=pb;ge.as=_b;ge.asMilliseconds=jd;ge.asSeconds=gb;ge.asMinutes=wb;ge.asHours=vb;ge.asDays=Sb;ge.asWeeks=bb;ge.asMonths=Ob;ge.asQuarters=kb;ge.asYears=Mb;ge.valueOf=Db;ge._bubble=yb;ge.clone=Tb;ge.get=xb;ge.milliseconds=Cb;ge.seconds=Yb;ge.minutes=Nb;ge.hours=Eb;ge.days=Rb;ge.weeks=Fb;ge.months=Pb;ge.years=Ab;ge.humanize=Ub;ge.toISOString=lo;ge.toString=lo;ge.toJSON=lo;ge.locale=Td;ge.localeData=Cd;ge.toIsoString=Ct("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lo);ge.lang=xd;X("X",0,0,"unix");X("x",0,0,"valueOf");z("x",no);z("X",lw);Ce("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Ce("x",function(e,t,n){n._d=new Date(me(e))});//! moment.js -$.version="2.30.1";H0(Fe);$.fn=A;$.min=Yv;$.max=Nv;$.now=Ev;$.utc=Qt;$.unix=ob;$.months=lb;$.isDate=Ls;$.locale=Un;$.invalid=Qi;$.duration=Ht;$.isMoment=Ut;$.weekdays=cb;$.parseZone=ab;$.localeData=Mn;$.isDuration=pi;$.monthsShort=ub;$.weekdaysMin=db;$.defineLocale=gl;$.updateLocale=av;$.locales=lv;$.weekdaysShort=fb;$.normalizeUnits=Yt;$.relativeTimeRounding=Wb;$.relativeTimeThreshold=jb;$.calendarFormat=rS;$.prototype=A;$.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Ud=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hd(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ea={exports:{}},fc;function Hb(){return fc||(fc=1,function(e,t){(function(n,r){e.exports=r()})(Ud,function(){var n;function r(){return n.apply(null,arguments)}function i(s){n=s}function o(s){return s instanceof Array||Object.prototype.toString.call(s)==="[object Array]"}function l(s){return s!=null&&Object.prototype.toString.call(s)==="[object Object]"}function c(s,a){return Object.prototype.hasOwnProperty.call(s,a)}function d(s){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(s).length===0;var a;for(a in s)if(c(s,a))return!1;return!0}function p(s){return s===void 0}function m(s){return typeof s=="number"||Object.prototype.toString.call(s)==="[object Number]"}function y(s){return s instanceof Date||Object.prototype.toString.call(s)==="[object Date]"}function v(s,a){var u=[],f,h=s.length;for(f=0;f>>0,f;for(f=0;f0)for(u=0;u=0;return(g?u?"+":"":"-")+Math.pow(10,Math.max(0,h)).toString().substr(1)+f}var Nt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,at=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,hr={},Tn={};function J(s,a,u,f){var h=f;typeof f=="string"&&(h=function(){return this[f]()}),s&&(Tn[s]=h),a&&(Tn[a[0]]=function(){return Je(h.apply(this,arguments),a[1],a[2])}),u&&(Tn[u]=function(){return this.localeData().ordinal(h.apply(this,arguments),s)})}function Gn(s){return s.match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"")}function mr(s){var a=s.match(Nt),u,f;for(u=0,f=a.length;u=0&&at.test(s);)s=s.replace(at,f),at.lastIndex=0,u-=1;return s}var Cn={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function qr(s){var a=this._longDateFormat[s],u=this._longDateFormat[s.toUpperCase()];return a||!u?a:(this._longDateFormat[s]=u.match(Nt).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[s])}var Kr="Invalid date";function _(){return this._invalidDate}var w="%d",k=/\d{1,2}/;function E(s){return this._ordinal.replace("%d",s)}var C={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Y(s,a,u,f){var h=this._relativeTime[u];return fe(h)?h(s,a,u,f):h.replace(/%d/i,s)}function W(s,a){var u=this._relativeTime[s>0?"future":"past"];return fe(u)?u(a):u.replace(/%s/i,a)}var L={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function R(s){return typeof s=="string"?L[s]||L[s.toLowerCase()]:void 0}function N(s){var a={},u,f;for(f in s)c(s,f)&&(u=R(f),u&&(a[u]=s[f]));return a}var ne={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function V(s){var a=[],u;for(u in s)c(s,u)&&a.push({unit:u,priority:ne[u]});return a.sort(function(f,h){return f.priority-h.priority}),a}var Z=/\d/,q=/\d\d/,de=/\d{3}/,De=/\d{4}/,ye=/[+-]?\d{6}/,ce=/\d\d?/,Ge=/\d\d\d\d?/,ht=/\d\d\d\d\d\d?/,Ke=/\d{1,3}/,en=/\d{1,4}/,zn=/[+-]?\d{1,6}/,Ve=/\d+/,lt=/[+-]?\d+/,Hs=/Z|[+-]\d\d:?\d\d/gi,Vs=/Z|[+-]\d\d(?::?\d\d)?/gi,Th=/[+-]?\d+(\.\d{1,3})?/,Zr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,pr=/^[1-9]\d?/,go=/^([1-9]\d|\d)/,$s;$s={};function G(s,a,u){$s[s]=fe(a)?a:function(f,h){return f&&u?u:a}}function xh(s,a){return c($s,s)?$s[s](a._strict,a._locale):new RegExp(Ch(s))}function Ch(s){return tn(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,u,f,h,g){return u||f||h||g}))}function tn(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function kt(s){return s<0?Math.ceil(s)||0:Math.floor(s)}function he(s){var a=+s,u=0;return a!==0&&isFinite(a)&&(u=kt(a)),u}var wo={};function xe(s,a){var u,f=a,h;for(typeof s=="string"&&(s=[s]),m(a)&&(f=function(g,S){S[a]=he(g)}),h=s.length,u=0;u68?1900:2e3)};var Fl=yr("FullYear",!0);function Rh(){return Bs(this.year())}function yr(s,a){return function(u){return u!=null?(Ll(this,s,u),r.updateOffset(this,a),this):Xr(this,s)}}function Xr(s,a){if(!s.isValid())return NaN;var u=s._d,f=s._isUTC;switch(a){case"Milliseconds":return f?u.getUTCMilliseconds():u.getMilliseconds();case"Seconds":return f?u.getUTCSeconds():u.getSeconds();case"Minutes":return f?u.getUTCMinutes():u.getMinutes();case"Hours":return f?u.getUTCHours():u.getHours();case"Date":return f?u.getUTCDate():u.getDate();case"Day":return f?u.getUTCDay():u.getDay();case"Month":return f?u.getUTCMonth():u.getMonth();case"FullYear":return f?u.getUTCFullYear():u.getFullYear();default:return NaN}}function Ll(s,a,u){var f,h,g,S,B;if(!(!s.isValid()||isNaN(u))){switch(f=s._d,h=s._isUTC,a){case"Milliseconds":return void(h?f.setUTCMilliseconds(u):f.setMilliseconds(u));case"Seconds":return void(h?f.setUTCSeconds(u):f.setSeconds(u));case"Minutes":return void(h?f.setUTCMinutes(u):f.setMinutes(u));case"Hours":return void(h?f.setUTCHours(u):f.setHours(u));case"Date":return void(h?f.setUTCDate(u):f.setDate(u));case"FullYear":break;default:return}g=u,S=s.month(),B=s.date(),B=B===29&&S===1&&!Bs(g)?28:B,h?f.setUTCFullYear(g,S,B):f.setFullYear(g,S,B)}}function Ph(s){return s=R(s),fe(this[s])?this[s]():this}function Ah(s,a){if(typeof s=="object"){s=N(s);var u=V(s),f,h=u.length;for(f=0;f=0?(B=new Date(s+400,a,u,f,h,g,S),isFinite(B.getFullYear())&&B.setFullYear(s)):B=new Date(s,a,u,f,h,g,S),B}function es(s){var a,u;return s<100&&s>=0?(u=Array.prototype.slice.call(arguments),u[0]=s+400,a=new Date(Date.UTC.apply(null,u)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(s)):a=new Date(Date.UTC.apply(null,arguments)),a}function Gs(s,a,u){var f=7+a-u,h=(7+es(s,0,f).getUTCDay()-a)%7;return-h+f-1}function Vl(s,a,u,f,h){var g=(7+u-f)%7,S=Gs(s,f,h),B=1+7*(a-1)+g+S,oe,pe;return B<=0?(oe=s-1,pe=Qr(oe)+B):B>Qr(s)?(oe=s+1,pe=B-Qr(s)):(oe=s,pe=B),{year:oe,dayOfYear:pe}}function ts(s,a,u){var f=Gs(s.year(),a,u),h=Math.floor((s.dayOfYear()-f-1)/7)+1,g,S;return h<1?(S=s.year()-1,g=h+sn(S,a,u)):h>sn(s.year(),a,u)?(g=h-sn(s.year(),a,u),S=s.year()+1):(S=s.year(),g=h),{week:g,year:S}}function sn(s,a,u){var f=Gs(s,a,u),h=Gs(s+1,a,u);return(Qr(s)-f+h)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),G("w",ce,pr),G("ww",ce,q),G("W",ce,pr),G("WW",ce,q),Jr(["w","ww","W","WW"],function(s,a,u,f){a[f.substr(0,1)]=he(s)});function qh(s){return ts(s,this._week.dow,this._week.doy).week}var Kh={dow:0,doy:6};function Zh(){return this._week.dow}function Jh(){return this._week.doy}function Qh(s){var a=this.localeData().week(this);return s==null?a:this.add((s-a)*7,"d")}function Xh(s){var a=ts(this,1,4).week;return s==null?a:this.add((s-a)*7,"d")}J("d",0,"do","day"),J("dd",0,0,function(s){return this.localeData().weekdaysMin(this,s)}),J("ddd",0,0,function(s){return this.localeData().weekdaysShort(this,s)}),J("dddd",0,0,function(s){return this.localeData().weekdays(this,s)}),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),G("d",ce),G("e",ce),G("E",ce),G("dd",function(s,a){return a.weekdaysMinRegex(s)}),G("ddd",function(s,a){return a.weekdaysShortRegex(s)}),G("dddd",function(s,a){return a.weekdaysRegex(s)}),Jr(["dd","ddd","dddd"],function(s,a,u,f){var h=u._locale.weekdaysParse(s,f,u._strict);h!=null?a.d=h:D(u).invalidWeekday=s}),Jr(["d","e","E"],function(s,a,u,f){a[f]=he(s)});function em(s,a){return typeof s!="string"?s:isNaN(s)?(s=a.weekdaysParse(s),typeof s=="number"?s:null):parseInt(s,10)}function tm(s,a){return typeof s=="string"?a.weekdaysParse(s)%7||7:isNaN(s)?null:s}function So(s,a){return s.slice(a,7).concat(s.slice(0,a))}var nm="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$l="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),rm="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),sm=Zr,im=Zr,om=Zr;function am(s,a){var u=o(this._weekdays)?this._weekdays:this._weekdays[s&&s!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return s===!0?So(u,this._week.dow):s?u[s.day()]:u}function lm(s){return s===!0?So(this._weekdaysShort,this._week.dow):s?this._weekdaysShort[s.day()]:this._weekdaysShort}function um(s){return s===!0?So(this._weekdaysMin,this._week.dow):s?this._weekdaysMin[s.day()]:this._weekdaysMin}function cm(s,a,u){var f,h,g,S=s.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)g=T([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(g,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(g,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(g,"").toLocaleLowerCase();return u?a==="dddd"?(h=je.call(this._weekdaysParse,S),h!==-1?h:null):a==="ddd"?(h=je.call(this._shortWeekdaysParse,S),h!==-1?h:null):(h=je.call(this._minWeekdaysParse,S),h!==-1?h:null):a==="dddd"?(h=je.call(this._weekdaysParse,S),h!==-1||(h=je.call(this._shortWeekdaysParse,S),h!==-1)?h:(h=je.call(this._minWeekdaysParse,S),h!==-1?h:null)):a==="ddd"?(h=je.call(this._shortWeekdaysParse,S),h!==-1||(h=je.call(this._weekdaysParse,S),h!==-1)?h:(h=je.call(this._minWeekdaysParse,S),h!==-1?h:null)):(h=je.call(this._minWeekdaysParse,S),h!==-1||(h=je.call(this._weekdaysParse,S),h!==-1)?h:(h=je.call(this._shortWeekdaysParse,S),h!==-1?h:null))}function fm(s,a,u){var f,h,g;if(this._weekdaysParseExact)return cm.call(this,s,a,u);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(h=T([2e3,1]).day(f),u&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(h,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(h,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(h,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(g="^"+this.weekdays(h,"")+"|^"+this.weekdaysShort(h,"")+"|^"+this.weekdaysMin(h,""),this._weekdaysParse[f]=new RegExp(g.replace(".",""),"i")),u&&a==="dddd"&&this._fullWeekdaysParse[f].test(s))return f;if(u&&a==="ddd"&&this._shortWeekdaysParse[f].test(s))return f;if(u&&a==="dd"&&this._minWeekdaysParse[f].test(s))return f;if(!u&&this._weekdaysParse[f].test(s))return f}}function dm(s){if(!this.isValid())return s!=null?this:NaN;var a=Xr(this,"Day");return s!=null?(s=em(s,this.localeData()),this.add(s-a,"d")):a}function hm(s){if(!this.isValid())return s!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return s==null?a:this.add(s-a,"d")}function mm(s){if(!this.isValid())return s!=null?this:NaN;if(s!=null){var a=tm(s,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function pm(s){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||bo.call(this),s?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=sm),this._weekdaysStrictRegex&&s?this._weekdaysStrictRegex:this._weekdaysRegex)}function ym(s){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||bo.call(this),s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=im),this._weekdaysShortStrictRegex&&s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _m(s){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||bo.call(this),s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=om),this._weekdaysMinStrictRegex&&s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function bo(){function s(ut,cn){return cn.length-ut.length}var a=[],u=[],f=[],h=[],g,S,B,oe,pe;for(g=0;g<7;g++)S=T([2e3,1]).day(g),B=tn(this.weekdaysMin(S,"")),oe=tn(this.weekdaysShort(S,"")),pe=tn(this.weekdays(S,"")),a.push(B),u.push(oe),f.push(pe),h.push(B),h.push(oe),h.push(pe);a.sort(s),u.sort(s),f.sort(s),h.sort(s),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Oo(){return this.hours()%12||12}function gm(){return this.hours()||24}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,Oo),J("k",["kk",2],0,gm),J("hmm",0,0,function(){return""+Oo.apply(this)+Je(this.minutes(),2)}),J("hmmss",0,0,function(){return""+Oo.apply(this)+Je(this.minutes(),2)+Je(this.seconds(),2)}),J("Hmm",0,0,function(){return""+this.hours()+Je(this.minutes(),2)}),J("Hmmss",0,0,function(){return""+this.hours()+Je(this.minutes(),2)+Je(this.seconds(),2)});function Bl(s,a){J(s,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}Bl("a",!0),Bl("A",!1);function Gl(s,a){return a._meridiemParse}G("a",Gl),G("A",Gl),G("H",ce,go),G("h",ce,pr),G("k",ce,pr),G("HH",ce,q),G("hh",ce,q),G("kk",ce,q),G("hmm",Ge),G("hmmss",ht),G("Hmm",Ge),G("Hmmss",ht),xe(["H","HH"],ze),xe(["k","kk"],function(s,a,u){var f=he(s);a[ze]=f===24?0:f}),xe(["a","A"],function(s,a,u){u._isPm=u._locale.isPM(s),u._meridiem=s}),xe(["h","hh"],function(s,a,u){a[ze]=he(s),D(u).bigHour=!0}),xe("hmm",function(s,a,u){var f=s.length-2;a[ze]=he(s.substr(0,f)),a[Et]=he(s.substr(f)),D(u).bigHour=!0}),xe("hmmss",function(s,a,u){var f=s.length-4,h=s.length-2;a[ze]=he(s.substr(0,f)),a[Et]=he(s.substr(f,2)),a[rn]=he(s.substr(h)),D(u).bigHour=!0}),xe("Hmm",function(s,a,u){var f=s.length-2;a[ze]=he(s.substr(0,f)),a[Et]=he(s.substr(f))}),xe("Hmmss",function(s,a,u){var f=s.length-4,h=s.length-2;a[ze]=he(s.substr(0,f)),a[Et]=he(s.substr(f,2)),a[rn]=he(s.substr(h))});function wm(s){return(s+"").toLowerCase().charAt(0)==="p"}var vm=/[ap]\.?m?\.?/i,Sm=yr("Hours",!0);function bm(s,a,u){return s>11?u?"pm":"PM":u?"am":"AM"}var zl={calendar:ve,longDateFormat:Cn,invalidDate:Kr,ordinal:w,dayOfMonthOrdinalParse:k,relativeTime:C,months:Lh,monthsShort:Il,week:Kh,weekdays:nm,weekdaysMin:rm,weekdaysShort:$l,meridiemParse:vm},Ie={},ns={},rs;function Om(s,a){var u,f=Math.min(s.length,a.length);for(u=0;u0;){if(h=zs(g.slice(0,u).join("-")),h)return h;if(f&&f.length>=u&&Om(g,f)>=u-1)break;u--}a++}return rs}function Mm(s){return!!(s&&s.match("^[^/\\\\]*$"))}function zs(s){var a=null,u;if(Ie[s]===void 0&&e&&e.exports&&Mm(s))try{a=rs._abbr,u=Hd,u("./locale/"+s),Yn(a)}catch{Ie[s]=null}return Ie[s]}function Yn(s,a){var u;return s&&(p(a)?u=on(s):u=ko(s,a),u?rs=u:typeof console<"u"&&console.warn&&console.warn("Locale "+s+" not found. Did you forget to load it?")),rs._abbr}function ko(s,a){if(a!==null){var u,f=zl;if(a.abbr=s,Ie[s]!=null)U("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=Ie[s]._config;else if(a.parentLocale!=null)if(Ie[a.parentLocale]!=null)f=Ie[a.parentLocale]._config;else if(u=zs(a.parentLocale),u!=null)f=u._config;else return ns[a.parentLocale]||(ns[a.parentLocale]=[]),ns[a.parentLocale].push({name:s,config:a}),null;return Ie[s]=new Pe(Xe(f,a)),ns[s]&&ns[s].forEach(function(h){ko(h.name,h.config)}),Yn(s),Ie[s]}else return delete Ie[s],null}function Dm(s,a){if(a!=null){var u,f,h=zl;Ie[s]!=null&&Ie[s].parentLocale!=null?Ie[s].set(Xe(Ie[s]._config,a)):(f=zs(s),f!=null&&(h=f._config),a=Xe(h,a),f==null&&(a.abbr=s),u=new Pe(a),u.parentLocale=Ie[s],Ie[s]=u),Yn(s)}else Ie[s]!=null&&(Ie[s].parentLocale!=null?(Ie[s]=Ie[s].parentLocale,s===Yn()&&Yn(s)):Ie[s]!=null&&delete Ie[s]);return Ie[s]}function on(s){var a;if(s&&s._locale&&s._locale._abbr&&(s=s._locale._abbr),!s)return rs;if(!o(s)){if(a=zs(s),a)return a;s=[s]}return km(s)}function Tm(){return ke(Ie)}function Mo(s){var a,u=s._a;return u&&D(s).overflow===-2&&(a=u[nn]<0||u[nn]>11?nn:u[Bt]<1||u[Bt]>vo(u[et],u[nn])?Bt:u[ze]<0||u[ze]>24||u[ze]===24&&(u[Et]!==0||u[rn]!==0||u[qn]!==0)?ze:u[Et]<0||u[Et]>59?Et:u[rn]<0||u[rn]>59?rn:u[qn]<0||u[qn]>999?qn:-1,D(s)._overflowDayOfYear&&(aBt)&&(a=Bt),D(s)._overflowWeeks&&a===-1&&(a=Nh),D(s)._overflowWeekday&&a===-1&&(a=Eh),D(s).overflow=a),s}var xm=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cm=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ym=/Z|[+-]\d\d(?::?\d\d)?/,qs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Do=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Nm=/^\/?Date\((-?\d+)/i,Em=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Rm={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Kl(s){var a,u,f=s._i,h=xm.exec(f)||Cm.exec(f),g,S,B,oe,pe=qs.length,ut=Do.length;if(h){for(D(s).iso=!0,a=0,u=pe;aQr(S)||s._dayOfYear===0)&&(D(s)._overflowDayOfYear=!0),u=es(S,0,s._dayOfYear),s._a[nn]=u.getUTCMonth(),s._a[Bt]=u.getUTCDate()),a=0;a<3&&s._a[a]==null;++a)s._a[a]=f[a]=h[a];for(;a<7;a++)s._a[a]=f[a]=s._a[a]==null?a===2?1:0:s._a[a];s._a[ze]===24&&s._a[Et]===0&&s._a[rn]===0&&s._a[qn]===0&&(s._nextDay=!0,s._a[ze]=0),s._d=(s._useUTC?es:zh).apply(null,f),g=s._useUTC?s._d.getUTCDay():s._d.getDay(),s._tzm!=null&&s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),s._nextDay&&(s._a[ze]=24),s._w&&typeof s._w.d<"u"&&s._w.d!==g&&(D(s).weekdayMismatch=!0)}}function Um(s){var a,u,f,h,g,S,B,oe,pe;a=s._w,a.GG!=null||a.W!=null||a.E!=null?(g=1,S=4,u=_r(a.GG,s._a[et],ts(Ae(),1,4).year),f=_r(a.W,1),h=_r(a.E,1),(h<1||h>7)&&(oe=!0)):(g=s._locale._week.dow,S=s._locale._week.doy,pe=ts(Ae(),g,S),u=_r(a.gg,s._a[et],pe.year),f=_r(a.w,pe.week),a.d!=null?(h=a.d,(h<0||h>6)&&(oe=!0)):a.e!=null?(h=a.e+g,(a.e<0||a.e>6)&&(oe=!0)):h=g),f<1||f>sn(u,g,S)?D(s)._overflowWeeks=!0:oe!=null?D(s)._overflowWeekday=!0:(B=Vl(u,f,h,g,S),s._a[et]=B.year,s._dayOfYear=B.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function xo(s){if(s._f===r.ISO_8601){Kl(s);return}if(s._f===r.RFC_2822){Zl(s);return}s._a=[],D(s).empty=!0;var a=""+s._i,u,f,h,g,S,B=a.length,oe=0,pe,ut;for(h=zr(s._f,s._locale).match(Nt)||[],ut=h.length,u=0;u0&&D(s).unusedInput.push(S),a=a.slice(a.indexOf(f)+f.length),oe+=f.length),Tn[g]?(f?D(s).empty=!1:D(s).unusedTokens.push(g),Yh(g,f,s)):s._strict&&!f&&D(s).unusedTokens.push(g);D(s).charsLeftOver=B-oe,a.length>0&&D(s).unusedInput.push(a),s._a[ze]<=12&&D(s).bigHour===!0&&s._a[ze]>0&&(D(s).bigHour=void 0),D(s).parsedDateParts=s._a.slice(0),D(s).meridiem=s._meridiem,s._a[ze]=Hm(s._locale,s._a[ze],s._meridiem),pe=D(s).era,pe!==null&&(s._a[et]=s._locale.erasConvertYear(pe,s._a[et])),To(s),Mo(s)}function Hm(s,a,u){var f;return u==null?a:s.meridiemHour!=null?s.meridiemHour(a,u):(s.isPM!=null&&(f=s.isPM(u),f&&a<12&&(a+=12),!f&&a===12&&(a=0)),a)}function Vm(s){var a,u,f,h,g,S,B=!1,oe=s._f.length;if(oe===0){D(s).invalidFormat=!0,s._d=new Date(NaN);return}for(h=0;hthis?this:s:O()});function Xl(s,a){var u,f;if(a.length===1&&o(a[0])&&(a=a[0]),!a.length)return Ae();for(u=a[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function cp(){if(!p(this._isDSTShifted))return this._isDSTShifted;var s={},a;return K(s,this),s=Jl(s),s._a?(a=s._isUTC?T(s._a):Ae(s._a),this._isDSTShifted=this.isValid()&&tp(s._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function fp(){return this.isValid()?!this._isUTC:!1}function dp(){return this.isValid()?this._isUTC:!1}function tu(){return this.isValid()?this._isUTC&&this._offset===0:!1}var hp=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,mp=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Rt(s,a){var u=s,f=null,h,g,S;return Zs(s)?u={ms:s._milliseconds,d:s._days,M:s._months}:m(s)||!isNaN(+s)?(u={},a?u[a]=+s:u.milliseconds=+s):(f=hp.exec(s))?(h=f[1]==="-"?-1:1,u={y:0,d:he(f[Bt])*h,h:he(f[ze])*h,m:he(f[Et])*h,s:he(f[rn])*h,ms:he(Co(f[qn]*1e3))*h}):(f=mp.exec(s))?(h=f[1]==="-"?-1:1,u={y:Kn(f[2],h),M:Kn(f[3],h),w:Kn(f[4],h),d:Kn(f[5],h),h:Kn(f[6],h),m:Kn(f[7],h),s:Kn(f[8],h)}):u==null?u={}:typeof u=="object"&&("from"in u||"to"in u)&&(S=pp(Ae(u.from),Ae(u.to)),u={},u.ms=S.milliseconds,u.M=S.months),g=new Ks(u),Zs(s)&&c(s,"_locale")&&(g._locale=s._locale),Zs(s)&&c(s,"_isValid")&&(g._isValid=s._isValid),g}Rt.fn=Ks.prototype,Rt.invalid=ep;function Kn(s,a){var u=s&&parseFloat(s.replace(",","."));return(isNaN(u)?0:u)*a}function nu(s,a){var u={};return u.months=a.month()-s.month()+(a.year()-s.year())*12,s.clone().add(u.months,"M").isAfter(a)&&--u.months,u.milliseconds=+a-+s.clone().add(u.months,"M"),u}function pp(s,a){var u;return s.isValid()&&a.isValid()?(a=No(a,s),s.isBefore(a)?u=nu(s,a):(u=nu(a,s),u.milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0}}function ru(s,a){return function(u,f){var h,g;return f!==null&&!isNaN(+f)&&(U(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),g=u,u=f,f=g),h=Rt(u,f),su(this,h,s),this}}function su(s,a,u,f){var h=a._milliseconds,g=Co(a._days),S=Co(a._months);s.isValid()&&(f=f??!0,S&&jl(s,Xr(s,"Month")+S*u),g&&Ll(s,"Date",Xr(s,"Date")+g*u),h&&s._d.setTime(s._d.valueOf()+h*u),f&&r.updateOffset(s,g||S))}var yp=ru(1,"add"),_p=ru(-1,"subtract");function iu(s){return typeof s=="string"||s instanceof String}function gp(s){return se(s)||y(s)||iu(s)||m(s)||vp(s)||wp(s)||s===null||s===void 0}function wp(s){var a=l(s)&&!d(s),u=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h,g,S=f.length;for(h=0;hu.valueOf():u.valueOf()9999?xn(u,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):fe(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",xn(u,"Z")):xn(u,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Pp(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var s="moment",a="",u,f,h,g;return this.isLocal()||(s=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),u="["+s+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",h="-MM-DD[T]HH:mm:ss.SSS",g=a+'[")]',this.format(u+f+h+g)}function Ap(s){s||(s=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var a=xn(this,s);return this.localeData().postformat(a)}function Fp(s,a){return this.isValid()&&(se(s)&&s.isValid()||Ae(s).isValid())?Rt({to:this,from:s}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function Lp(s){return this.from(Ae(),s)}function Ip(s,a){return this.isValid()&&(se(s)&&s.isValid()||Ae(s).isValid())?Rt({from:this,to:s}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function Wp(s){return this.to(Ae(),s)}function ou(s){var a;return s===void 0?this._locale._abbr:(a=on(s),a!=null&&(this._locale=a),this)}var au=ie("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(s){return s===void 0?this.localeData():this.locale(s)});function lu(){return this._locale}var Qs=1e3,gr=60*Qs,Xs=60*gr,uu=(365*400+97)*24*Xs;function wr(s,a){return(s%a+a)%a}function cu(s,a,u){return s<100&&s>=0?new Date(s+400,a,u)-uu:new Date(s,a,u).valueOf()}function fu(s,a,u){return s<100&&s>=0?Date.UTC(s+400,a,u)-uu:Date.UTC(s,a,u)}function jp(s){var a,u;if(s=R(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(u=this._isUTC?fu:cu,s){case"year":a=u(this.year(),0,1);break;case"quarter":a=u(this.year(),this.month()-this.month()%3,1);break;case"month":a=u(this.year(),this.month(),1);break;case"week":a=u(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=u(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=u(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=wr(a+(this._isUTC?0:this.utcOffset()*gr),Xs);break;case"minute":a=this._d.valueOf(),a-=wr(a,gr);break;case"second":a=this._d.valueOf(),a-=wr(a,Qs);break}return this._d.setTime(a),r.updateOffset(this,!0),this}function Up(s){var a,u;if(s=R(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(u=this._isUTC?fu:cu,s){case"year":a=u(this.year()+1,0,1)-1;break;case"quarter":a=u(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=u(this.year(),this.month()+1,1)-1;break;case"week":a=u(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=u(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=u(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=Xs-wr(a+(this._isUTC?0:this.utcOffset()*gr),Xs)-1;break;case"minute":a=this._d.valueOf(),a+=gr-wr(a,gr)-1;break;case"second":a=this._d.valueOf(),a+=Qs-wr(a,Qs)-1;break}return this._d.setTime(a),r.updateOffset(this,!0),this}function Hp(){return this._d.valueOf()-(this._offset||0)*6e4}function Vp(){return Math.floor(this.valueOf()/1e3)}function $p(){return new Date(this.valueOf())}function Bp(){var s=this;return[s.year(),s.month(),s.date(),s.hour(),s.minute(),s.second(),s.millisecond()]}function Gp(){var s=this;return{years:s.year(),months:s.month(),date:s.date(),hours:s.hours(),minutes:s.minutes(),seconds:s.seconds(),milliseconds:s.milliseconds()}}function zp(){return this.isValid()?this.toISOString():null}function qp(){return I(this)}function Kp(){return M({},D(this))}function Zp(){return D(this).overflow}function Jp(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}J("N",0,0,"eraAbbr"),J("NN",0,0,"eraAbbr"),J("NNN",0,0,"eraAbbr"),J("NNNN",0,0,"eraName"),J("NNNNN",0,0,"eraNarrow"),J("y",["y",1],"yo","eraYear"),J("y",["yy",2],0,"eraYear"),J("y",["yyy",3],0,"eraYear"),J("y",["yyyy",4],0,"eraYear"),G("N",Ro),G("NN",Ro),G("NNN",Ro),G("NNNN",ly),G("NNNNN",uy),xe(["N","NN","NNN","NNNN","NNNNN"],function(s,a,u,f){var h=u._locale.erasParse(s,f,u._strict);h?D(u).era=h:D(u).invalidEra=s}),G("y",Ve),G("yy",Ve),G("yyy",Ve),G("yyyy",Ve),G("yo",cy),xe(["y","yy","yyy","yyyy"],et),xe(["yo"],function(s,a,u,f){var h;u._locale._eraYearOrdinalRegex&&(h=s.match(u._locale._eraYearOrdinalRegex)),u._locale.eraYearOrdinalParse?a[et]=u._locale.eraYearOrdinalParse(s,h):a[et]=parseInt(s,10)});function Qp(s,a){var u,f,h,g=this._eras||on("en")._eras;for(u=0,f=g.length;u=0)return g[f]}function ey(s,a){var u=s.since<=s.until?1:-1;return a===void 0?r(s.since).year():r(s.since).year()+(a-s.offset)*u}function ty(){var s,a,u,f=this.localeData().eras();for(s=0,a=f.length;sg&&(a=g),_y.call(this,s,a,u,f,h))}function _y(s,a,u,f,h){var g=Vl(s,a,u,f,h),S=es(g.year,0,g.dayOfYear);return this.year(S.getUTCFullYear()),this.month(S.getUTCMonth()),this.date(S.getUTCDate()),this}J("Q",0,"Qo","quarter"),G("Q",Z),xe("Q",function(s,a){a[nn]=(he(s)-1)*3});function gy(s){return s==null?Math.ceil((this.month()+1)/3):this.month((s-1)*3+this.month()%3)}J("D",["DD",2],"Do","date"),G("D",ce,pr),G("DD",ce,q),G("Do",function(s,a){return s?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),xe(["D","DD"],Bt),xe("Do",function(s,a){a[Bt]=he(s.match(ce)[0])});var hu=yr("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),G("DDD",Ke),G("DDDD",de),xe(["DDD","DDDD"],function(s,a,u){u._dayOfYear=he(s)});function wy(s){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return s==null?a:this.add(s-a,"d")}J("m",["mm",2],0,"minute"),G("m",ce,go),G("mm",ce,q),xe(["m","mm"],Et);var vy=yr("Minutes",!1);J("s",["ss",2],0,"second"),G("s",ce,go),G("ss",ce,q),xe(["s","ss"],rn);var Sy=yr("Seconds",!1);J("S",0,0,function(){return~~(this.millisecond()/100)}),J(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,function(){return this.millisecond()*10}),J(0,["SSSSS",5],0,function(){return this.millisecond()*100}),J(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),J(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),J(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),J(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),G("S",Ke,Z),G("SS",Ke,q),G("SSS",Ke,de);var Nn,mu;for(Nn="SSSS";Nn.length<=9;Nn+="S")G(Nn,Ve);function by(s,a){a[qn]=he(("0."+s)*1e3)}for(Nn="S";Nn.length<=9;Nn+="S")xe(Nn,by);mu=yr("Milliseconds",!1),J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");function Oy(){return this._isUTC?"UTC":""}function ky(){return this._isUTC?"Coordinated Universal Time":""}var P=re.prototype;P.add=yp,P.calendar=Op,P.clone=kp,P.diff=Np,P.endOf=Up,P.format=Ap,P.from=Fp,P.fromNow=Lp,P.to=Ip,P.toNow=Wp,P.get=Ph,P.invalidAt=Zp,P.isAfter=Mp,P.isBefore=Dp,P.isBetween=Tp,P.isSame=xp,P.isSameOrAfter=Cp,P.isSameOrBefore=Yp,P.isValid=qp,P.lang=au,P.locale=ou,P.localeData=lu,P.max=qm,P.min=zm,P.parsingFlags=Kp,P.set=Ah,P.startOf=jp,P.subtract=_p,P.toArray=Bp,P.toObject=Gp,P.toDate=$p,P.toISOString=Rp,P.inspect=Pp,typeof Symbol<"u"&&Symbol.for!=null&&(P[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),P.toJSON=zp,P.toString=Ep,P.unix=Vp,P.valueOf=Hp,P.creationData=Jp,P.eraName=ty,P.eraNarrow=ny,P.eraAbbr=ry,P.eraYear=sy,P.year=Fl,P.isLeapYear=Rh,P.weekYear=fy,P.isoWeekYear=dy,P.quarter=P.quarters=gy,P.month=Ul,P.daysInMonth=$h,P.week=P.weeks=Qh,P.isoWeek=P.isoWeeks=Xh,P.weeksInYear=py,P.weeksInWeekYear=yy,P.isoWeeksInYear=hy,P.isoWeeksInISOWeekYear=my,P.date=hu,P.day=P.days=dm,P.weekday=hm,P.isoWeekday=mm,P.dayOfYear=wy,P.hour=P.hours=Sm,P.minute=P.minutes=vy,P.second=P.seconds=Sy,P.millisecond=P.milliseconds=mu,P.utcOffset=rp,P.utc=ip,P.local=op,P.parseZone=ap,P.hasAlignedHourOffset=lp,P.isDST=up,P.isLocal=fp,P.isUtcOffset=dp,P.isUtc=tu,P.isUTC=tu,P.zoneAbbr=Oy,P.zoneName=ky,P.dates=ie("dates accessor is deprecated. Use date instead.",hu),P.months=ie("months accessor is deprecated. Use month instead",Ul),P.years=ie("years accessor is deprecated. Use year instead",Fl),P.zone=ie("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",sp),P.isDSTShifted=ie("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",cp);function My(s){return Ae(s*1e3)}function Dy(){return Ae.apply(null,arguments).parseZone()}function pu(s){return s}var Se=Pe.prototype;Se.calendar=Ot,Se.longDateFormat=qr,Se.invalidDate=_,Se.ordinal=E,Se.preparse=pu,Se.postformat=pu,Se.relativeTime=Y,Se.pastFuture=W,Se.set=Re,Se.eras=Qp,Se.erasParse=Xp,Se.erasConvertYear=ey,Se.erasAbbrRegex=oy,Se.erasNameRegex=iy,Se.erasNarrowRegex=ay,Se.months=jh,Se.monthsShort=Uh,Se.monthsParse=Vh,Se.monthsRegex=Gh,Se.monthsShortRegex=Bh,Se.week=qh,Se.firstDayOfYear=Jh,Se.firstDayOfWeek=Zh,Se.weekdays=am,Se.weekdaysMin=um,Se.weekdaysShort=lm,Se.weekdaysParse=fm,Se.weekdaysRegex=pm,Se.weekdaysShortRegex=ym,Se.weekdaysMinRegex=_m,Se.isPM=wm,Se.meridiem=bm;function ti(s,a,u,f){var h=on(),g=T().set(f,a);return h[u](g,s)}function yu(s,a,u){if(m(s)&&(a=s,s=void 0),s=s||"",a!=null)return ti(s,a,u,"month");var f,h=[];for(f=0;f<12;f++)h[f]=ti(s,f,u,"month");return h}function Ao(s,a,u,f){typeof s=="boolean"?(m(a)&&(u=a,a=void 0),a=a||""):(a=s,u=a,s=!1,m(a)&&(u=a,a=void 0),a=a||"");var h=on(),g=s?h._week.dow:0,S,B=[];if(u!=null)return ti(a,(u+g)%7,f,"day");for(S=0;S<7;S++)B[S]=ti(a,(S+g)%7,f,"day");return B}function Ty(s,a){return yu(s,a,"months")}function xy(s,a){return yu(s,a,"monthsShort")}function Cy(s,a,u){return Ao(s,a,u,"weekdays")}function Yy(s,a,u){return Ao(s,a,u,"weekdaysShort")}function Ny(s,a,u){return Ao(s,a,u,"weekdaysMin")}Yn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(s){var a=s%10,u=he(s%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return s+u}}),r.lang=ie("moment.lang is deprecated. Use moment.locale instead.",Yn),r.langData=ie("moment.langData is deprecated. Use moment.localeData instead.",on);var an=Math.abs;function Ey(){var s=this._data;return this._milliseconds=an(this._milliseconds),this._days=an(this._days),this._months=an(this._months),s.milliseconds=an(s.milliseconds),s.seconds=an(s.seconds),s.minutes=an(s.minutes),s.hours=an(s.hours),s.months=an(s.months),s.years=an(s.years),this}function _u(s,a,u,f){var h=Rt(a,u);return s._milliseconds+=f*h._milliseconds,s._days+=f*h._days,s._months+=f*h._months,s._bubble()}function Ry(s,a){return _u(this,s,a,1)}function Py(s,a){return _u(this,s,a,-1)}function gu(s){return s<0?Math.floor(s):Math.ceil(s)}function Ay(){var s=this._milliseconds,a=this._days,u=this._months,f=this._data,h,g,S,B,oe;return s>=0&&a>=0&&u>=0||s<=0&&a<=0&&u<=0||(s+=gu(Fo(u)+a)*864e5,a=0,u=0),f.milliseconds=s%1e3,h=kt(s/1e3),f.seconds=h%60,g=kt(h/60),f.minutes=g%60,S=kt(g/60),f.hours=S%24,a+=kt(S/24),oe=kt(wu(a)),u+=oe,a-=gu(Fo(oe)),B=kt(u/12),u%=12,f.days=a,f.months=u,f.years=B,this}function wu(s){return s*4800/146097}function Fo(s){return s*146097/4800}function Fy(s){if(!this.isValid())return NaN;var a,u,f=this._milliseconds;if(s=R(s),s==="month"||s==="quarter"||s==="year")switch(a=this._days+f/864e5,u=this._months+wu(a),s){case"month":return u;case"quarter":return u/3;case"year":return u/12}else switch(a=this._days+Math.round(Fo(this._months)),s){case"week":return a/7+f/6048e5;case"day":return a+f/864e5;case"hour":return a*24+f/36e5;case"minute":return a*1440+f/6e4;case"second":return a*86400+f/1e3;case"millisecond":return Math.floor(a*864e5)+f;default:throw new Error("Unknown unit "+s)}}function ln(s){return function(){return this.as(s)}}var vu=ln("ms"),Ly=ln("s"),Iy=ln("m"),Wy=ln("h"),jy=ln("d"),Uy=ln("w"),Hy=ln("M"),Vy=ln("Q"),$y=ln("y"),By=vu;function Gy(){return Rt(this)}function zy(s){return s=R(s),this.isValid()?this[s+"s"]():NaN}function Zn(s){return function(){return this.isValid()?this._data[s]:NaN}}var qy=Zn("milliseconds"),Ky=Zn("seconds"),Zy=Zn("minutes"),Jy=Zn("hours"),Qy=Zn("days"),Xy=Zn("months"),e_=Zn("years");function t_(){return kt(this.days()/7)}var un=Math.round,vr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function n_(s,a,u,f,h){return h.relativeTime(a||1,!!u,s,f)}function r_(s,a,u,f){var h=Rt(s).abs(),g=un(h.as("s")),S=un(h.as("m")),B=un(h.as("h")),oe=un(h.as("d")),pe=un(h.as("M")),ut=un(h.as("w")),cn=un(h.as("y")),En=g<=u.ss&&["s",g]||g0,En[4]=f,n_.apply(null,En)}function s_(s){return s===void 0?un:typeof s=="function"?(un=s,!0):!1}function i_(s,a){return vr[s]===void 0?!1:a===void 0?vr[s]:(vr[s]=a,s==="s"&&(vr.ss=a-1),!0)}function o_(s,a){if(!this.isValid())return this.localeData().invalidDate();var u=!1,f=vr,h,g;return typeof s=="object"&&(a=s,s=!1),typeof s=="boolean"&&(u=s),typeof a=="object"&&(f=Object.assign({},vr,a),a.s!=null&&a.ss==null&&(f.ss=a.s-1)),h=this.localeData(),g=r_(this,!u,f,h),u&&(g=h.pastFuture(+this,g)),h.postformat(g)}var Lo=Math.abs;function Sr(s){return(s>0)-(s<0)||+s}function ni(){if(!this.isValid())return this.localeData().invalidDate();var s=Lo(this._milliseconds)/1e3,a=Lo(this._days),u=Lo(this._months),f,h,g,S,B=this.asSeconds(),oe,pe,ut,cn;return B?(f=kt(s/60),h=kt(f/60),s%=60,f%=60,g=kt(u/12),u%=12,S=s?s.toFixed(3).replace(/\.?0+$/,""):"",oe=B<0?"-":"",pe=Sr(this._months)!==Sr(B)?"-":"",ut=Sr(this._days)!==Sr(B)?"-":"",cn=Sr(this._milliseconds)!==Sr(B)?"-":"",oe+"P"+(g?pe+g+"Y":"")+(u?pe+u+"M":"")+(a?ut+a+"D":"")+(h||f||s?"T":"")+(h?cn+h+"H":"")+(f?cn+f+"M":"")+(s?cn+S+"S":"")):"P0D"}var _e=Ks.prototype;_e.isValid=Xm,_e.abs=Ey,_e.add=Ry,_e.subtract=Py,_e.as=Fy,_e.asMilliseconds=vu,_e.asSeconds=Ly,_e.asMinutes=Iy,_e.asHours=Wy,_e.asDays=jy,_e.asWeeks=Uy,_e.asMonths=Hy,_e.asQuarters=Vy,_e.asYears=$y,_e.valueOf=By,_e._bubble=Ay,_e.clone=Gy,_e.get=zy,_e.milliseconds=qy,_e.seconds=Ky,_e.minutes=Zy,_e.hours=Jy,_e.days=Qy,_e.weeks=t_,_e.months=Xy,_e.years=e_,_e.humanize=o_,_e.toISOString=ni,_e.toString=ni,_e.toJSON=ni,_e.locale=ou,_e.localeData=lu,_e.toIsoString=ie("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ni),_e.lang=au,J("X",0,0,"unix"),J("x",0,0,"valueOf"),G("x",lt),G("X",Th),xe("X",function(s,a,u){u._d=new Date(parseFloat(s)*1e3)}),xe("x",function(s,a,u){u._d=new Date(he(s))});//! moment.js -return r.version="2.30.1",i(Ae),r.fn=P,r.min=Km,r.max=Zm,r.now=Jm,r.utc=T,r.unix=My,r.months=Ty,r.isDate=y,r.locale=Yn,r.invalid=O,r.duration=Rt,r.isMoment=se,r.weekdays=Cy,r.parseZone=Dy,r.localeData=on,r.isDuration=Zs,r.monthsShort=xy,r.weekdaysMin=Ny,r.defineLocale=ko,r.updateLocale=Dm,r.locales=Tm,r.weekdaysShort=Yy,r.normalizeUnits=R,r.relativeTimeRounding=s_,r.relativeTimeThreshold=i_,r.calendarFormat=bp,r.prototype=P,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})}(ea)),ea.exports}(function(e,t){(function(n,r){r(typeof Hd=="function"?Hb():n.moment)})(Ud,function(n){//! moment.js locale configuration -var r=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,o=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,l=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],c=n.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:r,monthsShortStrictRegex:i,monthsParse:l,longMonthsParse:l,shortMonthsParse:l,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(d,p){switch(p){case"D":return d+(d===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return d+(d===1?"er":"e");case"w":case"W":return d+(d===1?"re":"e")}},week:{dow:1,doy:4}});return c})})();function Vd(e,t){return function(){return e.apply(t,arguments)}}const{toString:Vb}=Object.prototype,{getPrototypeOf:Tl}=Object,uo=(e=>t=>{const n=Vb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Vt=e=>(e=e.toLowerCase(),t=>uo(t)===e),co=e=>t=>typeof t===e,{isArray:$r}=Array,Ns=co("undefined");function $b(e){return e!==null&&!Ns(e)&&e.constructor!==null&&!Ns(e.constructor)&&St(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $d=Vt("ArrayBuffer");function Bb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$d(e.buffer),t}const Gb=co("string"),St=co("function"),Bd=co("number"),fo=e=>e!==null&&typeof e=="object",zb=e=>e===!0||e===!1,_i=e=>{if(uo(e)!=="object")return!1;const t=Tl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},qb=Vt("Date"),Kb=Vt("File"),Zb=Vt("Blob"),Jb=Vt("FileList"),Qb=e=>fo(e)&&St(e.pipe),Xb=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||St(e.append)&&((t=uo(e))==="formdata"||t==="object"&&St(e.toString)&&e.toString()==="[object FormData]"))},eO=Vt("URLSearchParams"),[tO,nO,rO,sO]=["ReadableStream","Request","Response","Headers"].map(Vt),iO=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Us(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),$r(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const or=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),zd=e=>!Ns(e)&&e!==or;function xa(){const{caseless:e}=zd(this)&&this||{},t={},n=(r,i)=>{const o=e&&Gd(t,i)||i;_i(t[o])&&_i(r)?t[o]=xa(t[o],r):_i(r)?t[o]=xa({},r):$r(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Us(t,(i,o)=>{n&&St(i)?e[o]=Vd(i,n):e[o]=i},{allOwnKeys:r}),e),aO=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),lO=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},uO=(e,t,n,r)=>{let i,o,l;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,t))&&!c[l]&&(t[l]=e[l],c[l]=!0);e=n!==!1&&Tl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cO=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},fO=e=>{if(!e)return null;if($r(e))return e;let t=e.length;if(!Bd(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dO=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Tl(Uint8Array)),hO=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},mO=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},pO=Vt("HTMLFormElement"),yO=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),dc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_O=Vt("RegExp"),qd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Us(n,(i,o)=>{let l;(l=t(i,o,e))!==!1&&(r[o]=l||i)}),Object.defineProperties(e,r)},gO=e=>{qd(e,(t,n)=>{if(St(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(St(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wO=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return $r(e)?r(e):r(String(e).split(t)),n},vO=()=>{},SO=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ta="abcdefghijklmnopqrstuvwxyz",hc="0123456789",Kd={DIGIT:hc,ALPHA:ta,ALPHA_DIGIT:ta+ta.toUpperCase()+hc},bO=(e=16,t=Kd.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function OO(e){return!!(e&&St(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const kO=e=>{const t=new Array(10),n=(r,i)=>{if(fo(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=$r(r)?[]:{};return Us(r,(l,c)=>{const d=n(l,i+1);!Ns(d)&&(o[c]=d)}),t[i]=void 0,o}}return r};return n(e,0)},MO=Vt("AsyncFunction"),DO=e=>e&&(fo(e)||St(e))&&St(e.then)&&St(e.catch),Zd=((e,t)=>e?setImmediate:t?((n,r)=>(or.addEventListener("message",({source:i,data:o})=>{i===or&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),or.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",St(or.postMessage)),TO=typeof queueMicrotask<"u"?queueMicrotask.bind(or):typeof process<"u"&&process.nextTick||Zd,b={isArray:$r,isArrayBuffer:$d,isBuffer:$b,isFormData:Xb,isArrayBufferView:Bb,isString:Gb,isNumber:Bd,isBoolean:zb,isObject:fo,isPlainObject:_i,isReadableStream:tO,isRequest:nO,isResponse:rO,isHeaders:sO,isUndefined:Ns,isDate:qb,isFile:Kb,isBlob:Zb,isRegExp:_O,isFunction:St,isStream:Qb,isURLSearchParams:eO,isTypedArray:dO,isFileList:Jb,forEach:Us,merge:xa,extend:oO,trim:iO,stripBOM:aO,inherits:lO,toFlatObject:uO,kindOf:uo,kindOfTest:Vt,endsWith:cO,toArray:fO,forEachEntry:hO,matchAll:mO,isHTMLForm:pO,hasOwnProperty:dc,hasOwnProp:dc,reduceDescriptors:qd,freezeMethods:gO,toObjectSet:wO,toCamelCase:yO,noop:vO,toFiniteNumber:SO,findKey:Gd,global:or,isContextDefined:zd,ALPHABET:Kd,generateString:bO,isSpecCompliantForm:OO,toJSONObject:kO,isAsyncFn:MO,isThenable:DO,setImmediate:Zd,asap:TO};function le(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}b.inherits(le,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:b.toJSONObject(this.config),code:this.code,status:this.status}}});const Jd=le.prototype,Qd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Qd[e]={value:e}});Object.defineProperties(le,Qd);Object.defineProperty(Jd,"isAxiosError",{value:!0});le.from=(e,t,n,r,i,o)=>{const l=Object.create(Jd);return b.toFlatObject(e,l,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),le.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};const xO=null;function Ca(e){return b.isPlainObject(e)||b.isArray(e)}function Xd(e){return b.endsWith(e,"[]")?e.slice(0,-2):e}function mc(e,t,n){return e?e.concat(t).map(function(i,o){return i=Xd(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function CO(e){return b.isArray(e)&&!e.some(Ca)}const YO=b.toFlatObject(b,{},null,function(t){return/^is[A-Z]/.test(t)});function ho(e,t,n){if(!b.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=b.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(F,D){return!b.isUndefined(D[F])});const r=n.metaTokens,i=n.visitor||m,o=n.dots,l=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&b.isSpecCompliantForm(t);if(!b.isFunction(i))throw new TypeError("visitor must be a function");function p(T){if(T===null)return"";if(b.isDate(T))return T.toISOString();if(!d&&b.isBlob(T))throw new le("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(T)||b.isTypedArray(T)?d&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function m(T,F,D){let H=T;if(T&&!D&&typeof T=="object"){if(b.endsWith(F,"{}"))F=r?F:F.slice(0,-2),T=JSON.stringify(T);else if(b.isArray(T)&&CO(T)||(b.isFileList(T)||b.endsWith(F,"[]"))&&(H=b.toArray(T)))return F=Xd(F),H.forEach(function(O,x){!(b.isUndefined(O)||O===null)&&t.append(l===!0?mc([F],x,o):l===null?F:F+"[]",p(O))}),!1}return Ca(T)?!0:(t.append(mc(D,F,o),p(T)),!1)}const y=[],v=Object.assign(YO,{defaultVisitor:m,convertValue:p,isVisitable:Ca});function M(T,F){if(!b.isUndefined(T)){if(y.indexOf(T)!==-1)throw Error("Circular reference detected in "+F.join("."));y.push(T),b.forEach(T,function(H,I){(!(b.isUndefined(H)||H===null)&&i.call(t,H,b.isString(I)?I.trim():I,F,v))===!0&&M(H,F?F.concat(I):[I])}),y.pop()}}if(!b.isObject(e))throw new TypeError("data must be an object");return M(e),t}function pc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xl(e,t){this._pairs=[],e&&ho(e,this,t)}const eh=xl.prototype;eh.append=function(t,n){this._pairs.push([t,n])};eh.toString=function(t){const n=t?function(r){return t.call(this,r,pc)}:pc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function NO(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function th(e,t,n){if(!t)return e;const r=n&&n.encode||NO;b.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=b.isURLSearchParams(t)?t.toString():new xl(t,n).toString(r),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class EO{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){b.forEach(this.handlers,function(r){r!==null&&t(r)})}}const yc=EO,nh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RO=typeof URLSearchParams<"u"?URLSearchParams:xl,PO=typeof FormData<"u"?FormData:null,AO=typeof Blob<"u"?Blob:null,FO={isBrowser:!0,classes:{URLSearchParams:RO,FormData:PO,Blob:AO},protocols:["http","https","file","blob","url","data"]},Cl=typeof window<"u"&&typeof document<"u",Ya=typeof navigator=="object"&&navigator||void 0,LO=Cl&&(!Ya||["ReactNative","NativeScript","NS"].indexOf(Ya.product)<0),IO=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),WO=Cl&&window.location.href||"http://localhost",jO=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cl,hasStandardBrowserEnv:LO,hasStandardBrowserWebWorkerEnv:IO,navigator:Ya,origin:WO},Symbol.toStringTag,{value:"Module"})),rt={...jO,...FO};function UO(e,t){return ho(e,new rt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return rt.isNode&&b.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function HO(e){return b.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function VO(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return l=!l&&b.isArray(i)?i.length:l,d?(b.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!c):((!i[l]||!b.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&b.isArray(i[l])&&(i[l]=VO(i[l])),!c)}if(b.isFormData(e)&&b.isFunction(e.entries)){const n={};return b.forEachEntry(e,(r,i)=>{t(HO(r),i,n,0)}),n}return null}function $O(e,t,n){if(b.isString(e))try{return(t||JSON.parse)(e),b.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Yl={transitional:nh,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=b.isObject(t);if(o&&b.isHTMLForm(t)&&(t=new FormData(t)),b.isFormData(t))return i?JSON.stringify(rh(t)):t;if(b.isArrayBuffer(t)||b.isBuffer(t)||b.isStream(t)||b.isFile(t)||b.isBlob(t)||b.isReadableStream(t))return t;if(b.isArrayBufferView(t))return t.buffer;if(b.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return UO(t,this.formSerializer).toString();if((c=b.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ho(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),$O(t)):t}],transformResponse:[function(t){const n=this.transitional||Yl.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(b.isResponse(t)||b.isReadableStream(t))return t;if(t&&b.isString(t)&&(r&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(c){if(l)throw c.name==="SyntaxError"?le.from(c,le.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],e=>{Yl.headers[e]={}});const Nl=Yl,BO=b.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),GO=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&BO[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_c=Symbol("internals");function cs(e){return e&&String(e).trim().toLowerCase()}function gi(e){return e===!1||e==null?e:b.isArray(e)?e.map(gi):String(e)}function zO(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const qO=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function na(e,t,n,r,i){if(b.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!b.isString(t)){if(b.isString(r))return t.indexOf(r)!==-1;if(b.isRegExp(r))return r.test(t)}}function KO(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ZO(e,t){const n=b.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,l){return this[r].call(this,t,i,o,l)},configurable:!0})})}class mo{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(c,d,p){const m=cs(d);if(!m)throw new Error("header name must be a non-empty string");const y=b.findKey(i,m);(!y||i[y]===void 0||p===!0||p===void 0&&i[y]!==!1)&&(i[y||d]=gi(c))}const l=(c,d)=>b.forEach(c,(p,m)=>o(p,m,d));if(b.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(b.isString(t)&&(t=t.trim())&&!qO(t))l(GO(t),n);else if(b.isHeaders(t))for(const[c,d]of t.entries())o(d,c,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=cs(t),t){const r=b.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return zO(i);if(b.isFunction(n))return n.call(this,i,r);if(b.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=cs(t),t){const r=b.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||na(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(l){if(l=cs(l),l){const c=b.findKey(r,l);c&&(!n||na(r,r[c],c,n))&&(delete r[c],i=!0)}}return b.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||na(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return b.forEach(this,(i,o)=>{const l=b.findKey(r,o);if(l){n[l]=gi(i),delete n[o];return}const c=t?KO(o):String(o).trim();c!==o&&delete n[o],n[c]=gi(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return b.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&b.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[_c]=this[_c]={accessors:{}}).accessors,i=this.prototype;function o(l){const c=cs(l);r[c]||(ZO(i,l),r[c]=!0)}return b.isArray(t)?t.forEach(o):o(t),this}}mo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(mo.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});b.freezeMethods(mo);const Lt=mo;function ra(e,t){const n=this||Nl,r=t||n,i=Lt.from(r.headers);let o=r.data;return b.forEach(e,function(c){o=c.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function sh(e){return!!(e&&e.__CANCEL__)}function Br(e,t,n){le.call(this,e??"canceled",le.ERR_CANCELED,t,n),this.name="CanceledError"}b.inherits(Br,le,{__CANCEL__:!0});function ih(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new le("Request failed with status code "+n.status,[le.ERR_BAD_REQUEST,le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function JO(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function QO(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,l;return t=t!==void 0?t:1e3,function(d){const p=Date.now(),m=r[o];l||(l=p),n[i]=d,r[i]=p;let y=o,v=0;for(;y!==i;)v+=n[y++],y=y%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),p-l{n=m,i=null,o&&(clearTimeout(o),o=null),e.apply(null,p)};return[(...p)=>{const m=Date.now(),y=m-n;y>=r?l(p,m):(i=p,o||(o=setTimeout(()=>{o=null,l(i)},r-y)))},()=>i&&l(i)]}const Pi=(e,t,n=3)=>{let r=0;const i=QO(50,250);return XO(o=>{const l=o.loaded,c=o.lengthComputable?o.total:void 0,d=l-r,p=i(d),m=l<=c;r=l;const y={loaded:l,total:c,progress:c?l/c:void 0,bytes:d,rate:p||void 0,estimated:p&&c&&m?(c-l)/p:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(y)},n)},gc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},wc=e=>(...t)=>b.asap(()=>e(...t)),ek=rt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rt.origin),rt.navigator&&/(msie|trident)/i.test(rt.navigator.userAgent)):()=>!0,tk=rt.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const l=[e+"="+encodeURIComponent(t)];b.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),b.isString(r)&&l.push("path="+r),b.isString(i)&&l.push("domain="+i),o===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rk(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function oh(e,t){return e&&!nk(t)?rk(e,t):t}const vc=e=>e instanceof Lt?{...e}:e;function cr(e,t){t=t||{};const n={};function r(p,m,y,v){return b.isPlainObject(p)&&b.isPlainObject(m)?b.merge.call({caseless:v},p,m):b.isPlainObject(m)?b.merge({},m):b.isArray(m)?m.slice():m}function i(p,m,y,v){if(b.isUndefined(m)){if(!b.isUndefined(p))return r(void 0,p,y,v)}else return r(p,m,y,v)}function o(p,m){if(!b.isUndefined(m))return r(void 0,m)}function l(p,m){if(b.isUndefined(m)){if(!b.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p,m,y){if(y in t)return r(p,m);if(y in e)return r(void 0,p)}const d={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(p,m,y)=>i(vc(p),vc(m),y,!0)};return b.forEach(Object.keys(Object.assign({},e,t)),function(m){const y=d[m]||i,v=y(e[m],t[m],m);b.isUndefined(v)&&y!==c||(n[m]=v)}),n}const ah=e=>{const t=cr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:l,auth:c}=t;t.headers=l=Lt.from(l),t.url=th(oh(t.baseURL,t.url),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(b.isFormData(n)){if(rt.hasStandardBrowserEnv||rt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((d=l.getContentType())!==!1){const[p,...m]=d?d.split(";").map(y=>y.trim()).filter(Boolean):[];l.setContentType([p||"multipart/form-data",...m].join("; "))}}if(rt.hasStandardBrowserEnv&&(r&&b.isFunction(r)&&(r=r(t)),r||r!==!1&&ek(t.url))){const p=i&&o&&tk.read(o);p&&l.set(i,p)}return t},sk=typeof XMLHttpRequest<"u",ik=sk&&function(e){return new Promise(function(n,r){const i=ah(e);let o=i.data;const l=Lt.from(i.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:p}=i,m,y,v,M,T;function F(){M&&M(),T&&T(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let D=new XMLHttpRequest;D.open(i.method.toUpperCase(),i.url,!0),D.timeout=i.timeout;function H(){if(!D)return;const O=Lt.from("getAllResponseHeaders"in D&&D.getAllResponseHeaders()),j={data:!c||c==="text"||c==="json"?D.responseText:D.response,status:D.status,statusText:D.statusText,headers:O,config:e,request:D};ih(function(re){n(re),F()},function(re){r(re),F()},j),D=null}"onloadend"in D?D.onloadend=H:D.onreadystatechange=function(){!D||D.readyState!==4||D.status===0&&!(D.responseURL&&D.responseURL.indexOf("file:")===0)||setTimeout(H)},D.onabort=function(){D&&(r(new le("Request aborted",le.ECONNABORTED,e,D)),D=null)},D.onerror=function(){r(new le("Network Error",le.ERR_NETWORK,e,D)),D=null},D.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const j=i.transitional||nh;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new le(x,j.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,e,D)),D=null},o===void 0&&l.setContentType(null),"setRequestHeader"in D&&b.forEach(l.toJSON(),function(x,j){D.setRequestHeader(j,x)}),b.isUndefined(i.withCredentials)||(D.withCredentials=!!i.withCredentials),c&&c!=="json"&&(D.responseType=i.responseType),p&&([v,T]=Pi(p,!0),D.addEventListener("progress",v)),d&&D.upload&&([y,M]=Pi(d),D.upload.addEventListener("progress",y),D.upload.addEventListener("loadend",M)),(i.cancelToken||i.signal)&&(m=O=>{D&&(r(!O||O.type?new Br(null,e,D):O),D.abort(),D=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const I=JO(i.url);if(I&&rt.protocols.indexOf(I)===-1){r(new le("Unsupported protocol "+I+":",le.ERR_BAD_REQUEST,e));return}D.send(o||null)})},ok=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(p){if(!i){i=!0,c();const m=p instanceof Error?p:this.reason;r.abort(m instanceof le?m:new Br(m instanceof Error?m.message:m))}};let l=t&&setTimeout(()=>{l=null,o(new le(`timeout ${t} of ms exceeded`,le.ETIMEDOUT))},t);const c=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(o):p.removeEventListener("abort",o)}),e=null)};e.forEach(p=>p.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>b.asap(c),d}},ak=ok,lk=function*(e,t){let n=e.byteLength;if(!t||n{const i=uk(e,t);let o=0,l,c=d=>{l||(l=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:p,value:m}=await i.next();if(p){c(),d.close();return}let y=m.byteLength;if(n){let v=o+=y;n(v)}d.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}},cancel(d){return c(d),i.return()}},{highWaterMark:2})},po=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",lh=po&&typeof ReadableStream=="function",fk=po&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),uh=(e,...t)=>{try{return!!e(...t)}catch{return!1}},dk=lh&&uh(()=>{let e=!1;const t=new Request(rt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),bc=64*1024,Na=lh&&uh(()=>b.isReadableStream(new Response("").body)),Ai={stream:Na&&(e=>e.body)};po&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ai[t]&&(Ai[t]=b.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new le(`Response type '${t}' is not supported`,le.ERR_NOT_SUPPORT,r)})})})(new Response);const hk=async e=>{if(e==null)return 0;if(b.isBlob(e))return e.size;if(b.isSpecCompliantForm(e))return(await new Request(rt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(b.isArrayBufferView(e)||b.isArrayBuffer(e))return e.byteLength;if(b.isURLSearchParams(e)&&(e=e+""),b.isString(e))return(await fk(e)).byteLength},mk=async(e,t)=>{const n=b.toFiniteNumber(e.getContentLength());return n??hk(t)},pk=po&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:l,onDownloadProgress:c,onUploadProgress:d,responseType:p,headers:m,withCredentials:y="same-origin",fetchOptions:v}=ah(e);p=p?(p+"").toLowerCase():"text";let M=ak([i,o&&o.toAbortSignal()],l),T;const F=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let D;try{if(d&&dk&&n!=="get"&&n!=="head"&&(D=await mk(m,r))!==0){let j=new Request(t,{method:"POST",body:r,duplex:"half"}),K;if(b.isFormData(r)&&(K=j.headers.get("content-type"))&&m.setContentType(K),j.body){const[re,se]=gc(D,Pi(wc(d)));r=Sc(j.body,bc,re,se)}}b.isString(y)||(y=y?"include":"omit");const H="credentials"in Request.prototype;T=new Request(t,{...v,signal:M,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:r,duplex:"half",credentials:H?y:void 0});let I=await fetch(T);const O=Na&&(p==="stream"||p==="response");if(Na&&(c||O&&F)){const j={};["status","statusText","headers"].forEach(Q=>{j[Q]=I[Q]});const K=b.toFiniteNumber(I.headers.get("content-length")),[re,se]=c&&gc(K,Pi(wc(c),!0))||[];I=new Response(Sc(I.body,bc,re,()=>{se&&se(),F&&F()}),j)}p=p||"text";let x=await Ai[b.findKey(Ai,p)||"text"](I,e);return!O&&F&&F(),await new Promise((j,K)=>{ih(j,K,{data:x,headers:Lt.from(I.headers),status:I.status,statusText:I.statusText,config:e,request:T})})}catch(H){throw F&&F(),H&&H.name==="TypeError"&&/fetch/i.test(H.message)?Object.assign(new le("Network Error",le.ERR_NETWORK,e,T),{cause:H.cause||H}):le.from(H,H&&H.code,e,T)}}),Ea={http:xO,xhr:ik,fetch:pk};b.forEach(Ea,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Oc=e=>`- ${e}`,yk=e=>b.isFunction(e)||e===null||e===!1,ch={getAdapter:e=>{e=b.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=t?o.length>1?`since : -`+o.map(Oc).join(` -`):" "+Oc(o[0]):"as no adapter specified";throw new le("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:Ea};function sa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Br(null,e)}function kc(e){return sa(e),e.headers=Lt.from(e.headers),e.data=ra.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ch.getAdapter(e.adapter||Nl.adapter)(e).then(function(r){return sa(e),r.data=ra.call(e,e.transformResponse,r),r.headers=Lt.from(r.headers),r},function(r){return sh(r)||(sa(e),r&&r.response&&(r.response.data=ra.call(e,e.transformResponse,r.response),r.response.headers=Lt.from(r.response.headers))),Promise.reject(r)})}const fh="1.7.9",yo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Mc={};yo.transitional=function(t,n,r){function i(o,l){return"[Axios v"+fh+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,c)=>{if(t===!1)throw new le(i(l," has been removed"+(n?" in "+n:"")),le.ERR_DEPRECATED);return n&&!Mc[l]&&(Mc[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,c):!0}};yo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function _k(e,t,n){if(typeof e!="object")throw new le("options must be an object",le.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],l=t[o];if(l){const c=e[o],d=c===void 0||l(c,o,e);if(d!==!0)throw new le("option "+o+" must be "+d,le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new le("Unknown option "+o,le.ERR_BAD_OPTION)}}const wi={assertOptions:_k,validators:yo},zt=wi.validators;class Fi{constructor(t){this.defaults=t,this.interceptors={request:new yc,response:new yc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&wi.assertOptions(r,{silentJSONParsing:zt.transitional(zt.boolean),forcedJSONParsing:zt.transitional(zt.boolean),clarifyTimeoutError:zt.transitional(zt.boolean)},!1),i!=null&&(b.isFunction(i)?n.paramsSerializer={serialize:i}:wi.assertOptions(i,{encode:zt.function,serialize:zt.function},!0)),wi.assertOptions(n,{baseUrl:zt.spelling("baseURL"),withXsrfToken:zt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],T=>{delete o[T]}),n.headers=Lt.concat(l,o);const c=[];let d=!0;this.interceptors.request.forEach(function(F){typeof F.runWhen=="function"&&F.runWhen(n)===!1||(d=d&&F.synchronous,c.unshift(F.fulfilled,F.rejected))});const p=[];this.interceptors.response.forEach(function(F){p.push(F.fulfilled,F.rejected)});let m,y=0,v;if(!d){const T=[kc.bind(this),void 0];for(T.unshift.apply(T,c),T.push.apply(T,p),v=T.length,m=Promise.resolve(n);y{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const l=new Promise(c=>{r.subscribe(c),o=c}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,c){r.reason||(r.reason=new Br(o,l,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new El(function(i){t=i}),cancel:t}}}const gk=El;function wk(e){return function(n){return e.apply(null,n)}}function vk(e){return b.isObject(e)&&e.isAxiosError===!0}const Ra={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ra).forEach(([e,t])=>{Ra[t]=e});const Sk=Ra;function dh(e){const t=new vi(e),n=Vd(vi.prototype.request,t);return b.extend(n,vi.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return dh(cr(e,i))},n}const Be=dh(Nl);Be.Axios=vi;Be.CanceledError=Br;Be.CancelToken=gk;Be.isCancel=sh;Be.VERSION=fh;Be.toFormData=ho;Be.AxiosError=le;Be.Cancel=Be.CanceledError;Be.all=function(t){return Promise.all(t)};Be.spread=wk;Be.isAxiosError=vk;Be.mergeConfig=cr;Be.AxiosHeaders=Lt;Be.formToJSON=e=>rh(b.isHTMLForm(e)?new FormData(e):e);Be.getAdapter=ch.getAdapter;Be.HttpStatusCode=Sk;Be.default=Be;const m1=Be;function bk(){return hh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function hh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Ok=typeof Proxy=="function",kk="devtools-plugin:setup",Mk="plugin:settings:set";let kr,Pa;function Dk(){var e;return kr!==void 0||(typeof window<"u"&&window.performance?(kr=!0,Pa=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(kr=!0,Pa=globalThis.perf_hooks.performance):kr=!1),kr}function Tk(){return Dk()?Pa.now():Date.now()}class xk{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const l in t.settings){const c=t.settings[l];r[l]=c.defaultValue}const i=`__vue-devtools-plugin-settings__${t.id}`;let o=Object.assign({},r);try{const l=localStorage.getItem(i),c=JSON.parse(l);Object.assign(o,c)}catch{}this.fallbacks={getSettings(){return o},setSettings(l){try{localStorage.setItem(i,JSON.stringify(l))}catch{}o=l},now(){return Tk()}},n&&n.on(Mk,(l,c)=>{l===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(l,c)=>this.target?this.target.on[c]:(...d)=>{this.onQueue.push({method:c,args:d})}}),this.proxiedTarget=new Proxy({},{get:(l,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...d)=>(this.targetQueue.push({method:c,args:d,resolve:()=>{}}),this.fallbacks[c](...d)):(...d)=>new Promise(p=>{this.targetQueue.push({method:c,args:d,resolve:p})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Ck(e,t){const n=e,r=hh(),i=bk(),o=Ok&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!o))i.emit(kk,e,t);else{const l=o?new xk(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:l}),l&&t(l.proxiedTarget)}}/*! +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Fu={};function hf(e,t){W.deprecationHandler!=null&&W.deprecationHandler(e,t),Fu[e]||(df(t),Fu[e]=!0)}W.suppressDeprecationWarnings=!1;W.deprecationHandler=null;function Gt(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function s0(e){var t,n;for(n in e)ke(e,n)&&(t=e[n],Gt(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function eo(e,t){var n=Cn({},e),r;for(r in t)ke(t,r)&&(tr(e[r])&&tr(t[r])?(n[r]={},Cn(n[r],e[r]),Cn(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)ke(e,r)&&!ke(t,r)&&tr(e[r])&&(n[r]=Cn({},n[r]));return n}function jo(e){e!=null&&this.set(e)}var to;Object.keys?to=Object.keys:to=function(e){var t,n=[];for(t in e)ke(e,t)&&n.push(t);return n};var i0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function a0(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Gt(r)?r.call(t,n):r}function $t(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Uo=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Zs=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Na={},Mr={};function Z(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Mr[e]=i),t&&(Mr[t[0]]=function(){return $t(i.apply(this,arguments),t[1],t[2])}),n&&(Mr[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function o0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function l0(e){var t=e.match(Uo),n,r;for(n=0,r=t.length;n=0&&Zs.test(e);)e=e.replace(Zs,r),Zs.lastIndex=0,n-=1;return e}var u0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function c0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Uo).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var f0="Invalid date";function d0(){return this._invalidDate}var h0="%d",m0=/\d{1,2}/;function p0(e){return this._ordinal.replace("%d",e)}var y0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function _0(e,t,n,r){var i=this._relativeTime[n];return Gt(i)?i(e,t,n,r):i.replace(/%d/i,e)}function g0(e,t){var n=this._relativeTime[e>0?"future":"past"];return Gt(n)?n(t):n.replace(/%s/i,t)}var Lu={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function St(e){return typeof e=="string"?Lu[e]||Lu[e.toLowerCase()]:void 0}function Ho(e){var t={},n,r;for(r in e)ke(e,r)&&(n=St(r),n&&(t[n]=e[r]));return t}var w0={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function v0(e){var t=[],n;for(n in e)ke(e,n)&&t.push({unit:n,priority:w0[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var pf=/\d/,ft=/\d\d/,yf=/\d{3}/,Vo=/\d{4}/,ji=/[+-]?\d{6}/,Fe=/\d\d?/,_f=/\d\d\d\d?/,gf=/\d\d\d\d\d\d?/,Ui=/\d{1,3}/,$o=/\d{1,4}/,Hi=/[+-]?\d{1,6}/,Ar=/\d+/,Vi=/[+-]?\d+/,b0=/Z|[+-]\d\d:?\d\d/gi,$i=/Z|[+-]\d\d(?::?\d\d)?/gi,S0=/[+-]?\d+(\.\d{1,3})?/,Ds=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Fr=/^[1-9]\d?/,Bo=/^([1-9]\d|\d)/,yi;yi={};function $(e,t,n){yi[e]=Gt(t)?t:function(r,i){return r&&n?n:t}}function k0(e,t){return ke(yi,e)?yi[e](t._strict,t._locale):new RegExp(O0(e))}function O0(e){return fn(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,o){return n||r||i||o}))}function fn(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _t(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function he(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=_t(t)),n}var no={};function xe(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),pn(t)&&(r=function(o,l){l[t]=he(o)}),i=e.length,n=0;n68?1900:2e3)};var wf=Lr("FullYear",!0);function x0(){return Bi(this.year())}function Lr(e,t){return function(n){return n!=null?(vf(this,e,n),W.updateOffset(this,t),this):ys(this,e)}}function ys(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function vf(e,t,n){var r,i,o,l,f;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,l=e.month(),f=e.date(),f=f===29&&l===1&&!Bi(o)?28:f,i?r.setUTCFullYear(o,l,f):r.setFullYear(o,l,f)}}function C0(e){return e=St(e),Gt(this[e])?this[e]():this}function Y0(e,t){if(typeof e=="object"){e=Ho(e);var n=v0(e),r,i=n.length;for(r=0;r=0?(f=new Date(e+400,t,n,r,i,o,l),isFinite(f.getFullYear())&&f.setFullYear(e)):f=new Date(e,t,n,r,i,o,l),f}function _s(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function _i(e,t,n){var r=7+t-n,i=(7+_s(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Df(e,t,n,r,i){var o=(7+n-r)%7,l=_i(e,r,i),f=1+7*(t-1)+o+l,h,m;return f<=0?(h=e-1,m=os(h)+f):f>os(e)?(h=e+1,m=f-os(e)):(h=e,m=f),{year:h,dayOfYear:m}}function gs(e,t,n){var r=_i(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,o,l;return i<1?(l=e.year()-1,o=i+dn(l,t,n)):i>dn(e.year(),t,n)?(o=i-dn(e.year(),t,n),l=e.year()+1):(l=e.year(),o=i),{week:o,year:l}}function dn(e,t,n){var r=_i(e,t,n),i=_i(e+1,t,n);return(os(e)-r+i)/7}Z("w",["ww",2],"wo","week");Z("W",["WW",2],"Wo","isoWeek");$("w",Fe,Fr);$("ww",Fe,ft);$("W",Fe,Fr);$("WW",Fe,ft);Ts(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=he(e)});function V0(e){return gs(e,this._week.dow,this._week.doy).week}var $0={dow:0,doy:6};function B0(){return this._week.dow}function G0(){return this._week.doy}function z0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function q0(e){var t=gs(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Z("d",0,"do","day");Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Z("e",0,0,"weekday");Z("E",0,0,"isoWeekday");$("d",Fe);$("e",Fe);$("E",Fe);$("dd",function(e,t){return t.weekdaysMinRegex(e)});$("ddd",function(e,t){return t.weekdaysShortRegex(e)});$("dddd",function(e,t){return t.weekdaysRegex(e)});Ts(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ie(n).invalidWeekday=e});Ts(["d","e","E"],function(e,t,n,r){t[r]=he(e)});function K0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Z0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function zo(e,t){return e.slice(t,7).concat(e.slice(0,t))}var J0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Tf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Q0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),X0=Ds,ew=Ds,tw=Ds;function nw(e,t){var n=Et(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?zo(n,this._week.dow):e?n[e.day()]:n}function rw(e){return e===!0?zo(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function sw(e){return e===!0?zo(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function iw(e,t,n){var r,i,o,l=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Bt([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(i=Ue.call(this._weekdaysParse,l),i!==-1?i:null):t==="ddd"?(i=Ue.call(this._shortWeekdaysParse,l),i!==-1?i:null):(i=Ue.call(this._minWeekdaysParse,l),i!==-1?i:null):t==="dddd"?(i=Ue.call(this._weekdaysParse,l),i!==-1||(i=Ue.call(this._shortWeekdaysParse,l),i!==-1)?i:(i=Ue.call(this._minWeekdaysParse,l),i!==-1?i:null)):t==="ddd"?(i=Ue.call(this._shortWeekdaysParse,l),i!==-1||(i=Ue.call(this._weekdaysParse,l),i!==-1)?i:(i=Ue.call(this._minWeekdaysParse,l),i!==-1?i:null)):(i=Ue.call(this._minWeekdaysParse,l),i!==-1||(i=Ue.call(this._weekdaysParse,l),i!==-1)?i:(i=Ue.call(this._shortWeekdaysParse,l),i!==-1?i:null))}function aw(e,t,n){var r,i,o;if(this._weekdaysParseExact)return iw.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Bt([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function ow(e){if(!this.isValid())return e!=null?this:NaN;var t=ys(this,"Day");return e!=null?(e=K0(e,this.localeData()),this.add(e-t,"d")):t}function lw(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function uw(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Z0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function cw(e){return this._weekdaysParseExact?(ke(this,"_weekdaysRegex")||qo.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ke(this,"_weekdaysRegex")||(this._weekdaysRegex=X0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function fw(e){return this._weekdaysParseExact?(ke(this,"_weekdaysRegex")||qo.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ke(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ew),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function dw(e){return this._weekdaysParseExact?(ke(this,"_weekdaysRegex")||qo.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ke(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tw),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qo(){function e(p,w){return w.length-p.length}var t=[],n=[],r=[],i=[],o,l,f,h,m;for(o=0;o<7;o++)l=Bt([2e3,1]).day(o),f=fn(this.weekdaysMin(l,"")),h=fn(this.weekdaysShort(l,"")),m=fn(this.weekdays(l,"")),t.push(f),n.push(h),r.push(m),i.push(f),i.push(h),i.push(m);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ko(){return this.hours()%12||12}function hw(){return this.hours()||24}Z("H",["HH",2],0,"hour");Z("h",["hh",2],0,Ko);Z("k",["kk",2],0,hw);Z("hmm",0,0,function(){return""+Ko.apply(this)+$t(this.minutes(),2)});Z("hmmss",0,0,function(){return""+Ko.apply(this)+$t(this.minutes(),2)+$t(this.seconds(),2)});Z("Hmm",0,0,function(){return""+this.hours()+$t(this.minutes(),2)});Z("Hmmss",0,0,function(){return""+this.hours()+$t(this.minutes(),2)+$t(this.seconds(),2)});function xf(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}xf("a",!0);xf("A",!1);function Cf(e,t){return t._meridiemParse}$("a",Cf);$("A",Cf);$("H",Fe,Bo);$("h",Fe,Fr);$("k",Fe,Fr);$("HH",Fe,ft);$("hh",Fe,ft);$("kk",Fe,ft);$("hmm",_f);$("hmmss",gf);$("Hmm",_f);$("Hmmss",gf);xe(["H","HH"],Be);xe(["k","kk"],function(e,t,n){var r=he(e);t[Be]=r===24?0:r});xe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});xe(["h","hh"],function(e,t,n){t[Be]=he(e),ie(n).bigHour=!0});xe("hmm",function(e,t,n){var r=e.length-2;t[Be]=he(e.substr(0,r)),t[Yt]=he(e.substr(r)),ie(n).bigHour=!0});xe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Be]=he(e.substr(0,r)),t[Yt]=he(e.substr(r,2)),t[cn]=he(e.substr(i)),ie(n).bigHour=!0});xe("Hmm",function(e,t,n){var r=e.length-2;t[Be]=he(e.substr(0,r)),t[Yt]=he(e.substr(r))});xe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Be]=he(e.substr(0,r)),t[Yt]=he(e.substr(r,2)),t[cn]=he(e.substr(i))});function mw(e){return(e+"").toLowerCase().charAt(0)==="p"}var pw=/[ap]\.?m?\.?/i,yw=Lr("Hours",!0);function _w(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Yf={calendar:i0,longDateFormat:u0,invalidDate:f0,ordinal:h0,dayOfMonthOrdinalParse:m0,relativeTime:y0,months:E0,monthsShort:bf,week:$0,weekdays:J0,weekdaysMin:Q0,weekdaysShort:Tf,meridiemParse:pw},Ie={},es={},ws;function gw(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Gi(o.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&gw(o,r)>=n-1)break;n--}t++}return ws}function vw(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Gi(e){var t=null,n;if(Ie[e]===void 0&&typeof module<"u"&&module&&module.exports&&vw(e))try{t=ws._abbr,n=require,n("./locale/"+e),Pn(t)}catch{Ie[e]=null}return Ie[e]}function Pn(e,t){var n;return e&&(ot(t)?n=_n(e):n=Zo(e,t),n?ws=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ws._abbr}function Zo(e,t){if(t!==null){var n,r=Yf;if(t.abbr=e,Ie[e]!=null)hf("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Ie[e]._config;else if(t.parentLocale!=null)if(Ie[t.parentLocale]!=null)r=Ie[t.parentLocale]._config;else if(n=Gi(t.parentLocale),n!=null)r=n._config;else return es[t.parentLocale]||(es[t.parentLocale]=[]),es[t.parentLocale].push({name:e,config:t}),null;return Ie[e]=new jo(eo(r,t)),es[e]&&es[e].forEach(function(i){Zo(i.name,i.config)}),Pn(e),Ie[e]}else return delete Ie[e],null}function bw(e,t){if(t!=null){var n,r,i=Yf;Ie[e]!=null&&Ie[e].parentLocale!=null?Ie[e].set(eo(Ie[e]._config,t)):(r=Gi(e),r!=null&&(i=r._config),t=eo(i,t),r==null&&(t.abbr=e),n=new jo(t),n.parentLocale=Ie[e],Ie[e]=n),Pn(e)}else Ie[e]!=null&&(Ie[e].parentLocale!=null?(Ie[e]=Ie[e].parentLocale,e===Pn()&&Pn(e)):Ie[e]!=null&&delete Ie[e]);return Ie[e]}function _n(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ws;if(!Et(e)){if(t=Gi(e),t)return t;e=[e]}return ww(e)}function Sw(){return to(Ie)}function Jo(e){var t,n=e._a;return n&&ie(e).overflow===-2&&(t=n[un]<0||n[un]>11?un:n[Ut]<1||n[Ut]>Go(n[nt],n[un])?Ut:n[Be]<0||n[Be]>24||n[Be]===24&&(n[Yt]!==0||n[cn]!==0||n[Qn]!==0)?Be:n[Yt]<0||n[Yt]>59?Yt:n[cn]<0||n[cn]>59?cn:n[Qn]<0||n[Qn]>999?Qn:-1,ie(e)._overflowDayOfYear&&(tUt)&&(t=Ut),ie(e)._overflowWeeks&&t===-1&&(t=D0),ie(e)._overflowWeekday&&t===-1&&(t=T0),ie(e).overflow=t),e}var kw=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ow=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mw=/Z|[+-]\d\d(?::?\d\d)?/,Js=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ea=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Dw=/^\/?Date\((-?\d+)/i,Tw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,xw={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Nf(e){var t,n,r=e._i,i=kw.exec(r)||Ow.exec(r),o,l,f,h,m=Js.length,p=Ea.length;if(i){for(ie(e).iso=!0,t=0,n=m;tos(l)||e._dayOfYear===0)&&(ie(e)._overflowDayOfYear=!0),n=_s(l,0,e._dayOfYear),e._a[un]=n.getUTCMonth(),e._a[Ut]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Be]===24&&e._a[Yt]===0&&e._a[cn]===0&&e._a[Qn]===0&&(e._nextDay=!0,e._a[Be]=0),e._d=(e._useUTC?_s:H0).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Be]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(ie(e).weekdayMismatch=!0)}}function Fw(e){var t,n,r,i,o,l,f,h,m;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,l=4,n=gr(t.GG,e._a[nt],gs(Ae(),1,4).year),r=gr(t.W,1),i=gr(t.E,1),(i<1||i>7)&&(h=!0)):(o=e._locale._week.dow,l=e._locale._week.doy,m=gs(Ae(),o,l),n=gr(t.gg,e._a[nt],m.year),r=gr(t.w,m.week),t.d!=null?(i=t.d,(i<0||i>6)&&(h=!0)):t.e!=null?(i=t.e+o,(t.e<0||t.e>6)&&(h=!0)):i=o),r<1||r>dn(n,o,l)?ie(e)._overflowWeeks=!0:h!=null?ie(e)._overflowWeekday=!0:(f=Df(n,r,i,o,l),e._a[nt]=f.year,e._dayOfYear=f.dayOfYear)}W.ISO_8601=function(){};W.RFC_2822=function(){};function Xo(e){if(e._f===W.ISO_8601){Nf(e);return}if(e._f===W.RFC_2822){Ef(e);return}e._a=[],ie(e).empty=!0;var t=""+e._i,n,r,i,o,l,f=t.length,h=0,m,p;for(i=mf(e._f,e._locale).match(Uo)||[],p=i.length,n=0;n0&&ie(e).unusedInput.push(l),t=t.slice(t.indexOf(r)+r.length),h+=r.length),Mr[o]?(r?ie(e).empty=!1:ie(e).unusedTokens.push(o),M0(o,r,e)):e._strict&&!r&&ie(e).unusedTokens.push(o);ie(e).charsLeftOver=f-h,t.length>0&&ie(e).unusedInput.push(t),e._a[Be]<=12&&ie(e).bigHour===!0&&e._a[Be]>0&&(ie(e).bigHour=void 0),ie(e).parsedDateParts=e._a.slice(0),ie(e).meridiem=e._meridiem,e._a[Be]=Lw(e._locale,e._a[Be],e._meridiem),m=ie(e).era,m!==null&&(e._a[nt]=e._locale.erasConvertYear(m,e._a[nt])),Qo(e),Jo(e)}function Lw(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Iw(e){var t,n,r,i,o,l,f=!1,h=e._f.length;if(h===0){ie(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Wi()});function Af(e,t){var n,r;if(t.length===1&&Et(t[0])&&(t=t[0]),!t.length)return Ae();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function iv(){if(!ot(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Wo(e,this),e=Pf(e),e._a?(t=e._isUTC?Bt(e._a):Ae(e._a),this._isDSTShifted=this.isValid()&&Zw(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function av(){return this.isValid()?!this._isUTC:!1}function ov(){return this.isValid()?this._isUTC:!1}function Lf(){return this.isValid()?this._isUTC&&this._offset===0:!1}var lv=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,uv=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Rt(e,t){var n=e,r=null,i,o,l;return si(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:pn(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=lv.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:he(r[Ut])*i,h:he(r[Be])*i,m:he(r[Yt])*i,s:he(r[cn])*i,ms:he(ro(r[Qn]*1e3))*i}):(r=uv.exec(e))?(i=r[1]==="-"?-1:1,n={y:Bn(r[2],i),M:Bn(r[3],i),w:Bn(r[4],i),d:Bn(r[5],i),h:Bn(r[6],i),m:Bn(r[7],i),s:Bn(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(l=cv(Ae(n.from),Ae(n.to)),n={},n.ms=l.milliseconds,n.M=l.months),o=new zi(n),si(e)&&ke(e,"_locale")&&(o._locale=e._locale),si(e)&&ke(e,"_isValid")&&(o._isValid=e._isValid),o}Rt.fn=zi.prototype;Rt.invalid=Kw;function Bn(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wu(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function cv(e,t){var n;return e.isValid()&&t.isValid()?(t=tl(t,e),e.isBefore(t)?n=Wu(e,t):(n=Wu(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function If(e,t){return function(n,r){var i,o;return r!==null&&!isNaN(+r)&&(hf(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),i=Rt(n,r),Wf(this,i,e),this}}function Wf(e,t,n,r){var i=t._milliseconds,o=ro(t._days),l=ro(t._months);e.isValid()&&(r=r??!0,l&&kf(e,ys(e,"Month")+l*n),o&&vf(e,"Date",ys(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&W.updateOffset(e,o||l))}var fv=If(1,"add"),dv=If(-1,"subtract");function jf(e){return typeof e=="string"||e instanceof String}function hv(e){return Pt(e)||Os(e)||jf(e)||pn(e)||pv(e)||mv(e)||e===null||e===void 0}function mv(e){var t=tr(e)&&!Lo(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,l=r.length;for(i=0;in.valueOf():n.valueOf()9999?ri(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Gt(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ri(n,"Z")):ri(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Cv(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+i+o)}function Yv(e){e||(e=this.isUtc()?W.defaultFormatUtc:W.defaultFormat);var t=ri(this,e);return this.localeData().postformat(t)}function Nv(e,t){return this.isValid()&&(Pt(e)&&e.isValid()||Ae(e).isValid())?Rt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ev(e){return this.from(Ae(),e)}function Pv(e,t){return this.isValid()&&(Pt(e)&&e.isValid()||Ae(e).isValid())?Rt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Rv(e){return this.to(Ae(),e)}function Uf(e){var t;return e===void 0?this._locale._abbr:(t=_n(e),t!=null&&(this._locale=t),this)}var Hf=bt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Vf(){return this._locale}var gi=1e3,Dr=60*gi,wi=60*Dr,$f=(365*400+97)*24*wi;function Tr(e,t){return(e%t+t)%t}function Bf(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-$f:new Date(e,t,n).valueOf()}function Gf(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-$f:Date.UTC(e,t,n)}function Av(e){var t,n;if(e=St(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Gf:Bf,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Tr(t+(this._isUTC?0:this.utcOffset()*Dr),wi);break;case"minute":t=this._d.valueOf(),t-=Tr(t,Dr);break;case"second":t=this._d.valueOf(),t-=Tr(t,gi);break}return this._d.setTime(t),W.updateOffset(this,!0),this}function Fv(e){var t,n;if(e=St(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Gf:Bf,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=wi-Tr(t+(this._isUTC?0:this.utcOffset()*Dr),wi)-1;break;case"minute":t=this._d.valueOf(),t+=Dr-Tr(t,Dr)-1;break;case"second":t=this._d.valueOf(),t+=gi-Tr(t,gi)-1;break}return this._d.setTime(t),W.updateOffset(this,!0),this}function Lv(){return this._d.valueOf()-(this._offset||0)*6e4}function Iv(){return Math.floor(this.valueOf()/1e3)}function Wv(){return new Date(this.valueOf())}function jv(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Uv(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Hv(){return this.isValid()?this.toISOString():null}function Vv(){return Io(this)}function $v(){return Cn({},ie(this))}function Bv(){return ie(this).overflow}function Gv(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Z("N",0,0,"eraAbbr");Z("NN",0,0,"eraAbbr");Z("NNN",0,0,"eraAbbr");Z("NNNN",0,0,"eraName");Z("NNNNN",0,0,"eraNarrow");Z("y",["y",1],"yo","eraYear");Z("y",["yy",2],0,"eraYear");Z("y",["yyy",3],0,"eraYear");Z("y",["yyyy",4],0,"eraYear");$("N",nl);$("NN",nl);$("NNN",nl);$("NNNN",rb);$("NNNNN",sb);xe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ie(n).era=i:ie(n).invalidEra=e});$("y",Ar);$("yy",Ar);$("yyy",Ar);$("yyyy",Ar);$("yo",ib);xe(["y","yy","yyy","yyyy"],nt);xe(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[nt]=n._locale.eraYearOrdinalParse(e,i):t[nt]=parseInt(e,10)});function zv(e,t){var n,r,i,o=this._eras||_n("en")._eras;for(n=0,r=o.length;n=0)return o[r]}function Kv(e,t){var n=e.since<=e.until?1:-1;return t===void 0?W(e.since).year():W(e.since).year()+(t-e.offset)*n}function Zv(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eo&&(t=o),db.call(this,e,t,n,r,i))}function db(e,t,n,r,i){var o=Df(e,t,n,r,i),l=_s(o.year,0,o.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}Z("Q",0,"Qo","quarter");$("Q",pf);xe("Q",function(e,t){t[un]=(he(e)-1)*3});function hb(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Z("D",["DD",2],"Do","date");$("D",Fe,Fr);$("DD",Fe,ft);$("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});xe(["D","DD"],Ut);xe("Do",function(e,t){t[Ut]=he(e.match(Fe)[0])});var qf=Lr("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear");$("DDD",Ui);$("DDDD",yf);xe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=he(e)});function mb(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Z("m",["mm",2],0,"minute");$("m",Fe,Bo);$("mm",Fe,ft);xe(["m","mm"],Yt);var pb=Lr("Minutes",!1);Z("s",["ss",2],0,"second");$("s",Fe,Bo);$("ss",Fe,ft);xe(["s","ss"],cn);var yb=Lr("Seconds",!1);Z("S",0,0,function(){return~~(this.millisecond()/100)});Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Z(0,["SSS",3],0,"millisecond");Z(0,["SSSS",4],0,function(){return this.millisecond()*10});Z(0,["SSSSS",5],0,function(){return this.millisecond()*100});Z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});$("S",Ui,pf);$("SS",Ui,ft);$("SSS",Ui,yf);var Yn,Kf;for(Yn="SSSS";Yn.length<=9;Yn+="S")$(Yn,Ar);function _b(e,t){t[Qn]=he(("0."+e)*1e3)}for(Yn="S";Yn.length<=9;Yn+="S")xe(Yn,_b);Kf=Lr("Milliseconds",!1);Z("z",0,0,"zoneAbbr");Z("zz",0,0,"zoneName");function gb(){return this._isUTC?"UTC":""}function wb(){return this._isUTC?"Coordinated Universal Time":""}var E=Ms.prototype;E.add=fv;E.calendar=gv;E.clone=wv;E.diff=Dv;E.endOf=Fv;E.format=Yv;E.from=Nv;E.fromNow=Ev;E.to=Pv;E.toNow=Rv;E.get=C0;E.invalidAt=Bv;E.isAfter=vv;E.isBefore=bv;E.isBetween=Sv;E.isSame=kv;E.isSameOrAfter=Ov;E.isSameOrBefore=Mv;E.isValid=Vv;E.lang=Hf;E.locale=Uf;E.localeData=Vf;E.max=Vw;E.min=Hw;E.parsingFlags=$v;E.set=Y0;E.startOf=Av;E.subtract=dv;E.toArray=jv;E.toObject=Uv;E.toDate=Wv;E.toISOString=xv;E.inspect=Cv;typeof Symbol<"u"&&Symbol.for!=null&&(E[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});E.toJSON=Hv;E.toString=Tv;E.unix=Iv;E.valueOf=Lv;E.creationData=Gv;E.eraName=Zv;E.eraNarrow=Jv;E.eraAbbr=Qv;E.eraYear=Xv;E.year=wf;E.isLeapYear=x0;E.weekYear=ab;E.isoWeekYear=ob;E.quarter=E.quarters=hb;E.month=Of;E.daysInMonth=W0;E.week=E.weeks=z0;E.isoWeek=E.isoWeeks=q0;E.weeksInYear=cb;E.weeksInWeekYear=fb;E.isoWeeksInYear=lb;E.isoWeeksInISOWeekYear=ub;E.date=qf;E.day=E.days=ow;E.weekday=lw;E.isoWeekday=uw;E.dayOfYear=mb;E.hour=E.hours=yw;E.minute=E.minutes=pb;E.second=E.seconds=yb;E.millisecond=E.milliseconds=Kf;E.utcOffset=Qw;E.utc=ev;E.local=tv;E.parseZone=nv;E.hasAlignedHourOffset=rv;E.isDST=sv;E.isLocal=av;E.isUtcOffset=ov;E.isUtc=Lf;E.isUTC=Lf;E.zoneAbbr=gb;E.zoneName=wb;E.dates=bt("dates accessor is deprecated. Use date instead.",qf);E.months=bt("months accessor is deprecated. Use month instead",Of);E.years=bt("years accessor is deprecated. Use year instead",wf);E.zone=bt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Xw);E.isDSTShifted=bt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",iv);function vb(e){return Ae(e*1e3)}function bb(){return Ae.apply(null,arguments).parseZone()}function Zf(e){return e}var Oe=jo.prototype;Oe.calendar=a0;Oe.longDateFormat=c0;Oe.invalidDate=d0;Oe.ordinal=p0;Oe.preparse=Zf;Oe.postformat=Zf;Oe.relativeTime=_0;Oe.pastFuture=g0;Oe.set=s0;Oe.eras=zv;Oe.erasParse=qv;Oe.erasConvertYear=Kv;Oe.erasAbbrRegex=tb;Oe.erasNameRegex=eb;Oe.erasNarrowRegex=nb;Oe.months=A0;Oe.monthsShort=F0;Oe.monthsParse=I0;Oe.monthsRegex=U0;Oe.monthsShortRegex=j0;Oe.week=V0;Oe.firstDayOfYear=G0;Oe.firstDayOfWeek=B0;Oe.weekdays=nw;Oe.weekdaysMin=sw;Oe.weekdaysShort=rw;Oe.weekdaysParse=aw;Oe.weekdaysRegex=cw;Oe.weekdaysShortRegex=fw;Oe.weekdaysMinRegex=dw;Oe.isPM=mw;Oe.meridiem=_w;function vi(e,t,n,r){var i=_n(),o=Bt().set(r,t);return i[n](o,e)}function Jf(e,t,n){if(pn(e)&&(t=e,e=void 0),e=e||"",t!=null)return vi(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=vi(e,r,n,"month");return i}function sl(e,t,n,r){typeof e=="boolean"?(pn(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,pn(t)&&(n=t,t=void 0),t=t||"");var i=_n(),o=e?i._week.dow:0,l,f=[];if(n!=null)return vi(t,(n+o)%7,r,"day");for(l=0;l<7;l++)f[l]=vi(t,(l+o)%7,r,"day");return f}function Sb(e,t){return Jf(e,t,"months")}function kb(e,t){return Jf(e,t,"monthsShort")}function Ob(e,t,n){return sl(e,t,n,"weekdays")}function Mb(e,t,n){return sl(e,t,n,"weekdaysShort")}function Db(e,t,n){return sl(e,t,n,"weekdaysMin")}Pn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=he(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});W.lang=bt("moment.lang is deprecated. Use moment.locale instead.",Pn);W.langData=bt("moment.langData is deprecated. Use moment.localeData instead.",_n);var an=Math.abs;function Tb(){var e=this._data;return this._milliseconds=an(this._milliseconds),this._days=an(this._days),this._months=an(this._months),e.milliseconds=an(e.milliseconds),e.seconds=an(e.seconds),e.minutes=an(e.minutes),e.hours=an(e.hours),e.months=an(e.months),e.years=an(e.years),this}function Qf(e,t,n,r){var i=Rt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function xb(e,t){return Qf(this,e,t,1)}function Cb(e,t){return Qf(this,e,t,-1)}function ju(e){return e<0?Math.floor(e):Math.ceil(e)}function Yb(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,o,l,f,h;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=ju(io(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=_t(e/1e3),r.seconds=i%60,o=_t(i/60),r.minutes=o%60,l=_t(o/60),r.hours=l%24,t+=_t(l/24),h=_t(Xf(t)),n+=h,t-=ju(io(h)),f=_t(n/12),n%=12,r.days=t,r.months=n,r.years=f,this}function Xf(e){return e*4800/146097}function io(e){return e*146097/4800}function Nb(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=St(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Xf(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(io(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function gn(e){return function(){return this.as(e)}}var ed=gn("ms"),Eb=gn("s"),Pb=gn("m"),Rb=gn("h"),Ab=gn("d"),Fb=gn("w"),Lb=gn("M"),Ib=gn("Q"),Wb=gn("y"),jb=ed;function Ub(){return Rt(this)}function Hb(e){return e=St(e),this.isValid()?this[e+"s"]():NaN}function rr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vb=rr("milliseconds"),$b=rr("seconds"),Bb=rr("minutes"),Gb=rr("hours"),zb=rr("days"),qb=rr("months"),Kb=rr("years");function Zb(){return _t(this.days()/7)}var ln=Math.round,wr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jb(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Qb(e,t,n,r){var i=Rt(e).abs(),o=ln(i.as("s")),l=ln(i.as("m")),f=ln(i.as("h")),h=ln(i.as("d")),m=ln(i.as("M")),p=ln(i.as("w")),w=ln(i.as("y")),v=o<=n.ss&&["s",o]||o0,v[4]=r,Jb.apply(null,v)}function Xb(e){return e===void 0?ln:typeof e=="function"?(ln=e,!0):!1}function eS(e,t){return wr[e]===void 0?!1:t===void 0?wr[e]:(wr[e]=t,e==="s"&&(wr.ss=t-1),!0)}function tS(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=wr,i,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},wr,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),o=Qb(this,!n,r,i),n&&(o=i.pastFuture(+this,o)),i.postformat(o)}var Pa=Math.abs;function pr(e){return(e>0)-(e<0)||+e}function Ki(){if(!this.isValid())return this.localeData().invalidDate();var e=Pa(this._milliseconds)/1e3,t=Pa(this._days),n=Pa(this._months),r,i,o,l,f=this.asSeconds(),h,m,p,w;return f?(r=_t(e/60),i=_t(r/60),e%=60,r%=60,o=_t(n/12),n%=12,l=e?e.toFixed(3).replace(/\.?0+$/,""):"",h=f<0?"-":"",m=pr(this._months)!==pr(f)?"-":"",p=pr(this._days)!==pr(f)?"-":"",w=pr(this._milliseconds)!==pr(f)?"-":"",h+"P"+(o?m+o+"Y":"")+(n?m+n+"M":"")+(t?p+t+"D":"")+(i||r||e?"T":"")+(i?w+i+"H":"")+(r?w+r+"M":"")+(e?w+l+"S":"")):"P0D"}var ye=zi.prototype;ye.isValid=qw;ye.abs=Tb;ye.add=xb;ye.subtract=Cb;ye.as=Nb;ye.asMilliseconds=ed;ye.asSeconds=Eb;ye.asMinutes=Pb;ye.asHours=Rb;ye.asDays=Ab;ye.asWeeks=Fb;ye.asMonths=Lb;ye.asQuarters=Ib;ye.asYears=Wb;ye.valueOf=jb;ye._bubble=Yb;ye.clone=Ub;ye.get=Hb;ye.milliseconds=Vb;ye.seconds=$b;ye.minutes=Bb;ye.hours=Gb;ye.days=zb;ye.weeks=Zb;ye.months=qb;ye.years=Kb;ye.humanize=tS;ye.toISOString=Ki;ye.toString=Ki;ye.toJSON=Ki;ye.locale=Uf;ye.localeData=Vf;ye.toIsoString=bt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ki);ye.lang=Hf;Z("X",0,0,"unix");Z("x",0,0,"valueOf");$("x",Vi);$("X",S0);xe("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});xe("x",function(e,t,n){n._d=new Date(he(e))});//! moment.js +W.version="2.30.1";n0(Ae);W.fn=E;W.min=$w;W.max=Bw;W.now=Gw;W.utc=Bt;W.unix=vb;W.months=Sb;W.isDate=Os;W.locale=Pn;W.invalid=Wi;W.duration=Rt;W.isMoment=Pt;W.weekdays=Ob;W.parseZone=bb;W.localeData=_n;W.isDuration=si;W.monthsShort=kb;W.weekdaysMin=Db;W.defineLocale=Zo;W.updateLocale=bw;W.locales=Sw;W.weekdaysShort=Mb;W.normalizeUnits=St;W.relativeTimeRounding=Xb;W.relativeTimeThreshold=eS;W.calendarFormat=_v;W.prototype=E;W.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var td=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nd(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bi={},nS={get exports(){return bi},set exports(e){bi=e}},Uu;function rS(){return Uu||(Uu=1,function(e,t){(function(n,r){e.exports=r()})(td,function(){var n;function r(){return n.apply(null,arguments)}function i(s){n=s}function o(s){return s instanceof Array||Object.prototype.toString.call(s)==="[object Array]"}function l(s){return s!=null&&Object.prototype.toString.call(s)==="[object Object]"}function f(s,a){return Object.prototype.hasOwnProperty.call(s,a)}function h(s){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(s).length===0;var a;for(a in s)if(f(s,a))return!1;return!0}function m(s){return s===void 0}function p(s){return typeof s=="number"||Object.prototype.toString.call(s)==="[object Number]"}function w(s){return s instanceof Date||Object.prototype.toString.call(s)==="[object Date]"}function v(s,a){var u=[],c,d=s.length;for(c=0;c>>0,c;for(c=0;c0)for(u=0;u<_;u++)c=F[u],d=a[c],m(d)||(s[c]=d);return s}function le(s){oe(this,s),this._d=new Date(s._d!=null?s._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),ee===!1&&(ee=!0,r.updateOffset(this),ee=!1)}function j(s){return s instanceof le||s!=null&&s._isAMomentObject!=null}function ue(s){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+s)}function se(s,a){var u=!0;return M(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,s),u){var c=[],d,_,b,U=arguments.length;for(_=0;_=0;return(_?u?"+":"":"-")+Math.pow(10,Math.max(0,d)).toString().substr(1)+c}var kt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ir={},wn={};function z(s,a,u,c){var d=c;typeof c=="string"&&(d=function(){return this[c]()}),s&&(wn[s]=d),a&&(wn[a[0]]=function(){return qe(d.apply(this,arguments),a[1],a[2])}),u&&(wn[u]=function(){return this.localeData().ordinal(d.apply(this,arguments),s)})}function Ot(s){return s.match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"")}function ar(s){var a=s.match(kt),u,c;for(u=0,c=a.length;u=0&&rt.test(s);)s=s.replace(rt,c),rt.lastIndex=0,u-=1;return s}var jr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Ur(s){var a=this._longDateFormat[s],u=this._longDateFormat[s.toUpperCase()];return a||!u?a:(this._longDateFormat[s]=u.match(kt).map(function(c){return c==="MMMM"||c==="MM"||c==="DD"||c==="dddd"?c.slice(1):c}).join(""),this._longDateFormat[s])}var y="Invalid date";function g(){return this._invalidDate}var k="%d",C=/\d{1,2}/;function x(s){return this._ordinal.replace("%d",s)}var R={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function I(s,a,u,c){var d=this._relativeTime[u];return ce(d)?d(s,a,u,c):d.replace(/%d/i,s)}function P(s,a){var u=this._relativeTime[s>0?"future":"past"];return ce(u)?u(a):u.replace(/%s/i,a)}var L={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function T(s){return typeof s=="string"?L[s]||L[s.toLowerCase()]:void 0}function q(s){var a={},u,c;for(c in s)f(s,c)&&(u=T(c),u&&(a[u]=s[c]));return a}var B={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function K(s){var a=[],u;for(u in s)f(s,u)&&a.push({unit:u,priority:B[u]});return a.sort(function(c,d){return c.priority-d.priority}),a}var ne=/\d/,te=/\d\d/,De=/\d{3}/,ve=/\d{4}/,Ee=/[+-]?\d{6}/,fe=/\d\d?/,Kt=/\d\d\d\d?/,Hr=/\d\d\d\d\d\d?/,Ft=/\d{1,3}/,or=/\d{1,4}/,ze=/[+-]?\d{1,6}/,Ke=/\d+/,Ln=/[+-]?\d+/,Fd=/Z|[+-]\d\d:?\d\d/gi,Ys=/Z|[+-]\d\d(?::?\d\d)?/gi,Ld=/[+-]?\d+(\.\d{1,3})?/,Vr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,lr=/^[1-9]\d?/,ra=/^([1-9]\d|\d)/,Ns;Ns={};function V(s,a,u){Ns[s]=ce(a)?a:function(c,d){return c&&u?u:a}}function Id(s,a){return f(Ns,s)?Ns[s](a._strict,a._locale):new RegExp(Wd(s))}function Wd(s){return Zt(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,u,c,d,_){return u||c||d||_}))}function Zt(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function mt(s){return s<0?Math.ceil(s)||0:Math.floor(s)}function de(s){var a=+s,u=0;return a!==0&&isFinite(a)&&(u=mt(a)),u}var sa={};function Te(s,a){var u,c=a,d;for(typeof s=="string"&&(s=[s]),p(a)&&(c=function(_,b){b[a]=de(_)}),d=s.length,u=0;u68?1900:2e3)};var hl=ur("FullYear",!0);function Vd(){return Es(this.year())}function ur(s,a){return function(u){return u!=null?(ml(this,s,u),r.updateOffset(this,a),this):Gr(this,s)}}function Gr(s,a){if(!s.isValid())return NaN;var u=s._d,c=s._isUTC;switch(a){case"Milliseconds":return c?u.getUTCMilliseconds():u.getMilliseconds();case"Seconds":return c?u.getUTCSeconds():u.getSeconds();case"Minutes":return c?u.getUTCMinutes():u.getMinutes();case"Hours":return c?u.getUTCHours():u.getHours();case"Date":return c?u.getUTCDate():u.getDate();case"Day":return c?u.getUTCDay():u.getDay();case"Month":return c?u.getUTCMonth():u.getMonth();case"FullYear":return c?u.getUTCFullYear():u.getFullYear();default:return NaN}}function ml(s,a,u){var c,d,_,b,U;if(!(!s.isValid()||isNaN(u))){switch(c=s._d,d=s._isUTC,a){case"Milliseconds":return void(d?c.setUTCMilliseconds(u):c.setMilliseconds(u));case"Seconds":return void(d?c.setUTCSeconds(u):c.setSeconds(u));case"Minutes":return void(d?c.setUTCMinutes(u):c.setMinutes(u));case"Hours":return void(d?c.setUTCHours(u):c.setHours(u));case"Date":return void(d?c.setUTCDate(u):c.setDate(u));case"FullYear":break;default:return}_=u,b=s.month(),U=s.date(),U=U===29&&b===1&&!Es(_)?28:U,d?c.setUTCFullYear(_,b,U):c.setFullYear(_,b,U)}}function $d(s){return s=T(s),ce(this[s])?this[s]():this}function Bd(s,a){if(typeof s=="object"){s=q(s);var u=K(s),c,d=u.length;for(c=0;c=0?(U=new Date(s+400,a,u,c,d,_,b),isFinite(U.getFullYear())&&U.setFullYear(s)):U=new Date(s,a,u,c,d,_,b),U}function zr(s){var a,u;return s<100&&s>=0?(u=Array.prototype.slice.call(arguments),u[0]=s+400,a=new Date(Date.UTC.apply(null,u)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(s)):a=new Date(Date.UTC.apply(null,arguments)),a}function Ps(s,a,u){var c=7+a-u,d=(7+zr(s,0,c).getUTCDay()-a)%7;return-d+c-1}function vl(s,a,u,c,d){var _=(7+u-c)%7,b=Ps(s,c,d),U=1+7*(a-1)+_+b,re,me;return U<=0?(re=s-1,me=Br(re)+U):U>Br(s)?(re=s+1,me=U-Br(s)):(re=s,me=U),{year:re,dayOfYear:me}}function qr(s,a,u){var c=Ps(s.year(),a,u),d=Math.floor((s.dayOfYear()-c-1)/7)+1,_,b;return d<1?(b=s.year()-1,_=d+Xt(b,a,u)):d>Xt(s.year(),a,u)?(_=d-Xt(s.year(),a,u),b=s.year()+1):(b=s.year(),_=d),{week:_,year:b}}function Xt(s,a,u){var c=Ps(s,a,u),d=Ps(s+1,a,u);return(Br(s)-c+d)/7}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),V("w",fe,lr),V("ww",fe,te),V("W",fe,lr),V("WW",fe,te),$r(["w","ww","W","WW"],function(s,a,u,c){a[c.substr(0,1)]=de(s)});function sh(s){return qr(s,this._week.dow,this._week.doy).week}var ih={dow:0,doy:6};function ah(){return this._week.dow}function oh(){return this._week.doy}function lh(s){var a=this.localeData().week(this);return s==null?a:this.add((s-a)*7,"d")}function uh(s){var a=qr(this,1,4).week;return s==null?a:this.add((s-a)*7,"d")}z("d",0,"do","day"),z("dd",0,0,function(s){return this.localeData().weekdaysMin(this,s)}),z("ddd",0,0,function(s){return this.localeData().weekdaysShort(this,s)}),z("dddd",0,0,function(s){return this.localeData().weekdays(this,s)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),V("d",fe),V("e",fe),V("E",fe),V("dd",function(s,a){return a.weekdaysMinRegex(s)}),V("ddd",function(s,a){return a.weekdaysShortRegex(s)}),V("dddd",function(s,a){return a.weekdaysRegex(s)}),$r(["dd","ddd","dddd"],function(s,a,u,c){var d=u._locale.weekdaysParse(s,c,u._strict);d!=null?a.d=d:A(u).invalidWeekday=s}),$r(["d","e","E"],function(s,a,u,c){a[c]=de(s)});function ch(s,a){return typeof s!="string"?s:isNaN(s)?(s=a.weekdaysParse(s),typeof s=="number"?s:null):parseInt(s,10)}function fh(s,a){return typeof s=="string"?a.weekdaysParse(s)%7||7:isNaN(s)?null:s}function aa(s,a){return s.slice(a,7).concat(s.slice(0,a))}var dh="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),hh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),mh=Vr,ph=Vr,yh=Vr;function _h(s,a){var u=o(this._weekdays)?this._weekdays:this._weekdays[s&&s!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return s===!0?aa(u,this._week.dow):s?u[s.day()]:u}function gh(s){return s===!0?aa(this._weekdaysShort,this._week.dow):s?this._weekdaysShort[s.day()]:this._weekdaysShort}function wh(s){return s===!0?aa(this._weekdaysMin,this._week.dow):s?this._weekdaysMin[s.day()]:this._weekdaysMin}function vh(s,a,u){var c,d,_,b=s.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],c=0;c<7;++c)_=D([2e3,1]).day(c),this._minWeekdaysParse[c]=this.weekdaysMin(_,"").toLocaleLowerCase(),this._shortWeekdaysParse[c]=this.weekdaysShort(_,"").toLocaleLowerCase(),this._weekdaysParse[c]=this.weekdays(_,"").toLocaleLowerCase();return u?a==="dddd"?(d=je.call(this._weekdaysParse,b),d!==-1?d:null):a==="ddd"?(d=je.call(this._shortWeekdaysParse,b),d!==-1?d:null):(d=je.call(this._minWeekdaysParse,b),d!==-1?d:null):a==="dddd"?(d=je.call(this._weekdaysParse,b),d!==-1||(d=je.call(this._shortWeekdaysParse,b),d!==-1)?d:(d=je.call(this._minWeekdaysParse,b),d!==-1?d:null)):a==="ddd"?(d=je.call(this._shortWeekdaysParse,b),d!==-1||(d=je.call(this._weekdaysParse,b),d!==-1)?d:(d=je.call(this._minWeekdaysParse,b),d!==-1?d:null)):(d=je.call(this._minWeekdaysParse,b),d!==-1||(d=je.call(this._weekdaysParse,b),d!==-1)?d:(d=je.call(this._shortWeekdaysParse,b),d!==-1?d:null))}function bh(s,a,u){var c,d,_;if(this._weekdaysParseExact)return vh.call(this,s,a,u);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),c=0;c<7;c++){if(d=D([2e3,1]).day(c),u&&!this._fullWeekdaysParse[c]&&(this._fullWeekdaysParse[c]=new RegExp("^"+this.weekdays(d,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[c]=new RegExp("^"+this.weekdaysShort(d,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[c]=new RegExp("^"+this.weekdaysMin(d,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[c]||(_="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[c]=new RegExp(_.replace(".",""),"i")),u&&a==="dddd"&&this._fullWeekdaysParse[c].test(s))return c;if(u&&a==="ddd"&&this._shortWeekdaysParse[c].test(s))return c;if(u&&a==="dd"&&this._minWeekdaysParse[c].test(s))return c;if(!u&&this._weekdaysParse[c].test(s))return c}}function Sh(s){if(!this.isValid())return s!=null?this:NaN;var a=Gr(this,"Day");return s!=null?(s=ch(s,this.localeData()),this.add(s-a,"d")):a}function kh(s){if(!this.isValid())return s!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return s==null?a:this.add(s-a,"d")}function Oh(s){if(!this.isValid())return s!=null?this:NaN;if(s!=null){var a=fh(s,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function Mh(s){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||oa.call(this),s?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=mh),this._weekdaysStrictRegex&&s?this._weekdaysStrictRegex:this._weekdaysRegex)}function Dh(s){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||oa.call(this),s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ph),this._weekdaysShortStrictRegex&&s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Th(s){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||oa.call(this),s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=yh),this._weekdaysMinStrictRegex&&s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function oa(){function s(st,sn){return sn.length-st.length}var a=[],u=[],c=[],d=[],_,b,U,re,me;for(_=0;_<7;_++)b=D([2e3,1]).day(_),U=Zt(this.weekdaysMin(b,"")),re=Zt(this.weekdaysShort(b,"")),me=Zt(this.weekdays(b,"")),a.push(U),u.push(re),c.push(me),d.push(U),d.push(re),d.push(me);a.sort(s),u.sort(s),c.sort(s),d.sort(s),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function la(){return this.hours()%12||12}function xh(){return this.hours()||24}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,la),z("k",["kk",2],0,xh),z("hmm",0,0,function(){return""+la.apply(this)+qe(this.minutes(),2)}),z("hmmss",0,0,function(){return""+la.apply(this)+qe(this.minutes(),2)+qe(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+qe(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+qe(this.minutes(),2)+qe(this.seconds(),2)});function Sl(s,a){z(s,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}Sl("a",!0),Sl("A",!1);function kl(s,a){return a._meridiemParse}V("a",kl),V("A",kl),V("H",fe,ra),V("h",fe,lr),V("k",fe,lr),V("HH",fe,te),V("hh",fe,te),V("kk",fe,te),V("hmm",Kt),V("hmmss",Hr),V("Hmm",Kt),V("Hmmss",Hr),Te(["H","HH"],$e),Te(["k","kk"],function(s,a,u){var c=de(s);a[$e]=c===24?0:c}),Te(["a","A"],function(s,a,u){u._isPm=u._locale.isPM(s),u._meridiem=s}),Te(["h","hh"],function(s,a,u){a[$e]=de(s),A(u).bigHour=!0}),Te("hmm",function(s,a,u){var c=s.length-2;a[$e]=de(s.substr(0,c)),a[Mt]=de(s.substr(c)),A(u).bigHour=!0}),Te("hmmss",function(s,a,u){var c=s.length-4,d=s.length-2;a[$e]=de(s.substr(0,c)),a[Mt]=de(s.substr(c,2)),a[Qt]=de(s.substr(d)),A(u).bigHour=!0}),Te("Hmm",function(s,a,u){var c=s.length-2;a[$e]=de(s.substr(0,c)),a[Mt]=de(s.substr(c))}),Te("Hmmss",function(s,a,u){var c=s.length-4,d=s.length-2;a[$e]=de(s.substr(0,c)),a[Mt]=de(s.substr(c,2)),a[Qt]=de(s.substr(d))});function Ch(s){return(s+"").toLowerCase().charAt(0)==="p"}var Yh=/[ap]\.?m?\.?/i,Nh=ur("Hours",!0);function Eh(s,a,u){return s>11?u?"pm":"PM":u?"am":"AM"}var Ol={calendar:we,longDateFormat:jr,invalidDate:y,ordinal:k,dayOfMonthOrdinalParse:C,relativeTime:R,months:zd,monthsShort:pl,week:ih,weekdays:dh,weekdaysMin:hh,weekdaysShort:bl,meridiemParse:Yh},Le={},Kr={},Zr;function Ph(s,a){var u,c=Math.min(s.length,a.length);for(u=0;u0;){if(d=Rs(_.slice(0,u).join("-")),d)return d;if(c&&c.length>=u&&Ph(_,c)>=u-1)break;u--}a++}return Zr}function Ah(s){return!!(s&&s.match("^[^/\\\\]*$"))}function Rs(s){var a=null,u;if(Le[s]===void 0&&e&&e.exports&&Ah(s))try{a=Zr._abbr,u=nd,u("./locale/"+s),vn(a)}catch{Le[s]=null}return Le[s]}function vn(s,a){var u;return s&&(m(a)?u=en(s):u=ua(s,a),u?Zr=u:typeof console<"u"&&console.warn&&console.warn("Locale "+s+" not found. Did you forget to load it?")),Zr._abbr}function ua(s,a){if(a!==null){var u,c=Ol;if(a.abbr=s,Le[s]!=null)H("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=Le[s]._config;else if(a.parentLocale!=null)if(Le[a.parentLocale]!=null)c=Le[a.parentLocale]._config;else if(u=Rs(a.parentLocale),u!=null)c=u._config;else return Kr[a.parentLocale]||(Kr[a.parentLocale]=[]),Kr[a.parentLocale].push({name:s,config:a}),null;return Le[s]=new Ne(dt(c,a)),Kr[s]&&Kr[s].forEach(function(d){ua(d.name,d.config)}),vn(s),Le[s]}else return delete Le[s],null}function Fh(s,a){if(a!=null){var u,c,d=Ol;Le[s]!=null&&Le[s].parentLocale!=null?Le[s].set(dt(Le[s]._config,a)):(c=Rs(s),c!=null&&(d=c._config),a=dt(d,a),c==null&&(a.abbr=s),u=new Ne(a),u.parentLocale=Le[s],Le[s]=u),vn(s)}else Le[s]!=null&&(Le[s].parentLocale!=null?(Le[s]=Le[s].parentLocale,s===vn()&&vn(s)):Le[s]!=null&&delete Le[s]);return Le[s]}function en(s){var a;if(s&&s._locale&&s._locale._abbr&&(s=s._locale._abbr),!s)return Zr;if(!o(s)){if(a=Rs(s),a)return a;s=[s]}return Rh(s)}function Lh(){return Me(Le)}function ca(s){var a,u=s._a;return u&&A(s).overflow===-2&&(a=u[Jt]<0||u[Jt]>11?Jt:u[Lt]<1||u[Lt]>ia(u[Qe],u[Jt])?Lt:u[$e]<0||u[$e]>24||u[$e]===24&&(u[Mt]!==0||u[Qt]!==0||u[In]!==0)?$e:u[Mt]<0||u[Mt]>59?Mt:u[Qt]<0||u[Qt]>59?Qt:u[In]<0||u[In]>999?In:-1,A(s)._overflowDayOfYear&&(aLt)&&(a=Lt),A(s)._overflowWeeks&&a===-1&&(a=Ud),A(s)._overflowWeekday&&a===-1&&(a=Hd),A(s).overflow=a),s}var Ih=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Wh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jh=/Z|[+-]\d\d(?::?\d\d)?/,As=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Uh=/^\/?Date\((-?\d+)/i,Hh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Vh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Dl(s){var a,u,c=s._i,d=Ih.exec(c)||Wh.exec(c),_,b,U,re,me=As.length,st=fa.length;if(d){for(A(s).iso=!0,a=0,u=me;aBr(b)||s._dayOfYear===0)&&(A(s)._overflowDayOfYear=!0),u=zr(b,0,s._dayOfYear),s._a[Jt]=u.getUTCMonth(),s._a[Lt]=u.getUTCDate()),a=0;a<3&&s._a[a]==null;++a)s._a[a]=c[a]=d[a];for(;a<7;a++)s._a[a]=c[a]=s._a[a]==null?a===2?1:0:s._a[a];s._a[$e]===24&&s._a[Mt]===0&&s._a[Qt]===0&&s._a[In]===0&&(s._nextDay=!0,s._a[$e]=0),s._d=(s._useUTC?zr:rh).apply(null,c),_=s._useUTC?s._d.getUTCDay():s._d.getDay(),s._tzm!=null&&s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),s._nextDay&&(s._a[$e]=24),s._w&&typeof s._w.d<"u"&&s._w.d!==_&&(A(s).weekdayMismatch=!0)}}function Jh(s){var a,u,c,d,_,b,U,re,me;a=s._w,a.GG!=null||a.W!=null||a.E!=null?(_=1,b=4,u=cr(a.GG,s._a[Qe],qr(Pe(),1,4).year),c=cr(a.W,1),d=cr(a.E,1),(d<1||d>7)&&(re=!0)):(_=s._locale._week.dow,b=s._locale._week.doy,me=qr(Pe(),_,b),u=cr(a.gg,s._a[Qe],me.year),c=cr(a.w,me.week),a.d!=null?(d=a.d,(d<0||d>6)&&(re=!0)):a.e!=null?(d=a.e+_,(a.e<0||a.e>6)&&(re=!0)):d=_),c<1||c>Xt(u,_,b)?A(s)._overflowWeeks=!0:re!=null?A(s)._overflowWeekday=!0:(U=vl(u,c,d,_,b),s._a[Qe]=U.year,s._dayOfYear=U.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function ha(s){if(s._f===r.ISO_8601){Dl(s);return}if(s._f===r.RFC_2822){Tl(s);return}s._a=[],A(s).empty=!0;var a=""+s._i,u,c,d,_,b,U=a.length,re=0,me,st;for(d=qt(s._f,s._locale).match(kt)||[],st=d.length,u=0;u0&&A(s).unusedInput.push(b),a=a.slice(a.indexOf(c)+c.length),re+=c.length),wn[_]?(c?A(s).empty=!1:A(s).unusedTokens.push(_),jd(_,c,s)):s._strict&&!c&&A(s).unusedTokens.push(_);A(s).charsLeftOver=U-re,a.length>0&&A(s).unusedInput.push(a),s._a[$e]<=12&&A(s).bigHour===!0&&s._a[$e]>0&&(A(s).bigHour=void 0),A(s).parsedDateParts=s._a.slice(0),A(s).meridiem=s._meridiem,s._a[$e]=Qh(s._locale,s._a[$e],s._meridiem),me=A(s).era,me!==null&&(s._a[Qe]=s._locale.erasConvertYear(me,s._a[Qe])),da(s),ca(s)}function Qh(s,a,u){var c;return u==null?a:s.meridiemHour!=null?s.meridiemHour(a,u):(s.isPM!=null&&(c=s.isPM(u),c&&a<12&&(a+=12),!c&&a===12&&(a=0)),a)}function Xh(s){var a,u,c,d,_,b,U=!1,re=s._f.length;if(re===0){A(s).invalidFormat=!0,s._d=new Date(NaN);return}for(d=0;dthis?this:s:S()});function Yl(s,a){var u,c;if(a.length===1&&o(a[0])&&(a=a[0]),!a.length)return Pe();for(u=a[0],c=1;cthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function vm(){if(!m(this._isDSTShifted))return this._isDSTShifted;var s={},a;return oe(s,this),s=xl(s),s._a?(a=s._isUTC?D(s._a):Pe(s._a),this._isDSTShifted=this.isValid()&&fm(s._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function bm(){return this.isValid()?!this._isUTC:!1}function Sm(){return this.isValid()?this._isUTC:!1}function El(){return this.isValid()?this._isUTC&&this._offset===0:!1}var km=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Om=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dt(s,a){var u=s,c=null,d,_,b;return Ls(s)?u={ms:s._milliseconds,d:s._days,M:s._months}:p(s)||!isNaN(+s)?(u={},a?u[a]=+s:u.milliseconds=+s):(c=km.exec(s))?(d=c[1]==="-"?-1:1,u={y:0,d:de(c[Lt])*d,h:de(c[$e])*d,m:de(c[Mt])*d,s:de(c[Qt])*d,ms:de(ma(c[In]*1e3))*d}):(c=Om.exec(s))?(d=c[1]==="-"?-1:1,u={y:Wn(c[2],d),M:Wn(c[3],d),w:Wn(c[4],d),d:Wn(c[5],d),h:Wn(c[6],d),m:Wn(c[7],d),s:Wn(c[8],d)}):u==null?u={}:typeof u=="object"&&("from"in u||"to"in u)&&(b=Mm(Pe(u.from),Pe(u.to)),u={},u.ms=b.milliseconds,u.M=b.months),_=new Fs(u),Ls(s)&&f(s,"_locale")&&(_._locale=s._locale),Ls(s)&&f(s,"_isValid")&&(_._isValid=s._isValid),_}Dt.fn=Fs.prototype,Dt.invalid=cm;function Wn(s,a){var u=s&&parseFloat(s.replace(",","."));return(isNaN(u)?0:u)*a}function Pl(s,a){var u={};return u.months=a.month()-s.month()+(a.year()-s.year())*12,s.clone().add(u.months,"M").isAfter(a)&&--u.months,u.milliseconds=+a-+s.clone().add(u.months,"M"),u}function Mm(s,a){var u;return s.isValid()&&a.isValid()?(a=ya(a,s),s.isBefore(a)?u=Pl(s,a):(u=Pl(a,s),u.milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0}}function Rl(s,a){return function(u,c){var d,_;return c!==null&&!isNaN(+c)&&(H(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),_=u,u=c,c=_),d=Dt(u,c),Al(this,d,s),this}}function Al(s,a,u,c){var d=a._milliseconds,_=ma(a._days),b=ma(a._months);s.isValid()&&(c=c??!0,b&&_l(s,Gr(s,"Month")+b*u),_&&ml(s,"Date",Gr(s,"Date")+_*u),d&&s._d.setTime(s._d.valueOf()+d*u),c&&r.updateOffset(s,_||b))}var Dm=Rl(1,"add"),Tm=Rl(-1,"subtract");function Fl(s){return typeof s=="string"||s instanceof String}function xm(s){return j(s)||w(s)||Fl(s)||p(s)||Ym(s)||Cm(s)||s===null||s===void 0}function Cm(s){var a=l(s)&&!h(s),u=!1,c=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],d,_,b=c.length;for(d=0;du.valueOf():u.valueOf()9999?Fn(u,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ce(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Fn(u,"Z")):Fn(u,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function $m(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var s="moment",a="",u,c,d,_;return this.isLocal()||(s=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),u="["+s+'("]',c=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",d="-MM-DD[T]HH:mm:ss.SSS",_=a+'[")]',this.format(u+c+d+_)}function Bm(s){s||(s=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var a=Fn(this,s);return this.localeData().postformat(a)}function Gm(s,a){return this.isValid()&&(j(s)&&s.isValid()||Pe(s).isValid())?Dt({to:this,from:s}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function zm(s){return this.from(Pe(),s)}function qm(s,a){return this.isValid()&&(j(s)&&s.isValid()||Pe(s).isValid())?Dt({from:this,to:s}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function Km(s){return this.to(Pe(),s)}function Ll(s){var a;return s===void 0?this._locale._abbr:(a=en(s),a!=null&&(this._locale=a),this)}var Il=se("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(s){return s===void 0?this.localeData():this.locale(s)});function Wl(){return this._locale}var Ws=1e3,fr=60*Ws,js=60*fr,jl=(365*400+97)*24*js;function dr(s,a){return(s%a+a)%a}function Ul(s,a,u){return s<100&&s>=0?new Date(s+400,a,u)-jl:new Date(s,a,u).valueOf()}function Hl(s,a,u){return s<100&&s>=0?Date.UTC(s+400,a,u)-jl:Date.UTC(s,a,u)}function Zm(s){var a,u;if(s=T(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(u=this._isUTC?Hl:Ul,s){case"year":a=u(this.year(),0,1);break;case"quarter":a=u(this.year(),this.month()-this.month()%3,1);break;case"month":a=u(this.year(),this.month(),1);break;case"week":a=u(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=u(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=u(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=dr(a+(this._isUTC?0:this.utcOffset()*fr),js);break;case"minute":a=this._d.valueOf(),a-=dr(a,fr);break;case"second":a=this._d.valueOf(),a-=dr(a,Ws);break}return this._d.setTime(a),r.updateOffset(this,!0),this}function Jm(s){var a,u;if(s=T(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(u=this._isUTC?Hl:Ul,s){case"year":a=u(this.year()+1,0,1)-1;break;case"quarter":a=u(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=u(this.year(),this.month()+1,1)-1;break;case"week":a=u(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=u(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=u(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=js-dr(a+(this._isUTC?0:this.utcOffset()*fr),js)-1;break;case"minute":a=this._d.valueOf(),a+=fr-dr(a,fr)-1;break;case"second":a=this._d.valueOf(),a+=Ws-dr(a,Ws)-1;break}return this._d.setTime(a),r.updateOffset(this,!0),this}function Qm(){return this._d.valueOf()-(this._offset||0)*6e4}function Xm(){return Math.floor(this.valueOf()/1e3)}function ep(){return new Date(this.valueOf())}function tp(){var s=this;return[s.year(),s.month(),s.date(),s.hour(),s.minute(),s.second(),s.millisecond()]}function np(){var s=this;return{years:s.year(),months:s.month(),date:s.date(),hours:s.hours(),minutes:s.minutes(),seconds:s.seconds(),milliseconds:s.milliseconds()}}function rp(){return this.isValid()?this.toISOString():null}function sp(){return X(this)}function ip(){return M({},A(this))}function ap(){return A(this).overflow}function op(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}z("N",0,0,"eraAbbr"),z("NN",0,0,"eraAbbr"),z("NNN",0,0,"eraAbbr"),z("NNNN",0,0,"eraName"),z("NNNNN",0,0,"eraNarrow"),z("y",["y",1],"yo","eraYear"),z("y",["yy",2],0,"eraYear"),z("y",["yyy",3],0,"eraYear"),z("y",["yyyy",4],0,"eraYear"),V("N",ga),V("NN",ga),V("NNN",ga),V("NNNN",gp),V("NNNNN",wp),Te(["N","NN","NNN","NNNN","NNNNN"],function(s,a,u,c){var d=u._locale.erasParse(s,c,u._strict);d?A(u).era=d:A(u).invalidEra=s}),V("y",Ke),V("yy",Ke),V("yyy",Ke),V("yyyy",Ke),V("yo",vp),Te(["y","yy","yyy","yyyy"],Qe),Te(["yo"],function(s,a,u,c){var d;u._locale._eraYearOrdinalRegex&&(d=s.match(u._locale._eraYearOrdinalRegex)),u._locale.eraYearOrdinalParse?a[Qe]=u._locale.eraYearOrdinalParse(s,d):a[Qe]=parseInt(s,10)});function lp(s,a){var u,c,d,_=this._eras||en("en")._eras;for(u=0,c=_.length;u=0)return _[c]}function cp(s,a){var u=s.since<=s.until?1:-1;return a===void 0?r(s.since).year():r(s.since).year()+(a-s.offset)*u}function fp(){var s,a,u,c=this.localeData().eras();for(s=0,a=c.length;s_&&(a=_),Tp.call(this,s,a,u,c,d))}function Tp(s,a,u,c,d){var _=vl(s,a,u,c,d),b=zr(_.year,0,_.dayOfYear);return this.year(b.getUTCFullYear()),this.month(b.getUTCMonth()),this.date(b.getUTCDate()),this}z("Q",0,"Qo","quarter"),V("Q",ne),Te("Q",function(s,a){a[Jt]=(de(s)-1)*3});function xp(s){return s==null?Math.ceil((this.month()+1)/3):this.month((s-1)*3+this.month()%3)}z("D",["DD",2],"Do","date"),V("D",fe,lr),V("DD",fe,te),V("Do",function(s,a){return s?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),Te(["D","DD"],Lt),Te("Do",function(s,a){a[Lt]=de(s.match(fe)[0])});var $l=ur("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),V("DDD",Ft),V("DDDD",De),Te(["DDD","DDDD"],function(s,a,u){u._dayOfYear=de(s)});function Cp(s){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return s==null?a:this.add(s-a,"d")}z("m",["mm",2],0,"minute"),V("m",fe,ra),V("mm",fe,te),Te(["m","mm"],Mt);var Yp=ur("Minutes",!1);z("s",["ss",2],0,"second"),V("s",fe,ra),V("ss",fe,te),Te(["s","ss"],Qt);var Np=ur("Seconds",!1);z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return this.millisecond()*10}),z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),V("S",Ft,ne),V("SS",Ft,te),V("SSS",Ft,De);var bn,Bl;for(bn="SSSS";bn.length<=9;bn+="S")V(bn,Ke);function Ep(s,a){a[In]=de(("0."+s)*1e3)}for(bn="S";bn.length<=9;bn+="S")Te(bn,Ep);Bl=ur("Milliseconds",!1),z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");function Pp(){return this._isUTC?"UTC":""}function Rp(){return this._isUTC?"Coordinated Universal Time":""}var N=le.prototype;N.add=Dm,N.calendar=Pm,N.clone=Rm,N.diff=Um,N.endOf=Jm,N.format=Bm,N.from=Gm,N.fromNow=zm,N.to=qm,N.toNow=Km,N.get=$d,N.invalidAt=ap,N.isAfter=Am,N.isBefore=Fm,N.isBetween=Lm,N.isSame=Im,N.isSameOrAfter=Wm,N.isSameOrBefore=jm,N.isValid=sp,N.lang=Il,N.locale=Ll,N.localeData=Wl,N.max=sm,N.min=rm,N.parsingFlags=ip,N.set=Bd,N.startOf=Zm,N.subtract=Tm,N.toArray=tp,N.toObject=np,N.toDate=ep,N.toISOString=Vm,N.inspect=$m,typeof Symbol<"u"&&Symbol.for!=null&&(N[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),N.toJSON=rp,N.toString=Hm,N.unix=Xm,N.valueOf=Qm,N.creationData=op,N.eraName=fp,N.eraNarrow=dp,N.eraAbbr=hp,N.eraYear=mp,N.year=hl,N.isLeapYear=Vd,N.weekYear=bp,N.isoWeekYear=Sp,N.quarter=N.quarters=xp,N.month=gl,N.daysInMonth=eh,N.week=N.weeks=lh,N.isoWeek=N.isoWeeks=uh,N.weeksInYear=Mp,N.weeksInWeekYear=Dp,N.isoWeeksInYear=kp,N.isoWeeksInISOWeekYear=Op,N.date=$l,N.day=N.days=Sh,N.weekday=kh,N.isoWeekday=Oh,N.dayOfYear=Cp,N.hour=N.hours=Nh,N.minute=N.minutes=Yp,N.second=N.seconds=Np,N.millisecond=N.milliseconds=Bl,N.utcOffset=hm,N.utc=pm,N.local=ym,N.parseZone=_m,N.hasAlignedHourOffset=gm,N.isDST=wm,N.isLocal=bm,N.isUtcOffset=Sm,N.isUtc=El,N.isUTC=El,N.zoneAbbr=Pp,N.zoneName=Rp,N.dates=se("dates accessor is deprecated. Use date instead.",$l),N.months=se("months accessor is deprecated. Use month instead",gl),N.years=se("years accessor is deprecated. Use year instead",hl),N.zone=se("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mm),N.isDSTShifted=se("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",vm);function Ap(s){return Pe(s*1e3)}function Fp(){return Pe.apply(null,arguments).parseZone()}function Gl(s){return s}var be=Ne.prototype;be.calendar=ht,be.longDateFormat=Ur,be.invalidDate=g,be.ordinal=x,be.preparse=Gl,be.postformat=Gl,be.relativeTime=I,be.pastFuture=P,be.set=We,be.eras=lp,be.erasParse=up,be.erasConvertYear=cp,be.erasAbbrRegex=yp,be.erasNameRegex=pp,be.erasNarrowRegex=_p,be.months=Zd,be.monthsShort=Jd,be.monthsParse=Xd,be.monthsRegex=nh,be.monthsShortRegex=th,be.week=sh,be.firstDayOfYear=oh,be.firstDayOfWeek=ah,be.weekdays=_h,be.weekdaysMin=wh,be.weekdaysShort=gh,be.weekdaysParse=bh,be.weekdaysRegex=Mh,be.weekdaysShortRegex=Dh,be.weekdaysMinRegex=Th,be.isPM=Ch,be.meridiem=Eh;function Hs(s,a,u,c){var d=en(),_=D().set(c,a);return d[u](_,s)}function zl(s,a,u){if(p(s)&&(a=s,s=void 0),s=s||"",a!=null)return Hs(s,a,u,"month");var c,d=[];for(c=0;c<12;c++)d[c]=Hs(s,c,u,"month");return d}function va(s,a,u,c){typeof s=="boolean"?(p(a)&&(u=a,a=void 0),a=a||""):(a=s,u=a,s=!1,p(a)&&(u=a,a=void 0),a=a||"");var d=en(),_=s?d._week.dow:0,b,U=[];if(u!=null)return Hs(a,(u+_)%7,c,"day");for(b=0;b<7;b++)U[b]=Hs(a,(b+_)%7,c,"day");return U}function Lp(s,a){return zl(s,a,"months")}function Ip(s,a){return zl(s,a,"monthsShort")}function Wp(s,a,u){return va(s,a,u,"weekdays")}function jp(s,a,u){return va(s,a,u,"weekdaysShort")}function Up(s,a,u){return va(s,a,u,"weekdaysMin")}vn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(s){var a=s%10,u=de(s%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return s+u}}),r.lang=se("moment.lang is deprecated. Use moment.locale instead.",vn),r.langData=se("moment.langData is deprecated. Use moment.localeData instead.",en);var tn=Math.abs;function Hp(){var s=this._data;return this._milliseconds=tn(this._milliseconds),this._days=tn(this._days),this._months=tn(this._months),s.milliseconds=tn(s.milliseconds),s.seconds=tn(s.seconds),s.minutes=tn(s.minutes),s.hours=tn(s.hours),s.months=tn(s.months),s.years=tn(s.years),this}function ql(s,a,u,c){var d=Dt(a,u);return s._milliseconds+=c*d._milliseconds,s._days+=c*d._days,s._months+=c*d._months,s._bubble()}function Vp(s,a){return ql(this,s,a,1)}function $p(s,a){return ql(this,s,a,-1)}function Kl(s){return s<0?Math.floor(s):Math.ceil(s)}function Bp(){var s=this._milliseconds,a=this._days,u=this._months,c=this._data,d,_,b,U,re;return s>=0&&a>=0&&u>=0||s<=0&&a<=0&&u<=0||(s+=Kl(ba(u)+a)*864e5,a=0,u=0),c.milliseconds=s%1e3,d=mt(s/1e3),c.seconds=d%60,_=mt(d/60),c.minutes=_%60,b=mt(_/60),c.hours=b%24,a+=mt(b/24),re=mt(Zl(a)),u+=re,a-=Kl(ba(re)),U=mt(u/12),u%=12,c.days=a,c.months=u,c.years=U,this}function Zl(s){return s*4800/146097}function ba(s){return s*146097/4800}function Gp(s){if(!this.isValid())return NaN;var a,u,c=this._milliseconds;if(s=T(s),s==="month"||s==="quarter"||s==="year")switch(a=this._days+c/864e5,u=this._months+Zl(a),s){case"month":return u;case"quarter":return u/3;case"year":return u/12}else switch(a=this._days+Math.round(ba(this._months)),s){case"week":return a/7+c/6048e5;case"day":return a+c/864e5;case"hour":return a*24+c/36e5;case"minute":return a*1440+c/6e4;case"second":return a*86400+c/1e3;case"millisecond":return Math.floor(a*864e5)+c;default:throw new Error("Unknown unit "+s)}}function nn(s){return function(){return this.as(s)}}var Jl=nn("ms"),zp=nn("s"),qp=nn("m"),Kp=nn("h"),Zp=nn("d"),Jp=nn("w"),Qp=nn("M"),Xp=nn("Q"),ey=nn("y"),ty=Jl;function ny(){return Dt(this)}function ry(s){return s=T(s),this.isValid()?this[s+"s"]():NaN}function jn(s){return function(){return this.isValid()?this._data[s]:NaN}}var sy=jn("milliseconds"),iy=jn("seconds"),ay=jn("minutes"),oy=jn("hours"),ly=jn("days"),uy=jn("months"),cy=jn("years");function fy(){return mt(this.days()/7)}var rn=Math.round,hr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function dy(s,a,u,c,d){return d.relativeTime(a||1,!!u,s,c)}function hy(s,a,u,c){var d=Dt(s).abs(),_=rn(d.as("s")),b=rn(d.as("m")),U=rn(d.as("h")),re=rn(d.as("d")),me=rn(d.as("M")),st=rn(d.as("w")),sn=rn(d.as("y")),Sn=_<=u.ss&&["s",_]||_0,Sn[4]=c,dy.apply(null,Sn)}function my(s){return s===void 0?rn:typeof s=="function"?(rn=s,!0):!1}function py(s,a){return hr[s]===void 0?!1:a===void 0?hr[s]:(hr[s]=a,s==="s"&&(hr.ss=a-1),!0)}function yy(s,a){if(!this.isValid())return this.localeData().invalidDate();var u=!1,c=hr,d,_;return typeof s=="object"&&(a=s,s=!1),typeof s=="boolean"&&(u=s),typeof a=="object"&&(c=Object.assign({},hr,a),a.s!=null&&a.ss==null&&(c.ss=a.s-1)),d=this.localeData(),_=hy(this,!u,c,d),u&&(_=d.pastFuture(+this,_)),d.postformat(_)}var Sa=Math.abs;function mr(s){return(s>0)-(s<0)||+s}function Vs(){if(!this.isValid())return this.localeData().invalidDate();var s=Sa(this._milliseconds)/1e3,a=Sa(this._days),u=Sa(this._months),c,d,_,b,U=this.asSeconds(),re,me,st,sn;return U?(c=mt(s/60),d=mt(c/60),s%=60,c%=60,_=mt(u/12),u%=12,b=s?s.toFixed(3).replace(/\.?0+$/,""):"",re=U<0?"-":"",me=mr(this._months)!==mr(U)?"-":"",st=mr(this._days)!==mr(U)?"-":"",sn=mr(this._milliseconds)!==mr(U)?"-":"",re+"P"+(_?me+_+"Y":"")+(u?me+u+"M":"")+(a?st+a+"D":"")+(d||c||s?"T":"")+(d?sn+d+"H":"")+(c?sn+c+"M":"")+(s?sn+b+"S":"")):"P0D"}var pe=Fs.prototype;pe.isValid=um,pe.abs=Hp,pe.add=Vp,pe.subtract=$p,pe.as=Gp,pe.asMilliseconds=Jl,pe.asSeconds=zp,pe.asMinutes=qp,pe.asHours=Kp,pe.asDays=Zp,pe.asWeeks=Jp,pe.asMonths=Qp,pe.asQuarters=Xp,pe.asYears=ey,pe.valueOf=ty,pe._bubble=Bp,pe.clone=ny,pe.get=ry,pe.milliseconds=sy,pe.seconds=iy,pe.minutes=ay,pe.hours=oy,pe.days=ly,pe.weeks=fy,pe.months=uy,pe.years=cy,pe.humanize=yy,pe.toISOString=Vs,pe.toString=Vs,pe.toJSON=Vs,pe.locale=Ll,pe.localeData=Wl,pe.toIsoString=se("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Vs),pe.lang=Il,z("X",0,0,"unix"),z("x",0,0,"valueOf"),V("x",Ln),V("X",Ld),Te("X",function(s,a,u){u._d=new Date(parseFloat(s)*1e3)}),Te("x",function(s,a,u){u._d=new Date(de(s))});//! moment.js +return r.version="2.30.1",i(Pe),r.fn=N,r.min=im,r.max=am,r.now=om,r.utc=D,r.unix=Ap,r.months=Lp,r.isDate=w,r.locale=vn,r.invalid=S,r.duration=Dt,r.isMoment=j,r.weekdays=Wp,r.parseZone=Fp,r.localeData=en,r.isDuration=Ls,r.monthsShort=Ip,r.weekdaysMin=Up,r.defineLocale=ua,r.updateLocale=Fh,r.locales=Lh,r.weekdaysShort=jp,r.normalizeUnits=T,r.relativeTimeRounding=my,r.relativeTimeThreshold=py,r.calendarFormat=Em,r.prototype=N,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})}(nS)),bi}(function(e,t){(function(n,r){r(typeof nd=="function"?rS():n.moment)})(td,function(n){//! moment.js locale configuration +var r=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,o=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,l=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],f=n.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:r,monthsShortStrictRegex:i,monthsParse:l,longMonthsParse:l,shortMonthsParse:l,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(h,m){switch(m){case"D":return h+(h===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return h+(h===1?"er":"e");case"w":case"W":return h+(h===1?"re":"e")}},week:{dow:1,doy:4}});return f})})();function rd(e,t){return function(){return e.apply(t,arguments)}}const{toString:sS}=Object.prototype,{getPrototypeOf:il}=Object,Zi=(e=>t=>{const n=sS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zt=e=>(e=e.toLowerCase(),t=>Zi(t)===e),Ji=e=>t=>typeof t===e,{isArray:Ir}=Array,vs=Ji("undefined");function iS(e){return e!==null&&!vs(e)&&e.constructor!==null&&!vs(e.constructor)&&vt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sd=zt("ArrayBuffer");function aS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sd(e.buffer),t}const oS=Ji("string"),vt=Ji("function"),id=Ji("number"),Qi=e=>e!==null&&typeof e=="object",lS=e=>e===!0||e===!1,ai=e=>{if(Zi(e)!=="object")return!1;const t=il(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},uS=zt("Date"),cS=zt("File"),fS=zt("Blob"),dS=zt("FileList"),hS=e=>Qi(e)&&vt(e.pipe),mS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||vt(e.append)&&((t=Zi(e))==="formdata"||t==="object"&&vt(e.toString)&&e.toString()==="[object FormData]"))},pS=zt("URLSearchParams"),yS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ir(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const od=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ld=e=>!vs(e)&&e!==od;function ao(){const{caseless:e}=ld(this)&&this||{},t={},n=(r,i)=>{const o=e&&ad(t,i)||i;ai(t[o])&&ai(r)?t[o]=ao(t[o],r):ai(r)?t[o]=ao({},r):Ir(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(xs(t,(i,o)=>{n&&vt(i)?e[o]=rd(i,n):e[o]=i},{allOwnKeys:r}),e),gS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},vS=(e,t,n,r)=>{let i,o,l;const f={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,t))&&!f[l]&&(t[l]=e[l],f[l]=!0);e=n!==!1&&il(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},SS=e=>{if(!e)return null;if(Ir(e))return e;let t=e.length;if(!id(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},kS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&il(Uint8Array)),OS=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},MS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},DS=zt("HTMLFormElement"),TS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Hu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xS=zt("RegExp"),ud=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};xs(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},CS=e=>{ud(e,(t,n)=>{if(vt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(vt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},YS=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ir(e)?r(e):r(String(e).split(t)),n},NS=()=>{},ES=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Ra="abcdefghijklmnopqrstuvwxyz",Vu="0123456789",cd={DIGIT:Vu,ALPHA:Ra,ALPHA_DIGIT:Ra+Ra.toUpperCase()+Vu},PS=(e=16,t=cd.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function RS(e){return!!(e&&vt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const AS=e=>{const t=new Array(10),n=(r,i)=>{if(Qi(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Ir(r)?[]:{};return xs(r,(l,f)=>{const h=n(l,i+1);!vs(h)&&(o[f]=h)}),t[i]=void 0,o}}return r};return n(e,0)},FS=zt("AsyncFunction"),LS=e=>e&&(Qi(e)||vt(e))&&vt(e.then)&&vt(e.catch),O={isArray:Ir,isArrayBuffer:sd,isBuffer:iS,isFormData:mS,isArrayBufferView:aS,isString:oS,isNumber:id,isBoolean:lS,isObject:Qi,isPlainObject:ai,isUndefined:vs,isDate:uS,isFile:cS,isBlob:fS,isRegExp:xS,isFunction:vt,isStream:hS,isURLSearchParams:pS,isTypedArray:kS,isFileList:dS,forEach:xs,merge:ao,extend:_S,trim:yS,stripBOM:gS,inherits:wS,toFlatObject:vS,kindOf:Zi,kindOfTest:zt,endsWith:bS,toArray:SS,forEachEntry:OS,matchAll:MS,isHTMLForm:DS,hasOwnProperty:Hu,hasOwnProp:Hu,reduceDescriptors:ud,freezeMethods:CS,toObjectSet:YS,toCamelCase:TS,noop:NS,toFiniteNumber:ES,findKey:ad,global:od,isContextDefined:ld,ALPHABET:cd,generateString:PS,isSpecCompliantForm:RS,toJSONObject:AS,isAsyncFn:FS,isThenable:LS};function ge(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}O.inherits(ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const fd=ge.prototype,dd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{dd[e]={value:e}});Object.defineProperties(ge,dd);Object.defineProperty(fd,"isAxiosError",{value:!0});ge.from=(e,t,n,r,i,o)=>{const l=Object.create(fd);return O.toFlatObject(e,l,function(h){return h!==Error.prototype},f=>f!=="isAxiosError"),ge.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};const IS=null;function oo(e){return O.isPlainObject(e)||O.isArray(e)}function hd(e){return O.endsWith(e,"[]")?e.slice(0,-2):e}function $u(e,t,n){return e?e.concat(t).map(function(i,o){return i=hd(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function WS(e){return O.isArray(e)&&!e.some(oo)}const jS=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Xi(e,t,n){if(!O.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=O.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Y,A){return!O.isUndefined(A[Y])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,l=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(t);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function m(D){if(D===null)return"";if(O.isDate(D))return D.toISOString();if(!h&&O.isBlob(D))throw new ge("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(D)||O.isTypedArray(D)?h&&typeof Blob=="function"?new Blob([D]):Buffer.from(D):D}function p(D,Y,A){let G=D;if(D&&!A&&typeof D=="object"){if(O.endsWith(Y,"{}"))Y=r?Y:Y.slice(0,-2),D=JSON.stringify(D);else if(O.isArray(D)&&WS(D)||(O.isFileList(D)||O.endsWith(Y,"[]"))&&(G=O.toArray(D)))return Y=hd(Y),G.forEach(function(S,F){!(O.isUndefined(S)||S===null)&&t.append(l===!0?$u([Y],F,o):l===null?Y:Y+"[]",m(S))}),!1}return oo(D)?!0:(t.append($u(A,Y,o),m(D)),!1)}const w=[],v=Object.assign(jS,{defaultVisitor:p,convertValue:m,isVisitable:oo});function M(D,Y){if(!O.isUndefined(D)){if(w.indexOf(D)!==-1)throw Error("Circular reference detected in "+Y.join("."));w.push(D),O.forEach(D,function(G,X){(!(O.isUndefined(G)||G===null)&&i.call(t,G,O.isString(X)?X.trim():X,Y,v))===!0&&M(G,Y?Y.concat(X):[X])}),w.pop()}}if(!O.isObject(e))throw new TypeError("data must be an object");return M(e),t}function Bu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function al(e,t){this._pairs=[],e&&Xi(e,this,t)}const md=al.prototype;md.append=function(t,n){this._pairs.push([t,n])};md.toString=function(t){const n=t?function(r){return t.call(this,r,Bu)}:Bu;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function US(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pd(e,t,n){if(!t)return e;const r=n&&n.encode||US,i=n&&n.serialize;let o;if(i?o=i(t,n):o=O.isURLSearchParams(t)?t.toString():new al(t,n).toString(r),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class HS{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Gu=HS,yd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},VS=typeof URLSearchParams<"u"?URLSearchParams:al,$S=typeof FormData<"u"?FormData:null,BS=typeof Blob<"u"?Blob:null,GS=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),zS=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ht={isBrowser:!0,classes:{URLSearchParams:VS,FormData:$S,Blob:BS},isStandardBrowserEnv:GS,isStandardBrowserWebWorkerEnv:zS,protocols:["http","https","file","blob","url","data"]};function qS(e,t){return Xi(e,new Ht.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Ht.isNode&&O.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function KS(e){return O.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ZS(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return l=!l&&O.isArray(i)?i.length:l,h?(O.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!f):((!i[l]||!O.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&O.isArray(i[l])&&(i[l]=ZS(i[l])),!f)}if(O.isFormData(e)&&O.isFunction(e.entries)){const n={};return O.forEachEntry(e,(r,i)=>{t(KS(r),i,n,0)}),n}return null}const JS={"Content-Type":void 0};function QS(e,t,n){if(O.isString(e))try{return(t||JSON.parse)(e),O.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ea={transitional:yd,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=O.isObject(t);if(o&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return i&&i?JSON.stringify(_d(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return qS(t,this.formSerializer).toString();if((f=O.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Xi(f?{"files[]":t}:t,h&&new h,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),QS(t)):t}],transformResponse:[function(t){const n=this.transitional||ea.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&O.isString(t)&&(r&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(f){if(l)throw f.name==="SyntaxError"?ge.from(f,ge.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};O.forEach(["delete","get","head"],function(t){ea.headers[t]={}});O.forEach(["post","put","patch"],function(t){ea.headers[t]=O.merge(JS)});const ol=ea,XS=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ek=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&XS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},zu=Symbol("internals");function ns(e){return e&&String(e).trim().toLowerCase()}function oi(e){return e===!1||e==null?e:O.isArray(e)?e.map(oi):String(e)}function tk(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const nk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Aa(e,t,n,r,i){if(O.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!O.isString(t)){if(O.isString(r))return t.indexOf(r)!==-1;if(O.isRegExp(r))return r.test(t)}}function rk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function sk(e,t){const n=O.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,l){return this[r].call(this,t,i,o,l)},configurable:!0})})}class ta{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(f,h,m){const p=ns(h);if(!p)throw new Error("header name must be a non-empty string");const w=O.findKey(i,p);(!w||i[w]===void 0||m===!0||m===void 0&&i[w]!==!1)&&(i[w||h]=oi(f))}const l=(f,h)=>O.forEach(f,(m,p)=>o(m,p,h));return O.isPlainObject(t)||t instanceof this.constructor?l(t,n):O.isString(t)&&(t=t.trim())&&!nk(t)?l(ek(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=ns(t),t){const r=O.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return tk(i);if(O.isFunction(n))return n.call(this,i,r);if(O.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ns(t),t){const r=O.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Aa(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(l){if(l=ns(l),l){const f=O.findKey(r,l);f&&(!n||Aa(r,r[f],f,n))&&(delete r[f],i=!0)}}return O.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Aa(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return O.forEach(this,(i,o)=>{const l=O.findKey(r,o);if(l){n[l]=oi(i),delete n[o];return}const f=t?rk(o):String(o).trim();f!==o&&delete n[o],n[f]=oi(i),r[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return O.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&O.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[zu]=this[zu]={accessors:{}}).accessors,i=this.prototype;function o(l){const f=ns(l);r[f]||(sk(i,l),r[f]=!0)}return O.isArray(t)?t.forEach(o):o(t),this}}ta.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.freezeMethods(ta.prototype);O.freezeMethods(ta);const hn=ta;function Fa(e,t){const n=this||ol,r=t||n,i=hn.from(r.headers);let o=r.data;return O.forEach(e,function(f){o=f.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function gd(e){return!!(e&&e.__CANCEL__)}function Cs(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}O.inherits(Cs,ge,{__CANCEL__:!0});function ik(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ak=Ht.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,l,f){const h=[];h.push(n+"="+encodeURIComponent(r)),O.isNumber(i)&&h.push("expires="+new Date(i).toGMTString()),O.isString(o)&&h.push("path="+o),O.isString(l)&&h.push("domain="+l),f===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function ok(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lk(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function wd(e,t){return e&&!ok(t)?lk(e,t):t}const uk=Ht.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let l=o;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){const f=O.isString(l)?i(l):l;return f.protocol===r.protocol&&f.host===r.host}}():function(){return function(){return!0}}();function ck(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fk(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,l;return t=t!==void 0?t:1e3,function(h){const m=Date.now(),p=r[o];l||(l=m),n[i]=h,r[i]=m;let w=o,v=0;for(;w!==i;)v+=n[w++],w=w%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),m-l{const o=i.loaded,l=i.lengthComputable?i.total:void 0,f=o-n,h=r(f),m=o<=l;n=o;const p={loaded:o,total:l,progress:l?o/l:void 0,bytes:f,rate:h||void 0,estimated:h&&l&&m?(l-o)/h:void 0,event:i};p[t?"download":"upload"]=!0,e(p)}}const dk=typeof XMLHttpRequest<"u",hk=dk&&function(e){return new Promise(function(n,r){let i=e.data;const o=hn.from(e.headers).normalize(),l=e.responseType;let f;function h(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}O.isFormData(i)&&(Ht.isStandardBrowserEnv||Ht.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let m=new XMLHttpRequest;if(e.auth){const M=e.auth.username||"",D=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(M+":"+D))}const p=wd(e.baseURL,e.url);m.open(e.method.toUpperCase(),pd(p,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function w(){if(!m)return;const M=hn.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),Y={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:M,config:e,request:m};ik(function(G){n(G),h()},function(G){r(G),h()},Y),m=null}if("onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(w)},m.onabort=function(){m&&(r(new ge("Request aborted",ge.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let D=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const Y=e.transitional||yd;e.timeoutErrorMessage&&(D=e.timeoutErrorMessage),r(new ge(D,Y.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,m)),m=null},Ht.isStandardBrowserEnv){const M=(e.withCredentials||uk(p))&&e.xsrfCookieName&&ak.read(e.xsrfCookieName);M&&o.set(e.xsrfHeaderName,M)}i===void 0&&o.setContentType(null),"setRequestHeader"in m&&O.forEach(o.toJSON(),function(D,Y){m.setRequestHeader(Y,D)}),O.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),l&&l!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",qu(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",qu(e.onUploadProgress)),(e.cancelToken||e.signal)&&(f=M=>{m&&(r(!M||M.type?new Cs(null,e,m):M),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f)));const v=ck(p);if(v&&Ht.protocols.indexOf(v)===-1){r(new ge("Unsupported protocol "+v+":",ge.ERR_BAD_REQUEST,e));return}m.send(i||null)})},li={http:IS,xhr:hk};O.forEach(li,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mk={getAdapter:e=>{e=O.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof hn?e.toJSON():e;function Nr(e,t){t=t||{};const n={};function r(m,p,w){return O.isPlainObject(m)&&O.isPlainObject(p)?O.merge.call({caseless:w},m,p):O.isPlainObject(p)?O.merge({},p):O.isArray(p)?p.slice():p}function i(m,p,w){if(O.isUndefined(p)){if(!O.isUndefined(m))return r(void 0,m,w)}else return r(m,p,w)}function o(m,p){if(!O.isUndefined(p))return r(void 0,p)}function l(m,p){if(O.isUndefined(p)){if(!O.isUndefined(m))return r(void 0,m)}else return r(void 0,p)}function f(m,p,w){if(w in t)return r(m,p);if(w in e)return r(void 0,m)}const h={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:f,headers:(m,p)=>i(Zu(m),Zu(p),!0)};return O.forEach(Object.keys(Object.assign({},e,t)),function(p){const w=h[p]||i,v=w(e[p],t[p],p);O.isUndefined(v)&&w!==f||(n[p]=v)}),n}const vd="1.4.0",ll={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ll[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ju={};ll.transitional=function(t,n,r){function i(o,l){return"[Axios v"+vd+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,f)=>{if(t===!1)throw new ge(i(l," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!Ju[l]&&(Ju[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,f):!0}};function pk(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],l=t[o];if(l){const f=e[o],h=f===void 0||l(f,o,e);if(h!==!0)throw new ge("option "+o+" must be "+h,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const lo={assertOptions:pk,validators:ll},Dn=lo.validators;class Si{constructor(t){this.defaults=t,this.interceptors={request:new Gu,response:new Gu}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Nr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&lo.assertOptions(r,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),i!=null&&(O.isFunction(i)?n.paramsSerializer={serialize:i}:lo.assertOptions(i,{encode:Dn.function,serialize:Dn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l;l=o&&O.merge(o.common,o[n.method]),l&&O.forEach(["delete","get","head","post","put","patch","common"],D=>{delete o[D]}),n.headers=hn.concat(l,o);const f=[];let h=!0;this.interceptors.request.forEach(function(Y){typeof Y.runWhen=="function"&&Y.runWhen(n)===!1||(h=h&&Y.synchronous,f.unshift(Y.fulfilled,Y.rejected))});const m=[];this.interceptors.response.forEach(function(Y){m.push(Y.fulfilled,Y.rejected)});let p,w=0,v;if(!h){const D=[Ku.bind(this),void 0];for(D.unshift.apply(D,f),D.push.apply(D,m),v=D.length,p=Promise.resolve(n);w{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const l=new Promise(f=>{r.subscribe(f),o=f}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,f){r.reason||(r.reason=new Cs(o,l,f),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ul(function(i){t=i}),cancel:t}}}const yk=ul;function _k(e){return function(n){return e.apply(null,n)}}function gk(e){return O.isObject(e)&&e.isAxiosError===!0}const uo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uo).forEach(([e,t])=>{uo[t]=e});const wk=uo;function bd(e){const t=new ui(e),n=rd(ui.prototype.request,t);return O.extend(n,ui.prototype,t,{allOwnKeys:!0}),O.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return bd(Nr(e,i))},n}const Ge=bd(ol);Ge.Axios=ui;Ge.CanceledError=Cs;Ge.CancelToken=yk;Ge.isCancel=gd;Ge.VERSION=vd;Ge.toFormData=Xi;Ge.AxiosError=ge;Ge.Cancel=Ge.CanceledError;Ge.all=function(t){return Promise.all(t)};Ge.spread=_k;Ge.isAxiosError=gk;Ge.mergeConfig=Nr;Ge.AxiosHeaders=hn;Ge.formToJSON=e=>_d(O.isHTMLForm(e)?new FormData(e):e);Ge.HttpStatusCode=wk;Ge.default=Ge;const mO=Ge;function vk(){return Sd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Sd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const bk=typeof Proxy=="function",Sk="devtools-plugin:setup",kk="plugin:settings:set";let yr,co;function Ok(){var e;return yr!==void 0||(typeof window<"u"&&window.performance?(yr=!0,co=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(yr=!0,co=globalThis.perf_hooks.performance):yr=!1),yr}function Mk(){return Ok()?co.now():Date.now()}class Dk{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const l in t.settings){const f=t.settings[l];r[l]=f.defaultValue}const i=`__vue-devtools-plugin-settings__${t.id}`;let o=Object.assign({},r);try{const l=localStorage.getItem(i),f=JSON.parse(l);Object.assign(o,f)}catch{}this.fallbacks={getSettings(){return o},setSettings(l){try{localStorage.setItem(i,JSON.stringify(l))}catch{}o=l},now(){return Mk()}},n&&n.on(kk,(l,f)=>{l===this.plugin.id&&this.fallbacks.setSettings(f)}),this.proxiedOn=new Proxy({},{get:(l,f)=>this.target?this.target.on[f]:(...h)=>{this.onQueue.push({method:f,args:h})}}),this.proxiedTarget=new Proxy({},{get:(l,f)=>this.target?this.target[f]:f==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(f)?(...h)=>(this.targetQueue.push({method:f,args:h,resolve:()=>{}}),this.fallbacks[f](...h)):(...h)=>new Promise(m=>{this.targetQueue.push({method:f,args:h,resolve:m})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Tk(e,t){const n=e,r=Sd(),i=vk(),o=bk&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!o))i.emit(Sk,e,t);else{const l=o?new Dk(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:l}),l&&t(l.proxiedTarget)}}/*! * vuex v4.1.0 * (c) 2022 Evan You * @license MIT - */var Yk="store";function Gr(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function Nk(e){return e!==null&&typeof e=="object"}function Ek(e){return e&&typeof e.then=="function"}function Rk(e,t){return function(){return e(t)}}function mh(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function ph(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;_o(e,n,[],e._modules.root,!0),Rl(e,n,t)}function Rl(e,t,n){var r=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,l={},c={},d=S_(!0);d.run(function(){Gr(o,function(p,m){l[m]=Rk(p,e),c[m]=sl(function(){return l[m]()}),Object.defineProperty(e.getters,m,{get:function(){return c[m].value},enumerable:!0})})}),e._state=Ps({data:t}),e._scope=d,e.strict&&Ik(e),r&&n&&e._withCommit(function(){r.data=null}),i&&i.stop()}function _o(e,t,n,r,i){var o=!n.length,l=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[l],e._modulesNamespaceMap[l]=r),!o&&!i){var c=Pl(t,n.slice(0,-1)),d=n[n.length-1];e._withCommit(function(){c[d]=r.state})}var p=r.context=Pk(e,l,n);r.forEachMutation(function(m,y){var v=l+y;Ak(e,v,m,p)}),r.forEachAction(function(m,y){var v=m.root?y:l+y,M=m.handler||m;Fk(e,v,M,p)}),r.forEachGetter(function(m,y){var v=l+y;Lk(e,v,m,p)}),r.forEachChild(function(m,y){_o(e,t,n.concat(y),m,i)})}function Pk(e,t,n){var r=t==="",i={dispatch:r?e.dispatch:function(o,l,c){var d=Li(o,l,c),p=d.payload,m=d.options,y=d.type;return(!m||!m.root)&&(y=t+y),e.dispatch(y,p)},commit:r?e.commit:function(o,l,c){var d=Li(o,l,c),p=d.payload,m=d.options,y=d.type;(!m||!m.root)&&(y=t+y),e.commit(y,p,m)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return yh(e,t)}},state:{get:function(){return Pl(e.state,n)}}}),i}function yh(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(i){if(i.slice(0,r)===t){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return e.getters[i]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Ak(e,t,n,r){var i=e._mutations[t]||(e._mutations[t]=[]);i.push(function(l){n.call(e,r.state,l)})}function Fk(e,t,n,r){var i=e._actions[t]||(e._actions[t]=[]);i.push(function(l){var c=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},l);return Ek(c)||(c=Promise.resolve(c)),e._devtoolHook?c.catch(function(d){throw e._devtoolHook.emit("vuex:error",d),d}):c})}function Lk(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(o){return n(r.state,r.getters,o.state,o.getters)})}function Ik(e){Ar(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function Pl(e,t){return t.reduce(function(n,r){return n[r]},e)}function Li(e,t,n){return Nk(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Wk="vuex bindings",Dc="vuex:mutations",ia="vuex:actions",Mr="vuex",jk=0;function Uk(e,t){Ck({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Wk]},function(n){n.addTimelineLayer({id:Dc,label:"Vuex Mutations",color:Tc}),n.addTimelineLayer({id:ia,label:"Vuex Actions",color:Tc}),n.addInspector({id:Mr,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===Mr)if(r.filter){var i=[];vh(i,t._modules.root,r.filter,""),r.rootNodes=i}else r.rootNodes=[wh(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===Mr){var i=r.nodeId;yh(t,i),r.state=$k(Gk(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===Mr){var i=r.nodeId,o=r.path;i!=="root"&&(o=i.split("/").filter(Boolean).concat(o)),t._withCommit(function(){r.set(t._state.data,o,r.state.value)})}}),t.subscribe(function(r,i){var o={};r.payload&&(o.payload=r.payload),o.state=i,n.notifyComponentUpdate(),n.sendInspectorTree(Mr),n.sendInspectorState(Mr),n.addTimelineEvent({layerId:Dc,event:{time:Date.now(),title:r.type,data:o}})}),t.subscribeAction({before:function(r,i){var o={};r.payload&&(o.payload=r.payload),r._id=jk++,r._time=Date.now(),o.state=i,n.addTimelineEvent({layerId:ia,event:{time:r._time,title:r.type,groupId:r._id,subtitle:"start",data:o}})},after:function(r,i){var o={},l=Date.now()-r._time;o.duration={_custom:{type:"duration",display:l+"ms",tooltip:"Action duration",value:l}},r.payload&&(o.payload=r.payload),o.state=i,n.addTimelineEvent({layerId:ia,event:{time:Date.now(),title:r.type,groupId:r._id,subtitle:"end",data:o}})}})})}var Tc=8702998,Hk=6710886,Vk=16777215,_h={label:"namespaced",textColor:Vk,backgroundColor:Hk};function gh(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function wh(e,t){return{id:t||"root",label:gh(t),tags:e.namespaced?[_h]:[],children:Object.keys(e._children).map(function(n){return wh(e._children[n],t+n+"/")})}}function vh(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[_h]:[]}),Object.keys(t._children).forEach(function(i){vh(e,t._children[i],n,r+i+"/")})}function $k(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),i={state:Object.keys(e.state).map(function(l){return{key:l,editable:!0,value:e.state[l]}})};if(r.length){var o=Bk(t);i.getters=Object.keys(o).map(function(l){return{key:l.endsWith("/")?gh(l):l,editable:!1,value:Aa(function(){return o[l]})}})}return i}function Bk(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var i=t,o=r.pop();r.forEach(function(l){i[l]||(i[l]={_custom:{value:{},display:l,tooltip:"Module",abstract:!0}}),i=i[l]._custom.value}),i[o]=Aa(function(){return e[n]})}else t[n]=Aa(function(){return e[n]})}),t}function Gk(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,i,o){var l=r[i];if(!l)throw new Error('Missing module "'+i+'" for path "'+t+'".');return o===n.length-1?l:l._children},t==="root"?e:e.root._children)}function Aa(e){try{return e()}catch(t){return t}}var $t=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},Sh={namespaced:{configurable:!0}};Sh.namespaced.get=function(){return!!this._rawModule.namespaced};$t.prototype.addChild=function(t,n){this._children[t]=n};$t.prototype.removeChild=function(t){delete this._children[t]};$t.prototype.getChild=function(t){return this._children[t]};$t.prototype.hasChild=function(t){return t in this._children};$t.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};$t.prototype.forEachChild=function(t){Gr(this._children,t)};$t.prototype.forEachGetter=function(t){this._rawModule.getters&&Gr(this._rawModule.getters,t)};$t.prototype.forEachAction=function(t){this._rawModule.actions&&Gr(this._rawModule.actions,t)};$t.prototype.forEachMutation=function(t){this._rawModule.mutations&&Gr(this._rawModule.mutations,t)};Object.defineProperties($t.prototype,Sh);var dr=function(t){this.register([],t,!1)};dr.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)};dr.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,i){return n=n.getChild(i),r+(n.namespaced?i+"/":"")},"")};dr.prototype.update=function(t){bh([],this.root,t)};dr.prototype.register=function(t,n,r){var i=this;r===void 0&&(r=!0);var o=new $t(n,r);if(t.length===0)this.root=o;else{var l=this.get(t.slice(0,-1));l.addChild(t[t.length-1],o)}n.modules&&Gr(n.modules,function(c,d){i.register(t.concat(d),c,r)})};dr.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],i=n.getChild(r);i&&i.runtime&&n.removeChild(r)};dr.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function bh(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return;bh(e.concat(r),t.getChild(r),n.modules[r])}}function p1(e){return new pt(e)}var pt=function(t){var n=this;t===void 0&&(t={});var r=t.plugins;r===void 0&&(r=[]);var i=t.strict;i===void 0&&(i=!1);var o=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new dr(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var l=this,c=this,d=c.dispatch,p=c.commit;this.dispatch=function(v,M){return d.call(l,v,M)},this.commit=function(v,M,T){return p.call(l,v,M,T)},this.strict=i;var m=this._modules.root.state;_o(this,m,[],this._modules.root),Rl(this,m),r.forEach(function(y){return y(n)})},Al={state:{configurable:!0}};pt.prototype.install=function(t,n){t.provide(n||Yk,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!1;r&&Uk(t,this)};Al.state.get=function(){return this._state.data};Al.state.set=function(e){};pt.prototype.commit=function(t,n,r){var i=this,o=Li(t,n,r),l=o.type,c=o.payload,d={type:l,payload:c},p=this._mutations[l];p&&(this._withCommit(function(){p.forEach(function(y){y(c)})}),this._subscribers.slice().forEach(function(m){return m(d,i.state)}))};pt.prototype.dispatch=function(t,n){var r=this,i=Li(t,n),o=i.type,l=i.payload,c={type:o,payload:l},d=this._actions[o];if(d){try{this._actionSubscribers.slice().filter(function(m){return m.before}).forEach(function(m){return m.before(c,r.state)})}catch{}var p=d.length>1?Promise.all(d.map(function(m){return m(l)})):d[0](l);return new Promise(function(m,y){p.then(function(v){try{r._actionSubscribers.filter(function(M){return M.after}).forEach(function(M){return M.after(c,r.state)})}catch{}m(v)},function(v){try{r._actionSubscribers.filter(function(M){return M.error}).forEach(function(M){return M.error(c,r.state,v)})}catch{}y(v)})})}};pt.prototype.subscribe=function(t,n){return mh(t,this._subscribers,n)};pt.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return mh(r,this._actionSubscribers,n)};pt.prototype.watch=function(t,n,r){var i=this;return Ar(function(){return t(i.state,i.getters)},n,Object.assign({},r))};pt.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};pt.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),_o(this,this.state,t,this._modules.get(t),r.preserveState),Rl(this,this.state)};pt.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var r=Pl(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),ph(this)};pt.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};pt.prototype.hotUpdate=function(t){this._modules.update(t),ph(this,!0)};pt.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(pt.prototype,Al);var Ii={d:(e,t)=>{for(var n in t)Ii.o(t,n)&&!Ii.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},Oh={};function Fa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nJk});const ee=(xc={computed:()=>sl,createTextVNode:()=>Vf,createVNode:()=>st,defineComponent:()=>og,reactive:()=>Ps,ref:()=>V_,watch:()=>Ar,watchEffect:()=>jg},oa={},Ii.d(oa,xc),oa),zk=(0,ee.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var e=this.data,t=this.onClick;return(0,ee.createVNode)("span",{class:"vjs-tree-brackets",onClick:t},[e])}}),qk=(0,ee.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(e,t){var n=t.emit;return{uiType:(0,ee.computed)(function(){return e.isMultiple?"checkbox":"radio"}),model:(0,ee.computed)({get:function(){return e.checked},set:function(r){return n("update:modelValue",r)}})}},render:function(){var e=this.uiType,t=this.model,n=this.$emit;return(0,ee.createVNode)("label",{class:["vjs-check-controller",t?"is-checked":""],onClick:function(r){return r.stopPropagation()}},[(0,ee.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(e)},null),(0,ee.createVNode)("input",{checked:t,class:"vjs-check-controller-original is-".concat(e),type:e,onChange:function(){return n("change",t)}},null)])}}),Kk=(0,ee.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var e=this.nodeType,t=this.onClick,n=e==="objectStart"||e==="arrayStart";return n||e==="objectCollapsed"||e==="arrayCollapsed"?(0,ee.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(n?"open":"close"),onClick:t},[(0,ee.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,ee.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var xc,oa;function La(e){return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function Mh(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function rr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=r||{},o=i.key,l=i.index,c=i.type,d=c===void 0?"content":c,p=i.showComma,m=p!==void 0&&p,y=i.length,v=y===void 0?1:y,M=Mh(e);if(M==="array"){var T=Cc(e.map(function(H,I,O){return rr(H,"".concat(t,"[").concat(I,"]"),n+1,{index:I,showComma:I!==O.length-1,length:v,type:d})}));return[rr("[",t,n,{showComma:!1,key:o,length:e.length,type:"arrayStart"})[0]].concat(T,rr("]",t,n,{showComma:m,length:e.length,type:"arrayEnd"})[0])}if(M==="object"){var F=Object.keys(e),D=Cc(F.map(function(H,I,O){return rr(e[H],/^[a-zA-Z_]\w*$/.test(H)?"".concat(t,".").concat(H):"".concat(t,'["').concat(H,'"]'),n+1,{key:H,showComma:I!==O.length-1,length:v,type:d})}));return[rr("{",t,n,{showComma:!1,key:o,index:l,length:F.length,type:"objectStart"})[0]].concat(D,rr("}",t,n,{showComma:m,length:F.length,type:"objectEnd"})[0])}return[{content:e,level:n,key:o,index:l,path:t,showComma:m,length:v,type:d}]}function Cc(e){if(typeof Array.prototype.flat=="function")return e.flat();for(var t=Wi(e),n=[];t.length;){var r=t.shift();Array.isArray(r)?t.unshift.apply(t,Wi(r)):n.push(r)}return n}function Ia(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e==null)return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(La(e)!=="object")return e;if(t.get(e))return t.get(e);if(Array.isArray(e)){var n=e.map(function(o){return Ia(o,t)});return t.set(e,n),n}var r={};for(var i in e)r[i]=Ia(e[i],t);return t.set(e,r),r}function Yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nc(e){for(var t=1;t=O||K.length>=x,Q=(re=e.pathCollapsible)===null||re===void 0?void 0:re.call(e,K);return K.type!=="objectStart"&&K.type!=="arrayStart"||!se&&!Q?j:yt(yt({},j),{},ji({},K.path,1))},{})},c=(0,ee.reactive)({translateY:0,visibleData:null,hiddenPaths:l(e.deep,e.collapsedNodeLength)}),d=(0,ee.computed)(function(){for(var O=null,x=[],j=o.value.length,K=0;KO.length?O.length-j:re;se<0&&(se=0);var Q=se+j;c.translateY=se*e.itemHeight,c.visibleData=O.filter(function(ie,we){return we>=se&&we-1&&t.splice(r,1)}}function Od(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;na(e,n,[],e._modules.root,!0),cl(e,n,t)}function cl(e,t,n){var r=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,l={},f={},h=Ey(!0);h.run(function(){Wr(o,function(m,p){l[p]=Nk(m,e),f[p]=Fo(function(){return l[p]()}),Object.defineProperty(e.getters,p,{get:function(){return f[p].value},enumerable:!0})})}),e._state=ks({data:t}),e._scope=h,e.strict&&Fk(e),r&&n&&e._withCommit(function(){r.data=null}),i&&i.stop()}function na(e,t,n,r,i){var o=!n.length,l=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[l],e._modulesNamespaceMap[l]=r),!o&&!i){var f=fl(t,n.slice(0,-1)),h=n[n.length-1];e._withCommit(function(){f[h]=r.state})}var m=r.context=Ek(e,l,n);r.forEachMutation(function(p,w){var v=l+w;Pk(e,v,p,m)}),r.forEachAction(function(p,w){var v=p.root?w:l+w,M=p.handler||p;Rk(e,v,M,m)}),r.forEachGetter(function(p,w){var v=l+w;Ak(e,v,p,m)}),r.forEachChild(function(p,w){na(e,t,n.concat(w),p,i)})}function Ek(e,t,n){var r=t==="",i={dispatch:r?e.dispatch:function(o,l,f){var h=ki(o,l,f),m=h.payload,p=h.options,w=h.type;return(!p||!p.root)&&(w=t+w),e.dispatch(w,m)},commit:r?e.commit:function(o,l,f){var h=ki(o,l,f),m=h.payload,p=h.options,w=h.type;(!p||!p.root)&&(w=t+w),e.commit(w,m,p)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return Md(e,t)}},state:{get:function(){return fl(e.state,n)}}}),i}function Md(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(i){if(i.slice(0,r)===t){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return e.getters[i]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Pk(e,t,n,r){var i=e._mutations[t]||(e._mutations[t]=[]);i.push(function(l){n.call(e,r.state,l)})}function Rk(e,t,n,r){var i=e._actions[t]||(e._actions[t]=[]);i.push(function(l){var f=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},l);return Yk(f)||(f=Promise.resolve(f)),e._devtoolHook?f.catch(function(h){throw e._devtoolHook.emit("vuex:error",h),h}):f})}function Ak(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(o){return n(r.state,r.getters,o.state,o.getters)})}function Fk(e){Or(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function fl(e,t){return t.reduce(function(n,r){return n[r]},e)}function ki(e,t,n){return Ck(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Lk="vuex bindings",Qu="vuex:mutations",Ia="vuex:actions",_r="vuex",Ik=0;function Wk(e,t){Tk({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Lk]},function(n){n.addTimelineLayer({id:Qu,label:"Vuex Mutations",color:Xu}),n.addTimelineLayer({id:Ia,label:"Vuex Actions",color:Xu}),n.addInspector({id:_r,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===_r)if(r.filter){var i=[];Cd(i,t._modules.root,r.filter,""),r.rootNodes=i}else r.rootNodes=[xd(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===_r){var i=r.nodeId;Md(t,i),r.state=Hk($k(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===_r){var i=r.nodeId,o=r.path;i!=="root"&&(o=i.split("/").filter(Boolean).concat(o)),t._withCommit(function(){r.set(t._state.data,o,r.state.value)})}}),t.subscribe(function(r,i){var o={};r.payload&&(o.payload=r.payload),o.state=i,n.notifyComponentUpdate(),n.sendInspectorTree(_r),n.sendInspectorState(_r),n.addTimelineEvent({layerId:Qu,event:{time:Date.now(),title:r.type,data:o}})}),t.subscribeAction({before:function(r,i){var o={};r.payload&&(o.payload=r.payload),r._id=Ik++,r._time=Date.now(),o.state=i,n.addTimelineEvent({layerId:Ia,event:{time:r._time,title:r.type,groupId:r._id,subtitle:"start",data:o}})},after:function(r,i){var o={},l=Date.now()-r._time;o.duration={_custom:{type:"duration",display:l+"ms",tooltip:"Action duration",value:l}},r.payload&&(o.payload=r.payload),o.state=i,n.addTimelineEvent({layerId:Ia,event:{time:Date.now(),title:r.type,groupId:r._id,subtitle:"end",data:o}})}})})}var Xu=8702998,jk=6710886,Uk=16777215,Dd={label:"namespaced",textColor:Uk,backgroundColor:jk};function Td(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function xd(e,t){return{id:t||"root",label:Td(t),tags:e.namespaced?[Dd]:[],children:Object.keys(e._children).map(function(n){return xd(e._children[n],t+n+"/")})}}function Cd(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[Dd]:[]}),Object.keys(t._children).forEach(function(i){Cd(e,t._children[i],n,r+i+"/")})}function Hk(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),i={state:Object.keys(e.state).map(function(l){return{key:l,editable:!0,value:e.state[l]}})};if(r.length){var o=Vk(t);i.getters=Object.keys(o).map(function(l){return{key:l.endsWith("/")?Td(l):l,editable:!1,value:fo(function(){return o[l]})}})}return i}function Vk(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var i=t,o=r.pop();r.forEach(function(l){i[l]||(i[l]={_custom:{value:{},display:l,tooltip:"Module",abstract:!0}}),i=i[l]._custom.value}),i[o]=fo(function(){return e[n]})}else t[n]=fo(function(){return e[n]})}),t}function $k(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,i,o){var l=r[i];if(!l)throw new Error('Missing module "'+i+'" for path "'+t+'".');return o===n.length-1?l:l._children},t==="root"?e:e.root._children)}function fo(e){try{return e()}catch(t){return t}}var At=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},Yd={namespaced:{configurable:!0}};Yd.namespaced.get=function(){return!!this._rawModule.namespaced};At.prototype.addChild=function(t,n){this._children[t]=n};At.prototype.removeChild=function(t){delete this._children[t]};At.prototype.getChild=function(t){return this._children[t]};At.prototype.hasChild=function(t){return t in this._children};At.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};At.prototype.forEachChild=function(t){Wr(this._children,t)};At.prototype.forEachGetter=function(t){this._rawModule.getters&&Wr(this._rawModule.getters,t)};At.prototype.forEachAction=function(t){this._rawModule.actions&&Wr(this._rawModule.actions,t)};At.prototype.forEachMutation=function(t){this._rawModule.mutations&&Wr(this._rawModule.mutations,t)};Object.defineProperties(At.prototype,Yd);var sr=function(t){this.register([],t,!1)};sr.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)};sr.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,i){return n=n.getChild(i),r+(n.namespaced?i+"/":"")},"")};sr.prototype.update=function(t){Nd([],this.root,t)};sr.prototype.register=function(t,n,r){var i=this;r===void 0&&(r=!0);var o=new At(n,r);if(t.length===0)this.root=o;else{var l=this.get(t.slice(0,-1));l.addChild(t[t.length-1],o)}n.modules&&Wr(n.modules,function(f,h){i.register(t.concat(h),f,r)})};sr.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],i=n.getChild(r);i&&i.runtime&&n.removeChild(r)};sr.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function Nd(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return;Nd(e.concat(r),t.getChild(r),n.modules[r])}}function pO(e){return new ut(e)}var ut=function(t){var n=this;t===void 0&&(t={});var r=t.plugins;r===void 0&&(r=[]);var i=t.strict;i===void 0&&(i=!1);var o=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new sr(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var l=this,f=this,h=f.dispatch,m=f.commit;this.dispatch=function(v,M){return h.call(l,v,M)},this.commit=function(v,M,D){return m.call(l,v,M,D)},this.strict=i;var p=this._modules.root.state;na(this,p,[],this._modules.root),cl(this,p),r.forEach(function(w){return w(n)})},dl={state:{configurable:!0}};ut.prototype.install=function(t,n){t.provide(n||xk,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!1;r&&Wk(t,this)};dl.state.get=function(){return this._state.data};dl.state.set=function(e){};ut.prototype.commit=function(t,n,r){var i=this,o=ki(t,n,r),l=o.type,f=o.payload,h={type:l,payload:f},m=this._mutations[l];m&&(this._withCommit(function(){m.forEach(function(w){w(f)})}),this._subscribers.slice().forEach(function(p){return p(h,i.state)}))};ut.prototype.dispatch=function(t,n){var r=this,i=ki(t,n),o=i.type,l=i.payload,f={type:o,payload:l},h=this._actions[o];if(h){try{this._actionSubscribers.slice().filter(function(p){return p.before}).forEach(function(p){return p.before(f,r.state)})}catch{}var m=h.length>1?Promise.all(h.map(function(p){return p(l)})):h[0](l);return new Promise(function(p,w){m.then(function(v){try{r._actionSubscribers.filter(function(M){return M.after}).forEach(function(M){return M.after(f,r.state)})}catch{}p(v)},function(v){try{r._actionSubscribers.filter(function(M){return M.error}).forEach(function(M){return M.error(f,r.state,v)})}catch{}w(v)})})}};ut.prototype.subscribe=function(t,n){return kd(t,this._subscribers,n)};ut.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return kd(r,this._actionSubscribers,n)};ut.prototype.watch=function(t,n,r){var i=this;return Or(function(){return t(i.state,i.getters)},n,Object.assign({},r))};ut.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};ut.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),na(this,this.state,t,this._modules.get(t),r.preserveState),cl(this,this.state)};ut.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var r=fl(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),Od(this)};ut.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};ut.prototype.hotUpdate=function(t){this._modules.update(t),Od(this,!0)};ut.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(ut.prototype,dl);var Oi={d:(e,t)=>{for(var n in t)Oi.o(t,n)&&!Oi.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},Ed={};function ho(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nKk});const J=(ec={computed:()=>Fo,createTextVNode:()=>rf,createVNode:()=>tt,defineComponent:()=>R_,reactive:()=>ks,ref:()=>l_,watch:()=>Or,watchEffect:()=>Y_},Wa={},Oi.d(Wa,ec),Wa),Bk=(0,J.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var e=this.data,t=this.onClick;return(0,J.createVNode)("span",{class:"vjs-tree-brackets",onClick:t},[e])}}),Gk=(0,J.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(e,t){var n=t.emit;return{uiType:(0,J.computed)(function(){return e.isMultiple?"checkbox":"radio"}),model:(0,J.computed)({get:function(){return e.checked},set:function(r){return n("update:modelValue",r)}})}},render:function(){var e=this.uiType,t=this.model,n=this.$emit;return(0,J.createVNode)("label",{class:["vjs-check-controller",t?"is-checked":""],onClick:function(r){return r.stopPropagation()}},[(0,J.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(e)},null),(0,J.createVNode)("input",{checked:t,class:"vjs-check-controller-original is-".concat(e),type:e,onChange:function(){return n("change",t)}},null)])}}),zk=(0,J.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var e=this.nodeType,t=this.onClick,n=e==="objectStart"||e==="arrayStart";return n||e==="objectCollapsed"||e==="arrayCollapsed"?(0,J.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(n?"open":"close"),onClick:t},[(0,J.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,J.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var ec,Wa;function mo(e){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(e)}function Rd(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function zn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=r||{},o=i.key,l=i.index,f=i.type,h=f===void 0?"content":f,m=i.showComma,p=m!==void 0&&m,w=i.length,v=w===void 0?1:w,M=Rd(e);if(M==="array"){var D=tc(e.map(function(G,X,S){return zn(G,"".concat(t,"[").concat(X,"]"),n+1,{index:X,showComma:X!==S.length-1,length:v,type:h})}));return[zn("[",t,n,{showComma:!1,key:o,length:e.length,type:"arrayStart"})[0]].concat(D,zn("]",t,n,{showComma:p,length:e.length,type:"arrayEnd"})[0])}if(M==="object"){var Y=Object.keys(e),A=tc(Y.map(function(G,X,S){return zn(e[G],/^[a-zA-Z_]\w*$/.test(G)?"".concat(t,".").concat(G):"".concat(t,'["').concat(G,'"]'),n+1,{key:G,showComma:X!==S.length-1,length:v,type:h})}));return[zn("{",t,n,{showComma:!1,key:o,index:l,length:Y.length,type:"objectStart"})[0]].concat(A,zn("}",t,n,{showComma:p,length:Y.length,type:"objectEnd"})[0])}return[{content:e,level:n,key:o,index:l,path:t,showComma:p,length:v,type:h}]}function tc(e){if(typeof Array.prototype.flat=="function")return e.flat();for(var t=Mi(e),n=[];t.length;){var r=t.shift();Array.isArray(r)?t.unshift.apply(t,Mi(r)):n.push(r)}return n}function po(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e==null)return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(mo(e)!=="object")return e;if(t.get(e))return t.get(e);if(Array.isArray(e)){var n=e.map(function(o){return po(o,t)});return t.set(e,n),n}var r={};for(var i in e)r[i]=po(e[i],t);return t.set(e,r),r}function nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t=S||oe.length>=F,ue=(le=e.pathCollapsible)===null||le===void 0?void 0:le.call(e,oe);return oe.type!=="objectStart"&&oe.type!=="arrayStart"||!j&&!ue?ee:ct(ct({},ee),{},Di({},oe.path,1))},{})},f=(0,J.reactive)({translateY:0,visibleData:null,hiddenPaths:l(e.deep,e.collapsedNodeLength)}),h=(0,J.computed)(function(){for(var S=null,F=[],ee=o.value.length,oe=0;oeS.length?S.length-ee:le;j<0&&(j=0);var ue=j+ee;f.translateY=j*e.itemHeight,f.visibleData=S.filter(function(se,Ye){return Ye>=j&&Ye{this.signDocument=null,this.selectedSignProcess=null,this.fetch()},n=>{this.error=n.response.data?n.response.data:n.message}),!1},renderDate(s){return s?x(s).fromNow():"non précisé"},handlerProcessDetailsOn(s){this.processDetails=s},handlerProcessDetailsOff(){this.processDetails=null},activeTab(s){this.tabId=s},deleteDocument(s){this.deleteData=s},handlerSignDocument(s){this.signDocument=s},order:function(s){this.sortField==s?this.sortDirection*=-1:this.sortField=s},cssStepCurrent(s){return s===this.tabId?"current":""},cssSort:function(s){return s===this.sortField?"active":""},handlerEdit(s){this.editedDocument=s,this.mode="edit"},handlerSelectPersons(s){if(s.id){let e={personName:s.displayname,personId:s.id,affectation:s.affectation},o=s.id,u=!1;this.persons.forEach(function(n){n.personId===o&&(u=!0)}),u===!1&&(this.editedDocument?(this.editedDocument.persons||(this.editedDocument.persons=[]),this.editedDocument.persons.push(e)):this.persons.push(e))}},handlerDeletePerson(s){this.persons.splice(this.persons.indexOf(s),1)},handlerNew(s){this.mode="new",this.editedDocument={id:-1,version:1,information:"",fileName:"",process:!1,process_sendable:null,fileSize:0,typeMime:null,dateUpload:null,dateDeposit:null,dateSend:null,extension:null,category:{id:null},tabDocument:this.getTabById(s),private:!1,persons:[],location:"local",urlDelete:"",urlDownload:"",urlReupload:"",uploader:null,urlPerson:!1}},handlerNewVersion(s){this.mode="version",this.editedDocument=s},uploadFile(s){s.target.files.length!==0&&(this.fileToDownload=s.target.files[0])},handlerProcessReload(s){let e=new FormData;y.post(s.manage_process,e).then(o=>{this.fetch()},o=>{this.error=o.response&&o.response.data?o.response.data:o})},applyEdit(){let s=new FormData,e="";if(s.append("data",JSON.stringify(this.editedDocument)),this.mode==="version"?(s.append("action","version"),e=this.editedDocument.urlReupload):this.mode==="new"?(s.append("action","new"),s.append("flow",""),e=this.urlUploadNewDoc):this.mode==="edit"&&(s.append("action","edit"),e=this.editedDocument.urlReupload),this.mode!=="edit")if(this.fileToDownload!==null)s.append("file",this.fileToDownload,this.fileToDownload.name);else{this.error="Aucun fichier sélectionner a téléverser !";return}y.post(e,s).then(o=>{this.editedDocument=null,this.fetch()},o=>{this.error=S.manageErrorResponse(o).message})},performEdit(){this.errorMessages=[];let s=[],e="",o=!0;if(this.editData.private===!0?(o=1,this.persons.length!==0&&this.persons.forEach(f=>{s.push(f.personId)})):(o=0,this.editData.tabDocument_id===A||this.editData.tabDocument_id===""?this.errorMessages.push("Vous devez sélectionner un onglet pour la modification (ce n'est pas un document qualifié privé)"):e=this.editData.tabDocument_id),this.errorMessages.length!==0)return;let u=this.editData.document.id,n=this.editData.documentype_id;this.editData=null,this.persons=[];let d=new FormData;d.append("documentId",u),d.append("type",n),d.append("tabDocument",e),d.append("private",o),d.append("persons",s)},getTabById(s){let e=this.saTabs[s];return{id:e.id,label:e.label}},handlerSuccess(s){try{if(!s.data)throw"Impossible de charger les documents, vérifiez que vous êtes toujours connecté";this.idCurrentPerson=s.data.idCurrentPerson;let e=Array.isArray(s.data.tabsWithDocuments)?{}:s.data.tabsWithDocuments,o=null,u=null;if(e)if(Object.keys(e).forEach(n=>{let d=e[n];d.total=d.documents.length,d.documents.sort((f,v)=>v.version-f.version),d.documents.forEach(f=>{f.explode=!0}),o==null&&(o=d.id),u==null&&d.documents.length>0&&(u=d.id)}),this.tabsWithDocuments=e,this.computedDocuments=s.data.computedDocuments,this.signProcess=s.data.processDatas,this.typesDocuments=s.data.typesDocuments,this.selectedTabId==null&&(this.selectedTabId=u||o),this.tabsWithDocuments.unclassified&&this.tabsWithDocuments.unclassified.documents.length)this.selectedTab=this.tabsWithDocuments.unclassified;else{let n=Object.keys(this.tabsWithDocuments)[0];n.length&&(this.selectedTab=this.tabsWithDocuments[n[0]])}else throw new Error("Vous n'avez pas accès aux documents")}catch(e){this.error=e}},handlerSelectTab(s){s=="computed"?(this.displayComputed=!0,this.selectedTab=null,this.selectedTabId=null):(this.displayComputed=!1,this.selectedTab=s,this.selectedTabId=s.id,localStorage.setItem("documentTab",s.id))},fetch(){console.log("fetch"),this.loading="Chargement des documents...",y.get(this.url).then(s=>{console.log(s.data.datas.documents),this.$emit("updated",s.data.datas.documents)},s=>{this.error=S.manageErrorResponse(s).message}).finally(s=>this.loading=!1)}},mounted(){let s=parseInt(localStorage.getItem("documentTab")),e=0,o=null;this.packedDocuments?(Object.keys(this.packedDocuments).forEach(u=>{let n=this.packedDocuments[u];e===0&&(e=n.id),s===n.id&&(o=n.id)}),o===null&&(o=e),this.selectedTabId=o):this.selectedTabId=0}},j={key:0,class:"overlay",style:{"z-index":"101"}},z={class:"overlay-content",style:{"max-width":"50%"}},q={class:"alert-danger alert"},L={key:1,class:"overlay"},R={class:"overlay-content",style:{"max-width":"50%"}},B={class:"signature-status-101"},X={class:"status"},J={class:"metas"},G={class:"meta"},K={class:"meta"},H={class:"fullname"},Q={class:"email"},Y={class:"status"},Z={class:"status-text"},$={class:"buttons-bar"},ee={style:{position:"relative","min-height":"100px"}},te={key:0,class:"overlay"},se={class:"overlay-content"},ne={class:"alert-danger alert"},le=["href"],oe={key:1,class:"overlay"},ie={class:"overlay-content"},re={key:0},de={key:1},ae={key:2},ue={key:0},ce={key:1},me={class:"row"},pe={class:"col-md-6"},fe={key:0},De={class:"col-md-6"},be={key:0},he=["value"],ve={key:1},ge={key:0,class:"alert alert-warning"},ye={key:1},ke=["value","disabled"],Ce={class:"col-md-12"},Te={key:0,class:"col-md-6"},_e={class:"row"},we={key:0},Se=["value"],Pe={class:"col-md-6"},Ie={key:0},xe={class:"addon"},Ne=["onClick"],Ee={class:"row"},Fe={class:"col-md-12"},Oe={class:"buttons-bar"},Ve={key:2,class:"overlay"},Me={class:"overlay-content"},Ue={key:3,class:"admin-bar"},Ae={class:"documents-content"},We={class:"tabs"},je=["onClick"],ze={class:"label label-default"},qe={class:"tab-content"},Le={class:""},Re={class:"text-right show-over"},Be=["href"],Xe={class:"tab-content"},Je={class:"admin-bar"},Ge=["onClick"],Ke=["onClick"];function He(s,e,o,u,n,d){const f=k("date-picker"),v=k("person-auto-completer"),P=k("Loader"),I=k("document-list");return i(),r(D,null,[n.error?(i(),r("div",j,[t("div",z,[t("h2",null,[e[22]||(e[22]=c(" Erreur documents ")),t("span",{class:"overlay-closer",onClick:e[0]||(e[0]=l=>n.error=null)},"X")]),t("p",q,[e[23]||(e[23]=t("i",{class:"icon-attention-1"},null,-1)),c(a(n.error),1)]),t("button",{class:"btn btn-default",onClick:e[1]||(e[1]=l=>n.error=null)},e[24]||(e[24]=[t("i",{class:"icon-cancel-outline"},null,-1),c(" Fermer ")]))])])):p("",!0),n.processDetails?(i(),r("div",L,[t("div",R,[t("h2",null,[e[25]||(e[25]=t("small",null,[t("i",{class:"icon-edit"}),c(" Procédure")],-1)),e[26]||(e[26]=c()),e[27]||(e[27]=t("br",null,null,-1)),t("strong",null,a(n.processDetails.label),1),e[28]||(e[28]=c()),e[29]||(e[29]=t("br",null,null,-1)),t("span",B,[c(a(n.processDetails.status_text)+" - ",1),t("em",null,"étape "+a(n.processDetails.current_step)+" / "+a(n.processDetails.total_steps),1)]),t("span",{class:"overlay-closer",onClick:e[2]||(e[2]=(...l)=>d.handlerProcessDetailsOff&&d.handlerProcessDetailsOff(...l))},"X")]),(i(!0),r(D,null,b(n.processDetails.steps,l=>(i(),r("section",{class:T(["signature","signature-status-"+l.status])},[t("h4",null,[t("small",null,"Étape "+a(l.order)+" : ",1),t("strong",null,a(l.label),1),t("span",X," ("+a(l.status_text)+")",1)]),t("ul",J,[t("li",G,[e[30]||(e[30]=c("Parapheur ")),t("strong",null,a(l.letterfile),1)]),t("li",K,[e[31]||(e[31]=c("Niveau ")),t("strong",null,a(l.level),1)])]),(i(!0),r(D,null,b(l.recipients,m=>(i(),r("article",{class:T(["recipient","signature-status-"+m.status])},[t("strong",H,a(m.fullname),1),t("em",Q,a(m.email),1),t("small",null,a(s.$filters.dateFull(m.dateFinished)),1),t("span",Y,[t("span",Z,a(m.status_text),1)])],2))),256)),e[33]||(e[33]=t("strong",null,"Observateurs : ",-1)),(i(!0),r(D,null,b(l.observers,m=>(i(),r("span",null,[t("small",null,a(m.firstname),1),e[32]||(e[32]=c()),t("span",null,a(m.lastname),1)]))),256))],2))),256)),t("div",$,[t("button",{class:"btn btn-default",onClick:e[3]||(e[3]=(...l)=>d.handlerProcessDetailsOff&&d.handlerProcessDetailsOff(...l))},e[34]||(e[34]=[t("i",{class:"icon-cancel-outline"},null,-1),c(" Fermer ")]))])])])):p("",!0),t("section",ee,[n.deleteData?(i(),r("div",te,[t("div",se,[t("h2",null,[e[35]||(e[35]=c(" Suppression du fichier ? ")),t("span",{class:"overlay-closer",onClick:e[4]||(e[4]=l=>n.deleteData=null)},"X")]),t("p",ne,[e[36]||(e[36]=t("i",{class:"icon-attention-1"},null,-1)),e[37]||(e[37]=c(" Souhaitez-vous supprimer le fichier ")),t("strong",null,a(n.deleteData.fileName),1),e[38]||(e[38]=c(" ? "))]),t("button",{class:"btn btn-danger",onClick:e[5]||(e[5]=l=>n.deleteData=null)},e[39]||(e[39]=[t("i",{class:"icon-cancel-alt"},null,-1),c(" Annuler ")])),t("a",{class:"btn btn-success",href:n.deleteData.urlDelete},e[40]||(e[40]=[t("i",{class:"icon-valid"},null,-1),c(" Confirmer ")]),8,le)])])):p("",!0),n.editedDocument?(i(),r("div",oe,[t("div",ie,[t("h2",null,[t("small",null,[e[41]||(e[41]=t("i",{class:"icon-doc"},null,-1)),n.mode=="new"?(i(),r("span",re,"Téléversement d'un document")):p("",!0),n.mode=="edit"?(i(),r("span",de,"Modification des informations")):p("",!0),n.mode=="version"?(i(),r("span",ae,"Nouvelle version")):p("",!0)]),e[43]||(e[43]=t("br",null,null,-1)),n.editedDocument.id>0?(i(),r("span",ue,[t("strong",null,a(n.editedDocument.fileName),1)])):(i(),r("span",ce,[e[42]||(e[42]=c(" Nouveau document dans ")),t("strong",null,a(n.editedDocument.tabDocument.label),1)])),t("span",null," ("+a(n.mode)+") ",1),t("span",{class:"overlay-closer",onClick:e[6]||(e[6]=l=>n.editedDocument=null)},"X")]),t("div",me,[t("div",pe,[n.mode!="edit"?(i(),r("div",fe,[e[44]||(e[44]=t("label",{for:"file"},"Fichier",-1)),t("input",{onChange:e[7]||(e[7]=(...l)=>d.uploadFile&&d.uploadFile(...l)),type:"file",class:"form-control",name:"file",id:"file"},null,32)])):p("",!0),t("div",null,[e[45]||(e[45]=t("label",{for:"dateDeposit"},"Date de dépôt",-1)),g(f,{modelValue:n.editedDocument.dateDeposit,"onUpdate:modelValue":e[8]||(e[8]=l=>n.editedDocument.dateDeposit=l),id:"dateDeposit"},null,8,["modelValue"])]),t("div",null,[e[46]||(e[46]=t("label",{for:"dateSend"},"Date d'envoi",-1)),g(f,{modelValue:n.editedDocument.dateSend,"onUpdate:modelValue":e[9]||(e[9]=l=>n.editedDocument.dateSend=l),id:"dateSend"},null,8,["modelValue"])])]),t("div",De,[n.mode!="version"?(i(),r("div",be,[e[47]||(e[47]=t("label",{for:"tabdocument"},"Onglet",-1)),t("div",null,[h(t("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":e[10]||(e[10]=l=>n.editedDocument.tabDocument.id=l),class:"form-control"},[(i(!0),r(D,null,b(o.saTabs,(l,m)=>(i(),r("option",{value:m,key:m},a(l.label),9,he))),128))],512),[[_,n.editedDocument.tabDocument.id]])])])):p("",!0),n.mode!="version"?(i(),r("div",ve,[e[48]||(e[48]=t("label",{for:"typedocument"},"Type de document",-1)),n.editedDocument.process?(i(),r("div",ge," Vous ne pouvez pas modifier le type d'un document engagé dans un processus de signature. ")):(i(),r("div",ye,[h(t("select",{class:"form-control",name:"type",id:"typedocument","onUpdate:modelValue":e[11]||(e[11]=l=>n.editedDocument.category.id=l)},[(i(!0),r(D,null,b(o.saTypes,(l,m)=>(i(),r("option",{value:l.id,key:l.id,disabled:l.flow&&n.editedDocument.id>0},a(l.label)+" "+a(l.flow&&n.editedDocument.id?"(signature)":""),9,ke))),128))],512),[[_,n.editedDocument.category.id]])]))])):p("",!0)]),t("div",Ce,[e[49]||(e[49]=t("label",{for:"information"},"Informations",-1)),h(t("textarea",{"onUpdate:modelValue":e[12]||(e[12]=l=>n.editedDocument.information=l),id:"information",class:"form-control"},null,512),[[N,n.editedDocument.information]])]),n.mode=="change"?(i(),r("div",Te,[t("div",_e,[n.editedDocument.private===!1?(i(),r("span",we,[e[50]||(e[50]=t("label",{for:"tabdocument"},"Onglet document",-1)),t("div",null,[h(t("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":e[13]||(e[13]=l=>n.editedDocument.tabDocument.id=l),class:"form-control"},[(i(!0),r(D,null,b(n.tabsWithDocuments,(l,m)=>(i(),r("option",{value:m,key:m},a(l.label),9,Se))),128))],512),[[_,n.editedDocument.tabDocument.id]])])])):p("",!0),e[51]||(e[51]=t("div",{class:"col-md-6"},[t("label",{for:"private"},"Document privé")],-1)),t("div",Pe,[h(t("input",{type:"checkbox",name:"private",id:"privateModifDoc",class:"form-control","onUpdate:modelValue":e[14]||(e[14]=l=>n.editedDocument.private=l)},null,512),[[E,n.editedDocument.private]])])]),n.editedDocument.private===!0?(i(),r("span",Ie,[e[53]||(e[53]=t("label",null,"Choix des personnes ayant accès à ce document",-1)),e[54]||(e[54]=t("h3",null,"Ce document sera classé automatiquement dans l'onglet privé",-1)),g(v,{onChange:d.handlerSelectPersons},null,8,["onChange"]),(i(!0),r(D,null,b(n.editedDocument.persons,l=>(i(),r("span",{key:l.id,class:"cartouche"},[e[52]||(e[52]=t("i",{class:"icon-cube"},null,-1)),t("span",null,a(l.personName),1),t("span",xe,a(l.affectation),1),l.personId!==n.idCurrentPerson?(i(),r("i",{key:0,onClick:m=>d.handlerDeletePerson(l),class:"icon-trash icon-clickable"},null,8,Ne)):p("",!0)]))),128))])):p("",!0)])):p("",!0)]),t("div",Ee,[t("div",Fe,[t("nav",Oe,[t("button",{class:"btn btn-danger",onClick:e[15]||(e[15]=l=>n.editedDocument=null)},e[55]||(e[55]=[t("i",{class:"icon-cancel-alt"},null,-1),c(" Annuler ")])),t("a",{class:"btn btn-success",href:"#",onClick:e[16]||(e[16]=C(l=>d.applyEdit(),["prevent"]))},e[56]||(e[56]=[t("i",{class:"icon-valid"},null,-1),c(" Enregistrer ")]))])])])])])):p("",!0),n.errorMessages.length!==0?(i(),r("div",Ve,[t("div",Me,[t("h2",null,[t("span",{class:"overlay-closer",onClick:e[17]||(e[17]=l=>n.errorMessages=[])},"X")]),t("ul",null,[(i(!0),r(D,null,b(n.errorMessages,l=>(i(),r("li",null,a(l),1))),256))]),t("button",{class:"btn btn-danger",onClick:e[18]||(e[18]=l=>n.errorMessages=[])},e[57]||(e[57]=[t("i",{class:"icon-cancel-alt"},null,-1),c(" Retour ")]))])])):p("",!0),o.debugEnabled?(i(),r("nav",Ue,[t("button",{onClick:e[19]||(e[19]=(...l)=>d.handlerDebug&&d.handlerDebug(...l)),class:"btn btn-xs btn-warning"},e[58]||(e[58]=[t("i",{class:"icon-bug"},null,-1),c(" Voir le modèle ")])),t("button",{onClick:e[20]||(e[20]=(...l)=>d.fetch&&d.fetch(...l)),class:"btn btn-xs btn-warning"},e[59]||(e[59]=[t("i",{class:"icon-bug"},null,-1),c(" Fetch ")]))])):p("",!0),g(P,{visible:n.loading,text:n.loading},null,8,["visible","text"]),t("section",Ae,[t("div",We,[(i(!0),r(D,null,b(d.packedDocuments,l=>(i(),r("div",{class:T(["tab",{selected:n.selectedTabId===l.id}]),onClick:C(m=>d.handlerSelectTab(l),["prevent"])},[c(a(l.label)+" ",1),t("sup",ze,a(d.countDocs(l)),1)],10,je))),256)),t("div",{class:T(["tab",{selected:n.displayComputed}]),onClick:e[21]||(e[21]=C(l=>d.handlerSelectTab("computed"),["prevent"]))}," Documents générés ",2)]),h(t("div",qe,[(i(!0),r(D,null,b(o.saGeneratedDocuments,l=>(i(),r("article",{class:"card xs",key:l.key},[t("div",Le,[e[60]||(e[60]=t("i",{class:"picto icon-doc"},null,-1)),t("strong",null,a(l.label),1),e[61]||(e[61]=t("small",{class:"text-light"},"  (Document généré automatiquement) ",-1))]),t("nav",Re,[t("a",{class:"btn btn-default btn-xs",href:l.url},e[62]||(e[62]=[t("i",{class:"icon-upload-outline"},null,-1),c(" Télécharger ")]),8,Be)])]))),128))],512),[[w,n.displayComputed]]),(i(!0),r(D,null,b(d.packedDocuments,l=>h((i(),r("div",Xe,[t("nav",Je,[o.saCredentials.tabs[l.id].edit?(i(),r("button",{key:0,onClick:m=>d.handlerNew(l.id),class:"btn btn-xs btn-default"},e[63]||(e[63]=[t("i",{class:"icon-download"},null,-1),c(" Téléverser un document ")]),8,Ge)):p("",!0),o.debugEnabled?(i(),r("button",{key:1,class:"btn btn-xs btn-warning",onClick:C(m=>s.$emit("debug",l),["prevent"])}," Informations ",8,Ke)):p("",!0)]),g(I,{documents:l.documents,tabs:n.tabsWithDocuments,manage:o.saCredentials.tabs[l.id].edit,"process-start":o.saCredentials.process_start,"process-manage":o.saCredentials.process_manage,"process-admin":o.saCredentials.process_admin,types:n.typesDocuments,"sign-process":d.useProcessDatas,"display-activity":!1,onFetch:d.fetch},null,8,["documents","tabs","manage","process-start","process-manage","process-admin","types","sign-process","onFetch"])],512)),[[w,n.selectedTabId===l.id]])),256))])])],64)}const st=U(W,[["render",He],["__scopeId","data-v-fc17618a"]]);export{st as A}; +import{s as y,q as N,r as k,o as i,c as a,d as e,a as m,t as c,g as p,F as _,k as D,b as g,w as b,l as w,v as E,f as F,h as C,n as T,u as S,p as O,i as V}from"./vendor.js";import{D as M,P as U}from"./vendor6.js";import{D as A}from"./vendor20.js";import{L as W}from"./vendor17.js";import{A as P}from"./vendor14.js";import{_ as j}from"./vendor7.js";const z="private",q={components:{Loader:W,"document-list":A,"date-picker":M,"person-auto-completer":U},props:{urlUploadNewDoc:{required:!0},urlSignDocument:{required:!1},debugEnabled:{default:!1},url:{required:!0},standalone:{default:!1},saTabs:{default:null},saTypes:{default:null},saGeneratedDocuments:{default:null},saComputedDocuments:{default:null},saProcessDatas:{default:null},saCredentials:{default:null}},data(){return{idCurrentPerson:null,persons:[],computedDocuments:[],dateDeposit:"",dateSend:"",fileUrl:"",fileUrlLabel:"",privateDocument:!1,selectedIdTypeDocument:null,selectedIdTabDocument:null,informationsDocument:"",fileToDownload:null,uploadNewDocData:{dateDeposit:this.dateDeposit,dateSend:this.dateSend,private:this.privateDocument,type:this.selectedIdTypeDocument,tab:this.selectedIdTabDocument,informations:this.informationsDocument,persons:this.persons,baseUrlUpload:this.urlUploadNewDoc,url:"",init:!1},errorMessages:[],tabId:null,tabsWithDocuments:null,formData:null,error:null,deleteData:null,editData:null,uploadDoc:null,documents:[],loading:!1,sortField:"dateUpload",sortDirection:-1,editable:!0,remoterState:null,displayComputed:!1,signDocument:null,signProcess:null,selectedSignProcess:null,signProcessError:"",editedDocument:null,mode:null,processDetails:null,mode_url:!1,typesDocuments:[],selectedTab:null,selectedTabId:null}},computed:{useProcessDatas(){return this.standalone?this.saProcessDatas:this.signProcess},packedDocuments(){let t={};if(this.saTabs)for(const[n,o]of Object.entries(this.saTabs)){let u={};for(const[s,r]of Object.entries(o.documents)){let f=r.fileName;u.hasOwnProperty(f)?u[f].versions.push(r):(r.versions=[],u[f]=r)}t[n]={id:o.id,label:o.label,total:o.total,description:o.description,manage:o.manage,roles:o.roles,documents:u}}return t}},methods:{countDocs(t){return Object.keys(t.documents).length},handlerDebug(){let t=JSON.parse(JSON.stringify(this.$data));this.$emit("debug",t)},handlerPerformSignDocumentDisabled(t,n){if(!n||n.missing_recipients)return!0;for(let o=0;o{this.signDocument=null,this.selectedSignProcess=null,this.fetch()},s=>{this.error=s.response.data?s.response.data:s.message}),!1},renderDate(t){return t?N(t).fromNow():"non précisé"},handlerProcessDetailsOn(t){this.processDetails=t},handlerProcessDetailsOff(){this.processDetails=null},activeTab(t){this.tabId=t},deleteDocument(t){this.deleteData=t},handlerSignDocument(t){this.signDocument=t},order:function(t){this.sortField==t?this.sortDirection*=-1:this.sortField=t},cssStepCurrent(t){return t===this.tabId?"current":""},cssSort:function(t){return t===this.sortField?"active":""},handlerEdit(t){this.editedDocument=t,this.mode="edit"},handlerSelectPersons(t){if(t.id){let n={personName:t.displayname,personId:t.id,affectation:t.affectation},o=t.id,u=!1;this.persons.forEach(function(s){s.personId===o&&(u=!0)}),u===!1&&(this.editedDocument?(this.editedDocument.persons||(this.editedDocument.persons=[]),this.editedDocument.persons.push(n)):this.persons.push(n))}},handlerDeletePerson(t){this.persons.splice(this.persons.indexOf(t),1)},handlerNew(t){this.mode="new",this.editedDocument={id:-1,version:1,information:"",fileName:"",process:!1,process_sendable:null,fileSize:0,typeMime:null,dateUpload:null,dateDeposit:null,dateSend:null,extension:null,category:{id:null},tabDocument:this.getTabById(t),private:!1,persons:[],location:"local",urlDelete:"",urlDownload:"",urlReupload:"",uploader:null,urlPerson:!1}},handlerNewVersion(t){this.mode="version",this.editedDocument=t},uploadFile(t){t.target.files.length!==0&&(this.fileToDownload=t.target.files[0])},handlerProcessReload(t){let n=new FormData;y.post(t.manage_process,n).then(o=>{this.fetch()},o=>{this.error=o.response&&o.response.data?o.response.data:o})},applyEdit(){let t=new FormData,n="";if(t.append("data",JSON.stringify(this.editedDocument)),this.mode==="version"?(t.append("action","version"),n=this.editedDocument.urlReupload):this.mode==="new"?(t.append("action","new"),t.append("flow",""),n=this.urlUploadNewDoc):this.mode==="edit"&&(t.append("action","edit"),n=this.editedDocument.urlReupload),this.mode!=="edit")if(this.fileToDownload!==null)t.append("file",this.fileToDownload,this.fileToDownload.name);else{this.error="Aucun fichier sélectionner a téléverser !";return}y.post(n,t).then(o=>{this.editedDocument=null,this.fetch()},o=>{this.error=P.manageErrorResponse(o).message})},performEdit(){this.errorMessages=[];let t=[],n="",o=!0;if(this.editData.private===!0?(o=1,this.persons.length!==0&&this.persons.forEach(f=>{t.push(f.personId)})):(o=0,this.editData.tabDocument_id===z||this.editData.tabDocument_id===""?this.errorMessages.push("Vous devez sélectionner un onglet pour la modification (ce n'est pas un document qualifié privé)"):n=this.editData.tabDocument_id),this.errorMessages.length!==0)return;let u=this.editData.document.id,s=this.editData.documentype_id;this.editData=null,this.persons=[];let r=new FormData;r.append("documentId",u),r.append("type",s),r.append("tabDocument",n),r.append("private",o),r.append("persons",t)},getTabById(t){let n=this.saTabs[t];return{id:n.id,label:n.label}},handlerSuccess(t){try{if(!t.data)throw"Impossible de charger les documents, vérifiez que vous êtes toujours connecté";this.idCurrentPerson=t.data.idCurrentPerson;let n=Array.isArray(t.data.tabsWithDocuments)?{}:t.data.tabsWithDocuments,o=null,u=null;if(n)if(Object.keys(n).forEach(s=>{let r=n[s];r.total=r.documents.length,r.documents.sort((f,v)=>v.version-f.version),r.documents.forEach(f=>{f.explode=!0}),o==null&&(o=r.id),u==null&&r.documents.length>0&&(u=r.id)}),this.tabsWithDocuments=n,this.computedDocuments=t.data.computedDocuments,this.signProcess=t.data.processDatas,this.typesDocuments=t.data.typesDocuments,this.selectedTabId==null&&(this.selectedTabId=u||o),this.tabsWithDocuments.unclassified&&this.tabsWithDocuments.unclassified.documents.length)this.selectedTab=this.tabsWithDocuments.unclassified;else{let s=Object.keys(this.tabsWithDocuments)[0];s.length&&(this.selectedTab=this.tabsWithDocuments[s[0]])}else throw new Error("Vous n'avez pas accès aux documents")}catch(n){this.error=n}},handlerSelectTab(t){t=="computed"?(this.displayComputed=!0,this.selectedTab=null,this.selectedTabId=null):(this.displayComputed=!1,this.selectedTab=t,this.selectedTabId=t.id,localStorage.setItem("documentTab",t.id))},fetch(){console.log("fetch"),this.loading="Chargement des documents...",y.get(this.url).then(t=>{console.log(t.data.datas.documents),this.$emit("updated",t.data.datas.documents)},t=>{this.error=P.manageErrorResponse(t).message}).finally(t=>this.loading=!1)}},mounted(){let t=parseInt(localStorage.getItem("documentTab")),n=0,o=null;this.packedDocuments?(Object.keys(this.packedDocuments).forEach(u=>{let s=this.packedDocuments[u];n===0&&(n=s.id),t===s.id&&(o=s.id)}),o===null&&(o=n),this.selectedTabId=o):this.selectedTabId=0}},d=t=>(O("data-v-fc17618a"),t=t(),V(),t),L={key:0,class:"overlay",style:{"z-index":"101"}},R={class:"overlay-content",style:{"max-width":"50%"}},B={class:"alert-danger alert"},X=d(()=>e("i",{class:"icon-attention-1"},null,-1)),J=d(()=>e("i",{class:"icon-cancel-outline"},null,-1)),G={key:1,class:"overlay"},K={class:"overlay-content",style:{"max-width":"50%"}},H=d(()=>e("small",null,[e("i",{class:"icon-edit"}),m(" Procédure")],-1)),Q=d(()=>e("br",null,null,-1)),Y=d(()=>e("br",null,null,-1)),Z={class:"signature-status-101"},$={class:"status"},ee={class:"metas"},te={class:"meta"},se={class:"meta"},ne={class:"fullname"},le={class:"email"},oe={class:"status"},ie={class:"status-text"},ae=d(()=>e("strong",null,"Observateurs : ",-1)),re={class:"buttons-bar"},de=d(()=>e("i",{class:"icon-cancel-outline"},null,-1)),ce={style:{position:"relative","min-height":"100px"}},ue={key:0,class:"overlay"},me={class:"overlay-content"},he={class:"alert-danger alert"},pe=d(()=>e("i",{class:"icon-attention-1"},null,-1)),fe=d(()=>e("i",{class:"icon-cancel-alt"},null,-1)),_e=["href"],De=d(()=>e("i",{class:"icon-valid"},null,-1)),be={key:1,class:"overlay"},ve={class:"overlay-content"},ge=d(()=>e("i",{class:"icon-doc"},null,-1)),ye={key:0},ke={key:1},Ce={key:2},Te=d(()=>e("br",null,null,-1)),we={key:0},Se={key:1},Pe={class:"row"},Ie={class:"col-md-6"},xe={key:0},Ne=d(()=>e("label",{for:"file"},"Fichier",-1)),Ee=d(()=>e("label",{for:"dateDeposit"},"Date de dépôt",-1)),Fe=d(()=>e("label",{for:"dateSend"},"Date d'envoi",-1)),Oe={class:"col-md-6"},Ve={key:0},Me=d(()=>e("label",{for:"tabdocument"},"Onglet",-1)),Ue=["value"],Ae={key:1},We=d(()=>e("label",{for:"typedocument"},"Type de document",-1)),je={key:0,class:"alert alert-warning"},ze={key:1},qe=["value","disabled"],Le={class:"col-md-12"},Re=d(()=>e("label",{for:"information"},"Informations",-1)),Be={key:0,class:"col-md-6"},Xe={class:"row"},Je={key:0},Ge=d(()=>e("label",{for:"tabdocument"},"Onglet document",-1)),Ke=["value"],He=d(()=>e("div",{class:"col-md-6"},[e("label",{for:"private"},"Document privé")],-1)),Qe={class:"col-md-6"},Ye={key:0},Ze=d(()=>e("label",null,"Choix des personnes ayant accès à ce document",-1)),$e=d(()=>e("h3",null,"Ce document sera classé automatiquement dans l'onglet privé",-1)),et=d(()=>e("i",{class:"icon-cube"},null,-1)),tt={class:"addon"},st=["onClick"],nt={class:"row"},lt={class:"col-md-12"},ot={class:"buttons-bar"},it=d(()=>e("i",{class:"icon-cancel-alt"},null,-1)),at=d(()=>e("i",{class:"icon-valid"},null,-1)),rt={key:2,class:"overlay"},dt={class:"overlay-content"},ct=d(()=>e("i",{class:"icon-cancel-alt"},null,-1)),ut={key:3,class:"admin-bar"},mt=d(()=>e("i",{class:"icon-bug"},null,-1)),ht=d(()=>e("i",{class:"icon-bug"},null,-1)),pt={class:"documents-content"},ft={class:"tabs"},_t=["onClick"],Dt={class:"label label-default"},bt={class:"tab-content"},vt={class:""},gt=d(()=>e("i",{class:"picto icon-doc"},null,-1)),yt=d(()=>e("small",{class:"text-light"},"  (Document généré automatiquement) ",-1)),kt={class:"text-right show-over"},Ct=["href"],Tt=d(()=>e("i",{class:"icon-upload-outline"},null,-1)),wt={class:"tab-content"},St={class:"admin-bar"},Pt=["onClick"],It=d(()=>e("i",{class:"icon-download"},null,-1)),xt=["onClick"];function Nt(t,n,o,u,s,r){const f=k("date-picker"),v=k("person-auto-completer"),I=k("Loader"),x=k("document-list");return i(),a(_,null,[s.error?(i(),a("div",L,[e("div",R,[e("h2",null,[m(" Erreur documents "),e("span",{class:"overlay-closer",onClick:n[0]||(n[0]=l=>s.error=null)},"X")]),e("p",B,[X,m(c(s.error),1)]),e("button",{class:"btn btn-default",onClick:n[1]||(n[1]=l=>s.error=null)},[J,m(" Fermer ")])])])):p("",!0),s.processDetails?(i(),a("div",G,[e("div",K,[e("h2",null,[H,m(),Q,e("strong",null,c(s.processDetails.label),1),m(),Y,e("span",Z,[m(c(s.processDetails.status_text)+" - ",1),e("em",null,"étape "+c(s.processDetails.current_step)+" / "+c(s.processDetails.total_steps),1)]),e("span",{class:"overlay-closer",onClick:n[2]||(n[2]=(...l)=>r.handlerProcessDetailsOff&&r.handlerProcessDetailsOff(...l))},"X")]),(i(!0),a(_,null,D(s.processDetails.steps,l=>(i(),a("section",{class:T(["signature","signature-status-"+l.status])},[e("h4",null,[e("small",null,"Étape "+c(l.order)+" : ",1),e("strong",null,c(l.label),1),e("span",$," ("+c(l.status_text)+")",1)]),e("ul",ee,[e("li",te,[m("Parapheur "),e("strong",null,c(l.letterfile),1)]),e("li",se,[m("Niveau "),e("strong",null,c(l.level),1)])]),(i(!0),a(_,null,D(l.recipients,h=>(i(),a("article",{class:T(["recipient","signature-status-"+h.status])},[e("strong",ne,c(h.fullname),1),e("em",le,c(h.email),1),e("small",null,c(t.$filters.dateFull(h.dateFinished)),1),e("span",oe,[e("span",ie,c(h.status_text),1)])],2))),256)),ae,(i(!0),a(_,null,D(l.observers,h=>(i(),a("span",null,[e("small",null,c(h.firstname),1),m(),e("span",null,c(h.lastname),1)]))),256))],2))),256)),e("div",re,[e("button",{class:"btn btn-default",onClick:n[3]||(n[3]=(...l)=>r.handlerProcessDetailsOff&&r.handlerProcessDetailsOff(...l))},[de,m(" Fermer ")])])])])):p("",!0),e("section",ce,[s.deleteData?(i(),a("div",ue,[e("div",me,[e("h2",null,[m(" Suppression du fichier ? "),e("span",{class:"overlay-closer",onClick:n[4]||(n[4]=l=>s.deleteData=null)},"X")]),e("p",he,[pe,m(" Souhaitez-vous supprimer le fichier "),e("strong",null,c(s.deleteData.fileName),1),m(" ? ")]),e("button",{class:"btn btn-danger",onClick:n[5]||(n[5]=l=>s.deleteData=null)},[fe,m(" Annuler ")]),e("a",{class:"btn btn-success",href:s.deleteData.urlDelete},[De,m(" Confirmer ")],8,_e)])])):p("",!0),s.editedDocument?(i(),a("div",be,[e("div",ve,[e("h2",null,[e("small",null,[ge,s.mode=="new"?(i(),a("span",ye,"Téléversement d'un document")):p("",!0),s.mode=="edit"?(i(),a("span",ke,"Modification des informations")):p("",!0),s.mode=="version"?(i(),a("span",Ce,"Nouvelle version")):p("",!0)]),Te,s.editedDocument.id>0?(i(),a("span",we,[e("strong",null,c(s.editedDocument.fileName),1)])):(i(),a("span",Se,[m(" Nouveau document dans "),e("strong",null,c(s.editedDocument.tabDocument.label),1)])),e("span",null," ("+c(s.mode)+") ",1),e("span",{class:"overlay-closer",onClick:n[6]||(n[6]=l=>s.editedDocument=null)},"X")]),e("div",Pe,[e("div",Ie,[s.mode!="edit"?(i(),a("div",xe,[Ne,e("input",{onChange:n[7]||(n[7]=(...l)=>r.uploadFile&&r.uploadFile(...l)),type:"file",class:"form-control",name:"file",id:"file"},null,32)])):p("",!0),e("div",null,[Ee,g(f,{modelValue:s.editedDocument.dateDeposit,"onUpdate:modelValue":n[8]||(n[8]=l=>s.editedDocument.dateDeposit=l),id:"dateDeposit"},null,8,["modelValue"])]),e("div",null,[Fe,g(f,{modelValue:s.editedDocument.dateSend,"onUpdate:modelValue":n[9]||(n[9]=l=>s.editedDocument.dateSend=l),id:"dateSend"},null,8,["modelValue"])])]),e("div",Oe,[s.mode!="version"?(i(),a("div",Ve,[Me,e("div",null,[b(e("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":n[10]||(n[10]=l=>s.editedDocument.tabDocument.id=l),class:"form-control"},[(i(!0),a(_,null,D(o.saTabs,(l,h)=>(i(),a("option",{value:h,key:h},c(l.label),9,Ue))),128))],512),[[w,s.editedDocument.tabDocument.id]])])])):p("",!0),s.mode!="version"?(i(),a("div",Ae,[We,s.editedDocument.process?(i(),a("div",je," Vous ne pouvez pas modifier le type d'un document engagé dans un processus de signature. ")):(i(),a("div",ze,[b(e("select",{class:"form-control",name:"type",id:"typedocument","onUpdate:modelValue":n[11]||(n[11]=l=>s.editedDocument.category.id=l)},[(i(!0),a(_,null,D(o.saTypes,(l,h)=>(i(),a("option",{value:l.id,key:l.id,disabled:l.flow&&s.editedDocument.id>0},c(l.label)+" "+c(l.flow&&s.editedDocument.id?"(signature)":""),9,qe))),128))],512),[[w,s.editedDocument.category.id]])]))])):p("",!0)]),e("div",Le,[Re,b(e("textarea",{"onUpdate:modelValue":n[12]||(n[12]=l=>s.editedDocument.information=l),id:"information",class:"form-control"},null,512),[[E,s.editedDocument.information]])]),s.mode=="change"?(i(),a("div",Be,[e("div",Xe,[s.editedDocument.private===!1?(i(),a("span",Je,[Ge,e("div",null,[b(e("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":n[13]||(n[13]=l=>s.editedDocument.tabDocument.id=l),class:"form-control"},[(i(!0),a(_,null,D(s.tabsWithDocuments,(l,h)=>(i(),a("option",{value:h,key:h},c(l.label),9,Ke))),128))],512),[[w,s.editedDocument.tabDocument.id]])])])):p("",!0),He,e("div",Qe,[b(e("input",{type:"checkbox",name:"private",id:"privateModifDoc",class:"form-control","onUpdate:modelValue":n[14]||(n[14]=l=>s.editedDocument.private=l)},null,512),[[F,s.editedDocument.private]])])]),s.editedDocument.private===!0?(i(),a("span",Ye,[Ze,$e,g(v,{onChange:r.handlerSelectPersons},null,8,["onChange"]),(i(!0),a(_,null,D(s.editedDocument.persons,l=>(i(),a("span",{key:l.id,class:"cartouche"},[et,e("span",null,c(l.personName),1),e("span",tt,c(l.affectation),1),l.personId!==s.idCurrentPerson?(i(),a("i",{key:0,onClick:h=>r.handlerDeletePerson(l),class:"icon-trash icon-clickable"},null,8,st)):p("",!0)]))),128))])):p("",!0)])):p("",!0)]),e("div",nt,[e("div",lt,[e("nav",ot,[e("button",{class:"btn btn-danger",onClick:n[15]||(n[15]=l=>s.editedDocument=null)},[it,m(" Annuler ")]),e("a",{class:"btn btn-success",href:"#",onClick:n[16]||(n[16]=C(l=>r.applyEdit(),["prevent"]))},[at,m(" Enregistrer ")])])])])])])):p("",!0),s.errorMessages.length!==0?(i(),a("div",rt,[e("div",dt,[e("h2",null,[e("span",{class:"overlay-closer",onClick:n[17]||(n[17]=l=>s.errorMessages=[])},"X")]),e("ul",null,[(i(!0),a(_,null,D(s.errorMessages,l=>(i(),a("li",null,c(l),1))),256))]),e("button",{class:"btn btn-danger",onClick:n[18]||(n[18]=l=>s.errorMessages=[])},[ct,m(" Retour ")])])])):p("",!0),o.debugEnabled?(i(),a("nav",ut,[e("button",{onClick:n[19]||(n[19]=(...l)=>r.handlerDebug&&r.handlerDebug(...l)),class:"btn btn-xs btn-warning"},[mt,m(" Voir le modèle ")]),e("button",{onClick:n[20]||(n[20]=(...l)=>r.fetch&&r.fetch(...l)),class:"btn btn-xs btn-warning"},[ht,m(" Fetch ")])])):p("",!0),g(I,{visible:s.loading,text:s.loading},null,8,["visible","text"]),e("section",pt,[e("div",ft,[(i(!0),a(_,null,D(r.packedDocuments,l=>(i(),a("div",{class:T(["tab",{selected:s.selectedTabId===l.id}]),onClick:C(h=>r.handlerSelectTab(l),["prevent"])},[m(c(l.label)+" ",1),e("sup",Dt,c(r.countDocs(l)),1)],10,_t))),256)),e("div",{class:T(["tab",{selected:s.displayComputed}]),onClick:n[21]||(n[21]=C(l=>r.handlerSelectTab("computed"),["prevent"]))}," Documents générés ",2)]),b(e("div",bt,[(i(!0),a(_,null,D(o.saGeneratedDocuments,l=>(i(),a("article",{class:"card xs",key:l.key},[e("div",vt,[gt,e("strong",null,c(l.label),1),yt]),e("nav",kt,[e("a",{class:"btn btn-default btn-xs",href:l.url},[Tt,m(" Télécharger ")],8,Ct)])]))),128))],512),[[S,s.displayComputed]]),(i(!0),a(_,null,D(r.packedDocuments,l=>b((i(),a("div",wt,[e("nav",St,[o.saCredentials.tabs[l.id].edit?(i(),a("button",{key:0,onClick:h=>r.handlerNew(l.id),class:"btn btn-xs btn-default"},[It,m(" Téléverser un document ")],8,Pt)):p("",!0),o.debugEnabled?(i(),a("button",{key:1,class:"btn btn-xs btn-warning",onClick:C(h=>t.$emit("debug",l),["prevent"])}," Informations ",8,xt)):p("",!0)]),g(x,{documents:l.documents,tabs:s.tabsWithDocuments,manage:o.saCredentials.tabs[l.id].edit,"process-start":o.saCredentials.process_start,"process-manage":o.saCredentials.process_manage,"process-admin":o.saCredentials.process_admin,types:s.typesDocuments,"sign-process":r.useProcessDatas,"display-activity":!1,onFetch:r.fetch},null,8,["documents","tabs","manage","process-start","process-manage","process-admin","types","sign-process","onFetch"])],512)),[[S,s.selectedTabId===l.id]])),256))])])],64)}const At=j(q,[["render",Nt],["__scopeId","data-v-fc17618a"]]);export{At as A}; diff --git a/public/js/oscar/vite/dist/vendor11.js b/public/js/oscar/vite/dist/vendor11.js index d6a10be6f55d1008647992a29da45800b8a36056..4eddba7ccb40bce7b5aadb2cb9f9c3124c281768 100644 --- a/public/js/oscar/vite/dist/vendor11.js +++ b/public/js/oscar/vite/dist/vendor11.js @@ -1 +1 @@ -import{p as g,r as p,o as l,c as i,b as f,i as r,d as s,a as u,F as d,j as _,n as v,t as m}from"./vendor.js";import{M as C}from"./vendor5.js";import{A as h}from"./vendor14.js";import{g as b}from"./vendor16.js";import{_ as y}from"./vendor7.js";const A={name:"ActivityLogs",components:{Modal:C},props:{url:{required:!0}},data(){return{traces:[],modal:!1,pending:!1,out:!1}},methods:{fetch(){this.pending=!0,this.modal=!0,g.get(this.url).then(n=>{this.traces=n.data.traces,this.pending=!1},n=>{this.pending=!1,this.modal=!1,b.commit("addError",h.manageErrorResponse(n))})},handlerClickClose(){this.modal=!1}}},k={class:"activities timeline"},L={datetime:""},M={class:"duration"},x=["innerHTML"];function V(n,e,B,E,o,a){const c=p("modal");return l(),i(d,null,[f(c,{title:"Logs","title-icon":"icon-signal","pending-message":"Chargement des logs de l'activité",visible:o.modal,onModalValid:e[1]||(e[1]=t=>o.modal=!1),pending:o.pending,onModalCancel:e[2]||(e[2]=t=>o.modal=!1)},{buttons:r(()=>[s("button",{class:"btn btn-default",onClick:e[0]||(e[0]=(...t)=>a.handlerClickClose&&a.handlerClickClose(...t))}," Fermer ")]),default:r(()=>[s("section",k,[(l(!0),i(d,null,_(o.traces,t=>(l(),i("article",{class:v(["timeline-item","type-"+t.type])},[s("time",L,[s("strong",null,m(n.$filters.timeAgo(t.dateCreated.date)),1),s("div",M,m(n.$filters.date(t.dateCreated.date)),1)]),s("div",{class:"content",innerHTML:n.$filters.log(t.message)},null,8,x)],2))),256))])]),_:1},8,["visible","pending"]),s("button",{onClick:e[3]||(e[3]=(...t)=>a.fetch&&a.fetch(...t)),class:"btn btn-primary"},e[4]||(e[4]=[s("i",{class:"icon-signal"},null,-1),u(" Afficher les logs ")]))],64)}const j=y(A,[["render",V],["__scopeId","data-v-4c24528a"]]);export{j as A}; +import{s as p,r as g,o as i,c as l,b as f,j as r,d as o,a as u,F as d,k as _,n as h,t as c,p as v,i as C}from"./vendor.js";import{M as b}from"./vendor5.js";import{A as y}from"./vendor14.js";import{g as k}from"./vendor16.js";import{_ as A}from"./vendor7.js";const L={name:"ActivityLogs",components:{Modal:b},props:{url:{required:!0}},data(){return{traces:[],modal:!1,pending:!1,out:!1}},methods:{fetch(){this.pending=!0,this.modal=!0,p.get(this.url).then(e=>{this.traces=e.data.traces,this.pending=!1},e=>{this.pending=!1,this.modal=!1,k.commit("addError",y.manageErrorResponse(e))})},handlerClickClose(){this.modal=!1}}},M=e=>(v("data-v-4c24528a"),e=e(),C(),e),x={class:"activities timeline"},S={datetime:""},I={class:"duration"},V=["innerHTML"],B=M(()=>o("i",{class:"icon-signal"},null,-1));function E(e,s,F,N,a,n){const m=g("modal");return i(),l(d,null,[f(m,{title:"Logs","title-icon":"icon-signal","pending-message":"Chargement des logs de l'activité",visible:a.modal,onModalValid:s[1]||(s[1]=t=>a.modal=!1),pending:a.pending,onModalCancel:s[2]||(s[2]=t=>a.modal=!1)},{buttons:r(()=>[o("button",{class:"btn btn-default",onClick:s[0]||(s[0]=(...t)=>n.handlerClickClose&&n.handlerClickClose(...t))}," Fermer ")]),default:r(()=>[o("section",x,[(i(!0),l(d,null,_(a.traces,t=>(i(),l("article",{class:h(["timeline-item","type-"+t.type])},[o("time",S,[o("strong",null,c(e.$filters.timeAgo(t.dateCreated.date)),1),o("div",I,c(e.$filters.date(t.dateCreated.date)),1)]),o("div",{class:"content",innerHTML:e.$filters.log(t.message)},null,8,V)],2))),256))])]),_:1},8,["visible","pending"]),o("button",{onClick:s[3]||(s[3]=(...t)=>n.fetch&&n.fetch(...t)),class:"btn btn-primary"},[B,u(" Afficher les logs ")])],64)}const z=A(L,[["render",E],["__scopeId","data-v-4c24528a"]]);export{z as A}; diff --git a/public/js/oscar/vite/dist/vendor12.js b/public/js/oscar/vite/dist/vendor12.js index 6cd95d93980040a4f2f093a657ff9acf1db7abc9..17e34c25ee4f0e87fed734d8f2ae7ca1cf0a1a95 100644 --- a/public/js/oscar/vite/dist/vendor12.js +++ b/public/js/oscar/vite/dist/vendor12.js @@ -1 +1 @@ -import{p as c,r as f,z as g,o as l,c as i,b,d as t,a as r,g as a,F as _,j as x,w as k,v as N,h as w,t as m,l as C}from"./vendor.js";import{L as E}from"./vendor17.js";import{A as M}from"./vendor14.js";import{P as L}from"./vendor18.js";import{_ as B}from"./vendor7.js";const D={directives:{focus:n=>n.focus()},components:{PersonDisplay:L,Loader:E},props:{url:{default:null},showallowed:{default:!1},manageuserallowed:{default:!1},manageadminallowed:{default:!1},items:{default:[]}},data(){return{notes:[],editedNote:null,mode:null,error:null,loading:null}},methods:{handlerNew(){this.mode="create",this.editedNote={id:-1,content:""}},applyEdit(){this.loading="Enregistrement en cours",c.post(this.url,{action:this.mode,note_id:this.editedNote.id,content:this.editedNote.content}).then(()=>{this.fetch()},n=>{this.handleError(n)}).finally(()=>{this.editedNote=null,this.loading=null})},fetch(){this.loading="Chargement des notes",c.get(this.url).then(n=>{console.log("Update note",n),this.$emit("update",n.data),this.loading=null},n=>{this.handleError(n),this.loading=null})},handlerDelete(n){this.loading="Suppression en cours",c.post(this.url,{action:"delete",note_id:n}).then(()=>{this.fetch()},e=>{this.handleError(e)}).finally(()=>this.loading=null)},handleModify(n){this.mode="update",this.editedNote={id:n.id,content:n.content}},handleError(n){if(!n.response.data){this.error=n;return}if(n.response.headers.get("content-type").includes("text/html")){var e=document.createElement("html");e.innerHTML=n.response.data;const d=e.querySelector('[id="contenu-principal"]');if(d){this.error=d.innerHTML;return}}this.error=M.manageErrorResponse(n)}},mounted(){}},T={style:{position:"relative"}},A={key:0,class:"overlay",style:{"z-index":"101"}},H={class:"overlay-content",style:{"max-width":"50%"}},V={class:"alert-danger alert"},F=["innerHTML"],P={class:"admin-bar text-right"},R={class:"note"},S={class:"note-header"},z={key:1},I={key:0},U=["onClick"],X=["onClick"],j={class:"note-content"},q={key:1,class:"overlay"},G={class:"overlay-content",style:{height:"80vh",display:"flex","flex-direction":"column"}},J={key:0},K={key:1},O={class:"row",style:{"flex-grow":"2"}},Q={class:"col-md-12",style:{height:"100%",display:"flex","flex-direction":"column"}},W={class:"row"},Y={class:"col-md-12"},Z={class:"buttons-bar"};function $(n,e,d,ee,o,u){const v=f("Loader"),h=f("PersonDisplay"),p=g("focus");return l(),i("section",T,[b(v,{visible:o.loading,text:o.loading},null,8,["visible","text"]),o.error?(l(),i("div",A,[t("div",H,[t("h2",null,[e[8]||(e[8]=r(" Erreur notes ")),t("span",{class:"overlay-closer",onClick:e[0]||(e[0]=s=>o.error=null)},"X")]),t("div",V,[e[9]||(e[9]=t("i",{class:"icon-attention-1"},null,-1)),t("div",{innerHTML:o.error},null,8,F)]),t("button",{class:"btn btn-default",onClick:e[1]||(e[1]=s=>o.error=null)},e[10]||(e[10]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Fermer ")]))])])):a("",!0),t("nav",P,[d.manageadminallowed||d.manageuserallowed?(l(),i("a",{key:0,class:"btn btn-default btn-xs",onClick:e[2]||(e[2]=s=>u.handlerNew())},e[11]||(e[11]=[t("i",{class:"icon-doc-add"},null,-1),r(" Nouvelle ")]))):a("",!0),t("a",{class:"btn btn-default btn-xs",onClick:e[3]||(e[3]=s=>u.fetch())},e[12]||(e[12]=[t("i",{class:"icon-ref"},null,-1),r(" Reload ")]))]),(l(!0),i(_,null,x(d.items,s=>(l(),i("div",R,[t("header",S,[t("div",null,[t("span",null,[e[13]||(e[13]=t("i",{class:"icon-calendar"},null,-1)),r(" "+m(n.$filters.dateFull(s.dateRef)),1)]),t("span",null,[e[14]||(e[14]=t("i",{class:"icon-user"},null,-1)),s.createdBy.id?(l(),C(h,{key:0,person:s.createdBy},null,8,["person"])):(l(),i("em",z,m(s.createdBy.username?s.createdBy.username:"Inconnu"),1))])]),d.manageadminallowed||s.mine&&d.manageuserallowed?(l(),i("div",I,[t("button",{type:"button",class:"btn-xs btn btn-danger",onClick:y=>u.handlerDelete(s.id),style:{"margin-right":"1em"}},e[15]||(e[15]=[t("i",{class:"icon-trash",style:{background:"transparent"}},null,-1),r(" Supprimer")]),8,U),t("button",{type:"button",class:"btn btn-xs btn-default",onClick:y=>u.handleModify(s)},e[16]||(e[16]=[t("i",{class:"icon-pencil"},null,-1),r(" Modifier ")]),8,X)])):a("",!0)]),t("div",j,m(s.content),1)]))),256)),o.editedNote?(l(),i("div",q,[t("div",G,[t("h2",null,[t("small",null,[e[17]||(e[17]=t("i",{class:"icon-doc"},null,-1)),o.mode=="create"?(l(),i("span",J,"Rédaction d'une nouvelle note")):a("",!0),o.mode=="update"?(l(),i("span",K,"Modification d'une note")):a("",!0)]),t("span",{class:"overlay-closer",onClick:e[4]||(e[4]=s=>o.editedNote=null)},"X")]),t("div",O,[t("div",Q,[e[18]||(e[18]=t("label",{for:"content"},"Contenu",-1)),k(t("textarea",{maxlength:"9000","onUpdate:modelValue":e[5]||(e[5]=s=>o.editedNote.content=s),id:"content",class:"form-control",style:{"flex-grow":"2"}},null,512),[[p],[N,o.editedNote.content]])])]),t("div",W,[t("div",Y,[t("nav",Z,[t("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:e[6]||(e[6]=s=>o.editedNote=null)},e[19]||(e[19]=[t("i",{class:"icon-cancel-alt"},null,-1),r(" Annuler ")])),t("a",{class:"btn btn-success",href:"#",onClick:e[7]||(e[7]=w(s=>u.applyEdit(),["prevent"]))},e[20]||(e[20]=[t("i",{class:"icon-valid"},null,-1),r(" Enregistrer ")]))])])])])])):a("",!0)])}const ie=B(D,[["render",$],["__scopeId","data-v-543bfc57"]]);export{ie as A}; +import{s as h,r as m,B as g,o as i,c as d,b,d as e,a,g as c,F as x,k,w as N,v as w,h as C,t as _,m as E,p as M,i as L}from"./vendor.js";import{L as B}from"./vendor17.js";import{A as D}from"./vendor14.js";import{P as S}from"./vendor18.js";import{_ as T}from"./vendor7.js";const A={directives:{focus:t=>t.focus()},components:{PersonDisplay:S,Loader:B},props:{url:{default:null},showallowed:{default:!1},manageuserallowed:{default:!1},manageadminallowed:{default:!1},items:{default:[]}},data(){return{notes:[],editedNote:null,mode:null,error:null,loading:null}},methods:{handlerNew(){this.mode="create",this.editedNote={id:-1,content:""}},applyEdit(){this.loading="Enregistrement en cours",h.post(this.url,{action:this.mode,note_id:this.editedNote.id,content:this.editedNote.content}).then(()=>{this.fetch()},t=>{this.handleError(t)}).finally(()=>{this.editedNote=null,this.loading=null})},fetch(){this.loading="Chargement des notes",h.get(this.url).then(t=>{console.log("Update note",t),this.$emit("update",t.data),this.loading=null},t=>{this.handleError(t),this.loading=null})},handlerDelete(t){this.loading="Suppression en cours",h.post(this.url,{action:"delete",note_id:t}).then(()=>{this.fetch()},n=>{this.handleError(n)}).finally(()=>this.loading=null)},handleModify(t){this.mode="update",this.editedNote={id:t.id,content:t.content}},handleError(t){if(!t.response.data){this.error=t;return}if(t.response.headers.get("content-type").includes("text/html")){var n=document.createElement("html");n.innerHTML=t.response.data;const r=n.querySelector('[id="contenu-principal"]');if(r){this.error=r.innerHTML;return}}this.error=D.manageErrorResponse(t)}},mounted(){}},l=t=>(M("data-v-543bfc57"),t=t(),L(),t),H={style:{position:"relative"}},I={key:0,class:"overlay",style:{"z-index":"101"}},V={class:"overlay-content",style:{"max-width":"50%"}},F={class:"alert-danger alert"},P=l(()=>e("i",{class:"icon-attention-1"},null,-1)),R=["innerHTML"],U=l(()=>e("i",{class:"icon-cancel-outline"},null,-1)),X={class:"admin-bar text-right"},q=l(()=>e("i",{class:"icon-doc-add"},null,-1)),z=l(()=>e("i",{class:"icon-ref"},null,-1)),j={class:"note"},G={class:"note-header"},J=l(()=>e("i",{class:"icon-calendar"},null,-1)),K=l(()=>e("i",{class:"icon-user"},null,-1)),O={key:1},Q={key:0},W=["onClick"],Y=l(()=>e("i",{class:"icon-trash",style:{background:"transparent"}},null,-1)),Z=["onClick"],$=l(()=>e("i",{class:"icon-pencil"},null,-1)),ee={class:"note-content"},te={key:1,class:"overlay"},ne={class:"overlay-content",style:{height:"80vh",display:"flex","flex-direction":"column"}},se=l(()=>e("i",{class:"icon-doc"},null,-1)),oe={key:0},le={key:1},ie={class:"row",style:{"flex-grow":"2"}},de={class:"col-md-12",style:{height:"100%",display:"flex","flex-direction":"column"}},ae=l(()=>e("label",{for:"content"},"Contenu",-1)),re={class:"row"},ce={class:"col-md-12"},ue={class:"buttons-bar"},he=l(()=>e("i",{class:"icon-cancel-alt"},null,-1)),_e=l(()=>e("i",{class:"icon-valid"},null,-1));function me(t,n,r,pe,o,u){const p=m("Loader"),f=m("PersonDisplay"),v=g("focus");return i(),d("section",H,[b(p,{visible:o.loading,text:o.loading},null,8,["visible","text"]),o.error?(i(),d("div",I,[e("div",V,[e("h2",null,[a(" Erreur notes "),e("span",{class:"overlay-closer",onClick:n[0]||(n[0]=s=>o.error=null)},"X")]),e("div",F,[P,e("div",{innerHTML:o.error},null,8,R)]),e("button",{class:"btn btn-default",onClick:n[1]||(n[1]=s=>o.error=null)},[U,a(" Fermer ")])])])):c("",!0),e("nav",X,[r.manageadminallowed||r.manageuserallowed?(i(),d("a",{key:0,class:"btn btn-default btn-xs",onClick:n[2]||(n[2]=s=>u.handlerNew())},[q,a(" Nouvelle ")])):c("",!0),e("a",{class:"btn btn-default btn-xs",onClick:n[3]||(n[3]=s=>u.fetch())},[z,a(" Reload ")])]),(i(!0),d(x,null,k(r.items,s=>(i(),d("div",j,[e("header",G,[e("div",null,[e("span",null,[J,a(" "+_(t.$filters.dateFull(s.dateRef)),1)]),e("span",null,[K,s.createdBy.id?(i(),E(f,{key:0,person:s.createdBy},null,8,["person"])):(i(),d("em",O,_(s.createdBy.username?s.createdBy.username:"Inconnu"),1))])]),r.manageadminallowed||s.mine&&r.manageuserallowed?(i(),d("div",Q,[e("button",{type:"button",class:"btn-xs btn btn-danger",onClick:y=>u.handlerDelete(s.id),style:{"margin-right":"1em"}},[Y,a(" Supprimer")],8,W),e("button",{type:"button",class:"btn btn-xs btn-default",onClick:y=>u.handleModify(s)},[$,a(" Modifier ")],8,Z)])):c("",!0)]),e("div",ee,_(s.content),1)]))),256)),o.editedNote?(i(),d("div",te,[e("div",ne,[e("h2",null,[e("small",null,[se,o.mode=="create"?(i(),d("span",oe,"Rédaction d'une nouvelle note")):c("",!0),o.mode=="update"?(i(),d("span",le,"Modification d'une note")):c("",!0)]),e("span",{class:"overlay-closer",onClick:n[4]||(n[4]=s=>o.editedNote=null)},"X")]),e("div",ie,[e("div",de,[ae,N(e("textarea",{maxlength:"9000","onUpdate:modelValue":n[5]||(n[5]=s=>o.editedNote.content=s),id:"content",class:"form-control",style:{"flex-grow":"2"}},null,512),[[v],[w,o.editedNote.content]])])]),e("div",re,[e("div",ce,[e("nav",ue,[e("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:n[6]||(n[6]=s=>o.editedNote=null)},[he,a(" Annuler ")]),e("a",{class:"btn btn-success",href:"#",onClick:n[7]||(n[7]=C(s=>u.applyEdit(),["prevent"]))},[_e,a(" Enregistrer ")])])])])])])):c("",!0)])}const xe=T(A,[["render",me],["__scopeId","data-v-543bfc57"]]);export{xe as A}; diff --git a/public/js/oscar/vite/dist/vendor13.js b/public/js/oscar/vite/dist/vendor13.js index 4467357072d12858532c182f0011bf8612f22f32..3c07329e389f524dd48736b472060fbc6e29bab7 100644 --- a/public/js/oscar/vite/dist/vendor13.js +++ b/public/js/oscar/vite/dist/vendor13.js @@ -1 +1 @@ -import{p as v,o as i,c as a,b as h,i as f,T as g,d as s,F as m,j as p,t as l,a as o,g as u,h as c,w as C,k}from"./vendor.js";import{_}from"./vendor7.js";const w={props:{url:{default:""},standalone:{default:!0},datas:{default:{}}},computed:{synthesis(){return this.standalone?this.infos:this.datas}},data(){return{infos:null,pendingMsg:null,showCuration:!1,masses:[]}},methods:{fetch(){this.pendingMsg="Chargement des données financières",v.get(this.url).then(t=>{this.infos=t.data.synthesis,this.masses=t.data.masses},t=>{console.log(t)}).then(t=>{this.pendingMsg=!1})}},mounted(){this.fetch()}},I={key:0,class:"overlay"},M={class:"overlay-content"},N={class:"card row"},B={class:"col-md-4"},T={class:"col-md-8"},V=["onUpdate:modelValue","onChange"],x=["value"],A={key:0,class:"alert alert-danger"},D={key:0,class:"alert-warning alert"},E={key:0,class:"pending"},L={class:""},R={key:0},j={key:0,class:"table table-condensed card synthesis"},F=["href"],S={style:{"text-align":"right"},class:"text-private"},U={style:{"text-align":"right"},class:"text-private"},q={class:"total"},z={style:{"text-align":"right"},class:"text-private"},H={style:{"text-align":"right"},class:"text-private"},Q={key:0},X={href:"#repport-nb",class:"label label-info"},G={style:{"text-align":"right"},class:"text-private"},J={style:{"text-align":"right"},class:"text-private"},K={class:"table table-condensed card synthesis"},O={class:"label label-info xs",href:"#repport-1"},P={style:{"text-align":"right"},class:"text-private"},W={style:{"text-align":"right"},class:"text-private"},Y={key:1},Z={key:0},$={key:1},ss={key:0,class:"table table-condensed card synthesis"},es={class:"label label-info",href:"#repport-0"},ts={style:{"text-align":"right"},class:"text-private"};function ns(t,e,ls,is,y,n){return i(),a("section",null,[h(g,{name:"fade"},{default:f(()=>[y.showCuration?(i(),a("div",I,[s("div",M,[s("h3",null,[e[4]||(e[4]=o(" Qualification des comptes ")),s("span",{class:"overlay-closer",onClick:e[0]||(e[0]=r=>y.showCuration=!1)},"X")]),e[10]||(e[10]=s("p",null,"Les comptes suivants ne sont pas qualifiés, vous pouvez utiliser cet écran pour les attribuer à une masse budgétaire :",-1)),(i(!0),a(m,null,p(n.synthesis.curations,r=>(i(),a("div",N,[s("div",B,[s("strong",null,l(r.compte),1),e[5]||(e[5]=o(" - ")),s("em",null,l(r.compteInfos.label),1)]),s("div",T,[C(s("select",{name:"",id:"",class:"form-control","onUpdate:modelValue":d=>t.affectations[r.compte]=d,onChange:d=>t.updateAffectations(r.compte,d)},[e[6]||(e[6]=s("option",{value:"0"},"Ignorer",-1)),e[7]||(e[7]=s("option",{value:"1"},"Traiter comme une recette",-1)),(i(!0),a(m,null,p(y.masses,(d,b)=>(i(),a("option",{value:b},l(d),9,x))),256))],40,V),[[k,t.affectations[r.compte]]])])]))),256)),e[11]||(e[11]=s("hr",null,null,-1)),s("button",{onClick:e[1]||(e[1]=(...r)=>t.handlerCurationCancel&&t.handlerCurationCancel(...r)),class:"btn btn-danger"},e[8]||(e[8]=[s("i",{class:"icon-cancel-circled"},null,-1),o("Annuler")])),s("button",{onClick:e[2]||(e[2]=(...r)=>t.handlerCurationConfirm&&t.handlerCurationConfirm(...r)),class:"btn btn-success"},e[9]||(e[9]=[s("i",{class:"icon-floppy"},null,-1),o("Enregistrer")]))])])):u("",!0)]),_:1}),h(g,{name:"fade"},{default:f(()=>[t.error?(i(),a("div",A,[e[12]||(e[12]=s("i",{class:"icon-attention-1"},null,-1)),o(" Il y'a eut un problème lors de la récupération des données financières : "+l(t.error),1)])):u("",!0)]),_:1}),h(g,{name:"fade"},{default:f(()=>[t.warning?(i(),a("div",D,[e[13]||(e[13]=s("i",{class:"icon-warning-empty"},null,-1)),o(" Les données affichées peuvent ne pas être à jour : "+l(t.warning),1)])):u("",!0)]),_:1}),h(g,{name:"fade"},{default:f(()=>[y.pendingMsg?(i(),a("div",E,[s("div",L,[e[14]||(e[14]=s("i",{class:"icon-spinner animate-spin"},null,-1)),o(" "+l(y.pendingMsg),1)])])):u("",!0)]),_:1}),n.synthesis?(i(),a("div",R,[n.synthesis?(i(),a("table",j,[e[17]||(e[17]=s("thead",null,[s("tr",null,[s("th",null,"Masse"),s("th",{style:{"text-align":"right"}},"Engagé"),s("th",{style:{"text-align":"right"}},"Réalisé")])],-1)),s("tbody",null,[(i(!0),a(m,null,p(n.synthesis.masses,(r,d)=>(i(),a("tr",null,[s("th",null,[s("small",null,l(r),1),s("a",{class:"label label-info xs",href:"#repport-"+d},l(n.synthesis.synthesis[d].nbr_effectue)+" / "+l(n.synthesis.synthesis[d].nbr_engage),9,F)]),s("td",S,l(t.$filters.money(n.synthesis.synthesis[d].total_engage)),1),s("td",U,l(t.$filters.money(n.synthesis.synthesis[d].total_effectue)),1)]))),256))]),s("tbody",null,[s("tr",q,[e[15]||(e[15]=s("th",null,"Total",-1)),s("td",z,l(t.$filters.money(n.synthesis.synthesis.totaux.engage)),1),s("td",H,l(t.$filters.money(n.synthesis.synthesis.totaux.effectue)),1)])]),s("tbody",null,[n.synthesis.synthesis["N.B"].total!=0?(i(),a("tr",Q,[s("th",null,[e[16]||(e[16]=s("small",null,[s("i",{class:"icon-attention"}),o(" Hors-masse")],-1)),s("a",X,l(n.synthesis.synthesis["N.B"].nbr),1)]),s("td",G,l(t.$filters.money(n.synthesis.synthesis["N.B"].total_engage)),1),s("td",J,l(t.$filters.money(n.synthesis.synthesis["N.B"].total_effectue)),1)])):u("",!0)])])):u("",!0),s("div",null,[e[19]||(e[19]=s("h3",null,[s("i",{class:"icon-calculator"}),o("Recettes")],-1)),s("table",K,[s("tbody",null,[s("tr",null,[s("th",null,[e[18]||(e[18]=o("Recette ")),s("a",O,l(n.synthesis.synthesis[1].nbr),1)]),s("td",P,l(t.$filters.money(n.synthesis.synthesis[1].total_engage)),1),s("td",W,l(t.$filters.money(n.synthesis.synthesis[1].total_effectue)),1)])])])])])):u("",!0),t.manageIgnored&&n.synthesis&&n.synthesis.synthesis[0].total!=0?(i(),a("div",Y,[s("a",{href:"#",onClick:e[3]||(e[3]=c(r=>t.displayIgnored=!t.displayIgnored,["prevent"]))},[t.displayIgnored?(i(),a("span",Z,e[20]||(e[20]=[s("i",{class:"icon-eye-off"},null,-1),o(" Cacher")]))):(i(),a("span",$,e[21]||(e[21]=[s("i",{class:"icon-eye"},null,-1),o(" Montrer")]))),e[22]||(e[22]=o(" les données ignorées "))]),t.spentlines&&t.displayIgnored?(i(),a("table",ss,[s("tbody",null,[s("tr",null,[s("th",null,[e[23]||(e[23]=o(" Ignorées ")),s("a",es,l(n.synthesis.synthesis[0].nbr),1)]),s("td",ts,l(t.$filters.money(n.synthesis.synthesis[0].total)),1)])])])):u("",!0)])):u("",!0)])}const rs=_(w,[["render",ns]]);export{rs as A}; +import{s as p,o as l,c as a,b as u,j as y,T as _,d as s,F as f,k as g,t as n,g as d,a as i,h as b,w as v,l as C}from"./vendor.js";import{_ as k}from"./vendor7.js";const w={props:{url:{default:""},standalone:{default:!0},datas:{default:{}}},computed:{synthesis(){return this.standalone?this.infos:this.datas}},data(){return{infos:null,pendingMsg:null,showCuration:!1,masses:[]}},methods:{fetch(){this.pendingMsg="Chargement des données financières",p.get(this.url).then(e=>{this.infos=e.data.synthesis,this.masses=e.data.masses},e=>{console.log(e)}).then(e=>{this.pendingMsg=!1})}},mounted(){this.fetch()}},I={key:0,class:"overlay"},M={class:"overlay-content"},N=s("p",null,"Les comptes suivants ne sont pas qualifiés, vous pouvez utiliser cet écran pour les attribuer à une masse budgétaire :",-1),B={class:"card row"},T={class:"col-md-4"},V={class:"col-md-8"},x=["onUpdate:modelValue","onChange"],A=s("option",{value:"0"},"Ignorer",-1),D=s("option",{value:"1"},"Traiter comme une recette",-1),E=["value"],L=s("hr",null,null,-1),R=s("i",{class:"icon-cancel-circled"},null,-1),j=s("i",{class:"icon-floppy"},null,-1),F={key:0,class:"alert alert-danger"},S=s("i",{class:"icon-attention-1"},null,-1),U={key:0,class:"alert-warning alert"},q=s("i",{class:"icon-warning-empty"},null,-1),z={key:0,class:"pending"},H={class:""},Q=s("i",{class:"icon-spinner animate-spin"},null,-1),X={key:0},G={key:0,class:"table table-condensed card synthesis"},J=s("thead",null,[s("tr",null,[s("th",null,"Masse"),s("th",{style:{"text-align":"right"}},"Engagé"),s("th",{style:{"text-align":"right"}},"Réalisé")])],-1),K=["href"],O={style:{"text-align":"right"},class:"text-private"},P={style:{"text-align":"right"},class:"text-private"},W={class:"total"},Y=s("th",null,"Total",-1),Z={style:{"text-align":"right"},class:"text-private"},$={style:{"text-align":"right"},class:"text-private"},ss={key:0},es=s("small",null,[s("i",{class:"icon-attention"}),i(" Hors-masse")],-1),ts={href:"#repport-nb",class:"label label-info"},ns={style:{"text-align":"right"},class:"text-private"},ls={style:{"text-align":"right"},class:"text-private"},as=s("h3",null,[s("i",{class:"icon-calculator"}),i("Recettes")],-1),is={class:"table table-condensed card synthesis"},os={class:"label label-info xs",href:"#repport-1"},rs={style:{"text-align":"right"},class:"text-private"},ds={style:{"text-align":"right"},class:"text-private"},hs={key:1},cs={key:0},us=s("i",{class:"icon-eye-off"},null,-1),ys={key:1},_s=s("i",{class:"icon-eye"},null,-1),fs={key:0,class:"table table-condensed card synthesis"},gs={class:"label label-info",href:"#repport-0"},ms={style:{"text-align":"right"},class:"text-private"};function ps(e,h,bs,vs,c,t){return l(),a("section",null,[u(_,{name:"fade"},{default:y(()=>[c.showCuration?(l(),a("div",I,[s("div",M,[s("h3",null,[i(" Qualification des comptes "),s("span",{class:"overlay-closer",onClick:h[0]||(h[0]=o=>c.showCuration=!1)},"X")]),N,(l(!0),a(f,null,g(t.synthesis.curations,o=>(l(),a("div",B,[s("div",T,[s("strong",null,n(o.compte),1),i(" - "),s("em",null,n(o.compteInfos.label),1)]),s("div",V,[v(s("select",{name:"",id:"",class:"form-control","onUpdate:modelValue":r=>e.affectations[o.compte]=r,onChange:r=>e.updateAffectations(o.compte,r)},[A,D,(l(!0),a(f,null,g(c.masses,(r,m)=>(l(),a("option",{value:m},n(r),9,E))),256))],40,x),[[C,e.affectations[o.compte]]])])]))),256)),L,s("button",{onClick:h[1]||(h[1]=(...o)=>e.handlerCurationCancel&&e.handlerCurationCancel(...o)),class:"btn btn-danger"},[R,i("Annuler")]),s("button",{onClick:h[2]||(h[2]=(...o)=>e.handlerCurationConfirm&&e.handlerCurationConfirm(...o)),class:"btn btn-success"},[j,i("Enregistrer")])])])):d("",!0)]),_:1}),u(_,{name:"fade"},{default:y(()=>[e.error?(l(),a("div",F,[S,i(" Il y'a eut un problème lors de la récupération des données financières : "+n(e.error),1)])):d("",!0)]),_:1}),u(_,{name:"fade"},{default:y(()=>[e.warning?(l(),a("div",U,[q,i(" Les données affichées peuvent ne pas être à jour : "+n(e.warning),1)])):d("",!0)]),_:1}),u(_,{name:"fade"},{default:y(()=>[c.pendingMsg?(l(),a("div",z,[s("div",H,[Q,i(" "+n(c.pendingMsg),1)])])):d("",!0)]),_:1}),t.synthesis?(l(),a("div",X,[t.synthesis?(l(),a("table",G,[J,s("tbody",null,[(l(!0),a(f,null,g(t.synthesis.masses,(o,r)=>(l(),a("tr",null,[s("th",null,[s("small",null,n(o),1),s("a",{class:"label label-info xs",href:"#repport-"+r},n(t.synthesis.synthesis[r].nbr_effectue)+" / "+n(t.synthesis.synthesis[r].nbr_engage),9,K)]),s("td",O,n(e.$filters.money(t.synthesis.synthesis[r].total_engage)),1),s("td",P,n(e.$filters.money(t.synthesis.synthesis[r].total_effectue)),1)]))),256))]),s("tbody",null,[s("tr",W,[Y,s("td",Z,n(e.$filters.money(t.synthesis.synthesis.totaux.engage)),1),s("td",$,n(e.$filters.money(t.synthesis.synthesis.totaux.effectue)),1)])]),s("tbody",null,[t.synthesis.synthesis["N.B"].total!=0?(l(),a("tr",ss,[s("th",null,[es,s("a",ts,n(t.synthesis.synthesis["N.B"].nbr),1)]),s("td",ns,n(e.$filters.money(t.synthesis.synthesis["N.B"].total_engage)),1),s("td",ls,n(e.$filters.money(t.synthesis.synthesis["N.B"].total_effectue)),1)])):d("",!0)])])):d("",!0),s("div",null,[as,s("table",is,[s("tbody",null,[s("tr",null,[s("th",null,[i("Recette "),s("a",os,n(t.synthesis.synthesis[1].nbr),1)]),s("td",rs,n(e.$filters.money(t.synthesis.synthesis[1].total_engage)),1),s("td",ds,n(e.$filters.money(t.synthesis.synthesis[1].total_effectue)),1)])])])])])):d("",!0),e.manageIgnored&&t.synthesis&&t.synthesis.synthesis[0].total!=0?(l(),a("div",hs,[s("a",{href:"#",onClick:h[3]||(h[3]=b(o=>e.displayIgnored=!e.displayIgnored,["prevent"]))},[e.displayIgnored?(l(),a("span",cs,[us,i(" Cacher")])):(l(),a("span",ys,[_s,i(" Montrer")])),i(" les données ignorées ")]),e.spentlines&&e.displayIgnored?(l(),a("table",fs,[s("tbody",null,[s("tr",null,[s("th",null,[i(" Ignorées "),s("a",gs,n(t.synthesis.synthesis[0].nbr),1)]),s("td",ms,n(e.$filters.money(t.synthesis.synthesis[0].total)),1)])])])):d("",!0)])):d("",!0)])}const ws=k(w,[["render",ps]]);export{ws as A}; diff --git a/public/js/oscar/vite/dist/vendor15.js b/public/js/oscar/vite/dist/vendor15.js index 7e3458590b1a3501b29ecf56e20b12dbb35cdf44..301f360ef7ae1b65f5ec8b20c6fb93f76edc260b 100644 --- a/public/js/oscar/vite/dist/vendor15.js +++ b/public/js/oscar/vite/dist/vendor15.js @@ -1 +1 @@ -import{p as v,r as f,o as i,c as r,b as c,i as x,d as t,a as d,t as u,g as y,F as b,j as p,h as V,w as h,v as P,k as N,l as g,f as I,n as C}from"./vendor.js";import{D as M,P as U}from"./vendor6.js";import{L as z}from"./vendor17.js";import{O as R}from"./vendor9.js";import{M as q}from"./vendor5.js";import{P as B}from"./vendor18.js";import{_ as F}from"./vendor7.js";const A={components:{PersonDisplay:B,Modal:q,datepicker:M,Loader:z,organizationselector:R,personselector:U},props:{urlNew:{required:!0,type:String},url:{required:!0,type:String},title:{required:!0},items:{required:!0},roles:{required:!0},entityLinkShow:{default:!1},manage:{required:!0,default:!0,type:Boolean},standalone:{required:!0,default:!0,type:Boolean},debugEnabled:{default:!1,type:Boolean}},data(){return{selectedPerson:null,selected:null,entityEdited:null,entityDelete:null,entityNew:null,error:null,loading:!1,editMode:!1,standalone_items:[],standalone_roles:[],standalone_manage:!1,standalone_urlNew:null,toPaste:null}},computed:{rolesList(){return this.standalone?this.standalone_roles:this.roles},urlNewUse(){return this.standalone?this.standalone_urlNew:this.urlNew},entities(){return this.standalone?this.standalone_items:this.items?this.items:[]},sortedFull(){return this.entities.sort((n,e)=>n.enrolled-e.enrolled)},stacked(){let n={};return this.entities&&this.entities.forEach(e=>{let o=e.enrolled;n.hasOwnProperty(o)||(n[o]={id:o,firstname:e.firstname,lastname:e.lastname,enrolled:e.enrolled,urlShow:e.urlShow,enrolledLabel:e.enrolledLabel,hasPrimary:!1},n[o].roles={}),n[o].roles[e.roleId]={role:e.roleLabel,roleId:e.roleId,rolePrincipal:e.rolePrincipal,context:e.context},e.rolePrincipal&&(n[o].hasPrimary=!0)}),n}},methods:{handlerEdit(n){this.entityEdited=n},handlerDelete(n){this.entityDelete=n},handlerNew(){this.entityNew={end:"",start:"",role:null,enroled:null,enroledLabel:""}},handlerEnrolledSelected(n){this.entityNew.enroled=n.id,this.entityNew.enroledLabel=n.label},handlerEnrolledSelectedPerson(n){this.selected=n.id,this.entityNew.enroled=n.id,this.entityNew.enroledLabel=n.label},handlerCancel(){this.entityNew.enroled=null,this.entityNew.enroledLabel="",this.entityNew.role=null},open(n){document.location=n},handlerEditEnable(){this.editMode=!this.editMode},performDelete(){this.loading="Suppression...";var n=this.entityDelete.urlDelete;this.entityDelete=null,v.post(n,{}).then(e=>{},e=>{this.error=e.body}).then(e=>{this.loading=!1,this.fetch()})},getRoleById(n){return this.rolesList.find(e=>e.id===n)},performEdit(){this.loading="Enregistrement des modifications";let n=new FormData;n.append("dateStart",this.entityEdited.start),n.append("dateEnd",this.entityEdited.end),n.append("role",this.entityEdited.roleId),n.append("enrolled",this.entityEdited.enrolled);var e=this.entityEdited.urlEdit;return this.entityEdited=null,v.post(e,n).then(o=>{},o=>{this.error="Erreur : Impossible de modifier le rôle : "+o.body}).then(o=>{this.loading=!1,this.fetch()}),!1},performNew(){let n=new FormData;this.loading="Création...";var e=this.entityNew.enroled;n.append("dateStart",this.entityNew.start),n.append("dateEnd",this.entityNew.end),n.append("role",this.entityNew.role),n.append("enroled",e),this.entityNew=null,v.post(this.urlNewUse+"/"+e,n).then(o=>{},o=>{this.error=o.status==403?"Vous n'êtes pas authorisé à faire ça":"Erreur : "+o.body}).then(o=>{this.loading=!1,this.fetch()})},performPast(){let n=new FormData;this.loading="Création...";let e=JSON.stringify(this.toPaste.filter(o=>o.selected));n.append("action","multi"),n.append("json",e),v.post(this.urlNewUse,n).then(o=>{},o=>{this.error=o.status==403?"Vous n'êtes pas authorisé à faire ça":"Erreur : "+o.body}).then(o=>{this.loading=!1,this.toPaste=null,this.fetch()})},fetch(){this.loading="Chargement des données",v.get(this.url).then(n=>{if(this.standalone)n.data.roles&&(this.standalone_roles=n.data.roles),n.data.manage&&(this.standalone_manage=n.data.manage),n.data.urlNew&&(this.standalone_urlNew=n.data.urlNew),n.data.persons?this.standalone_items=n.data.persons:n.data.organizations?this.standalone_items=n.data.organizations:this.standalone_items=n.data;else{let e=null;n.data.persons?e=n.data.persons:n.data.organizations?e=n.data.organizations:e=n.data,console.log("emit",e),this.$emit("update",{datas:{items:e,urlNew:n.data.urlNew,manage:n.data.manage}})}},n=>{this.error="Erreur : "+n.body}).finally(n=>this.loading=null)},handlerCopy(){let n="copy_"+this.title,e=[];this.entities.forEach(o=>{e.push({enrolled:o.enrolled,enrolledLabel:o.enrolledLabel,roleId:o.roleId,roleLabel:o.roleLabel})}),localStorage.setItem(n,JSON.stringify(e))},handlerPaste(){let n="copy_"+this.title,e=localStorage.getItem(n);if(e){let o=JSON.parse(e);this.toPaste=[],o.forEach(k=>{k.selected=!0,this.toPaste.push(k)})}}},mounted(){this.standalone&&this.fetch()}},O={style:{position:"relative"}},j={class:"alert alert-danger"},J={key:0,class:"overlay"},K={class:"overlay-content"},T={class:"admin-bar"},W={key:1,class:"overlay"},G={class:"overlay-content"},H={class:"table-bordered table-borderless table-responsive-md"},Q=["onUpdate:modelValue"],X=["onUpdate:modelValue"],Y=["value"],Z={class:"admin-bar"},$={key:2,class:"overlay"},ee={class:"overlay-content",style:{overflow:"visible"}},te=["action"],le={key:0},ne={class:"row"},se={class:"col-md-6"},oe={class:"form-group"},ie=["value"],re={class:"col-md-6"},de={class:"form-group"},ae={class:"form-group"},ue={class:"admin-bar"},me={key:3,class:"overlay"},ye={class:"overlay-content",style:{overflow:"visible"}},be={class:"row"},pe={class:"col-md-6"},fe={key:0,class:"cartouche"},ce={key:0,class:"addon"},he={key:1,class:"form-group"},ve={class:"control-label",for:"enroled"},ge={class:"form-group"},we=["value"],ke={class:"col-md-6"},Ee={class:"form-group"},Ne={class:"form-group"},Ce={class:"admin-bar"},Pe={key:4,class:"admin-bar text-right"},Le={key:0},De={key:1},Se={key:5},_e={class:"row card"},xe={class:"col-md-6"},Ve={key:0,class:"icon-cube"},Ie={key:1,class:"icon-cubes"},Me={key:3},Ue={key:0},ze={key:1},Re={class:"col-md-3"},qe={class:"col-md-3 text-right"},Be=["onClick"],Fe={key:0,class:"icon-pencil-1 icon-clickable"},Ae=["onClick"],Oe={key:0,class:"icon-trash icon-clickable"},je={key:6},Je=["href"],Ke={key:1},Te={key:1},We={key:1},Ge={class:"addon principal"};function He(n,e,o,k,s,a){const L=f("loader"),D=f("modal"),w=f("datepicker"),S=f("personselector"),_=f("organizationselector"),E=f("PersonDisplay");return i(),r("div",O,[c(L,{visible:s.loading,text:s.loading},null,8,["visible","text"]),c(D,{title:"Erreur",visible:s.error!=null&&s.error!=!1},{default:x(()=>[t("div",j," ERREUR : "+u(s.error),1)]),_:1},8,["visible"]),s.entityDelete?(i(),r("div",J,[t("div",K,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[0]||(e[0]=l=>s.entityDelete=null)}),t("h2",null,[e[30]||(e[30]=d("Supprimer le rôle ")),t("strong",null,u(s.entityDelete.role),1),e[31]||(e[31]=d(" de ")),t("strong",null,u(s.entityDelete.enrolledLabel),1),e[32]||(e[32]=d(" ?"))]),t("nav",T,[t("button",{class:"btn btn-default button-back",onClick:e[1]||(e[1]=l=>s.entityDelete=null)},e[33]||(e[33]=[t("i",{class:"icon-angle-left"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-primary",onClick:e[2]||(e[2]=(...l)=>a.performDelete&&a.performDelete(...l))},e[34]||(e[34]=[t("i",{class:"icon-trash"},null,-1),d(" Confirmer la suppression ")]))])])])):y("",!0),s.toPaste?(i(),r("div",W,[t("div",G,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[3]||(e[3]=l=>s.toPaste=null)}),t("h2",null,"Ajouter des "+u(o.title)+" ?",1),t("table",H,[t("thead",null,[t("tr",null,[e[35]||(e[35]=t("th",null,"#",-1)),t("th",null,u(o.title),1),e[36]||(e[36]=t("td",null,"Rôle",-1))])]),t("tbody",null,[(i(!0),r(b,null,p(s.toPaste,l=>(i(),r("tr",null,[t("td",null,[h(t("input",{type:"checkbox","onUpdate:modelValue":m=>l.selected=m},null,8,Q),[[I,l.selected]])]),t("td",null,u(l.enrolledLabel),1),t("td",null,[h(t("select",{name:"role",class:"form-control","onUpdate:modelValue":m=>l.roleId=m},[(i(!0),r(b,null,p(a.rolesList,m=>(i(),r("option",{value:m.id},u(m.label),9,Y))),256))],8,X),[[N,l.roleId]])])]))),256))])]),t("nav",Z,[t("button",{class:"btn btn-default button-back",onClick:e[4]||(e[4]=l=>s.toPaste="")},e[37]||(e[37]=[t("i",{class:"icon-angle-left"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-primary",onClick:e[5]||(e[5]=(...l)=>a.performPast&&a.performPast(...l))},e[38]||(e[38]=[t("i",{class:"icon-trash"},null,-1),d(" Confirmer ")]))])])])):y("",!0),s.entityEdited?(i(),r("div",$,[t("div",ee,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[6]||(e[6]=l=>s.entityEdited=null)}),t("form",{action:s.entityEdited.urlEdit,method:"post",onSubmit:e[12]||(e[12]=V((...l)=>a.performEdit&&a.performEdit(...l),["prevent","stop"]))},[t("h2",null,[s.entityEdited.enrolledLabel?(i(),r("span",le,[e[39]||(e[39]=d(" Modifier ")),t("strong",null,u(s.entityEdited.enrolledLabel),1),e[40]||(e[40]=d(" en tant que ")),t("em",null,u(s.entityEdited.role),1)])):y("",!0)]),h(t("input",{type:"hidden",name:"enroled",class:"form-control select2","onUpdate:modelValue":e[7]||(e[7]=l=>s.entityEdited.enrolled=l)},null,512),[[P,s.entityEdited.enrolled]]),t("div",ne,[t("div",se,[t("div",oe,[e[41]||(e[41]=t("label",{class:"control-label",for:"role"},"Rôle",-1)),h(t("select",{name:"role",class:"form-control","onUpdate:modelValue":e[8]||(e[8]=l=>s.entityEdited.roleId=l)},[(i(!0),r(b,null,p(a.rolesList,l=>(i(),r("option",{value:l.id},u(l.label),9,ie))),256))],512),[[N,s.entityEdited.roleId]])])]),t("div",re,[t("div",de,[e[42]||(e[42]=t("label",{class:"form-label control-label",for:"dateStart"},"Date de début",-1)),c(w,{moment:n.moment,value:s.entityEdited.start,onInput:e[9]||(e[9]=l=>{s.entityEdited.start=l})},null,8,["moment","value"])]),t("div",ae,[e[43]||(e[43]=t("label",{class:"form-label control-label",for:"dateEnd"},"Date de fin",-1)),c(w,{moment:n.moment,value:s.entityEdited.end,onInput:e[10]||(e[10]=l=>{s.entityEdited.end=l})},null,8,["moment","value"])])])]),t("nav",ue,[t("button",{class:"btn btn-default button-back",onClick:e[11]||(e[11]=l=>s.entityEdited=null)},e[44]||(e[44]=[t("i",{class:"icon-angle-left"},null,-1),d(" Annuler ")])),e[45]||(e[45]=t("button",{class:"btn btn-primary",type:"submit"},[t("i",{class:"icon-floppy"}),d(" Enregistrer ")],-1))])],40,te)])])):y("",!0),s.entityNew?(i(),r("div",me,[t("div",ye,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[13]||(e[13]=l=>s.entityNew=null)}),t("h2",null,[e[46]||(e[46]=d("Rôle de ")),t("strong",null,u(s.entityNew.enroledLabel),1),e[47]||(e[47]=d(" : "))]),h(t("input",{type:"hidden",name:"enroled",class:"form-control select2","onUpdate:modelValue":e[14]||(e[14]=l=>s.entityNew.enrolled=l)},null,512),[[P,s.entityNew.enrolled]]),t("div",be,[t("div",pe,[s.entityNew.enroledLabel?(i(),r("span",fe,[d(u(s.entityNew.enroledLabel)+" ",1),t("i",{class:"icon-cancel-alt icon-clickable",onClick:e[15]||(e[15]=(...l)=>a.handlerCancel&&a.handlerCancel(...l))}),s.entityNew.role?(i(),r("span",ce,u(a.getRoleById(s.entityNew.role).label),1)):y("",!0)])):(i(),r("div",he,[t("label",ve,u(o.title),1),o.title=="Personne"?(i(),g(S,{key:0,onChange:e[16]||(e[16]=l=>a.handlerEnrolledSelectedPerson(l)),modelValue:s.selected,"onUpdate:modelValue":e[17]||(e[17]=l=>s.selected=l)},null,8,["modelValue"])):(i(),g(_,{key:1,onChange:e[18]||(e[18]=l=>a.handlerEnrolledSelected(l)),modelValue:s.selected,"onUpdate:modelValue":e[19]||(e[19]=l=>s.selected=l)},null,8,["modelValue"]))])),t("div",ge,[e[48]||(e[48]=t("label",{class:"control-label",for:"role"},"Rôle",-1)),h(t("select",{name:"role",class:"form-control","onUpdate:modelValue":e[20]||(e[20]=l=>s.entityNew.role=l)},[(i(!0),r(b,null,p(a.rolesList,l=>(i(),r("option",{value:l.id},u(l.label),9,we))),256))],512),[[N,s.entityNew.role]])])]),t("div",ke,[t("div",Ee,[e[49]||(e[49]=t("label",{class:"form-label control-label",for:"dateStart"},"Date de début",-1)),c(w,{moment:n.moment,value:s.entityNew.start,onInput:e[21]||(e[21]=l=>{s.entityNew.start=l})},null,8,["moment","value"])]),t("div",Ne,[e[50]||(e[50]=t("label",{class:"form-label control-label",for:"dateEnd"},"Date de fin",-1)),c(w,{moment:n.moment,value:s.entityNew.end,onInput:e[22]||(e[22]=l=>{s.entityNew.end=l})},null,8,["moment","value"])])])]),t("nav",Ce,[t("button",{class:"btn btn-default button-back",type:"button",onClick:e[23]||(e[23]=l=>s.entityNew=null)},e[51]||(e[51]=[t("i",{class:"icon-angle-left"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-primary",type:"button",onClick:e[24]||(e[24]=(...l)=>a.performNew&&a.performNew(...l))},e[52]||(e[52]=[t("i",{class:"icon-floppy"},null,-1),d(" Enregistrer ")]))])])])):y("",!0),o.manage?(i(),r("nav",Pe,[t("a",{class:"btn btn-xs btn-default",onClick:e[25]||(e[25]=l=>a.handlerNew())},e[53]||(e[53]=[t("i",{class:"icon-doc-add"},null,-1),d(" Nouveau ")])),t("a",{class:"btn btn-xs btn-default",onClick:e[26]||(e[26]=l=>a.handlerEditEnable())},[e[54]||(e[54]=t("i",{class:"icon-edit"},null,-1)),s.editMode?(i(),r("span",Le,"Mode visualisation")):(i(),r("span",De,"Mode Edition"))]),t("a",{class:"btn btn-xs btn-default",onClick:e[27]||(e[27]=l=>a.handlerCopy())},e[55]||(e[55]=[t("i",{class:"icon-doc"},null,-1),d(" Copier ")])),t("a",{class:"btn btn-xs btn-default",onClick:e[28]||(e[28]=l=>a.handlerPaste())},e[56]||(e[56]=[t("i",{class:"icon-paste"},null,-1),d(" Coller ")])),o.debugEnabled?(i(),r("a",{key:0,class:"btn btn-xs btn-warning",onClick:e[29]||(e[29]=l=>a.fetch())},e[57]||(e[57]=[t("i",{class:"icon-bug"},null,-1),d(" Fetch ")]))):y("",!0)])):y("",!0),s.editMode?(i(),r("section",Se,[e[64]||(e[64]=t("div",{class:"alert alert-info"},[d(" Détails des affectations. Un élément peut apparaître plusieurs fois selon le contexte et le rôle. Les affectation aux activités sont indiquées par un cube simple "),t("i",{class:"icon-cube"}),d(", les affectations aux projets par plusieurs cubes "),t("i",{class:"icon-cubes"})],-1)),(i(!0),r(b,null,p(a.sortedFull,l=>(i(),r("article",_e,[t("div",xe,[l.context=="activity"?(i(),r("i",Ve)):(i(),r("i",Ie)),l.firstname?(i(),g(E,{key:2,person:l},null,8,["person"])):(i(),r("strong",Me,u(l.enrolledLabel),1)),t("small",null,[e[60]||(e[60]=d(" (")),l.context=="activity"?(i(),r("span",Ue,[e[58]||(e[58]=t("i",{class:"icon-cube"},null,-1)),d(" "+u(l.contextKey),1)])):(i(),r("span",ze,[e[59]||(e[59]=t("i",{class:"icon-cubes"},null,-1)),d(" "+u(l.contextKey),1)])),e[61]||(e[61]=d(") "))])]),t("div",Re,[t("em",{class:C({bold:l.rolePrincipal})},u(l.roleLabel),3)]),t("div",qe,[t("a",{onClick:m=>a.handlerEdit(l),style:{"white-space":"nowrap"}},[o.manage?(i(),r("i",Fe)):y("",!0),e[62]||(e[62]=d(" Modifier "))],8,Be),t("a",{onClick:m=>a.handlerDelete(l),style:{"white-space":"nowrap"}},[o.manage?(i(),r("i",Oe)):y("",!0),e[63]||(e[63]=d(" Supprimer "))],8,Ae)])]))),256))])):(i(),r("section",je,[(i(!0),r(b,null,p(a.stacked,l=>(i(),r("span",{class:C(["cartouche",{person:o.title=="Personne",organization:o.title=="Organisation",primary:l.hasPrimary,default:!l.hasPrimary}])},[o.entityLinkShow?(i(),r("a",{key:0,href:l.urlShow},[o.title=="Personne"?(i(),g(E,{key:0,person:l,"allow-tooltip":o.entityLinkShow},null,8,["person","allow-tooltip"])):(i(),r("span",Ke,u(l.enrolledLabel),1))],8,Je)):(i(),r("span",Te,[o.title=="Personne"?(i(),g(E,{key:0,person:l,"allow-tooltip":o.entityLinkShow},null,8,["person","allow-tooltip"])):(i(),r("span",We,u(l.enrolledLabel),1))])),t("span",Ge,[(i(!0),r(b,null,p(l.roles,m=>(i(),r("span",{class:C(["addon-module",{primary:m.rolePrincipal}])},u(m.role),3))),256))])],2))),256))]))])}const lt=F(A,[["render",He]]);export{lt as E}; +import{s as f,r as b,o as i,c as r,b as _,j as x,d as t,a,t as u,g as h,F as m,k as y,h as V,w as p,v as C,l as E,m as v,f as I,n as N}from"./vendor.js";import{D as M,P as U}from"./vendor6.js";import{L as z}from"./vendor17.js";import{O as R}from"./vendor9.js";import{M as q}from"./vendor5.js";import{P as B}from"./vendor18.js";import{_ as F}from"./vendor7.js";const A={components:{PersonDisplay:B,Modal:q,datepicker:M,Loader:z,organizationselector:R,personselector:U},props:{urlNew:{required:!0,type:String},url:{required:!0,type:String},title:{required:!0},items:{required:!0},roles:{required:!0},entityLinkShow:{default:!1},manage:{required:!0,default:!0,type:Boolean},standalone:{required:!0,default:!0,type:Boolean},debugEnabled:{default:!1,type:Boolean}},data(){return{selectedPerson:null,selected:null,entityEdited:null,entityDelete:null,entityNew:null,error:null,loading:!1,editMode:!1,standalone_items:[],standalone_roles:[],standalone_manage:!1,standalone_urlNew:null,toPaste:null}},computed:{rolesList(){return this.standalone?this.standalone_roles:this.roles},urlNewUse(){return this.standalone?this.standalone_urlNew:this.urlNew},entities(){return this.standalone?this.standalone_items:this.items?this.items:[]},sortedFull(){return this.entities.sort((n,e)=>n.enrolled-e.enrolled)},stacked(){let n={};return this.entities&&this.entities.forEach(e=>{let o=e.enrolled;n.hasOwnProperty(o)||(n[o]={id:o,firstname:e.firstname,lastname:e.lastname,enrolled:e.enrolled,urlShow:e.urlShow,enrolledLabel:e.enrolledLabel,hasPrimary:!1},n[o].roles={}),n[o].roles[e.roleId]={role:e.roleLabel,roleId:e.roleId,rolePrincipal:e.rolePrincipal,context:e.context},e.rolePrincipal&&(n[o].hasPrimary=!0)}),n}},methods:{handlerEdit(n){this.entityEdited=n},handlerDelete(n){this.entityDelete=n},handlerNew(){this.entityNew={end:"",start:"",role:null,enroled:null,enroledLabel:""}},handlerEnrolledSelected(n){this.entityNew.enroled=n.id,this.entityNew.enroledLabel=n.label},handlerEnrolledSelectedPerson(n){this.selected=n.id,this.entityNew.enroled=n.id,this.entityNew.enroledLabel=n.label},handlerCancel(){this.entityNew.enroled=null,this.entityNew.enroledLabel="",this.entityNew.role=null},open(n){document.location=n},handlerEditEnable(){this.editMode=!this.editMode},performDelete(){this.loading="Suppression...";var n=this.entityDelete.urlDelete;this.entityDelete=null,f.post(n,{}).then(e=>{},e=>{this.error=e.body}).then(e=>{this.loading=!1,this.fetch()})},getRoleById(n){return this.rolesList.find(e=>e.id===n)},performEdit(){this.loading="Enregistrement des modifications";let n=new FormData;n.append("dateStart",this.entityEdited.start),n.append("dateEnd",this.entityEdited.end),n.append("role",this.entityEdited.roleId),n.append("enrolled",this.entityEdited.enrolled);var e=this.entityEdited.urlEdit;return this.entityEdited=null,f.post(e,n).then(o=>{},o=>{this.error="Erreur : Impossible de modifier le rôle : "+o.body}).then(o=>{this.loading=!1,this.fetch()}),!1},performNew(){let n=new FormData;this.loading="Création...";var e=this.entityNew.enroled;n.append("dateStart",this.entityNew.start),n.append("dateEnd",this.entityNew.end),n.append("role",this.entityNew.role),n.append("enroled",e),this.entityNew=null,f.post(this.urlNewUse+"/"+e,n).then(o=>{},o=>{this.error=o.status==403?"Vous n'êtes pas authorisé à faire ça":"Erreur : "+o.body}).then(o=>{this.loading=!1,this.fetch()})},performPast(){let n=new FormData;this.loading="Création...";let e=JSON.stringify(this.toPaste.filter(o=>o.selected));n.append("action","multi"),n.append("json",e),f.post(this.urlNewUse,n).then(o=>{},o=>{this.error=o.status==403?"Vous n'êtes pas authorisé à faire ça":"Erreur : "+o.body}).then(o=>{this.loading=!1,this.toPaste=null,this.fetch()})},fetch(){this.loading="Chargement des données",f.get(this.url).then(n=>{if(this.standalone)n.data.roles&&(this.standalone_roles=n.data.roles),n.data.manage&&(this.standalone_manage=n.data.manage),n.data.urlNew&&(this.standalone_urlNew=n.data.urlNew),n.data.persons?this.standalone_items=n.data.persons:n.data.organizations?this.standalone_items=n.data.organizations:this.standalone_items=n.data;else{let e=null;n.data.persons?e=n.data.persons:n.data.organizations?e=n.data.organizations:e=n.data,console.log("emit",e),this.$emit("update",{datas:{items:e,urlNew:n.data.urlNew,manage:n.data.manage}})}},n=>{this.error="Erreur : "+n.body}).finally(n=>this.loading=null)},handlerCopy(){let n="copy_"+this.title,e=[];this.entities.forEach(o=>{e.push({enrolled:o.enrolled,enrolledLabel:o.enrolledLabel,roleId:o.roleId,roleLabel:o.roleLabel})}),localStorage.setItem(n,JSON.stringify(e))},handlerPaste(){let n="copy_"+this.title,e=localStorage.getItem(n);if(e){let o=JSON.parse(e);this.toPaste=[],o.forEach(w=>{w.selected=!0,this.toPaste.push(w)})}}},mounted(){this.standalone&&this.fetch()}},O={style:{position:"relative"}},j={class:"alert alert-danger"},J={key:0,class:"overlay"},K={class:"overlay-content"},T={class:"admin-bar"},W=t("i",{class:"icon-angle-left"},null,-1),G=t("i",{class:"icon-trash"},null,-1),H={key:1,class:"overlay"},Q={class:"overlay-content"},X={class:"table-bordered table-borderless table-responsive-md"},Y=t("th",null,"#",-1),Z=t("td",null,"Rôle",-1),$=["onUpdate:modelValue"],ee=["onUpdate:modelValue"],te=["value"],le={class:"admin-bar"},ne=t("i",{class:"icon-angle-left"},null,-1),se=t("i",{class:"icon-trash"},null,-1),oe={key:2,class:"overlay"},ie={class:"overlay-content",style:{overflow:"visible"}},re=["action"],ae={key:0},de={class:"row"},ue={class:"col-md-6"},ce={class:"form-group"},he=t("label",{class:"control-label",for:"role"},"Rôle",-1),me=["value"],ye={class:"col-md-6"},be={class:"form-group"},_e=t("label",{class:"form-label control-label",for:"dateStart"},"Date de début",-1),pe={class:"form-group"},fe=t("label",{class:"form-label control-label",for:"dateEnd"},"Date de fin",-1),ve={class:"admin-bar"},ge=t("i",{class:"icon-angle-left"},null,-1),we=t("button",{class:"btn btn-primary",type:"submit"},[t("i",{class:"icon-floppy"}),a(" Enregistrer ")],-1),ke={key:3,class:"overlay"},Ee={class:"overlay-content",style:{overflow:"visible"}},Ne={class:"row"},Ce={class:"col-md-6"},Pe={key:0,class:"cartouche"},Le={key:0,class:"addon"},De={key:1,class:"form-group"},Se={class:"control-label",for:"enroled"},xe={class:"form-group"},Ve=t("label",{class:"control-label",for:"role"},"Rôle",-1),Ie=["value"],Me={class:"col-md-6"},Ue={class:"form-group"},ze=t("label",{class:"form-label control-label",for:"dateStart"},"Date de début",-1),Re={class:"form-group"},qe=t("label",{class:"form-label control-label",for:"dateEnd"},"Date de fin",-1),Be={class:"admin-bar"},Fe=t("i",{class:"icon-angle-left"},null,-1),Ae=t("i",{class:"icon-floppy"},null,-1),Oe={key:4,class:"admin-bar text-right"},je=t("i",{class:"icon-doc-add"},null,-1),Je=t("i",{class:"icon-edit"},null,-1),Ke={key:0},Te={key:1},We=t("i",{class:"icon-doc"},null,-1),Ge=t("i",{class:"icon-paste"},null,-1),He=t("i",{class:"icon-bug"},null,-1),Qe={key:5},Xe=t("div",{class:"alert alert-info"},[a(" Détails des affectations. Un élément peut apparaître plusieurs fois selon le contexte et le rôle. Les affectation aux activités sont indiquées par un cube simple "),t("i",{class:"icon-cube"}),a(", les affectations aux projets par plusieurs cubes "),t("i",{class:"icon-cubes"})],-1),Ye={class:"row card"},Ze={class:"col-md-6"},$e={key:0,class:"icon-cube"},et={key:1,class:"icon-cubes"},tt={key:3},lt={key:0},nt=t("i",{class:"icon-cube"},null,-1),st={key:1},ot=t("i",{class:"icon-cubes"},null,-1),it={class:"col-md-3"},rt={class:"col-md-3 text-right"},at=["onClick"],dt={key:0,class:"icon-pencil-1 icon-clickable"},ut=["onClick"],ct={key:0,class:"icon-trash icon-clickable"},ht={key:6},mt=["href"],yt={key:1},bt={key:1},_t={key:1},pt={class:"addon principal"};function ft(n,e,o,w,s,d){const P=b("loader"),L=b("modal"),g=b("datepicker"),D=b("personselector"),S=b("organizationselector"),k=b("PersonDisplay");return i(),r("div",O,[_(P,{visible:s.loading,text:s.loading},null,8,["visible","text"]),_(L,{title:"Erreur",visible:s.error!=null&&s.error!=!1},{default:x(()=>[t("div",j," ERREUR : "+u(s.error),1)]),_:1},8,["visible"]),s.entityDelete?(i(),r("div",J,[t("div",K,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[0]||(e[0]=l=>s.entityDelete=null)}),t("h2",null,[a("Supprimer le rôle "),t("strong",null,u(s.entityDelete.role),1),a(" de "),t("strong",null,u(s.entityDelete.enrolledLabel),1),a(" ?")]),t("nav",T,[t("button",{class:"btn btn-default button-back",onClick:e[1]||(e[1]=l=>s.entityDelete=null)},[W,a(" Annuler ")]),t("button",{class:"btn btn-primary",onClick:e[2]||(e[2]=(...l)=>d.performDelete&&d.performDelete(...l))},[G,a(" Confirmer la suppression ")])])])])):h("",!0),s.toPaste?(i(),r("div",H,[t("div",Q,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[3]||(e[3]=l=>s.toPaste=null)}),t("h2",null,"Ajouter des "+u(o.title)+" ?",1),t("table",X,[t("thead",null,[t("tr",null,[Y,t("th",null,u(o.title),1),Z])]),t("tbody",null,[(i(!0),r(m,null,y(s.toPaste,l=>(i(),r("tr",null,[t("td",null,[p(t("input",{type:"checkbox","onUpdate:modelValue":c=>l.selected=c},null,8,$),[[I,l.selected]])]),t("td",null,u(l.enrolledLabel),1),t("td",null,[p(t("select",{name:"role",class:"form-control","onUpdate:modelValue":c=>l.roleId=c},[(i(!0),r(m,null,y(d.rolesList,c=>(i(),r("option",{value:c.id},u(c.label),9,te))),256))],8,ee),[[E,l.roleId]])])]))),256))])]),t("nav",le,[t("button",{class:"btn btn-default button-back",onClick:e[4]||(e[4]=l=>s.toPaste="")},[ne,a(" Annuler ")]),t("button",{class:"btn btn-primary",onClick:e[5]||(e[5]=(...l)=>d.performPast&&d.performPast(...l))},[se,a(" Confirmer ")])])])])):h("",!0),s.entityEdited?(i(),r("div",oe,[t("div",ie,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[6]||(e[6]=l=>s.entityEdited=null)}),t("form",{action:s.entityEdited.urlEdit,method:"post",onSubmit:e[12]||(e[12]=V((...l)=>d.performEdit&&d.performEdit(...l),["prevent","stop"]))},[t("h2",null,[s.entityEdited.enrolledLabel?(i(),r("span",ae,[a(" Modifier "),t("strong",null,u(s.entityEdited.enrolledLabel),1),a(" en tant que "),t("em",null,u(s.entityEdited.role),1)])):h("",!0)]),p(t("input",{type:"hidden",name:"enroled",class:"form-control select2","onUpdate:modelValue":e[7]||(e[7]=l=>s.entityEdited.enrolled=l)},null,512),[[C,s.entityEdited.enrolled]]),t("div",de,[t("div",ue,[t("div",ce,[he,p(t("select",{name:"role",class:"form-control","onUpdate:modelValue":e[8]||(e[8]=l=>s.entityEdited.roleId=l)},[(i(!0),r(m,null,y(d.rolesList,l=>(i(),r("option",{value:l.id},u(l.label),9,me))),256))],512),[[E,s.entityEdited.roleId]])])]),t("div",ye,[t("div",be,[_e,_(g,{moment:n.moment,value:s.entityEdited.start,onInput:e[9]||(e[9]=l=>{s.entityEdited.start=l})},null,8,["moment","value"])]),t("div",pe,[fe,_(g,{moment:n.moment,value:s.entityEdited.end,onInput:e[10]||(e[10]=l=>{s.entityEdited.end=l})},null,8,["moment","value"])])])]),t("nav",ve,[t("button",{class:"btn btn-default button-back",onClick:e[11]||(e[11]=l=>s.entityEdited=null)},[ge,a(" Annuler ")]),we])],40,re)])])):h("",!0),s.entityNew?(i(),r("div",ke,[t("div",Ee,[t("i",{class:"icon-cancel-outline overlay-closer",onClick:e[13]||(e[13]=l=>s.entityNew=null)}),t("h2",null,[a("Rôle de "),t("strong",null,u(s.entityNew.enroledLabel),1),a(" : ")]),p(t("input",{type:"hidden",name:"enroled",class:"form-control select2","onUpdate:modelValue":e[14]||(e[14]=l=>s.entityNew.enrolled=l)},null,512),[[C,s.entityNew.enrolled]]),t("div",Ne,[t("div",Ce,[s.entityNew.enroledLabel?(i(),r("span",Pe,[a(u(s.entityNew.enroledLabel)+" ",1),t("i",{class:"icon-cancel-alt icon-clickable",onClick:e[15]||(e[15]=(...l)=>d.handlerCancel&&d.handlerCancel(...l))}),s.entityNew.role?(i(),r("span",Le,u(d.getRoleById(s.entityNew.role).label),1)):h("",!0)])):(i(),r("div",De,[t("label",Se,u(o.title),1),o.title=="Personne"?(i(),v(D,{key:0,onChange:e[16]||(e[16]=l=>d.handlerEnrolledSelectedPerson(l)),modelValue:s.selected,"onUpdate:modelValue":e[17]||(e[17]=l=>s.selected=l)},null,8,["modelValue"])):(i(),v(S,{key:1,onChange:e[18]||(e[18]=l=>d.handlerEnrolledSelected(l)),modelValue:s.selected,"onUpdate:modelValue":e[19]||(e[19]=l=>s.selected=l)},null,8,["modelValue"]))])),t("div",xe,[Ve,p(t("select",{name:"role",class:"form-control","onUpdate:modelValue":e[20]||(e[20]=l=>s.entityNew.role=l)},[(i(!0),r(m,null,y(d.rolesList,l=>(i(),r("option",{value:l.id},u(l.label),9,Ie))),256))],512),[[E,s.entityNew.role]])])]),t("div",Me,[t("div",Ue,[ze,_(g,{moment:n.moment,value:s.entityNew.start,onInput:e[21]||(e[21]=l=>{s.entityNew.start=l})},null,8,["moment","value"])]),t("div",Re,[qe,_(g,{moment:n.moment,value:s.entityNew.end,onInput:e[22]||(e[22]=l=>{s.entityNew.end=l})},null,8,["moment","value"])])])]),t("nav",Be,[t("button",{class:"btn btn-default button-back",type:"button",onClick:e[23]||(e[23]=l=>s.entityNew=null)},[Fe,a(" Annuler ")]),t("button",{class:"btn btn-primary",type:"button",onClick:e[24]||(e[24]=(...l)=>d.performNew&&d.performNew(...l))},[Ae,a(" Enregistrer ")])])])])):h("",!0),o.manage?(i(),r("nav",Oe,[t("a",{class:"btn btn-xs btn-default",onClick:e[25]||(e[25]=l=>d.handlerNew())},[je,a(" Nouveau ")]),t("a",{class:"btn btn-xs btn-default",onClick:e[26]||(e[26]=l=>d.handlerEditEnable())},[Je,s.editMode?(i(),r("span",Ke,"Mode visualisation")):(i(),r("span",Te,"Mode Edition"))]),t("a",{class:"btn btn-xs btn-default",onClick:e[27]||(e[27]=l=>d.handlerCopy())},[We,a(" Copier ")]),t("a",{class:"btn btn-xs btn-default",onClick:e[28]||(e[28]=l=>d.handlerPaste())},[Ge,a(" Coller ")]),o.debugEnabled?(i(),r("a",{key:0,class:"btn btn-xs btn-warning",onClick:e[29]||(e[29]=l=>d.fetch())},[He,a(" Fetch ")])):h("",!0)])):h("",!0),s.editMode?(i(),r("section",Qe,[Xe,(i(!0),r(m,null,y(d.sortedFull,l=>(i(),r("article",Ye,[t("div",Ze,[l.context=="activity"?(i(),r("i",$e)):(i(),r("i",et)),l.firstname?(i(),v(k,{key:2,person:l},null,8,["person"])):(i(),r("strong",tt,u(l.enrolledLabel),1)),t("small",null,[a(" ("),l.context=="activity"?(i(),r("span",lt,[nt,a(" "+u(l.contextKey),1)])):(i(),r("span",st,[ot,a(" "+u(l.contextKey),1)])),a(") ")])]),t("div",it,[t("em",{class:N({bold:l.rolePrincipal})},u(l.roleLabel),3)]),t("div",rt,[t("a",{onClick:c=>d.handlerEdit(l),style:{"white-space":"nowrap"}},[o.manage?(i(),r("i",dt)):h("",!0),a(" Modifier ")],8,at),t("a",{onClick:c=>d.handlerDelete(l),style:{"white-space":"nowrap"}},[o.manage?(i(),r("i",ct)):h("",!0),a(" Supprimer ")],8,ut)])]))),256))])):(i(),r("section",ht,[(i(!0),r(m,null,y(d.stacked,l=>(i(),r("span",{class:N(["cartouche",{person:o.title=="Personne",organization:o.title=="Organisation",primary:l.hasPrimary,default:!l.hasPrimary}])},[o.entityLinkShow?(i(),r("a",{key:0,href:l.urlShow},[o.title=="Personne"?(i(),v(k,{key:0,person:l,"allow-tooltip":o.entityLinkShow},null,8,["person","allow-tooltip"])):(i(),r("span",yt,u(l.enrolledLabel),1))],8,mt)):(i(),r("span",bt,[o.title=="Personne"?(i(),v(k,{key:0,person:l,"allow-tooltip":o.entityLinkShow},null,8,["person","allow-tooltip"])):(i(),r("span",_t,u(l.enrolledLabel),1))])),t("span",pt,[(i(!0),r(m,null,y(l.roles,c=>(i(),r("span",{class:N(["addon-module",{primary:c.rolePrincipal}])},u(c.role),3))),256))])],2))),256))]))])}const Pt=F(A,[["render",ft]]);export{Pt as E}; diff --git a/public/js/oscar/vite/dist/vendor16.js b/public/js/oscar/vite/dist/vendor16.js index 0e9a692fadf525584a9aa570847c39006ccc1824..f6be4d1359f74789e6a5d3bf6e094a69d891292d 100644 --- a/public/js/oscar/vite/dist/vendor16.js +++ b/public/js/oscar/vite/dist/vendor16.js @@ -1 +1 @@ -import{A as s,p as g}from"./vendor.js";import{A as p}from"./vendor14.js";const S=s({state(){return{rollPersonId:null,tooltip:null,urlPerson:null,pendingFullScreen:!1,errorFullScreen:!1,pending:[],errors:[],cachePersons:{}}},getters:{tooltipInfos(r){return r.tooltip},errors(r){return r.errors},pending(r){return r.pending},pendingFullScreen(r){return r.pendingFullScreen},errorFullScreen(r){return r.errorFullScreen}},actions:{displayHelp(r){},tooltipReset({state:r}){r.tooltip&&(r.tooltip.display=!1)},tooltipPersonPreShooting({state:r},e){return r.tooltip&&r.tooltip.type==="person"&&r.tooltip.id===e.id?(r.tooltip.display=!0,r.tooltip.x=e.event.pageX,r.tooltip.y=e.event.pageY,!0):!1},tooltipPerson({state:r,commit:e,dispatch:o},l){if(r.tooltip&&r.tooltip.type==="person"&&r.tooltip.id===l.id)return r.tooltip.display=!0,!0;{let t=0,a=0;if(l.event&&(t=l.event.pageX,a=l.event.pageY),l&&l.type==="person"){let u=r.urlPerson+l.id;r.cachePersons.hasOwnProperty(l.id)?(r.cachePersons[l.id].display=!0,e("setTooltip",r.cachePersons[l.id])):g.get(u).then(n=>{let d={type:l.type,id:l.id,url:r.urlPerson+l.id,firstname:n.data.firstname,lastname:n.data.lastname,affectation:n.data.affectation,location:n.data.location,gravatar:n.data.gravatar,url_show:n.data.url_show,email:n.data.email,display:!0,x:t,y:a};r.cachePersons[l.id]=d,e("setTooltip",d)},n=>{e("addError",p.manageErrorResponse(n).message)})}}},removeError({state:r}){r.errors.splice(r,1)},removeErrors({state:r}){r.errors=[]}},mutations:{pendingFullScreen(r,e){r.pendingFullScreen=e===!0},addPending(r,e){r.pending.push(e)},stopPending(r,e){let o=r.pending.indexOf(e);o>=0&&r.pending.splice(o,1)},addError(r,e){r.errors.unshift(i(e))},removeErrorFullScreen(r){r.errorFullScreen=!1},addErrorFullScreen(r,e){r.errors.unshift(i(e)),r.errorFullScreen=e},addErrorAxios(r,e){r.errors.unshift(i(p.manageErrorResponse(e).message))},setTooltip(r,e){e?r.tooltip=e:r.tooltip=null}},errorFormat(r){}});let i=function(r){return{time:new Date().toISOString(),message:r,type:"error"}};export{S as g}; +import{C as s,s as g}from"./vendor.js";import{A as p}from"./vendor14.js";const S=s({state(){return{rollPersonId:null,tooltip:null,urlPerson:null,pendingFullScreen:!1,errorFullScreen:!1,pending:[],errors:[],cachePersons:{}}},getters:{tooltipInfos(r){return r.tooltip},errors(r){return r.errors},pending(r){return r.pending},pendingFullScreen(r){return r.pendingFullScreen},errorFullScreen(r){return r.errorFullScreen}},actions:{displayHelp(r){},tooltipReset({state:r}){r.tooltip&&(r.tooltip.display=!1)},tooltipPersonPreShooting({state:r},e){return r.tooltip&&r.tooltip.type==="person"&&r.tooltip.id===e.id?(r.tooltip.display=!0,r.tooltip.x=e.event.pageX,r.tooltip.y=e.event.pageY,!0):!1},tooltipPerson({state:r,commit:e,dispatch:o},l){if(r.tooltip&&r.tooltip.type==="person"&&r.tooltip.id===l.id)return r.tooltip.display=!0,!0;{let t=0,a=0;if(l.event&&(t=l.event.pageX,a=l.event.pageY),l&&l.type==="person"){let u=r.urlPerson+l.id;r.cachePersons.hasOwnProperty(l.id)?(r.cachePersons[l.id].display=!0,e("setTooltip",r.cachePersons[l.id])):g.get(u).then(n=>{let d={type:l.type,id:l.id,url:r.urlPerson+l.id,firstname:n.data.firstname,lastname:n.data.lastname,affectation:n.data.affectation,location:n.data.location,gravatar:n.data.gravatar,url_show:n.data.url_show,email:n.data.email,display:!0,x:t,y:a};r.cachePersons[l.id]=d,e("setTooltip",d)},n=>{e("addError",p.manageErrorResponse(n).message)})}}},removeError({state:r}){r.errors.splice(r,1)},removeErrors({state:r}){r.errors=[]}},mutations:{pendingFullScreen(r,e){r.pendingFullScreen=e===!0},addPending(r,e){r.pending.push(e)},stopPending(r,e){let o=r.pending.indexOf(e);o>=0&&r.pending.splice(o,1)},addError(r,e){r.errors.unshift(i(e))},removeErrorFullScreen(r){r.errorFullScreen=!1},addErrorFullScreen(r,e){r.errors.unshift(i(e)),r.errorFullScreen=e},addErrorAxios(r,e){r.errors.unshift(i(p.manageErrorResponse(e).message))},setTooltip(r,e){e?r.tooltip=e:r.tooltip=null}},errorFormat(r){}});let i=function(r){return{time:new Date().toISOString(),message:r,type:"error"}};export{S as g}; diff --git a/public/js/oscar/vite/dist/vendor17.js b/public/js/oscar/vite/dist/vendor17.js index f9433c8dcb4cd7d81babf0677646e84eecce64d7..47b8889e0e88afc0d38fd900afd20a1ccae8c9ab 100644 --- a/public/js/oscar/vite/dist/vendor17.js +++ b/public/js/oscar/vite/dist/vendor17.js @@ -1 +1 @@ -import{o as a,l as i,i as d,c as o,d as t,a as l,t as r,g as n,T as c}from"./vendor.js";import{_}from"./vendor7.js";const m={name:"Loader",props:{text:{type:String,default:"Loading...",required:!1},from:{type:String,default:"",required:!1},visible:{type:Boolean,required:!0}}},u={key:0,class:"loader"},f={class:"message"},p={key:0,class:"from"};function v(x,s,e,y,g,k){return a(),i(c,{mode:"out-in",name:"fade"},{default:d(()=>[e.visible?(a(),o("div",u,[t("div",f,[t("div",null,[s[0]||(s[0]=t("i",{class:"icon-spinner animate-spin"},null,-1)),l(" "+r(e.text),1)]),e.from?(a(),o("div",p,[t("small",null,"("+r(e.from)+")",1)])):n("",!0)])])):n("",!0)]),_:1})}const h=_(m,[["render",v],["__scopeId","data-v-573ae632"]]);export{h as L}; +import{o as s,m as d,j as n,c as o,d as a,a as c,t as i,g as r,T as _,p as l,i as m}from"./vendor.js";import{_ as p}from"./vendor7.js";const u={name:"Loader",props:{text:{type:String,default:"Loading...",required:!1},from:{type:String,default:"",required:!1},visible:{type:Boolean,required:!0}}},f=e=>(l("data-v-573ae632"),e=e(),m(),e),v={key:0,class:"loader"},h={class:"message"},x=f(()=>a("i",{class:"icon-spinner animate-spin"},null,-1)),y={key:0,class:"from"};function g(e,S,t,k,B,L){return s(),d(_,{mode:"out-in",name:"fade"},{default:n(()=>[t.visible?(s(),o("div",v,[a("div",h,[a("div",null,[x,c(" "+i(t.text),1)]),t.from?(s(),o("div",y,[a("small",null,"("+i(t.from)+")",1)])):r("",!0)])])):r("",!0)]),_:1})}const N=p(u,[["render",g],["__scopeId","data-v-573ae632"]]);export{N as L}; diff --git a/public/js/oscar/vite/dist/vendor18.js b/public/js/oscar/vite/dist/vendor18.js index 3935a76851ba5eb4730988e1a497558fcc481b60..aa16f72eb11140d13e2a3c6ed93f85f90067e476 100644 --- a/public/js/oscar/vite/dist/vendor18.js +++ b/public/js/oscar/vite/dist/vendor18.js @@ -1 +1 @@ -import{g as n}from"./vendor16.js";import{_ as p}from"./vendor7.js";import{o as l,c as r,d,t as m,a as f}from"./vendor.js";let s=null;const c={name:"PersonDisplay",props:{person:{required:!1,type:Object},allowTooltip:{default:!1},timing:{default:750,type:Number}},methods:{handlerEnter(t,e){if(this.allowTooltip&&(n.dispatch("tooltipPersonPreShooting",{id:t.id,event:e}),t&&t.id&&s===null)){let o=e;s=setTimeout(()=>{this.setPerson(t.id,o)},this.timing)}},handlerLeave(t){this.allowTooltip&&t&&t.id&&(clearTimeout(s),s=null,n.dispatch("tooltipReset"))},setPerson(t,e){n.dispatch("tooltipPerson",{type:"person",id:t,event:e})}}},u={class:"firstname"},h={class:"lastname text-private"},_={key:1};function y(t,e,o,P,g,i){return o.person?(l(),r("span",{key:0,class:"person",onMouseenter:e[0]||(e[0]=a=>i.handlerEnter(o.person,a)),onMouseleave:e[1]||(e[1]=a=>i.handlerLeave(o.person))},[d("em",u,m(o.person.firstname),1),e[2]||(e[2]=f("  ")),d("strong",h,m(o.person.lastname),1)],32)):(l(),r("em",_," Inconnu "))}const k=p(c,[["render",y]]);export{k as P}; +import{g as n}from"./vendor16.js";import{_ as p}from"./vendor7.js";import{o as l,c as r,d,t as m,a as c}from"./vendor.js";let s=null;const f={name:"PersonDisplay",props:{person:{required:!1,type:Object},allowTooltip:{default:!1},timing:{default:750,type:Number}},methods:{handlerEnter(e,t){if(this.allowTooltip&&(n.dispatch("tooltipPersonPreShooting",{id:e.id,event:t}),e&&e.id&&s===null)){let o=t;s=setTimeout(()=>{this.setPerson(e.id,o)},this.timing)}},handlerLeave(e){this.allowTooltip&&e&&e.id&&(clearTimeout(s),s=null,n.dispatch("tooltipReset"))},setPerson(e,t){n.dispatch("tooltipPerson",{type:"person",id:e,event:t})}}},u={class:"firstname"},h={class:"lastname text-private"},_={key:1};function y(e,t,o,P,g,a){return o.person?(l(),r("span",{key:0,class:"person",onMouseenter:t[0]||(t[0]=i=>a.handlerEnter(o.person,i)),onMouseleave:t[1]||(t[1]=i=>a.handlerLeave(o.person))},[d("em",u,m(o.person.firstname),1),c("  "),d("strong",h,m(o.person.lastname),1)],32)):(l(),r("em",_," Inconnu "))}const k=p(f,[["render",y]]);export{k as P}; diff --git a/public/js/oscar/vite/dist/vendor2.js b/public/js/oscar/vite/dist/vendor2.js index bc60aac14c15ffff3e09232b9f1a3e27e5a4b0cf..e3738762755a5c6f19ed1d387c70fd8ee2b11ea8 100644 --- a/public/js/oscar/vite/dist/vendor2.js +++ b/public/js/oscar/vite/dist/vendor2.js @@ -1 +1 @@ -import{m as t}from"./vendor.js";t.locale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e){"use_strict";return e+(e===1?"er":"e")},meridiemParse:/PD|MD/,isPM:function(e){return e.charAt(0)==="M"},meridiem:function(e,r,i){return e<12?"PD":"MD"},week:{dow:1,doy:4}});const a={timeAgo(e,r="Non définie"){return e?t(e).fromNow():r},time(e){return e?t(e).format("H:m:s"):""},date(e,r="Non définie"){return e?"le "+t(e).format("D MMMM YYYY"):r},dateFull(e,r="Non définie"){return e?this.date(e)+" ("+this.timeAgo(e)+")":r},period(e){let r=e.split("-"),i=r[0],n=parseInt(r[1])-1;return t.months()[n]+" "+i}};export{a as m}; +import{q as t}from"./vendor.js";t.locale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e){return e+(e===1?"er":"e")},meridiemParse:/PD|MD/,isPM:function(e){return e.charAt(0)==="M"},meridiem:function(e,r,i){return e<12?"PD":"MD"},week:{dow:1,doy:4}});const a={timeAgo(e,r="Non définie"){return e?t(e).fromNow():r},time(e){return e?t(e).format("H:m:s"):""},date(e,r="Non définie"){return e?"le "+t(e).format("D MMMM YYYY"):r},dateFull(e,r="Non définie"){return e?this.date(e)+" ("+this.timeAgo(e)+")":r},period(e){let r=e.split("-"),i=r[0],n=parseInt(r[1])-1;return t.months()[n]+" "+i}};export{a as m}; diff --git a/public/js/oscar/vite/dist/vendor20.js b/public/js/oscar/vite/dist/vendor20.js index 90f553afad9851a7e3c34bf920067041852fa25c..34c534c0bc231ce25908ef8152ca9ff9c27f6ac7 100644 --- a/public/js/oscar/vite/dist/vendor20.js +++ b/public/js/oscar/vite/dist/vendor20.js @@ -1 +1 @@ -import{p as h,r as S,o as l,c as n,d as s,a as i,t as r,g as a,h as b,b as C,w as D,k as x,F as p,j as f,v as N,f as V,n as v}from"./vendor.js";import{D as A,P as E}from"./vendor6.js";import{A as P}from"./vendor14.js";import{P as F}from"./vendor18.js";import{_ as U}from"./vendor7.js";const O={components:{PersonDisplay:F,"date-picker":A,"person-auto-completer":E},props:{editable:{default:!1},manage:{default:!1},displayActivity:{default:!1},documents:{default:[]},signProcess:{default:null},tabs:{default:[]},types:{default:[]},displayButtonSign:{default:!0},processManage:{default:!1},processAdmin:{default:!1},processStart:{default:!1}},data(){return{deleteDocument:null,signDocument:null,signProcessError:"",selectedSignProcess:null,processDetails:null,error:null,editedDocument:null,mode:null,fileToDownload:null}},methods:{urlShow(d=null){if(console.log(d),d)document.location=d;else return!1},handlerToggleCheck(d){d.forEach(e=>{e.selected=!e.selected})},handlerProcessInit(d){console.log("Affichage fenêtre de signature"),this.signDocument=d},handlerPerformSignDocumentDisabled(d,e){if(!e||e.missing_recipients)return!0;for(let m=0;m{this.signDocument=null,this.selectedSignProcess=null,this.$emit("fetch")},o=>{this.error=P.error(o)}),!1},handlerProcessDetailsOn(d){this.processDetails=d},handlerDeleteProcess(d){console.log("handlerDeleteProcess",d),h.post(d.urlProcessDelete).then(e=>{this.$emit("fetch")},e=>{this.error=P.error(e)})},handlerDeleteDocument(d){this.deleteDocument=d},handlerDeleteDocumentConfirm(){console.log(this.deleteDocument.urlDelete),h.post(this.deleteDocument.urlDelete).then(d=>{this.$emit("fetch")},d=>{this.error=P.error(d)}),this.deleteDocument=null},handlerEdit(d){this.mode="edit",this.editedDocument=d},handlerEditConfirm(){let d=new FormData,e="";if(d.append("data",JSON.stringify(this.editedDocument)),this.mode=="version"?(d.append("action","version"),e=this.editedDocument.urlReupload):this.mode=="new"?(d.append("action","new"),e=this.urlUploadNewDoc):this.mode=="edit"&&(d.append("action","edit"),e=this.editedDocument.urlEdit),this.mode!="edit")if(this.fileToDownload!==null)d.append("file",this.fileToDownload,this.fileToDownload.name);else{this.error="Aucun fichier sélectionner a téléverser !";return}h.post(e,d).then(m=>{this.editedDocument=null,this.$emit("fetch")},m=>{this.error=P.error(m)})},handlerChangeFile(d){event.target.files.length!==0&&(this.fileToDownload=event.target.files[0])},handlerNewVersion(d){console.log("handlerNewVersion"),this.fileToDownload=null,this.mode="version",this.editedDocument=d},handlerProcessDetailsOff(){this.processDetails=null},handlerProcessReload(d){let e=new FormData;h.post(d.urlProcessUpdate,e).then(m=>{this.$emit("fetch")},m=>{this.error=P.error(m)})}}},M={key:0,class:"overlay",style:{"z-index":"10000"}},z={class:"overlay-content",style:{"max-width":"50%"}},I={key:1,class:"overlay"},X={class:"overlay-content"},j={class:"alert-danger alert"},q={key:2,class:"overlay"},B={class:"overlay-content"},L={key:0},R={key:1},J={key:2},G={key:0},H={key:1},K={class:"row"},Q={class:"col-md-6"},W={key:0},Y={class:"col-md-6"},Z={key:0},$=["value"],ee={key:1},se={key:0,class:"alert alert-warning"},te={key:1},le=["value","disabled"],ne={class:"col-md-12"},oe={key:0,class:"col-md-6"},ie={class:"row"},re={key:0},ue=["value"],de={class:"col-md-6"},ae={key:0},me={class:"addon"},ce=["onClick"],pe={class:"row"},fe={class:"col-md-12"},ve={class:"buttons-bar"},ge={key:3,class:"overlay"},be={class:"overlay-content"},De={key:0,class:"alert alert-danger"},ke={key:1},ye=["onClick"],he={key:0},Ce={class:"metas"},Pe={class:"meta"},_e={class:"meta"},we={class:"meta"},Se={key:0,class:"alert alert-danger"},xe={class:"row"},Ve={class:"col-md-6"},Te=["onClick"],Ne=["for"],Ae={class:"fullname"},Ee=["onUpdate:modelValue","id"],Fe={style:{"font-weight":"300"}},Ue={class:"email",style:{"font-weight":"500"}},Oe={class:"col-md-6"},Me=["onClick"],ze=["for"],Ie={class:"fullname"},Xe=["id","onUpdate:modelValue"],je={style:{"font-weight":"300"}},qe={class:"email",style:{"font-weight":"500"}},Be={key:1,class:"alert alert-info"},Le={key:2,class:"alert alert-danger"},Re={class:"buttons-bar"},Je={key:4,class:"overlay"},Ge={class:"overlay-content",style:{"max-width":"75%"}},He={class:"signature-status-101"},Ke={class:"status"},Qe={class:"metas"},We={class:"meta"},Ye={class:"meta"},Ze={class:"meta"},$e={key:0,class:"alert alert-danger"},es={class:"title"},ss={class:"fullname"},ts={class:"email"},ls={key:0,class:"dateFinished"},ns={class:"status"},os={class:"status-text"},is={class:"observer-inline"},rs={class:"buttons-bar"},us={class:"card-title"},ds={class:"text-light"},as=["title"],ms={class:"document-metas"},cs={class:"meta"},ps={class:"meta"},fs={class:"meta"},vs={class:"meta"},gs={class:"meta"},bs={key:0},Ds={class:"cartouche"},ks={class:"card-content"},ys=["onClick"],hs=["onClick"],Cs=["onClick"],Ps={key:1},_s=["onClick"],ws={key:0},Ss={key:2},xs={class:"subdoc text-highlight"},Vs={key:0},Ts=["href"],Ns={class:"text-right show-over"},As=["href"],Es=["onClick"],Fs=["href"],Us=["onClick"],Os=["onClick"],Ms=["onClick"];function zs(d,e,m,g,o,c){const k=S("date-picker"),_=S("person-auto-completer"),T=S("PersonDisplay");return l(),n(p,null,[o.error?(l(),n("div",M,[s("div",z,[s("h2",null,[e[20]||(e[20]=i(" Erreur ")),s("span",{class:"overlay-closer",onClick:e[0]||(e[0]=t=>o.error=null)},"X")]),s("p",null,r(o.error.response&&o.error.response.data?o.error.response.data:o.error),1)])])):a("",!0),o.deleteDocument?(l(),n("div",I,[s("div",X,[s("h2",null,[e[21]||(e[21]=i(" Supprimer le document ? ")),s("span",{class:"overlay-closer",onClick:e[1]||(e[1]=t=>o.deleteDocument=null)},"X")]),s("p",j,[e[22]||(e[22]=s("i",{class:"icon-attention-1"},null,-1)),e[23]||(e[23]=i(" Souhaitez-vous supprimer le fichier ")),s("strong",null,r(o.deleteDocument.fileName),1),e[24]||(e[24]=i(" ? "))]),s("button",{class:"btn btn-danger",onClick:e[2]||(e[2]=t=>o.deleteDocument=null)},e[25]||(e[25]=[s("i",{class:"icon-cancel-alt"},null,-1),i(" Annuler ")])),s("a",{class:"btn btn-success",onClick:e[3]||(e[3]=b(t=>c.handlerDeleteDocumentConfirm(),["prevent"]))},e[26]||(e[26]=[s("i",{class:"icon-valid"},null,-1),i(" Confirmer ")]))])])):a("",!0),o.editedDocument?(l(),n("div",q,[s("div",B,[s("h2",null,[s("small",null,[e[27]||(e[27]=s("i",{class:"icon-doc"},null,-1)),o.mode=="new"?(l(),n("span",L,"Téléversement d'un document")):a("",!0),o.mode=="edit"?(l(),n("span",R,"Modification des informations")):a("",!0),o.mode=="version"?(l(),n("span",J,"Nouvelle version")):a("",!0)]),e[29]||(e[29]=s("br",null,null,-1)),o.editedDocument.id>0?(l(),n("span",G,[s("strong",null,r(o.editedDocument.fileName),1)])):(l(),n("span",H,[e[28]||(e[28]=i(" Nouveau document dans ")),s("strong",null,r(o.editedDocument.tabDocument.label),1)])),s("span",{class:"overlay-closer",onClick:e[4]||(e[4]=t=>o.editedDocument=null)},"X")]),s("div",K,[s("div",Q,[o.mode!="edit"?(l(),n("div",W,[e[30]||(e[30]=s("label",{for:"file"},"Fichier",-1)),s("input",{onChange:e[5]||(e[5]=(...t)=>c.handlerChangeFile&&c.handlerChangeFile(...t)),type:"file",class:"form-control",name:"file",id:"file"},null,32)])):a("",!0),s("div",null,[e[31]||(e[31]=s("label",{for:"dateDeposit"},"Date de dépôt",-1)),C(k,{modelValue:o.editedDocument.dateDeposit,"onUpdate:modelValue":e[6]||(e[6]=t=>o.editedDocument.dateDeposit=t),id:"dateDeposit"},null,8,["modelValue"])]),s("div",null,[e[32]||(e[32]=s("label",{for:"dateSend"},"Date d'envoi",-1)),C(k,{modelValue:o.editedDocument.dateSend,"onUpdate:modelValue":e[7]||(e[7]=t=>o.editedDocument.dateSend=t),id:"dateSend"},null,8,["modelValue"])])]),s("div",Y,[o.mode!="version"?(l(),n("div",Z,[e[33]||(e[33]=s("label",{for:"tabdocument"},"Onglet",-1)),s("div",null,[D(s("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":e[8]||(e[8]=t=>o.editedDocument.tabDocument.id=t),class:"form-control"},[(l(!0),n(p,null,f(m.tabs,(t,u)=>(l(),n("option",{value:u,key:u},r(t.label),9,$))),128))],512),[[x,o.editedDocument.tabDocument.id]])])])):a("",!0),o.mode!="version"?(l(),n("div",ee,[e[34]||(e[34]=s("label",{for:"typedocument"},"Type de document",-1)),o.editedDocument.process?(l(),n("div",se," Vous ne pouvez pas modifier le type d'un document engagé dans un processus de signature. ")):(l(),n("div",te,[D(s("select",{class:"form-control",name:"type",id:"typedocument","onUpdate:modelValue":e[9]||(e[9]=t=>o.editedDocument.category.id=t)},[(l(!0),n(p,null,f(m.types,(t,u)=>(l(),n("option",{value:t.id,key:t.id,disabled:t.flow&&o.editedDocument.id>0},r(t.label)+" "+r(t.flow&&o.editedDocument.id?"(signature)":""),9,le))),128))],512),[[x,o.editedDocument.category.id]])]))])):a("",!0)]),s("div",ne,[e[35]||(e[35]=s("label",{for:"information"},"Informations",-1)),D(s("textarea",{"onUpdate:modelValue":e[10]||(e[10]=t=>o.editedDocument.information=t),id:"information",class:"form-control"},null,512),[[N,o.editedDocument.information]])]),o.mode=="change"?(l(),n("div",oe,[s("div",ie,[o.editedDocument.private===!1?(l(),n("span",re,[e[36]||(e[36]=s("label",{for:"tabdocument"},"Onglet document",-1)),s("div",null,[D(s("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":e[11]||(e[11]=t=>o.editedDocument.tabDocument.id=t),class:"form-control"},[(l(!0),n(p,null,f(m.tabs,(t,u)=>(l(),n("option",{value:u,key:u},r(t.label),9,ue))),128))],512),[[x,o.editedDocument.tabDocument.id]])])])):a("",!0),e[37]||(e[37]=s("div",{class:"col-md-6"},[s("label",{for:"private"},"Document privé")],-1)),s("div",de,[D(s("input",{type:"checkbox",name:"private",id:"privateModifDoc",class:"form-control","onUpdate:modelValue":e[12]||(e[12]=t=>o.editedDocument.private=t)},null,512),[[V,o.editedDocument.private]])])]),o.editedDocument.private===!0?(l(),n("span",ae,[e[39]||(e[39]=s("label",null,"Choix des personnes ayant accès à ce document",-1)),e[40]||(e[40]=s("h3",null,"Ce document sera classé automatiquement dans l'onglet privé",-1)),C(_,{onChange:d.handlerSelectPersons},null,8,["onChange"]),(l(!0),n(p,null,f(o.editedDocument.persons,t=>(l(),n("span",{key:t.id,class:"cartouche"},[e[38]||(e[38]=s("i",{class:"icon-cube"},null,-1)),s("span",null,r(t.personName),1),s("span",me,r(t.affectation),1),t.personId!==d.idCurrentPerson?(l(),n("i",{key:0,onClick:u=>d.handlerDeletePerson(t),class:"icon-trash icon-clickable"},null,8,ce)):a("",!0)]))),128))])):a("",!0)])):a("",!0)]),s("div",pe,[s("div",fe,[s("nav",ve,[s("button",{class:"btn btn-danger",onClick:e[13]||(e[13]=t=>o.editedDocument=null)},e[41]||(e[41]=[s("i",{class:"icon-cancel-alt"},null,-1),i(" Annuler ")])),s("a",{class:"btn btn-success",href:"#",onClick:e[14]||(e[14]=b(t=>c.handlerEditConfirm(),["prevent"]))},e[42]||(e[42]=[s("i",{class:"icon-valid"},null,-1),i(" Enregistrer ")]))])])])])])):a("",!0),o.signDocument?(l(),n("div",ge,[s("div",be,[s("h2",null,[e[43]||(e[43]=i(" Signature de document numérique ")),s("span",{class:"overlay-closer",onClick:e[15]||(e[15]=t=>o.signDocument=null)},"X")]),m.signProcess?(l(),n("div",ke,[s("nav",null,[e[45]||(e[45]=i(" Sélectionnez une procédure de signature ")),(l(!0),n(p,null,f(m.signProcess,t=>(l(),n("span",{class:v(["btn btn-lg btn-default",{"btn-success":o.selectedSignProcess&&o.selectedSignProcess.id==t.id}]),onClick:u=>c.handlerSelectProcess(t)},[s("strong",null,r(t.label),1),e[44]||(e[44]=s("br",null,null,-1)),s("em",null,r(t.description)+" ",1)],10,ye))),256))]),o.selectedSignProcess?(l(),n("section",he,[s("h3",null,[e[46]||(e[46]=s("small",null,"Procédure de signature",-1)),e[47]||(e[47]=s("br",null,null,-1)),s("strong",null,r(o.selectedSignProcess.label),1)]),(l(!0),n(p,null,f(o.selectedSignProcess.steps,t=>(l(),n("article",{class:v(["step",t.missing_recipients?"error":"ok"])},[s("h4",null,[i("ÉTAPE "+r(t.order)+" :",1),s("strong",null,r(t.label),1)]),s("ul",Ce,[s("li",Pe,[e[48]||(e[48]=i("Parapheur: ")),s("strong",null,r(t.letterfile_label),1)]),s("li",_e,[e[49]||(e[49]=i("Type: ")),s("strong",null,r(t.level_label),1)]),s("li",we,[e[50]||(e[50]=i("Tous signent: ")),s("strong",null,r(t.allSignToComplete?"Oui":"non"),1)])]),t.missing_recipients?(l(),n("div",Se," Il manque des destinataires pour cette procédure. ")):a("",!0),s("div",xe,[s("div",Ve,[s("h5",null,[e[51]||(e[51]=s("i",{class:"icon-group"},null,-1)),e[52]||(e[52]=i(" Destinataires - ")),s("a",{href:"#",onClick:b(u=>c.handlerToggleCheck(t.recipients),["prevent"])},"Inverser selection",8,Te)]),(l(!0),n(p,null,f(t.recipients,(u,y)=>(l(),n("div",{class:v(["recipient",{selected:u.selected}])},[s("label",{for:"des_"+t.id+"_"+y},[s("span",Ae,[t.editable?D((l(),n("input",{key:0,type:"checkbox","onUpdate:modelValue":w=>u.selected=w,id:"des_"+t.id+"_"+y},null,8,Ee)),[[V,u.selected]]):a("",!0),e[53]||(e[53]=i("   ")),s("em",Fe,r(u.firstname),1),i(" "+r(u.lastname),1)]),s("small",Ue,r(u.email),1)],8,Ne)],2))),256))]),s("div",Oe,[s("h5",null,[e[54]||(e[54]=s("i",{class:"icon-bell-alt"},null,-1)),e[55]||(e[55]=s("strong",null,"Observateurs",-1)),e[56]||(e[56]=i(" - ")),s("a",{href:"#",onClick:b(u=>c.handlerToggleCheck(t.observers),["prevent"])},"Inverser selection",8,Me)]),t.observers.length?(l(!0),n(p,{key:0},f(t.observers,(u,y)=>(l(),n("div",{class:v(["recipient",{selected:u.selected}])},[s("label",{for:"obs_"+t.id+"_"+y},[s("span",Ie,[t.editable?D((l(),n("input",{key:0,type:"checkbox",id:"obs_"+t.id+"_"+y,"onUpdate:modelValue":w=>u.selected=w},null,8,Xe)),[[V,u.selected]]):a("",!0),e[57]||(e[57]=i("   ")),s("em",je,r(u.firstname),1),i(" "+r(u.lastname),1)]),s("small",qe,r(u.email),1)],8,ze)],2))),256)):(l(),n("div",Be," Pas d'observateur pour cette étape "))])])],2))),256))])):a("",!0)])):(l(),n("div",De," Aucun processus de signature disponible ")),o.signProcessError?(l(),n("div",Le,[e[58]||(e[58]=i(" Signature non-disponible : ")),s("strong",null,r(o.signProcessError),1)])):a("",!0),s("nav",Re,[s("button",{class:"btn btn-default",onClick:e[16]||(e[16]=t=>o.signDocument=null)},e[59]||(e[59]=[s("i",{class:"icon-cancel-alt"},null,-1),i(" Annuler ")])),s("button",{class:v(["btn btn-success",{disabled:c.handlerPerformSignDocumentDisabled(o.signDocument,o.selectedSignProcess)}]),onClick:e[17]||(e[17]=t=>c.handlerPerformSignDocument(o.signDocument,o.selectedSignProcess))},e[60]||(e[60]=[s("i",{class:"icon-cancel-alt"},null,-1),i(" Valider ")]),2)])])])):a("",!0),o.processDetails?(l(),n("div",Je,[s("div",Ge,[s("h2",null,[e[61]||(e[61]=s("small",null,[s("i",{class:"icon-edit"}),i(" Procédure")],-1)),e[62]||(e[62]=i()),e[63]||(e[63]=s("br",null,null,-1)),s("strong",null,r(o.processDetails.label),1),e[64]||(e[64]=i()),e[65]||(e[65]=s("br",null,null,-1)),s("span",He,[i(r(o.processDetails.status_text)+" - ",1),s("em",null,"étape "+r(o.processDetails.current_step)+" / "+r(o.processDetails.total_steps),1)]),s("span",{class:"overlay-closer",onClick:e[18]||(e[18]=(...t)=>c.handlerProcessDetailsOff&&c.handlerProcessDetailsOff(...t))},"X")]),(l(!0),n(p,null,f(o.processDetails.steps,t=>(l(),n("section",{class:v(["signature","signature-status-"+t.status])},[s("h4",null,[s("small",null,"étape "+r(t.order)+" : ",1),s("strong",null,r(t.label),1),s("span",Ke," ("+r(t.status_text)+")",1)]),s("ul",Qe,[s("li",We,[e[66]||(e[66]=i("Parapheur ")),s("strong",null,r(t.letterfile),1)]),s("li",Ye,[e[67]||(e[67]=i("Niveau ")),s("strong",null,r(t.level),1)]),s("li",Ze,[e[68]||(e[68]=i("Tous les destinataires signent ")),s("strong",null,r(t.allSignToComplete?"Oui":"Non"),1)])]),t.refused_text?(l(),n("div",$e,[e[69]||(e[69]=i(" Message de refus : ")),e[70]||(e[70]=s("br",null,null,-1)),s("blockquote",null,r(t.refused_text),1)])):a("",!0),(l(!0),n(p,null,f(t.recipients,u=>(l(),n("article",{class:v(["recipient","signature-status-"+u.status])},[s("div",es,[s("strong",ss,r(u.fullname),1),s("em",ts,r(u.email),1),u.dateFinished?(l(),n("small",ls,r(d.$filters.dateFull(u.dateFinished)),1)):a("",!0),s("span",ns,[s("span",os,r(u.status_text),1)])]),u.informations?(l(),n("div",{key:0,class:v({"alert alert-danger":u.status===501})},[e[71]||(e[71]=s("i",{class:"icon-comment"},null,-1)),i(" "+r(u.informations),1)],2)):a("",!0)],2))),256)),e[73]||(e[73]=s("strong",null,"Observateurs : ",-1)),(l(!0),n(p,null,f(t.observers,u=>(l(),n("span",is,[s("small",null,r(u.firstname),1),e[72]||(e[72]=i()),s("span",null,r(u.lastname),1)]))),256))],2))),256)),s("div",rs,[s("button",{class:"btn btn-default",onClick:e[19]||(e[19]=(...t)=>c.handlerProcessDetailsOff&&c.handlerProcessDetailsOff(...t))},e[74]||(e[74]=[s("i",{class:"icon-cancel-outline"},null,-1),i(" Fermer ")]))])])])):a("",!0),(l(!0),n(p,null,f(m.documents,t=>(l(),n("article",{class:"card xs",key:t.id},[s("div",us,[s("i",{class:v(["picto icon-doc","doc"+t.extension])},null,2),s("small",ds,r(t.category.label)+" ~ ",1),s("strong",null,r(t.fileName),1),t.location!="url"?(l(),n("small",{key:0,class:"text-light",title:t.fileSize+" octet(s)"},"  Version "+r(t.version),9,as)):a("",!0)]),s("small",ms,[s("span",cs,[e[75]||(e[75]=s("i",{class:"icon-briefcase"},null,-1)),e[76]||(e[76]=i(" Taille ")),s("strong",null,r(d.$filters.filesize(t.fileSize)),1)]),s("span",ps,[e[77]||(e[77]=s("i",{class:"icon-calendar"},null,-1)),e[78]||(e[78]=i(" Envoyé ")),s("strong",null,r(d.$filters.timeAgo(t.dateSend)),1)]),s("span",fs,[e[79]||(e[79]=s("i",{class:"icon-calendar"},null,-1)),e[80]||(e[80]=i(" Déposé ")),s("strong",null,r(d.$filters.dateFull(t.dateDeposit)),1)]),s("span",vs,[e[81]||(e[81]=s("i",{class:"icon-calendar"},null,-1)),e[82]||(e[82]=i(" Uploadé ")),s("strong",null,r(d.$filters.dateFull(t.dateUpload)),1)]),s("span",gs,[e[83]||(e[83]=s("i",{class:"icon-user"},null,-1)),e[84]||(e[84]=i(" par ")),C(T,{person:t.uploader},null,8,["person"])])]),s("p",null,r(t.information),1),t.private?(l(),n("section",bs,[e[85]||(e[85]=s("i",{class:"icon-lock"},null,-1)),e[86]||(e[86]=i(" Ce document est privé, accessible par : ")),(l(!0),n(p,null,f(t.persons,u=>(l(),n("span",Ds,r(u.personName),1))),256))])):a("",!0),s("div",ks,[t.process?(l(),n("section",{key:0,class:v(["alert",{"alert-success":t.process.status==201,"alert-danger":t.process.status>=400,"alert-info":t.process.status<200}])},[e[90]||(e[90]=s("i",{class:"icon-hammer"},null,-1)),e[91]||(e[91]=i(" Procédure de signature ")),s("strong",null,r(t.process.label),1),e[92]||(e[92]=i(" (")),s("em",null,r(t.process.status_text),1),s("span",null," - étape "+r(t.process.current_step)+" / "+r(t.process.total_steps),1),e[93]||(e[93]=i(") ")),s("button",{class:"btn btn-xs btn-info",onClick:u=>c.handlerProcessDetailsOn(t.process)},e[87]||(e[87]=[s("i",{class:"icon-help-circled"},null,-1),i(" Détails ")]),8,ys),m.processManage&&t.urlProcessDelete?(l(),n("button",{key:0,class:"btn btn-xs btn-danger",onClick:u=>c.handlerDeleteProcess(t)},e[88]||(e[88]=[s("i",{class:"icon-trash"},null,-1),i(" Annuler la procédure ")]),8,hs)):a("",!0),m.processManage&&t.urlProcessUpdate?(l(),n("button",{key:1,class:"btn btn-default btn-xs",onClick:u=>c.handlerProcessReload(t)},e[89]||(e[89]=[s("i",{class:"icon-cw-outline"},null,-1),i(" Actualiser ")]),8,Cs)):a("",!0)],2)):a("",!0),m.displayActivity?(l(),n("section",Ps,[e[98]||(e[98]=i(" Activité : ")),s("span",{class:v({link:t.activity.url_show}),onClick:u=>c.urlShow(t.activity.url_show)},[s("strong",null,[e[94]||(e[94]=s("i",{class:"icon-cube"},null,-1)),i(" / "+r(t.activity.num),1)]),e[97]||(e[97]=i("  ")),s("em",null,r(t.activity.label),1),t.activity.project_id?(l(),n("small",ws,[e[95]||(e[95]=i(" (")),e[96]||(e[96]=s("i",{class:"icon-cubes"},null,-1)),i(r(t.activity.project_acronym)+") ",1)])):a("",!0)],10,_s)])):a("",!0),t.versions&&t.versions.length?(l(),n("div",Ss,[e[103]||(e[103]=s("div",{class:"exploder"}," Versions précédentes : ",-1)),(l(!0),n(p,null,f(t.versions,u=>(l(),n("article",xs,[s("i",{class:v(["picto icon-doc","doc"+u.extension])},null,2),s("strong",null,r(u.fileName),1),e[101]||(e[101]=i(" version ")),s("em",null,r(u.version),1),e[102]||(e[102]=i(", téléchargé ")),s("time",null,r(d.$filters.dateFull(u.dateUpload)),1),u.uploader?(l(),n("span",Vs,[e[99]||(e[99]=i(" par ")),C(T,{person:u},null,8,["person"])])):a("",!0),s("a",{href:u.urlDownload},e[100]||(e[100]=[s("i",{class:"icon-download-outline"},null,-1),i(" Télécharger cette version ")]),8,Ts)]))),256))])):a("",!0),s("nav",Ns,[t.location=="url"?(l(),n("a",{key:0,class:"btn btn-default btn-xs",href:t.basename,target:"_blank"},e[104]||(e[104]=[s("i",{class:"icon-link-ext"},null,-1),i(" Accéder au lien ")]),8,As)):a("",!0),t.process_triggerable&&m.processStart?(l(),n("a",{key:1,class:"btn btn-default btn-xs",href:"#",onClick:b(u=>c.handlerProcessInit(t),["prevent"])},e[105]||(e[105]=[s("i",{class:"icon-bank"},null,-1),i(" Signer ce document ")]),8,Es)):a("",!0),t.urlDownload&&t.location!="url"?(l(),n("a",{key:2,class:"btn btn-default btn-xs",href:t.urlDownload},e[106]||(e[106]=[s("i",{class:"icon-upload-outline"},null,-1),i(" Télécharger ")]),8,Fs)):a("",!0),m.manage?(l(),n("button",{key:3,onClick:u=>c.handlerNewVersion(t),class:"btn btn-default btn-xs"},e[107]||(e[107]=[s("i",{class:"icon-download-outline"},null,-1),i(" Nouvelle Version ")]),8,Us)):a("",!0),m.manage?(l(),n("a",{key:4,class:"btn btn-danger btn-xs",onClick:b(u=>c.handlerDeleteDocument(t),["prevent"])},e[108]||(e[108]=[s("i",{class:"icon-trash"},null,-1),i(" Supprimer ")]),8,Os)):a("",!0),m.manage?(l(),n("a",{key:5,class:"btn btn-xs btn-default",href:"#",onClick:b(u=>c.handlerEdit(t),["prevent"])},e[109]||(e[109]=[s("i",{class:"icon-pencil"},null,-1),i(" Modifier ")]),8,Ms)):a("",!0)])])]))),128))],64)}const Ls=U(O,[["render",zs],["__scopeId","data-v-65e61e4a"]]);export{Ls as D}; +import{s as y,r as x,o as t,c as n,d as e,a as i,t as o,g as u,h as g,b as C,w as b,l as V,F as m,k as p,v as A,f as T,n as f,p as E,i as F}from"./vendor.js";import{D as U,P as O}from"./vendor6.js";import{A as P}from"./vendor14.js";import{P as M}from"./vendor18.js";import{_ as I}from"./vendor7.js";const z={components:{PersonDisplay:M,"date-picker":U,"person-auto-completer":O},props:{editable:{default:!1},manage:{default:!1},displayActivity:{default:!1},documents:{default:[]},signProcess:{default:null},tabs:{default:[]},types:{default:[]},displayButtonSign:{default:!0},processManage:{default:!1},processAdmin:{default:!1},processStart:{default:!1}},data(){return{deleteDocument:null,signDocument:null,signProcessError:"",selectedSignProcess:null,processDetails:null,error:null,editedDocument:null,mode:null,fileToDownload:null}},methods:{urlShow(d=null){if(console.log(d),d)document.location=d;else return!1},handlerToggleCheck(d){d.forEach(r=>{r.selected=!r.selected})},handlerProcessInit(d){console.log("Affichage fenêtre de signature"),this.signDocument=d},handlerPerformSignDocumentDisabled(d,r){if(!r||r.missing_recipients)return!0;for(let _=0;_{this.signDocument=null,this.selectedSignProcess=null,this.$emit("fetch")},l=>{this.error=P.error(l)}),!1},handlerProcessDetailsOn(d){this.processDetails=d},handlerDeleteProcess(d){console.log("handlerDeleteProcess",d),y.post(d.urlProcessDelete).then(r=>{this.$emit("fetch")},r=>{this.error=P.error(r)})},handlerDeleteDocument(d){this.deleteDocument=d},handlerDeleteDocumentConfirm(){console.log(this.deleteDocument.urlDelete),y.post(this.deleteDocument.urlDelete).then(d=>{this.$emit("fetch")},d=>{this.error=P.error(d)}),this.deleteDocument=null},handlerEdit(d){this.mode="edit",this.editedDocument=d},handlerEditConfirm(){let d=new FormData,r="";if(d.append("data",JSON.stringify(this.editedDocument)),this.mode=="version"?(d.append("action","version"),r=this.editedDocument.urlReupload):this.mode=="new"?(d.append("action","new"),r=this.urlUploadNewDoc):this.mode=="edit"&&(d.append("action","edit"),r=this.editedDocument.urlEdit),this.mode!="edit")if(this.fileToDownload!==null)d.append("file",this.fileToDownload,this.fileToDownload.name);else{this.error="Aucun fichier sélectionner a téléverser !";return}y.post(r,d).then(_=>{this.editedDocument=null,this.$emit("fetch")},_=>{this.error=P.error(_)})},handlerChangeFile(d){event.target.files.length!==0&&(this.fileToDownload=event.target.files[0])},handlerNewVersion(d){console.log("handlerNewVersion"),this.fileToDownload=null,this.mode="version",this.editedDocument=d},handlerProcessDetailsOff(){this.processDetails=null},handlerProcessReload(d){let r=new FormData;y.post(d.urlProcessUpdate,r).then(_=>{this.$emit("fetch")},_=>{this.error=P.error(_)})}}},a=d=>(E("data-v-65e61e4a"),d=d(),F(),d),X={key:0,class:"overlay",style:{"z-index":"10000"}},q={class:"overlay-content",style:{"max-width":"50%"}},B={key:1,class:"overlay"},L={class:"overlay-content"},j={class:"alert-danger alert"},R=a(()=>e("i",{class:"icon-attention-1"},null,-1)),J=a(()=>e("i",{class:"icon-cancel-alt"},null,-1)),G=a(()=>e("i",{class:"icon-valid"},null,-1)),H={key:2,class:"overlay"},K={class:"overlay-content"},Q=a(()=>e("i",{class:"icon-doc"},null,-1)),W={key:0},Y={key:1},Z={key:2},$=a(()=>e("br",null,null,-1)),ee={key:0},se={key:1},te={class:"row"},ne={class:"col-md-6"},le={key:0},oe=a(()=>e("label",{for:"file"},"Fichier",-1)),ie=a(()=>e("label",{for:"dateDeposit"},"Date de dépôt",-1)),re=a(()=>e("label",{for:"dateSend"},"Date d'envoi",-1)),ce={class:"col-md-6"},ae={key:0},de=a(()=>e("label",{for:"tabdocument"},"Onglet",-1)),ue=["value"],_e={key:1},he=a(()=>e("label",{for:"typedocument"},"Type de document",-1)),me={key:0,class:"alert alert-warning"},pe={key:1},fe=["value","disabled"],ve={class:"col-md-12"},ge=a(()=>e("label",{for:"information"},"Informations",-1)),be={key:0,class:"col-md-6"},De={class:"row"},ke={key:0},ye=a(()=>e("label",{for:"tabdocument"},"Onglet document",-1)),Ce=["value"],Pe=a(()=>e("div",{class:"col-md-6"},[e("label",{for:"private"},"Document privé")],-1)),we={class:"col-md-6"},Se={key:0},xe=a(()=>e("label",null,"Choix des personnes ayant accès à ce document",-1)),Ve=a(()=>e("h3",null,"Ce document sera classé automatiquement dans l'onglet privé",-1)),Te=a(()=>e("i",{class:"icon-cube"},null,-1)),Ne={class:"addon"},Ae=["onClick"],Ee={class:"row"},Fe={class:"col-md-12"},Ue={class:"buttons-bar"},Oe=a(()=>e("i",{class:"icon-cancel-alt"},null,-1)),Me=a(()=>e("i",{class:"icon-valid"},null,-1)),Ie={key:3,class:"overlay"},ze={class:"overlay-content"},Xe={key:0,class:"alert alert-danger"},qe={key:1},Be=["onClick"],Le=a(()=>e("br",null,null,-1)),je={key:0},Re=a(()=>e("small",null,"Procédure de signature",-1)),Je=a(()=>e("br",null,null,-1)),Ge={class:"metas"},He={class:"meta"},Ke={class:"meta"},Qe={class:"meta"},We={key:0,class:"alert alert-danger"},Ye={class:"row"},Ze={class:"col-md-6"},$e=a(()=>e("i",{class:"icon-group"},null,-1)),es=["onClick"],ss=["for"],ts={class:"fullname"},ns=["onUpdate:modelValue","id"],ls={style:{"font-weight":"300"}},os={class:"email",style:{"font-weight":"500"}},is={class:"col-md-6"},rs=a(()=>e("i",{class:"icon-bell-alt"},null,-1)),cs=a(()=>e("strong",null,"Observateurs",-1)),as=["onClick"],ds=["for"],us={class:"fullname"},_s=["id","onUpdate:modelValue"],hs={style:{"font-weight":"300"}},ms={class:"email",style:{"font-weight":"500"}},ps={key:1,class:"alert alert-info"},fs={key:2,class:"alert alert-danger"},vs={class:"buttons-bar"},gs=a(()=>e("i",{class:"icon-cancel-alt"},null,-1)),bs=a(()=>e("i",{class:"icon-cancel-alt"},null,-1)),Ds={key:4,class:"overlay"},ks={class:"overlay-content",style:{"max-width":"75%"}},ys=a(()=>e("small",null,[e("i",{class:"icon-edit"}),i(" Procédure")],-1)),Cs=a(()=>e("br",null,null,-1)),Ps=a(()=>e("br",null,null,-1)),ws={class:"signature-status-101"},Ss={class:"status"},xs={class:"metas"},Vs={class:"meta"},Ts={class:"meta"},Ns={class:"meta"},As={key:0,class:"alert alert-danger"},Es=a(()=>e("br",null,null,-1)),Fs={class:"title"},Us={class:"fullname"},Os={class:"email"},Ms={key:0,class:"dateFinished"},Is={class:"status"},zs={class:"status-text"},Xs=a(()=>e("i",{class:"icon-comment"},null,-1)),qs=a(()=>e("strong",null,"Observateurs : ",-1)),Bs={class:"observer-inline"},Ls={class:"buttons-bar"},js=a(()=>e("i",{class:"icon-cancel-outline"},null,-1)),Rs={class:"card-title"},Js={class:"text-light"},Gs=["title"],Hs={class:"document-metas"},Ks={class:"meta"},Qs=a(()=>e("i",{class:"icon-briefcase"},null,-1)),Ws={class:"meta"},Ys=a(()=>e("i",{class:"icon-calendar"},null,-1)),Zs={class:"meta"},$s=a(()=>e("i",{class:"icon-calendar"},null,-1)),et={class:"meta"},st=a(()=>e("i",{class:"icon-calendar"},null,-1)),tt={class:"meta"},nt=a(()=>e("i",{class:"icon-user"},null,-1)),lt={key:0},ot=a(()=>e("i",{class:"icon-lock"},null,-1)),it={class:"cartouche"},rt={class:"card-content"},ct=a(()=>e("i",{class:"icon-hammer"},null,-1)),at=["onClick"],dt=a(()=>e("i",{class:"icon-help-circled"},null,-1)),ut=["onClick"],_t=a(()=>e("i",{class:"icon-trash"},null,-1)),ht=["onClick"],mt=a(()=>e("i",{class:"icon-cw-outline"},null,-1)),pt={key:1},ft=["onClick"],vt=a(()=>e("i",{class:"icon-cube"},null,-1)),gt={key:0},bt=a(()=>e("i",{class:"icon-cubes"},null,-1)),Dt={key:2},kt=a(()=>e("div",{class:"exploder"}," Versions précédentes : ",-1)),yt={class:"subdoc text-highlight"},Ct={key:0},Pt=["href"],wt=a(()=>e("i",{class:"icon-download-outline"},null,-1)),St={class:"text-right show-over"},xt=["href"],Vt=a(()=>e("i",{class:"icon-link-ext"},null,-1)),Tt=["onClick"],Nt=a(()=>e("i",{class:"icon-bank"},null,-1)),At=["href"],Et=a(()=>e("i",{class:"icon-upload-outline"},null,-1)),Ft=["onClick"],Ut=a(()=>e("i",{class:"icon-download-outline"},null,-1)),Ot=["onClick"],Mt=a(()=>e("i",{class:"icon-trash"},null,-1)),It=["onClick"],zt=a(()=>e("i",{class:"icon-pencil"},null,-1));function Xt(d,r,_,v,l,h){const D=x("date-picker"),w=x("person-auto-completer"),N=x("PersonDisplay");return t(),n(m,null,[l.error?(t(),n("div",X,[e("div",q,[e("h2",null,[i(" Erreur "),e("span",{class:"overlay-closer",onClick:r[0]||(r[0]=s=>l.error=null)},"X")]),e("p",null,o(l.error.response&&l.error.response.data?l.error.response.data:l.error),1)])])):u("",!0),l.deleteDocument?(t(),n("div",B,[e("div",L,[e("h2",null,[i(" Supprimer le document ? "),e("span",{class:"overlay-closer",onClick:r[1]||(r[1]=s=>l.deleteDocument=null)},"X")]),e("p",j,[R,i(" Souhaitez-vous supprimer le fichier "),e("strong",null,o(l.deleteDocument.fileName),1),i(" ? ")]),e("button",{class:"btn btn-danger",onClick:r[2]||(r[2]=s=>l.deleteDocument=null)},[J,i(" Annuler ")]),e("a",{class:"btn btn-success",onClick:r[3]||(r[3]=g(s=>h.handlerDeleteDocumentConfirm(),["prevent"]))},[G,i(" Confirmer ")])])])):u("",!0),l.editedDocument?(t(),n("div",H,[e("div",K,[e("h2",null,[e("small",null,[Q,l.mode=="new"?(t(),n("span",W,"Téléversement d'un document")):u("",!0),l.mode=="edit"?(t(),n("span",Y,"Modification des informations")):u("",!0),l.mode=="version"?(t(),n("span",Z,"Nouvelle version")):u("",!0)]),$,l.editedDocument.id>0?(t(),n("span",ee,[e("strong",null,o(l.editedDocument.fileName),1)])):(t(),n("span",se,[i(" Nouveau document dans "),e("strong",null,o(l.editedDocument.tabDocument.label),1)])),e("span",{class:"overlay-closer",onClick:r[4]||(r[4]=s=>l.editedDocument=null)},"X")]),e("div",te,[e("div",ne,[l.mode!="edit"?(t(),n("div",le,[oe,e("input",{onChange:r[5]||(r[5]=(...s)=>h.handlerChangeFile&&h.handlerChangeFile(...s)),type:"file",class:"form-control",name:"file",id:"file"},null,32)])):u("",!0),e("div",null,[ie,C(D,{modelValue:l.editedDocument.dateDeposit,"onUpdate:modelValue":r[6]||(r[6]=s=>l.editedDocument.dateDeposit=s),id:"dateDeposit"},null,8,["modelValue"])]),e("div",null,[re,C(D,{modelValue:l.editedDocument.dateSend,"onUpdate:modelValue":r[7]||(r[7]=s=>l.editedDocument.dateSend=s),id:"dateSend"},null,8,["modelValue"])])]),e("div",ce,[l.mode!="version"?(t(),n("div",ae,[de,e("div",null,[b(e("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":r[8]||(r[8]=s=>l.editedDocument.tabDocument.id=s),class:"form-control"},[(t(!0),n(m,null,p(_.tabs,(s,c)=>(t(),n("option",{value:c,key:c},o(s.label),9,ue))),128))],512),[[V,l.editedDocument.tabDocument.id]])])])):u("",!0),l.mode!="version"?(t(),n("div",_e,[he,l.editedDocument.process?(t(),n("div",me," Vous ne pouvez pas modifier le type d'un document engagé dans un processus de signature. ")):(t(),n("div",pe,[b(e("select",{class:"form-control",name:"type",id:"typedocument","onUpdate:modelValue":r[9]||(r[9]=s=>l.editedDocument.category.id=s)},[(t(!0),n(m,null,p(_.types,(s,c)=>(t(),n("option",{value:s.id,key:s.id,disabled:s.flow&&l.editedDocument.id>0},o(s.label)+" "+o(s.flow&&l.editedDocument.id?"(signature)":""),9,fe))),128))],512),[[V,l.editedDocument.category.id]])]))])):u("",!0)]),e("div",ve,[ge,b(e("textarea",{"onUpdate:modelValue":r[10]||(r[10]=s=>l.editedDocument.information=s),id:"information",class:"form-control"},null,512),[[A,l.editedDocument.information]])]),l.mode=="change"?(t(),n("div",be,[e("div",De,[l.editedDocument.private===!1?(t(),n("span",ke,[ye,e("div",null,[b(e("select",{name:"tabdocument",id:"tabdocument","onUpdate:modelValue":r[11]||(r[11]=s=>l.editedDocument.tabDocument.id=s),class:"form-control"},[(t(!0),n(m,null,p(_.tabs,(s,c)=>(t(),n("option",{value:c,key:c},o(s.label),9,Ce))),128))],512),[[V,l.editedDocument.tabDocument.id]])])])):u("",!0),Pe,e("div",we,[b(e("input",{type:"checkbox",name:"private",id:"privateModifDoc",class:"form-control","onUpdate:modelValue":r[12]||(r[12]=s=>l.editedDocument.private=s)},null,512),[[T,l.editedDocument.private]])])]),l.editedDocument.private===!0?(t(),n("span",Se,[xe,Ve,C(w,{onChange:d.handlerSelectPersons},null,8,["onChange"]),(t(!0),n(m,null,p(l.editedDocument.persons,s=>(t(),n("span",{key:s.id,class:"cartouche"},[Te,e("span",null,o(s.personName),1),e("span",Ne,o(s.affectation),1),s.personId!==d.idCurrentPerson?(t(),n("i",{key:0,onClick:c=>d.handlerDeletePerson(s),class:"icon-trash icon-clickable"},null,8,Ae)):u("",!0)]))),128))])):u("",!0)])):u("",!0)]),e("div",Ee,[e("div",Fe,[e("nav",Ue,[e("button",{class:"btn btn-danger",onClick:r[13]||(r[13]=s=>l.editedDocument=null)},[Oe,i(" Annuler ")]),e("a",{class:"btn btn-success",href:"#",onClick:r[14]||(r[14]=g(s=>h.handlerEditConfirm(),["prevent"]))},[Me,i(" Enregistrer ")])])])])])])):u("",!0),l.signDocument?(t(),n("div",Ie,[e("div",ze,[e("h2",null,[i(" Signature de document numérique "),e("span",{class:"overlay-closer",onClick:r[15]||(r[15]=s=>l.signDocument=null)},"X")]),_.signProcess?(t(),n("div",qe,[e("nav",null,[i(" Sélectionnez une procédure de signature "),(t(!0),n(m,null,p(_.signProcess,s=>(t(),n("span",{class:f(["btn btn-lg btn-default",{"btn-success":l.selectedSignProcess&&l.selectedSignProcess.id==s.id}]),onClick:c=>h.handlerSelectProcess(s)},[e("strong",null,o(s.label),1),Le,e("em",null,o(s.description)+" ",1)],10,Be))),256))]),l.selectedSignProcess?(t(),n("section",je,[e("h3",null,[Re,Je,e("strong",null,o(l.selectedSignProcess.label),1)]),(t(!0),n(m,null,p(l.selectedSignProcess.steps,s=>(t(),n("article",{class:f(["step",s.missing_recipients?"error":"ok"])},[e("h4",null,[i("ÉTAPE "+o(s.order)+" :",1),e("strong",null,o(s.label),1)]),e("ul",Ge,[e("li",He,[i("Parapheur: "),e("strong",null,o(s.letterfile_label),1)]),e("li",Ke,[i("Type: "),e("strong",null,o(s.level_label),1)]),e("li",Qe,[i("Tous signent: "),e("strong",null,o(s.allSignToComplete?"Oui":"non"),1)])]),s.missing_recipients?(t(),n("div",We," Il manque des destinataires pour cette procédure. ")):u("",!0),e("div",Ye,[e("div",Ze,[e("h5",null,[$e,i(" Destinataires - "),e("a",{href:"#",onClick:g(c=>h.handlerToggleCheck(s.recipients),["prevent"])},"Inverser selection",8,es)]),(t(!0),n(m,null,p(s.recipients,(c,k)=>(t(),n("div",{class:f(["recipient",{selected:c.selected}])},[e("label",{for:"des_"+s.id+"_"+k},[e("span",ts,[s.editable?b((t(),n("input",{key:0,type:"checkbox","onUpdate:modelValue":S=>c.selected=S,id:"des_"+s.id+"_"+k},null,8,ns)),[[T,c.selected]]):u("",!0),i("   "),e("em",ls,o(c.firstname),1),i(" "+o(c.lastname),1)]),e("small",os,o(c.email),1)],8,ss)],2))),256))]),e("div",is,[e("h5",null,[rs,cs,i(" - "),e("a",{href:"#",onClick:g(c=>h.handlerToggleCheck(s.observers),["prevent"])},"Inverser selection",8,as)]),s.observers.length?(t(!0),n(m,{key:0},p(s.observers,(c,k)=>(t(),n("div",{class:f(["recipient",{selected:c.selected}])},[e("label",{for:"obs_"+s.id+"_"+k},[e("span",us,[s.editable?b((t(),n("input",{key:0,type:"checkbox",id:"obs_"+s.id+"_"+k,"onUpdate:modelValue":S=>c.selected=S},null,8,_s)),[[T,c.selected]]):u("",!0),i("   "),e("em",hs,o(c.firstname),1),i(" "+o(c.lastname),1)]),e("small",ms,o(c.email),1)],8,ds)],2))),256)):(t(),n("div",ps," Pas d'observateur pour cette étape "))])])],2))),256))])):u("",!0)])):(t(),n("div",Xe," Aucun processus de signature disponible ")),l.signProcessError?(t(),n("div",fs,[i(" Signature non-disponible : "),e("strong",null,o(l.signProcessError),1)])):u("",!0),e("nav",vs,[e("button",{class:"btn btn-default",onClick:r[16]||(r[16]=s=>l.signDocument=null)},[gs,i(" Annuler ")]),e("button",{class:f(["btn btn-success",{disabled:h.handlerPerformSignDocumentDisabled(l.signDocument,l.selectedSignProcess)}]),onClick:r[17]||(r[17]=s=>h.handlerPerformSignDocument(l.signDocument,l.selectedSignProcess))},[bs,i(" Valider ")],2)])])])):u("",!0),l.processDetails?(t(),n("div",Ds,[e("div",ks,[e("h2",null,[ys,i(),Cs,e("strong",null,o(l.processDetails.label),1),i(),Ps,e("span",ws,[i(o(l.processDetails.status_text)+" - ",1),e("em",null,"étape "+o(l.processDetails.current_step)+" / "+o(l.processDetails.total_steps),1)]),e("span",{class:"overlay-closer",onClick:r[18]||(r[18]=(...s)=>h.handlerProcessDetailsOff&&h.handlerProcessDetailsOff(...s))},"X")]),(t(!0),n(m,null,p(l.processDetails.steps,s=>(t(),n("section",{class:f(["signature","signature-status-"+s.status])},[e("h4",null,[e("small",null,"étape "+o(s.order)+" : ",1),e("strong",null,o(s.label),1),e("span",Ss," ("+o(s.status_text)+")",1)]),e("ul",xs,[e("li",Vs,[i("Parapheur "),e("strong",null,o(s.letterfile),1)]),e("li",Ts,[i("Niveau "),e("strong",null,o(s.level),1)]),e("li",Ns,[i("Tous les destinataires signent "),e("strong",null,o(s.allSignToComplete?"Oui":"Non"),1)])]),s.refused_text?(t(),n("div",As,[i(" Message de refus : "),Es,e("blockquote",null,o(s.refused_text),1)])):u("",!0),(t(!0),n(m,null,p(s.recipients,c=>(t(),n("article",{class:f(["recipient","signature-status-"+c.status])},[e("div",Fs,[e("strong",Us,o(c.fullname),1),e("em",Os,o(c.email),1),c.dateFinished?(t(),n("small",Ms,o(d.$filters.dateFull(c.dateFinished)),1)):u("",!0),e("span",Is,[e("span",zs,o(c.status_text),1)])]),c.informations?(t(),n("div",{key:0,class:f({"alert alert-danger":c.status===501})},[Xs,i(" "+o(c.informations),1)],2)):u("",!0)],2))),256)),qs,(t(!0),n(m,null,p(s.observers,c=>(t(),n("span",Bs,[e("small",null,o(c.firstname),1),i(),e("span",null,o(c.lastname),1)]))),256))],2))),256)),e("div",Ls,[e("button",{class:"btn btn-default",onClick:r[19]||(r[19]=(...s)=>h.handlerProcessDetailsOff&&h.handlerProcessDetailsOff(...s))},[js,i(" Fermer ")])])])])):u("",!0),(t(!0),n(m,null,p(_.documents,s=>(t(),n("article",{class:"card xs",key:s.id},[e("div",Rs,[e("i",{class:f(["picto icon-doc","doc"+s.extension])},null,2),e("small",Js,o(s.category.label)+" ~ ",1),e("strong",null,o(s.fileName),1),s.location!="url"?(t(),n("small",{key:0,class:"text-light",title:s.fileSize+" octet(s)"},"  Version "+o(s.version),9,Gs)):u("",!0)]),e("small",Hs,[e("span",Ks,[Qs,i(" Taille "),e("strong",null,o(d.$filters.filesize(s.fileSize)),1)]),e("span",Ws,[Ys,i(" Envoyé "),e("strong",null,o(d.$filters.timeAgo(s.dateSend)),1)]),e("span",Zs,[$s,i(" Déposé "),e("strong",null,o(d.$filters.dateFull(s.dateDeposit)),1)]),e("span",et,[st,i(" Uploadé "),e("strong",null,o(d.$filters.dateFull(s.dateUpload)),1)]),e("span",tt,[nt,i(" par "),C(N,{person:s.uploader},null,8,["person"])])]),e("p",null,o(s.information),1),s.private?(t(),n("section",lt,[ot,i(" Ce document est privé, accessible par : "),(t(!0),n(m,null,p(s.persons,c=>(t(),n("span",it,o(c.personName),1))),256))])):u("",!0),e("div",rt,[s.process?(t(),n("section",{key:0,class:f(["alert",{"alert-success":s.process.status==201,"alert-danger":s.process.status>=400,"alert-info":s.process.status<200}])},[ct,i(" Procédure de signature "),e("strong",null,o(s.process.label),1),i(" ("),e("em",null,o(s.process.status_text),1),e("span",null," - étape "+o(s.process.current_step)+" / "+o(s.process.total_steps),1),i(") "),e("button",{class:"btn btn-xs btn-info",onClick:c=>h.handlerProcessDetailsOn(s.process)},[dt,i(" Détails ")],8,at),_.processManage&&s.urlProcessDelete?(t(),n("button",{key:0,class:"btn btn-xs btn-danger",onClick:c=>h.handlerDeleteProcess(s)},[_t,i(" Annuler la procédure ")],8,ut)):u("",!0),_.processManage&&s.urlProcessUpdate?(t(),n("button",{key:1,class:"btn btn-default btn-xs",onClick:c=>h.handlerProcessReload(s)},[mt,i(" Actualiser ")],8,ht)):u("",!0)],2)):u("",!0),_.displayActivity?(t(),n("section",pt,[i(" Activité : "),e("span",{class:f({link:s.activity.url_show}),onClick:c=>h.urlShow(s.activity.url_show)},[e("strong",null,[vt,i(" / "+o(s.activity.num),1)]),i("  "),e("em",null,o(s.activity.label),1),s.activity.project_id?(t(),n("small",gt,[i(" ("),bt,i(o(s.activity.project_acronym)+") ",1)])):u("",!0)],10,ft)])):u("",!0),s.versions&&s.versions.length?(t(),n("div",Dt,[kt,(t(!0),n(m,null,p(s.versions,c=>(t(),n("article",yt,[e("i",{class:f(["picto icon-doc","doc"+c.extension])},null,2),e("strong",null,o(c.fileName),1),i(" version "),e("em",null,o(c.version),1),i(", téléchargé "),e("time",null,o(d.$filters.dateFull(c.dateUpload)),1),c.uploader?(t(),n("span",Ct,[i(" par "),C(N,{person:c},null,8,["person"])])):u("",!0),e("a",{href:c.urlDownload},[wt,i(" Télécharger cette version ")],8,Pt)]))),256))])):u("",!0),e("nav",St,[s.location=="url"?(t(),n("a",{key:0,class:"btn btn-default btn-xs",href:s.basename,target:"_blank"},[Vt,i(" Accéder au lien ")],8,xt)):u("",!0),s.process_triggerable&&_.processStart?(t(),n("a",{key:1,class:"btn btn-default btn-xs",href:"#",onClick:g(c=>h.handlerProcessInit(s),["prevent"])},[Nt,i(" Signer ce document ")],8,Tt)):u("",!0),s.urlDownload&&s.location!="url"?(t(),n("a",{key:2,class:"btn btn-default btn-xs",href:s.urlDownload},[Et,i(" Télécharger ")],8,At)):u("",!0),_.manage?(t(),n("button",{key:3,onClick:c=>h.handlerNewVersion(s),class:"btn btn-default btn-xs"},[Ut,i(" Nouvelle Version ")],8,Ft)):u("",!0),_.manage?(t(),n("a",{key:4,class:"btn btn-danger btn-xs",onClick:g(c=>h.handlerDeleteDocument(s),["prevent"])},[Mt,i(" Supprimer ")],8,Ot)):u("",!0),_.manage?(t(),n("a",{key:5,class:"btn btn-xs btn-default",href:"#",onClick:g(c=>h.handlerEdit(s),["prevent"])},[zt,i(" Modifier ")],8,It)):u("",!0)])])]))),128))],64)}const Jt=I(z,[["render",Xt],["__scopeId","data-v-65e61e4a"]]);export{Jt as D}; diff --git a/public/js/oscar/vite/dist/vendor21.js b/public/js/oscar/vite/dist/vendor21.js index de17a9b062639e4f8f2a7d4e4e8487b3cf62e062..ffce9501161de949d777fb09931c610de9e317c9 100644 --- a/public/js/oscar/vite/dist/vendor21.js +++ b/public/js/oscar/vite/dist/vendor21.js @@ -1 +1 @@ -import{w as l,q as o,o as a,c,d as e,a as i,t as r}from"./vendor.js";import{_ as d}from"./vendor7.js";const p={props:{options:{default:null}},computed:{displayed(){return this.options==null?!1:this.options.hasOwnProperty("display")?this.options.display:!0},title(){return this.options&&this.options.hasOwnProperty("title")?this.options.title:""},message(){return this.options&&this.options.hasOwnProperty("message")?this.options.message:""}},methods:{handlerCancel(){this.options.display=!1},handlerSuccess(){this.options.display=!1,this.options.onSuccess&&this.options.onSuccess()}}},u={class:"overlay"},h={class:"overlay-content"},f={class:"overlay-title"},m={class:"overlay-message"},y={class:"buttons-bar"};function v(_,s,b,g,S,t){return l((a(),c("div",u,[e("div",h,[l(e("h1",f,[s[2]||(s[2]=e("i",{class:"icon-help-circled"},null,-1)),i(" "+r(t.title),1)],512),[[o,t.title]]),e("div",m,r(t.message),1),e("nav",y,[e("button",{onClick:s[0]||(s[0]=(...n)=>t.handlerCancel&&t.handlerCancel(...n)),class:"btn btn-danger"},s[3]||(s[3]=[e("i",{class:"icon-cancel-circled-outline"},null,-1),i(" Annuler ")])),e("button",{onClick:s[1]||(s[1]=(...n)=>t.handlerSuccess&&t.handlerSuccess(...n)),class:"btn btn-success"},s[4]||(s[4]=[e("i",{class:"icon-valid"},null,-1),i(" Confirmer ")]))])])],512)),[[o,t.displayed]])}const O=d(p,[["render",v]]);export{O}; +import{w as i,u as l,o as r,c,d as s,a as o,t as a}from"./vendor.js";import{_ as d}from"./vendor7.js";const h={props:{options:{default:null}},computed:{displayed(){return this.options==null?!1:this.options.hasOwnProperty("display")?this.options.display:!0},title(){return this.options&&this.options.hasOwnProperty("title")?this.options.title:""},message(){return this.options&&this.options.hasOwnProperty("message")?this.options.message:""}},methods:{handlerCancel(){this.options.display=!1},handlerSuccess(){this.options.display=!1,this.options.onSuccess&&this.options.onSuccess()}}},u={class:"overlay"},p={class:"overlay-content"},_={class:"overlay-title"},f=s("i",{class:"icon-help-circled"},null,-1),m={class:"overlay-message"},y={class:"buttons-bar"},v=s("i",{class:"icon-cancel-circled-outline"},null,-1),b=s("i",{class:"icon-valid"},null,-1);function g(S,t,w,C,O,e){return i((r(),c("div",u,[s("div",p,[i(s("h1",_,[f,o(" "+a(e.title),1)],512),[[l,e.title]]),s("div",m,a(e.message),1),s("nav",y,[s("button",{onClick:t[0]||(t[0]=(...n)=>e.handlerCancel&&e.handlerCancel(...n)),class:"btn btn-danger"},[v,o(" Annuler ")]),s("button",{onClick:t[1]||(t[1]=(...n)=>e.handlerSuccess&&e.handlerSuccess(...n)),class:"btn btn-success"},[b,o(" Confirmer ")])])])],512)),[[l,e.displayed]])}const B=d(h,[["render",g]]);export{B as O}; diff --git a/public/js/oscar/vite/dist/vendor5.js b/public/js/oscar/vite/dist/vendor5.js index 06030b0eaee48c25fdbed0b677c1709c43f00fb4..ab677e97c84bc28e9aefbab4386131035e5636fb 100644 --- a/public/js/oscar/vite/dist/vendor5.js +++ b/public/js/oscar/vite/dist/vendor5.js @@ -1 +1 @@ -import{o as s,l as y,i as u,c as r,d as l,n as C,g as c,a as o,t as f,h as g,b as k,e as m,T as v}from"./vendor.js";import{_ as h}from"./vendor7.js";const b={name:"Modal",props:{title:{type:String,required:!0},titleIcon:{type:String,default:"no-icon"},visible:{type:Boolean,required:!0},pending:{type:Boolean,required:!1,default:!1},pendingMessage:{type:String,required:!1,default:"Chargement des données"}},data(){return{cursorIn:!0}},methods:{handlerClickOutside(){this.cursorIn===!1&&this.handlerCancel()},handlerCancel(){this.$emit("modal-cancel")},handlerValid(){console.log("emit : modal-valid"),this.$emit("modal-valid")}}},_={class:"overlay-title"},M={class:"overlay-body"},p={key:0,class:"overlay-pending"},I={class:"overlay-buttons"};function V(i,e,a,B,d,t){return s(),y(v,{name:"fade"},{default:u(()=>[a.visible?(s(),r("div",{key:0,class:"overlay",onClick:e[5]||(e[5]=(...n)=>t.handlerClickOutside&&t.handlerClickOutside(...n))},[l("div",{class:"overlay-content",onMouseenter:e[3]||(e[3]=n=>d.cursorIn=!0),onMouseleave:e[4]||(e[4]=n=>d.cursorIn=!1)},[l("h2",_,[a.titleIcon!=="no-icon"?(s(),r("i",{key:0,class:C(a.titleIcon)},null,2)):c("",!0),o(" "+f(a.title)+" ",1),l("a",{href:"#",onClick:e[0]||(e[0]=g((...n)=>t.handlerCancel&&t.handlerCancel(...n),["prevent"])),class:"overlay-closer"},"x")]),k(v,{name:"fade",mode:"out-in"},{default:u(()=>[l("div",M,[a.pending?(s(),r("div",p,[e[6]||(e[6]=l("i",{class:"animate-spin icon-spinner"},null,-1)),o(f(a.pendingMessage),1)])):m(i.$slots,"default",{key:1},()=>[e[7]||(e[7]=o(" Some content here "))],!0)])]),_:3}),l("nav",I,[m(i.$slots,"buttons",{},()=>[l("button",{class:"btn btn-danger",onClick:e[1]||(e[1]=(...n)=>t.handlerCancel&&t.handlerCancel(...n))},"Annuler"),l("button",{class:"btn btn-success",onClick:e[2]||(e[2]=(...n)=>t.handlerValid&&t.handlerValid(...n))},"Confirmer")],!0)])],32)])):c("",!0)]),_:3})}const q=h(b,[["render",V],["__scopeId","data-v-8e477e4f"]]);export{q as M}; +import{o,m as h,j as c,c as r,d as a,n as y,g as u,a as d,t as f,h as _,b as C,e as m,T as v,p as g,i as p}from"./vendor.js";import{_ as k}from"./vendor7.js";const b={name:"Modal",props:{title:{type:String,required:!0},titleIcon:{type:String,default:"no-icon"},visible:{type:Boolean,required:!0},pending:{type:Boolean,required:!1,default:!1},pendingMessage:{type:String,required:!1,default:"Chargement des données"}},data(){return{cursorIn:!0}},methods:{handlerClickOutside(){this.cursorIn===!1&&this.handlerCancel()},handlerCancel(){this.$emit("modal-cancel")},handlerValid(){console.log("emit : modal-valid"),this.$emit("modal-valid")}}},I=l=>(g("data-v-8e477e4f"),l=l(),p(),l),M={class:"overlay-title"},S={class:"overlay-body"},V={key:0,class:"overlay-pending"},B=I(()=>a("i",{class:"animate-spin icon-spinner"},null,-1)),x={class:"overlay-buttons"};function q(l,e,s,N,i,n){return o(),h(v,{name:"fade"},{default:c(()=>[s.visible?(o(),r("div",{key:0,class:"overlay",onClick:e[5]||(e[5]=(...t)=>n.handlerClickOutside&&n.handlerClickOutside(...t))},[a("div",{class:"overlay-content",onMouseenter:e[3]||(e[3]=t=>i.cursorIn=!0),onMouseleave:e[4]||(e[4]=t=>i.cursorIn=!1)},[a("h2",M,[s.titleIcon!=="no-icon"?(o(),r("i",{key:0,class:y(s.titleIcon)},null,2)):u("",!0),d(" "+f(s.title)+" ",1),a("a",{href:"#",onClick:e[0]||(e[0]=_((...t)=>n.handlerCancel&&n.handlerCancel(...t),["prevent"])),class:"overlay-closer"},"x")]),C(v,{name:"fade",mode:"out-in"},{default:c(()=>[a("div",S,[s.pending?(o(),r("div",V,[B,d(f(s.pendingMessage),1)])):m(l.$slots,"default",{key:1},()=>[d(" Some content here ")],!0)])]),_:3}),a("nav",x,[m(l.$slots,"buttons",{},()=>[a("button",{class:"btn btn-danger",onClick:e[1]||(e[1]=(...t)=>n.handlerCancel&&n.handlerCancel(...t))},"Annuler"),a("button",{class:"btn btn-success",onClick:e[2]||(e[2]=(...t)=>n.handlerValid&&n.handlerValid(...t))},"Confirmer")],!0)])],32)])):u("",!0)]),_:3})}const T=k(b,[["render",q],["__scopeId","data-v-8e477e4f"]]);export{T as M}; diff --git a/public/js/oscar/vite/dist/vendor6.js b/public/js/oscar/vite/dist/vendor6.js index b75546a1938d4d76a94108577cef2338cbae24e9..f727308ff7d6fd4cdc63446e24486e38f421b04f 100644 --- a/public/js/oscar/vite/dist/vendor6.js +++ b/public/js/oscar/vite/dist/vendor6.js @@ -1 +1 @@ -import{m as a,o as n,c as o,d as r,w as f,v as Y,q as g,h as u,t as h,F as y,j as v,g as p,n as D,a as k,p as R,f as C}from"./vendor.js";import{_ as w}from"./vendor7.js";a.locale("fr");const _={model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{default:null},i18n:{default:"fr"},limitFrom:{default:null},daysShort:{default:()=>["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"]},months:{default:()=>["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Décembre"]},valueFormat:{default:"YYYY-MM-DD"},displayFormat:{default:"D MMMM YYYY"},format:{default:"dddd D MMMM YYYY"}},data(){return{picker:!1,pickerMode:"day",pickerDayRef:a().format(),pickerYearRef:a().format("YYYY"),pickerMonthRef:a().month(),realValue:this.modelValue,manualChange:""}},computed:{years(){let s=this.pickerYearRef-11,e=this.pickerYearRef+11,d=[];for(var m=s;ml.handlerShow&&l.handlerShow(...t)),onMouseleave:e[10]||(e[10]=(...t)=>l.handlerHide&&l.handlerHide(...t))},[r("div",b,[f(r("input",{type:"text",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=t=>l.renderValue=t)},null,512),[[Y,l.renderValue]]),e[11]||(e[11]=r("div",{class:"input-group-addon"},[r("i",{class:"icon-calendar"})],-1))]),f(r("div",{class:"datepicker-selector",onMouseleave:e[8]||(e[8]=(...t)=>l.handlerHide&&l.handlerHide(...t))},[r("div",x,[r("header",null,[r("nav",null,[r("span",{href:"#",onClick:e[1]||(e[1]=u((...t)=>l.pickerPrevMonth&&l.pickerPrevMonth(...t),["stop","prevent"]))},e[12]||(e[12]=[r("i",{class:"icon-angle-left"},null,-1)])),r("strong",S,[r("span",{class:"currentMonth",onClick:e[2]||(e[2]=u((...t)=>l.handlerPickerMonth&&l.handlerPickerMonth(...t),["stop"]))},h(l.currentMonth),1),r("span",{class:"currentYear",onClick:e[3]||(e[3]=u((...t)=>l.handlerPickerYear&&l.handlerPickerYear(...t),["stop"]))},h(l.currentYear),1)]),r("span",{href:"#",onClick:e[4]||(e[4]=u((...t)=>l.pickerNextMonth&&l.pickerNextMonth(...t),["stop"]))},e[13]||(e[13]=[r("i",{class:"icon-angle-right"},null,-1)]))]),i.pickerMode=="day"?(n(),o("div",P,[e[14]||(e[14]=r("span",{class:"week-label"}," ",-1)),(n(!0),o(y,null,v(l.pickerData.dayslabels,t=>(n(),o("span",F,h(t),1))),256))])):p("",!0)]),i.pickerMode=="day"?(n(),o("section",O,[(n(!0),o(y,null,v(l.pickerData.weeks,t=>(n(),o("div",q,[r("span",N,[r("span",T,h(t.num),1),(n(!0),o(y,null,v(t.days,c=>(n(),o("span",{class:D(["week-day",{active:c.active,disabled:!c.enabled}]),onClick:u(V=>l.changeDate(c.date),["prevent","stop"])},h(c.day),11,U))),256))])]))),256))])):p("",!0),i.pickerMode=="month"?(n(),o("section",E,[(n(!0),o(y,null,v(d.months,t=>(n(),o("span",{class:D(["month",{active:i.pickerMonthRef==t}]),onClick:u(c=>l.handlerSelectMonth(t),["prevent","stop"])},h(t),11,H))),256))])):p("",!0),i.pickerMode=="year"?(n(),o("section",I,[r("span",{class:"year",onClick:e[5]||(e[5]=u(t=>i.pickerYearRef-=22,["prevent","stop"]))},"<<"),(n(!0),o(y,null,v(l.years,t=>(n(),o("span",{class:D(["year",{active:i.pickerYearRef==t}]),onClick:u(c=>l.handlerSelectYear(t),["prevent","stop"])},h(t),11,A))),256)),r("span",{class:"year",onClick:e[6]||(e[6]=u(t=>i.pickerYearRef+=22,["prevent","stop"]))},">>")])):p("",!0)]),r("div",{style:{"text-align":"center",cursor:"pointer"},onClick:e[7]||(e[7]=(...t)=>l.handlerClear&&l.handlerClear(...t))},e[15]||(e[15]=[r("i",{class:"icon-cancel-alt"},null,-1),k(" Supprimer la date ")]))],544),[[g,i.picker]])],32)}const ce=w(_,[["render",L]]);let M;const z={props:{url:{default:"/person?l=m&q="}},data(){return{persons:[],expression:"",loading:!1,selectedPerson:null,showSelector:!0,request:null,displayClosed:!1,highlightedIndex:null,noresult:!1,error:""}},computed:{optionsFiltered(){let s=[];return this.displayClosed?this.persons:(this.persons.forEach(e=>{e.closed||s.push(e)}),s)}},watch:{expression(s,e){console.log("Expression changed"),s.length>=2&&(M&&(console.log("Reset de la recherche"),clearTimeout(M)),M=setTimeout(()=>{console.log("Déclenchement de la recherche"),this.search(),clearTimeout(M)},500))}},methods:{search(){this.loading=!0,this.noresult=!1,R.get(this.url+this.expression+"&f=json",{before(s){this.request&&this.request.abort(),this.request=s}}).then(s=>{this.persons=s.data.datas,this.showSelector=!0,this.noresult=!this.persons||this.persons.length===0},s=>{this.persons=[],this.noresult=!1,s.status===403?this.error="403 Unauthorized":s.response.data?this.error="ERROR : "+s.response.data:s.body&&(this.error=s.body)}).then(s=>{this.loading=!1,this.request=null})},handlerSelectPerson(s){let e=this.persons.find(d=>d.id==s);console.log("handlerSelectPerson",e),this.selectedPerson=e,this.showSelector=!1,this.expression="",this.$emit("change",e),this.$emit("personSelected",e)}}},J={class:"oscar-selector"},B={class:"input-group",style:{position:"relative"}},W={key:0,class:"displayed-value text-danger",style:{}},j={key:1,class:"displayed-value",style:{}},G={class:"input-group-addon"},K={class:"icon-spinner animate-spin"},Q={class:"icon-user"},X={class:"icon-user-times"},Z={class:"options"},$={for:"hidder"},ee=["onMouseover","onClick","id"],te={class:"option-title"},se={style:{display:"inline-block",width:"50px",height:"50px"}},re=["src","alt"],le={class:"displayname",style:{"font-weight":"700","font-size":"1.1em","padding-left":"0"}},ie={key:0,style:{"font-weight":"100","font-size":".9em"}},ae={class:"option-infos"},ne={key:0};function oe(s,e,d,m,i,l){return n(),o("div",J,[r("div",B,[i.error?(n(),o("div",W,[e[4]||(e[4]=r("i",{class:"icon-attention-1"},null,-1)),k(" "+h(i.error)+" ",1),r("i",{onClick:e[0]||(e[0]=t=>i.error=""),class:"icon-cancel-circled-outline button-cancel-value"})])):p("",!0),s.displayValue?(n(),o("div",j,[k(h(s.selectedLabel)+" ",1),s.selectedValue?(n(),o("i",{key:0,onClick:e[1]||(e[1]=(...t)=>s.handlerUnselect&&s.handlerUnselect(...t)),class:"icon-cancel-circled-outline button-cancel-value"})):p("",!0)])):p("",!0),r("span",G,[f(r("i",K,null,512),[[g,i.loading]]),f(r("i",Q,null,512),[[g,!i.loading&&i.noresult==!1]]),f(r("i",X,null,512),[[g,i.noresult]])]),f(r("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=t=>i.expression=t),placeholder:"Rechercher une personne...",class:"form-control"},null,512),[[Y,i.expression]])]),f(r("div",Z,[r("header",null,[k(" Résultat(s) : "+h(i.persons.length)+" / ",1),r("label",$,[e[5]||(e[5]=k(" Afficher les comptes expirés ")),f(r("input",{type:"checkbox",id:"hidder",value:"on","onUpdate:modelValue":e[3]||(e[3]=t=>i.displayClosed=t)},null,512),[[C,i.displayClosed]])])]),(n(!0),o(y,null,v(l.optionsFiltered,(t,c)=>(n(),o("div",{class:D(["option",{active:c==i.highlightedIndex,selected:t.id==s.selectedValue,closed:t.closed}]),onMouseover:V=>i.highlightedIndex=c,onClick:u(V=>l.handlerSelectPerson(t.id),["prevent","stop"]),id:"item_"+c},[r("div",te,[r("span",se,[r("img",{src:"https://www.gravatar.com/avatar/"+t.mailMd5+"?s=50",alt:t.displayname,style:{width:"100%"}},null,8,re)]),r("strong",le,[k(h(t.displayname)+" ",1),t.email?(n(),o("em",ie," ("+h(t.email)+")",1)):p("",!0)])]),r("div",ae,[r("span",null,[e[6]||(e[6]=r("i",{class:"icon-location"},null,-1)),k(" "+h(t.affectation)+" ",1),t.ucbnSiteLocalisation?(n(),o("span",ne," ~ "+h(t.ucbnSiteLocalisation),1)):p("",!0)])])],42,ee))),256))],512),[[g,i.showSelector&&i.persons.length]])])}const ue=w(z,[["render",oe]]);export{ce as D,ue as P}; +import{q as a,o as n,c as o,d as r,w as f,v as V,u as _,h as u,t as c,F as y,k as v,g as p,n as M,a as k,s as w,f as R}from"./vendor.js";import{_ as Y}from"./vendor7.js";a.locale("fr");const C={model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{default:null},i18n:{default:"fr"},limitFrom:{default:null},daysShort:{default:()=>["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"]},months:{default:()=>["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Décembre"]},valueFormat:{default:"YYYY-MM-DD"},displayFormat:{default:"D MMMM YYYY"},format:{default:"dddd D MMMM YYYY"}},data(){return{picker:!1,pickerMode:"day",pickerDayRef:a().format(),pickerYearRef:a().format("YYYY"),pickerMonthRef:a().month(),realValue:this.modelValue,manualChange:""}},computed:{years(){let s=this.pickerYearRef-11,t=this.pickerYearRef+11,d=[];for(var m=s;ml.handlerShow&&l.handlerShow(...e)),onMouseleave:t[10]||(t[10]=(...e)=>l.handlerHide&&l.handlerHide(...e))},[r("div",b,[f(r("input",{type:"text",class:"form-control","onUpdate:modelValue":t[0]||(t[0]=e=>l.renderValue=e)},null,512),[[V,l.renderValue]]),x]),f(r("div",{class:"datepicker-selector",onMouseleave:t[8]||(t[8]=(...e)=>l.handlerHide&&l.handlerHide(...e))},[r("div",S,[r("header",null,[r("nav",null,[r("span",{href:"#",onClick:t[1]||(t[1]=u((...e)=>l.pickerPrevMonth&&l.pickerPrevMonth(...e),["stop","prevent"]))},F),r("strong",O,[r("span",{class:"currentMonth",onClick:t[2]||(t[2]=u((...e)=>l.handlerPickerMonth&&l.handlerPickerMonth(...e),["stop"]))},c(l.currentMonth),1),r("span",{class:"currentYear",onClick:t[3]||(t[3]=u((...e)=>l.handlerPickerYear&&l.handlerPickerYear(...e),["stop"]))},c(l.currentYear),1)]),r("span",{href:"#",onClick:t[4]||(t[4]=u((...e)=>l.pickerNextMonth&&l.pickerNextMonth(...e),["stop"]))},N)]),i.pickerMode=="day"?(n(),o("div",T,[U,(n(!0),o(y,null,v(l.pickerData.dayslabels,e=>(n(),o("span",E,c(e),1))),256))])):p("",!0)]),i.pickerMode=="day"?(n(),o("section",H,[(n(!0),o(y,null,v(l.pickerData.weeks,e=>(n(),o("div",I,[r("span",A,[r("span",L,c(e.num),1),(n(!0),o(y,null,v(e.days,h=>(n(),o("span",{class:M(["week-day",{active:h.active,disabled:!h.enabled}]),onClick:u(D=>l.changeDate(h.date),["prevent","stop"])},c(h.day),11,z))),256))])]))),256))])):p("",!0),i.pickerMode=="month"?(n(),o("section",J,[(n(!0),o(y,null,v(d.months,e=>(n(),o("span",{class:M(["month",{active:i.pickerMonthRef==e}]),onClick:u(h=>l.handlerSelectMonth(e),["prevent","stop"])},c(e),11,B))),256))])):p("",!0),i.pickerMode=="year"?(n(),o("section",W,[r("span",{class:"year",onClick:t[5]||(t[5]=u(e=>i.pickerYearRef-=22,["prevent","stop"]))},"<<"),(n(!0),o(y,null,v(l.years,e=>(n(),o("span",{class:M(["year",{active:i.pickerYearRef==e}]),onClick:u(h=>l.handlerSelectYear(e),["prevent","stop"])},c(e),11,j))),256)),r("span",{class:"year",onClick:t[6]||(t[6]=u(e=>i.pickerYearRef+=22,["prevent","stop"]))},">>")])):p("",!0)]),r("div",{style:{"text-align":"center",cursor:"pointer"},onClick:t[7]||(t[7]=(...e)=>l.handlerClear&&l.handlerClear(...e))},[G,k(" Supprimer la date ")])],544),[[_,i.picker]])],32)}const ge=Y(C,[["render",K]]);let g;const Q={props:{url:{default:"/person?l=m&q="}},data(){return{persons:[],expression:"",loading:!1,selectedPerson:null,showSelector:!0,request:null,displayClosed:!1,highlightedIndex:null,noresult:!1,error:""}},computed:{optionsFiltered(){let s=[];return this.displayClosed?this.persons:(this.persons.forEach(t=>{t.closed||s.push(t)}),s)}},watch:{expression(s,t){console.log("Expression changed"),s.length>=2&&(g&&(console.log("Reset de la recherche"),clearTimeout(g)),g=setTimeout(()=>{console.log("Déclenchement de la recherche"),this.search(),clearTimeout(g)},500))}},methods:{search(){this.loading=!0,this.noresult=!1,w.get(this.url+this.expression+"&f=json",{before(s){this.request&&this.request.abort(),this.request=s}}).then(s=>{this.persons=s.data.datas,this.showSelector=!0,this.noresult=!this.persons||this.persons.length===0},s=>{this.persons=[],this.noresult=!1,s.status===403?this.error="403 Unauthorized":s.response.data?this.error="ERROR : "+s.response.data:s.body&&(this.error=s.body)}).then(s=>{this.loading=!1,this.request=null})},handlerSelectPerson(s){let t=this.persons.find(d=>d.id==s);console.log("handlerSelectPerson",t),this.selectedPerson=t,this.showSelector=!1,this.expression="",this.$emit("change",t),this.$emit("personSelected",t)}}},X={class:"oscar-selector"},Z={class:"input-group",style:{position:"relative"}},$={key:0,class:"displayed-value text-danger",style:{}},ee=r("i",{class:"icon-attention-1"},null,-1),te={key:1,class:"displayed-value",style:{}},se={class:"input-group-addon"},re={class:"icon-spinner animate-spin"},le={class:"icon-user"},ie={class:"icon-user-times"},ae={class:"options"},ne={for:"hidder"},oe=["onMouseover","onClick","id"],de={class:"option-title"},ce={style:{display:"inline-block",width:"50px",height:"50px"}},he=["src","alt"],ue={class:"displayname",style:{"font-weight":"700","font-size":"1.1em","padding-left":"0"}},pe={key:0,style:{"font-weight":"100","font-size":".9em"}},fe={class:"option-infos"},me=r("i",{class:"icon-location"},null,-1),ke={key:0};function ye(s,t,d,m,i,l){return n(),o("div",X,[r("div",Z,[i.error?(n(),o("div",$,[ee,k(" "+c(i.error)+" ",1),r("i",{onClick:t[0]||(t[0]=e=>i.error=""),class:"icon-cancel-circled-outline button-cancel-value"})])):p("",!0),s.displayValue?(n(),o("div",te,[k(c(s.selectedLabel)+" ",1),s.selectedValue?(n(),o("i",{key:0,onClick:t[1]||(t[1]=(...e)=>s.handlerUnselect&&s.handlerUnselect(...e)),class:"icon-cancel-circled-outline button-cancel-value"})):p("",!0)])):p("",!0),r("span",se,[f(r("i",re,null,512),[[_,i.loading]]),f(r("i",le,null,512),[[_,!i.loading&&i.noresult==!1]]),f(r("i",ie,null,512),[[_,i.noresult]])]),f(r("input",{type:"text","onUpdate:modelValue":t[2]||(t[2]=e=>i.expression=e),placeholder:"Rechercher une personne...",class:"form-control"},null,512),[[V,i.expression]])]),f(r("div",ae,[r("header",null,[k(" Résultat(s) : "+c(i.persons.length)+" / ",1),r("label",ne,[k(" Afficher les comptes expirés "),f(r("input",{type:"checkbox",id:"hidder",value:"on","onUpdate:modelValue":t[3]||(t[3]=e=>i.displayClosed=e)},null,512),[[R,i.displayClosed]])])]),(n(!0),o(y,null,v(l.optionsFiltered,(e,h)=>(n(),o("div",{class:M(["option",{active:h==i.highlightedIndex,selected:e.id==s.selectedValue,closed:e.closed}]),onMouseover:D=>i.highlightedIndex=h,onClick:u(D=>l.handlerSelectPerson(e.id),["prevent","stop"]),id:"item_"+h},[r("div",de,[r("span",ce,[r("img",{src:"https://www.gravatar.com/avatar/"+e.mailMd5+"?s=50",alt:e.displayname,style:{width:"100%"}},null,8,he)]),r("strong",ue,[k(c(e.displayname)+" ",1),e.email?(n(),o("em",pe," ("+c(e.email)+")",1)):p("",!0)])]),r("div",fe,[r("span",null,[me,k(" "+c(e.affectation)+" ",1),e.ucbnSiteLocalisation?(n(),o("span",ke," ~ "+c(e.ucbnSiteLocalisation),1)):p("",!0)])])],42,oe))),256))],512),[[_,i.showSelector&&i.persons.length]])])}const Me=Y(Q,[["render",ye]]);export{ge as D,Me as P}; diff --git a/public/js/oscar/vite/dist/vendor8.js b/public/js/oscar/vite/dist/vendor8.js index 85b611be3dd003148955ab84be2f99fb5fa225e1..7633b7cc8983fa26afe28d3ba315ba26c07e223e 100644 --- a/public/js/oscar/vite/dist/vendor8.js +++ b/public/js/oscar/vite/dist/vendor8.js @@ -1 +1 @@ -import{p as t}from"./vendor.js";import{A as o}from"./vendor14.js";import{g as a}from"./vendor16.js";t.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const d=function(e){e.hasOwnProperty("pendingBack")&&e.pendingBack===!0?a.commit("pendingFullScreen",!1):a.commit("pendingFullScreen",!0);let r="Chargement des données";e.hasOwnProperty("pendingMsg")&&(r=e.pendingMsg),a.commit("addPending",r)},g=function(e){let r="Chargement des données";e.hasOwnProperty("pendingMsg")&&(r=e.pendingMsg),a.commit("stopPending",r)},p={get:(e,r={})=>{d(r);let n=t.get(e);return n.catch(s=>{a.commit("addError",o.manageErrorResponse(s).message)}).finally(()=>{g(r)}),n},post:(e,r={},n={})=>{d(n);let s=t.post(e,r);return s.catch(m=>{a.commit("addError",o.manageErrorResponse(m).message)}).finally(()=>{g(n)}),s},put:(e,r={},n={})=>{d(n);let s=t.put(e,r);return s.catch(m=>{a.commit("addError",o.manageErrorResponse(m).message)}).finally(()=>{g(n)}),s},delete:(e,r={})=>{d(r);let n=t.delete(e);return n.catch(s=>{a.commit("addError",o.manageErrorResponse(s).message)}).finally(()=>{g(r)}),n},deleteParams:(e,r,n={})=>{d(n);let s=t.delete(e,{data:r,"Content-Type":"application/json"});return s.catch(m=>{a.commit("addError",o.manageErrorResponse(m).message)}).finally(()=>{g(n)}),s}};export{p as A}; +import{s as t}from"./vendor.js";import{A as o}from"./vendor14.js";import{g as a}from"./vendor16.js";t.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const d=function(e){e.hasOwnProperty("pendingBack")&&e.pendingBack===!0?a.commit("pendingFullScreen",!1):a.commit("pendingFullScreen",!0);let r="Chargement des données";e.hasOwnProperty("pendingMsg")&&(r=e.pendingMsg),a.commit("addPending",r)},g=function(e){let r="Chargement des données";e.hasOwnProperty("pendingMsg")&&(r=e.pendingMsg),a.commit("stopPending",r)},p={get:(e,r={})=>{d(r);let n=t.get(e);return n.catch(s=>{a.commit("addError",o.manageErrorResponse(s).message)}).finally(()=>{g(r)}),n},post:(e,r={},n={})=>{d(n);let s=t.post(e,r);return s.catch(m=>{a.commit("addError",o.manageErrorResponse(m).message)}).finally(()=>{g(n)}),s},put:(e,r={},n={})=>{d(n);let s=t.put(e,r);return s.catch(m=>{a.commit("addError",o.manageErrorResponse(m).message)}).finally(()=>{g(n)}),s},delete:(e,r={})=>{d(r);let n=t.delete(e);return n.catch(s=>{a.commit("addError",o.manageErrorResponse(s).message)}).finally(()=>{g(r)}),n},deleteParams:(e,r,n={})=>{d(n);let s=t.delete(e,{data:r,"Content-Type":"application/json"});return s.catch(m=>{a.commit("addError",o.manageErrorResponse(m).message)}).finally(()=>{g(n)}),s}};export{p as A}; diff --git a/public/js/oscar/vite/dist/vendor9.js b/public/js/oscar/vite/dist/vendor9.js index 32879c33944d511bdf1724d6ec2e0c68567786d5..980d995a7e2b29fa0d6f05470366c1fec6f424ce 100644 --- a/public/js/oscar/vite/dist/vendor9.js +++ b/public/js/oscar/vite/dist/vendor9.js @@ -1 +1 @@ -import{p as v,o as h,c as a,d as i,a as c,t as n,g as u,w as p,q as g,v as y,f as S,F as x,j as k,n as b,h as w}from"./vendor.js";import{_ as V}from"./vendor7.js";const C={props:{value:{default:null}},emits:["update:value"],components:{},data(){return{options:[],lastUpdatedSearch:0,delay:null,preloadedValue:!1,selectedValue:null,selectedLabel:"",displayClosed:!1,showSelector:!1,searchFor:"",latency:null,highlightedIndex:null,loading:!1,inside:!1,displayValue:!1,error:"",hideOff:!1}},computed:{filteredOptions(){let t=[];return this.displayClosed?this.options:(this.options.forEach(e=>{e.closed||t.push(e)}),t)},optionsFiltered(){if(this.hideOff)return this.options;{let t=[];return this.options.forEach(e=>{e.closed||t.push(e)}),t}}},mounted(){document.addEventListener("click",this.handlerGlobalClick,!0),this.value},methods:{handlerGlobalClick(t){this.inside?(this.displayValue=!1,this.showSelector=!0):(this.showSelector=!1,this.displayValue=!0)},handlerMouseLeave(){this.inside=!1},handlerMouseEnter(){this.inside=!0},handlerClick(t){this.displayValue=!1},handlerUnselect(){this.selectedValue=null,this.selectedLabel="",this.showSelector=!1,this.displayValue=!1,this.$emit("change",null),this.$emit("update:value",null),this.$emit("input",null)},handlerSelectIndex(t){this.options.forEach(e=>{e.id==t&&(this.selectedValue=e.id,this.selectedLabel=e.label,this.showSelector=!1,this.displayValue=!0)}),this.$emit("change",{id:this.selectedValue,label:this.selectedLabel}),this.$emit("update:value",this.selectedValue),this.$emit("input",this.selectedValue)},handlerSelectPrev(t=!1){if(this.highlightedIndex==0&&(this.showSelector=!1),this.highlightedIndex>0&&(this.showSelector||(this.showSelector=!0),this.highlightedIndex--),t==!0){let e="#item_"+this.highlightedIndex,r=this.$el.querySelector(e),d=this.$el.querySelectorAll(".options")[0];d.scrollTop=r.offsetTop,console.log("SCROLL",d.scrollTop),console.log("ITEM",e,r)}},handlerSelectNext(t=!1){if(this.showSelector?this.highlightedIndex1&&this.handlerChange()}},handlerChange(t){this.latency!=null&&clearTimeout(this.latency);let e=(function(){this.search(),clearTimeout(this.latency)}).bind(this);this.latency=setTimeout(e,1e3)},search(){this.loading=!0,this.showSelector=!1,v.get("/organization?f=json&l=m&q="+encodeURI(this.searchFor)).then(t=>{this.options=t.data.datas,this.options.length>0&&(this.highlightedIndex=0,this.showSelector=!0)},t=>{switch(console.log(t),t.status){case 401:case 403:this.error="Vous avez été déconnecté (actualisé votre page pour vous reconnecter)";break;case 500:this.error="La recherche a provoqué une erreur";break;default:this.error="Un problème inconnu est survenu"}}).then(t=>{this.loading=!1})},setSelected(t){console.log("setSelected",t),this.value=t,this.$emit("change",this.value),this.$emit("input",this.value)},handlerSearchOrganisation(t,e){if(t.length){e(!0);let r=(function(){this.searchOrganization(e,t,this),this.delay=null}).bind(this);this.delay!=null&&clearTimeout(this.delay),this.delay=setTimeout(r,1e3)}}}},I={class:"input-group",style:{position:"relative"}},_={key:0,class:"displayed-value text-danger",style:{}},L={key:1,class:"displayed-value",style:{}},M={class:"input-group-addon"},T={class:"icon-spinner animate-spin"},F={class:"icon-building-filled"},U={class:"options"},E={for:"hidder"},O=["onMouseover","onClick","id"],A={class:"option-title"},q={class:"cartouche code"},z={class:"fullname"},R={key:0},D={key:0,class:"option-infos"};function N(t,e,r,d,s,o){return h(),a("div",{class:"oscar-selector organization-selector",onClick:e[5]||(e[5]=(...l)=>o.handlerClick&&o.handlerClick(...l)),onMouseleave:e[6]||(e[6]=(...l)=>o.handlerMouseLeave&&o.handlerMouseLeave(...l)),onMouseenter:e[7]||(e[7]=(...l)=>o.handlerMouseEnter&&o.handlerMouseEnter(...l))},[i("div",I,[s.error?(h(),a("div",_,[e[8]||(e[8]=i("i",{class:"icon-attention-1"},null,-1)),c(" "+n(s.error)+" ",1),i("i",{onClick:e[0]||(e[0]=l=>s.error=""),class:"icon-cancel-circled-outline button-cancel-value"})])):u("",!0),s.displayValue?(h(),a("div",L,[c(n(s.selectedLabel)+" ",1),s.selectedValue?(h(),a("i",{key:0,onClick:e[1]||(e[1]=(...l)=>o.handlerUnselect&&o.handlerUnselect(...l)),class:"icon-cancel-circled-outline button-cancel-value"})):u("",!0)])):u("",!0),i("span",M,[p(i("i",T,null,512),[[g,s.loading]]),p(i("i",F,null,512),[[g,!s.loading]])]),p(i("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=l=>s.searchFor=l),onKeyup:e[3]||(e[3]=(...l)=>o.handlerKeyUp&&o.handlerKeyUp(...l)),placeholder:"Rechercher une organisation...",class:"form-control"},null,544),[[y,s.searchFor]])]),p(i("div",U,[i("header",null,[c(" Résultat(s) : "+n(s.options.length)+" / ",1),i("label",E,[e[9]||(e[9]=c(" Afficher les structures fermées ")),p(i("input",{type:"checkbox",id:"hidder",value:"on","onUpdate:modelValue":e[4]||(e[4]=l=>s.hideOff=l)},null,512),[[S,s.hideOff]])])]),(h(!0),a(x,null,k(o.optionsFiltered,(l,f)=>(h(),a("div",{class:b(["option",{active:f==s.highlightedIndex,selected:l.id==s.selectedValue,closed:l.closed}]),onMouseover:m=>s.highlightedIndex=f,onClick:w(m=>o.handlerSelectIndex(l.id),["prevent","stop"]),id:"item_"+f},[i("div",A,[i("em",q,n(l.code),1),i("span",z,[i("strong",null,n(l.shortname),1),i("em",null,n(l.longname),1)]),l.type?(h(),a("span",R," ("+n(l.type)+") ",1)):u("",!0)]),l.city||l.country?(h(),a("div",D,[i("small",null,[e[10]||(e[10]=i("i",{class:"icon-location"},null,-1)),c(" "+n(l.city)+" - "+n(l.country),1)])])):u("",!0)],42,O))),256))],512),[[g,s.showSelector&&s.options.length]])],32)}const j=V(C,[["render",N]]);export{j as O}; +import{s as v,o as h,c as a,d as i,a as c,t as n,g as u,w as p,u as g,v as y,f as S,F as _,k as x,n as k,h as b}from"./vendor.js";import{_ as w}from"./vendor7.js";const V={props:{value:{default:null}},emits:["update:value"],components:{},data(){return{options:[],lastUpdatedSearch:0,delay:null,preloadedValue:!1,selectedValue:null,selectedLabel:"",displayClosed:!1,showSelector:!1,searchFor:"",latency:null,highlightedIndex:null,loading:!1,inside:!1,displayValue:!1,error:"",hideOff:!1}},computed:{filteredOptions(){let t=[];return this.displayClosed?this.options:(this.options.forEach(e=>{e.closed||t.push(e)}),t)},optionsFiltered(){if(this.hideOff)return this.options;{let t=[];return this.options.forEach(e=>{e.closed||t.push(e)}),t}}},mounted(){document.addEventListener("click",this.handlerGlobalClick,!0),this.value},methods:{handlerGlobalClick(t){this.inside?(this.displayValue=!1,this.showSelector=!0):(this.showSelector=!1,this.displayValue=!0)},handlerMouseLeave(){this.inside=!1},handlerMouseEnter(){this.inside=!0},handlerClick(t){this.displayValue=!1},handlerUnselect(){this.selectedValue=null,this.selectedLabel="",this.showSelector=!1,this.displayValue=!1,this.$emit("change",null),this.$emit("update:value",null),this.$emit("input",null)},handlerSelectIndex(t){this.options.forEach(e=>{e.id==t&&(this.selectedValue=e.id,this.selectedLabel=e.label,this.showSelector=!1,this.displayValue=!0)}),this.$emit("change",{id:this.selectedValue,label:this.selectedLabel}),this.$emit("update:value",this.selectedValue),this.$emit("input",this.selectedValue)},handlerSelectPrev(t=!1){if(this.highlightedIndex==0&&(this.showSelector=!1),this.highlightedIndex>0&&(this.showSelector||(this.showSelector=!0),this.highlightedIndex--),t==!0){let e="#item_"+this.highlightedIndex,r=this.$el.querySelector(e),d=this.$el.querySelectorAll(".options")[0];d.scrollTop=r.offsetTop,console.log("SCROLL",d.scrollTop),console.log("ITEM",e,r)}},handlerSelectNext(t=!1){if(this.showSelector?this.highlightedIndex1&&this.handlerChange()}},handlerChange(t){this.latency!=null&&clearTimeout(this.latency);let e=function(){this.search(),clearTimeout(this.latency)}.bind(this);this.latency=setTimeout(e,1e3)},search(){this.loading=!0,this.showSelector=!1,v.get("/organization?f=json&l=m&q="+encodeURI(this.searchFor)).then(t=>{this.options=t.data.datas,this.options.length>0&&(this.highlightedIndex=0,this.showSelector=!0)},t=>{switch(console.log(t),t.status){case 401:case 403:this.error="Vous avez été déconnecté (actualisé votre page pour vous reconnecter)";break;case 500:this.error="La recherche a provoqué une erreur";break;default:this.error="Un problème inconnu est survenu"}}).then(t=>{this.loading=!1})},setSelected(t){console.log("setSelected",t),this.value=t,this.$emit("change",this.value),this.$emit("input",this.value)},handlerSearchOrganisation(t,e){if(t.length){e(!0);let r=function(){this.searchOrganization(e,t,this),this.delay=null}.bind(this);this.delay!=null&&clearTimeout(this.delay),this.delay=setTimeout(r,1e3)}}}},C={class:"input-group",style:{position:"relative"}},I={key:0,class:"displayed-value text-danger",style:{}},L=i("i",{class:"icon-attention-1"},null,-1),M={key:1,class:"displayed-value",style:{}},T={class:"input-group-addon"},F={class:"icon-spinner animate-spin"},U={class:"icon-building-filled"},E={class:"options"},O={for:"hidder"},A=["onMouseover","onClick","id"],q={class:"option-title"},z={class:"cartouche code"},R={class:"fullname"},D={key:0},N={key:0,class:"option-infos"},K=i("i",{class:"icon-location"},null,-1);function B(t,e,r,d,s,o){return h(),a("div",{class:"oscar-selector organization-selector",onClick:e[5]||(e[5]=(...l)=>o.handlerClick&&o.handlerClick(...l)),onMouseleave:e[6]||(e[6]=(...l)=>o.handlerMouseLeave&&o.handlerMouseLeave(...l)),onMouseenter:e[7]||(e[7]=(...l)=>o.handlerMouseEnter&&o.handlerMouseEnter(...l))},[i("div",C,[s.error?(h(),a("div",I,[L,c(" "+n(s.error)+" ",1),i("i",{onClick:e[0]||(e[0]=l=>s.error=""),class:"icon-cancel-circled-outline button-cancel-value"})])):u("",!0),s.displayValue?(h(),a("div",M,[c(n(s.selectedLabel)+" ",1),s.selectedValue?(h(),a("i",{key:0,onClick:e[1]||(e[1]=(...l)=>o.handlerUnselect&&o.handlerUnselect(...l)),class:"icon-cancel-circled-outline button-cancel-value"})):u("",!0)])):u("",!0),i("span",T,[p(i("i",F,null,512),[[g,s.loading]]),p(i("i",U,null,512),[[g,!s.loading]])]),p(i("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=l=>s.searchFor=l),onKeyup:e[3]||(e[3]=(...l)=>o.handlerKeyUp&&o.handlerKeyUp(...l)),placeholder:"Rechercher une organisation...",class:"form-control"},null,544),[[y,s.searchFor]])]),p(i("div",E,[i("header",null,[c(" Résultat(s) : "+n(s.options.length)+" / ",1),i("label",O,[c(" Afficher les structures fermées "),p(i("input",{type:"checkbox",id:"hidder",value:"on","onUpdate:modelValue":e[4]||(e[4]=l=>s.hideOff=l)},null,512),[[S,s.hideOff]])])]),(h(!0),a(_,null,x(o.optionsFiltered,(l,f)=>(h(),a("div",{class:k(["option",{active:f==s.highlightedIndex,selected:l.id==s.selectedValue,closed:l.closed}]),onMouseover:m=>s.highlightedIndex=f,onClick:b(m=>o.handlerSelectIndex(l.id),["prevent","stop"]),id:"item_"+f},[i("div",q,[i("em",z,n(l.code),1),i("span",R,[i("strong",null,n(l.shortname),1),i("em",null,n(l.longname),1)]),l.type?(h(),a("span",D," ("+n(l.type)+") ",1)):u("",!0)]),l.city||l.country?(h(),a("div",N,[i("small",null,[K,c(" "+n(l.city)+" - "+n(l.country),1)])])):u("",!0)],42,A))),256))],512),[[g,s.showSelector&&s.options.length]])],32)}const j=w(V,[["render",B]]);export{j as O}; diff --git a/ui/src/ActivityPcruInformations.js b/ui/src/ActivityPcruInformations.js new file mode 100644 index 0000000000000000000000000000000000000000..5bdf723116516b92fcbeacf5ecc04538cf75e684 --- /dev/null +++ b/ui/src/ActivityPcruInformations.js @@ -0,0 +1,15 @@ +import { createApp } from 'vue' +import ActivityPcruInformations from './views/ActivityPcruInformations.vue' + +// éléments dans le DOM +let elemId = '#activity-pcru-informations'; +let elemDatas = document.querySelector(elemId); + +// Création de l'App +const app = createApp(ActivityPcruInformations, { + "url-activity": elemDatas.dataset.urlActivity, + "url-pcru-api": elemDatas.dataset.urlPcruApi, +}); + +// Affichage de l'app +app.mount(elemId); diff --git a/ui/src/PcruTransmissions.js b/ui/src/PcruTransmissions.js new file mode 100644 index 0000000000000000000000000000000000000000..ee3f6d0185e77ba2ea1988c331bab69a956d6ea9 --- /dev/null +++ b/ui/src/PcruTransmissions.js @@ -0,0 +1,14 @@ +import { createApp } from 'vue' +import PcruTransmissions from './views/PcruTransmissions.vue' + +// éléments dans le DOM +let elemId = '#pcru-transmissions'; +let elemDatas = document.querySelector(elemId); + +// Création de l'App +const app = createApp(PcruTransmissions, { + "url-pcru-api": elemDatas.dataset.urlPcruApi, +}); + +// Affichage de l'app +app.mount(elemId); diff --git a/ui/src/views/ActivityPcruInformations.vue b/ui/src/views/ActivityPcruInformations.vue new file mode 100644 index 0000000000000000000000000000000000000000..aa68916a3fc80c33b119f7dcf4903232a925eed4 --- /dev/null +++ b/ui/src/views/ActivityPcruInformations.vue @@ -0,0 +1,1917 @@ + + + + \ No newline at end of file diff --git a/ui/src/views/PcruTransmissions.vue b/ui/src/views/PcruTransmissions.vue new file mode 100644 index 0000000000000000000000000000000000000000..f098a5473d17881ebdc04ef27975b49ae9058594 --- /dev/null +++ b/ui/src/views/PcruTransmissions.vue @@ -0,0 +1,217 @@ + + + + \ No newline at end of file diff --git a/ui/vite.config.js b/ui/vite.config.js index f62a91328e0bef7a07a741c2ad38ca3137c43d24..ed1939aff79055896f3c6c003f323692d79f5bad 100644 --- a/ui/vite.config.js +++ b/ui/vite.config.js @@ -52,6 +52,7 @@ export default defineConfig({ activitymotscles: resolve(__dirname, 'src/ActivityMotsCles.js'), activitymotsclesadmin: resolve(__dirname, 'src/ActivityMotsClesAdmin.js'), activitynotes: resolve(__dirname, 'src/ActivityNotes.js'), + activitypcruinformations: resolve(__dirname, 'src/ActivityPcruInformations.js'), activityspentdetails: resolve(__dirname, 'src/ActivitySpentDetails.js'), activityspentsynthesis: resolve(__dirname, 'src/ActivitySpentSynthesis.js'), admintypedocument: resolve(__dirname, 'src/AdminTypeDocument.js'), @@ -66,6 +67,7 @@ export default defineConfig({ organizationsuborganizations: resolve(__dirname, 'src/OrganizationSubOrganizations.js'), organizations_roled: resolve(__dirname, 'src/EntityWithRoleOrganizations.js'), oscarcss: resolve(__dirname, 'src/oscar-css.js'), + pcrutransmissions: resolve(__dirname, 'src/PcruTransmissions.js'), ProjectActivityLogs: resolve(__dirname, 'src/ProjectActivityLogs.js'), ProjectActivitySpentSynthesis: resolve(__dirname, 'src/ProjectActivitySpentSynthesis.js'), timesheetpersonresume: resolve(__dirname, 'src/TimesheetPersonResume.js'),