diff --git a/.gitignore b/.gitignore
index 6419494bde598bed303c8f6d80dd0584d085b2cc..3aeb7b4cfdd3c03331af284813bfa9ac1dd5ad91 100755
--- a/.gitignore
+++ b/.gitignore
@@ -5,5 +5,6 @@ classes/
 .classpath
 .project
 .settings/
-
+*.iml
 /.idea/
+.vscode/settings.json
diff --git a/LICENSE.txt b/LICENSE.txt
index 98f5ab000c55833f24e593f2a8d5f3913aa64fc3..be3f7b28e564e7dd05eaf59d64adba1a4065ac0e 100755
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,69 +1,66 @@
-		NIBIO OPEN SOURCE LICENSE V.1.0 (2015)
-
-			PREAMBLE AND ADDITIONAL TERMS
-
-  The original licensor is the Norwegian Institute for Agricultural and 
-Environmental Research, registered in Norway with registration number 988 983 
-837, and business address NO-1430 ÅS, NORWAY, hereafter referred to as 
-"NIBIO". 
-
-  This NIBIO OPEN SOURCE LICENSE V.1.0 (2015), in short the NIBIO Open 
-Source License, is based on the GNU Affero General Public License, version 3.
-All of the terms and conditions of the GNU Affero General Public License, 
-version 3, have been set out below, save the below mentioned additional 
-prevailing terms that have priority over the terms otherwise identical to the 
-GNU Affero General Public License, version 3, and that Section 0 ("This 
-License" definition changed), 13 ("version 3 of the GNU General Public License" 
-replaced by "this License") and 14 ("The Free Software Foundation" replaced by 
-"NIBIO" and "GNU Affero General Public License" replaced by "License") have 
-been adjusted as a consequence of this.
-
-			ADDITONAL PREVAILING TERMS
-
-  (a) The NIBIO Open Source License regulates the NIBIO VIPS Platform 
-software, an Internet based system enabling prediction of infection risk of 
-plant diseases, pests and weeds. The NIBIO Open Source License DOES NOT 
-INCLUDE the specific forecasting models, neither their algorithms nor their 
-implementation to be used by the NIBIO VIPS Platform. You are free to 
-implement any other forecasting model to be used by the NIBIO VIPS Platform, 
-regardless of license terms at your own responsibility. 
-
-  (b) This license is governed by Norwegian law, as far as any party or third 
-party purports or sets forward any claim towards NIBIO. Any claims towards 
-NIBIO shall be solved by the exclusive venue of Oslo City Courts, Norway. 
-This paragraph is not applicable for claims only between any later parties to 
-this license. 
-
-  (c) By entering into this agreement you also agree to indemnify NIBIO and 
-its employees / consultants / board, for any claims of liability related to 
-this license set forward by yourself or any party deviating its rights from you. 
-
-  (d) You shall include the following in the start of each source file: 
-
-	Copyright (c) <year> <name of author> 
- 
-	This file is part of <application name>. <application name> is free 
-	software: you can redistribute it and/or modify it under the terms of 
-	the NIBIO Open Source License as published by NIBIO, either 
-	version 1 of the License, or (at your option) any later version.
-
-	<application name> 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
-	NIBIO Open Source License for more details.
-
-	You should have received a copy of the NIBIO Open Source License
-	along with <application name>.  If not, see 
-	<http://www.nibio.no/licenses/>.
-
-      It is also recommended that you add information on how to contact you by 
-      electronic and paper mail.
-
-			1. TERMS AND CONDITIONS
-
-  2. 0. Definitions.
-
-  "This License" refers to NIBIO Open Source License v.1.0 (2015). 
+                    GNU AFFERO GENERAL PUBLIC LICENSE
+                       Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+  A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate.  Many developers of free software are heartened and
+encouraged by the resulting cooperation.  However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+  The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community.  It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server.  Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+  An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals.  This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU Affero General Public License.
 
   "Copyright" also means copyright-like laws that apply to other kinds of
 works, such as semiconductor masks.
@@ -100,7 +97,7 @@ work under this License, and how to view a copy of this License.  If
 the interface presents a list of user commands or options, such as a
 menu, a prominent item in the list meets this criterion.
 
-  3. 1. Source Code.
+  1. Source Code.
 
   The "source code" for a work means the preferred form of the work
 for making modifications to it.  "Object code" means any non-source
@@ -142,7 +139,7 @@ Source.
   The Corresponding Source for a work in source code form is that
 same work.
 
-  4. 2. Basic Permissions.
+  2. Basic Permissions.
 
   All rights granted under this License are granted for the term of
 copyright on the Program, and are irrevocable provided the stated
@@ -167,7 +164,7 @@ your copyrighted material outside their relationship with you.
 the conditions stated below.  Sublicensing is not allowed; section 10
 makes it unnecessary.
 
-  5. 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
 
   No covered work shall be deemed part of an effective technological
 measure under any applicable law fulfilling obligations under article
@@ -183,7 +180,7 @@ modification of the work as a means of enforcing, against the work's
 users, your or third parties' legal rights to forbid circumvention of
 technological measures.
 
-  6. 4. Conveying Verbatim Copies.
+  4. Conveying Verbatim Copies.
 
   You may convey verbatim copies of the Program's source code as you
 receive it, in any medium, provided that you conspicuously and
@@ -196,7 +193,7 @@ recipients a copy of this License along with the Program.
   You may charge any price or no price for each copy that you convey,
 and you may offer support or warranty protection for a fee.
 
-  7. 5. Conveying Modified Source Versions.
+  5. Conveying Modified Source Versions.
 
   You may convey a work based on the Program, or the modifications to
 produce it from the Program, in the form of source code under the
@@ -233,7 +230,7 @@ beyond what the individual works permit.  Inclusion of a covered work
 in an aggregate does not cause this License to apply to the other
 parts of the aggregate.
 
-  8. 6. Conveying Non-Source Forms.
+  6. Conveying Non-Source Forms.
 
   You may convey a covered work in object code form under the terms
 of sections 4 and 5, provided that you also convey the
@@ -331,7 +328,7 @@ documented (and with an implementation available to the public in
 source code form), and must require no special password or key for
 unpacking, reading or copying.
 
-  9. 7. Additional Terms.
+  7. Additional Terms.
 
   "Additional permissions" are terms that supplement the terms of this
 License by making exceptions from one or more of its conditions.
@@ -395,7 +392,7 @@ where to find the applicable terms.
 form of a separately written license, or stated as exceptions;
 the above requirements apply either way.
 
-  10. 8. Termination.
+  8. Termination.
 
   You may not propagate or modify a covered work except as expressly
 provided under this License.  Any attempt otherwise to propagate or
@@ -423,7 +420,7 @@ this License.  If your rights have been terminated and not permanently
 reinstated, you do not qualify to receive new licenses for the same
 material under section 10.
 
-  11. 9. Acceptance Not Required for Having Copies.
+  9. Acceptance Not Required for Having Copies.
 
   You are not required to accept this License in order to receive or
 run a copy of the Program.  Ancillary propagation of a covered work
@@ -434,7 +431,7 @@ modify any covered work.  These actions infringe copyright if you do
 not accept this License.  Therefore, by modifying or propagating a
 covered work, you indicate your acceptance of this License to do so.
 
-  12. 10. Automatic Licensing of Downstream Recipients.
+  10. Automatic Licensing of Downstream Recipients.
 
   Each time you convey a covered work, the recipient automatically
 receives a license from the original licensors, to run, modify and
@@ -459,7 +456,7 @@ rights granted under this License, and you may not initiate litigation
 any patent claim is infringed by making, using, selling, offering for
 sale, or importing the Program or any portion of it.
 
-  13. 11. Patents.
+  11. Patents.
 
   A "contributor" is a copyright holder who authorizes use under this
 License of the Program or a work on which the Program is based.  The
@@ -528,7 +525,7 @@ or that patent license was granted, prior to 28 March 2007.
 any implied license or other defenses to infringement that may
 otherwise be available to you under applicable patent law.
 
-  14. 12. No Surrender of Others' Freedom.
+  12. No Surrender of Others' Freedom.
 
   If conditions are imposed on you (whether by court order, agreement or
 otherwise) that contradict the conditions of this License, they do not
@@ -540,7 +537,7 @@ to collect a royalty for further conveying from those to whom you convey
 the Program, the only way you could satisfy both those terms and this
 License would be to refrain entirely from conveying the Program.
 
-  15. 13. Remote Network Interaction; Use with the GNU General Public License.
+  13. Remote Network Interaction; Use with the GNU General Public License.
 
   Notwithstanding any other provision of this License, if you modify the
 Program, your modified version must prominently offer all users
@@ -549,8 +546,9 @@ supports such interaction) an opportunity to receive the Corresponding
 Source of your version by providing access to the Corresponding Source
 from a network server at no charge, through some standard or customary
 means of facilitating copying of software.  This Corresponding Source
-shall include the Corresponding Source for any work covered by This License 
-that is incorporated pursuant to the following paragraph.
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
 
   Notwithstanding any other provision of this License, you have
 permission to link or combine any covered work with a work licensed
@@ -560,30 +558,33 @@ License will continue to apply to the part which is the covered work,
 but the work with which it is combined will remain governed by version
 3 of the GNU General Public License.
 
-  16. 14. Revised Versions of this License.
+  14. Revised Versions of this License.
 
-  NIBIO may publish revised and/or new versions of the License from time to 
-time. Such new versions will be similar in spirit to the present version, but 
-may differ in detail to address new problems or concerns.
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time.  Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
 
   Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the License "or any later 
-version" applies to it, you have the option of following the terms and 
-conditions either of that numbered version or of any later version published by 
-NIBIO. If the Program does not specify a version number of the License, you 
-may choose any version ever published by the NIBIO.
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
 
   If the Program specifies that a proxy can decide which future
-versions of the License can be used, that proxy's public statement of 
-acceptance of a version permanently authorizes you to choose that version for 
-the Program.
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
 
   Later license versions may give you additional or different
 permissions.  However, no additional obligations are imposed on any
 author or copyright holder as a result of your choosing to follow a
 later version.
 
-  17. 15. Disclaimer of Warranty.
+  15. Disclaimer of Warranty.
 
   THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
 APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
@@ -594,7 +595,7 @@ PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
 IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
 ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 
-  18. 16. Limitation of Liability.
+  16. Limitation of Liability.
 
   IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
@@ -606,7 +607,7 @@ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
 EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
 SUCH DAMAGES.
 
-  19. 17. Interpretation of Sections 15 and 16.
+  17. Interpretation of Sections 15 and 16.
 
   If the disclaimer of warranty and limitation of liability provided
 above cannot be given local legal effect according to their terms,
@@ -616,3 +617,45 @@ Program, unless a warranty or assumption of liability accompanies a
 copy of the Program in return for a fee.
 
                      END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source.  For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code.  There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<https://www.gnu.org/licenses/>.
diff --git a/README.md b/README.md
index 3f32162d0087ef48563c769ab419a94bd103b457..bf966f0478811eb321e481c4f9fc16812d2d015e 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ VIPSLogic is a part of the [VIPS platform for automatic pest prediction](https:/
 * Java EE application server: Wildfly >= 25
 
 ## License
-VIPSLogic is licensed under the [NIBIO Open Source License](https://nibio.no/licenses), which is basically the [GNU Affero GPL v3 license](https://www.gnu.org/licenses/agpl-3.0.en.html).
+VIPSLogic is licensed under the [GNU Affero GPL v3 license](https://www.gnu.org/licenses/agpl-3.0.en.html).
 
 ## Web services
 The web services documentation is auto generated using Enunciate, you can read it from this path relative to your VIPSLogic deployment: `/public/RESTdocs/apidocs/`, for instance [here on NIBIO's deployment](https://logic.vips.nibio.no/public/RESTdocs/apidocs/)
diff --git a/pom.xml b/pom.xml
index 737e452782a9c263f9e08273b73465b67fe7c310..481a18f4c0a0909aac1f29afc41afb1d4138f062 100755
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     <groupId>no.nibio.vips.</groupId>
     <artifactId>VIPSLogic</artifactId>
     <packaging>war</packaging>
-    <version>2022.1</version>
+    <version>2023.1</version>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -217,7 +217,7 @@
         <dependency>
             <groupId>no.nibio.vips</groupId>
             <artifactId>VIPSCommon</artifactId>
-            <version>2022.1</version>
+            <version>2.0.1</version>
         </dependency>
         <dependency>
             <groupId>javax</groupId>
diff --git a/src/main/java/no/nibio/vips/logic/VIPSLogicApplication.java b/src/main/java/no/nibio/vips/logic/VIPSLogicApplication.java
index 856d321bedd68f7e36b34bb4ea1cccf77d4f4d8a..a2d59c2e342bea1b638b1cd3ef8fcb1c610369f3 100755
--- a/src/main/java/no/nibio/vips/logic/VIPSLogicApplication.java
+++ b/src/main/java/no/nibio/vips/logic/VIPSLogicApplication.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2021 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic;
@@ -63,59 +62,4 @@ public class VIPSLogicApplication extends Application
         //resources.add(no.nibio.vips.coremanager.service.ManagerResourceImpl.class);
     }
     
-    /**
-     * Do not modify addRestResourceClasses() method.
-     * It is automatically re-generated by NetBeans REST support to populate
-     * given list with all resources defined in the project.
-     */
-    private void addRestResourceClasses(Set<Class<?>> resources) {
-        resources.add(com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider.class);
-        resources.add(com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider.class);
-        resources.add(com.webcohesion.enunciate.rt.EnunciateJaxbContextResolver.class);
-        resources.add(no.nibio.vips.logic.messaging.sms.SMSHandlingService.class);
-        resources.add(no.nibio.vips.logic.modules.applefruitmoth.AppleFruitMothService.class);
-        resources.add(no.nibio.vips.logic.modules.barkbeetle.BarkbeetleService.class);
-        resources.add(no.nibio.vips.logic.modules.barleynetblotch.BarleyNetBlotchModelService.class);
-        resources.add(no.nibio.vips.logic.modules.roughage.RoughageService.class);
-        resources.add(no.nibio.vips.logic.service.AuthenticationService.class);
-        resources.add(no.nibio.vips.logic.service.JSONBConfig.class);
-        resources.add(no.nibio.vips.logic.service.JacksonConfig.class);
-        resources.add(no.nibio.vips.logic.service.LogicService.class);
-        resources.add(no.nibio.vips.logic.service.ModelFormService.class);
-        resources.add(no.nibio.vips.logic.service.ObservationService.class);
-        resources.add(no.nibio.vips.logic.service.POIService.class);
-        resources.add(no.nibio.vips.logic.service.VIPSMobileService.class);
-        resources.add(no.nibio.vips.observationdata.ObservationDataService.class);
-        resources.add(org.jboss.resteasy.core.AcceptHeaderByFileSuffixFilter.class);
-        resources.add(org.jboss.resteasy.core.AsynchronousDispatcher.class);
-        resources.add(org.jboss.resteasy.plugins.interceptors.AcceptEncodingGZIPFilter.class);
-        resources.add(org.jboss.resteasy.plugins.interceptors.GZIPDecodingInterceptor.class);
-        resources.add(org.jboss.resteasy.plugins.interceptors.GZIPEncodingInterceptor.class);
-        resources.add(org.jboss.resteasy.plugins.interceptors.MessageSanitizerContainerResponseFilter.class);
-        resources.add(org.jboss.resteasy.plugins.providers.AsyncStreamingOutputProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.ByteArrayProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.DataSourceProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.DefaultBooleanWriter.class);
-        resources.add(org.jboss.resteasy.plugins.providers.DefaultNumberWriter.class);
-        resources.add(org.jboss.resteasy.plugins.providers.DefaultTextPlain.class);
-        resources.add(org.jboss.resteasy.plugins.providers.DocumentProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.FileProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.FileRangeWriter.class);
-        resources.add(org.jboss.resteasy.plugins.providers.FormUrlEncodedProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.IIOImageProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.InputStreamProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.JaxrsFormProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.JaxrsServerFormUrlEncodedProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.MultiValuedParamConverterProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.ReaderProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.SourceProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.StreamingOutputProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.StringTextStar.class);
-        resources.add(org.jboss.resteasy.plugins.providers.jackson.Jackson2JsonpInterceptor.class);
-        resources.add(org.jboss.resteasy.plugins.providers.jackson.PatchMethodFilter.class);
-        resources.add(org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.jackson.UnrecognizedPropertyExceptionHandler.class);
-        resources.add(org.jboss.resteasy.plugins.providers.sse.SseEventProvider.class);
-        resources.add(org.jboss.resteasy.plugins.providers.sse.SseEventSinkInterceptor.class);
-    }
 }
\ No newline at end of file
diff --git a/src/main/java/no/nibio/vips/logic/authenticate/AuthenticationFilter.java b/src/main/java/no/nibio/vips/logic/authenticate/AuthenticationFilter.java
index aeb950d2fe7be972e35fd45bd259a3b3b7e7ac52..aee204c1c02e3a3362d02c81af8724b3db8d5346 100755
--- a/src/main/java/no/nibio/vips/logic/authenticate/AuthenticationFilter.java
+++ b/src/main/java/no/nibio/vips/logic/authenticate/AuthenticationFilter.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.authenticate;
diff --git a/src/main/java/no/nibio/vips/logic/authenticate/OpenIdAuthAttributes.java b/src/main/java/no/nibio/vips/logic/authenticate/OpenIdAuthAttributes.java
index 03f4b62fcc8fd4764cc25a7437a8badd5d7857fe..6c00ec58297f560304d263f9b4b4315ba718759a 100755
--- a/src/main/java/no/nibio/vips/logic/authenticate/OpenIdAuthAttributes.java
+++ b/src/main/java/no/nibio/vips/logic/authenticate/OpenIdAuthAttributes.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.authenticate;
diff --git a/src/main/java/no/nibio/vips/logic/authenticate/PasswordValidationException.java b/src/main/java/no/nibio/vips/logic/authenticate/PasswordValidationException.java
index 5e362818eb8f881e8d040855bb9c6dafe30e4fff..9992706f47b85979711331f6091c2383bd50b0a3 100755
--- a/src/main/java/no/nibio/vips/logic/authenticate/PasswordValidationException.java
+++ b/src/main/java/no/nibio/vips/logic/authenticate/PasswordValidationException.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.authenticate;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/CropCategoryController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/CropCategoryController.java
index f174c13ffff5e39037ab91896b55535c2ac420b1..4d72c996355221ddf90c948b321ad8f38882dab3 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/CropCategoryController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/CropCategoryController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/ForecastConfigurationController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/ForecastConfigurationController.java
index 412e4c542116705eef74a5c646cf1404fa425ce5..b7277f97d8fac27234bf423a10618e03372d33e9 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/ForecastConfigurationController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/ForecastConfigurationController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/FrontpageController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/FrontpageController.java
index e8227423e020fa937da24b07ec2c89662be388aa..a0dc38573b63d1aaa0ed40717c9a418a184a87a9 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/FrontpageController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/FrontpageController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/HttpErrorServlet.java b/src/main/java/no/nibio/vips/logic/controller/servlet/HttpErrorServlet.java
index 8fc80543ad2bf86191a8b77ea331b9948f905dfb..4c76f564dd8ba0594fa52830d332cd63c2c7326a 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/HttpErrorServlet.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/HttpErrorServlet.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/LoginController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/LoginController.java
index ef89b33385608638c4100df90deef47ab99d77a3..f1a606829d626c648e961c3e5bd5836148ff89dc 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/LoginController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/LoginController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/MessageController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/MessageController.java
index 5aefe7f7209efa0d039d80afcd8f1a21e9a0df19..d6e859052131dab0439e2e75330b1ab1aaa80596 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/MessageController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/MessageController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/NotificationSubscriptionController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/NotificationSubscriptionController.java
index 64a65fe4e44f3d8aafca28d41407b42eceb86efe..b93644d845a86efda90628d8f436161ee68a379c 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/NotificationSubscriptionController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/NotificationSubscriptionController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.controller.servlet;
 
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/ObservationController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/ObservationController.java
index 8cdcbb173bf377c4b2ebf367c4f67b7c07921a88..5c320adc975d2f694c00421c204795e95e8110af 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/ObservationController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/ObservationController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
@@ -464,6 +463,7 @@ public class ObservationController extends HttpServlet {
                                             null
                                             : formValidation.getFormField("observationData").getWebValue()
                             );
+                            observation.setIsPositive(formValidation.getFormField("isPositive").getWebValue() != null);
                             observation.setIsQuantified(formValidation.getFormField("isQuantified").getWebValue() != null);
                             this.setObservationLocationVisibility(observation, formValidation.getFormField("locationVisibility").getWebValue());
                             observation.setBroadcastMessage(formValidation.getFormField("broadcastMessage").getWebValue() != null);
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/OrganismController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/OrganismController.java
index 4fe1f614cbe676b64cde796709a16c2b94eafc11..19e14371f1544d3c213983aa81274681f9e97bd3 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/OrganismController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/OrganismController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationController.java
index d139855447a5e7fb2de7c8d0105ae684ca0d28be..b10c713a6ce7bf20ec28db65a7ac945cc21fe658 100644
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationGroupController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationGroupController.java
index cbca3e4299f56ef1b857f36f2ec646a952744919..113eca4917064c2b6646a0acd7a7687a3686a2c0 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationGroupController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/OrganizationGroupController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.controller.servlet;
 
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/PointOfInterestController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/PointOfInterestController.java
index 1f3d40265b414eeee17d2c58a322fa6986d8e3e5..9f2d923e257ecf34d61b674b402bedac9f633291 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/PointOfInterestController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/PointOfInterestController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/SchedulingController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/SchedulingController.java
index 9f64ce0df27e5be1b526a42702430ce99d78f5b6..24ee6bd18ac16259cc6cdeebf59b64879866be43 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/SchedulingController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/SchedulingController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
diff --git a/src/main/java/no/nibio/vips/logic/controller/servlet/UserController.java b/src/main/java/no/nibio/vips/logic/controller/servlet/UserController.java
index fc9eeadf2cf8afab4d028239aa44d5f699376b2d..7fd46c594c2039e42bd93b8683919e89f56bf0fa 100755
--- a/src/main/java/no/nibio/vips/logic/controller/servlet/UserController.java
+++ b/src/main/java/no/nibio/vips/logic/controller/servlet/UserController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.servlet;
@@ -102,6 +101,11 @@ public class UserController extends HttpServlet {
                     request.setAttribute("organizations", organizations);
                     request.setAttribute("vipsLogicRoles", em.createNamedQuery("VipsLogicRole.findAll").getResultList());
                 }
+                else if(user.isOrganizationAdmin())
+                {
+                    request.setAttribute("vipsLogicRoles", em.createNamedQuery("VipsLogicRole.findAll").getResultList());
+                    users = userBean.getUsers(user.getOrganizationId());
+                }
                 else
                 {
                     users = userBean.getUsers(user.getOrganizationId());
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/DeleteUserException.java b/src/main/java/no/nibio/vips/logic/controller/session/DeleteUserException.java
index 577971b60962eefc75a25085c7014e62e329299c..25ab08c78d581442b0e4877c2ce90319d1d7864f 100644
--- a/src/main/java/no/nibio/vips/logic/controller/session/DeleteUserException.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/DeleteUserException.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/ForecastBean.java b/src/main/java/no/nibio/vips/logic/controller/session/ForecastBean.java
index 215e081517f34d6719a09be7eb21d5b2fb62dfae..29ceb7b5d4261f8cd79492d20bd8c13c50f771bc 100755
--- a/src/main/java/no/nibio/vips/logic/controller/session/ForecastBean.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/ForecastBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
@@ -51,6 +50,7 @@ import javax.persistence.EntityManager;
 import javax.persistence.NoResultException;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
+import javax.ws.rs.ProcessingException;
 import javax.ws.rs.client.Client;
 import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
@@ -70,7 +70,9 @@ import no.nibio.vips.logic.entity.Organism;
 import no.nibio.vips.logic.entity.Organization;
 import no.nibio.vips.logic.entity.PointOfInterest;
 import no.nibio.vips.logic.entity.PointOfInterestWeatherStation;
+import no.nibio.vips.logic.entity.VipsCoreInstance;
 import no.nibio.vips.logic.entity.VipsLogicUser;
+import no.nibio.vips.logic.scheduling.TaskResult;
 import no.nibio.vips.logic.scheduling.model.ModelRunPreprocessor;
 import no.nibio.vips.logic.scheduling.model.ModelRunPreprocessorFactory;
 import no.nibio.vips.logic.scheduling.model.PreprocessorException;
@@ -81,6 +83,7 @@ import no.nibio.vips.util.WeatherUtil;
 import no.nibio.web.forms.FormField;
 import org.apache.commons.lang.StringUtils;
 import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
+import org.slf4j.LoggerFactory;
 
 /**
  * @copyright 2013-2022 <a href="http://www.nibio.no/">NIBIO</a>
@@ -89,6 +92,8 @@ import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
 @Stateless
 public class ForecastBean {
 
+    private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ForecastBean.class);
+
     @PersistenceContext(unitName="VIPSLogic-PU")
     EntityManager em;
     
@@ -463,61 +468,84 @@ public class ForecastBean {
      * Requests all info about models currently available in VIPSCoreManager
      * Stores in local db for easy access. 
      */
-    public void updateModelInformation()
+    public TaskResult updateModelInformation()
     {
-    	
-	    	Client client = ClientBuilder.newClient();
-	        WebTarget target = client.target(System.getProperty("no.nibio.vips.logic.VIPSCOREMANAGER_URL"));
-	        ResteasyWebTarget rTarget = (ResteasyWebTarget) target;
-	        ManagerResource resource = rTarget.proxy(ManagerResource.class);
-            // Get all model Ids from Core Manager
-            Response resp = resource.printModelListJSON();
-            
-            for(JsonNode modelIdItem: resp.readEntity(JsonNode.class).findValues("modelId"))
-            {
-            	
-                String modelId = modelIdItem.asText();
-                
-                
-                // We get the corresponding modelInformation entry 
-                ModelInformation modelInformation = em.find(ModelInformation.class, modelId);
-                if(modelInformation == null)
-                {
-                    modelInformation = new ModelInformation(modelId);
-                    em.persist(modelInformation);
-                    modelInformation.setDateFirstRegistered(new Date());
+        TaskResult taskResult = new TaskResult();
+        String jobReport = "";
+    	// Iterate all the VIPSCore instances
+        List<VipsCoreInstance> vipsCoreInstances = em.createNamedQuery("VipsCoreInstance.findAll").getResultList();
+        Integer instancesCompleted = 0;
+        for(VipsCoreInstance vipsCoreInstance:vipsCoreInstances) {
+            LOGGER.debug("Attempting to connect to " + vipsCoreInstance.getUri() );
+            try {
+                Client client = ClientBuilder.newClient();
+                WebTarget target = client.target(vipsCoreInstance.getUri());
+                ResteasyWebTarget rTarget = (ResteasyWebTarget) target;
+                ManagerResource resource = rTarget.proxy(ManagerResource.class);
+
+                // Get all model Ids from Core Manager
+                Response resp = resource.printModelListJSON();
+                LOGGER.debug(vipsCoreInstance.getUri() + " returned status code " + String.valueOf(resp.getStatus()));
+                if(resp.getStatus() != 200) {
+                    jobReport += vipsCoreInstance.getUri() + " returned status code " + String.valueOf(resp.getStatus()) + "\n";
+                    continue;
                 }
-                
-                // Retrieve and store information
-                
-                Response r = resource.printModelName(modelId);
-                modelInformation.setDefaultName(r.readEntity(String.class));
-                //r.close();
-                
-                r = resource.printModelDescription(modelId);
-                modelInformation.setDefaultDescription(r.readEntity(String.class));
-                //r.close();
-                
-                r = resource.printModelLicense(modelId);
-                modelInformation.setLicense(r.readEntity(String.class));
-                //r.close();
-                
-                r = resource.printModelCopyright(modelId);
-                modelInformation.setCopyrightHolder(r.readEntity(String.class));
-                //r.close();
-                
-                r = resource.printModelUsage(modelId);
-                modelInformation.setUsage(r.readEntity(String.class));
-                //r.close();
-                
-                r = resource.printModelSampleConfig(modelId);
-                modelInformation.setSampleConfig(r.readEntity(String.class));
-                //r.close();
-                
-                modelInformation.setDateLastRegistered(new Date());
+
+                for (JsonNode modelIdItem : resp.readEntity(JsonNode.class).findValues("modelId")) {
+
+                    String modelId = modelIdItem.asText();
+
+
+                    // We get the corresponding modelInformation entry
+                    ModelInformation modelInformation = em.find(ModelInformation.class, modelId);
+                    if (modelInformation == null) {
+                        modelInformation = new ModelInformation(modelId);
+                        em.persist(modelInformation);
+                        modelInformation.setDateFirstRegistered(new Date());
+                    }
+
+                    modelInformation.setVipsCoreInstanceId(vipsCoreInstance);
+
+                    // Retrieve and store information
+                    Response r = resource.printModelName(modelId);
+                    modelInformation.setDefaultName(r.readEntity(String.class));
+                    //r.close();
+
+                    r = resource.printModelDescription(modelId);
+                    modelInformation.setDefaultDescription(r.readEntity(String.class));
+                    //r.close();
+
+                    r = resource.printModelLicense(modelId);
+                    modelInformation.setLicense(r.readEntity(String.class));
+                    //r.close();
+
+                    r = resource.printModelCopyright(modelId);
+                    modelInformation.setCopyrightHolder(r.readEntity(String.class));
+                    //r.close();
+
+                    r = resource.printModelUsage(modelId);
+                    modelInformation.setUsage(r.readEntity(String.class));
+                    //r.close();
+
+                    r = resource.printModelSampleConfig(modelId);
+                    modelInformation.setSampleConfig(r.readEntity(String.class));
+                    //r.close();
+
+                    modelInformation.setDateLastRegistered(new Date());
+                }
+                resp.close();
+                client.close();
+                instancesCompleted++;
             }
-            resp.close();
-            client.close();
+            catch(ProcessingException ex)
+            {
+                jobReport += ex.getMessage() + "\n";
+            }
+
+        }
+        taskResult.setCompleteness(instancesCompleted / Double.valueOf(vipsCoreInstances.size()));
+        taskResult.setMessage(jobReport);
+        return taskResult;
     }
     
     /**
@@ -672,10 +700,16 @@ public class ForecastBean {
                 ModelConfiguration config = preprocessor.getModelConfiguration(forecastConfiguration);
                 ModelRunRequest request = new ModelRunRequest(config);
                 Map<String,String> loginInfo = new HashMap<>();
+
                 // VIPSLogic logs in on behalf of client
-                loginInfo.put("username",System.getProperty("no.nibio.vips.logic.CORE_BATCH_USERNAME"));
+                ModelInformation modelInformation = em.find(ModelInformation.class, config.getModelId());
+                if(modelInformation.getVipsCoreInstanceId() == null)
+                {
+                    throw new RunModelException("ERROR: Model " + modelInformation.getDefaultName() + "(" + config.getModelId() + ") is not connected to a VIPSCoreInstance. Please check your server configuration.");
+                }
+                loginInfo.put("username",modelInformation.getVipsCoreInstanceId().getUsername());
                 //loginInfo.put("username","wrongusername");
-                loginInfo.put("password",System.getProperty("no.nibio.vips.logic.CORE_BATCH_PASSWORD"));
+                loginInfo.put("password",modelInformation.getVipsCoreInstanceId().getPassword());
                 request.setLoginInfo(loginInfo);
                 // We tell which client this is (the db Id in VIPSCoreManager)
                 Integer VIPSCoreUserId = forecastConfiguration.getVipsLogicUserId().getVipsCoreUserIdWithFallback();
@@ -700,7 +734,8 @@ public class ForecastBean {
                 {
                     ex.printStackTrace();
                 }*/
-                    Response resp = this.getManagerResource().runModel(config.getModelId(), request);         
+
+                    Response resp = this.getManagerResource(modelInformation).runModel(config.getModelId(), request);
                     if(resp.getStatus() == Response.Status.OK.getStatusCode())
                     {
                         //System.out.println(resp.readEntity(String.class));
@@ -724,17 +759,22 @@ public class ForecastBean {
     
     public List<Result> runForecast(ModelConfiguration config, Integer VIPSCoreUserId) throws RunModelException
     {
+        ModelInformation modelInformation = em.find(ModelInformation.class, config.getModelId());
+        if(modelInformation.getVipsCoreInstanceId() == null)
+        {
+            throw new RunModelException("ERROR: Model " + modelInformation.getDefaultName() + "(" + config.getModelId() + ") is not connected to a VIPSCoreInstance. Please check your server configuration.");
+        }
         ModelRunRequest request = new ModelRunRequest(config);
         Map<String,String> loginInfo = new HashMap<>();
         // VIPSLogic logs in on behalf of client
-        loginInfo.put("username",System.getProperty("no.nibio.vips.logic.CORE_BATCH_USERNAME"));
+        loginInfo.put("username",modelInformation.getVipsCoreInstanceId().getUsername());
         //loginInfo.put("username","wrongusername");
-        loginInfo.put("password",System.getProperty("no.nibio.vips.logic.CORE_BATCH_PASSWORD"));
+        loginInfo.put("password",modelInformation.getVipsCoreInstanceId().getPassword());
         request.setLoginInfo(loginInfo);
         //System.out.println("VIPSCoreUserId = " + VIPSCoreUserId + ", name=" + forecastConfiguration.getVipsLogicUserId().getLastName());
         request.setVipsCoreUserId(VIPSCoreUserId);
         //System.out.println("RunModel for wsId" + forecastConfiguration.getWeatherStationPointOfInterestId());
-        Response resp = this.getManagerResource().runModel(config.getModelId(), request);
+        Response resp = this.getManagerResource(modelInformation).runModel(config.getModelId(), request);
 
         if(resp.getStatus() == Response.Status.OK.getStatusCode())
         {
@@ -751,10 +791,10 @@ public class ForecastBean {
      * Get the interface for REST resources in VIPSCoreManager
      * @return 
      */
-    private ManagerResource getManagerResource()
+    private ManagerResource getManagerResource(ModelInformation modelInformation)
     {
         Client client = ClientBuilder.newClient();
-        WebTarget target = client.target(System.getProperty("no.nibio.vips.logic.VIPSCOREMANAGER_URL"));
+        WebTarget target = client.target(modelInformation.getVipsCoreInstanceId().getUri());
         ResteasyWebTarget rTarget = (ResteasyWebTarget) target;
         ManagerResource resource = rTarget.proxy(ManagerResource.class);
         return resource;
@@ -763,7 +803,8 @@ public class ForecastBean {
     public Kml getForecastsAggregateKml(List<Integer> organizationIds, List<Integer> cropOrganismIds, Date theDate, String serverName, VipsLogicUser user)
     {
         //String iconPath = Globals.PROTOCOL + "://" + serverName + "/public/images/";
-        String iconPath = "//" + serverName + "/public/images/";
+        //String iconPath = "//" + serverName + "/public/images/";
+        String iconPath = "https://logic.vips.nibio.no/public/images/";
         // Initialization
         final Vec2 hotspot = new Vec2()
                 .withX(0.5)
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/MessageBean.java b/src/main/java/no/nibio/vips/logic/controller/session/MessageBean.java
index e0d0800173f8dfffbc0c6c336a0a1cbb571e25a2..13d140ac2a770c3c9a7ccfda9554d8fae5e39402 100755
--- a/src/main/java/no/nibio/vips/logic/controller/session/MessageBean.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/MessageBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/ObservationBean.java b/src/main/java/no/nibio/vips/logic/controller/session/ObservationBean.java
index e7ce0624bced40467c825a8a46d9bb18c2a2642b..212388ab9961fb819023385ac5fe2c9c947a4953 100755
--- a/src/main/java/no/nibio/vips/logic/controller/session/ObservationBean.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/ObservationBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
@@ -69,6 +68,8 @@ import no.nibio.vips.observationdata.ObservationDataSchema;
 import no.nibio.vips.observationdata.ObservationDataSchemaPK;
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.io.FilenameUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.wololo.geojson.Feature;
 import org.wololo.geojson.FeatureCollection;
 import org.wololo.geojson.GeoJSONFactory;
@@ -86,6 +87,8 @@ public class ObservationBean {
     PointOfInterestBean pointOfInterestBean;
     @EJB
     UserBean userBean;
+
+    private static Logger LOGGER = LoggerFactory.getLogger(ObservationBean.class);
     
     public List<Observation> getObservations(Integer organizationId)
     {
@@ -606,7 +609,8 @@ public class ObservationBean {
             Integer cropId, 
             List<Integer> cropCategoryId,
             Date from, 
-            Date to
+            Date to,
+            Boolean isPositive
     ) 
     {
         // The minimum SQL
@@ -651,17 +655,24 @@ public class ObservationBean {
             sql += "AND time_of_observation <= :to \n";
             parameters.put("to", to);
         }
-        
+        // Filter for positive/negative registrations
+        if(isPositive != null)
+        {
+            sql += "AND is_positive = :isPositive \n";
+            parameters.put("isPositive", isPositive);
+        }
+
+        LOGGER.debug(sql);
+
         Query q = em.createNativeQuery(sql, Observation.class);
         // Setting the parameters one by one
         parameters.keySet().stream().forEach(
-                (key)->q.setParameter(key, parameters.get(key))
+                (key)->{LOGGER.debug(key + ": " + parameters.get(key)); q.setParameter(key, parameters.get(key));}
         );
         
         //Date start = new Date();
         
         List<Observation> observations = q.getResultList();
-        
         //System.out.println("Finding obs took " + (new Date().getTime() - start.getTime()) + " milliseconds");
         
         //start = new Date();
@@ -681,6 +692,7 @@ public class ObservationBean {
             retVal = this.getObservationsWithLocations(retVal);
             //System.out.println("Finding locations took " + (new Date().getTime() - start.getTime()) + " milliseconds");
         }
+
         
         return retVal;
         
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/OrganismBean.java b/src/main/java/no/nibio/vips/logic/controller/session/OrganismBean.java
index 886761316db735e3af9520ff53fa780b75a59429..44146a190e1048a5eadcc27359b160b088788fb6 100755
--- a/src/main/java/no/nibio/vips/logic/controller/session/OrganismBean.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/OrganismBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/PointOfInterestBean.java b/src/main/java/no/nibio/vips/logic/controller/session/PointOfInterestBean.java
index 6f624f3d3ffd31bb475e6266867d26b4fc55e238..7c82e925fe6a7c595ecd996b5fbbcab09b7f0182 100755
--- a/src/main/java/no/nibio/vips/logic/controller/session/PointOfInterestBean.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/PointOfInterestBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
@@ -29,6 +28,7 @@ import de.micromata.opengis.kml.v_2_2_0.Placemark;
 import de.micromata.opengis.kml.v_2_2_0.Point;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.ResourceBundle;
 import java.util.Set;
@@ -40,6 +40,7 @@ import javax.persistence.EntityManager;
 import javax.persistence.NoResultException;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
+import no.nibio.vips.gis.GISUtil;
 import no.nibio.vips.logic.entity.ExternalResource;
 import no.nibio.vips.logic.entity.ExternalResourceType;
 import no.nibio.vips.logic.entity.Organization;
@@ -52,6 +53,11 @@ import no.nibio.vips.logic.entity.VipsLogicUser;
 import no.nibio.vips.logic.entity.WeatherStationDataSource;
 import no.nibio.vips.logic.util.GISEntityUtil;
 import no.nibio.vips.logic.util.Globals;
+import org.wololo.geojson.Feature;
+import org.wololo.geojson.FeatureCollection;
+import org.wololo.geojson.GeoJSON;
+import org.wololo.geojson.GeoJSONFactory;
+import org.wololo.jts2geojson.GeoJSONWriter;
 
 
 /**
@@ -348,6 +354,59 @@ public class PointOfInterestBean {
                 .setParameter("organizationId", organization)
                 .getResultList();
     }
+    
+    /**
+     * Fetch all pois for one organization, filtered by poi types
+     * @param organization the organization in question
+     * @param pointOfInterestTypes only return pois of these types
+     * @return all pois for one organization, filtered by poi types
+     */
+    public List<PointOfInterest> getPoisForOrganizationAndOfTypes(Organization organization, List<Integer> pointOfInterestTypes)
+    {
+        return em.createNamedQuery("PointOfInterest.findByOrganizationIdAndPoiTypes")
+                .setParameter("organizationId", organization)
+                .setParameter("pointOfInterestTypes", pointOfInterestTypes)
+                .getResultList();
+    }
+    
+    /**
+     * Convert list of POIs into GeoJson
+     * @param pois
+     * @return 
+     */
+    public GeoJSON getPoisAsGeoJson(List<PointOfInterest> pois)
+    {
+        List<Feature> features = pois.stream()
+                .map(poi-> this.getPoiGeoJsonFeature(poi))
+                .collect(Collectors.toList());
+        GeoJSONWriter writer = new GeoJSONWriter();
+        return writer.write(features); 
+    }
+    
+    /**
+     * Best effort attempt to return the GIS info for this POI as a GeoJSON Feature
+     * @param poi
+     * @return 
+     */
+    public Feature getPoiGeoJsonFeature(PointOfInterest poi)
+    {
+        if(poi.getGisGeom() != null || (poi.getLongitude() != null &&  poi.getLatitude() != null))
+        {
+            GISUtil gisUtil = new GISUtil();
+            if(poi.getGisGeom() != null)
+            {
+                
+                return gisUtil.getGeoJSONFeatureFromGeometry(poi.getGisGeom(), poi.getProperties());
+            }
+            // Else: Create Point
+            else if(poi.getLongitude() != null &&  poi.getLatitude() != null)
+            {
+                org.locationtech.jts.geom.Point p = gisUtil.createPointWGS84(poi.getLongitude(), poi.getLatitude());
+                return gisUtil.getGeoJSONFeatureFromGeometry(p, poi.getProperties());
+            }
+        }
+        return null;        
+    }
 
     public PointOfInterest storePoi(PointOfInterest poi) {
         if(poi.getPointOfInterestId() == null)
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java b/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java
index a0131b2d665cc0e8f31df57fbe4b6786e9dfaceb..5778f6c8ddb90ffeda30c8bfa10ac8563bb7e939 100755
--- a/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/SessionControllerGetter.java b/src/main/java/no/nibio/vips/logic/controller/session/SessionControllerGetter.java
index b4a483cd168ae10d4ac31656ede4a38af3eec238..600e163fe2d7527463ea8d087b13d60328a27142 100644
--- a/src/main/java/no/nibio/vips/logic/controller/session/SessionControllerGetter.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/SessionControllerGetter.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
@@ -35,7 +34,7 @@ public class SessionControllerGetter {
     
 	// This obviously has to be changed when changing the application name in Maven
 	// TODO: Refactor out to System properties (e.g. in standalone.xml in JBoss/WildFly)
-    public static final String JNDI_PATH = "java:global/VIPSLogic-2022.1/";
+    public static final String JNDI_PATH = "java:global/VIPSLogic-2023.1/";
 
     public static SchedulingBean getSchedulingBean()
     {
diff --git a/src/main/java/no/nibio/vips/logic/controller/session/UserBean.java b/src/main/java/no/nibio/vips/logic/controller/session/UserBean.java
index 557e418a5c40f96b798ad03198ca6f41c5eefe47..c6f0a121acff084defa5cad061119032c1ee3910 100755
--- a/src/main/java/no/nibio/vips/logic/controller/session/UserBean.java
+++ b/src/main/java/no/nibio/vips/logic/controller/session/UserBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.controller.session;
@@ -25,6 +24,7 @@ import com.ibm.icu.util.ULocale;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.math.BigInteger;
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -44,31 +44,14 @@ import java.util.logging.Logger;
 import javax.ejb.EJB;
 import javax.ejb.LocalBean;
 import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.NoResultException;
-import javax.persistence.NonUniqueResultException;
-import javax.persistence.PersistenceContext;
-import javax.persistence.Query;
+import javax.persistence.*;
 import javax.servlet.http.HttpServletRequest;
 import javax.validation.ConstraintViolation;
 import javax.validation.ConstraintViolationException;
 import javax.ws.rs.core.HttpHeaders;
 
 import no.nibio.vips.logic.authenticate.PasswordValidationException;
-import no.nibio.vips.logic.entity.Country;
-import no.nibio.vips.logic.entity.ForecastConfiguration;
-import no.nibio.vips.logic.entity.MapLayer;
-import no.nibio.vips.logic.entity.MessageLocale;
-import no.nibio.vips.logic.entity.Observation;
-import no.nibio.vips.logic.entity.Organization;
-import no.nibio.vips.logic.entity.OrganizationGroup;
-import no.nibio.vips.logic.entity.PointOfInterest;
-import no.nibio.vips.logic.entity.UserAuthentication;
-import no.nibio.vips.logic.entity.UserAuthenticationPK;
-import no.nibio.vips.logic.entity.UserAuthenticationType;
-import no.nibio.vips.logic.entity.UserUuid;
-import no.nibio.vips.logic.entity.UserUuidPK;
-import no.nibio.vips.logic.entity.VipsLogicUser;
+import no.nibio.vips.logic.entity.*;
 import no.nibio.vips.logic.entity.misc.UserResources;
 import no.nibio.vips.logic.i18n.SessionLocaleUtil;
 import no.nibio.vips.logic.messaging.MessagingBean;
@@ -89,6 +72,7 @@ import org.passay.PropertiesMessageResolver;
 import org.passay.Rule;
 import org.passay.RuleResult;
 import org.passay.WhitespaceRule;
+import org.postgresql.util.PSQLException;
 
 /**
  * Handles user stuff, credentials
@@ -143,6 +127,10 @@ public class UserBean {
             return null;
         }
     }
+
+    public VipsLogicRole getVipsLogicRole(Integer vipsLogicRoleId){
+        return em.find(VipsLogicRole.class, vipsLogicRoleId);
+    }
     
     /**
      * Gets a user with get given userName and type of authentication
@@ -152,12 +140,6 @@ public class UserBean {
      */
     public VipsLogicUser getUser(String username, Integer userAuthenticationTypeId)
     {
-        // If type of authentication is PASSWORD, we return nothing
-        if(userAuthenticationTypeId.equals(UserAuthenticationType.TYPE_PASSWORD))
-        {
-            return null;
-        }
-        
         // We find the authentication with given name
         Query q = em.createNamedQuery("UserAuthentication.findByUsername");
         q.setParameter("username", username);
@@ -172,6 +154,11 @@ public class UserBean {
         }
         return null;
     }
+
+    public UserAuthenticationType createUserAuthenticationTypeInstance(Integer userAuthenticationTypeId)
+    {
+        return em.find(UserAuthenticationType.class, userAuthenticationTypeId);
+    }
     
     public VipsLogicUser storeUserFirstTime(VipsLogicUser user,UserAuthentication auth) throws FormValidationException
     {
@@ -259,7 +246,9 @@ public class UserBean {
         UserResources retVal = new UserResources();
         retVal.setPois(pointOfInterestBean.getPoisForUser(user));
         retVal.setMessageLocales(messageBean.getMessageLocaleList(user));
-        retVal.setForecastConfigurations(forecastBean.getForecastConfigurationsForUser(user.getUserId()));
+        List<ForecastConfiguration> forecastConfigurations = forecastBean.getForecastConfigurationsForUser(user.getUserId());
+        forecastConfigurations.addAll(forecastBean.getPrivateForecastConfigurationsForUser(user.getUserId()));
+        retVal.setForecastConfigurations(forecastConfigurations);
         List<Observation> observations = observationBean.getObservationsForUser(user);
         observations.addAll(observationBean.getObservationsLastEditedByUser(user));
         observations.addAll(observationBean.getObservationsStatusChangedByUser(user));
@@ -308,6 +297,95 @@ public class UserBean {
         });
         
     }
+
+    /**
+     * Brute force removal of all data stored by the user - if possible!
+     * Resources used by other users are transfered to the organization's archive user
+     * @param user
+     */
+    public void deleteUserResources(VipsLogicUser user) throws DeleteUserException{
+        UserResources userResources = this.getUserResources(user);
+        VipsLogicUser archiveUser = user.getOrganizationId().getArchiveUser();
+
+        // Forecast configurations
+        Query deleteForecastResultCache = em.createNativeQuery("DELETE FROM public.forecast_result_cache WHERE forecast_configuration_id=:forecastConfigurationId");
+        Query deleteForecastResult = em.createNativeQuery("DELETE FROM public.forecast_result WHERE forecast_configuration_id=:forecastConfigurationId");
+        Query deleteForecastSummary = em.createNativeQuery("DELETE FROM public.forecast_summary WHERE forecast_configuration_id=:forecastConfigurationId");
+        for(ForecastConfiguration forecastConfiguration:userResources.getForecastConfigurations())
+        {
+            // Delete:
+            // Results, including cached results
+            deleteForecastResult.setParameter("forecastConfigurationId", forecastConfiguration.getForecastConfigurationId()).executeUpdate();
+            deleteForecastResultCache.setParameter("forecastConfigurationId", forecastConfiguration.getForecastConfigurationId()).executeUpdate();
+
+            // Summaries
+            deleteForecastSummary.setParameter("forecastConfigurationId", forecastConfiguration.getForecastConfigurationId()).executeUpdate();
+
+            // Configurations
+            em.remove(forecastConfiguration);
+
+        }
+
+        // Observations
+        List<Observation> transferObservations = new ArrayList<>();
+        if(userResources.getObservations() != null)
+        {
+            for(Observation obs:userResources.getObservations())
+            {
+                // Delete the observations made by the user
+                if(obs.getUserId().equals(user.getUserId()))
+                {
+                    em.remove(obs);
+                }
+                else
+                {
+                    // Transfer edit history for 3rd party observations to archive user
+                    transferObservations.add(obs);
+                }
+            }
+        }
+
+        // Delete POI only if no 3rd parties have used it for placing observations
+        List<PointOfInterest> undeleteablePOIs = new ArrayList<>();
+        Query countObservationsQ = em.createNativeQuery("SELECT count(*) FROM public.observation WHERE location_point_of_interest_id=:pointOfInterestId");
+        if(userResources.getPois() != null)
+        {
+            for(PointOfInterest poi:userResources.getPois())
+            {
+                countObservationsQ.setParameter("pointOfInterestId", poi.getPointOfInterestId());
+                Integer r = ((BigInteger) countObservationsQ.getSingleResult()).intValue();
+                if(r == 0)
+                {
+                    em.remove(poi);
+                }
+                else
+                {
+                    undeleteablePOIs.add(poi);
+                }
+            }
+        }
+
+        // Transfer the POI and observation leftovers IF we have an archive user. Otherwise: Throw error!
+        if(undeleteablePOIs.size() + transferObservations.size() > 0 && archiveUser == null)
+        {
+            throw new DeleteUserException("The user's organization " + user.getOrganizationId().getOrganizationName() + " has no archive user. Can't transfer resources created by the user that are used by others.");
+        }
+        for(PointOfInterest poi:undeleteablePOIs)
+        {
+            poi.setUser(archiveUser);
+        }
+        for(Observation obs: transferObservations)
+        {
+            obs.setStatusChangedByUserId(archiveUser.getUserId());
+            obs.setLastEditedBy(archiveUser.getUserId());
+        }
+
+        // Messages
+        for(MessageLocale ml:userResources.getMessageLocales())
+        {
+            em.remove(ml);
+        }
+    }
     
     /**
      * 
@@ -563,20 +641,20 @@ public class UserBean {
      */
     public void informAdminOfConfirmedEmail(VipsLogicUser confirmUser, ResourceBundle i18nBundle, String serverName ) {
         List<VipsLogicUser> organizationAdmins = this.findOrganizationUsersByRole(confirmUser.getOrganizationId(), Globals.ROLE_ORGANIZATION_ADMINISTRATOR);
+        String subject = i18nBundle.getString("informAdminOfConfirmedEmailSubject");
+        String body = MessageFormat.format(i18nBundle.getString("informAdminOfConfirmedEmailBody"), 
+                            confirmUser.getLastName(),
+                            confirmUser.getApprovalApplication(),
+                            Globals.PROTOCOL + "://" + serverName + "/user?action=viewUser&userId=" + confirmUser.getUserId(),
+                            Globals.PROTOCOL + "://" + serverName + "/user?action=approveUser&userId=" + confirmUser.getUserId()
+                        );
+
+        //System.out.println(body);
+        // Send email
+        String smtpServer = System.getProperty("no.nibio.vips.logic.SMTP_SERVER");
+        SimpleMailSender mailSender = new SimpleMailSender(smtpServer);
         for(VipsLogicUser organizationAdmin: organizationAdmins)
         {
-            String subject = i18nBundle.getString("informAdminOfConfirmedEmailSubject");
-            String body = MessageFormat.format(i18nBundle.getString("informAdminOfConfirmedEmailBody"), 
-                                confirmUser.getLastName(),
-                                confirmUser.getApprovalApplication(),
-                                Globals.PROTOCOL + "://" + serverName + "/user?action=viewUser&userId=" + confirmUser.getUserId(),
-                                Globals.PROTOCOL + "://" + serverName + "/user?action=approveUser&userId=" + confirmUser.getUserId()
-                            );
-            
-            //System.out.println(body);
-            // Send email
-            String smtpServer = System.getProperty("no.nibio.vips.logic.SMTP_SERVER");
-            SimpleMailSender mailSender = new SimpleMailSender(smtpServer);
             mailSender.sendMail("noreply@" + serverName, organizationAdmin.getEmail(), subject, body);
         }
     }
diff --git a/src/main/java/no/nibio/vips/logic/entity/Country.java b/src/main/java/no/nibio/vips/logic/entity/Country.java
index e4aec6817584eeadaf6bf08a2c691af8fcce6b83..1f68fc8ffd8dc130d6d6cc8fe2d24b1f94c788f3 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Country.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Country.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/CropCategory.java b/src/main/java/no/nibio/vips/logic/entity/CropCategory.java
index b4c31d5a166d4b07fee65dd2b3f724bbba09db74..43cc458731c8f1194194a494ec5fe27b2659be7b 100755
--- a/src/main/java/no/nibio/vips/logic/entity/CropCategory.java
+++ b/src/main/java/no/nibio/vips/logic/entity/CropCategory.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocal.java b/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocal.java
index 32fe771bfdd21aaae601684f14820e219585cb66..7521198053302f0fdb327db9f995ff76301a040f 100755
--- a/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocal.java
+++ b/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocal.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocalPK.java b/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocalPK.java
index e4c8aa4fb0fdd7d6937f711ea09684b2f03fbbf0..b8e75cd1eae04abe22a37f976b0d0c7f7e63392e 100755
--- a/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocalPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/CropCategoryLocalPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/CropPest.java b/src/main/java/no/nibio/vips/logic/entity/CropPest.java
index c8250cdd1b3b4eec9e248140bd2229209c2b3d92..0443494be304d26850ffadbd74bc9e4a32503eb2 100755
--- a/src/main/java/no/nibio/vips/logic/entity/CropPest.java
+++ b/src/main/java/no/nibio/vips/logic/entity/CropPest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/Currency.java b/src/main/java/no/nibio/vips/logic/entity/Currency.java
index 3a685a00913deba226f2a789005497143319acd2..5b2e74be654b9b884db8b714083be023fc5fa868 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Currency.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Currency.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/DbUpdate.java b/src/main/java/no/nibio/vips/logic/entity/DbUpdate.java
index d0c10ccebdb8cac6145711e11d456eef1f29cb1d..6b74e19df6a222160cb59f8443183d2be658a449 100644
--- a/src/main/java/no/nibio/vips/logic/entity/DbUpdate.java
+++ b/src/main/java/no/nibio/vips/logic/entity/DbUpdate.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2021 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ExternalResource.java b/src/main/java/no/nibio/vips/logic/entity/ExternalResource.java
index eeb49f0c3745439b081fd43e4c94cbd39ea0daa0..19007bed6afaecd6dea8da79e47c7c04441643b8 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ExternalResource.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ExternalResource.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ExternalResourceType.java b/src/main/java/no/nibio/vips/logic/entity/ExternalResourceType.java
index 228c493572add70666082a7156b42d0e3c1723d9..f6076e6762d6192866082b48fa583d1f2ba74bac 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ExternalResourceType.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ExternalResourceType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/entity/ForecastConfiguration.java b/src/main/java/no/nibio/vips/logic/entity/ForecastConfiguration.java
index b00ec4228136472734f9508e77187db820776b47..a17f2fbadaa35794dd3de13e10a6883d024776f7 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ForecastConfiguration.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ForecastConfiguration.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfiguration.java b/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfiguration.java
index aa14a6a398d2699c42bf3cba4f30aca5cd65be66..a37304d0f422f58d619b36bd721d162ab5ea7fb1 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfiguration.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfiguration.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfigurationPK.java b/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfigurationPK.java
index 78b778a46b6b4c95961176748e294269f7aa1684..e0a82aeac9896282e23de90b5a61204841b8d321 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfigurationPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ForecastModelConfigurationPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ForecastResult.java b/src/main/java/no/nibio/vips/logic/entity/ForecastResult.java
index d886aa58f9cddabeb469808aa503ddd3ccbf970a..1b4f7e400368a478084d69480af0a80adca2473b 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ForecastResult.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ForecastResult.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ForecastSummary.java b/src/main/java/no/nibio/vips/logic/entity/ForecastSummary.java
index 15f347d76d47bcae7eaef9d9b3b070ca7210470d..5cb3f66e0847de300c57d98bcb5da6188e363e47 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ForecastSummary.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ForecastSummary.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ForecastSummaryPK.java b/src/main/java/no/nibio/vips/logic/entity/ForecastSummaryPK.java
index f17218ad00eb4359543862402b83bdb462b09daa..4980278e3057d63ce00fb1cbed0c6e9e8527c7fb 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ForecastSummaryPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ForecastSummaryPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/Gis.java b/src/main/java/no/nibio/vips/logic/entity/Gis.java
index 7ee47bb64d87b1f1184284d87a8c1846d6a6dba5..e61037ea3c04998a95f845a86e150e60c8770251 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Gis.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Gis.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/HierarchyCategory.java b/src/main/java/no/nibio/vips/logic/entity/HierarchyCategory.java
index 39731548d3af886cf0acfa6833dbf963006fa354..3133b1716a60239642633e90c08e0bbb4b1a8f09 100755
--- a/src/main/java/no/nibio/vips/logic/entity/HierarchyCategory.java
+++ b/src/main/java/no/nibio/vips/logic/entity/HierarchyCategory.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocale.java b/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocale.java
index b570d4dea9329814eee517d8a6544526a4c16fcb..e31e3744d70d00fdf3f701b2d47830615f793195 100755
--- a/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocale.java
+++ b/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocale.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocalePK.java b/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocalePK.java
index 7e7a73d798cc09e2b01928ae81653b92167d1b70..d4542edf467855f4d647d02f586237fe0abe38d6 100755
--- a/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocalePK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/HierarchyCategoryLocalePK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MapLayer.java b/src/main/java/no/nibio/vips/logic/entity/MapLayer.java
index 286f5593b2cfb8db572e674042768eec2a2e5690..f18cf17f6300c34c5d991b69b2cca7ac01921182 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MapLayer.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MapLayer.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/Message.java b/src/main/java/no/nibio/vips/logic/entity/Message.java
index 4003789ab76c60fb7a18fd50ee0cc91cf5409147..1bd92c6064cc3c72c991b02744860c7170b17a8f 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Message.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Message.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageIllustration.java b/src/main/java/no/nibio/vips/logic/entity/MessageIllustration.java
index 067da725c72936af35d272fcd37e774285236223..c695472e1de2a68a2cf2a58570ced4e96fef1584 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageIllustration.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageIllustration.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocale.java b/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocale.java
index 132227d453d9b581ef0b3cf5be3feaaba64077b3..da38390a325fd8748b717bcca66f7df353b2975d 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocale.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocale.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocalePK.java b/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocalePK.java
index 0cdaf3b53bc3349467a4bb854960ca32bb4a13cf..fe5a6c87acca4f56971f72a4e232754f9120ffa7 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocalePK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationCaptionLocalePK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationPK.java b/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationPK.java
index f412d7d1081e6de612330562ddd823445c334230..b33858ef08c4c33bba77766d60c67e7ed4a0c9dd 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageIllustrationPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageLocale.java b/src/main/java/no/nibio/vips/logic/entity/MessageLocale.java
index e0d568a470bec825341658b6f3b21c347b36788f..e91b5fe99657e2169ea9068b17df1d6f85940136 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageLocale.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageLocale.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageLocalePK.java b/src/main/java/no/nibio/vips/logic/entity/MessageLocalePK.java
index 908b8b0aa8b7ae92d20cb135870ad9c5c640dfb1..a894bcd50a007ec3ccbc33aedb19b8195a6008db 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageLocalePK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageLocalePK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageTag.java b/src/main/java/no/nibio/vips/logic/entity/MessageTag.java
index 8c96c11b72540df74d9e6605d759ca75fa7656a1..226e112987ba14845666ee3eb2f8e015c6a350df 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageTag.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageTag.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageTagLocale.java b/src/main/java/no/nibio/vips/logic/entity/MessageTagLocale.java
index 781f2bcd611733c330459931b536e5b9e97d5909..90e4fd9e25f3431c4d84e446cfeb52abaa86e912 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageTagLocale.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageTagLocale.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/MessageTagLocalePK.java b/src/main/java/no/nibio/vips/logic/entity/MessageTagLocalePK.java
index d81eab9c9aa2e507d03a29101b5e0250d302f32f..3c0814ecebdb7ca37d7aff1189be7d28537bf35b 100755
--- a/src/main/java/no/nibio/vips/logic/entity/MessageTagLocalePK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/MessageTagLocalePK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ModelInformation.java b/src/main/java/no/nibio/vips/logic/entity/ModelInformation.java
index 54859b1491e76851f6b2a34a35f0ddf05eeeac88..ed19d2224367fa6596a6afa598346bc1e46e3ad7 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ModelInformation.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ModelInformation.java
@@ -1,35 +1,26 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
 
 import java.io.Serializable;
 import java.util.Date;
-import javax.persistence.Basic;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
+import javax.persistence.*;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.Size;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -60,6 +51,12 @@ public class ModelInformation implements Serializable {
     @Size(min = 1, max = 10)
     @Column(name = "model_id")
     private String modelId;
+
+
+    @JoinColumn(name = "vipscore_instance_id", referencedColumnName = "vipscore_instance_id")
+    @ManyToOne
+    private VipsCoreInstance vipsCoreInstanceId;
+
     @Column(name = "date_first_registered")
     @Temporal(TemporalType.DATE)
     private Date dateFirstRegistered;
@@ -189,4 +186,11 @@ public class ModelInformation implements Serializable {
         return "no.nibio.vips.logic.entity.ModelInformation[ modelId=" + modelId + " ]";
     }
 
+    public VipsCoreInstance getVipsCoreInstanceId() {
+        return vipsCoreInstanceId;
+    }
+
+    public void setVipsCoreInstanceId(VipsCoreInstance vipsCoreInstanceId) {
+        this.vipsCoreInstanceId = vipsCoreInstanceId;
+    }
 }
diff --git a/src/main/java/no/nibio/vips/logic/entity/Observation.java b/src/main/java/no/nibio/vips/logic/entity/Observation.java
index d34522ac17e7bb69a2f4955fd339d0c5dd5798d7..54fbc58b67016d2fed44542209dca50f133c3def 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Observation.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Observation.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
@@ -105,6 +104,7 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
     private String statusRemarks;
     private String observationData;
     private Boolean isQuantified;
+    private Boolean isPositive;
     private Boolean broadcastMessage;
     private Boolean locationIsPrivate;
     private PolygonService polygonService;
@@ -206,6 +206,8 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
     {
         Map<String, Object> properties = new HashMap<>();
         properties.put("observationId", this.getObservationId());
+        properties.put("isPositive", this.getIsPositive());
+        properties.put("timestamp", this.getTimeOfObservation() != null ? this.getTimeOfObservation().getTime() : "null");
         return this.GISEntityUtil.getGeoJSONFromGis(this.geoinfo, properties);
     }
     
@@ -585,7 +587,7 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
      */
     @Column(name = "location_is_private")
     public Boolean getLocationIsPrivate() {
-        return locationIsPrivate;
+        return locationIsPrivate != null ? locationIsPrivate : false;
     }
 
     /**
@@ -632,18 +634,20 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
      */
     public ObservationListItem getListItem(String locale, ObservationDataSchema observationDataSchema)
     {
-        // If geoInfo is from POI, need to add observationId
+        // If geoInfo is from POI, need to add observationId and other stuff for observation rendering
         if(this.location != null)
         {
             this.location.addProperty("observationId", this.getObservationId());
+            this.location.addProperty("isPositive", this.isPositive);
+            this.location.addProperty("timestamp", this.getTimeOfObservation().getTime());
         }
         return new ObservationListItem(
                 this.getObservationId(),
                 this.getTimeOfObservation(),
                 this.getOrganismId(),
-                this.getOrganism().getLocalName(locale).trim() != "" ? this.getOrganism().getLocalName(locale) : this.getOrganism().getLatinName(),
+                ! this.getOrganism().getLocalName(locale).trim().isBlank() ? this.getOrganism().getLocalName(locale) : this.getOrganism().getLatinName(),
                 this.getCropOrganismId(),
-                this.getCropOrganism().getLocalName(locale).trim() != "" ? this.getCropOrganism().getLocalName(locale) : this.getCropOrganism().getLatinName(),
+                ! this.getCropOrganism().getLocalName(locale).trim().isBlank() ? this.getCropOrganism().getLocalName(locale) : this.getCropOrganism().getLatinName(),
                 // Specific geoInfo trumps location. This is to be interpreted 
                 // as that the observation has been geographically masked by
                 // choice of the observer
@@ -651,6 +655,7 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
                 this.getObservationHeading(),
                 this.getBroadcastMessage(),
                 this.getLocationIsPrivate(),
+                this.getIsPositive(),
                 this.getObservationData(),
                 observationDataSchema
         );
@@ -665,5 +670,13 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
 	public void setLastEditedTime(Date lastEditedTime) {
 		this.lastEditedTime = lastEditedTime;
 	}
-    
+
+    @Column(name = "is_positive")
+    public Boolean getIsPositive() {
+        return isPositive;
+    }
+
+    public void setIsPositive(Boolean positive) {
+        isPositive = positive;
+    }
 }
diff --git a/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcut.java b/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcut.java
index 350cb424b77543a840f94c4d312915f775ca1a6e..ab8bf912863a26e1ee1e9acd72d8f079358ed210 100644
--- a/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcut.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcut.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcutLocale.java b/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcutLocale.java
index 470eaeba5314c93180343c6989b977b37e67fb7e..824637fc5b10319216827f490037f90ed7c07cce 100644
--- a/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcutLocale.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ObservationFormShortcutLocale.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ObservationIllustration.java b/src/main/java/no/nibio/vips/logic/entity/ObservationIllustration.java
index 6bd1c630a5b9899431963ad2914ee318f402f500..dcb3a55e4ffeff53060d9fc149c60ea7fbbe4a81 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ObservationIllustration.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ObservationIllustration.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ObservationIllustrationPK.java b/src/main/java/no/nibio/vips/logic/entity/ObservationIllustrationPK.java
index ebbc92462f402f57ecec6feff84465ad76e77dfb..b0eae958a4b9fdbe6080ee0846a26fd49f47f930 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ObservationIllustrationPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ObservationIllustrationPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ObservationMethod.java b/src/main/java/no/nibio/vips/logic/entity/ObservationMethod.java
index 52e800817c7b8575330b776764203c61bc8c4842..f9148efafe379fe6b4718fe7ac9e0449f59a78d5 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ObservationMethod.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ObservationMethod.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ObservationStatusType.java b/src/main/java/no/nibio/vips/logic/entity/ObservationStatusType.java
index 1d36fe45393199ab75a9c33a08923347f6b136f1..f00be18570b9eb9b3deced9a023eb65c96130d98 100755
--- a/src/main/java/no/nibio/vips/logic/entity/ObservationStatusType.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ObservationStatusType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/ObservationSyncInfo.java b/src/main/java/no/nibio/vips/logic/entity/ObservationSyncInfo.java
index 5702cfe1105bd49d303d080c9c99666f067ce341..60efa1b15f225f1ddd4266af854f91827a511a55 100644
--- a/src/main/java/no/nibio/vips/logic/entity/ObservationSyncInfo.java
+++ b/src/main/java/no/nibio/vips/logic/entity/ObservationSyncInfo.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2021 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/Organism.java b/src/main/java/no/nibio/vips/logic/entity/Organism.java
index 612cfaecb60511302897601db733cca934616977..fa0e0c803796e47c9874318982db90434bdde491 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Organism.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Organism.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
@@ -100,6 +99,9 @@ public class Organism implements Serializable {
     
     @Transient
     private String observationDataSchema;
+
+    @Transient
+    private String observationData;
     
     /*@OneToMany(cascade = CascadeType.ALL, mappedBy = "organism")
     private Set<OrganismLocale> organismLocaleSet;
@@ -357,4 +359,12 @@ public class Organism implements Serializable {
 	public void setObservationDataSchema(String observationDataSchema) {
 		this.observationDataSchema = observationDataSchema;
 	}
+
+    public String getObservationData() {
+        return observationData;
+    }
+
+    public void setObservationData(String observationData) {
+        this.observationData = observationData;
+    }
 }
diff --git a/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResource.java b/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResource.java
index d88fe971fb916bacf330d573e82ab3093548bb17..7c2194f05e87a7a6cb214de4f061da020013fb7a 100755
--- a/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResource.java
+++ b/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResource.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResourcePK.java b/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResourcePK.java
index fa6210674f4093c8a264386aa920d7d370ce9d1f..3f55e08643430c173c82073169518b4bc11f794e 100755
--- a/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResourcePK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/OrganismExternalResourcePK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/OrganismLocale.java b/src/main/java/no/nibio/vips/logic/entity/OrganismLocale.java
index 92d95108cc3fa06fb9b582a501088bb97e2908a9..829e8bb4a2c39e4894e8baffcbdd07b33e76e1e7 100755
--- a/src/main/java/no/nibio/vips/logic/entity/OrganismLocale.java
+++ b/src/main/java/no/nibio/vips/logic/entity/OrganismLocale.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/OrganismLocalePK.java b/src/main/java/no/nibio/vips/logic/entity/OrganismLocalePK.java
index 985a98d65ed73ec2ae586309b29c4ad0cb2e4b28..452fb3d89b5118adf78c039be00d2c8fe9738434 100755
--- a/src/main/java/no/nibio/vips/logic/entity/OrganismLocalePK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/OrganismLocalePK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/entity/Organization.java b/src/main/java/no/nibio/vips/logic/entity/Organization.java
index aaa394b877711f52016cdf6224a690c352989fb0..4e5d1bd8be98829b6d203075f4f563e9e030607b 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Organization.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Organization.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/OrganizationGroup.java b/src/main/java/no/nibio/vips/logic/entity/OrganizationGroup.java
index 09e386d966fc4db976a35eccd645966073f755ac..9c62dcced809242ecb839d81505171b8452202a7 100755
--- a/src/main/java/no/nibio/vips/logic/entity/OrganizationGroup.java
+++ b/src/main/java/no/nibio/vips/logic/entity/OrganizationGroup.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterest.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterest.java
index db7fc933cbf0d68ec1cf0145a2257d7ae688f952..425fd96c1714ce6c81c17694a4ceba28eebca450 100755
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterest.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
@@ -48,6 +47,7 @@ import javax.persistence.DiscriminatorValue;
 import javax.persistence.FetchType;
 import javax.persistence.OneToMany;
 import no.nibio.vips.gis.GISUtil;
+import org.wololo.geojson.Feature;
 
 /**
  * @copyright 2017 <a href="http://www.nibio.no/">NIBIO</a>
@@ -64,6 +64,7 @@ import no.nibio.vips.gis.GISUtil;
     @NamedQuery(name = "PointOfInterest.findByPointOfInterestId", query = "SELECT p FROM PointOfInterest p WHERE p.pointOfInterestId = :pointOfInterestId"),
     @NamedQuery(name = "PointOfInterest.findByPointOfInterestIds", query = "SELECT p FROM PointOfInterest p WHERE p.pointOfInterestId IN :pointOfInterestIds"),
     @NamedQuery(name = "PointOfInterest.findByOrganizationId", query = "SELECT p FROM PointOfInterest p WHERE p.user IN(SELECT u.userId FROM VipsLogicUser u WHERE u.organizationId=:organizationId OR u.organizationId IN (SELECT o.organizationId FROM Organization o WHERE o.parentOrganizationId = :organizationId))  ORDER BY p.name ASC"),
+    @NamedQuery(name = "PointOfInterest.findByOrganizationIdAndPoiTypes", query = "SELECT p FROM PointOfInterest p WHERE p.pointOfInterestTypeId in :pointOfInterestTypes AND p.user IN(SELECT u.userId FROM VipsLogicUser u WHERE u.organizationId=:organizationId OR u.organizationId IN (SELECT o.organizationId FROM Organization o WHERE o.parentOrganizationId = :organizationId))  ORDER BY p.name ASC"),
     @NamedQuery(name = "PointOfInterest.findForecastLocationsByOrganizationId", query = "SELECT p FROM PointOfInterest p WHERE p.isForecastLocation IS TRUE AND p.user IN(SELECT u.userId FROM VipsLogicUser u WHERE u.organizationId=:organizationId OR u.organizationId IN (SELECT o.organizationId FROM Organization o WHERE o.parentOrganizationId = :organizationId))  ORDER BY p.name ASC"),
     @NamedQuery(name = "PointOfInterest.findByName", query = "SELECT p FROM PointOfInterest p WHERE p.name = :name"),
     @NamedQuery(name = "PointOfInterest.findByNameCaseInsensitive", query = "SELECT p FROM PointOfInterest p WHERE lower(p.name) = lower(:name)"),
@@ -120,6 +121,8 @@ public class PointOfInterest implements Serializable, Comparable {
     				break;
     		case 4: instance = new PointOfInterestTypeRegion();
     				break;
+            case 5: instance = new PointOfInterestTypeTrap();
+                break;
     		default: instance = null;
     				break;
     	}
@@ -265,7 +268,15 @@ public class PointOfInterest implements Serializable, Comparable {
         {
             this.properties = new HashMap<>();
         }
-        return properties;
+        if(this.properties.get("pointOfInterestId") == null)
+        {
+            this.properties.put("pointOfInterestId", this.getPointOfInterestId());
+        }
+        if(this.properties.get("pointOfInterestTypeId") == null)
+        {
+            this.properties.put("pointOfInterestTypeId", this.getPointOfInterestTypeId());
+        }
+        return this.properties;
     }
 
     /**
@@ -354,13 +365,16 @@ public class PointOfInterest implements Serializable, Comparable {
     @Transient
     public String getGeoJSON()
     {
-        this.addProperty("pointOfInterestId", this.getPointOfInterestId());
         return this.gisUtil.getGeoJSONFromGeometry(this.getGisGeom(), this.getProperties());
     }
     
     public void addProperty(String key, Object value)
     {
-        this.getProperties().put(key, value);
+        if(this.properties == null)
+        {
+            this.properties = new HashMap<>();
+        }
+        this.properties.put(key, value);
     }
     
     /**
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResource.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResource.java
index ca355c3e41744cb26d7213179e5bb7a2c4d9138a..e3dae66c90e61ddbadc970510372b9ec74f05af5 100755
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResource.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResource.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResourcePK.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResourcePK.java
index b023906a06a222ee72f9ae16cea6e37a274781e4..627ae3c98898aa6bb9114f09a7ab0ac92e514197 100755
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResourcePK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestExternalResourcePK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestType.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestType.java
index ee2a94eb7e1e161b21f607f2ae00262224637869..834fd4ecba952f50bc62a2a1df34192d987b5eab 100755
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestType.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
@@ -64,6 +63,8 @@ public class PointOfInterestType implements Serializable {
     public static final int POINT_OF_INTEREST_TYPE_FARM = 2;
     public static final int POINT_OF_INTEREST_TYPE_FIELD = 3;
     public static final int POINT_OF_INTEREST_TYPE_REGION = 4;
+    public static final int POINT_OF_INTEREST_TYPE_TRAP = 5;
+    public static final int POINT_OF_INTEREST_TYPE_NURSERY = 7;
 
     public PointOfInterestType() {
     }
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeApiarySite.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeApiarySite.java
new file mode 100644
index 0000000000000000000000000000000000000000..b89fc8c0b1a09cb1e3663fd7ba5da886445d4614
--- /dev/null
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeApiarySite.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
+
+package no.nibio.vips.logic.entity;
+
+import java.io.Serializable;
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @copyright 2023 <a href="http://www.nibio.no/">NIBIO</a>
+ * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
+ */
+@Entity
+@DiscriminatorValue("6")
+@Table(name = "point_of_interest_apiary_site")
+public class PointOfInterestTypeApiarySite extends PointOfInterest implements Serializable {
+
+}
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeFarm.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeFarm.java
index 2ba5ad333f48cd9664c4bde85e4bdd0425bddf6d..377f09902a7fb318a8fc4fb071cfdde6e9ae1440 100644
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeFarm.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeFarm.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeField.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeField.java
index 651a43246a6b66c233a624bef0640d62d7edcd49..5e9c40c04af9d4f02432594ea10795b4b4367657 100644
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeField.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeField.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeNursery.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeNursery.java
new file mode 100644
index 0000000000000000000000000000000000000000..bcc4945c32ac0f8094734d65950c469abc7d9256
--- /dev/null
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeNursery.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
+
+package no.nibio.vips.logic.entity;
+
+import java.io.Serializable;
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @copyright 2023 <a href="http://www.nibio.no/">NIBIO</a>
+ * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
+ */
+@Entity
+@DiscriminatorValue("7")
+@Table(name = "point_of_interest_nursery")
+public class PointOfInterestTypeNursery extends PointOfInterest implements Serializable {
+    
+}
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeRegion.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeRegion.java
index 20ea5b4d24dcfcf54f380e556c0c17eda3070542..42293401653e5134c28bc0c95b02b57c84ceb359 100644
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeRegion.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeRegion.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeTrap.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeTrap.java
new file mode 100644
index 0000000000000000000000000000000000000000..e9a62eaa503b7a17eb2a9de9e8330a6c3db74ccc
--- /dev/null
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeTrap.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
+
+package no.nibio.vips.logic.entity;
+
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * @copyright 2023 <a href="http://www.nibio.no/">NIBIO</a>
+ * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
+ */
+@Entity
+@DiscriminatorValue("5")
+@Table(name = "point_of_interest_trap")
+public class PointOfInterestTypeTrap extends PointOfInterest implements Serializable {
+
+}
diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java
index 85804f24cfa5756e7821353a48699254b5d3b7b9..e4d820273d132e0056e31a0c9276d31726c2baf5 100755
--- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PolygonService.java b/src/main/java/no/nibio/vips/logic/entity/PolygonService.java
index 609bd3a7d9bd124c2f8f088a41c5c0e582c0365b..9097f946729c6df274f1d212775c3e6d750e35d5 100644
--- a/src/main/java/no/nibio/vips/logic/entity/PolygonService.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PolygonService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/Preparation.java b/src/main/java/no/nibio/vips/logic/entity/Preparation.java
index fd56a79d30f2b1acdc3ab5cfbc676345775fcd21..428b7c3bd27c73abb196f7c6fa8a015681a1f429 100755
--- a/src/main/java/no/nibio/vips/logic/entity/Preparation.java
+++ b/src/main/java/no/nibio/vips/logic/entity/Preparation.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/PreparationType.java b/src/main/java/no/nibio/vips/logic/entity/PreparationType.java
index 623c0234587d2dca2e6cafe8716137b77fc37a5f..48ca4c65f1c0841cd1c01b006e119de9291750f3 100755
--- a/src/main/java/no/nibio/vips/logic/entity/PreparationType.java
+++ b/src/main/java/no/nibio/vips/logic/entity/PreparationType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/TaskHistory.java b/src/main/java/no/nibio/vips/logic/entity/TaskHistory.java
index 5b5d334d7946cc9e44c0bfc1b231c6e144e77334..1fcc220c51e323d12cb37a1953dceb951c8811a0 100755
--- a/src/main/java/no/nibio/vips/logic/entity/TaskHistory.java
+++ b/src/main/java/no/nibio/vips/logic/entity/TaskHistory.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/TaskHistoryStatus.java b/src/main/java/no/nibio/vips/logic/entity/TaskHistoryStatus.java
index 256c107709de758500268450d445f37355b51693..2a81d1de8cfdf2dd396654506501c39e0c7b09b9 100755
--- a/src/main/java/no/nibio/vips/logic/entity/TaskHistoryStatus.java
+++ b/src/main/java/no/nibio/vips/logic/entity/TaskHistoryStatus.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/UserAuthentication.java b/src/main/java/no/nibio/vips/logic/entity/UserAuthentication.java
index 64e0ef2617254d40049476e60ecb260c1adeb017..11632649f3c16e096da3adcabcb037927a761237 100755
--- a/src/main/java/no/nibio/vips/logic/entity/UserAuthentication.java
+++ b/src/main/java/no/nibio/vips/logic/entity/UserAuthentication.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationPK.java b/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationPK.java
index 1c0219abea83f4a9f9f5311ac391d4b5e0602083..dd4fbbf51ba041a89371bed534bbf42f2e46939d 100755
--- a/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationType.java b/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationType.java
index 6f3603d2d560dae83122b07dc1c73c8268ee4316..e1a66461c4ecc39d963b3e699e0e3ac942f5ce1b 100755
--- a/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationType.java
+++ b/src/main/java/no/nibio/vips/logic/entity/UserAuthenticationType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterest.java b/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterest.java
index ed7912e77cf05feb0d27535fecf773ac6265981d..0b8a59966b3abc96fff894676a8a739cfcb91129 100755
--- a/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterest.java
+++ b/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterestPK.java b/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterestPK.java
index b7000ad4968f3cce4debf15d7bf58e5a4108b53f..6f34d94d713179943dd8cce3ea6f4a0ec01d5310 100755
--- a/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterestPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/UserPointOfInterestPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/UserUuid.java b/src/main/java/no/nibio/vips/logic/entity/UserUuid.java
index 654d9a25275c5616c5d809f3d786b5557147f370..539f0c28d4bbd22b78a1f0cae191683fca2942d6 100755
--- a/src/main/java/no/nibio/vips/logic/entity/UserUuid.java
+++ b/src/main/java/no/nibio/vips/logic/entity/UserUuid.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/UserUuidPK.java b/src/main/java/no/nibio/vips/logic/entity/UserUuidPK.java
index b5a634dd94fa955ed175babd2b9392fa4c58201c..9168cdfb5975ed16ce379896cea825c02d4f9430 100755
--- a/src/main/java/no/nibio/vips/logic/entity/UserUuidPK.java
+++ b/src/main/java/no/nibio/vips/logic/entity/UserUuidPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/VipsCoreInstance.java b/src/main/java/no/nibio/vips/logic/entity/VipsCoreInstance.java
new file mode 100755
index 0000000000000000000000000000000000000000..81808efcf0cb1e761d57ea3892a8bff631766be4
--- /dev/null
+++ b/src/main/java/no/nibio/vips/logic/entity/VipsCoreInstance.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
+
+package no.nibio.vips.logic.entity;
+
+import java.io.Serializable;
+import javax.persistence.*;
+import javax.validation.constraints.Size;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @copyright 2023 <a href="http://www.nibio.no/">NIBIO</a>
+ * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
+ */
+@Entity
+@Table(name = "vipscore_instance")
+@NamedQueries({
+        @NamedQuery(name = "VipsCoreInstance.findAll", query = "SELECT v FROM VipsCoreInstance v")
+})
+@XmlRootElement
+public class VipsCoreInstance implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Basic(optional = false)
+    @Column(name = "vipscore_instance_id")
+    private Integer vipscoreInstanceId;
+    @Size(max = 255)
+    @Column(name = "uri")
+    private String uri;
+    @Size(max = 255)
+    @Column(name = "username")
+    private String username;
+    @Size(max = 255)
+    @Column(name = "password")
+    private String password;
+
+
+    public VipsCoreInstance() {
+    }
+
+    public VipsCoreInstance(Integer vipscoreInstanceId) {
+        this.setVipscoreInstanceId(vipscoreInstanceId);
+    }
+
+
+    @Override
+    public int hashCode() {
+        int hash = 0;
+        hash += (getVipscoreInstanceId() != null ? getVipscoreInstanceId().hashCode() : 0);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        // TODO: Warning - this method won't work in the case the id fields are not set
+        if (!(object instanceof VipsCoreInstance)) {
+            return false;
+        }
+        VipsCoreInstance other = (VipsCoreInstance) object;
+        if ((this.getVipscoreInstanceId() == null && other.getVipscoreInstanceId() != null) || (this.getVipscoreInstanceId() != null && !this.getVipscoreInstanceId().equals(other.getVipscoreInstanceId()))) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "no.nibio.vips.logic.entity.VIPSCoreInstance[ vipsCoreInstanceId=" + vipscoreInstanceId + " ]";
+    }
+
+    public Integer getVipscoreInstanceId() {
+        return vipscoreInstanceId;
+    }
+
+    public void setVipscoreInstanceId(Integer vipscoreInstanceId) {
+        this.vipscoreInstanceId = vipscoreInstanceId;
+    }
+
+    public String getUri() {
+        return uri;
+    }
+
+    public void setUri(String uri) {
+        this.uri = uri;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}
diff --git a/src/main/java/no/nibio/vips/logic/entity/VipsLogicRole.java b/src/main/java/no/nibio/vips/logic/entity/VipsLogicRole.java
index aa5f3406b4089c0e98d23dfefb6a14b4ba2e52a5..5aaee47188e3f7de922c0cc0152be15954eef7cb 100755
--- a/src/main/java/no/nibio/vips/logic/entity/VipsLogicRole.java
+++ b/src/main/java/no/nibio/vips/logic/entity/VipsLogicRole.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/VipsLogicUser.java b/src/main/java/no/nibio/vips/logic/entity/VipsLogicUser.java
index ef85a50284ddb9e446ad1ce5441f2470155deb37..c8d96e9477c78f3cac0cb482c7168e210f084eb1 100755
--- a/src/main/java/no/nibio/vips/logic/entity/VipsLogicUser.java
+++ b/src/main/java/no/nibio/vips/logic/entity/VipsLogicUser.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015-2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/entity/WeatherForecastProvider.java b/src/main/java/no/nibio/vips/logic/entity/WeatherForecastProvider.java
index c5459b8020640e3807cf30cf278dc63db65bd237..f2f1ae2479a94ee6ecb5059a2ef635913b518f05 100755
--- a/src/main/java/no/nibio/vips/logic/entity/WeatherForecastProvider.java
+++ b/src/main/java/no/nibio/vips/logic/entity/WeatherForecastProvider.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/WeatherStationDataSource.java b/src/main/java/no/nibio/vips/logic/entity/WeatherStationDataSource.java
index 265b0a62edb446ee20842076378c66f567b5ac3c..9fe247f205036fd792eebe65ab0e6342a2625510 100755
--- a/src/main/java/no/nibio/vips/logic/entity/WeatherStationDataSource.java
+++ b/src/main/java/no/nibio/vips/logic/entity/WeatherStationDataSource.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity;
diff --git a/src/main/java/no/nibio/vips/logic/entity/helpers/ForecastResultSerializer.java b/src/main/java/no/nibio/vips/logic/entity/helpers/ForecastResultSerializer.java
index 4b7b7655622b93f178eea630bf370e57ea14d883..7a3ac6ecff37118d14550523b1dc94e3c402d74e 100644
--- a/src/main/java/no/nibio/vips/logic/entity/helpers/ForecastResultSerializer.java
+++ b/src/main/java/no/nibio/vips/logic/entity/helpers/ForecastResultSerializer.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSCommon.
- * VIPSCommon is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSCommon is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSCommon.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.helpers;
diff --git a/src/main/java/no/nibio/vips/logic/entity/helpers/HstoreHelper.java b/src/main/java/no/nibio/vips/logic/entity/helpers/HstoreHelper.java
index 0f1bb4036d56c005c2b7e0976d66f37d1cd89931..a834ccf6512f73d28c8cb837bd27fd00bad22d2f 100755
--- a/src/main/java/no/nibio/vips/logic/entity/helpers/HstoreHelper.java
+++ b/src/main/java/no/nibio/vips/logic/entity/helpers/HstoreHelper.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.helpers;
diff --git a/src/main/java/no/nibio/vips/logic/entity/helpers/PointOfInterestFactory.java b/src/main/java/no/nibio/vips/logic/entity/helpers/PointOfInterestFactory.java
index 9cd70d815bef8d1624832a26b67a7c88f2c78290..9be2181c7d0e4cc872fa758b0b9db7ae6a466867 100644
--- a/src/main/java/no/nibio/vips/logic/entity/helpers/PointOfInterestFactory.java
+++ b/src/main/java/no/nibio/vips/logic/entity/helpers/PointOfInterestFactory.java
@@ -1,30 +1,24 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.helpers;
 
-import no.nibio.vips.logic.entity.PointOfInterest;
-import no.nibio.vips.logic.entity.PointOfInterestType;
-import no.nibio.vips.logic.entity.PointOfInterestTypeFarm;
-import no.nibio.vips.logic.entity.PointOfInterestTypeField;
-import no.nibio.vips.logic.entity.PointOfInterestTypeRegion;
-import no.nibio.vips.logic.entity.PointOfInterestWeatherStation;
+import no.nibio.vips.logic.entity.*;
 
 /**
  * @copyright 2020 <a href="http://www.nibio.no/">NIBIO</a>
@@ -42,6 +36,10 @@ public class PointOfInterestFactory {
                 return new PointOfInterestTypeField();
             case PointOfInterestType.POINT_OF_INTEREST_TYPE_REGION:
                 return new PointOfInterestTypeRegion();
+            case PointOfInterestType.POINT_OF_INTEREST_TYPE_TRAP:
+                return new PointOfInterestTypeTrap();
+            case PointOfInterestType.POINT_OF_INTEREST_TYPE_NURSERY:
+                return new PointOfInterestTypeNursery();
             default:
                 return new PointOfInterest();
         }
diff --git a/src/main/java/no/nibio/vips/logic/entity/misc/UserResources.java b/src/main/java/no/nibio/vips/logic/entity/misc/UserResources.java
index 717fad5d16672d1a12f75ef7cf064f0ca851e84a..cc826b832e3e0692e7de7fe2e5981a0d97de7ee4 100755
--- a/src/main/java/no/nibio/vips/logic/entity/misc/UserResources.java
+++ b/src/main/java/no/nibio/vips/logic/entity/misc/UserResources.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.misc;
diff --git a/src/main/java/no/nibio/vips/logic/entity/rest/ObservationListItem.java b/src/main/java/no/nibio/vips/logic/entity/rest/ObservationListItem.java
index 1e64b78a4c1fd52a10e11650c67ccc55e80632da..feda7d0be7fcecf280cb0b1f455844a7063d75d9 100644
--- a/src/main/java/no/nibio/vips/logic/entity/rest/ObservationListItem.java
+++ b/src/main/java/no/nibio/vips/logic/entity/rest/ObservationListItem.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.rest;
@@ -35,7 +34,9 @@ public class ObservationListItem {
     private String observationHeading;
     private String observationData;
     private ObservationDataSchema observationDataSchema;
-    private Boolean broadcastMessage, locationIsPrivate;
+    private Boolean broadcastMessage;
+    private Boolean locationIsPrivate;
+    private Boolean isPositive;
 
     public ObservationListItem(
             Integer observationId,
@@ -48,6 +49,7 @@ public class ObservationListItem {
             String observationHeading,
             Boolean broadcastMessage,
             Boolean locationIsPrivate,
+            Boolean isPositive,
             String observationData,
             ObservationDataSchema observationDataSchema
     ){
@@ -61,6 +63,7 @@ public class ObservationListItem {
         this.observationHeading = observationHeading;
         this.broadcastMessage = broadcastMessage;
         this.locationIsPrivate = locationIsPrivate;
+        this.isPositive = isPositive;
         this.observationData = observationData;
         this.observationDataSchema = observationDataSchema;
     }
@@ -232,4 +235,12 @@ public class ObservationListItem {
     public void setObservationData(String observationData) {
         this.observationData = observationData;
     }
+
+    public Boolean getIsPositive() {
+        return isPositive;
+    }
+
+    public void setIsPositive(Boolean positive) {
+        isPositive = positive;
+    }
 }
diff --git a/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingRequest.java b/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingRequest.java
index 3a5750ad1179630147694f74dab86fd16739d9df..dcb1cd973481e200a5308bb118b11144bf85a42c 100644
--- a/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingRequest.java
+++ b/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingRequest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.rest;
diff --git a/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingResponse.java b/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingResponse.java
index 820b483570667d02feb0cb0a8824d97c3775f072..115e1f19c401251ebf33e06ff4882a18efd17611 100644
--- a/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingResponse.java
+++ b/src/main/java/no/nibio/vips/logic/entity/rest/PointMappingResponse.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.rest;
diff --git a/src/main/java/no/nibio/vips/logic/entity/rest/ReferencedPoint.java b/src/main/java/no/nibio/vips/logic/entity/rest/ReferencedPoint.java
index 0fb89cf6595d3cc7766ce7eb2ef149b204276582..1eaa196f6a9ae0b324e76724ffc9aa5a2ec671b0 100644
--- a/src/main/java/no/nibio/vips/logic/entity/rest/ReferencedPoint.java
+++ b/src/main/java/no/nibio/vips/logic/entity/rest/ReferencedPoint.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.rest;
diff --git a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCrop.java b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCrop.java
index 3f6351266e4836dc855f0b95c55e39b4a457bf4c..f391c230038c73ba77cdd5f9f6a74e3c6718e847 100644
--- a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCrop.java
+++ b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCrop.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.vipsmobile;
diff --git a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCropCategory.java b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCropCategory.java
index 7d367199553fadae1f7bcc8ec93323969f36200a..6583094c752db87fb19e9e1eac8e0ddec24a5f8a 100644
--- a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCropCategory.java
+++ b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileCropCategory.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.vipsmobile;
diff --git a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileForecast.java b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileForecast.java
index 5490b79ff442f43c90e2a1429bbe01835ad6892b..6ffd16a7f5afcb01894b98f09a739c9cc70266d4 100755
--- a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileForecast.java
+++ b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileForecast.java
@@ -1,21 +1,20 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
- */
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
 
 package no.nibio.vips.logic.entity.vipsmobile;
 
diff --git a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileMessage.java b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileMessage.java
index 26056734003db1d0d0594533b8da55d61554dc8f..95045f490e73cdebf1b13bf46f7264af380d98cc 100755
--- a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileMessage.java
+++ b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobileMessage.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.entity.vipsmobile;
diff --git a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobilePresentation.java b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobilePresentation.java
index eba5fd7943e8536669678ce2bc3ac158f77e23b7..0c3c4220c4d30e9887182075becfe5a0731ac150 100755
--- a/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobilePresentation.java
+++ b/src/main/java/no/nibio/vips/logic/entity/vipsmobile/VIPSMobilePresentation.java
@@ -1,21 +1,20 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
- */
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
 
 package no.nibio.vips.logic.entity.vipsmobile;
 
diff --git a/src/main/java/no/nibio/vips/logic/gis/CoordinateXYZ.java b/src/main/java/no/nibio/vips/logic/gis/CoordinateXYZ.java
index 6866ad9a532fa61f8f6238d941b05448b4ae98c6..28bc3e3005a7445e69ef31cd73fee30a73040ed4 100644
--- a/src/main/java/no/nibio/vips/logic/gis/CoordinateXYZ.java
+++ b/src/main/java/no/nibio/vips/logic/gis/CoordinateXYZ.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.gis;
diff --git a/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java b/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java
index 6589880e44b7d844b7c754589c8c47ddd2479756..a996188d93a37656b34c4a745ba33f626a01fde3 100755
--- a/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java
+++ b/src/main/java/no/nibio/vips/logic/gis/GeometryEntity.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.gis;
diff --git a/src/main/java/no/nibio/vips/logic/i18n/CharacterEncodingFilter.java b/src/main/java/no/nibio/vips/logic/i18n/CharacterEncodingFilter.java
index f8415ccc2f685cf59367847f9f72a736cb2151a6..ff1f0cc71914368d648141e6e038dd62c4b32c63 100755
--- a/src/main/java/no/nibio/vips/logic/i18n/CharacterEncodingFilter.java
+++ b/src/main/java/no/nibio/vips/logic/i18n/CharacterEncodingFilter.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.i18n;
diff --git a/src/main/java/no/nibio/vips/logic/i18n/LocalizationFilter.java b/src/main/java/no/nibio/vips/logic/i18n/LocalizationFilter.java
index 1300da9c74d4ed9e43b0a0892a61391e4951cfec..b320d3a38e11cb88670290c1ff9b39e491590445 100755
--- a/src/main/java/no/nibio/vips/logic/i18n/LocalizationFilter.java
+++ b/src/main/java/no/nibio/vips/logic/i18n/LocalizationFilter.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.i18n;
diff --git a/src/main/java/no/nibio/vips/logic/i18n/ResourceBundleJSServlet.java b/src/main/java/no/nibio/vips/logic/i18n/ResourceBundleJSServlet.java
index 8fe10c0021bc0162188a245c540c4680a66e8f07..25108073db07c68a317ec8918765619c7430eb1e 100755
--- a/src/main/java/no/nibio/vips/logic/i18n/ResourceBundleJSServlet.java
+++ b/src/main/java/no/nibio/vips/logic/i18n/ResourceBundleJSServlet.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.i18n;
diff --git a/src/main/java/no/nibio/vips/logic/i18n/SessionLocaleUtil.java b/src/main/java/no/nibio/vips/logic/i18n/SessionLocaleUtil.java
index 22309666957386172492ec23af878448260cd304..9b7ea1ef44bb669058dafc7956ff7bafaa066207 100755
--- a/src/main/java/no/nibio/vips/logic/i18n/SessionLocaleUtil.java
+++ b/src/main/java/no/nibio/vips/logic/i18n/SessionLocaleUtil.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.i18n;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/ForecastEvent.java b/src/main/java/no/nibio/vips/logic/messaging/ForecastEvent.java
index 3f5ac9bc48a12b18efa073a09a6ade950d5e2abc..35b6c5326732431b657812da9f39eb3995f77174 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/ForecastEvent.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/ForecastEvent.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/ForecastEventNotificationSubscription.java b/src/main/java/no/nibio/vips/logic/messaging/ForecastEventNotificationSubscription.java
index 90dfb547c58da6967fabc5882e5ee6d3247fba46..157953ea0393c5cc3bdd972b7433c9e5ba5f1d21 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/ForecastEventNotificationSubscription.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/ForecastEventNotificationSubscription.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLog.java b/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLog.java
index a1f9700402dfb7ebcc785ce2385ec69c711aab30..dac54b75e5cda6e610bb34cd346c8327e31db433 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLog.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLog.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLogPK.java b/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLogPK.java
index eda72b87a7470bf22b0ba1ef5b9a8de419743dfd..083328eeb867d2344a86f3d5029633036ef53565 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLogPK.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/ForecastNotificationLogPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/MessageLocalVersion.java b/src/main/java/no/nibio/vips/logic/messaging/MessageLocalVersion.java
index 031b5ab29f06c0b864da31217c86fc3bb41d71ef..895dbcf07eb1a6b42b9fcd53c1a2159ff07da826 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/MessageLocalVersion.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/MessageLocalVersion.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/MessageNotificationSubscription.java b/src/main/java/no/nibio/vips/logic/messaging/MessageNotificationSubscription.java
index f56bae330be54cdf3169f9175f7daf651c132636..2231f3b146004522386b65ef5450cef57efc925e 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/MessageNotificationSubscription.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/MessageNotificationSubscription.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/MessageRecipient.java b/src/main/java/no/nibio/vips/logic/messaging/MessageRecipient.java
index 05cdf4857d14fb956cbced76a3d66fcd71832c61..ee231e54cbd9f7cbe4a0ca457293d20d8736b0a7 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/MessageRecipient.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/MessageRecipient.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/MessagingBean.java b/src/main/java/no/nibio/vips/logic/messaging/MessagingBean.java
index 4b249b517aa90b74903944cc9dd256157bb497e1..8f6001b3801e67370bed6085255f936063cc5797 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/MessagingBean.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/MessagingBean.java
@@ -1,26 +1,23 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ibm.icu.text.MessageFormat;
 import com.ibm.icu.util.ULocale;
 import java.text.SimpleDateFormat;
@@ -37,7 +34,6 @@ import javax.persistence.EntityManager;
 import javax.persistence.NoResultException;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
-import javax.ws.rs.core.Response;
 import no.nibio.vips.entity.Result;
 import no.nibio.vips.logic.entity.ForecastConfiguration;
 import no.nibio.vips.logic.entity.ForecastResult;
@@ -49,11 +45,8 @@ import no.nibio.vips.logic.messaging.distribution.IVipsMessageHandler;
 import no.nibio.vips.logic.messaging.distribution.VipsMessageInputHandler;
 import no.nibio.vips.logic.messaging.distribution.entity.VipsMessage;
 import no.nibio.vips.logic.util.Globals;
-import no.nibio.vips.logic.util.RESTAuthenticator;
 import no.nibio.vips.logic.util.SystemTime;
-import org.jboss.resteasy.client.jaxrs.ResteasyClient;
-import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
-import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
+import org.slf4j.LoggerFactory;
 
 /**
  * @copyright 2015-2022 <a href="http://www.nibio.no/">NIBIO</a>
@@ -64,6 +57,8 @@ public class MessagingBean {
     @PersistenceContext(unitName="VIPSLogic-PU")
     EntityManager em;
     
+    private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(MessagingBean.class);
+    
     private Map<Integer, UniversalMessageFormat> universalMessageFormats;
     
     public UniversalMessageFormat getUniversalMessageFormat(Integer universalMessageFormatId)
@@ -118,41 +113,7 @@ public class MessagingBean {
         
         // Store it
         em.persist(uMessage);
-        /*
-        ResteasyClient client = (ResteasyClient) ResteasyClientBuilder.newClient();//new ResteasyClientBuilder().build();
-        //client.register(new RESTAuthenticator("user", "userPass"));
-        client.register(new RESTAuthenticator("VIPSLogic", "plmoknijbuhv000"));
-        //ResteasyWebTarget target = client.target("http://kart13utv.ad.skogoglandskap.no:8080");
-        // TODO Make this configurable in app server
-        ResteasyWebTarget target = client.target("http://localhost:8080");
-        //ResteasyWebTarget target = client.target("http://logic.testvips2.nibio.no");
-        UniversalMessagingServiceClient umClient = target.proxy(UniversalMessagingServiceClient.class);
-
-        if  (
-                System.getProperty("no.nibio.vips.logic.DISABLE_MESSAGING_SYSTEM") == null 
-                || System.getProperty("no.nibio.vips.logic.DISABLE_MESSAGING_SYSTEM").equals("false")
-            )
-        {
-            try
-            {
-                System.out.println(new ObjectMapper().writeValueAsString(uMessage));
-                Response r = umClient.sendMessage(new ObjectMapper().writeValueAsString(uMessage));
-
-                // TODO: Handle result
-
-                String result = r.readEntity(String.class);
-                System.out.println(result);
-            }
-            catch(JsonProcessingException ex)
-            {
-                // Handle error
-            }
-        }
-        else
-        {
-            System.out.println("Messaging system disabled. This message was not sent: " + uMessage.toString());
-        }
-        */
+        
         
         // TODO Handle errors better!
         try
@@ -167,7 +128,7 @@ public class MessagingBean {
             }
             else
             {
-                System.out.println("Messaging system disabled. This message was not sent: " + uMessage.toString());
+                LOGGER.debug("Messaging system disabled. This message was not sent: " + uMessage.toString());
             }
         }
         catch(Exception ex)
@@ -203,11 +164,12 @@ public class MessagingBean {
                 "AND u.user_id IN ( \n" +
                 "	SELECT mns.user_id FROM messaging.message_notification_subscription mns, public.vips_logic_user u \n" +
                 "	WHERE  mns.user_id = u.user_id \n" +
+                "       and u.organization_id = " + message.getOrganizationId() +
                 (message.getCropCategoryIds() != null && message.getCropCategoryIds().length != 0 ? "       AND mns.crop_category_ids && ARRAY" + Arrays.asList(message.getCropCategoryIds()).toString() + " \n" : "") +
                 (message.getMessageTagIds() != null && !message.getMessageTagIds().isEmpty() ? "       AND mns.message_tag_ids && ARRAY" + message.getMessageTagIds().toString() + " \n" : "" )+ // && is the array_overlaps operator
                 "       AND (mns.universal_message_format_id <> " + UniversalMessageFormat.FORMAT_SMS + " OR (mns.universal_message_format_id = " + UniversalMessageFormat.FORMAT_SMS + " AND u.approves_sms_billing IS TRUE))" + 
                 "); \n";
-        //System.out.println(sql);
+        LOGGER.debug(sql);
         Query q = em.createNativeQuery(sql,
                 MessageRecipient.class);
         
@@ -270,9 +232,11 @@ public class MessagingBean {
         ForecastEvent toRed = em.find(ForecastEvent.class, ForecastEvent.TO_RED);
         ForecastEvent greenToYellow = em.find(ForecastEvent.class, ForecastEvent.GREEN_TO_YELLOW);
         ForecastEvent currentEvent = null;
+        Query findConfQ = em.createNamedQuery("ForecastResult.findByForecastConfigurationId", ForecastResult.class);
         for(ForecastConfiguration conf:forecastConfigurations)
         {
-            List<ForecastResult> results = em.createNamedQuery("ForecastResult.findByForecastConfigurationId", ForecastResult.class)
+            LOGGER.debug("Now working with forecastConfiguration with id=" + conf.getForecastConfigurationId());
+            List<ForecastResult> results = findConfQ
                     .setParameter("forecastConfigurationId", conf.getForecastConfigurationId())
                     .getResultList();
             
@@ -369,7 +333,12 @@ public class MessagingBean {
                 uMessage.addMessageLocalVersion(locale, headingTemplate, "",MessageFormat.format(bodyTemplate, templateParts),detailsUrl);
                 
             }
-            uMessage.setDistributionList(this.getForecastEventNotificationSubscribers(fConf));
+            List<MessageRecipient> distributionList = this.getForecastEventNotificationSubscribers(fConf);
+            if(distributionList == null || distributionList.isEmpty())
+            {
+                em.remove(newNotification);
+            }
+            uMessage.setDistributionList(distributionList);
             cal.setTime(systemTime);
             cal.add(Calendar.DATE, 1);
             uMessage.setExpiresAt(cal.getTime());
@@ -409,6 +378,7 @@ public class MessagingBean {
                 "	WHERE :weatherStationId = ANY(fens.weather_station_ids) \n" +
                 "       AND fens.crop_category_ids && ARRAY(SELECT crop_category_id FROM public.crop_category WHERE :cropOrganismId = ANY(crop_organism_ids))" + 
                 "       AND fens.user_id = u.user_id \n" +
+                "       AND u.organization_id = " + config.getVipsLogicUserId().getOrganizationId().getOrganizationId() +
                 "       AND (fens.universal_message_format_id <> " + UniversalMessageFormat.FORMAT_SMS + " OR (fens.universal_message_format_id = " + UniversalMessageFormat.FORMAT_SMS + " AND u.approves_sms_billing IS TRUE))" + 
                 ");\n";
         Query q = em.createNativeQuery(sql, MessageRecipient.class);
@@ -480,8 +450,8 @@ public class MessagingBean {
     }
 
     private List<MessageRecipient> getObservationNotificationSubscribers(Observation observation) {
-        Query q = em.createNativeQuery(
-                "SELECT \n" +
+        VipsLogicUser observer = em.find(VipsLogicUser.class, observation.getUserId());
+        String sql = "SELECT \n" +
                 "	u.preferred_locale,\n" +
                 "       u.free_sms, \n" + 
                 "	umf.format_name AS type,\n" +
@@ -499,11 +469,15 @@ public class MessagingBean {
                 "	SELECT ons.user_id FROM messaging.observation_notification_subscription ons, public.vips_logic_user u \n" +
                 "	WHERE  ons.crop_category_ids && ARRAY(SELECT crop_category_id FROM public.crop_category WHERE :cropOrganismId = ANY(crop_organism_ids)) \n" + 
                 "       AND ons.user_id = u.user_id \n" +
+                "       and u.organization_id = " + observer.getOrganizationId().getOrganizationId() +
                 "       AND (ons.universal_message_format_id <> " + UniversalMessageFormat.FORMAT_SMS + " OR (ons.universal_message_format_id = " + UniversalMessageFormat.FORMAT_SMS + " AND u.approves_sms_billing IS TRUE))" + 
-                ");\n",
+                ");\n";
+        LOGGER.debug(sql);
+        Query q = em.createNativeQuery(
+                sql,
                 MessageRecipient.class)
                 .setParameter("cropOrganismId", observation.getCropOrganismId());
-        
+        LOGGER.debug(q.toString());
         return q.getResultList();
     }
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/ObservationNotificationSubscription.java b/src/main/java/no/nibio/vips/logic/messaging/ObservationNotificationSubscription.java
index 97d3d6e0b5ffc6443b6bde094172bf430c69cded..7df24d956a44b400a0cacbd53660cef00e7cd2fc 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/ObservationNotificationSubscription.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/ObservationNotificationSubscription.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/UniversalMessage.java b/src/main/java/no/nibio/vips/logic/messaging/UniversalMessage.java
index c4c4725c95612442bb7feb4f4eed2ac2cfeebb37..db8020bf17a7cccac787569541a1592fd6d04065 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/UniversalMessage.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/UniversalMessage.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/UniversalMessageFormat.java b/src/main/java/no/nibio/vips/logic/messaging/UniversalMessageFormat.java
index c95a6e32d69ce6ffb80b6dcea0e40e969dd71601..5a257076d6585b4da369f440378072ff6c3e252a 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/UniversalMessageFormat.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/UniversalMessageFormat.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/UniversalMessagingServiceClient.java b/src/main/java/no/nibio/vips/logic/messaging/UniversalMessagingServiceClient.java
index 3c5bf66ebe33fe88a53ae147e66bbce47ef66993..f0583c3e77c793e8059a7730d62cf1f147a5d89e 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/UniversalMessagingServiceClient.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/UniversalMessagingServiceClient.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/IVipsMessageHandler.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/IVipsMessageHandler.java
index aff13fc27d51cddfeeb5bddf8a717549ab41586e..1a141a6a3066ff0dbebd16a3991aec8b47ee3aa2 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/IVipsMessageHandler.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/IVipsMessageHandler.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMessageInputHandler.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMessageInputHandler.java
index 317e9ea4b4420b0753fad5bdf57d6765ed62b385..d2bb843a0e9368805288757a71e6ddf9e1c22ec0 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMessageInputHandler.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMessageInputHandler.java
@@ -1,21 +1,20 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
- */
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
 package no.nibio.vips.logic.messaging.distribution;
 
 import java.io.File;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMsgDummyDistImpl.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMsgDummyDistImpl.java
index 643609eeed7373c5fec3e2a01a286f515f7040ff..a48e5984a75c68a250651ea70b10d74e31370b3d 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMsgDummyDistImpl.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/VipsMsgDummyDistImpl.java
@@ -1,21 +1,20 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
- */
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
 package no.nibio.vips.logic.messaging.distribution;
 
 import java.util.UUID;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/DistributionTypeEnum.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/DistributionTypeEnum.java
index ca2bed64f59aa073d9ec9e1b670cb80a4203abed..694b402a2f92712388c7b42c7fb962d16253bd6a 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/DistributionTypeEnum.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/DistributionTypeEnum.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging.distribution.entity;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgDistResultEnum.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgDistResultEnum.java
index d6836be1fc313f88337c25d3fc1d2afa8f25336f..95c26bc07969fbdf832de57258d0d6b0a155815b 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgDistResultEnum.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgDistResultEnum.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgReceiver.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgReceiver.java
index 74d3da62a5808d0c1c2adb70585fcd2d6da5eafe..49e3a17b47c8ab30b3c6ee10fa89b1d09ca0a8ec 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgReceiver.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgReceiver.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgToSend.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgToSend.java
index 1586f0b81d75077f30427593dc1fb50472e96870..103b6c98bb68ce8394794940222f95a1c2745e99 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgToSend.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/MsgToSend.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsMessage.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsMessage.java
index 257a3fe587bf197194bfda5c0700f1cd088eb601..c464f367c87558dd745163faec457dc7f37e9526 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsMessage.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsMessage.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsSendMsgResult.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsSendMsgResult.java
index 441f3399af3eab74bd543a744b23b57aadc952ab..799d501582234aa0e37b0aa6c96c6e06d8190cfb 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsSendMsgResult.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/entity/VipsSendMsgResult.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.entity;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/CSVTrafficFileLogger.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/CSVTrafficFileLogger.java
index 2ee3dd2a7755ed31d7317dc522e538bcf95f3129..7f3b1f44674f30c8892dd59a05ea5d7b4b921c6d 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/CSVTrafficFileLogger.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/CSVTrafficFileLogger.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging.distribution.send;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IDeliveryMsgHandler.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IDeliveryMsgHandler.java
index a5be9e6b60c9c7bd30022b5d7f6f6ba2bc349b66..783f0bed3fe8e321b0c1bc338b28933693c311e5 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IDeliveryMsgHandler.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IDeliveryMsgHandler.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.send;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IMsgContent.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IMsgContent.java
index c2c2b0e9c7d08c91ca04803aa5865986e3c78b46..a9b2ea44319852f23f0b4e95bf08216899e6652f 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IMsgContent.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/IMsgContent.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.send;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/MailMsgDeliveryHandler.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/MailMsgDeliveryHandler.java
index f4da6f78ab2ceca19d4b6b96c814fa2f335087e1..310eb316dcd72a4fc83bd5003be901a75d6846b0 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/MailMsgDeliveryHandler.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/MailMsgDeliveryHandler.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.send;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSendResult.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSendResult.java
index 55b7a822441877dd30919d7627f3929fe477bbde..e4b39618d4cf095e33fd298bfb514be73bd7550e 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSendResult.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSendResult.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.send;
 
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSentStateEnum.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSentStateEnum.java
index af12201ac5f5f99eddc6e8203e723cfdb744b73c..71b4b32d6d13fd26a16d599ffffebc47fd799661 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSentStateEnum.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SingleMsgSentStateEnum.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.send;
 /**
diff --git a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SmsMsgDeliveryHandler.java b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SmsMsgDeliveryHandler.java
index 74af3dfad8683e279f6b2b7737bceff9950cdde5..860f4514396f9c74cb7c74f6b2cb919f1373c9de 100644
--- a/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SmsMsgDeliveryHandler.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/distribution/send/SmsMsgDeliveryHandler.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging.distribution.send;
 
@@ -139,6 +138,7 @@ public class SmsMsgDeliveryHandler implements IDeliveryMsgHandler {
                 + (vm.getIncludeNotificationSettingsLink() ? "\n\n" + MessageFormat.format(msgToSend.getNotificationSettingsLinkTpl(), msgReceiver.recipientId): "\n");
         LOGGER.debug(smsText);
         LOGGER.debug("Teksten er på " + smsText.length() + " tegn.");
+        LOGGER.debug("Mottaker: " + msgReceiver.msgDeliveryAddress);
 
         try {
             // TODO: Make the price part of VipsMessage
diff --git a/src/main/java/no/nibio/vips/logic/messaging/sms/SMSHandlingService.java b/src/main/java/no/nibio/vips/logic/messaging/sms/SMSHandlingService.java
index 313db176ea10a12098f49797202227804f585f42..76ffc2829aa07745318b03359a70aefba92b8469 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/sms/SMSHandlingService.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/sms/SMSHandlingService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging.sms;
diff --git a/src/main/java/no/nibio/vips/logic/messaging/sms/ViaNettCustomerReply.java b/src/main/java/no/nibio/vips/logic/messaging/sms/ViaNettCustomerReply.java
index f8f2288f5aae9e9a23aa3126346ca856abf29dfb..f1b0a32fd1c777a470380862f8ee08c28471fd9e 100755
--- a/src/main/java/no/nibio/vips/logic/messaging/sms/ViaNettCustomerReply.java
+++ b/src/main/java/no/nibio/vips/logic/messaging/sms/ViaNettCustomerReply.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.messaging.sms;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothBean.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothBean.java
index eb017ef90a755032222d82ba827a8299dabaec6f..278d8742ce56451b82b349feea1485a85203ade3 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothBean.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothController.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothController.java
index 8287b9cd71d118233d7cbe58cdafacf023d85876..f21aeb2f9530ea09bb4bf3be00aef4311ef2b367 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothController.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.modules.applefruitmoth;
 
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothService.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothService.java
index d133c6548f13e65b93c31c691243a51eb4f5a910..fe21310ed23644c2d561149e4450d7117efe13ef 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothService.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/AppleFruitMothService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSite.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSite.java
index 845c2694ba628b5bdd18c9981e67894752b57c51..0a380253126db6273c36952bf27ee33953980190 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSite.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSite.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePoint.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePoint.java
index bf4d5c39d794aac91df5531b50e27e6bcd22a246..64ad9e597b7f0da19dae1d1c42c1fc38362187ef 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePoint.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePoint.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonData.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonData.java
index 7dc105836277ec94e71dd6801e0d76cf3249e011..2e35f610324643c6ed68d17f3207b01b41d40035 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonData.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonData.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonDataPK.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonDataPK.java
index 80cdcd06306b675f632b9192aae04af42c1ffb7c..1f85c533303a8f5b19df7aa7d088db5a22844851 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonDataPK.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSitePointSeasonDataPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonData.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonData.java
index fbe051b142a539472f03319bd1f3c6529ff5cca0..6635b19435d12757179e5460bda4426fb3ab8c74 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonData.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonData.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonDataPK.java b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonDataPK.java
index ea6e557c37dc38ac9d151408a988ef47eabec48a..42f89a65a522bcd48415c8330f6ce2b83bf26c39 100755
--- a/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonDataPK.java
+++ b/src/main/java/no/nibio/vips/logic/modules/applefruitmoth/ObservationSiteSeasonCommonDataPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.applefruitmoth;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBean.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBean.java
index 64a6f555c9a2a6023266e6017f26439e4b33f7a1..94616429a87b91531c992a68b174273bb7d03e12 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBean.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBean.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.modules.barkbeetle;
 
@@ -703,7 +702,7 @@ public class BarkbeetleBean {
     }
 
     /**
-     * Second reminder is to be sent Thursday in the registration week
+     * Second reminder is to be sent Wednesday in the registration week
      *
      * @param currentDate
      * @return
@@ -712,8 +711,8 @@ public class BarkbeetleBean {
         Calendar cal = Calendar.getInstance(BarkbeetleBean.NORGE_MITT_NORGE);
         cal.setTime(currentDate);
         Integer week = cal.get(Calendar.WEEK_OF_YEAR);
-        Boolean isThursday = cal.get(Calendar.DAY_OF_WEEK) == Calendar.THURSDAY;
-        return BarkbeetleBean.TRAP_EMPTYING_WEEKS.contains(week) && isThursday;
+        Boolean isWednesday = cal.get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY;
+        return BarkbeetleBean.TRAP_EMPTYING_WEEKS.contains(week) && isWednesday;
     }
 
     public void checkAndSendTrapEmptyingReminder(Date currentDate) {
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleController.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleController.java
index 11f03f607e5f67ea2b47c30f27f88f1ff3827b8b..4418b800db9a1f7b1cda48deea4d1e9df7561337 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleController.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleController.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleService.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleService.java
index 19b398ec5bda2ee2ae019a4dac9b567f560cd0f1..ebcde20a98263955bfbc177cabf52ab1b5c6d585 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleService.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/RegistrationStatusType.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/RegistrationStatusType.java
index b38270ae5d0386d463a99446de44fc95939f94d0..dcf98f16832bc938a61f56aee3916a531548fc38 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/RegistrationStatusType.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/RegistrationStatusType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsite.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsite.java
index 94c8505402781b2f8252d8d9c647001bd421a91e..4935dbecfd73606c34850d3ff003279b9fd2eb4d 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsite.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsite.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsiteBivolt.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsiteBivolt.java
index 5e7d29269f54c2612e6742709c8665695a98c111..bc1cf21432ab5b4a1f82cf51f20411ea332685f5 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsiteBivolt.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/SeasonTrapsiteBivolt.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2021 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistration.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistration.java
index 26213d9d114ba81aab37346cb6a97b71c5bb7a14..d1ec56d11c8196c737b87567df5377bf4fea7e40 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistration.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistration.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistrationPK.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistrationPK.java
index 1466e4e101655a1ccf585f09fb20a07fcfad1e28..398c49320392f69841d3dbb2db3ec577d8d5a099 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistrationPK.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteRegistrationPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteType.java b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteType.java
index 8f918e1aa8e51e77c12c6ae67f9c4e8d27323cab..0b6d8ba524e397d5bbf9bc17f883783113bce137 100644
--- a/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteType.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barkbeetle/TrapsiteType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barkbeetle;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/BarleyNetBlotchModelService.java b/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/BarleyNetBlotchModelService.java
index 5035869e92d710801be72e8e16ba37ca4c6de46b..58b9c26ed68b2b13de307c5f059fac87327f9f3c 100755
--- a/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/BarleyNetBlotchModelService.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/BarleyNetBlotchModelService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barleynetblotch;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/Factors.java b/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/Factors.java
index dac7aa5c27a2f2a74dc15a3c9a6465686c707532..81cb89a36a26513586f5cd6d0fb0ff61fa85eac3 100755
--- a/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/Factors.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/Factors.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barleynetblotch;
diff --git a/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/PreparationEffectFactor.java b/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/PreparationEffectFactor.java
index 13e72af58d8d72ed1dc285b4d1daa0cd86a86f4c..b79579abbb2ad41afdb5b627d936b4be5392b074 100755
--- a/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/PreparationEffectFactor.java
+++ b/src/main/java/no/nibio/vips/logic/modules/barleynetblotch/PreparationEffectFactor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.barleynetblotch;
diff --git a/src/main/java/no/nibio/vips/logic/modules/roughage/RoughageService.java b/src/main/java/no/nibio/vips/logic/modules/roughage/RoughageService.java
index bc4d9511ac2f49cfc1cb3d86939fe78d6747709a..5f08a872cda7ba7bd919cea6c25912d1111996fd 100755
--- a/src/main/java/no/nibio/vips/logic/modules/roughage/RoughageService.java
+++ b/src/main/java/no/nibio/vips/logic/modules/roughage/RoughageService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.modules.roughage;
@@ -104,6 +103,7 @@ public class RoughageService {
             @QueryParam("wateringAffectsNormalData") String wateringAffectsNormalData,
             @QueryParam("firstHarvest") String firstHarvestStr,
             @QueryParam("secondHarvest") String secondHarvestStr,
+            @QueryParam("firstPossibleGrowthStartDate") String firstPossibleGrowthStartDateStr,
             @QueryParam("soilType") Integer soilType,
             @QueryParam("cloverShare") Integer cloverShare,
             @QueryParam("userWeatherScenarios") String useWeatherScenarios,
@@ -119,28 +119,30 @@ public class RoughageService {
         TimeZone timeZone = TimeZone.getTimeZone(timeZoneStr);
         Date firstHarvest = parseUtil.parseISODate(firstHarvestStr, timeZone);
         Date secondHarvest = secondHarvestStr != null ? parseUtil.parseISODate(secondHarvestStr, timeZone) : null;
-        // Calculating start and end date of weather data retrieval
-        // Start is April 1st
-        Calendar cal = Calendar.getInstance(timeZone);
-        cal.setTime(firstHarvest);
-        cal.set(Calendar.MONTH, Calendar.MARCH);
-        cal.set(Calendar.DATE, 1);
 
+        // Calculating start and end date of weather data retrieval
+        // Start is March 1st unless specified otherwise
+        Date firstPossibleGrowthStartDate = firstPossibleGrowthStartDateStr != null ? parseUtil.parseISODate(firstPossibleGrowthStartDateStr, timeZone) : null;
         WeatherUtil wUtil = new WeatherUtil();
-        Date marchFirst = wUtil.normalizeToExactDate(cal.getTime(), timeZone);
-
+        Calendar cal = Calendar.getInstance(timeZone);
+        if(firstPossibleGrowthStartDate == null) {
+            cal.setTime(firstHarvest);
+            cal.set(Calendar.MONTH, Calendar.MARCH);
+            cal.set(Calendar.DATE, 1);
+            firstPossibleGrowthStartDate = wUtil.normalizeToExactDate(cal.getTime(), timeZone);
+        }
         // End date for weather data depends on season
         // We try September 30th. If that's in the future,
         // We add 10 days to today
         Date dateOfLastWeatherData;
-        cal.setTime(marchFirst);
+        cal.setTime(firstPossibleGrowthStartDate);
         cal.set(Calendar.MONTH, Calendar.SEPTEMBER);
         cal.set(Calendar.DATE, 30);
         Date endOfSeptember = cal.getTime();
         if(endOfSeptember.after(SystemTime.getSystemTime()))
         {
             cal.setTime(SystemTime.getSystemTime());
-            cal.add(Calendar.DATE, 7);
+            cal.add(Calendar.DATE, 9);
             dateOfLastWeatherData = cal.getTime();
         }
         else
@@ -164,7 +166,7 @@ public class RoughageService {
                         WeatherElements.SOIL_TEMPERATURE_10CM_MEAN,
                         WeatherElements.POTENTIAL_EVAPORATION
                     },
-                    marchFirst, 
+                    firstPossibleGrowthStartDate,
                     dateOfLastWeatherData
             );
         } catch (WeatherDataSourceException ex) {
@@ -367,9 +369,10 @@ public class RoughageService {
         config.setConfigParameter("observations", observations);
         config.setConfigParameter("timeZone", timeZone.getID());
         config.setConfigParameter("firstHarvest", firstHarvest);
+        config.setConfigParameter("firstPossibleGrowthStartDate", firstPossibleGrowthStartDate);
         config.setConfigParameter("soilType", soilType);
         config.setConfigParameter("cloverShare", cloverShare);
-        
+
         // Optional parameters
         if(secondHarvest != null)
         {
@@ -426,7 +429,7 @@ public class RoughageService {
                         WeatherElements.SOIL_TEMPERATURE_10CM_MEAN,
                         WeatherElements.POTENTIAL_EVAPORATION
                     },
-                    marchFirst, 
+                    firstPossibleGrowthStartDate,
                     //dateOfLastWeatherData
                     latestObsDate
                 );
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/SchedulingTest.java b/src/main/java/no/nibio/vips/logic/scheduling/SchedulingTest.java
index 8b983c215bd51a14378d1795fcde130212bd1fb7..e011cb4a21520c5efc370289fc65441aaf8d9ca0 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/SchedulingTest.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/SchedulingTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/SchedulingUtil.java b/src/main/java/no/nibio/vips/logic/scheduling/SchedulingUtil.java
index 50d4b61a4e3c5e438d2bae2d937ab03e5004e557..c4e04f218a37fe11d76af4fb3ca8532b0707e0a2 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/SchedulingUtil.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/SchedulingUtil.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/TaskLoggerSchedulerListener.java b/src/main/java/no/nibio/vips/logic/scheduling/TaskLoggerSchedulerListener.java
index e39b5214f625b6af207541c18beec8b24c1bd397..88436290cbb10cea7890508c836eef99c5e0e4fd 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/TaskLoggerSchedulerListener.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/TaskLoggerSchedulerListener.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/TaskResult.java b/src/main/java/no/nibio/vips/logic/scheduling/TaskResult.java
new file mode 100644
index 0000000000000000000000000000000000000000..b7037caaa1739c0f85bfd54eca79129b667e3b01
--- /dev/null
+++ b/src/main/java/no/nibio/vips/logic/scheduling/TaskResult.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2023 NIBIO <http://www.nibio.no/>.
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
+package no.nibio.vips.logic.scheduling;
+
+
+/**
+ * A util entity for reporting back to a cron4j Task
+ */
+public class TaskResult  {
+    private Double completeness;
+    private String message;
+
+    public Double getCompleteness() {
+        return completeness;
+    }
+
+    public void setCompleteness(Double completeness) {
+        this.completeness = completeness;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+}
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/TerminateSchedulerListener.java b/src/main/java/no/nibio/vips/logic/scheduling/TerminateSchedulerListener.java
index 59add8bae6d933961fe30b15abda8274d6327a75..911ee8e792835b71b7e8bdd5a9b53abc1b5f679e 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/TerminateSchedulerListener.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/TerminateSchedulerListener.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/VIPSLogicTaskCollector.java b/src/main/java/no/nibio/vips/logic/scheduling/VIPSLogicTaskCollector.java
index 50d5adf3f4efe21f7e9fde5d5fe241136a5f1a62..f876bbfe03378c5acdb36e24f3f4db7552ae192a 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/VIPSLogicTaskCollector.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/VIPSLogicTaskCollector.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTask.java b/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTask.java
index 69640d152819af3fa4469023d95ff7c98b554a42..bfcd4322048e90e27180be6261d1b91d82369190 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTaskFactory.java b/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTaskFactory.java
index 265a092473db6b66d135077b95fa81590527230d..38151970bf13e2851461ebf1d1ba560f112c51a1 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTaskFactory.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/VipsLogicTaskFactory.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessor.java
index 6e103b9ddbc8771f88fb6436a901f7ed9e09bc85..19389d610329b28bde5d9e6ccf70724894f07480 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessorFactory.java b/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessorFactory.java
index 7286bc1194750cc692aa8137dab2a7884ceb3038..345813d4d713d526ee0080ec266b0fe503cb5b34 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessorFactory.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/ModelRunPreprocessorFactory.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/PreprocessorException.java b/src/main/java/no/nibio/vips/logic/scheduling/model/PreprocessorException.java
index ab74a7e6cb15bacbe8c31d343e9d205e9dad331b..4cfd197834f149abc7d555fb20bc65dba1cdada9 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/PreprocessorException.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/PreprocessorException.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/RunAppleScabModelForOrganizationTask.java b/src/main/java/no/nibio/vips/logic/scheduling/model/RunAppleScabModelForOrganizationTask.java
index a8574e6724233c6a334de18936a6ea1d9c787d16..848a91bd263608b3590249b76c5ef028262b8df5 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/RunAppleScabModelForOrganizationTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/RunAppleScabModelForOrganizationTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/grid/preprocessor/ZymoseptoriaSimpleRiskGridModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/grid/preprocessor/ZymoseptoriaSimpleRiskGridModelPreprocessor.java
index 6e68fa6b58431719aa9b93b60bef96bd7b775775..9161fc5d77bd11c0006f9e277c6298373a70622e 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/grid/preprocessor/ZymoseptoriaSimpleRiskGridModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/grid/preprocessor/ZymoseptoriaSimpleRiskGridModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.grid.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AltenariaModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AltenariaModelPreprocessor.java
index 7232e113db27cfce32f0acc6373c63590769c4f8..62f1a688cb0434309588ec348b2136962436371e 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AltenariaModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AltenariaModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AppleScabModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AppleScabModelPreprocessor.java
index c86453bc76e1d9c5e458c084fb8d41f5aaeef51f..374785eb0666c660d5b7d2800a67beb629064f17 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AppleScabModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/AppleScabModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.scheduling.model.preprocessor;
 
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessor.java
index 3b7784b10b04b353250eaf3f25edfa901d818b19..e54d1bd101247783336ef302a00787b53f44b1b3 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/CydiaPomonellaModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/CydiaPomonellaModelPreprocessor.java
index 83e2e231e391e6418de2431fe7dbc773b2c4e602..b325016081a8a364aed557a580fd17abc95b26be 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/CydiaPomonellaModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/CydiaPomonellaModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DOWNCASTModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DOWNCASTModelPreprocessor.java
index 8589b8b8ec00ffaabac4a2100694c3a0771ff856..b01ab188dbab0dadf2c007865c0638cec1b7c2a9 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DOWNCASTModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DOWNCASTModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelOldCropPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelOldCropPreprocessor.java
index 3009d229af3defcf279ad2260b5f3a8413acaf31..20aca592977bd2e196305fc51d2be7cabcca7bde 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelOldCropPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelOldCropPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelPreprocessor.java
index c466ae0566e97a701f711074133b3324952c1b90..9d5fa878570f40d8294d212029f194f92ec197a9 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelYoungCropPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelYoungCropPreprocessor.java
index 32b7f920f197c8be48c581784c67957d1edd93c0..3af6ecd1e8d9b604c73615ff12743163013b8c58 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelYoungCropPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumFloralisModelYoungCropPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumModelPreprocessor.java
index 42a69f0f8de06140b6df4a0390ba3002205db2fd..17e2a3ce961d0c1b758f063e45f40fcdcd6d2e10 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/DeliaRadicumModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/HoplocampaFlavaModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/HoplocampaFlavaModelPreprocessor.java
index b4076024b7f37ede730cf34d8b5b865960afffa9..e7c6c22b41d8e5b7d112a29f6f3a0410bd152d1d 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/HoplocampaFlavaModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/HoplocampaFlavaModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LeafBlotchModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LeafBlotchModelPreprocessor.java
index c4f7822c593823fab14481a1a5300af675ca879b..1ff1aa1500fb2a68b2792cd9710f34b529a4170f 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LeafBlotchModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LeafBlotchModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.scheduling.model.preprocessor;
 
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LygusRugulipennisModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LygusRugulipennisModelPreprocessor.java
index fd1812685a5fcee90382f92640a8ff054cc18914..5cccec9b910c5ce5ac4723e569ae215e9101f8d3 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LygusRugulipennisModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/LygusRugulipennisModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/MamestraBrassicaeModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/MamestraBrassicaeModelPreprocessor.java
index 5b03940f1ecded97a1117b9af26327d18e4fa03f..6947a2008456c9718f03bfe52f95e2fd81f9ef28 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/MamestraBrassicaeModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/MamestraBrassicaeModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NaerstadModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NaerstadModelPreprocessor.java
index f74296e9ec182cb9978153a193b622322d7086f8..200ead0877c0b91e0d3e5ff62e132495a0409868 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NaerstadModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NaerstadModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NegativePrognosisModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NegativePrognosisModelPreprocessor.java
index 60402e5b3d6a43500c8e21321452a2f214cb3fe6..7e2f5a179658526c93fc038348bb2fc99b001a47 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NegativePrognosisModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NegativePrognosisModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessor.java
index f31d4ae1ffc1f5f72a61edefe380f12fe3be9a35..06df286e3f8985b8f9666f7fdae3c9ef8afa2750 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeObservationModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeObservationModelPreprocessor.java
index 4d5426452f642f1306689e81e4dc0819375dd110..4e9f5b7964e52452e901ecc56c0decb26803efb6 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeObservationModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeObservationModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeTempModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeTempModelPreprocessor.java
index b7c12c85cdf0d54cd51c5f56a55c7ac9c500545a..ab8eb2fdcb2bca182a328f293218e1b81b8422f5 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeTempModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/PsilaRosaeTempModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/RainyDaysModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/RainyDaysModelPreprocessor.java
index 2a15313a70717ee85c73705fb227548debf19a24..82aaa5817ab5bc4001b0cfb55956a0c75ae11d94 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/RainyDaysModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/RainyDaysModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaApiicolaModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaApiicolaModelPreprocessor.java
index 3830cdfac0650804b65788c4d8ead8e4093f07d1..1cb407f2d50881816e25bfac2cf4b7db28f9e27c 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaApiicolaModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaApiicolaModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaHumidityModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaHumidityModelPreprocessor.java
index 730705ab4a1acb8c950f9e125356bea3f0377ecc..4ac0300b3f3bb36f18cfcb9d2f75325fe3ad08fa 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaHumidityModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaHumidityModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaReferenceHumidityModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaReferenceHumidityModelPreprocessor.java
index 695d6767fa63ce5a91a65f86ba5055171defd974..8cfe887e4e051e1e1bd24073e8a722b5f3ce3bb5 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaReferenceHumidityModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/SeptoriaReferenceHumidityModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.model.preprocessor;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/YellowStemborerTempModelPreprocessor.java b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/YellowStemborerTempModelPreprocessor.java
index d4106c5fdfebf191ab7d35a729e54a4e6fcd7074..43bf40a88e9b4c9927b3c50fd57c75c60eb336f9 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/YellowStemborerTempModelPreprocessor.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/YellowStemborerTempModelPreprocessor.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.scheduling.model.preprocessor;
 
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/DeleteAllExpiredUserUuidsTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/DeleteAllExpiredUserUuidsTask.java
index 58dfc7054c339d38dbba73716531f65692514de8..0ef2ce63136d40ef47196676d8eb8f67ba8ecac4 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/DeleteAllExpiredUserUuidsTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/DeleteAllExpiredUserUuidsTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsForOrganizationTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsForOrganizationTask.java
index 50d41e0651da0f6d1252a61fd6a611c885c2e808..84a41cc203c8e4c57e6cfe900ab189f4776af133 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsForOrganizationTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsForOrganizationTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsTask.java
index 6594f5b1ff488c4ff55283a66982bf80cdea169d..7a5cf687a4e6fa2e3e9c1de4827fe9b4c94b3953 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunAllForecastConfigurationsTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunForecastConfigurationsByIdTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunForecastConfigurationsByIdTask.java
index 1dd93a7d6dad303fec548d7773d444b9f266f5fd..040696291b7e24e51f9c5666c96492cf50c37066 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunForecastConfigurationsByIdTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunForecastConfigurationsByIdTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunGridModelsTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunGridModelsTask.java
index 3f35c79514f1e8122eecb69f77be4a2ac803f926..072565dfb10c5a919ccda14937fd3c5bcd6453eb 100644
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunGridModelsTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/RunGridModelsTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/SendForecastEventNotificationsTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/SendForecastEventNotificationsTask.java
index 181e3a369846d972165fa7a0856724c170d32a24..25bb6d3bada9ed28bc18025dfe26f9a93de13ebe 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/SendForecastEventNotificationsTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/SendForecastEventNotificationsTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastResultCacheTableTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastResultCacheTableTask.java
index 9c33ab89cd876684d108f0dfbcab8444ea91e88a..3824b616929467244f8664ff0b01c67c3aef3990 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastResultCacheTableTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastResultCacheTableTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastSummaryTableTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastSummaryTableTask.java
index 934812b99e9de6ebc5533096e9f1b76d26812086..8533acad16c6e46c7d38a4b314c069d953356787 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastSummaryTableTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateForecastSummaryTableTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
diff --git a/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateModelInformationTask.java b/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateModelInformationTask.java
index 8211bfc5958e0eb3fd27c6b7d53875bdbc3e5e17..b87173d48c85af8bdd95c7a58238a686f7efb8e1 100755
--- a/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateModelInformationTask.java
+++ b/src/main/java/no/nibio/vips/logic/scheduling/tasks/UpdateModelInformationTask.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.scheduling.tasks;
@@ -23,6 +22,7 @@ import it.sauronsoftware.cron4j.TaskExecutionContext;
 import javax.ejb.EJB;
 import no.nibio.vips.logic.controller.session.ForecastBean;
 import no.nibio.vips.logic.controller.session.SessionControllerGetter;
+import no.nibio.vips.logic.scheduling.TaskResult;
 import no.nibio.vips.logic.scheduling.VipsLogicTask;
 
 /**
@@ -45,8 +45,12 @@ public class UpdateModelInformationTask extends VipsLogicTask{
     @Override
     public void execute(TaskExecutionContext tec) throws RuntimeException {
         tec.setCompleteness(0d);
-        SessionControllerGetter.getForecastBean().updateModelInformation();
-        tec.setCompleteness(1d);
+        TaskResult taskResult = SessionControllerGetter.getForecastBean().updateModelInformation();
+        tec.setCompleteness(taskResult.getCompleteness());
+        tec.setStatusMessage(taskResult.getMessage());
+        if(taskResult.getCompleteness() < 1.0){
+            throw new RuntimeException();
+        }
     }
     
     @Override
diff --git a/src/main/java/no/nibio/vips/logic/service/AuthenticationService.java b/src/main/java/no/nibio/vips/logic/service/AuthenticationService.java
index 114ffc2497e3df08bfeb4341f79c0960f2631f7c..c2155424c0884a3c7a5b615df67453293e181424 100644
--- a/src/main/java/no/nibio/vips/logic/service/AuthenticationService.java
+++ b/src/main/java/no/nibio/vips/logic/service/AuthenticationService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2021 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.service;
 
diff --git a/src/main/java/no/nibio/vips/logic/service/JSONBConfig.java b/src/main/java/no/nibio/vips/logic/service/JSONBConfig.java
index 47cb1ef46bc902b10edd6d3ad21fe07801e2f96a..814f9ce13dfbd12d88fae850df396295a50a7cc8 100644
--- a/src/main/java/no/nibio/vips/logic/service/JSONBConfig.java
+++ b/src/main/java/no/nibio/vips/logic/service/JSONBConfig.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.service;
diff --git a/src/main/java/no/nibio/vips/logic/service/JacksonConfig.java b/src/main/java/no/nibio/vips/logic/service/JacksonConfig.java
index 36f6ccfa78488268e566d3ca9ca4148328f972d9..78a7a337f55e22944a9e75a914bf8b98259643ca 100755
--- a/src/main/java/no/nibio/vips/logic/service/JacksonConfig.java
+++ b/src/main/java/no/nibio/vips/logic/service/JacksonConfig.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.service;
diff --git a/src/main/java/no/nibio/vips/logic/service/LogicService.java b/src/main/java/no/nibio/vips/logic/service/LogicService.java
index 8e424b9065f83dc0a7ee64564f8c7969658ca454..f6802571fb0edd4b9471c3b55e211935922e8be1 100755
--- a/src/main/java/no/nibio/vips/logic/service/LogicService.java
+++ b/src/main/java/no/nibio/vips/logic/service/LogicService.java
@@ -1,48 +1,44 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.service;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ibm.icu.util.ULocale;
 import com.webcohesion.enunciate.metadata.Facet;
 import com.webcohesion.enunciate.metadata.rs.TypeHint;
-import java.util.TimeZone;
+
+import java.io.IOException;
+import java.util.*;
+
 import de.micromata.opengis.kml.v_2_2_0.Kml;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.logging.Logger;
 import java.util.stream.Collectors;
 import javax.ejb.EJB;
+import javax.persistence.NonUniqueResultException;
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
+import javax.ws.rs.*;
 import javax.ws.rs.client.Client;
 import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
@@ -53,37 +49,25 @@ import javax.ws.rs.core.Response.Status;
 import no.nibio.vips.coremanager.service.ManagerResource;
 import no.nibio.vips.entity.WeatherObservation;
 import no.nibio.vips.logic.authenticate.PasswordValidationException;
-import no.nibio.vips.logic.controller.session.ForecastBean;
-import no.nibio.vips.logic.controller.session.MessageBean;
-import no.nibio.vips.logic.controller.session.OrganismBean;
-import no.nibio.vips.logic.controller.session.PointOfInterestBean;
-import no.nibio.vips.logic.controller.session.UserBean;
-import no.nibio.vips.logic.entity.CropCategory;
-import no.nibio.vips.logic.entity.CropPest;
-import no.nibio.vips.logic.entity.ForecastResult;
+import no.nibio.vips.logic.controller.servlet.UserController;
+import no.nibio.vips.logic.controller.session.*;
+import no.nibio.vips.logic.entity.*;
 import no.nibio.vips.logic.i18n.SessionLocaleUtil;
-import no.nibio.vips.logic.entity.ForecastConfiguration;
-import no.nibio.vips.logic.entity.ForecastModelConfiguration;
-import no.nibio.vips.logic.entity.Message;
-import no.nibio.vips.logic.entity.MessageTag;
-import no.nibio.vips.logic.entity.ModelInformation;
-import no.nibio.vips.logic.entity.Organism;
-import no.nibio.vips.logic.entity.Organization;
-import no.nibio.vips.logic.entity.PointOfInterest;
-import no.nibio.vips.logic.entity.PointOfInterestType;
-import no.nibio.vips.logic.entity.PointOfInterestWeatherStation;
-import no.nibio.vips.logic.entity.VipsLogicUser;
+import no.nibio.vips.logic.util.Globals;
 import no.nibio.vips.logic.util.SystemTime;
 import no.nibio.vips.observationdata.ObservationDataBean;
 import no.nibio.vips.util.CSVPrintUtil;
 import no.nibio.vips.util.ServletUtil;
 import no.nibio.vips.util.SolarRadiationUtil;
+import no.nibio.web.forms.FormValidationException;
 import org.jboss.resteasy.annotations.GZIP;
 import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
 import org.jboss.resteasy.spi.HttpRequest;
 
+import org.apache.commons.validator.routines.EmailValidator;
+
 /**
- * @copyright 2013-2022 <a href="http://www.nibio.no/">NIBIO</a>
+ * @copyright 2013-2023 <a href="http://www.nibio.no/">NIBIO</a>
  * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
  */
 @Path("rest")
@@ -1337,6 +1321,186 @@ public class LogicService {
         return retVal != null ? Response.ok().entity(retVal).build() 
                 : Response.status(Response.Status.NOT_FOUND).entity("ERROR: Could not find model with id=" + modelId).build();
     }
+
+
+    /**
+     * Registers a user and grants limited access to certain functionalities in the VIPSLogic system:
+     * <ul>
+     *     <li>Adding observations - default not approved</li>
+     *     <li>Adding POIs (Points Of Interest)</li>
+     * </ul>
+     * The user must be approved
+     * @param userInfoBody
+     * @return
+     */
+    @POST
+    @Path("user/register")
+    @Consumes("application/json;charset=UTF-8")
+    @Produces("application/json;charset=UTF-8")
+    public Response registerNewLimitedUser(String userInfoBody)
+    {
+
+        try {
+            HashMap<String, Object> userInfo = new ObjectMapper().readValue(userInfoBody, new TypeReference<HashMap<String, Object>>() {
+            });
+            // Input control
+            List<String> errorMessages = new ArrayList<>();
+            // Email
+
+            String email = ((String) userInfo.get("email")).toLowerCase();
+            // Set?
+            if(email == null || email.isBlank())
+            {
+                errorMessages.add("Email must be set");
+            }
+            // Must be valid email
+            else if(!EmailValidator.getInstance().isValid(email))
+            {
+                errorMessages.add(email + " is not a valid email address");
+            }
+            else
+            {
+                // Must be unique
+                Boolean emailAlreadyInUse = false;
+                try {
+                    VipsLogicUser foundUser = userBean.getUserByEmail(email);
+                    emailAlreadyInUse = (foundUser != null);
+                } catch (NonUniqueResultException ex) {
+                    emailAlreadyInUse = true;
+                }
+                if (emailAlreadyInUse) {
+                    errorMessages.add("Email " + email + " is already in use");
+                }
+            }
+
+            // Username
+            String username = (String) userInfo.get("username");
+            // Set?
+            if(username == null || username.isBlank())
+            {
+                errorMessages.add("Username must be set");
+            }
+            else
+            {
+                // Existing username?
+                Boolean usernameExists = false;
+                try
+                {
+                    VipsLogicUser foundUser = userBean.getUser(username, UserAuthenticationType.TYPE_PASSWORD);
+                    usernameExists = (foundUser != null);
+                }
+                catch(NonUniqueResultException ex)
+                {
+                    usernameExists = true;
+                }
+                if(usernameExists)
+                {
+                    errorMessages.add("Username " + username  + " already exists");
+                }
+            }
+
+            // First name
+            String firstName = (String) userInfo.get("firstName");
+            if(firstName == null || firstName.isBlank())
+            {
+                errorMessages.add("First name must be set");
+            }
+
+            // Last name
+            String lastName = (String) userInfo.get("lastName");
+            if(lastName == null || lastName.isBlank())
+            {
+                errorMessages.add("Last name must be set");
+            }
+
+
+            // Password
+            String password = (String) userInfo.get("password");
+            if(password == null || password.isBlank())
+            {
+                errorMessages.add("Password must be set");
+            }
+
+            if(errorMessages.size() > 0)
+            {
+                Map<String, List<String>> errorMsg = Map.of("errorMessages",errorMessages);
+                return Response.status(Status.BAD_REQUEST).entity(errorMsg).build();
+            }
+
+            VipsLogicUser user = new VipsLogicUser();
+            user.setFirstName(firstName.trim());
+            user.setLastName(lastName.trim());
+            user.setEmail(email.trim());
+            user.setPhoneCountryCode((String) userInfo.get("phoneCountryCode"));
+            user.setPreferredLocale((String) userInfo.get("preferredLocale"));
+            user.setOrganizationId(userBean.getOrganization((Integer) userInfo.get("organizationId")));
+            user.setApprovalApplication("Registered in app");
+            user.setUserStatusId(Globals.USER_STATUS_AWAITING_EMAIL_VERIFICATION);
+            // Add observer role
+            user.setVipsLogicRoles(Set.of(userBean.getVipsLogicRole(VipsLogicRole.OBSERVER)));
+            // Set user authentication
+            UserAuthenticationType uat = userBean.createUserAuthenticationTypeInstance(UserAuthenticationType.TYPE_PASSWORD);
+            UserAuthentication ua = new UserAuthentication();
+            ua.setUserAuthenticationType(uat);
+            ua.setUsername(username.trim());
+            ua.setPassword(userBean.getMD5EncryptedString(password.trim()));
+            userBean.storeUserFirstTime(user, ua);
+            userBean.sendUserEmailVerification(user, SessionLocaleUtil.getI18nBundle(httpServletRequest), ServletUtil.getServerName(httpServletRequest));
+
+            return Response.status(Status.OK).entity(user).build();
+        }
+        catch(FormValidationException | IOException ex)
+        {
+            return Response.status(Status.BAD_REQUEST).entity("INPUT ERROR: " + ex.getMessage()).build();
+        }
+    }
+
+    /**
+     * Allows a user to delete their account
+     * @param keepData if true, move all data to default user.
+     * @return
+     */
+    @DELETE
+    @Path("user/deleteme")
+    public Response deleteMe(@QueryParam("keepData") Boolean keepData) {
+        // Authentication
+        // Either valid UUID or session
+        VipsLogicUser user = userBean.getUserFromUUID(httpServletRequest);
+        if(user == null)
+        {
+            user = (VipsLogicUser) httpServletRequest.getSession().getAttribute("user");
+        }
+        if(user == null)
+        {
+            return Response.status(Status.UNAUTHORIZED).entity("You are not authorized to perform this operation").build();
+        }
+
+        // If it's an archive user, do NOT delete it!
+        if(user.getOrganizationId().getArchiveUser() != null && user.getOrganizationId().getArchiveUser().getUserId().equals(user.getUserId()))
+        {
+            return Response.status(Status.BAD_REQUEST).entity("User is an archive user for organization " + user.getOrganizationId().getOrganizationName() + ". Can't delete it").build();
+        }
+        try {
+            if (keepData != null && keepData) {
+                // Get default user for organization
+                VipsLogicUser archiveUser = user.getOrganizationId().getArchiveUser();
+                if (archiveUser == null) {
+                    return Response.status(Status.BAD_REQUEST).entity("Your organization " + user.getOrganizationId().getOrganizationName() + " has not defined a default user for archiving your data. Please contact your systems administrator to fix this.").build();
+                }
+                userBean.transferUserResources(user, archiveUser);
+            } else {
+                userBean.deleteUserResources(user);
+            }
+            // Delete the user
+            userBean.deleteUser(user);
+            return Response.status(Status.NO_CONTENT).build();
+        }
+        catch(DeleteUserException ex)
+        {
+            return Response.serverError().entity(ex.getMessage()).build();
+        }
+
+    }
     
     /**
      * Get the client to use for calling VIPSCoreManager REST services programmatically
diff --git a/src/main/java/no/nibio/vips/logic/service/ModelFormService.java b/src/main/java/no/nibio/vips/logic/service/ModelFormService.java
index 8e2ba459c11b75911a60007938c09b4fcf7a2afd..c4726bdb2604e0a585d443614029e6fe17c60307 100644
--- a/src/main/java/no/nibio/vips/logic/service/ModelFormService.java
+++ b/src/main/java/no/nibio/vips/logic/service/ModelFormService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.service;
diff --git a/src/main/java/no/nibio/vips/logic/service/ObservationService.java b/src/main/java/no/nibio/vips/logic/service/ObservationService.java
index a817a8daaf04cd96a2e42715967fe33f8890b87e..d7a51f2c35f3d974019d09990e3893ff00f58912 100755
--- a/src/main/java/no/nibio/vips/logic/service/ObservationService.java
+++ b/src/main/java/no/nibio/vips/logic/service/ObservationService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.service;
@@ -126,8 +125,8 @@ public class ObservationService {
             @QueryParam("cropId") Integer cropId,
             @QueryParam("cropCategoryId") List<Integer> cropCategoryId,
             @QueryParam("from") String fromStr,
-            @QueryParam("to") String toStr
-            
+            @QueryParam("to") String toStr,
+            @QueryParam("isPositive") Boolean isPositive
     )
     {
         return Response.ok().entity(getFilteredObservationsFromBackend(
@@ -136,7 +135,8 @@ public class ObservationService {
                 cropId,
                 cropCategoryId,
                 fromStr,
-                toStr
+                toStr,
+                isPositive
         )).build();
     }
     
@@ -163,7 +163,8 @@ public class ObservationService {
             @QueryParam("from") String fromStr,
             @QueryParam("to") String toStr,
             @QueryParam("userUUID") String userUUID,
-            @QueryParam("locale") String localeStr
+            @QueryParam("locale") String localeStr,
+            @QueryParam("isPositive") Boolean isPositive
     )
     {
         VipsLogicUser user = (VipsLogicUser) httpServletRequest.getSession().getAttribute("user");
@@ -175,7 +176,7 @@ public class ObservationService {
         ULocale locale = new ULocale(localeStr != null ? localeStr : 
         	user != null ? user.getOrganizationId().getDefaultLocale() : 
         		userBean.getOrganization(organizationId).getDefaultLocale());
-        
+
         List<ObservationListItem> observations = getFilteredObservationsFromBackend(
                         organizationId,
                         pestId,
@@ -183,6 +184,7 @@ public class ObservationService {
                         cropCategoryId,
                         fromStr,
                         toStr,
+                        isPositive,
                         user
                 ).stream().map(obs -> { 
                     try {
@@ -199,7 +201,6 @@ public class ObservationService {
 						return null;
 					}
                 }).collect(Collectors.toList());
-        
         //o.setObservationDataSchema(observationBean.getObservationDataSchema(observer.getOrganizationId().getOrganizationId(), o.getOrganismId()));
         return Response.ok().entity(observations).build();
     }
@@ -220,7 +221,8 @@ public class ObservationService {
             Integer cropId,
             List<Integer> cropCategoryId,
             String fromStr,
-            String toStr
+            String toStr,
+            Boolean isPositive
     )
     {
         SimpleDateFormat format = new SimpleDateFormat(Globals.defaultDateFormat);
@@ -240,7 +242,8 @@ public class ObservationService {
             cropId,
             cropCategoryId,
             from,
-            to
+            to,
+            isPositive
         );
         
     }
@@ -366,7 +369,8 @@ public class ObservationService {
             @QueryParam("cropId") Integer cropId,
             @QueryParam("cropCategoryId") List<Integer> cropCategoryId,
             @QueryParam("from") String fromStr,
-            @QueryParam("to") String toStr
+            @QueryParam("to") String toStr,
+            @QueryParam("to") Boolean isPositive
             
     )
     {
@@ -387,7 +391,8 @@ public class ObservationService {
             cropId,
             cropCategoryId,
             from,
-            to
+            to,
+            isPositive
         );
         
         GISEntityUtil gisUtil = new GISEntityUtil();
@@ -758,16 +763,17 @@ public class ObservationService {
             List<Integer> cropCategoryId,
             String fromStr,
             String toStr,
+            Boolean isPositive,
             VipsLogicUser user
     ) {
-        List<Observation> filteredObservations = this.getFilteredObservationsFromBackend(organizationId, pestId, cropId, cropCategoryId, fromStr, toStr);
+        List<Observation> filteredObservations = this.getFilteredObservationsFromBackend(organizationId, pestId, cropId, cropCategoryId, fromStr, toStr, isPositive);
         //filteredObservations.forEach(o->System.out.println(o.getObservationId()));
         // If superuser or orgadmin: Return everything, unchanged, uncensored
         if(user != null && (user.isSuperUser() || user.isOrganizationAdmin()))
         {
             return filteredObservations;
         }
-        List<Observation> retVal = filteredObservations.stream().filter(obs->obs.getBroadcastMessage()).collect(Collectors.toList());
+        List<Observation> retVal = filteredObservations.stream().filter(obs->obs.getBroadcastMessage() || (isPositive == null || !isPositive)).collect(Collectors.toList());
         //retVal.forEach(o->System.out.println(o.getObservationId()));
         retVal = this.maskObservations(retVal);
         //retVal.forEach(o->System.out.println(o.getObservationId()));
@@ -792,7 +798,7 @@ public class ObservationService {
         
         // Placing all observations with a polygon service in the correct bucket.
         Map<PolygonService, List<Observation>> registeredPolygonServicesInObservationList = new HashMap<>();
-        observations.stream().filter((obs) -> (!obs.getLocationIsPrivate() && obs.getPolygonService() != null)).forEachOrdered((obs) -> {
+        observations.stream().filter((obs) -> { return (!obs.getLocationIsPrivate() && obs.getPolygonService() != null);}).forEachOrdered((obs) -> {
             List<Observation> obsWithPolyServ = registeredPolygonServicesInObservationList.getOrDefault(obs.getPolygonService(), new ArrayList<>());
             obsWithPolyServ.add(obs);
             registeredPolygonServicesInObservationList.put(obs.getPolygonService(), obsWithPolyServ);
@@ -932,6 +938,7 @@ public class ObservationService {
 					mergeObs.setCropOrganism(organismBean.getOrganism((Integer)mapFromApp.get("cropOrganismId")));
 					// Other properties
 					mergeObs.setTimeOfObservation(oM.convertValue(mapFromApp.get("timeOfObservation"), new TypeReference<Date>(){}));
+                    mergeObs.setIsPositive(mapFromApp.get("isPositive") != null ? (Boolean) mapFromApp.get("isPositive") : false);
 					mergeObs.setUserId(mapFromApp.get("userId") != null ? Integer.valueOf((Integer)mapFromApp.get("userId")): user.getUserId());
 					mergeObs.setGeoinfo((String)mapFromApp.get("geoinfo"));
 					mergeObs.setLocationPointOfInterestId(mapFromApp.get("locationPointOfInterestId") != null ? (Integer) mapFromApp.get("locationPointOfInterestId") : null);
diff --git a/src/main/java/no/nibio/vips/logic/service/POIService.java b/src/main/java/no/nibio/vips/logic/service/POIService.java
index 62da58eb1ee1053882b1591a24c1157eeaf8836f..e84089cc9235d2b80849ad1e51729727e6adfaed 100644
--- a/src/main/java/no/nibio/vips/logic/service/POIService.java
+++ b/src/main/java/no/nibio/vips/logic/service/POIService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.service;
 
@@ -46,6 +45,9 @@ import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.webcohesion.enunciate.metadata.Facet;
 import com.webcohesion.enunciate.metadata.rs.TypeHint;
+import java.util.Arrays;
+import java.util.stream.Collectors;
+import javax.ws.rs.QueryParam;
 
 import no.nibio.vips.gis.GISUtil;
 import no.nibio.vips.logic.entity.Country;
@@ -97,6 +99,27 @@ public class POIService {
         PointOfInterest retVal = SessionControllerGetter.getPointOfInterestBean().getPointOfInterest(pointOfInterestId);
         return Response.ok().entity(retVal).build();
     }
+    
+    /**
+     * @param organizationId Id of the organization in question
+     * @param poiTypesStr Comma separated list of poiTypes
+     * @return GeoJson with pois filtered by organization and type
+     */
+    @GET
+    @Path("organization/{organizationId}/type/geojson")
+    @Produces("application/json;charset=UTF-8")
+    @TypeHint(PointOfInterest.class)
+    public Response getPoisByPoiTypesAsGeoJson(
+            @PathParam("organizationId") Integer organizationId,
+            @QueryParam("poiTypes") String poiTypesStr
+    )
+    {
+        List<Integer> poiTypes = Arrays.asList(poiTypesStr.split(",")).stream().map(str->Integer.valueOf(str)).collect(Collectors.toList());
+        Organization organization = SessionControllerGetter.getUserBean().getOrganization(organizationId);
+        List<PointOfInterest> pois = SessionControllerGetter.getPointOfInterestBean().getPoisForOrganizationAndOfTypes(organization, poiTypes); 
+        
+        return Response.ok().entity(SessionControllerGetter.getPointOfInterestBean().getPoisAsGeoJson(pois)).build();
+    }
 
     /**
      * Find a POI (Point of interest) by name
@@ -173,7 +196,7 @@ public class POIService {
                 }
             } else {
                 PointOfInterest mergePoi = ((Integer) mapFromApp.get("pointOfInterestId")) > 0 ? SessionControllerGetter.getPointOfInterestBean().getPointOfInterest((Integer) mapFromApp.get("pointOfInterestId")) : PointOfInterest.getInstance((Integer) mapFromApp.get("pointOfInterestTypeId"));
-                // Trying to sync a non-existing observation
+                // Trying to sync a non-existing POI
                 if (mergePoi == null) {
                     return Response.status(Status.NOT_FOUND).build();
                 }
diff --git a/src/main/java/no/nibio/vips/logic/service/VIPSMobileService.java b/src/main/java/no/nibio/vips/logic/service/VIPSMobileService.java
index d358d330c86a6535378a8f00eea8dd85eff0e181..2c8c8736c20f8b841343270040a2384c5fb801c3 100755
--- a/src/main/java/no/nibio/vips/logic/service/VIPSMobileService.java
+++ b/src/main/java/no/nibio/vips/logic/service/VIPSMobileService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.service;
diff --git a/src/main/java/no/nibio/vips/logic/startup/StartupListener.java b/src/main/java/no/nibio/vips/logic/startup/StartupListener.java
index 867b13091dde228eefa0736b21b341d1944490b3..6e3c8b333f7898ab6f5c47ae6f48c628459a5b87 100755
--- a/src/main/java/no/nibio/vips/logic/startup/StartupListener.java
+++ b/src/main/java/no/nibio/vips/logic/startup/StartupListener.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.startup;
diff --git a/src/main/java/no/nibio/vips/logic/util/CorsProxyServlet.java b/src/main/java/no/nibio/vips/logic/util/CorsProxyServlet.java
index 199866730f40ef71e07acff6fbcd85d6a2d6d56b..e8d735e5345dd36b4dd3db89941470be9e026a4a 100644
--- a/src/main/java/no/nibio/vips/logic/util/CorsProxyServlet.java
+++ b/src/main/java/no/nibio/vips/logic/util/CorsProxyServlet.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/DOMUtils.java b/src/main/java/no/nibio/vips/logic/util/DOMUtils.java
index 943133030ae2ac905967ed1730a46607a544104b..4a2db33e90fafb2084918871a6712a5a2320db0d 100755
--- a/src/main/java/no/nibio/vips/logic/util/DOMUtils.java
+++ b/src/main/java/no/nibio/vips/logic/util/DOMUtils.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/GISEntityUtil.java b/src/main/java/no/nibio/vips/logic/util/GISEntityUtil.java
index a1e95eb46d43e7adab4e72bab32d549a0898858a..18ce9e2f1aad8ccb9173e825cdb3bf3c99ac5368 100755
--- a/src/main/java/no/nibio/vips/logic/util/GISEntityUtil.java
+++ b/src/main/java/no/nibio/vips/logic/util/GISEntityUtil.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/Globals.java b/src/main/java/no/nibio/vips/logic/util/Globals.java
index deca7fac8621bceae03ac4377023389bfc14ef26..5df921d588522ce8c31fcbf4d235b4eafdc7657b 100755
--- a/src/main/java/no/nibio/vips/logic/util/Globals.java
+++ b/src/main/java/no/nibio/vips/logic/util/Globals.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
@@ -68,7 +67,7 @@ public class Globals {
     public static String defaultTimestampFormat = "yyyy-MM-dd HH:mm:ssXXX";
     public static String defaultDateFormat = "yyyy-MM-dd";
     
-    public static int DEFAULT_UUID_VALIDITY_DURATION_DAYS = 30;
+    public static int DEFAULT_UUID_VALIDITY_DURATION_DAYS = 60;
     
     public static String PROTOCOL = System.getProperty("no.nibio.vips.logic.VIPSLOGIC_PROTOCOL","http");
 
diff --git a/src/main/java/no/nibio/vips/logic/util/HierarchyCategoryLocaleNames.java b/src/main/java/no/nibio/vips/logic/util/HierarchyCategoryLocaleNames.java
index 791d605a58b0ac688a1042fd2aca926f143abe88..3918f9d8f93a91c3bebe1e22e19778e5aa5b382e 100755
--- a/src/main/java/no/nibio/vips/logic/util/HierarchyCategoryLocaleNames.java
+++ b/src/main/java/no/nibio/vips/logic/util/HierarchyCategoryLocaleNames.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/IntegerArrayUserType.java b/src/main/java/no/nibio/vips/logic/util/IntegerArrayUserType.java
index 876cb12003bdd0440c2fcaec1a49202f8346009b..94ea3338fd130ee6b915935a663404cfca488ee2 100755
--- a/src/main/java/no/nibio/vips/logic/util/IntegerArrayUserType.java
+++ b/src/main/java/no/nibio/vips/logic/util/IntegerArrayUserType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/JsonPostgreSQLDialect.java b/src/main/java/no/nibio/vips/logic/util/JsonPostgreSQLDialect.java
index ec41d5de02b55b86c9b203fbf48c96c598c86b30..2e7dda6a31abe3dec1d7ec726d5e07ad6fbb52d1 100755
--- a/src/main/java/no/nibio/vips/logic/util/JsonPostgreSQLDialect.java
+++ b/src/main/java/no/nibio/vips/logic/util/JsonPostgreSQLDialect.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/PostgresJSONStringConverter.java b/src/main/java/no/nibio/vips/logic/util/PostgresJSONStringConverter.java
index 7faae61a328e9765381b23e0b808c068ab348b1c..d269df6fb18f0bfa4c6e6bbda6e6e8d7f35c700b 100755
--- a/src/main/java/no/nibio/vips/logic/util/PostgresJSONStringConverter.java
+++ b/src/main/java/no/nibio/vips/logic/util/PostgresJSONStringConverter.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/RESTAuthenticator.java b/src/main/java/no/nibio/vips/logic/util/RESTAuthenticator.java
index 0c2f05c28379136d4c4c0761b1e3df92ea43fd3a..c17fc1af77255b59234bd617fb832369a985d3bf 100755
--- a/src/main/java/no/nibio/vips/logic/util/RESTAuthenticator.java
+++ b/src/main/java/no/nibio/vips/logic/util/RESTAuthenticator.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSCommon.
- * VIPSCommon is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSCommon is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSCommon.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/RunModelException.java b/src/main/java/no/nibio/vips/logic/util/RunModelException.java
index 4701e2d4951c6c47cf2c3238173694781ebef397..19edb617dff6bdbe272461cf8e0b783e7897e3c9 100755
--- a/src/main/java/no/nibio/vips/logic/util/RunModelException.java
+++ b/src/main/java/no/nibio/vips/logic/util/RunModelException.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/SimpleMailSender.java b/src/main/java/no/nibio/vips/logic/util/SimpleMailSender.java
index dcdf58f366da7dfdec7237109d0c563f689d485c..682a18a10fa4557c17d396db997d18aa517cd77f 100755
--- a/src/main/java/no/nibio/vips/logic/util/SimpleMailSender.java
+++ b/src/main/java/no/nibio/vips/logic/util/SimpleMailSender.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/StringJsonUserType.java b/src/main/java/no/nibio/vips/logic/util/StringJsonUserType.java
index 8dffa05bb6bcc34fa5552cabc7337636d2f94475..1672d607cbfc160fe8502e5482b303e656010a70 100755
--- a/src/main/java/no/nibio/vips/logic/util/StringJsonUserType.java
+++ b/src/main/java/no/nibio/vips/logic/util/StringJsonUserType.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/StringUtils.java b/src/main/java/no/nibio/vips/logic/util/StringUtils.java
index 29848396416a9a32bcb5ca44f3ab665c929948bd..890a8af2fcd739a348ece226478cb17fb3693d5a 100755
--- a/src/main/java/no/nibio/vips/logic/util/StringUtils.java
+++ b/src/main/java/no/nibio/vips/logic/util/StringUtils.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/util/SystemTime.java b/src/main/java/no/nibio/vips/logic/util/SystemTime.java
index e0a545dfa008f8513a24e5265895fda9e2ab8920..ac158aa400e4ffab1d6f7b00eb9af680707d910c 100755
--- a/src/main/java/no/nibio/vips/logic/util/SystemTime.java
+++ b/src/main/java/no/nibio/vips/logic/util/SystemTime.java
@@ -1,20 +1,19 @@
  /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.util;
diff --git a/src/main/java/no/nibio/vips/logic/web/TemplateConfigFilter.java b/src/main/java/no/nibio/vips/logic/web/TemplateConfigFilter.java
index 09f06becf32426982c00cb032423c23766a4962d..8de57a78a1212ee18130d3d5e3ff6078c3494314 100755
--- a/src/main/java/no/nibio/vips/logic/web/TemplateConfigFilter.java
+++ b/src/main/java/no/nibio/vips/logic/web/TemplateConfigFilter.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.web;
diff --git a/src/main/java/no/nibio/vips/logic/web/js/JSEnvironment.java b/src/main/java/no/nibio/vips/logic/web/js/JSEnvironment.java
index 2db214be6575e06479be9164c85d70315cd17518..9c0683c6bac787a30ba234ca77171dd5f21cecd0 100755
--- a/src/main/java/no/nibio/vips/logic/web/js/JSEnvironment.java
+++ b/src/main/java/no/nibio/vips/logic/web/js/JSEnvironment.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.web.js;
diff --git a/src/main/java/no/nibio/vips/observationdata/ObservationDataBean.java b/src/main/java/no/nibio/vips/observationdata/ObservationDataBean.java
index f8e1d2ee85b82ff211557b381f4553db9ffaa9cd..357d5924bc150f6d263631a3db637cfcd2ea45ea 100644
--- a/src/main/java/no/nibio/vips/observationdata/ObservationDataBean.java
+++ b/src/main/java/no/nibio/vips/observationdata/ObservationDataBean.java
@@ -14,6 +14,7 @@ import javax.persistence.PersistenceContext;
 import javax.servlet.http.HttpServletRequest;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -86,6 +87,29 @@ public class ObservationDataBean {
 			return m.createObjectNode();
 		}
     }
+
+	public JsonNode getDataModel(Integer organizationId, Integer organismId)
+	{
+		ObjectMapper m = new ObjectMapper();
+
+		JsonNode rootNode = null;
+		try {
+			try {
+				//System.out.println("organizationId = " + organizationId + ", organismId = " + organismId);
+				ObservationDataSchema ods = em.createNamedQuery("ObservationDataSchema.findByPK", ObservationDataSchema.class)
+						.setParameter("organizationId", organizationId)
+						.setParameter("organismId", organismId)
+						.getSingleResult();
+				rootNode = m.readTree(ods.getDataModel());
+			} catch (NoResultException ex) {
+				rootNode = m.readTree(this.getStandardModel());
+			}
+		}catch (JsonProcessingException ex)
+		{
+			return null;
+		}
+		return rootNode;
+	}
     
 	
 	public String getStandardSchema(){
@@ -119,6 +143,7 @@ public class ObservationDataBean {
 	    	for(Organism pest:pests)
 	    	{
 	    		pest.setObservationDataSchema(om.writeValueAsString(this.getSchema(organizationId, pest.getOrganismId(), bundle)));
+				pest.setObservationData(om.writeValueAsString(this.getDataModel(organizationId, pest.getOrganismId())));
 	    	}
 	    	return pests;
     	}
diff --git a/src/main/java/no/nibio/vips/observationdata/ObservationDataSchema.java b/src/main/java/no/nibio/vips/observationdata/ObservationDataSchema.java
index df6143ea59c734dd5413b6826581748735be444b..7243432516effd348cc842f2ed91040e34d919cc 100755
--- a/src/main/java/no/nibio/vips/observationdata/ObservationDataSchema.java
+++ b/src/main/java/no/nibio/vips/observationdata/ObservationDataSchema.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.observationdata;
diff --git a/src/main/java/no/nibio/vips/observationdata/ObservationDataSchemaPK.java b/src/main/java/no/nibio/vips/observationdata/ObservationDataSchemaPK.java
index 14ff51976596b310cf016892020f343595a438cf..9fdaaa02b6b66b74fdc4becb6047df393767a91e 100755
--- a/src/main/java/no/nibio/vips/observationdata/ObservationDataSchemaPK.java
+++ b/src/main/java/no/nibio/vips/observationdata/ObservationDataSchemaPK.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.observationdata;
diff --git a/src/main/java/no/nibio/vips/observationdata/ObservationDataService.java b/src/main/java/no/nibio/vips/observationdata/ObservationDataService.java
index d4475d1307cbe908e94e99bd5395e2af3fd3828d..b2143e09d2854f519c017690bae8d1a1725da42d 100755
--- a/src/main/java/no/nibio/vips/observationdata/ObservationDataService.java
+++ b/src/main/java/no/nibio/vips/observationdata/ObservationDataService.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.observationdata;
diff --git a/src/main/java/no/nibio/vips/util/weather/FMIWeatherForecastprovider.java b/src/main/java/no/nibio/vips/util/weather/FMIWeatherForecastprovider.java
index 9915633a46dda34dce8d3a12ad8f4efacb792e92..27dedb1069f3e44bbb67a9a75fbf34aa694228e3 100644
--- a/src/main/java/no/nibio/vips/util/weather/FMIWeatherForecastprovider.java
+++ b/src/main/java/no/nibio/vips/util/weather/FMIWeatherForecastprovider.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.util.weather;
diff --git a/src/main/java/no/nibio/vips/util/weather/ParseWeatherDataException.java b/src/main/java/no/nibio/vips/util/weather/ParseWeatherDataException.java
index a87a8c1934cc58039810e42de401f11cbbd4abbb..83ea15c38bb3407aef80638b67e0d693fa65ccbb 100755
--- a/src/main/java/no/nibio/vips/util/weather/ParseWeatherDataException.java
+++ b/src/main/java/no/nibio/vips/util/weather/ParseWeatherDataException.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.util.weather;
diff --git a/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceException.java b/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceException.java
index b813f8a570a2697e6df5e138c2e8005436711606..4b954e1534c5bd7c373030f1d8d0cb1ed41fb6c2 100755
--- a/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceException.java
+++ b/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceException.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.util.weather;
diff --git a/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceUtil.java b/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceUtil.java
index a3f51863d0a81c2961b954f19c1e5746e555fe32..dd9eb671e3f25f4825265a19beb7154542e1467b 100755
--- a/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceUtil.java
+++ b/src/main/java/no/nibio/vips/util/weather/WeatherDataSourceUtil.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.util.weather;
diff --git a/src/main/java/no/nibio/vips/util/weather/WeatherForecastProvider.java b/src/main/java/no/nibio/vips/util/weather/WeatherForecastProvider.java
index c83050d49c16b4fc1f56f03af66c1c5faa4777e1..f3e9efe73d36ce302422dc72b3563483663f1053 100755
--- a/src/main/java/no/nibio/vips/util/weather/WeatherForecastProvider.java
+++ b/src/main/java/no/nibio/vips/util/weather/WeatherForecastProvider.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.util.weather;
diff --git a/src/main/java/no/nibio/vips/util/weather/WeatherStationProviderFactory.java b/src/main/java/no/nibio/vips/util/weather/WeatherStationProviderFactory.java
index cc3117be6f9750f8e6025a98c05032fdced23c23..02dda2dd35b038157903b6f6f4c1e7413ce12617 100755
--- a/src/main/java/no/nibio/vips/util/weather/WeatherStationProviderFactory.java
+++ b/src/main/java/no/nibio/vips/util/weather/WeatherStationProviderFactory.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.util.weather;
diff --git a/src/main/java/no/nibio/vips/util/weather/YrWeatherForecastProvider.java b/src/main/java/no/nibio/vips/util/weather/YrWeatherForecastProvider.java
index 9a60d40d865cd9ef329c5dbd93e3a4d0034f4e16..4f2c4f76107d4e7858b45b614d8d1502c7ea604d 100755
--- a/src/main/java/no/nibio/vips/util/weather/YrWeatherForecastProvider.java
+++ b/src/main/java/no/nibio/vips/util/weather/YrWeatherForecastProvider.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.util.weather;
diff --git a/src/main/java/no/nibio/web/forms/FormField.java b/src/main/java/no/nibio/web/forms/FormField.java
index b99a15e2e90f75591b54a3bad0f4e7b101c1d043..b40450e30e5cab19ccf569e6dd75447477f157f5 100755
--- a/src/main/java/no/nibio/web/forms/FormField.java
+++ b/src/main/java/no/nibio/web/forms/FormField.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.web.forms;
diff --git a/src/main/java/no/nibio/web/forms/FormSelectOption.java b/src/main/java/no/nibio/web/forms/FormSelectOption.java
index 941ae5a03473b68ca6dcc33d071c0d67655e40eb..ca5a41e07bb711bf1bcb66684459d54d1608b820 100755
--- a/src/main/java/no/nibio/web/forms/FormSelectOption.java
+++ b/src/main/java/no/nibio/web/forms/FormSelectOption.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.web.forms;
diff --git a/src/main/java/no/nibio/web/forms/FormUtil.java b/src/main/java/no/nibio/web/forms/FormUtil.java
index 77d258964ea5e08102f7ea2e6f6ca9f4e4b4a206..26cac47f96399f147b93bc21535cf14887760b8f 100755
--- a/src/main/java/no/nibio/web/forms/FormUtil.java
+++ b/src/main/java/no/nibio/web/forms/FormUtil.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.web.forms;
diff --git a/src/main/java/no/nibio/web/forms/FormValidation.java b/src/main/java/no/nibio/web/forms/FormValidation.java
index e3b75a1df425962a0ee8233bee16d8f8c4312ed9..5926057aa73eca7848b181fdbaa76ce9bc7569ef 100755
--- a/src/main/java/no/nibio/web/forms/FormValidation.java
+++ b/src/main/java/no/nibio/web/forms/FormValidation.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.web.forms;
diff --git a/src/main/java/no/nibio/web/forms/FormValidationException.java b/src/main/java/no/nibio/web/forms/FormValidationException.java
index 7fe7e715b8b9ce3e9762d857d5fc76187bcbdd5b..e23f116f1d9edafeece38d18b3335a6832d49cec 100755
--- a/src/main/java/no/nibio/web/forms/FormValidationException.java
+++ b/src/main/java/no/nibio/web/forms/FormValidationException.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.web.forms;
diff --git a/src/main/java/no/nibio/web/forms/FormValidator.java b/src/main/java/no/nibio/web/forms/FormValidator.java
index 34a349104fbd2e82d648b7b4a414ed5ba94d5168..65214d7edbc41e02477cbba2e8a2532528797d02 100755
--- a/src/main/java/no/nibio/web/forms/FormValidator.java
+++ b/src/main/java/no/nibio/web/forms/FormValidator.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.web.forms;
@@ -44,7 +43,7 @@ import no.nibio.vips.logic.authenticate.PasswordValidationException;
 import no.nibio.vips.logic.controller.session.SessionControllerGetter;
 import no.nibio.vips.logic.controller.session.UserBean;
 import no.nibio.vips.logic.i18n.SessionLocaleUtil;
-import org.apache.commons.validator.EmailValidator;
+import org.apache.commons.validator.routines.EmailValidator;
 
 /**
  * Uses form configuration set in JSON files in [WARFILE]/formdefinitions/, or 
diff --git a/src/main/java/no/nibio/web/forms/HTMLFormGenerator.java b/src/main/java/no/nibio/web/forms/HTMLFormGenerator.java
index 055c6ec9f11f98c66d632a55d2b94db68a1bb846..c963d6a9dd18ec4f7ff74638034b761d76b28d8d 100755
--- a/src/main/java/no/nibio/web/forms/HTMLFormGenerator.java
+++ b/src/main/java/no/nibio/web/forms/HTMLFormGenerator.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.web.forms;
diff --git a/src/main/resources/db/migration/V11__vipscore_instance.sql b/src/main/resources/db/migration/V11__vipscore_instance.sql
new file mode 100644
index 0000000000000000000000000000000000000000..9181f0ac4f1e41f8dd789e8b96948f11cd94ef00
--- /dev/null
+++ b/src/main/resources/db/migration/V11__vipscore_instance.sql
@@ -0,0 +1,30 @@
+-- We are refactoring VIPS to support multiple instances of VIPSCore,
+-- allowing for e.g. implementations in different programming languages,
+-- such as VIPSCore-Python (https://gitlab.nibio.no/VIPS/VIPSCore-Python)
+-- The entity VipsCoreInstance has been added
+-- After this migration, remember to add at least one VIPSCoreInstance in the db
+-- And you can safely delete these system-properties from your config:
+-- * no.nibio.vips.coremanager.VIPSCORE_URL
+-- * no.nibio.vips.logic.CORE_BATCH_USERNAME
+-- * no.nibio.vips.logic.CORE_BATCH_PASSWORD
+
+--ALTER TABLE public.model_information
+--DROP COLUMN vipscore_instance_id;
+
+--DROP TABLE public.vipscore_instance;
+
+CREATE TABLE public.vipscore_instance
+(
+    vipscore_instance_id SERIAL PRIMARY KEY,
+    uri VARCHAR(255),
+    username VARCHAR(255),
+    password VARCHAR(255)
+);
+
+ALTER TABLE public.model_information
+    ADD COLUMN vipscore_instance_id INTEGER REFERENCES public.vipscore_instance(vipscore_instance_id) DEFAULT NULL;
+
+ALTER TABLE if exists public.vipscore_instance
+    OWNER TO vipslogic;
+
+
diff --git a/src/main/resources/db/migration/V12__POI_type_added.sql b/src/main/resources/db/migration/V12__POI_type_added.sql
new file mode 100644
index 0000000000000000000000000000000000000000..fed7797083310f7bd1212b49e5ea462162aff968
--- /dev/null
+++ b/src/main/resources/db/migration/V12__POI_type_added.sql
@@ -0,0 +1,30 @@
+/* 
+ * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
+ * 
+ * This file is part of VIPSLogic.
+ *  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 <https://www.gnu.org/licenses/>.
+ * 
+ */
+/**
+ * Author:  Tor-Einar Skog <tor-einar.skog@nibio.no>
+ * Created: May 10th, 2023
+ */
+
+-- Create POI type trap as entity
+CREATE TABLE public.point_of_interest_trap (
+    point_of_interest_id INTEGER REFERENCES public.point_of_interest(point_of_interest_id) PRIMARY KEY REFERENCES public.point_of_interest(point_of_interest_id)
+);
+
+INSERT INTO public.point_of_interest_type (point_of_interest_type_id, default_name)
+VALUES (5, 'Trap');
diff --git a/src/main/resources/db/migration/V13__Observation_add_is_positive.sql b/src/main/resources/db/migration/V13__Observation_add_is_positive.sql
new file mode 100644
index 0000000000000000000000000000000000000000..94e0df2deee20f9e361798614a911699e5a212b2
--- /dev/null
+++ b/src/main/resources/db/migration/V13__Observation_add_is_positive.sql
@@ -0,0 +1,26 @@
+/* 
+ * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
+ * 
+ * This file is part of VIPSLogic.
+ *  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 <https://www.gnu.org/licenses/>.
+ * 
+ */
+/**
+ * Author:  Tor-Einar Skog <tor-einar.skog@nibio.no>
+ * Created: May 16th, 2023
+ */
+
+-- New property on observation: is_positive (FALSE=looked for pest, did not find it)
+ALTER TABLE public.observation
+    ADD COLUMN is_positive BOOLEAN DEFAULT TRUE;
diff --git a/src/main/resources/db/migration/V14__POI_type_added.sql b/src/main/resources/db/migration/V14__POI_type_added.sql
new file mode 100644
index 0000000000000000000000000000000000000000..2fcdf8bbfac14ecb9604a369a713ca1ce9218966
--- /dev/null
+++ b/src/main/resources/db/migration/V14__POI_type_added.sql
@@ -0,0 +1,38 @@
+/* 
+ * Copyright (c) 2020 NIBIO <http://www.nibio.no/>. 
+ * 
+ * This file is part of VIPSLogic.
+ *  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 <https://www.gnu.org/licenses/>.
+ * 
+ */
+/**
+ * Author:  Tor-Einar Skog <tor-einar.skog@nibio.no>
+ * Created: September 18th, 2023
+ */
+
+-- Create POI type apiary site (birøkterplass) as entity
+CREATE TABLE public.point_of_interest_apiary_site (
+    point_of_interest_id INTEGER REFERENCES public.point_of_interest(point_of_interest_id) PRIMARY KEY REFERENCES public.point_of_interest(point_of_interest_id)
+);
+
+INSERT INTO public.point_of_interest_type (point_of_interest_type_id, default_name)
+VALUES (6, 'Apiary site');
+
+-- Create POI type nursery as entity
+CREATE TABLE public.point_of_interest_nursery (
+    point_of_interest_id INTEGER REFERENCES public.point_of_interest(point_of_interest_id) PRIMARY KEY REFERENCES public.point_of_interest(point_of_interest_id)
+);
+
+INSERT INTO public.point_of_interest_type (point_of_interest_type_id, default_name)
+VALUES (7, 'Nursery');
\ No newline at end of file
diff --git a/src/main/resources/db/migration/V15__POI_type_nursery_altered.sql b/src/main/resources/db/migration/V15__POI_type_nursery_altered.sql
new file mode 100644
index 0000000000000000000000000000000000000000..2b7cba02c8bbd8645419f202c5b74be11d91363d
--- /dev/null
+++ b/src/main/resources/db/migration/V15__POI_type_nursery_altered.sql
@@ -0,0 +1,28 @@
+/* 
+ * Copyright (c) 2023 NIBIO <http://www.nibio.no/>. 
+ * 
+ * This file is part of VIPSLogic.
+ *  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 <https://www.gnu.org/licenses/>.
+ * 
+ */
+/**
+ * Author:  Tor-Einar Skog <tor-einar.skog@nibio.no>
+ * Created: September 27th, 2023
+ */
+
+
+
+-- Add property impact_radius to POI type nursery
+ALTER TABLE public.point_of_interest_nursery
+    ADD COLUMN impact_radius DOUBLE PRECISION DEFAULT 0.0;
\ No newline at end of file
diff --git a/src/main/resources/db/migration/V16__POI_type_nursery_altered_rollback.sql b/src/main/resources/db/migration/V16__POI_type_nursery_altered_rollback.sql
new file mode 100644
index 0000000000000000000000000000000000000000..c9179e6a50a79fe39bc829f03f9c07429e22a7b3
--- /dev/null
+++ b/src/main/resources/db/migration/V16__POI_type_nursery_altered_rollback.sql
@@ -0,0 +1,28 @@
+/* 
+ * Copyright (c) 2023 NIBIO <http://www.nibio.no/>. 
+ * 
+ * This file is part of VIPSLogic.
+ *  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 <https://www.gnu.org/licenses/>.
+ * 
+ */
+/**
+ * Author:  Tor-Einar Skog <tor-einar.skog@nibio.no>
+ * Created: September 29th, 2023
+ */
+
+
+
+-- Rollback adding of property impact_radius to POI type nursery
+ALTER TABLE public.point_of_interest_nursery
+    DROP COLUMN impact_radius;
\ No newline at end of file
diff --git a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts.properties b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts.properties
index b97d60170a0935b8a1efe1fec551367afb928403..947d27d17a1f7e8ab711e36c5cc6eda5e01ba2a5 100755
--- a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts.properties
+++ b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts.properties
@@ -389,7 +389,7 @@ isPest = Is pest
 isPrivate = Is private
 
 isQuantified = Is quantified
-
+isPositiveRegistration=Pest presence confirmed
 isRequiredField = Required field
 
 language = Language
@@ -1042,3 +1042,7 @@ allRoles=All roles
 allStatuses=All statuses
 LEAFBLOTCH=Leaf blotch model
 universalMessageSettingsLink_tpl=To edit your notification subscriptions, please use this link: {0}
+pointOfInterestType_5=Trap
+sowingDate=Sowing date
+pointOfInterestType_6=Apiary site
+pointOfInterestType_7=Nursery
diff --git a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_bs.properties b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_bs.properties
index f2572880428953a51d7cf3b0b16fdd1eb3b2e4bb..fe09b88cbada7004a4468ee8063d3c907252ae9d 100755
--- a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_bs.properties
+++ b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_bs.properties
@@ -15,6 +15,7 @@
  # You should have received a copy of the NIBIO Open Source License
  # along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
  # 
+isPositiveRegistration=Pest presence confirmed
 ALTERNARIA = Alternaria Model
 
 APPLESCABM = Apple scab model
@@ -1035,3 +1036,7 @@ allRoles=All roles
 allStatuses=All statuses
 LEAFBLOTCH=Leaf blotch model
 universalMessageSettingsLink_tpl=To edit your VIPS notification subscriptions, please use this link: {0}
+pointOfInterestType_5=Trap
+sowingDate=Sowing date
+pointOfInterestType_6=Apiary site
+pointOfInterestType_7=Nursery
diff --git a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_hr.properties b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_hr.properties
index 34aa7af55b5da0ba8a177adad58bc151a048c0a6..ebcccfcd964e5e8ef78f45865299d0021ea15439 100755
--- a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_hr.properties
+++ b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_hr.properties
@@ -15,7 +15,7 @@
  # You should have received a copy of the NIBIO Open Source License
  # along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
  # 
-
+isPositiveRegistration=Pest presence confirmed
 ALTERNARIA = Alternaria Model
 
 APPLESCABM = Apple scab model
@@ -1034,3 +1034,7 @@ allRoles=All roles
 allStatuses=All statuses
 LEAFBLOTCH=Leaf blotch model
 universalMessageSettingsLink_tpl=To edit your notification subscriptions, please use this link: {0}
+pointOfInterestType_5=Trap
+sowingDate=Sowing date
+pointOfInterestType_6=Apiary site
+pointOfInterestType_7=Nursery
diff --git a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_nb.properties b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_nb.properties
index dbb321573390e03808b79539176f6f3728140b17..2e80c64e0c63746a4921e473ba7af674708ce032 100755
--- a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_nb.properties
+++ b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_nb.properties
@@ -15,8 +15,7 @@
  # You should have received a copy of the NIBIO Open Source License
  # along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
  # 
-
-
+isPositiveRegistration=Skadegj\u00f8rer p\u00e5vist
 ALTERNARIA = Alternariamodell
 
 APPLESCABM = Epleskurvmodell
@@ -593,7 +592,7 @@ observationStored = Observasjonen ble lagret
 
 observationText = Observasjonstekst
 
-observations = Observasjoner
+observations = Observasjoner/f\u00f8rstefunn
 
 observedDateOfFirstCatch = Observert dato for f\u00f8rste fellefangst
 
@@ -823,7 +822,7 @@ submit = Send inn
 
 suggestedUserRole = \u00d8nsket brukertype
 
-surveillanceMessageInformation = Hvis du \u00f8nsker \u00e5 lage en melding om en observasjon/et f\u00f8rstefunn, vennligst bruk <a href="/observation?action=newObservationForm">observasjonsregistreringsskjemaet</a>
+surveillanceMessageInformation = Hvis du \u00f8nsker \u00e5 lage en melding om en observasjon/et f\u00f8rstefunn, vennligst bruk <a href="/observation?action=newObservationForm">observasjonsregistreringsskjemaet</a> eller appen VIPS Feltobservasjoner (Android/iOS)
 
 systemTime = Systemtid
 
@@ -1042,4 +1041,8 @@ addIllustration=Legg til illustrasjon
 allRoles=Alle roller
 allStatuses=Alle statuser
 LEAFBLOTCH=Bladflekksjukdomsmodell
-universalMessageSettingsLink_tpl=For � endre dine abonnement p� push-varsler fra VIPS, bruk denne lenken: {0}
+universalMessageSettingsLink_tpl=For \u00e5 endre dine abonnement p\u00e5 push-varsler fra VIPS, bruk denne lenken: {0}
+pointOfInterestType_5=Felle
+sowingDate=S\u00e5dato
+pointOfInterestType_6=Big\u00e5rdsplass
+pointOfInterestType_7=Planteskole
diff --git a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_sr.properties b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_sr.properties
index bc87ecca6d84dc9faadab56873fe9dfe062c6297..a431e5ecf91a8274168bf9904ea0d6325f72533c 100755
--- a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_sr.properties
+++ b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_sr.properties
@@ -15,7 +15,7 @@
  # You should have received a copy of the NIBIO Open Source License
  # along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
  # 
-
+isPositiveRegistration=Pest presence confirmed
 ALTERNARIA = Alternaria Model
 
 APPLESCABM = Apple scab model
@@ -1036,3 +1036,7 @@ allRoles=All roles
 allStatuses=All statuses
 LEAFBLOTCH=Leaf blotch model
 universalMessageSettingsLink_tpl=To edit your notification subscriptions, please use this link: {0}
+pointOfInterestType_5=Trap
+sowingDate=Sowing date
+pointOfInterestType_6=Apiary site
+pointOfInterestType_7=Nursery
diff --git a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_zh_CN.properties b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_zh_CN.properties
index 3bb3a5d8a33d9557f250e39e15f408ec751cec88..27b7151328d443f6f9e58ca5ac9fc8f9e938ba3a 100755
--- a/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_zh_CN.properties
+++ b/src/main/resources/no/nibio/vips/logic/i18n/vipslogictexts_zh_CN.properties
@@ -15,6 +15,7 @@
  # You should have received a copy of the NIBIO Open Source License
  # along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
  # 
+isPositiveRegistration=Pest presence confirmed
 ALTERNARIA = Alternaria Model
 
 APPLESCABM = \u82f9\u679c\u9ed1\u661f\u75c5\u6a21\u578b
@@ -1029,3 +1030,7 @@ allRoles=All roles
 allStatuses=All statuses
 LEAFBLOTCH=Leaf blotch model
 universalMessageSettingsLink_tpl=To edit your notification subscriptions, please use this link: {0}
+pointOfInterestType_5=Trap
+sowingDate=Sowing date
+pointOfInterestType_6=Apiary site
+pointOfInterestType_7=Nursery
diff --git a/src/main/webapp/formdefinitions/observationForm.json b/src/main/webapp/formdefinitions/observationForm.json
index 652dd4e9b5e55d82104b62dcb438b15b484230c0..d559d505a6448e709b514ea2f8b1b1e4bbcd70d6 100755
--- a/src/main/webapp/formdefinitions/observationForm.json
+++ b/src/main/webapp/formdefinitions/observationForm.json
@@ -69,6 +69,11 @@
             "fieldType" : "SELECT_MULTIPLE",
             "required" : false
         },
+        {
+            "name" : "isPositive",
+            "dataType" : "STRING",
+            "required" : false
+        },
         {
             "name" : "isQuantified",
             "dataType" : "STRING",
diff --git a/src/main/webapp/js/3rdparty/jsoneditor.js b/src/main/webapp/js/3rdparty/jsoneditor.js
new file mode 100644
index 0000000000000000000000000000000000000000..c3a334d2a94ee05196e389d2c94ce732ef51f0c7
--- /dev/null
+++ b/src/main/webapp/js/3rdparty/jsoneditor.js
@@ -0,0 +1,2 @@
+/*! For license information please see jsoneditor.js.LICENSE.txt */
+!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,(()=>(()=>{var t={9662:(t,e,r)=>{var n=r(614),i=r(6330),o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(4411),i=r(6330),o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(614),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),i=r(30),o=r(3070).f,a=n("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:(t,e,r)=>{var n=r(7976),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,r)=>{var n=r(111),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not an object")}},8533:(t,e,r)=>{"use strict";var n=r(2092).forEach,i=r(9341)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,r)=>{"use strict";var n=r(9974),i=r(6916),o=r(7908),a=r(3411),s=r(7659),l=r(4411),c=r(6244),u=r(6135),h=r(4121),p=r(1246),d=Array;t.exports=function(t){var e=o(t),r=l(this),f=arguments.length,y=f>1?arguments[1]:void 0,m=void 0!==y;m&&(y=n(y,f>2?arguments[2]:void 0));var v,b,g,w,_,k,j=p(e),O=0;if(!j||this===d&&s(j))for(v=c(e),b=r?new this(v):d(v);v>O;O++)k=m?y(e[O],O):e[O],u(b,O,k);else for(_=(w=h(e,j)).next,b=r?new this:[];!(g=i(_,w)).done;O++)k=m?a(w,y,[g.value,O],!0):g.value,u(b,O,k);return b.length=O,b}},1318:(t,e,r)=>{var n=r(5656),i=r(1400),o=r(6244),a=function(t){return function(e,r,a){var s,l=n(e),c=o(l),u=i(a,c);if(t&&r!=r){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===r)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:(t,e,r)=>{var n=r(9974),i=r(1702),o=r(8361),a=r(7908),s=r(6244),l=r(5417),c=i([].push),u=function(t){var e=1==t,r=2==t,i=3==t,u=4==t,h=6==t,p=7==t,d=5==t||h;return function(f,y,m,v){for(var b,g,w=a(f),_=o(w),k=n(y,m),j=s(_),O=0,x=v||l,C=e?x(f,j):r||p?x(f,0):void 0;j>O;O++)if((d||O in _)&&(g=k(b=_[O],O,w),t))if(e)C[O]=g;else if(g)switch(t){case 3:return!0;case 5:return b;case 6:return O;case 2:c(C,b)}else switch(t){case 4:return!1;case 7:c(C,b)}return h?-1:i||u?u:C}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},1194:(t,e,r)=>{var n=r(7293),i=r(5112),o=r(7392),a=i("species");t.exports=function(t){return o>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},3671:(t,e,r)=>{var n=r(9662),i=r(7908),o=r(8361),a=r(6244),s=TypeError,l=function(t){return function(e,r,l,c){n(r);var u=i(e),h=o(u),p=a(u),d=t?p-1:0,f=t?-1:1;if(l<2)for(;;){if(d in h){c=h[d],d+=f;break}if(d+=f,t?d<0:p<=d)throw s("Reduce of empty array with no initial value")}for(;t?d>=0:p>d;d+=f)d in h&&(c=r(c,h[d],d,u));return c}};t.exports={left:l(!1),right:l(!0)}},3658:(t,e,r)=>{"use strict";var n=r(9781),i=r(3157),o=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!a(t,"length").writable)throw o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},1589:(t,e,r)=>{var n=r(1400),i=r(6244),o=r(6135),a=Array,s=Math.max;t.exports=function(t,e,r){for(var l=i(t),c=n(e,l),u=n(void 0===r?l:r,l),h=a(s(u-c,0)),p=0;c<u;c++,p++)o(h,p,t[c]);return h.length=p,h}},206:(t,e,r)=>{var n=r(1702);t.exports=n([].slice)},4362:(t,e,r)=>{var n=r(1589),i=Math.floor,o=function(t,e){var r=t.length,l=i(r/2);return r<8?a(t,e):s(t,o(n(t,0,l),e),o(n(t,l),e),e)},a=function(t,e){for(var r,n,i=t.length,o=1;o<i;){for(n=o,r=t[o];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==o++&&(t[n]=r)}return t},s=function(t,e,r,n){for(var i=e.length,o=r.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?n(e[a],r[s])<=0?e[a++]:r[s++]:a<i?e[a++]:r[s++];return t};t.exports=o},7475:(t,e,r)=>{var n=r(3157),i=r(4411),o=r(111),a=r(5112)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===s||n(e.prototype))||o(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},5417:(t,e,r)=>{var n=r(7475);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},3411:(t,e,r)=>{var n=r(9670),i=r(9212);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},7072:(t,e,r)=>{var n=r(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},t(o)}catch(t){}return r}},4326:(t,e,r)=>{var n=r(1702),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:(t,e,r)=>{var n=r(1694),i=r(614),o=r(4326),a=r(5112)("toStringTag"),s=Object,l="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?r:l?o(e):"Object"==(n=o(e))&&i(e.callee)?"Arguments":n}},9920:(t,e,r)=>{var n=r(2597),i=r(3887),o=r(1236),a=r(3070);t.exports=function(t,e,r){for(var s=i(e),l=a.f,c=o.f,u=0;u<s.length;u++){var h=s[u];n(t,h)||r&&n(r,h)||l(t,h,c(e,h))}}},4964:(t,e,r)=>{var n=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6178:t=>{t.exports=function(t,e){return{value:t,done:e}}},8880:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(9114);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(4948),i=r(3070),o=r(9114);t.exports=function(t,e,r){var a=n(e);a in t?i.f(t,a,o(0,r)):t[a]=r}},5573:(t,e,r)=>{"use strict";var n=r(1702),i=r(7293),o=r(6650).start,a=RangeError,s=isFinite,l=Math.abs,c=Date.prototype,u=c.toISOString,h=n(c.getTime),p=n(c.getUTCDate),d=n(c.getUTCFullYear),f=n(c.getUTCHours),y=n(c.getUTCMilliseconds),m=n(c.getUTCMinutes),v=n(c.getUTCMonth),b=n(c.getUTCSeconds);t.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!i((function(){u.call(new Date(NaN))}))?function(){if(!s(h(this)))throw a("Invalid time value");var t=this,e=d(t),r=y(t),n=e<0?"-":e>9999?"+":"";return n+o(l(e),n?6:4,0)+"-"+o(v(t)+1,2,0)+"-"+o(p(t),2,0)+"T"+o(f(t),2,0)+":"+o(m(t),2,0)+":"+o(b(t),2,0)+"."+o(r,3,0)+"Z"}:u},8709:(t,e,r)=>{"use strict";var n=r(9670),i=r(2140),o=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw o("Incorrect hint");return i(this,t)}},7045:(t,e,r)=>{var n=r(6339),i=r(3070);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},8052:(t,e,r)=>{var n=r(614),i=r(3070),o=r(6339),a=r(3072);t.exports=function(t,e,r,s){s||(s={});var l=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&o(r,c,s),s.global)l?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},3072:(t,e,r)=>{var n=r(7854),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},5117:(t,e,r)=>{"use strict";var n=r(6330),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+n(e)+" of "+n(t))}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var e="object"==typeof document&&document.all,r=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:r}},317:(t,e,r)=>{var n=r(7854),i=r(111),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,r)=>{var n=r(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},8886:(t,e,r)=>{var n=r(8113).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},7871:(t,e,r)=>{var n=r(3823),i=r(5268);t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},9363:t=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(t,e,r)=>{var n=r(8113);t.exports=/MSIE|Trident/.test(n)},1528:(t,e,r)=>{var n=r(8113);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},8334:(t,e,r)=>{var n=r(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326);t.exports="undefined"!=typeof process&&"process"==n(process)},1036:(t,e,r)=>{var n=r(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:(t,e,r)=>{var n,i,o=r(7854),a=r(8113),s=o.process,l=o.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},8008:(t,e,r)=>{var n=r(8113).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var n=r(7854),i=r(1236).f,o=r(8880),a=r(8052),s=r(3072),l=r(9920),c=r(4705);t.exports=function(t,e){var r,u,h,p,d,f=t.target,y=t.global,m=t.stat;if(r=y?n:m?n[f]||s(f,{}):(n[f]||{}).prototype)for(u in e){if(p=e[u],h=t.dontCallGetSet?(d=i(r,u))&&d.value:r[u],!c(y?u:f+(m?".":"#")+u,t.forced)&&void 0!==h){if(typeof p==typeof h)continue;l(p,h)}(t.sham||h&&h.sham)&&o(p,"sham",!0),a(r,u,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1470),i=r(8052),o=r(2261),a=r(7293),s=r(5112),l=r(8880),c=s("species"),u=RegExp.prototype;t.exports=function(t,e,r,h){var p=s(t),d=!a((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),f=d&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!d||!f||r){var y=n(/./[p]),m=e(p,""[t],(function(t,e,r,i,a){var s=n(t),l=e.exec;return l===o||l===u.exec?d&&!a?{done:!0,value:y(e,r,i)}:{done:!0,value:s(r,e,i)}:{done:!1}}));i(String.prototype,t,m[0]),i(u,p,m[1])}h&&l(u[p],"sham",!0)}},2104:(t,e,r)=>{var n=r(4374),i=Function.prototype,o=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},9974:(t,e,r)=>{var n=r(1470),i=r(9662),o=r(4374),a=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},7065:(t,e,r)=>{"use strict";var n=r(1702),i=r(9662),o=r(111),a=r(2597),s=r(206),l=r(4374),c=Function,u=n([].concat),h=n([].join),p={},d=function(t,e,r){if(!a(p,e)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";p[e]=c("C,a","return new C("+h(n,",")+")")}return p[e](t,r)};t.exports=l?c.bind:function(t){var e=i(this),r=e.prototype,n=s(arguments,1),a=function(){var r=u(n,s(arguments));return this instanceof a?d(e,r.length,r):e.apply(t,r)};return o(r)&&(a.prototype=r),a}},6916:(t,e,r)=>{var n=r(4374),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},6530:(t,e,r)=>{var n=r(9781),i=r(2597),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),l=s&&"something"===function(){}.name,c=s&&(!n||n&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},5668:(t,e,r)=>{var n=r(1702),i=r(9662);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},1470:(t,e,r)=>{var n=r(4326),i=r(1702);t.exports=function(t){if("Function"===n(t))return i(t)}},1702:(t,e,r)=>{var n=r(4374),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments)}}},5005:(t,e,r)=>{var n=r(7854),i=r(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},1246:(t,e,r)=>{var n=r(648),i=r(8173),o=r(8554),a=r(7497),s=r(5112)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||a[n(t)]}},4121:(t,e,r)=>{var n=r(6916),i=r(9662),o=r(9670),a=r(6330),s=r(1246),l=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return o(n(r,t));throw l(a(t)+" is not iterable")}},8044:(t,e,r)=>{var n=r(1702),i=r(3157),o=r(614),a=r(4326),s=r(1340),l=n([].push);t.exports=function(t){if(o(t))return t;if(i(t)){for(var e=t.length,r=[],n=0;n<e;n++){var c=t[n];"string"==typeof c?l(r,c):"number"!=typeof c&&"Number"!=a(c)&&"String"!=a(c)||l(r,s(c))}var u=r.length,h=!0;return function(t,e){if(h)return h=!1,e;if(i(this))return e;for(var n=0;n<u;n++)if(r[n]===t)return e}}}},8173:(t,e,r)=>{var n=r(9662),i=r(8554);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},647:(t,e,r)=>{var n=r(1702),i=r(7908),o=Math.floor,a=n("".charAt),s=n("".replace),l=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,h,p){var d=r+t.length,f=n.length,y=u;return void 0!==h&&(h=i(h),y=c),s(p,y,(function(i,s){var c;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,r);case"'":return l(e,d);case"<":c=h[l(s,1,-1)];break;default:var u=+s;if(0===u)return i;if(u>f){var p=o(u/10);return 0===p?i:p<=f?void 0===n[p-1]?a(s,1):n[p-1]+a(s,1):i}c=n[u-1]}return void 0===c?"":c}))}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(t,e,r)=>{var n=r(1702),i=r(7908),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:t=>{t.exports={}},842:t=>{t.exports=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),i=r(7293),o=r(317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(1702),i=r(7293),o=r(4326),a=Object,s=n("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?s(t,""):a(t)}:a},9587:(t,e,r)=>{var n=r(614),i=r(111),o=r(7674);t.exports=function(t,e,r){var a,s;return o&&n(a=e.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(t,s),t}},2788:(t,e,r)=>{var n=r(1702),i=r(614),o=r(5465),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},9909:(t,e,r)=>{var n,i,o,a=r(4811),s=r(7854),l=r(111),c=r(8880),u=r(2597),h=r(5465),p=r(6200),d=r(3501),f="Object already initialized",y=s.TypeError,m=s.WeakMap;if(a||h.state){var v=h.state||(h.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(t,e){if(v.has(t))throw y(f);return e.facade=t,v.set(t,e),e},i=function(t){return v.get(t)||{}},o=function(t){return v.has(t)}}else{var b=p("state");d[b]=!0,n=function(t,e){if(u(t,b))throw y(f);return e.facade=t,c(t,b,e),e},i=function(t){return u(t,b)?t[b]:{}},o=function(t){return u(t,b)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!l(e)||(r=i(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),i=r(7497),o=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},614:(t,e,r)=>{var n=r(4154),i=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(1702),i=r(7293),o=r(614),a=r(648),s=r(5005),l=r(2788),c=function(){},u=[],h=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=n(p.exec),f=!p.exec(c),y=function(t){if(!o(t))return!1;try{return h(c,u,t),!0}catch(t){return!1}},m=function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(p,l(t))}catch(t){return!0}};m.sham=!0,t.exports=!h||i((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?m:y},5032:(t,e,r)=>{var n=r(2597);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},4705:(t,e,r)=>{var n=r(7293),i=r(614),o=/#|\.prototype\./,a=function(t,e){var r=l[s(t)];return r==u||r!=c&&(i(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";t.exports=a},8554:t=>{t.exports=function(t){return null==t}},111:(t,e,r)=>{var n=r(614),i=r(4154),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===o}:function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var n=r(111),i=r(4326),o=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,r)=>{var n=r(5005),i=r(614),o=r(7976),a=r(3307),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,s(t))}},408:(t,e,r)=>{var n=r(9974),i=r(6916),o=r(9670),a=r(6330),s=r(7659),l=r(6244),c=r(7976),u=r(4121),h=r(1246),p=r(9212),d=TypeError,f=function(t,e){this.stopped=t,this.result=e},y=f.prototype;t.exports=function(t,e,r){var m,v,b,g,w,_,k,j=r&&r.that,O=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_RECORD),C=!(!r||!r.IS_ITERATOR),E=!(!r||!r.INTERRUPTED),P=n(e,j),S=function(t){return m&&p(m,"normal",t),new f(!0,t)},T=function(t){return O?(o(t),E?P(t[0],t[1],S):P(t[0],t[1])):E?P(t,S):P(t)};if(x)m=t.iterator;else if(C)m=t;else{if(!(v=h(t)))throw d(a(t)+" is not iterable");if(s(v)){for(b=0,g=l(t);g>b;b++)if((w=T(t[b]))&&c(y,w))return w;return new f(!1)}m=u(t,v)}for(_=x?t.next:m.next;!(k=i(_,m)).done;){try{w=T(k.value)}catch(t){p(m,"throw",t)}if("object"==typeof w&&w&&c(y,w))return w}return new f(!1)}},9212:(t,e,r)=>{var n=r(6916),i=r(9670),o=r(8173);t.exports=function(t,e,r){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw r;if(s)throw a;return i(a),r}},3061:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,i=r(30),o=r(9114),a=r(8003),s=r(7497),l=function(){return this};t.exports=function(t,e,r,c){var u=e+" Iterator";return t.prototype=i(n,{next:o(+!c,r)}),a(t,u,!1,!0),s[u]=l,t}},1656:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(1913),a=r(6530),s=r(614),l=r(3061),c=r(9518),u=r(7674),h=r(8003),p=r(8880),d=r(8052),f=r(5112),y=r(7497),m=r(3383),v=a.PROPER,b=a.CONFIGURABLE,g=m.IteratorPrototype,w=m.BUGGY_SAFARI_ITERATORS,_=f("iterator"),k="keys",j="values",O="entries",x=function(){return this};t.exports=function(t,e,r,a,f,m,C){l(r,e,a);var E,P,S,T=function(t){if(t===f&&B)return B;if(!w&&t in A)return A[t];switch(t){case k:case j:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},L=e+" Iterator",R=!1,A=t.prototype,I=A[_]||A["@@iterator"]||f&&A[f],B=!w&&I||T(f),N="Array"==e&&A.entries||I;if(N&&(E=c(N.call(new t)))!==Object.prototype&&E.next&&(o||c(E)===g||(u?u(E,g):s(E[_])||d(E,_,x)),h(E,L,!0,!0),o&&(y[L]=x)),v&&f==j&&I&&I.name!==j&&(!o&&b?p(A,"name",j):(R=!0,B=function(){return i(I,this)})),f)if(P={values:T(j),keys:m?B:T(k),entries:T(O)},C)for(S in P)(w||R||!(S in A))&&d(A,S,P[S]);else n({target:e,proto:!0,forced:w||R},P);return o&&!C||A[_]===B||d(A,_,B,{name:f}),y[e]=B,P}},3383:(t,e,r)=>{"use strict";var n,i,o,a=r(7293),s=r(614),l=r(111),c=r(30),u=r(9518),h=r(8052),p=r(5112),d=r(1913),f=p("iterator"),y=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(n=i):y=!0),!l(n)||a((function(){var t={};return n[f].call(t)!==t}))?n={}:d&&(n=c(n)),s(n[f])||h(n,f,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var n=r(7466);t.exports=function(t){return n(t.length)}},6339:(t,e,r)=>{var n=r(1702),i=r(7293),o=r(614),a=r(2597),s=r(9781),l=r(6530).CONFIGURABLE,c=r(2788),u=r(9909),h=u.enforce,p=u.get,d=String,f=Object.defineProperty,y=n("".slice),m=n("".replace),v=n([].join),b=s&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),g=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===y(d(e),0,7)&&(e="["+m(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||l&&t.name!==e)&&(s?f(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&a(r,"arity")&&t.length!==r.arity&&f(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=h(t);return a(n,"source")||(n.source=v(g,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return o(this)&&p(this).source||c(this)}),"toString")},4758:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},5948:(t,e,r)=>{var n,i,o,a,s,l=r(7854),c=r(9974),u=r(1236).f,h=r(261).set,p=r(8572),d=r(8334),f=r(1528),y=r(1036),m=r(5268),v=l.MutationObserver||l.WebKitMutationObserver,b=l.document,g=l.process,w=l.Promise,_=u(l,"queueMicrotask"),k=_&&_.value;if(!k){var j=new p,O=function(){var t,e;for(m&&(t=g.domain)&&t.exit();e=j.get();)try{e()}catch(t){throw j.head&&n(),t}t&&t.enter()};d||m||y||!v||!b?!f&&w&&w.resolve?((a=w.resolve(void 0)).constructor=w,s=c(a.then,a),n=function(){s(O)}):m?n=function(){g.nextTick(O)}:(h=c(h,l),n=function(){h(O)}):(i=!0,o=b.createTextNode(""),new v(O).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),k=function(t){j.head||n(),j.add(t)}}t.exports=k},8523:(t,e,r)=>{"use strict";var n=r(9662),i=TypeError,o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},3929:(t,e,r)=>{var n=r(7850),i=TypeError;t.exports=function(t){if(n(t))throw i("The method doesn't accept regular expressions");return t}},2814:(t,e,r)=>{var n=r(7854),i=r(7293),o=r(1702),a=r(1340),s=r(3111).trim,l=r(1361),c=o("".charAt),u=n.parseFloat,h=n.Symbol,p=h&&h.iterator,d=1/u(l+"-0")!=-1/0||p&&!i((function(){u(Object(p))}));t.exports=d?function(t){var e=s(a(t)),r=u(e);return 0===r&&"-"==c(e,0)?-0:r}:u},3009:(t,e,r)=>{var n=r(7854),i=r(7293),o=r(1702),a=r(1340),s=r(3111).trim,l=r(1361),c=n.parseInt,u=n.Symbol,h=u&&u.iterator,p=/^[+-]?0x/i,d=o(p.exec),f=8!==c(l+"08")||22!==c(l+"0x16")||h&&!i((function(){c(Object(h))}));t.exports=f?function(t,e){var r=s(a(t));return c(r,e>>>0||(d(p,r)?16:10))}:c},1574:(t,e,r)=>{"use strict";var n=r(9781),i=r(1702),o=r(6916),a=r(7293),s=r(1956),l=r(5181),c=r(5296),u=r(7908),h=r(8361),p=Object.assign,d=Object.defineProperty,f=i([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||s(p({},e)).join("")!=i}))?function(t,e){for(var r=u(t),i=arguments.length,a=1,p=l.f,d=c.f;i>a;)for(var y,m=h(arguments[a++]),v=p?f(s(m),p(m)):s(m),b=v.length,g=0;b>g;)y=v[g++],n&&!o(d,m,y)||(r[y]=m[y]);return r}:p},30:(t,e,r)=>{var n,i=r(9670),o=r(6048),a=r(748),s=r(3501),l=r(490),c=r(317),u=r(6200),h="prototype",p="script",d=u("IE_PROTO"),f=function(){},y=function(t){return"<"+p+">"+t+"</"+p+">"},m=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;v="undefined"!=typeof document?document.domain&&n?m(n):(e=c("iframe"),r="java"+p+":",e.style.display="none",l.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F):m(n);for(var i=a.length;i--;)delete v[h][a[i]];return v()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(f[h]=i(t),r=new f,f[h]=null,r[d]=t):r=v(),void 0===e?r:o.f(r,e)}},6048:(t,e,r)=>{var n=r(9781),i=r(3353),o=r(3070),a=r(9670),s=r(5656),l=r(1956);e.f=n&&!i?Object.defineProperties:function(t,e){a(t);for(var r,n=s(e),i=l(e),c=i.length,u=0;c>u;)o.f(t,r=i[u++],n[r]);return t}},3070:(t,e,r)=>{var n=r(9781),i=r(4664),o=r(3353),a=r(9670),s=r(4948),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",p="configurable",d="writable";e.f=n?o?function(t,e,r){if(a(t),e=s(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=u(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:h in r?r[h]:n[h],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(a(t),e=s(e),a(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw l("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:(t,e,r)=>{var n=r(9781),i=r(6916),o=r(5296),a=r(9114),s=r(5656),l=r(4948),c=r(2597),u=r(4664),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return a(!i(o.f,t,e),t[e])}},1156:(t,e,r)=>{var n=r(4326),i=r(5656),o=r(8006).f,a=r(1589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==n(t)?function(t){try{return o(t)}catch(t){return a(s)}}(t):o(i(t))}},8006:(t,e,r)=>{var n=r(6324),i=r(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,r)=>{var n=r(2597),i=r(614),o=r(7908),a=r(6200),s=r(8544),l=a("IE_PROTO"),c=Object,u=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=o(t);if(n(e,l))return e[l];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?u:null}},7976:(t,e,r)=>{var n=r(1702);t.exports=n({}.isPrototypeOf)},6324:(t,e,r)=>{var n=r(1702),i=r(2597),o=r(5656),a=r(1318).indexOf,s=r(3501),l=n([].push);t.exports=function(t,e){var r,n=o(t),c=0,u=[];for(r in n)!i(s,r)&&i(n,r)&&l(u,r);for(;e.length>c;)i(n,r=e[c++])&&(~a(u,r)||l(u,r));return u}},1956:(t,e,r)=>{var n=r(6324),i=r(748);t.exports=Object.keys||function(t){return n(t,i)}},5296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:(t,e,r)=>{var n=r(5668),i=r(9670),o=r(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return i(r),o(n),e?t(r,n):r.__proto__=n,r}}():void 0)},4699:(t,e,r)=>{var n=r(9781),i=r(1702),o=r(1956),a=r(5656),s=i(r(5296).f),l=i([].push),c=function(t){return function(e){for(var r,i=a(e),c=o(i),u=c.length,h=0,p=[];u>h;)r=c[h++],n&&!s(i,r)||l(p,t?[r,i[r]]:i[r]);return p}};t.exports={entries:c(!0),values:c(!1)}},288:(t,e,r)=>{"use strict";var n=r(1694),i=r(648);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,r)=>{var n=r(6916),i=r(614),o=r(111),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!o(s=n(r,t)))return s;if(i(r=t.valueOf)&&!o(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!o(s=n(r,t)))return s;throw a("Can't convert object to primitive value")}},3887:(t,e,r)=>{var n=r(5005),i=r(1702),o=r(8006),a=r(5181),s=r(9670),l=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(s(t)),r=a.f;return r?l(e,r(t)):e}},857:(t,e,r)=>{var n=r(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},3702:(t,e,r)=>{var n=r(7854),i=r(2492),o=r(614),a=r(4705),s=r(2788),l=r(5112),c=r(7871),u=r(3823),h=r(1913),p=r(7392),d=i&&i.prototype,f=l("species"),y=!1,m=o(n.PromiseRejectionEvent),v=a("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===p)return!0;if(h&&(!d.catch||!d.finally))return!0;if(!p||p<51||!/native code/.test(t)){var r=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[f]=n,!(y=r.then((function(){}))instanceof n))return!0}return!e&&(c||u)&&!m}));t.exports={CONSTRUCTOR:v,REJECTION_EVENT:m,SUBCLASSING:y}},2492:(t,e,r)=>{var n=r(7854);t.exports=n.Promise},9478:(t,e,r)=>{var n=r(9670),i=r(111),o=r(8523);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},612:(t,e,r)=>{var n=r(2492),i=r(7072),o=r(3702).CONSTRUCTOR;t.exports=o||!i((function(t){n.all(t).then(void 0,(function(){}))}))},2626:(t,e,r)=>{var n=r(3070).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},7651:(t,e,r)=>{var n=r(6916),i=r(9670),o=r(614),a=r(4326),s=r(2261),l=TypeError;t.exports=function(t,e){var r=t.exec;if(o(r)){var c=n(r,t,e);return null!==c&&i(c),c}if("RegExp"===a(t))return n(s,t,e);throw l("RegExp#exec called on incompatible receiver")}},2261:(t,e,r)=>{"use strict";var n,i,o=r(6916),a=r(1702),s=r(1340),l=r(7066),c=r(2999),u=r(2309),h=r(30),p=r(9909).get,d=r(9441),f=r(7168),y=u("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,v=m,b=a("".charAt),g=a("".indexOf),w=a("".replace),_=a("".slice),k=(i=/b*/g,o(m,n=/a/,"a"),o(m,i,"a"),0!==n.lastIndex||0!==i.lastIndex),j=c.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(k||O||j||d||f)&&(v=function(t){var e,r,n,i,a,c,u,d=this,f=p(d),x=s(t),C=f.raw;if(C)return C.lastIndex=d.lastIndex,e=o(v,C,x),d.lastIndex=C.lastIndex,e;var E=f.groups,P=j&&d.sticky,S=o(l,d),T=d.source,L=0,R=x;if(P&&(S=w(S,"y",""),-1===g(S,"g")&&(S+="g"),R=_(x,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==b(x,d.lastIndex-1))&&(T="(?: "+T+")",R=" "+R,L++),r=new RegExp("^(?:"+T+")",S)),O&&(r=new RegExp("^"+T+"$(?!\\s)",S)),k&&(n=d.lastIndex),i=o(m,P?r:d,R),P?i?(i.input=_(i.input,L),i[0]=_(i[0],L),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:k&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),O&&i&&i.length>1&&o(y,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&E)for(i.groups=c=h(null),a=0;a<E.length;a++)c[(u=E[a])[0]]=i[u[1]];return i}),t.exports=v},7066:(t,e,r)=>{"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4706:(t,e,r)=>{var n=r(6916),i=r(2597),o=r(7976),a=r(7066),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!o(s,t)?e:n(a,t)}},2999:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp,o=n((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=o||n((function(){return!i("a","y").sticky})),s=o||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},9441:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:(t,e,r)=>{var n=r(8554),i=TypeError;t.exports=function(t){if(n(t))throw i("Can't call method on "+t);return t}},7152:(t,e,r)=>{"use strict";var n,i=r(7854),o=r(2104),a=r(614),s=r(9363),l=r(8113),c=r(206),u=r(8053),h=i.Function,p=/MSIE .\./.test(l)||s&&((n=i.Bun.version.split(".")).length<3||0==n[0]&&(n[1]<3||3==n[1]&&0==n[2]));t.exports=function(t,e){var r=e?2:1;return p?function(n,i){var s=u(arguments.length,1)>r,l=a(n)?n:h(n),p=s?c(arguments,r):[],d=s?function(){o(l,this,p)}:l;return e?t(d,i):t(d)}:t}},6340:(t,e,r)=>{"use strict";var n=r(5005),i=r(7045),o=r(5112),a=r(9781),s=o("species");t.exports=function(t){var e=n(t);a&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},8003:(t,e,r)=>{var n=r(3070).f,i=r(2597),o=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,o)&&n(t,o,{configurable:!0,value:e})}},6200:(t,e,r)=>{var n=r(2309),i=r(9711),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,r)=>{var n=r(7854),i=r(3072),o="__core-js_shared__",a=n[o]||i(o,{});t.exports=a},2309:(t,e,r)=>{var n=r(1913),i=r(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,r)=>{var n=r(9670),i=r(9483),o=r(8554),a=r(5112)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||o(r=n(s)[a])?e:i(r)}},8710:(t,e,r)=>{var n=r(1702),i=r(9303),o=r(1340),a=r(4488),s=n("".charAt),l=n("".charCodeAt),c=n("".slice),u=function(t){return function(e,r){var n,u,h=o(a(e)),p=i(r),d=h.length;return p<0||p>=d?t?"":void 0:(n=l(h,p))<55296||n>56319||p+1===d||(u=l(h,p+1))<56320||u>57343?t?s(h,p):n:t?c(h,p,p+2):u-56320+(n-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},6650:(t,e,r)=>{var n=r(1702),i=r(7466),o=r(1340),a=r(8415),s=r(4488),l=n(a),c=n("".slice),u=Math.ceil,h=function(t){return function(e,r,n){var a,h,p=o(s(e)),d=i(r),f=p.length,y=void 0===n?" ":o(n);return d<=f||""==y?p:((h=l(y,u((a=d-f)/y.length))).length>a&&(h=c(h,0,a)),t?p+h:h+p)}};t.exports={start:h(!1),end:h(!0)}},8415:(t,e,r)=>{"use strict";var n=r(9303),i=r(1340),o=r(4488),a=RangeError;t.exports=function(t){var e=i(o(this)),r="",s=n(t);if(s<0||s==1/0)throw a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(r+=e);return r}},6091:(t,e,r)=>{var n=r(6530).PROPER,i=r(7293),o=r(1361);t.exports=function(t){return i((function(){return!!o[t]()||"​…᠎"!=="​…᠎"[t]()||n&&o[t].name!==t}))}},3111:(t,e,r)=>{var n=r(1702),i=r(4488),o=r(1340),a=r(1361),s=n("".replace),l=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),u=function(t){return function(e){var r=o(i(e));return 1&t&&(r=s(r,l,"")),2&t&&(r=s(r,c,"$1")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},6293:(t,e,r)=>{var n=r(7392),i=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},6532:(t,e,r)=>{var n=r(6916),i=r(5005),o=r(5112),a=r(8052);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=o("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return n(r,this)}),{arity:1})}},2015:(t,e,r)=>{var n=r(6293);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},261:(t,e,r)=>{var n,i,o,a,s=r(7854),l=r(2104),c=r(9974),u=r(614),h=r(2597),p=r(7293),d=r(490),f=r(206),y=r(317),m=r(8053),v=r(8334),b=r(5268),g=s.setImmediate,w=s.clearImmediate,_=s.process,k=s.Dispatch,j=s.Function,O=s.MessageChannel,x=s.String,C=0,E={},P="onreadystatechange";p((function(){n=s.location}));var S=function(t){if(h(E,t)){var e=E[t];delete E[t],e()}},T=function(t){return function(){S(t)}},L=function(t){S(t.data)},R=function(t){s.postMessage(x(t),n.protocol+"//"+n.host)};g&&w||(g=function(t){m(arguments.length,1);var e=u(t)?t:j(t),r=f(arguments,1);return E[++C]=function(){l(e,void 0,r)},i(C),C},w=function(t){delete E[t]},b?i=function(t){_.nextTick(T(t))}:k&&k.now?i=function(t){k.now(T(t))}:O&&!v?(a=(o=new O).port2,o.port1.onmessage=L,i=c(a.postMessage,a)):s.addEventListener&&u(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!p(R)?(i=R,s.addEventListener("message",L,!1)):i=P in y("script")?function(t){d.appendChild(y("script"))[P]=function(){d.removeChild(this),S(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:g,clear:w}},863:(t,e,r)=>{var n=r(1702);t.exports=n(1..valueOf)},1400:(t,e,r)=>{var n=r(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5656:(t,e,r)=>{var n=r(8361),i=r(4488);t.exports=function(t){return n(i(t))}},9303:(t,e,r)=>{var n=r(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},7466:(t,e,r)=>{var n=r(9303),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},7908:(t,e,r)=>{var n=r(4488),i=Object;t.exports=function(t){return i(n(t))}},7593:(t,e,r)=>{var n=r(6916),i=r(111),o=r(2190),a=r(8173),s=r(2140),l=r(5112),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,l=a(t,u);if(l){if(void 0===e&&(e="default"),r=n(l,t,e),!i(r)||o(r))return r;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},4948:(t,e,r)=>{var n=r(7593),i=r(2190);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},1694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,e,r)=>{var n=r(648),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,r)=>{var n=r(1702),i=0,o=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},3307:(t,e,r)=>{var n=r(6293);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,r)=>{var n=r(9781),i=r(7293);t.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:t=>{var e=TypeError;t.exports=function(t,r){if(t<r)throw e("Not enough arguments");return t}},4811:(t,e,r)=>{var n=r(7854),i=r(614),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},6800:(t,e,r)=>{var n=r(857),i=r(2597),o=r(6061),a=r(3070).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},6061:(t,e,r)=>{var n=r(5112);e.f=n},5112:(t,e,r)=>{var n=r(7854),i=r(2309),o=r(2597),a=r(9711),s=r(6293),l=r(3307),c=n.Symbol,u=i("wks"),h=l?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return o(u,t)||(u[t]=s&&o(c,t)?c[t]:h("Symbol."+t)),u[t]}},1361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},2222:(t,e,r)=>{"use strict";var n=r(2109),i=r(7293),o=r(3157),a=r(111),s=r(7908),l=r(6244),c=r(7207),u=r(6135),h=r(5417),p=r(1194),d=r(5112),f=r(7392),y=d("isConcatSpreadable"),m=f>=51||!i((function(){var t=[];return t[y]=!1,t.concat()[0]!==t})),v=function(t){if(!a(t))return!1;var e=t[y];return void 0!==e?!!e:o(t)};n({target:"Array",proto:!0,arity:1,forced:!m||!p("concat")},{concat:function(t){var e,r,n,i,o,a=s(this),p=h(a,0),d=0;for(e=-1,n=arguments.length;e<n;e++)if(v(o=-1===e?a:arguments[e]))for(i=l(o),c(d+i),r=0;r<i;r++,d++)r in o&&u(p,d,o[r]);else c(d+1),u(p,d++,o);return p.length=d,p}})},6541:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).every;n({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7327:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).filter;n({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9826:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).find,o=r(1223),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},9554:(t,e,r)=>{"use strict";var n=r(2109),i=r(8533);n({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},1038:(t,e,r)=>{var n=r(2109),i=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(t){Array.from(t)}))},{from:i})},6699:(t,e,r)=>{"use strict";var n=r(2109),i=r(1318).includes,o=r(7293),a=r(1223);n({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},2772:(t,e,r)=>{"use strict";var n=r(2109),i=r(1470),o=r(1318).indexOf,a=r(9341),s=i([].indexOf),l=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:l||!a("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return l?s(this,t,e)||0:o(this,t,e)}})},9753:(t,e,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(t,e,r)=>{"use strict";var n=r(5656),i=r(1223),o=r(7497),a=r(9909),s=r(3070).f,l=r(1656),c=r(6178),u=r(1913),h=r(9781),p="Array Iterator",d=a.set,f=a.getterFor(p);t.exports=l(Array,"Array",(function(t,e){d(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,c(void 0,!0)):c("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values");var y=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&h&&"values"!==y.name)try{s(y,"name",{value:"values"})}catch(t){}},9600:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(8361),a=r(5656),s=r(9341),l=i([].join);n({target:"Array",proto:!0,forced:o!=Object||!s("join",",")},{join:function(t){return l(a(this),void 0===t?",":t)}})},1249:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},5827:(t,e,r)=>{"use strict";var n=r(2109),i=r(3671).left,o=r(9341),a=r(7392);n({target:"Array",proto:!0,forced:!r(5268)&&a>79&&a<83||!o("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},5069:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(3157),a=i([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),a(this)}})},7042:(t,e,r)=>{"use strict";var n=r(2109),i=r(3157),o=r(4411),a=r(111),s=r(1400),l=r(6244),c=r(5656),u=r(6135),h=r(5112),p=r(1194),d=r(206),f=p("slice"),y=h("species"),m=Array,v=Math.max;n({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var r,n,h,p=c(this),f=l(p),b=s(t,f),g=s(void 0===e?f:e,f);if(i(p)&&(r=p.constructor,(o(r)&&(r===m||i(r.prototype))||a(r)&&null===(r=r[y]))&&(r=void 0),r===m||void 0===r))return d(p,b,g);for(n=new(void 0===r?m:r)(v(g-b,0)),h=0;b<g;b++,h++)b in p&&u(n,h,p[b]);return n.length=h,n}})},5212:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).some;n({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},2707:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(9662),a=r(7908),s=r(6244),l=r(5117),c=r(1340),u=r(7293),h=r(4362),p=r(9341),d=r(8886),f=r(256),y=r(7392),m=r(8008),v=[],b=i(v.sort),g=i(v.push),w=u((function(){v.sort(void 0)})),_=u((function(){v.sort(null)})),k=p("sort"),j=!u((function(){if(y)return y<70;if(!(d&&d>3)){if(f)return!0;if(m)return m<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:e+n,v:r})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:w||!_||!k||!j},{sort:function(t){void 0!==t&&o(t);var e=a(this);if(j)return void 0===t?b(e):b(e,t);var r,n,i=[],u=s(e);for(n=0;n<u;n++)n in e&&g(i,e[n]);for(h(i,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=s(i),n=0;n<r;)e[n]=i[n++];for(;n<u;)l(e,n++);return e}})},561:(t,e,r)=>{"use strict";var n=r(2109),i=r(7908),o=r(1400),a=r(9303),s=r(6244),l=r(3658),c=r(7207),u=r(5417),h=r(6135),p=r(5117),d=r(1194)("splice"),f=Math.max,y=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var r,n,d,m,v,b,g=i(this),w=s(g),_=o(t,w),k=arguments.length;for(0===k?r=n=0:1===k?(r=0,n=w-_):(r=k-2,n=y(f(a(e),0),w-_)),c(w+r-n),d=u(g,n),m=0;m<n;m++)(v=_+m)in g&&h(d,m,g[v]);if(d.length=n,r<n){for(m=_;m<w-n;m++)b=m+r,(v=m+n)in g?g[b]=g[v]:p(g,b);for(m=w;m>w-n+r;m--)p(g,m-1)}else if(r>n)for(m=w-n;m>_;m--)b=m+r-1,(v=m+n-1)in g?g[b]=g[v]:p(g,b);for(m=0;m<r;m++)g[m+_]=arguments[m+2];return l(g,w-n+r),d}})},3843:(t,e,r)=>{var n=r(2109),i=r(1702),o=Date,a=i(o.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new o)}})},8733:(t,e,r)=>{var n=r(2109),i=r(5573);n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},6078:(t,e,r)=>{var n=r(2597),i=r(8052),o=r(8709),a=r(5112)("toPrimitive"),s=Date.prototype;n(s,a)||i(s,a,o)},3710:(t,e,r)=>{var n=r(1702),i=r(8052),o=Date.prototype,a="Invalid Date",s="toString",l=n(o[s]),c=n(o.getTime);String(new Date(NaN))!=a&&i(o,s,(function(){var t=c(this);return t==t?l(this):a}))},4812:(t,e,r)=>{var n=r(2109),i=r(7065);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},8309:(t,e,r)=>{var n=r(9781),i=r(6530).EXISTS,o=r(1702),a=r(7045),s=Function.prototype,l=o(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=o(c.exec);n&&!i&&a(s,"name",{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(t){return""}}})},8862:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(2104),a=r(6916),s=r(1702),l=r(7293),c=r(614),u=r(2190),h=r(206),p=r(8044),d=r(6293),f=String,y=i("JSON","stringify"),m=s(/./.exec),v=s("".charAt),b=s("".charCodeAt),g=s("".replace),w=s(1..toString),_=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,j=/^[\uDC00-\uDFFF]$/,O=!d||l((function(){var t=i("Symbol")();return"[null]"!=y([t])||"{}"!=y({a:t})||"{}"!=y(Object(t))})),x=l((function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")})),C=function(t,e){var r=h(arguments),n=p(e);if(c(n)||void 0!==t&&!u(t))return r[1]=function(t,e){if(c(n)&&(e=a(n,this,f(t),e)),!u(e))return e},o(y,null,r)},E=function(t,e,r){var n=v(r,e-1),i=v(r,e+1);return m(k,t)&&!m(j,i)||m(j,t)&&!m(k,n)?"\\u"+w(b(t,0),16):t};y&&n({target:"JSON",stat:!0,arity:3,forced:O||x},{stringify:function(t,e,r){var n=h(arguments),i=o(O?C:y,null,n);return x&&"string"==typeof i?g(i,_,E):i}})},3706:(t,e,r)=>{var n=r(7854);r(8003)(n.JSON,"JSON",!0)},2703:(t,e,r)=>{r(8003)(Math,"Math",!0)},9653:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9781),a=r(7854),s=r(857),l=r(1702),c=r(4705),u=r(2597),h=r(9587),p=r(7976),d=r(2190),f=r(7593),y=r(7293),m=r(8006).f,v=r(1236).f,b=r(3070).f,g=r(863),w=r(3111).trim,_="Number",k=a[_],j=s[_],O=k.prototype,x=a.TypeError,C=l("".slice),E=l("".charCodeAt),P=function(t){var e=f(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,r,n,i,o,a,s,l,c=f(t,"number");if(d(c))throw x("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=w(c),43===(e=E(c,0))||45===e){if(88===(r=E(c,2))||120===r)return NaN}else if(48===e){switch(E(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(a=(o=C(c,2)).length,s=0;s<a;s++)if((l=E(o,s))<48||l>i)return NaN;return parseInt(o,n)}return+c},T=c(_,!k(" 0o1")||!k("0b1")||k("+0x1")),L=function(t){return p(O,t)&&y((function(){g(t)}))},R=function(t){var e=arguments.length<1?0:k(P(t));return L(this)?h(Object(e),this,R):e};R.prototype=O,T&&!i&&(O.constructor=R),n({global:!0,constructor:!0,wrap:!0,forced:T},{Number:R});var A=function(t,e){for(var r,n=o?m(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)u(e,r=n[i])&&!u(t,r)&&b(t,r,v(e,r))};i&&j&&A(s[_],j),(T||i)&&A(s[_],k)},6977:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(9303),a=r(863),s=r(8415),l=r(7293),c=RangeError,u=String,h=Math.floor,p=i(s),d=i("".slice),f=i(1..toFixed),y=function(t,e,r){return 0===e?r:e%2==1?y(t,e-1,r*t):y(t*t,e/2,r)},m=function(t,e,r){for(var n=-1,i=r;++n<6;)i+=e*t[n],t[n]=i%1e7,i=h(i/1e7)},v=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=h(n/e),n=n%e*1e7},b=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=u(t[e]);r=""===r?n:r+p("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:l((function(){return"0.000"!==f(8e-5,3)||"1"!==f(.9,0)||"1.25"!==f(1.255,2)||"1000000000000000128"!==f(0xde0b6b3a7640080,0)}))||!l((function(){f({})}))},{toFixed:function(t){var e,r,n,i,s=a(this),l=o(t),h=[0,0,0,0,0,0],f="",g="0";if(l<0||l>20)throw c("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return u(s);if(s<0&&(f="-",s=-s),s>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(s*y(2,69,1))-69)<0?s*y(2,-e,1):s/y(2,e,1),r*=4503599627370496,(e=52-e)>0){for(m(h,0,r),n=l;n>=7;)m(h,1e7,0),n-=7;for(m(h,y(10,n,1),0),n=e-1;n>=23;)v(h,1<<23),n-=23;v(h,1<<n),m(h,1,1),v(h,2),g=b(h)}else m(h,0,r),m(h,1<<-e,0),g=b(h)+p("0",l);return l>0?f+((i=g.length)<=l?"0."+p("0",l-i)+g:d(g,0,i-l)+"."+d(g,i-l)):f+g}})},9601:(t,e,r)=>{var n=r(2109),i=r(1574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},8011:(t,e,r)=>{r(2109)({target:"Object",stat:!0,sham:!r(9781)},{create:r(30)})},3321:(t,e,r)=>{var n=r(2109),i=r(9781),o=r(6048).f;n({target:"Object",stat:!0,forced:Object.defineProperties!==o,sham:!i},{defineProperties:o})},9070:(t,e,r)=>{var n=r(2109),i=r(9781),o=r(3070).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!i},{defineProperty:o})},9720:(t,e,r)=>{var n=r(2109),i=r(4699).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},5003:(t,e,r)=>{var n=r(2109),i=r(7293),o=r(5656),a=r(1236).f,s=r(9781);n({target:"Object",stat:!0,forced:!s||i((function(){a(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},9337:(t,e,r)=>{var n=r(2109),i=r(9781),o=r(3887),a=r(5656),s=r(1236),l=r(6135);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=a(t),i=s.f,c=o(n),u={},h=0;c.length>h;)void 0!==(r=i(n,e=c[h++]))&&l(u,e,r);return u}})},9660:(t,e,r)=>{var n=r(2109),i=r(6293),o=r(7293),a=r(5181),s=r(7908);n({target:"Object",stat:!0,forced:!i||o((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}})},489:(t,e,r)=>{var n=r(2109),i=r(7293),o=r(7908),a=r(9518),s=r(8544);n({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},7941:(t,e,r)=>{var n=r(2109),i=r(7908),o=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},8304:(t,e,r)=>{r(2109)({target:"Object",stat:!0},{setPrototypeOf:r(7674)})},1539:(t,e,r)=>{var n=r(1694),i=r(8052),o=r(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},6833:(t,e,r)=>{var n=r(2109),i=r(4699).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},4678:(t,e,r)=>{var n=r(2109),i=r(2814);n({global:!0,forced:parseFloat!=i},{parseFloat:i})},1058:(t,e,r)=>{var n=r(2109),i=r(3009);n({global:!0,forced:parseInt!=i},{parseInt:i})},821:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(9662),a=r(8523),s=r(2534),l=r(408);n({target:"Promise",stat:!0,forced:r(612)},{all:function(t){var e=this,r=a.f(e),n=r.resolve,c=r.reject,u=s((function(){var r=o(e.resolve),a=[],s=0,u=1;l(t,(function(t){var o=s++,l=!1;u++,i(r,e,t).then((function(t){l||(l=!0,a[o]=t,--u||n(a))}),c)})),--u||n(a)}));return u.error&&c(u.value),r.promise}})},4164:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(3702).CONSTRUCTOR,a=r(2492),s=r(5005),l=r(614),c=r(8052),u=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&l(a)){var h=s("Promise").prototype.catch;u.catch!==h&&c(u,"catch",h,{unsafe:!0})}},3401:(t,e,r)=>{"use strict";var n,i,o,a=r(2109),s=r(1913),l=r(5268),c=r(7854),u=r(6916),h=r(8052),p=r(7674),d=r(8003),f=r(6340),y=r(9662),m=r(614),v=r(111),b=r(5787),g=r(6707),w=r(261).set,_=r(5948),k=r(842),j=r(2534),O=r(8572),x=r(9909),C=r(2492),E=r(3702),P=r(8523),S="Promise",T=E.CONSTRUCTOR,L=E.REJECTION_EVENT,R=E.SUBCLASSING,A=x.getterFor(S),I=x.set,B=C&&C.prototype,N=C,D=B,F=c.TypeError,V=c.document,z=c.process,H=P.f,M=H,q=!!(V&&V.createEvent&&c.dispatchEvent),G="unhandledrejection",U=function(t){var e;return!(!v(t)||!m(e=t.then))&&e},$=function(t,e){var r,n,i,o=e.value,a=1==e.state,s=a?t.ok:t.fail,l=t.resolve,c=t.reject,h=t.domain;try{s?(a||(2===e.rejection&&Q(e),e.rejection=1),!0===s?r=o:(h&&h.enter(),r=s(o),h&&(h.exit(),i=!0)),r===t.promise?c(F("Promise-chain cycle")):(n=U(r))?u(n,r,l,c):l(r)):c(o)}catch(t){h&&!i&&h.exit(),c(t)}},J=function(t,e){t.notified||(t.notified=!0,_((function(){for(var r,n=t.reactions;r=n.get();)$(r,t);t.notified=!1,e&&!t.rejection&&Z(t)})))},W=function(t,e,r){var n,i;q?((n=V.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!L&&(i=c["on"+t])?i(n):t===G&&k("Unhandled promise rejection",r)},Z=function(t){u(w,c,(function(){var e,r=t.facade,n=t.value;if(Y(t)&&(e=j((function(){l?z.emit("unhandledRejection",n,r):W(G,r,n)})),t.rejection=l||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){u(w,c,(function(){var e=t.facade;l?z.emit("rejectionHandled",e):W("rejectionhandled",e,t.value)}))},K=function(t,e,r){return function(n){t(e,n,r)}},X=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,J(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw F("Promise can't be resolved itself");var n=U(e);n?_((function(){var r={done:!1};try{u(n,e,K(tt,r,t),K(X,r,t))}catch(e){X(r,e,t)}})):(t.value=e,t.state=1,J(t,!1))}catch(e){X({done:!1},e,t)}}};if(T&&(D=(N=function(t){b(this,D),y(t),u(n,this);var e=A(this);try{t(K(tt,e),K(X,e))}catch(t){X(e,t)}}).prototype,(n=function(t){I(this,{type:S,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:void 0})}).prototype=h(D,"then",(function(t,e){var r=A(this),n=H(g(this,N));return r.parent=!0,n.ok=!m(t)||t,n.fail=m(e)&&e,n.domain=l?z.domain:void 0,0==r.state?r.reactions.add(n):_((function(){$(n,r)})),n.promise})),i=function(){var t=new n,e=A(t);this.promise=t,this.resolve=K(tt,e),this.reject=K(X,e)},P.f=H=function(t){return t===N||void 0===t?new i(t):M(t)},!s&&m(C)&&B!==Object.prototype)){o=B.then,R||h(B,"then",(function(t,e){var r=this;return new N((function(t,e){u(o,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete B.constructor}catch(t){}p&&p(B,D)}a({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:N}),d(N,S,!1,!0),f(S)},8674:(t,e,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(9662),a=r(8523),s=r(2534),l=r(408);n({target:"Promise",stat:!0,forced:r(612)},{race:function(t){var e=this,r=a.f(e),n=r.reject,c=s((function(){var a=o(e.resolve);l(t,(function(t){i(a,e,t).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},683:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(8523);n({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},6294:(t,e,r)=>{"use strict";var n=r(2109),i=r(5005),o=r(1913),a=r(2492),s=r(3702).CONSTRUCTOR,l=r(9478),c=i("Promise"),u=o&&!s;n({target:"Promise",stat:!0,forced:o||s},{resolve:function(t){return l(u&&this===c?a:this,t)}})},2419:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(2104),a=r(7065),s=r(9483),l=r(9670),c=r(111),u=r(30),h=r(7293),p=i("Reflect","construct"),d=Object.prototype,f=[].push,y=h((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),m=!h((function(){p((function(){}))})),v=y||m;n({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(t,e){s(t),l(e);var r=arguments.length<3?t:s(arguments[2]);if(m&&!y)return p(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return o(f,n,e),new(o(a,t,n))}var i=r.prototype,h=u(c(i)?i:d),v=o(t,h,e);return c(v)?v:h}})},4819:(t,e,r)=>{var n=r(2109),i=r(6916),o=r(111),a=r(9670),s=r(5032),l=r(1236),c=r(9518);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,u,h=arguments.length<3?e:arguments[2];return a(e)===h?e[r]:(n=l.f(e,r))?s(n)?n.value:void 0===n.get?void 0:i(n.get,h):o(u=c(e))?t(u,r,h):void 0}})},4603:(t,e,r)=>{var n=r(9781),i=r(7854),o=r(1702),a=r(4705),s=r(9587),l=r(8880),c=r(8006).f,u=r(7976),h=r(7850),p=r(1340),d=r(4706),f=r(2999),y=r(2626),m=r(8052),v=r(7293),b=r(2597),g=r(9909).enforce,w=r(6340),_=r(5112),k=r(9441),j=r(7168),O=_("match"),x=i.RegExp,C=x.prototype,E=i.SyntaxError,P=o(C.exec),S=o("".charAt),T=o("".replace),L=o("".indexOf),R=o("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,I=/a/g,B=/a/g,N=new x(I)!==I,D=f.MISSED_STICKY,F=f.UNSUPPORTED_Y;if(a("RegExp",n&&(!N||D||k||j||v((function(){return B[O]=!1,x(I)!=I||x(B)==B||"/a/i"!=x(I,"i")}))))){for(var V=function(t,e){var r,n,i,o,a,c,f=u(C,this),y=h(t),m=void 0===e,v=[],w=t;if(!f&&y&&m&&t.constructor===V)return t;if((y||u(C,t))&&(t=t.source,m&&(e=d(w))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),w=t,k&&"dotAll"in I&&(n=!!e&&L(e,"s")>-1)&&(e=T(e,/s/g,"")),r=e,D&&"sticky"in I&&(i=!!e&&L(e,"y")>-1)&&F&&(e=T(e,/y/g,"")),j&&(o=function(t){for(var e,r=t.length,n=0,i="",o=[],a={},s=!1,l=!1,c=0,u="";n<=r;n++){if("\\"===(e=S(t,n)))e+=S(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:P(A,R(t,n+1))&&(n+=2,l=!0),i+=e,c++;continue;case">"===e&&l:if(""===u||b(a,u))throw new E("Invalid capture group name");a[u]=!0,o[o.length]=[u,c],l=!1,u="";continue}l?u+=e:i+=e}return[i,o]}(t),t=o[0],v=o[1]),a=s(x(t,e),f?this:C,V),(n||i||v.length)&&(c=g(a),n&&(c.dotAll=!0,c.raw=V(function(t){for(var e,r=t.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(e=S(t,n))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+S(t,++n);return i}(t),r)),i&&(c.sticky=!0),v.length&&(c.groups=v)),t!==w)try{l(a,"source",""===w?"(?:)":w)}catch(t){}return a},z=c(x),H=0;z.length>H;)y(V,x,z[H++]);C.constructor=V,V.prototype=C,m(i,"RegExp",V,{constructor:!0})}w("RegExp")},4916:(t,e,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(t,e,r)=>{"use strict";var n=r(6530).PROPER,i=r(8052),o=r(9670),a=r(1340),s=r(7293),l=r(4706),c="toString",u=RegExp.prototype[c],h=s((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),p=n&&u.name!=c;(h||p)&&i(RegExp.prototype,c,(function(){var t=o(this);return"/"+a(t.source)+"/"+a(l(t))}),{unsafe:!0})},2023:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(3929),a=r(4488),s=r(1340),l=r(4964),c=i("".indexOf);n({target:"String",proto:!0,forced:!l("includes")},{includes:function(t){return!!~c(s(a(this)),s(o(t)),arguments.length>1?arguments[1]:void 0)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,i=r(1340),o=r(9909),a=r(1656),s=r(6178),l="String Iterator",c=o.set,u=o.getterFor(l);a(String,"String",(function(t){c(this,{type:l,string:i(t),index:0})}),(function(){var t,e=u(this),r=e.string,i=e.index;return i>=r.length?s(void 0,!0):(t=n(r,i),e.index+=t.length,s(t,!1))}))},4723:(t,e,r)=>{"use strict";var n=r(6916),i=r(7007),o=r(9670),a=r(8554),s=r(7466),l=r(1340),c=r(4488),u=r(8173),h=r(1530),p=r(7651);i("match",(function(t,e,r){return[function(e){var r=c(this),i=a(e)?void 0:u(e,t);return i?n(i,e,r):new RegExp(e)[t](l(r))},function(t){var n=o(this),i=l(t),a=r(e,n,i);if(a.done)return a.value;if(!n.global)return p(n,i);var c=n.unicode;n.lastIndex=0;for(var u,d=[],f=0;null!==(u=p(n,i));){var y=l(u[0]);d[f]=y,""===y&&(n.lastIndex=h(i,s(n.lastIndex),c)),f++}return 0===f?null:d}]}))},5306:(t,e,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),a=r(7007),s=r(7293),l=r(9670),c=r(614),u=r(8554),h=r(9303),p=r(7466),d=r(1340),f=r(4488),y=r(1530),m=r(8173),v=r(647),b=r(7651),g=r(5112)("replace"),w=Math.max,_=Math.min,k=o([].concat),j=o([].push),O=o("".indexOf),x=o("".slice),C="$0"==="a".replace(/./,"$0"),E=!!/./[g]&&""===/./[g]("a","$0");a("replace",(function(t,e,r){var o=E?"$":"$0";return[function(t,r){var n=f(this),o=u(t)?void 0:m(t,g);return o?i(o,t,n,r):i(e,d(n),t,r)},function(t,i){var a=l(this),s=d(t);if("string"==typeof i&&-1===O(i,o)&&-1===O(i,"$<")){var u=r(e,a,s,i);if(u.done)return u.value}var f=c(i);f||(i=d(i));var m=a.global;if(m){var g=a.unicode;a.lastIndex=0}for(var C=[];;){var E=b(a,s);if(null===E)break;if(j(C,E),!m)break;""===d(E[0])&&(a.lastIndex=y(s,p(a.lastIndex),g))}for(var P,S="",T=0,L=0;L<C.length;L++){for(var R=d((E=C[L])[0]),A=w(_(h(E.index),s.length),0),I=[],B=1;B<E.length;B++)j(I,void 0===(P=E[B])?P:String(P));var N=E.groups;if(f){var D=k([R],I,A,s);void 0!==N&&j(D,N);var F=d(n(i,void 0,D))}else F=v(R,s,A,I,N,i);A>=T&&(S+=x(s,T,A)+F,T=A+R.length)}return S+x(s,T)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!C||E)},6755:(t,e,r)=>{"use strict";var n,i=r(2109),o=r(1470),a=r(1236).f,s=r(7466),l=r(1340),c=r(3929),u=r(4488),h=r(4964),p=r(1913),d=o("".startsWith),f=o("".slice),y=Math.min,m=h("startsWith");i({target:"String",proto:!0,forced:!(!p&&!m&&(n=a(String.prototype,"startsWith"),n&&!n.writable)||m)},{startsWith:function(t){var e=l(u(this));c(t);var r=s(y(arguments.length>1?arguments[1]:void 0,e.length)),n=l(t);return d?d(e,n,r):f(e,r,r+n.length)===n}})},3210:(t,e,r)=>{"use strict";var n=r(2109),i=r(3111).trim;n({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return i(this)}})},2443:(t,e,r)=>{r(6800)("asyncIterator")},4032:(t,e,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(6916),a=r(1702),s=r(1913),l=r(9781),c=r(6293),u=r(7293),h=r(2597),p=r(7976),d=r(9670),f=r(5656),y=r(4948),m=r(1340),v=r(9114),b=r(30),g=r(1956),w=r(8006),_=r(1156),k=r(5181),j=r(1236),O=r(3070),x=r(6048),C=r(5296),E=r(8052),P=r(7045),S=r(2309),T=r(6200),L=r(3501),R=r(9711),A=r(5112),I=r(6061),B=r(6800),N=r(6532),D=r(8003),F=r(9909),V=r(2092).forEach,z=T("hidden"),H="Symbol",M="prototype",q=F.set,G=F.getterFor(H),U=Object[M],$=i.Symbol,J=$&&$[M],W=i.TypeError,Z=i.QObject,Y=j.f,Q=O.f,K=_.f,X=C.f,tt=a([].push),et=S("symbols"),rt=S("op-symbols"),nt=S("wks"),it=!Z||!Z[M]||!Z[M].findChild,ot=l&&u((function(){return 7!=b(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Y(U,e);n&&delete U[e],Q(t,e,r),n&&t!==U&&Q(U,e,n)}:Q,at=function(t,e){var r=et[t]=b(J);return q(r,{type:H,tag:t,description:e}),l||(r.description=e),r},st=function(t,e,r){t===U&&st(rt,e,r),d(t);var n=y(e);return d(r),h(et,n)?(r.enumerable?(h(t,z)&&t[z][n]&&(t[z][n]=!1),r=b(r,{enumerable:v(0,!1)})):(h(t,z)||Q(t,z,v(1,{})),t[z][n]=!0),ot(t,n,r)):Q(t,n,r)},lt=function(t,e){d(t);var r=f(e),n=g(r).concat(pt(r));return V(n,(function(e){l&&!o(ct,r,e)||st(t,e,r[e])})),t},ct=function(t){var e=y(t),r=o(X,this,e);return!(this===U&&h(et,e)&&!h(rt,e))&&(!(r||!h(this,e)||!h(et,e)||h(this,z)&&this[z][e])||r)},ut=function(t,e){var r=f(t),n=y(e);if(r!==U||!h(et,n)||h(rt,n)){var i=Y(r,n);return!i||!h(et,n)||h(r,z)&&r[z][n]||(i.enumerable=!0),i}},ht=function(t){var e=K(f(t)),r=[];return V(e,(function(t){h(et,t)||h(L,t)||tt(r,t)})),r},pt=function(t){var e=t===U,r=K(e?rt:f(t)),n=[];return V(r,(function(t){!h(et,t)||e&&!h(U,t)||tt(n,et[t])})),n};c||(E(J=($=function(){if(p(J,this))throw W("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,e=R(t),r=function(t){this===U&&o(r,rt,t),h(this,z)&&h(this[z],e)&&(this[z][e]=!1),ot(this,e,v(1,t))};return l&&it&&ot(U,e,{configurable:!0,set:r}),at(e,t)})[M],"toString",(function(){return G(this).tag})),E($,"withoutSetter",(function(t){return at(R(t),t)})),C.f=ct,O.f=st,x.f=lt,j.f=ut,w.f=_.f=ht,k.f=pt,I.f=function(t){return at(A(t),t)},l&&(P(J,"description",{configurable:!0,get:function(){return G(this).description}}),s||E(U,"propertyIsEnumerable",ct,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:$}),V(g(nt),(function(t){B(t)})),n({target:H,stat:!0,forced:!c},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?b(t):lt(b(t),e)},defineProperty:st,defineProperties:lt,getOwnPropertyDescriptor:ut}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ht}),N(),D($,H),L[z]=!0},1817:(t,e,r)=>{"use strict";var n=r(2109),i=r(9781),o=r(7854),a=r(1702),s=r(2597),l=r(614),c=r(7976),u=r(1340),h=r(7045),p=r(9920),d=o.Symbol,f=d&&d.prototype;if(i&&l(d)&&(!("description"in f)||void 0!==d().description)){var y={},m=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=c(f,this)?new d(t):void 0===t?d():d(t);return""===t&&(y[e]=!0),e};p(m,d),m.prototype=f,f.constructor=m;var v="Symbol(test)"==String(d("test")),b=a(f.valueOf),g=a(f.toString),w=/^Symbol\((.*)\)[^)]+$/,_=a("".replace),k=a("".slice);h(f,"description",{configurable:!0,get:function(){var t=b(this);if(s(y,t))return"";var e=g(t),r=v?k(e,7,-1):_(e,w,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:m})}},763:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(2597),a=r(1340),s=r(2309),l=r(2015),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=a(t);if(o(c,e))return c[e];var r=i("Symbol")(e);return c[e]=r,u[r]=e,r}})},2165:(t,e,r)=>{r(6800)("iterator")},2526:(t,e,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(t,e,r)=>{var n=r(2109),i=r(2597),o=r(2190),a=r(6330),s=r(2309),l=r(2015),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!o(t))throw TypeError(a(t)+" is not a symbol");if(i(c,t))return c[t]}})},6649:(t,e,r)=>{var n=r(6800),i=r(6532);n("toPrimitive"),i()},3680:(t,e,r)=>{var n=r(5005),i=r(6800),o=r(8003);i("toStringTag"),o(n("Symbol"),"Symbol")},4747:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),a=r(8533),s=r(8880),l=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var c in i)i[c]&&l(n[c]&&n[c].prototype);l(o)},3948:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),a=r(6992),s=r(8880),l=r(5112),c=l("iterator"),u=l("toStringTag"),h=a.values,p=function(t,e){if(t){if(t[c]!==h)try{s(t,c,h)}catch(e){t[c]=h}if(t[u]||s(t,u,e),i[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var d in i)p(n[d]&&n[d].prototype,d);p(o,"DOMTokenList")},6815:(t,e,r)=>{var n=r(2109),i=r(7854),o=r(7152)(i.setInterval,!0);n({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},8417:(t,e,r)=>{var n=r(2109),i=r(7854),o=r(7152)(i.setTimeout,!0);n({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},2564:(t,e,r)=>{r(6815),r(8417)}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{JSONEditor:()=>Yo}),r(3710),r(1539),r(9714),r(5827),r(6833),r(9826),r(9554),r(4747),r(7941),r(2222),r(9601),r(6649),r(6078),r(2526),r(1817),r(9653),r(9070),r(8674),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(2703),r(8011),r(489),r(8309),r(8304),r(5069),r(7042),r(9753),r(1038),r(4916),r(9720),r(5306),r(4603),r(6699);var t=["actionscript","batchfile","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","groovy","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","sh","smarty","sql","sqlserver","stylus","svg","twig","vbscript","xml","yaml"],e=[function(t){return"string"===t.type&&"color"===t.format&&"colorpicker"},function(t){return"string"===t.type&&["ip","ipv4","ipv6","hostname"].includes(t.format)&&"ip"},function(e){return"string"===e.type&&t.includes(e.format)&&"ace"},function(t){return"string"===t.type&&["xhtml","bbcode"].includes(t.format)&&"sceditor"},function(t){return"string"===t.type&&"markdown"===t.format&&"simplemde"},function(t){return"string"===t.type&&"jodit"===t.format&&"jodit"},function(t){return"string"===t.type&&"autocomplete"===t.format&&"autocomplete"},function(t){return"string"===t.type&&"uuid"===t.format&&"uuid"},function(t){return"info"===t.format&&"info"},function(t){return"button"===t.format&&"button"},function(t){if(("integer"===t.type||"number"===t.type)&&"stepper"===t.format)return"stepper"},function(t){if(t.links)for(var e=0;e<t.links.length;e++)if(t.links[e].rel&&"describedby"===t.links[e].rel.toLowerCase())return"describedBy"},function(t){return["string","integer"].includes(t.type)&&["starrating","rating"].includes(t.format)&&"starrating"},function(t){return["string","integer"].includes(t.type)&&["date","time","datetime-local"].includes(t.format)&&"datetime"},function(t){return(t.oneOf||t.anyOf)&&"multiple"},function(t){if("array"===t.type&&t.items&&!Array.isArray(t.items)&&["string","number","integer"].includes(t.items.type)){if("choices"===t.format)return"arrayChoices";if(t.uniqueItems){if("selectize"===t.format)return"arraySelectize";if("select2"===t.format)return"arraySelect2";if(t.items.enum)return"multiselect"}}},function(t){if(t.enum){if("array"===t.type||"object"===t.type)return"enum";if("number"===t.type||"integer"===t.type||"string"===t.type)return"radio"===t.format?"radio":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"}},function(t){if(t.enumSource)return"radio"===t.format?"radio":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"},function(t){return"array"===t.type&&"table"===t.format&&"table"},function(t){return"string"===t.type&&"url"===t.format&&window.FileReader&&t.options&&t.options.upload===Object(t.options.upload)&&"upload"},function(t){return"string"===t.type&&t.media&&"base64"===t.media.binaryEncoding&&"base64"},function(t){return"any"===t.type&&"multiple"},function(t){if("boolean"===t.type)return"checkbox"===t.format||t.options&&t.options.checkbox?"checkbox":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"},function(t){return"string"===t.type&&"signature"===t.format&&"signature"},function(t){return"string"==typeof t.type&&t.type},function(t){return!t.type&&t.properties&&"object"},function(t){return"string"!=typeof t.type&&"multiple"}];function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t){return!(null===t||"object"!==i(t)||t.nodeType||t===t.window||t.constructor&&!u(t.constructor.prototype,"isPrototypeOf"))}function a(t){return o(t)?s({},t):Array.isArray(t)?t.map(a):t}function s(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.forEach((function(e){e&&Object.keys(e).forEach((function(r){e[r]&&o(e[r])?(u(t,r)||(t[r]={}),s(t[r],e[r])):Array.isArray(e[r])?t[r]=a(e[r]):t[r]=e[r]}))})),t}function l(t,e){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0),t.dispatchEvent(r)}function c(t){return t&&("[object ShadowRoot]"===t.toString()?t:c(t.parentNode))}function u(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}r(4812),r(2419),r(4819),r(5003),r(4723),r(2023),r(9600),r(5212),r(6755),r(1249),r(4678),r(1058);var h=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,p=/^\s*(-|\+)?(\d+)\s*$/;function d(){var t=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==y(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===y(i)?i:String(i)),n)}var i}var v=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaults=r,this.jsoneditor=e.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=e.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=s({},this.options||{},this.schema.options||{},e.schema.options||{},e),this.formname=this.jsoneditor.options.form_name_root||"root",e.path||this.schema.id||(this.schema.id=this.formname),this.path=e.path||this.formname,this.formname=e.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=e.parent,this.key=void 0!==this.parent?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,e.container&&this.setContainer(e.container),this.registerDependencies()}var e,r;return e=t,r=[{key:"onChildEditorChange",value:function(t){this.onChange(!0)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}},{key:"onChange",value:function(t){this.notify(),this.watch_listener&&this.watch_listener(),t&&this.change()}},{key:"register",value:function(){this.jsoneditor.registerEditor(this),this.onChange()}},{key:"unregister",value:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}},{key:"getNumColumns",value:function(){return 12}},{key:"isActive",value:function(){return this.active}},{key:"activate",value:function(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}},{key:"registerDependencies",value:function(){var t=this;this.dependenciesFulfilled=!0;var e=this.options.dependencies;e&&Object.keys(e).forEach((function(e){var r=t.path.split(".");r[r.length-1]=e,r=r.join("."),t.jsoneditor.watch(r,(function(){t.evaluateDependencies()}))}))}},{key:"evaluateDependencies",value:function(){var t=this,e=this.container||this.control;if(e&&null!==this.jsoneditor){var r=this.options.dependencies;if(r){var n=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(r).forEach((function(e){var n=t.path.split(".");n[n.length-1]=e,n=n.join(".");var i=r[e];t.checkDependency(n,i)})),this.dependenciesFulfilled!==n&&this.notify();var i=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(i="none"),"TD"===e.tagName?Object.keys(e.childNodes).forEach((function(t){return e.childNodes[t].style.display=i})):e.style.display=i}}}},{key:"checkDependency",value:function(t,e){var r=this;if(this.path!==t&&null!==this.jsoneditor){var n=this.jsoneditor.getEditor(t),i=n?n.getValue():void 0;n&&n.dependenciesFulfilled?Array.isArray(e)?this.dependenciesFulfilled=e.some((function(t){if(JSON.stringify(i)===JSON.stringify(t))return!0})):"object"===y(e)?"object"!==y(i)?this.dependenciesFulfilled=e===i:Object.keys(e).some((function(t){return!!u(e,t)&&(u(i,t)&&e[t]===i[t]?void 0:(r.dependenciesFulfilled=!1,!0))})):"string"==typeof e||"number"==typeof e?this.dependenciesFulfilled=this.dependenciesFulfilled&&i===e:"boolean"==typeof e&&(this.dependenciesFulfilled=e?this.dependenciesFulfilled&&(i||i.length>0):this.dependenciesFulfilled&&(!i||0===i.length)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(t){this.container=t,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&"string"==typeof this.schema.type&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(t){var e=this;this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",(function(){e.isActive()?e.deactivate():e.activate()}));var r=this.jsoneditor.options.show_opt_in,n=void 0!==this.parent.options.show_opt_in,i=n&&!0===this.parent.options.show_opt_in,o=n&&!1===this.parent.options.show_opt_in;(i||!o&&r||!n&&r)&&this.parent&&"object"===this.parent.schema.type&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.register(),this.onWatchedFieldChange()}},{key:"setupWatchListeners",value:function(){var t=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){t.refreshWatchedFieldValues()&&t.onWatchedFieldChange()},u(this.schema,"watch")){var e,r,n,i,o,a=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(s){if(e=t.schema.watch[s],Array.isArray(e)){if(e.length<2)return;r=[e[0]].concat(e[1].split("."))}else r=e.split("."),t.theme.closest(t.container,'[data-schemaid="'.concat(r[0],'"]'))||r.unshift("#");if("#"===(n=r.shift())&&(n=t.jsoneditor.schema.id||t.jsoneditor.root.formname),!(i=t.theme.closest(t.container,'[data-schemaid="'.concat(n,'"]'))))throw new Error("Could not find ancestor node with id ".concat(n));o="".concat(i.getAttribute("data-schemapath"),".").concat(r.join(".")),a.startsWith(o)&&(t.watchLoop=!0),t.jsoneditor.watch(o,t.watch_listener),t.watched[s]=o}))}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}},{key:"addLinks",value:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),void 0!==this.description?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var t=0;t<this.schema.links.length;t++)this.addLink(this.getLink(this.schema.links[t]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i="json-editor-btn-".concat(e);e=this.iconlib?this.iconlib.getIcon(e):null,t=this.translate(t,n),r=this.translate(r,n),!e&&r&&(t=r,r=null);var o=this.theme.getButton(t,e,r);return o.classList.add(i),o}},{key:"setButtonText",value:function(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return r=this.iconlib?this.iconlib.getIcon(r):null,e=this.translate(e,i),n=this.translate(n,i),!r&&n&&(e=n,n=null),this.theme.setButtonText(t,e,r,n)}},{key:"addLink",value:function(t){this.link_holder&&this.link_holder.appendChild(t)}},{key:"getLink",value:function(t){var e,r,n=(t.mediaType||"application/javascript").split("/")[0],i=this.jsoneditor.compileTemplate(t.href,this.template_engine),o=this.jsoneditor.compileTemplate(t.rel?t.rel:t.href,this.template_engine),a=null;if(t.download&&(a=t.download),a&&!0!==a&&(a=this.jsoneditor.compileTemplate(a,this.template_engine)),"image"===n){e=this.theme.getBlockLinkHolder(),(r=document.createElement("a")).setAttribute("target","_blank");var s=document.createElement("img");this.theme.createImageLink(e,r,s),this.link_watchers.push((function(t){var e=i(t),n=o(t);r.setAttribute("href",e),r.setAttribute("title",n||e),s.setAttribute("src",e)}))}else if(["audio","video"].includes(n)){e=this.theme.getBlockLinkHolder(),(r=this.theme.getBlockLink()).setAttribute("target","_blank");var l=document.createElement(n);l.setAttribute("controls","controls"),this.theme.createMediaLink(e,r,l),this.link_watchers.push((function(t){var e=i(t),n=o(t);r.setAttribute("href",e),r.textContent=n||e,l.setAttribute("src",e)}))}else r=e=this.theme.getBlockLink(),e.setAttribute("target","_blank"),e.textContent=t.rel,e.style.display="none",this.link_watchers.push((function(t){var r=i(t),n=o(t);r&&(e.style.display=""),e.setAttribute("href",r),e.textContent=n||r}));return a&&r&&(!0===a?r.setAttribute("download",""):this.link_watchers.push((function(t){r.setAttribute("download",a(t))}))),t.class&&r.classList.add(t.class),e}},{key:"refreshWatchedFieldValues",value:function(){var t=this;if(this.watched_values){var e={},r=!1;return this.watched&&Object.keys(this.watched).forEach((function(n){var i=t.jsoneditor.getEditor(t.watched[n]),o=i?i.getValue():null;t.watched_values[n]!==o&&(r=!0),e[n]=o})),e.self=this.getValue(),this.watched_values.self!==e.self&&(r=!0),this.watched_values=e,r}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var t=this.getHeaderText();if(this.header.children.length){for(var e=0;e<this.header.childNodes.length;e++)if(3===this.header.childNodes[e].nodeType){this.header.childNodes[e].nodeValue=this.cleanText(t);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(t):this.header.textContent=this.cleanText(t)}}},{key:"getHeaderText",value:function(t){return this.header_text?this.header_text:t?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}},{key:"onWatchedFieldChange",value:function(){var t;if(this.header_template){t=s(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()});var e=this.header_template(t);e!==this.header_text&&(this.header_text=e,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){t=this.getWatchedFieldValues();for(var r=0;r<this.link_watchers.length;r++)this.link_watchers[r](t)}}},{key:"setValue",value:function(t){this.value=t}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.value}},{key:"refreshValue",value:function(){}},{key:"getChildEditors",value:function(){return!1}},{key:"destroy",value:function(){var t=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach((function(e){return t.jsoneditor.unwatch(e,t.watch_listener)})),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}},{key:"isDefaultRequired",value:function(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}},{key:"getDefault",value:function(){if(void 0!==this.schema.default)return this.schema.default;if(void 0!==this.schema.enum)return this.schema.enum[0];var t=this.schema.type||this.schema.oneOf;if(t&&Array.isArray(t)&&(t=t[0]),t&&"object"===y(t)&&(t=t.type),t&&Array.isArray(t)&&(t=t[0]),"string"==typeof t){if("number"===t)return this.isDefaultRequired()?0:void 0;if("boolean"===t)return!this.isDefaultRequired()&&void 0;if("integer"===t)return this.isDefaultRequired()?0:void 0;if("string"===t)return this.isDefaultRequired()?"":void 0;if("null"===t)return null;if("object"===t)return{};if("array"===t)return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"isEnabled",value:function(){return!this.disabled}},{key:"isRequired",value:function(){return"boolean"==typeof this.schema.required?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}},{key:"getDisplayText",value:function(t){var e=[],r={};t.forEach((function(t){t.title&&(r[t.title]=r[t.title]||0,r[t.title]++),t.description&&(r[t.description]=r[t.description]||0,r[t.description]++),t.format&&(r[t.format]=r[t.format]||0,r[t.format]++),t.type&&(r[t.type]=r[t.type]||0,r[t.type]++)})),t.forEach((function(t){var n;n="string"==typeof t?t:t.title&&r[t.title]<=1?t.title:t.format&&r[t.format]<=1?t.format:t.type&&r[t.type]<=1?t.type:t.description&&r[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",e.push(n)}));var n={};return e.forEach((function(t,i){n[t]=n[t]||0,n[t]++,r[t]>1&&(e[i]="".concat(t," ").concat(n[t]))})),e}},{key:"getValidId",value:function(t){return(t=void 0===t?"":t.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(t){var e=this;if(this.schema.options&&this.schema.options.inputAttributes){var r=this.schema.options.inputAttributes,n=["name","type"].concat(t);Object.keys(r).forEach((function(t){n.includes(t.toLowerCase())||e.input.setAttribute(t,r[t])}))}}},{key:"setContainerAttributes",value:function(){var t=this;if(this.schema.options&&this.schema.options.containerAttributes){var e=this.schema.options.containerAttributes,r=["data-schemapath","data-schematype","data-schemaid"];Object.keys(e).forEach((function(n){r.includes(n.toLowerCase())||t.container.setAttribute(n,e[n])}))}}},{key:"expandCallbacks",value:function(t,e){var r=this,n=this.defaults.callbacks[t];return Object.entries(e).forEach((function(i){var o,a,s=(a=2,function(t){if(Array.isArray(t))return t}(o=i)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(o,a)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(o,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=s[0],c=s[1];c===Object(c)?e[l]=r.expandCallbacks(t,c):"string"==typeof c&&"object"===y(n)&&"function"==typeof n[c]&&(e[l]=n[c].bind(null,r))})),e}},{key:"showValidationErrors",value:function(t){}}],r&&m(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==b(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===b(i)?i:String(i)),n)}var i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=k(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},w.apply(this,arguments)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}function k(t){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},k(t)}var j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=k(n);if(i){var r=k(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"register",value:function(){w(k(a.prototype),"register",this).call(this),this.input&&(this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname),this.input.setAttribute("aria-label",this.formname))}},{key:"unregister",value:function(){w(k(a.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,r){if((!this.template||r)&&(this.shouldBeUnset()||null!=t?"object"===b(t)?t=JSON.stringify(t):this.shouldBeUnset()||"string"==typeof t||(t="".concat(t)):t="",t!==this.serialized)){var n=this.sanitize(t);if(this.input.value!==n){if(this.setValueToInputField(n),"range"===this.format){var i=this.control.querySelector("output");i&&(i.value=n)}var o=r||this.getValue()!==t;return this.refreshValue(),e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(o),{changed:o,value:n}}}}},{key:"setValueToInputField",value:function(t){this.input.value=void 0===t?"":t}},{key:"getNumColumns",value:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t="textarea"===this.input_type?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(e,t))}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var e=this.schema.minimum||0,r=this.schema.maximum||Math.max(100,e+1),n=1;this.schema.multipleOf&&(e%this.schema.multipleOf&&(e=Math.ceil(e/this.schema.multipleOf)*this.schema.multipleOf),r%this.schema.multipleOf&&(r=Math.floor(r/this.schema.multipleOf)*this.schema.multipleOf),n=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,r,n)}else this.input_type="text",["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","reset","search","submit","tel","text","time","url","week"].includes(this.format)&&(this.input_type=this.format),this.input=this.theme.getFormInputField(this.input_type);else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);void 0!==this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),void 0!==this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):void 0!==this.schema.minLength&&this.input.setAttribute("pattern",".{".concat(this.schema.minLength,",}")),this.options.compact?this.container.classList.add("compact"):this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"]),this.input.addEventListener("change",(function(e){if(e.preventDefault(),e.stopPropagation(),t.schema.template)e.currentTarget.value=t.value;else{var r=e.currentTarget.value,n=t.sanitize(r);r!==n&&(e.currentTarget.value=n),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}})),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(t){if(t){var e,r=t.offsetHeight;if(t.offsetHeight<t.scrollHeight)for(e=0;t.offsetHeight<t.scrollHeight+3&&!(e>100);)e++,r++,t.style.height="".concat(r,"px");else{for(e=0;t.offsetHeight>=t.scrollHeight+3&&!(e>100);)e++,r--,t.style.height="".concat(r,"px");t.style.height="".concat(r+1,"px")}}},this.input.addEventListener("keyup",(function(e){t.adjust_height(e.currentTarget)})),this.input.addEventListener("change",(function(e){t.adjust_height(e.currentTarget)})),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var i=this.input;if("range"===this.format&&(i=this.theme.getRangeControl(this.input,this.theme.getRangeOutput(this.input,this.schema.default||Math.max(this.schema.minimum||0,0)))),this.control=this.theme.getFormControl(this.label,i,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input),"range"===t.format&&(t.control.querySelector("output").value=t.input.value)})),this.schema.template){var o=this.expandCallbacks("template",{template:this.schema.template});"function"==typeof o.template?this.template=o.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(t){var e=this.expandCallbacks("cleave",s({},this.defaults.options.cleave||{},this.options.cleave||{}));"object"===b(e)&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",s({},this.defaults.options.imask||{},this.options.imask||{}));"object"===b(e)&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach((function(r){if(t[r]===Object(t[r]))t[r]=e.ajustIMaskOptions(t[r]);else if("mask"===r)if("regex:"===t[r].substr(0,6)){var n=t[r].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(null!==n)try{t[r]=new RegExp(n[1],n[2])}catch(t){}}else t[r]=e.getGlobalPropertyFromString(t[r])})),t}},{key:"getGlobalPropertyFromString",value:function(t){if(t.includes(".")){var e=t.split("."),r=e[0],n=e[1];if(void 0!==window[r]&&void 0!==window[r][n])return window[r][n]}else if(void 0!==window[t])return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:w(k(a.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,w(k(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,w(k(a.prototype),"disable",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}},{key:"refreshValue",value:function(){this.value=this.input.value,"string"==typeof this.value||this.shouldBeUnset()||(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.cleave_instance&&this.cleave_instance.destroy(),this.imask_instance&&this.imask_instance.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),w(k(a.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),w(k(a.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var r=t.reduce((function(t,r){return r.path===e.path&&t.push(r.message),t}),[]);r.length?this.theme.addInputError(this.input,"".concat(r.join(". "),".")):this.theme.removeInputError(this.input)}}])&&g(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function x(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==O(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===O(i)?i:String(i)),n)}var i}function C(){return C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=P(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},C.apply(this,arguments)}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}var S=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=P(n);if(i){var r=P(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e,r){var n=C(P(a.prototype),"setValue",this).call(this,t,e,r);void 0!==n&&n.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(n.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",C(P(a.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;if(window.ace){var r=this.input_type;"cpp"!==r&&"c++"!==r&&"c"!==r||(r="c_cpp"),t=this.expandCallbacks("ace",s({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(r)})),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor_instance=window.ace.edit(this.ace_container,t),this.ace_editor_instance.setValue(this.getValue()),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize(),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.ace_editor_instance.setReadOnly(!0),this.ace_editor_instance.on("change",(function(){e.input.value=e.ace_editor_instance.getValue(),e.refreshValue(),e.is_dirty=!0,e.onChange(!0)})),this.theme.afterInputReady(this.input)}else C(P(a.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!1),C(P(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),C(P(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),C(P(a.prototype),"destroy",this).call(this)}}])&&x(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function L(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==T(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===T(i)?i:String(i)),n)}var i}function R(){return R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=I(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},R.apply(this,arguments)}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}function I(t){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(t)}r(7327);var B=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=I(n);if(i){var r=I(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===T(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,r=[{key:"askConfirmation",value:function(){return!0!==this.jsoneditor.options.prompt_before_delete||!1!==window.confirm(this.translate("button_delete_node_warning"))}},{key:"getDefault",value:function(){return this.schema.default||[]}},{key:"register",value:function(){R(I(a.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(t){return t.register()}))}},{key:"unregister",value:function(){R(I(a.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach((function(t){return t.unregister()}))}},{key:"getNumColumns",value:function(){var t=this.getItemInfo(0);return this.tabs_holder&&"tabs-top"!==this.schema.format?Math.max(Math.min(12,t.width+2),4):t.width}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach((function(e){e.enable(),t.setAvailability(e,!1)})),R(I(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach((function(r){r.disable(t),e.setAvailability(r,!0)})),R(I(a.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(t,e){t.add_row_button&&(t.add_row_button.disabled=e),t.remove_all_rows_button&&(t.remove_all_rows_button.disabled=e),t.delete_last_row_button&&(t.delete_last_row_button.disabled=e),t.copy_button&&(t.copy_button.disabled=e),t.delete_button&&(t.delete_button.disabled=e),t.moveup_button&&(t.moveup_button.disabled=e),t.movedown_button&&(t.movedown_button.disabled=e)}},{key:"preBuild",value:function(){R(I(a.prototype),"preBuild",this).call(this),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_delete_all_rows_buttons=this.hide_delete_buttons||this.options.disable_array_delete_all_rows||this.jsoneditor.options.disable_array_delete_all_rows,this.hide_delete_last_row_buttons=this.hide_delete_buttons||this.options.disable_array_delete_last_row||this.jsoneditor.options.disable_array_delete_last_row,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add,this.show_copy_button=this.options.enable_array_copy||this.jsoneditor.options.enable_array_copy,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top}},{key:"build",value:function(){this.options.compact?(this.title=this.theme.getHeader("",this.getPathDepth()),this.container.appendChild(this.title),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),"tabs-top"===this.schema.format?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTopTabContentHolder(this.tabs_holder),this.active_tab=null):"tabs"===this.schema.format?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls))),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),this.refreshTabs(!0),R(I(a.prototype),"onChildEditorChange",this).call(this,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(t.title)||this.translate("default_array_item_title")}else this.item_title=this.translate("default_array_item_title");return this.cleanText(this.item_title)}},{key:"getItemSchema",value:function(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?!0===this.schema.additionalItems?{}:this.schema.additionalItems?s({},this.schema.additionalItems):void 0:s({},this.schema.items[t]):this.schema.items?s({},this.schema.items):{}}},{key:"getItemInfo",value:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var r=JSON.stringify(e);return void 0!==this.item_info[r]||(e=this.jsoneditor.expandRefs(e),this.item_info[r]={title:this.translateProperty(e.title)||this.translate("default_array_item_title"),default:e.default,width:12,child_editors:e.properties||e.items}),this.item_info[r]}},{key:"getElementEditor",value:function(t){var e=this.getItemInfo(t),r=this.getItemSchema(t);(r=this.jsoneditor.expandRefs(r)).title="".concat(e.title," ").concat(t+1);var n,i=this.jsoneditor.getEditorClass(r);this.tabs_holder?(n="tabs-top"===this.schema.format?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):n=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(n);var o=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:r,container:n,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return o.preBuild(),o.build(),o.postBuild(),o.title_controls||(o.array_controls=this.theme.getButtonHolder(),n.appendChild(o.array_controls)),o}},{key:"checkParent",value:function(t){return t&&t.parentNode}},{key:"destroy",value:function(){this.empty(!0),this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.controls)&&this.controls.parentNode.removeChild(this.controls),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,R(I(a.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;this.rows&&(this.rows.forEach((function(r,n){t&&(e.checkParent(r.tab)&&r.tab.parentNode.removeChild(r.tab),e.destroyRow(r,!0),e.row_cache[n]=null),e.rows[n]=null})),this.rows=[],t&&(this.row_cache=[]))}},{key:"destroyRow",value:function(t,e){var r=t.container;e?(t.destroy(),r.parentNode&&r.parentNode.removeChild(r),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),r.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&!1===this.schema.additionalItems?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach((function(r){r.tab&&(t?r.tab_text.textContent=r.getHeaderText():r.tab===e.active_tab?e.theme.markTabActive(r):e.theme.markTabInactive(r))}))}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach((function(e,n){if(t.rows[n])t.rows[n].setValue(e,r);else if(t.row_cache[n])t.rows[n]=t.row_cache[n],t.rows[n].setValue(e,r),t.rows[n].container.style.display="",t.rows[n].tab&&(t.rows[n].tab.style.display=""),t.rows[n].register(),t.jsoneditor.trigger("addRow",t.rows[n]);else{var i=t.addRow(e,r);t.jsoneditor.trigger("addRow",i)}}));for(var n=e.length;n<this.rows.length;n++)this.destroyRow(this.rows[n]),this.rows[n]=null;this.rows=this.rows.slice(0,e.length);var i=this.rows.find((function(e){return e.tab===t.active_tab})),o=void 0!==i?i.tab:null;!o&&this.rows.length&&(o=this.rows[0].tab),this.active_tab=o,this.refreshValue(r),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}}},{key:"setVisibility",value:function(t,e){t.style.display=e?"":"none"}},{key:"setupButtons",value:function(t){var e=[];if(this.value.length)if(1===this.value.length){this.remove_all_rows_button.style.display="none";var r=!(t||this.hide_delete_last_row_buttons);this.setVisibility(this.delete_last_row_button,r),e.push(r)}else{var n=!(t||this.hide_delete_last_row_buttons);this.setVisibility(this.delete_last_row_button,n),e.push(n);var i=!(t||this.hide_delete_all_rows_buttons);this.setVisibility(this.remove_all_rows_button,i),e.push(i)}else this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none";var o=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setVisibility(this.add_row_button,o),e.push(o),e.some((function(t){return t}))}},{key:"refreshValue",value:function(t){var e=this,r=this.value?this.value.length:0;if(this.value=this.rows.map((function(t){return t.getValue()})),r!==this.value.length||t){var n=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(t,r){if(t.movedown_button){var i=r!==e.rows.length-1;e.setVisibility(t.movedown_button,i)}t.delete_button&&e.setVisibility(t.delete_button,!n),e.value[r]=t.getValue()})),!this.collapsed&&this.setupButtons(n)?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t,e){var r=this,n=this.rows.length;this.rows[n]=this.getElementEditor(n),this.row_cache[n]=this.rows[n],this.tabs_holder&&(this.rows[n].tab_text=document.createElement("span"),this.rows[n].tab_text.textContent=this.rows[n].getHeaderText(),"tabs-top"===this.schema.format?(this.rows[n].tab=this.theme.getTopTab(this.rows[n].tab_text,this.getValidId(this.rows[n].path)),this.theme.addTopTab(this.tabs_holder,this.rows[n].tab)):(this.rows[n].tab=this.theme.getTab(this.rows[n].tab_text,this.getValidId(this.rows[n].path)),this.theme.addTab(this.tabs_holder,this.rows[n].tab)),this.rows[n].tab.addEventListener("click",(function(t){r.active_tab=r.rows[n].tab,r.refreshTabs(),t.preventDefault(),t.stopPropagation()})));var i=this.rows[n].title_controls||this.rows[n].array_controls;return this.hide_delete_buttons||(this.rows[n].delete_button=this._createDeleteButton(n,i)),this.show_copy_button&&(this.rows[n].copy_button=this._createCopyButton(n,i)),n&&!this.hide_move_buttons&&(this.rows[n].moveup_button=this._createMoveUpButton(n,i)),this.hide_move_buttons||(this.rows[n].movedown_button=this._createMoveDownButton(n,i)),void 0!==t&&this.rows[n].setValue(t,e),this.refreshTabs(),this.rows[n]}},{key:"_createDeleteButton",value:function(t,e){var r=this,n=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return n.classList.add("delete","json-editor-btntype-delete"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!r.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),n=r.getValue().filter((function(t,r){return r!==e})),i=null,o=r.rows[e].getValue();r.setValue(n),r.rows[e]?i=r.rows[e].tab:r.rows[e-1]&&(i=r.rows[e-1].tab),i&&(r.active_tab=i,r.refreshTabs()),r.onChange(!0),r.jsoneditor.trigger("deleteRow",o)})),e&&e.appendChild(n),n}},{key:"_createCopyButton",value:function(t,e){var r=this,n=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),i=this.schema;return n.classList.add("copy","json-editor-btntype-copy"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){var e=r.getValue();t.preventDefault(),t.stopPropagation();var n=1*t.currentTarget.getAttribute("data-i");e.forEach((function(t,r){if(r===n){if("string"===i.items.type&&"uuid"===i.items.format)t=d();else if("object"===i.items.type&&i.items.properties)for(var o=0,a=Object.keys(t);o<a.length;o++){var s=a[o];i.items.properties&&i.items.properties[s]&&"uuid"===i.items.properties[s].format&&(t[s]=d())}e.push(t)}})),r.setValue(e),r.refreshValue(!0),r.onChange(!0)})),e.appendChild(n),n}},{key:"_createMoveUpButton",value:function(t,e){var r=this,n=this.getButton("","tabs-top"===this.schema.format?"moveleft":"moveup","button_move_up_title");return n.classList.add("moveup","json-editor-btntype-move"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i");if(!(e<=0)){var n=r.getValue(),i=n[e-1];n[e-1]=n[e],n[e]=i,r.setValue(n),r.active_tab=r.rows[e-1].tab,r.refreshTabs(),r.onChange(!0),r.jsoneditor.trigger("moveRow",r.rows[e-1])}})),e&&e.appendChild(n),n}},{key:"_createMoveDownButton",value:function(t,e){var r=this,n=this.getButton("","tabs-top"===this.schema.format?"moveright":"movedown","button_move_down_title");return n.classList.add("movedown","json-editor-btntype-move"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),n=r.getValue();if(!(e>=n.length-1)){var i=n[e+1];n[e+1]=n[e],n[e]=i,r.setValue(n),r.active_tab=r.rows[e+1].tab,r.refreshTabs(),r.onChange(!0),r.jsoneditor.trigger("moveRow",r.rows[e+1])}})),e&&e.appendChild(n),n}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&l(this.toggle_button,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton(),this.tabs&&(this.add_row_button.classList.add("je-array-control-btn"),this.delete_last_row_button.classList.add("je-array-control-btn"),this.remove_all_rows_button.classList.add("je-array-control-btn"))}},{key:"_createToggleButton",value:function(){var t=this,e=this.getButton("","collapse","button_collapse");e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var r=this.row_holder.style.display,n=this.controls.style.display;return e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.panel&&t.setVisibility(t.panel,t.collapsed),t.tabs_holder&&t.setVisibility(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=r,t.controls.style.display=n,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(e.currentTarget,"","expand","button_expand"))})),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation();var r,n=t.rows.length;t.row_cache[n]?(r=t.rows[n]=t.row_cache[n],t.rows[n].setValue(t.rows[n].getDefault(),!0),t.rows[n].container.style.display="",t.rows[n].tab&&(t.rows[n].tab.style.display=""),t.rows[n].register()):r=t.addRow(),t.active_tab=t.rows[n].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",r)})),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var r=t.getValue(),n=null,i=r.pop();t.setValue(r),t.rows[t.rows.length-1]&&(n=t.rows[t.rows.length-1].tab),n&&(t.active_tab=n,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",i)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var r=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",r)})),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,r=[],n=[];t.forEach((function(t){t.path===e.path?r.push(t):n.push(t)})),this.error_holder&&(r.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",r.forEach((function(t){e.error_holder.appendChild(e.theme.getErrorMessage(t.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(t){return t.showValidationErrors(n)}))}}],r&&L(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==N(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===N(i)?i:String(i)),n)}var i}function F(){return F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=z(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},F.apply(this,arguments)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}B.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var H=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=z(n);if(i){var r=z(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===N(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){F(z(a.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){F(z(a.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach((function(r){return e=Math.max(e,"".concat(t.select_values[r]).length+4)})),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;F(z(a.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var e=this.jsoneditor.expandRefs(this.schema.items||{}),r=e.enum||[],n=e.options&&e.options.enum||[],i=e.options&&e.options.enum_titles||[];for(t=0;t<r.length;t++)if(this.sanitize(r[t])===r[t]){var o=n[t]||{};"title"in o||(o.title="".concat(i[t]||r[t])),this.option_keys.push("".concat(r[t])),this.option_enum.push(o),this.select_values["".concat(r[t])]=r[t]}}},{key:"build",value:function(){var t,e=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),!this.schema.format&&this.option_keys.length<8||"checkbox"===this.schema.format){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){var r=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=r,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var n=this.theme.getCheckboxLabel(this.option_enum[t].title);if(n.htmlFor=r,this.option_enum[t].infoText){var i=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));n.appendChild(i)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(n,this.inputs[this.option_keys[t]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description,this.infoButton),this.inputs.controlgroup=this.inputs.controls=this.control}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys,!0),this.theme.setSelectOptions(this.input,this.option_keys,this.option_enum.map((function(t){return t.title}))),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton)}(this.schema.readOnly||this.schema.readonly)&&this.disable(!0),this.container.appendChild(this.control),this.multiselectChangeHandler=function(r){var n=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&n.push(e.select_values[e.option_keys[t]]);e.updateValue(n),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){e.afterInputReady()}))}},{key:"postBuild",value:function(){F(z(a.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(t,e){var r=this;t=t||[],Array.isArray(t)||(t=[t]),t=t.map((function(t){return"".concat(t)})),Object.keys(this.select_options).forEach((function(e){r.select_options[e]["select"===r.input_type?"selected":"checked"]=t.includes(e)})),this.updateValue(t),this.onChange(!0)}},{key:"removeValue",value:function(t){t=[].concat(t),this.setValue(this.getValue().filter((function(e){return!t.includes(e)})))}},{key:"addValue",value:function(t){this.setValue(this.getValue().concat(t))}},{key:"updateValue",value:function(t){for(var e=!1,r=[],n=0;n<t.length;n++)if(this.select_options["".concat(t[n])]){var i=this.sanitize(this.select_values[t[n]]);r.push(i),i!==t[n]&&(e=!0)}else e=!0;return this.value=r,e}},{key:"sanitize",value:function(t){return"boolean"===this.schema.items.type?!!t:"number"===this.schema.items.type?1*t||0:"integer"===this.schema.items.type?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach((function(e){return t.inputs[e].disabled=!1})),F(z(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach((function(t){return e.inputs[t].disabled=!0})),F(z(a.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){F(z(a.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(t){var e=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),r=t.reduce((function(t,r){return r.path.match(e)&&t.push(r.message),t}),[]);r.length?this.theme.addInputError(this.input||this.inputs,"".concat(r.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&D(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function q(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==M(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===M(i)?i:String(i)),n)}var i}function G(){return G="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},G.apply(this,arguments)}function U(t,e){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},U(t,e)}function $(t){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$(t)}var J=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$(n);if(i){var r=$(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){this.choices_instance?(t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):G($(a.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",s({},{removeItems:!0,removeItemButton:!0},this.defaults.options.choices||{},this.options.choices||{},{addItems:!0,editItems:!1,duplicateItemsAllowed:!1}));this.newEnumAllowed=!1,this.choices_instance=new window.Choices(this.input,e),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(e){var r=t.choices_instance.getValue(!0);t.updateValue(r),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}G($(a.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,r=[],n=0;n<t.length;n++){if(!this.select_values["".concat(t[n])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[n]))continue}var i=this.sanitize(this.select_values[t[n]]);r.push(i),i!==t[n]&&(e=!0)}return this.value=r,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),G($(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),G($(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),G($(a.prototype),"destroy",this).call(this)}}])&&q(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(H);function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function Z(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==W(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===W(i)?i:String(i)),n)}var i}function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=K(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Y.apply(this,arguments)}function Q(t,e){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Q(t,e)}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},K(t)}var X=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Q(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=K(n);if(i){var r=K(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===W(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){this.select2_instance?(t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Y(K(a.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(t=this.expandCallbacks("select2",s({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&"string"===this.schema.items.type,this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=u(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var t=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(t),e.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Y(K(a.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,r=[],n=0;n<t.length;n++){if(!this.select_values["".concat(t[n])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[n]))continue}var i=this.sanitize(this.select_values[t[n]]);r.push(i),i!==t[n]&&(e=!0)}return this.value=r,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!1,!1)).trigger("change"),!0}},{key:"enable",value:function(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Y(K(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Y(K(a.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Y(K(a.prototype),"destroy",this).call(this)}}])&&Z(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(H);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==tt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===tt(i)?i:String(i)),n)}var i}function rt(){return rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=it(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},rt.apply(this,arguments)}function nt(t,e){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nt(t,e)}function it(t){return it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},it(t)}var ot=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nt(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=it(n);if(i){var r=it(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){this.selectize_instance?(t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):rt(it(a.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance&&(t=this.expandCallbacks("selectize",s({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=t.create=!!t.create&&this.schema.items&&"string"===this.schema.items.type,this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(t){var r=e.selectize_instance.getValue();e.updateValue(r),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)),rt(it(a.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,r=[],n=0;n<t.length;n++){if(!this.select_values["".concat(t[n])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[n]))continue}var i=this.sanitize(this.select_values[t[n]]);r.push(i),i!==t[n]&&(e=!0)}return this.value=r,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),rt(it(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),rt(it(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),rt(it(a.prototype),"destroy",this).call(this)}}])&&et(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(H);function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function st(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==at(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===at(i)?i:String(i)),n)}var i}function lt(){return lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ut(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},lt.apply(this,arguments)}function ct(t,e){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ct(t,e)}function ut(t){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ut(t)}var ht=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ct(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ut(n);if(i){var r=ut(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===at(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"postBuild",value:function(){window.Autocomplete&&(this.autocomplete_wrapper=document.createElement("div"),this.input.parentNode.insertBefore(this.autocomplete_wrapper,this.input.nextSibling),this.autocomplete_wrapper.appendChild(this.input),this.autocomplete_dropdown=document.createElement("ul"),this.input.parentNode.insertBefore(this.autocomplete_dropdown,this.input.nextSibling)),lt(ut(a.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",s({},{search:function(t){return console.log('No "search" callback defined for autocomplete in property "'.concat(t.key,'"')),[]},onSubmit:function(){e.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add("".concat(t.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),lt(ut(a.prototype),"afterInputReady",this).call(this)}},{key:"destroy",value:function(){this.autocomplete_instance&&(this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.autocomplete_dropdown&&this.autocomplete_dropdown.parentNode&&this.autocomplete_dropdown.parentNode.removeChild(this.autocomplete_dropdown),this.autocomplete_wrapper&&this.autocomplete_wrapper.parentNode&&this.autocomplete_wrapper.parentNode.removeChild(this.autocomplete_wrapper),this.autocomplete_instance=null),lt(ut(a.prototype),"destroy",this).call(this)}}])&&st(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function pt(t){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(t)}function dt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==pt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===pt(i)?i:String(i)),n)}var i}function ft(){return ft="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mt(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},ft.apply(this,arguments)}function yt(t,e){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yt(t,e)}function mt(t){return mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mt(t)}r(561);var vt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yt(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=mt(n);if(i){var r=mt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===pt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",(function(t){if(e.count===e.current_item_index)e.value[e.count][e.key]=t.target.result;else{var r={};for(var n in e.parent.schema.properties)r[n]="";r[e.key]=t.target.result,e.value.splice(e.count,0,r)}e.count+=1,e.count===e.total+e.current_item_index&&e.arrayEditor.setValue(e.value)}))}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw new Error("FileReader required for base64 editor");this.uploader=this.theme.getFormInputField("file"),this.schema.options&&this.schema.options.multiple&&!0===this.schema.options.multiple&&this.parent&&"object"===this.parent.schema.type&&this.parent.parent&&"array"===this.parent.parent.schema.type&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",(function(e){if(e.preventDefault(),e.stopPropagation(),e.currentTarget.files&&e.currentTarget.files.length)if(e.currentTarget.files.length>1&&t.schema.options&&t.schema.options.multiple&&!0===t.schema.options.multiple&&t.parent&&"object"===t.parent.schema.type&&t.parent.parent&&"array"===t.parent.parent.schema.type){t.arrayEditor=t.jsoneditor.getEditor(t.parent.parent.path),t.value=t.arrayEditor.getValue(),t.total=e.currentTarget.files.length,t.current_item_index=parseInt(t.parent.key),t.count=t.current_item_index;for(var r=0;r<t.total;r++){var n=new FileReader;t.setFileReaderListener(n),n.readAsDataURL(e.currentTarget.files[r])}}else{var i=new FileReader;i.onload=function(e){t.value=e.target.result,t.refreshPreview(),t.onChange(!0),i=null},i.readAsDataURL(e.currentTarget.files[0])}}))}this.preview=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview,this.infoButton),this.container.appendChild(this.control)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),"image"===t.substr(0,5)){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),ft(mt(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),ft(mt(a.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,this.input.value=this.value,this.refreshPreview(),this.onChange())}},{key:"destroy",value:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),ft(mt(a.prototype),"destroy",this).call(this)}}])&&dt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function bt(t){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(t)}function gt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==bt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===bt(i)?i:String(i)),n)}var i}function wt(){return wt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kt(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},wt.apply(this,arguments)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function kt(t){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kt(t)}var jt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=kt(n);if(i){var r=kt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===bt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(r=o.call(this,t,e)).active=!1,r.parent&&r.parent.schema&&(Array.isArray(r.parent.schema.required)?r.parent.schema.required.includes(r.key)||r.parent.schema.required.push(r.key):r.parent.schema.required=[r.key]),r}return e=a,(r=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.translateProperty(this.schema.title)||this.key,r=this.expandCallbacks("button",s({},{icon:"",validated:!1,align:"left",action:function(t,e){window.alert('No button action defined for "'.concat(t.path,'"'))}},this.defaults.options.button||{},this.options.button||{}));this.input=this.getButton(e,r.icon,e),this.input.addEventListener("click",r.action,!1),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["readonly"]),this.control=this.theme.getFormButtonHolder(r.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){t.jsoneditor.validate(t.jsoneditor.getValue()).length>0?t.disable():t.enable()},r.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,wt(kt(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,wt(kt(a.prototype),"disable",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"activate",value:function(){this.active=!1,this.enable()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.disable())}},{key:"destroy",value:function(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,wt(kt(a.prototype),"destroy",this).call(this)}}])&&gt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function xt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Ot(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Ot(i)?i:String(i)),n)}var i}function Ct(){return Ct="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Pt(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Ct.apply(this,arguments)}function Et(t,e){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Et(t,e)}function Pt(t){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pt(t)}var St=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Et(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Pt(n);if(i){var r=Pt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){t=!!t;var r=this.getValue()!==t;this.value=t,this.input.checked=this.value,this.onChange(r)}},{key:"register",value:function(){Ct(Pt(a.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Ct(Pt(a.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))}},{key:"build",value:function(){var t=this;this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",(function(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.onChange(!0)})),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Ct(Pt(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Ct(Pt(a.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Ct(Pt(a.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var r=t.reduce((function(t,r){return r.path===e.path&&t.push(r.message),t}),[]);this.input.controlgroup=this.control,r.length?this.theme.addInputError(this.input,"".concat(r.join(". "),".")):this.theme.removeInputError(this.input)}}])&&xt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function Tt(t){return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(t)}function Lt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Tt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Tt(i)?i:String(i)),n)}var i}function Rt(){return Rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=It(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Rt.apply(this,arguments)}function At(t,e){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},At(t,e)}function It(t){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},It(t)}r(2772),r(2707);var Bt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&At(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=It(n);if(i){var r=It(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){var r=this.typecast(t),n=!!this.jsoneditor.options.use_default_values||void 0!==this.schema.default;(this.enum_options.length>0&&!this.enum_values.includes(r)||e&&!this.isRequired()&&!n)&&(r=this.enum_values[0]),this.value!==r&&(e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(r)],this.value=r,this.onChange(),this.change())}},{key:"register",value:function(){Rt(It(a.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Rt(It(a.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))}},{key:"typecast",value:function(t){return"boolean"===this.schema.type?"undefined"===t||void 0===t?void 0:!!t:"number"===this.schema.type?1*t||0:"integer"===this.schema.type?Math.floor(1*t||0):this.schema.enum&&void 0===t?void 0:"".concat(t)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var t,e,r=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema.enum){var n=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(t,e){r.enum_options[e]="".concat(t),r.enum_display[e]="".concat(r.translateProperty(n[e])||t),r.enum_values[e]=r.typecast(t)}))}else if("boolean"===this.schema.type)this.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],this.enum_options=["1",""],this.enum_values=[!0,!1],this.isRequired()||(this.enum_display.unshift(" "),this.enum_options.unshift("undefined"),this.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw new Error("'select' editor requires the enum property to be set.");if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(t=0;t<this.schema.enumSource.length;t++)"string"==typeof this.schema.enumSource[t]?this.enumSource[t]={source:this.schema.enumSource[t]}:Array.isArray(this.schema.enumSource[t])?this.enumSource[t]=this.schema.enumSource[t]:this.enumSource[t]=s({},this.schema.enumSource[t]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(t=0;t<this.enumSource.length;t++)this.enumSource[t].value&&("function"==typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].value})).template?this.enumSource[t].value=e.template:this.enumSource[t].value=this.jsoneditor.compileTemplate(this.enumSource[t].value,this.template_engine)),this.enumSource[t].title&&("function"==typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].title})).template?this.enumSource[t].title=e.template:this.enumSource[t].title=this.jsoneditor.compileTemplate(this.enumSource[t].title,this.template_engine)),this.enumSource[t].filter&&this.enumSource[t].value&&("function"==typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].filter})).template?this.enumSource[t].filter=e.template:this.enumSource[t].filter=this.jsoneditor.compileTemplate(this.enumSource[t].filter,this.template_engine))}}},{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getSelectInput(this.enum_options,!1),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",(function(e){e.preventDefault(),e.stopPropagation(),t.onInputChange()})),this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),this.container.appendChild(this.control),this.value=this.enum_values[0],window.requestAnimationFrame((function(){t.input.parentNode&&t.afterInputReady()}))}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var t,e=this.typecast(this.input.value);(t=this.enum_values.includes(e)?this.enum_values[this.enum_values.indexOf(e)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=t,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var t,e,r=[],n=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var i=0;i<this.enumSource.length;i++)if(Array.isArray(this.enumSource[i]))r=r.concat(this.enumSource[i]),n=n.concat(this.enumSource[i]);else{var o=[];if(o=Array.isArray(this.enumSource[i].source)?this.enumSource[i].source:t[this.enumSource[i].source]){if(this.enumSource[i].slice&&(o=Array.prototype.slice.apply(o,this.enumSource[i].slice)),this.enumSource[i].filter){var s=[];for(e=0;e<o.length;e++)this.enumSource[i].filter({i:e,item:o[e],watched:t})&&s.push(o[e]);o=s}var l=[],c=[];for(e=0;e<o.length;e++){var u=o[e];this.enumSource[i].value?c[e]=this.typecast(this.enumSource[i].value({i:e,item:u})):c[e]=o[e],this.enumSource[i].title?l[e]=this.enumSource[i].title({i:e,item:u}):l[e]=c[e]}this.enumSource[i].sort&&function(t,e,r){t.map((function(t,r){return{v:t,t:e[r]}})).sort((function(t,e){return t.v<e.v?-r:t.v===e.v?0:r})).forEach((function(r,n){t[n]=r.v,e[n]=r.t}))}.bind(null,c,l,"desc"===this.enumSource[i].sort?1:-1)(),r=r.concat(c),n=n.concat(l)}}var h=this.value;this.theme.setSelectOptions(this.input,r,n),this.enum_options=r,this.enum_display=n,this.enum_values=r,r.includes(h)||!1!==this.jsoneditor.options.enum_source_value_auto_select?(this.input.value=h,this.value=h):(this.input.value=r[0],this.value=this.typecast(r[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}Rt(It(a.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Rt(It(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Rt(It(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Rt(It(a.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var r=t.reduce((function(t,r){return r.path===e.path&&t.push(r.message),t}),[]);r.length?this.theme.addInputError(this.input,"".concat(r.join(". "),".")):this.theme.removeInputError(this.input)}}])&&Lt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function Nt(t){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}function Dt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Nt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Nt(i)?i:String(i)),n)}var i}function Ft(){return Ft="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zt(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Ft.apply(this,arguments)}function Vt(t,e){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vt(t,e)}function zt(t){return zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zt(t)}var Ht=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vt(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=zt(n);if(i){var r=zt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Nt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){if(this.choices_instance){var r=this.typecast(t||"");if(this.enum_values.includes(r)||(r=this.enum_values[0]),this.value===r)return;e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(r)],this.choices_instance.setChoiceByValue(this.input.value),this.value=r,this.onChange()}else Ft(zt(a.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",s({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Ft(zt(a.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Ft(zt(a.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var e=this.enum_options.map((function(e,r){return{value:e,label:t.enum_display[r]}}));this.choices_instance.setChoices(e,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Ft(zt(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Ft(zt(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Ft(zt(a.prototype),"destroy",this).call(this)}}])&&Dt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Bt);function Mt(t){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(t)}function qt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Mt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Mt(i)?i:String(i)),n)}var i}function Gt(){return Gt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$t(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Gt.apply(this,arguments)}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}function $t(t){return $t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$t(t)}Ht.rules={".choices > *":"box-sizing:border-box"};var Jt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ut(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$t(n);if(i){var r=$t(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Mt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"build",value:function(){if(Gt($t(a.prototype),"build",this).call(this),this.input&&(this.schema.max&&"string"==typeof this.schema.max&&this.input.setAttribute("max",this.schema.max),this.schema.min&&"string"==typeof this.schema.max&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&"object"===Mt(this.options.flatpickr))){this.options.flatpickr.enableTime="date"!==this.schema.format,this.options.flatpickr.noCalendar="time"===this.schema.format,"integer"===this.schema.type&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var t=this.input;if(!0===this.options.flatpickr.wrap){var e=[];if(!1!==this.options.flatpickr.showToggleButton){var r=this.getButton("","time"===this.schema.format?"time":"calendar","flatpickr_toggle_button");r.setAttribute("data-toggle",""),e.push(r)}if(!1!==this.options.flatpickr.showClearButton){var n=this.getButton("","clear","flatpickr_clear_button");n.setAttribute("data-clear",""),e.push(n)}var i=this.input.parentNode,o=this.input.nextSibling,s=this.theme.getInputGroup(this.input,e);void 0!==s?(this.options.flatpickr.inline=!1,i.insertBefore(s,o),t=s):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),!0===this.options.flatpickr.inline&&!0===this.options.flatpickr.inlineHideInput&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if("string"===this.schema.type)return this.value;if(""!==this.value&&void 0!==this.value){var t="time"===this.schema.format?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,e,r){if("string"===this.schema.type)Gt($t(a.prototype),"setValue",this).call(this,t,e,r),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var n=new Date(1e3*t),i=n.getFullYear(),o=this.zeroPad(n.getMonth()+1),s=this.zeroPad(n.getDate()),l=this.zeroPad(n.getHours()),c=this.zeroPad(n.getMinutes()),u=this.zeroPad(n.getSeconds()),h=[i,o,s].join("-"),p=[l,c,u].join(":"),d="".concat(h,"T").concat(p);"date"===this.schema.format?d=h:"time"===this.schema.format&&(d=p),this.input.value=d,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(d)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Gt($t(a.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&qt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function Wt(t){return Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(t)}function Zt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Wt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Wt(i)?i:String(i)),n)}var i}function Yt(){return Yt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kt(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Yt.apply(this,arguments)}function Qt(t,e){return Qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qt(t,e)}function Kt(t){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kt(t)}var Xt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qt(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Kt(n);if(i){var r=Kt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Yt(Kt(a.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Yt(Kt(a.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}},{key:"enable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Yt(Kt(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Yt(Kt(a.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var t=this,e=this.getWatchedFieldValues();if(e){var r=document.location.origin+document.location.pathname+this.template(e);this.editors[this.refs[r]]||this.buildChildEditor(r),this.currentEditor=this.refs[r],this.register(),this.editors.forEach((function(e,r){e&&(t.currentEditor===r?e.container.style.display="":e.container.style.display="none")})),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(t){this.refs[t]=this.editors.length;var e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);var r=s({},this.schema,this.jsoneditor.refs[t]),n=this.jsoneditor.getEditorClass(r,this.jsoneditor),i=this.jsoneditor.createEditor(n,{jsoneditor:this.jsoneditor,schema:r,container:e,path:this.path,parent:this,required:!0});this.editors.push(i),i.preBuild(),i.build(),i.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if("describedby"===this.schema.links[t].rel.toLowerCase()){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),0===this.schema.links.length&&delete this.schema.links,this.baseSchema=s({},this.schema)}},{key:"build",value:function(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}},{key:"onWatchedFieldChange",value:function(){this.switchEditor()}},{key:"onChildEditorChange",value:function(t){this.editors[this.currentEditor]&&this.refreshValue(),Yt(Kt(a.prototype),"onChildEditorChange",this).call(this,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach((function(t){t&&t.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Yt(Kt(a.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach((function(e){e&&e.showValidationErrors(t)}))}}])&&Zt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function te(t){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(t)}function ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function re(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==te(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===te(i)?i:String(i)),n)}var i}function ne(){return ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oe(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},ne.apply(this,arguments)}function ie(t,e){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ie(t,e)}function oe(t){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oe(t)}var ae=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ie(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=oe(n);if(i){var r=oe(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===te(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",(function(e){t.selected=t.select_options.indexOf(e.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)})),this.value=this.enum[0],this.refreshValue(),1===this.enum.length&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach((function(r,n){if(e===JSON.stringify(r))return t.selected=n,!1})),this.selected<0?this.setValue(this.enum[0]):(this.switcher.value=this.select_options[this.selected],this.display_area.innerHTML=this.html_values[this.selected])}},{key:"enable",value:function(){this.always_disabled||(this.switcher.disabled=!1,ne(oe(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,ne(oe(a.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,r,n=this;if(null===t)return"<em>null</em>";if("object"===te(t)){var i="";return e=t,r=function(e,r){var o=n.getHTML(r);Array.isArray(t)||(o="<div><em>".concat(e,"</em>: ").concat(o,"</div>")),i+="<li>".concat(o,"</li>")},Array.isArray(e)||"number"==typeof e.length&&e.length>0&&e.length-1 in e?Array.from(e).forEach((function(t,e){return r(e,t)})):Object.entries(e).forEach((function(t){var e,n,i=(n=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,n)||function(t,e){if(t){if("string"==typeof t)return ee(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ee(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],a=i[1];return r(o,a)})),i=Array.isArray(t)?"<ol>".concat(i,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(i,"</ul>")}return"boolean"==typeof t?t?"true":"false":"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):t}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ne(oe(a.prototype),"destroy",this).call(this)}}])&&re(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function se(t){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},se(t)}function le(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==se(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===se(i)?i:String(i)),n)}var i}function ce(){return ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=he(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},ce.apply(this,arguments)}function ue(t,e){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ue(t,e)}function he(t){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},he(t)}var pe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=he(n);if(i){var r=he(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===se(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"register",value:function(){ce(he(a.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){ce(he(a.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(t,e,r){if((!this.template||r)&&(null==t?t="":"object"===se(t)?t=JSON.stringify(t):"string"!=typeof t&&(t="".concat(t)),t!==this.serialized)){var n=this.sanitize(t);if(this.input.value!==n){this.input.value=n;var i=r||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(i)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){ce(he(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(){ce(he(a.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),ce(he(a.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),ce(he(a.prototype),"onWatchedFieldChange",this).call(this)}},{key:"build",value:function(){if(this.format=this.schema.format,!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.input_type="hidden",this.input=this.theme.getFormInputField(this.input_type),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.container.appendChild(this.input),this.schema.template){var t=this.expandCallbacks("template",{template:this.schema.template});"function"==typeof t.template?this.template=t.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&le(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function fe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==de(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===de(i)?i:String(i)),n)}var i}function ye(t,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ye(t,e)}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}var ve=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=me(n);if(i){var r=me(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===de(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"build",value:function(){this.options.compact=!1,this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}}])&&fe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(jt);function be(t){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(t)}function ge(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==be(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===be(i)?i:String(i)),n)}var i}function we(){return we="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ke(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},we.apply(this,arguments)}function _e(t,e){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_e(t,e)}function ke(t){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke(t)}var je=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_e(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ke(n);if(i){var r=ke(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"build",value:function(){if(we(ke(a.prototype),"build",this).call(this),void 0!==this.schema.minimum){var t=this.schema.minimum;void 0!==this.schema.exclusiveMinimum&&(t+=1),this.input.setAttribute("min",t)}if(void 0!==this.schema.maximum){var e=this.schema.maximum;void 0!==this.schema.exclusiveMaximum&&(e-=1),this.input.setAttribute("max",e)}if(void 0!==this.schema.step){var r=this.schema.step||1;this.input.setAttribute("step",r)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||""!==this.value?function(t){if(null==t)return!1;var e=t.match(h),r=parseFloat(t);return null!==e&&!isNaN(r)&&isFinite(r)}(this.value)?parseFloat(this.value):this.value:void(this.input.value="")}}])&&ge(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function xe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Oe(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Oe(i)?i:String(i)),n)}var i}function Ce(t,e){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ce(t,e)}function Ee(t){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ee(t)}var Pe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ce(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ee(n);if(i){var r=Ee(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||""!==this.value?function(t){if(null==t)return!1;var e=t.match(p),r=parseInt(t);return null!==e&&!isNaN(r)&&isFinite(r)}(this.value)?parseInt(this.value):this.value:void(this.input.value="")}}])&&xe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(je);function Se(t){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Se(t)}function Te(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Se(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Se(i)?i:String(i)),n)}var i}function Le(){return Le="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ae(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Le.apply(this,arguments)}function Re(t,e){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Re(t,e)}function Ae(t){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ae(t)}var Ie=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Re(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ae(n);if(i){var r=Ae(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Se(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"preBuild",value:function(){if(Le(Ae(a.prototype),"preBuild",this).call(this),this.schema.options||(this.schema.options={}),!this.schema.options.cleave)switch(this.format){case"ipv6":this.schema.options.cleave={delimiters:[":"],blocks:[4,4,4,4,4,4,4,4],uppercase:!0};break;case"ipv4":this.schema.options.cleave={delimiters:["."],blocks:[3,3,3,3],numericOnly:!0}}this.options=s(this.options,this.schema.options||{})}}])&&Te(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function Ne(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Be(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Be(i)?i:String(i)),n)}var i}function De(){return De="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ve(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},De.apply(this,arguments)}function Fe(t,e){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fe(t,e)}function Ve(t){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ve(t)}var ze=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fe(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ve(n);if(i){var r=Ve(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e,r){var n=De(Ve(a.prototype),"setValue",this).call(this,t,e,r);void 0!==n&&n.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(n.value)}},{key:"build",value:function(){this.options.format="textarea",De(Ve(a.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.Jodit?(t=this.expandCallbacks("jodit",s({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",(function(){e.value=e.jodit_instance.getEditorValue(),e.is_dirty=!0,e.onChange(!0)})),this.theme.afterInputReady(this.input)):De(Ve(a.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),De(Ve(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),De(Ve(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),De(Ve(a.prototype),"destroy",this).call(this)}}])&&Ne(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j),He=(r(6541),r(9337),r(3321),function(t){var e=t.split(".");if(4!==e.length)throw new Error("error_ipv4");e.forEach((function(t){if(isNaN(+t)||+t<0||+t>255)throw new Error("error_ipv4")}))}),Me=function(t){if(!t.match("^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$"))throw new Error("error_ipv6")},qe=function(t){if(!t.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function Ge(t,e,r,n){try{switch(t.format){case"ipv4":He(e);break;case"ipv6":Me(e);break;case"hostname":qe(e)}return[]}catch(t){return[{path:r,property:"format",message:n(t.message)}]}}function Ue(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $e(t,e,r){return(e=Xe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Je(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Ze(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(t){return function(t){if(Array.isArray(t))return Ye(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ze(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ze(t,e){if(t){if("string"==typeof t)return Ye(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ye(t,e):void 0}}function Ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qe(t){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qe(t)}function Ke(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xe(n.key),n)}}function Xe(t){var e=function(t,e){if("object"!==Qe(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Qe(e)?e:String(e)}var tr=function(){function t(e,r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.jsoneditor=e,this.schema=r||this.jsoneditor.schema,this.options=n||{},this.translate=this.jsoneditor.translate||i.translate,this.translateProperty=this.jsoneditor.translateProperty||i.translateProperty,this.defaults=i,this._validateSubSchema={const:function(t,e,r){return JSON.stringify(t.const)!==JSON.stringify(e)||Array.isArray(e)||"object"===Qe(e)?[{path:r,property:"const",message:this.translate("error_const",null,t)}]:[]},enum:function(t,e,r){var n=JSON.stringify(e);return t.enum.some((function(t){return n===JSON.stringify(t)}))?[]:[{path:r,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,r){var n=this;return t.extends.reduce((function(t,i){return t.push.apply(t,We(n._validateSchema(i,e,r))),t}),[])},allOf:function(t,e,r){var n=this;return t.allOf.reduce((function(t,i){return t.push.apply(t,We(n._validateSchema(i,e,r))),t}),[])},anyOf:function(t,e,r){var n=this;return t.anyOf.some((function(t){return!n._validateSchema(t,e,r).length}))?[]:[{path:r,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,r){var n=this,i=0,o=[];t.oneOf.forEach((function(t,a){var s=n._validateSchema(t,e,r);s.length||i++,s.forEach((function(t){t.path="".concat(r,".oneOf[").concat(a,"]").concat(t.path.substr(r.length))})),o.push.apply(o,We(s))}));var a=[];return 1!==i&&(a.push({path:r,property:"oneOf",message:this.translate("error_oneOf",[i],t)}),a.push.apply(a,o)),a},not:function(t,e,r){return this._validateSchema(t.not,e,r).length?[]:[{path:r,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,r){var n=this;if(Array.isArray(t.type)){if(!t.type.some((function(t){return n._checkType(t,e)})))return[{path:r,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&"integer"===t.type){if(!this._checkType("string","".concat(e)))return[{path:r,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:r,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,r){var n=this;if(Array.isArray(t.disallow)){if(t.disallow.some((function(t){return n._checkType(t,e)})))return[{path:r,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:r,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,r){return this._validateNumberSubSchemaMultipleDivisible(t,e,r)},divisibleBy:function(t,e,r){return this._validateNumberSubSchemaMultipleDivisible(t,e,r)},maximum:function(t,e,r){var n=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?n=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(n=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),n?[]:[{path:r,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,r){var n=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?n=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(n=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),n?[]:[{path:r,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum],t)}]}},this._validateStringSubSchema={maxLength:function(t,e,r){var n=[];return"".concat(e).length>t.maxLength&&n.push({path:r,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),n},minLength:function(t,e,r){return"".concat(e).length<t.minLength?[{path:r,property:"minLength",message:this.translate(1===t.minLength?"error_notempty":"error_minLength",[t.minLength],t)}]:[]},pattern:function(t,e,r){return new RegExp(t.pattern).test(e)?[]:[{path:r,property:"pattern",message:t.options&&t.options.patternmessage?t.options.patternmessage:this.translate("error_pattern",[t.pattern],t)}]}},this._validateArraySubSchema={items:function(t,e,r){var n=this,i=[];if(Array.isArray(t.items))for(var o=0;o<e.length;o++)if(t.items[o])i.push.apply(i,We(this._validateSchema(t.items[o],e[o],"".concat(r,".").concat(o))));else{if(!0===t.additionalItems)break;if(!t.additionalItems){if(!1===t.additionalItems){i.push({path:r,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}i.push.apply(i,We(this._validateSchema(t.additionalItems,e[o],"".concat(r,".").concat(o))))}else e.forEach((function(e,o){i.push.apply(i,We(n._validateSchema(t.items,e,"".concat(r,".").concat(o))))}));return i},maxItems:function(t,e,r){return e.length>t.maxItems?[{path:r,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,r){return e.length<t.minItems?[{path:r,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,r){for(var n={},i=0;i<e.length;i++){var o=JSON.stringify(e[i]);if(n[o])return[{path:r,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];n[o]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(t,e,r){return Object.keys(e).length>t.maxProperties?[{path:r,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties],t)}]:[]},minProperties:function(t,e,r){return Object.keys(e).length<t.minProperties?[{path:r,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties],t)}]:[]},required:function(t,e,r){var n=this,i=[];return Array.isArray(t.required)&&t.required.forEach((function(o){if(void 0===e[o]){var a=n.jsoneditor.getEditor("".concat(r,".").concat(o));a&&!1===a.dependenciesFulfilled||a&&["button","info"].includes(a.schema.format||a.schema.type)||i.push({path:r,property:"required",message:n.translate("error_required",[t&&t.properties&&t.properties[o]&&t.properties[o].title?t.properties[o].title:o],t)})}})),i},properties:function(t,e,r,n){var i=this,o=[];return Object.entries(t.properties).forEach((function(t){var a=Je(t,2),s=a[0],l=a[1];n[s]=!0,o.push.apply(o,We(i._validateSchema(l,e[s],"".concat(r,".").concat(s))))})),o},patternProperties:function(t,e,r,n){var i=this,o=[];return Object.entries(t.patternProperties).forEach((function(t){var a=Je(t,2),s=a[0],l=a[1],c=new RegExp(s);Object.entries(e).forEach((function(t){var e=Je(t,2),a=e[0],s=e[1];c.test(a)&&(n[a]=!0,o.push.apply(o,We(i._validateSchema(l,s,"".concat(r,".").concat(a)))))}))})),o}},this._validateObjectSubSchema2={propertyNames:function(t,e,r,n){for(var i=this,o=[],a=Object.keys(e),s=null,l=function(){var e="";return s=a[c],"boolean"==typeof t.propertyNames?!0===t.propertyNames?"continue":(o.push({path:r,property:"propertyNames",message:i.translate("error_property_names_false",[s],t)}),"break"):Object.entries(t.propertyNames).every((function(n){var a=Je(n,2),l=a[0],c=a[1],u=!1;switch(l){case"maxLength":if("number"!=typeof c){e="error_property_names_maxlength";break}if(s.length>c){e="error_property_names_exceeds_maxlength";break}return!0;case"const":if(c!==s){e="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(c)){e="error_property_names_enum";break}if(c.forEach((function(t){t===s&&(u=!0)})),!u){e="error_property_names_enum_mismatch";break}return!0;case"pattern":if("string"!=typeof c){e="error_property_names_pattern";break}if(!new RegExp(c).test(s)){e="error_property_names_pattern_mismatch";break}return!0;default:return o.push({path:r,property:"propertyNames",message:i.translate("error_property_names_unsupported",[l],t)}),!1}return o.push({path:r,property:"propertyNames",message:i.translate(e,[s],t)}),!1}))?void 0:"break"},c=0;c<a.length;c++){var u=l();if("continue"!==u&&"break"===u)break}return o},additionalProperties:function(t,e,r,n){for(var i=[],o=Object.keys(e),a=0;a<o.length;a++){var s=o[a];if(!n[s]){if(!t.additionalProperties){i.push({path:r,property:"additionalProperties",message:this.translate("error_additional_properties",[s],t)});break}if(!0===t.additionalProperties)break;i.push.apply(i,We(this._validateSchema(t.additionalProperties,e[s],"".concat(r,".").concat(s))))}}return i},dependencies:function(t,e,r){var n=this,i=[];return Object.entries(t.dependencies).forEach((function(o){var a=Je(o,2),s=a[0],l=a[1];void 0!==e[s]&&(Array.isArray(l)?l.forEach((function(o){void 0===e[o]&&i.push({path:r,property:"dependencies",message:n.translate("error_dependency",[o],t)})})):i.push.apply(i,We(n._validateSchema(l,e,r))))})),i}}}var e,r;return e=t,r=[{key:"fitTest",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e7,n={match:0,extra:0};if("object"===Qe(t)&&null!==t){var i=this._getSchema(e);if(i.anyOf){var o,a=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ue(Object(r),!0).forEach((function(e){$e(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ue(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},n),s=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ze(t))){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(i.anyOf);try{for(s.s();!(o=s.n()).done;){var l=o.value,c=this.fitTest(t,l,r);(c.match>a.match||c.match===a.match&&c.extra<a.extra)&&(a=c)}}catch(t){s.e(t)}finally{s.f()}return a}var h=this._getSchema(e).properties;for(var p in h)if(u(h,p)){if("object"===Qe(t[p])&&"object"===Qe(h[p])&&"object"===Qe(h[p].properties)){var d=this.fitTest(t[p],h[p],r/100);n.match+=d.match,n.extra+=d.extra}void 0!==t[p]&&(n.match+=r)}else n.extra+=r}return n}},{key:"_getSchema",value:function(t){return void 0===t?s({},this.jsoneditor.expandRefs(this.schema)):t}},{key:"validate",value:function(t){return this._validateSchema(this.schema,t)}},{key:"_validateSchema",value:function(t,e,r){var n=this,i=[];return r=r||this.jsoneditor.root.formname,t=s({},this.jsoneditor.expandRefs(t)),void 0===e?this._validateV3Required(t,e,r):(Object.keys(t).forEach((function(o){n._validateSubSchema[o]&&i.push.apply(i,We(n._validateSubSchema[o].call(n,t,e,r)))})),i.push.apply(i,We(this._validateByValueType(t,e,r))),t.links&&t.links.forEach((function(o,a){o.rel&&"describedby"===o.rel.toLowerCase()&&(t=n._expandSchemaLink(t,a),i.push.apply(i,We(n._validateSchema(t,e,r,n.translate))))})),["date","time","datetime-local"].includes(t.format)&&i.push.apply(i,We(this._validateDateTimeSubSchema(t,e,r))),["uuid"].includes(t.format)&&i.push.apply(i,We(this._validateUUIDSchema(t,e,r))),i.push.apply(i,We(this._validateCustomValidator(t,e,r))),this._removeDuplicateErrors(i))}},{key:"_expandSchemaLink",value:function(t,e){var r=t.links[e].href,n=this.jsoneditor.root.getValue(),i=this.jsoneditor.compileTemplate(r,this.jsoneditor.template),o=document.location.origin+document.location.pathname+i(n);return t.links=t.links.slice(0,e).concat(t.links.slice(e+1)),s({},t,this.jsoneditor.refs[o])}},{key:"_validateV3Required",value:function(t,e,r){return(void 0!==t.required&&!0===t.required||void 0===t.required&&!0===this.jsoneditor.options.required_by_default)&&"info"!==t.type?[{path:r,property:"required",message:this.translate("error_notset",null,t)}]:[]}},{key:"_validateByValueType",value:function(t,e,r){var n=this,i=[];if(null===e)return i;if("number"==typeof e)Object.keys(t).forEach((function(o){n._validateNumberSubSchema[o]&&i.push.apply(i,We(n._validateNumberSubSchema[o].call(n,t,e,r)))}));else if("string"==typeof e)Object.keys(t).forEach((function(o){n._validateStringSubSchema[o]&&i.push.apply(i,We(n._validateStringSubSchema[o].call(n,t,e,r)))}));else if(Array.isArray(e))Object.keys(t).forEach((function(o){n._validateArraySubSchema[o]&&i.push.apply(i,We(n._validateArraySubSchema[o].call(n,t,e,r)))}));else if("object"===Qe(e)){var o={};Object.keys(t).forEach((function(a){n._validateObjectSubSchema[a]&&i.push.apply(i,We(n._validateObjectSubSchema[a].call(n,t,e,r,o)))})),void 0!==t.additionalProperties||!this.jsoneditor.options.no_additional_properties||t.oneOf||t.anyOf||t.allOf||(t.additionalProperties=!1),Object.keys(t).forEach((function(a){void 0!==n._validateObjectSubSchema2[a]&&i.push.apply(i,We(n._validateObjectSubSchema2[a].call(n,t,e,r,o)))}))}return i}},{key:"_validateUUIDSchema",value:function(t,e,r){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)?[]:[{path:r,property:"format",message:this.translate("error_pattern",["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"],t)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(t,e,r){var n=t.multipleOf||t.divisibleBy,i=e/n===Math.floor(e/n);return window.math?i=window.math.mod(window.math.bignumber(e),window.math.bignumber(n)).equals(0):window.Decimal&&(i=new window.Decimal(e).mod(new window.Decimal(n)).equals(0)),i?[]:[{path:r,property:t.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[n],t)}]}},{key:"_validateDateTimeSubSchema",value:function(t,e,r){var n=this,i=this.jsoneditor.getEditor(r),o=i&&i.flatpickr?i.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[t.format];if("integer"===t.type)return function(t,e,r){return 1*e<1?[{path:r,property:"format",message:n.translate("error_invalid_epoch",null,t)}]:e!==Math.abs(parseInt(e))?[{path:r,property:"format",message:n.translate("error_".concat(t.format.replace(/-/g,"_")),[o],t)}]:[]}(t,e,r);if(i&&i.flatpickr){if(i)return function(t,e,r,i){if(""!==e){var o;if("single"!==i.flatpickr.config.mode){var a="range"===i.flatpickr.config.mode?i.flatpickr.l10n.rangeSeparator:", ";o=i.flatpickr.selectedDates.map((function(t){return i.flatpickr.formatDate(t,i.flatpickr.config.dateFormat)})).join(a)}try{if(o){if(o!==e)throw new Error("".concat(i.flatpickr.config.mode," mismatch"))}else if(i.flatpickr.formatDate(i.flatpickr.parseDate(e,i.flatpickr.config.dateFormat),i.flatpickr.config.dateFormat)!==e)throw new Error("mismatch")}catch(e){var s=void 0!==i.flatpickr.config.errorDateFormat?i.flatpickr.config.errorDateFormat:i.flatpickr.config.dateFormat;return[{path:r,property:"format",message:n.translate("error_".concat(i.format.replace(/-/g,"_")),[s],t)}]}}return[]}(t,e,r,i)}else if(!{date:/^(\d{4}\D\d{2}\D\d{2})?$/,time:/^(\d{2}:\d{2}(?::\d{2})?)?$/,"datetime-local":/^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)?$/}[t.format].test(e))return[{path:r,property:"format",message:this.translate("error_".concat(t.format.replace(/-/g,"_")),[o],t)}];return[]}},{key:"_validateCustomValidator",value:function(t,e,r){var n=this,i=[];i.push.apply(i,We(Ge.call(this,t,e,r,this.translate)));var o=function(o){i.push.apply(i,We(o.call(n,t,e,r)))};return this.defaults.custom_validators.forEach(o),this.options.custom_validators&&this.options.custom_validators.forEach(o),i}},{key:"_removeDuplicateErrors",value:function(t){return t.reduce((function(t,e){var r=!0;return t||(t=[]),t.forEach((function(t){t.message===e.message&&t.path===e.path&&t.property===e.property&&(t.errorcount++,r=!1)})),r&&(e.errorcount=1,t.push(e)),t}),[])}},{key:"_checkType",value:function(t,e){var r={string:function(t){return"string"==typeof t},number:function(t){return"number"==typeof t},integer:function(t){return"number"==typeof t&&t===Math.floor(t)},boolean:function(t){return"boolean"==typeof t},array:function(t){return Array.isArray(t)},object:function(t){return null!==t&&!Array.isArray(t)&&"object"===Qe(t)},null:function(t){return null===t}};return"string"==typeof t?!r[t]||r[t](e):!this._validateSchema(t,e).length}}],r&&Ke(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function er(t){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(t)}function rr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==er(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===er(i)?i:String(i)),n)}var i}function nr(){return nr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=or(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},nr.apply(this,arguments)}function ir(t,e){return ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ir(t,e)}function or(t){return or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},or(t)}var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ir(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=or(n);if(i){var r=or(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===er(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}nr(or(a.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(nr(or(a.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}},{key:"enable",value:function(){if(!this.always_disabled){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,nr(or(a.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable(t);this.switcher.disabled=!0,nr(or(a.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(t){var e=this;this.editors[t]||this.buildChildEditor(t);var r=this.getValue();this.type=t,this.register(),this.editors.forEach((function(t,n){t&&(e.type===n?(e.keep_values&&t.setValue(r,!0),t.container.style.display=""):t.container.style.display="none")})),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,r=this,n=this.types[t],i=this.theme.getChildEditorHolder();this.editor_holder.appendChild(i),"string"==typeof n?(e=s({},this.schema)).type=n:(e=s({},this.schema,n),e=this.jsoneditor.expandRefs(e),n&&n.required&&Array.isArray(n.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(e.required=this.schema.required.concat(n.required)));var o=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(o,{jsoneditor:this.jsoneditor,schema:e,container:i,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&(this.editors[t].header.style.display="none"),this.editors[t].option=this.switcher_options[t],i.addEventListener("change_header_text",(function(){r.refreshHeaderText()})),t!==this.type&&(i.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,void 0!==this.jsoneditor.options.keep_oneof_values&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),void 0!==this.options.keep_oneof_values&&(this.keep_values=this.options.keep_oneof_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,delete this.schema.oneOf;else if(this.schema.anyOf)this.anyOf=!0,this.types=this.schema.anyOf,delete this.schema.anyOf;else{if(this.schema.type&&"any"!==this.schema.type)Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var t=this.schema.disallow;"object"===er(t)&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach((function(r){t.includes(r)||e.push(r)})),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.header),this.switcher=this.theme.getSwitcher(this.display_text),e.appendChild(this.switcher),this.switcher.addEventListener("change",(function(e){e.preventDefault(),e.stopPropagation(),t.switchEditor(t.display_text.indexOf(e.currentTarget.value)),t.onChange(!0)})),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder);var r={};this.jsoneditor.options.custom_validators&&(r.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach((function(e,n){var i;t.editors[n]=!1,"string"==typeof e?(i=s({},t.schema)).type=e:(i=s({},t.schema,e),e.required&&Array.isArray(e.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(i.required=t.schema.required.concat(e.required))),t.validators[n]=new tr(t.jsoneditor,i,r,t.defaults)})),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),nr(or(a.prototype),"onChildEditorChange",this).call(this)}},{key:"refreshHeaderText",value:function(){var t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach((function(e,r){e.textContent=t[r]}))}},{key:"refreshValue",value:function(){this.value=this.editors[this.type].getValue()}},{key:"setValue",value:function(t,e){var r=this,n=this.type,i={match:0,extra:0,i:this.type},o={match:0,i:null};this.validators.forEach((function(e,n){var a=null;void 0!==r.anyOf&&r.anyOf&&(a=e.fitTest(t),(i.match<a.match||i.match===a.match&&i.extra>a.extra)&&((i=a).i=n)),e.validate(t).length||null!==o.i?i=o:(o.i=n,null!==a&&(o.match=a.match))}));var a=o.i;void 0!==this.anyOf&&this.anyOf&&o.match<i.match&&(a=i.i),null===a&&(a=this.type),this.type=a,this.switcher.value=this.display_text[a];var s=this.type!==n;s&&this.switchEditor(this.type),void 0!==t&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(s)}},{key:"destroy",value:function(){this.editors.forEach((function(t){t&&t.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),nr(or(a.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.oneOf||this.anyOf){var r=this.oneOf?"oneOf":"anyOf";this.editors.forEach((function(n,i){if(n){var o="".concat(e.path,".").concat(r,"[").concat(i,"]");n.showValidationErrors(t.reduce((function(t,r){if(r.path.startsWith(o)||r.path===o.substr(0,r.path.length)){var n=s({},r);r.path.startsWith(o)&&(n.path=e.path+n.path.substr(o.length)),t.push(n)}return t}),[]))}}))}else this.editors.forEach((function(e){e&&e.showValidationErrors(t)}))}},{key:"addLinks",value:function(){}}])&&rr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}function lr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==sr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===sr(i)?i:String(i)),n)}var i}function cr(t,e){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cr(t,e)}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}var hr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ur(n);if(i){var r=ur(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===sr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&lr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pr(Object(r),!0).forEach((function(e){fr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fr(t,e,r){return(e=gr(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return mr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vr(t){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vr(t)}function br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gr(n.key),n)}}function gr(t){var e=function(t,e){if("object"!==vr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===vr(e)?e:String(e)}function wr(){return wr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kr(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},wr.apply(this,arguments)}function _r(t,e){return _r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_r(t,e)}function kr(t){return kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kr(t)}var jr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_r(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=kr(n);if(i){var r=kr(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===vr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).currentDepth=r,n}return e=a,(r=[{key:"getDefault",value:function(){return s({},this.schema.default||{})}},{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){wr(kr(a.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){return t.register()}))}},{key:"unregister",value:function(){wr(kr(a.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){return t.unregister()}))}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.maxwidth),3)}},{key:"enable",value:function(){this.always_disabled||(this.editjson_control&&(this.editjson_control.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),wr(kr(a.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){t.isActive()&&t.enable(),t.optInCheckbox.disabled=!1})))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),wr(kr(a.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){e.isActive()&&e.disable(t),e.optInCheckbox.disabled=!0}))}},{key:"layoutEditors",value:function(){var t,e,r=this;if(this.row_container){var n;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(t,e){var n=r.editors[t].schema.propertyOrder,i=r.editors[e].schema.propertyOrder;return"number"!=typeof n&&(n=1e3),"number"!=typeof i&&(i=1e3),n-i}));var i,o="categories"===this.format,a=[],s=null,c=null;if("grid-strict"===this.format){var u=0;if(i=[],this.property_order.forEach((function(t){var e=r.editors[t];if(!e.property_removed){var n=e.options.hidden?0:e.options.grid_columns||e.getNumColumns(),o=e.options.hidden?0:e.options.grid_offset||0,s=!e.options.hidden&&(e.options.grid_break||!1),l={key:t,width:n,offset:o,height:e.options.hidden?0:e.container.offsetHeight};i.push(l),a[u]=i,s&&(u++,i=[])}})),this.layout===JSON.stringify(a))return!1;for(this.layout=JSON.stringify(a),n=document.createElement("div"),t=0;t<a.length;t++)for(i=this.theme.getGridRow(),n.appendChild(i),e=0;e<a[t].length;e++)s=a[t][e].key,(c=this.editors[s]).options.hidden?c.container.style.display="none":this.theme.setGridColumnSize(c.container,a[t][e].width,a[t][e].offset),i.appendChild(c.container)}else if("grid"===this.format){for(this.property_order.forEach((function(t){var e=r.editors[t];if(!e.property_removed){for(var n=!1,i=e.options.hidden?0:e.options.grid_columns||e.getNumColumns(),o=e.options.hidden?0:e.container.offsetHeight,s=0;s<a.length;s++)a[s].width+i<=12&&(!o||.5*a[s].minh<o&&2*a[s].maxh>o)&&(n=s);!1===n&&(a.push({width:0,minh:999999,maxh:0,editors:[]}),n=a.length-1),a[n].editors.push({key:t,width:i,height:o}),a[n].width+=i,a[n].minh=Math.min(a[n].minh,o),a[n].maxh=Math.max(a[n].maxh,o)}})),t=0;t<a.length;t++)if(a[t].width<12){var h=!1,p=0;for(e=0;e<a[t].editors.length;e++)(!1===h||a[t].editors[e].width>a[t].editors[h].width)&&(h=e),a[t].editors[e].width*=12/a[t].width,a[t].editors[e].width=Math.floor(a[t].editors[e].width),p+=a[t].editors[e].width;p<12&&(a[t].editors[h].width+=12-p),a[t].width=12}if(this.layout===JSON.stringify(a))return!1;for(this.layout=JSON.stringify(a),n=document.createElement("div"),t=0;t<a.length;t++)for(i=this.theme.getGridRow(),n.appendChild(i),e=0;e<a[t].editors.length;e++)s=a[t].editors[e].key,(c=this.editors[s]).options.hidden?c.container.style.display="none":this.theme.setGridColumnSize(c.container,a[t].editors[e].width),i.appendChild(c.container)}else{if(n=document.createElement("div"),o){var d=document.createElement("div"),f=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),y=this.theme.getTopTabContentHolder(f);for(this.property_order.forEach((function(t){var e=r.editors[t];if(!e.property_removed){var n=r.theme.getTabContent(),i=e.schema&&("object"===e.schema.type||"array"===e.schema.type);n.isObjOrArray=i;var o=r.theme.getGridRow();e.tab||(void 0===r.basicPane?r.addRow(e,f,n):r.addRow(e,f,r.basicPane)),n.id=r.getValidId(e.tab_text.textContent),i?(n.appendChild(o),y.appendChild(n),r.theme.addTopTab(f,e.tab)):(d.appendChild(o),y.childElementCount>0?y.firstChild.isObjOrArray&&(n.appendChild(d),y.insertBefore(n,y.firstChild),r.theme.insertBasicTopTab(e.tab,f),e.basicPane=n):(n.appendChild(d),y.appendChild(n),r.theme.addTopTab(f,e.tab),e.basicPane=n)),e.options.hidden?e.container.style.display="none":r.theme.setGridColumnSize(e.container,12),o.appendChild(e.container),e.rowPane=n}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var m=this.tabs_holder.parentNode;m.removeChild(m.firstChild),m.appendChild(f),this.tabPanesContainer=y,this.tabs_holder=f;var v=this.theme.getFirstTab(this.tabs_holder);return void(v&&l(v,"click"))}this.property_order.forEach((function(t){var e=r.editors[t];e.property_removed||(i=r.theme.getGridRow(),n.appendChild(i),e.options.hidden?e.container.style.display="none":r.theme.setGridColumnSize(e.container,12),i.appendChild(e.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(n)}}},{key:"getPropertySchema",value:function(t){var e=this,r=this.schema.properties[t]||{};r=s({},r);var n=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(i){new RegExp(i).test(t)&&(r.allOf=r.allOf||[],r.allOf.push(e.schema.patternProperties[i]),n=!0)})),!n&&this.schema.additionalProperties&&"object"===vr(this.schema.additionalProperties)&&(r=s({},this.schema.additionalProperties)),r}},{key:"preBuild",value:function(){var t=this;if(wr(kr(a.prototype),"preBuild",this).call(this),this.editors={},this.cached_editors={},this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)Object.entries(this.schema.properties).forEach((function(e){var r=yr(e,2),n=r[0],i=r[1],o=t.jsoneditor.getEditorClass(i);t.editors[n]=t.jsoneditor.createEditor(o,{jsoneditor:t.jsoneditor,schema:i,path:"".concat(t.path,".").concat(n),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[n].preBuild();var a=t.editors[n].options.hidden?0:t.editors[n].options.grid_columns||t.editors[n].getNumColumns();t.minwidth+=a,t.maxwidth+=a})),this.no_link_holder=!0;else{if(this.options.table)throw new Error("Not supported yet");this.schema.defaultProperties||(this.jsoneditor.options.display_required_only||this.options.display_required_only?this.schema.defaultProperties=Object.keys(this.schema.properties).filter((function(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})})):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach((function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())}))}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(e,r){var n=t.editors[e].schema.propertyOrder,i=t.editors[r].schema.propertyOrder;return"number"!=typeof n&&(n=1e3),"number"!=typeof i&&(i=1e3),n-i}))}},{key:"addTab",value:function(t){var e=this,r=this.rows[t].schema&&("object"===this.rows[t].schema.type||"array"===this.rows[t].schema.type);this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=r?this.rows[t].getHeaderText():void 0===this.schema.basicCategoryTitle?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",(function(r){e.active_tab=e.rows[t].tab,e.refreshTabs(),r.preventDefault(),r.stopPropagation()})))}},{key:"addRow",value:function(t,e,r){var n=this.rows.length,i="object"===t.schema.type||"array"===t.schema.type;this.rows[n]=t,this.rows[n].rowPane=r,i?(this.addTab(n),this.theme.addTopTab(e,this.rows[n].tab)):void 0===this.basicTab?(this.addTab(n),this.basicTab=n,this.basicPane=r,this.theme.addTopTab(e,this.rows[n].tab)):(this.rows[n].tab=this.rows[this.basicTab].tab,this.rows[n].tab_text=this.rows[this.basicTab].tab_text,this.rows[n].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,r=void 0!==this.basicTab,n=!1;this.rows.forEach((function(i){i.tab&&i.rowPane&&i.rowPane.parentNode&&(r&&i.tab===e.rows[e.basicTab].tab&&n||(t?i.tab_text.textContent=i.getHeaderText():(r&&i.tab===e.rows[e.basicTab].tab&&(n=!0),i.tab===e.active_tab?e.theme.markTabActive(i):e.theme.markTabInactive(i))))}))}},{key:"build",value:function(){var t=this,e="categories"===this.format;if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach((function(e){var r=yr(e,2),n=r[0],i=r[1],o=t.theme.getTableCell();t.editor_holder.appendChild(o),i.setContainer(o),i.build(),i.postBuild(),i.setOptInCheckbox(i.header),i.setValue(i.getDefault(),!0),t.editors[n].options.hidden&&(o.style.display="none"),t.editors[n].options.input_width&&(o.style.width=t.editors[n].options.input_width)}));else{if(this.options.table)throw new Error("Not supported yet");this.header="",this.options.compact||(this.header=document.createElement("label"),this.header.textContent=this.getTitle()),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.title.classList.add("je-object__title"),this.controls=this.theme.getButtonHolder(),this.controls.classList.add("je-object__controls"),this.container.appendChild(this.title),this.container.appendChild(this.controls),this.container.classList.add("je-object__container"),this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.classList.add("je-edit-json--textarea"),this.editjson_save=this.getButton("button_save","save","button_save"),this.editjson_save.classList.add("json-editor-btntype-save"),this.editjson_save.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.saveJSON()})),this.editjson_copy=this.getButton("button_copy","copy","button_copy"),this.editjson_copy.classList.add("json-editor-btntype-copy"),this.editjson_copy.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.copyJSON()})),this.editjson_cancel=this.getButton("button_cancel","cancel","button_cancel"),this.editjson_cancel.classList.add("json-editor-btntype-cancel"),this.editjson_cancel.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.hideEditJSON()})),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_copy),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.classList.add("property-selector"),this.addproperty_add=this.getButton("button_add","add","button_add"),this.addproperty_add.classList.add("json-editor-btntype-add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.classList.add("property-selector-input"),this.addproperty_add.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable(),t.onChange(!0)}})),this.addproperty_input.addEventListener("input",(function(t){t.target.previousSibling.childNodes.forEach((function(e){e.innerText.includes(t.target.value)?e.style.display="":e.style.display="none"}))})),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var r=document.createElement("div");r.style.clear="both",this.addproperty_holder.appendChild(r),this.onOutsideModalClickListener=this.onOutsideModalClick.bind(this),document.addEventListener("click",this.onOutsideModalClickListener,!0),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),e?(this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTopTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.tabs_holder)):(this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.row_container)),Object.values(this.editors).forEach((function(r){var n=t.theme.getTabContent(),i=t.theme.getGridColumn(),o=!(!r.schema||"object"!==r.schema.type&&"array"!==r.schema.type);if(n.isObjOrArray=o,e){if(o){var a=t.theme.getGridContainer();a.appendChild(i),n.appendChild(a),t.tabPanesContainer.appendChild(n),t.row_container=a}else void 0===t.row_container_basic&&(t.row_container_basic=t.theme.getGridContainer(),n.appendChild(t.row_container_basic),0===t.tabPanesContainer.childElementCount?t.tabPanesContainer.appendChild(n):t.tabPanesContainer.insertBefore(n,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(i);t.addRow(r,t.tabs_holder,n),n.id=t.getValidId(r.schema.title)}else t.row_container.appendChild(i);r.setContainer(i),r.build(),r.postBuild(),r.setOptInCheckbox(r.header)})),this.rows[0]&&l(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse","button_collapse"),this.collapse_control.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(this.collapse_control,this.title.childNodes[0]),this.collapse_control.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.collapse_control,"","collapse","button_collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand","button_expand"))})),this.options.collapsed&&l(this.collapse_control,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.collapse_control.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.collapse_control.style.display="none"),this.editjson_control=this.getButton("JSON","edit","button_edit_json"),this.editjson_control.classList.add("json-editor-btntype-editjson"),this.editjson_control.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.toggleEditJSON()})),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&void 0!==this.schema.options.disable_edit_json?this.schema.options.disable_edit_json&&(this.editjson_control.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_control.style.display="none"),this.addproperty_button=this.getButton("properties","edit_properties","button_object_properties"),this.addproperty_button.classList.add("json-editor-btntype-properties"),this.addproperty_button.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.toggleAddProperty()})),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties()}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach((function(e){t.editor_holder.appendChild(t.editors[e].container)}))):(this.layoutEditors(),this.layoutEditors())}},{key:"deactivateNonRequiredProperties",value:function(){var t=this,e=this.jsoneditor.options.show_opt_in,r=void 0!==this.options.show_opt_in,n=r&&!0===this.options.show_opt_in,i=r&&!1===this.options.show_opt_in;(n||!i&&e||!r&&e)&&Object.entries(this.editors).forEach((function(e){var r=yr(e,2),n=r[0],i=r[1];t.isRequiredObject(i)||t.editors[n].deactivate()}))}},{key:"showEditJSON",value:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left="".concat(this.editjson_control.offsetLeft,"px"),this.editjson_holder.style.top="".concat(this.editjson_control.offsetTop+this.editjson_control.offsetHeight,"px"),this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_control.disabled=!1,this.editing_json=!0)}},{key:"hideEditJSON",value:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}},{key:"copyJSON",value:function(){if(this.editjson_holder){var t=document.createElement("textarea");t.value=this.editjson_textarea.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON(),this.onChange(!0)}catch(t){throw window.alert("invalid JSON"),t}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(t,e,r){var n;this.schema.properties[t]&&(n=this.schema.properties[t].propertyOrder),"number"!=typeof n&&(n=1e3),e.propertyOrder=n;for(var i=0;i<r.childNodes.length;i++){var o=r.childNodes[i];if(e.propertyOrder<o.propertyOrder){this.addproperty_list.insertBefore(e,o),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,r=this,n=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var i=this.theme.getCheckboxLabel(e),o=this.theme.getFormControl(i,n);return o.style.paddingBottom=o.style.marginBottom=o.style.paddingTop=o.style.marginTop=0,o.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,o,this.addproperty_list),n.checked=t in this.editors,n.addEventListener("change",(function(){n.checked?r.addObjectProperty(t):r.removeObjectProperty(t),r.onChange(!0)})),this.addproperty_checkboxes[t]=n,n}},{key:"showAddProperty",value:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left="".concat(this.addproperty_button.offsetLeft,"px"),this.addproperty_holder.style.top="".concat(this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight,"px"),this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())}},{key:"hideAddProperty",value:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)}},{key:"toggleAddProperty",value:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()}},{key:"removeObjectProperty",value:function(t){this.editors[t]&&(this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors())}},{key:"getSchemaOnMaxDepth",value:function(t){return Object.keys(t).reduce((function(e,r){switch(r){case"$ref":return e;case"properties":case"items":return dr(dr({},e),{},fr({},r,{}));case"additionalProperties":case"propertyNames":return dr(dr({},e),{},fr({},r,!0));default:return dr(dr({},e),{},fr({},r,t[r]))}}),{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find((function(e){return new RegExp(e).test(t)}))))return;var r=this.getPropertySchema(t);"number"!=typeof r.propertyOrder&&(r.propertyOrder=Object.keys(this.editors).length+1e3);var n=this.jsoneditor.getEditorClass(r),i=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(n,{jsoneditor:this.jsoneditor,schema:i&&this.currentDepth>=i?this.getSchemaOnMaxDepth(r):r,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var o=this.theme.getChildEditorHolder();this.editor_holder.appendChild(o),this.editors[t].setContainer(o),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(n.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){var e=t.path||t.composedPath&&t.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(e[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),wr(kr(a.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:!this.jsoneditor.options.no_additional_properties}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach((function(t){return t.destroy()})),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,document.removeEventListener("click",this.onOutsideModalClickListener,!0),wr(kr(a.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=wr(kr(a.prototype),"getValue",this).call(this);return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach((function(e){var r;(void 0===(r=t[e])||""===r||r===Object(r)&&0===Object.keys(r).length&&r.constructor===Object)&&delete t[e]})),t}}},{key:"refreshValue",value:function(){var t=this;this.value={},this.editors&&(Object.keys(this.editors).forEach((function(e){t.editors[e].isActive()&&(t.value[e]=t.editors[e].getValue())})),this.adding_property&&this.refreshAddProperties())}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||!1!==this.options.disable_properties&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,r=0,n=!1;Object.keys(this.editors).forEach((function(t){return r++})),e=this.canHaveAdditionalProperties()&&!(void 0!==this.schema.maxProperties&&r>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(i){t.addPropertyCheckbox(i),t.isRequiredObject(t.cached_editors[i])&&i in t.editors&&(t.addproperty_checkboxes[i].disabled=!0),void 0!==t.schema.minProperties&&r<=t.schema.minProperties?(t.addproperty_checkboxes[i].disabled=t.addproperty_checkboxes[i].checked,t.addproperty_checkboxes[i].checked||(n=!0)):i in t.editors?n=!0:e||u(t.schema.properties,i)?(t.addproperty_checkboxes[i].disabled=!1,n=!0):t.addproperty_checkboxes[i].disabled=!0})),this.canHaveAdditionalProperties()&&(n=!0),Object.keys(this.schema.properties).forEach((function(e){t.cached_editors[e]||(n=!0,t.addPropertyCheckbox(e))})),n?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!e:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(t){if(t)return"boolean"==typeof t.schema.required?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(t.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(t,e){var r=this;("object"!==vr(t=t||{})||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach((function(n){var i=yr(n,2),o=i[0],a=i[1];void 0!==t[o]?(r.addObjectProperty(o),a.setValue(t[o],e),a.activate()):e||r.isRequiredObject(a)?a.setValue(a.getDefault(),e):r.jsoneditor.options.show_opt_in||r.options.show_opt_in?a.deactivate():r.removeObjectProperty(o)})),Object.entries(t).forEach((function(t){var n=yr(t,2),i=n[0],o=n[1];r.cached_editors[i]||(r.addObjectProperty(i),r.editors[i]&&r.editors[i].setValue(o,e,!!r.editors[i].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,r=[],n=[];t.forEach((function(t){t.path===e.path?r.push(t):n.push(t)})),this.error_holder&&(r.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",r.forEach((function(t){t.errorcount&&t.errorcount>1&&(t.message+=" (".concat(t.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(t.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(r.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(t){t.showValidationErrors(n)}))}}])&&br(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v);function Or(t){return Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(t)}function xr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Or(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Or(i)?i:String(i)),n)}var i}function Cr(){return Cr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Pr(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Cr.apply(this,arguments)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}function Pr(t){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pr(t)}jr.rules={".je-object__title":"display:inline-block",".je-object__controls":"margin:0%200%200%2010px",".je-object__container":"position:relative",".je-object__property-checkbox":"margin:0;height:auto",".property-selector":"width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",".property-selector-input":"width:220px;margin-bottom:0;display:inline-block",".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-edit-json--textarea":"height:170px;width:300px;display:block"};var Sr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Er(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Pr(n);if(i){var r=Pr(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"preBuild",value:function(){Cr(Pr(a.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var t=this;this.label="",this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.radioContainer=document.createElement("div"),this.radioGroup=[];for(var e=function(e){t.setValue(e.currentTarget.value),t.onChange(!0)},r=0;r<this.enum_values.length;r++){var n={id:"".concat(this.formname,"[").concat(r,"]"),value:this.enum_values[r]};this.jsoneditor.options.use_name_attributes&&(n.name=this.formname),this.input=this.theme.getFormRadio(n),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var i=this.theme.getFormRadioLabel(this.enum_display[r]);i.htmlFor=this.input.id;var o=this.theme.getFormRadioControl(i,this.input,!("horizontal"!==this.options.layout&&!this.options.compact));this.radioContainer.appendChild(o)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var a=0;a<this.radioGroup.length;a++)this.radioGroup[a].disabled=!0;this.radioContainer.classList.add("readonly")}var s=this.theme.getContainer();s.appendChild(this.radioContainer),s.dataset.containerFor="radio",this.input=s,this.control=this.theme.getFormControl(this.label,s,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.input.parentNode&&t.afterInputReady()}))}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),Cr(Pr(a.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.radioContainer.classList.add("readonly"),Cr(Pr(a.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.radioContainer.parentNode&&this.radioContainer.parentNode.parentNode&&this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Cr(Pr(a.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(t){"string"!=typeof t&&(t=String(t));for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0,this.value=t,this.onChange();break}}}])&&xr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Bt);function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Lr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Tr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Tr(i)?i:String(i)),n)}var i}function Rr(){return Rr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ir(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Rr.apply(this,arguments)}function Ar(t,e){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ar(t,e)}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}var Br=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ar(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ir(n);if(i){var r=Ir(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e,r){var n=Rr(Ir(a.prototype),"setValue",this).call(this,t,e,r);void 0!==n&&n.changed&&this.sceditor_instance&&this.sceditor_instance.val(n.value)}},{key:"build",value:function(){this.options.format="textarea",Rr(Ir(a.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t=this;if(window.sceditor){var e=this.expandCallbacks("sceditor",s({},{format:this.input_type,emoticonsEnabled:!1,width:"100%",height:300,readOnly:this.schema.readOnly||this.schema.readonly||this.schema.template},this.defaults.options.sceditor||{},this.options.sceditor||{},{element:this.input})),r=window.sceditor.instance(this.input);void 0===r&&window.sceditor.create(this.input,e),this.sceditor_instance=r||window.sceditor.instance(this.input),this.sceditor_instance.blur((function(){t.value=t.sceditor_instance.val(),t.sceditor_instance.updateOriginal(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)}else Rr(Ir(a.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.sceditor_instance&&this.sceditor_instance.readOnly(!1),Rr(Ir(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Rr(Ir(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Rr(Ir(a.prototype),"destroy",this).call(this)}}])&&Lr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function Nr(t){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nr(t)}function Dr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Nr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Nr(i)?i:String(i)),n)}var i}function Fr(){return Fr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zr(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Fr.apply(this,arguments)}function Vr(t,e){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vr(t,e)}function zr(t){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zr(t)}var Hr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vr(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=zr(n);if(i){var r=zr(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){if(this.select2_instance){e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0);var r=this.updateValue(t);this.input.value=r,this.select2v4?this.select2_instance.val(r).trigger("change"):this.select2_instance.select2("val",r),this.onChange(!0)}else Fr(zr(a.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var e=this.expandCallbacks("select2",s({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=e.tags=!!e.tags&&"string"===this.schema.type,this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=u(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var e=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(e),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}Fr(zr(a.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e,r=this.typecast(t),n=!1;return this.enum_values.includes(r)||""===r||(this.enum_options.push("".concat(r)),this.enum_display.push("".concat(r)),this.enum_values.push(r),this.schema.enum.push(r),(e=this.input.querySelector('option[value="'.concat(r,'"]')))?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(r,r,!1,!1)).trigger("change"),n=!0),n}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Fr(zr(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Fr(zr(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Fr(zr(a.prototype),"destroy",this).call(this)}}])&&Dr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Bt);function Mr(t){return Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(t)}function qr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Mr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Mr(i)?i:String(i)),n)}var i}function Gr(){return Gr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$r(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Gr.apply(this,arguments)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}function $r(t){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$r(t)}var Jr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$r(n);if(i){var r=$r(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Mr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e){if(this.selectize_instance){e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0);var r=this.updateValue(t);this.input.value=r,this.selectize_instance.clear(!0),this.selectize_instance.setValue(r),this.onChange(!0)}else Gr($r(a.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var e=this.expandCallbacks("selectize",s({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=e.create=!!e.create&&"string"===this.schema.type,this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(e){t.updateValue(e),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Gr($r(a.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),r=!1;return this.enum_values.includes(e)||""===e||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),r=!0),r}},{key:"onWatchedFieldChange",value:function(){var t=this;Gr($r(a.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach((function(e,r){t.selectize_instance.addOption({value:e,text:t.enum_display[r]})})),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Gr($r(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Gr($r(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Gr($r(a.prototype),"destroy",this).call(this)}}])&&qr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Bt);function Wr(t){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(t)}function Zr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Wr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Wr(i)?i:String(i)),n)}var i}function Yr(t,e){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(t,e)}function Qr(t){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qr(t)}var Kr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yr(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Qr(n);if(i){var r=Qr(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Wr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)));var e=this.formname.replace(/\W/g,"");if("function"==typeof SignaturePad){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var r=document.createElement("div");r.classList.add("signature-container");var n=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&n.setAttribute("name",e),n.classList.add("signature"),r.appendChild(n),this.signaturePad=new window.SignaturePad(n,{onEnd:function(){this.signaturePad.isEmpty()?this.input.value="":this.input.value=this.signaturePad.toDataURL(),this.is_dirty=!0,this.refreshValue(),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange()}});var i=document.createElement("div"),o=document.createElement("button");o.classList.add("tiny","button"),o.innerHTML="Clear signature",i.appendChild(o),r.appendChild(i),this.options.compact&&this.container.setAttribute("class","".concat(this.container.getAttribute("class")," compact")),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach((function(t){n.setAttribute("readOnly","readOnly"),t.disabled=!0}))),o.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.signaturePad.clear(),t.signaturePad.strokeEnd()})),this.control=this.theme.getFormControl(this.label,r,this.description),this.container.appendChild(this.control),this.refreshValue(),n.width=r.offsetWidth,this.options&&this.options.canvas_height?n.height=this.options.canvas_height:n.height="300"}else{var a=document.createElement("p");a.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(a)}}},{key:"setValue",value:function(t){if("function"==typeof SignaturePad){var e=this.sanitize(t);if(this.value===e)return;return this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&""!==t&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&Zr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function Xr(t){return Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xr(t)}function tn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Xr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Xr(i)?i:String(i)),n)}var i}function en(){return en="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=nn(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},en.apply(this,arguments)}function rn(t,e){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rn(t,e)}function nn(t){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nn(t)}r(2564);var on=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rn(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=nn(n);if(i){var r=nn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Xr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"setValue",value:function(t,e,r){var n=en(nn(a.prototype),"setValue",this).call(this,t,e,r);void 0!==n&&n.changed&&this.simplemde_instance&&this.simplemde_instance.value(n.value)}},{key:"build",value:function(){this.options.format="textarea",en(nn(a.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.SimpleMDE?(t=this.expandCallbacks("simplemde",s({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",(function(){e.value=e.simplemde_instance.value(),e.is_dirty=!0,e.onChange(!0)})),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):en(nn(a.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),en(nn(a.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),en(nn(a.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),en(nn(a.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(t,e){function r(){t.display.wrapper.offsetHeight?(this.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(r,e.delay)}e.timeout=window.setTimeout(r,e.delay),e.hurry=function(){window.clearTimeout(e.timeout),e.timeout=window.setTimeout(r,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}},{key:"stopListening",value:function(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}])&&tn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function sn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==an(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===an(i)?i:String(i)),n)}var i}function ln(){return ln="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=un(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},ln.apply(this,arguments)}function cn(t,e){return cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cn(t,e)}function un(t){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},un(t)}var hn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cn(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=un(n);if(i){var r=un(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===an(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),void 0===this.schema.enum){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var r=0;r<e;r++)this.enum_values.push(r+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var n=function(e){e.preventDefault(),e.stopPropagation(),t.setValue(e.currentTarget.value),t.onChange(!0)},i=this.enum_values.length-1;i>-1;i--){var o=this.formname+(i+1),a=this.theme.getFormInputField("radio");a.name="".concat(this.formname,"[starrating]"),a.value=this.enum_values[i],a.id=o,a.addEventListener("change",n,!1),this.radioGroup.push(a);var s=document.createElement("label");s.htmlFor=o,s.title=this.enum_values[i],this.options.displayValue&&s.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(a),this.ratingContainer.appendChild(s)}if(this.options.displayValue&&(this.displayRating=document.createElement("div"),this.displayRating.classList.add("starrating-display"),this.displayRating.innerText=this.enum_values[0],this.ratingContainer.appendChild(this.displayRating)),this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var l=0;l<this.radioGroup.length;l++)this.radioGroup[l].disabled=!0;this.ratingContainer.classList.add("readonly")}var c=this.theme.getContainer();c.appendChild(this.ratingContainer),this.input=c,this.control=this.theme.getFormControl(this.label,c,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}},{key:"destroy",value:function(){this.ratingContainer.parentNode&&this.ratingContainer.parentNode.parentNode&&this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),ln(un(a.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return"integer"===this.schema.type?""===this.value?void 0:1*this.value:this.value}},{key:"setValue",value:function(t){for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value==="".concat(t)){this.radioGroup[e].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value),this.onChange(!0);break}}}])&&sn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function dn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==pn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===pn(i)?i:String(i)),n)}var i}function fn(){return fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mn(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},fn.apply(this,arguments)}function yn(t,e){return yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yn(t,e)}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}hn.rules={".starrating":"direction:rtl;display:inline-block;white-space:nowrap",".starrating > input":"display:none",".starrating > label:before":"content:'%5C2606';margin:1px;font-size:18px;font-style:normal;font-weight:400;line-height:1;font-family:'Arial';display:inline-block",".starrating > label":"color:%23888;cursor:pointer;margin:8px%200%202px%200",".starrating > label.starrating-display-enabled":"margin:1px%200%200%200",".starrating > input:checked ~ label":"color:%23ffca08",".starrating:not(.readonly) > input:hover ~ label":"color:%23ffca08",".starrating > input:checked ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating:not(.readonly) > input:hover ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating .starrating-display":"position:relative;direction:rtl;text-align:center;font-size:10px;line-height:0px"};var vn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yn(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=mn(n);if(i){var r=mn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"build",value:function(){fn(mn(a.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){fn(mn(a.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){fn(mn(a.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&dn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Pe);function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function gn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==bn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===bn(i)?i:String(i)),n)}var i}function wn(){return wn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kn(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},wn.apply(this,arguments)}function _n(t,e){return _n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_n(t,e)}function kn(t){return kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kn(t)}var jn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_n(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=kn(n);if(i){var r=kn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,r=[{key:"register",value:function(){if(wn(kn(a.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(wn(kn(a.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,wn(kn(a.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){this.table=this.theme.getTable(),this.container.appendChild(this.table),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var t=this.getElementEditor(0,!0);if(this.item_default=t.getDefault(),this.width=t.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.table),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls),this.item_has_child_editors)for(var e=t.getChildEditors(),r=t.property_order||Object.keys(e),n=0;n<r.length;n++){var i=this.theme.getTableHeaderCell(e[r[n]].getTitle());e[r[n]].options.hidden&&(i.style.display="none"),this.header_row.appendChild(i)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=this.theme.getTableHeaderCell(" "),this.controls_header_cell.setAttribute("aria-hidden","true"),this.header_row.appendChild(this.controls_header_cell),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),wn(kn(a.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return s({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var r=s({},this.schema.items),n=this.jsoneditor.getEditorClass(r,this.jsoneditor),i=this.row_holder.appendChild(this.theme.getTableRow()),o=i;this.item_has_child_editors||(o=this.theme.getTableCell(),i.appendChild(o));var a=this.jsoneditor.createEditor(n,{jsoneditor:this.jsoneditor,schema:r,container:o,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return a.preBuild(),e||(a.build(),a.postBuild(),a.controls_cell=i.appendChild(this.theme.getTableCell()),a.row=i,a.table_controls=this.theme.getButtonHolder(),a.controls_cell.appendChild(a.table_controls),a.table_controls.style.margin=0,a.table_controls.style.padding=0),a}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,wn(kn(a.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());return this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){var n=!1;e.forEach((function(e,r){t.rows[r]?t.rows[r].setValue(e):(t.addRow(e),n=!0)}));for(var i=e.length;i<this.rows.length;i++){var o=this.rows[i].container;this.item_has_child_editors||this.rows[i].row.parentNode.removeChild(this.rows[i].row),this.rows[i].destroy(),o.parentNode&&o.parentNode.removeChild(o),this.rows[i]=null,n=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(n||r)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,r=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,n=[];this.rows.forEach((function(i,o){if(i.delete_button){var a=!e;t.setVisibility(i.delete_button,a),n.push(a)}if(i.copy_button){var s=!r;t.setVisibility(i.copy_button,s),n.push(s)}if(i.moveup_button){var l=0!==o;t.setVisibility(i.moveup_button,l),n.push(l)}if(i.movedown_button){var c=o!==t.rows.length-1;t.setVisibility(i.movedown_button,c),n.push(c)}}));var i=n.some((function(t){return t}));this.rows.forEach((function(e){return t.setVisibility(e.controls_cell,i)})),this.setVisibility(this.controls_header_cell,i),this.setVisibility(this.table,this.value.length);var o=!(r||this.hide_add_button);this.setVisibility(this.add_row_button,o);var a=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setVisibility(this.delete_last_row_button,a);var s=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setVisibility(this.remove_all_rows_button,s);var l=o||a||s;this.setVisibility(this.controls,l)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach((function(e,r){t.value[r]=e.getValue()})),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var r=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,r)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,r)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,r)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,r)),void 0!==t&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var r=this,n=this.getButton("","delete","button_delete_row_title_short");return n.classList.add("delete","json-editor-btntype-delete"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!r.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),n=r.getValue(),i=r.getValue()[e];n.splice(e,1),r.setValue(n),r.onChange(!0),r.jsoneditor.trigger("deleteRow",i)})),e.appendChild(n),n}},{key:"_createCopyButton",value:function(t,e){var r=this,n=this.getButton("","copy","button_copy_row_title_short"),i=this.schema;return n.classList.add("copy","json-editor-btntype-copy"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),n=r.getValue(),o=n[e];"string"===i.items.type&&"uuid"===i.items.format?o=d():"object"===i.items.type&&i.items.properties&&n.forEach((function(t,r){if(e===r)for(var a=0,s=Object.keys(t);a<s.length;a++){var l=s[a];i.items.properties&&i.items.properties[l]&&"uuid"===i.items.properties[l].format&&((o=Object.assign({},n[e]))[l]=d())}})),n.splice(e+1,0,o),r.setValue(n),r.onChange(!0),r.jsoneditor.trigger("copyRow",r.rows[e+1])})),e.appendChild(n),n}},{key:"_createMoveUpButton",value:function(t,e){var r=this,n=this.getButton("","moveup","button_move_up_title");return n.classList.add("moveup","json-editor-btntype-move"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),n=r.getValue();n.splice(e-1,0,n.splice(e,1)[0]),r.setValue(n),r.onChange(!0),r.jsoneditor.trigger("moveRow",r.rows[e-1])})),e.appendChild(n),n}},{key:"_createMoveDownButton",value:function(t,e){var r=this,n=this.getButton("","movedown","button_move_down_title");return n.classList.add("movedown","json-editor-btntype-move"),n.setAttribute("data-i",t),n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),n=r.getValue();n.splice(e+1,0,n.splice(e,1)[0]),r.setValue(n),r.onChange(!0),r.jsoneditor.trigger("moveRow",r.rows[e+1])})),e.appendChild(n),n}},{key:"addControls",value:function(){var t=this;this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.title_controls&&(this.title.insertBefore(this.toggle_button,this.title.childNodes[0]),this.toggle_button.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.setVisibility(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand","button_expand"))})),this.options.collapsed&&l(this.toggle_button,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton()}},{key:"_createToggleButton",value:function(){var t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation();var r=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",r)})),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var r=t.getValue(),n=r.pop();t.setValue(r),t.onChange(!0),t.jsoneditor.trigger("deleteRow",n)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var r=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",r)})),this.controls.appendChild(e),e}}],r&&gn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(B);function On(t){return On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(t)}function xn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==On(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==On(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===On(i)?i:String(i)),n)}var i}function Cn(){return Cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Pn(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Cn.apply(this,arguments)}function En(t,e){return En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},En(t,e)}function Pn(t){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pn(t)}function Sn(t){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(t)}function Tn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Sn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Sn(i)?i:String(i)),n)}var i}function Ln(){return Ln="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=An(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Ln.apply(this,arguments)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}function An(t){return An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},An(t)}function In(t){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(t)}function Bn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==In(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==In(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===In(i)?i:String(i)),n)}var i}function Nn(){return Nn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fn(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Nn.apply(this,arguments)}function Dn(t,e){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dn(t,e)}function Fn(t){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fn(t)}r(6977);var Vn={ace:S,array:B,arrayChoices:J,arraySelect2:X,arraySelectize:ot,autocomplete:ht,base64:vt,button:jt,checkbox:St,choices:Ht,datetime:Jt,describedBy:Xt,enum:ae,hidden:pe,info:ve,integer:Pe,ip:Ie,jodit:ze,multiple:ar,multiselect:H,null:hr,number:je,object:jr,radio:Sr,sceditor:Br,select:Bt,select2:Hr,selectize:Jr,signature:Kr,simplemde:on,starrating:hn,stepper:vn,string:j,table:jn,upload:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&En(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Pn(n);if(i){var r=Pn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===On(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",s({},{title:"Browse",icon:"",auto_upload:!1,hide_input:!1,enable_drag_drop:!1,drop_zone_text:"Drag & Drop file here",drop_zone_top:!1,alt_drop_zone:"",mime_type:"",max_upload_size:0,upload_handler:function(t,e,r,n){window.alert('No upload_handler defined for "'.concat(t.path,'". You must create your own handler to enable upload to server'))}},this.defaults.options.upload||{},this.options.upload||{})),this.options.mime_type=this.options.mime_type?[].concat(this.options.mime_type):[],this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if("function"!=typeof this.options.upload_handler)throw new Error("Upload handler required for upload editor");if(this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.options.mime_type.length&&this.uploader.setAttribute("accept",this.options.mime_type),!0===this.options.enable_drag_drop&&!0===this.options.hide_input||(this.clickHandler=function(e){t.uploader.dispatchEvent(new window.MouseEvent("click",{view:window,bubbles:!0,cancelable:!1}))},this.browseButton=this.getButton(this.options.title,this.options.icon,this.options.title),this.browseButton.addEventListener("click",this.clickHandler),this.fileDisplay=this.theme.getFormInputField("input"),this.fileDisplay.setAttribute("readonly",!0),this.fileDisplay.value="No file selected.",this.fileDisplay.addEventListener("dblclick",this.clickHandler),this.fileUploadGroup=this.theme.getInputGroup(this.fileDisplay,[this.browseButton]),this.fileUploadGroup||(this.fileUploadGroup=document.createElement("div"),this.fileUploadGroup.appendChild(this.fileDisplay),this.fileUploadGroup.appendChild(this.browseButton))),!0===this.options.enable_drag_drop){if(""!==this.options.alt_drop_zone){if(this.altDropZone=document.querySelector(this.options.alt_drop_zone),!this.altDropZone)throw new Error('Error: alt_drop_zone selector "'.concat(this.options.alt_drop_zone,'" not found!'));this.dropZone=this.altDropZone}else this.dropZone=this.theme.getDropZone(this.options.drop_zone_text);this.dropZone&&(this.dropZone.classList.add("upload-dropzone"),this.dropZone.addEventListener("dblclick",this.clickHandler))}this.uploadHandler=function(e){e.preventDefault(),e.stopPropagation();var r=e.target.files||e.dataTransfer.files;if(r&&r.length)if(0!==t.options.max_upload_size&&r[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(0===t.options.mime_type.length||t.isValidMimeType(r[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=r[0].name);var n=new window.FileReader;n.onload=function(e){t.preview_value=e.target.result,t.refreshPreview(r),t.onChange(!0),n=null},n.readAsDataURL(r[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(e){var r=e.dataTransfer.items||e.dataTransfer.files,n=r&&r.length&&(0===t.options.mime_type.length||t.isValidMimeType(r[0].type,t.options.mime_type)),i=e.currentTarget.classList&&e.currentTarget.classList.contains("upload-dropzone")&&n;switch((e.currentTarget===window?"w_":"e_")+e.type){case"w_drop":case"w_dragover":i||(e.dataTransfer.dropEffect="none");break;case"e_dragenter":i?(t.dropZone.classList.add("valid-dropzone"),e.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":i&&(e.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),i&&t.uploadHandler(e)}i||e.preventDefault()},!0===this.options.enable_drag_drop&&(["dragover","drop"].forEach((function(e){window.addEventListener(e,t.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(e){t.dropZone.addEventListener(e,t.dragHandler,!0)})))}this.preview=document.createElement("div"),this.control=this.input.controlgroup=this.theme.getFormControl(this.label,this.uploader||this.input,this.description,this.infoButton),this.uploader&&(this.uploader.controlgroup=this.control);var e=this.uploader||this.input,r=document.createElement("div");this.dropZone&&!this.altDropZone&&!0===this.options.drop_zone_top&&r.appendChild(this.dropZone),this.fileUploadGroup&&r.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&!0!==this.options.drop_zone_top&&r.appendChild(this.dropZone),r.appendChild(this.preview),e.parentNode.insertBefore(r,e.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"afterInputReady",value:function(){var t=this;if(this.value){var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.onload=function(r){t.preview.appendChild(e)},e.onerror=function(t){console.error("upload error",t,t.currentTarget)},e.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(t){var e=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var r=t[0],n=this.preview_value.match(/^data:([^;,]+)[;,]/);if(r.mimeType=n?n[1]:"unknown",r.size>0){var i=Math.floor(Math.log(r.size)/Math.log(1024));r.formattedSize="".concat(parseFloat((r.size/Math.pow(1024,i)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i])}else r.formattedSize="0 Bytes";var o=this.getButton("button_upload","upload","button_upload");o.addEventListener("click",(function(t){t.preventDefault(),o.setAttribute("disabled","disabled"),e.theme.removeInputError(e.uploader),e.theme.getProgressBar&&(e.progressBar=e.theme.getProgressBar(),e.preview.appendChild(e.progressBar)),e.options.upload_handler(e.path,r,{success:function(t){e.setValue(t),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),o.removeAttribute("disabled")},failure:function(t){e.theme.addInputError(e.uploader,t),e.progressBar&&e.preview.removeChild(e.progressBar),o.removeAttribute("disabled")},updateProgress:function(t){e.progressBar&&(t?e.theme.updateProgressBar(e.progressBar,t):e.theme.updateProgressBarUnknown(e.progressBar))}})})),this.preview.appendChild(this.theme.getUploadPreview(r,o,this.preview_value)),this.options.auto_upload&&(o.dispatchEvent(new window.MouseEvent("click")),o.parentNode.removeChild(o))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Cn(Pn(a.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Cn(Pn(a.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var t=this;!0===this.options.enable_drag_drop&&(["dragover","drop"].forEach((function(e){window.removeEventListener(e,t.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(e){t.dropZone.removeEventListener(e,t.dragHandler,!0)})),this.dropZone.removeEventListener("dblclick",this.clickHandler),this.dropZone&&this.dropZone.parentNode&&this.dropZone.parentNode.removeChild(this.dropZone)),this.uploader&&this.uploader.parentNode&&(this.uploader.removeEventListener("change",this.uploadHandler),this.uploader.parentNode.removeChild(this.uploader)),this.browseButton&&this.browseButton.parentNode&&(this.browseButton.removeEventListener("click",this.clickHandler),this.browseButton.parentNode.removeChild(this.browseButton)),this.fileDisplay&&this.fileDisplay.parentNode&&(this.fileDisplay.removeEventListener("dblclick",this.clickHandler),this.fileDisplay.parentNode.removeChild(this.fileDisplay)),this.fileUploadGroup&&this.fileUploadGroup.parentNode&&this.fileUploadGroup.parentNode.removeChild(this.fileUploadGroup),this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.header&&this.header.parentNode&&this.header.parentNode.removeChild(this.header),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Cn(Pn(a.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce((function(e,r){return e||new RegExp(r.replace(/\*/g,".*"),"gi").test(t)}),!1)}}])&&xn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(v),uuid:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rn(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=An(n);if(i){var r=An(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"preBuild",value:function(){Ln(An(a.prototype),"preBuild",this).call(this),this.schema.default=this.uuid=this.getUuid(),this.schema.options||(this.schema.options={}),this.schema.options.cleave||(this.schema.options.cleave={delimiters:["-"],blocks:[8,4,4,4,12]})}},{key:"build",value:function(){Ln(An(a.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,e,r){this.testUuid(t)||(t=this.uuid),this.uuid=t,Ln(An(a.prototype),"setValue",this).call(this,t,e,r)}},{key:"getUuid",value:function(){return d()}},{key:"testUuid",value:function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}}])&&Tn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j),colorpicker:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dn(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Fn(n);if(i){var r=Fn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===In(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,r){var n=Nn(Fn(a.prototype),"setValue",this).call(this,t,e,r);return this.picker_instance&&this.picker_instance.domElement&&n&&n.changed&&this.picker_instance.setColor(n.value,!0),n}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){Nn(Fn(a.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(Nn(Fn(a.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!0}}},{key:"enable",value:function(){if(Nn(Fn(a.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),Nn(Fn(a.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(t){var e=this;if(t){if(window.Picker&&!this.picker_instance){var r=this.expandCallbacks("colorpicker",s({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),n=function(t){var r=e.picker_instance.settings.editorFormat,n=e.picker_instance.settings.alpha;e.setValue("hex"===r?n?t.hex:t.hex.slice(0,7):t["".concat(r+(n?"a":""),"String")])};r.popup||"function"==typeof r.onChange?r.popup&&"function"!=typeof r.onDone&&(r.onDone=n):r.onChange=n,this.picker_instance=new window.Picker(r),r.popup||(this.input.style.display="none",this.theme.afterInputReady(this.picker_instance.domElement))}}else this.picker_instance&&(this.picker_instance.destroy(),this.picker_instance=null,this.input.style.display="")}}])&&Bn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(j)};function zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Hn={},Mn="en",qn=Mn;Hn.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_const:"Value must be the constant value",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must be at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the pattern {{0}}",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_property_names_exceeds_maxlength:"Property name {{0}} exceeds maxLength",error_property_names_enum_mismatch:"Property name {{0}} does not match any enum values",error_property_names_const_mismatch:"Property name {{0}} does not match the const value",error_property_names_pattern_mismatch:"Property name {{0}} does not match pattern",error_property_names_false:"Property name {{0}} fails when propertyName is false",error_property_names_maxlength:"Property name {{0}} cannot match invalid maxLength",error_property_names_enum:"Property name {{0}} cannot match invalid enum",error_property_names_pattern:"Property name {{0}} cannot match invalid pattern",error_property_names_unsupported:"Unsupported propertyName {{0}}",error_dependency:"Must have property {{0}}",error_date:"Date must be in the format {{0}}",error_time:"Time must be in the format {{0}}",error_datetime_local:"Datetime must be in the format {{0}}",error_invalid_epoch:"Date must be greater than 1 January 1970",error_ipv4:"Value must be a valid IPv4 address in the form of 4 numbers between 0 and 255, separated by dots",error_ipv6:"Value must be a valid IPv6 address",error_hostname:"The hostname has the wrong format",upload_max_size:"Filesize too large. Max size is ",upload_wrong_file_format:"Wrong file format. Allowed format(s): ",button_save:"Save",button_copy:"Copy",button_cancel:"Cancel",button_add:"Add",button_delete_all:"All",button_delete_all_title:"Delete All",button_delete_last:"Last {{0}}",button_delete_last_title:"Delete Last {{0}}",button_add_row_title:"Add {{0}}",button_move_down_title:"Move down",button_move_up_title:"Move up",button_properties:"Properties",button_object_properties:"Object Properties",button_copy_row_title:"Copy {{0}}",button_delete_row_title:"Delete {{0}}",button_delete_row_title_short:"Delete",button_copy_row_title_short:"Copy",button_collapse:"Collapse",button_expand:"Expand",button_edit_json:"Edit JSON",button_upload:"Upload",flatpickr_toggle_button:"Toggle",flatpickr_clear_button:"Clear",choices_placeholder_text:"Start typing to add value",default_array_item_title:"item",button_delete_node_warning:"Are you sure you want to remove this item?"},Object.entries(Vn).forEach((function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return zn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=e[0],n=e[1];Vn[r].options=n.options||{}}));var Gn={options:{upload:function(t,e,r){console.log("Upload handler required for upload editor")},use_name_attributes:!0,prompt_before_delete:!0,use_default_values:!0,max_depth:0},theme:"html",template:"default",themes:{},callbacks:{},templates:{},iconlibs:{},editors:Vn,languages:Hn,resolvers:e,custom_validators:[],default_language:Mn,language:qn,translate:function(t,e,r){var n={};r&&r.options&&r.options.error_messages&&r.options.error_messages[Gn.language]&&(n=r.options.error_messages[Gn.language]);var i=Gn.languages[Gn.language];if(!i)throw new Error("Unknown language ".concat(Gn.language));var o=n[t]||i[t]||Gn.languages[Mn][t]||t;if(e)for(var a=0;a<e.length;a++)o=o.replace(new RegExp("\\{\\{".concat(a,"}}"),"g"),e[a]);return o},translateProperty:function(t,e){return t}};function Un(){Un=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new x(i||[]);return n(a,"_invoke",{value:_(t,r,s)}),a}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function p(){}function d(){}function f(){}var y={};l(y,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(C([])));v&&v!==e&&r.call(v,o)&&(y=v);var b=f.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function i(n,o,a,s){var l=u(t[n],t,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==Yn(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=k(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function k(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=u(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=f,n(b,"constructor",{value:f,configurable:!0}),n(f,"constructor",{value:d,configurable:!0}),d.displayName=l(f,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,l(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=C,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function $n(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}function Jn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){$n(o,n,i,a,s,"next",t)}function s(t){$n(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Wn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Zn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Yn(t){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(t)}function Qn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Yn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Yn(i)?i:String(i)),n)}var i}r(8733);var Kn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(t){"object"===Yn(t.type)&&(t.type=this._expandSubSchema(t.type))},disallow:function(t){"object"===Yn(t.disallow)&&(t.disallow=this._expandSubSchema(t.disallow))},anyOf:function(t){var e=this;Object.entries(t.anyOf).forEach((function(r){var n=Wn(r,2),i=n[0],o=n[1];t.anyOf[i]=e.expandSchema(o)}))},dependencies:function(t){var e=this;Object.entries(t.dependencies).forEach((function(r){var n=Wn(r,2),i=n[0],o=n[1];"object"!==Yn(o)||Array.isArray(o)||(t.dependencies[i]=e.expandSchema(o))}))},not:function(t){t.not=this.expandSchema(t.not)}},this._subSchema2={allOf:function(t,e){var r=this,n=s({},e);return Object.entries(t.allOf).forEach((function(e){var i=Wn(e,2),o=i[0],a=i[1];t.allOf[o]=r.expandRefs(a,!0),n=r.extendSchemas(n,r.expandSchema(a))})),delete n.allOf,n},extends:function(t,e){var r,n=this;return delete(r=Array.isArray(t.extends)?t.extends.reduce((function(t,e,r){return n.extendSchemas(t,n.expandSchema(e))}),e):this.extendSchemas(e,this.expandSchema(t.extends))).extends,r},oneOf:function(t,e){var r=this,n=s({},e);return delete n.oneOf,t.oneOf.reduce((function(t,e,i){return t.oneOf[i]=r.extendSchemas(r.expandSchema(e),n),t}),e),e}}}var e,r,n,i;return e=t,r=[{key:"load",value:(i=Jn(Un().mark((function t(e,r,n){return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.schema=e,t.next=3,this._asyncloadExternalRefs(e,r,this._getFileBase(n),!0);case 3:return t.abrupt("return",this.expandRefs(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"expandRefs",value:function(t,e){var r=this,n=s({},t);if(!n.$ref)return n;var i=n.$ref.split("#");if(2===i.length&&!this.refs_with_info[n.$ref]){var o=this.expandRecursivePointer(this.schema,i[1]);return this.extendSchemas(n,this.expandSchema(o))}var a=i.length>2?this.refs_with_info["#"+i[1]]:this.refs_with_info[n.$ref];delete n.$ref;var l=a.$ref.startsWith("#")?a.fetchUrl:"",c=this._getRef(l,a);if(this.refs[c]){if(e&&u(this.refs[c],"allOf")){var h=this.refs[c].allOf;Object.keys(h).forEach((function(t){h[t]=r.expandRefs(h[t],!0)}))}}else console.warn("reference:'".concat(c,"' not found!"));return i.length>2?this.extendSchemas(n,this.expandSchema(this.expandRecursivePointer(this.refs[c],i[2]))):this.extendSchemas(n,this.expandSchema(this.refs[c]))}},{key:"expandRecursivePointer",value:function(t,e){var r=t;return e.split("/").slice(1).forEach((function(t){r[t]&&(r=r[t])})),r.$refs&&r.$refs.startsWith("#")?this.expandRecursivePointer(t,r.$refs):r}},{key:"expandSchema",value:function(t){var e=this;Object.entries(this._subSchema1).forEach((function(r){var n=Wn(r,2),i=n[0],o=n[1];t[i]&&o.call(e,t)}));var r=s({},t);return Object.entries(this._subSchema2).forEach((function(n){var i=Wn(n,2),o=i[0],a=i[1];t[o]&&(r=a.call(e,t,r))})),this.expandRefs(r)}},{key:"_getRef",value:function(t,e){var r=t+e;return this.refs[r]?r:t+decodeURIComponent(e.$ref)}},{key:"_expandSubSchema",value:function(t){var e=this;return Array.isArray(t)?t.map((function(t){return"object"===Yn(t)?e.expandSchema(t):t})):this.expandSchema(t)}},{key:"_manageRecursivePointer",value:function(t,e){Object.keys(t).forEach((function(r){t[r].$ref&&0===t[r].$ref.indexOf("#")&&(t[r].$ref=e+t[r].$ref)}))}},{key:"_getExternalRefs",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n||this._manageRecursivePointer(t,e);var i={},o=function(t){return Object.keys(t).forEach((function(t){i[t]=!0}))};if(t.$ref&&"object"!==Yn(t.$ref)&&(0!==t.$ref.indexOf("#")||!n)){var a=t.$ref,s="";a.indexOf("#")>0&&(a=a.substr(0,a.indexOf("#"))),a!==t.$ref&&(s=t.$ref.substr(t.$ref.indexOf("#")));var l=this.refs_prefix+this.refs_counter++,c=l+s;"#"===t.$ref.substr(0,1)||this.refs[t.$ref]||(i[a]=!0),this.refs_with_info[l]={fetchUrl:e,$ref:a},t.$ref=c}return Object.values(t).forEach((function(t){t&&"object"===Yn(t)&&(Array.isArray(t)?Object.values(t).forEach((function(t){t&&"object"===Yn(t)&&o(r._getExternalRefs(t,e,n))})):t.$ref&&"string"==typeof t.$ref&&t.$ref.startsWith("#")||o(r._getExternalRefs(t,e,n)))})),t.id&&"string"==typeof t.id&&"urn:"===t.id.substr(0,4)?this.refs[t.id]=t:t.$id&&"string"==typeof t.$id&&"urn:"===t.$id.substr(0,4)&&(this.refs[t.$id]=t),i}},{key:"_getFileBase",value:function(t){if(!t)return"/";var e=this.options.ajaxBase;return void 0===e?this._getFileBaseFromFileLocation(t):e}},{key:"_getFileBaseFromFileLocation",value:function(t){var e=t.split("/");return e.pop(),"".concat(e.join("/"),"/")}},{key:"_joinUrl",value:function(t,e){var r=t;return"http://"!==t.substr(0,7)&&"https://"!==t.substr(0,8)&&"blob:"!==t.substr(0,5)&&"data:"!==t.substr(0,5)&&"#"!==t.substr(0,1)&&"/"!==t.substr(0,1)&&(r=e+t),r.indexOf("#")>0&&(r=r.substr(0,r.indexOf("#"))),r}},{key:"_isUniformResourceName",value:function(t){return"urn:"===t.substr(0,4)}},{key:"_asyncloadExternalRefs",value:(n=Jn(Un().mark((function t(e,r,n){var i,o,a,s,l,c,u=this,h=arguments;return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=h.length>3&&void 0!==h[3]&&h[3],o=this._getExternalRefs(e,r,i),a=0,s=Un().mark((function t(){var e,r,i,o,s,h,p,d,f,y,m;return Un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==(e=c[l])){t.next=3;break}return t.abrupt("return","continue");case 3:if(!u.refs[e]){t.next=5;break}return t.abrupt("return","continue");case 5:if(!u._isUniformResourceName(e)){t.next=40;break}if(u.refs[e]="loading",a++,r=u.options.urn_resolver,i=e,"function"==typeof r){t.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(i,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(i));case 13:return i.indexOf("#")>0&&(i=i.substr(0,i.indexOf("#"))),t.prev=14,t.next=17,r(i);case 17:o=t.sent,t.prev=18,s=JSON.parse(o),t.next=26;break;case 22:throw t.prev=22,t.t0=t.catch(18),console.log(t.t0),new Error("Failed to parse external ref ".concat(i));case 26:if(!("boolean"!=typeof s&&"object"!==Yn(s)||null===s||Array.isArray(s))){t.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(i));case 28:return u.refs[e]=s,t.next=31,u._asyncloadExternalRefs(s,e,n);case 31:t.next=37;break;case 33:throw t.prev=33,t.t1=t.catch(14),console.log(t.t1),new Error("Failed to parse external ref ".concat(i));case 37:if("boolean"!=typeof o){t.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(i));case 39:return t.abrupt("return","continue");case 40:if(u.options.ajax){t.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(e));case 42:if(a++,h=u._joinUrl(e,n),u.options.ajax_cache_responses&&(d=u.cacheGet(h))&&(p=d),p){t.next=60;break}return t.next=48,new Promise((function(t){var e=new XMLHttpRequest;u.options.ajaxCredentials&&(e.withCredentials=u.options.ajaxCredentials),e.overrideMimeType("application/json"),e.open("GET",h,!0),e.onload=function(){t(e)},e.onerror=function(e){t(void 0)},e.send()}));case 48:if(void 0!==(f=t.sent)){t.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(e));case 51:t.prev=51,p=JSON.parse(f.responseText),u.options.ajax_cache_responses&&u.cacheSet(h,p),t.next=60;break;case 56:throw t.prev=56,t.t2=t.catch(51),console.log(t.t2),new Error("Failed to parse external ref ".concat(h));case 60:if(!("boolean"!=typeof p&&"object"!==Yn(p)||null===p||Array.isArray(p))){t.next=62;break}throw new Error("External ref does not contain a valid schema - ".concat(h));case 62:return u.refs[e]=p,y=u._getFileBaseFromFileLocation(h),h!==e&&(m=h.split("/"),h=("/"===e.substr(0,1)?"/":"")+m.pop()),t.next=67,u._asyncloadExternalRefs(p,h,y);case 67:case"end":return t.stop()}}),t,null,[[14,33],[18,22],[51,56]])})),l=0,c=Object.keys(o);case 5:if(!(l<c.length)){t.next=13;break}return t.delegateYield(s(),"t0",7);case 7:if("continue"!==t.t0){t.next=10;break}return t.abrupt("continue",10);case 10:l++,t.next=5;break;case 13:if(a){t.next=15;break}return t.abrupt("return",!0);case 15:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return n.apply(this,arguments)})},{key:"extendSchemas",value:function(t,e){var r=this;t=s({},t),e=s({},e);var n={},i=function(t){"string"==typeof t&&(t=[t]),"string"==typeof e.type&&(e.type=[e.type]),e.type&&e.type.length?n.type=t.filter((function(t){return e.type.includes(t)})):n.type=t,1===n.type.length&&"string"==typeof n.type[0]?n.type=n.type[0]:0===n.type.length&&delete n.type};return Object.entries(t).forEach((function(t){var o=Wn(t,2),a=o[0],s=o[1];void 0!==e[a]?function(t,o){!function(t,e){return("required"===t||"defaultProperties"===t)&&"object"===Yn(e)&&Array.isArray(e)}(t,o)?"type"!==t||"string"!=typeof o&&!Array.isArray(o)?"object"!==Yn(o)||Array.isArray(o)||null===o?n[t]=o:n[t]=r.extendSchemas(o,e[t]):i(o):n[t]=o.concat(e[t]).reduce((function(t,e){return t.includes(e)||t.push(e),t}),[])}(a,s):n[a]=s})),Object.entries(e).forEach((function(e){var r=Wn(e,2),i=r[0],o=r[1];void 0===t[i]&&(n[i]=o)})),n}},{key:"getCacheKey",value:function(t){return["je-cache",t].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||(new Date).toISOString().slice(0,10)}},{key:"cacheSet",value:function(t,e){try{window.localStorage.setItem(this.getCacheKey(t),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:e}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(t){try{var e=window.localStorage.getItem(this.getCacheKey(t));if(e){var r=JSON.parse(e);if(r.cacheBuster&&r.schema&&r.cacheBuster===this.getCacheBuster())return r.schema;this.cacheDelete(t)}}catch(t){console.error(t)}}},{key:"cacheDelete",value:function(t){window.localStorage.removeItem(this.getCacheKey(t))}}],r&&Qn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Xn=(r(3210),{default:function(){return{compile:function(t){var e=t.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),r=e&&e.length;if(!r)return function(){return t};for(var n=[],i=function(t){var r,i,o=e[t].replace(/[{}]+/g,"").trim().split("."),a=o.length;a>1?r=function(e){for(i=e,t=0;t<a&&(i=i[o[t]]);t++);return i}:(o=o[0],r=function(t){return t[o]}),n.push({s:e[t],r})},o=0;o<r;o++)i(o);return function(e){var i,a="".concat(t);for(o=0;o<r;o++)i=n[o],a=a.replace(i.s,i.r(e));return a}}}},ejs:function(){return!!window.EJS&&{compile:function(t){var e=new window.EJS({text:t});return function(t){return e.render(t)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(t){var e=window.Hogan.compile(t);return function(t){return e.render(t)}}}},lodash:function(){return!!window._&&{compile:function(t){return function(e){return window._.template(t)(e)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(t){return function(e){return window.Mark.up(t,e)}}}},mustache:function(){return!!window.Mustache&&{compile:function(t){return function(e){return window.Mustache.render(t,e)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(t){return function(e){return window._.template(t)(e)}}}}});function ti(t){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(t)}function ei(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ri(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==ti(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===ti(i)?i:String(i)),n)}var i}var ni={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},ii=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ni;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapping=r,this.icon_prefix=e}var e,r;return e=t,(r=[{key:"getIconClass",value:function(t){return this.mapping[t]?this.icon_prefix+this.mapping[t]:this.icon_prefix+t}},{key:"getIcon",value:function(t){var e,r=this.getIconClass(t);if(!r)return null;var n,i=document.createElement("i");return(e=i.classList).add.apply(e,function(t){if(Array.isArray(t))return ei(t)}(n=r.split(" "))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return ei(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ei(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i}}])&&ri(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function oi(t){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(t)}function ai(t,e){return ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ai(t,e)}function si(t){return si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},si(t)}var li="glyphicon glyphicon-",ci={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"};function ui(t){return ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(t)}function hi(t,e){return hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hi(t,e)}function pi(t){return pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pi(t)}var di="icon-",fi={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"};function yi(t){return yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(t)}function mi(t,e){return mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mi(t,e)}function vi(t){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vi(t)}var bi="fa fa-",gi={collapse:"caret-square-o-down",expand:"caret-square-o-right",delete:"times",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"files-o",clear:"times-circle-o",time:"clock-o",calendar:"calendar",edit_properties:"list"};function wi(t){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(t)}function _i(t,e){return _i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_i(t,e)}function ki(t){return ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ki(t)}var ji="fas fa-",Oi={collapse:"caret-down",expand:"caret-right",delete:"trash",edit:"pen",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"times-circle",time:"clock",calendar:"calendar",edit_properties:"list"};function xi(t){return xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xi(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ci(t,e)}function Ei(t){return Ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ei(t)}var Pi="ui-icon ui-icon-",Si={collapse:"triangle-1-s",expand:"triangle-1-e",delete:"trash",edit:"pencil",add:"plusthick",subtract:"minusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",moveright:"arrowthick-1-e",movedown:"arrowthick-1-s",moveleft:"arrowthick-1-w",copy:"copy",clear:"circle-close",time:"time",calendar:"calendar",edit_properties:"note"};function Ti(t){return Ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(t)}function Li(t,e){return Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Li(t,e)}function Ri(t){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ri(t)}var Ai="oi oi-",Ii={collapse:"collapse-down",expand:"expand-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"file",moveup:"arrow-thick-top",moveright:"arrow-thick-right",movedown:"arrow-thick-bottom",moveleft:"arrow-thick-left",copy:"clipboard",clear:"circle-x",time:"clock",calendar:"calendar",edit_properties:"list"};function Bi(t){return Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(t)}function Ni(t,e){return Ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ni(t,e)}function Di(t){return Di=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Di(t)}var Fi="icon icon-",Vi={collapse:"arrow-down",expand:"arrow-right",delete:"delete",edit:"edit",add:"plus",subtract:"minus",cancel:"cross",save:"check",moveup:"upward",moveright:"forward",movedown:"downward",moveleft:"back",copy:"copy",clear:"close",time:"time",calendar:"bookmark",edit_properties:"menu"},zi={bootstrap3:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ai(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=si(r);if(n){var i=si(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===oi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,li,ci)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(ii),fontawesome3:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hi(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=pi(r);if(n){var i=pi(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ui(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,di,fi)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(ii),fontawesome4:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mi(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=vi(r);if(n){var i=vi(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===yi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,bi,gi)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(ii),fontawesome5:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_i(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ki(r);if(n){var i=ki(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,ji,Oi)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(ii),jqueryui:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ci(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ei(r);if(n){var i=Ei(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===xi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,Pi,Si)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(ii),openiconic:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Li(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ri(r);if(n){var i=Ri(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ti(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,Ai,Ii)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(ii),spectre:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ni(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Di(r);if(n){var i=Di(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,Fi,Vi)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(ii)};function Hi(t){return Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hi(t)}function Mi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Hi(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Hi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Hi(i)?i:String(i)),n)}var i}var qi=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(t){return t in document.documentElement})),Gi=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{disable_theme_rules:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.jsoneditor=e,Object.keys(r).forEach((function(t){void 0!==e.options[t]&&(r[t]=e.options[t])})),this.options=r}var e,r;return e=t,r=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getFloatRightLinkHolder",value:function(){var t=document.createElement("div");return t.classList.add("je-float-right-linkholder"),t}},{key:"getModal",value:function(){var t=document.createElement("div");return t.style.display="none",t.classList.add("je-modal"),t}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("row"),t}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(t,e){}},{key:"getLink",value:function(t){var e=document.createElement("a");return e.setAttribute("href","#"),e.appendChild(document.createTextNode(t)),e}},{key:"disableHeader",value:function(t){t.style.color="#ccc"}},{key:"disableLabel",value:function(t){t.style.color="#ccc"}},{key:"enableHeader",value:function(t){t.style.color=""}},{key:"enableLabel",value:function(t){t.style.color=""}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.innerText="ⓘ",e.classList.add("je-infobutton-icon");var r=document.createElement("span");return r.classList.add("je-infobutton-tooltip"),r.innerText=t,e.onmouseover=function(){r.style.visibility="visible"},e.onmouseleave=function(){r.style.visibility="hidden"},e.appendChild(r),e}},{key:"getFormInputLabel",value:function(t,e){var r=document.createElement("label");return r.appendChild(document.createTextNode(t)),e&&r.classList.add("required"),r}},{key:"getHeader",value:function(t,e){var r=document.createElement("h3");return"string"==typeof t?r.textContent=t:r.appendChild(t),r.classList.add("je-header"),r}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("je-checkbox"),t}},{key:"getCheckboxLabel",value:function(t,e){var r=document.createElement("label");return r.appendChild(document.createTextNode(" ".concat(t))),e&&r.classList.add("required"),r}},{key:"getMultiCheckboxHolder",value:function(t,e,r,n){var i=document.createElement("div");return i.classList.add("control-group"),e&&(e.style.display="block",i.appendChild(e),n&&e.appendChild(n)),Object.values(t).forEach((function(t){t.style.display="inline-block",t.style.marginRight="20px",i.appendChild(t)})),r&&i.appendChild(r),i}},{key:"getFormCheckboxControl",value:function(t,e,r){var n=document.createElement("div");return n.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),r&&n.classList.add("je-checkbox-control--compact"),n}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");return Object.keys(t).forEach((function(r){return e.setAttribute(r,t[r])})),e.classList.add("je-radio"),e}},{key:"getFormRadioLabel",value:function(t,e){var r=document.createElement("label");return r.appendChild(document.createTextNode(" ".concat(t))),e&&r.classList.add("required"),r}},{key:"getFormRadioControl",value:function(t,e,r){var n=document.createElement("div");return n.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),r&&n.classList.add("je-radio-control--compact"),n}},{key:"getSelectInput",value:function(t,e){var r=document.createElement("select");return t&&this.setSelectOptions(r,t),r}},{key:"getSwitcher",value:function(t){var e=this.getSelectInput(t,!1);return e.classList.add("je-switcher"),e}},{key:"getSwitcherOptions",value:function(t){return t.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(t,e,r){this.setSelectOptions(t,e,r)}},{key:"setSelectOptions",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];t.innerHTML="";for(var n=0;n<e.length;n++){var i=document.createElement("option");i.setAttribute("value",e[n]),i.textContent=r[n]||e[n],t.appendChild(i)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("je-textarea"),t}},{key:"getRangeInput",value:function(t,e,r){var n=this.getFormInputField("range");return n.setAttribute("min",t),n.setAttribute("max",e),n.setAttribute("step",r),n}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("stepper-down");var n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("stepper-up"),t.getAttribute("readonly")&&(r.setAttribute("disabled",!0),n.setAttribute("disabled",!0)),r.textContent="-",n.textContent="+";var i=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},o=t.getAttribute("min"),a=t.getAttribute("max");return r.addEventListener("click",(function(){t.getAttribute("initialized")?o?Number(t.value)>Number(o)&&t.stepDown():t.stepDown():i(t,o),l(t,"change")})),n.addEventListener("click",(function(){t.getAttribute("initialized")?a?Number(t.value)<Number(a)&&t.stepUp():t.stepUp():i(t,o),l(t,"change")})),e.appendChild(r),e.appendChild(n),e}},{key:"getRangeOutput",value:function(t,e){var r=document.createElement("output"),n=function(t){r.value=t.currentTarget.value};return t.addEventListener("change",n,!1),t.addEventListener("input",n,!1),r}},{key:"getRangeControl",value:function(t,e){var r=document.createElement("div");return r.classList.add("je-range-control"),e&&r.appendChild(e),r.appendChild(t),r}},{key:"getFormInputField",value:function(t){var e=document.createElement("input");return e.setAttribute("type",t),e}},{key:"afterInputReady",value:function(t){}},{key:"getFormControl",value:function(t,e,r,n,i){var o=document.createElement("div");return o.classList.add("form-control"),t&&(o.appendChild(t),i&&t.setAttribute("for",i)),"checkbox"!==e.type&&"radio"!==e.type||!t?(n&&t&&t.appendChild(n),o.appendChild(e)):(e.style.width="auto",t.insertBefore(e,t.firstChild),n&&t.appendChild(n)),r&&o.appendChild(r),o}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-indented-panel--top"),t}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(t){var e=document.createElement("p");return window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getCheckboxDescription",value:function(t){return this.getDescription(t)}},{key:"getFormInputDescription",value:function(t){return this.getDescription(t)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(t){return this.getButtonHolder()}},{key:"getButton",value:function(t,e,r){var n=document.createElement("button");return n.type="button",this.setButtonText(n,t,e,r),n}},{key:"getFormButton",value:function(t,e,r){return this.getButton(t,e,r)}},{key:"setButtonText",value:function(t,e,r,n){for(;t.firstChild;)t.removeChild(t.firstChild);if(r&&(t.appendChild(r),e=" ".concat(e)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!r){var i=document.createElement("span");i.appendChild(document.createTextNode(e)),t.appendChild(i)}n&&t.setAttribute("title",n)}},{key:"getTable",value:function(){return document.createElement("table")}},{key:"getTableRow",value:function(){return document.createElement("tr")}},{key:"getTableHead",value:function(){return document.createElement("thead")}},{key:"getTableBody",value:function(){return document.createElement("tbody")}},{key:"getTableHeaderCell",value:function(t){var e=document.createElement("th");return e.textContent=t,e}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(t){var e=document.createElement("p");return e.style=e.style||{},e.style.color="red",e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){}},{key:"removeInputError",value:function(t){}},{key:"addTableRowError",value:function(t){}},{key:"removeTableRowError",value:function(t){}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(e,"'></div><div class='je-tabholder--clear'></div>"),r}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(e,"'></div>"),r}},{key:"applyStyles",value:function(t,e){Object.keys(e).forEach((function(r){return t.style[r]=e[r]}))}},{key:"closest",value:function(t,e){for(;t&&t!==document;){if(!t[qi])return!1;if(t[qi](e))return t;t=t.parentNode}return!1}},{key:"insertBasicTopTab",value:function(t,e){e.firstChild.insertBefore(t,e.firstChild.firstChild)}},{key:"getTab",value:function(t,e){var r=document.createElement("div");return r.appendChild(t),r.id=e,r.classList.add("je-tab"),r}},{key:"getTopTab",value:function(t,e){var r=document.createElement("div");return r.appendChild(t),r.id=e,r.classList.add("je-tab--top"),r}},{key:"getTabContentHolder",value:function(t){return t.children[1]}},{key:"getTopTabContentHolder",value:function(t){return t.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(t){this.applyStyles(t.tab,{opacity:1,background:"white"}),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){this.applyStyles(t.tab,{opacity:.5,background:""}),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"addTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"addTopTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("je-block-link"),t}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(t,e,r){t.appendChild(e),r.classList.add("je-media"),t.appendChild(r)}},{key:"createImageLink",value:function(t,e,r){t.appendChild(e),e.appendChild(r)}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild}},{key:"getInputGroup",value:function(t,e){}},{key:"cleanText",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}},{key:"getDropZone",value:function(t){var e=document.createElement("div");return e.setAttribute("data-text",t),e.classList.add("je-dropzone"),e}},{key:"getUploadPreview",value:function(t,e,r){var n=document.createElement("div");if(n.classList.add("je-upload-preview"),"image"===t.mimeType.substr(0,5)){var i=document.createElement("img");i.src=r,n.appendChild(i)}var o=document.createElement("div");o.innerHTML+="<strong>Name:</strong> ".concat(t.name,"<br><strong>Type:</strong> ").concat(t.type,"<br><strong>Size:</strong> ").concat(t.formattedSize),n.appendChild(o),n.appendChild(e);var a=document.createElement("div");return a.style.clear="left",n.appendChild(a),n}},{key:"getProgressBar",value:function(){var t=document.createElement("progress");return t.setAttribute("max",100),t.setAttribute("value",0),t}},{key:"updateProgressBar",value:function(t,e){t&&t.setAttribute("value",e)}},{key:"updateProgressBarUnknown",value:function(t){t&&t.removeAttribute("value")}}],r&&Mi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ui(t){return Ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ui(t)}function $i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Ui(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Ui(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Ui(i)?i:String(i)),n)}var i}function Ji(){return Ji="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Zi(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Ji.apply(this,arguments)}function Wi(t,e){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wi(t,e)}function Zi(t){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zi(t)}var Yi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wi(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Zi(n);if(i){var r=Zi(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ui(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getFormInputLabel",value:function(t,e){var r=Ji(Zi(a.prototype),"getFormInputLabel",this).call(this,t,e);return r.classList.add("je-form-input-label"),r}},{key:"getFormInputDescription",value:function(t){var e=Ji(Zi(a.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=Ji(Zi(a.prototype),"getIndentedPanel",this).call(this);return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var t=Ji(Zi(a.prototype),"getChildEditorHolder",this).call(this);return t.classList.add("je-child-editor-holder"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}},{key:"getTable",value:function(){var t=Ji(Zi(a.prototype),"getTable",this).call(this);return t.classList.add("je-table"),t}},{key:"addInputError",value:function(t,e){var r=this.closest(t,".form-control")||t.controlgroup;t.errmsg?t.errmsg.style.display="block":(t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",r.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&$i(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);function Qi(t){return Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qi(t)}function Ki(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Qi(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Qi(i)?i:String(i)),n)}var i}function Xi(){return Xi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=eo(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Xi.apply(this,arguments)}function to(t,e){return to=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},to(t,e)}function eo(t){return eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},eo(t)}Yi.rules={".je-form-input-label":"display:block;margin-bottom:3px;font-weight:bold",".je-form-input-description":"display:inline-block;margin:0;font-size:0.8em;font-style:italic",".je-indented-panel":"padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",".je-child-editor-holder":"margin-bottom:8px",".je-header-button-holder":"display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",".je-table":"margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var ro=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&to(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=eo(n);if(i){var r=eo(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Qi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getSelectInput",value:function(t,e){var r=Xi(eo(a.prototype),"getSelectInput",this).call(this,t);return r.classList.add("form-control"),r}},{key:"setGridColumnSize",value:function(t,e,r){t.classList.add("col-md-".concat(e)),r&&t.classList.add("col-md-offset-".concat(r))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup&&(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),t}},{key:"getRangeInput",value:function(t,e,r){return Xi(eo(a.prototype),"getRangeInput",this).call(this,t,e,r)}},{key:"getFormInputField",value:function(t){var e=Xi(eo(a.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&e.classList.add("form-control"),e}},{key:"getFormControl",value:function(t,e,r,n){var i=document.createElement("div");return!t||"checkbox"!==e.type&&"radio"!==e.type?(i.classList.add("form-group"),t&&(t.classList.add("control-label"),i.appendChild(t),n&&t.appendChild(n)),i.appendChild(e)):(i.classList.add(e.type),n&&t.appendChild(n),t.insertBefore(e,t.firstChild),i.appendChild(t)),r&&i.appendChild(r),i}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var r=document.createElement("span");return r.style["font-family"]="sans-serif",r.style.visibility="hidden",r.style["background-color"]="rgba(50, 50, 50, .75)",r.style.margin="0 .25rem",r.style.color="#FAFAFA",r.style.padding=".5rem 1rem",r.style["border-radius"]=".25rem",r.style.width="25rem",r.style.position="absolute",r.innerText=t,e.onmouseover=function(){r.style.visibility="visible"},e.onmouseleave=function(){r.style.visibility="hidden"},e.appendChild(r),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,e,r){var n=Xi(eo(a.prototype),"getButton",this).call(this,t,e,r);return n.classList.add("btn","btn-default"),n}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}},{key:"addInputError",value:function(t,e){t.controlgroup?(t.controlgroup.classList.add("has-error"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("help-block","errormsg"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controlgroup||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(e,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small'  id='").concat(e,"'></div>"),r}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.innerHTML="<ul class='nav nav-tabs' id='".concat(e,"' role='tablist'></ul><div class='tab-content active well well-small'  id='").concat(e,"'></div>"),r}},{key:"getTab",value:function(t,e){var r=document.createElement("li");r.setAttribute("role","presentation");var n=document.createElement("a");return n.setAttribute("href","#".concat(e)),n.appendChild(t),n.setAttribute("aria-controls",e),n.setAttribute("role","tab"),n.setAttribute("data-toggle","tab"),r.appendChild(n),r}},{key:"getTopTab",value:function(t,e){var r=document.createElement("li");r.setAttribute("role","presentation");var n=document.createElement("a");return n.setAttribute("href","#".concat(e)),n.appendChild(t),n.setAttribute("aria-controls",e),n.setAttribute("role","tab"),n.setAttribute("data-toggle","tab"),r.appendChild(n),r}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var r=t.firstChild,n="".concat(e,"%");r.setAttribute("aria-valuenow",e),r.style.width=n,r.innerHTML=n}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var r=document.createElement("div");r.classList.add("input-group"),r.appendChild(t);var n=document.createElement("div");n.classList.add("input-group-btn"),r.appendChild(n);for(var i=0;i<e.length;i++)n.appendChild(e[i]);return r}}}])&&Ki(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function io(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==no(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===no(i)?i:String(i)),n)}var i}function oo(){return oo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=so(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},oo.apply(this,arguments)}function ao(t,e){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ao(t,e)}function so(t){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},so(t)}ro.rules={},r(3843);var lo={disable_theme_rules:!1,input_size:"normal",custom_forms:!1,object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},co=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ao(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=so(n);if(i){var r=so(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===no(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,lo)}return e=a,(r=[{key:"getSelectInput",value:function(t,e){var r=oo(so(a.prototype),"getSelectInput",this).call(this,t);return r.classList.add("form-control"),!1===this.options.custom_forms?("small"===this.options.input_size&&r.classList.add("form-control-sm"),"large"===this.options.input_size&&r.classList.add("form-control-lg")):(r.classList.remove("form-control"),r.classList.add("custom-select"),"small"===this.options.input_size&&r.classList.add("custom-select-sm"),"large"===this.options.input_size&&r.classList.add("custom-select-lg")),r}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,r){t.classList.add("col-md-".concat(e)),r&&t.classList.add("offset-md-".concat(r))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var r=t.parentNode.parentNode.getElementsByTagName("label")[0];r&&(r.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),"small"===this.options.input_size&&t.classList.add("form-control-sm"),"large"===this.options.input_size&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,r){var n=oo(so(a.prototype),"getRangeInput",this).call(this,t,e,r);return!0===this.options.custom_forms&&(n.classList.remove("form-control"),n.classList.add("custom-range")),n}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),r=document.createElement("div"),n=document.createElement("div"),i=document.createElement("button");i.setAttribute("type","button");var o=document.createElement("button");o.setAttribute("type","button"),e.appendChild(r),e.appendChild(t),e.appendChild(n),r.appendChild(i),n.appendChild(o),e.classList.add("input-group"),r.classList.add("input-group-prepend"),n.classList.add("input-group-append"),i.classList.add("btn"),i.classList.add("btn-secondary"),i.classList.add("stepper-down"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-up"),t.getAttribute("readonly")&&(i.setAttribute("disabled",!0),o.setAttribute("disabled",!0)),i.textContent="-",o.textContent="+";var a=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},s=t.getAttribute("min"),c=t.getAttribute("max");return t.addEventListener("change",(function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")})),i.addEventListener("click",(function(){t.getAttribute("initialized")?s?Number(t.value)>Number(s)&&t.stepDown():t.stepDown():a(t,s),l(t,"change")})),o.addEventListener("click",(function(){t.getAttribute("initialized")?c?Number(t.value)<Number(c)&&t.stepUp():t.stepUp():a(t,s),l(t,"change")})),e}},{key:"getFormInputField",value:function(t){var e=oo(so(a.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&"file"!==t&&(e.classList.add("form-control"),"small"===this.options.input_size&&e.classList.add("form-control-sm"),"large"===this.options.input_size&&e.classList.add("form-control-lg")),"file"===t&&e.classList.add("form-control-file"),e}},{key:"getFormControl",value:function(t,e,r,n){var i=document.createElement("div");if(i.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type)t&&(i.appendChild(t),n&&i.appendChild(n)),i.appendChild(e);else{var o=document.createElement("div");!1===this.options.custom_forms?(o.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(o.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),"checkbox"===e.type?o.classList.add("custom-checkbox"):o.classList.add("custom-radio"));var a=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",a),t.setAttribute("for",a),o.appendChild(e),o.appendChild(t),n&&o.appendChild(n),i.appendChild(o)}return r&&i.appendChild(r),i}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var r=document.createTextNode("ⓘ");return e.appendChild(r),"bootstrap"===this.options.tooltip?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):"css"===this.options.tooltip&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,r,n){var i=document.createElement("div");i.classList.add("form-group"),e&&(i.appendChild(e),n&&e.appendChild(n));var o=document.createElement("div");return Object.values(t).forEach((function(t){var e=t.firstChild;o.appendChild(e)})),i.appendChild(o),r&&i.appendChild(r),i}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var r in t)e.setAttribute(r,t[r]);return!1===this.options.custom_forms?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var r=document.createElement("label");return!1===this.options.custom_forms?r.classList.add("form-check-label"):r.classList.add("custom-control-label"),r.appendChild(document.createTextNode(t)),r}},{key:"getFormRadioControl",value:function(t,e,r){var n=document.createElement("div");return!1===this.options.custom_forms?n.classList.add("form-check"):n.classList.add("custom-control","custom-radio"),n.appendChild(e),n.appendChild(t),r&&(!1===this.options.custom_forms?n.classList.add("form-check-inline"):n.classList.add("custom-control-inline")),n}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","mb-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var r=document.createElement("h3");return r.classList.add("card-title"),r.classList.add("level-"+e),"string"==typeof t?r.textContent=t:r.appendChild(t),r.style.display="inline-block",r}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),"center"===t?e.classList.add("text-center"):"right"===t&&e.classList.add("text-right"),e}},{key:"getButton",value:function(t,e,r){var n=oo(so(a.prototype),"getButton",this).call(this,t,e,r);return n.classList.add("btn","btn-secondary","btn-sm"),n}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),r=void 0===t?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(r,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(r,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.classList.add("card"),r.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),r}},{key:"getTab",value:function(t,e){var r=document.createElement("li");r.classList.add("nav-item");var n=document.createElement("a");return n.classList.add("nav-link"),n.setAttribute("href","#".concat(e)),n.setAttribute("data-toggle","tab"),n.appendChild(t),r.appendChild(n),r}},{key:"getTopTab",value:function(t,e){var r=document.createElement("li");r.classList.add("nav-item");var n=document.createElement("a");return n.classList.add("nav-link"),n.setAttribute("href","#".concat(e)),n.setAttribute("data-toggle","tab"),n.appendChild(t),r.appendChild(n),r}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var r=t.firstChild,n="".concat(e,"%");r.setAttribute("aria-valuenow",e),r.style.width=n,r.innerHTML=n}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var r=document.createElement("div");r.classList.add("input-group"),r.appendChild(t);var n=document.createElement("div");n.classList.add("input-group-append"),r.appendChild(n);for(var i=0;i<e.length;i++)e[i].classList.remove("mr-2","btn-secondary"),e[i].classList.add("btn-outline-secondary"),n.appendChild(e[i]);return r}}}])&&io(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);function uo(t){return uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uo(t)}function ho(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==uo(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===uo(i)?i:String(i)),n)}var i}function po(){return po="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yo(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},po.apply(this,arguments)}function fo(t,e){return fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fo(t,e)}function yo(t){return yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yo(t)}co.rules={".jsoneditor-twbs4-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default   .select2-selection--single   .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default   .select2-selection--single   .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var mo={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},vo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fo(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=yo(n);if(i){var r=yo(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,mo)}return e=a,(r=[{key:"getSelectInput",value:function(t,e){var r=po(yo(a.prototype),"getSelectInput",this).call(this,t);return r.classList.add("form-control"),r.classList.add("form-select"),"small"===this.options.input_size&&r.classList.add("form-control-sm"),"large"===this.options.input_size&&r.classList.add("form-control-lg"),r}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,r){t.classList.add("col-md-".concat(e)),r&&t.classList.add("offset-md-".concat(r))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var r=t.parentNode.parentNode.getElementsByTagName("label")[0];r&&(r.classList.add("form-label"),r.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),"small"===this.options.input_size&&t.classList.add("form-control-sm"),"large"===this.options.input_size&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,r){var n=po(yo(a.prototype),"getRangeInput",this).call(this,t,e,r);return n.classList.remove("form-control"),n.classList.add("form-range"),n}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),r=document.createElement("button");r.setAttribute("type","button");var n=document.createElement("button");n.setAttribute("type","button"),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.classList.add("input-group"),r.classList.add("btn"),r.classList.add("btn-secondary"),r.classList.add("stepper-down"),n.classList.add("btn"),n.classList.add("btn-secondary"),n.classList.add("stepper-up"),t.getAttribute("readonly")&&(r.setAttribute("disabled",!0),n.setAttribute("disabled",!0)),r.textContent="-",n.textContent="+";var i=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},o=t.getAttribute("min"),a=t.getAttribute("max");return t.addEventListener("change",(function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")})),r.addEventListener("click",(function(){t.getAttribute("initialized")?o?Number(t.value)>Number(o)&&t.stepDown():t.stepDown():i(t,o),l(t,"change")})),n.addEventListener("click",(function(){t.getAttribute("initialized")?a?Number(t.value)<Number(a)&&t.stepUp():t.stepUp():i(t,o),l(t,"change")})),e}},{key:"getFormInputField",value:function(t){var e=po(yo(a.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&(e.classList.add("form-control"),"small"===this.options.input_size&&e.classList.add("form-control-sm"),"large"===this.options.input_size&&e.classList.add("form-control-lg")),e}},{key:"getFormControl",value:function(t,e,r,n){var i=document.createElement("div");if(i.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type)t&&(t.classList.add("form-label"),i.appendChild(t),n&&i.appendChild(n)),i.appendChild(e);else{var o=document.createElement("div");o.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var a=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",a),t.setAttribute("for",a),o.appendChild(e),o.appendChild(t),n&&o.appendChild(n),i.appendChild(o)}return r&&i.appendChild(r),i}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var r=document.createTextNode("ⓘ");return e.appendChild(r),"bootstrap"===this.options.tooltip?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):"css"===this.options.tooltip&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,r,n){var i=document.createElement("div");i.classList.add("form-group"),e&&(i.appendChild(e),n&&e.appendChild(n));var o=document.createElement("div");return Object.values(t).forEach((function(t){var e=t.firstChild;o.appendChild(e)})),i.appendChild(o),r&&i.appendChild(r),i}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var r in t)e.setAttribute(r,t[r]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var r=document.createElement("label");return r.classList.add("form-check-label"),r.appendChild(document.createTextNode(t)),r}},{key:"getFormRadioControl",value:function(t,e,r){var n=document.createElement("div");return n.classList.add("form-check"),n.appendChild(e),n.appendChild(t),r&&n.classList.add("form-check-inline"),n}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","my-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),e.classList.add("d-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var r=document.createElement("h3");return r.classList.add("card-title"),r.classList.add("level-"+e),"string"==typeof t?r.textContent=t:r.appendChild(t),r.style.display="inline-block",r}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),"center"===t?e.classList.add("text-center"):"right"===t&&e.classList.add("text-end"),e}},{key:"getButton",value:function(t,e,r){var n=po(yo(a.prototype),"getButton",this).call(this,t,e,r);return n.classList.add("btn","btn-secondary","btn-sm"),n}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),r=void 0===t?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(r,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(r,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.classList.add("card"),r.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),r}},{key:"getTab",value:function(t,e){var r=document.createElement("li");r.classList.add("nav-item");var n=document.createElement("a");return n.classList.add("nav-link"),n.setAttribute("href","#".concat(e)),n.setAttribute("data-toggle","tab"),n.appendChild(t),r.appendChild(n),r}},{key:"getTopTab",value:function(t,e){var r=document.createElement("li");r.classList.add("nav-item");var n=document.createElement("a");return n.classList.add("nav-link"),n.setAttribute("href","#".concat(e)),n.setAttribute("data-toggle","tab"),n.appendChild(t),r.appendChild(n),r}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var r=t.firstChild,n="".concat(e,"%");r.setAttribute("aria-valuenow",e),r.style.width=n,r.innerHTML=n}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var r=document.createElement("div");r.classList.add("input-group"),r.appendChild(t);for(var n=0;n<e.length;n++)e[n].classList.remove("me-2","btn-secondary"),e[n].classList.add("btn-outline-secondary"),r.appendChild(e[n]);return r}}}])&&ho(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);function bo(t){return bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(t)}function go(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==bo(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===bo(i)?i:String(i)),n)}var i}function wo(){return wo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ko(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},wo.apply(this,arguments)}function _o(t,e){return _o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_o(t,e)}function ko(t){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(t)}vo.rules={".form-group":"margin-bottom:1rem",".form-text":"display:block",".jsoneditor-twbs5-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default   .select2-selection--single   .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default   .select2-selection--single   .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var jo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_o(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ko(n);if(i){var r=ko(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===bo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"getTable",value:function(){var t=wo(ko(a.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=wo(ko(a.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=wo(ko(a.prototype),"getTableCell",this).call(this);return t.classList.add("ui-widget-content"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}},{key:"getFormInputDescription",value:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}},{key:"getFormControl",value:function(t,e,r,n){var i=wo(ko(a.prototype),"getFormControl",this).call(this,t,e,r,n);return"checkbox"===e.type?(i.style.lineHeight="25px",i.style.padding="3px 0"):i.style.padding="4px 0 8px 0",i}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var r=document.createElement("label");return r.style.fontWeight="bold",r.style.display="block",r.textContent=t,e&&r.classList.add("required"),r}},{key:"getButton",value:function(t,e,r){var n=document.createElement("button");n.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(n.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),n.appendChild(e)):e?(n.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),n.appendChild(e)):n.classList.add("ui-button-text-only");var i=document.createElement("span");return i.classList.add("ui-button-text"),i.textContent=t||r||".",n.appendChild(i),n.setAttribute("title",r),n}},{key:"setButtonText",value:function(t,e,r,n){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),r&&!e?(t.classList.add("ui-button-icon-only"),r.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(r)):r?(t.classList.add("ui-button-text-icon-primary"),r.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(r)):t.classList.add("ui-button-text-only");var i=document.createElement("span");i.classList.add("ui-button-text"),i.textContent=e||n||".",t.appendChild(i),t.setAttribute("title",n)}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("ui-widget-content","ui-corner-all"),t.style.padding="1em 1.4em",t.style.marginBottom="20px",t}},{key:"afterInputReady",value:function(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"addInputError",value:function(t,e){t.controls?(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.classList.add("ui-state-error"),t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}},{key:"markTabActive",value:function(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}}])&&go(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);function Oo(t){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(t)}function xo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Oo(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Oo(i)?i:String(i)),n)}var i}function Co(t,e){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Co(t,e)}function Eo(t){return Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(t)}jo.rules={'div[data-schemaid="root"]:after':'position:relative;color:red;margin:10px 0;font-weight:600;display:block;width:100%;text-align:center;content:"This is an old JSON-Editor 1.x Theme and might not display elements correctly when used with the 2.x version"'};var Po=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Co(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Eo(n);if(i){var r=Eo(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return e=a,(r=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var r=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),r.nodeName&&r.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&xo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);function So(t){return So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(t)}function To(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==So(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==So(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===So(i)?i:String(i)),n)}var i}function Lo(){return Lo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ao(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Lo.apply(this,arguments)}function Ro(t,e){return Ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ro(t,e)}function Ao(t){return Ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ao(t)}Po.rules={".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Io={disable_theme_rules:!1,label_bold:!0,align_bottom:!1,object_indent:!1,object_border:!1,table_border:!1,table_zebrastyle:!1,input_size:"normal"},Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ro(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ao(n);if(i){var r=Ao(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===So(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,Io)}return e=a,(r=[{key:"setGridColumnSize",value:function(t,e,r){t.classList.add("col-".concat(e)),r&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=Lo(Ao(a.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=Lo(Ao(a.prototype),"getFormButtonHolder",this).call(this);return e.classList.remove("btn-group"),e.classList.add("d-block"),"center"===t?e.classList.add("text-center"):"right"===t?e.classList.add("text-right"):e.classList.add("text-left"),e}},{key:"getFormButton",value:function(t,e,r){var n=Lo(Ao(a.prototype),"getFormButton",this).call(this,t,e,r);return n.classList.add("btn","btn-primary","mx-2","my-1"),"small"!==this.options.input_size&&n.classList.remove("btn-sm"),"large"===this.options.input_size&&n.classList.add("btn-lg"),n}},{key:"getButton",value:function(t,e,r){var n=Lo(Ao(a.prototype),"getButton",this).call(this,t,e,r);return n.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),n}},{key:"getHeader",value:function(t,e){var r=document.createElement("h4");return"string"==typeof t?r.textContent=t:r.appendChild(t),r.style.display="inline-block",r}},{key:"getFormInputDescription",value:function(t){var e=Lo(Ao(a.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-desc","hide-sm"),e}},{key:"getFormInputLabel",value:function(t,e){var r=Lo(Ao(a.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold&&r.classList.add("je-label"),r}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(t,e){var r=Lo(Ao(a.prototype),"getCheckboxLabel",this).call(this,t,e),n=document.createElement("i");return n.classList.add("form-icon"),r.classList.add("form-checkbox","pr-0"),r.insertBefore(n,r.firstChild),r}},{key:"getFormCheckboxControl",value:function(t,e,r){return t.insertBefore(e,t.firstChild),r&&t.classList.add("form-inline"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,r,n){return Lo(Ao(a.prototype),"getMultiCheckboxHolder",this).call(this,t,e,r,n)}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var r in t)e.setAttribute(r,t[r]);return e}},{key:"getFormRadioLabel",value:function(t,e){var r=Lo(Ao(a.prototype),"getFormRadioLabel",this).call(this,t,e),n=document.createElement("i");return n.classList.add("form-icon"),r.classList.add("form-radio"),r.insertBefore(n,r.firstChild),r}},{key:"getFormRadioControl",value:function(t,e,r){return t.insertBefore(e,t.firstChild),r&&t.classList.add("form-inline"),t}},{key:"getFormInputField",value:function(t){var e=Lo(Ao(a.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("form-input"),e}},{key:"getRangeInput",value:function(t,e,r){var n=this.getFormInputField("range");return n.classList.add("slider"),n.classList.remove("form-input"),n.setAttribute("oninput",'this.setAttribute("value", this.value)'),n.setAttribute("min",t),n.setAttribute("max",e),n.setAttribute("step",r),n}},{key:"getRangeControl",value:function(t,e){var r=Lo(Ao(a.prototype),"getRangeControl",this).call(this,t,e);return r.classList.add("text-center"),r}},{key:"getSelectInput",value:function(t,e){var r=Lo(Ao(a.prototype),"getSelectInput",this).call(this,t);return r.classList.add("form-select"),r}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-input"),t}},{key:"getFormControl",value:function(t,e,r,n){var i=document.createElement("div");return i.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type?(t&&(t.classList.add("form-label"),i.appendChild(t),n&&t.appendChild(n)),i.appendChild(e)):(i.classList.add(e.type),n&&t.appendChild(n),t.insertBefore(e,t.firstChild),i.appendChild(t)),"small"===this.options.input_size?e.classList.add("input-sm","select-sm"):"large"===this.options.input_size&&e.classList.add("input-lg","select-lg"),"checkbox"!==e.type&&i.appendChild(e),r&&i.appendChild(r),i}},{key:"getInputGroup",value:function(t,e){if(t){var r=document.createElement("div");r.classList.add("input-group"),r.appendChild(t);for(var n=0;n<e.length;n++)e[n].classList.add("input-group-btn"),e[n].classList.remove("btn-sm","mr-2","my-1"),r.appendChild(e[n]);return r}}},{key:"getInfoButton",value:function(t){var e=document.createElement("div");e.classList.add("popover","popover-left","float-right");var r=document.createElement("button");r.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),r.setAttribute("tabindex","-1"),e.appendChild(r);var n=document.createTextNode("I");r.appendChild(n);var i=document.createElement("div");i.classList.add("popover-container"),e.appendChild(i);var o=document.createElement("div");o.classList.add("card"),i.appendChild(o);var a=document.createElement("div");return a.classList.add("card-body"),a.innerHTML=t,o.appendChild(a),e}},{key:"getTable",value:function(){var t=Lo(Ao(a.prototype),"getTable",this).call(this);return t.classList.add("table","table-scroll"),this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getProgressBar",value:function(){var t=Lo(Ao(a.prototype),"getProgressBar",this).call(this);return t.classList.add("progress"),t}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.classList.add("columns"),r.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(e,'"></div>'),r}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(e,'"></div>'),r}},{key:"getTab",value:function(t,e){var r=document.createElement("a");return r.classList.add("btn","btn-secondary","btn-block"),r.setAttribute("href","#".concat(e)),r.appendChild(t),r}},{key:"getTopTab",value:function(t,e){var r=document.createElement("li");r.id=e,r.classList.add("tab-item");var n=document.createElement("a");return n.setAttribute("href","#".concat(e)),n.appendChild(t),r.appendChild(n),r}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if("select"===t.localName)if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach((function(t){t.classList.remove("form-select")})))}else if(t.classList.contains("select2-hidden-accessible")){var r=t.nextSibling;r&&r.querySelector(".select2-selection--single")&&r.classList.add("form-select")}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("form-input-hint"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.classList.remove("d-hide"),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&To(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Do(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==No(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==No(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===No(i)?i:String(i)),n)}var i}function Fo(){return Fo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zo(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Fo.apply(this,arguments)}function Vo(t,e){return Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vo(t,e)}function zo(t){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zo(t)}Bo.rules={"*":"--primary-color:%235755d9;--gray-color:%23bcc3ce;--light-color:%23fff",".slider:focus":"box-shadow:none","h4 > label + .btn-group":"margin-left:1rem",".text-right > button":"margin-right:0%20!important",".text-left > button":"margin-left:0%20!important",".property-selector":"font-size:0.7rem;font-weight:normal;max-height:260px%20!important;width:395px%20!important",".property-selector .form-checkbox":"margin:0",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"border-collapse:collapse",".table td":"padding:0.4rem%200.4rem",".mr-5":"margin-right:1rem%20!important","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23eee",".je-table-border td":"border:0.05rem%20solid%20%23dadee4%20!important",".btn-info":"font-size:0.5rem;font-weight:bold;height:0.8rem;padding:0.15rem%200;line-height:0.8;margin:0.3rem%200%200.3rem%200.1rem",".je-label + select":"min-width:5rem",".je-label":"font-weight:600",".btn-action.btn-info":"width:0.8rem",".je-border":"border:0.05rem%20solid%20%23dadee4",".je-panel":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit",".je-align-bottom":"margin-top:auto",".je-desc":"font-size:smaller;margin:0.2rem%200",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem;border:3px%20solid%20white;box-shadow:0px%200px%208px%20rgba(0%2C%200%2C%200%2C%200.3);box-sizing:border-box",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red",".columns .container.je-noindent":"padding-left:0;padding-right:0",".selectize-control.multi .item":"background:var(--primary-color)%20!important",".select2-container--default   .select2-selection--single   .select2-selection__arrow":"display:none",".select2-container--default .select2-selection--single":"border:none",".select2-container .select2-selection--single .select2-selection__rendered":"padding:0",".select2-container .select2-search--inline .select2-search__field":"margin-top:0",".select2-container--default.select2-container--focus   .select2-selection--multiple":"border:0.05rem%20solid%20var(--gray-color)",".select2-container--default   .select2-selection--multiple   .select2-selection__choice":"margin:0.4rem%200.2rem%200.2rem%200;padding:2px%205px;background-color:var(--primary-color);color:var(--light-color)",".select2-container--default .select2-search--inline .select2-search__field":"line-height:normal",".choices":"margin-bottom:auto",".choices__list--multiple .choices__item":"border:none;background-color:var(--primary-color);color:var(--light-color)",".choices[data-type*='select-multiple'] .choices__button":"border-left:0.05rem%20solid%20%232826a6",".choices__inner":"font-size:inherit;min-height:20px;padding:4px%207.5px%204px%203.75px",".choices[data-type*='select-one'] .choices__inner":"padding-bottom:4px",".choices__list--dropdown .choices__item":"font-size:inherit"};var Ho={disable_theme_rules:!1,label_bold:!1,object_panel_default:!0,object_indent:!0,object_border:!1,table_border:!1,table_hdiv:!1,table_zebrastyle:!1,input_size:"small",enable_compact:!1},Mo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vo(t,e)}(a,t);var e,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=zo(n);if(i){var r=zo(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===No(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,Ho)}return e=a,(r=[{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,r){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),r&&(t.style.marginLeft="".concat(100/12*r,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,e){var r=Fo(zo(a.prototype),"getSelectInput",this).call(this,t);return e?r.classList.add("form-multiselect","block","py-0","h-auto","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"):r.classList.add("form-select","block","py-0","h-6","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&r.classList.add("compact"),r}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=Fo(zo(a.prototype),"getTextareaInput",this).call(this);return t.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t.style.height=0,t}},{key:"getRangeInput",value:function(t,e,r){var n=this.getFormInputField("range");return n.classList.add("slider"),this.options.enable_compact&&n.classList.add("compact"),n.setAttribute("oninput",'this.setAttribute("value", this.value)'),n.setAttribute("min",t),n.setAttribute("max",e),n.setAttribute("step",r),n}},{key:"getRangeControl",value:function(t,e){var r=Fo(zo(a.prototype),"getRangeControl",this).call(this,t,e);return r.classList.add("text-center","text-black"),r}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,e){var r=Fo(zo(a.prototype),"getCheckboxLabel",this).call(this,t,e);return r.classList.add("inline-flex","items-center"),r}},{key:"getFormCheckboxControl",value:function(t,e,r){return t.insertBefore(e,t.firstChild),r&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,r,n){var i=Fo(zo(a.prototype),"getMultiCheckboxHolder",this).call(this,t,e,r,n);return i.classList.add("inline-flex","flex-col"),i}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var r in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(r,t[r]);return e}},{key:"getFormRadioLabel",value:function(t,e){var r=Fo(zo(a.prototype),"getFormRadioLabel",this).call(this,t,e);return r.classList.add("inline-flex","items-center","mr-2"),r}},{key:"getFormRadioControl",value:function(t,e,r){return t.insertBefore(e,t.firstChild),r&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,e,r,n,i){var o=Fo(zo(a.prototype),"getRadioHolder",this).call(this,e,r,n,i);return"h"===t.options.layout?o.classList.add("inline-flex","flex-row"):o.classList.add("inline-flex","flex-col"),o}},{key:"getFormInputLabel",value:function(t,e){var r=Fo(zo(a.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold?r.classList.add("font-bold"):r.classList.add("required"),r}},{key:"getFormInputField",value:function(t){var e=Fo(zo(a.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("block","mt-1","text-xs"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getFormControl",value:function(t,e,r,n){var i=document.createElement("div");return i.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),"checkbox"===e.type&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,n)),"radio"===e.type&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,n)),i.appendChild(t),!["checkbox","radio"].includes(e.type)&&n&&i.appendChild(n)),["checkbox","radio"].includes(e.type)||("small"===this.options.input_size?e.classList.add("text-xs"):"normal"===this.options.input_size?e.classList.add("text-base"):"large"===this.options.input_size&&e.classList.add("text-xl"),i.appendChild(e)),r&&i.appendChild(r),i}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,e,r){var n=Fo(zo(a.prototype),"getButton",this).call(this,t,e,r);return n.classList.add("inline-block","align-middle","text-center","text-sm","bg-blue-700","text-white","py-1","pr-1","m-2","shadow","select-none","whitespace-no-wrap","rounded"),n}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var r=document.createElement("span");return r.innerHTML=t,e.appendChild(r),e}},{key:"getTable",value:function(){var t=Fo(zo(a.prototype),"getTable",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}},{key:"getTableRow",value:function(){var t=Fo(zo(a.prototype),"getTableRow",this).call(this);return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}},{key:"getTableHeaderCell",value:function(t){var e=Fo(zo(a.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("text-xs","border","p-0","m-0"),e}},{key:"getTableCell",value:function(){var t=Fo(zo(a.prototype),"getTableCell",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("border-0","p-0","m-0"),t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.controlgroup.classList.add("text-red-600"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("block","mt-1","text-xs","text-red"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),r=void 0===t?"":t;return e.innerHTML="<div class='w-2/12' id='".concat(r,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(r,"'></div>"),e.classList.add("flex"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,r=document.createElement("div");return r.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(e,"'></ul><div class='p-6 block' id='").concat(e,"'></div>"),r}},{key:"getTab",value:function(t,e){var r=document.createElement("li");r.classList.add("nav-item","flex-col","text-center","text-white","bg-blue-500","shadow-md","border","p-2","mb-2","mr-2","hover:bg-blue-400","rounded");var n=document.createElement("a");return n.classList.add("nav-link","text-center"),n.setAttribute("href","#".concat(e)),n.setAttribute("data-toggle","tab"),n.appendChild(t),r.appendChild(n),r}},{key:"getTopTab",value:function(t,e){var r=document.createElement("li");r.classList.add("nav-item","flex","border-l","border-t","border-r");var n=document.createElement("a");return n.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),n.setAttribute("href","#".concat(e)),n.setAttribute("data-toggle","tab"),n.appendChild(t),r.appendChild(n),r}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("block"),!0===t.tab.firstChild.classList.contains("border-b")?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),!0===t.container.classList.contains("hidden")?(t.container.classList.remove("hidden"),t.container.classList.add("block")):t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){!0===t.tab.firstChild.classList.contains("border-b-0")?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),!0===t.container.classList.contains("block")&&(t.container.classList.remove("block"),t.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var r=t.firstChild,n="".concat(e,"%");r.setAttribute("aria-valuenow",e),r.style.width=n,r.innerHTML=n}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),e.removeAttribute("aria-valuenow"),e.classList.add("w-full"),e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var r=document.createElement("div");r.classList.add("relative","items-stretch","w-full"),r.appendChild(t);var n=document.createElement("div");n.classList.add("-mr-1"),r.appendChild(n);for(var i=0;i<e.length;i++)n.appendChild(e[i]);return r}}}])&&Do(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Gi);Mo.rules={".slider":"-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",".slider:focus":"box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",".slider.tooltip:not([data-tooltip])::after":"content:attr(value)",".slider::-webkit-slider-thumb":"-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",".slider:active::-webkit-slider-thumb":"transform:scale(1.25);outline:none",".slider::-webkit-slider-runnable-track":"background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25","a.tooltips":"position:relative;display:inline","a.tooltips span":"position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px","a.tooltips span:after":"content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent","a:hover.tooltips span":"visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",".json-editor-btntype-properties + div":"font-size:0.8rem;font-weight:normal",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"width:100%25;border-collapse:collapse",".table td":"padding:0rem%200rem","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23e6f4fe","div[data-schemaid='root']":"position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10","select[multiple]":"height:auto","select[multiple].from-select":"height:auto",".je-table-zebra:nth-child(even)":"background-color:%23f2f2f2",".je-table-border":"border:0.5px%20solid%20black",".je-table-hdiv":"border-bottom:1px%20solid%20black",".je-border":"border:0.05rem%20solid%20%233182ce",".je-panel":"width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit;font-weight:bold",".je-desc":"font-size:smaller;margin:0.2rem%200",".container-xl.je-noindent":"padding-left:0;padding-right:0",".json-editor-btntype-add":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deletelast":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deleteall":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-save":"float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-back":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-delete":"color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btntype-move":"color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btn-collapse":"padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var qo={html:Yi,bootstrap3:ro,bootstrap4:co,bootstrap5:vo,jqueryui:jo,barebones:Po,spectre:Bo,tailwind:Mo};const Go={".je-float-right-linkholder":"float:right;margin-left:10px",".je-modal":"background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",".je-infobutton-icon":"font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",".je-infobutton-tooltip":"font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",".je-not-loaded":"pointer-events:none",".je-header":"display:inline-block",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-checkbox":"display:inline-block;width:auto",".je-checkbox-control--compact":"display:inline-block;margin-right:1rem",".je-radio":"display:inline-block;width:auto",".je-radio-control--compact":"display:inline-block;margin-right:1rem",".je-switcher":"background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",".je-textarea":"width:100%25;height:300px;box-sizing:border-box",".je-range-control":"text-align:center",".je-indented-panel":"padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",".je-indented-panel--top":"padding-left:10px;margin-left:10px",".je-tabholder":"float:left;width:130px",".je-tabholder .content":"margin-left:120px",".je-tabholder--top":"margin-left:10px",".je-tabholder--clear":"clear:both",".je-tab":"border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",".je-tab--top":"float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",".je-block-link":"display:block",".je-media":"width:100%25"};function Uo(t){return Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uo(t)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Jo(){Jo=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new x(i||[]);return n(a,"_invoke",{value:_(t,r,s)}),a}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function p(){}function d(){}function f(){}var y={};l(y,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(C([])));v&&v!==e&&r.call(v,o)&&(y=v);var b=f.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function i(n,o,a,s){var l=u(t[n],t,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==Uo(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=k(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function k(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=u(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=f,n(b,"constructor",{value:f,configurable:!0}),n(f,"constructor",{value:d,configurable:!0}),d.displayName=l(f,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,l(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=C,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Wo(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}function Zo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Uo(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Uo(i)?i:String(i)),n)}var i}var Yo=function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e instanceof Element))throw new Error("element should be an instance of Element");this.element=e,this.options=s({},t.defaults.options,n),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||t.defaults.translate,this.translateProperty=this.options.translateProperty||t.defaults.translateProperty,this.uuid=0,this.__data={};var i=this.options.theme||t.defaults.theme,o=t.defaults.themes[i];if(!o)throw new Error("Unknown theme ".concat(i));this.element.setAttribute("data-theme",i),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new o(this);var a=s(Go,this.getEditorsRules()),l=function(t,e,n){return n?r.addNewStyleRulesToShadowRoot(t,e,n):r.addNewStyleRules(t,e)};if(!this.theme.options.disable_theme_rules){var u=c(this.element);l("default",a,u),void 0!==o.rules&&l(i,o.rules,u)}var h=t.defaults.iconlibs[this.options.iconlib||t.defaults.iconlib];h&&(this.iconlib=new h),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}var e,r,n,i;return e=t,r=[{key:"load",value:(n=Jo().mark((function e(){var r,n,i,o,a,s,l=this;return Jo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=document.location.origin+document.location.pathname.toString(),n=new Kn(this.options),this.expandSchema=function(t){return n.expandSchema(t)},this.expandRefs=function(t,e){return n.expandRefs(t,e)},i=document.location.toString(),e.next=7,n.load(this.schema,r,i);case 7:o=e.sent,a=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new tr(this,null,a,t.defaults),s=this.getEditorClass(o),this.root=this.createEditor(s,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),u(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame((function(){l.ready&&(l.validation_results=l.validator.validate(l.root.getValue()),l.root.showValidationErrors(l.validation_results),l.trigger("ready"),l.trigger("change"))}));case 22:case"end":return e.stop()}}),e,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){Wo(o,r,i,a,s,"next",t)}function s(t){Wo(o,r,i,a,s,"throw",t)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}},{key:"setValue",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(t),this}},{key:"validate",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return 1===arguments.length?this.validator.validate(t):this.validation_results}},{key:"destroy",value:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.element.removeAttribute("data-theme"),this.destroyed=!0)}},{key:"on",value:function(t,e){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(e),this}},{key:"off",value:function(t,e){if(t&&e){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var r=[],n=0;n<this.callbacks[t].length;n++)this.callbacks[t][n]!==e&&r.push(this.callbacks[t][n]);this.callbacks[t]=r}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}},{key:"trigger",value:function(t,e){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(var r=0;r<this.callbacks[t].length;r++)this.callbacks[t][r].apply(this,[e]);return this}},{key:"setOption",value:function(t,e){if("show_errors"!==t)throw new Error("Option ".concat(t," must be set during instantiation and cannot be changed later"));return this.options.show_errors=e,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(t.defaults.editors).reduce((function(t,e){return e.rules?s(t,e.rules):t}),{})}},{key:"getEditorClass",value:function(e){var r;if(e=this.expandSchema(e),t.defaults.resolvers.find((function(n){return(r=n(e))&&t.defaults.editors[r]})),!r)throw new Error("Unknown editor for schema ".concat(JSON.stringify(e)));if(!t.defaults.editors[r])throw new Error("Unknown editor ".concat(r));return t.defaults.editors[r]}},{key:"createEditor",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new e(r=s({},e.options||{},r),t.defaults,n)}},{key:"onChange",value:function(){var t=this;if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame((function(){t.firing_change=!1,t.ready&&(t.validation_results=t.validator.validate(t.root.getValue()),"never"!==t.options.show_errors?t.root.showValidationErrors(t.validation_results):t.root.showValidationErrors([]),t.trigger("change"))})),this}},{key:"compileTemplate",value:function(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaults.template;if("string"==typeof n){if(!t.defaults.templates[n])throw new Error("Unknown template engine ".concat(n));if(!(r=t.defaults.templates[n]()))throw new Error("Template engine ".concat(n," missing required library."))}else r=n;if(!r)throw new Error("No template engine set");if(!r.compile)throw new Error("Invalid template engine set");return r.compile(e)}},{key:"_data",value:function(t,e,r){if(3!==arguments.length)return t.hasAttribute("data-jsoneditor-".concat(e))?this.__data[t.getAttribute("data-jsoneditor-".concat(e))]:null;var n;t.hasAttribute("data-jsoneditor-".concat(e))?n=t.getAttribute("data-jsoneditor-".concat(e)):(n=this.uuid++,t.setAttribute("data-jsoneditor-".concat(e),n)),this.__data[n]=r}},{key:"registerEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=t,this}},{key:"unregisterEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=null,this}},{key:"getEditor",value:function(t){if(this.editors)return this.editors[t]}},{key:"watch",value:function(t,e){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(e),this}},{key:"unwatch",value:function(t,e){if(!this.watchlist||!this.watchlist[t])return this;if(!e)return this.watchlist[t]=null,this;for(var r=[],n=0;n<this.watchlist[t].length;n++)this.watchlist[t][n]!==e&&r.push(this.watchlist[t][n]);return this.watchlist[t]=r.length?r:null,this}},{key:"notifyWatchers",value:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var e=0;e<this.watchlist[t].length;e++)this.watchlist[t][e]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(t){this.copyClipboard=t}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(t,e){var r=document.querySelector("#theme-".concat(t));r||((r=document.createElement("style")).setAttribute("id","theme-".concat(t)),r.appendChild(document.createTextNode("")),document.head.appendChild(r));for(var n=r.sheet?r.sheet:r.styleSheet,i=this.element.nodeName.toLowerCase();n.cssRules.length>0;)n.deleteRule(0);Object.keys(e).forEach((function(r){var o="default"===t?r:"".concat(i,'[data-theme="').concat(t,'"] ').concat(r);n.insertRule?n.insertRule(o+" {"+decodeURIComponent(e[r])+"}",0):n.addRule&&n.addRule(o,decodeURIComponent(e[r]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,e,r){var n=this.element.nodeName.toLowerCase(),i="";Object.keys(e).forEach((function(r){var o="default"===t?r:"".concat(n,'[data-theme="').concat(t,'"] ').concat(r);i+=o+" {"+decodeURIComponent(e[r])+"}\n"}));var o,a=new CSSStyleSheet;a.replaceSync(i),r.adoptedStyleSheets=[].concat(function(t){if(Array.isArray(t))return $o(t)}(o=r.adoptedStyleSheets)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$o(t,e):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[a])}}],r&&Zo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();Yo.defaults=Gn,Yo.AbstractEditor=v,Yo.AbstractTheme=Gi,Yo.AbstractIconLib=ii,Object.assign(Yo.defaults.themes,qo),Object.assign(Yo.defaults.editors,Vn),Object.assign(Yo.defaults.templates,Xn),Object.assign(Yo.defaults.iconlibs,zi)})(),n})()));
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/angular/metawidget-angular.js b/src/main/webapp/js/3rdparty/metawidget/angular/metawidget-angular.js
deleted file mode 100755
index 0c705bf7ab0bb591940a20fe7278d04884fa9ee5..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/angular/metawidget-angular.js
+++ /dev/null
@@ -1,771 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * Angular directive to expose <tt>metawidget.angular.AngularMetawidget</tt>.
-	 */
-
-	var directive = [ '$compile', '$parse', function( $compile, $parse ) {
-
-		// Returns the Metawidget
-
-		return {
-
-			/**
-			 * Metawidget is (E)lement level.
-			 */
-
-			restrict: 'E',
-
-			/**
-			 * Metawidget isolated scope.
-			 */
-
-			scope: {
-				ngModel: '=',
-				readOnly: '=',
-				config: '=',
-				ngShow: '=',
-				ngHide: '=',
-
-				// Configs cannot be 2-way ('=') because cannot 'watch' arrays
-
-				configs: '&'
-			},
-
-			/**
-			 * Metawidget must transclude child wigets, so that bindings in the
-			 * child widgets can natually refer to names in our parent scope,
-			 * rather than having to reference 'ng-model'.
-			 */
-
-			transclude: true,
-
-			/**
-			 * Angular compile function. Captures transcluded widgets, then
-			 * returns a <tt>postLink</tt> function that configures an
-			 * Angular-specific Metawidget and invokes buildWidgets on it.
-			 */
-
-			compile: function( element, attrs, transclude ) {
-
-				// Return postLink function
-
-				return function( scope, element, attrs ) {
-
-					// Set up an AngularMetawidget
-
-					var mw = new metawidget.angular.AngularMetawidget( element, attrs, transclude, scope, $compile, $parse );
-
-					// Build
-
-					var _oldToInspect = undefined;
-					_buildWidgets();
-
-					// Observe
-
-					var _watchConfig = scope.$watch( 'config', function( newValue, oldValue ) {
-
-						// Watch for config changes. These are rare, but
-						// otherwise we'd need to provide a way to externally
-						// trigger _buildWidgets
-						//
-						// Note: to be proper, we should process config changes
-						// *before* data changes, in the event they both change
-						// at once
-
-						if ( newValue !== oldValue ) {
-							mw.configure( newValue );
-							_buildWidgets();
-						}
-					} );
-
-					var _watchModel = scope.$watch( 'ngModel', function( newValue ) {
-
-						// Cannot test against mw.toInspect, because is pointed
-						// at the splitPath.type
-						//
-						// Re-inspect for 'undefined becoming defined' and
-						// 'object being updated'. But *not* for 'undefined
-						// becoming primitive, and then primitive being
-						// updated'. Otherwise every keypress will recreate the
-						// widget
-
-						if ( newValue !== _oldToInspect && typeof ( newValue ) === 'object' ) {
-							mw.invalidateInspection();
-							_buildWidgets();
-						}
-					} );
-
-					var _watchReadOnly = scope.$watch( 'readOnly', function( newValue ) {
-
-						// Test against mw.readOnly, not oldValue, because it
-						// may have been reset already by _buildWidgets
-
-						if ( newValue !== mw.readOnly ) {
-							// Do not mw.invalidateInspection()
-							_buildWidgets();
-						}
-					} );
-
-					var _watchNgShow = scope.$watch( 'ngShow', function( newValue, oldValue ) {
-
-						if ( newValue !== oldValue ) {
-							// Do not mw.invalidateInspection()
-							_buildWidgets();
-						}
-					} );
-
-					var _watchNgHide = scope.$watch( 'ngHide', function( newValue, oldValue ) {
-
-						if ( newValue !== oldValue ) {
-							// Do not mw.invalidateInspection()
-							_buildWidgets();
-						}
-					} );
-
-					// Clean up watches when element is destroyed
-
-					element.on( '$destroy', function() {
-
-						_watchConfig();
-						_watchModel();
-						_watchReadOnly();
-						_watchNgShow();
-						_watchNgHide();
-					} );
-
-					//
-					// Private method
-					//
-
-					function _buildWidgets() {
-
-						if ( scope.$eval( 'ngShow' ) === false || scope.$eval( 'ngHide' ) === true ) {
-							return;
-						}
-
-						_oldToInspect = scope.$eval( 'ngModel' );
-
-						mw.path = attrs.ngModel;
-						mw.toInspect = scope.$parent.$eval( metawidget.util.splitPath( mw.path ).type );
-						mw.readOnly = scope.$eval( 'readOnly' );
-						mw.buildWidgets();
-
-						// Note: when running under unit tests, errors get here.
-						// However, testing for 'jasmine !== undefined' caused
-						// problems at runtime
-					}
-				};
-			}
-		};
-	} ];
-
-	/**
-	 * AngularJS Metawidget module.
-	 */
-
-	var module = angular.module( 'metawidget', [] );
-	module.directive( 'metawidget', directive );
-
-	/**
-	 * Duplicate 'metawidget' directive, but with a namespace 'mw'. This allows
-	 * clients wishing to support IE8 to use &lt;mw:metawidget&gt; as the tag
-	 * name, as described at http://docs.angularjs.org/guide/ie
-	 */
-
-	module.directive( 'mwMetawidget', directive );
-
-	/**
-	 * @namespace Metawidget for AngularJS environments.
-	 */
-
-	metawidget.angular = metawidget.angular || {};
-
-	metawidget.angular.AngularMetawidget = function( element, attrs, transclude, scope, $compile, $parse ) {
-
-		if ( ! ( this instanceof metawidget.angular.AngularMetawidget ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-
-		// Pipeline (private)
-
-		var _pipeline = new metawidget.Pipeline( element[0] );
-		_pipeline._superLayoutWidget = _pipeline.layoutWidget;
-
-		_pipeline.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-			_pipeline._superLayoutWidget.call( this, widget, elementName, attributes, container, mw );
-
-			// Compile so that 'ng-model', 'ng-required' etc become active. Do
-			// this as late as possible, in case directives want to use
-			// 'element.controller( 'form' )'
-			//
-			// Note: we ignore transcluded widgets. Compiling them again using
-			// $compile seemed to trigger 'ng-click' listeners twice?
-
-			if ( widget.overridden === undefined ) {
-				$compile( widget )( scope.$parent );
-			}
-		};
-
-		var _lastInspectionResult = undefined;
-
-		this.invalidateInspection = function() {
-
-			_lastInspectionResult = undefined;
-		};
-
-		// Configure defaults
-
-		_pipeline.inspector = new metawidget.inspector.PropertyTypeInspector();
-		_pipeline.inspectionResultProcessors = [ new metawidget.angular.inspectionresultprocessor.AngularInspectionResultProcessor( scope.$parent ) ];
-		_pipeline.widgetBuilder = new metawidget.widgetbuilder.CompositeWidgetBuilder( [ new metawidget.widgetbuilder.OverriddenWidgetBuilder(), new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),
-				new metawidget.widgetbuilder.HtmlWidgetBuilder() ] );
-		_pipeline.widgetProcessors = [ new metawidget.widgetprocessor.IdProcessor(), new metawidget.widgetprocessor.PlaceholderAttributeProcessor(),
-				new metawidget.widgetprocessor.DisabledAttributeProcessor(), new metawidget.angular.widgetprocessor.AngularWidgetProcessor( $parse, scope.$parent ) ];
-		_pipeline.layout = new metawidget.layout.HeadingTagLayoutDecorator( new metawidget.layout.TableLayout() );
-
-		this.configure = function( config ) {
-
-			_pipeline.configure( config );
-			this.invalidateInspection();
-		};
-
-		this.configure( scope.$eval( 'config' ) );
-		this.configure( scope.configs() );
-
-		// toInspect, path and readOnly set by _buildWidgets()
-
-		/**
-		 * Useful for WidgetBuilders to perform nested inspections (eg. for
-		 * Collections).
-		 */
-
-		this.inspect = function( toInspect, type, names ) {
-
-			return _pipeline.inspect( toInspect, type, names, this );
-		};
-
-		/**
-		 * Overridden to use jqLite.empty (safer for memory leaks).
-		 */
-
-		this.clearWidgets = function() {
-
-			var jqElement = angular.element( this.getElement() );
-
-			if ( jqElement.empty !== undefined ) {
-				jqElement.empty();
-			} else {
-
-				// Support older versions of Angular
-
-				jqElement.html( '' );
-			}
-		};
-
-		this.buildWidgets = function( inspectionResult ) {
-
-			// Rebuild the transcluded tree at the start of each build.
-			//
-			// Rebuilding only at the start of the <em>initial</em>
-			// build was sufficient for {{...}} expressions, but not
-			// 'ng-click' triggers.
-
-			var cloned = transclude( scope.$parent, function( clone ) {
-
-				return clone;
-			} );
-
-			this.overriddenNodes = [];
-
-			for ( var loop = 0; loop < cloned.length; loop++ ) {
-				var cloneNode = cloned[loop];
-
-				// Must check nodeType *and* other attributes,
-				// because Angular wraps everything (even text
-				// nodes) with a 'span class='ng-scope'' tag
-				//
-				// https://github.com/angular/angular.js/issues/1059
-
-				if ( cloneNode.nodeType === 1 && ( cloneNode.tagName !== 'SPAN' || cloneNode.attributes.length > 1 ) ) {
-					this.overriddenNodes.push( cloneNode );
-				}
-			}
-
-			// Inspect (if necessary)
-
-			if ( inspectionResult !== undefined ) {
-				_lastInspectionResult = inspectionResult;
-			} else if ( _lastInspectionResult === undefined ) {
-
-				// Safeguard against improperly implementing:
-				// http://blog.kennardconsulting.com/2013/02/metawidget-and-rest.html
-
-				if ( arguments.length > 0 ) {
-					throw new Error( "Calling buildWidgets( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead" );
-				}
-
-				var splitPath = metawidget.util.splitPath( this.path );
-				_lastInspectionResult = _pipeline.inspect( this.toInspect, splitPath.type, splitPath.names, this );
-			}
-
-			// Cleanup children using Angular, so that $destroy gets triggered
-			// for nested Metawidgets
-
-			element.children().remove();
-
-			// Build widgets
-
-			_pipeline.buildWidgets( _lastInspectionResult, this );
-		};
-
-		/**
-		 * Overridden to inspect unused nodes by evaluating their 'ng-bind' or
-		 * 'ng-model' attribute.
-		 */
-
-		this.onEndBuild = function() {
-
-			while ( this.overriddenNodes.length > 0 ) {
-
-				var child = this.overriddenNodes[0];
-				this.overriddenNodes.splice( 0, 1 );
-
-				// Unused facets don't count
-
-				if ( child.tagName === 'FACET' ) {
-					continue;
-				}
-
-				var childAttributes = {};
-				var loop, length;
-
-				// Lookup binding attribute
-				//
-				// Note: be sure to normalize it
-				//
-				// Note: be sure to lowercase it too, because HTML attribute
-				// names are case-insensitive and Angular's template mechanism
-				// lowercases them
-
-				length = child.attributes.length;
-				for ( loop = 0; loop < length; loop++ ) {
-					var attribute = child.attributes[loop];
-					var normalizedName = attrs.$normalize( attribute.name ).toLowerCase();
-
-					if ( normalizedName === 'ngbind' || normalizedName === 'ngmodel' ) {
-						var splitPath = metawidget.util.splitPath( attribute.value );
-						var toInspect = scope.$parent.$eval( splitPath.type );
-						childAttributes = _pipeline.inspect( toInspect, splitPath.type, splitPath.names, this );
-						break;
-					}
-				}
-
-				// Manually created components default to no section
-
-				if ( childAttributes === undefined ) {
-					childAttributes = {
-						section: ''
-					};
-				}
-
-				// Stubs can supply their own metadata (such as 'title')
-
-				if ( child.tagName === 'STUB' ) {
-					length = child.attributes.length;
-					for ( loop = 0; loop < length; loop++ ) {
-						var prop = child.attributes[loop];
-						childAttributes[prop.nodeName] = prop.nodeValue;
-					}
-				}
-
-				_pipeline.layoutWidget( child, "property", childAttributes, _pipeline.element, this );
-			}
-		};
-
-		/**
-		 * Returns the element this Metawidget is attached to.
-		 */
-
-		this.getElement = function() {
-
-			return _pipeline.element;
-		};
-
-		this.buildNestedMetawidget = function( attributes, config ) {
-
-			var nestedMetawidget = metawidget.util.createElement( this, 'metawidget' );
-			nestedMetawidget.setAttribute( 'ng-model', metawidget.util.appendPath( attributes, this ) );
-
-			if ( metawidget.util.isTrueOrTrueString( attributes.readOnly ) ) {
-				nestedMetawidget.setAttribute( 'read-only', 'true' );
-			} else if ( attrs.readOnly !== undefined ) {
-				nestedMetawidget.setAttribute( 'read-only', attrs.readOnly );
-			}
-
-			// Duck-type our 'pipeline' as the 'config' of the nested
-			// Metawidget. This neatly passes everything down, including a
-			// decremented 'maximumInspectionDepth'
-			//
-			// Use a private counter to stop configIds conflicting. This is
-			// because scope.$parent is a very broad scope - it's hard to
-			// know what might be in it. We must use scope.$parent because we
-			// $compile relative to our $parent. And we do *that* so that our
-			// bindings look more 'natural' (eg. 'foo.bar' not 'toInspect.bar')
-
-			scope.$parent._nestedMetawidgetConfigId = scope.$parent._nestedMetawidgetConfigId || 0;
-			var configId = '_metawidgetConfig' + scope.$parent._nestedMetawidgetConfigId++;
-			scope.$parent[configId] = _pipeline;
-
-			if ( config !== undefined ) {
-				var configId2 = '_metawidgetConfig' + scope.$parent._nestedMetawidgetConfigId++;
-				scope.$parent[configId2] = config;
-				nestedMetawidget.setAttribute( 'configs', '[' + configId + ',' + configId2 + ']' );
-			} else {
-				nestedMetawidget.setAttribute( 'config', configId );
-			}
-
-			return nestedMetawidget;
-		};
-	};
-
-	/**
-	 * @namespace InspectionResultProcessors for AngularJS environments.
-	 */
-
-	metawidget.angular.inspectionresultprocessor = metawidget.angular.inspectionresultprocessor || {};
-
-	/**
-	 * @class InspectionResultProcessor to evaluate Angular expressions.
-	 * 
-	 * @param scope
-	 *            parent scope of the Metawidget directive
-	 * @param buildWidgets
-	 *            a function to use to rebuild the widgets following a $watch
-	 * @returns {metawidget.angular.AngularInspectionResultProcessor}
-	 */
-
-	metawidget.angular.inspectionresultprocessor.AngularInspectionResultProcessor = function( scope ) {
-
-		if ( ! ( this instanceof metawidget.angular.inspectionresultprocessor.AngularInspectionResultProcessor ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-
-		this.processInspectionResult = function( inspectionResult, mw ) {
-
-			/**
-			 * When a watched expression changes, reinspect and rebuild.
-			 */
-
-			function _watchExpression( newValue, oldValue ) {
-
-				if ( newValue !== oldValue ) {
-
-					// Clear all watches...
-
-					for ( var loop = 0, length = mw._angularInspectionResultProcessor.length; loop < length; loop++ ) {
-						mw._angularInspectionResultProcessor[loop]();
-					}
-
-					// ..and then reinspect
-
-					mw.invalidateInspection();
-					mw.buildWidgets();
-				}
-			}
-
-			mw._angularInspectionResultProcessor = mw._angularInspectionResultProcessor || [];
-
-			// For each property in the inspection result...
-
-			for ( var propertyName in inspectionResult ) {
-
-				// ...including recursing into 'properties'...
-
-				var expression = inspectionResult[propertyName];
-
-				if ( expression instanceof Object ) {
-					this.processInspectionResult( expression, mw );
-					continue;
-				}
-
-				// ...if the value looks like an expression...
-
-				if ( expression === undefined || expression === null || expression.slice === undefined ) {
-					continue;
-				}
-
-				if ( expression.length < 4 || expression.slice( 0, 2 ) !== '{{' || expression.slice( expression.length - 2, expression.length ) !== '}}' ) {
-					continue;
-				}
-
-				// ...evaluate it...
-
-				expression = expression.slice( 2, expression.length - 2 );
-				inspectionResult[propertyName] = scope.$eval( expression ) + '';
-
-				// ...and watch it for future changes
-
-				var watch = scope.$watch( expression, _watchExpression );
-
-				mw._angularInspectionResultProcessor.push( watch );
-			}
-
-			return inspectionResult;
-		};
-	};
-
-	/**
-	 * @namespace WidgetProcessors for AngularJS environments.
-	 */
-
-	metawidget.angular.widgetprocessor = metawidget.angular.widgetprocessor || {};
-
-	/**
-	 * @class WidgetProcessor to add Angular bindings and validation.
-	 * 
-	 * @param scope
-	 *            parent scope of the Metawidget directive
-	 * 
-	 * @returns {metawidget.angular.AngularWidgetProcessor}
-	 */
-
-	metawidget.angular.widgetprocessor.AngularWidgetProcessor = function( $parse, scope ) {
-
-		if ( ! ( this instanceof metawidget.angular.widgetprocessor.AngularWidgetProcessor ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-
-		this.processWidget = function( widget, elementName, attributes, mw ) {
-
-			// Binding
-			//
-			// Scope the binding to scope.$parent, not scope, so that the
-			// generated bindings look more 'natural' (eg. 'foo.bar' not
-			// 'toInspect.bar')
-
-			var binding = mw.path;
-
-			if ( elementName !== 'entity' ) {
-				binding = metawidget.util.appendPathWithName( binding, attributes );
-			}
-
-			if ( widget.tagName === 'OUTPUT' ) {
-
-				// Don't overwrite existing binding (if set by the
-				// WidgetBuilder)
-
-				if ( !widget.hasAttribute( 'ng-bind' ) ) {
-					if ( metawidget.util.isTrueOrTrueString( attributes.masked ) ) {
-
-						// Special support for masked output
-
-						scope.$parent.mwMaskedOutput = _maskedOutput;
-						widget.setAttribute( 'ng-bind', 'mwMaskedOutput(' + binding + ')' );
-					} else if ( attributes.type === 'array' ) {
-
-						// Special support for outputting arrays
-
-						widget.setAttribute( 'ng-bind', binding + ".join(', ')" );
-					} else if ( attributes.enumTitles !== undefined ) {
-
-						// Special support for enumTitles
-
-						scope.$parent.mwLookupEnumTitle = scope.$parent.mwLookupEnumTitle || {};
-						scope.$parent.mwLookupEnumTitle[binding] = function( value ) {
-
-							return metawidget.util.lookupEnumTitle( value, attributes['enum'], attributes.enumTitles );
-						};
-						widget.setAttribute( 'ng-bind', 'mwLookupEnumTitle["' + binding + '"](' + binding + ')' );
-
-					} else if ( attributes.type === 'date' ) {
-
-						// Special support for date formatting
-
-						widget.setAttribute( 'ng-bind', binding + "|date" );
-
-					} else {
-						widget.setAttribute( 'ng-bind', binding );
-					}
-				}
-
-			} else if ( widget.tagName === 'INPUT' && widget.getAttribute( 'type' ) === 'submit' ) {
-
-				// input type='submit' should not be bound: should go via
-				// ng-submit at the form level
-
-				widget.removeAttribute( 'ng-click' );
-
-			} else if ( widget.tagName === 'INPUT' && widget.getAttribute( 'type' ) === 'button' ) {
-
-				widget.setAttribute( 'ng-click', binding + '()' );
-
-			} else if ( attributes['enum'] !== undefined && ( attributes.type === 'array' || attributes.componentType !== undefined ) && widget.tagName === 'DIV' ) {
-
-				// Special support for multi-selects and radio buttons
-
-				for ( var loop = 0, length = widget.childNodes.length; loop < length; loop++ ) {
-					var label = widget.childNodes[loop];
-
-					if ( label.tagName === 'LABEL' && label.childNodes.length === 2 ) {
-						var child = label.childNodes[0];
-
-						if ( child.tagName === 'INPUT' ) {
-							if ( child.getAttribute( 'type' ) === 'radio' ) {
-								child.setAttribute( 'ng-model', binding );
-								if ( child.value === true || child.value === 'true' ) {
-									child.setAttribute( 'ng-value', 'true' );
-								} else if ( child.value === false || child.value === 'false' ) {
-									child.setAttribute( 'ng-value', 'false' );
-								}
-							} else if ( child.getAttribute( 'type' ) === 'checkbox' ) {
-								child.setAttribute( 'ng-checked', binding + ".indexOf('" + child.value + "')>=0" );
-								scope.mwUpdateSelection = _updateSelection;
-								child.setAttribute( 'ng-click', "mwUpdateSelection($event,'" + binding + "')" );
-							}
-						}
-					}
-				}
-
-			} else if ( widget.tagName === 'SELECT' ) {
-
-				widget.setAttribute( 'ng-model', binding );
-				
-				// Special support for non-string selects
-
-				if ( attributes.type === 'boolean' || attributes.type === 'integer' || attributes.type === 'number' ) {
-					widget.setAttribute( 'ng-change', "mwChangeAsType('" + attributes.type + "','" + binding + "')" );
-					scope.mwChangeAsType = _changeAsType;
-					
-					for ( var loop = 0, length = widget.childNodes.length; loop < length; loop++ ) {
-
-						var child = widget.childNodes[loop];
-
-						if ( child.tagName === 'OPTION' && child.value !== '' ) {
-							child.setAttribute( 'ng-selected', binding + "==" + child.value );
-						}
-					}
-				}
-
-			} else if ( widget.tagName === 'INPUT' || widget.tagName === 'TEXTAREA' ) {
-				widget.setAttribute( 'ng-model', binding );
-			}
-
-			// Validation
-
-			if ( !metawidget.util.isTrueOrTrueString( attributes.readOnly ) ) {
-
-				if ( attributes.required !== undefined ) {
-					widget.setAttribute( 'ng-required', attributes.required );
-				}
-
-				if ( attributes.minLength !== undefined ) {
-					widget.setAttribute( 'ng-minlength', attributes.minLength );
-				}
-
-				if ( attributes.maxLength !== undefined ) {
-					widget.setAttribute( 'ng-maxlength', attributes.maxLength );
-
-					// (retain maxlength set by HtmlWidgetBuilder)
-				}
-			}
-
-			return widget;
-		};
-
-		//
-		// Private methods
-		//
-
-		/**
-		 * Special support for multi-select checkboxes.
-		 */
-
-		function _updateSelection( $event, binding ) {
-
-			// Lookup the bound array (if any)...
-
-			var selected = scope.$eval( binding );
-
-			if ( selected === undefined ) {
-				selected = [];
-				$parse( binding ).assign( scope, selected );
-			}
-
-			// ...and either add our checkbox's value into it...
-
-			var checkbox = $event.target;
-			var indexOf = selected.indexOf( checkbox.value );
-
-			if ( checkbox.checked === true ) {
-				if ( indexOf === -1 ) {
-					selected.push( checkbox.value );
-				}
-				return;
-			}
-
-			// ...or remove our checkbox's value from it
-
-			if ( indexOf !== -1 ) {
-				selected.splice( indexOf, 1 );
-			}
-		}
-
-		/**
-		 * Special support for masked output.
-		 */
-
-		function _maskedOutput( value ) {
-
-			if ( value === undefined ) {
-				return;
-			}
-
-			return metawidget.util.fillString( '*', value.length );
-		}
-		
-		/**
-		 * Special support for non-string selects.
-		 */
-		
-		function _changeAsType( type, binding ) {
-			
-			var parsedBinding = $parse( binding ); 
-			
-			if ( type === 'boolean' ) {
-				parsedBinding.assign( scope, parsedBinding( scope ) === 'true' );
-				return;		
-			}
-			
-			if ( type === 'integer' ) {
-				parsedBinding.assign( scope, parseInt( parsedBinding( scope ) ));
-				return;		
-			}
-
-			if ( type === 'number' ) {
-				parsedBinding.assign( scope, parseFloat( parsedBinding( scope ) ));
-				return;		
-			}
-		}
-	};
-} )();
diff --git a/src/main/webapp/js/3rdparty/metawidget/angular/metawidget-angular.min.js b/src/main/webapp/js/3rdparty/metawidget/angular/metawidget-angular.min.js
deleted file mode 100755
index 25b365f59b0c5111e692d45d8e16c5f6d2c5052e..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/angular/metawidget-angular.min.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Metawidget 4.2 minified
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-//
-// Author: Richard Kennard (http://kennardconsulting.com)
-
-var metawidget=metawidget||{};(function(){var b=["$compile","$parse",function(c,d){return{restrict:"E",scope:{ngModel:"=",readOnly:"=",config:"=",ngShow:"=",ngHide:"=",configs:"&"},transclude:true,compile:function(g,f,e){return function(r,k,p){var q=new metawidget.angular.AngularMetawidget(k,p,e,r,c,d);var j=undefined;m();var o=r.$watch("config",function(t,s){if(t!==s){q.configure(t);m()}});var h=r.$watch("ngModel",function(s){if(s!==j&&typeof(s)==="object"){q.invalidateInspection();m()}});var i=r.$watch("readOnly",function(s){if(s!==q.readOnly){m()}});var n=r.$watch("ngShow",function(t,s){if(t!==s){m()}});var l=r.$watch("ngHide",function(t,s){if(t!==s){m()}});k.on("$destroy",function(){o();h();i();n();l()});function m(){if(r.$eval("ngShow")===false||r.$eval("ngHide")===true){return}j=r.$eval("ngModel");q.path=p.ngModel;q.toInspect=r.$parent.$eval(metawidget.util.splitPath(q.path).type);q.readOnly=r.$eval("readOnly");q.buildWidgets()}}}}}];var a=angular.module("metawidget",[]);a.directive("metawidget",b);a.directive("mwMetawidget",b);metawidget.angular=metawidget.angular||{};metawidget.angular.AngularMetawidget=function(g,d,c,h,f,i){if(!(this instanceof metawidget.angular.AngularMetawidget)){throw new Error("Constructor called as a function")}var e=new metawidget.Pipeline(g[0]);e._superLayoutWidget=e.layoutWidget;e.layoutWidget=function(n,k,m,l,o){e._superLayoutWidget.call(this,n,k,m,l,o);if(n.overridden===undefined){f(n)(h.$parent)}};var j=undefined;this.invalidateInspection=function(){j=undefined};e.inspector=new metawidget.inspector.PropertyTypeInspector();e.inspectionResultProcessors=[new metawidget.angular.inspectionresultprocessor.AngularInspectionResultProcessor(h.$parent)];e.widgetBuilder=new metawidget.widgetbuilder.CompositeWidgetBuilder([new metawidget.widgetbuilder.OverriddenWidgetBuilder(),new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),new metawidget.widgetbuilder.HtmlWidgetBuilder()]);e.widgetProcessors=[new metawidget.widgetprocessor.IdProcessor(),new metawidget.widgetprocessor.PlaceholderAttributeProcessor(),new metawidget.widgetprocessor.DisabledAttributeProcessor(),new metawidget.angular.widgetprocessor.AngularWidgetProcessor(i,h.$parent)];
-e.layout=new metawidget.layout.HeadingTagLayoutDecorator(new metawidget.layout.TableLayout());this.configure=function(k){e.configure(k);this.invalidateInspection()};this.configure(h.$eval("config"));this.configure(h.configs());this.inspect=function(m,k,l){return e.inspect(m,k,l,this)};this.clearWidgets=function(){var k=angular.element(this.getElement());if(k.empty!==undefined){k.empty()}else{k.html("")}};this.buildWidgets=function(o){var k=c(h.$parent,function(p){return p});this.overriddenNodes=[];for(var l=0;l<k.length;l++){var n=k[l];if(n.nodeType===1&&(n.tagName!=="SPAN"||n.attributes.length>1)){this.overriddenNodes.push(n)}}if(o!==undefined){j=o}else{if(j===undefined){if(arguments.length>0){throw new Error("Calling buildWidgets( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead")}var m=metawidget.util.splitPath(this.path);j=e.inspect(this.toInspect,m.type,m.names,this)}}g.children().remove();e.buildWidgets(j,this)};this.onEndBuild=function(){while(this.overriddenNodes.length>0){var l=this.overriddenNodes[0];this.overriddenNodes.splice(0,1);if(l.tagName==="FACET"){continue}var o={};var q,m;m=l.attributes.length;for(q=0;q<m;q++){var n=l.attributes[q];var p=d.$normalize(n.name).toLowerCase();if(p==="ngbind"||p==="ngmodel"){var r=metawidget.util.splitPath(n.value);var s=h.$parent.$eval(r.type);o=e.inspect(s,r.type,r.names,this);break}}if(o===undefined){o={section:""}}if(l.tagName==="STUB"){m=l.attributes.length;for(q=0;q<m;q++){var k=l.attributes[q];o[k.nodeName]=k.nodeValue}}e.layoutWidget(l,"property",o,e.element,this)}};this.getElement=function(){return e.element};this.buildNestedMetawidget=function(k,l){var n=metawidget.util.createElement(this,"metawidget");n.setAttribute("ng-model",metawidget.util.appendPath(k,this));if(metawidget.util.isTrueOrTrueString(k.readOnly)){n.setAttribute("read-only","true")}else{if(d.readOnly!==undefined){n.setAttribute("read-only",d.readOnly)}}h.$parent._nestedMetawidgetConfigId=h.$parent._nestedMetawidgetConfigId||0;
-var o="_metawidgetConfig"+h.$parent._nestedMetawidgetConfigId++;h.$parent[o]=e;if(l!==undefined){var m="_metawidgetConfig"+h.$parent._nestedMetawidgetConfigId++;h.$parent[m]=l;n.setAttribute("configs","["+o+","+m+"]")}else{n.setAttribute("config",o)}return n}};metawidget.angular.inspectionresultprocessor=metawidget.angular.inspectionresultprocessor||{};metawidget.angular.inspectionresultprocessor.AngularInspectionResultProcessor=function(c){if(!(this instanceof metawidget.angular.inspectionresultprocessor.AngularInspectionResultProcessor)){throw new Error("Constructor called as a function")}this.processInspectionResult=function(f,i){function d(m,k){if(m!==k){for(var j=0,l=i._angularInspectionResultProcessor.length;j<l;j++){i._angularInspectionResultProcessor[j]()}i.invalidateInspection();i.buildWidgets()}}i._angularInspectionResultProcessor=i._angularInspectionResultProcessor||[];for(var e in f){var h=f[e];if(h instanceof Object){this.processInspectionResult(h,i);continue}if(h===undefined||h===null||h.slice===undefined){continue}if(h.length<4||h.slice(0,2)!=="{{"||h.slice(h.length-2,h.length)!=="}}"){continue}h=h.slice(2,h.length-2);f[e]=c.$eval(h)+"";var g=c.$watch(h,d);i._angularInspectionResultProcessor.push(g)}return f}};metawidget.angular.widgetprocessor=metawidget.angular.widgetprocessor||{};metawidget.angular.widgetprocessor.AngularWidgetProcessor=function(f,e){if(!(this instanceof metawidget.angular.widgetprocessor.AngularWidgetProcessor)){throw new Error("Constructor called as a function")}this.processWidget=function(k,p,j,o){var m=o.path;if(p!=="entity"){m=metawidget.util.appendPathWithName(m,j)}if(k.tagName==="OUTPUT"){if(!k.hasAttribute("ng-bind")){if(metawidget.util.isTrueOrTrueString(j.masked)){e.$parent.mwMaskedOutput=d;k.setAttribute("ng-bind","mwMaskedOutput("+m+")")}else{if(j.type==="array"){k.setAttribute("ng-bind",m+".join(', ')")}else{if(j.enumTitles!==undefined){e.$parent.mwLookupEnumTitle=e.$parent.mwLookupEnumTitle||{};e.$parent.mwLookupEnumTitle[m]=function(q){return metawidget.util.lookupEnumTitle(q,j["enum"],j.enumTitles)
-};k.setAttribute("ng-bind",'mwLookupEnumTitle["'+m+'"]('+m+")")}else{if(j.type==="date"){k.setAttribute("ng-bind",m+"|date")}else{k.setAttribute("ng-bind",m)}}}}}}else{if(k.tagName==="INPUT"&&k.getAttribute("type")==="submit"){k.removeAttribute("ng-click")}else{if(k.tagName==="INPUT"&&k.getAttribute("type")==="button"){k.setAttribute("ng-click",m+"()")}else{if(j["enum"]!==undefined&&(j.type==="array"||j.componentType!==undefined)&&k.tagName==="DIV"){for(var l=0,i=k.childNodes.length;l<i;l++){var n=k.childNodes[l];if(n.tagName==="LABEL"&&n.childNodes.length===2){var h=n.childNodes[0];if(h.tagName==="INPUT"){if(h.getAttribute("type")==="radio"){h.setAttribute("ng-model",m);if(h.value===true||h.value==="true"){h.setAttribute("ng-value","true")}else{if(h.value===false||h.value==="false"){h.setAttribute("ng-value","false")}}}else{if(h.getAttribute("type")==="checkbox"){h.setAttribute("ng-checked",m+".indexOf('"+h.value+"')>=0");e.mwUpdateSelection=g;h.setAttribute("ng-click","mwUpdateSelection($event,'"+m+"')")}}}}}}else{if(k.tagName==="SELECT"){k.setAttribute("ng-model",m);if(j.type==="boolean"||j.type==="integer"||j.type==="number"){k.setAttribute("ng-change","mwChangeAsType('"+j.type+"','"+m+"')");e.mwChangeAsType=c;for(var l=0,i=k.childNodes.length;l<i;l++){var h=k.childNodes[l];if(h.tagName==="OPTION"&&h.value!==""){h.setAttribute("ng-selected",m+"=="+h.value)}}}}else{if(k.tagName==="INPUT"||k.tagName==="TEXTAREA"){k.setAttribute("ng-model",m)}}}}}}if(!metawidget.util.isTrueOrTrueString(j.readOnly)){if(j.required!==undefined){k.setAttribute("ng-required",j.required)}if(j.minLength!==undefined){k.setAttribute("ng-minlength",j.minLength)}if(j.maxLength!==undefined){k.setAttribute("ng-maxlength",j.maxLength)}}return k};function g(h,l){var j=e.$eval(l);if(j===undefined){j=[];f(l).assign(e,j)}var k=h.target;var i=j.indexOf(k.value);if(k.checked===true){if(i===-1){j.push(k.value)}return}if(i!==-1){j.splice(i,1)}}function d(h){if(h===undefined){return}return metawidget.util.fillString("*",h.length)
-}function c(h,j){var i=f(j);if(h==="boolean"){i.assign(e,i(e)==="true");return}if(h==="integer"){i.assign(e,parseInt(i(e)));return}if(h==="number"){i.assign(e,parseFloat(i(e)));return}}}})();
diff --git a/src/main/webapp/js/3rdparty/metawidget/bootstrap/metawidget-bootstrap.js b/src/main/webapp/js/3rdparty/metawidget/bootstrap/metawidget-bootstrap.js
deleted file mode 100755
index 9fb6ddcd4c934c7d43d465accd826f486dc4d0b4..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/bootstrap/metawidget-bootstrap.js
+++ /dev/null
@@ -1,300 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace Metawidget Twitter Bootstrap support.
-	 */
-
-	metawidget.bootstrap = metawidget.bootstrap || {};
-
-	/**
-	 * @namespace WidgetProcessors for Twitter Bootstrap environments.
-	 */
-
-	metawidget.bootstrap.widgetprocessor = metawidget.bootstrap.widgetprocessor || {};
-
-	/**
-	 * @class WidgetProcessor to add CSS styles for Bootstrap.
-	 *        <p>
-	 *        Note: in some cases this WidgetProcessor wraps the given widget
-	 *        with Bootstrap-specific markup (e.g. &lt;div
-	 *        class="input-prepend"&gt;). Therefore, BootstrapWidgetProcessor
-	 *        should come <em>after</em> WidgetProcessors that expect widgets
-	 *        to be unwrapped (such as <tt>SimpleBindingProcessor</tt>).
-	 */
-
-	metawidget.bootstrap.widgetprocessor.BootstrapWidgetProcessor = function( config ) {
-
-		if ( ! ( this instanceof metawidget.bootstrap.widgetprocessor.BootstrapWidgetProcessor ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-
-		var _version = config !== undefined ? config.version : 3;
-
-		this.processWidget = function( widget, elementName, attributes, mw ) {
-
-			var tagName = widget.tagName;
-
-			if ( tagName === 'TABLE' ) {
-
-				metawidget.util.appendToAttribute( widget, 'class', 'table table-striped table-bordered table-hover' );
-
-			} else if ( tagName === 'SELECT' || tagName === 'TEXTAREA' ) {
-
-				metawidget.util.appendToAttribute( widget, 'class', 'form-control' );
-
-			} else if ( tagName === 'OUTPUT' ) {
-
-				// Pad output tags the same way as .form-control pads input
-				// tags.
-				// See:
-				// https://github.com/twbs/bootstrap/issues/9969
-
-				metawidget.util.appendToAttribute( widget, 'style', 'padding:6px 12px', ';' );
-
-			} else if ( tagName === 'INPUT' ) {
-
-				var type = widget.getAttribute( 'type' );
-
-				switch ( type ) {
-
-					case 'submit':
-						metawidget.util.appendToAttribute( widget, 'class', 'btn btn-primary' );
-						break;
-
-					case 'button':
-						metawidget.util.appendToAttribute( widget, 'class', 'btn btn-default' );
-						break;
-
-					default: {
-
-						if ( type !== 'checkbox' ) {
-							metawidget.util.appendToAttribute( widget, 'class', 'form-control' );
-						}
-
-						if ( attributes.inputPrepend !== undefined || attributes.inputAppend !== undefined ) {
-							var div = metawidget.util.createElement( mw, 'div' );
-							var span;
-							if ( attributes.inputPrepend !== undefined ) {
-								div.setAttribute( 'class', 'input-prepend input-group' );
-								span = metawidget.util.createElement( mw, 'span' );
-								span.setAttribute( 'class', 'add-on input-group-addon' );
-								span.innerHTML = attributes.inputPrepend;
-								div.appendChild( span );
-							}
-							div.appendChild( widget );
-							if ( attributes.inputAppend !== undefined ) {
-								if ( attributes.inputPrepend !== undefined ) {
-									div.setAttribute( 'class', 'input-prepend input-append input-group' );
-								} else {
-									div.setAttribute( 'class', 'input-append input-group' );
-								}
-								span = metawidget.util.createElement( mw, 'span' );
-								span.setAttribute( 'class', 'add-on input-group-addon' );
-								span.innerHTML = attributes.inputAppend;
-								div.appendChild( span );
-							}
-							return div;
-						}
-					}
-				}
-			} else if ( _version === 3 && tagName === 'DIV' && attributes['enum'] !== undefined && ( attributes.type === 'array' || attributes.componentType !== undefined ) ) {
-
-				// Bootstrap 3.x likes a DIV around each LABEL
-				
-				for ( var loop = 0, length = widget.childNodes.length; loop < length; loop++ ) {
-
-					var label = widget.childNodes[loop];
-
-					var innerDiv = metawidget.util.createElement( mw, 'div' );
-					innerDiv.setAttribute( 'class', label.getAttribute( 'class' ) );
-					label.removeAttribute( 'class' );
-					widget.replaceChild( innerDiv, label );
-					innerDiv.appendChild( label );
-				}
-			}
-
-			return widget;
-		};
-	};
-
-	/**
-	 * @namespace Layouts for Twitter Bootstrap environments.
-	 */
-
-	metawidget.bootstrap.layout = metawidget.bootstrap.layout || {};
-
-	/**
-	 * @class Layout to wrap widgets with divs suitable for 'form-vertical' or
-	 *        'form-horizontal' Bootstrap layouts.
-	 *        <p>
-	 *        This Layout extends metawidget.layout.DivLayout. It adds Bootstrap
-	 *        CSS classes such as 'form-group' and 'control-label' to the divs.
-	 * 
-	 * @returns {metawidget.bootstrap.layout.BootstrapDivLayout}
-	 */
-
-	metawidget.bootstrap.layout.BootstrapDivLayout = function( config ) {
-
-		if ( ! ( this instanceof metawidget.bootstrap.layout.BootstrapDivLayout ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-
-		if ( config === undefined ) {
-			config = {};
-		}
-
-		if ( config.version === 2 ) {
-			if ( config.divStyleClasses === undefined ) {
-				config.divStyleClasses = [ 'control-group', undefined, 'controls' ];
-			}
-			if ( config.labelStyleClass === undefined ) {
-				config.labelStyleClass = 'control-label';
-			}
-		} else {
-			if ( config.divStyleClasses === undefined ) {
-				config.divStyleClasses = [ 'form-group', 'col-sm-2 control-label', 'col-sm-10' ];
-			}
-			if ( config.widgetDivSpanAllClass === undefined ) {
-				config.widgetDivSpanAllClass = 'col-sm-12';
-			}
-			if ( config.widgetDivOffsetClass === undefined ) {
-				config.widgetDivOffsetClass = 'col-sm-offset-2';
-			}
-			if ( config.suppressLabelSuffixOnCheckboxes === undefined ) {
-				config.suppressLabelSuffixOnCheckboxes = true;
-			}
-			if ( config.wrapInsideLabels === undefined ) {
-				config.wrapInsideLabels = [ 'checkbox', 'radio' ];
-			}
-			if ( config.wrapWithExtraDiv === undefined ) {
-				config.wrapWithExtraDiv = {
-					checkbox: 'checkbox',
-					radio: 'radio'
-				};
-			}
-		}
-
-		var layout = new metawidget.layout.DivLayout( config );
-
-		// If there is no label, Bootstrap 3 requires an explicit grid position
-		// to be set or the widget div will not automatically 'pull right'
-
-		if ( config.version !== 2 ) {
-			var superLayoutWidget = layout.layoutWidget;
-			layout.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-				superLayoutWidget.call( this, widget, elementName, attributes, container, mw );
-
-				var outerDiv = container.childNodes[container.childNodes.length - 1];
-				if ( outerDiv !== undefined && outerDiv.childNodes.length === 1 ) {
-					if ( attributes.title === null ) {
-						outerDiv.childNodes[0].setAttribute( 'class', config.widgetDivSpanAllClass );
-					} else {
-						metawidget.util.appendToAttribute( outerDiv.childNodes[0], 'class', config.widgetDivOffsetClass );
-					}
-				}
-			};
-		}
-
-		return layout;
-	};
-
-	/**
-	 * @class LayoutDecorator to decorate widgets from different sections using
-	 *        Bootstrap tabs.
-	 */
-
-	metawidget.bootstrap.layout.TabLayoutDecorator = function( config ) {
-
-		if ( ! ( this instanceof metawidget.bootstrap.layout.TabLayoutDecorator ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		metawidget.layout.createNestedSectionLayoutDecorator( config, this, 'bootstrapTabLayoutDecorator' );
-	};
-
-	metawidget.bootstrap.layout.TabLayoutDecorator.prototype.createSectionWidget = function( previousSectionWidget, section, attributes, container, mw ) {
-
-		var tabs = previousSectionWidget;
-
-		// Whole new tabbed pane?
-
-		var ul, content;
-
-		if ( tabs === undefined ) {
-			tabs = metawidget.util.createElement( mw, 'div' );
-			tabs.setAttribute( 'id', metawidget.util.getId( "property", attributes, mw ) + '-tabs' );
-			tabs.setAttribute( 'class', 'tabs' );
-			ul = metawidget.util.createElement( mw, 'ul' );
-			ul.setAttribute( 'class', 'nav nav-tabs' );
-			tabs.appendChild( ul );
-			content = metawidget.util.createElement( mw, 'div' );
-			content.setAttribute( 'class', 'tab-content' );
-			tabs.appendChild( content );
-			this.getDelegate().layoutWidget( tabs, "property", {
-				wide: "true"
-			}, container, mw );
-
-			mw.bootstrapTabLayoutDecorator = mw.bootstrapTabLayoutDecorator || [];
-			mw.bootstrapTabLayoutDecorator.push( tabs );
-		} else {
-			tabs = previousSectionWidget.parentNode.parentNode;
-		}
-
-		// New Tab
-
-		ul = tabs.childNodes[0];
-		var tabId = tabs.getAttribute( 'id' ) + ( ul.childNodes.length + 1 );
-		var li = metawidget.util.createElement( mw, 'li' );
-		if ( ul.childNodes.length === 0 ) {
-			li.setAttribute( 'class', 'active' );
-		}
-		var a = metawidget.util.createElement( mw, 'a' );
-		a.setAttribute( 'data-toggle', 'tab' );
-		a.setAttribute( 'href', '#' + tabId );
-
-		// If Bootstrap is used with AngularJS, target=_self stops Angular from
-		// rewriting this link:
-		// https://groups.google.com/forum/#!topic/angular/yKv8jXYBsBI
-
-		a.setAttribute( 'target', '_self' );
-		li.appendChild( a );
-		ul.appendChild( li );
-
-		content = tabs.childNodes[1];
-		var tab = metawidget.util.createElement( mw, 'div' );
-		if ( content.childNodes.length === 0 ) {
-			tab.setAttribute( 'class', 'tab-pane active' );
-		} else {
-			tab.setAttribute( 'class', 'tab-pane' );
-		}
-		tab.setAttribute( 'id', tabId );
-		content.appendChild( tab );
-
-		// Tab name
-
-		a.innerHTML = section;
-
-		return tab;
-	};
-
-} )();
diff --git a/src/main/webapp/js/3rdparty/metawidget/bootstrap/metawidget-bootstrap.min.js b/src/main/webapp/js/3rdparty/metawidget/bootstrap/metawidget-bootstrap.min.js
deleted file mode 100755
index f4249354c485ca540fbe7fc90cd6710aa74d7972..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/bootstrap/metawidget-bootstrap.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Metawidget 4.2 minified
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-//
-// Author: Richard Kennard (http://kennardconsulting.com)
-
-var metawidget=metawidget||{};(function(){metawidget.bootstrap=metawidget.bootstrap||{};metawidget.bootstrap.widgetprocessor=metawidget.bootstrap.widgetprocessor||{};metawidget.bootstrap.widgetprocessor.BootstrapWidgetProcessor=function(a){if(!(this instanceof metawidget.bootstrap.widgetprocessor.BootstrapWidgetProcessor)){throw new Error("Constructor called as a function")}var b=a!==undefined?a.version:3;this.processWidget=function(i,n,g,m){var e=i.tagName;if(e==="TABLE"){metawidget.util.appendToAttribute(i,"class","table table-striped table-bordered table-hover")}else{if(e==="SELECT"||e==="TEXTAREA"){metawidget.util.appendToAttribute(i,"class","form-control")}else{if(e==="OUTPUT"){metawidget.util.appendToAttribute(i,"style","padding:6px 12px",";")}else{if(e==="INPUT"){var j=i.getAttribute("type");switch(j){case"submit":metawidget.util.appendToAttribute(i,"class","btn btn-primary");break;case"button":metawidget.util.appendToAttribute(i,"class","btn btn-default");break;default:if(j!=="checkbox"){metawidget.util.appendToAttribute(i,"class","form-control")}if(g.inputPrepend!==undefined||g.inputAppend!==undefined){var c=metawidget.util.createElement(m,"div");var l;if(g.inputPrepend!==undefined){c.setAttribute("class","input-prepend input-group");l=metawidget.util.createElement(m,"span");l.setAttribute("class","add-on input-group-addon");l.innerHTML=g.inputPrepend;c.appendChild(l)}c.appendChild(i);if(g.inputAppend!==undefined){if(g.inputPrepend!==undefined){c.setAttribute("class","input-prepend input-append input-group")}else{c.setAttribute("class","input-append input-group")}l=metawidget.util.createElement(m,"span");l.setAttribute("class","add-on input-group-addon");l.innerHTML=g.inputAppend;c.appendChild(l)}return c}}}else{if(b===3&&e==="DIV"&&g["enum"]!==undefined&&(g.type==="array"||g.componentType!==undefined)){for(var h=0,d=i.childNodes.length;h<d;h++){var k=i.childNodes[h];var f=metawidget.util.createElement(m,"div");f.setAttribute("class",k.getAttribute("class"));
-k.removeAttribute("class");i.replaceChild(f,k);f.appendChild(k)}}}}}}return i}};metawidget.bootstrap.layout=metawidget.bootstrap.layout||{};metawidget.bootstrap.layout.BootstrapDivLayout=function(b){if(!(this instanceof metawidget.bootstrap.layout.BootstrapDivLayout)){throw new Error("Constructor called as a function")}if(b===undefined){b={}}if(b.version===2){if(b.divStyleClasses===undefined){b.divStyleClasses=["control-group",undefined,"controls"]}if(b.labelStyleClass===undefined){b.labelStyleClass="control-label"}}else{if(b.divStyleClasses===undefined){b.divStyleClasses=["form-group","col-sm-2 control-label","col-sm-10"]}if(b.widgetDivSpanAllClass===undefined){b.widgetDivSpanAllClass="col-sm-12"}if(b.widgetDivOffsetClass===undefined){b.widgetDivOffsetClass="col-sm-offset-2"}if(b.suppressLabelSuffixOnCheckboxes===undefined){b.suppressLabelSuffixOnCheckboxes=true}if(b.wrapInsideLabels===undefined){b.wrapInsideLabels=["checkbox","radio"]}if(b.wrapWithExtraDiv===undefined){b.wrapWithExtraDiv={checkbox:"checkbox",radio:"radio"}}}var c=new metawidget.layout.DivLayout(b);if(b.version!==2){var a=c.layoutWidget;c.layoutWidget=function(h,d,f,e,i){a.call(this,h,d,f,e,i);var g=e.childNodes[e.childNodes.length-1];if(g!==undefined&&g.childNodes.length===1){if(f.title===null){g.childNodes[0].setAttribute("class",b.widgetDivSpanAllClass)}else{metawidget.util.appendToAttribute(g.childNodes[0],"class",b.widgetDivOffsetClass)}}}}return c};metawidget.bootstrap.layout.TabLayoutDecorator=function(a){if(!(this instanceof metawidget.bootstrap.layout.TabLayoutDecorator)){throw new Error("Constructor called as a function")}metawidget.layout.createNestedSectionLayoutDecorator(a,this,"bootstrapTabLayoutDecorator")};metawidget.bootstrap.layout.TabLayoutDecorator.prototype.createSectionWidget=function(j,k,e,b,m){var h=j;var g,f;if(h===undefined){h=metawidget.util.createElement(m,"div");h.setAttribute("id",metawidget.util.getId("property",e,m)+"-tabs");h.setAttribute("class","tabs");g=metawidget.util.createElement(m,"ul");
-g.setAttribute("class","nav nav-tabs");h.appendChild(g);f=metawidget.util.createElement(m,"div");f.setAttribute("class","tab-content");h.appendChild(f);this.getDelegate().layoutWidget(h,"property",{wide:"true"},b,m);m.bootstrapTabLayoutDecorator=m.bootstrapTabLayoutDecorator||[];m.bootstrapTabLayoutDecorator.push(h)}else{h=j.parentNode.parentNode}g=h.childNodes[0];var c=h.getAttribute("id")+(g.childNodes.length+1);var l=metawidget.util.createElement(m,"li");if(g.childNodes.length===0){l.setAttribute("class","active")}var i=metawidget.util.createElement(m,"a");i.setAttribute("data-toggle","tab");i.setAttribute("href","#"+c);i.setAttribute("target","_self");l.appendChild(i);g.appendChild(l);f=h.childNodes[1];var d=metawidget.util.createElement(m,"div");if(f.childNodes.length===0){d.setAttribute("class","tab-pane active")}else{d.setAttribute("class","tab-pane")}d.setAttribute("id",c);f.appendChild(d);i.innerHTML=k;return d}})();
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-core.min.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-core.min.js
deleted file mode 100755
index bac33ba4a3cb8041a3ffe823742c58d5a1f1d13f..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-core.min.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Metawidget 4.2 minified
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-//
-// Author: Richard Kennard (http://kennardconsulting.com)
-
-var metawidget=metawidget||{};(function(){metawidget.inspectionresultprocessor=metawidget.inspectionresultprocessor||{}})();
-var metawidget=metawidget||{};(function(){metawidget.inspector=metawidget.inspector||{};metawidget.inspector.CompositeInspector=function(a){if(!(this instanceof metawidget.inspector.CompositeInspector)){throw new Error("Constructor called as a function")}var b;if(a.inspectors!==undefined){b=a.inspectors.slice(0)}else{b=a.slice(0)}this.inspect=function(j,d,h){var e={};for(var c=0,g=b.length;c<g;c++){var f;var i=b[c];if(i.inspect!==undefined){f=i.inspect(j,d,h)}else{f=i(j,d,h)}metawidget.util.combineInspectionResults(e,f)}return e}};metawidget.inspector.PropertyTypeInspector=function(){if(!(this instanceof metawidget.inspector.PropertyTypeInspector)){throw new Error("Constructor called as a function")}};metawidget.inspector.PropertyTypeInspector.prototype.inspect=function(f,b,e){function a(g){if(g instanceof Array){return"array"}else{if(g instanceof Date){return"date"}else{var h=typeof(g);if(h!=="object"){return h}}}}f=metawidget.util.traversePath(f,e);var d={};if(e!==undefined&&e.length>0){d.name=e[e.length-1]}else{if(f===undefined){return}}if(f!==undefined){d.type=a(f);if(d.type===undefined){d.properties={};for(var c in f){d.properties[c]={type:a(f[c])}}}}return d};metawidget.inspector.JsonSchemaInspector=function(a){if(!(this instanceof metawidget.inspector.JsonSchemaInspector)){throw new Error("Constructor called as a function")}var b;if(a.schema!==undefined){b=a.schema}else{b=a}this.inspect=function(j,e,i){function d(o,n){if(o===undefined){return undefined}if(n!==undefined){if(!(n instanceof Array)){throw new Error("Expected array of names")}for(var k=0,m=n.length;k<m;k++){var l=n[k];if(!isNaN(l)){o=o.items;if(o===undefined){return undefined}continue}o=o.properties;if(o===undefined){return undefined}o=o[l];if(o===undefined){return undefined}}}return o}var h=d(b,i);if(h===undefined){return undefined}var g={};if(i!==undefined){g.name=i[i.length-1]}metawidget.util.combineInspectionResults(g,h);if(g.required!==undefined){for(var c=0,f=g.required.length;c<f;c++){g.properties[g.required[c]].required=true
-}}return g}}})();
-var metawidget=metawidget||{};(function(){metawidget.layout=metawidget.layout||{};metawidget.layout.SimpleLayout=function(){if(!(this instanceof metawidget.layout.SimpleLayout)){throw new Error("Constructor called as a function")}};metawidget.layout.SimpleLayout.prototype.layoutWidget=function(d,a,c,b){if(d.tagName==="STUB"&&!metawidget.util.hasChildElements(d)){return}b.appendChild(d)};metawidget.layout.DefinitionListLayout=function(b){if(!(this instanceof metawidget.layout.DefinitionListLayout)){throw new Error("Constructor called as a function")}var c=b!==undefined?b.labelStyleClass:undefined;var a=b!==undefined&&b.labelSuffix!==undefined?b.labelSuffix:":";this.startContainerLayout=function(d,g){var e=metawidget.util.createElement(g,"dl");if(g.path!==undefined){var f=metawidget.util.getId("property",{},g);if(f!==undefined){e.setAttribute("id","dl-"+f)}}d.appendChild(e)};this.layoutWidget=function(i,e,g,f,j){if(i.tagName==="STUB"&&!metawidget.util.hasChildElements(i)){return}var h=f.childNodes[f.childNodes.length-1];this.layoutLabel(h,i,e,g,j);var d=metawidget.util.createElement(j,"dd");d.appendChild(i);h.appendChild(d)};this.layoutLabel=function(h,j,d,e,k){if(d==="entity"||d==="action"){return}if(e.name===undefined&&e.title===undefined){return}var g=metawidget.util.getLabelString(e,k);if(g===""||g===null){return}var i=metawidget.util.createElement(k,"dt");var f=metawidget.util.createElement(k,"label");if(j.getAttribute("id")!==null){f.setAttribute("for",j.getAttribute("id"))}if(c!==undefined){f.setAttribute("class",c)}f.innerHTML=g+a;i.appendChild(f);h.appendChild(i)}};metawidget.layout.DivLayout=function(b){if(!(this instanceof metawidget.layout.DivLayout)){throw new Error("Constructor called as a function")}var c=b!==undefined?b.divStyleClasses:undefined;var h=b!==undefined?b.labelStyleClass:undefined;var g=b!==undefined&&b.labelSuffix!==undefined?b.labelSuffix:":";var f=b!==undefined&&b.suppressDivAroundLabel!==undefined?b.suppressDivAroundLabel:false;var e=b!==undefined&&b.suppressDivAroundWidget!==undefined?b.suppressDivAroundWidget:false;
-var d=b!==undefined&&b.appendRequiredClassOnLabelDiv!==undefined?b.appendRequiredClassOnLabelDiv:undefined;var j=b!==undefined&&b.appendRequiredClassOnWidgetDiv!==undefined?b.appendRequiredClassOnWidgetDiv:undefined;var k=b!==undefined&&b.suppressLabelSuffixOnCheckboxes!==undefined?b.suppressLabelSuffixOnCheckboxes:false;var i=b!==undefined&&b.wrapInsideLabels!==undefined?b.wrapInsideLabels:undefined;var a=b!==undefined&&b.wrapWithExtraDiv!==undefined?b.wrapWithExtraDiv:undefined;this.layoutWidget=function(s,x,q,l,w){if(s.tagName==="STUB"&&!metawidget.util.hasChildElements(s)){return}if(s.tagName==="INPUT"&&(s.getAttribute("type")==="button"||s.getAttribute("type")==="submit")){if(l.childNodes.length>0){var o=l.childNodes[l.childNodes.length-1];if(o.childNodes.length===1){var u=o.childNodes[0];if(u.childNodes.length>0){var m=u.childNodes[u.childNodes.length-1];if(m.tagName==="INPUT"&&(m.getAttribute("type")==="button"||m.getAttribute("type")==="submit")){u.appendChild(s);return}}}}}var v=metawidget.util.createElement(w,"div");if(c!==undefined&&c[0]!==undefined){v.setAttribute("class",c[0])}var n=this.layoutLabel(v,s,x,q,w);var p=s;if(s.tagName==="INPUT"&&metawidget.util.niceIndexOf(i,s.getAttribute("type"))!==-1){n.insertBefore(s,n.firstChild);p=n}else{p=s}if(s.tagName==="INPUT"&&a!==undefined&&a[s.getAttribute("type")]!==undefined){var t=metawidget.util.createElement(w,"div");t.setAttribute("class",a[s.getAttribute("type")]);t.appendChild(p);p=t}if(e!==true){var r=metawidget.util.createElement(w,"div");if(c!==undefined&&c[2]!==undefined){r.setAttribute("class",c[2])}if(metawidget.util.isTrueOrTrueString(q.required)&&j!==undefined){metawidget.util.appendToAttribute(r,"class",j)}r.appendChild(p);p=r}v.appendChild(p);l.appendChild(v)};this.layoutLabel=function(p,q,l,m,s){if(l==="entity"||l==="action"){return}if(m.name===undefined&&m.title===undefined){return}var o=this.getLabelString(q,m,s);if(o===""||o===null){return}var n=metawidget.util.createElement(s,"label");if(q.getAttribute("id")!==null){n.setAttribute("for",q.getAttribute("id"));
-n.setAttribute("id",q.getAttribute("id")+"-label")}if(h!==undefined){n.setAttribute("class",h)}n.innerHTML=o;if(f===true){p.appendChild(n)}else{var r=metawidget.util.createElement(s,"div");if(c!==undefined&&c[1]!==undefined){r.setAttribute("class",c[1])}if(metawidget.util.isTrueOrTrueString(m.required)&&d!==undefined){metawidget.util.appendToAttribute(r,"class",d)}r.appendChild(n);p.appendChild(r)}return n};this.getLabelString=function(n,l,o){var m=metawidget.util.getLabelString(l,o);if(m===""||m===null){return m}if(k===true&&n.tagName==="INPUT"){if(n.getAttribute("type")==="checkbox"||n.getAttribute("type")==="radio"){return m}}return m+g}};metawidget.layout.TableLayout=function(c){if(!(this instanceof metawidget.layout.TableLayout)){throw new Error("Constructor called as a function")}var e=c!==undefined?c.tableStyleClass:undefined;var f=c!==undefined?c.columnStyleClasses:undefined;var a=c!==undefined?c.headerStyleClass:undefined;var b=c!==undefined?c.footerStyleClass:undefined;var d=c!==undefined&&c.numberOfColumns?c.numberOfColumns:1;this.startContainerLayout=function(g,o){var p=metawidget.util.createElement(o,"table");if(o.path!==undefined){var h=metawidget.util.getId("property",{},o);if(h!==undefined){p.setAttribute("id","table-"+h)}}if(e!==undefined){p.setAttribute("class",e)}g._currentColumn=0;g.appendChild(p);if(o.overriddenNodes!==undefined){for(var m=0,i=o.overriddenNodes.length;m<i;m++){var j=o.overriddenNodes[m];if(j.tagName!=="FACET"){continue}var n;if(j.getAttribute("name")==="header"){n=metawidget.util.createElement(o,"thead")}else{if(j.getAttribute("name")==="footer"){n=metawidget.util.createElement(o,"tfoot")}else{continue}}p.appendChild(n);var l=metawidget.util.createElement(o,"tr");n.appendChild(l);var k=metawidget.util.createElement(o,"td");k.setAttribute("colspan",d*3);if(j.getAttribute("name")==="header"){if(a!==undefined){k.setAttribute("class",a)}}else{if(b!==undefined){k.setAttribute("class",b)}}l.appendChild(k);while(j.childNodes.length>0){k.appendChild(j.removeChild(j.childNodes[0]))
-}}}p.appendChild(metawidget.util.createElement(o,"tbody"))};this.layoutWidget=function(l,q,j,h,o){if(l.tagName==="STUB"&&!metawidget.util.hasChildElements(l)){return}var m=metawidget.util.isSpanAllColumns(j);if(m===true&&h._currentColumn>0){h._currentColumn=0}var p=h.childNodes[h.childNodes.length-1];var g=undefined;if(j.name!==undefined){if(metawidget.util.hasAttribute(p,"id")){g=p.getAttribute("id")}if(g!==undefined){if(q!=="entity"){if(g.charAt(g.length-1)!=="-"){g+=metawidget.util.capitalize(j.name)}else{g+=j.name}}}else{g="table-"+j.name}}var k=p.childNodes[p.childNodes.length-1];var n;if(h._currentColumn===0){n=metawidget.util.createElement(o,"tr");if(g!==undefined){n.setAttribute("id",g+"-row")}k.appendChild(n)}else{n=k.childNodes[k.childNodes.length-1]}this.layoutLabel(n,g,l,q,j,o);var i=metawidget.util.createElement(o,"td");if(g!==undefined){i.setAttribute("id",g+"-cell")}if(f!==undefined&&f[1]!==undefined){i.setAttribute("class",f[1])}if(m===true){i.setAttribute("colspan",((d*3)-1)-n.childNodes.length)}else{if(n.childNodes.length<1){i.setAttribute("colspan",2-n.childNodes.length)}}i.appendChild(l);n.appendChild(i);this.layoutRequired(n,j,o);if(m===true){h._currentColumn=d-1}h._currentColumn=(h._currentColumn+1)%d};this.layoutLabel=function(l,g,k,o,j,n){if(o==="entity"){return}if(j.name===undefined&&j.title===undefined){return}var i=this.getLabelString(j,n);if(i===null){return}var h=metawidget.util.createElement(n,"th");if(g!==undefined){h.setAttribute("id",g+"-label-cell")}if(f!==undefined&&f[0]!==undefined){h.setAttribute("class",f[0])}if(o!=="action"&&i!==""){var m=metawidget.util.createElement(n,"label");if(metawidget.util.hasAttribute(k,"id")){m.setAttribute("for",k.getAttribute("id"))}if(g!==undefined){m.setAttribute("id",g+"-label")}m.innerHTML=i;h.appendChild(m)}l.appendChild(h)};this.layoutRequired=function(h,g,j){var i=metawidget.util.createElement(j,"td");if(f!==undefined&&f[2]!==undefined){i.setAttribute("class",f[2])}if(!metawidget.util.isTrueOrTrueString(g.readOnly)&&metawidget.util.isTrueOrTrueString(g.required)){i.innerHTML="*"
-}h.appendChild(i)};this.getLabelString=function(g,i){var h=metawidget.util.getLabelString(g,i);if(h===""||h===null){return h}return h+":"}};metawidget.layout._createSectionLayoutDecorator=function(b,a,d){var c;if(b.delegate!==undefined){c=b.delegate}else{c=b}a.getDelegate=function(){return c};a.onStartBuild=function(e){if(a.getDelegate().onStartBuild!==undefined){a.getDelegate().onStartBuild(e)}};a.startContainerLayout=function(e,f){e[d]={};if(a.getDelegate().startContainerLayout!==undefined){a.getDelegate().startContainerLayout(e,f)}};a.endContainerLayout=function(e,f){if(a.getDelegate().endContainerLayout!==undefined){a.getDelegate().endContainerLayout(e,f)}e[d]={}};a.onEndBuild=function(e){if(a.getDelegate().onEndBuild!==undefined){a.getDelegate().onEndBuild(e)}}};metawidget.layout.createFlatSectionLayoutDecorator=function(b,a,c){if(this instanceof metawidget.layout.createFlatSectionLayoutDecorator){throw new Error("Function called as a Constructor")}metawidget.layout._createSectionLayoutDecorator(b,a,c);a.layoutWidget=function(g,l,f,e,j){var i;if(a.getDelegate().nestedSectionLayoutDecorator===true){i=metawidget.util.stripSection(f);if(i===undefined||i===e[c].currentSection){return a.getDelegate().layoutWidget(g,l,f,e,j)}if(e[c].currentSection!==undefined){a.getDelegate().endContainerLayout(e,j)}e[c].currentSection=i;if(i!==""){a.addSectionWidget(i,0,f,e,j)}}else{if(f.section===undefined||f.section===e[c].currentSection){return a.getDelegate().layoutWidget(g,l,f,e,j)}var k=f.section;if(!(k instanceof Array)){k=[k]}var h;if(e[c].currentSection!==undefined){h=e[c].currentSection}else{h=[]}for(var d=0;d<k.length;d++){i=k[d];if(i===""){continue}if(d<h.length&&i===h[d]){continue}a.addSectionWidget(i,d,f,e,j)}e[c].currentSection=k}a.getDelegate().layoutWidget(g,l,f,e,j)}};metawidget.layout.createNestedSectionLayoutDecorator=function(b,a,d){if(this instanceof metawidget.layout.createNestedSectionLayoutDecorator){throw new Error("Function called as a Constructor")}metawidget.layout._createSectionLayoutDecorator(b,a,d);
-a.nestedSectionLayoutDecorator=true;a.layoutWidget=function(i,e,g,f,k){var j=metawidget.util.stripSection(g);if(j===undefined||j===f[d].currentSection){if(f[d].currentSectionWidget){return a.getDelegate().layoutWidget(i,e,g,f[d].currentSectionWidget,k)}return a.getDelegate().layoutWidget(i,e,g,f,k)}if(f[d].currentSectionWidget!==undefined){a.endContainerLayout(f[d].currentSectionWidget,k)}f[d].currentSection=j;var h=f[d].currentSectionWidget;delete f[d].currentSectionWidget;if(j===""){a.getDelegate().layoutWidget(i,e,g,f,k);return}f[d].currentSectionWidget=a.createSectionWidget(h,j,g,f,k);a.startContainerLayout(f[d].currentSectionWidget,k);a.getDelegate().layoutWidget(i,e,g,f[d].currentSectionWidget,k)};var c=a.endContainerLayout;a.endContainerLayout=function(e,f){if(e[d].currentSectionWidget!==undefined){a.endContainerLayout(e[d].currentSectionWidget,f)}c.call(this,e,f)}};metawidget.layout.HeadingTagLayoutDecorator=function(a){if(!(this instanceof metawidget.layout.HeadingTagLayoutDecorator)){throw new Error("Constructor called as a function")}var b=a!==undefined&&a.level!==undefined?a.level:1;metawidget.layout.createFlatSectionLayoutDecorator(a,this,"headingTagLayoutDecorator");this.addSectionWidget=function(f,h,d,c,g){var e=metawidget.util.createElement(g,"h"+(h+b));e.innerHTML=f;this.getDelegate().layoutWidget(e,"property",{wide:"true"},c,g)}};metawidget.layout.DivLayoutDecorator=function(a){if(!(this instanceof metawidget.layout.DivLayoutDecorator)){throw new Error("Constructor called as a function")}var b=a!==undefined?a.styleClass:undefined;metawidget.layout.createNestedSectionLayoutDecorator(a,this,"divLayoutDecorator");this.createSectionWidget=function(e,f,d,c,h){var g=metawidget.util.createElement(h,"div");g.setAttribute("title",f);if(b!==undefined){g.setAttribute("class",b)}this.getDelegate().layoutWidget(g,"property",{wide:"true"},c,h);return g}}})();
-var metawidget=metawidget||{};(function(){metawidget.util=metawidget.util||{};metawidget.util.getLabelString=function(b,d){if(b.title!==undefined){if(b.title===null){return null}return metawidget.util.getLocalizedString(b.title,d)}var c=b.name;if(d.l10n!==undefined&&d.l10n[c]!==undefined){return d.l10n[c]}return metawidget.util.uncamelCase(c)};metawidget.util.uncamelCase=function(e){function b(l){var k=l.charCodeAt(0);return(k>=48&&k<=57)}function g(l){var k=l.charCodeAt(0);return(k>=65&&k<=90)||(k>=97&&k<=122)}var h="";var i=true;var f=" ";for(var d=0;d<e.length;d++){var j=e.charAt(d);if(i===true){h+=j.toUpperCase();i=false}else{if(a(j)&&(!a(f)||(d<e.length-1&&e[d+1]!==" "&&!a(e[d+1])))){if(f!==" "){h+=" "}h+=j}else{if(b(j)&&g(f)&&f!==" "){h+=" "+j}else{h+=j}}}f=j}return h};metawidget.util.getLocalizedString=function(c,d){var b=metawidget.util.camelCase(c);if(d.l10n!==undefined&&d.l10n[b]!==undefined){return d.l10n[b]}return c};metawidget.util.decapitalize=function(b){if(b.length===0){return b}var c=b.charAt(0);if(!a(c)){return b}if(b.length>1){if(a(b.charAt(1))){return b}}return b.charAt(0).toLowerCase()+b.slice(1)};metawidget.util.capitalize=function(b){if(b.length===0){return b}if(b.length>1){if(a(b.charAt(1))){return b}}return b.charAt(0).toUpperCase()+b.slice(1)};metawidget.util.isTrueOrTrueString=function(b){return(b==="true"||b===true)};metawidget.util.camelCase=function(e){if(!(e instanceof Array)){e=e.split(" ")}var d="";var c=e.length;if(c>0){d+=metawidget.util.decapitalize(e[0])}for(var b=1;b<c;b++){d+=metawidget.util.capitalize(e[b])}return d};metawidget.util.fillString=function(b,d){var c="";for(;;){if(d&1){c+=b}d>>=1;if(d){b+=b}else{break}}return c};metawidget.util.lookupEnumTitle=function(d,e,b){var c=e.indexOf(d);if(c===-1||c>=b.length){c=e.indexOf(""+d);if(c===-1||c>=b.length){return d}}return b[c]};metawidget.util.getId=function(b,d,f){if(f.path!==undefined){var c=f.path.split(".");if(c[0]==="object"){c=c.slice(1)}if(d.name&&b!=="entity"){c.push(d.name)
-}else{if(c.length===0){return undefined}}var e=metawidget.util.camelCase(c);e=e.replace(/[\[\]]/g,"");return e}if(d!==undefined){return d.name}};metawidget.util.hasChildElements=function(d){var e=d.childNodes;for(var b=0,c=e.length;b<c;b++){if(e[b].nodeType===1){return true}}return false};metawidget.util.isSpanAllColumns=function(b){if(b===undefined){return false}if(metawidget.util.isTrueOrTrueString(b.large)){return true}return metawidget.util.isTrueOrTrueString(b.wide)};metawidget.util.splitPath=function(g){var c={};if(g!==undefined){var f=g.match(/([^\.\[\]]*)/g);c.type=f[0];for(var b=1,e=f.length;b<e;b++){if(f[b]===""){continue}if(c.names===undefined){c.names=[]}var d=f[b].match(/^(?:\s*(?:\'|\"))([^\']*)(?:(?:\'|\")\s*)$/);if(d!==null&&d[1]!==undefined){f[b]=d[1]}c.names.push(f[b])}}return c};metawidget.util.appendPath=function(b,c){if(c.path!==undefined){return metawidget.util.appendPathWithName(c.path,b)}if(c.toInspect!==undefined){return metawidget.util.appendPathWithName(typeof(c.toInspect),b)}return metawidget.util.appendPathWithName("object",b)};metawidget.util.appendPathWithName=function(d,b){var c=b.name;if(metawidget.util.isTrueOrTrueString(b.nameIncludesSeparator)){return d+c}if(c.indexOf(".")!==-1||c.indexOf("'")!==-1||c.indexOf('"')!==-1||c.indexOf(" ")!==-1){return d+"['"+c.replace("'","\\'")+"']"}return d+"."+c};metawidget.util.traversePath=function(e,d){if(e===undefined){return undefined}if(d!==undefined){if(!(d instanceof Array)){throw new Error("Expected array of names")}for(var b=0,c=d.length;b<c;b++){e=e[d[b]];if(e===undefined){return undefined}}}return e};metawidget.util.getSortedInspectionResultProperties=function(e){var d=[];if(e!==undefined){for(var b in e.properties){var c=e.properties[b];d.push(c);c.name=b;c._syntheticOrder=d.length}d.sort(function(g,f){if(g.propertyOrder===undefined){if(f.propertyOrder===undefined){return(g._syntheticOrder-f._syntheticOrder)}return 1}if(f.propertyOrder===undefined){return -1}var h=(g.propertyOrder-f.propertyOrder);
-if(h===0){return(g._syntheticOrder-f._syntheticOrder)}return h})}return d};metawidget.util.combineInspectionResults=function(d,c){if(c===undefined){return}e(c,d);if(c.properties===undefined){return}d.properties=d.properties||{};for(var b in c.properties){d.properties[b]=d.properties[b]||{};e(c.properties[b],d.properties[b])}function e(i,h){for(var g in i){var f=i[g];if(f instanceof Array){h[g]=f.slice(0);continue}if(f instanceof Object){continue}h[g]=i[g]}}};metawidget.util.stripSection=function(b){var c=b.section;if(c===undefined){return undefined}if(!(c instanceof Array)){delete b.section;return c}switch(c.length){case 0:delete b.section;return"";case 1:delete b.section;return c[0];default:b.section=c.slice(1);return c[0]}};metawidget.util.appendToAttribute=function(e,d,c,f){var b=e.getAttribute(d);if(f===undefined){f=" "}if(b===null){e.setAttribute(d,c);return}if(b.toString!==undefined){b=b.toString()}if(b!==c&&b.indexOf(c+f)===-1&&b.indexOf(f+c)===-1){e.setAttribute(d,b+f+c)}};metawidget.util.createElement=function(c,b){if(c.ownerDocument!==undefined){return c.ownerDocument.createElement(b.toUpperCase())}return c.getElement().ownerDocument.createElement(b.toUpperCase())};metawidget.util.createTextNode=function(c,b){if(c.ownerDocument!==undefined){return c.ownerDocument.createTextNode(b)}return c.getElement().ownerDocument.createTextNode(b)};metawidget.util.createEvent=function(d,b){var c;if(d.ownerDocument!==undefined){c=d.ownerDocument.createEvent("Event")}else{c=d.getElement().ownerDocument.createEvent("Event")}c.initEvent(b,true,true);return c};metawidget.util.niceIndexOf=function(c,b){if(c===undefined||b===undefined){return -1}return c.indexOf(b)};metawidget.util.hasAttribute=function(b,c){if(b.hasAttribute!==undefined){return b.hasAttribute(c)}return(b.getAttribute(c)!==null)};function a(d){var b=d.charCodeAt(0);return(b>=65&&b<=90)}})();
-var metawidget=metawidget||{};(function(a){function c(d){var e=this.getAttribute(d);if(e===null){return}var f=metawidget.util.splitPath(e);if(f===undefined){return}var g=a[f.type];return metawidget.util.traversePath(g,f.names)}if(a.document!==undefined&&a.document.registerElement!==undefined){var b=Object.create(HTMLElement.prototype);b.attachedCallback=function(){var d=this.createShadowRoot();this._pipeline=new metawidget.Pipeline(d);this._pipeline.inspector=new metawidget.inspector.PropertyTypeInspector();this._pipeline.widgetBuilder=new metawidget.widgetbuilder.CompositeWidgetBuilder([new metawidget.widgetbuilder.OverriddenWidgetBuilder(),new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),new metawidget.widgetbuilder.HtmlWidgetBuilder()]);this._pipeline.widgetProcessors=[new metawidget.widgetprocessor.IdProcessor(),new metawidget.widgetprocessor.RequiredAttributeProcessor(),new metawidget.widgetprocessor.PlaceholderAttributeProcessor(),new metawidget.widgetprocessor.DisabledAttributeProcessor(),new metawidget.widgetprocessor.SimpleBindingProcessor()];this._pipeline.layout=new metawidget.layout.HeadingTagLayoutDecorator(new metawidget.layout.TableLayout());this._pipeline.configure([c.call(this,"config"),this.config]);this.buildWidgets()};b.attributeChangedCallback=function(f,d,e){if(this._pipeline===undefined){return}switch(f){case"path":this.buildWidgets();break;case"readonly":this.buildWidgets();break;case"config":this._pipeline.configure(c.call(this,"config"));break}};b.clearWidgets=function(){while(this.shadowRoot.childNodes.length>0){this.shadowRoot.removeChild(this.shadowRoot.childNodes[0])}};b.buildWidgets=function(g){this.overriddenNodes=[];for(var d=0,f=this.childNodes.length;d<f;d++){if(this.childNodes[d].nodeType===1){this.overriddenNodes.push(this.childNodes[d].cloneNode(true))}}if(this.getAttribute("path")!==null){this.path=this.getAttribute("path");this.readOnly=metawidget.util.isTrueOrTrueString(this.getAttribute("readonly"));if(g===undefined){if(arguments.length>0){throw new Error("Calling buildWidgets( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead")
-}var e=metawidget.util.splitPath(this.path);this.toInspect=a[e.type];g=this._pipeline.inspect(this.toInspect,e.type,e.names,this)}}this._pipeline.buildWidgets(g,this)};b.buildNestedMetawidget=function(d,e){var f=metawidget.util.createElement(this,"x-metawidget");f.getMetawidget=function(){return f};f.setAttribute("path",metawidget.util.appendPath(d,this));f.setAttribute("readonly",this.readOnly||metawidget.util.isTrueOrTrueString(d.readOnly));f.config=this._pipeline;return f};b.save=function(){return this.getWidgetProcessor(function(d){return d instanceof metawidget.widgetprocessor.SimpleBindingProcessor}).save(this)};b.inspect=function(f,d,e){return this._pipeline.inspect(f,d,e,this)};b.getWidgetProcessor=function(d){return this._pipeline.getWidgetProcessor(d)};b.setLayout=function(d){this._pipeline.layout=d};a.document.registerElement("x-metawidget",{prototype:b})}})(this);
-var metawidget=metawidget||{};(function(){metawidget.widgetbuilder=metawidget.widgetbuilder||{};metawidget.widgetbuilder.CompositeWidgetBuilder=function(a){if(!(this instanceof metawidget.widgetbuilder.CompositeWidgetBuilder)){throw new Error("Constructor called as a function")}var c;if(a.widgetBuilders!==undefined){c=a.widgetBuilders.slice(0)}else{c=a.slice(0)}function b(g,h){for(var d=0,f=c.length;d<f;d++){var e=c[d];if(e[g]!==undefined){e[g](h)}}}this.onStartBuild=function(d){b("onStartBuild",d)};this.buildWidget=function(d,f,j){for(var e=0,h=c.length;e<h;e++){var i;var g=c[e];if(g.buildWidget!==undefined){i=g.buildWidget(d,f,j)}else{i=g(d,f,j)}if(i!==undefined){return i}}};this.onEndBuild=function(d){b("onEndBuild",d)}};metawidget.widgetbuilder.OverriddenWidgetBuilder=function(){if(!(this instanceof metawidget.widgetbuilder.OverriddenWidgetBuilder)){throw new Error("Constructor called as a function")}};metawidget.widgetbuilder.OverriddenWidgetBuilder.prototype.buildWidget=function(b,d,g){if(g.overriddenNodes===undefined){return}var a=metawidget.util.getId(b,d,g);for(var c=0,e=g.overriddenNodes.length;c<e;c++){var f=g.overriddenNodes[c];if(f.nodeType===1&&f.getAttribute("id")===a){g.overriddenNodes.splice(c,1);return f}}};metawidget.widgetbuilder.ReadOnlyWidgetBuilder=function(){if(!(this instanceof metawidget.widgetbuilder.ReadOnlyWidgetBuilder)){throw new Error("Constructor called as a function")}};metawidget.widgetbuilder.ReadOnlyWidgetBuilder.prototype.buildWidget=function(a,b,c){if(!metawidget.util.isTrueOrTrueString(b.readOnly)){return}if(metawidget.util.isTrueOrTrueString(b.hidden)||b.type==="function"){return metawidget.util.createElement(c,"stub")}if(b["enum"]!==undefined||b.type==="string"||b.type==="boolean"||b.type==="number"||b.type==="integer"||b.type==="date"||b.type==="color"){return metawidget.util.createElement(c,"output")}if(metawidget.util.isTrueOrTrueString(b.dontExpand)){return metawidget.util.createElement(c,"output")}};metawidget.widgetbuilder.HtmlWidgetBuilder=function(a){if(!(this instanceof metawidget.widgetbuilder.HtmlWidgetBuilder)){throw new Error("Constructor called as a function")
-}var b=false;if(a!==undefined){b=a.alwaysUseNestedMetawidgetInTables}this.buildWidget=function(i,h,p){if(metawidget.util.isTrueOrTrueString(h.hidden)){return metawidget.util.createElement(p,"stub")}if(h.type==="boolean"&&h.componentType==="radio"&&h["enum"]===undefined){h["enum"]=[true,false];h.enumTitles=["Yes","No"]}if(h["enum"]!==undefined){var s,f,l;if(h.type==="array"||h.componentType!==undefined){var o=metawidget.util.createElement(p,"div");f=h["enum"].length;for(s=0;s<f;s++){var g=metawidget.util.createElement(p,"label");l=metawidget.util.createElement(p,"input");if(h.componentType!==undefined){g.setAttribute("class",h.componentType);l.setAttribute("type",h.componentType)}else{g.setAttribute("class","checkbox");l.setAttribute("type","checkbox")}l.value=h["enum"][s];g.appendChild(l);if(h.enumTitles!==undefined&&h.enumTitles[s]!==undefined){g.appendChild(metawidget.util.createTextNode(p,h.enumTitles[s]))}else{g.appendChild(metawidget.util.createTextNode(p,h["enum"][s]))}o.appendChild(g)}return o}var q=metawidget.util.createElement(p,"select");if(!metawidget.util.isTrueOrTrueString(h.required)){q.appendChild(metawidget.util.createElement(p,"option"))}f=h["enum"].length;for(s=0;s<f;s++){l=metawidget.util.createElement(p,"option");l.value=h["enum"][s];if(h.enumTitles!==undefined&&h.enumTitles[s]!==undefined){l.innerHTML=h.enumTitles[s]}else{l.innerHTML=h["enum"][s]}q.appendChild(l)}return q}if(h.type==="function"){var c=metawidget.util.createElement(p,"input");if(metawidget.util.isTrueOrTrueString(h.submit)){c.setAttribute("type","submit")}else{c.setAttribute("type","button")}c.setAttribute("value",metawidget.util.getLabelString(h,p));return c}if(h.type==="number"||h.type==="integer"){if(h.minimum!==undefined&&h.maximum!==undefined){var n=metawidget.util.createElement(p,"input");n.setAttribute("type","range");n.setAttribute("min",h.minimum);n.setAttribute("max",h.maximum);return n}var e=metawidget.util.createElement(p,"input");e.setAttribute("type","number");if(h.minimum!==undefined){e.setAttribute("min",h.minimum)
-}else{if(h.maximum!==undefined){e.setAttribute("max",h.maximum)}}if ( h.step !== undefined ) {
-                                    e.setAttribute( 'step', h.step );
-                                }
-                                else if (h.type === 'number'){
-                                    e.setAttribute( 'step', 'any' );
-                                }
-                                else {
-                                    e.setAttribute( 'step', '1' );
-                                }return e}if(h.type==="boolean"){var m=metawidget.util.createElement(p,"input");m.setAttribute("type","checkbox");return m}if(h.type==="date"){var t=metawidget.util.createElement(p,"input");t.setAttribute("type","date");return t}if(h.type==="color"){var r=metawidget.util.createElement(p,"input");r.setAttribute("type","color");return r}if(h.type==="string"){if(metawidget.util.isTrueOrTrueString(h.masked)){var d=metawidget.util.createElement(p,"input");d.setAttribute("type","password");if(h.maxLength!==undefined){d.setAttribute("maxlength",h.maxLength)}return d}if(metawidget.util.isTrueOrTrueString(h.large)){return metawidget.util.createElement(p,"textarea")}var j=metawidget.util.createElement(p,"input");if(h.componentType!==undefined){j.setAttribute("type",h.componentType)}else{j.setAttribute("type","text")}if(h.maxLength!==undefined){j.setAttribute("maxlength",h.maxLength)}return j}if(h.type==="array"){return this.createTable(i,h,p)}if(metawidget.util.isTrueOrTrueString(h.dontExpand)){var k=metawidget.util.createElement(p,"input");k.setAttribute("type","text");return k}};this.createTable=function(q,e,k){var m=metawidget.util.createElement(k,"table");var p=metawidget.util.splitPath(k.path);var l=metawidget.util.traversePath(k.toInspect,p.names);if(p.names===undefined){p.names=[]}var i;if(q!=="entity"&&l!==undefined){i=l[e.name];p.names.push(e.name)}else{i=l}p.names.push("0");var d=k.inspect(k.toInspect,p.type,p.names);if(d!==undefined){var f=metawidget.util.createElement(k,"tbody");var o,n;if(d.properties===undefined){m.appendChild(f);if(i!==undefined){n=i.length;for(o=0;o<n;o++){this.addRow(f,i,o,[{type:d.type}],q,e,k)}}}else{var c=metawidget.util.getSortedInspectionResultProperties(d);var g=metawidget.util.createElement(k,"thead");m.appendChild(g);var j=this.addHeaderRow(g,c,k);var h=metawidget.util.createElement(k,"tfoot");this.addFooterRow(h,j);if(h.childNodes.length>0){m.appendChild(h)}m.appendChild(f);
-if(i!==undefined){n=i.length;for(o=0;o<n;o++){this.addRow(f,i,o,j,q,e,k)}}}}return m};this.addHeaderRow=function(i,f,j){var h=metawidget.util.createElement(j,"tr");i.appendChild(h);var d=[];for(var c=0,g=f.length;c<g;c++){var e=f[c];if(this.addHeader(h,e,j)){d.push(e)}}return d};this.addHeader=function(f,c,g){if(metawidget.util.isTrueOrTrueString(c.hidden)){return false}var e=metawidget.util.createElement(g,"th");var d="";if(c.columnWidth!==undefined){d+="width:"+c.columnWidth+";"}if(c.columnAlign!==undefined){d+="text-align:"+c.columnAlign+";"}if(d!==""){e.setAttribute("style",d)}if(c.type!=="function"){e.innerHTML=metawidget.util.getLabelString(c,g)}f.appendChild(e);return true};this.addRow=function(f,i,k,c,l,d,j){var h=metawidget.util.createElement(j,"tr");f.appendChild(h);for(var g=0,e=c.length;g<e;g++){this.addColumn(h,i,k,c[g],l,d,j)}return h};this.addColumn=function(h,i,n,l,o,d,k){var e=metawidget.util.createElement(k,"td");var c="";if(l.columnWidth!==undefined){c+="width:"+l.columnWidth+";"}if(l.columnAlign!==undefined){c+="text-align:"+l.columnAlign+";"}if(c!==""){e.setAttribute("style",c)}var m=i[n];if(m!==undefined&&l.name!==undefined){m=m[l.name]}if(l.type===undefined||l.type==="array"||l.type==="function"||b===true){var f={};for(var g in l){f[g]=l[g]}if(f.name===undefined){f.name="["+n+"]"}else{f.name=metawidget.util.appendPathWithName("["+n+"]",f)}f.nameIncludesSeparator=true;if(o!=="entity"){f.name="."+metawidget.util.appendPathWithName(d.name,f)}if(f.readOnly===undefined){f.readOnly=d.readOnly}var j;if(l.type===undefined){j=k.buildNestedMetawidget(f)}else{j=k.buildNestedMetawidget(f,{layout:new metawidget.layout.SimpleLayout()})}k.nestedMetawidgets=k.nestedMetawidgets||[];k.nestedMetawidgets.push(j);e.appendChild(j)}else{if(m!==undefined){e.innerHTML=""+m}}h.appendChild(e);return e};this.addFooterRow=function(d,c){}}})();
-var metawidget=metawidget||{};(function(){metawidget.widgetprocessor=metawidget.widgetprocessor||{};metawidget.widgetprocessor.IdProcessor=function(){if(!(this instanceof metawidget.widgetprocessor.IdProcessor)){throw new Error("Constructor called as a function")}};metawidget.widgetprocessor.IdProcessor.prototype.processWidget=function(c,a,b,e){if(!metawidget.util.hasAttribute(c,"id")){var d=metawidget.util.getId(a,b,e);if(d!==undefined){c.setAttribute("id",d)}}return c};metawidget.widgetprocessor.RequiredAttributeProcessor=function(){if(!(this instanceof metawidget.widgetprocessor.RequiredAttributeProcessor)){throw new Error("Constructor called as a function")}};metawidget.widgetprocessor.RequiredAttributeProcessor.prototype.processWidget=function(c,a,b){if(metawidget.util.isTrueOrTrueString(b.required)){c.setAttribute("required","required")}return c};metawidget.widgetprocessor.PlaceholderAttributeProcessor=function(){if(!(this instanceof metawidget.widgetprocessor.PlaceholderAttributeProcessor)){throw new Error("Constructor called as a function")}};metawidget.widgetprocessor.PlaceholderAttributeProcessor.prototype.processWidget=function(c,a,b){if(b.placeholder!==undefined){c.setAttribute("placeholder",b.placeholder)}return c};metawidget.widgetprocessor.DisabledAttributeProcessor=function(){if(!(this instanceof metawidget.widgetprocessor.DisabledAttributeProcessor)){throw new Error("Constructor called as a function")}};metawidget.widgetprocessor.DisabledAttributeProcessor.prototype.processWidget=function(c,a,b){if(metawidget.util.isTrueOrTrueString(b.disabled)){c.setAttribute("disabled","disabled")}return c};metawidget.widgetprocessor.SimpleBindingProcessor=function(){if(!(this instanceof metawidget.widgetprocessor.SimpleBindingProcessor)){throw new Error("Constructor called as a function")}};metawidget.widgetprocessor.SimpleBindingProcessor.prototype.onStartBuild=function(a){a._simpleBindingProcessor={}};metawidget.widgetprocessor.SimpleBindingProcessor.prototype.processWidget=function(f,a,b,h){var c=metawidget.util.splitPath(h.path);
-if(f.tagName==="INPUT"&&(f.getAttribute("type")==="button"||f.getAttribute("type")==="submit")){f.onclick=function(){try{return metawidget.util.traversePath(h.toInspect,c.names)[b.name]()}catch(i){if(alert!==undefined){alert(i)}else{throw i}}};return f}var e;if(a==="entity"){e=metawidget.util.traversePath(h.toInspect,c.names);if(c.names===undefined){h._simpleBindingProcessor.topLevel=true}else{h._simpleBindingProcessor.topLevelWithPath=true}}else{var g=metawidget.util.traversePath(h.toInspect,c.names);if(g!==undefined){e=g[b.name]}else{e=undefined}}var d=this.bindToWidget(f,e,a,b,h);if(d===true||f.getMetawidget!==undefined||f.nestedMetawidgets!==undefined){h._simpleBindingProcessor.bindings=h._simpleBindingProcessor.bindings||[];h._simpleBindingProcessor.bindings[b.name]={widget:f,elementName:a,attributes:b}}return f};metawidget.widgetprocessor.SimpleBindingProcessor.prototype.bindToWidget=function(e,g,j,d,h){var c=(e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA");if(c===true&&metawidget.util.hasAttribute(e,"id")){e.setAttribute("name",e.getAttribute("id"))}var f,b;if(d["enum"]!==undefined&&e.tagName==="DIV"){if(d.type==="array"||d.componentType!==undefined){c=true;b=e.childNodes.length;for(f=0;f<b;f++){var a=e.childNodes[f];if(a.tagName==="DIV"){a=a.childNodes[0]}if(a.tagName==="LABEL"){var i=a.childNodes[0];if(i.tagName==="INPUT"){i.setAttribute("name",e.getAttribute("id"));if(d.type==="array"){i.checked=(g!==undefined&&g.indexOf(i.value)!==-1)}else{if(d.type==="boolean"){i.checked=(g===i.value||i.value===""+g)}else{i.checked=(g===i.value)}}}}}}}if(g!==undefined){if(e.tagName==="OUTPUT"||e.tagName==="TEXTAREA"){if(metawidget.util.isTrueOrTrueString(d.masked)){e.innerHTML=metawidget.util.fillString("*",g.length)}else{if(d.enumTitles!==undefined){if(d.type==="array"){b=g.length;for(f=0;f<b;f++){if(f===0){e.innerHTML=""}else{e.innerHTML+=", "}e.innerHTML+=metawidget.util.lookupEnumTitle(g[f],d["enum"],d.enumTitles)}}else{e.innerHTML=metawidget.util.lookupEnumTitle(g,d["enum"],d.enumTitles)
-}}else{if(d.type==="boolean"){if(g===true){e.innerHTML=metawidget.util.getLocalizedString("Yes",h)}else{if(g===false){e.innerHTML=metawidget.util.getLocalizedString("No",h)}else{e.innerHTML=g}}}else{e.innerHTML=g}}}}else{if(e.tagName==="INPUT"&&e.getAttribute("type")==="checkbox"){e.checked=g}else{if(c===true){e.value=g}}}}return c};metawidget.widgetprocessor.SimpleBindingProcessor.prototype.save=function(l){var m;var b=false;var n=metawidget.util.splitPath(l.path);if(n.names===undefined){m=l.toInspect}else{var f=n.names.slice(0,n.names.length-1);var j=metawidget.util.traversePath(l.toInspect,f);if(l._simpleBindingProcessor.topLevelWithPath===true){m=j}else{var k=n.names[n.names.length-1];m=j[k];if(m===undefined){m={};j[k]=m}}}for(var c in l._simpleBindingProcessor.bindings){var h=l._simpleBindingProcessor.bindings[c];var e=this.getWidgetFromBinding(h,l);if(e.getMetawidget!==undefined){var a=this.save(e.getMetawidget());if(a===true){b=true}continue}var i=this.saveFromWidget(h,l);if(b===false&&m[c]!==i){b=true}if(l._simpleBindingProcessor.topLevel===true){l.toInspect=i;return b}m[c]=i}if(l.nestedMetawidgets!==undefined){for(var g=0,d=l.nestedMetawidgets.length;g<d;g++){var a=this.save(l.nestedMetawidgets[g].getMetawidget());if(a===true){b=true}}}return b};metawidget.widgetprocessor.SimpleBindingProcessor.prototype.saveFromWidget=function(f,h){var c=this.getWidgetFromBinding(f,h);if(c.getAttribute("type")==="checkbox"){return c.checked}if(f.attributes.type==="integer"){var g=parseInt(c.value);if(isNaN(g)){return undefined}return g}if(f.attributes.type==="number"){var g=parseFloat(c.value);if(isNaN(g)){return undefined}return g}if(f.attributes["enum"]!==undefined&&c.tagName==="DIV"){if(f.attributes.type==="array"||f.attributes.componentType!==undefined){var e;for(var d=0,b=c.childNodes.length;d<b;d++){var a=c.childNodes[d];if(a.tagName==="DIV"){a=a.childNodes[0]}if(a.tagName==="LABEL"){var i=a.childNodes[0];if(i.checked){if(f.attributes.type==="boolean"){return(i.value===true||i.value==="true")
-}if(f.attributes.type!=="array"){return i.value}e=e||[];e.push(i.value)}}}return e}}if(f.attributes.type==="boolean"){return(c.value===true||c.value==="true")}if(c.value===""||c.value===null){return}return c.value};metawidget.widgetprocessor.SimpleBindingProcessor.prototype.getWidgetFromBinding=function(a,b){return a.widget};metawidget.widgetprocessor.SimpleBindingProcessor.prototype.reload=function(b,e){for(var a in e._simpleBindingProcessor.bindings){var d=e._simpleBindingProcessor.bindings[a];var c=this.getWidgetFromBinding(d,e);if(c.getMetawidget!==undefined){this.reload(b,c.getMetawidget());continue}this.bindToWidget(c,b[c.getAttribute("id")],d.elementName,d.attributes,e)}}})();
-var metawidget=metawidget||{};(function(){metawidget.Metawidget=function(d,a){if(!(this instanceof metawidget.Metawidget)){throw new Error("Constructor called as a function")}var f=this;d.getMetawidget=function(){return f};var c=new metawidget.Pipeline(d);c.inspector=new metawidget.inspector.PropertyTypeInspector();c.widgetBuilder=new metawidget.widgetbuilder.CompositeWidgetBuilder([new metawidget.widgetbuilder.OverriddenWidgetBuilder(),new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),new metawidget.widgetbuilder.HtmlWidgetBuilder()]);c.widgetProcessors=[new metawidget.widgetprocessor.IdProcessor(),new metawidget.widgetprocessor.RequiredAttributeProcessor(),new metawidget.widgetprocessor.PlaceholderAttributeProcessor(),new metawidget.widgetprocessor.DisabledAttributeProcessor(),new metawidget.widgetprocessor.SimpleBindingProcessor()];c.layout=new metawidget.layout.HeadingTagLayoutDecorator(new metawidget.layout.TableLayout());c.configure(a);var e=[];while(d.childNodes.length>0){var b=d.childNodes[0];d.removeChild(b);if(b.nodeType===1){e.push(b)}}this.reconfigure=function(g){return c.configure(g)};this.save=function(){return c.getWidgetProcessor(function(g){return g instanceof metawidget.widgetprocessor.SimpleBindingProcessor}).save(this)};this.getWidgetProcessor=function(g){return c.getWidgetProcessor(g)};this.setLayout=function(g){c.layout=g};this.inspect=function(i,g,h){return c.inspect(i,g,h,this)};this.buildWidgets=function(j){this.overriddenNodes=[];for(var g=0,i=e.length;g<i;g++){this.overriddenNodes.push(e[g].cloneNode(true))}if(j===undefined){if(arguments.length>0){throw new Error("Calling buildWidgets( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead")}var h=metawidget.util.splitPath(this.path);j=c.inspect(this.toInspect,h.type,h.names,this)}c.buildWidgets(j,this)};this.getElement=function(){return c.element};this.clearWidgets=function(){var g=this.getElement();while(g.childNodes.length>0){g.removeChild(g.childNodes[0])
-}};this.buildNestedMetawidget=function(g,h){var j=metawidget.util.createElement(this,"div");var i=new metawidget.Metawidget(j,[c,h]);i.toInspect=this.toInspect;i.path=metawidget.util.appendPath(g,this);i.readOnly=this.readOnly||metawidget.util.isTrueOrTrueString(g.readOnly);i.buildWidgets();return j}};metawidget.Pipeline=function(a){if(!(this instanceof metawidget.Pipeline)){throw new Error("Constructor called as a function")}this.inspectionResultProcessors=[];this.widgetProcessors=[];this.element=a;this.maximumInspectionDepth=10};metawidget.Pipeline.prototype.configure=function(b){if(b===undefined){return}var a;if(b instanceof Array){for(a=0;a<b.length;a++){this.configure(b[a])}return}if(b.inspector!==undefined){this.inspector=b.inspector}if(b.inspectionResultProcessors!==undefined){this.inspectionResultProcessors=b.inspectionResultProcessors.slice(0)}if(b.prependInspectionResultProcessors!==undefined){if(!(b.prependInspectionResultProcessors instanceof Array)){b.prependInspectionResultProcessors=[b.prependInspectionResultProcessors]}for(a=0;a<b.prependInspectionResultProcessors.length;a++){this.inspectionResultProcessors.splice(a,0,b.prependInspectionResultProcessors[a])}}if(b.appendInspectionResultProcessors!==undefined){if(!(b.appendInspectionResultProcessors instanceof Array)){b.appendInspectionResultProcessors=[b.appendInspectionResultProcessors]}for(a=0;a<b.appendInspectionResultProcessors.length;a++){this.inspectionResultProcessors.push(b.appendInspectionResultProcessors[a])}}if(b.widgetBuilder!==undefined){this.widgetBuilder=b.widgetBuilder}if(b.widgetProcessors!==undefined){this.widgetProcessors=b.widgetProcessors.slice(0)}if(b.prependWidgetProcessors!==undefined){if(!(b.prependWidgetProcessors instanceof Array)){b.prependWidgetProcessors=[b.prependWidgetProcessors]}for(a=0;a<b.prependWidgetProcessors.length;a++){this.widgetProcessors.splice(a,0,b.prependWidgetProcessors[a])}}if(b.appendWidgetProcessors!==undefined){if(!(b.appendWidgetProcessors instanceof Array)){b.appendWidgetProcessors=[b.appendWidgetProcessors]
-}for(a=0;a<b.appendWidgetProcessors.length;a++){this.widgetProcessors.push(b.appendWidgetProcessors[a])}}if(b.layout!==undefined){this.layout=b.layout}if(b.maximumInspectionDepth!==undefined){this.maximumInspectionDepth=b.maximumInspectionDepth-1}if(b.styleClass!==undefined){this.styleClass=b.styleClass;metawidget.util.appendToAttribute(this.element,"class",b.styleClass)}};metawidget.Pipeline.prototype.getWidgetProcessor=function(b){for(var a=0,c=this.widgetProcessors.length;a<c;a++){var d=this.widgetProcessors[a];if(b(d)){return d}}};metawidget.Pipeline.prototype.inspect=function(g,c,f,h){var e;if(this.inspector.inspect!==undefined){e=this.inspector.inspect(g,c,f)}else{e=this.inspector(g,c,f)}if(e===undefined){return}for(var a=0,d=this.inspectionResultProcessors.length;a<d;a++){var b=this.inspectionResultProcessors[a];if(b.processInspectionResult!==undefined){e=b.processInspectionResult(e,h,g,c,f)}else{e=b(e,h,g,c,f)}if(e===undefined){return}}return e};metawidget.Pipeline.prototype.buildWidgets=function(h,m){m.clearWidgets();d(this,m);if(h!==undefined){var c=a(h,m,"properties");var n="entity";var i=g(this,n,c,m);if(i!==undefined){i=k(this,i,n,c,m);if(i!==undefined){this.layoutWidget(i,n,c,this.element,m)}}else{var f=metawidget.util.getSortedInspectionResultProperties(h);for(var j=0,e=f.length;j<e;j++){c=a(f[j],m);if(c.type==="function"){n="action"}else{n="property"}i=g(this,n,c,m);if(i===undefined){if(this.maximumInspectionDepth<=0){continue}i=m.buildNestedMetawidget(c);if(i===undefined){continue}}i=k(this,i,n,c,m);if(i!==undefined){this.layoutWidget(i,n,c,this.element,m)}}}}l(this,m);if(this.element.dispatchEvent!==undefined){this.element.dispatchEvent(metawidget.util.createEvent(m,"buildEnd"))}function a(o,s,r){var q={};for(var p in o){if(r!==undefined&&r.indexOf(p)!==-1){continue}q[p]=o[p]}if(s.readOnly===true){q.readOnly="true"}return q}function d(p,r){for(var o=0,q=r.overriddenNodes.length;o<q;o++){r.overriddenNodes[o].overridden=true}if(p.widgetBuilder.onStartBuild!==undefined){p.widgetBuilder.onStartBuild(r)
-}b("onStartBuild",p,r);if(p.layout.onStartBuild!==undefined){p.layout.onStartBuild(r)}if(p.layout.startContainerLayout!==undefined){p.layout.startContainerLayout(p.element,r)}}function g(q,o,p,r){if(q.widgetBuilder.buildWidget!==undefined){return q.widgetBuilder.buildWidget(o,p,r)}return q.widgetBuilder(o,p,r)}function k(r,t,o,q,v){for(var p=0,s=r.widgetProcessors.length;p<s;p++){var u=r.widgetProcessors[p];if(u.processWidget!==undefined){t=u.processWidget(t,o,q,v)}else{t=u(t,o,q,v)}if(t===undefined){return}}return t}function l(p,u){if(u.onEndBuild!==undefined){u.onEndBuild()}else{while(u.overriddenNodes.length>0){var t=u.overriddenNodes[0];u.overriddenNodes.splice(0,1);if(t.tagName==="FACET"){continue}var r={section:""};if(t.tagName==="STUB"){for(var o=0,q=t.attributes.length;o<q;o++){var s=t.attributes[o];r[s.nodeName]=s.nodeValue}}p.layoutWidget(t,"property",r,p.element,u)}}if(p.layout.endContainerLayout!==undefined){p.layout.endContainerLayout(p.element,u)}if(p.layout.onEndBuild!==undefined){p.layout.onEndBuild(u)}b("onEndBuild",p,u);if(p.widgetBuilder.onEndBuild!==undefined){p.widgetBuilder.onEndBuild(u)}}function b(r,p,t){for(var o=0,q=p.widgetProcessors.length;o<q;o++){var s=p.widgetProcessors[o];if(s[r]!==undefined){s[r](t)}}}};metawidget.Pipeline.prototype.layoutWidget=function(d,a,c,b,e){if(this.layout.layoutWidget!==undefined){this.layout.layoutWidget(d,a,c,b,e);return}this.layout(d,a,c,b,e)}})();
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-inspectionresultprocessors.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-inspectionresultprocessors.js
deleted file mode 100755
index a4068f007abf8ef661a196507c7e6719f6364253..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-inspectionresultprocessors.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace InspectionResultProcessors.
-	 */
-
-	metawidget.inspectionresultprocessor = metawidget.inspectionresultprocessor || {};
-	
-} )();
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-inspectors.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-inspectors.js
deleted file mode 100755
index 3ef91916547fc09c1d2d9604cca1765bd554805d..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-inspectors.js
+++ /dev/null
@@ -1,314 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace Inspectors.
-	 *            <p>
-	 *            Inspectors must implement an interface:
-	 *            </p>
-	 *            <tt>function( toInspect, type, names )</tt>
-	 *            <p>
-	 *            Each Inspector must look to the 'type' parameter and the
-	 *            'names' array. These form a path into the domain object model.
-	 *            For example the 'type' may be 'person' and the 'names' may be [
-	 *            'address', 'street' ]. This would form a path into the domain
-	 *            model of 'person/address/street' (i.e. return information on
-	 *            the 'street' property within the 'address' property of the
-	 *            'person' type).
-	 *            </p>
-	 */
-
-	metawidget.inspector = metawidget.inspector || {};
-
-	/**
-	 * @class Delegates inspection to one or more sub-inspectors, then combines
-	 *        the resulting metadata using
-	 *        <tt>metawidget.util.combineInspectionResults</tt>.
-	 *        <p>
-	 *        The combining algorithm should be suitable for most use cases, but
-	 *        one benefit of having a separate CompositeInspector is that
-	 *        developers can replace it with their own version, with its own
-	 *        combining algorithm, if required.
-	 *        <p>
-	 *        Note: the name <em>Composite</em>Inspector refers to the
-	 *        Composite design pattern.
-	 */
-
-	metawidget.inspector.CompositeInspector = function( config ) {
-
-		if ( ! ( this instanceof metawidget.inspector.CompositeInspector ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _inspectors;
-
-		if ( config.inspectors !== undefined ) {
-			_inspectors = config.inspectors.slice( 0 );
-		} else {
-			_inspectors = config.slice( 0 );
-		}
-
-		this.inspect = function( toInspect, type, names ) {
-
-			var compositeInspectionResult = {};
-
-			for ( var ins = 0, insLength = _inspectors.length; ins < insLength; ins++ ) {
-
-				var inspectionResult;
-				var inspector = _inspectors[ins];
-
-				if ( inspector.inspect !== undefined ) {
-					inspectionResult = inspector.inspect( toInspect, type, names );
-				} else {
-					inspectionResult = inspector( toInspect, type, names );
-				}
-
-				metawidget.util.combineInspectionResults( compositeInspectionResult, inspectionResult );
-			}
-
-			return compositeInspectionResult;
-		};
-	};
-
-	/**
-	 * @class Inspects JavaScript objects for their property names and types.
-	 *        <p>
-	 *        In principal, ordering of property names within JavaScript objects
-	 *        is not guaranteed. In practice, most browsers respect the original
-	 *        order that properties were defined in. However you may want to
-	 *        combine PropertyTypeInspector with a custom Inspector that imposes
-	 *        a defined ordering using 'propertyOrder' attributes.
-	 */
-
-	metawidget.inspector.PropertyTypeInspector = function() {
-
-		if ( ! ( this instanceof metawidget.inspector.PropertyTypeInspector ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.inspector.PropertyTypeInspector.prototype.inspect = function( toInspect, type, names ) {
-
-		/**
-		 * Inspect the type of the property as best we can.
-		 */
-
-		function _getTypeOf( value ) {
-
-			// JSON Schema primitive types are: 'array', 'boolean',
-			// 'number', 'null', 'object' and 'string'
-
-			if ( value instanceof Array ) {
-
-				// typeof never returns 'array', even though JavaScript has
-				// a built-in Array type
-
-				return 'array';
-
-			} else if ( value instanceof Date ) {
-
-				// typeof never returns 'date', even though JavaScript has a
-				// built-in Date type
-
-				return 'date';
-
-			} else {
-
-				var typeOfProperty = typeof ( value );
-
-				// type 'object' doesn't convey much, and can override a
-				// more descriptive inspection result from a previous
-				// Inspector. If you leave it off, Metawidget's default
-				// behaviour is to recurse into the object anyway
-
-				if ( typeOfProperty !== 'object' ) {
-					return typeOfProperty;
-				}
-			}
-		}
-
-		// Traverse names
-
-		toInspect = metawidget.util.traversePath( toInspect, names );
-
-		var inspectionResult = {};
-
-		// Inspect root node. Important if the Metawidget is
-		// pointed directly at a primitive type
-
-		if ( names !== undefined && names.length > 0 ) {
-			inspectionResult.name = names[names.length - 1];
-		} else {
-
-			// Nothing useful to return?
-
-			if ( toInspect === undefined ) {
-				return;
-			}
-		}
-
-		if ( toInspect !== undefined ) {
-
-			inspectionResult.type = _getTypeOf( toInspect );
-
-			if ( inspectionResult.type === undefined ) {
-
-				inspectionResult.properties = {};
-
-				for ( var property in toInspect ) {
-
-					inspectionResult.properties[property] = {
-						type: _getTypeOf( toInspect[property] )
-					};
-				}
-			}
-		}
-
-		return inspectionResult;
-	};
-
-	/**
-	 * @class Inspects JSON Schemas for their properties.
-	 *        <p>
-	 *        Because Metawidget <em>already</em> uses JSON Schema (v3)
-	 *        internally as its inspection result format, this Inspector does
-	 *        not need to do much. However it adds support for:
-	 *        <p>
-	 *        <ul>
-	 *        <li>schemas that contain nested schemas (by traversing the given
-	 *        'names' array)</li>
-	 *        <li>checking the 'type' property of the schema</li>
-	 *        <li>schemas that describe arrays (by traversing the 'items'
-	 *        property)</li>
-	 *        <li>schemas that have a top-level 'required' array (JSON Schema
-	 *        v4)</li>
-	 *        </ul>
-	 */
-
-	metawidget.inspector.JsonSchemaInspector = function( config ) {
-
-		if ( ! ( this instanceof metawidget.inspector.JsonSchemaInspector ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _schema;
-
-		if ( config.schema !== undefined ) {
-			_schema = config.schema;
-		} else {
-			_schema = config;
-		}
-
-		this.inspect = function( toInspect, type, names ) {
-
-			/**
-			 * Specialized version of <tt>metawidget.util.traversePath</tt>
-			 * that supports 'properties' and 'items'.
-			 */
-
-			function _traversePath( toInspect, names ) {
-
-				if ( toInspect === undefined ) {
-					return undefined;
-				}
-
-				if ( names !== undefined ) {
-
-					// Sanity check for passing a single string
-
-					if ( ! ( names instanceof Array ) ) {
-						throw new Error( "Expected array of names" );
-					}
-
-					for ( var loop = 0, length = names.length; loop < length; loop++ ) {
-
-						// Support 'items' property (for arrays)
-
-						var name = names[loop];
-
-						if ( !isNaN( name ) ) {
-
-							toInspect = toInspect.items;
-
-							if ( toInspect === undefined ) {
-								return undefined;
-							}
-
-							// We ignore the actual array index. We assume the
-							// JSON Schema describes a homogeneous array,
-							// regardless of the index
-
-							continue;
-						}
-
-						// Support 'properties' property
-
-						toInspect = toInspect.properties;
-
-						if ( toInspect === undefined ) {
-							return undefined;
-						}
-
-						toInspect = toInspect[name];
-
-						// We don't need to worry about array indexes here: they
-						// should have been parsed out by splitPath
-
-						if ( toInspect === undefined ) {
-							return undefined;
-						}
-					}
-				}
-
-				return toInspect;
-			}
-
-			// Traverse names using 'properties' and 'items' as appropriate
-
-			var traversed = _traversePath( _schema, names );
-
-			if ( traversed === undefined ) {
-				return undefined;
-			}
-
-			// Copy values
-
-			var inspectionResult = {};
-			if ( names !== undefined ) {
-				inspectionResult.name = names[names.length - 1];
-			}
-			metawidget.util.combineInspectionResults( inspectionResult, traversed );
-
-			// Copy top-level 'required' array into each property (JSON Schema
-			// v4)
-
-			if ( inspectionResult.required !== undefined ) {
-
-				for ( var loop = 0, length = inspectionResult.required.length; loop < length; loop++ ) {
-
-					inspectionResult.properties[inspectionResult.required[loop]].required = true;
-				}
-			}
-
-			return inspectionResult;
-		};
-	};
-} )();
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-layouts.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-layouts.js
deleted file mode 100755
index a487a6cc0380f26bc3e9987f170932609538f3aa..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-layouts.js
+++ /dev/null
@@ -1,872 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace Layouts.
-	 */
-
-	metawidget.layout = metawidget.layout || {};
-
-	/**
-	 * @class Layout to simply output components one after another, with no
-	 *        labels and no structure. This Layout is suited to rendering single
-	 *        components, or for rendering components whose layout relies
-	 *        entirely on CSS.
-	 */
-
-	metawidget.layout.SimpleLayout = function() {
-
-		if ( ! ( this instanceof metawidget.layout.SimpleLayout ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.layout.SimpleLayout.prototype.layoutWidget = function( widget, elementName, attributes, container ) {
-
-		if ( widget.tagName === 'STUB' && !metawidget.util.hasChildElements( widget ) ) {
-			return;
-		}
-
-		container.appendChild( widget );
-	};
-
-	/**
-	 * @class Layout to arrange widgets using dl/dt/dd tags.
-	 */
-
-	metawidget.layout.DefinitionListLayout = function( config ) {
-
-		if ( ! ( this instanceof metawidget.layout.DefinitionListLayout ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _labelStyleClass = config !== undefined ? config.labelStyleClass : undefined;
-		var _labelSuffix = config !== undefined && config.labelSuffix !== undefined ? config.labelSuffix : ':';
-
-		this.startContainerLayout = function( container, mw ) {
-
-			var dl = metawidget.util.createElement( mw, 'dl' );
-			if ( mw.path !== undefined ) {
-				var id = metawidget.util.getId( "property", {}, mw );
-				if ( id !== undefined ) {
-					dl.setAttribute( 'id', 'dl-' + id );
-				}
-			}
-
-			container.appendChild( dl );
-		};
-
-		this.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-			if ( widget.tagName === 'STUB' && !metawidget.util.hasChildElements( widget ) ) {
-				return;
-			}
-
-			// Label
-
-			var dl = container.childNodes[container.childNodes.length - 1];
-			this.layoutLabel( dl, widget, elementName, attributes, mw );
-
-			// Widget
-
-			var dd = metawidget.util.createElement( mw, 'dd' );
-			dd.appendChild( widget );
-			dl.appendChild( dd );
-		};
-
-		this.layoutLabel = function( dl, widget, elementName, attributes, mw ) {
-
-			if ( elementName === 'entity' || elementName === 'action' ) {
-				return;
-			}
-
-			if ( attributes.name === undefined && attributes.title === undefined ) {
-				return;
-			}
-
-			var labelString = metawidget.util.getLabelString( attributes, mw );
-
-			if ( labelString === '' || labelString === null ) {
-				return;
-			}
-
-			var dt = metawidget.util.createElement( mw, 'dt' );
-
-			var label = metawidget.util.createElement( mw, 'label' );
-			if ( widget.getAttribute( 'id' ) !== null ) {
-				label.setAttribute( 'for', widget.getAttribute( 'id' ) );
-			}
-
-			if ( _labelStyleClass !== undefined ) {
-				label.setAttribute( 'class', _labelStyleClass );
-			}
-
-			label.innerHTML = labelString + _labelSuffix;
-
-			dt.appendChild( label );
-			dl.appendChild( dt );
-		};
-	};
-
-	/**
-	 * @class Layout to arrange widgets using div tags.
-	 */
-
-	metawidget.layout.DivLayout = function( config ) {
-
-		if ( ! ( this instanceof metawidget.layout.DivLayout ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _divStyleClasses = config !== undefined ? config.divStyleClasses : undefined;
-		var _labelStyleClass = config !== undefined ? config.labelStyleClass : undefined;
-		var _labelSuffix = config !== undefined && config.labelSuffix !== undefined ? config.labelSuffix : ':';
-		var _suppressDivAroundLabel = config !== undefined && config.suppressDivAroundLabel !== undefined ? config.suppressDivAroundLabel : false;
-		var _suppressDivAroundWidget = config !== undefined && config.suppressDivAroundWidget !== undefined ? config.suppressDivAroundWidget : false;
-		var _appendRequiredClassOnLabelDiv = config !== undefined && config.appendRequiredClassOnLabelDiv !== undefined ? config.appendRequiredClassOnLabelDiv : undefined;
-		var _appendRequiredClassOnWidgetDiv = config !== undefined && config.appendRequiredClassOnWidgetDiv !== undefined ? config.appendRequiredClassOnWidgetDiv : undefined;
-
-		// REFACTOR: make this _suppressLabelSuffixOn and allow pass array of
-		// types
-
-		var _suppressLabelSuffixOnCheckboxes = config !== undefined && config.suppressLabelSuffixOnCheckboxes !== undefined ? config.suppressLabelSuffixOnCheckboxes : false;
-		var _wrapInsideLabels = config !== undefined && config.wrapInsideLabels !== undefined ? config.wrapInsideLabels : undefined;
-		var _wrapWithExtraDiv = config !== undefined && config.wrapWithExtraDiv !== undefined ? config.wrapWithExtraDiv : undefined;
-
-		this.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-			if ( widget.tagName === 'STUB' && !metawidget.util.hasChildElements( widget ) ) {
-				return;
-			}
-
-			// Collapse buttons into the previous div, if it also contained a
-			// button
-
-			if ( widget.tagName === 'INPUT' && ( widget.getAttribute( 'type' ) === 'button' || widget.getAttribute( 'type' ) === 'submit' ) ) {
-
-				if ( container.childNodes.length > 0 ) {
-
-					var lastOuterDiv = container.childNodes[container.childNodes.length - 1];
-					if ( lastOuterDiv.childNodes.length === 1 ) {
-						var lastWidgetDiv = lastOuterDiv.childNodes[0];
-						if ( lastWidgetDiv.childNodes.length > 0 ) {
-							var lastWidget = lastWidgetDiv.childNodes[lastWidgetDiv.childNodes.length - 1];
-							if ( lastWidget.tagName === 'INPUT' && ( lastWidget.getAttribute( 'type' ) === 'button' || lastWidget.getAttribute( 'type' ) === 'submit' ) ) {
-								lastWidgetDiv.appendChild( widget );
-								return;
-							}
-						}
-					}
-				}
-			}
-
-			var outerDiv = metawidget.util.createElement( mw, 'div' );
-			if ( _divStyleClasses !== undefined && _divStyleClasses[0] !== undefined ) {
-				outerDiv.setAttribute( 'class', _divStyleClasses[0] );
-			}
-
-			// Label
-
-			var labelWidget = this.layoutLabel( outerDiv, widget, elementName, attributes, mw );
-
-			// Widget
-			
-			var toAppendToOuterDiv = widget;
-
-			// _wrapInsideLabels
-
-			if ( widget.tagName === 'INPUT' && metawidget.util.niceIndexOf( _wrapInsideLabels, widget.getAttribute( 'type' ) ) !== -1 ) {
-				labelWidget.insertBefore( widget, labelWidget.firstChild );
-				toAppendToOuterDiv = labelWidget;
-			} else {
-				toAppendToOuterDiv = widget;
-			}
-
-			// _wrapWithExtraDiv
-
-			if ( widget.tagName === 'INPUT' && _wrapWithExtraDiv !== undefined && _wrapWithExtraDiv[widget.getAttribute( 'type' )] !== undefined ) {
-
-				var extraDiv = metawidget.util.createElement( mw, 'div' );
-				extraDiv.setAttribute( 'class', _wrapWithExtraDiv[widget.getAttribute( 'type' )] );
-				extraDiv.appendChild( toAppendToOuterDiv );
-				toAppendToOuterDiv = extraDiv;
-			}
-
-			// Wrap with div
-			
-			if ( _suppressDivAroundWidget !== true ) {
-				var widgetDiv = metawidget.util.createElement( mw, 'div' );
-				if ( _divStyleClasses !== undefined && _divStyleClasses[2] !== undefined ) {
-					widgetDiv.setAttribute( 'class', _divStyleClasses[2] );
-				}
-
-				// Useful for CSS :after selectors
-
-				if ( metawidget.util.isTrueOrTrueString( attributes.required ) && _appendRequiredClassOnWidgetDiv !== undefined ) {
-					metawidget.util.appendToAttribute( widgetDiv, 'class', _appendRequiredClassOnWidgetDiv );
-				}
-				widgetDiv.appendChild( toAppendToOuterDiv );
-				toAppendToOuterDiv = widgetDiv;
-			}
-
-			outerDiv.appendChild( toAppendToOuterDiv );
-			container.appendChild( outerDiv );
-		};
-
-		/**
-		 * @return the label widget
-		 */
-
-		this.layoutLabel = function( outerDiv, widget, elementName, attributes, mw ) {
-
-			if ( elementName === 'entity' || elementName === 'action' ) {
-				return;
-			}
-
-			if ( attributes.name === undefined && attributes.title === undefined ) {
-				return;
-			}
-
-			var labelString = this.getLabelString( widget, attributes, mw );
-
-			if ( labelString === '' || labelString === null ) {
-				return;
-			}
-
-			var label = metawidget.util.createElement( mw, 'label' );
-			if ( widget.getAttribute( 'id' ) !== null ) {
-				label.setAttribute( 'for', widget.getAttribute( 'id' ) );
-				label.setAttribute( 'id', widget.getAttribute( 'id' ) + '-label' );
-			}
-
-			if ( _labelStyleClass !== undefined ) {
-				label.setAttribute( 'class', _labelStyleClass );
-			}
-
-			label.innerHTML = labelString;
-
-			if ( _suppressDivAroundLabel === true ) {
-				outerDiv.appendChild( label );
-			} else {
-				var labelDiv = metawidget.util.createElement( mw, 'div' );
-				if ( _divStyleClasses !== undefined && _divStyleClasses[1] !== undefined ) {
-					labelDiv.setAttribute( 'class', _divStyleClasses[1] );
-				}
-
-				// Useful for CSS :after selectors
-
-				if ( metawidget.util.isTrueOrTrueString( attributes.required ) && _appendRequiredClassOnLabelDiv !== undefined ) {
-					metawidget.util.appendToAttribute( labelDiv, 'class', _appendRequiredClassOnLabelDiv );
-				}
-
-				labelDiv.appendChild( label );
-				outerDiv.appendChild( labelDiv );
-			}
-
-			return label;
-		};
-
-		/**
-		 * @returns the label string, or a blank string if no label.
-		 */
-
-		this.getLabelString = function( widget, attributes, mw ) {
-
-			var labelString = metawidget.util.getLabelString( attributes, mw );
-
-			if ( labelString === '' || labelString === null ) {
-				return labelString;
-			}
-
-			// Some UI frameworks (like JQuery Mobile) reuse the checkbox label
-			// alongside the checkbox itself. This looks bad if we keep the
-			// suffix
-
-			if ( _suppressLabelSuffixOnCheckboxes === true && widget.tagName === 'INPUT' ) {
-				if ( widget.getAttribute( 'type' ) === 'checkbox' || widget.getAttribute( 'type' ) === 'radio' ) {
-					return labelString;
-				}
-			}
-
-			return labelString + _labelSuffix;
-		};
-	};
-
-	/**
-	 * @class Layout to arrange widgets in a table, with one column for the
-	 *        label and another for the widget.
-	 */
-
-	metawidget.layout.TableLayout = function( config ) {
-
-		if ( ! ( this instanceof metawidget.layout.TableLayout ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _tableStyleClass = config !== undefined ? config.tableStyleClass : undefined;
-		var _columnStyleClasses = config !== undefined ? config.columnStyleClasses : undefined;
-		var _headerStyleClass = config !== undefined ? config.headerStyleClass : undefined;
-		var _footerStyleClass = config !== undefined ? config.footerStyleClass : undefined;
-		var _numberOfColumns = config !== undefined && config.numberOfColumns ? config.numberOfColumns : 1;
-
-		this.startContainerLayout = function( container, mw ) {
-
-			var table = metawidget.util.createElement( mw, 'table' );
-			if ( mw.path !== undefined ) {
-				var id = metawidget.util.getId( "property", {}, mw );
-				if ( id !== undefined ) {
-					table.setAttribute( 'id', 'table-' + id );
-				}
-			}
-
-			if ( _tableStyleClass !== undefined ) {
-				table.setAttribute( 'class', _tableStyleClass );
-			}
-
-			container._currentColumn = 0;
-			container.appendChild( table );
-
-			// Facets
-
-			if ( mw.overriddenNodes !== undefined ) {
-				for ( var loop1 = 0, length1 = mw.overriddenNodes.length; loop1 < length1; loop1++ ) {
-
-					var child = mw.overriddenNodes[loop1];
-
-					if ( child.tagName !== 'FACET' ) {
-						continue;
-					}
-
-					// thead or tfoot
-
-					var parent;
-
-					if ( child.getAttribute( 'name' ) === 'header' ) {
-						parent = metawidget.util.createElement( mw, 'thead' );
-					} else if ( child.getAttribute( 'name' ) === 'footer' ) {
-						parent = metawidget.util.createElement( mw, 'tfoot' );
-					} else {
-						continue;
-					}
-
-					table.appendChild( parent );
-					var tr = metawidget.util.createElement( mw, 'tr' );
-					parent.appendChild( tr );
-					var td = metawidget.util.createElement( mw, 'td' );
-					td.setAttribute( 'colspan', _numberOfColumns * 3 );
-
-					if ( child.getAttribute( 'name' ) === 'header' ) {
-						if ( _headerStyleClass !== undefined ) {
-							td.setAttribute( 'class', _headerStyleClass );
-						}
-					} else {
-						if ( _footerStyleClass !== undefined ) {
-							td.setAttribute( 'class', _footerStyleClass );
-						}
-					}
-
-					tr.appendChild( td );
-
-					// Append children, so as to unwrap the 'facet' tag
-
-					while ( child.childNodes.length > 0 ) {
-						td.appendChild( child.removeChild( child.childNodes[0] ) );
-					}
-				}
-			}
-
-			// tbody
-
-			table.appendChild( metawidget.util.createElement( mw, 'tbody' ) );
-		};
-
-		this.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-			// Do not render empty stubs
-
-			if ( widget.tagName === 'STUB' && !metawidget.util.hasChildElements( widget ) ) {
-				return;
-			}
-
-			// Special support for large components
-
-			var spanAllColumns = metawidget.util.isSpanAllColumns( attributes );
-
-			if ( spanAllColumns === true && container._currentColumn > 0 ) {
-				container._currentColumn = 0;
-			}
-
-			// Id
-
-			var table = container.childNodes[container.childNodes.length - 1];
-			var idPrefix = undefined;
-
-			if ( attributes.name !== undefined ) {
-				if ( metawidget.util.hasAttribute( table, 'id' )) {
-					idPrefix = table.getAttribute( 'id' );
-				}
-
-				if ( idPrefix !== undefined ) {
-					if ( elementName !== 'entity' ) {
-						if ( idPrefix.charAt( idPrefix.length - 1 ) !== '-' ) {
-							idPrefix += metawidget.util.capitalize( attributes.name );
-						} else {
-							idPrefix += attributes.name;
-						}
-					}
-				} else {
-					idPrefix = 'table-' + attributes.name;
-				}
-			}
-
-			// Start column
-
-			var tbody = table.childNodes[table.childNodes.length - 1];
-			var tr;
-
-			if ( container._currentColumn === 0 ) {
-				tr = metawidget.util.createElement( mw, 'tr' );
-				if ( idPrefix !== undefined ) {
-					tr.setAttribute( 'id', idPrefix + '-row' );
-				}
-				tbody.appendChild( tr );
-			} else {
-				tr = tbody.childNodes[tbody.childNodes.length - 1];
-			}
-
-			// Label
-
-			this.layoutLabel( tr, idPrefix, widget, elementName, attributes, mw );
-
-			// Widget
-
-			var td = metawidget.util.createElement( mw, 'td' );
-
-			if ( idPrefix !== undefined ) {
-				td.setAttribute( 'id', idPrefix + '-cell' );
-			}
-
-			if ( _columnStyleClasses !== undefined && _columnStyleClasses[1] !== undefined ) {
-				td.setAttribute( 'class', _columnStyleClasses[1] );
-			}
-
-			if ( spanAllColumns === true ) {
-				td.setAttribute( 'colspan', ( ( _numberOfColumns * 3 ) - 1 ) - tr.childNodes.length );
-			} else if ( tr.childNodes.length < 1 ) {
-				td.setAttribute( 'colspan', 2 - tr.childNodes.length );
-			}
-
-			td.appendChild( widget );
-			tr.appendChild( td );
-
-			// Required
-
-			this.layoutRequired( tr, attributes, mw );
-
-			// Next column
-
-			if ( spanAllColumns === true ) {
-				container._currentColumn = _numberOfColumns - 1;
-			}
-
-			container._currentColumn = ( container._currentColumn + 1 ) % _numberOfColumns;
-		};
-
-		this.layoutLabel = function( tr, idPrefix, widget, elementName, attributes, mw ) {
-
-			if ( elementName === 'entity' ) {
-				return;
-			}
-
-			if ( attributes.name === undefined && attributes.title === undefined ) {
-				return;
-			}
-
-			var labelString = this.getLabelString( attributes, mw );
-
-			if ( labelString === null ) {
-				return;
-			}
-
-			// Label
-
-			var th = metawidget.util.createElement( mw, 'th' );
-
-			if ( idPrefix !== undefined ) {
-				th.setAttribute( 'id', idPrefix + '-label-cell' );
-			}
-
-			if ( _columnStyleClasses !== undefined && _columnStyleClasses[0] !== undefined ) {
-				th.setAttribute( 'class', _columnStyleClasses[0] );
-			}
-
-			if ( elementName !== 'action' && labelString !== '' ) {
-				var label = metawidget.util.createElement( mw, 'label' );
-
-				if ( metawidget.util.hasAttribute( widget, 'id' )) {
-					label.setAttribute( 'for', widget.getAttribute( 'id' ) );
-				}
-
-				if ( idPrefix !== undefined ) {
-					label.setAttribute( 'id', idPrefix + '-label' );
-				}
-
-				label.innerHTML = labelString;
-				th.appendChild( label );
-			}
-
-			tr.appendChild( th );
-		};
-
-		this.layoutRequired = function( tr, attributes, mw ) {
-
-			var td = metawidget.util.createElement( mw, 'td' );
-
-			if ( _columnStyleClasses !== undefined && _columnStyleClasses[2] !== undefined ) {
-				td.setAttribute( 'class', _columnStyleClasses[2] );
-			}
-
-			if ( !metawidget.util.isTrueOrTrueString( attributes.readOnly ) && metawidget.util.isTrueOrTrueString( attributes.required ) ) {
-				td.innerHTML = '*';
-			}
-
-			tr.appendChild( td );
-		};
-
-		/**
-		 * @returns the label string, a blank string if no label, or null
-		 */
-
-		this.getLabelString = function( attributes, mw ) {
-
-			var labelString = metawidget.util.getLabelString( attributes, mw );
-
-			if ( labelString === '' || labelString === null ) {
-				return labelString;
-			}
-
-			return labelString + ':';
-		};
-	};
-
-	//
-	// LayoutDecorator
-	//
-
-	/**
-	 * Augment the given 'decorator' with methods suitable for making section
-	 * separator LayoutDecorators.
-	 * <p>
-	 * This includes implementing <tt>onStartBuild</tt>,
-	 * <tt>startContainerLayout</tt>, <tt>endContainerLayout</tt> and
-	 * <tt>onEndBuild</tt> methods.
-	 */
-
-	metawidget.layout._createSectionLayoutDecorator = function( config, decorator, decoratorName ) {
-
-		var _delegate;
-
-		if ( config.delegate !== undefined ) {
-			_delegate = config.delegate;
-		} else {
-			_delegate = config;
-		}
-
-		/**
-		 * Read-only getter.
-		 * <p>
-		 * Dangerous to add a public 'delegate' property, because can conflict
-		 * with 'config.delegate'.
-		 */
-
-		decorator.getDelegate = function() {
-
-			return _delegate;
-		};
-
-		decorator.onStartBuild = function( mw ) {
-
-			if ( decorator.getDelegate().onStartBuild !== undefined ) {
-				decorator.getDelegate().onStartBuild( mw );
-			}
-		};
-
-		decorator.startContainerLayout = function( container, mw ) {
-
-			container[decoratorName] = {};
-
-			if ( decorator.getDelegate().startContainerLayout !== undefined ) {
-				decorator.getDelegate().startContainerLayout( container, mw );
-			}
-		};
-
-		decorator.endContainerLayout = function( container, mw ) {
-
-			if ( decorator.getDelegate().endContainerLayout !== undefined ) {
-				decorator.getDelegate().endContainerLayout( container, mw );
-			}
-
-			container[decoratorName] = {};
-		};
-
-		decorator.onEndBuild = function( mw ) {
-
-			if ( decorator.getDelegate().onEndBuild !== undefined ) {
-				decorator.getDelegate().onEndBuild( mw );
-			}
-		};
-	};
-
-	/**
-	 * Augment the given 'decorator' with methods suitable for making flat (as
-	 * opposed to nested) section separator LayoutDecorators.
-	 * <p>
-	 * This includes an implementation of the <tt>layoutWidget</tt> method and
-	 * a declaration of a <tt>addSectionWidget</tt> method.
-	 */
-
-	metawidget.layout.createFlatSectionLayoutDecorator = function( config, decorator, decoratorName ) {
-
-		if ( this instanceof metawidget.layout.createFlatSectionLayoutDecorator ) {
-			throw new Error( 'Function called as a Constructor' );
-		}
-
-		metawidget.layout._createSectionLayoutDecorator( config, decorator, decoratorName );
-
-		decorator.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-			var section;
-
-			// If our delegate is itself a NestedSectionLayoutDecorator, strip
-			// the section
-
-			if ( decorator.getDelegate().nestedSectionLayoutDecorator === true ) {
-
-				// Stay where we are?
-
-				section = metawidget.util.stripSection( attributes );
-
-				if ( section === undefined || section === container[decoratorName].currentSection ) {
-					return decorator.getDelegate().layoutWidget( widget, elementName, attributes, container, mw );
-				}
-
-				// End nested LayoutDecorator's current section
-
-				if ( container[decoratorName].currentSection !== undefined ) {
-					decorator.getDelegate().endContainerLayout( container, mw );
-				}
-
-				container[decoratorName].currentSection = section;
-
-				// Add a heading
-
-				if ( section !== '' ) {
-					decorator.addSectionWidget( section, 0, attributes, container, mw );
-				}
-			} else {
-
-				// Stay where we are?
-
-				if ( attributes.section === undefined || attributes.section === container[decoratorName].currentSection ) {
-					return decorator.getDelegate().layoutWidget( widget, elementName, attributes, container, mw );
-				}
-
-				// For each of the new sections...
-
-				var sections = attributes.section;
-
-				if ( ! ( sections instanceof Array ) ) {
-					sections = [ sections ];
-				}
-
-				var currentSections;
-
-				if ( container[decoratorName].currentSection !== undefined ) {
-					currentSections = container[decoratorName].currentSection;
-				} else {
-					currentSections = [];
-				}
-
-				for ( var level = 0; level < sections.length; level++ ) {
-					section = sections[level];
-
-					// ...that are different from our current...
-
-					if ( section === '' ) {
-						continue;
-					}
-
-					if ( level < currentSections.length && section === currentSections[level] ) {
-						continue;
-					}
-
-					// ...add a heading
-					//
-					// Note: we cannot stop/start the delegate layout here. It
-					// is tempting, but remember addSectionWidget needs to use
-					// the delegate. If you stop/add section heading/start the
-					// delegate, who is laying out the section heading?
-
-					decorator.addSectionWidget( section, level, attributes, container, mw );
-				}
-
-				container[decoratorName].currentSection = sections;
-			}
-
-			// Add component as normal
-
-			decorator.getDelegate().layoutWidget( widget, elementName, attributes, container, mw );
-		};
-	};
-
-	/**
-	 * Augment the given 'decorator' with methods suitable for making nested (as
-	 * opposed to flat) section separator LayoutDecorators.
-	 * <p>
-	 * This includes an implementation of the <tt>layoutWidget</tt> method and
-	 * a declaration of a <tt>createSectionWidget</tt> method.
-	 */
-
-	metawidget.layout.createNestedSectionLayoutDecorator = function( config, decorator, decoratorName ) {
-
-		if ( this instanceof metawidget.layout.createNestedSectionLayoutDecorator ) {
-			throw new Error( 'Function called as a Constructor' );
-		}
-
-		metawidget.layout._createSectionLayoutDecorator( config, decorator, decoratorName );
-
-		// Tag this NestedSectionLayoutDecorator so that
-		// FlatSectionLayoutDecorator can recognize it
-
-		decorator.nestedSectionLayoutDecorator = true;
-
-		decorator.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-			// Stay where we are?
-
-			var section = metawidget.util.stripSection( attributes );
-
-			if ( section === undefined || section === container[decoratorName].currentSection ) {
-				if ( container[decoratorName].currentSectionWidget ) {
-					return decorator.getDelegate().layoutWidget( widget, elementName, attributes, container[decoratorName].currentSectionWidget, mw );
-				}
-				return decorator.getDelegate().layoutWidget( widget, elementName, attributes, container, mw );
-			}
-
-			// End current section
-
-			if ( container[decoratorName].currentSectionWidget !== undefined ) {
-				decorator.endContainerLayout( container[decoratorName].currentSectionWidget, mw );
-			}
-
-			container[decoratorName].currentSection = section;
-			var previousSectionWidget = container[decoratorName].currentSectionWidget;
-			delete container[decoratorName].currentSectionWidget;
-
-			// No new section?
-
-			if ( section === '' ) {
-				decorator.getDelegate().layoutWidget( widget, elementName, attributes, container, mw );
-				return;
-			}
-
-			// Start new section
-
-			container[decoratorName].currentSectionWidget = decorator.createSectionWidget( previousSectionWidget, section, attributes, container, mw );
-			decorator.startContainerLayout( container[decoratorName].currentSectionWidget, mw );
-
-			// Add component to new section
-
-			decorator.getDelegate().layoutWidget( widget, elementName, attributes, container[decoratorName].currentSectionWidget, mw );
-		};
-
-		var _superEndContainerLayout = decorator.endContainerLayout;
-
-		decorator.endContainerLayout = function( container, mw ) {
-
-			// End hanging layouts
-
-			if ( container[decoratorName].currentSectionWidget !== undefined ) {
-				decorator.endContainerLayout( container[decoratorName].currentSectionWidget, mw );
-			}
-
-			_superEndContainerLayout.call( this, container, mw );
-		};
-	};
-
-	/**
-	 * @class LayoutDecorator to decorate widgets from different sections using
-	 *        an HTML heading tag (i.e. <tt>h1</tt>, <tt>h2</tt> etc).
-	 */
-
-	metawidget.layout.HeadingTagLayoutDecorator = function( config ) {
-
-		if ( ! ( this instanceof metawidget.layout.HeadingTagLayoutDecorator ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _level = config !== undefined && config.level !== undefined ? config.level : 1;
-		
-		metawidget.layout.createFlatSectionLayoutDecorator( config, this, 'headingTagLayoutDecorator' );
-
-		this.addSectionWidget = function( section, level, attributes, container, mw ) {
-	
-			var h1 = metawidget.util.createElement( mw, 'h' + ( level + _level ) );
-			h1.innerHTML = section;
-	
-			this.getDelegate().layoutWidget( h1, "property", {
-				wide: 'true'
-			}, container, mw );
-		};
-	}
-
-	/**
-	 * @class LayoutDecorator to decorate widgets from different sections using
-	 *        nested <tt>div</tt> tags.
-	 */
-
-	metawidget.layout.DivLayoutDecorator = function( config ) {
-
-		if ( ! ( this instanceof metawidget.layout.DivLayoutDecorator ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _styleClass = config !== undefined ? config.styleClass : undefined;
-		
-		metawidget.layout.createNestedSectionLayoutDecorator( config, this, 'divLayoutDecorator' );
-		
-		this.createSectionWidget = function( previousSectionWidget, section, attributes, container, mw ) {
-
-			var div = metawidget.util.createElement( mw, 'div' );
-			div.setAttribute( 'title', section );
-			
-			if ( _styleClass !== undefined ) {
-				div.setAttribute( 'class', _styleClass );
-			}
-			
-			this.getDelegate().layoutWidget( div, "property", {
-				wide: 'true'
-			}, container, mw );
-	
-			return div;
-		}
-	};
-} )();
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-utils.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-utils.js
deleted file mode 100755
index 2d10473efebd40abaf65f9e63e23e04246b74b4f..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-utils.js
+++ /dev/null
@@ -1,800 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace Utilities.
-	 */
-
-	metawidget.util = metawidget.util || {};
-
-	/**
-	 * Returns a label for the given set of attributes.
-	 * <p>
-	 * The label is determined using the following algorithm:
-	 * <p>
-	 * <ul>
-	 * <li> if <tt>attributes.title</tt> exists...
-	 * <ul>
-	 * <li>if the given <tt>mw</tt> has a property <tt>l10n</tt>, then
-	 * <tt>attributes.title</tt> is camel-cased and used as a lookup into
-	 * <tt>mw.i10n[camelCasedTitle]</tt>. This means developers can initially
-	 * build their UIs without worrying about localization, then turn it on
-	 * later</li>
-	 * <li>if no such lookup exists (or <tt>mw.l10n</tt> does not exist),
-	 * return <tt>attributes.title</tt>
-	 * </ul>
-	 * </li>
-	 * <li> if <tt>attributes.title</tt> does not exist...
-	 * <ul>
-	 * <li>if the given <tt>mw</tt> has a property <tt>l10n</tt>, then
-	 * <tt>attributes.name</tt> is used as a lookup into
-	 * <tt>mw.i10n[attributes.name]</tt></li>
-	 * <li>if no such lookup exists (or <tt>mw.l10n</tt> does not exist),
-	 * return <tt>attributes.name</tt>
-	 * </ul>
-	 * </li>
-	 * </ul>
-	 * 
-	 * @return the label string. Empty string if no such name. Null if name has
-	 *         been forced to blank (i.e. should be hidden)
-	 * 
-	 */
-
-	metawidget.util.getLabelString = function( attributes, mw ) {
-
-		// Explicit title
-
-		if ( attributes.title !== undefined ) {
-
-			if ( attributes.title === null ) {
-				return null;
-			}
-
-			return metawidget.util.getLocalizedString( attributes.title, mw );
-		}
-
-		// Localize if possible
-
-		var name = attributes.name;
-
-		if ( mw.l10n !== undefined && mw.l10n[name] !== undefined ) {
-			return mw.l10n[name];
-		}
-
-		// Default name, uncamel case
-
-		return metawidget.util.uncamelCase( name );
-	};
-
-	/**
-	 * Uncamel case the given name (e.g. from 'fooBarBaz1' to 'Foo Bar Baz 1').
-	 * Ported from StringUtils.uncamelCase.
-	 */
-
-	metawidget.util.uncamelCase = function( name ) {
-
-		/**
-		 * @returns true if the character is a digit.
-		 */
-
-		function _isDigit( c ) {
-
-			var charCode = c.charCodeAt( 0 );
-			return ( charCode >= 48 && charCode <= 57 );
-		}
-
-		/**
-		 * @returns true if the character is an upper or lower case letter.
-		 */
-
-		function _isLetter( c ) {
-
-			var charCode = c.charCodeAt( 0 );
-			return ( charCode >= 65 && charCode <= 90 ) || ( charCode >= 97 && charCode <= 122 );
-		}
-
-		var uncamelCasedName = '';
-		var first = true;
-		var lastChar = ' ';
-
-		for ( var loop = 0; loop < name.length; loop++ ) {
-
-			// Use 'charAt', not '[]' for IE compatibility
-
-			var c = name.charAt( loop );
-
-			if ( first === true ) {
-				uncamelCasedName += c.toUpperCase();
-				first = false;
-			} else if ( _isUpperCase( c ) && ( !_isUpperCase( lastChar ) || ( loop < name.length - 1 && name[loop + 1] !== ' ' && !_isUpperCase( name[loop + 1] ) ) ) ) {
-				if ( lastChar !== ' ' ) {
-					uncamelCasedName += ' ';
-				}
-
-				// Don't do: if ( loop + 1 < length && !_isUpperCase( chars[loop
-				// + 1] ) ) uncamelCasedName += _toLowerCase( c );
-				//
-				// It's ambiguous if we should lowercase the letter following a
-				// space, but in general it looks nicer most of the time not to.
-				// The exception is 'joining' words such as 'of' in 'Date of
-				// Birth'
-
-				uncamelCasedName += c;
-			} else if ( _isDigit( c ) && _isLetter( lastChar ) && lastChar !== ' ' ) {
-				uncamelCasedName += ' ' + c;
-			} else {
-				uncamelCasedName += c;
-			}
-
-			lastChar = c;
-		}
-
-		return uncamelCasedName;
-	};
-
-	/**
-	 * Localizes the given value.
-	 * <p>
-	 * First, camelCases the given value to create a key. Then looks this key up
-	 * in <tt>mw.l10n</tt>. If it exists, returns the value associated with
-	 * that key. Otherwise, returns the original value.
-	 * <p>
-	 * Clients can either initialize a property called <tt>l10n</tt> on the
-	 * Metawidget, or replace this whole method with their own localization
-	 * approach. In the latter case, <tt>mw.path</tt> may also prove useful.
-	 */
-
-	metawidget.util.getLocalizedString = function( value, mw ) {
-
-		var key = metawidget.util.camelCase( value );
-
-		if ( mw.l10n !== undefined && mw.l10n[key] !== undefined ) {
-			return mw.l10n[key];
-		}
-
-		return value;
-	};
-
-	/**
-	 * Following the rules defined in <tt>capitalize</tt>: "This normally
-	 * means converting the first character from upper case to lower case, but
-	 * in the (unusual) special case when there is more than one character and
-	 * both the first and second characters are upper case, we leave it alone.
-	 * Thus 'FooBah' becomes 'fooBah' and 'X' becomes 'x', but 'URL' stays as
-	 * 'URL'"
-	 */
-
-	metawidget.util.decapitalize = function( name ) {
-
-		if ( name.length === 0 ) {
-			return name;
-		}
-
-		// Nothing to do?
-
-		var firstChar = name.charAt( 0 );
-
-		if ( !_isUpperCase( firstChar ) ) {
-			return name;
-		}
-
-		// Second letter uppercase?
-
-		if ( name.length > 1 ) {
-			if ( _isUpperCase( name.charAt( 1 ) ) ) {
-				return name;
-			}
-		}
-
-		return name.charAt( 0 ).toLowerCase() + name.slice( 1 );
-	};
-
-	/**
-	 * Capitalize by uppercasing the first letter of the given String (e.g. from
-	 * 'fooBarBaz' to 'FooBarBaz').
-	 * <p>
-	 * The rules for capitalizing are not clearly, but we try to make
-	 * <tt>capitalize</tt> the inverse of <tt>decapitalize</tt> (this
-	 * includes the 'second character' clause). For example, in Eclipse if you
-	 * define a property 'aB123' and then 'generate getters' Eclipse will
-	 * generate a method called 'getaB123' <em>not</em> 'getAB123'. See:
-	 * https://community.jboss.org/thread/203202?start=0&tstart=0
-	 */
-
-	metawidget.util.capitalize = function( name ) {
-
-		if ( name.length === 0 ) {
-			return name;
-		}
-
-		// Second letter uppercase?
-
-		if ( name.length > 1 ) {
-			if ( _isUpperCase( name.charAt( 1 ) ) ) {
-				return name;
-			}
-		}
-
-		return name.charAt( 0 ).toUpperCase() + name.slice( 1 );
-	};
-
-	/**
-	 * @return true if the value is boolean true or string 'true', but false for
-	 *         any other value (including other JavaScript 'truthy' values)
-	 */
-
-	metawidget.util.isTrueOrTrueString = function( value ) {
-
-		return ( value === 'true' || value === true );
-	};
-
-	/**
-	 * Camel cases the given array of names (e.g. from ['foo','bar','baz'] to
-	 * 'fooBarBaz'). The first name is decapitalized. Subsequent names are
-	 * capitalized.
-	 * <p>
-	 * If <tt>names</tt> is not an array, first calls
-	 * <tt>names.split( ' ' )</tt>.
-	 * 
-	 * @return the camel cased name. Or an empty string if no name
-	 */
-
-	metawidget.util.camelCase = function( names ) {
-
-		if ( ! ( names instanceof Array ) ) {
-			names = names.split( ' ' );
-		}
-
-		var toString = '';
-		var length = names.length;
-
-		if ( length > 0 ) {
-			toString += metawidget.util.decapitalize( names[0] );
-		}
-
-		for ( var loop = 1; loop < length; loop++ ) {
-			toString += metawidget.util.capitalize( names[loop] );
-		}
-
-		return toString;
-	};
-
-	metawidget.util.fillString = function( repeat, times ) {
-
-		// From:
-		// http://stackoverflow.com/questions/202605/repeat-string-javascript
-
-		var toReturn = '';
-
-		for ( ;; ) {
-
-			if ( times & 1 ) {
-				toReturn += repeat;
-			}
-
-			times >>= 1;
-
-			if ( times ) {
-				repeat += repeat;
-			} else {
-				break;
-			}
-		}
-
-		return toReturn;
-	};
-
-	metawidget.util.lookupEnumTitle = function( value, anEnum, enumTitles ) {
-
-		// Locate the value within the enums (if there)...
-
-		var indexOf = anEnum.indexOf( value );
-
-		if ( indexOf === -1 || indexOf >= enumTitles.length ) {
-
-			// ...(cope with Java's UiLookup only supporting strings)...
-
-			indexOf = anEnum.indexOf( '' + value );
-
-			if ( indexOf === -1 || indexOf >= enumTitles.length ) {
-				return value;
-			}
-		}
-
-		// ...and return its equivalent title (if any)
-
-		return enumTitles[indexOf];
-	};
-
-	/**
-	 * Gets a camelCased id based on the given attributes.name and the given
-	 * mw.path.
-	 */
-
-	metawidget.util.getId = function( elementName, attributes, mw ) {
-
-		if ( mw.path !== undefined ) {
-			var splitPath = mw.path.split( '.' );
-
-			if ( splitPath[0] === 'object' ) {
-				splitPath = splitPath.slice( 1 );
-			}
-
-			if ( attributes.name && elementName !== 'entity' ) {
-				splitPath.push( attributes.name );
-			} else if ( splitPath.length === 0 ) {
-				return undefined;
-			}
-
-			var id = metawidget.util.camelCase( splitPath );
-
-			// Strip array qualifiers
-
-			id = id.replace( /[\[\]]/g, '' );
-
-			return id;
-		}
-
-		if ( attributes !== undefined ) {
-			return attributes.name;
-		}
-	};
-
-	/**
-	 * Returns true if the given node has child <em>elements</em>. That is,
-	 * their <tt>nodeType === 1</tt>. Ignores other sorts of child nodes,
-	 * such as text nodes.
-	 */
-
-	metawidget.util.hasChildElements = function( node ) {
-
-		var childNodes = node.childNodes;
-
-		for ( var loop = 0, length = childNodes.length; loop < length; loop++ ) {
-
-			if ( childNodes[loop].nodeType === 1 ) {
-				return true;
-			}
-		}
-
-		return false;
-	};
-
-	/**
-	 * @true if the given attributes define 'large' or 'wide'.
-	 */
-
-	metawidget.util.isSpanAllColumns = function( attributes ) {
-
-		if ( attributes === undefined ) {
-			return false;
-		}
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.large ) ) {
-			return true;
-		}
-
-		return metawidget.util.isTrueOrTrueString( attributes.wide );
-	};
-
-	/**
-	 * Splits the given path into its type and an array of names (e.g.
-	 * 'foo.bar['baz']' into type 'foo' and names ['bar','baz']).
-	 * 
-	 * @returns an object with properties 'type' and 'names' (provided there is
-	 *          at least 1 name)
-	 */
-
-	metawidget.util.splitPath = function( path ) {
-
-		var splitPath = {};
-
-		if ( path !== undefined ) {
-
-			// Match at every '.' and '[' boundary
-
-			var pathArray = path.match( /([^\.\[\]]*)/g );
-			splitPath.type = pathArray[0];
-
-			for ( var loop = 1, length = pathArray.length; loop < length; loop++ ) {
-
-				// Ignore empty matches
-
-				if ( pathArray[loop] === '' ) {
-					continue;
-				}
-
-				if ( splitPath.names === undefined ) {
-					splitPath.names = [];
-				}
-
-				// Strip surrounding spaces and quotes (eg. foo[ 'bar' ])
-
-				var stripQuotes = pathArray[loop].match( /^(?:\s*(?:\'|\"))([^\']*)(?:(?:\'|\")\s*)$/ );
-
-				if ( stripQuotes !== null && stripQuotes[1] !== undefined ) {
-					pathArray[loop] = stripQuotes[1];
-				}
-
-				splitPath.names.push( pathArray[loop] );
-			}
-		}
-
-		return splitPath;
-	};
-
-	/**
-	 * Appends the 'path' property from the given Metawidget to the 'name'
-	 * property in the given attributes.
-	 */
-
-	metawidget.util.appendPath = function( attributes, mw ) {
-
-		if ( mw.path !== undefined ) {
-			return metawidget.util.appendPathWithName( mw.path, attributes );
-		}
-
-		if ( mw.toInspect !== undefined ) {
-			return metawidget.util.appendPathWithName( typeof ( mw.toInspect ), attributes );
-		}
-
-		return metawidget.util.appendPathWithName( 'object', attributes );
-	};
-
-	/**
-	 * Returns the given path appended with the given name (e.g. 'foo' with
-	 * 'bar' becomes 'foo.bar'). Supports nameIncludesSeparator. Also supports
-	 * using bracket notation if the name contains illegal characters (e.g.
-	 * 'foo['bar bar']')
-	 */
-
-	metawidget.util.appendPathWithName = function( path, attributes ) {
-
-		var name = attributes.name;
-
-		// In general, add a dot before the attributes.name. However support
-		// nameIncludesSeparator for alwaysUseNestedMetawidgetInTables
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.nameIncludesSeparator ) ) {
-			return path + name;
-		}
-
-		if ( name.indexOf( '.' ) !== -1 || name.indexOf( '\'' ) !== -1 || name.indexOf( '"' ) !== -1 || name.indexOf( ' ' ) !== -1 ) {
-			return path + '[\'' + name.replace( '\'', '\\\'' ) + '\']';
-		}
-
-		return path + '.' + name;
-	};
-
-	/**
-	 * Traverses the given 'toInspect' along properties defined by the array of
-	 * 'names'.
-	 * 
-	 * @param toInspect
-	 *            object to traverse
-	 * @param names
-	 *            array of propery names to traverse along
-	 */
-
-	metawidget.util.traversePath = function( toInspect, names ) {
-
-		if ( toInspect === undefined ) {
-			return undefined;
-		}
-
-		if ( names !== undefined ) {
-
-			// Sanity check against passing a single string
-
-			if ( ! ( names instanceof Array ) ) {
-				throw new Error( "Expected array of names" );
-			}
-
-			for ( var loop = 0, length = names.length; loop < length; loop++ ) {
-
-				toInspect = toInspect[names[loop]];
-
-				// We don't need to worry about array indexes here: they should
-				// have been parsed out by splitPath
-
-				if ( toInspect === undefined ) {
-					return undefined;
-				}
-			}
-		}
-
-		return toInspect;
-	};
-
-	/**
-	 * Return an array of the given inspection result's properties, sorted by
-	 * 'propertyOrder' (if any).
-	 * <p>
-	 * See: https://github.com/json-stylesheet/json-stylesheet/issues/1
-	 * https://github.com/json-schema/json-schema/issues/87
-	 */
-
-	metawidget.util.getSortedInspectionResultProperties = function( inspectionResult ) {
-
-		// Extract the given inspection result's properties into an array...
-
-		var sortedProperties = [];
-
-		if ( inspectionResult !== undefined ) {
-
-			for ( var propertyName in inspectionResult.properties ) {
-
-				var properties = inspectionResult.properties[propertyName];
-				sortedProperties.push( properties );
-
-				properties.name = propertyName;
-				properties._syntheticOrder = sortedProperties.length;
-			}
-
-			// ...sort the array...
-
-			sortedProperties.sort( function( a, b ) {
-
-				if ( a.propertyOrder === undefined ) {
-					if ( b.propertyOrder === undefined ) {
-						return ( a._syntheticOrder - b._syntheticOrder );
-					}
-					return 1;
-				}
-
-				if ( b.propertyOrder === undefined ) {
-					return -1;
-				}
-
-				var diff = ( a.propertyOrder - b.propertyOrder );
-
-				if ( diff === 0 ) {
-					return ( a._syntheticOrder - b._syntheticOrder );
-				}
-
-				return diff;
-			} );
-		}
-
-		// ...and return it
-
-		return sortedProperties;
-	};
-
-	/**
-	 * Combines the given first inspection result with the given second
-	 * inspection result.
-	 * <p>
-	 * Inspection results are expected to be JSON Schema (v3) objects. They are
-	 * combined based on their property name. If no elements match, new
-	 * properties are appended.
-	 */
-
-	metawidget.util.combineInspectionResults = function( existingInspectionResult, newInspectionResult ) {
-
-		// Inspector may return undefined
-
-		if ( newInspectionResult === undefined ) {
-			return;
-		}
-
-		// Combine based on propertyName
-
-		_copyPrimitives( newInspectionResult, existingInspectionResult );
-
-		if ( newInspectionResult.properties === undefined ) {
-			return;
-		}
-
-		existingInspectionResult.properties = existingInspectionResult.properties || {};
-
-		for ( var propertyName in newInspectionResult.properties ) {
-
-			existingInspectionResult.properties[propertyName] = existingInspectionResult.properties[propertyName] || {};
-			_copyPrimitives( newInspectionResult.properties[propertyName], existingInspectionResult.properties[propertyName] );
-		}
-
-		//
-		// Private methods
-		//
-
-		function _copyPrimitives( from, to ) {
-
-			for ( var propertyName in from ) {
-
-				var propertyValue = from[propertyName];
-
-				if ( propertyValue instanceof Array ) {
-					to[propertyName] = propertyValue.slice( 0 );
-					continue;
-				}
-
-				if ( propertyValue instanceof Object ) {
-					continue;
-				}
-
-				to[propertyName] = from[propertyName];
-			}
-		}
-	};
-
-	/**
-	 * Strips the first section off the section attribute (if any).
-	 */
-
-	metawidget.util.stripSection = function( attributes ) {
-
-		var section = attributes.section;
-
-		// (undefined means 'no change to current section')
-
-		if ( section === undefined ) {
-			return undefined;
-		}
-
-		if ( ! ( section instanceof Array ) ) {
-			delete attributes.section;
-			return section;
-		}
-
-		switch ( section.length ) {
-
-			// (empty String means 'end current section')
-			case 0:
-				delete attributes.section;
-				return '';
-
-			case 1:
-				delete attributes.section;
-				return section[0];
-
-			default:
-				attributes.section = section.slice( 1 );
-				return section[0];
-		}
-	};
-
-	/**
-	 * Sets the given 'toAppend' to the given widget's 'attributeName'. If the
-	 * given widget already has a value for 'attributeName', appends a space and
-	 * then adds 'toAppend'.
-	 * 
-	 * @param separator
-	 *            separator to use (defaults to a space)
-	 */
-
-	metawidget.util.appendToAttribute = function( widget, attributeName, toAppend, separator ) {
-
-		var existingAttribute = widget.getAttribute( attributeName );
-
-		if ( separator === undefined ) {
-			separator = ' ';
-		}
-
-		if ( existingAttribute === null ) {
-			widget.setAttribute( attributeName, toAppend );
-			return;
-		}
-
-		// IE compatibility (convert DispHTMLStyle to a string)
-
-		if ( existingAttribute.toString !== undefined ) {
-			existingAttribute = existingAttribute.toString();
-		}
-
-		if ( existingAttribute !== toAppend && existingAttribute.indexOf( toAppend + separator ) === -1 && existingAttribute.indexOf( separator + toAppend ) === -1 ) {
-			widget.setAttribute( attributeName, existingAttribute + separator + toAppend );
-		}
-	};
-
-	/**
-	 * Creates an element by calling <tt>ownerDocument</tt> rather than simply
-	 * <tt>document</tt>. This stops us relying on a global <tt>document</tt>
-	 * variable.
-	 */
-
-	metawidget.util.createElement = function( mw, element ) {
-
-		// Explicitly call toUpperCase, as IE8 doesn't appear to do this for
-		// non-HTML4 tags (like 'output')
-
-		if ( mw.ownerDocument !== undefined ) {
-			return mw.ownerDocument.createElement( element.toUpperCase() );
-		}
-
-		return mw.getElement().ownerDocument.createElement( element.toUpperCase() );
-	};
-
-	/**
-	 * Creates a text node by calling <tt>ownerDocument</tt> rather than
-	 * simply <tt>document</tt>. This stops us relying on a global
-	 * <tt>document</tt> variable.
-	 */
-
-	metawidget.util.createTextNode = function( mw, text ) {
-
-		if ( mw.ownerDocument !== undefined ) {
-			return mw.ownerDocument.createTextNode( text );
-		}
-
-		return mw.getElement().ownerDocument.createTextNode( text );
-	};
-
-	/**
-	 * Creates an event by calling <tt>ownerDocument</tt> rather than simply
-	 * <tt>document</tt>. This stops us relying on a global <tt>document</tt>
-	 * variable.
-	 */
-
-	metawidget.util.createEvent = function( mw, name ) {
-
-		var event;
-
-		if ( mw.ownerDocument !== undefined ) {
-			event = mw.ownerDocument.createEvent( 'Event' );
-		} else {
-			event = mw.getElement().ownerDocument.createEvent( 'Event' );
-		}
-
-		event.initEvent( name, true, true );
-
-		return event;
-	};
-
-	/**
-	 * Finds the indexOf the given item in the given array.
-	 * 
-	 * @return -1 if either array or item are undefined, otherwise indexOf
-	 */
-
-	metawidget.util.niceIndexOf = function( array, item ) {
-
-		if ( array === undefined || item === undefined ) {
-			return -1;
-		}
-
-		return array.indexOf( item );
-	}
-
-	/**
-	 * Backward compatibility for IE.
-	 */
-
-	metawidget.util.hasAttribute = function( element, attribute ) {
-
-		if ( element.hasAttribute !== undefined ) {
-			return element.hasAttribute( attribute );
-		}
-
-		return ( element.getAttribute( attribute ) !== null );
-	}
-
-	//
-	// Private methods
-	//
-
-	function _isUpperCase( c ) {
-
-		var charCode = c.charCodeAt( 0 );
-		return ( charCode >= 65 && charCode <= 90 );
-	}
-
-} )();
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-webcomponent.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-webcomponent.js
deleted file mode 100755
index 62298a6ab7518880c802992c1cefd9dd66ad8648..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-webcomponent.js
+++ /dev/null
@@ -1,254 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * Web Component wrapper for Metawidget.
- * 
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function( globalScope ) {
-
-	'use strict';
-
-	/**
-	 * Use the value of the given HTML 5 attribute to lookup an object in the
-	 * global scope. This includes traversing simple namespace paths such as
-	 * 'foo.bar'
-	 */
-
-	function _lookupObject( attributeName ) {
-
-		var attributeValue = this.getAttribute( attributeName );
-
-		if ( attributeValue === null ) {
-			return;
-		}
-
-		var typeAndNames = metawidget.util.splitPath( attributeValue );
-
-		if ( typeAndNames === undefined ) {
-			return;
-		}
-
-		var lookup = globalScope[typeAndNames.type];
-		return metawidget.util.traversePath( lookup, typeAndNames.names );
-	}
-
-	if ( globalScope.document !== undefined && globalScope.document.registerElement !== undefined ) {
-
-		var metawidgetPrototype = Object.create( HTMLElement.prototype );
-
-		/**
-		 * Upon attachedCallback, initialize an internal metawidget.Metawidget
-		 * object using the current 'config' attribute (if any).
-		 * <p>
-		 * During initialization, a Metawidget create a shadow root so this must
-		 * be called after the document is ready.
-		 */
-
-		metawidgetPrototype.attachedCallback = function() {
-
-			// First time in, create a shadow root. This allows us to preserve
-			// our original override nodes (if any)
-
-			var shadowRoot = this.createShadowRoot();
-
-			// Pipeline (private)
-
-			this._pipeline = new metawidget.Pipeline( shadowRoot );
-
-			// Configure defaults
-
-			this._pipeline.inspector = new metawidget.inspector.PropertyTypeInspector();
-			this._pipeline.widgetBuilder = new metawidget.widgetbuilder.CompositeWidgetBuilder( [ new metawidget.widgetbuilder.OverriddenWidgetBuilder(),
-					new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(), new metawidget.widgetbuilder.HtmlWidgetBuilder() ] );
-			this._pipeline.widgetProcessors = [ new metawidget.widgetprocessor.IdProcessor(), new metawidget.widgetprocessor.RequiredAttributeProcessor(),
-					new metawidget.widgetprocessor.PlaceholderAttributeProcessor(), new metawidget.widgetprocessor.DisabledAttributeProcessor(),
-					new metawidget.widgetprocessor.SimpleBindingProcessor() ];
-			this._pipeline.layout = new metawidget.layout.HeadingTagLayoutDecorator( new metawidget.layout.TableLayout() );
-			this._pipeline.configure( [ _lookupObject.call( this, 'config' ), this.config ] );
-
-			this.buildWidgets();
-		};
-
-		/**
-		 * If 'path', 'readonly' or 'config' are updated, rebuild the
-		 * Metawidget.
-		 */
-
-		metawidgetPrototype.attributeChangedCallback = function( attrName, oldVal, newVal ) {
-
-			if ( this._pipeline === undefined ) {
-				return;
-			}
-
-			switch ( attrName ) {
-				case 'path':
-					this.buildWidgets();
-					break;
-				case 'readonly':
-					this.buildWidgets();
-					break;
-				case 'config':
-					this._pipeline.configure( _lookupObject.call( this, 'config' ) );
-					break;
-			}
-		};
-
-		/**
-		 * Clear all child elements from the shadow root.
-		 */
-
-		metawidgetPrototype.clearWidgets = function() {
-
-			while ( this.shadowRoot.childNodes.length > 0 ) {
-				this.shadowRoot.removeChild( this.shadowRoot.childNodes[0] );
-			}
-		};
-
-		/**
-		 * Rebuild the Metawidget, using the value of the current 'path'
-		 * attribute.
-		 * 
-		 * @param inspectionResult
-		 *            optional inspectionResult to use
-		 */
-
-		metawidgetPrototype.buildWidgets = function( inspectionResult ) {
-
-			// Take a copy of the original nodes. These may be inserted into the
-			// shadow DOM if the WidgetBuilders/Layouts wish
-
-			this.overriddenNodes = [];
-
-			for ( var loop = 0, length = this.childNodes.length; loop < length; loop++ ) {
-				if ( this.childNodes[loop].nodeType === 1 ) {
-					this.overriddenNodes.push( this.childNodes[loop].cloneNode( true ) );
-				}
-			}
-
-			// Traverse and build
-
-			if ( this.getAttribute( 'path' ) !== null ) {
-
-				this.path = this.getAttribute( 'path' );
-				this.readOnly = metawidget.util.isTrueOrTrueString( this.getAttribute( 'readonly' ) );
-
-				// Inspect (if necessary)
-
-				if ( inspectionResult === undefined ) {
-
-					// Safeguard against improperly implementing:
-					// http://blog.kennardconsulting.com/2013/02/metawidget-and-rest.html
-
-					if ( arguments.length > 0 ) {
-						throw new Error( "Calling buildWidgets( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead" );
-					}
-
-					var splitPath = metawidget.util.splitPath( this.path );
-					this.toInspect = globalScope[splitPath.type];
-
-					inspectionResult = this._pipeline.inspect( this.toInspect, splitPath.type, splitPath.names, this );
-				}
-			}
-
-			// Build widgets
-
-			this._pipeline.buildWidgets( inspectionResult, this );
-
-			// Note: we don't attempt to use Object.observe on this.toInspect,
-			// at least not by default (clients could observe and call
-			// buildWidgets if they want). AngularJS Metawidget does this, but
-			// in Angular all sub-widgets are 2-way bound by default, so you
-			// never risk losing data when you rebuild. In Web Components,
-			// however, sub-widget values are only saved when clients call
-			// save()
-		};
-
-		/**
-		 * Returns a nested version of this same Metawidget, using the given
-		 * attributes.
-		 * <p>
-		 * Subclasses should override this method to use their preferred widget
-		 * creation methodology.
-		 */
-
-		metawidgetPrototype.buildNestedMetawidget = function( attributes, config ) {
-
-			var nestedMetawidget = metawidget.util.createElement( this, 'x-metawidget' );
-
-			// Wire up getMetawidget manually, because shadowRoot is not
-			// initialized until attachedCallback. This is important for
-			// SimpleBindingProcessor and nested Metawidgets
-
-			nestedMetawidget.getMetawidget = function() {
-
-				return nestedMetawidget;
-			};
-
-			// Duck-type our 'pipeline' as the 'config' of the nested
-			// Metawidget. This neatly passes everything down, including a
-			// decremented 'maximumInspectionDepth'
-
-			nestedMetawidget.setAttribute( 'path', metawidget.util.appendPath( attributes, this ) );
-			nestedMetawidget.setAttribute( 'readonly', this.readOnly || metawidget.util.isTrueOrTrueString( attributes.readOnly ) );
-			nestedMetawidget.config = this._pipeline;
-
-			return nestedMetawidget;
-		};
-
-		/**
-		 * Save the contents of the Metawidget using a SimpleBindingProcessor.
-		 * <p>
-		 * This is a convenience method. To access other Metawidget APIs,
-		 * clients can use the 'getWidgetProcessor' method
-		 * 
-		 * @returns true if the 'toInspect' was updated (i.e. is dirty)
-		 */
-
-		metawidgetPrototype.save = function() {
-
-			return this.getWidgetProcessor( function( widgetProcessor ) {
-
-				return widgetProcessor instanceof metawidget.widgetprocessor.SimpleBindingProcessor;
-			} ).save( this );
-		};
-
-		/**
-		 * Useful for WidgetBuilders to perform nested inspections (eg. for
-		 * Collections).
-		 */
-
-		metawidgetPrototype.inspect = function( toInspect, type, names ) {
-
-			return this._pipeline.inspect( toInspect, type, names, this );
-		};
-
-		metawidgetPrototype.getWidgetProcessor = function( testInstanceOf ) {
-
-			return this._pipeline.getWidgetProcessor( testInstanceOf );
-		};
-
-		metawidgetPrototype.setLayout = function( layout ) {
-
-			this._pipeline.layout = layout;
-		};
-
-		// Register Metawidget as a Web Component
-
-		globalScope.document.registerElement( 'x-metawidget', {
-			prototype: metawidgetPrototype
-		} );
-	}
-} )( this );
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-widgetbuilders.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-widgetbuilders.js
deleted file mode 100755
index 784fa1aaca5065b415bc21b8ccf9c3818abb0d19..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-widgetbuilders.js
+++ /dev/null
@@ -1,700 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace WidgetBuilders.
-	 */
-
-	metawidget.widgetbuilder = metawidget.widgetbuilder || {};
-
-	/**
-	 * @class Delegates widget building to one or more sub-WidgetBuilders.
-	 *        <p>
-	 *        Each sub-WidgetBuilder in the list is invoked, in order, calling
-	 *        its <code>buildWidget</code> method. The first result is
-	 *        returned. If all sub-WidgetBuilders return undefined, undefined is
-	 *        returned (the parent Metawidget will generally instantiate a
-	 *        nested Metawidget in this case).
-	 *        <p>
-	 *        Note: the name <em>Composite</em>WidgetBuilder refers to the
-	 *        Composite design pattern.
-	 */
-
-	metawidget.widgetbuilder.CompositeWidgetBuilder = function( config ) {
-
-		if ( ! ( this instanceof metawidget.widgetbuilder.CompositeWidgetBuilder ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _widgetBuilders;
-
-		if ( config.widgetBuilders !== undefined ) {
-			_widgetBuilders = config.widgetBuilders.slice( 0 );
-		} else {
-			_widgetBuilders = config.slice( 0 );
-		}
-
-		function _onStartEndBuild( functionName, mw ) {
-
-			for ( var loop = 0, length = _widgetBuilders.length; loop < length; loop++ ) {
-
-				var widgetBuilder = _widgetBuilders[loop];
-
-				if ( widgetBuilder[functionName] !== undefined ) {
-					widgetBuilder[functionName]( mw );
-				}
-			}
-		}
-
-		this.onStartBuild = function( mw ) {
-
-			_onStartEndBuild( 'onStartBuild', mw );
-		};
-
-		this.buildWidget = function( elementName, attributes, mw ) {
-
-			for ( var loop = 0, length = _widgetBuilders.length; loop < length; loop++ ) {
-
-				var widget;
-				var widgetBuilder = _widgetBuilders[loop];
-
-				if ( widgetBuilder.buildWidget !== undefined ) {
-					widget = widgetBuilder.buildWidget( elementName, attributes, mw );
-				} else {
-					widget = widgetBuilder( elementName, attributes, mw );
-				}
-
-				if ( widget !== undefined ) {
-					return widget;
-				}
-			}
-		};
-
-		this.onEndBuild = function( mw ) {
-
-			_onStartEndBuild( 'onEndBuild', mw );
-		};
-	};
-
-	/**
-	 * @class WidgetBuilder to override widgets based on
-	 *        <tt>mw.overriddenNodes</tt>.
-	 *        <p>
-	 *        Widgets are overridden based on id, not name, because name is not
-	 *        legal syntax for many nodes (e.g. <tt>table</tt>).
-	 */
-
-	metawidget.widgetbuilder.OverriddenWidgetBuilder = function() {
-
-		if ( ! ( this instanceof metawidget.widgetbuilder.OverriddenWidgetBuilder ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.widgetbuilder.OverriddenWidgetBuilder.prototype.buildWidget = function( elementName, attributes, mw ) {
-
-		if ( mw.overriddenNodes === undefined ) {
-			return;
-		}
-
-		var overrideId = metawidget.util.getId( elementName, attributes, mw );
-
-		for ( var loop = 0, length = mw.overriddenNodes.length; loop < length; loop++ ) {
-
-			var child = mw.overriddenNodes[loop];
-			if ( child.nodeType === 1 && child.getAttribute( 'id' ) === overrideId ) {
-				mw.overriddenNodes.splice( loop, 1 );
-				return child;
-			}
-		}
-	};
-
-	/**
-	 * @class WidgetBuilder for read-only widgets in HTML 5 environments.
-	 */
-
-	metawidget.widgetbuilder.ReadOnlyWidgetBuilder = function() {
-
-		if ( ! ( this instanceof metawidget.widgetbuilder.ReadOnlyWidgetBuilder ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.widgetbuilder.ReadOnlyWidgetBuilder.prototype.buildWidget = function( elementName, attributes, mw ) {
-
-		// Not read-only?
-
-		if ( !metawidget.util.isTrueOrTrueString( attributes.readOnly ) ) {
-			return;
-		}
-
-		// Hidden
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.hidden ) || attributes.type === 'function' ) {
-			return metawidget.util.createElement( mw, 'stub' );
-		}
-
-		if ( attributes['enum'] !== undefined || attributes.type === 'string' || attributes.type === 'boolean' || attributes.type === 'number' || attributes.type === 'integer' || attributes.type === 'date'
-				|| attributes.type === 'color' ) {
-			return metawidget.util.createElement( mw, 'output' );
-		}
-
-		// Not simple, but don't expand
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.dontExpand ) ) {
-			return metawidget.util.createElement( mw, 'output' );
-		}
-	};
-
-	/**
-	 * WidgetBuilder for pure JavaScript environments.
-	 * <p>
-	 * Creates native HTML 5 widgets, such as <code>input</code> and
-	 * <code>select</code>, to suit the inspected fields.
-	 * <p>
-	 * This WidgetBuilder can be configured with the following settings:
-	 * <ul>
-	 * <li>alwaysUseNestedMetawidgetInTables - by default, HtmlWidgetBuilder
-	 * will render simple values in tables as read-only labels. It will only
-	 * resort to using nested Metawidgets inside tables if the value is an
-	 * object. However, sometimes using a nested Metawidget is the desired
-	 * behaviour, even for simple values. Setting this flag forces this</li>
-	 * </ul>
-	 */
-
-	metawidget.widgetbuilder.HtmlWidgetBuilder = function( config ) {
-
-		if ( ! ( this instanceof metawidget.widgetbuilder.HtmlWidgetBuilder ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		var _alwaysUseNestedMetawidgetInTables = false;
-
-		if ( config !== undefined ) {
-			_alwaysUseNestedMetawidgetInTables = config.alwaysUseNestedMetawidgetInTables;
-		}
-
-		this.buildWidget = function( elementName, attributes, mw ) {
-
-			// Hidden
-
-			if ( metawidget.util.isTrueOrTrueString( attributes.hidden ) ) {
-				return metawidget.util.createElement( mw, 'stub' );
-			}
-
-			// Support booleans as radio buttons
-
-			if ( attributes.type === 'boolean' && attributes.componentType === 'radio' && attributes['enum'] === undefined ) {
-				attributes['enum'] = [ true, false ];
-				attributes['enumTitles'] = [ 'Yes', 'No' ];
-			}
-
-			// Select box
-
-			if ( attributes['enum'] !== undefined ) {
-
-				var loop, length, option;
-
-				// Multi-select and radio buttons
-
-				if ( attributes.type === 'array' || attributes.componentType !== undefined ) {
-
-					var div = metawidget.util.createElement( mw, 'div' );
-					length = attributes['enum'].length;
-
-					for ( loop = 0; loop < length; loop++ ) {
-
-						// Uses 'implicit label association':
-						// http://www.w3.org/TR/html4/interact/forms.html#h-17.9.1
-
-						var label = metawidget.util.createElement( mw, 'label' );
-						option = metawidget.util.createElement( mw, 'input' );
-
-						if ( attributes.componentType !== undefined ) {
-							label.setAttribute( 'class', attributes.componentType );
-							option.setAttribute( 'type', attributes.componentType );
-						} else {
-							label.setAttribute( 'class', 'checkbox' );
-							option.setAttribute( 'type', 'checkbox' );
-						}
-						option.value = attributes['enum'][loop];
-						label.appendChild( option );
-
-						if ( attributes.enumTitles !== undefined && attributes.enumTitles[loop] !== undefined ) {
-							label.appendChild( metawidget.util.createTextNode( mw, attributes.enumTitles[loop] ) );
-						} else {
-							label.appendChild( metawidget.util.createTextNode( mw, attributes['enum'][loop] ) );
-						}
-
-						div.appendChild( label );
-					}
-
-					return div;
-				}
-
-				// Single-select
-
-				var select = metawidget.util.createElement( mw, 'select' );
-
-				if ( !metawidget.util.isTrueOrTrueString( attributes.required ) ) {
-					select.appendChild( metawidget.util.createElement( mw, 'option' ) );
-				}
-
-				length = attributes['enum'].length;
-
-				for ( loop = 0; loop < length; loop++ ) {
-					option = metawidget.util.createElement( mw, 'option' );
-
-					// HtmlUnit needs an 'option' to have a 'value', even if the
-					// same as the innerHTML
-
-					option.value = attributes['enum'][loop];
-
-					if ( attributes.enumTitles !== undefined && attributes.enumTitles[loop] !== undefined ) {
-						option.innerHTML = attributes.enumTitles[loop];
-					} else {
-						option.innerHTML = attributes['enum'][loop];
-					}
-
-					select.appendChild( option );
-				}
-				return select;
-			}
-
-			// Button
-
-			if ( attributes.type === 'function' ) {
-				var button = metawidget.util.createElement( mw, 'input' );
-				if ( metawidget.util.isTrueOrTrueString( attributes.submit ) ) {
-					button.setAttribute( 'type', 'submit' );
-				} else {
-					button.setAttribute( 'type', 'button' );
-				}
-				button.setAttribute( 'value', metawidget.util.getLabelString( attributes, mw ) );
-				return button;
-			}
-
-			// Number
-
-			if ( attributes.type === 'number' || attributes.type === 'integer' ) {
-
-				if ( attributes.minimum !== undefined && attributes.maximum !== undefined ) {
-					var range = metawidget.util.createElement( mw, 'input' );
-					range.setAttribute( 'type', 'range' );
-					range.setAttribute( 'min', attributes.minimum );
-					range.setAttribute( 'max', attributes.maximum );
-					return range;
-				}
-
-				var number = metawidget.util.createElement( mw, 'input' );
-				number.setAttribute( 'type', 'number' );
-
-				if ( attributes.minimum !== undefined ) {
-					number.setAttribute( 'min', attributes.minimum );
-				} else if ( attributes.maximum !== undefined ) {
-					number.setAttribute( 'max', attributes.maximum );
-				}
-                                
-                                if ( attributes.step !== undefined ) {
-                                    number.setAttribute( 'step', attributes.step );
-                                }
-                                else if (attributes.type === 'number'){
-                                    number.setAttribute( 'step', 'any' );
-                                }
-                                else {
-                                    number.setAttribute( 'step', '1' );
-                                }
-                                
-				return number;
-			}
-
-			// Boolean
-
-			if ( attributes.type === 'boolean' ) {
-				var checkbox = metawidget.util.createElement( mw, 'input' );
-				checkbox.setAttribute( 'type', 'checkbox' );
-				return checkbox;
-			}
-
-			// Date
-
-			if ( attributes.type === 'date' ) {
-				var date = metawidget.util.createElement( mw, 'input' );
-				date.setAttribute( 'type', 'date' );
-				return date;
-			}
-
-			// Color
-
-			if ( attributes.type === 'color' ) {
-				var color = metawidget.util.createElement( mw, 'input' );
-				color.setAttribute( 'type', 'color' );
-				return color;
-			}
-
-			// String
-
-			if ( attributes.type === 'string' ) {
-
-				if ( metawidget.util.isTrueOrTrueString( attributes.masked ) ) {
-					var password = metawidget.util.createElement( mw, 'input' );
-					password.setAttribute( 'type', 'password' );
-
-					if ( attributes.maxLength !== undefined ) {
-						password.setAttribute( 'maxlength', attributes.maxLength );
-					}
-
-					return password;
-				}
-
-				if ( metawidget.util.isTrueOrTrueString( attributes.large ) ) {
-					return metawidget.util.createElement( mw, 'textarea' );
-				}
-
-				var input = metawidget.util.createElement( mw, 'input' );
-
-				if ( attributes.componentType !== undefined ) {
-					input.setAttribute( 'type', attributes.componentType );
-				} else {
-					input.setAttribute( 'type', 'text' );
-				}
-
-				if ( attributes.maxLength !== undefined ) {
-					input.setAttribute( 'maxlength', attributes.maxLength );
-				}
-
-				return input;
-			}
-
-			// Collection
-
-			if ( attributes.type === 'array' ) {
-				return this.createTable( elementName, attributes, mw );
-			}
-
-			// Not simple, but don't expand
-
-			if ( metawidget.util.isTrueOrTrueString( attributes.dontExpand ) ) {
-				var text = metawidget.util.createElement( mw, 'input' );
-				text.setAttribute( 'type', 'text' );
-				return text;
-			}
-		};
-
-		/**
-		 * Create a table populated with the contents of an array property.
-		 * <p>
-		 * Subclasses may override this method to customize table creation.
-		 * Alternatively, they could override one of the sub-methods
-		 * <tt>addHeaderRow</tt>, <tt>addHeader</tt>, <tt>addRow</tt> or
-		 * <tt>addColumn</tt>.
-		 */
-
-		this.createTable = function( elementName, attributes, mw ) {
-
-			var table = metawidget.util.createElement( mw, 'table' );
-
-			// Inspect the first entry in the array to determine the table
-			// columns. This assumes the array is homogeneous. However because
-			// you can use JsonSchemaInspector as one of your Inspectors, it
-			// doesn't assume the array is populated, nor that the first entry
-			// has values in all fields
-
-			var typeAndNames = metawidget.util.splitPath( mw.path );
-			var toInspect = metawidget.util.traversePath( mw.toInspect, typeAndNames.names );
-
-			if ( typeAndNames.names === undefined ) {
-				typeAndNames.names = [];
-			}
-
-			var value;
-
-			if ( elementName !== 'entity' && toInspect !== undefined ) {
-				value = toInspect[attributes.name];
-				typeAndNames.names.push( attributes.name );
-			} else {
-				value = toInspect;
-			}
-
-			// Push '0' so that object-based inspectors (like
-			// PropertyTypeInspector) will try to look at the first entry.
-			// However this will fail gracefully if the array is empty or
-			// undefined
-
-			typeAndNames.names.push( '0' );
-
-			var inspectionResult = mw.inspect( mw.toInspect, typeAndNames.type, typeAndNames.names );
-
-			if ( inspectionResult !== undefined ) {
-
-				var tbody = metawidget.util.createElement( mw, 'tbody' );
-				var row, rows;
-
-				if ( inspectionResult.properties === undefined ) {
-
-					// Simple, single-column table. It is still useful to pass
-					// 'type', but we must be careful not to pass 'name'.
-
-					table.appendChild( tbody );
-
-					if ( value !== undefined ) {
-						rows = value.length;
-						for ( row = 0; row < rows; row++ ) {
-							this.addRow( tbody, value, row, [ {
-								type: inspectionResult.type
-							} ], elementName, attributes, mw );
-						}
-					}
-
-				} else {
-					var inspectionResultProperties = metawidget.util.getSortedInspectionResultProperties( inspectionResult );
-
-					// Create headers
-
-					var thead = metawidget.util.createElement( mw, 'thead' );
-					table.appendChild( thead );
-
-					var columnAttributes = this.addHeaderRow( thead, inspectionResultProperties, mw );
-
-					// Create footer (optional)
-					
-					var tfoot = metawidget.util.createElement( mw, 'tfoot' );
-					this.addFooterRow( tfoot, columnAttributes );
-					
-					if ( tfoot.childNodes.length > 0 ) {
-						table.appendChild( tfoot );
-					}
-
-					// Create body
-
-					table.appendChild( tbody );
-
-					if ( value !== undefined ) {
-						rows = value.length;
-						for ( row = 0; row < rows; row++ ) {
-							this.addRow( tbody, value, row, columnAttributes, elementName, attributes, mw );
-						}
-					}
-				}
-			}
-
-			return table;
-		};
-
-		/**
-		 * Adds a row to the table header. Subclasses may override this method
-		 * to add additional columns, or suppress the header row.
-		 * 
-		 * @param inspectionResultProperties
-		 *            an array of sorted inspection result properties
-		 * @return array of column attributes. For example, columnAttributes[0]
-		 *         contains an object containing attributes for the first column
-		 */
-
-		this.addHeaderRow = function( thead, inspectionResultProperties, mw ) {
-
-			var tr = metawidget.util.createElement( mw, 'tr' );
-			thead.appendChild( tr );
-
-			var columnAttributes = [];
-
-			for ( var loop = 0, length = inspectionResultProperties.length; loop < length; loop++ ) {
-
-				var columnAttribute = inspectionResultProperties[loop];
-
-				if ( this.addHeader( tr, columnAttribute, mw ) ) {
-					columnAttributes.push( columnAttribute );
-				}
-			}
-
-			return columnAttributes;
-		};
-
-		/**
-		 * Add a header column for the given attributes. Subclasses may override
-		 * this method to suppress certain columns. By default, suppresses
-		 * columns where 'hidden' is true.
-		 * 
-		 * @returns true if a header was added, false otherwise
-		 */
-
-		this.addHeader = function( tr, attributes, mw ) {
-
-			if ( metawidget.util.isTrueOrTrueString( attributes.hidden ) ) {
-				return false;
-			}
-
-			var th = metawidget.util.createElement( mw, 'th' );
-
-			// Support column widths
-
-			var style = '';
-			
-			if ( attributes.columnWidth !== undefined ) {
-				style += 'width:' + attributes.columnWidth + ';';
-			}
-
-			if ( attributes.columnAlign !== undefined ) {
-				style += 'text-align:' + attributes.columnAlign + ';';
-			}
-
-			if ( style !== '' ) {
-				th.setAttribute( 'style', style );
-			}
-
-			if ( attributes.type !== 'function' ) {
-				th.innerHTML = metawidget.util.getLabelString( attributes, mw );
-			}
-
-			tr.appendChild( th );
-
-			return true;
-		};
-
-		/**
-		 * Adds a row to the table body. Subclasses may override this method to
-		 * add additional columns, or suppress the row.
-		 * 
-		 * @param columnAttributesArray
-		 *            array of column attributes. For example,
-		 *            columnAttributesArray[0] contains an object containing
-		 *            columnAttributes for the first column
-		 * @return the added row, or undefined if no row was added. This can be
-		 *         useful for subclasses
-		 */
-
-		this.addRow = function( tbody, value, row, columnAttributesArray, elementName, tableAttributes, mw ) {
-
-			var tr = metawidget.util.createElement( mw, 'tr' );
-			tbody.appendChild( tr );
-
-			for ( var loop = 0, length = columnAttributesArray.length; loop < length; loop++ ) {
-				this.addColumn( tr, value, row, columnAttributesArray[loop], elementName, tableAttributes, mw );
-			}
-
-			return tr;
-		};
-
-		/**
-		 * Add a column to the given row, displaying the given value. Subclasses
-		 * may override this method to modify the column contents (for example,
-		 * to wrap them in an anchor tag).
-		 * 
-		 * @return the added column, or undefined if no column was added. This
-		 *         can be useful for subclasses
-		 */
-
-		this.addColumn = function( tr, value, row, columnAttributes, elementName, tableAttributes, mw ) {
-
-			var td = metawidget.util.createElement( mw, 'td' );
-
-			// Support column widths
-
-			var style = '';
-			
-			if ( columnAttributes.columnWidth !== undefined ) {
-				style += 'width:' + columnAttributes.columnWidth + ';';
-			}
-
-			if ( columnAttributes.columnAlign !== undefined ) {
-				style += 'text-align:' + columnAttributes.columnAlign + ';';
-			}
-
-			if ( style !== '' ) {
-				td.setAttribute( 'style', style );
-			}
-			
-			// Render either top-level value, or a property of that value
-
-			var valueToRender = value[row];
-
-			if ( valueToRender !== undefined && columnAttributes.name !== undefined ) {
-				valueToRender = valueToRender[columnAttributes.name];
-			}
-
-			// Render either nothing, a nested read-only Metawidget, or a
-			// toString()
-
-			if ( columnAttributes.type === undefined || columnAttributes.type === 'array' || columnAttributes.type === 'function' || _alwaysUseNestedMetawidgetInTables === true ) {
-
-				var attributes = {};
-
-				for ( var attributeName in columnAttributes ) {
-					attributes[attributeName] = columnAttributes[attributeName];
-				}
-
-				if ( attributes.name === undefined ) {
-					attributes.name = '[' + row + ']';
-				} else {
-					attributes.name = metawidget.util.appendPathWithName( '[' + row + ']', attributes );
-				}
-
-				attributes.nameIncludesSeparator = true;
-
-				if ( elementName !== 'entity' ) {
-					attributes.name = '.' + metawidget.util.appendPathWithName( tableAttributes.name, attributes );
-				}
-
-				// Allow users to mark the whole table as readOnly
-
-				if ( attributes.readOnly === undefined ) {
-					attributes.readOnly = tableAttributes.readOnly;
-				}
-
-				var nestedMetawidget;
-
-				if ( columnAttributes.type === undefined ) {
-
-					// If type is undefined, we will likely recurse, so use
-					// leading labels
-
-					nestedMetawidget = mw.buildNestedMetawidget( attributes );
-				} else {
-
-					// Render simple types with a simple layout, to avoid a
-					// leading label
-
-					nestedMetawidget = mw.buildNestedMetawidget( attributes, {
-						layout: new metawidget.layout.SimpleLayout()
-					} );
-				}
-
-				// Support SimpleBindingProcessor
-
-				mw.nestedMetawidgets = mw.nestedMetawidgets || [];
-				mw.nestedMetawidgets.push( nestedMetawidget );
-
-				td.appendChild( nestedMetawidget );
-			} else if ( valueToRender !== undefined ) {
-				td.innerHTML = '' + valueToRender;
-			}
-
-			tr.appendChild( td );
-
-			return td;
-		};
-		
-		this.addFooterRow = function( tfoot, columnAttributes ) {
-			
-			// No footer by default
-		};
-	};
-} )();
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-widgetprocessors.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget-widgetprocessors.js
deleted file mode 100755
index 996967f8efb1fb52e171ae9774d2da6478776102..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget-widgetprocessors.js
+++ /dev/null
@@ -1,526 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace WidgetProcessors.
-	 */
-
-	metawidget.widgetprocessor = metawidget.widgetprocessor || {};
-
-	/**
-	 * @class WidgetProcessor that sets the HTML 'id' attribute.
-	 */
-
-	metawidget.widgetprocessor.IdProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.widgetprocessor.IdProcessor ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.widgetprocessor.IdProcessor.prototype.processWidget = function( widget, elementName, attributes, mw ) {
-
-		// Dangerous to reassign an id. For example, some JQuery UI widgets
-		// assign temporary ids when they wrap widgets
-
-		if ( !metawidget.util.hasAttribute( widget, 'id' )) {
-			var id = metawidget.util.getId( elementName, attributes, mw );
-
-			if ( id !== undefined ) {
-				widget.setAttribute( 'id', id );
-			}
-		}
-
-		return widget;
-	};
-
-	/**
-	 * @class WidgetProcessor that sets the HTML 5 'required' attribute.
-	 */
-
-	metawidget.widgetprocessor.RequiredAttributeProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.widgetprocessor.RequiredAttributeProcessor ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.widgetprocessor.RequiredAttributeProcessor.prototype.processWidget = function( widget, elementName, attributes ) {
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.required ) ) {
-			widget.setAttribute( 'required', 'required' );
-		}
-
-		return widget;
-	};
-
-	/**
-	 * @class WidgetProcessor that sets the HTML 5 'placeholder' attribute.
-	 */
-
-	metawidget.widgetprocessor.PlaceholderAttributeProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.widgetprocessor.PlaceholderAttributeProcessor ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.widgetprocessor.PlaceholderAttributeProcessor.prototype.processWidget = function( widget, elementName, attributes ) {
-
-		if ( attributes.placeholder !== undefined ) {
-			widget.setAttribute( 'placeholder', attributes.placeholder );
-		}
-
-		return widget;
-	};
-
-	/**
-	 * @class WidgetProcessor that sets the HTML 'disabled' attribute.
-	 */
-
-	metawidget.widgetprocessor.DisabledAttributeProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.widgetprocessor.DisabledAttributeProcessor ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.widgetprocessor.DisabledAttributeProcessor.prototype.processWidget = function( widget, elementName, attributes ) {
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.disabled ) ) {
-			widget.setAttribute( 'disabled', 'disabled' );
-		}
-
-		return widget;
-	};
-
-	/**
-	 * @class Simple data/action binding implementation. Frameworks that supply
-	 *        their own data-binding mechanisms (such as Angular JS) should
-	 *        override this with their own WidgetProcessor.
-	 */
-
-	metawidget.widgetprocessor.SimpleBindingProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.widgetprocessor.SimpleBindingProcessor ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-	};
-
-	metawidget.widgetprocessor.SimpleBindingProcessor.prototype.onStartBuild = function( mw ) {
-
-		mw._simpleBindingProcessor = {};
-	};
-
-	metawidget.widgetprocessor.SimpleBindingProcessor.prototype.processWidget = function( widget, elementName, attributes, mw ) {
-
-		var typeAndNames = metawidget.util.splitPath( mw.path );
-
-		if ( widget.tagName === 'INPUT' && ( widget.getAttribute( 'type' ) === 'button' || widget.getAttribute( 'type' ) === 'submit' ) ) {
-			widget.onclick = function() {
-
-				try {
-					return metawidget.util.traversePath( mw.toInspect, typeAndNames.names )[attributes.name]();
-				} catch ( e ) {
-					if ( alert !== undefined ) {
-						alert( e );
-					} else {
-						throw e;
-					}
-				}
-			};
-
-			return widget;
-		}
-
-		var value;
-
-		if ( elementName === 'entity' ) {
-
-			value = metawidget.util.traversePath( mw.toInspect, typeAndNames.names );
-
-			if ( typeAndNames.names === undefined ) {
-				mw._simpleBindingProcessor.topLevel = true;
-			} else {
-				mw._simpleBindingProcessor.topLevelWithPath = true;
-			}
-		} else {
-			var toInspect = metawidget.util.traversePath( mw.toInspect, typeAndNames.names );
-
-			if ( toInspect !== undefined ) {
-				value = toInspect[attributes.name];
-			} else {
-				value = undefined;
-			}
-		}
-
-		var rememberBinding = this.bindToWidget( widget, value, elementName, attributes, mw );
-
-		if ( rememberBinding === true || widget.getMetawidget !== undefined || widget.nestedMetawidgets !== undefined ) {
-			mw._simpleBindingProcessor.bindings = mw._simpleBindingProcessor.bindings || [];
-			mw._simpleBindingProcessor.bindings[attributes.name] = {
-				widget: widget,
-				elementName: elementName,
-				attributes: attributes
-			};
-		}
-
-		return widget;
-	};
-
-	/**
-	 * Bind the given widget to the given value.
-	 * 
-	 * @return true if this binding should be remembered for when the user calls
-	 *         'save'
-	 */
-
-	metawidget.widgetprocessor.SimpleBindingProcessor.prototype.bindToWidget = function( widget, value, elementName, attributes, mw ) {
-
-		var isBindable = ( widget.tagName === 'INPUT' || widget.tagName === 'SELECT' || widget.tagName === 'TEXTAREA' );
-
-		if ( isBindable === true && metawidget.util.hasAttribute( widget, 'id' )) {
-
-			// Standard HTML needs 'name', not 'id', for binding
-
-			widget.setAttribute( 'name', widget.getAttribute( 'id' ) );
-		}
-
-		var loop, length;
-
-		// Special support for arrays of checkboxes/radio buttons
-
-		if ( attributes['enum'] !== undefined && widget.tagName === 'DIV' ) {
-
-			if ( attributes.type === 'array' || attributes.componentType !== undefined ) {
-
-				isBindable = true;
-
-				length = widget.childNodes.length;
-				for ( loop = 0; loop < length; loop++ ) {
-					var childNode = widget.childNodes[loop];
-					if ( childNode.tagName === 'DIV' ) {
-						childNode = childNode.childNodes[0];
-					}					
-					if ( childNode.tagName === 'LABEL' ) {
-						var inputChildNode = childNode.childNodes[0];
-						if ( inputChildNode.tagName === 'INPUT' ) {
-
-							// Name must be common across group
-
-							inputChildNode.setAttribute( 'name', widget.getAttribute( 'id' ) );
-
-							if ( attributes.type === 'array' ) {
-								inputChildNode.checked = ( value !== undefined && value.indexOf( inputChildNode.value ) !== -1 );
-							} else if ( attributes.type === 'boolean' ) {
-								inputChildNode.checked = ( value === inputChildNode.value || inputChildNode.value === '' + value );
-							} else {
-								inputChildNode.checked = ( value === inputChildNode.value );
-							}
-						}
-					}
-				}
-			}
-		}
-
-		// Check 'not undefined', rather than 'if value', in case value is a
-		// boolean of false
-		//
-		// Note: this is a general convention throughout Metawidget, as
-		// JavaScript has a surprisingly large number of 'falsy' values)
-
-		if ( value !== undefined ) {
-			if ( widget.tagName === 'OUTPUT' || widget.tagName === 'TEXTAREA' ) {
-
-				if ( metawidget.util.isTrueOrTrueString( attributes.masked )) {
-
-					// Special support for masked output
-
-					widget.innerHTML = metawidget.util.fillString( '*', value.length );
-
-				} else if ( attributes.enumTitles !== undefined ) {
-
-					// Special support for enumTitles
-
-					if ( attributes.type === 'array' ) {
-
-						length = value.length;
-						for ( loop = 0; loop < length; loop++ ) {
-
-							if ( loop === 0 ) {
-								widget.innerHTML = '';
-							} else {
-								widget.innerHTML += ', ';
-							}
-
-							widget.innerHTML += metawidget.util.lookupEnumTitle( value[loop], attributes['enum'], attributes.enumTitles );
-						}
-
-					} else {
-						widget.innerHTML = metawidget.util.lookupEnumTitle( value, attributes['enum'], attributes.enumTitles );
-					}
-
-				} else if ( attributes.type === 'boolean' ) {
-
-					// Special support for boolean
-
-					if ( value === true ) {
-						widget.innerHTML = metawidget.util.getLocalizedString( 'Yes', mw );
-					} else if ( value === false ) {
-						widget.innerHTML = metawidget.util.getLocalizedString( 'No', mw );
-					} else {
-						widget.innerHTML = value;
-					}
-
-				} else {
-					widget.innerHTML = value;
-				}
-
-			} else if ( widget.tagName === 'INPUT' && widget.getAttribute( 'type' ) === 'checkbox' ) {
-				widget.checked = value;
-			} else if ( isBindable === true ) {
-				widget.value = value;
-			}
-		}
-
-		return isBindable;
-	};
-
-	/**
-	 * Save the bindings associated with the given Metawidget.
-	 * 
-	 * @return true if data (including data from nested Metawidgets) was
-	 *         actually changed. False otherwise. Can be useful for 'dirty'
-	 *         flags
-	 */
-
-	metawidget.widgetprocessor.SimpleBindingProcessor.prototype.save = function( mw ) {
-
-		var toInspect;
-		var dirty = false;
-
-		// Traverse to the parent...
-
-		var typeAndNames = metawidget.util.splitPath( mw.path );
-
-		if ( typeAndNames.names === undefined ) {
-			toInspect = mw.toInspect;
-		} else {
-			var namesToParent = typeAndNames.names.slice( 0, typeAndNames.names.length - 1 );
-			var parent = metawidget.util.traversePath( mw.toInspect, namesToParent );
-
-			// ...then to the child...
-
-			if ( mw._simpleBindingProcessor.topLevelWithPath === true ) {
-				toInspect = parent;
-			} else {
-				var childName = typeAndNames.names[typeAndNames.names.length - 1];
-				toInspect = parent[childName];
-
-				// ...create the child 'just in time' if necessary...
-
-				if ( toInspect === undefined ) {
-					toInspect = {};
-					parent[childName] = toInspect;
-				}
-			}
-		}
-
-		// ...and populate it
-
-		for ( var name in mw._simpleBindingProcessor.bindings ) {
-
-			var binding = mw._simpleBindingProcessor.bindings[name];
-			var widgetFromBinding = this.getWidgetFromBinding( binding, mw );
-
-			// Support nested Metawidgets
-
-			if ( widgetFromBinding.getMetawidget !== undefined ) {
-				var nestedDirty = this.save( widgetFromBinding.getMetawidget() );
-				
-				if ( nestedDirty === true ) {
-					dirty = true;
-				}
-				
-				continue;
-			}
-
-			// saveFromWidget
-
-			var value = this.saveFromWidget( binding, mw );
-
-			if ( dirty === false && toInspect[name] !== value ) {
-				dirty = true;
-			}
-
-			if ( mw._simpleBindingProcessor.topLevel === true ) {
-				mw.toInspect = value;
-				return dirty;
-			}
-
-			toInspect[name] = value;
-		}
-
-		// Support alwaysUseNestedMetawidgetInTables
-
-		if ( mw.nestedMetawidgets !== undefined ) {
-
-			for ( var loop = 0, length = mw.nestedMetawidgets.length; loop < length; loop++ ) {
-				var nestedDirty = this.save( mw.nestedMetawidgets[loop].getMetawidget() );
-				
-				if ( nestedDirty === true ) {
-					dirty = true;
-				}
-			}
-		}
-
-		return dirty;
-	};
-
-	/**
-	 * @return the given binding's widget value
-	 */
-
-	metawidget.widgetprocessor.SimpleBindingProcessor.prototype.saveFromWidget = function( binding, mw ) {
-
-		var widget = this.getWidgetFromBinding( binding, mw );
-
-		if ( widget.getAttribute( 'type' ) === 'checkbox' ) {
-			return widget.checked;
-		}
-
-		if ( binding.attributes.type === 'integer' ) {
-
-			var parsed = parseInt( widget.value );
-
-			// Avoid pushing back 'NaN'
-
-			if ( isNaN( parsed ) ) {
-				return undefined;
-			}
-
-			return parsed;
-		}
-
-		if ( binding.attributes.type === 'number' ) {
-
-			// parseFloat can parse ints, but parseInt can't parse floats
-
-			var parsed = parseFloat( widget.value );
-
-			// Avoid pushing back 'NaN'
-
-			if ( isNaN( parsed ) ) {
-				return undefined;
-			}
-
-			return parsed;
-		}
-
-		// Support arrays of checkboxes/radio buttons
-
-		if ( binding.attributes['enum'] !== undefined && widget.tagName === 'DIV' ) {
-
-			if ( binding.attributes.type === 'array' || binding.attributes.componentType !== undefined ) {
-
-				var toReturn;
-				for ( var loop = 0, length = widget.childNodes.length; loop < length; loop++ ) {
-					var childNode = widget.childNodes[loop];
-					if ( childNode.tagName === 'DIV' ) {
-						childNode = childNode.childNodes[0];
-					}					
-					if ( childNode.tagName === 'LABEL' ) {
-						var inputChildNode = childNode.childNodes[0];
-						if ( inputChildNode.checked ) {
-
-							if ( binding.attributes.type === 'boolean' ) {
-								return ( inputChildNode.value === true || inputChildNode.value === 'true' );
-							}
-
-							if ( binding.attributes.type !== 'array' ) {
-								return inputChildNode.value;
-							}
-
-							toReturn = toReturn || [];
-							toReturn.push( inputChildNode.value );
-						}
-					}
-				}
-				return toReturn;
-			}
-		}
-
-		// Support non-checkbox booleans (e.g. a select box)
-
-		if ( binding.attributes.type === 'boolean' ) {
-			return ( widget.value === true || widget.value === 'true' );
-		}
-
-		// Avoid pushing back 'null'
-
-		if ( widget.value === '' || widget.value === null ) {
-			return;
-		}
-
-		return widget.value;
-	};
-
-	/**
-	 * Returns the widget associated with the given binding. By default, calls
-	 * <tt>binding.widget</tt>. Subclasses may override this method if their
-	 * framework has swapped out the widget.
-	 */
-
-	metawidget.widgetprocessor.SimpleBindingProcessor.prototype.getWidgetFromBinding = function( binding, mw ) {
-
-		return binding.widget;
-	};
-
-	/**
-	 * Reloads the values in the widgets using the values in the given Object.
-	 * The names of the values in the Object must match the 'name' attribute of
-	 * the widget.
-	 * <p>
-	 * Note this method does not update <tt>mw.toInspect</tt>, nor does it
-	 * save any values back from the widgets. It can be useful for re-populating
-	 * the widgets based on an HTTP request POST-back.
-	 */
-
-	metawidget.widgetprocessor.SimpleBindingProcessor.prototype.reload = function( reloadFrom, mw ) {
-
-		for ( var name in mw._simpleBindingProcessor.bindings ) {
-
-			var binding = mw._simpleBindingProcessor.bindings[name];
-			var widgetFromBinding = this.getWidgetFromBinding( binding, mw );
-
-			if ( widgetFromBinding.getMetawidget !== undefined ) {
-				this.reload( reloadFrom, widgetFromBinding.getMetawidget() );
-				continue;
-			}
-
-			// Use id, not name, to support arrays of checkboxes (id should be
-			// the same as name anyway)
-
-			this.bindToWidget( widgetFromBinding, reloadFrom[widgetFromBinding.getAttribute( 'id' )], binding.elementName, binding.attributes, mw );
-		}
-	};
-
-} )();
diff --git a/src/main/webapp/js/3rdparty/metawidget/core/metawidget.js b/src/main/webapp/js/3rdparty/metawidget/core/metawidget.js
deleted file mode 100755
index ad275476b89c7d936b95d94c3d0236066f332109..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/core/metawidget.js
+++ /dev/null
@@ -1,686 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-/**
- * @namespace Metawidget for pure JavaScript environments.
- * @author <a href="http://kennardconsulting.com">Richard Kennard</a>
- */
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * Pure JavaScript Metawidget.
-	 * 
-	 * @param element
-	 *            the element to populate with UI components matching the
-	 *            properties of the domain object
-	 * @param config
-	 *            optional configuration object (see
-	 *            metawidget.Pipeline.configure)
-	 * @returns {metawidget.Metawidget}
-	 */
-
-	metawidget.Metawidget = function( element, config ) {
-
-		if ( ! ( this instanceof metawidget.Metawidget ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		// Attach ourselves as a property of the tag, rather than try to
-		// 'extend' the built-in HTML tags. This is used by
-		// SimpleBindingProcessor, among others
-
-		var mw = this;
-
-		element.getMetawidget = function() {
-
-			return mw;
-		};
-
-		// Pipeline (private)
-
-		var _pipeline = new metawidget.Pipeline( element );
-
-		// Configure defaults
-
-		_pipeline.inspector = new metawidget.inspector.PropertyTypeInspector();
-		_pipeline.widgetBuilder = new metawidget.widgetbuilder.CompositeWidgetBuilder( [ new metawidget.widgetbuilder.OverriddenWidgetBuilder(), new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),
-				new metawidget.widgetbuilder.HtmlWidgetBuilder() ] );
-		_pipeline.widgetProcessors = [ new metawidget.widgetprocessor.IdProcessor(), new metawidget.widgetprocessor.RequiredAttributeProcessor(),
-				new metawidget.widgetprocessor.PlaceholderAttributeProcessor(), new metawidget.widgetprocessor.DisabledAttributeProcessor(), new metawidget.widgetprocessor.SimpleBindingProcessor() ];
-		_pipeline.layout = new metawidget.layout.HeadingTagLayoutDecorator( new metawidget.layout.TableLayout() );
-		_pipeline.configure( config );
-
-		// First time in, capture the contents of the Metawidget, if any
-		// (private)
-
-		var _overriddenNodes = [];
-
-		while ( element.childNodes.length > 0 ) {
-			var childNode = element.childNodes[0];
-			element.removeChild( childNode );
-
-			if ( childNode.nodeType === 1 ) {
-				_overriddenNodes.push( childNode );
-			}
-		}
-
-		//
-		// Public methods
-		//
-
-		this.reconfigure = function( config ) {
-
-			return _pipeline.configure( config );
-		};
-
-		/**
-		 * Save the contents of the Metawidget using a SimpleBindingProcessor.
-		 * <p>
-		 * This is a convenience method. To access other Metawidget APIs,
-		 * clients can use the 'getWidgetProcessor' method
-		 * 
-		 * @returns true if the 'toInspect' was updated (i.e. is dirty)
-		 */
-
-		this.save = function() {
-
-			return _pipeline.getWidgetProcessor( function( widgetProcessor ) {
-
-				return widgetProcessor instanceof metawidget.widgetprocessor.SimpleBindingProcessor;
-			} ).save( this );
-		};
-
-		this.getWidgetProcessor = function( testInstanceOf ) {
-
-			return _pipeline.getWidgetProcessor( testInstanceOf );
-		};
-
-		this.setLayout = function( layout ) {
-
-			_pipeline.layout = layout;
-		};
-
-		/**
-		 * Useful for WidgetBuilders to perform nested inspections (eg. for
-		 * Collections).
-		 */
-
-		this.inspect = function( toInspect, type, names ) {
-
-			return _pipeline.inspect( toInspect, type, names, this );
-		};
-
-		this.buildWidgets = function( inspectionResult ) {
-
-			// Defensive copy
-
-			this.overriddenNodes = [];
-
-			for ( var loop = 0, length = _overriddenNodes.length; loop < length; loop++ ) {
-				this.overriddenNodes.push( _overriddenNodes[loop].cloneNode( true ) );
-			}
-
-			// Inspect (if necessary)
-
-			if ( inspectionResult === undefined ) {
-
-				// Safeguard against improperly implementing:
-				// http://blog.kennardconsulting.com/2013/02/metawidget-and-rest.html
-
-				if ( arguments.length > 0 ) {
-					throw new Error( "Calling buildWidgets( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead" );
-				}
-
-				var splitPath = metawidget.util.splitPath( this.path );
-				inspectionResult = _pipeline.inspect( this.toInspect, splitPath.type, splitPath.names, this );
-			}
-
-			// Build widgets
-
-			_pipeline.buildWidgets( inspectionResult, this );
-		};
-
-		/**
-		 * Returns the element this Metawidget is attached to.
-		 */
-
-		this.getElement = function() {
-
-			return _pipeline.element;
-		};
-
-		/**
-		 * Clear all child elements from the Metawidget element.
-		 * <p>
-		 * This implementation uses plain JavaScript <tt>removeChild</tt>,
-		 * which has known problems (on some browsers) leaking event handlers.
-		 * This is not a problem for plain Metawidget, as it doesn't use event
-		 * handlers. However clients that introduce custom widgetprocessors that
-		 * use event handlers may wish to adopt a more robust technology for
-		 * tracking/clearing event handlers (such as JQuery.empty)
-		 */
-
-		this.clearWidgets = function() {
-
-			var element = this.getElement();
-
-			while ( element.childNodes.length > 0 ) {
-				element.removeChild( element.childNodes[0] );
-			}
-		};
-
-		/**
-		 * Returns a nested version of this same Metawidget, using the given
-		 * attributes.
-		 * <p>
-		 * Subclasses should override this method to use their preferred widget
-		 * creation methodology.
-		 */
-
-		this.buildNestedMetawidget = function( attributes, config ) {
-
-			// Create a 'div' not a 'metawidget', because whilst it's up to the
-			// user what they want their top-level element to be, for browser
-			// compatibility we should stick with something benign for nested
-			// elements
-
-			var nestedWidget = metawidget.util.createElement( this, 'div' );
-
-			// Duck-type our 'pipeline' as the 'config' of the nested
-			// Metawidget. This neatly passes everything down, including a
-			// decremented 'maximumInspectionDepth'
-
-			var nestedMetawidget = new metawidget.Metawidget( nestedWidget, [ _pipeline, config ] );
-			nestedMetawidget.toInspect = this.toInspect;
-			nestedMetawidget.path = metawidget.util.appendPath( attributes, this );
-			nestedMetawidget.readOnly = this.readOnly || metawidget.util.isTrueOrTrueString( attributes.readOnly );
-			nestedMetawidget.buildWidgets();
-
-			return nestedWidget;
-		};
-	};
-
-	/**
-	 * @class Convenience implementation for implementing pipelines (see
-	 *        http://metawidget.org/doc/reference/en/html/ch02.html).
-	 *        <p>
-	 *        Specifically, BasePipeline provides support for:
-	 *        </p>
-	 *        <ul>
-	 *        <li>Inspectors, InspectionResultProcessors, WidgetBuilders,
-	 *        WidgetProcessors and Layouts</li>
-	 *        <li>single/compound widgets</li>
-	 *        <li>stubs/stub attributes</li>
-	 *        <li>read-only/active widgets</li>
-	 *        <li>maximum inspection depth</li>
-	 *        </ul>
-	 */
-
-	metawidget.Pipeline = function( element ) {
-
-		if ( ! ( this instanceof metawidget.Pipeline ) ) {
-			throw new Error( 'Constructor called as a function' );
-		}
-
-		this.inspectionResultProcessors = [];
-		this.widgetProcessors = [];
-		this.element = element;
-		this.maximumInspectionDepth = 10;
-	};
-
-	/**
-	 * Configures the pipeline using the given config object.
-	 * <p>
-	 * This method is separate to the constructor, so that subclasses can set
-	 * defaults. The following configuration properties are supported:
-	 * <ul>
-	 * <li>inspector - an Inspector</li>
-	 * <li>inspectionResultProcessors - an array of InspectionResultProcessors</li>
-	 * <li>widgetBuilder - a WidgetBuilder</li>
-	 * <li>widgetProcessors - an array of WidgetProcessors</li>
-	 * <li>layout - a Layout</li>
-	 * </ul>
-	 * 
-	 * @param config
-	 *            the config object to use. This can be an array, in which case
-	 *            multiple configs will be applied (in the order they appear in
-	 *            the array)
-	 */
-
-	metawidget.Pipeline.prototype.configure = function( config ) {
-
-		if ( config === undefined ) {
-			return;
-		}
-
-		// Support arrays of configs
-
-		var loop;
-
-		if ( config instanceof Array ) {
-			for ( loop = 0; loop < config.length; loop++ ) {
-				this.configure( config[loop] );
-			}
-			return;
-		}
-		if ( config.inspector !== undefined ) {
-			this.inspector = config.inspector;
-		}
-		if ( config.inspectionResultProcessors !== undefined ) {
-			this.inspectionResultProcessors = config.inspectionResultProcessors.slice( 0 );
-		}
-
-		// Support prepending/adding to the existing array of
-		// InspectionResultProcessors
-		// (it may be hard for clients to redefine the originals)
-
-		if ( config.prependInspectionResultProcessors !== undefined ) {
-			if ( !( config.prependInspectionResultProcessors instanceof Array )) {
-				config.prependInspectionResultProcessors = [ config.prependInspectionResultProcessors ];
-			}
-			for ( loop = 0; loop < config.prependInspectionResultProcessors.length; loop++ ) {
-				this.inspectionResultProcessors.splice( loop, 0, config.prependInspectionResultProcessors[loop] );
-			}
-		}
-		if ( config.appendInspectionResultProcessors !== undefined ) {
-			if ( !( config.appendInspectionResultProcessors instanceof Array )) {
-				config.appendInspectionResultProcessors = [ config.appendInspectionResultProcessors ];
-			}
-			for ( loop = 0; loop < config.appendInspectionResultProcessors.length; loop++ ) {
-				this.inspectionResultProcessors.push( config.appendInspectionResultProcessors[loop] );
-			}
-		}
-		if ( config.widgetBuilder !== undefined ) {
-			this.widgetBuilder = config.widgetBuilder;
-		}
-		if ( config.widgetProcessors !== undefined ) {
-			this.widgetProcessors = config.widgetProcessors.slice( 0 );
-		}
-
-		// Support prepending/appending to the existing array of
-		// WidgetProcessors
-		// (it may be hard for clients to redefine the originals)
-
-		if ( config.prependWidgetProcessors !== undefined ) {
-			if ( !( config.prependWidgetProcessors instanceof Array )) {
-				config.prependWidgetProcessors = [ config.prependWidgetProcessors ];
-			}
-			for ( loop = 0; loop < config.prependWidgetProcessors.length; loop++ ) {
-				this.widgetProcessors.splice( loop, 0, config.prependWidgetProcessors[loop] );
-			}
-		}
-		if ( config.appendWidgetProcessors !== undefined ) {
-			if ( !( config.appendWidgetProcessors instanceof Array )) {
-				config.appendWidgetProcessors = [ config.appendWidgetProcessors ];
-			}
-			for ( loop = 0; loop < config.appendWidgetProcessors.length; loop++ ) {
-				this.widgetProcessors.push( config.appendWidgetProcessors[loop] );
-			}
-		}
-		if ( config.layout !== undefined ) {
-			this.layout = config.layout;
-		}
-
-		// Safeguard against infinite recursion
-
-		if ( config.maximumInspectionDepth !== undefined ) {
-			this.maximumInspectionDepth = config.maximumInspectionDepth - 1;
-		}
-
-		// CSS support
-
-		if ( config.styleClass !== undefined ) {
-			this.styleClass = config.styleClass;
-			metawidget.util.appendToAttribute( this.element, 'class', config.styleClass );
-		}
-	};
-
-	/**
-	 * Searches the pipeline's current list of WidgetProcessors and matches each
-	 * against the given function
-	 * 
-	 * @param testInstanceOf
-	 *            a function that accepts a WidgetProcessor and will perform an
-	 *            'instanceof' test on it
-	 */
-
-	metawidget.Pipeline.prototype.getWidgetProcessor = function( testInstanceOf ) {
-
-		for ( var loop = 0, length = this.widgetProcessors.length; loop < length; loop++ ) {
-
-			var widgetProcessor = this.widgetProcessors[loop];
-
-			if ( testInstanceOf( widgetProcessor ) ) {
-				return widgetProcessor;
-			}
-		}
-	};
-
-	/**
-	 * Inspect the 'toInspect' according to its 'type' and 'names', and return
-	 * the result as a JSON String.
-	 * <p>
-	 * This method mirrors the <code>Inspector</code> interface. Internally it
-	 * looks up the Inspector to use. It is a useful hook for subclasses wishing
-	 * to inspect different Objects using our same <code>Inspector</code>.
-	 * <p>
-	 * In addition, this method runs the <code>InspectionResultProcessors</code>.
-	 */
-
-	metawidget.Pipeline.prototype.inspect = function( toInspect, type, names, mw ) {
-
-		// Inspector
-
-		var inspectionResult;
-
-		if ( this.inspector.inspect !== undefined ) {
-			inspectionResult = this.inspector.inspect( toInspect, type, names );
-		} else {
-			inspectionResult = this.inspector( toInspect, type, names );
-		}
-
-		// Inspector may return undefined
-
-		if ( inspectionResult === undefined ) {
-			return;
-		}
-
-		// InspectionResultProcessors
-
-		for ( var loop = 0, length = this.inspectionResultProcessors.length; loop < length; loop++ ) {
-
-			var inspectionResultProcessor = this.inspectionResultProcessors[loop];
-
-			if ( inspectionResultProcessor.processInspectionResult !== undefined ) {
-				inspectionResult = inspectionResultProcessor.processInspectionResult( inspectionResult, mw, toInspect, type, names );
-			} else {
-				inspectionResult = inspectionResultProcessor( inspectionResult, mw, toInspect, type, names );
-			}
-
-			// InspectionResultProcessor may return undefined
-
-			if ( inspectionResult === undefined ) {
-				return;
-			}
-		}
-
-		return inspectionResult;
-	};
-
-	/**
-	 * Build widgets from the given JSON inspection result.
-	 * <p>
-	 * Note: the Pipeline expects the JSON to be passed in externally, rather
-	 * than fetching it itself, because some JSON inspections may be
-	 * asynchronous.
-	 * 
-	 * @param inspectionResult
-	 *            array of metadata to base widgets on.
-	 * @param mw
-	 *            Metawidget instance that will be passed down the pipeline
-	 *            (WidgetBuilders, WidgetProcessors etc). Expected to have
-	 *            'toInspect', 'path' and 'readOnly'.
-	 */
-
-	metawidget.Pipeline.prototype.buildWidgets = function( inspectionResult, mw ) {
-
-		// Clear existing contents
-
-		mw.clearWidgets();
-
-		_startBuild( this, mw );
-
-		// Build top-level widget...
-
-		if ( inspectionResult !== undefined ) {
-
-			var copiedAttributes = _forceReadOnly( inspectionResult, mw, 'properties' );
-			var elementName = "entity";
-			var widget = _buildWidget( this, elementName, copiedAttributes, mw );
-
-			if ( widget !== undefined ) {
-
-				widget = _processWidget( this, widget, elementName, copiedAttributes, mw );
-
-				if ( widget !== undefined ) {
-					this.layoutWidget( widget, elementName, copiedAttributes, this.element, mw );
-				}
-
-			} else {
-
-				// ...or try compound widget
-
-				var inspectionResultProperties = metawidget.util.getSortedInspectionResultProperties( inspectionResult );
-
-				for ( var loop = 0, length = inspectionResultProperties.length; loop < length; loop++ ) {
-
-					copiedAttributes = _forceReadOnly( inspectionResultProperties[loop], mw );
-
-					if ( copiedAttributes.type === 'function' ) {
-						elementName = "action";
-					} else {
-						elementName = "property";
-					}
-
-					widget = _buildWidget( this, elementName, copiedAttributes, mw );
-
-					if ( widget === undefined ) {
-
-						if ( this.maximumInspectionDepth <= 0 ) {
-							continue;
-						}
-
-						widget = mw.buildNestedMetawidget( copiedAttributes );
-
-						if ( widget === undefined ) {
-							continue;
-						}
-					}
-
-					widget = _processWidget( this, widget, elementName, copiedAttributes, mw );
-
-					if ( widget !== undefined ) {
-						this.layoutWidget( widget, elementName, copiedAttributes, this.element, mw );
-					}
-				}
-			}
-		}
-
-		// Even if no inspectors match, we still call startBuild()/endBuild()
-		// because you can use a Metawidget purely for layout, with no
-		// inspection
-
-		_endBuild( this, mw );
-
-		// Throw an event for interested parties (such as tests). Does not work
-		// on IE8
-
-		if ( this.element.dispatchEvent !== undefined ) {
-			this.element.dispatchEvent( metawidget.util.createEvent( mw, 'buildEnd' ) );
-		}
-
-		//
-		// Private methods
-		//
-
-		/**
-		 * Defensively copies the attributes (in case something like
-		 * stripSection changes them) and adds 'readOnly' if the given
-		 * Metawidget is readOnly.
-		 */
-
-		function _forceReadOnly( attributes, mw, excludes ) {
-
-			var copiedAttributes = {};
-
-			for ( var name in attributes ) {
-
-				if ( excludes !== undefined && excludes.indexOf( name ) !== -1 ) {
-					continue;
-				}
-
-				copiedAttributes[name] = attributes[name];
-			}
-
-			// Try to keep the exact nature of the 'readOnly' mechanism (i.e.
-			// set on attribute, or set on overall Metawidget) out of the
-			// WidgetBuilders/WidgetProcessors/Layouts. This is because not
-			// everybody will need/want a Metawidget-level 'setReadOnly'
-
-			if ( mw.readOnly === true ) {
-				copiedAttributes.readOnly = 'true';
-			}
-
-			return copiedAttributes;
-		}
-
-		function _startBuild( pipeline, mw ) {
-
-			// Mark overridden widgets. This is useful for Angular so that it
-			// doesn't $compile them again. It's useful for JQuery Mobile so it
-			// doesn't .trigger( 'create' ) them again
-
-			for ( var loop = 0, length = mw.overriddenNodes.length; loop < length; loop++ ) {
-				mw.overriddenNodes[loop].overridden = true;
-			}
-
-			if ( pipeline.widgetBuilder.onStartBuild !== undefined ) {
-				pipeline.widgetBuilder.onStartBuild( mw );
-			}
-
-			_onStartEndBuild( 'onStartBuild', pipeline, mw );
-
-			if ( pipeline.layout.onStartBuild !== undefined ) {
-				pipeline.layout.onStartBuild( mw );
-			}
-
-			if ( pipeline.layout.startContainerLayout !== undefined ) {
-				pipeline.layout.startContainerLayout( pipeline.element, mw );
-			}
-		}
-
-		function _buildWidget( pipeline, elementName, attributes, mw ) {
-
-			if ( pipeline.widgetBuilder.buildWidget !== undefined ) {
-				return pipeline.widgetBuilder.buildWidget( elementName, attributes, mw );
-			}
-
-			return pipeline.widgetBuilder( elementName, attributes, mw );
-		}
-
-		function _processWidget( pipeline, widget, elementName, attributes, mw ) {
-
-			for ( var loop = 0, length = pipeline.widgetProcessors.length; loop < length; loop++ ) {
-
-				var widgetProcessor = pipeline.widgetProcessors[loop];
-
-				if ( widgetProcessor.processWidget !== undefined ) {
-					widget = widgetProcessor.processWidget( widget, elementName, attributes, mw );
-				} else {
-					widget = widgetProcessor( widget, elementName, attributes, mw );
-				}
-
-				if ( widget === undefined ) {
-					return;
-				}
-			}
-
-			return widget;
-		}
-
-		function _endBuild( pipeline, mw ) {
-
-			if ( mw.onEndBuild !== undefined ) {
-				mw.onEndBuild();
-			} else {
-				while ( mw.overriddenNodes.length > 0 ) {
-
-					var child = mw.overriddenNodes[0];
-					mw.overriddenNodes.splice( 0, 1 );
-
-					// Unused facets don't count
-
-					if ( child.tagName === 'FACET' ) {
-						continue;
-					}
-
-					// Stubs can supply their own metadata (such as 'title')
-
-					var childAttributes = {
-						section: ''
-					};
-
-					if ( child.tagName === 'STUB' ) {
-						for ( var loop = 0, length = child.attributes.length; loop < length; loop++ ) {
-							var prop = child.attributes[loop];
-							childAttributes[prop.nodeName] = prop.nodeValue;
-						}
-					}
-
-					// Manually created components default to no section
-
-					pipeline.layoutWidget( child, "property", childAttributes, pipeline.element, mw );
-				}
-			}
-
-			// End all stages of the pipeline
-
-			if ( pipeline.layout.endContainerLayout !== undefined ) {
-				pipeline.layout.endContainerLayout( pipeline.element, mw );
-			}
-
-			if ( pipeline.layout.onEndBuild !== undefined ) {
-				pipeline.layout.onEndBuild( mw );
-			}
-
-			_onStartEndBuild( 'onEndBuild', pipeline, mw );
-
-			if ( pipeline.widgetBuilder.onEndBuild !== undefined ) {
-				pipeline.widgetBuilder.onEndBuild( mw );
-			}
-		}
-
-		function _onStartEndBuild( functionName, pipeline, mw ) {
-
-			for ( var loop = 0, length = pipeline.widgetProcessors.length; loop < length; loop++ ) {
-
-				var widgetProcessor = pipeline.widgetProcessors[loop];
-
-				if ( widgetProcessor[functionName] !== undefined ) {
-					widgetProcessor[functionName]( mw );
-				}
-			}
-		}
-	};
-
-	/**
-	 * Layout the given widget by delegating to the configured Layout.
-	 * <p>
-	 * Subclasses can override this method to perform any post-processing of the
-	 * widget, following layout. For <em>pre</em>-processing, subclasses
-	 * should use a WidgetProcessor.
-	 */
-
-	metawidget.Pipeline.prototype.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-		if ( this.layout.layoutWidget !== undefined ) {
-			this.layout.layoutWidget( widget, elementName, attributes, container, mw );
-			return;
-		}
-
-		this.layout( widget, elementName, attributes, container, mw );
-	};
-} )();
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/jquery-ui/metawidget-jqueryui.js b/src/main/webapp/js/3rdparty/metawidget/jquery-ui/metawidget-jqueryui.js
deleted file mode 100755
index 1316f547326ad2943c8d9441700edbfce538005a..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/jquery-ui/metawidget-jqueryui.js
+++ /dev/null
@@ -1,432 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace Metawidget for JQuery UI environments.
-	 */
-
-	metawidget.jqueryui = metawidget.jqueryui || {};
-
-	/**
-	 * @namespace JQuery UI WidgetBuilders.
-	 */
-
-	metawidget.jqueryui.widgetbuilder = metawidget.jqueryui.widgetbuilder || {};
-
-	/**
-	 * @class Builds widgets using JQuery UI.
-	 *        <p>
-	 *        Chooses JQuery UI widgets such as <tt>slider</tt> and
-	 *        <tt>spinner</tt> to suit the inspected fields. Returns undefined
-	 *        for everything else.
-	 */
-
-	metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder = function() {
-
-		if ( ! ( this instanceof metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-	};
-
-	metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder.prototype.buildWidget = function( elementName, attributes, mw ) {
-
-		// Not for us?
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.readOnly ) ) {
-			return;
-		}
-
-		if ( metawidget.util.isTrueOrTrueString( attributes.hidden ) ) {
-			return;
-		}
-
-		// Number
-
-		if ( attributes.type === 'number' || attributes.type === 'integer' ) {
-
-			if ( attributes.minimum && attributes.maximum ) {
-				var slider = metawidget.util.createElement( mw, 'div' );
-				$( slider ).slider();
-				return slider;
-			}
-
-			var spinner = metawidget.util.createElement( mw, 'input' );
-			$( spinner ).spinner();
-			return $( spinner ).spinner( 'widget' )[0];
-		}
-
-		// Datepicker
-
-		if ( attributes.type === 'date' ) {
-			var date = metawidget.util.createElement( mw, 'input' );
-			$( date ).datepicker();
-			return date;
-		}
-	};
-
-	/**
-	 * @namespace JQuery UI WidgetProcessors.
-	 */
-
-	metawidget.jqueryui.widgetprocessor = metawidget.jqueryui.widgetprocessor || {};
-
-	/**
-	 * @class Binds JQuery UI specific widgets, using the JQuery
-	 *        <tt>$( widget ).foo( 'value', value )</tt> syntax. Clients
-	 *        should still use SimpleBindingProcessor for all non-JQuery UI
-	 *        widgets.
-	 */
-
-	metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-	};
-
-	metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor.prototype.onStartBuild = function( mw ) {
-
-		mw._jQueryUIBindingProcessorBindings = {};
-	};
-
-	metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor.prototype.processWidget = function( widget, elementName, attributes, mw ) {
-
-		var value;
-		var typeAndNames = metawidget.util.splitPath( mw.path );
-		var toInspect = metawidget.util.traversePath( mw.toInspect, typeAndNames.names );
-
-		if ( elementName !== 'entity' && toInspect ) {
-			value = toInspect[attributes.name];
-		} else {
-			value = toInspect;
-		}
-
-		var isBindable = false;
-
-		if ( widget.hasAttribute( 'class' ) ) {
-			var styleClass = widget.getAttribute( 'class' );
-
-			if ( styleClass.indexOf( 'ui-slider' ) !== -1 ) {
-				$( widget ).slider( 'value', value );
-				isBindable = true;
-			} else if ( styleClass.indexOf( 'ui-spinner' ) !== -1 ) {
-				$( widget.childNodes[0] ).spinner( 'value', value );
-				isBindable = true;
-			}
-		}
-
-		if ( isBindable === true || widget.getMetawidget !== undefined ) {
-			mw._jQueryUIBindingProcessorBindings[attributes.name] = widget;
-		}
-
-		return widget;
-	};
-
-	/**
-	 * Save the bindings associated with the given Metawidget.
-	 */
-
-	metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor.prototype.save = function( mw ) {
-
-		var typeAndNames = metawidget.util.splitPath( mw.path );
-		var toInspect = metawidget.util.traversePath( mw.toInspect, typeAndNames.names );
-
-		for ( var name in mw._jQueryUIBindingProcessorBindings ) {
-
-			var widget = mw._jQueryUIBindingProcessorBindings[name];
-
-			if ( widget.getMetawidget !== undefined ) {
-				this.save( widget.getMetawidget() );
-				continue;
-			}
-
-			widget = mw.getElement().ownerDocument.getElementById( widget.id );
-
-			var styleClass = widget.getAttribute( 'class' );
-
-			if ( styleClass.indexOf( 'ui-slider' ) !== -1 ) {
-				toInspect[name] = $( widget ).slider( 'value' );
-			} else if ( styleClass.indexOf( 'ui-spinner' ) !== -1 ) {
-				toInspect[name] = $( widget.childNodes[0] ).spinner( 'value' );
-			}
-		}
-	};
-
-	metawidget.jqueryui.layout = metawidget.jqueryui.layout || {};
-
-	/**
-	 * @class LayoutDecorator to decorate widgets from different sections using
-	 *        JQuery UI tabs.
-	 */
-
-	metawidget.jqueryui.layout.TabLayoutDecorator = function( config ) {
-
-		if ( ! ( this instanceof metawidget.jqueryui.layout.TabLayoutDecorator ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-
-		metawidget.layout.createNestedSectionLayoutDecorator( config, this, 'tabLayoutDecorator' );
-
-		var _superOnEndBuild = this.onEndBuild;
-
-		/**
-		 * Wrap the tabs at the very end, to save using 'tabs.add'.
-		 */
-
-		this.onEndBuild = function( mw ) {
-
-			if ( mw.tabLayoutDecorator !== undefined ) {
-				for ( var loop = 0, length = mw.tabLayoutDecorator.length; loop < length; loop++ ) {
-					$( mw.tabLayoutDecorator[loop] ).tabs();
-				}
-			}
-
-			if ( _superOnEndBuild !== undefined ) {
-				_superOnEndBuild.call( this, mw );
-			}
-		};
-	};
-
-	metawidget.jqueryui.layout.TabLayoutDecorator.prototype.createSectionWidget = function( previousSectionWidget, section, attributes, container, mw ) {
-
-		var tabs = previousSectionWidget;
-
-		// Whole new tabbed pane?
-
-		if ( tabs === undefined ) {
-			tabs = metawidget.util.createElement( mw, 'div' );
-			tabs.setAttribute( 'id', metawidget.util.getId( "property", attributes, mw ) + '-tabs' );
-			tabs.appendChild( metawidget.util.createElement( mw, 'ul' ) );
-			this.getDelegate().layoutWidget( tabs, "property", {
-				wide: "true"
-			}, container, mw );
-
-			mw.tabLayoutDecorator = mw.tabLayoutDecorator || [];
-			mw.tabLayoutDecorator.push( tabs );
-		} else {
-			tabs = previousSectionWidget.parentNode;
-		}
-
-		// New Tab
-
-		var ul = tabs.childNodes[0];
-		var tabId = tabs.getAttribute( 'id' ) + ( ul.childNodes.length + 1 );
-		var li = metawidget.util.createElement( mw, 'li' );
-		var a = metawidget.util.createElement( mw, 'a' );
-		a.setAttribute( 'href', '#' + tabId );
-		a.hash = '#' + tabId;
-		li.appendChild( a );
-		ul.appendChild( li );
-
-		var tab = metawidget.util.createElement( mw, 'div' );
-		tab.setAttribute( 'id', tabId );
-		tabs.appendChild( tab );
-
-		// Tab name
-
-		a.innerHTML = section;
-
-		return tab;
-	};
-
-	/**
-	 * JQuery UI WidgetFactory-based Metawidget.
-	 */
-
-	$.widget( "metawidget.metawidget", {
-
-		/**
-		 * Default configuration
-		 */
-
-		options: {
-			inspector: new metawidget.inspector.PropertyTypeInspector(),
-			widgetBuilder: new metawidget.widgetbuilder.CompositeWidgetBuilder( [ new metawidget.widgetbuilder.OverriddenWidgetBuilder(),
-					new metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder(), new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(), new metawidget.widgetbuilder.HtmlWidgetBuilder() ] ),
-			widgetProcessors: [ new metawidget.widgetprocessor.IdProcessor(), new metawidget.widgetprocessor.RequiredAttributeProcessor(),
-					new metawidget.widgetprocessor.PlaceholderAttributeProcessor(), new metawidget.widgetprocessor.DisabledAttributeProcessor(), new metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor(),
-					new metawidget.widgetprocessor.SimpleBindingProcessor() ],
-			layout: new metawidget.layout.HeadingTagLayoutDecorator( new metawidget.layout.TableLayout() )
-		},
-
-		/**
-		 * Constructor
-		 */
-
-		_create: function() {
-
-			// Pipeline (private, based on convention here:
-			// http://forum.jquery.com/topic/what-s-the-right-way-to-store-private-data-in-widget-s-instance)
-
-			this._pipeline = new metawidget.Pipeline( this.element[0] );
-
-			// Configure defaults
-
-			this._pipeline.configure( this.options );
-
-			// First time in, capture the contents of the Metawidget (if any)
-
-			this._overriddenNodes = [];
-
-			var element = this.element[0];
-
-			var mw = this;
-			
-			element.getMetawidget = function() {
-
-				return mw;
-			};
-
-			for ( var loop = 0; loop < element.childNodes.length; ) {
-				if ( element.childNodes[loop].nodeType !== 1 ) {
-					loop++;
-					continue;
-				}
-
-				var childNode = element.childNodes[loop];
-				element.removeChild( childNode );
-				this._overriddenNodes.push( childNode );
-			}
-		},
-
-		/**
-		 * Called when created, and later when changing options.
-		 */
-
-		_refresh: function( inspectionResult ) {
-
-			// Defensive copy
-
-			this.overriddenNodes = [];
-
-			for ( var loop = 0, length = this._overriddenNodes.length; loop < length; loop++ ) {
-				this.overriddenNodes.push( this._overriddenNodes[loop].cloneNode( true ) );
-			}
-
-			// Inspect (if necessary)
-
-			if ( inspectionResult === undefined ) {
-
-				// Safeguard against improperly implementing:
-				// http://blog.kennardconsulting.com/2013/02/metawidget-and-rest.html
-
-				if ( arguments.length > 0 ) {
-					throw new Error( "Calling _refresh( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead" );
-				}
-
-				var splitPath = metawidget.util.splitPath( this.path );
-				inspectionResult = this._pipeline.inspect( this.toInspect, splitPath.type, splitPath.names, this );
-			}
-
-			// Build widgets
-
-			this._pipeline.buildWidgets( inspectionResult, this );
-		},
-
-		/**
-		 * _setOptions is called with a hash of all options that are changing.
-		 */
-
-		_setOptions: function() {
-
-			this._superApply( arguments );
-			this._pipeline.configure( this.options );
-		},
-
-		setReadOnly: function( readOnly ) {
-
-			this.readOnly = readOnly;
-		},
-
-		/**
-		 * Useful for WidgetBuilders to perform nested inspections (eg. for
-		 * Collections).
-		 */
-
-		inspect: function( toInspect, type, names ) {
-
-			return this._pipeline.inspect( toInspect, type, names, this );
-		},
-
-		/**
-		 * Overridden to use JQuery.empty (safer for memory leaks).
-		 */
-		
-		clearWidgets: function() {
-		
-			$( this.getElement() ).empty();
-		},
-		
-		/**
-		 * Inspect the given toInspect/path and build widgets.
-		 * <p>
-		 * Invoke using
-		 * <tt>$( '#metawidget' ).metawidget( "buildWidgets", toInspect, path )</tt>.
-		 */
-
-		buildWidgets: function( toInspect, path ) {
-
-			if ( toInspect !== undefined ) {
-				this.toInspect = toInspect;
-				this.path = undefined;
-			}
-
-			if ( path !== undefined ) {
-				this.path = path;
-			}
-
-			this._refresh();
-		},
-
-		getWidgetProcessor: function( testInstanceOf ) {
-
-			return this._pipeline.getWidgetProcessor( testInstanceOf );
-		},
-		
-		/**
-		 * Returns the element this Metawidget is attached to.
-		 */
-
-		getElement: function() {
-
-			return this._pipeline.element;
-		},
-
-		buildNestedMetawidget: function( attributes, config ) {
-
-			// Create a 'div' not a 'metawidget', because whilst it's up to the
-			// user what they want their top-level element to be, for browser
-			// compatibility we should stick with something benign for nested
-			// elements
-
-			var nestedWidget = metawidget.util.createElement( this, 'div' );
-
-			// Duck-type our 'pipeline' as the 'config' of the nested
-			// Metawidget. This neatly passes everything down, including a
-			// decremented 'maximumInspectionDepth'
-
-			var nestedMetawidget = $( nestedWidget ).metawidget( this._pipeline );
-
-			nestedMetawidget.metawidget( "setReadOnly", this.readOnly || metawidget.util.isTrueOrTrueString( attributes.readOnly ) );
-			var nestedToInspect = this.toInspect;
-			var nestedPath = metawidget.util.appendPath( attributes, this );
-
-			nestedMetawidget.metawidget( "buildWidgets", nestedToInspect, nestedPath );
-			return nestedWidget;
-		}
-	} );
-} )();
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/jquery-ui/metawidget-jqueryui.min.js b/src/main/webapp/js/3rdparty/metawidget/jquery-ui/metawidget-jqueryui.min.js
deleted file mode 100755
index 87c18d2b129eb37781f329985c1cb25187bb7fcf..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/jquery-ui/metawidget-jqueryui.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Metawidget 4.2 minified
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-//
-// Author: Richard Kennard (http://kennardconsulting.com)
-
-var metawidget=metawidget||{};(function(){metawidget.jqueryui=metawidget.jqueryui||{};metawidget.jqueryui.widgetbuilder=metawidget.jqueryui.widgetbuilder||{};metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder=function(){if(!(this instanceof metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder)){throw new Error("Constructor called as a function")}};metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder.prototype.buildWidget=function(a,b,f){if(metawidget.util.isTrueOrTrueString(b.readOnly)){return}if(metawidget.util.isTrueOrTrueString(b.hidden)){return}if(b.type==="number"||b.type==="integer"){if(b.minimum&&b.maximum){var d=metawidget.util.createElement(f,"div");$(d).slider();return d}var e=metawidget.util.createElement(f,"input");$(e).spinner();return $(e).spinner("widget")[0]}if(b.type==="date"){var c=metawidget.util.createElement(f,"input");$(c).datepicker();return c}};metawidget.jqueryui.widgetprocessor=metawidget.jqueryui.widgetprocessor||{};metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor=function(){if(!(this instanceof metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor)){throw new Error("Constructor called as a function")}};metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor.prototype.onStartBuild=function(a){a._jQueryUIBindingProcessorBindings={}};metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor.prototype.processWidget=function(d,i,b,f){var e;var h=metawidget.util.splitPath(f.path);var g=metawidget.util.traversePath(f.toInspect,h.names);if(i!=="entity"&&g){e=g[b.name]}else{e=g}var a=false;if(d.hasAttribute("class")){var c=d.getAttribute("class");if(c.indexOf("ui-slider")!==-1){$(d).slider("value",e);a=true}else{if(c.indexOf("ui-spinner")!==-1){$(d.childNodes[0]).spinner("value",e);a=true}}}if(a===true||d.getMetawidget!==undefined){f._jQueryUIBindingProcessorBindings[b.name]=d}return d};metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor.prototype.save=function(f){var c=metawidget.util.splitPath(f.path);
-var e=metawidget.util.traversePath(f.toInspect,c.names);for(var b in f._jQueryUIBindingProcessorBindings){var d=f._jQueryUIBindingProcessorBindings[b];if(d.getMetawidget!==undefined){this.save(d.getMetawidget());continue}d=f.getElement().ownerDocument.getElementById(d.id);var a=d.getAttribute("class");if(a.indexOf("ui-slider")!==-1){e[b]=$(d).slider("value")}else{if(a.indexOf("ui-spinner")!==-1){e[b]=$(d.childNodes[0]).spinner("value")}}}};metawidget.jqueryui.layout=metawidget.jqueryui.layout||{};metawidget.jqueryui.layout.TabLayoutDecorator=function(a){if(!(this instanceof metawidget.jqueryui.layout.TabLayoutDecorator)){throw new Error("Constructor called as a function")}metawidget.layout.createNestedSectionLayoutDecorator(a,this,"tabLayoutDecorator");var b=this.onEndBuild;this.onEndBuild=function(e){if(e.tabLayoutDecorator!==undefined){for(var c=0,d=e.tabLayoutDecorator.length;c<d;c++){$(e.tabLayoutDecorator[c]).tabs()}}if(b!==undefined){b.call(this,e)}}};metawidget.jqueryui.layout.TabLayoutDecorator.prototype.createSectionWidget=function(i,j,e,b,l){var g=i;if(g===undefined){g=metawidget.util.createElement(l,"div");g.setAttribute("id",metawidget.util.getId("property",e,l)+"-tabs");g.appendChild(metawidget.util.createElement(l,"ul"));this.getDelegate().layoutWidget(g,"property",{wide:"true"},b,l);l.tabLayoutDecorator=l.tabLayoutDecorator||[];l.tabLayoutDecorator.push(g)}else{g=i.parentNode}var f=g.childNodes[0];var c=g.getAttribute("id")+(f.childNodes.length+1);var k=metawidget.util.createElement(l,"li");var h=metawidget.util.createElement(l,"a");h.setAttribute("href","#"+c);h.hash="#"+c;k.appendChild(h);f.appendChild(k);var d=metawidget.util.createElement(l,"div");d.setAttribute("id",c);g.appendChild(d);h.innerHTML=j;return d};$.widget("metawidget.metawidget",{options:{inspector:new metawidget.inspector.PropertyTypeInspector(),widgetBuilder:new metawidget.widgetbuilder.CompositeWidgetBuilder([new metawidget.widgetbuilder.OverriddenWidgetBuilder(),new metawidget.jqueryui.widgetbuilder.JQueryUIWidgetBuilder(),new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),new metawidget.widgetbuilder.HtmlWidgetBuilder()]),widgetProcessors:[new metawidget.widgetprocessor.IdProcessor(),new metawidget.widgetprocessor.RequiredAttributeProcessor(),new metawidget.widgetprocessor.PlaceholderAttributeProcessor(),new metawidget.widgetprocessor.DisabledAttributeProcessor(),new metawidget.jqueryui.widgetprocessor.JQueryUIBindingProcessor(),new metawidget.widgetprocessor.SimpleBindingProcessor()],layout:new metawidget.layout.HeadingTagLayoutDecorator(new metawidget.layout.TableLayout())},_create:function(){this._pipeline=new metawidget.Pipeline(this.element[0]);
-this._pipeline.configure(this.options);this._overriddenNodes=[];var c=this.element[0];var d=this;c.getMetawidget=function(){return d};for(var a=0;a<c.childNodes.length;){if(c.childNodes[a].nodeType!==1){a++;continue}var b=c.childNodes[a];c.removeChild(b);this._overriddenNodes.push(b)}},_refresh:function(d){this.overriddenNodes=[];for(var a=0,c=this._overriddenNodes.length;a<c;a++){this.overriddenNodes.push(this._overriddenNodes[a].cloneNode(true))}if(d===undefined){if(arguments.length>0){throw new Error("Calling _refresh( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead")}var b=metawidget.util.splitPath(this.path);d=this._pipeline.inspect(this.toInspect,b.type,b.names,this)}this._pipeline.buildWidgets(d,this)},_setOptions:function(){this._superApply(arguments);this._pipeline.configure(this.options)},setReadOnly:function(a){this.readOnly=a},inspect:function(c,a,b){return this._pipeline.inspect(c,a,b,this)},clearWidgets:function(){$(this.getElement()).empty()},buildWidgets:function(b,a){if(b!==undefined){this.toInspect=b;this.path=undefined}if(a!==undefined){this.path=a}this._refresh()},getWidgetProcessor:function(a){return this._pipeline.getWidgetProcessor(a)},getElement:function(){return this._pipeline.element},buildNestedMetawidget:function(a,c){var f=metawidget.util.createElement(this,"div");var d=$(f).metawidget(this._pipeline);d.metawidget("setReadOnly",this.readOnly||metawidget.util.isTrueOrTrueString(a.readOnly));var b=this.toInspect;var e=metawidget.util.appendPath(a,this);d.metawidget("buildWidgets",b,e);return f}})})();
diff --git a/src/main/webapp/js/3rdparty/metawidget/jquery.mobile/metawidget-jquerymobile.js b/src/main/webapp/js/3rdparty/metawidget/jquery.mobile/metawidget-jquerymobile.js
deleted file mode 100755
index ff7feb9daba6c14bce7c0766bcb5920451ea4b3f..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/jquery.mobile/metawidget-jquerymobile.js
+++ /dev/null
@@ -1,395 +0,0 @@
-// Metawidget 4.2
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-
-var metawidget = metawidget || {};
-
-( function() {
-
-	'use strict';
-
-	/**
-	 * @namespace Metawidget for JQuery Mobile environments.
-	 */
-
-	metawidget.jquerymobile = metawidget.jquerymobile || {};
-
-	/**
-	 * @namespace JQuery Mobile WidgetProcessors.
-	 */
-
-	metawidget.jquerymobile.widgetprocessor = metawidget.jquerymobile.widgetprocessor || {};
-
-	/**
-	 * @class adapts to JQuery Mobile-specific syntax.
-	 */
-
-	metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-	};
-
-	metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor.prototype.processWidget = function( widget, elementName, attributes, mw ) {
-
-		// JQuery Mobile has a special syntax for arrays
-
-		if ( widget.tagName === 'DIV' && attributes.type === 'array' ) {
-
-			var fieldset = metawidget.util.createElement( mw, 'fieldset' );
-			fieldset.setAttribute( 'data-role', 'controlgroup' );
-
-			while ( widget.childNodes.length > 0 ) {
-				var label = widget.childNodes[0];
-
-				if ( label.tagName !== 'LABEL' ) {
-					return widget;
-				}
-
-				var id = widget.getAttribute( 'id' ) + widget.childNodes.length;
-				label.setAttribute( 'for', id );
-				var input = label.childNodes[0];
-				input.setAttribute( 'id', id );
-
-				fieldset.appendChild( input );
-				fieldset.appendChild( label );
-			}
-
-			widget = fieldset;
-		}
-
-		return widget;
-	};
-
-	metawidget.jquerymobile.widgetprocessor.JQueryMobileSimpleBindingProcessor = function() {
-
-		if ( ! ( this instanceof metawidget.jquerymobile.widgetprocessor.JQueryMobileSimpleBindingProcessor ) ) {
-			throw new Error( "Constructor called as a function" );
-		}
-
-		var processor = new metawidget.widgetprocessor.SimpleBindingProcessor();
-
-		// Overridden because some JQuery Mobile widgets (such as search inputs)
-		// swap out the existing DOM. We can resolve this using JQuery more
-		// safely then with pure JavaScript, because we can find *within* a node
-
-		processor.getWidgetFromBinding = function( binding, mw ) {
-
-			if ( binding.widget.getAttribute( 'type' ) === 'search' ) {
-				return $( mw.getElement() ).find( '#' + binding.widget.getAttribute( 'id' ) )[0];
-			}
-
-			// Try not to use a DOM search, because mobile is very performance
-			// sensitive
-
-			return binding.widget;
-		};
-
-		// Support arrays of checkboxes
-
-		var _superBindToWidget = processor.bindToWidget;
-		processor.bindToWidget = function( widget, value, elementName, attributes, mw ) {
-
-			var toReturn = _superBindToWidget.call( this, widget, value, elementName, attributes, mw );
-
-			if ( widget.tagName === 'FIELDSET' && attributes.type === 'array' ) {
-
-				if ( value !== undefined ) {
-					var checkboxes = widget.childNodes;
-					for ( var loop = 0, length = checkboxes.length; loop < length; loop++ ) {
-						var childNode = checkboxes[loop];
-						if ( childNode.type !== 'checkbox' ) {
-							continue;
-						}
-						if ( value.indexOf( childNode.value ) !== -1 ) {
-							childNode.checked = true;
-						}
-					}
-				}
-				return true;
-			}
-
-			return toReturn;
-		};
-		var _superSaveFromWidget = processor.saveFromWidget;
-		processor.saveFromWidget = function( binding, mw ) {
-
-			if ( binding.widget.tagName === 'FIELDSET' && binding.attributes.type === 'array' ) {
-				var toReturn = [];
-				var checkboxes = binding.widget.childNodes[0].childNodes;
-				for ( var loop = 0, length = checkboxes.length; loop < length; loop++ ) {
-					var childNode = checkboxes[loop];
-					var checkbox = $( childNode ).find( '[type=checkbox]' )[0];
-					if ( checkbox.checked ) {
-						toReturn.push( checkbox.value );
-					}
-				}
-				return toReturn;
-			}
-
-			return _superSaveFromWidget.call( this, binding, mw );
-		};
-
-		return processor;
-	};
-
-	/**
-	 * JQuery Mobile WidgetFactory-based Metawidget.
-	 */
-
-	$.widget( "mobile.metawidget", {
-
-		/**
-		 * Default configuration
-		 */
-
-		options: {
-			inspector: new metawidget.inspector.PropertyTypeInspector(),
-			widgetBuilder: new metawidget.widgetbuilder.CompositeWidgetBuilder( [ new metawidget.widgetbuilder.OverriddenWidgetBuilder(), new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),
-					new metawidget.widgetbuilder.HtmlWidgetBuilder() ] ),
-			widgetProcessors: [ new metawidget.widgetprocessor.IdProcessor(), new metawidget.widgetprocessor.RequiredAttributeProcessor(),
-					new metawidget.widgetprocessor.PlaceholderAttributeProcessor(), new metawidget.widgetprocessor.DisabledAttributeProcessor(),
-					new metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor(), new metawidget.jquerymobile.widgetprocessor.JQueryMobileSimpleBindingProcessor() ],
-			layout: new metawidget.layout.HeadingTagLayoutDecorator( new metawidget.layout.DivLayout( {
-				divStyleClasses: [ 'ui-field-contain' ],
-				suppressDivAroundLabel: true,
-				suppressDivAroundWidget: true,
-				suppressLabelSuffixOnCheckboxes: true,
-			} ) )
-		},
-
-		/**
-		 * Constructor
-		 */
-
-		_create: function() {
-
-			// Pipeline (private, based on convention here:
-			// http://forum.jquery.com/topic/what-s-the-right-way-to-store-private-data-in-widget-s-instance)
-
-			this._pipeline = new metawidget.Pipeline( this.element[0] );
-
-			// Configure defaults
-
-			this._pipeline.configure( this.options );
-
-			// JQuery Mobile automatically augments widgets with additional
-			// HTML. Clients must call trigger( 'create' ) manually for
-			// dynamically created components. This must be done on the widget's
-			// container, not the widget itself. However, it cannot be done at
-			// the top Metawidget-level, as that will 'double augment' any
-			// overridden widgets
-
-			var _superLayoutWidget = this._pipeline.layoutWidget;
-			this._pipeline.layoutWidget = function( widget, elementName, attributes, container, mw ) {
-
-				_superLayoutWidget.call( this, widget, elementName, attributes, container, mw );
-				if ( widget.overridden === undefined ) {
-
-					var childNodes = container.childNodes;
-					var containerNode = childNodes[childNodes.length - 1];
-
-					if ( containerNode === widget ) {
-
-						// Support SimpleLayout
-
-						container.removeChild( widget );
-						var wrapper = $( '<span>' ).append( widget );
-						container.appendChild( wrapper[0] );
-						wrapper.trigger( 'create' );
-
-					} else {
-
-						$( containerNode ).trigger( 'create' );
-					}
-				}
-			};
-			
-			// Force a useful convention from JQuery UI that JQuery Mobile
-			// doesn't seem to have (yet?)
-
-			this.element.data( 'metawidget', this );
-
-			// First time in, capture the contents of the Metawidget (if any)
-
-			this._overriddenNodes = [];
-
-			var element = this.element[0];
-
-			var mw = this;
-
-			element.getMetawidget = function() {
-
-				return mw;
-			};
-
-			for ( var loop = 0; loop < element.childNodes.length; ) {
-				if ( element.childNodes[loop].nodeType !== 1 ) {
-					loop++;
-					continue;
-				}
-
-				var childNode = element.childNodes[loop];
-				element.removeChild( childNode );
-
-				// De-augment before pushing, so that the widget works
-				// seamlessly with binding/override matching
-
-				if ( childNode.getAttribute( 'class' ) !== null && childNode.getAttribute( 'class' ).indexOf( 'ui-' ) !== -1 && childNode.childNodes.length === 1 ) {
-					childNode = childNode.childNodes[0];
-				}
-
-				this._overriddenNodes.push( childNode );
-			}
-		},
-
-		/**
-		 * Called when created, and later when changing options.
-		 */
-
-		_refresh: function( inspectionResult ) {
-
-			// Defensive copy
-
-			this.overriddenNodes = [];
-
-			for ( var loop = 0, length = this._overriddenNodes.length; loop < length; loop++ ) {
-				this.overriddenNodes.push( this._overriddenNodes[loop].cloneNode( true ) );
-			}
-
-			// Inspect (if necessary)
-
-			if ( inspectionResult === undefined ) {
-
-				// Safeguard against improperly implementing:
-				// http://blog.kennardconsulting.com/2013/02/metawidget-and-rest.html
-
-				if ( arguments.length > 0 ) {
-					throw new Error( "Calling _refresh( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead" );
-				}
-
-				var splitPath = metawidget.util.splitPath( this.path );
-				inspectionResult = this._pipeline.inspect( this.toInspect, splitPath.type, splitPath.names, this );
-			}
-
-			// Build widgets
-
-			this._pipeline.buildWidgets( inspectionResult, this );
-		},
-
-		/**
-		 * _setOptions is called with a hash of all options that are changing.
-		 */
-
-		_setOptions: function() {
-
-			this._superApply( arguments );
-			this._pipeline.configure( this.options );
-		},
-
-		setReadOnly: function( readOnly ) {
-
-			this.readOnly = readOnly;
-		},
-
-		/**
-		 * Useful for WidgetBuilders to perform nested inspections (eg. for
-		 * Collections).
-		 */
-
-		inspect: function( toInspect, type, names ) {
-
-			return this._pipeline.inspect( toInspect, type, names, this );
-		},
-
-		/**
-		 * Overridden to use JQuery.empty (safer for memory leaks).
-		 */
-
-		clearWidgets: function() {
-
-			$( this.getElement() ).empty();
-		},
-
-		/**
-		 * Inspect the given toInspect/path and build widgets.
-		 * <p>
-		 * Invoke using
-		 * <tt>$( '#metawidget' ).metawidget( "buildWidgets", toInspect, path )</tt>.
-		 */
-
-		buildWidgets: function( toInspect, path ) {
-
-			if ( toInspect !== undefined ) {
-				this.toInspect = toInspect;
-				this.path = undefined;
-			}
-
-			if ( path !== undefined ) {
-				this.path = path;
-			}
-
-			this._refresh();
-		},
-
-		/**
-		 * Save the contents of the Metawidget using a SimpleBindingProcessor.
-		 * <p>
-		 * This is a convenience method. To access other Metawidget APIs,
-		 * clients can use the 'getWidgetProcessor' method
-		 */
-
-		save: function() {
-
-			this._pipeline.getWidgetProcessor( function( widgetProcessor ) {
-
-				return widgetProcessor instanceof metawidget.widgetprocessor.SimpleBindingProcessor;
-			} ).save( this );
-		},
-
-		getWidgetProcessor: function( testInstanceOf ) {
-
-			return this._pipeline.getWidgetProcessor( testInstanceOf );
-		},
-
-		/**
-		 * Returns the element this Metawidget is attached to.
-		 */
-
-		getElement: function() {
-
-			return this._pipeline.element;
-		},
-
-		buildNestedMetawidget: function( attributes, config ) {
-
-			// Create a 'div' not a 'metawidget', because whilst it's up to the
-			// user what they want their top-level element to be, for browser
-			// compatibility we should stick with something benign for nested
-			// elements
-
-			var nestedWidget = metawidget.util.createElement( this, 'div' );
-
-			// Duck-type our 'pipeline' as the 'config' of the nested
-			// Metawidget. This neatly passes everything down, including a
-			// decremented 'maximumInspectionDepth'
-
-			var nestedMetawidget = $( nestedWidget ).metawidget( this._pipeline );
-
-			nestedMetawidget.metawidget( "setReadOnly", this.readOnly || metawidget.util.isTrueOrTrueString( attributes.readOnly ) );
-			var nestedToInspect = this.toInspect;
-			var nestedPath = metawidget.util.appendPath( attributes, this );
-
-			nestedMetawidget.metawidget( "buildWidgets", nestedToInspect, nestedPath );
-			return nestedWidget;
-		}
-	} );
-} )();
\ No newline at end of file
diff --git a/src/main/webapp/js/3rdparty/metawidget/jquery.mobile/metawidget-jquerymobile.min.js b/src/main/webapp/js/3rdparty/metawidget/jquery.mobile/metawidget-jquerymobile.min.js
deleted file mode 100755
index ecd8088e3f7027f9c18280b6fca08fdda7db5e68..0000000000000000000000000000000000000000
--- a/src/main/webapp/js/3rdparty/metawidget/jquery.mobile/metawidget-jquerymobile.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Metawidget 4.2 minified
-//
-// This file is dual licensed under both the LGPL
-// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
-// (http://www.eclipse.org/org/documents/epl-v10.php). As a
-// recipient of Metawidget, you may choose to receive it under either
-// the LGPL or the EPL.
-//
-// Commercial licenses are also available. See http://metawidget.org
-// for details.
-//
-// Author: Richard Kennard (http://kennardconsulting.com)
-
-var metawidget=metawidget||{};(function(){metawidget.jquerymobile=metawidget.jquerymobile||{};metawidget.jquerymobile.widgetprocessor=metawidget.jquerymobile.widgetprocessor||{};metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor=function(){if(!(this instanceof metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor)){throw new Error("Constructor called as a function")}};metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor.prototype.processWidget=function(f,b,d,h){if(f.tagName==="DIV"&&d.type==="array"){var a=metawidget.util.createElement(h,"fieldset");a.setAttribute("data-role","controlgroup");while(f.childNodes.length>0){var e=f.childNodes[0];if(e.tagName!=="LABEL"){return f}var g=f.getAttribute("id")+f.childNodes.length;e.setAttribute("for",g);var c=e.childNodes[0];c.setAttribute("id",g);a.appendChild(c);a.appendChild(e)}f=a}return f};metawidget.jquerymobile.widgetprocessor.JQueryMobileSimpleBindingProcessor=function(){if(!(this instanceof metawidget.jquerymobile.widgetprocessor.JQueryMobileSimpleBindingProcessor)){throw new Error("Constructor called as a function")}var a=new metawidget.widgetprocessor.SimpleBindingProcessor();a.getWidgetFromBinding=function(d,e){if(d.widget.getAttribute("type")==="search"){return $(e.getElement()).find("#"+d.widget.getAttribute("id"))[0]}return d.widget};var c=a.bindToWidget;a.bindToWidget=function(g,k,m,f,l){var j=c.call(this,g,k,m,f,l);if(g.tagName==="FIELDSET"&&f.type==="array"){if(k!==undefined){var h=g.childNodes;for(var i=0,e=h.length;i<e;i++){var d=h[i];if(d.type!=="checkbox"){continue}if(k.indexOf(d.value)!==-1){d.checked=true}}}return true}return j};var b=a.saveFromWidget;a.saveFromWidget=function(j,k){if(j.widget.tagName==="FIELDSET"&&j.attributes.type==="array"){var i=[];var h=j.widget.childNodes[0].childNodes;for(var d=0,f=h.length;d<f;d++){var e=h[d];var g=$(e).find("[type=checkbox]")[0];if(g.checked){i.push(g.value)}}return i}return b.call(this,j,k)};return a};$.widget("mobile.metawidget",{options:{inspector:new metawidget.inspector.PropertyTypeInspector(),widgetBuilder:new metawidget.widgetbuilder.CompositeWidgetBuilder([new metawidget.widgetbuilder.OverriddenWidgetBuilder(),new metawidget.widgetbuilder.ReadOnlyWidgetBuilder(),new metawidget.widgetbuilder.HtmlWidgetBuilder()]),widgetProcessors:[new metawidget.widgetprocessor.IdProcessor(),new metawidget.widgetprocessor.RequiredAttributeProcessor(),new metawidget.widgetprocessor.PlaceholderAttributeProcessor(),new metawidget.widgetprocessor.DisabledAttributeProcessor(),new metawidget.jquerymobile.widgetprocessor.JQueryMobileWidgetProcessor(),new metawidget.jquerymobile.widgetprocessor.JQueryMobileSimpleBindingProcessor()],layout:new metawidget.layout.HeadingTagLayoutDecorator(new metawidget.layout.DivLayout({divStyleClasses:["ui-field-contain"],suppressDivAroundLabel:true,suppressDivAroundWidget:true,suppressLabelSuffixOnCheckboxes:true,}))},_create:function(){this._pipeline=new metawidget.Pipeline(this.element[0]);
-this._pipeline.configure(this.options);var b=this._pipeline.layoutWidget;this._pipeline.layoutWidget=function(j,g,i,h,m){b.call(this,j,g,i,h,m);if(j.overridden===undefined){var k=h.childNodes;var f=k[k.length-1];if(f===j){h.removeChild(j);var l=$("<span>").append(j);h.appendChild(l[0]);l.trigger("create")}else{$(f).trigger("create")}}};this.element.data("metawidget",this);this._overriddenNodes=[];var d=this.element[0];var e=this;d.getMetawidget=function(){return e};for(var a=0;a<d.childNodes.length;){if(d.childNodes[a].nodeType!==1){a++;continue}var c=d.childNodes[a];d.removeChild(c);if(c.getAttribute("class")!==null&&c.getAttribute("class").indexOf("ui-")!==-1&&c.childNodes.length===1){c=c.childNodes[0]}this._overriddenNodes.push(c)}},_refresh:function(d){this.overriddenNodes=[];for(var a=0,c=this._overriddenNodes.length;a<c;a++){this.overriddenNodes.push(this._overriddenNodes[a].cloneNode(true))}if(d===undefined){if(arguments.length>0){throw new Error("Calling _refresh( undefined ) may cause infinite loop. Check your argument, or pass no arguments instead")}var b=metawidget.util.splitPath(this.path);d=this._pipeline.inspect(this.toInspect,b.type,b.names,this)}this._pipeline.buildWidgets(d,this)},_setOptions:function(){this._superApply(arguments);this._pipeline.configure(this.options)},setReadOnly:function(a){this.readOnly=a},inspect:function(c,a,b){return this._pipeline.inspect(c,a,b,this)},clearWidgets:function(){$(this.getElement()).empty()},buildWidgets:function(b,a){if(b!==undefined){this.toInspect=b;this.path=undefined}if(a!==undefined){this.path=a}this._refresh()},save:function(){this._pipeline.getWidgetProcessor(function(a){return a instanceof metawidget.widgetprocessor.SimpleBindingProcessor}).save(this)},getWidgetProcessor:function(a){return this._pipeline.getWidgetProcessor(a)},getElement:function(){return this._pipeline.element},buildNestedMetawidget:function(a,c){var f=metawidget.util.createElement(this,"div");var d=$(f).metawidget(this._pipeline);d.metawidget("setReadOnly",this.readOnly||metawidget.util.isTrueOrTrueString(a.readOnly));
-var b=this.toInspect;var e=metawidget.util.appendPath(a,this);d.metawidget("buildWidgets",b,e);return f}})})();
diff --git a/src/main/webapp/map_applications/fireblight/icons/bees-icon-25.png b/src/main/webapp/map_applications/fireblight/icons/bees-icon-25.png
new file mode 100644
index 0000000000000000000000000000000000000000..4ff07995a3a5358964d713d9c0384d83e25c90ef
Binary files /dev/null and b/src/main/webapp/map_applications/fireblight/icons/bees-icon-25.png differ
diff --git a/src/main/webapp/map_applications/fireblight/icons/plant-clipart.png b/src/main/webapp/map_applications/fireblight/icons/plant-clipart.png
new file mode 100644
index 0000000000000000000000000000000000000000..0092966ba2df2b2a60297d3644b7fa713928221c
Binary files /dev/null and b/src/main/webapp/map_applications/fireblight/icons/plant-clipart.png differ
diff --git a/src/main/webapp/map_applications/fireblight/index.html b/src/main/webapp/map_applications/fireblight/index.html
index b85630864e5b154b11a7cc8cc4064ffa9d676ddf..a8d495dc9dd7252ed7c10771a9b5fff578d5daef 100755
--- a/src/main/webapp/map_applications/fireblight/index.html
+++ b/src/main/webapp/map_applications/fireblight/index.html
@@ -43,7 +43,7 @@
             }
             .ol-zoom {
                 top:    auto;
-                bottom: 3.5em;
+                bottom: 1em;
                 left: auto;
                 right: .5em
             }
@@ -59,16 +59,16 @@
             .geo-location
             {
                 top: auto;
-                right: 0.5em;
-                bottom: 10.0em;
+                right: 4em;
+                bottom: 1em;
                 left: auto;
                 z-index: 1000;
             }
             
             #registerButton {
                 top: auto;
-                bottom: 12.0em;
-                right: 0.5em;
+                bottom: 1em;
+                right: 6em;
                 left: auto;
                 z-index: 1000;
             }
@@ -142,11 +142,11 @@
             
             #legend ul li:before {
                 content: "";
-                line-height: 1em;
-                width: .7em;
-                height: .7em;
+                line-height: 2em;
+                width: 0.75em;
+                height: 0.75em;
                 float: left;
-                margin: .25em .25em 0;
+                margin: .05em .4em 0;
                 border-radius: 50%;
                 border: 1px solid black;
             }
@@ -158,6 +158,16 @@
             #legend ul li.paere:before { background-color: rgb(122,175,131); }
             #legend ul li.plante:before { background-color: rgb(0,0,255); }
             
+            #legend ul li.apiary:before { line-height: 1em; width: .7em; height: .7em; }
+            #legend ul li.apiary:before { background-color: #ffe05e; }
+            #legend ul li.nursery:before { line-height: 1em; width: .5em; height: .5em;border: 3px dotted black; background-color: rgb(255, 127,127);}
+            
+            /* The opacity of these background colors must equal that of the zoneLayer in OpenLayers (see map.js) */
+            #legend ul li.bekjempelsesSone:before { background-color: rgb(255,120,0); opacity: 0.65; }
+            #legend ul li.paerebrannSone:before { background-color: rgb(255,0,0); opacity: 0.65; }
+            #legend ul li.forebyggendeSone:before { background-color: rgb(0,225,0); opacity: 0.65; }
+            #legend ul li.utenforSone:before { background-color: rgb(255,255,0); opacity: 0.65; }
+                        
             /* Screen size adjustments */
             @media (max-width: 500px)
             {
@@ -168,6 +178,7 @@
                
             }
             
+            /* For finger pointing aka touch screen */
             @media (pointer: coarse) {
                  #registerButton button, .geo-location button {
                 width: 1.8em;
@@ -175,7 +186,7 @@
                 }
                 
                 #registerButton {
-                    bottom: 13.0em;
+                    right: 8.0em;
                 }
                 .geo-location button {
                     bottom: 8.0em;
@@ -267,6 +278,7 @@
           
       </div>
       <div id="legend">
+          <h3>Registreringer</h3>
             <ul>
                 <li class="bulk">Bulkemispel</li>
                 <li class="sprik">Sprikemispel</li>
@@ -275,6 +287,18 @@
                 <li class="paere">Pære</li>
                 <li class="plante">Annet</li>
             </ul>
+          <h3>Kilder til spredning</h3>
+            <ul>
+                <li class="apiary"><input type="checkbox" checked onclick="apiaryLayer.setVisible(this.checked);"/>Bigårdsplass</li>
+                <li class="nursery"><input type="checkbox" checked onclick="nurseryPoisOverlay.setVisible(this.checked);"/>Planteskole</li>
+            </ul>
+          <h3><input type="checkbox" onclick="zoneLayer.setVisible(this.checked);"/>Sonekart</h3>
+          <ul>
+              <li class="bekjempelsesSone">Bekjempelsessone</li>
+              <li class="paerebrannSone">P&aelig;rebrannsone</li>
+              <li class="forebyggendeSone">Forebyggende sone</li>
+              <li class="utenforSone">Ingen tiltak</li>
+          </ul>
       </div>
       
     
@@ -307,7 +331,8 @@
             if(phrase.trim().length > 2)
             {
                 //console.log(phrase);
-                $.getJSON( "https://ws.geonorge.no/SKWS3Index/ssr/sok?navn=" + phrase + "*&maxAnt=5&tilSosiKoordSyst=4258&fylkeKommuneListe=&eksakteForst=true", renderResults);
+                //$.getJSON( "https://ws.geonorge.no/SKWS3Index/ssr/sok?navn=" + phrase + "*&maxAnt=5&tilSosiKoordSyst=4258&fylkeKommuneListe=&eksakteForst=true", renderResults);
+                $.getJSON( "https://ws.geonorge.no/stedsnavn/v1/navn?sok=" + phrase + "*&utkoordsys=4326&treffPerSide=6&side=1&filtrer=navn.skrivem%C3%A5te%2Cnavn.navneobjekttype%2Cnavn.kommuner%2Cnavn.representasjonspunkt", renderResults);
             }
             else if(phrase.trim().length === 0)
             {
@@ -320,12 +345,12 @@
         var renderResults = function(data) {
             //console.log(data);
             var html = "<ul class='resultList'>";
-            for(var i=0; i<Math.min(data.stedsnavn.length,6); i++)
+            for(var i=0; i<Math.min(data.navn.length,6); i++)
             {
-                var location = data.stedsnavn[i];
-                var coordinateOrig = [parseFloat(location.aust), parseFloat(location.nord)];
-                var coordinateDec = proj4(stedsnavnProj, "EPSG:4326", coordinateOrig);
-                html += "<li onclick=\"navigateTo([" + coordinateDec + "]);\"><b>" + location.stedsnavn + "</b>, " + location.kommunenavn + " (" + location.navnetype + ")</li>";
+                var location = data.navn[i];
+                var coordinateOrig = [parseFloat(location.representasjonspunkt.øst), parseFloat(location.representasjonspunkt.nord)];
+                //var coordinateDec = proj4(location.representasjonspunkt.koordsys, "EPSG:4326", coordinateOrig);
+                html += "<li onclick=\"navigateTo([" + coordinateOrig + "]);\"><b>" + location.skrivemåte + "</b>, " + location.kommuner[0].kommunenavn + " (" + location.navneobjekttype + ")</li>";
             }
             html += "</ul>"
             var searchResultsEl = document.getElementById("searchResults");
diff --git a/src/main/webapp/map_applications/fireblight/js/map.js b/src/main/webapp/map_applications/fireblight/js/map.js
index d017125bbca231b706e1e1e9fc28d056d516ffa5..1b9fc8b2c0b19eb2f0ff2edb870966cd92046cde 100755
--- a/src/main/webapp/map_applications/fireblight/js/map.js
+++ b/src/main/webapp/map_applications/fireblight/js/map.js
@@ -1,5 +1,28 @@
-// The globally available map object
-var map, featureOverlay, newFeatureOverlay; 
+/*
+ * Copyright (c) 2017-2023 NIBIO <http://www.nibio.no/>. 
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ */
+
+/*
+ * 
+ * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
+ */
+
+// The globally available map objects
+var map, featureOverlay, newFeatureOverlay, nurseryPoisOverlay, apiaryLayer, zoneLayer;//, apiaryPoisOverlay;
 
 // Override localization settings for this particular web page
 var hardcodedLanguage = "nb";
@@ -7,225 +30,390 @@ var hardcodedLanguage = "nb";
 // If false, touching map will not create a new item
 var registration = false;
 var geolocation;
-function initMap()
+
+/**
+ * Initializes the map with all its layers
+ * @returns {undefined}
+ */
+async function initMap()
 {
-    
+
     var features = new ol.Collection();
 
-var iconRadius = 10;
-    
-var styles = {
-    // Bulkemispel = rød
-    'cotoneaster bullatus': [new ol.style.Style({
-        image: new ol.style.Circle({
-            fill: new ol.style.Fill({ color: [255,0,0,1] }),
-            stroke: new ol.style.Stroke({width: 1,  color: [0,0,0,1] }),
-            radius: iconRadius
-        })
-    })],
-    // Sprikemispel = dyp oransje
-    'cotoneaster divaricata': [new ol.style.Style({
-        image: new ol.style.Circle({
-            fill: new ol.style.Fill({ color: [239,133,19,1] }),
-            stroke: new ol.style.Stroke({width: 1,  color: [0,0,0,1] }),
-            radius: iconRadius
-        })
-    })],
-    // Pilemispel = gul
-    'cotoneaster salicifolia': [new ol.style.Style({
-        image: new ol.style.Circle({
-            fill: new ol.style.Fill({ color: [239,236,19,1] }),
-            stroke: new ol.style.Stroke({width: 1,  color: [0,0,0,1] }),
-            radius: iconRadius
-        })
-    })],
-    // Eple = grønn
-    'malus domestica': [new ol.style.Style({
-        image: new ol.style.Circle({
-            fill: new ol.style.Fill({ color: [0,255,0,1] }),
-            stroke: new ol.style.Stroke({ width: 1, color: [0,0,0,1] }),
-            radius: iconRadius
-        })
-    })],
-    // Pære = grågrønn
-    'pyrus communis': [new ol.style.Style({
-        image: new ol.style.Circle({
-            fill: new ol.style.Fill({ color: [122,175,131,1] }),
-            stroke: new ol.style.Stroke({width: 1,  color: [0,0,0,1] }),
-            radius: iconRadius
-        })
-    })],
-    // Planteriket = blå 
-    'plantae': [new ol.style.Style({
-	        image: new ol.style.Circle({
-	            fill: new ol.style.Fill({ color: [0,0,255,1] }),
-	            stroke: new ol.style.Stroke({ width: 1, color: [0,0,0,1] }),
-	            radius: iconRadius
-	        })
-    	})
-	]
-};
-  
-  featureOverlay = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      features: features
-    }),
-    style: function(feature, resolution){
-		// Site that has been cleared is all black
-		var observationData = JSON.parse(feature.get("observationData"));
-		if(observationData["tiltak"] == "Ryddet")
-		{
-			return [new ol.style.Style({
-		        image: new ol.style.Circle({
-		            fill: new ol.style.Fill({ color: [0,0,0,1] }),
-		            stroke: new ol.style.Stroke({ color: [0,0,0,1] }),
-		            radius: iconRadius
-		        })
-		    })];
-		}
-		
-		var retVal = null;
-        if(feature.get("cropOrganism") != null && feature.get("cropOrganism")["latinName"] != null)
-        {
-            retVal = styles[feature.get("cropOrganism")["latinName"].toLowerCase()];
-        }
-        else 
-        {
-            retVal = styles["plantae"];
+    // Icon styling for the observations layer
+    var iconRadius = 10;
+    var styles = {
+        // Bulkemispel = rød
+        'cotoneaster bullatus': [new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [255, 0, 0, 1]}),
+                    stroke: new ol.style.Stroke({width: 1, color: [0, 0, 0, 1]}),
+                    radius: iconRadius
+                })
+            })],
+        // Sprikemispel = dyp oransje
+        'cotoneaster divaricata': [new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [239, 133, 19, 1]}),
+                    stroke: new ol.style.Stroke({width: 1, color: [0, 0, 0, 1]}),
+                    radius: iconRadius
+                })
+            })],
+        // Pilemispel = gul
+        'cotoneaster salicifolia': [new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [239, 236, 19, 1]}),
+                    stroke: new ol.style.Stroke({width: 1, color: [0, 0, 0, 1]}),
+                    radius: iconRadius
+                })
+            })],
+        // Eple = grønn
+        'malus domestica': [new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [0, 255, 0, 1]}),
+                    stroke: new ol.style.Stroke({width: 1, color: [0, 0, 0, 1]}),
+                    radius: iconRadius
+                })
+            })],
+        // Pære = grågrønn
+        'pyrus communis': [new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [122, 175, 131, 1]}),
+                    stroke: new ol.style.Stroke({width: 1, color: [0, 0, 0, 1]}),
+                    radius: iconRadius
+                })
+            })],
+        // Planteriket = blå 
+        'plantae': [new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [0, 0, 255, 1]}),
+                    stroke: new ol.style.Stroke({width: 1, color: [0, 0, 0, 1]}),
+                    radius: iconRadius
+                })
+            })
+        ]
+    };
+
+    // Initialize the layer for observations. Empty features array at first
+    featureOverlay = new ol.layer.Vector({
+        source: new ol.source.Vector({
+            features: features
+        }),
+        style: function (feature, resolution) {
+            // Site that has been cleared is all black
+            var observationData = JSON.parse(feature.get("observationData"));
+            if (observationData["tiltak"] == "Ryddet" && observationData["symptom"] == "Ikke symptom")
+            {
+                return [new ol.style.Style({
+                        image: new ol.style.Circle({
+                            fill: new ol.style.Fill({color: [0, 0, 0, 1]}),
+                            stroke: new ol.style.Stroke({color: [0, 0, 0, 1]}),
+                            radius: iconRadius
+                        })
+                    })];
+            } else if (observationData["tiltak"] == "Ryddet" && observationData["symptom"] == "Symptom")
+            {
+                return [new ol.style.Style({
+                        image: new ol.style.Circle({
+                            fill: new ol.style.Fill({color: [255, 255, 255, 1]}),
+                            stroke: new ol.style.Stroke({width: 8, color: [0, 0, 0, 1]}),
+                            radius: iconRadius
+                        })
+                    })];
+            }
+
+            var retVal = null;
+            if (feature.get("cropOrganism") != null && feature.get("cropOrganism")["latinName"] != null)
+            {
+                retVal = styles[feature.get("cropOrganism")["latinName"].toLowerCase()];
+            } else
+            {
+                retVal = styles["plantae"];
+            }
+            //console.info(retVal[0].getImage().getStroke().getWidth());
+            // If symptom has been registered, mark with inner black dot
+            if (observationData["symptom"] == "Symptom")
+            {
+                retVal = [
+                    new ol.style.Style({
+                        image: new ol.style.Circle({
+                            fill: new ol.style.Fill({color: [0, 0, 0, 1]}),
+                            stroke: new ol.style.Stroke({width: 8, color: retVal[0].getImage().getFill().getColor()}),
+                            radius: iconRadius
+                        })
+                    })
+                ];
+            }
+            return retVal;
         }
-		//console.info(retVal[0].getImage().getStroke().getWidth());
-		// If symptom has been registered, mark with inner black dot
-		if(observationData["symptom"] == "Symptom")
-		{
-			retVal = [
-				new ol.style.Style({
-				        image: new ol.style.Circle({
-				            fill: new ol.style.Fill({ color: [0,0,0,1]  }),
-				            stroke: new ol.style.Stroke({ width: 8, color: retVal[0].getImage().getFill().getColor() }),
-				            radius: iconRadius
-				        })
-			    	})
-			];
-		}
-		return retVal;
-    }
-            
-  });
-  
-  newFeatureOverlay = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      features: new ol.Collection()
-    }),
-    style: [new ol.style.Style({
-        image: new ol.style.Circle({
-            fill: new ol.style.Fill({ color: [255,255,255,1] }),
-            stroke: new ol.style.Stroke({ color: [0,0,0,1], width: 3, lineDash: [2,2] }),
-            radius: 10
-        })
-    })]
-            
-  });
-  
-  
-  var parser = new ol.format.WMTSCapabilities();
-  fetch('https://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&service=wmts&request=getcapabilities').then(function(response) {
+
+    });
+
+    // When user registers a new observation, this layer is used to place the marker
+    newFeatureOverlay = new ol.layer.Vector({
+        source: new ol.source.Vector({
+            features: new ol.Collection()
+        }),
+        style: [new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [255, 255, 255, 1]}),
+                    stroke: new ol.style.Stroke({color: [0, 0, 0, 1], width: 3, lineDash: [2, 2]}),
+                    radius: 10
+                })
+            })]
+
+    });
+
+
+
+    // Get the background layer for Norway from Statens kartverk
+    // TODO: Use await
+    var parser = new ol.format.WMTSCapabilities();
+    fetch('https://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&service=wmts&request=getcapabilities').then(function (response) {
         return response.text();
-      }).then(function(text) {
+    }).then(function (text) {
         var result = parser.read(text);
         var options = ol.source.WMTS.optionsFromCapabilities(result, {
-          layer: 'topo4',
-          matrixSet: 'EPSG:3857'
+            layer: 'topo4',
+            matrixSet: 'EPSG:3857'
+        });
+        var topo4 =
+                new ol.layer.Tile({
+                    opacity: 1,
+                    source: new ol.source.WMTS(/** @type {!olx.source.WMTSOptions} */ (options))
+                });
+
+
+        nurseryPoisOverlay = new ol.layer.Vector({
+            source: new ol.source.Vector({
+                features: new ol.Collection()
+            }),
+            style: diseaseSpreadingPoiStyle
         });
-        var topo4 = 
-          new ol.layer.Tile({
-            opacity: 1,
-            source: new ol.source.WMTS(/** @type {!olx.source.WMTSOptions} */ (options))
-          });
-          
-  
+
+        // Get Mattilsynet's layer for apiary sites
+        let apiarySource = new ol.source.ImageWMS({
+            url: 'https://kart.mattilsynet.no/wmscache/service',
+            params: {"LAYERS": "Mattilsynet_Bigaardsplasser"},
+            ratio: 1,
+            projection: ol.proj.get("EPSG:25833")
+        });
+
+        apiaryLayer = new ol.layer.Image({
+            source: apiarySource,
+            visible: true,
+            opacity: 1.0
+        });
+
+        // Get the zone map, produced by geomatikkseksjonen from information from Mattilsynet
+        let zoneSource = new ol.source.ImageWMS({
+            url: 'https://wms.nibio.no/cgi-bin/parebrann',
+            params: {"LAYERS": "parebrann"},
+            ratio: 1,
+            projection: ol.proj.get("EPSG:25833")
+        });
+
+        zoneLayer = new ol.layer.Image({
+            source: zoneSource,
+            visible: false,
+            opacity: 0.65
+        });
+
         map = new ol.Map({
-              target: 'map',
-              layers: [
-                //topo2graatone, 
+            target: 'map',
+            controls: ol.control.defaults({attribution: false}), // Hide the attribution
+            layers: [
                 topo4,
-                //osm,
+                zoneLayer,
+                nurseryPoisOverlay,
+                apiaryLayer,
                 featureOverlay,
                 newFeatureOverlay
-              ],
-              view: new ol.View({
+            ],
+            view: new ol.View({
                 center: ol.proj.fromLonLat([8.5, 60.8]),
                 zoom: 6
-              })
-            });
+            })
+        });
+
+        // Configure geolocation tracker
+        geolocation = new ol.Geolocation({
+            trackingOptions: {
+                enableHighAccuracy: true
+            },
+            projection: map.getView().getProjection()
+        });
+        var positionFeature = new ol.Feature();
+        positionFeature.setStyle(
+                new ol.style.Style({
+                    image: new ol.style.Circle({
+                        radius: 6,
+                        fill: new ol.style.Fill({
+                            color: '#3399CC',
+                        }),
+                        stroke: new ol.style.Stroke({
+                            color: '#fff',
+                            width: 2,
+                        }),
+                    }),
+                })
+                );
+
+        geolocation.on('change:position', function () {
+            var coordinates = geolocation.getPosition();
+            positionFeature.setGeometry(coordinates ? new ol.geom.Point(coordinates) : null);
+        });
 
-		// Configure geolocation tracker
-		geolocation = new ol.Geolocation({
-			trackingOptions: {
-				enableHighAccuracy: true
-			},
-			projection: map.getView().getProjection()
-		});
-		var positionFeature = new ol.Feature();
-		positionFeature.setStyle(
-		  new ol.style.Style({
-		    image: new ol.style.Circle({
-		      radius: 6,
-		      fill: new ol.style.Fill({
-		        color: '#3399CC',
-		      }),
-		      stroke: new ol.style.Stroke({
-		        color: '#fff',
-		        width: 2,
-		      }),
-		    }),
-		  })
-		);
-		
-		geolocation.on('change:position', function () {
-		  var coordinates = geolocation.getPosition();
-		  positionFeature.setGeometry(coordinates ? new ol.geom.Point(coordinates) : null);
-		});
-		
-		new ol.layer.Vector({
-		  map: map,
-		  source: new ol.source.Vector({
-		    features: [positionFeature],
-		  }),
-		});
+        new ol.layer.Vector({
+            map: map,
+            source: new ol.source.Vector({
+                features: [positionFeature]
+            })
+        });
 
         // TODO feature properties must be synchronized
         var lastYear = new Date().getFullYear() - 1;
         // Population the season select list, setting last year as default selected
         initSeasonSelectList(lastYear);
+        getAndRenderDiseaseSpreadingPois();
         getAndRenderObservations(lastYear);
 
+        // Handle user click on map
+        map.on('click', function (evt) {
+            //features = []
+            var feature = map.forEachFeatureAtPixel(
+                    evt.pixel, function (ft, l) {
+                        return ft;
+                    }
+            );
 
-        map.on('click', function(evt){
-                //features = []
-                var feature = map.forEachFeatureAtPixel(
-                    evt.pixel, function(ft, l) { return ft; }
-                );
-
-                var vectorSource = newFeatureOverlay.getSource();
-                // Remove any new features already created
-                vectorSource.clear();
+            var vectorSource = newFeatureOverlay.getSource();
+            // Remove any new features already created
+            vectorSource.clear();
 
-                if (feature && feature.getProperties()["observationId"] != undefined) {
-                    // Create a fake icon for highlighting
-                    var fakeFeature = createFeature(feature.getGeometry().getCoordinates());
-                    vectorSource.addFeature(fakeFeature);
-                    displayFeature(feature);   
-                }
-                else if(registration)
-                {
-                    var newFeature = createFeature(map.getCoordinateFromPixel(evt.pixel));
-                    vectorSource.addFeature(newFeature);
-                    editFeature(newFeature.getId());
-                }
+            if (feature && feature.getProperties()["observationId"] != undefined) {
+                // Create a fake icon for highlighting
+                var fakeFeature = createFeature(feature.getGeometry().getCoordinates());
+                vectorSource.addFeature(fakeFeature);
+                displayFeature(feature);
+            } else if (registration)
+            {
+                var newFeature = createFeature(map.getCoordinateFromPixel(evt.pixel));
+                vectorSource.addFeature(newFeature);
+                editFeature(newFeature.getId());
+            }
         });
-    
+
     }); // END FETCH
-    
+
+}
+
+let openLayersDefaultStyle = undefined;
+
+function getOpenLayersDefaultStyle()
+{
+    if (openLayersDefaultStyle == undefined)
+    {
+        var fill = new ol.style.Fill({
+            color: 'rgba(255,255,255,0.4)'
+        });
+        var stroke = new ol.style.Stroke({
+            color: '#3399CC',
+            width: 1.25
+        });
+        openLayersDefaultStyle = [
+            new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: fill,
+                    stroke: stroke,
+                    radius: 5
+                }),
+                fill: fill,
+                stroke: stroke
+            })
+        ];
+    }
+
+    return openLayersDefaultStyle;
+}
+
+/**
+ * Styling the different disease spreading pois, e.g. Nurseries
+ * @param {ol.Feature} feature
+ * @param {Number} resolution
+ * @returns {Array}
+ */
+function diseaseSpreadingPoiStyle(feature, resolution)
+{
+    if (feature.getProperties()["pointOfInterestTypeId"] == "7") // Nursery
+    {
+        if (feature.getGeometry().getType() == "Point")
+        {
+            const innerRadiusInMeters = 1000;
+            const outerRadiusInMeters = 2000;
+            const viewProjection = map.getView().getProjection();
+            const coordsInViewProjection = feature.getGeometry().getCoordinates();
+            const longLat = ol.proj.toLonLat(coordsInViewProjection, viewProjection);
+            const latitude_rad = longLat[1] * Math.PI / 180;
+            const innerCircle = new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [255, 127, 127, 1.0]}),
+                    stroke: new ol.style.Stroke({color: [0, 0, 0, 1], width: 3, lineDash: [5, 10], lineCap: "square"}),
+                    radius: innerRadiusInMeters / (resolution / viewProjection.getMetersPerUnit() * Math.cos(latitude_rad))
+                })
+            });
+            const outerCircle = new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({color: [255, 127, 127, 0.5]}),
+                    stroke: new ol.style.Stroke({color: [0, 0, 0, 1], width: 3, lineDash: [5, 10], lineCap: "square"}),
+                    radius: outerRadiusInMeters / (resolution / viewProjection.getMetersPerUnit() * Math.cos(latitude_rad))
+                })
+            });
+            const icon = new ol.style.Style({
+                image: new ol.style.Icon({
+                    src: 'icons/plant-clipart.png',
+                    scale: 8 / resolution
+                })
+            });
+
+            return [outerCircle, innerCircle, icon];
+        }
+    } else if (feature.getProperties()["pointOfInterestTypeId"] == "6") // Apiary site - not in use
+    {
+        return [new ol.style.Style({
+                image: new ol.style.Icon({
+                    src: 'icons/bees-icon-25.png',
+                    scale: 0.2,
+                    anchor: [0.3, 1]
+                })
+            })];
+
+    }
+
+    return getOpenLayersDefaultStyle();
+}
+
+// Collect disease spreading pois (currently only apiary sites) from observation api and render them
+function getAndRenderDiseaseSpreadingPois()
+{
+    // Nurseries
+    fetch("/rest/poi/organization/1/type/geojson?poiTypes=7")
+            .then(response => response.json())
+            .then(data => {
+                let olFeatures = (new ol.format.GeoJSON()).readFeatures(
+                        data,
+                        {
+                            dataProjection: "EPSG:4326",
+                            featureProjection: map.getView().getProjection().getCode()
+                        }
+                );
+
+                //sconsole.info(olFeatures);
+                //console.info(diseaseSpreadingPoisOverlay.getSource());
+                nurseryPoisOverlay.getSource().clear();
+                nurseryPoisOverlay.getSource().addFeatures(olFeatures);
+
+            });
 }
 
 /**
@@ -236,14 +424,14 @@ var styles = {
 function getAndRenderObservations(fromSeason)
 {
     //console.info("getAndRenderObservations(" + season + ")");
-    $.getJSON("/rest/observation/filter/1/geoJSON?from=" + fromSeason + "-01-01&pestId=" + paerebrann.organismId, function(geoData){
+    $.getJSON("/rest/observation/filter/1/geoJSON?from=" + fromSeason + "-01-01&pestId=" + paerebrann.organismId, function (geoData) {
         //console.info(geoData)
         var format = new ol.format.GeoJSON();
 
         var drawnfeatures = format.readFeatures(geoData, {
-          //dataProjection: "EPSG:32633",
-          dataProjection: "EPSG:4326",
-          featureProjection: map.getView().getProjection().getCode()
+            //dataProjection: "EPSG:32633",
+            dataProjection: "EPSG:4326",
+            featureProjection: map.getView().getProjection().getCode()
         });
         featureOverlay.getSource().clear();
         featureOverlay.getSource().addFeatures(drawnfeatures);
@@ -254,73 +442,72 @@ function getAndRenderObservations(fromSeason)
 /**
  * 
  * @param {type} fromSeason
-*  @param {type} countyNo
+ *  @param {type} countyNo
  * @returns {undefined}
  */
 function getAndRenderObservationsForReport(fromSeason, countyNo = "-1")
 {
     //console.info("getAndRenderObservations(" + season + ")");
-    $.getJSON("/rest/observation/filter/1/geoJSON?from=" + fromSeason + "-01-01&pestId=" + paerebrann.organismId, function(geoData){
+    $.getJSON("/rest/observation/filter/1/geoJSON?from=" + fromSeason + "-01-01&pestId=" + paerebrann.organismId, function (geoData) {
         //console.info(geoData)
-		// Filter by county
-		$.getJSON("/corsproxy/https://ws.geonorge.no/kommuneinfo/v1/fylker/" + countyNo + "/omrade")
-		.always(function(serviceResponse){
-			//console.info(geoData);
-			//console.info(serviceResponse);
-			
-			if(parseInt(countyNo) > 0)
-			{
-				var filteredFeatures = [];
-				for(var i=0;i < geoData.features.length;i++)
-				{
-					var featureToBeFiltered = geoData.features[i];
-					coordinate = proj4("EPSG:4326","EPSG:4258",[featureToBeFiltered.geometry.coordinates[0],featureToBeFiltered.geometry.coordinates[1]]);
-					// For some weird reason, d3 returns NOT contains in our case
-					if(!d3.geoContains(serviceResponse.omrade, coordinate))
-					{
-						//console.info(featureToBeFiltered);
-						filteredFeatures.push(featureToBeFiltered);
-					}
-					//console.info(featureToBeFiltered);
-				}
-				//console.info(filteredFeatures);
-				geoData.features = filteredFeatures;
-			}
-			
-	        var format = new ol.format.GeoJSON();
-	
-	        var drawnfeatures = format.readFeatures(geoData, {
-	          //dataProjection: "EPSG:32633",
-	          dataProjection: "EPSG:4326",
-	          featureProjection: map.getView().getProjection().getCode()
-	        });
-	        featureOverlay.getSource().clear();
-	        featureOverlay.getSource().addFeatures(drawnfeatures);
-			}
-		);
-		});
+        // Filter by county
+        $.getJSON("/corsproxy/https://ws.geonorge.no/kommuneinfo/v1/fylker/" + countyNo + "/omrade")
+                .always(function (serviceResponse) {
+                    //console.info(geoData);
+                    //console.info(serviceResponse);
+
+                    if (parseInt(countyNo) > 0)
+                    {
+                        var filteredFeatures = [];
+                        for (var i = 0; i < geoData.features.length; i++)
+                        {
+                            var featureToBeFiltered = geoData.features[i];
+                            coordinate = proj4("EPSG:4326", "EPSG:4258", [featureToBeFiltered.geometry.coordinates[0], featureToBeFiltered.geometry.coordinates[1]]);
+                            // For some weird reason, d3 returns NOT contains in our case
+                            if (!d3.geoContains(serviceResponse.omrade, coordinate))
+                            {
+                                //console.info(featureToBeFiltered);
+                                filteredFeatures.push(featureToBeFiltered);
+                            }
+                            //console.info(featureToBeFiltered);
+                        }
+                        //console.info(filteredFeatures);
+                        geoData.features = filteredFeatures;
+                    }
+
+                    var format = new ol.format.GeoJSON();
+
+                    var drawnfeatures = format.readFeatures(geoData, {
+                        //dataProjection: "EPSG:32633",
+                        dataProjection: "EPSG:4326",
+                        featureProjection: map.getView().getProjection().getCode()
+                    });
+                    featureOverlay.getSource().clear();
+                    featureOverlay.getSource().addFeatures(drawnfeatures);
+                }
+                );
+    });
 }
 
 function toggleRegistration(theButton)
 {
-    if(registration)
+    if (registration)
     {
         theButton.title = "Registrering er AV";
-        theButton.style.color="white";
-    }
-    else
+        theButton.style.color = "white";
+    } else
     {
         theButton.title = "Registrering er PÅ";
-        theButton.style.color="red";
+        theButton.style.color = "red";
     }
-    registration = ! registration;
+    registration = !registration;
 }
 
 function toggleTracking(theButton)
 {
-	geolocation.setTracking(!geolocation.getTracking());
-	theButton.style.backgroundColor = geolocation.getTracking() ? "green" : "rgba(0,60,136,.5)";
-	theButton.title = geolocation.getTracking() ? "Vis min posisjon er PÅ" : "Vis min posisjon er AV";
+    geolocation.setTracking(!geolocation.getTracking());
+    theButton.style.backgroundColor = geolocation.getTracking() ? "green" : "rgba(0,60,136,.5)";
+    theButton.title = geolocation.getTracking() ? "Vis min posisjon er PÅ" : "Vis min posisjon er AV";
 }
 
 /**
@@ -328,11 +515,11 @@ function toggleTracking(theButton)
  * @param {type} coordinate
  * @returns {createFeature.newFeature|ol.Feature}
  */
-var createFeature = function(coordinate)
+var createFeature = function (coordinate)
 {
-    if(coordinate.length == 2)
+    if (coordinate.length == 2)
     {
-        coordinate = [coordinate[0],coordinate[1],0];
+        coordinate = [coordinate[0], coordinate[1], 0];
     }
     var point = new ol.geom.Point(coordinate);
     var newFeature = new ol.Feature({
@@ -341,34 +528,34 @@ var createFeature = function(coordinate)
     });
     newFeature.setId(-1);
     newFeature.setProperties({
-            "observationId": -1,
-            "observationData": "{\"symptom\":\"\",\"tiltak\":\"\",\"forekomststorrelse\":\"\"}",
-            "cropOrganism": {},
-            "observationText" : "",
-            "timeOfObservation": moment().valueOf()
-        });
-    
+        "observationId": -1,
+        "observationData": "{\"symptom\":\"\",\"tiltak\":\"\",\"forekomststorrelse\":\"\"}",
+        "cropOrganism": {},
+        "observationText": "",
+        "timeOfObservation": moment().valueOf()
+    });
+
     return newFeature;
 }
 
-var displayFeature = function(feature)
+var displayFeature = function (feature)
 {
     var featureForm = document.getElementById("featureForm");
-    
+
     var observationData = JSON.parse(feature.get("observationData"));
     var timeOfObservation = new moment(feature.get("timeOfObservation"));
     var html = [
         '<button type="button" onclick="unFocusForm()">X</button>',
-        '<button type="button" onclick="editFeature(\'', feature.getId() ,'\');">Rediger</button>',
+        '<button type="button" onclick="editFeature(\'', feature.getId(), '\');">Rediger</button>',
         '<button type="button" onclick="deleteFeature(' + feature.getId() + ')">Slett</button>',
         '<h3>Registrering</h3>',
         '<table>',
-        '<tr><td>Type</td><td>',getLocalizedOrganismName(feature.get("cropOrganism"),hardcodedLanguage),'</td></tr>',
-        '<tr><td>Størrelse</td><td>',observationData["forekomststorrelse"],'</td></tr>',
-        '<tr><td>Symptom</td><td>',observationData["symptom"],'</td></tr>',
-        '<tr><td>Tiltak</td><td>',observationData["tiltak"],'</td></tr>',
-        '<tr><td>Beskrivelse</td><td>',feature.get("observationText"),'</td></tr>',
-        '<tr><td>Dato</td><td>',timeOfObservation.format("DD.MM.YYYY"),'</td></tr>',
+        '<tr><td>Type</td><td>', getLocalizedOrganismName(feature.get("cropOrganism"), hardcodedLanguage), '</td></tr>',
+        '<tr><td>Størrelse</td><td>', observationData["forekomststorrelse"], '</td></tr>',
+        '<tr><td>Symptom</td><td>', observationData["symptom"], '</td></tr>',
+        '<tr><td>Tiltak</td><td>', observationData["tiltak"], '</td></tr>',
+        '<tr><td>Beskrivelse</td><td>', feature.get("observationText"), '</td></tr>',
+        '<tr><td>Dato</td><td>', timeOfObservation.format("DD.MM.YYYY"), '</td></tr>',
         '</table>'
     ];
     featureForm.innerHTML = html.join("");
@@ -389,26 +576,26 @@ var paerebrann = {};
 
 function initForekomsttyper()
 {
-    $.getJSON("/rest/organism/search/latinnames?keywords=" + forekomsttypeLatinskeNavn.join(","), function(data){
-       forekomsttyper = data; 
+    $.getJSON("/rest/organism/search/latinnames?keywords=" + forekomsttypeLatinskeNavn.join(","), function (data) {
+        forekomsttyper = data;
     });
 }
 
-function initPaerebrann(){
-    $.getJSON("/rest/organism/search/latinnames?keywords=Erwinia amylovora", function(data){
-       if(data.length == 1)
-       {
-           paerebrann = data[0];
-           initMap();
-       }
+function initPaerebrann() {
+    $.getJSON("/rest/organism/search/latinnames?keywords=Erwinia amylovora", function (data) {
+        if (data.length == 1)
+        {
+            paerebrann = data[0];
+            initMap();
+        }
     });
 }
 
-var getCropOrganism = function(organismId)
+var getCropOrganism = function (organismId)
 {
-    for(var i=0;i<forekomsttyper.length;i++)
+    for (var i = 0; i < forekomsttyper.length; i++)
     {
-        if(forekomsttyper[i].organismId == organismId)
+        if (forekomsttyper[i].organismId == organismId)
         {
             return forekomsttyper[i];
         }
@@ -420,54 +607,54 @@ var symptoms = ["Ikke symptom", "Symptom"];
 var tiltaks = ["Ikke ryddet", "Ryddet"];
 
 
-var editFeature = function(featureId)
+var editFeature = function (featureId)
 {
     var feature = featureId > 0 ? featureOverlay.getSource().getFeatureById(featureId)
-                                    : newFeatureOverlay.getSource().getFeatureById(featureId);
+            : newFeatureOverlay.getSource().getFeatureById(featureId);
     var observationData = JSON.parse(feature.get("observationData"));
     var timeOfObservation = new moment(feature.get("timeOfObservation"));
     var featureForm = document.getElementById("featureForm");
-    var html = 
-        '<button type="button" onclick="unFocusForm()" title="Avbryt">X</button>' +
-        (featureId > 0 ? '<button type="button" onclick="deleteFeature(' + featureId + ')">Delete</button>' : '') +
-        '<h3>' + (featureId > 0 ? "R" : "Ny r") + 'egistrering</h3>' +
-        '<table>' +
-        '<tr><td>Type</td><td>' +
-        generateCropSelect("forekomsttype", forekomsttyper, feature.get("cropOrganism")["organismId"]) +           
-        '</td></tr>' +
-        '<tr><td>Størrelse</td><td>' +
-        generateSelect("forekomststorrelse", forekomststorrelses, observationData["forekomststorrelse"]) +           
-        '</td></tr>' +
-        '<tr><td>Symptom</td><td>' +
-        generateSelect("symptom", symptoms, observationData["symptom"]) + 
-        '</td></tr>' +
-        '<tr><td>Tiltak</td><td>' + 
-        generateSelect ("tiltak", tiltaks, observationData["tiltak"]) + 
-        '</td></tr>' +
-        '<tr><td>Beskrivelse</td><td>' + 
-        '<textarea id="beskrivelse" name="beskrivelse">' + (feature.get("observationText") != null ? feature.get("observationText") : "")  + '</textarea>' +
-        '</td></tr>' +
-        '<tr><td>Dato</td><td>' +
-        '<input type="text" id="dato" name="dato" size="10" value="'+ timeOfObservation.format("DD.MM.YYYY") + '"/></td></tr>' +
-        '<tr><td></td><td>' +
-        '<input type="submit" value="Lagre" onclick="storeFeature(' + feature.getId() + ');"/></td></tr>' +
-        '</table>';
-        
-    
+    var html =
+            '<button type="button" onclick="unFocusForm()" title="Avbryt">X</button>' +
+            (featureId > 0 ? '<button type="button" onclick="deleteFeature(' + featureId + ')">Delete</button>' : '') +
+            '<h3>' + (featureId > 0 ? "R" : "Ny r") + 'egistrering</h3>' +
+            '<table>' +
+            '<tr><td>Type</td><td>' +
+            generateCropSelect("forekomsttype", forekomsttyper, feature.get("cropOrganism")["organismId"]) +
+            '</td></tr>' +
+            '<tr><td>Størrelse</td><td>' +
+            generateSelect("forekomststorrelse", forekomststorrelses, observationData["forekomststorrelse"]) +
+            '</td></tr>' +
+            '<tr><td>Symptom</td><td>' +
+            generateSelect("symptom", symptoms, observationData["symptom"]) +
+            '</td></tr>' +
+            '<tr><td>Tiltak</td><td>' +
+            generateSelect("tiltak", tiltaks, observationData["tiltak"]) +
+            '</td></tr>' +
+            '<tr><td>Beskrivelse</td><td>' +
+            '<textarea id="beskrivelse" name="beskrivelse">' + (feature.get("observationText") != null ? feature.get("observationText") : "") + '</textarea>' +
+            '</td></tr>' +
+            '<tr><td>Dato</td><td>' +
+            '<input type="text" id="dato" name="dato" size="10" value="' + timeOfObservation.format("DD.MM.YYYY") + '"/></td></tr>' +
+            '<tr><td></td><td>' +
+            '<input type="submit" value="Lagre" onclick="storeFeature(' + feature.getId() + ');"/></td></tr>' +
+            '</table>';
+
+
     featureForm.innerHTML = html;
     focusForm();
     //console.info(feature);
 };
 
-var storeFeature = function(featureId)
+var storeFeature = function (featureId)
 {
     var feature = featureId > 0 ? featureOverlay.getSource().getFeatureById(featureId)
-                                    : newFeatureOverlay.getSource().getFeatureById(featureId);
-    
+            : newFeatureOverlay.getSource().getFeatureById(featureId);
+
     // Store, clear newFeature layer
     // Need to add feature as payload
     var format = new ol.format.GeoJSON();
-    
+
     // Add the form data
     var cropOrganism = getCropOrganism(document.getElementById("forekomsttype").options[document.getElementById("forekomsttype").options.selectedIndex].value);
     //console.info(cropOrganism);
@@ -476,32 +663,32 @@ var storeFeature = function(featureId)
     var tiltak = document.getElementById("tiltak").options[document.getElementById("tiltak").options.selectedIndex].value;
     var observationText = document.getElementById("beskrivelse").value;
     var observationHeading = "Registrering av pærebrann";
-    var timeOfObservation = moment(document.getElementById("dato").value + "+0200","DD.MM.YYYYZ");
-    if(timeOfObservation.year() < 2000)
+    var timeOfObservation = moment(document.getElementById("dato").value + "+0200", "DD.MM.YYYYZ");
+    if (timeOfObservation.year() < 2000)
     {
         alert("Feil dato (før år 2000). Datoformat er DD.MM.ÅÅÅÅ");
         return;
     }
-    
+
     feature.setProperties({
-       timeOfObservation: timeOfObservation.valueOf(),
-       cropOrganism: cropOrganism,
-       organism: paerebrann,
-       observationHeading: observationHeading,
-       observationText: observationText,
-       observationData: "{\"symptom\":\"" + symptom + "\",\"tiltak\":\"" + tiltak + "\",\"forekomststorrelse\":\"" + forekomststorrelse + "\"}",
-       statusTypeId: 3,
-       statusRemarks: "Registrert via pærebrannovervåkningskartet",
-       isQuantified: true,
-       broadcastMessage: false
+        timeOfObservation: timeOfObservation.valueOf(),
+        cropOrganism: cropOrganism,
+        organism: paerebrann,
+        observationHeading: observationHeading,
+        observationText: observationText,
+        observationData: "{\"symptom\":\"" + symptom + "\",\"tiltak\":\"" + tiltak + "\",\"forekomststorrelse\":\"" + forekomststorrelse + "\"}",
+        statusTypeId: 3,
+        statusRemarks: "Registrert via pærebrannovervåkningskartet",
+        isQuantified: true,
+        broadcastMessage: false
     });
     var result = format.writeFeatures([feature], {
         dataProjection: 'EPSG:4326',
         featureProjection: map.getView().getProjection().getCode()
-      });
-    
+    });
+
     //console.log(feature);
-    
+
     $.ajax({
         type: "POST",
         url: "/rest/observation/gisobservation",
@@ -509,41 +696,40 @@ var storeFeature = function(featureId)
         data: result,
         contentType: "application/json; charset=utf-8",
         dataType: "json",
-        success: function(geoData){
+        success: function (geoData) {
             //console.info(geoData)
             var format = new ol.format.GeoJSON();
 
             var drawnfeatures = format.readFeatures(geoData, {
-              dataProjection: "EPSG:4326",
-              featureProjection: map.getView().getProjection().getCode()
+                dataProjection: "EPSG:4326",
+                featureProjection: map.getView().getProjection().getCode()
             });
             newFeatureOverlay.getSource().clear(true);
             // If storing an existing feature, remove the one
             // that was there before storing, since the returned
             // one has a new gisId (featureId)
-            if(featureId > 0)
+            if (featureId > 0)
             {
                 featureOverlay.getSource().removeFeature(feature);
             }
             featureOverlay.getSource().addFeatures(drawnfeatures);
             unFocusForm();
         },
-        error: function( jqXHR, textStatus, errorThrown) {
-            if(jqXHR.status == 401)
+        error: function (jqXHR, textStatus, errorThrown) {
+            if (jqXHR.status == 401)
             {
-                if(confirm("Kan ikke lagre fordi du er logget ut av applikasjonen. Klikk OK for å logge inn."))
+                if (confirm("Kan ikke lagre fordi du er logget ut av applikasjonen. Klikk OK for å logge inn."))
                 {
                     window.location.reload();
                 }
-            }
-            else
+            } else
             {
                 alert("Beklager, en feil oppsto. Status = " + jqXHR.status + ", eventuell feilmelding: " + textStatus);
             }
         }
     });
-    
-    
+
+
 }
 
 /**
@@ -551,38 +737,37 @@ var storeFeature = function(featureId)
  * @param {type} featureId
  * @returns {undefined}
  */
-var deleteFeature = function(featureId)
+var deleteFeature = function (featureId)
 {
-    if(!confirm("Er du sikker på at du vil slette?"))
+    if (!confirm("Er du sikker på at du vil slette?"))
     {
         return;
     }
-    
+
     var feature = featureOverlay.getSource().getFeatureById(featureId);
-    
+
     $.ajax({
         type: "DELETE",
         url: "/rest/observation/gisobservation/" + feature.getId(),
-        success: function(response){
-            console.info(response);
+        success: function (response) {
+            //console.info(response);
             // If storing an existing feature, remove the one
             // that was there before storing, since the returned
             // one has a new gisId (featureId)
-            if(featureId > 0)
+            if (featureId > 0)
             {
                 featureOverlay.getSource().removeFeature(feature);
             }
             unFocusForm();
         },
-        error: function( jqXHR, textStatus, errorThrown) {
-            if(jqXHR.status == 401)
+        error: function (jqXHR, textStatus, errorThrown) {
+            if (jqXHR.status == 401)
             {
-                if(confirm("Kan ikke slette fordi du er logget ut av applikasjonen. Klikk OK for å logge inn."))
+                if (confirm("Kan ikke slette fordi du er logget ut av applikasjonen. Klikk OK for å logge inn."))
                 {
                     window.location.reload();
                 }
-            }
-            else
+            } else
             {
                 alert("Beklager, en feil oppsto. Status = " + jqXHR.status + ", eventuell feilmelding: " + textStatus);
             }
@@ -590,29 +775,29 @@ var deleteFeature = function(featureId)
     });
 }
 
-var generateSelect = function(selectName, options, preselect)
+var generateSelect = function (selectName, options, preselect)
 {
     var retVal = '<select id="' + selectName + '" name="' + selectName + '">';
-    for(var i=0; i< options.length; i++)
+    for (var i = 0; i < options.length; i++)
     {
-        retVal += '<option value="' + options[i] + '"' + (options[i] == preselect ? " selected=\"selected\"" : "") + '">' + options[i]  + '</option>';
+        retVal += '<option value="' + options[i] + '"' + (options[i] == preselect ? " selected=\"selected\"" : "") + '">' + options[i] + '</option>';
     }
     retVal += '</select>';
     return retVal;
 }
 
-var generateCropSelect = function(selectName, cropOrganisms, preselect)
+var generateCropSelect = function (selectName, cropOrganisms, preselect)
 {
     var retVal = '<select id="' + selectName + '" name="' + selectName + '">';
-    for(var c=0; c < forekomsttypeLatinskeNavn.length; c++)
+    for (var c = 0; c < forekomsttypeLatinskeNavn.length; c++)
     {
         currentLatinName = forekomsttypeLatinskeNavn[c];
-        for(var i=0; i< cropOrganisms.length; i++)
+        for (var i = 0; i < cropOrganisms.length; i++)
         {
-            if(cropOrganisms[i].latinName == currentLatinName)
+            if (cropOrganisms[i].latinName == currentLatinName)
             {
-                retVal += '<option value="' + cropOrganisms[i].organismId + '"' + (cropOrganisms[i].organismId == preselect ? " selected=\"selected\"" : "") + '">' + 
-                        (currentLatinName == "Plantae" ? "Annet" : getLocalizedOrganismName(cropOrganisms[i], hardcodedLanguage))  
+                retVal += '<option value="' + cropOrganisms[i].organismId + '"' + (cropOrganisms[i].organismId == preselect ? " selected=\"selected\"" : "") + '">' +
+                        (currentLatinName == "Plantae" ? "Annet" : getLocalizedOrganismName(cropOrganisms[i], hardcodedLanguage))
                         + '</option>';
             }
         }
@@ -621,13 +806,13 @@ var generateCropSelect = function(selectName, cropOrganisms, preselect)
     return retVal;
 }
 
-var focusForm = function()
+var focusForm = function ()
 {
     var featureForm = document.getElementById("featureForm");
     featureForm.style.display = "block";
 }
 
-var unFocusForm = function()
+var unFocusForm = function ()
 {
     var featureForm = document.getElementById("featureForm");
     featureForm.style.display = "none";
@@ -635,63 +820,61 @@ var unFocusForm = function()
     newFeatureOverlay.getSource().clear();
 }
 
-var navigateTo = function(center)
+var navigateTo = function (center)
 {
     var centerPosition = ol.proj.transform(center, 'EPSG:4326', 'EPSG:3857');
-        view = new ol.View({
+    view = new ol.View({
         center: centerPosition,
-        zoom: 18
-      });
+        zoom: 16
+    });
+
+    map.setView(view);
 
-      map.setView(view);
-   
     var searchResultsEl = document.getElementById("searchResults");
     searchResultsEl.innerHTML = "";
-    searchResultsEl.style.display="none";
+    searchResultsEl.style.display = "none";
 };
 
 /**
  * Uses the client's geolocation information - displays it on the map
  */
 function showLocation() {
-	if (navigator.geolocation) {
-        if(window.location.protocol === "http:")
+    if (navigator.geolocation) {
+        if (window.location.protocol === "http:")
         {
-            navigator.geolocation.getCurrentPosition(function(geopositionObj){
+            navigator.geolocation.getCurrentPosition(function (geopositionObj) {
                 // TODO: position and display location icon
-                }
+            }
             );
-        }
-        else
+        } else
         {
-            if(confirm("Lokalisering fungerer bare over https (sikker tilkobling mellom nettleser og tjener). Klikk OK for å gå til sikker tilkobling."))
+            if (confirm("Lokalisering fungerer bare over https (sikker tilkobling mellom nettleser og tjener). Klikk OK for å gå til sikker tilkobling."))
             {
                 window.location = "https:" + window.location.href.substring(window.location.protocol.length);
             }
         }
     } else {
-        alert( "Lokaliseringsfunksjonen er ikke tilgjengelig i denne nettleseren.");
+        alert("Lokaliseringsfunksjonen er ikke tilgjengelig i denne nettleseren.");
     }
 }
 
 function navToLocation() {
     if (navigator.geolocation) {
-        if(window.location.protocol === "https:")
+        if (window.location.protocol === "https:")
         {
-            navigator.geolocation.getCurrentPosition(function(geopositionObj){
+            navigator.geolocation.getCurrentPosition(function (geopositionObj) {
                 navigateTo([geopositionObj.coords.longitude, geopositionObj.coords.latitude]);
-                }
+            }
             );
-        }
-        else
+        } else
         {
-            if(confirm("Lokalisering fungerer bare over https (sikker tilkobling mellom nettleser og tjener). Klikk OK for å gå til sikker tilkobling."))
+            if (confirm("Lokalisering fungerer bare over https (sikker tilkobling mellom nettleser og tjener). Klikk OK for å gå til sikker tilkobling."))
             {
                 window.location = "https:" + window.location.href.substring(window.location.protocol.length);
             }
         }
     } else {
-        alert( "Lokaliseringsfunksjonen er ikke tilgjengelig i denne nettleseren.");
+        alert("Lokaliseringsfunksjonen er ikke tilgjengelig i denne nettleseren.");
     }
 }
 
@@ -707,26 +890,26 @@ function initSeasonSelectList(selectedSeason)
     // How many years do we go back?
     $.ajax({
         url: "/rest/observation/first/" + paerebrann.organismId
-        })
-    .done(function(data){
-       var time = moment(data);
-       var firstYear = time.toDate().getFullYear();
-       // Loop gjennom år, lag valgliste :-)
-       var startSeasonList = document.getElementById("startSeason");
-       for(var i=firstYear;i<=thisYear;i++)
-       {
-           var yearOpt = new Option("",i);
-           yearOpt.innerHTML = i + " &rarr;"
-           if(i==selectedSeason)
-           {
-               yearOpt.selected=true;
-           }
-           startSeasonList.options[startSeasonList.options.length] = yearOpt;
-       }
     })
-    .fail(function(jqXHR, textStatus, errorThrown){
-        alert(textStatus);
-    });
-    
+            .done(function (data) {
+                var time = moment(data);
+                var firstYear = time.toDate().getFullYear();
+                // Loop gjennom år, lag valgliste :-)
+                var startSeasonList = document.getElementById("startSeason");
+                for (var i = firstYear; i <= thisYear; i++)
+                {
+                    var yearOpt = new Option("", i);
+                    yearOpt.innerHTML = i + " &rarr;"
+                    if (i == selectedSeason)
+                    {
+                        yearOpt.selected = true;
+                    }
+                    startSeasonList.options[startSeasonList.options.length] = yearOpt;
+                }
+            })
+            .fail(function (jqXHR, textStatus, errorThrown) {
+                alert(textStatus);
+            });
+
 }
-    
+
diff --git a/src/main/webapp/templates/modules/barkbeetle/barkbeetleSeasonTrapsiteList.ftl b/src/main/webapp/templates/modules/barkbeetle/barkbeetleSeasonTrapsiteList.ftl
index 9b03b1bab258d42932caf6cdb141374c7bbc7275..e43b0f8dc833ee3ed3c0c044205eae2d9b311255 100644
--- a/src/main/webapp/templates/modules/barkbeetle/barkbeetleSeasonTrapsiteList.ftl
+++ b/src/main/webapp/templates/modules/barkbeetle/barkbeetleSeasonTrapsiteList.ftl
@@ -68,7 +68,7 @@
 	sin(e) lokalitet(er) så snart som mulig og sørge for at feller blir montert 
 	innen 20. april. Fellene i standardlokaliteter tømmes etter hver av fire 
 	perioder, dvs. på mandag eller tirsdag i ukene 21, 24, 28 og 33. Data fra 
-	hver tømming skal legges inn under «Registrer» innen torsdag i samme uke som tømming, 
+	hver tømming skal legges inn under «Registrer» innen onsdag i samme uke som tømming,
 	og blir dermed del av en fortløpende kartvisning av barkbillenivået gjennom 
 	sesongen. Se utdypende informasjon i 
 	<a href="/images/modules/barkbeetle/${FILENAME_INSTRUKS_REGISTRANTER}" target="new">Instruks 
diff --git a/src/main/webapp/templates/observationForm.ftl b/src/main/webapp/templates/observationForm.ftl
index e195bd664c4639c49017a02cf25b34d64a0b076b..24bd4a96734a5a81fba65880447344c36c05f3c8 100755
--- a/src/main/webapp/templates/observationForm.ftl
+++ b/src/main/webapp/templates/observationForm.ftl
@@ -26,13 +26,13 @@
 	<link rel="stylesheet" type="text/css" href="/css/map.css"/>
 </#macro>
 <#macro custom_js>
-        <script type="text/javascript" src="/js/3rdparty/chosen.jquery.min.js"></script>
+    <script type="text/javascript" src="/js/3rdparty/chosen.jquery.min.js"></script>
 	<script type="text/javascript" src="/js/3rdparty/jquery.datetimepicker.js"></script>
 	<script type="text/javascript" src="/js/3rdparty/modernizr_custom.js"></script>
 	<script type="text/javascript" src="/js/3rdparty/moment.min.js"></script>
-	<script src="/js/3rdparty/metawidget/core/metawidget-core.min.js" type="text/javascript"></script>
+    <script type="text/javascript" src="/js/3rdparty/jsoneditor.js"></script>
 	<script type="text/javascript" src="/js/3rdparty/ol.js?t=20170623"></script>
-        <script type="text/javascript" src="js/3rdparty/ol3-layerswitcher.js"></script>
+    <script type="text/javascript" src="js/3rdparty/ol3-layerswitcher.js"></script>
         
 	<script type="text/javascript" src="/js/constants.js"></script>
 	<script type="text/javascript" src="/js/resourcebundle.js"></script>
@@ -42,9 +42,12 @@
 	<script type="text/javascript" src="/js/poiFormMap.js"></script>
 	<script type="text/javascript">
 		var organizationId = ${user.organizationId.organizationId};
-                var selectedCropId = <#if observation.cropOrganism?has_content>${observation.cropOrganism.organismId}<#else>null</#if>;
-		
+        var selectedCropId = <#if observation.cropOrganism?has_content>${observation.cropOrganism.organismId}<#else>null</#if>;
+
+
 		$(document).ready(function() {
+
+
 			// Make sure that there is a datetime picker present for HTML5 
 			// date input fields
 			
@@ -54,6 +57,7 @@
                                     format: "Y-m-d H:iO",
                                     step: 30
                             });
+
 			
 			// Load main form definition (for validation)
 			loadFormDefinition("observationForm");
@@ -115,10 +119,12 @@
 		});
 		
 		
-		// Global for observationData metawidgets
-		var mw = null;
-		var observationData = null;
-                var observationSchema = null;
+		// Global for observationData & observationSchema
+		let observationData = null;
+        let observationSchema = null;
+        // Make the quantification fields available
+        const quantificationFields = document.getElementById("quantificationFields");
+        let editor = null;
 		function initObservationData(organismId, organizationId) {
 			$.getJSON( "/rest/observationdata/model/" + organizationId + "/" + organismId, function( json ) {
 				observationData = json;
@@ -130,30 +136,26 @@
 		{
 			$.getJSON( "/rest/observationdata/schema/" + organizationId + "/" + organismId, buildForm);
 		}
-		
-		var buildForm = function(schemaProperties)
+
+        // Populate the quantification fields using JSONEditor (https://github.com/json-editor/json-editor)
+		const buildForm = function(retrievedSchema)
 		{
-				// Check if we're getting the whole schema or just the properties
-				if(schemaProperties.properties != undefined)
-				{
-					schemaProperties = schemaProperties.properties;
-				}
-                    observationSchema = schemaProperties;
-                    // Erasing whatever was there before
-                    var metawidgetC = document.getElementById( 'metawidget' );
-                    metawidgetC.innerHTML = "";
-                    mw = new metawidget.Metawidget(metawidgetC , {
-                                    inspector: new metawidget.inspector.CompositeInspector( [ new metawidget.inspector.PropertyTypeInspector(),
-                                            function( toInspect, type, names ) {
-                                                            return {
-                                                                    properties: schemaProperties
-                                                            };
-                                                    }
-                                    ] )
-                            }
-                    );
-                    mw.toInspect = observationData;
-                    mw.buildWidgets();
+                //console.info(retrievedSchema);
+                //console.info(observationData);
+                observationSchema = retrievedSchema;
+                // Erasing whatever was there before
+                if(editor != null) {
+                    editor.destroy();
+                }
+                editor = new JSONEditor(quantificationFields, {
+                    schema: observationSchema,
+                    theme: 'bootstrap4',
+                    disable_edit_json: true, // If true, remove all Edit JSON buttons from objects.
+                    disable_properties: true, // If true, remove all Edit Properties buttons from objects.
+                    remove_button_labels: true, // Display only icons in buttons. This works only if iconlib is set.
+                    disable_collapse: true // Make sure no elements can be collapsed
+                });
+                editor.on("ready",()=>{editor.setValue(observationData);})
 		};
 		
 		var updateCropPests = function(){
@@ -466,52 +468,17 @@
                     theForm['geoInfo'].value=getFeatures();
                     try
                     {
-                        // If the form is qantified: Inspect the fields and write 
+                        // If the form is quantified: Inspect the fields and write
                         // JSON string to the generic form field "observationData";
                         if(theForm.isQuantified.checked)
                         {
-                            // Process the pest specific form fields
-                            // Using MetaWidget to do this
-                            mw.save();
-                            // Make sure that all fields are represented in the
-                            // returned JSON
-                            //console.info(mw.toInspect);
-                            //console.info(observationSchema);
-                            for(prop in observationSchema)
+                            const errors = editor.validate();
+                            if(errors.length)
                             {
-                                var currentProperty = observationSchema[prop];
-                                mw.toInspect[prop]; // The property value in the MetaWidget object
-                                //console.info(prop + ":" + currentProperty);
-                                // Undefined found, must replace with default empty value
-                                if(mw.toInspect[prop] === undefined)
-                                {
-                                    // Check if field is required (defined in schema)
-                                    if(currentProperty.required)
-                                    {
-                                        alert("${i18nBundle.isRequiredField}: " + currentProperty.title);
-                                        return false;
-                                    }
-                                        
-                                    //console.info(prop + " is undefined!");
-                                    // Check for default value
-                                    if(currentProperty.defaultValue !== undefined)
-                                    {
-                                        mw.toInspect[prop] = currentProperty.defaultValue
-                                    }
-                                    else
-                                    {
-                                        if(currentProperty.type == "Number")
-                                        {
-                                            mw.toInspect[prop] = 0;
-                                        }
-                                        else
-                                        {
-                                            mw.toInspect[prop] = "";
-                                        }
-                                    }
-                                }
-                            }        
-                            theForm['observationData'].value=JSON.stringify(mw.toInspect);
+                                alert(errors);
+                                return false;
+                            }
+                            theForm['observationData'].value=JSON.stringify(editor.getValue());
                         }
                         validateGIS(theForm);
                         //console.info('validateGIS = ' + (validateGIS(this)));
@@ -652,7 +619,15 @@
 			    <input type="text" class="form-control" id="timeOfObservation" name="timeOfObservation" placeholder="${i18nBundle.timeOfObservation}" value="${(observation.timeOfObservation?string("yyyy-MM-dd HH:mmZ"))!.now?string("yyyy-MM-dd HH:mmZ")}" onblur="validateField(this);"  <#if editAccess!="W">readonly="readonly"</#if>/>
 			    <span class="help-block" id="${formId}_timeOfObservation_validation"></span>
 			  </div>
-			  
+                <div class="form-group">
+                    <div class="checkbox">
+                        <#if editAccess!="W" && observation.isPositive?has_content && observation.isPositive ==true><input type="hidden" name="isPositive" value="true"/></#if>
+                        <label>
+                            <input type="checkbox" name="isPositive"<#if observation.isPositive?has_content && observation.isPositive == false><#else> checked="checked"</#if> <#if editAccess!="W">disabled="disabled"</#if>/>
+                        </label>
+                        ${i18nBundle.isPositiveRegistration}
+                    </div>
+                </div>
 			  <div class="form-group">
 			  	<div class="checkbox">
                                         <#if editAccess!="W" && observation.isQuantified?has_content && observation.isQuantified ==true><input type="hidden" name="isQuantified" value="true"/></#if>
@@ -665,7 +640,7 @@
 			  <div class="form-group">
 			  <fieldset>
 			  	<legend>${i18nBundle.observationData}</legend>
-			  	<div id="metawidget"></div>
+			  	<div id="quantificationFields"></div>
 			  </fieldset>
 			  </div>
 			  <#if !noBroadcast>
diff --git a/src/main/webapp/templates/poiForm.ftl b/src/main/webapp/templates/poiForm.ftl
index 74555332c817007ad19dcbb53abce4eb465f27ed..64127ddab64ad8ed755c0f3c1d833cc36f2816b1 100755
--- a/src/main/webapp/templates/poiForm.ftl
+++ b/src/main/webapp/templates/poiForm.ftl
@@ -84,7 +84,7 @@
 			  <div class="form-group">
 			    <label for="pointOfInterestTypeId">${i18nBundle.pointOfInterestType}</label>
 			    <select class="form-control" name="pointOfInterestTypeId" onblur="validateField(this);">
-				<#list 0..3 as pointOfInterestTypeId>
+				<#list [0,1,2,3,5,6,7] as pointOfInterestTypeId>
                                     <#if pointOfInterestTypeId != 1>
 					<option value="${pointOfInterestTypeId}"<#if 
 								poi.pointOfInterestTypeId?has_content && pointOfInterestTypeId == poi.pointOfInterestTypeId
diff --git a/src/test/java/no/nibio/vips/logic/entity/ObservationTest.java b/src/test/java/no/nibio/vips/logic/entity/ObservationTest.java
index d1c5c3ee961e2d1cd9832c4944be80ff0cc0fb01..44aff9395cfd36190f658dff621f5adcdd7165cf 100755
--- a/src/test/java/no/nibio/vips/logic/entity/ObservationTest.java
+++ b/src/test/java/no/nibio/vips/logic/entity/ObservationTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity;
 
diff --git a/src/test/java/no/nibio/vips/logic/entity/rest/PointMappingRequestTest.java b/src/test/java/no/nibio/vips/logic/entity/rest/PointMappingRequestTest.java
index 3652a0ee1e6cbc2b3389ddc95a0556e1b2dbd7ba..ddb73f2d30c28f4f5ee7113aed3282dbd58a1cff 100644
--- a/src/test/java/no/nibio/vips/logic/entity/rest/PointMappingRequestTest.java
+++ b/src/test/java/no/nibio/vips/logic/entity/rest/PointMappingRequestTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2019 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.entity.rest;
 
diff --git a/src/test/java/no/nibio/vips/logic/forms/FormValidatorTest.java b/src/test/java/no/nibio/vips/logic/forms/FormValidatorTest.java
index ecacaaf7704fc029477ea95e54b2050e7b298ec3..c52af1464b487536fa3df16f2e92b10396c923a1 100755
--- a/src/test/java/no/nibio/vips/logic/forms/FormValidatorTest.java
+++ b/src/test/java/no/nibio/vips/logic/forms/FormValidatorTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.forms;
diff --git a/src/test/java/no/nibio/vips/logic/forms/HTMLFormGeneratorTest.java b/src/test/java/no/nibio/vips/logic/forms/HTMLFormGeneratorTest.java
index 4993a9a35f2aeff8ef76b1e9d5067e70cc1bc02a..e915e328a07c80238764e6bd4a5cd41c8ebba298 100755
--- a/src/test/java/no/nibio/vips/logic/forms/HTMLFormGeneratorTest.java
+++ b/src/test/java/no/nibio/vips/logic/forms/HTMLFormGeneratorTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.forms;
diff --git a/src/test/java/no/nibio/vips/logic/messaging/UniversalMessagingTest.java b/src/test/java/no/nibio/vips/logic/messaging/UniversalMessagingTest.java
index abaca8508ee6774b253a8428068bb6ff76f26dec..b69b046f07a23a99a17ad5682784a2effee98a6e 100755
--- a/src/test/java/no/nibio/vips/logic/messaging/UniversalMessagingTest.java
+++ b/src/test/java/no/nibio/vips/logic/messaging/UniversalMessagingTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.messaging;
 
diff --git a/src/test/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBeanTest.java b/src/test/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBeanTest.java
index aa740deda23bef6e9b1cb983f61f08d47273a53d..98046f8606ff50bbc03c0e317203e6bb292b8a4b 100644
--- a/src/test/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBeanTest.java
+++ b/src/test/java/no/nibio/vips/logic/modules/barkbeetle/BarkbeetleBeanTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2022 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.modules.barkbeetle;
 
@@ -101,41 +100,41 @@ public class BarkbeetleBeanTest {
      * Test of isTimeToSendSecondReminder method, of class BarkbeetleBean.
      * They are year specific, hard to test in other ways without not really testing
      */
-    //@Test
+    @Test
     public void testIsTimeToSendSecondReminder() throws Exception {
         System.out.println("isTimeToSendSecondReminder");
         
         // Week 21
         Calendar cal = Calendar.getInstance();
-        cal.set(Calendar.YEAR, 2022);
+        cal.set(Calendar.YEAR, 2023);
         cal.set(Calendar.MONTH, Calendar.MAY);
-        cal.set(Calendar.DATE, 26);
+        cal.set(Calendar.DATE, 24);
         Date currentDate = cal.getTime();
         System.out.println("currentDate=" + currentDate);
         BarkbeetleBean instance = new BarkbeetleBean();
         Boolean result = instance.isTimeToSendSecondReminder(currentDate);
         assertTrue(result);
         
-        cal.set(Calendar.DATE, 25);
+        cal.set(Calendar.DATE, 23);
         currentDate = cal.getTime();
         result = instance.isTimeToSendSecondReminder(currentDate);
         assertFalse(result);
         
         // Week 24
         cal.set(Calendar.MONTH, Calendar.JUNE);
-        cal.set(Calendar.DATE, 16);
+        cal.set(Calendar.DATE, 14);
         currentDate = cal.getTime();
         assertTrue(instance.isTimeToSendSecondReminder(currentDate));
         
         // Week 28
         cal.set(Calendar.MONTH, Calendar.JULY);
-        cal.set(Calendar.DATE, 14);
+        cal.set(Calendar.DATE, 12);
         currentDate = cal.getTime();
         assertTrue(instance.isTimeToSendSecondReminder(currentDate));
         
         // Week 33
         cal.set(Calendar.MONTH, Calendar.AUGUST);
-        cal.set(Calendar.DATE, 18);
+        cal.set(Calendar.DATE, 16);
         currentDate = cal.getTime();
         assertTrue(instance.isTimeToSendSecondReminder(currentDate));
         
@@ -151,7 +150,7 @@ public class BarkbeetleBeanTest {
         
         BarkbeetleBean instance = new BarkbeetleBean();
         
-        String result = instance.getIndividualFirstReminderText(s, 2022, 21);
+        String result = instance.getIndividualFirstReminderText(s, 2023, 21);
         System.out.println(result);
         assertNotNull(result);
     }
@@ -165,7 +164,7 @@ public class BarkbeetleBeanTest {
         s.setMunicipalityName("Porsgrunn");
         BarkbeetleBean instance = new BarkbeetleBean();
         
-        String result = instance.getIndividualSecondReminderText(s, 2022, 21);
+        String result = instance.getIndividualSecondReminderText(s, 2023, 21);
         System.out.println(result);
         assertNotNull(result);
     }
diff --git a/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessorTest.java b/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessorTest.java
index f8e1c714c21289d8ff26fb4abff06e9bcb7d2fd8..6c0af3732e80338db374ee0c63b0eaca41e6cae9 100644
--- a/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessorTest.java
+++ b/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/BremiaLactucaeModelPreprocessorTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.scheduling.model.preprocessor;
 
diff --git a/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessorTest.java b/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessorTest.java
index 77099a86722590b65b2b5aea81801dc8a16ceb79..92f17c234ec1e0c14cb50e8874aa1ca7adf754ef 100755
--- a/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessorTest.java
+++ b/src/test/java/no/nibio/vips/logic/scheduling/model/preprocessor/PlasmoparaViticolaModelPreprocessorTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.scheduling.model.preprocessor;
 
diff --git a/src/test/java/no/nibio/vips/logic/session/UserBeanTest.java b/src/test/java/no/nibio/vips/logic/session/UserBeanTest.java
index 6fa1a38d3a926c6e626659451d802ffeb6b6dd2f..afaa9ff536ae21f016c4facdf85af6bf9a61566c 100755
--- a/src/test/java/no/nibio/vips/logic/session/UserBeanTest.java
+++ b/src/test/java/no/nibio/vips/logic/session/UserBeanTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.session;
diff --git a/src/test/java/no/nibio/vips/logic/test/mock/DataMatrix.java b/src/test/java/no/nibio/vips/logic/test/mock/DataMatrix.java
index ec6bd70a9fcddce34d3269f1f6c461e696e90ac0..2659b0129f0e8a3143f0ce632cd67430be1c2b2b 100644
--- a/src/test/java/no/nibio/vips/logic/test/mock/DataMatrix.java
+++ b/src/test/java/no/nibio/vips/logic/test/mock/DataMatrix.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of ZymoseptoriaSimpleRiskGridModel.
- * ZymoseptoriaSimpleRiskGridModel is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * ZymoseptoriaSimpleRiskGridModel is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with ZymoseptoriaSimpleRiskGridModel.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.test.mock;
diff --git a/src/test/java/no/nibio/vips/logic/test/mock/MockModel.java b/src/test/java/no/nibio/vips/logic/test/mock/MockModel.java
index 27b0cd98b5aac157e08f3baf7dfa1e8b2ec1aa1e..0eec68cd66f433ff9b8186967890f7f561a89ce9 100644
--- a/src/test/java/no/nibio/vips/logic/test/mock/MockModel.java
+++ b/src/test/java/no/nibio/vips/logic/test/mock/MockModel.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2017 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 
 package no.nibio.vips.logic.test.mock;
diff --git a/src/test/java/no/nibio/vips/logic/util/GISEntityUtilTest.java b/src/test/java/no/nibio/vips/logic/util/GISEntityUtilTest.java
index c3a8417cd6531b25fefae2334617aaf83d295302..3816fcd7dda1fa19330c292ab494121c8db73462 100755
--- a/src/test/java/no/nibio/vips/logic/util/GISEntityUtilTest.java
+++ b/src/test/java/no/nibio/vips/logic/util/GISEntityUtilTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.logic.util;
 
diff --git a/src/test/java/no/nibio/vips/util/weather/YrWeatherForecastProviderTest.java b/src/test/java/no/nibio/vips/util/weather/YrWeatherForecastProviderTest.java
index 811158e80a41e620a4c27f72a4b7675f11700e07..48dca23551ab3a5939675a760f64d7679ddc24af 100755
--- a/src/test/java/no/nibio/vips/util/weather/YrWeatherForecastProviderTest.java
+++ b/src/test/java/no/nibio/vips/util/weather/YrWeatherForecastProviderTest.java
@@ -1,20 +1,19 @@
 /*
  * Copyright (c) 2015 NIBIO <http://www.nibio.no/>. 
- * 
- * This file is part of VIPSLogic.
- * VIPSLogic is free software: you can redistribute it and/or modify
- * it under the terms of the NIBIO Open Source License as published by 
- * NIBIO, either version 1 of the License, or (at your option) any
- * later version.
- * 
- * VIPSLogic is distributed in the hope that it will be useful,
+ *
+ * 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
- * NIBIO Open Source License for more details.
- * 
- * You should have received a copy of the NIBIO Open Source License
- * along with VIPSLogic.  If not, see <http://www.nibio.no/licenses/>.
- * 
+ * 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 <https://www.gnu.org/licenses/>.
+ *
  */
 package no.nibio.vips.util.weather;
 
@@ -93,11 +92,12 @@ public class YrWeatherForecastProviderTest {
             result = instance.getWeatherForecasts(weatherStation);
             assertNotNull(result);
             Collections.sort(result);
+            /*
             for(WeatherObservation obs:result)
             {
                 if(obs.getElementMeasurementTypeId().equals("TM"))
                 System.out.println(obs.toString());
-            }
+            }*/
             
             WeatherUtil wUtil = new WeatherUtil();
             //wUtil.checkForAndFixHourlyTimeSeriesHoles(result);