chore: add AGPL3-or-later license

This CL adds the AGPL3-or-later license for all public code.

It also adds some configuration so we can use headroom to automatically
generate the license headers.

GitOrigin-RevId: 634827ab248c207e6841dbad29f59aeadcbef541
diff --git a/src/js/calendar.js b/src/js/calendar.js
index 920bf98..d34a7ce 100644
--- a/src/js/calendar.js
+++ b/src/js/calendar.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 document.addEventListener("DOMContentLoaded", _ => {
   document.querySelectorAll("select").forEach(el => {
     el.addEventListener("change", _ => {
diff --git a/src/js/categories.js b/src/js/categories.js
index 412f585..f7f621e 100644
--- a/src/js/categories.js
+++ b/src/js/categories.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addcategory").addEventListener("click", function() {
     document.querySelector("#addcategory").showModal();
diff --git a/src/js/common.js b/src/js/common.js
index 445016e..dd433bf 100644
--- a/src/js/common.js
+++ b/src/js/common.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 /**
   * Functions hasClass(), addClass() and removeClass() developed by Jake Trent (http://jaketrent.com/post/addremove-classes-raw-javascript/)
   */
diff --git a/src/js/common_webauthn.js b/src/js/common_webauthn.js
index fa95364..07d42ff 100644
--- a/src/js/common_webauthn.js
+++ b/src/js/common_webauthn.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 /**
  * convert RFC 1342-like base64 strings to array buffer
  * @param {mixed} obj
diff --git a/src/js/companies.js b/src/js/companies.js
index aa8d9dd..b9e1bb8 100644
--- a/src/js/companies.js
+++ b/src/js/companies.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addcompany").addEventListener("click", function() {
     document.querySelector("#addcompany").showModal();
diff --git a/src/js/export.js b/src/js/export.js
index 9bdbbbe..85f52a4 100644
--- a/src/js/export.js
+++ b/src/js/export.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 function toggleTr(tr, show) {
   var checkbox = tr.querySelector("label").MaterialCheckbox;
   if (show) {
diff --git a/src/js/incidents.js b/src/js/incidents.js
index 0397cac..03121f8 100644
--- a/src/js/incidents.js
+++ b/src/js/incidents.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 function getFormData() {
   var incidents = [];
 
diff --git a/src/js/incidentsgeneric.js b/src/js/incidentsgeneric.js
index 5d1323f..56af82c 100644
--- a/src/js/incidentsgeneric.js
+++ b/src/js/incidentsgeneric.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
 
   document.querySelectorAll(".custom-actions-btn").forEach(el => {
diff --git a/src/js/incidenttypes.js b/src/js/incidenttypes.js
index 48e8ae4..96083db 100644
--- a/src/js/incidenttypes.js
+++ b/src/js/incidenttypes.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addincident").addEventListener("click", function() {
     document.querySelector("#addincident").showModal();
diff --git a/src/js/index.js b/src/js/index.js
index 8af86b3..f6d29ec 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   if (document.querySelector("#recoverybtn")) {
     document.querySelector("#recoverybtn").addEventListener("click", function(e) {
diff --git a/src/js/invalidatebulkrecords.js b/src/js/invalidatebulkrecords.js
index cfbe2d5..5d84729 100644
--- a/src/js/invalidatebulkrecords.js
+++ b/src/js/invalidatebulkrecords.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelectorAll("tr[data-worker-id]").forEach(tr => {
     var checkbox = tr.querySelector("input[type=\"checkbox\"]");
diff --git a/src/js/registry.js b/src/js/registry.js
index 807c4fd..b88cce0 100644
--- a/src/js/registry.js
+++ b/src/js/registry.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", _ => {
   document.getElementById("showinvalidated").addEventListener("change", e => {
     document.getElementById("show-invalidated-form").submit();
diff --git a/src/js/schedule.js b/src/js/schedule.js
index d804872..bde5874 100644
--- a/src/js/schedule.js
+++ b/src/js/schedule.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addday").addEventListener("click", function() {
     document.querySelector("#addday").showModal();
diff --git a/src/js/scheduletemplates.js b/src/js/scheduletemplates.js
index a236064..76a927d 100644
--- a/src/js/scheduletemplates.js
+++ b/src/js/scheduletemplates.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addtemplate").addEventListener("click", function() {
     document.querySelector("#addtemplate").showModal();
diff --git a/src/js/secondfactor.js b/src/js/secondfactor.js
index f537146..81bf94b 100644
--- a/src/js/secondfactor.js
+++ b/src/js/secondfactor.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 function verify() {
   if (!document.getElementById("code").checkValidity()) {
     document.querySelector(".mdl-js-snackbar").MaterialSnackbar.showSnackbar({
diff --git a/src/js/securitykeys.js b/src/js/securitykeys.js
index 9f08e21..b835cb9 100644
--- a/src/js/securitykeys.js
+++ b/src/js/securitykeys.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addsecuritykey").addEventListener("click", function() {
     document.querySelector("#addsecuritykey").showModal();
diff --git a/src/js/sendbulkpasswords.js b/src/js/sendbulkpasswords.js
index bb6ac26..cc14ad7 100644
--- a/src/js/sendbulkpasswords.js
+++ b/src/js/sendbulkpasswords.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelectorAll("tr[data-person-id]").forEach(tr => {
     var checkbox = tr.querySelector("input[type=\"checkbox\"]");
diff --git a/src/js/userincidents.js b/src/js/userincidents.js
index 48e8ae4..96083db 100644
--- a/src/js/userincidents.js
+++ b/src/js/userincidents.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addincident").addEventListener("click", function() {
     document.querySelector("#addincident").showModal();
diff --git a/src/js/users.js b/src/js/users.js
index 9eb383e..a896763 100644
--- a/src/js/users.js
+++ b/src/js/users.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   var datatable = $('.datatable').DataTable({
     paging:   false,
diff --git a/src/js/userschedule.js b/src/js/userschedule.js
index 0fa39cb..782162e 100644
--- a/src/js/userschedule.js
+++ b/src/js/userschedule.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 window.addEventListener("load", function() {
   document.querySelector(".addschedule").addEventListener("click", function() {
     document.querySelector("#addschedule").showModal();
diff --git a/src/js/validations.js b/src/js/validations.js
index cecd3b7..781f814 100644
--- a/src/js/validations.js
+++ b/src/js/validations.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 function getFormData() {
   var data = {
     "incidents": [],
diff --git a/src/js/workers.js b/src/js/workers.js
index 88ac687..b60d6e0 100644
--- a/src/js/workers.js
+++ b/src/js/workers.js
@@ -1,3 +1,21 @@
+/* (license-header)
+ * hores
+ * Copyright (c) 2023 Adrià Vilanova Martínez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ */
 function getRawWorkers() {
   var parameters = [];
   document.querySelectorAll("tr[data-worker-id]").forEach(tr => {