pavlovm503 4 years ago
commit
e8315ec972
100 changed files with 16960 additions and 0 deletions
  1. 31 0
      back/app.js
  2. 103 0
      back/city/Dnipro.json
  3. 103 0
      back/city/Donetsk.json
  4. 103 0
      back/city/Kharkiv.json
  5. 103 0
      back/city/Kryvyi Rih.json
  6. 103 0
      back/city/Kyiv.json
  7. 103 0
      back/city/Luhansk.json
  8. 103 0
      back/city/Lviv.json
  9. 103 0
      back/city/Mariupol.json
  10. 103 0
      back/city/Mykolayiv.json
  11. 103 0
      back/city/Odessa.json
  12. 103 0
      back/city/Poltava.json
  13. 103 0
      back/city/Sevastopol.json
  14. 103 0
      back/city/Zaporizhzhya.json
  15. 15 0
      back/node_modules/.bin/mime
  16. 17 0
      back/node_modules/.bin/mime.cmd
  17. 18 0
      back/node_modules/.bin/mime.ps1
  18. 15 0
      back/node_modules/.bin/sshpk-conv
  19. 17 0
      back/node_modules/.bin/sshpk-conv.cmd
  20. 18 0
      back/node_modules/.bin/sshpk-conv.ps1
  21. 15 0
      back/node_modules/.bin/sshpk-sign
  22. 17 0
      back/node_modules/.bin/sshpk-sign.cmd
  23. 18 0
      back/node_modules/.bin/sshpk-sign.ps1
  24. 15 0
      back/node_modules/.bin/sshpk-verify
  25. 17 0
      back/node_modules/.bin/sshpk-verify.cmd
  26. 18 0
      back/node_modules/.bin/sshpk-verify.ps1
  27. 15 0
      back/node_modules/.bin/uuid
  28. 17 0
      back/node_modules/.bin/uuid.cmd
  29. 18 0
      back/node_modules/.bin/uuid.ps1
  30. 236 0
      back/node_modules/accepts/HISTORY.md
  31. 23 0
      back/node_modules/accepts/LICENSE
  32. 142 0
      back/node_modules/accepts/README.md
  33. 238 0
      back/node_modules/accepts/index.js
  34. 86 0
      back/node_modules/accepts/package.json
  35. 20 0
      back/node_modules/ajv/.tonic_example.js
  36. 22 0
      back/node_modules/ajv/LICENSE
  37. 1478 0
      back/node_modules/ajv/README.md
  38. 7143 0
      back/node_modules/ajv/dist/ajv.bundle.js
  39. 3 0
      back/node_modules/ajv/dist/ajv.min.js
  40. 1 0
      back/node_modules/ajv/dist/ajv.min.js.map
  41. 396 0
      back/node_modules/ajv/lib/ajv.d.ts
  42. 506 0
      back/node_modules/ajv/lib/ajv.js
  43. 26 0
      back/node_modules/ajv/lib/cache.js
  44. 90 0
      back/node_modules/ajv/lib/compile/async.js
  45. 5 0
      back/node_modules/ajv/lib/compile/equal.js
  46. 34 0
      back/node_modules/ajv/lib/compile/error_classes.js
  47. 142 0
      back/node_modules/ajv/lib/compile/formats.js
  48. 387 0
      back/node_modules/ajv/lib/compile/index.js
  49. 270 0
      back/node_modules/ajv/lib/compile/resolve.js
  50. 66 0
      back/node_modules/ajv/lib/compile/rules.js
  51. 9 0
      back/node_modules/ajv/lib/compile/schema_obj.js
  52. 20 0
      back/node_modules/ajv/lib/compile/ucs2length.js
  53. 239 0
      back/node_modules/ajv/lib/compile/util.js
  54. 49 0
      back/node_modules/ajv/lib/data.js
  55. 37 0
      back/node_modules/ajv/lib/definition_schema.js
  56. 113 0
      back/node_modules/ajv/lib/dot/_limit.jst
  57. 12 0
      back/node_modules/ajv/lib/dot/_limitItems.jst
  58. 12 0
      back/node_modules/ajv/lib/dot/_limitLength.jst
  59. 12 0
      back/node_modules/ajv/lib/dot/_limitProperties.jst
  60. 32 0
      back/node_modules/ajv/lib/dot/allOf.jst
  61. 46 0
      back/node_modules/ajv/lib/dot/anyOf.jst
  62. 61 0
      back/node_modules/ajv/lib/dot/coerce.def
  63. 9 0
      back/node_modules/ajv/lib/dot/comment.jst
  64. 11 0
      back/node_modules/ajv/lib/dot/const.jst
  65. 55 0
      back/node_modules/ajv/lib/dot/contains.jst
  66. 191 0
      back/node_modules/ajv/lib/dot/custom.jst
  67. 47 0
      back/node_modules/ajv/lib/dot/defaults.def
  68. 202 0
      back/node_modules/ajv/lib/dot/definitions.def
  69. 79 0
      back/node_modules/ajv/lib/dot/dependencies.jst
  70. 30 0
      back/node_modules/ajv/lib/dot/enum.jst
  71. 194 0
      back/node_modules/ajv/lib/dot/errors.def
  72. 106 0
      back/node_modules/ajv/lib/dot/format.jst
  73. 73 0
      back/node_modules/ajv/lib/dot/if.jst
  74. 98 0
      back/node_modules/ajv/lib/dot/items.jst
  75. 39 0
      back/node_modules/ajv/lib/dot/missing.def
  76. 22 0
      back/node_modules/ajv/lib/dot/multipleOf.jst
  77. 43 0
      back/node_modules/ajv/lib/dot/not.jst
  78. 54 0
      back/node_modules/ajv/lib/dot/oneOf.jst
  79. 14 0
      back/node_modules/ajv/lib/dot/pattern.jst
  80. 245 0
      back/node_modules/ajv/lib/dot/properties.jst
  81. 52 0
      back/node_modules/ajv/lib/dot/propertyNames.jst
  82. 85 0
      back/node_modules/ajv/lib/dot/ref.jst
  83. 108 0
      back/node_modules/ajv/lib/dot/required.jst
  84. 62 0
      back/node_modules/ajv/lib/dot/uniqueItems.jst
  85. 276 0
      back/node_modules/ajv/lib/dot/validate.jst
  86. 3 0
      back/node_modules/ajv/lib/dotjs/README.md
  87. 163 0
      back/node_modules/ajv/lib/dotjs/_limit.js
  88. 80 0
      back/node_modules/ajv/lib/dotjs/_limitItems.js
  89. 85 0
      back/node_modules/ajv/lib/dotjs/_limitLength.js
  90. 80 0
      back/node_modules/ajv/lib/dotjs/_limitProperties.js
  91. 42 0
      back/node_modules/ajv/lib/dotjs/allOf.js
  92. 73 0
      back/node_modules/ajv/lib/dotjs/anyOf.js
  93. 14 0
      back/node_modules/ajv/lib/dotjs/comment.js
  94. 56 0
      back/node_modules/ajv/lib/dotjs/const.js
  95. 81 0
      back/node_modules/ajv/lib/dotjs/contains.js
  96. 228 0
      back/node_modules/ajv/lib/dotjs/custom.js
  97. 168 0
      back/node_modules/ajv/lib/dotjs/dependencies.js
  98. 66 0
      back/node_modules/ajv/lib/dotjs/enum.js
  99. 150 0
      back/node_modules/ajv/lib/dotjs/format.js
  100. 0 0
      back/node_modules/ajv/lib/dotjs/if.js

+ 31 - 0
back/app.js

@@ -0,0 +1,31 @@
+const express = require('express');
+const port = 3002;
+const bodyParser = require('body-parser');
+const routes = require('./routes/routes')
+const app = express();
+
+// Use Node.js body parsing middleware
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({
+    extended: true,
+}));
+app.use((req, res, next) => {
+    res.header('Access-Control-Allow-Origin', '*');
+
+    res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
+    next();
+
+    app.options('*', (req, res) => {
+        // allowed XHR methods  
+        res.header('Access-Control-Allow-Methods', 'GET, PATCH, PUT, POST, DELETE, OPTIONS');
+        res.send();
+    });
+});
+routes(app);
+
+// Start the server
+const server = app.listen(port, (error) => {
+    if (error) return console.log(`Error: ${error}`);
+
+    console.log(`Server listening on port ${server.address().port}`);
+});

+ 103 - 0
back/city/Dnipro.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "19",
+    "icon": "blackSun"
+  },
+  "1": {
+    "temp": "19",
+    "icon": "blackSun"
+  },
+  "2": {
+    "temp": "19",
+    "icon": "blackSun"
+  },
+  "3": {
+    "temp": "19",
+    "icon": "blackSun"
+  },
+  "4": {
+    "temp": "19",
+    "icon": "blackSun"
+  },
+  "5": {
+    "temp": "19",
+    "icon": "blackSun"
+  },
+  "6": {
+    "temp": "19",
+    "icon": "sun"
+  },
+  "7": {
+    "temp": "20",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "23",
+    "icon": "sun"
+  },
+  "12": {
+    "temp": "23",
+    "icon": "sun"
+  },
+  "13": {
+    "temp": "24",
+    "icon": "sun"
+  },
+  "14": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "17",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f2072821df7d5417c805808"
+  },
+  "minTemp": "17",
+  "maxTemp": "26"
+}]

+ 103 - 0
back/city/Donetsk.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "17",
+    "icon": "blackCloudy"
+  },
+  "1": {
+    "temp": "17",
+    "icon": "blackCloudy"
+  },
+  "2": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "3": {
+    "temp": "19",
+    "icon": "blackCloudy"
+  },
+  "4": {
+    "temp": "19",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "19",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "7": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "8": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "9": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "10": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "11": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "28",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "28",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "21",
+    "icon": "blackSun"
+  },
+  "22": {
+    "temp": "19",
+    "icon": "blackSun"
+  },
+  "23": {
+    "temp": "17",
+    "icon": "blackSun"
+  },
+  "_id": {
+    "$oid": "5f206f601df7d5417c805806"
+  },
+  "minTemp": "17",
+  "maxTemp": "28"
+}]

+ 103 - 0
back/city/Kharkiv.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "17",
+    "icon": "blackSun"
+  },
+  "1": {
+    "temp": "17",
+    "icon": "blackSun"
+  },
+  "2": {
+    "temp": "17",
+    "icon": "blackSun"
+  },
+  "3": {
+    "temp": "18",
+    "icon": "blackSun"
+  },
+  "4": {
+    "temp": "18",
+    "icon": "blackSun"
+  },
+  "5": {
+    "temp": "18",
+    "icon": "blackSun"
+  },
+  "6": {
+    "temp": "18",
+    "icon": "sun"
+  },
+  "7": {
+    "temp": "19",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "20",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "12": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "17",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f2069081df7d5417c805804"
+  },
+  "minTemp": "17",
+  "maxTemp": "24"
+}]

+ 103 - 0
back/city/Kryvyi Rih.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "17",
+    "icon": "blackLightning"
+  },
+  "1": {
+    "temp": "17",
+    "icon": "blackLightning"
+  },
+  "2": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "3": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "4": {
+    "temp": "19",
+    "icon": "blackRain"
+  },
+  "5": {
+    "temp": "19",
+    "icon": "blackRain"
+  },
+  "6": {
+    "temp": "20",
+    "icon": "blackRain"
+  },
+  "7": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "28",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "23",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f2078181df7d5417c80580b"
+  },
+  "minTemp": "17",
+  "maxTemp": "28"
+}]

+ 103 - 0
back/city/Kyiv.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "16",
+    "icon": "blackCloudy"
+  },
+  "1": {
+    "temp": "16",
+    "icon": "blackCloudy"
+  },
+  "2": {
+    "temp": "16",
+    "icon": "blackCloudy"
+  },
+  "3": {
+    "temp": "16",
+    "icon": "blackCloudy"
+  },
+  "4": {
+    "temp": "16",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "16",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "16",
+    "icon": "sun"
+  },
+  "7": {
+    "temp": "17",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "17",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "18",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "18",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "18",
+    "icon": "sun"
+  },
+  "12": {
+    "temp": "18",
+    "icon": "sun"
+  },
+  "13": {
+    "temp": "18",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "19",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "19",
+    "icon": "rain"
+  },
+  "16": {
+    "temp": "19",
+    "icon": "rain"
+  },
+  "17": {
+    "temp": "19",
+    "icon": "rain"
+  },
+  "18": {
+    "temp": "19",
+    "icon": "rain"
+  },
+  "19": {
+    "temp": "19",
+    "icon": "rain"
+  },
+  "20": {
+    "temp": "18",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "17",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "16",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f206d1c1df7d5417c805805"
+  },
+  "minTemp": "16",
+  "maxTemp": "19"
+}]

+ 103 - 0
back/city/Luhansk.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "17",
+    "icon": "blackRain"
+  },
+  "1": {
+    "temp": "17",
+    "icon": "blackRain"
+  },
+  "2": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "3": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "4": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "19",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "7": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "8": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "9": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "10": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "11": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "22",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f207baa1df7d5417c80580e"
+  },
+  "minTemp": "17",
+  "maxTemp": "27"
+}]

+ 103 - 0
back/city/Lviv.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "13",
+    "icon": "blackCloudy"
+  },
+  "1": {
+    "temp": "13",
+    "icon": "blackCloudy"
+  },
+  "2": {
+    "temp": "13",
+    "icon": "blackCloudy"
+  },
+  "3": {
+    "temp": "13",
+    "icon": "blackCloudy"
+  },
+  "4": {
+    "temp": "13",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "14",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "15",
+    "icon": "blackCloudy"
+  },
+  "7": {
+    "temp": "15",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "16",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "16",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "17",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "18",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "18",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "19",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "18",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "14",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f2076e71df7d5417c80580a"
+  },
+  "minTemp": "13",
+  "maxTemp": "22"
+}]

+ 103 - 0
back/city/Mariupol.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "1": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "2": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "3": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "4": {
+    "temp": "22",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "22",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "7": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "8": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "9": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "10": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "11": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "28",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "30",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "30",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "23",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "22",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f207a961df7d5417c80580d"
+  },
+  "minTemp": "21",
+  "maxTemp": "30"
+}]

+ 103 - 0
back/city/Mykolayiv.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "20",
+    "icon": "blackRain"
+  },
+  "1": {
+    "temp": "20",
+    "icon": "blackRain"
+  },
+  "2": {
+    "temp": "20",
+    "icon": "blackRain"
+  },
+  "3": {
+    "temp": "20",
+    "icon": "blackRain"
+  },
+  "4": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "7": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "23",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "25",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "23",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f2079161df7d5417c80580c"
+  },
+  "minTemp": "20",
+  "maxTemp": "27"
+}]

+ 103 - 0
back/city/Odessa.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "1": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "2": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "3": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "4": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "7": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "23",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "10": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "11": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "29",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "30",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "30",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "28",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "26",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "23",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f2070ce1df7d5417c805807"
+  },
+  "minTemp": "20",
+  "maxTemp": "30"
+}]

+ 103 - 0
back/city/Poltava.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "17",
+    "icon": "blackRain"
+  },
+  "1": {
+    "temp": "17",
+    "icon": "blackRain"
+  },
+  "2": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "3": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "4": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "5": {
+    "temp": "19",
+    "icon": "blackCloudy"
+  },
+  "6": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "7": {
+    "temp": "20",
+    "icon": "cloudy"
+  },
+  "8": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "9": {
+    "temp": "21",
+    "icon": "cloudy"
+  },
+  "10": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "11": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "12": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "13": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "14": {
+    "temp": "26",
+    "icon": "cloudy"
+  },
+  "15": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "16": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "23",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "22",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "20",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f207baa1df7d5417c80580e"
+  },
+  "minTemp": "17",
+  "maxTemp": "27"
+}]

+ 103 - 0
back/city/Sevastopol.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "22",
+    "icon": "blackSun"
+  },
+  "1": {
+    "temp": "22",
+    "icon": "blackSun"
+  },
+  "2": {
+    "temp": "22",
+    "icon": "blackSun"
+  },
+  "3": {
+    "temp": "23",
+    "icon": "blackSun"
+  },
+  "4": {
+    "temp": "23",
+    "icon": "blackSun"
+  },
+  "5": {
+    "temp": "24",
+    "icon": "blackSun"
+  },
+  "6": {
+    "temp": "24",
+    "icon": "sun"
+  },
+  "7": {
+    "temp": "25",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "25",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "25",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "25",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "26",
+    "icon": "sun"
+  },
+  "12": {
+    "temp": "27",
+    "icon": "sun"
+  },
+  "13": {
+    "temp": "27",
+    "icon": "sun"
+  },
+  "14": {
+    "temp": "27",
+    "icon": "sun"
+  },
+  "15": {
+    "temp": "27",
+    "icon": "sun"
+  },
+  "16": {
+    "temp": "27",
+    "icon": "sun"
+  },
+  "17": {
+    "temp": "27",
+    "icon": "sun"
+  },
+  "18": {
+    "temp": "25",
+    "icon": "sun"
+  },
+  "19": {
+    "temp": "24",
+    "icon": "sun"
+  },
+  "20": {
+    "temp": "23",
+    "icon": "sun"
+  },
+  "21": {
+    "temp": "23",
+    "icon": "blackSun"
+  },
+  "22": {
+    "temp": "21",
+    "icon": "blackSun"
+  },
+  "23": {
+    "temp": "20",
+    "icon": "blackSun"
+  },
+  "_id": {
+    "$oid": "5f207cc31df7d5417c80580f"
+  },
+  "minTemp": "22",
+  "maxTemp": "27"
+}]

+ 103 - 0
back/city/Zaporizhzhya.json

@@ -0,0 +1,103 @@
+[{
+  "0": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "1": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "2": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "3": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "4": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "5": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "6": {
+    "temp": "18",
+    "icon": "blackRain"
+  },
+  "7": {
+    "temp": "19",
+    "icon": "sun"
+  },
+  "8": {
+    "temp": "19",
+    "icon": "sun"
+  },
+  "9": {
+    "temp": "20",
+    "icon": "sun"
+  },
+  "10": {
+    "temp": "21",
+    "icon": "sun"
+  },
+  "11": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "12": {
+    "temp": "22",
+    "icon": "sun"
+  },
+  "13": {
+    "temp": "23",
+    "icon": "sun"
+  },
+  "14": {
+    "temp": "25",
+    "icon": "sun"
+  },
+  "15": {
+    "temp": "27",
+    "icon": "sun"
+  },
+  "16": {
+    "temp": "27",
+    "icon": "cloudy"
+  },
+  "17": {
+    "temp": "25",
+    "icon": "cloudy"
+  },
+  "18": {
+    "temp": "24",
+    "icon": "cloudy"
+  },
+  "19": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "20": {
+    "temp": "22",
+    "icon": "cloudy"
+  },
+  "21": {
+    "temp": "21",
+    "icon": "blackCloudy"
+  },
+  "22": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "23": {
+    "temp": "18",
+    "icon": "blackCloudy"
+  },
+  "_id": {
+    "$oid": "5f2075c01df7d5417c805809"
+  },
+  "minTemp": "18",
+  "maxTemp": "27"
+}]

+ 15 - 0
back/node_modules/.bin/mime

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../mime/cli.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../mime/cli.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
back/node_modules/.bin/mime.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\mime\cli.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
back/node_modules/.bin/mime.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../mime/cli.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../mime/cli.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
back/node_modules/.bin/sshpk-conv

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../sshpk/bin/sshpk-conv" "$@"
+  ret=$?
+else 
+  node  "$basedir/../sshpk/bin/sshpk-conv" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
back/node_modules/.bin/sshpk-conv.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\sshpk\bin\sshpk-conv" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
back/node_modules/.bin/sshpk-conv.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-conv" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../sshpk/bin/sshpk-conv" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
back/node_modules/.bin/sshpk-sign

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../sshpk/bin/sshpk-sign" "$@"
+  ret=$?
+else 
+  node  "$basedir/../sshpk/bin/sshpk-sign" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
back/node_modules/.bin/sshpk-sign.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\sshpk\bin\sshpk-sign" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
back/node_modules/.bin/sshpk-sign.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-sign" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../sshpk/bin/sshpk-sign" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
back/node_modules/.bin/sshpk-verify

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../sshpk/bin/sshpk-verify" "$@"
+  ret=$?
+else 
+  node  "$basedir/../sshpk/bin/sshpk-verify" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
back/node_modules/.bin/sshpk-verify.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\sshpk\bin\sshpk-verify" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
back/node_modules/.bin/sshpk-verify.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-verify" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../sshpk/bin/sshpk-verify" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
back/node_modules/.bin/uuid

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../uuid/bin/uuid" "$@"
+  ret=$?
+else 
+  node  "$basedir/../uuid/bin/uuid" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
back/node_modules/.bin/uuid.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\uuid\bin\uuid" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
back/node_modules/.bin/uuid.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../uuid/bin/uuid" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../uuid/bin/uuid" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 236 - 0
back/node_modules/accepts/HISTORY.md

@@ -0,0 +1,236 @@
+1.3.7 / 2019-04-29
+==================
+
+  * deps: negotiator@0.6.2
+    - Fix sorting charset, encoding, and language with extra parameters
+
+1.3.6 / 2019-04-28
+==================
+
+  * deps: mime-types@~2.1.24
+    - deps: mime-db@~1.40.0
+
+1.3.5 / 2018-02-28
+==================
+
+  * deps: mime-types@~2.1.18
+    - deps: mime-db@~1.33.0
+
+1.3.4 / 2017-08-22
+==================
+
+  * deps: mime-types@~2.1.16
+    - deps: mime-db@~1.29.0
+
+1.3.3 / 2016-05-02
+==================
+
+  * deps: mime-types@~2.1.11
+    - deps: mime-db@~1.23.0
+  * deps: negotiator@0.6.1
+    - perf: improve `Accept` parsing speed
+    - perf: improve `Accept-Charset` parsing speed
+    - perf: improve `Accept-Encoding` parsing speed
+    - perf: improve `Accept-Language` parsing speed
+
+1.3.2 / 2016-03-08
+==================
+
+  * deps: mime-types@~2.1.10
+    - Fix extension of `application/dash+xml`
+    - Update primary extension for `audio/mp4`
+    - deps: mime-db@~1.22.0
+
+1.3.1 / 2016-01-19
+==================
+
+  * deps: mime-types@~2.1.9
+    - deps: mime-db@~1.21.0
+
+1.3.0 / 2015-09-29
+==================
+
+  * deps: mime-types@~2.1.7
+    - deps: mime-db@~1.19.0
+  * deps: negotiator@0.6.0
+    - Fix including type extensions in parameters in `Accept` parsing
+    - Fix parsing `Accept` parameters with quoted equals
+    - Fix parsing `Accept` parameters with quoted semicolons
+    - Lazy-load modules from main entry point
+    - perf: delay type concatenation until needed
+    - perf: enable strict mode
+    - perf: hoist regular expressions
+    - perf: remove closures getting spec properties
+    - perf: remove a closure from media type parsing
+    - perf: remove property delete from media type parsing
+
+1.2.13 / 2015-09-06
+===================
+
+  * deps: mime-types@~2.1.6
+    - deps: mime-db@~1.18.0
+
+1.2.12 / 2015-07-30
+===================
+
+  * deps: mime-types@~2.1.4
+    - deps: mime-db@~1.16.0
+
+1.2.11 / 2015-07-16
+===================
+
+  * deps: mime-types@~2.1.3
+    - deps: mime-db@~1.15.0
+
+1.2.10 / 2015-07-01
+===================
+
+  * deps: mime-types@~2.1.2
+    - deps: mime-db@~1.14.0
+
+1.2.9 / 2015-06-08
+==================
+
+  * deps: mime-types@~2.1.1
+    - perf: fix deopt during mapping
+
+1.2.8 / 2015-06-07
+==================
+
+  * deps: mime-types@~2.1.0
+    - deps: mime-db@~1.13.0
+  * perf: avoid argument reassignment & argument slice
+  * perf: avoid negotiator recursive construction
+  * perf: enable strict mode
+  * perf: remove unnecessary bitwise operator
+
+1.2.7 / 2015-05-10
+==================
+
+  * deps: negotiator@0.5.3
+    - Fix media type parameter matching to be case-insensitive
+
+1.2.6 / 2015-05-07
+==================
+
+  * deps: mime-types@~2.0.11
+    - deps: mime-db@~1.9.1
+  * deps: negotiator@0.5.2
+    - Fix comparing media types with quoted values
+    - Fix splitting media types with quoted commas
+
+1.2.5 / 2015-03-13
+==================
+
+  * deps: mime-types@~2.0.10
+    - deps: mime-db@~1.8.0
+
+1.2.4 / 2015-02-14
+==================
+
+  * Support Node.js 0.6
+  * deps: mime-types@~2.0.9
+    - deps: mime-db@~1.7.0
+  * deps: negotiator@0.5.1
+    - Fix preference sorting to be stable for long acceptable lists
+
+1.2.3 / 2015-01-31
+==================
+
+  * deps: mime-types@~2.0.8
+    - deps: mime-db@~1.6.0
+
+1.2.2 / 2014-12-30
+==================
+
+  * deps: mime-types@~2.0.7
+    - deps: mime-db@~1.5.0
+
+1.2.1 / 2014-12-30
+==================
+
+  * deps: mime-types@~2.0.5
+    - deps: mime-db@~1.3.1
+
+1.2.0 / 2014-12-19
+==================
+
+  * deps: negotiator@0.5.0
+    - Fix list return order when large accepted list
+    - Fix missing identity encoding when q=0 exists
+    - Remove dynamic building of Negotiator class
+
+1.1.4 / 2014-12-10
+==================
+
+  * deps: mime-types@~2.0.4
+    - deps: mime-db@~1.3.0
+
+1.1.3 / 2014-11-09
+==================
+
+  * deps: mime-types@~2.0.3
+    - deps: mime-db@~1.2.0
+
+1.1.2 / 2014-10-14
+==================
+
+  * deps: negotiator@0.4.9
+    - Fix error when media type has invalid parameter
+
+1.1.1 / 2014-09-28
+==================
+
+  * deps: mime-types@~2.0.2
+    - deps: mime-db@~1.1.0
+  * deps: negotiator@0.4.8
+    - Fix all negotiations to be case-insensitive
+    - Stable sort preferences of same quality according to client order
+
+1.1.0 / 2014-09-02
+==================
+
+  * update `mime-types`
+
+1.0.7 / 2014-07-04
+==================
+
+  * Fix wrong type returned from `type` when match after unknown extension
+
+1.0.6 / 2014-06-24
+==================
+
+  * deps: negotiator@0.4.7
+
+1.0.5 / 2014-06-20
+==================
+
+ * fix crash when unknown extension given
+
+1.0.4 / 2014-06-19
+==================
+
+  * use `mime-types`
+
+1.0.3 / 2014-06-11
+==================
+
+  * deps: negotiator@0.4.6
+    - Order by specificity when quality is the same
+
+1.0.2 / 2014-05-29
+==================
+
+  * Fix interpretation when header not in request
+  * deps: pin negotiator@0.4.5
+
+1.0.1 / 2014-01-18
+==================
+
+  * Identity encoding isn't always acceptable
+  * deps: negotiator@~0.4.0
+
+1.0.0 / 2013-12-27
+==================
+
+  * Genesis

+ 23 - 0
back/node_modules/accepts/LICENSE

@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 142 - 0
back/node_modules/accepts/README.md

@@ -0,0 +1,142 @@
+# accepts
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
+Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
+
+In addition to negotiator, it allows:
+
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
+  as well as `('text/html', 'application/json')`.
+- Allows type shorthands such as `json`.
+- Returns `false` when no types match
+- Treats non-existent headers as `*`
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install accepts
+```
+
+## API
+
+<!-- eslint-disable no-unused-vars -->
+
+```js
+var accepts = require('accepts')
+```
+
+### accepts(req)
+
+Create a new `Accepts` object for the given `req`.
+
+#### .charset(charsets)
+
+Return the first accepted charset. If nothing in `charsets` is accepted,
+then `false` is returned.
+
+#### .charsets()
+
+Return the charsets that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .encoding(encodings)
+
+Return the first accepted encoding. If nothing in `encodings` is accepted,
+then `false` is returned.
+
+#### .encodings()
+
+Return the encodings that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .language(languages)
+
+Return the first accepted language. If nothing in `languages` is accepted,
+then `false` is returned.
+
+#### .languages()
+
+Return the languages that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .type(types)
+
+Return the first accepted type (and it is returned as the same text as what
+appears in the `types` array). If nothing in `types` is accepted, then `false`
+is returned.
+
+The `types` array can contain full MIME types or file extensions. Any value
+that is not a full MIME types is passed to `require('mime-types').lookup`.
+
+#### .types()
+
+Return the types that the request accepts, in the order of the client's
+preference (most preferred first).
+
+## Examples
+
+### Simple type negotiation
+
+This simple example shows how to use `accepts` to return a different typed
+respond body based on what the client wants to accept. The server lists it's
+preferences in order and will get back the best match between the client and
+server.
+
+```js
+var accepts = require('accepts')
+var http = require('http')
+
+function app (req, res) {
+  var accept = accepts(req)
+
+  // the order of this list is significant; should be server preferred order
+  switch (accept.type(['json', 'html'])) {
+    case 'json':
+      res.setHeader('Content-Type', 'application/json')
+      res.write('{"hello":"world!"}')
+      break
+    case 'html':
+      res.setHeader('Content-Type', 'text/html')
+      res.write('<b>hello, world!</b>')
+      break
+    default:
+      // the fallback is text/plain, so no need to specify it above
+      res.setHeader('Content-Type', 'text/plain')
+      res.write('hello, world!')
+      break
+  }
+
+  res.end()
+}
+
+http.createServer(app).listen(3000)
+```
+
+You can test this out with the cURL program:
+```sh
+curl -I -H'Accept: text/html' http://localhost:3000/
+```
+
+## License
+
+[MIT](LICENSE)
+
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
+[node-version-image]: https://badgen.net/npm/node/accepts
+[node-version-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/accepts
+[npm-url]: https://npmjs.org/package/accepts
+[npm-version-image]: https://badgen.net/npm/v/accepts
+[travis-image]: https://badgen.net/travis/jshttp/accepts/master
+[travis-url]: https://travis-ci.org/jshttp/accepts

+ 238 - 0
back/node_modules/accepts/index.js

@@ -0,0 +1,238 @@
+/*!
+ * accepts
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Negotiator = require('negotiator')
+var mime = require('mime-types')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = Accepts
+
+/**
+ * Create a new Accepts object for the given req.
+ *
+ * @param {object} req
+ * @public
+ */
+
+function Accepts (req) {
+  if (!(this instanceof Accepts)) {
+    return new Accepts(req)
+  }
+
+  this.headers = req.headers
+  this.negotiator = new Negotiator(req)
+}
+
+/**
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single mime type string
+ * such as "application/json", the extension name
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ *     // Accept: text/html
+ *     this.types('html');
+ *     // => "html"
+ *
+ *     // Accept: text/*, application/json
+ *     this.types('html');
+ *     // => "html"
+ *     this.types('text/html');
+ *     // => "text/html"
+ *     this.types('json', 'text');
+ *     // => "json"
+ *     this.types('application/json');
+ *     // => "application/json"
+ *
+ *     // Accept: text/*, application/json
+ *     this.types('image/png');
+ *     this.types('png');
+ *     // => undefined
+ *
+ *     // Accept: text/*;q=.5, application/json
+ *     this.types(['html', 'json']);
+ *     this.types('html', 'json');
+ *     // => "json"
+ *
+ * @param {String|Array} types...
+ * @return {String|Array|Boolean}
+ * @public
+ */
+
+Accepts.prototype.type =
+Accepts.prototype.types = function (types_) {
+  var types = types_
+
+  // support flattened arguments
+  if (types && !Array.isArray(types)) {
+    types = new Array(arguments.length)
+    for (var i = 0; i < types.length; i++) {
+      types[i] = arguments[i]
+    }
+  }
+
+  // no types, return all requested types
+  if (!types || types.length === 0) {
+    return this.negotiator.mediaTypes()
+  }
+
+  // no accept header, return first given type
+  if (!this.headers.accept) {
+    return types[0]
+  }
+
+  var mimes = types.map(extToMime)
+  var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
+  var first = accepts[0]
+
+  return first
+    ? types[mimes.indexOf(first)]
+    : false
+}
+
+/**
+ * Return accepted encodings or best fit based on `encodings`.
+ *
+ * Given `Accept-Encoding: gzip, deflate`
+ * an array sorted by quality is returned:
+ *
+ *     ['gzip', 'deflate']
+ *
+ * @param {String|Array} encodings...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.encoding =
+Accepts.prototype.encodings = function (encodings_) {
+  var encodings = encodings_
+
+  // support flattened arguments
+  if (encodings && !Array.isArray(encodings)) {
+    encodings = new Array(arguments.length)
+    for (var i = 0; i < encodings.length; i++) {
+      encodings[i] = arguments[i]
+    }
+  }
+
+  // no encodings, return all requested encodings
+  if (!encodings || encodings.length === 0) {
+    return this.negotiator.encodings()
+  }
+
+  return this.negotiator.encodings(encodings)[0] || false
+}
+
+/**
+ * Return accepted charsets or best fit based on `charsets`.
+ *
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
+ * an array sorted by quality is returned:
+ *
+ *     ['utf-8', 'utf-7', 'iso-8859-1']
+ *
+ * @param {String|Array} charsets...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.charset =
+Accepts.prototype.charsets = function (charsets_) {
+  var charsets = charsets_
+
+  // support flattened arguments
+  if (charsets && !Array.isArray(charsets)) {
+    charsets = new Array(arguments.length)
+    for (var i = 0; i < charsets.length; i++) {
+      charsets[i] = arguments[i]
+    }
+  }
+
+  // no charsets, return all requested charsets
+  if (!charsets || charsets.length === 0) {
+    return this.negotiator.charsets()
+  }
+
+  return this.negotiator.charsets(charsets)[0] || false
+}
+
+/**
+ * Return accepted languages or best fit based on `langs`.
+ *
+ * Given `Accept-Language: en;q=0.8, es, pt`
+ * an array sorted by quality is returned:
+ *
+ *     ['es', 'pt', 'en']
+ *
+ * @param {String|Array} langs...
+ * @return {Array|String}
+ * @public
+ */
+
+Accepts.prototype.lang =
+Accepts.prototype.langs =
+Accepts.prototype.language =
+Accepts.prototype.languages = function (languages_) {
+  var languages = languages_
+
+  // support flattened arguments
+  if (languages && !Array.isArray(languages)) {
+    languages = new Array(arguments.length)
+    for (var i = 0; i < languages.length; i++) {
+      languages[i] = arguments[i]
+    }
+  }
+
+  // no languages, return all requested languages
+  if (!languages || languages.length === 0) {
+    return this.negotiator.languages()
+  }
+
+  return this.negotiator.languages(languages)[0] || false
+}
+
+/**
+ * Convert extnames to mime.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function extToMime (type) {
+  return type.indexOf('/') === -1
+    ? mime.lookup(type)
+    : type
+}
+
+/**
+ * Check if mime is valid.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function validMime (type) {
+  return typeof type === 'string'
+}

+ 86 - 0
back/node_modules/accepts/package.json

@@ -0,0 +1,86 @@
+{
+  "_from": "accepts@~1.3.7",
+  "_id": "accepts@1.3.7",
+  "_inBundle": false,
+  "_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
+  "_location": "/accepts",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "accepts@~1.3.7",
+    "name": "accepts",
+    "escapedName": "accepts",
+    "rawSpec": "~1.3.7",
+    "saveSpec": null,
+    "fetchSpec": "~1.3.7"
+  },
+  "_requiredBy": [
+    "/express"
+  ],
+  "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
+  "_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd",
+  "_spec": "accepts@~1.3.7",
+  "_where": "C:\\Users\\pavlo\\Documents\\MOOD\\moodila\\node_modules\\express",
+  "bugs": {
+    "url": "https://github.com/jshttp/accepts/issues"
+  },
+  "bundleDependencies": false,
+  "contributors": [
+    {
+      "name": "Douglas Christopher Wilson",
+      "email": "doug@somethingdoug.com"
+    },
+    {
+      "name": "Jonathan Ong",
+      "email": "me@jongleberry.com",
+      "url": "http://jongleberry.com"
+    }
+  ],
+  "dependencies": {
+    "mime-types": "~2.1.24",
+    "negotiator": "0.6.2"
+  },
+  "deprecated": false,
+  "description": "Higher-level content negotiation",
+  "devDependencies": {
+    "deep-equal": "1.0.1",
+    "eslint": "5.16.0",
+    "eslint-config-standard": "12.0.0",
+    "eslint-plugin-import": "2.17.2",
+    "eslint-plugin-markdown": "1.0.0",
+    "eslint-plugin-node": "8.0.1",
+    "eslint-plugin-promise": "4.1.1",
+    "eslint-plugin-standard": "4.0.0",
+    "mocha": "6.1.4",
+    "nyc": "14.0.0"
+  },
+  "engines": {
+    "node": ">= 0.6"
+  },
+  "files": [
+    "LICENSE",
+    "HISTORY.md",
+    "index.js"
+  ],
+  "homepage": "https://github.com/jshttp/accepts#readme",
+  "keywords": [
+    "content",
+    "negotiation",
+    "accept",
+    "accepts"
+  ],
+  "license": "MIT",
+  "name": "accepts",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jshttp/accepts.git"
+  },
+  "scripts": {
+    "lint": "eslint --plugin markdown --ext js,md .",
+    "test": "mocha --reporter spec --check-leaks --bail test/",
+    "test-cov": "nyc --reporter=html --reporter=text npm test",
+    "test-travis": "nyc --reporter=text npm test"
+  },
+  "version": "1.3.7"
+}

+ 20 - 0
back/node_modules/ajv/.tonic_example.js

@@ -0,0 +1,20 @@
+var Ajv = require('ajv');
+var ajv = new Ajv({allErrors: true});
+
+var schema = {
+  "properties": {
+    "foo": { "type": "string" },
+    "bar": { "type": "number", "maximum": 3 }
+  }
+};
+
+var validate = ajv.compile(schema);
+
+test({"foo": "abc", "bar": 2});
+test({"foo": 2, "bar": 4});
+
+function test(data) {
+  var valid = validate(data);
+  if (valid) console.log('Valid!');
+  else console.log('Invalid: ' + ajv.errorsText(validate.errors));
+}

+ 22 - 0
back/node_modules/ajv/LICENSE

@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2017 Evgeny Poberezkin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+

File diff suppressed because it is too large
+ 1478 - 0
back/node_modules/ajv/README.md


File diff suppressed because it is too large
+ 7143 - 0
back/node_modules/ajv/dist/ajv.bundle.js


File diff suppressed because it is too large
+ 3 - 0
back/node_modules/ajv/dist/ajv.min.js


File diff suppressed because it is too large
+ 1 - 0
back/node_modules/ajv/dist/ajv.min.js.map


+ 396 - 0
back/node_modules/ajv/lib/ajv.d.ts

@@ -0,0 +1,396 @@
+declare var ajv: {
+  (options?: ajv.Options): ajv.Ajv;
+  new(options?: ajv.Options): ajv.Ajv;
+  ValidationError: typeof AjvErrors.ValidationError;
+  MissingRefError: typeof AjvErrors.MissingRefError;
+  $dataMetaSchema: object;
+}
+
+declare namespace AjvErrors {
+  class ValidationError extends Error {
+    constructor(errors: Array<ajv.ErrorObject>);
+
+    message: string;
+    errors: Array<ajv.ErrorObject>;
+    ajv: true;
+    validation: true;
+  }
+
+  class MissingRefError extends Error {
+    constructor(baseId: string, ref: string, message?: string);
+    static message: (baseId: string, ref: string) => string;
+
+    message: string;
+    missingRef: string;
+    missingSchema: string;
+  }
+}
+
+declare namespace ajv {
+  type ValidationError = AjvErrors.ValidationError;
+
+  type MissingRefError = AjvErrors.MissingRefError;
+
+  interface Ajv {
+    /**
+    * Validate data using schema
+    * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default).
+    * @param  {string|object|Boolean} schemaKeyRef key, ref or schema object
+    * @param  {Any} data to be validated
+    * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+    */
+    validate(schemaKeyRef: object | string | boolean, data: any): boolean | PromiseLike<any>;
+    /**
+    * Create validating function for passed schema.
+    * @param  {object|Boolean} schema schema object
+    * @return {Function} validating function
+    */
+    compile(schema: object | boolean): ValidateFunction;
+    /**
+    * Creates validating function for passed schema with asynchronous loading of missing schemas.
+    * `loadSchema` option should be a function that accepts schema uri and node-style callback.
+    * @this  Ajv
+    * @param {object|Boolean} schema schema object
+    * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+    * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function.
+    * @return {PromiseLike<ValidateFunction>} validating function
+    */
+    compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike<ValidateFunction>;
+    /**
+    * Adds schema to the instance.
+    * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+    * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+    * @return {Ajv} this for method chaining
+    */
+    addSchema(schema: Array<object> | object, key?: string): Ajv;
+    /**
+    * Add schema that will be used to validate other schemas
+    * options in META_IGNORE_OPTIONS are alway set to false
+    * @param {object} schema schema object
+    * @param {string} key optional schema key
+    * @return {Ajv} this for method chaining
+    */
+    addMetaSchema(schema: object, key?: string): Ajv;
+    /**
+    * Validate schema
+    * @param {object|Boolean} schema schema to validate
+    * @return {Boolean} true if schema is valid
+    */
+    validateSchema(schema: object | boolean): boolean;
+    /**
+    * Get compiled schema from the instance by `key` or `ref`.
+    * @param  {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+    * @return {Function} schema validating function (with property `schema`). Returns undefined if keyRef can't be resolved to an existing schema.
+    */
+    getSchema(keyRef: string): ValidateFunction | undefined;
+    /**
+    * Remove cached schema(s).
+    * If no parameter is passed all schemas but meta-schemas are removed.
+    * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+    * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+    * @param  {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object
+    * @return {Ajv} this for method chaining
+    */
+    removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv;
+    /**
+    * Add custom format
+    * @param {string} name format name
+    * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+    * @return {Ajv} this for method chaining
+    */
+    addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv;
+    /**
+    * Define custom keyword
+    * @this  Ajv
+    * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
+    * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+    * @return {Ajv} this for method chaining
+    */
+    addKeyword(keyword: string, definition: KeywordDefinition): Ajv;
+    /**
+    * Get keyword definition
+    * @this  Ajv
+    * @param {string} keyword pre-defined or custom keyword.
+    * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+    */
+    getKeyword(keyword: string): object | boolean;
+    /**
+    * Remove keyword
+    * @this  Ajv
+    * @param {string} keyword pre-defined or custom keyword.
+    * @return {Ajv} this for method chaining
+    */
+    removeKeyword(keyword: string): Ajv;
+    /**
+    * Validate keyword
+    * @this  Ajv
+    * @param {object} definition keyword definition object
+    * @param {boolean} throwError true to throw exception if definition is invalid
+    * @return {boolean} validation result
+    */
+    validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean;
+    /**
+    * Convert array of error message objects to string
+    * @param  {Array<object>} errors optional array of validation errors, if not passed errors from the instance are used.
+    * @param  {object} options optional options with properties `separator` and `dataVar`.
+    * @return {string} human readable string with all errors descriptions
+    */
+    errorsText(errors?: Array<ErrorObject> | null, options?: ErrorsTextOptions): string;
+    errors?: Array<ErrorObject> | null;
+  }
+
+  interface CustomLogger {
+    log(...args: any[]): any;
+    warn(...args: any[]): any;
+    error(...args: any[]): any;
+  }
+
+  interface ValidateFunction {
+    (
+      data: any,
+      dataPath?: string,
+      parentData?: object | Array<any>,
+      parentDataProperty?: string | number,
+      rootData?: object | Array<any>
+    ): boolean | PromiseLike<any>;
+    schema?: object | boolean;
+    errors?: null | Array<ErrorObject>;
+    refs?: object;
+    refVal?: Array<any>;
+    root?: ValidateFunction | object;
+    $async?: true;
+    source?: object;
+  }
+
+  interface Options {
+    $data?: boolean;
+    allErrors?: boolean;
+    verbose?: boolean;
+    jsonPointers?: boolean;
+    uniqueItems?: boolean;
+    unicode?: boolean;
+    format?: false | string;
+    formats?: object;
+    keywords?: object;
+    unknownFormats?: true | string[] | 'ignore';
+    schemas?: Array<object> | object;
+    schemaId?: '$id' | 'id' | 'auto';
+    missingRefs?: true | 'ignore' | 'fail';
+    extendRefs?: true | 'ignore' | 'fail';
+    loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike<object | boolean>;
+    removeAdditional?: boolean | 'all' | 'failing';
+    useDefaults?: boolean | 'empty' | 'shared';
+    coerceTypes?: boolean | 'array';
+    strictDefaults?: boolean | 'log';
+    strictKeywords?: boolean | 'log';
+    strictNumbers?: boolean;
+    async?: boolean | string;
+    transpile?: string | ((code: string) => string);
+    meta?: boolean | object;
+    validateSchema?: boolean | 'log';
+    addUsedSchema?: boolean;
+    inlineRefs?: boolean | number;
+    passContext?: boolean;
+    loopRequired?: number;
+    ownProperties?: boolean;
+    multipleOfPrecision?: boolean | number;
+    errorDataPath?: string,
+    messages?: boolean;
+    sourceCode?: boolean;
+    processCode?: (code: string, schema: object) => string;
+    cache?: object;
+    logger?: CustomLogger | false;
+    nullable?: boolean;
+    serialize?: ((schema: object | boolean) => any) | false;
+  }
+
+  type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike<any>);
+  type NumberFormatValidator = ((data: number) => boolean | PromiseLike<any>);
+
+  interface NumberFormatDefinition {
+    type: "number",
+    validate: NumberFormatValidator;
+    compare?: (data1: number, data2: number) => number;
+    async?: boolean;
+  }
+
+  interface StringFormatDefinition {
+    type?: "string",
+    validate: FormatValidator;
+    compare?: (data1: string, data2: string) => number;
+    async?: boolean;
+  }
+
+  type FormatDefinition = NumberFormatDefinition | StringFormatDefinition;
+
+  interface KeywordDefinition {
+    type?: string | Array<string>;
+    async?: boolean;
+    $data?: boolean;
+    errors?: boolean | string;
+    metaSchema?: object;
+    // schema: false makes validate not to expect schema (ValidateFunction)
+    schema?: boolean;
+    statements?: boolean;
+    dependencies?: Array<string>;
+    modifying?: boolean;
+    valid?: boolean;
+    // one and only one of the following properties should be present
+    validate?: SchemaValidateFunction | ValidateFunction;
+    compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction;
+    macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean;
+    inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string;
+  }
+
+  interface CompilationContext {
+    level: number;
+    dataLevel: number;
+    dataPathArr: string[];
+    schema: any;
+    schemaPath: string;
+    baseId: string;
+    async: boolean;
+    opts: Options;
+    formats: {
+      [index: string]: FormatDefinition | undefined;
+    };
+    keywords: {
+      [index: string]: KeywordDefinition | undefined;
+    };
+    compositeRule: boolean;
+    validate: (schema: object) => boolean;
+    util: {
+      copy(obj: any, target?: any): any;
+      toHash(source: string[]): { [index: string]: true | undefined };
+      equal(obj: any, target: any): boolean;
+      getProperty(str: string): string;
+      schemaHasRules(schema: object, rules: any): string;
+      escapeQuotes(str: string): string;
+      toQuotedString(str: string): string;
+      getData(jsonPointer: string, dataLevel: number, paths: string[]): string;
+      escapeJsonPointer(str: string): string;
+      unescapeJsonPointer(str: string): string;
+      escapeFragment(str: string): string;
+      unescapeFragment(str: string): string;
+    };
+    self: Ajv;
+  }
+
+  interface SchemaValidateFunction {
+    (
+      schema: any,
+      data: any,
+      parentSchema?: object,
+      dataPath?: string,
+      parentData?: object | Array<any>,
+      parentDataProperty?: string | number,
+      rootData?: object | Array<any>
+    ): boolean | PromiseLike<any>;
+    errors?: Array<ErrorObject>;
+  }
+
+  interface ErrorsTextOptions {
+    separator?: string;
+    dataVar?: string;
+  }
+
+  interface ErrorObject {
+    keyword: string;
+    dataPath: string;
+    schemaPath: string;
+    params: ErrorParameters;
+    // Added to validation errors of propertyNames keyword schema
+    propertyName?: string;
+    // Excluded if messages set to false.
+    message?: string;
+    // These are added with the `verbose` option.
+    schema?: any;
+    parentSchema?: object;
+    data?: any;
+  }
+
+  type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams |
+    DependenciesParams | FormatParams | ComparisonParams |
+    MultipleOfParams | PatternParams | RequiredParams |
+    TypeParams | UniqueItemsParams | CustomParams |
+    PatternRequiredParams | PropertyNamesParams |
+    IfParams | SwitchParams | NoParams | EnumParams;
+
+  interface RefParams {
+    ref: string;
+  }
+
+  interface LimitParams {
+    limit: number;
+  }
+
+  interface AdditionalPropertiesParams {
+    additionalProperty: string;
+  }
+
+  interface DependenciesParams {
+    property: string;
+    missingProperty: string;
+    depsCount: number;
+    deps: string;
+  }
+
+  interface FormatParams {
+    format: string
+  }
+
+  interface ComparisonParams {
+    comparison: string;
+    limit: number | string;
+    exclusive: boolean;
+  }
+
+  interface MultipleOfParams {
+    multipleOf: number;
+  }
+
+  interface PatternParams {
+    pattern: string;
+  }
+
+  interface RequiredParams {
+    missingProperty: string;
+  }
+
+  interface TypeParams {
+    type: string;
+  }
+
+  interface UniqueItemsParams {
+    i: number;
+    j: number;
+  }
+
+  interface CustomParams {
+    keyword: string;
+  }
+
+  interface PatternRequiredParams {
+    missingPattern: string;
+  }
+
+  interface PropertyNamesParams {
+    propertyName: string;
+  }
+
+  interface IfParams {
+    failingKeyword: string;
+  }
+
+  interface SwitchParams {
+    caseIndex: number;
+  }
+
+  interface NoParams { }
+
+  interface EnumParams {
+    allowedValues: Array<any>;
+  }
+}
+
+export = ajv;

+ 506 - 0
back/node_modules/ajv/lib/ajv.js

@@ -0,0 +1,506 @@
+'use strict';
+
+var compileSchema = require('./compile')
+  , resolve = require('./compile/resolve')
+  , Cache = require('./cache')
+  , SchemaObject = require('./compile/schema_obj')
+  , stableStringify = require('fast-json-stable-stringify')
+  , formats = require('./compile/formats')
+  , rules = require('./compile/rules')
+  , $dataMetaSchema = require('./data')
+  , util = require('./compile/util');
+
+module.exports = Ajv;
+
+Ajv.prototype.validate = validate;
+Ajv.prototype.compile = compile;
+Ajv.prototype.addSchema = addSchema;
+Ajv.prototype.addMetaSchema = addMetaSchema;
+Ajv.prototype.validateSchema = validateSchema;
+Ajv.prototype.getSchema = getSchema;
+Ajv.prototype.removeSchema = removeSchema;
+Ajv.prototype.addFormat = addFormat;
+Ajv.prototype.errorsText = errorsText;
+
+Ajv.prototype._addSchema = _addSchema;
+Ajv.prototype._compile = _compile;
+
+Ajv.prototype.compileAsync = require('./compile/async');
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+Ajv.prototype.validateKeyword = customKeyword.validate;
+
+var errorClasses = require('./compile/error_classes');
+Ajv.ValidationError = errorClasses.Validation;
+Ajv.MissingRefError = errorClasses.MissingRef;
+Ajv.$dataMetaSchema = $dataMetaSchema;
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];
+var META_SUPPORT_DATA = ['/properties'];
+
+/**
+ * Creates validator instance.
+ * Usage: `Ajv(opts)`
+ * @param {Object} opts optional options
+ * @return {Object} ajv instance
+ */
+function Ajv(opts) {
+  if (!(this instanceof Ajv)) return new Ajv(opts);
+  opts = this._opts = util.copy(opts) || {};
+  setLogger(this);
+  this._schemas = {};
+  this._refs = {};
+  this._fragments = {};
+  this._formats = formats(opts.format);
+
+  this._cache = opts.cache || new Cache;
+  this._loadingSchemas = {};
+  this._compilations = [];
+  this.RULES = rules();
+  this._getId = chooseGetId(opts);
+
+  opts.loopRequired = opts.loopRequired || Infinity;
+  if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+  if (opts.serialize === undefined) opts.serialize = stableStringify;
+  this._metaOpts = getMetaSchemaOptions(this);
+
+  if (opts.formats) addInitialFormats(this);
+  if (opts.keywords) addInitialKeywords(this);
+  addDefaultMetaSchema(this);
+  if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
+  if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});
+  addInitialSchemas(this);
+}
+
+
+
+/**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
+ * @this   Ajv
+ * @param  {String|Object} schemaKeyRef key, ref or schema object
+ * @param  {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+function validate(schemaKeyRef, data) {
+  var v;
+  if (typeof schemaKeyRef == 'string') {
+    v = this.getSchema(schemaKeyRef);
+    if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+  } else {
+    var schemaObj = this._addSchema(schemaKeyRef);
+    v = schemaObj.validate || this._compile(schemaObj);
+  }
+
+  var valid = v(data);
+  if (v.$async !== true) this.errors = v.errors;
+  return valid;
+}
+
+
+/**
+ * Create validating function for passed schema.
+ * @this   Ajv
+ * @param  {Object} schema schema object
+ * @param  {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
+ * @return {Function} validating function
+ */
+function compile(schema, _meta) {
+  var schemaObj = this._addSchema(schema, undefined, _meta);
+  return schemaObj.validate || this._compile(schemaObj);
+}
+
+
+/**
+ * Adds schema to the instance.
+ * @this   Ajv
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ * @return {Ajv} this for method chaining
+ */
+function addSchema(schema, key, _skipValidation, _meta) {
+  if (Array.isArray(schema)){
+    for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
+    return this;
+  }
+  var id = this._getId(schema);
+  if (id !== undefined && typeof id != 'string')
+    throw new Error('schema id must be string');
+  key = resolve.normalizeId(key || id);
+  checkUnique(this, key);
+  this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
+  return this;
+}
+
+
+/**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @this   Ajv
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
+ * @return {Ajv} this for method chaining
+ */
+function addMetaSchema(schema, key, skipValidation) {
+  this.addSchema(schema, key, skipValidation, true);
+  return this;
+}
+
+
+/**
+ * Validate schema
+ * @this   Ajv
+ * @param {Object} schema schema to validate
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
+ * @return {Boolean} true if schema is valid
+ */
+function validateSchema(schema, throwOrLogError) {
+  var $schema = schema.$schema;
+  if ($schema !== undefined && typeof $schema != 'string')
+    throw new Error('$schema must be a string');
+  $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
+  if (!$schema) {
+    this.logger.warn('meta-schema not available');
+    this.errors = null;
+    return true;
+  }
+  var valid = this.validate($schema, schema);
+  if (!valid && throwOrLogError) {
+    var message = 'schema is invalid: ' + this.errorsText();
+    if (this._opts.validateSchema == 'log') this.logger.error(message);
+    else throw new Error(message);
+  }
+  return valid;
+}
+
+
+function defaultMeta(self) {
+  var meta = self._opts.meta;
+  self._opts.defaultMeta = typeof meta == 'object'
+                            ? self._getId(meta) || meta
+                            : self.getSchema(META_SCHEMA_ID)
+                              ? META_SCHEMA_ID
+                              : undefined;
+  return self._opts.defaultMeta;
+}
+
+
+/**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @this   Ajv
+ * @param  {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+function getSchema(keyRef) {
+  var schemaObj = _getSchemaObj(this, keyRef);
+  switch (typeof schemaObj) {
+    case 'object': return schemaObj.validate || this._compile(schemaObj);
+    case 'string': return this.getSchema(schemaObj);
+    case 'undefined': return _getSchemaFragment(this, keyRef);
+  }
+}
+
+
+function _getSchemaFragment(self, ref) {
+  var res = resolve.schema.call(self, { schema: {} }, ref);
+  if (res) {
+    var schema = res.schema
+      , root = res.root
+      , baseId = res.baseId;
+    var v = compileSchema.call(self, schema, root, undefined, baseId);
+    self._fragments[ref] = new SchemaObject({
+      ref: ref,
+      fragment: true,
+      schema: schema,
+      root: root,
+      baseId: baseId,
+      validate: v
+    });
+    return v;
+  }
+}
+
+
+function _getSchemaObj(self, keyRef) {
+  keyRef = resolve.normalizeId(keyRef);
+  return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+}
+
+
+/**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @this   Ajv
+ * @param  {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+function removeSchema(schemaKeyRef) {
+  if (schemaKeyRef instanceof RegExp) {
+    _removeAllSchemas(this, this._schemas, schemaKeyRef);
+    _removeAllSchemas(this, this._refs, schemaKeyRef);
+    return this;
+  }
+  switch (typeof schemaKeyRef) {
+    case 'undefined':
+      _removeAllSchemas(this, this._schemas);
+      _removeAllSchemas(this, this._refs);
+      this._cache.clear();
+      return this;
+    case 'string':
+      var schemaObj = _getSchemaObj(this, schemaKeyRef);
+      if (schemaObj) this._cache.del(schemaObj.cacheKey);
+      delete this._schemas[schemaKeyRef];
+      delete this._refs[schemaKeyRef];
+      return this;
+    case 'object':
+      var serialize = this._opts.serialize;
+      var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
+      this._cache.del(cacheKey);
+      var id = this._getId(schemaKeyRef);
+      if (id) {
+        id = resolve.normalizeId(id);
+        delete this._schemas[id];
+        delete this._refs[id];
+      }
+  }
+  return this;
+}
+
+
+function _removeAllSchemas(self, schemas, regex) {
+  for (var keyRef in schemas) {
+    var schemaObj = schemas[keyRef];
+    if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
+      self._cache.del(schemaObj.cacheKey);
+      delete schemas[keyRef];
+    }
+  }
+}
+
+
+/* @this   Ajv */
+function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
+  if (typeof schema != 'object' && typeof schema != 'boolean')
+    throw new Error('schema should be object or boolean');
+  var serialize = this._opts.serialize;
+  var cacheKey = serialize ? serialize(schema) : schema;
+  var cached = this._cache.get(cacheKey);
+  if (cached) return cached;
+
+  shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
+
+  var id = resolve.normalizeId(this._getId(schema));
+  if (id && shouldAddSchema) checkUnique(this, id);
+
+  var willValidate = this._opts.validateSchema !== false && !skipValidation;
+  var recursiveMeta;
+  if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
+    this.validateSchema(schema, true);
+
+  var localRefs = resolve.ids.call(this, schema);
+
+  var schemaObj = new SchemaObject({
+    id: id,
+    schema: schema,
+    localRefs: localRefs,
+    cacheKey: cacheKey,
+    meta: meta
+  });
+
+  if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
+  this._cache.put(cacheKey, schemaObj);
+
+  if (willValidate && recursiveMeta) this.validateSchema(schema, true);
+
+  return schemaObj;
+}
+
+
+/* @this   Ajv */
+function _compile(schemaObj, root) {
+  if (schemaObj.compiling) {
+    schemaObj.validate = callValidate;
+    callValidate.schema = schemaObj.schema;
+    callValidate.errors = null;
+    callValidate.root = root ? root : callValidate;
+    if (schemaObj.schema.$async === true)
+      callValidate.$async = true;
+    return callValidate;
+  }
+  schemaObj.compiling = true;
+
+  var currentOpts;
+  if (schemaObj.meta) {
+    currentOpts = this._opts;
+    this._opts = this._metaOpts;
+  }
+
+  var v;
+  try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
+  catch(e) {
+    delete schemaObj.validate;
+    throw e;
+  }
+  finally {
+    schemaObj.compiling = false;
+    if (schemaObj.meta) this._opts = currentOpts;
+  }
+
+  schemaObj.validate = v;
+  schemaObj.refs = v.refs;
+  schemaObj.refVal = v.refVal;
+  schemaObj.root = v.root;
+  return v;
+
+
+  /* @this   {*} - custom context, see passContext option */
+  function callValidate() {
+    /* jshint validthis: true */
+    var _validate = schemaObj.validate;
+    var result = _validate.apply(this, arguments);
+    callValidate.errors = _validate.errors;
+    return result;
+  }
+}
+
+
+function chooseGetId(opts) {
+  switch (opts.schemaId) {
+    case 'auto': return _get$IdOrId;
+    case 'id': return _getId;
+    default: return _get$Id;
+  }
+}
+
+/* @this   Ajv */
+function _getId(schema) {
+  if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
+  return schema.id;
+}
+
+/* @this   Ajv */
+function _get$Id(schema) {
+  if (schema.id) this.logger.warn('schema id ignored', schema.id);
+  return schema.$id;
+}
+
+
+function _get$IdOrId(schema) {
+  if (schema.$id && schema.id && schema.$id != schema.id)
+    throw new Error('schema $id is different from id');
+  return schema.$id || schema.id;
+}
+
+
+/**
+ * Convert array of error message objects to string
+ * @this   Ajv
+ * @param  {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param  {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+function errorsText(errors, options) {
+  errors = errors || this.errors;
+  if (!errors) return 'No errors';
+  options = options || {};
+  var separator = options.separator === undefined ? ', ' : options.separator;
+  var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
+
+  var text = '';
+  for (var i=0; i<errors.length; i++) {
+    var e = errors[i];
+    if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
+  }
+  return text.slice(0, -separator.length);
+}
+
+
+/**
+ * Add custom format
+ * @this   Ajv
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ * @return {Ajv} this for method chaining
+ */
+function addFormat(name, format) {
+  if (typeof format == 'string') format = new RegExp(format);
+  this._formats[name] = format;
+  return this;
+}
+
+
+function addDefaultMetaSchema(self) {
+  var $dataSchema;
+  if (self._opts.$data) {
+    $dataSchema = require('./refs/data.json');
+    self.addMetaSchema($dataSchema, $dataSchema.$id, true);
+  }
+  if (self._opts.meta === false) return;
+  var metaSchema = require('./refs/json-schema-draft-07.json');
+  if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
+  self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
+  self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
+}
+
+
+function addInitialSchemas(self) {
+  var optsSchemas = self._opts.schemas;
+  if (!optsSchemas) return;
+  if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
+  else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
+}
+
+
+function addInitialFormats(self) {
+  for (var name in self._opts.formats) {
+    var format = self._opts.formats[name];
+    self.addFormat(name, format);
+  }
+}
+
+
+function addInitialKeywords(self) {
+  for (var name in self._opts.keywords) {
+    var keyword = self._opts.keywords[name];
+    self.addKeyword(name, keyword);
+  }
+}
+
+
+function checkUnique(self, id) {
+  if (self._schemas[id] || self._refs[id])
+    throw new Error('schema with key or id "' + id + '" already exists');
+}
+
+
+function getMetaSchemaOptions(self) {
+  var metaOpts = util.copy(self._opts);
+  for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
+    delete metaOpts[META_IGNORE_OPTIONS[i]];
+  return metaOpts;
+}
+
+
+function setLogger(self) {
+  var logger = self._opts.logger;
+  if (logger === false) {
+    self.logger = {log: noop, warn: noop, error: noop};
+  } else {
+    if (logger === undefined) logger = console;
+    if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
+      throw new Error('logger must implement log, warn and error methods');
+    self.logger = logger;
+  }
+}
+
+
+function noop() {}

+ 26 - 0
back/node_modules/ajv/lib/cache.js

@@ -0,0 +1,26 @@
+'use strict';
+
+
+var Cache = module.exports = function Cache() {
+  this._cache = {};
+};
+
+
+Cache.prototype.put = function Cache_put(key, value) {
+  this._cache[key] = value;
+};
+
+
+Cache.prototype.get = function Cache_get(key) {
+  return this._cache[key];
+};
+
+
+Cache.prototype.del = function Cache_del(key) {
+  delete this._cache[key];
+};
+
+
+Cache.prototype.clear = function Cache_clear() {
+  this._cache = {};
+};

+ 90 - 0
back/node_modules/ajv/lib/compile/async.js

@@ -0,0 +1,90 @@
+'use strict';
+
+var MissingRefError = require('./error_classes').MissingRef;
+
+module.exports = compileAsync;
+
+
+/**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
+ * @this  Ajv
+ * @param {Object}   schema schema object
+ * @param {Boolean}  meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
+ * @return {Promise} promise that resolves with a validating function.
+ */
+function compileAsync(schema, meta, callback) {
+  /* eslint no-shadow: 0 */
+  /* global Promise */
+  /* jshint validthis: true */
+  var self = this;
+  if (typeof this._opts.loadSchema != 'function')
+    throw new Error('options.loadSchema should be a function');
+
+  if (typeof meta == 'function') {
+    callback = meta;
+    meta = undefined;
+  }
+
+  var p = loadMetaSchemaOf(schema).then(function () {
+    var schemaObj = self._addSchema(schema, undefined, meta);
+    return schemaObj.validate || _compileAsync(schemaObj);
+  });
+
+  if (callback) {
+    p.then(
+      function(v) { callback(null, v); },
+      callback
+    );
+  }
+
+  return p;
+
+
+  function loadMetaSchemaOf(sch) {
+    var $schema = sch.$schema;
+    return $schema && !self.getSchema($schema)
+            ? compileAsync.call(self, { $ref: $schema }, true)
+            : Promise.resolve();
+  }
+
+
+  function _compileAsync(schemaObj) {
+    try { return self._compile(schemaObj); }
+    catch(e) {
+      if (e instanceof MissingRefError) return loadMissingSchema(e);
+      throw e;
+    }
+
+
+    function loadMissingSchema(e) {
+      var ref = e.missingSchema;
+      if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
+
+      var schemaPromise = self._loadingSchemas[ref];
+      if (!schemaPromise) {
+        schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
+        schemaPromise.then(removePromise, removePromise);
+      }
+
+      return schemaPromise.then(function (sch) {
+        if (!added(ref)) {
+          return loadMetaSchemaOf(sch).then(function () {
+            if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
+          });
+        }
+      }).then(function() {
+        return _compileAsync(schemaObj);
+      });
+
+      function removePromise() {
+        delete self._loadingSchemas[ref];
+      }
+
+      function added(ref) {
+        return self._refs[ref] || self._schemas[ref];
+      }
+    }
+  }
+}

+ 5 - 0
back/node_modules/ajv/lib/compile/equal.js

@@ -0,0 +1,5 @@
+'use strict';
+
+// do NOT remove this file - it would break pre-compiled schemas
+// https://github.com/ajv-validator/ajv/issues/889
+module.exports = require('fast-deep-equal');

+ 34 - 0
back/node_modules/ajv/lib/compile/error_classes.js

@@ -0,0 +1,34 @@
+'use strict';
+
+var resolve = require('./resolve');
+
+module.exports = {
+  Validation: errorSubclass(ValidationError),
+  MissingRef: errorSubclass(MissingRefError)
+};
+
+
+function ValidationError(errors) {
+  this.message = 'validation failed';
+  this.errors = errors;
+  this.ajv = this.validation = true;
+}
+
+
+MissingRefError.message = function (baseId, ref) {
+  return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
+};
+
+
+function MissingRefError(baseId, ref, message) {
+  this.message = message || MissingRefError.message(baseId, ref);
+  this.missingRef = resolve.url(baseId, ref);
+  this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
+}
+
+
+function errorSubclass(Subclass) {
+  Subclass.prototype = Object.create(Error.prototype);
+  Subclass.prototype.constructor = Subclass;
+  return Subclass;
+}

File diff suppressed because it is too large
+ 142 - 0
back/node_modules/ajv/lib/compile/formats.js


+ 387 - 0
back/node_modules/ajv/lib/compile/index.js

@@ -0,0 +1,387 @@
+'use strict';
+
+var resolve = require('./resolve')
+  , util = require('./util')
+  , errorClasses = require('./error_classes')
+  , stableStringify = require('fast-json-stable-stringify');
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var ucs2length = util.ucs2length;
+var equal = require('fast-deep-equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = errorClasses.Validation;
+
+module.exports = compile;
+
+
+/**
+ * Compiles schema to validation function
+ * @this   Ajv
+ * @param  {Object} schema schema object
+ * @param  {Object} root object with information about the root schema for this schema
+ * @param  {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
+ * @param  {String} baseId base ID for IDs in the schema
+ * @return {Function} validation function
+ */
+function compile(schema, root, localRefs, baseId) {
+  /* jshint validthis: true, evil: true */
+  /* eslint no-shadow: 0 */
+  var self = this
+    , opts = this._opts
+    , refVal = [ undefined ]
+    , refs = {}
+    , patterns = []
+    , patternsHash = {}
+    , defaults = []
+    , defaultsHash = {}
+    , customRules = [];
+
+  root = root || { schema: schema, refVal: refVal, refs: refs };
+
+  var c = checkCompiling.call(this, schema, root, baseId);
+  var compilation = this._compilations[c.index];
+  if (c.compiling) return (compilation.callValidate = callValidate);
+
+  var formats = this._formats;
+  var RULES = this.RULES;
+
+  try {
+    var v = localCompile(schema, root, localRefs, baseId);
+    compilation.validate = v;
+    var cv = compilation.callValidate;
+    if (cv) {
+      cv.schema = v.schema;
+      cv.errors = null;
+      cv.refs = v.refs;
+      cv.refVal = v.refVal;
+      cv.root = v.root;
+      cv.$async = v.$async;
+      if (opts.sourceCode) cv.source = v.source;
+    }
+    return v;
+  } finally {
+    endCompiling.call(this, schema, root, baseId);
+  }
+
+  /* @this   {*} - custom context, see passContext option */
+  function callValidate() {
+    /* jshint validthis: true */
+    var validate = compilation.validate;
+    var result = validate.apply(this, arguments);
+    callValidate.errors = validate.errors;
+    return result;
+  }
+
+  function localCompile(_schema, _root, localRefs, baseId) {
+    var isRoot = !_root || (_root && _root.schema == _schema);
+    if (_root.schema != root.schema)
+      return compile.call(self, _schema, _root, localRefs, baseId);
+
+    var $async = _schema.$async === true;
+
+    var sourceCode = validateGenerator({
+      isTop: true,
+      schema: _schema,
+      isRoot: isRoot,
+      baseId: baseId,
+      root: _root,
+      schemaPath: '',
+      errSchemaPath: '#',
+      errorPath: '""',
+      MissingRefError: errorClasses.MissingRef,
+      RULES: RULES,
+      validate: validateGenerator,
+      util: util,
+      resolve: resolve,
+      resolveRef: resolveRef,
+      usePattern: usePattern,
+      useDefault: useDefault,
+      useCustomRule: useCustomRule,
+      opts: opts,
+      formats: formats,
+      logger: self.logger,
+      self: self
+    });
+
+    sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+                   + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+                   + sourceCode;
+
+    if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);
+    // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
+    var validate;
+    try {
+      var makeValidate = new Function(
+        'self',
+        'RULES',
+        'formats',
+        'root',
+        'refVal',
+        'defaults',
+        'customRules',
+        'equal',
+        'ucs2length',
+        'ValidationError',
+        sourceCode
+      );
+
+      validate = makeValidate(
+        self,
+        RULES,
+        formats,
+        root,
+        refVal,
+        defaults,
+        customRules,
+        equal,
+        ucs2length,
+        ValidationError
+      );
+
+      refVal[0] = validate;
+    } catch(e) {
+      self.logger.error('Error compiling schema, function code:', sourceCode);
+      throw e;
+    }
+
+    validate.schema = _schema;
+    validate.errors = null;
+    validate.refs = refs;
+    validate.refVal = refVal;
+    validate.root = isRoot ? validate : _root;
+    if ($async) validate.$async = true;
+    if (opts.sourceCode === true) {
+      validate.source = {
+        code: sourceCode,
+        patterns: patterns,
+        defaults: defaults
+      };
+    }
+
+    return validate;
+  }
+
+  function resolveRef(baseId, ref, isRoot) {
+    ref = resolve.url(baseId, ref);
+    var refIndex = refs[ref];
+    var _refVal, refCode;
+    if (refIndex !== undefined) {
+      _refVal = refVal[refIndex];
+      refCode = 'refVal[' + refIndex + ']';
+      return resolvedRef(_refVal, refCode);
+    }
+    if (!isRoot && root.refs) {
+      var rootRefId = root.refs[ref];
+      if (rootRefId !== undefined) {
+        _refVal = root.refVal[rootRefId];
+        refCode = addLocalRef(ref, _refVal);
+        return resolvedRef(_refVal, refCode);
+      }
+    }
+
+    refCode = addLocalRef(ref);
+    var v = resolve.call(self, localCompile, root, ref);
+    if (v === undefined) {
+      var localSchema = localRefs && localRefs[ref];
+      if (localSchema) {
+        v = resolve.inlineRef(localSchema, opts.inlineRefs)
+            ? localSchema
+            : compile.call(self, localSchema, root, localRefs, baseId);
+      }
+    }
+
+    if (v === undefined) {
+      removeLocalRef(ref);
+    } else {
+      replaceLocalRef(ref, v);
+      return resolvedRef(v, refCode);
+    }
+  }
+
+  function addLocalRef(ref, v) {
+    var refId = refVal.length;
+    refVal[refId] = v;
+    refs[ref] = refId;
+    return 'refVal' + refId;
+  }
+
+  function removeLocalRef(ref) {
+    delete refs[ref];
+  }
+
+  function replaceLocalRef(ref, v) {
+    var refId = refs[ref];
+    refVal[refId] = v;
+  }
+
+  function resolvedRef(refVal, code) {
+    return typeof refVal == 'object' || typeof refVal == 'boolean'
+            ? { code: code, schema: refVal, inline: true }
+            : { code: code, $async: refVal && !!refVal.$async };
+  }
+
+  function usePattern(regexStr) {
+    var index = patternsHash[regexStr];
+    if (index === undefined) {
+      index = patternsHash[regexStr] = patterns.length;
+      patterns[index] = regexStr;
+    }
+    return 'pattern' + index;
+  }
+
+  function useDefault(value) {
+    switch (typeof value) {
+      case 'boolean':
+      case 'number':
+        return '' + value;
+      case 'string':
+        return util.toQuotedString(value);
+      case 'object':
+        if (value === null) return 'null';
+        var valueStr = stableStringify(value);
+        var index = defaultsHash[valueStr];
+        if (index === undefined) {
+          index = defaultsHash[valueStr] = defaults.length;
+          defaults[index] = value;
+        }
+        return 'default' + index;
+    }
+  }
+
+  function useCustomRule(rule, schema, parentSchema, it) {
+    if (self._opts.validateSchema !== false) {
+      var deps = rule.definition.dependencies;
+      if (deps && !deps.every(function(keyword) {
+        return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
+      }))
+        throw new Error('parent schema must have all required keywords: ' + deps.join(','));
+
+      var validateSchema = rule.definition.validateSchema;
+      if (validateSchema) {
+        var valid = validateSchema(schema);
+        if (!valid) {
+          var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+          if (self._opts.validateSchema == 'log') self.logger.error(message);
+          else throw new Error(message);
+        }
+      }
+    }
+
+    var compile = rule.definition.compile
+      , inline = rule.definition.inline
+      , macro = rule.definition.macro;
+
+    var validate;
+    if (compile) {
+      validate = compile.call(self, schema, parentSchema, it);
+    } else if (macro) {
+      validate = macro.call(self, schema, parentSchema, it);
+      if (opts.validateSchema !== false) self.validateSchema(validate, true);
+    } else if (inline) {
+      validate = inline.call(self, it, rule.keyword, schema, parentSchema);
+    } else {
+      validate = rule.definition.validate;
+      if (!validate) return;
+    }
+
+    if (validate === undefined)
+      throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
+
+    var index = customRules.length;
+    customRules[index] = validate;
+
+    return {
+      code: 'customRule' + index,
+      validate: validate
+    };
+  }
+}
+
+
+/**
+ * Checks if the schema is currently compiled
+ * @this   Ajv
+ * @param  {Object} schema schema to compile
+ * @param  {Object} root root object
+ * @param  {String} baseId base schema ID
+ * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
+ */
+function checkCompiling(schema, root, baseId) {
+  /* jshint validthis: true */
+  var index = compIndex.call(this, schema, root, baseId);
+  if (index >= 0) return { index: index, compiling: true };
+  index = this._compilations.length;
+  this._compilations[index] = {
+    schema: schema,
+    root: root,
+    baseId: baseId
+  };
+  return { index: index, compiling: false };
+}
+
+
+/**
+ * Removes the schema from the currently compiled list
+ * @this   Ajv
+ * @param  {Object} schema schema to compile
+ * @param  {Object} root root object
+ * @param  {String} baseId base schema ID
+ */
+function endCompiling(schema, root, baseId) {
+  /* jshint validthis: true */
+  var i = compIndex.call(this, schema, root, baseId);
+  if (i >= 0) this._compilations.splice(i, 1);
+}
+
+
+/**
+ * Index of schema compilation in the currently compiled list
+ * @this   Ajv
+ * @param  {Object} schema schema to compile
+ * @param  {Object} root root object
+ * @param  {String} baseId base schema ID
+ * @return {Integer} compilation index
+ */
+function compIndex(schema, root, baseId) {
+  /* jshint validthis: true */
+  for (var i=0; i<this._compilations.length; i++) {
+    var c = this._compilations[i];
+    if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
+  }
+  return -1;
+}
+
+
+function patternCode(i, patterns) {
+  return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
+}
+
+
+function defaultCode(i) {
+  return 'var default' + i + ' = defaults[' + i + '];';
+}
+
+
+function refValCode(i, refVal) {
+  return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
+}
+
+
+function customRuleCode(i) {
+  return 'var customRule' + i + ' = customRules[' + i + '];';
+}
+
+
+function vars(arr, statement) {
+  if (!arr.length) return '';
+  var code = '';
+  for (var i=0; i<arr.length; i++)
+    code += statement(i, arr);
+  return code;
+}

+ 270 - 0
back/node_modules/ajv/lib/compile/resolve.js

@@ -0,0 +1,270 @@
+'use strict';
+
+var URI = require('uri-js')
+  , equal = require('fast-deep-equal')
+  , util = require('./util')
+  , SchemaObject = require('./schema_obj')
+  , traverse = require('json-schema-traverse');
+
+module.exports = resolve;
+
+resolve.normalizeId = normalizeId;
+resolve.fullPath = getFullPath;
+resolve.url = resolveUrl;
+resolve.ids = resolveIds;
+resolve.inlineRef = inlineRef;
+resolve.schema = resolveSchema;
+
+/**
+ * [resolve and compile the references ($ref)]
+ * @this   Ajv
+ * @param  {Function} compile reference to schema compilation funciton (localCompile)
+ * @param  {Object} root object with information about the root schema for the current schema
+ * @param  {String} ref reference to resolve
+ * @return {Object|Function} schema object (if the schema can be inlined) or validation function
+ */
+function resolve(compile, root, ref) {
+  /* jshint validthis: true */
+  var refVal = this._refs[ref];
+  if (typeof refVal == 'string') {
+    if (this._refs[refVal]) refVal = this._refs[refVal];
+    else return resolve.call(this, compile, root, refVal);
+  }
+
+  refVal = refVal || this._schemas[ref];
+  if (refVal instanceof SchemaObject) {
+    return inlineRef(refVal.schema, this._opts.inlineRefs)
+            ? refVal.schema
+            : refVal.validate || this._compile(refVal);
+  }
+
+  var res = resolveSchema.call(this, root, ref);
+  var schema, v, baseId;
+  if (res) {
+    schema = res.schema;
+    root = res.root;
+    baseId = res.baseId;
+  }
+
+  if (schema instanceof SchemaObject) {
+    v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
+  } else if (schema !== undefined) {
+    v = inlineRef(schema, this._opts.inlineRefs)
+        ? schema
+        : compile.call(this, schema, root, undefined, baseId);
+  }
+
+  return v;
+}
+
+
+/**
+ * Resolve schema, its root and baseId
+ * @this Ajv
+ * @param  {Object} root root object with properties schema, refVal, refs
+ * @param  {String} ref  reference to resolve
+ * @return {Object} object with properties schema, root, baseId
+ */
+function resolveSchema(root, ref) {
+  /* jshint validthis: true */
+  var p = URI.parse(ref)
+    , refPath = _getFullPath(p)
+    , baseId = getFullPath(this._getId(root.schema));
+  if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
+    var id = normalizeId(refPath);
+    var refVal = this._refs[id];
+    if (typeof refVal == 'string') {
+      return resolveRecursive.call(this, root, refVal, p);
+    } else if (refVal instanceof SchemaObject) {
+      if (!refVal.validate) this._compile(refVal);
+      root = refVal;
+    } else {
+      refVal = this._schemas[id];
+      if (refVal instanceof SchemaObject) {
+        if (!refVal.validate) this._compile(refVal);
+        if (id == normalizeId(ref))
+          return { schema: refVal, root: root, baseId: baseId };
+        root = refVal;
+      } else {
+        return;
+      }
+    }
+    if (!root.schema) return;
+    baseId = getFullPath(this._getId(root.schema));
+  }
+  return getJsonPointer.call(this, p, baseId, root.schema, root);
+}
+
+
+/* @this Ajv */
+function resolveRecursive(root, ref, parsedRef) {
+  /* jshint validthis: true */
+  var res = resolveSchema.call(this, root, ref);
+  if (res) {
+    var schema = res.schema;
+    var baseId = res.baseId;
+    root = res.root;
+    var id = this._getId(schema);
+    if (id) baseId = resolveUrl(baseId, id);
+    return getJsonPointer.call(this, parsedRef, baseId, schema, root);
+  }
+}
+
+
+var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
+/* @this Ajv */
+function getJsonPointer(parsedRef, baseId, schema, root) {
+  /* jshint validthis: true */
+  parsedRef.fragment = parsedRef.fragment || '';
+  if (parsedRef.fragment.slice(0,1) != '/') return;
+  var parts = parsedRef.fragment.split('/');
+
+  for (var i = 1; i < parts.length; i++) {
+    var part = parts[i];
+    if (part) {
+      part = util.unescapeFragment(part);
+      schema = schema[part];
+      if (schema === undefined) break;
+      var id;
+      if (!PREVENT_SCOPE_CHANGE[part]) {
+        id = this._getId(schema);
+        if (id) baseId = resolveUrl(baseId, id);
+        if (schema.$ref) {
+          var $ref = resolveUrl(baseId, schema.$ref);
+          var res = resolveSchema.call(this, root, $ref);
+          if (res) {
+            schema = res.schema;
+            root = res.root;
+            baseId = res.baseId;
+          }
+        }
+      }
+    }
+  }
+  if (schema !== undefined && schema !== root.schema)
+    return { schema: schema, root: root, baseId: baseId };
+}
+
+
+var SIMPLE_INLINED = util.toHash([
+  'type', 'format', 'pattern',
+  'maxLength', 'minLength',
+  'maxProperties', 'minProperties',
+  'maxItems', 'minItems',
+  'maximum', 'minimum',
+  'uniqueItems', 'multipleOf',
+  'required', 'enum'
+]);
+function inlineRef(schema, limit) {
+  if (limit === false) return false;
+  if (limit === undefined || limit === true) return checkNoRef(schema);
+  else if (limit) return countKeys(schema) <= limit;
+}
+
+
+function checkNoRef(schema) {
+  var item;
+  if (Array.isArray(schema)) {
+    for (var i=0; i<schema.length; i++) {
+      item = schema[i];
+      if (typeof item == 'object' && !checkNoRef(item)) return false;
+    }
+  } else {
+    for (var key in schema) {
+      if (key == '$ref') return false;
+      item = schema[key];
+      if (typeof item == 'object' && !checkNoRef(item)) return false;
+    }
+  }
+  return true;
+}
+
+
+function countKeys(schema) {
+  var count = 0, item;
+  if (Array.isArray(schema)) {
+    for (var i=0; i<schema.length; i++) {
+      item = schema[i];
+      if (typeof item == 'object') count += countKeys(item);
+      if (count == Infinity) return Infinity;
+    }
+  } else {
+    for (var key in schema) {
+      if (key == '$ref') return Infinity;
+      if (SIMPLE_INLINED[key]) {
+        count++;
+      } else {
+        item = schema[key];
+        if (typeof item == 'object') count += countKeys(item) + 1;
+        if (count == Infinity) return Infinity;
+      }
+    }
+  }
+  return count;
+}
+
+
+function getFullPath(id, normalize) {
+  if (normalize !== false) id = normalizeId(id);
+  var p = URI.parse(id);
+  return _getFullPath(p);
+}
+
+
+function _getFullPath(p) {
+  return URI.serialize(p).split('#')[0] + '#';
+}
+
+
+var TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+  return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
+}
+
+
+function resolveUrl(baseId, id) {
+  id = normalizeId(id);
+  return URI.resolve(baseId, id);
+}
+
+
+/* @this Ajv */
+function resolveIds(schema) {
+  var schemaId = normalizeId(this._getId(schema));
+  var baseIds = {'': schemaId};
+  var fullPaths = {'': getFullPath(schemaId, false)};
+  var localRefs = {};
+  var self = this;
+
+  traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+    if (jsonPtr === '') return;
+    var id = self._getId(sch);
+    var baseId = baseIds[parentJsonPtr];
+    var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
+    if (keyIndex !== undefined)
+      fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
+
+    if (typeof id == 'string') {
+      id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id);
+
+      var refVal = self._refs[id];
+      if (typeof refVal == 'string') refVal = self._refs[refVal];
+      if (refVal && refVal.schema) {
+        if (!equal(sch, refVal.schema))
+          throw new Error('id "' + id + '" resolves to more than one schema');
+      } else if (id != normalizeId(fullPath)) {
+        if (id[0] == '#') {
+          if (localRefs[id] && !equal(sch, localRefs[id]))
+            throw new Error('id "' + id + '" resolves to more than one schema');
+          localRefs[id] = sch;
+        } else {
+          self._refs[id] = fullPath;
+        }
+      }
+    }
+    baseIds[jsonPtr] = baseId;
+    fullPaths[jsonPtr] = fullPath;
+  });
+
+  return localRefs;
+}

+ 66 - 0
back/node_modules/ajv/lib/compile/rules.js

@@ -0,0 +1,66 @@
+'use strict';
+
+var ruleModules = require('../dotjs')
+  , toHash = require('./util').toHash;
+
+module.exports = function rules() {
+  var RULES = [
+    { type: 'number',
+      rules: [ { 'maximum': ['exclusiveMaximum'] },
+               { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
+    { type: 'string',
+      rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
+    { type: 'array',
+      rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] },
+    { type: 'object',
+      rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
+               { 'properties': ['additionalProperties', 'patternProperties'] } ] },
+    { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] }
+  ];
+
+  var ALL = [ 'type', '$comment' ];
+  var KEYWORDS = [
+    '$schema', '$id', 'id', '$data', '$async', 'title',
+    'description', 'default', 'definitions',
+    'examples', 'readOnly', 'writeOnly',
+    'contentMediaType', 'contentEncoding',
+    'additionalItems', 'then', 'else'
+  ];
+  var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
+  RULES.all = toHash(ALL);
+  RULES.types = toHash(TYPES);
+
+  RULES.forEach(function (group) {
+    group.rules = group.rules.map(function (keyword) {
+      var implKeywords;
+      if (typeof keyword == 'object') {
+        var key = Object.keys(keyword)[0];
+        implKeywords = keyword[key];
+        keyword = key;
+        implKeywords.forEach(function (k) {
+          ALL.push(k);
+          RULES.all[k] = true;
+        });
+      }
+      ALL.push(keyword);
+      var rule = RULES.all[keyword] = {
+        keyword: keyword,
+        code: ruleModules[keyword],
+        implements: implKeywords
+      };
+      return rule;
+    });
+
+    RULES.all.$comment = {
+      keyword: '$comment',
+      code: ruleModules.$comment
+    };
+
+    if (group.type) RULES.types[group.type] = group;
+  });
+
+  RULES.keywords = toHash(ALL.concat(KEYWORDS));
+  RULES.custom = {};
+
+  return RULES;
+};

+ 9 - 0
back/node_modules/ajv/lib/compile/schema_obj.js

@@ -0,0 +1,9 @@
+'use strict';
+
+var util = require('./util');
+
+module.exports = SchemaObject;
+
+function SchemaObject(obj) {
+  util.copy(obj, this);
+}

+ 20 - 0
back/node_modules/ajv/lib/compile/ucs2length.js

@@ -0,0 +1,20 @@
+'use strict';
+
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+module.exports = function ucs2length(str) {
+  var length = 0
+    , len = str.length
+    , pos = 0
+    , value;
+  while (pos < len) {
+    length++;
+    value = str.charCodeAt(pos++);
+    if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
+      // high surrogate, and there is a next character
+      value = str.charCodeAt(pos);
+      if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
+    }
+  }
+  return length;
+};

+ 239 - 0
back/node_modules/ajv/lib/compile/util.js

@@ -0,0 +1,239 @@
+'use strict';
+
+
+module.exports = {
+  copy: copy,
+  checkDataType: checkDataType,
+  checkDataTypes: checkDataTypes,
+  coerceToTypes: coerceToTypes,
+  toHash: toHash,
+  getProperty: getProperty,
+  escapeQuotes: escapeQuotes,
+  equal: require('fast-deep-equal'),
+  ucs2length: require('./ucs2length'),
+  varOccurences: varOccurences,
+  varReplace: varReplace,
+  schemaHasRules: schemaHasRules,
+  schemaHasRulesExcept: schemaHasRulesExcept,
+  schemaUnknownRules: schemaUnknownRules,
+  toQuotedString: toQuotedString,
+  getPathExpr: getPathExpr,
+  getPath: getPath,
+  getData: getData,
+  unescapeFragment: unescapeFragment,
+  unescapeJsonPointer: unescapeJsonPointer,
+  escapeFragment: escapeFragment,
+  escapeJsonPointer: escapeJsonPointer
+};
+
+
+function copy(o, to) {
+  to = to || {};
+  for (var key in o) to[key] = o[key];
+  return to;
+}
+
+
+function checkDataType(dataType, data, strictNumbers, negate) {
+  var EQUAL = negate ? ' !== ' : ' === '
+    , AND = negate ? ' || ' : ' && '
+    , OK = negate ? '!' : ''
+    , NOT = negate ? '' : '!';
+  switch (dataType) {
+    case 'null': return data + EQUAL + 'null';
+    case 'array': return OK + 'Array.isArray(' + data + ')';
+    case 'object': return '(' + OK + data + AND +
+                          'typeof ' + data + EQUAL + '"object"' + AND +
+                          NOT + 'Array.isArray(' + data + '))';
+    case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
+                           NOT + '(' + data + ' % 1)' +
+                           AND + data + EQUAL + data +
+                           (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+    case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' +
+                          (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+    default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+  }
+}
+
+
+function checkDataTypes(dataTypes, data, strictNumbers) {
+  switch (dataTypes.length) {
+    case 1: return checkDataType(dataTypes[0], data, strictNumbers, true);
+    default:
+      var code = '';
+      var types = toHash(dataTypes);
+      if (types.array && types.object) {
+        code = types.null ? '(': '(!' + data + ' || ';
+        code += 'typeof ' + data + ' !== "object")';
+        delete types.null;
+        delete types.array;
+        delete types.object;
+      }
+      if (types.number) delete types.integer;
+      for (var t in types)
+        code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true);
+
+      return code;
+  }
+}
+
+
+var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
+function coerceToTypes(optionCoerceTypes, dataTypes) {
+  if (Array.isArray(dataTypes)) {
+    var types = [];
+    for (var i=0; i<dataTypes.length; i++) {
+      var t = dataTypes[i];
+      if (COERCE_TO_TYPES[t]) types[types.length] = t;
+      else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
+    }
+    if (types.length) return types;
+  } else if (COERCE_TO_TYPES[dataTypes]) {
+    return [dataTypes];
+  } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
+    return ['array'];
+  }
+}
+
+
+function toHash(arr) {
+  var hash = {};
+  for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
+  return hash;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+  return typeof key == 'number'
+          ? '[' + key + ']'
+          : IDENTIFIER.test(key)
+            ? '.' + key
+            : "['" + escapeQuotes(key) + "']";
+}
+
+
+function escapeQuotes(str) {
+  return str.replace(SINGLE_QUOTE, '\\$&')
+            .replace(/\n/g, '\\n')
+            .replace(/\r/g, '\\r')
+            .replace(/\f/g, '\\f')
+            .replace(/\t/g, '\\t');
+}
+
+
+function varOccurences(str, dataVar) {
+  dataVar += '[^0-9]';
+  var matches = str.match(new RegExp(dataVar, 'g'));
+  return matches ? matches.length : 0;
+}
+
+
+function varReplace(str, dataVar, expr) {
+  dataVar += '([^0-9])';
+  expr = expr.replace(/\$/g, '$$$$');
+  return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
+}
+
+
+function schemaHasRules(schema, rules) {
+  if (typeof schema == 'boolean') return !schema;
+  for (var key in schema) if (rules[key]) return true;
+}
+
+
+function schemaHasRulesExcept(schema, rules, exceptKeyword) {
+  if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
+  for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
+}
+
+
+function schemaUnknownRules(schema, rules) {
+  if (typeof schema == 'boolean') return;
+  for (var key in schema) if (!rules[key]) return key;
+}
+
+
+function toQuotedString(str) {
+  return '\'' + escapeQuotes(str) + '\'';
+}
+
+
+function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
+  var path = jsonPointers // false by default
+              ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
+              : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
+  return joinPaths(currentPath, path);
+}
+
+
+function getPath(currentPath, prop, jsonPointers) {
+  var path = jsonPointers // false by default
+              ? toQuotedString('/' + escapeJsonPointer(prop))
+              : toQuotedString(getProperty(prop));
+  return joinPaths(currentPath, path);
+}
+
+
+var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, lvl, paths) {
+  var up, jsonPointer, data, matches;
+  if ($data === '') return 'rootData';
+  if ($data[0] == '/') {
+    if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
+    jsonPointer = $data;
+    data = 'rootData';
+  } else {
+    matches = $data.match(RELATIVE_JSON_POINTER);
+    if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
+    up = +matches[1];
+    jsonPointer = matches[2];
+    if (jsonPointer == '#') {
+      if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
+      return paths[lvl - up];
+    }
+
+    if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
+    data = 'data' + ((lvl - up) || '');
+    if (!jsonPointer) return data;
+  }
+
+  var expr = data;
+  var segments = jsonPointer.split('/');
+  for (var i=0; i<segments.length; i++) {
+    var segment = segments[i];
+    if (segment) {
+      data += getProperty(unescapeJsonPointer(segment));
+      expr += ' && ' + data;
+    }
+  }
+  return expr;
+}
+
+
+function joinPaths (a, b) {
+  if (a == '""') return b;
+  return (a + ' + ' + b).replace(/([^\\])' \+ '/g, '$1');
+}
+
+
+function unescapeFragment(str) {
+  return unescapeJsonPointer(decodeURIComponent(str));
+}
+
+
+function escapeFragment(str) {
+  return encodeURIComponent(escapeJsonPointer(str));
+}
+
+
+function escapeJsonPointer(str) {
+  return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+
+function unescapeJsonPointer(str) {
+  return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}

+ 49 - 0
back/node_modules/ajv/lib/data.js

@@ -0,0 +1,49 @@
+'use strict';
+
+var KEYWORDS = [
+  'multipleOf',
+  'maximum',
+  'exclusiveMaximum',
+  'minimum',
+  'exclusiveMinimum',
+  'maxLength',
+  'minLength',
+  'pattern',
+  'additionalItems',
+  'maxItems',
+  'minItems',
+  'uniqueItems',
+  'maxProperties',
+  'minProperties',
+  'required',
+  'additionalProperties',
+  'enum',
+  'format',
+  'const'
+];
+
+module.exports = function (metaSchema, keywordsJsonPointers) {
+  for (var i=0; i<keywordsJsonPointers.length; i++) {
+    metaSchema = JSON.parse(JSON.stringify(metaSchema));
+    var segments = keywordsJsonPointers[i].split('/');
+    var keywords = metaSchema;
+    var j;
+    for (j=1; j<segments.length; j++)
+      keywords = keywords[segments[j]];
+
+    for (j=0; j<KEYWORDS.length; j++) {
+      var key = KEYWORDS[j];
+      var schema = keywords[key];
+      if (schema) {
+        keywords[key] = {
+          anyOf: [
+            schema,
+            { $ref: 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' }
+          ]
+        };
+      }
+    }
+  }
+
+  return metaSchema;
+};

+ 37 - 0
back/node_modules/ajv/lib/definition_schema.js

@@ -0,0 +1,37 @@
+'use strict';
+
+var metaSchema = require('./refs/json-schema-draft-07.json');
+
+module.exports = {
+  $id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js',
+  definitions: {
+    simpleTypes: metaSchema.definitions.simpleTypes
+  },
+  type: 'object',
+  dependencies: {
+    schema: ['validate'],
+    $data: ['validate'],
+    statements: ['inline'],
+    valid: {not: {required: ['macro']}}
+  },
+  properties: {
+    type: metaSchema.properties.type,
+    schema: {type: 'boolean'},
+    statements: {type: 'boolean'},
+    dependencies: {
+      type: 'array',
+      items: {type: 'string'}
+    },
+    metaSchema: {type: 'object'},
+    modifying: {type: 'boolean'},
+    valid: {type: 'boolean'},
+    $data: {type: 'boolean'},
+    async: {type: 'boolean'},
+    errors: {
+      anyOf: [
+        {type: 'boolean'},
+        {const: 'full'}
+      ]
+    }
+  }
+};

+ 113 - 0
back/node_modules/ajv/lib/dot/_limit.jst

@@ -0,0 +1,113 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{## def.setExclusiveLimit:
+  $exclusive = true;
+  $errorKeyword = $exclusiveKeyword;
+  $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+#}}
+
+{{
+  var $isMax = $keyword == 'maximum'
+    , $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
+    , $schemaExcl = it.schema[$exclusiveKeyword]
+    , $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data
+    , $op = $isMax ? '<' : '>'
+    , $notOp = $isMax ? '>' : '<'
+    , $errorKeyword = undefined;
+
+  if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
+    throw new Error($keyword + ' must be number');
+  }
+  if (!($isDataExcl || $schemaExcl === undefined
+                    || typeof $schemaExcl == 'number'
+                    || typeof $schemaExcl == 'boolean')) {
+    throw new Error($exclusiveKeyword + ' must be number or boolean');
+  }
+}}
+
+{{? $isDataExcl }}
+  {{
+    var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
+      , $exclusive = 'exclusive' + $lvl
+      , $exclType = 'exclType' + $lvl
+      , $exclIsNumber = 'exclIsNumber' + $lvl
+      , $opExpr = 'op' + $lvl
+      , $opStr = '\' + ' + $opExpr + ' + \'';
+  }}
+  var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
+  {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
+
+  var {{=$exclusive}};
+  var {{=$exclType}} = typeof {{=$schemaValueExcl}};
+  if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') {
+    {{ var $errorKeyword = $exclusiveKeyword; }}
+    {{# def.error:'_exclusiveLimit' }}
+  } else if ({{# def.$dataNotType:'number' }}
+            {{=$exclType}} == 'number'
+              ? (
+                  ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}})
+                    ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}}
+                    : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+                )
+              : (
+                  ({{=$exclusive}} = {{=$schemaValueExcl}} === true)
+                    ? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
+                    : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+                )
+            || {{=$data}} !== {{=$data}}) {
+    var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
+    {{
+      if ($schema === undefined) {
+        $errorKeyword = $exclusiveKeyword;
+        $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+        $schemaValue = $schemaValueExcl;
+        $isData = $isDataExcl;
+      }
+    }}
+{{??}}
+  {{
+    var $exclIsNumber = typeof $schemaExcl == 'number'
+      , $opStr = $op;  /*used in error*/
+  }}
+
+  {{? $exclIsNumber && $isData }}
+    {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }}
+    if ({{# def.$dataNotType:'number' }}
+        ( {{=$schemaValue}} === undefined
+          || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}}
+            ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}}
+            : {{=$data}} {{=$notOp}} {{=$schemaValue}} )
+        || {{=$data}} !== {{=$data}}) {
+  {{??}}
+    {{
+      if ($exclIsNumber && $schema === undefined) {
+          {{# def.setExclusiveLimit }}
+          $schemaValue = $schemaExcl;
+          $notOp += '=';
+      } else {
+        if ($exclIsNumber)
+          $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+
+        if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+          {{# def.setExclusiveLimit }}
+          $notOp += '=';
+        } else {
+          $exclusive = false;
+          $opStr += '=';
+        }
+      }
+
+      var $opExpr = '\'' + $opStr + '\''; /*used in error*/
+    }}
+
+    if ({{# def.$dataNotType:'number' }}
+        {{=$data}} {{=$notOp}} {{=$schemaValue}}
+        || {{=$data}} !== {{=$data}}) {
+  {{?}}
+{{?}}
+    {{ $errorKeyword = $errorKeyword || $keyword; }}
+    {{# def.error:'_limit' }}
+  } {{? $breakOnError }} else { {{?}}

+ 12 - 0
back/node_modules/ajv/lib/dot/_limitItems.jst

@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) {
+  {{ var $errorKeyword = $keyword; }}
+  {{# def.error:'_limitItems' }}
+} {{? $breakOnError }} else { {{?}}

+ 12 - 0
back/node_modules/ajv/lib/dot/_limitLength.jst

@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) {
+  {{ var $errorKeyword = $keyword; }}
+  {{# def.error:'_limitLength' }}
+} {{? $breakOnError }} else { {{?}}

+ 12 - 0
back/node_modules/ajv/lib/dot/_limitProperties.jst

@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) {
+  {{ var $errorKeyword = $keyword; }}
+  {{# def.error:'_limitProperties' }}
+} {{? $breakOnError }} else { {{?}}

+ 32 - 0
back/node_modules/ajv/lib/dot/allOf.jst

@@ -0,0 +1,32 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+  var $currentBaseId = $it.baseId
+    , $allSchemasEmpty = true;
+}}
+
+{{~ $schema:$sch:$i }}
+  {{? {{# def.nonEmptySchema:$sch }} }}
+    {{
+      $allSchemasEmpty = false;
+      $it.schema = $sch;
+      $it.schemaPath = $schemaPath + '[' + $i + ']';
+      $it.errSchemaPath = $errSchemaPath + '/' + $i;
+    }}
+
+    {{# def.insertSubschemaCode }}
+
+    {{# def.ifResultValid }}
+  {{?}}
+{{~}}
+
+{{? $breakOnError }}
+  {{? $allSchemasEmpty }}
+    if (true) {
+  {{??}}
+    {{= $closingBraces.slice(0,-1) }}
+  {{?}}
+{{?}}

+ 46 - 0
back/node_modules/ajv/lib/dot/anyOf.jst

@@ -0,0 +1,46 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+  var $noEmptySchema = $schema.every(function($sch) {
+    return {{# def.nonEmptySchema:$sch }};
+  });
+}}
+{{? $noEmptySchema }}
+  {{ var $currentBaseId = $it.baseId; }}
+  var {{=$errs}} = errors;
+  var {{=$valid}} = false;
+
+  {{# def.setCompositeRule }}
+
+  {{~ $schema:$sch:$i }}
+    {{
+      $it.schema = $sch;
+      $it.schemaPath = $schemaPath + '[' + $i + ']';
+      $it.errSchemaPath = $errSchemaPath + '/' + $i;
+    }}
+
+    {{# def.insertSubschemaCode }}
+
+    {{=$valid}} = {{=$valid}} || {{=$nextValid}};
+
+    if (!{{=$valid}}) {
+    {{ $closingBraces += '}'; }}
+  {{~}}
+
+  {{# def.resetCompositeRule }}
+
+  {{= $closingBraces }}
+
+  if (!{{=$valid}}) {
+    {{# def.extraError:'anyOf' }}
+  } else {
+    {{# def.resetErrors }}
+  {{? it.opts.allErrors }} } {{?}}
+{{??}}
+  {{? $breakOnError }}
+    if (true) {
+  {{?}}
+{{?}}

+ 61 - 0
back/node_modules/ajv/lib/dot/coerce.def

@@ -0,0 +1,61 @@
+{{## def.coerceType:
+  {{
+    var $dataType = 'dataType' + $lvl
+      , $coerced = 'coerced' + $lvl;
+  }}
+  var {{=$dataType}} = typeof {{=$data}};
+  {{? it.opts.coerceTypes == 'array'}}
+    if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';
+  {{?}}
+
+  var {{=$coerced}} = undefined;
+
+  {{ var $bracesCoercion = ''; }}
+  {{~ $coerceToTypes:$type:$i }}
+    {{? $i }}
+      if ({{=$coerced}} === undefined) {
+      {{ $bracesCoercion += '}'; }}
+    {{?}}
+
+    {{? it.opts.coerceTypes == 'array' && $type != 'array' }}
+      if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) {
+        {{=$coerced}} = {{=$data}} = {{=$data}}[0];
+        {{=$dataType}} = typeof {{=$data}};
+        /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/
+      }
+    {{?}}
+
+    {{? $type == 'string' }}
+      if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean')
+        {{=$coerced}} = '' + {{=$data}};
+      else if ({{=$data}} === null) {{=$coerced}} = '';
+    {{?? $type == 'number' || $type == 'integer' }}
+      if ({{=$dataType}} == 'boolean' || {{=$data}} === null
+          || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}}
+          {{? $type == 'integer' }} && !({{=$data}} % 1){{?}}))
+        {{=$coerced}} = +{{=$data}};
+    {{?? $type == 'boolean' }}
+      if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null)
+        {{=$coerced}} = false;
+      else if ({{=$data}} === 'true' || {{=$data}} === 1)
+        {{=$coerced}} = true;
+    {{?? $type == 'null' }}
+      if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false)
+        {{=$coerced}} = null;
+    {{?? it.opts.coerceTypes == 'array' && $type == 'array' }}
+      if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null)
+        {{=$coerced}} = [{{=$data}}];
+    {{?}}
+  {{~}}
+
+  {{= $bracesCoercion }}
+
+  if ({{=$coerced}} === undefined) {
+    {{# def.error:'type' }}
+  } else {
+    {{# def.setParentData }}
+    {{=$data}} = {{=$coerced}};
+    {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}}
+      {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}};
+  }
+#}}

+ 9 - 0
back/node_modules/ajv/lib/dot/comment.jst

@@ -0,0 +1,9 @@
+{{# def.definitions }}
+{{# def.setupKeyword }}
+
+{{ var $comment = it.util.toQuotedString($schema); }}
+{{? it.opts.$comment === true }}
+  console.log({{=$comment}});
+{{?? typeof it.opts.$comment == 'function' }}
+  self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema);
+{{?}}

+ 11 - 0
back/node_modules/ajv/lib/dot/const.jst

@@ -0,0 +1,11 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{? !$isData }}
+  var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
+{{# def.checkError:'const' }}
+{{? $breakOnError }} else { {{?}}

+ 55 - 0
back/node_modules/ajv/lib/dot/contains.jst

@@ -0,0 +1,55 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{
+  var $idx = 'i' + $lvl
+    , $dataNxt = $it.dataLevel = it.dataLevel + 1
+    , $nextData = 'data' + $dataNxt
+    , $currentBaseId = it.baseId
+    , $nonEmptySchema = {{# def.nonEmptySchema:$schema }};
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? $nonEmptySchema }}
+  {{# def.setCompositeRule }}
+
+  {{
+    $it.schema = $schema;
+    $it.schemaPath = $schemaPath;
+    $it.errSchemaPath = $errSchemaPath;
+  }}
+
+  var {{=$nextValid}} = false;
+
+  for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
+    {{
+      $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+      var $passData = $data + '[' + $idx + ']';
+      $it.dataPathArr[$dataNxt] = $idx;
+    }}
+
+    {{# def.generateSubschemaCode }}
+    {{# def.optimizeValidate }}
+
+    if ({{=$nextValid}}) break;
+  }
+
+  {{# def.resetCompositeRule }}
+  {{= $closingBraces }}
+
+  if (!{{=$nextValid}}) {
+{{??}}
+  if ({{=$data}}.length == 0) {
+{{?}}
+
+    {{# def.error:'contains' }}
+  } else {
+    {{? $nonEmptySchema }}
+      {{# def.resetErrors }}
+    {{?}}
+  {{? it.opts.allErrors }} } {{?}}

+ 191 - 0
back/node_modules/ajv/lib/dot/custom.jst

@@ -0,0 +1,191 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+  var $rule = this
+    , $definition = 'definition' + $lvl
+    , $rDef = $rule.definition
+    , $closingBraces = '';
+  var $validate = $rDef.validate;
+  var $compile, $inline, $macro, $ruleValidate, $validateCode;
+}}
+
+{{? $isData && $rDef.$data }}
+  {{
+    $validateCode = 'keywordValidate' + $lvl;
+    var $validateSchema = $rDef.validateSchema;
+  }}
+  var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition;
+  var {{=$validateCode}} = {{=$definition}}.validate;
+{{??}}
+  {{
+    $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+    if (!$ruleValidate) return;
+    $schemaValue = 'validate.schema' + $schemaPath;
+    $validateCode = $ruleValidate.code;
+    $compile = $rDef.compile;
+    $inline = $rDef.inline;
+    $macro = $rDef.macro;
+  }}
+{{?}}
+
+{{
+  var $ruleErrs = $validateCode + '.errors'
+    , $i = 'i' + $lvl
+    , $ruleErr = 'ruleErr' + $lvl
+    , $asyncKeyword = $rDef.async;
+
+  if ($asyncKeyword && !it.async)
+    throw new Error('async keyword in sync schema');
+}}
+
+
+{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}}
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{## def.callRuleValidate:
+  {{=$validateCode}}.call(
+    {{? it.opts.passContext }}this{{??}}self{{?}}
+    {{? $compile || $rDef.schema === false }}
+      , {{=$data}}
+    {{??}}
+      , {{=$schemaValue}}
+      , {{=$data}}
+      , validate.schema{{=it.schemaPath}}
+    {{?}}
+    , {{# def.dataPath }}
+    {{# def.passParentData }}
+    , rootData
+  )
+#}}
+
+{{## def.extendErrors:_inline:
+  for (var {{=$i}}={{=$errs}}; {{=$i}}<errors; {{=$i}}++) {
+    var {{=$ruleErr}} = vErrors[{{=$i}}];
+    if ({{=$ruleErr}}.dataPath === undefined)
+      {{=$ruleErr}}.dataPath = (dataPath || '') + {{= it.errorPath }};
+    {{# _inline ? 'if (\{\{=$ruleErr\}\}.schemaPath === undefined) {' : '' }}
+      {{=$ruleErr}}.schemaPath = "{{=$errSchemaPath}}";
+    {{# _inline ? '}' : '' }}
+    {{? it.opts.verbose }}
+      {{=$ruleErr}}.schema = {{=$schemaValue}};
+      {{=$ruleErr}}.data = {{=$data}};
+    {{?}}
+  }
+#}}
+
+
+{{? $isData && $rDef.$data }}
+  {{ $closingBraces += '}'; }}
+  if ({{=$schemaValue}} === undefined) {
+    {{=$valid}} = true;
+  } else {
+  {{? $validateSchema }}
+    {{ $closingBraces += '}'; }}
+    {{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
+    if ({{=$valid}}) {
+  {{?}}
+{{?}}
+
+{{? $inline }}
+  {{? $rDef.statements }}
+    {{= $ruleValidate.validate }}
+  {{??}}
+    {{=$valid}} = {{= $ruleValidate.validate }};
+  {{?}}
+{{?? $macro }}
+  {{# def.setupNextLevel }}
+  {{
+    $it.schema = $ruleValidate.validate;
+    $it.schemaPath = '';
+  }}
+  {{# def.setCompositeRule }}
+  {{ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); }}
+  {{# def.resetCompositeRule }}
+  {{= $code }}
+{{??}}
+  {{# def.beginDefOut}}
+    {{# def.callRuleValidate }}
+  {{# def.storeDefOut:def_callRuleValidate }}
+
+  {{? $rDef.errors === false }}
+    {{=$valid}} = {{? $asyncKeyword }}await {{?}}{{= def_callRuleValidate }};
+  {{??}}
+    {{? $asyncKeyword }}
+      {{ $ruleErrs = 'customErrors' + $lvl; }}
+      var {{=$ruleErrs}} = null;
+      try {
+        {{=$valid}} = await {{= def_callRuleValidate }};
+      } catch (e) {
+        {{=$valid}} = false;
+        if (e instanceof ValidationError) {{=$ruleErrs}} = e.errors;
+        else throw e;
+      }
+    {{??}}
+      {{=$ruleErrs}} = null;
+      {{=$valid}} = {{= def_callRuleValidate }};
+    {{?}}
+  {{?}}
+{{?}}
+
+{{? $rDef.modifying }}
+  if ({{=$parentData}}) {{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
+{{?}}
+
+{{= $closingBraces }}
+
+{{## def.notValidationResult:
+  {{? $rDef.valid === undefined }}
+    !{{? $macro }}{{=$nextValid}}{{??}}{{=$valid}}{{?}}
+  {{??}}
+    {{= !$rDef.valid }}
+  {{?}}
+#}}
+
+{{? $rDef.valid }}
+  {{? $breakOnError }} if (true) { {{?}}
+{{??}}
+  if ({{# def.notValidationResult }}) {
+    {{ $errorKeyword = $rule.keyword; }}
+    {{# def.beginDefOut}}
+      {{# def.error:'custom' }}
+    {{# def.storeDefOut:def_customError }}
+
+    {{? $inline }}
+      {{? $rDef.errors }}
+        {{? $rDef.errors != 'full' }}
+          {{# def.extendErrors:true }}
+        {{?}}
+      {{??}}
+        {{? $rDef.errors === false}}
+          {{= def_customError }}
+        {{??}}
+          if ({{=$errs}} == errors) {
+            {{= def_customError }}
+          } else {
+            {{# def.extendErrors:true }}
+          }
+        {{?}}
+      {{?}}
+    {{?? $macro }}
+      {{# def.extraError:'custom' }}
+    {{??}}
+      {{? $rDef.errors === false}}
+        {{= def_customError }}
+      {{??}}
+        if (Array.isArray({{=$ruleErrs}})) {
+          if (vErrors === null) vErrors = {{=$ruleErrs}};
+          else vErrors = vErrors.concat({{=$ruleErrs}});
+          errors = vErrors.length;
+          {{# def.extendErrors:false }}
+        } else {
+          {{= def_customError }}
+        }
+      {{?}}
+    {{?}}
+
+  } {{? $breakOnError }} else { {{?}}
+{{?}}

+ 47 - 0
back/node_modules/ajv/lib/dot/defaults.def

@@ -0,0 +1,47 @@
+{{## def.assignDefault:
+  {{? it.compositeRule }}
+    {{
+      if (it.opts.strictDefaults) {
+        var $defaultMsg = 'default is ignored for: ' + $passData;
+        if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+        else throw new Error($defaultMsg);
+      }
+    }}
+  {{??}}
+    if ({{=$passData}} === undefined
+      {{? it.opts.useDefaults == 'empty' }}
+        || {{=$passData}} === null
+        || {{=$passData}} === ''
+      {{?}}
+    )
+      {{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
+                         {{= it.useDefault($sch.default) }}
+                       {{??}}
+                         {{= JSON.stringify($sch.default) }}
+                       {{?}};
+  {{?}}
+#}}
+
+
+{{## def.defaultProperties:
+  {{
+    var $schema = it.schema.properties
+      , $schemaKeys = Object.keys($schema); }}
+  {{~ $schemaKeys:$propertyKey }}
+    {{ var $sch = $schema[$propertyKey]; }}
+    {{? $sch.default !== undefined }}
+      {{ var $passData = $data + it.util.getProperty($propertyKey); }}
+      {{# def.assignDefault }}
+    {{?}}
+  {{~}}
+#}}
+
+
+{{## def.defaultItems:
+  {{~ it.schema.items:$sch:$i }}
+    {{? $sch.default !== undefined }}
+      {{ var $passData = $data + '[' + $i + ']'; }}
+      {{# def.assignDefault }}
+    {{?}}
+  {{~}}
+#}}

+ 202 - 0
back/node_modules/ajv/lib/dot/definitions.def

@@ -0,0 +1,202 @@
+{{## def.setupKeyword:
+  {{
+    var $lvl = it.level;
+    var $dataLvl = it.dataLevel;
+    var $schema = it.schema[$keyword];
+    var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+    var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+    var $breakOnError = !it.opts.allErrors;
+    var $errorKeyword;
+
+    var $data = 'data' + ($dataLvl || '');
+    var $valid = 'valid' + $lvl;
+    var $errs = 'errs__' + $lvl;
+  }}
+#}}
+
+
+{{## def.setCompositeRule:
+  {{
+    var $wasComposite = it.compositeRule;
+    it.compositeRule = $it.compositeRule = true;
+  }}
+#}}
+
+
+{{## def.resetCompositeRule:
+  {{ it.compositeRule = $it.compositeRule = $wasComposite; }}
+#}}
+
+
+{{## def.setupNextLevel:
+  {{
+    var $it = it.util.copy(it);
+    var $closingBraces = '';
+    $it.level++;
+    var $nextValid = 'valid' + $it.level;
+  }}
+#}}
+
+
+{{## def.ifValid:
+  {{? $breakOnError }}
+    if ({{=$valid}}) {
+    {{ $closingBraces += '}'; }}
+  {{?}}
+#}}
+
+
+{{## def.ifResultValid:
+  {{? $breakOnError }}
+    if ({{=$nextValid}}) {
+    {{ $closingBraces += '}'; }}
+  {{?}}
+#}}
+
+
+{{## def.elseIfValid:
+  {{? $breakOnError }}
+    {{ $closingBraces += '}'; }}
+    else {
+  {{?}}
+#}}
+
+
+{{## def.nonEmptySchema:_schema:
+  (it.opts.strictKeywords
+    ? typeof _schema == 'object' && Object.keys(_schema).length > 0
+    : it.util.schemaHasRules(_schema, it.RULES.all))
+#}}
+
+
+{{## def.strLength:
+  {{? it.opts.unicode === false }}
+    {{=$data}}.length
+  {{??}}
+    ucs2length({{=$data}})
+  {{?}}
+#}}
+
+
+{{## def.willOptimize:
+  it.util.varOccurences($code, $nextData) < 2
+#}}
+
+
+{{## def.generateSubschemaCode:
+  {{
+    var $code = it.validate($it);
+    $it.baseId = $currentBaseId;
+  }}
+#}}
+
+
+{{## def.insertSubschemaCode:
+  {{= it.validate($it) }}
+  {{ $it.baseId = $currentBaseId; }}
+#}}
+
+
+{{## def._optimizeValidate:
+  it.util.varReplace($code, $nextData, $passData)
+#}}
+
+
+{{## def.optimizeValidate:
+  {{? {{# def.willOptimize}} }}
+    {{= {{# def._optimizeValidate }} }}
+  {{??}}
+    var {{=$nextData}} = {{=$passData}};
+    {{= $code }}
+  {{?}}
+#}}
+
+
+{{## def.$data:
+  {{
+    var $isData = it.opts.$data && $schema && $schema.$data
+      , $schemaValue;
+  }}
+  {{? $isData }}
+    var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }};
+    {{ $schemaValue = 'schema' + $lvl; }}
+  {{??}}
+    {{ $schemaValue = $schema; }}
+  {{?}}
+#}}
+
+
+{{## def.$dataNotType:_type:
+  {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}}
+#}}
+
+
+{{## def.check$dataIsArray:
+  if (schema{{=$lvl}} === undefined) {{=$valid}} = true;
+  else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false;
+  else {
+#}}
+
+
+{{## def.numberKeyword:
+  {{? !($isData || typeof $schema == 'number') }}
+    {{ throw new Error($keyword + ' must be number'); }}
+  {{?}}
+#}}
+
+
+{{## def.beginDefOut:
+  {{
+    var $$outStack = $$outStack || [];
+    $$outStack.push(out);
+    out = '';
+  }}
+#}}
+
+
+{{## def.storeDefOut:_variable:
+  {{
+    var _variable = out;
+    out = $$outStack.pop();
+  }}
+#}}
+
+
+{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}}
+
+{{## def.setParentData:
+  {{
+    var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData'
+      , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+  }}
+#}}
+
+{{## def.passParentData:
+  {{# def.setParentData }}
+  , {{= $parentData }}
+  , {{= $parentDataProperty }}
+#}}
+
+
+{{## def.iterateProperties:
+  {{? $ownProperties }}
+    {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}});
+    for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) {
+      var {{=$key}} = {{=$dataProperties}}[{{=$idx}}];
+  {{??}}
+    for (var {{=$key}} in {{=$data}}) {
+  {{?}}
+#}}
+
+
+{{## def.noPropertyInData:
+  {{=$useData}} === undefined
+  {{? $ownProperties }}
+    || !{{# def.isOwnProperty }}
+  {{?}}
+#}}
+
+
+{{## def.isOwnProperty:
+  Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}')
+#}}

+ 79 - 0
back/node_modules/ajv/lib/dot/dependencies.jst

@@ -0,0 +1,79 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.propertyInData:
+  {{=$data}}{{= it.util.getProperty($property) }} !== undefined
+  {{? $ownProperties }}
+    && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}')
+  {{?}}
+#}}
+
+
+{{
+  var $schemaDeps = {}
+    , $propertyDeps = {}
+    , $ownProperties = it.opts.ownProperties;
+
+  for ($property in $schema) {
+    if ($property == '__proto__') continue;
+    var $sch = $schema[$property];
+    var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+    $deps[$property] = $sch;
+  }
+}}
+
+var {{=$errs}} = errors;
+
+{{ var $currentErrorPath = it.errorPath; }}
+
+var missing{{=$lvl}};
+{{ for (var $property in $propertyDeps) { }}
+  {{ $deps = $propertyDeps[$property]; }}
+  {{? $deps.length }}
+    if ({{# def.propertyInData }}
+      {{? $breakOnError }}
+          && ({{# def.checkMissingProperty:$deps }})) {
+          {{# def.errorMissingProperty:'dependencies' }}
+      {{??}}
+        ) {
+          {{~ $deps:$propertyKey }}
+            {{# def.allErrorsMissingProperty:'dependencies' }}
+          {{~}}
+      {{?}}
+    } {{# def.elseIfValid }}
+  {{?}}
+{{ } }}
+
+{{
+  it.errorPath = $currentErrorPath;
+  var $currentBaseId = $it.baseId;
+}}
+
+
+{{ for (var $property in $schemaDeps) { }}
+  {{ var $sch = $schemaDeps[$property]; }}
+  {{? {{# def.nonEmptySchema:$sch }} }}
+    {{=$nextValid}} = true;
+
+    if ({{# def.propertyInData }}) {
+      {{ 
+        $it.schema = $sch;
+        $it.schemaPath = $schemaPath + it.util.getProperty($property);
+        $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+      }}
+
+      {{# def.insertSubschemaCode }}
+    }
+
+    {{# def.ifResultValid }}
+  {{?}}
+{{ } }}
+
+{{? $breakOnError }} 
+  {{= $closingBraces }}
+  if ({{=$errs}} == errors) {
+{{?}}

+ 30 - 0
back/node_modules/ajv/lib/dot/enum.jst

@@ -0,0 +1,30 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+  var $i = 'i' + $lvl
+    , $vSchema = 'schema' + $lvl;
+}}
+
+{{? !$isData }}
+  var {{=$vSchema}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}};
+
+{{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+{{=$valid}} = false;
+
+for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++)
+  if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) {
+    {{=$valid}} = true;
+    break;
+  }
+
+{{? $isData }}  }  {{?}}
+
+{{# def.checkError:'enum' }}
+
+{{? $breakOnError }} else { {{?}}

+ 194 - 0
back/node_modules/ajv/lib/dot/errors.def

@@ -0,0 +1,194 @@
+{{# def.definitions }}
+
+{{## def._error:_rule:
+  {{ 'istanbul ignore else'; }}
+  {{? it.createErrors !== false }}
+    {
+      keyword: '{{= $errorKeyword || _rule }}'
+      , dataPath: (dataPath || '') + {{= it.errorPath }}
+      , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}}
+      , params: {{# def._errorParams[_rule] }}
+      {{? it.opts.messages !== false }}
+        , message: {{# def._errorMessages[_rule] }}
+      {{?}}
+      {{? it.opts.verbose }}
+        , schema: {{# def._errorSchemas[_rule] }}
+        , parentSchema: validate.schema{{=it.schemaPath}}
+        , data: {{=$data}}
+      {{?}}
+    }
+  {{??}}
+    {}
+  {{?}}
+#}}
+
+
+{{## def._addError:_rule:
+  if (vErrors === null) vErrors = [err];
+  else vErrors.push(err);
+  errors++;
+#}}
+
+
+{{## def.addError:_rule:
+  var err = {{# def._error:_rule }};
+  {{# def._addError:_rule }}
+#}}
+
+
+{{## def.error:_rule:
+  {{# def.beginDefOut}}
+    {{# def._error:_rule }}
+  {{# def.storeDefOut:__err }}
+
+  {{? !it.compositeRule && $breakOnError }}
+    {{ 'istanbul ignore if'; }}
+    {{? it.async }}
+      throw new ValidationError([{{=__err}}]);
+    {{??}}
+      validate.errors = [{{=__err}}];
+      return false;
+    {{?}}
+  {{??}}
+    var err = {{=__err}};
+    {{# def._addError:_rule }}
+  {{?}}
+#}}
+
+
+{{## def.extraError:_rule:
+  {{# def.addError:_rule}}
+  {{? !it.compositeRule && $breakOnError }}
+    {{ 'istanbul ignore if'; }}
+    {{? it.async }}
+      throw new ValidationError(vErrors);
+    {{??}}
+      validate.errors = vErrors;
+      return false;
+    {{?}}
+  {{?}}
+#}}
+
+
+{{## def.checkError:_rule:
+  if (!{{=$valid}}) {
+    {{# def.error:_rule }}
+  }
+#}}
+
+
+{{## def.resetErrors:
+  errors = {{=$errs}};
+  if (vErrors !== null) {
+    if ({{=$errs}}) vErrors.length = {{=$errs}};
+    else vErrors = null;
+  }
+#}}
+
+
+{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
+{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}}
+{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
+
+{{## def._errorMessages = {
+  'false schema':  "'boolean schema is false'",
+  $ref:            "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
+  additionalItems: "'should NOT have more than {{=$schema.length}} items'",
+  additionalProperties: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}should NOT have additional properties{{?}}'",
+  anyOf:           "'should match some schema in anyOf'",
+  const:           "'should be equal to constant'",
+  contains:        "'should contain a valid item'",
+  dependencies:    "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
+  'enum':          "'should be equal to one of the allowed values'",
+  format:          "'should match format \"{{#def.concatSchemaEQ}}\"'",
+  'if':            "'should match \"' + {{=$ifClause}} + '\" schema'",
+  _limit:          "'should be {{=$opStr}} {{#def.appendSchema}}",
+  _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
+  _limitItems:     "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'",
+  _limitLength:    "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
+  _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} properties'",
+  multipleOf:      "'should be multiple of {{#def.appendSchema}}",
+  not:             "'should NOT be valid'",
+  oneOf:           "'should match exactly one schema in oneOf'",
+  pattern:         "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
+  propertyNames:   "'property name \\'{{=$invalidName}}\\' is invalid'",
+  required:        "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'",
+  type:            "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'",
+  uniqueItems:     "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'",
+  custom:          "'should pass \"{{=$rule.keyword}}\" keyword validation'",
+  patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
+  switch:          "'should pass \"switch\" keyword validation'",
+  _formatLimit:    "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'",
+  _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'"
+} #}}
+
+
+{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}}
+{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorSchemas = {
+  'false schema':  "false",
+  $ref:            "{{=it.util.toQuotedString($schema)}}",
+  additionalItems: "false",
+  additionalProperties: "false",
+  anyOf:           "validate.schema{{=$schemaPath}}",
+  const:           "validate.schema{{=$schemaPath}}",
+  contains:        "validate.schema{{=$schemaPath}}",
+  dependencies:    "validate.schema{{=$schemaPath}}",
+  'enum':          "validate.schema{{=$schemaPath}}",
+  format:          "{{#def.schemaRefOrQS}}",
+  'if':            "validate.schema{{=$schemaPath}}",
+  _limit:          "{{#def.schemaRefOrVal}}",
+  _exclusiveLimit: "validate.schema{{=$schemaPath}}",
+  _limitItems:     "{{#def.schemaRefOrVal}}",
+  _limitLength:    "{{#def.schemaRefOrVal}}",
+  _limitProperties:"{{#def.schemaRefOrVal}}",
+  multipleOf:      "{{#def.schemaRefOrVal}}",
+  not:             "validate.schema{{=$schemaPath}}",
+  oneOf:           "validate.schema{{=$schemaPath}}",
+  pattern:         "{{#def.schemaRefOrQS}}",
+  propertyNames:   "validate.schema{{=$schemaPath}}",
+  required:        "validate.schema{{=$schemaPath}}",
+  type:            "validate.schema{{=$schemaPath}}",
+  uniqueItems:     "{{#def.schemaRefOrVal}}",
+  custom:          "validate.schema{{=$schemaPath}}",
+  patternRequired: "validate.schema{{=$schemaPath}}",
+  switch:          "validate.schema{{=$schemaPath}}",
+  _formatLimit:    "{{#def.schemaRefOrQS}}",
+  _formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
+} #}}
+
+
+{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorParams = {
+  'false schema':  "{}",
+  $ref:            "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
+  additionalItems: "{ limit: {{=$schema.length}} }",
+  additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
+  anyOf:           "{}",
+  const:           "{ allowedValue: schema{{=$lvl}} }",
+  contains:        "{}",
+  dependencies:    "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
+  'enum':          "{ allowedValues: schema{{=$lvl}} }",
+  format:          "{ format: {{#def.schemaValueQS}} }",
+  'if':            "{ failingKeyword: {{=$ifClause}} }",
+  _limit:          "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
+  _exclusiveLimit: "{}",
+  _limitItems:     "{ limit: {{=$schemaValue}} }",
+  _limitLength:    "{ limit: {{=$schemaValue}} }",
+  _limitProperties:"{ limit: {{=$schemaValue}} }",
+  multipleOf:      "{ multipleOf: {{=$schemaValue}} }",
+  not:             "{}",
+  oneOf:           "{ passingSchemas: {{=$passingSchemas}} }",
+  pattern:         "{ pattern: {{#def.schemaValueQS}} }",
+  propertyNames:   "{ propertyName: '{{=$invalidName}}' }",
+  required:        "{ missingProperty: '{{=$missingProperty}}' }",
+  type:            "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
+  uniqueItems:     "{ i: i, j: j }",
+  custom:          "{ keyword: '{{=$rule.keyword}}' }",
+  patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
+  switch:          "{ caseIndex: {{=$caseIndex}} }",
+  _formatLimit:    "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
+  _formatExclusiveLimit: "{}"
+} #}}

+ 106 - 0
back/node_modules/ajv/lib/dot/format.jst

@@ -0,0 +1,106 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def.skipFormat:
+  {{? $breakOnError }} if (true) { {{?}}
+  {{ return out; }}
+#}}
+
+{{? it.opts.format === false }}{{# def.skipFormat }}{{?}}
+
+
+{{# def.$data }}
+
+
+{{## def.$dataCheckFormat:
+  {{# def.$dataNotType:'string' }}
+  ({{? $unknownFormats != 'ignore' }}
+     ({{=$schemaValue}} && !{{=$format}}
+      {{? $allowUnknown }}
+        && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
+      {{?}}) ||
+   {{?}}
+   ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}'
+                 && !(typeof {{=$format}} == 'function'
+                     ? {{? it.async}}
+                        (async{{=$lvl}} ? await {{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
+                       {{??}}
+                        {{=$format}}({{=$data}})
+                       {{?}}
+                     : {{=$format}}.test({{=$data}}))))
+#}}
+
+{{## def.checkFormat:
+  {{
+    var $formatRef = 'formats' + it.util.getProperty($schema);
+    if ($isObject) $formatRef += '.validate';
+  }}
+  {{? typeof $format == 'function' }}
+    {{=$formatRef}}({{=$data}})
+  {{??}}
+    {{=$formatRef}}.test({{=$data}})
+  {{?}}
+#}}
+
+
+{{
+  var $unknownFormats = it.opts.unknownFormats
+    , $allowUnknown = Array.isArray($unknownFormats);
+}}
+
+{{? $isData }}
+  {{
+    var $format = 'format' + $lvl
+      , $isObject = 'isObject' + $lvl
+      , $formatType = 'formatType' + $lvl;
+  }}
+  var {{=$format}} = formats[{{=$schemaValue}}];
+  var {{=$isObject}} = typeof {{=$format}} == 'object'
+                        && !({{=$format}} instanceof RegExp)
+                        && {{=$format}}.validate;
+  var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string';
+  if ({{=$isObject}}) {
+    {{? it.async}}
+      var async{{=$lvl}} = {{=$format}}.async;
+    {{?}}
+    {{=$format}} = {{=$format}}.validate;
+  }
+  if ({{# def.$dataCheckFormat }}) {
+{{??}}
+  {{ var $format = it.formats[$schema]; }}
+  {{? !$format }}
+    {{? $unknownFormats == 'ignore' }}
+      {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
+      {{# def.skipFormat }}
+    {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }}
+      {{# def.skipFormat }}
+    {{??}}
+      {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
+    {{?}}
+  {{?}}
+  {{
+    var $isObject = typeof $format == 'object'
+                    && !($format instanceof RegExp)
+                    && $format.validate;
+    var $formatType = $isObject && $format.type || 'string';
+    if ($isObject) {
+      var $async = $format.async === true;
+      $format = $format.validate;
+    }
+  }}
+  {{? $formatType != $ruleType }}
+    {{# def.skipFormat }}
+  {{?}}
+  {{? $async }}
+    {{
+      if (!it.async) throw new Error('async format in sync schema');
+      var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+    }}
+    if (!(await {{=$formatRef}}({{=$data}}))) {
+  {{??}}
+    if (!{{# def.checkFormat }}) {
+  {{?}}
+{{?}}
+    {{# def.error:'format' }}
+  } {{? $breakOnError }} else { {{?}}

+ 73 - 0
back/node_modules/ajv/lib/dot/if.jst

@@ -0,0 +1,73 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateIfClause:_clause:
+  {{
+    $it.schema = it.schema['_clause'];
+    $it.schemaPath = it.schemaPath + '._clause';
+    $it.errSchemaPath = it.errSchemaPath + '/_clause';
+  }}
+  {{# def.insertSubschemaCode }}
+  {{=$valid}} = {{=$nextValid}};
+  {{? $thenPresent && $elsePresent }}
+    {{ $ifClause = 'ifClause' + $lvl; }}
+    var {{=$ifClause}} = '_clause';
+  {{??}}
+    {{ $ifClause = '\'_clause\''; }}
+  {{?}}
+#}}
+
+{{
+  var $thenSch = it.schema['then']
+    , $elseSch = it.schema['else']
+    , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }}
+    , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }}
+    , $currentBaseId = $it.baseId;
+}}
+
+{{? $thenPresent || $elsePresent }}
+  {{
+    var $ifClause;
+    $it.createErrors = false;
+    $it.schema = $schema;
+    $it.schemaPath = $schemaPath;
+    $it.errSchemaPath = $errSchemaPath;
+  }}
+  var {{=$errs}} = errors;
+  var {{=$valid}} = true;
+
+  {{# def.setCompositeRule }}
+  {{# def.insertSubschemaCode }}
+  {{ $it.createErrors = true; }}
+  {{# def.resetErrors }}
+  {{# def.resetCompositeRule }}
+
+  {{? $thenPresent }}
+    if ({{=$nextValid}}) {
+      {{# def.validateIfClause:then }}
+    }
+    {{? $elsePresent }}
+      else {
+    {{?}}
+  {{??}}
+    if (!{{=$nextValid}}) {
+  {{?}}
+
+  {{? $elsePresent }}
+      {{# def.validateIfClause:else }}
+    }
+  {{?}}
+
+  if (!{{=$valid}}) {
+    {{# def.extraError:'if' }}
+  } 
+  {{? $breakOnError }} else { {{?}}
+{{??}}
+  {{? $breakOnError }}
+    if (true) {
+  {{?}}
+{{?}}
+

+ 98 - 0
back/node_modules/ajv/lib/dot/items.jst

@@ -0,0 +1,98 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateItems:startFrom:
+  for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
+    {{
+      $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+      var $passData = $data + '[' + $idx + ']';
+      $it.dataPathArr[$dataNxt] = $idx;
+    }}
+
+    {{# def.generateSubschemaCode }}
+    {{# def.optimizeValidate }}
+
+    {{? $breakOnError }}
+      if (!{{=$nextValid}}) break;
+    {{?}}
+  }
+#}}
+
+{{
+  var $idx = 'i' + $lvl
+    , $dataNxt = $it.dataLevel = it.dataLevel + 1
+    , $nextData = 'data' + $dataNxt
+    , $currentBaseId = it.baseId;
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? Array.isArray($schema) }}
+  {{ /* 'items' is an array of schemas */}}
+  {{ var $additionalItems = it.schema.additionalItems; }}
+  {{? $additionalItems === false }}
+    {{=$valid}} = {{=$data}}.length <= {{= $schema.length }};
+    {{
+      var $currErrSchemaPath = $errSchemaPath;
+      $errSchemaPath = it.errSchemaPath + '/additionalItems';      
+    }}
+    {{# def.checkError:'additionalItems' }}
+    {{ $errSchemaPath = $currErrSchemaPath; }}
+    {{# def.elseIfValid}}
+  {{?}}
+
+  {{~ $schema:$sch:$i }}
+    {{? {{# def.nonEmptySchema:$sch }} }}
+      {{=$nextValid}} = true;
+
+      if ({{=$data}}.length > {{=$i}}) {
+        {{
+          var $passData = $data + '[' + $i + ']';
+          $it.schema = $sch;
+          $it.schemaPath = $schemaPath + '[' + $i + ']';
+          $it.errSchemaPath = $errSchemaPath + '/' + $i;
+          $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+          $it.dataPathArr[$dataNxt] = $i;
+        }}
+
+        {{# def.generateSubschemaCode }}
+        {{# def.optimizeValidate }}
+      }
+
+      {{# def.ifResultValid }}
+    {{?}}
+  {{~}}
+
+  {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }}
+    {{
+      $it.schema = $additionalItems;
+      $it.schemaPath = it.schemaPath + '.additionalItems';
+      $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+    }}
+    {{=$nextValid}} = true;
+
+    if ({{=$data}}.length > {{= $schema.length }}) {
+      {{# def.validateItems: $schema.length }}
+    }
+
+    {{# def.ifResultValid }}
+  {{?}}
+
+{{?? {{# def.nonEmptySchema:$schema }} }}
+  {{ /* 'items' is a single schema */}}
+  {{
+    $it.schema = $schema;
+    $it.schemaPath = $schemaPath;
+    $it.errSchemaPath = $errSchemaPath;
+  }}
+  {{# def.validateItems: 0 }}
+{{?}}
+
+{{? $breakOnError }}
+  {{= $closingBraces }}
+  if ({{=$errs}} == errors) {
+{{?}}

+ 39 - 0
back/node_modules/ajv/lib/dot/missing.def

@@ -0,0 +1,39 @@
+{{## def.checkMissingProperty:_properties:
+  {{~ _properties:$propertyKey:$i }}
+    {{?$i}} || {{?}}
+    {{
+      var $prop = it.util.getProperty($propertyKey)
+        , $useData = $data + $prop;
+    }}
+    ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
+  {{~}}
+#}}
+
+
+{{## def.errorMissingProperty:_error:
+  {{
+    var $propertyPath = 'missing' + $lvl
+      , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+    if (it.opts._errorDataPathProperty) {
+      it.errorPath = it.opts.jsonPointers
+                      ? it.util.getPathExpr($currentErrorPath,  $propertyPath, true)
+                      : $currentErrorPath + ' + ' + $propertyPath;
+    }
+  }}
+  {{# def.error:_error }}
+#}}
+
+
+{{## def.allErrorsMissingProperty:_error:
+  {{
+    var $prop = it.util.getProperty($propertyKey)
+      , $missingProperty = it.util.escapeQuotes($propertyKey)
+      , $useData = $data + $prop;
+    if (it.opts._errorDataPathProperty) {
+      it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+    }
+  }}
+  if ({{# def.noPropertyInData }}) {
+    {{# def.addError:_error }}
+  }
+#}}

+ 22 - 0
back/node_modules/ajv/lib/dot/multipleOf.jst

@@ -0,0 +1,22 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+var division{{=$lvl}};
+if ({{?$isData}}
+      {{=$schemaValue}} !== undefined && (
+      typeof {{=$schemaValue}} != 'number' ||
+    {{?}}
+      (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
+      {{? it.opts.multipleOfPrecision }}
+        Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
+      {{??}}
+        division{{=$lvl}} !== parseInt(division{{=$lvl}})
+      {{?}}
+      )
+    {{?$isData}}  )  {{?}} ) {
+  {{# def.error:'multipleOf' }}
+} {{? $breakOnError }} else { {{?}}

+ 43 - 0
back/node_modules/ajv/lib/dot/not.jst

@@ -0,0 +1,43 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+  {{
+    $it.schema = $schema;
+    $it.schemaPath = $schemaPath;
+    $it.errSchemaPath = $errSchemaPath;
+  }}
+
+  var {{=$errs}} = errors;
+
+  {{# def.setCompositeRule }}
+
+  {{
+    $it.createErrors = false;
+    var $allErrorsOption;
+    if ($it.opts.allErrors) {
+      $allErrorsOption = $it.opts.allErrors;
+      $it.opts.allErrors = false;
+    }
+  }}
+  {{= it.validate($it) }}
+  {{
+    $it.createErrors = true;
+    if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+  }}
+
+  {{# def.resetCompositeRule }}
+
+  if ({{=$nextValid}}) {
+    {{# def.error:'not' }}
+  } else {
+    {{# def.resetErrors }}
+  {{? it.opts.allErrors }} } {{?}}
+{{??}}
+  {{# def.addError:'not' }}
+  {{? $breakOnError}}
+    if (false) {
+  {{?}}
+{{?}}

+ 54 - 0
back/node_modules/ajv/lib/dot/oneOf.jst

@@ -0,0 +1,54 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+  var $currentBaseId = $it.baseId
+    , $prevValid = 'prevValid' + $lvl
+    , $passingSchemas = 'passingSchemas' + $lvl;
+}}
+
+var {{=$errs}} = errors
+  , {{=$prevValid}} = false
+  , {{=$valid}} = false
+  , {{=$passingSchemas}} = null;
+
+{{# def.setCompositeRule }}
+
+{{~ $schema:$sch:$i }}
+  {{? {{# def.nonEmptySchema:$sch }} }}
+    {{
+      $it.schema = $sch;
+      $it.schemaPath = $schemaPath + '[' + $i + ']';
+      $it.errSchemaPath = $errSchemaPath + '/' + $i;
+    }}
+
+    {{# def.insertSubschemaCode }}
+  {{??}}
+    var {{=$nextValid}} = true;
+  {{?}}
+
+  {{? $i }}
+    if ({{=$nextValid}} && {{=$prevValid}}) {
+      {{=$valid}} = false;
+      {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}];
+    } else {
+    {{ $closingBraces += '}'; }}
+  {{?}}
+
+    if ({{=$nextValid}}) {
+      {{=$valid}} = {{=$prevValid}} = true;
+      {{=$passingSchemas}} = {{=$i}};
+    }
+{{~}}
+
+{{# def.resetCompositeRule }}
+
+{{= $closingBraces }}
+
+if (!{{=$valid}}) {
+  {{# def.extraError:'oneOf' }}
+} else {
+  {{# def.resetErrors }}
+{{? it.opts.allErrors }} } {{?}}

+ 14 - 0
back/node_modules/ajv/lib/dot/pattern.jst

@@ -0,0 +1,14 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+  var $regexp = $isData
+                ? '(new RegExp(' + $schemaValue + '))'
+                : it.usePattern($schema);
+}}
+
+if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
+  {{# def.error:'pattern' }}
+} {{? $breakOnError }} else { {{?}}

+ 245 - 0
back/node_modules/ajv/lib/dot/properties.jst

@@ -0,0 +1,245 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateAdditional:
+  {{ /* additionalProperties is schema */
+    $it.schema = $aProperties;
+    $it.schemaPath = it.schemaPath + '.additionalProperties';
+    $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+    $it.errorPath = it.opts._errorDataPathProperty
+                    ? it.errorPath
+                    : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+    var $passData = $data + '[' + $key + ']';
+    $it.dataPathArr[$dataNxt] = $key;
+  }}
+
+  {{# def.generateSubschemaCode }}
+  {{# def.optimizeValidate }}
+#}}
+
+
+{{
+  var $key = 'key' + $lvl
+    , $idx = 'idx' + $lvl
+    , $dataNxt = $it.dataLevel = it.dataLevel + 1
+    , $nextData = 'data' + $dataNxt
+    , $dataProperties = 'dataProperties' + $lvl;
+
+  var $schemaKeys = Object.keys($schema || {}).filter(notProto)
+    , $pProperties = it.schema.patternProperties || {}
+    , $pPropertyKeys = Object.keys($pProperties).filter(notProto)
+    , $aProperties = it.schema.additionalProperties
+    , $someProperties = $schemaKeys.length || $pPropertyKeys.length
+    , $noAdditional = $aProperties === false
+    , $additionalIsSchema = typeof $aProperties == 'object'
+                              && Object.keys($aProperties).length
+    , $removeAdditional = it.opts.removeAdditional
+    , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional
+    , $ownProperties = it.opts.ownProperties
+    , $currentBaseId = it.baseId;
+
+  var $required = it.schema.required;
+  if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {
+    var $requiredHash = it.util.toHash($required);
+  }
+
+  function notProto(p) { return p !== '__proto__'; }
+}}
+
+
+var {{=$errs}} = errors;
+var {{=$nextValid}} = true;
+{{? $ownProperties }}
+  var {{=$dataProperties}} = undefined;
+{{?}}
+
+{{? $checkAdditional }}
+  {{# def.iterateProperties }}
+    {{? $someProperties }}
+      var isAdditional{{=$lvl}} = !(false
+        {{? $schemaKeys.length }}
+          {{? $schemaKeys.length > 8 }}
+            || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}})
+          {{??}}
+            {{~ $schemaKeys:$propertyKey }}
+              || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }}
+            {{~}}
+          {{?}}
+        {{?}}
+        {{? $pPropertyKeys.length }}
+          {{~ $pPropertyKeys:$pProperty:$i }}
+            || {{= it.usePattern($pProperty) }}.test({{=$key}})
+          {{~}}
+        {{?}}
+      );
+
+      if (isAdditional{{=$lvl}}) {
+    {{?}}
+    {{? $removeAdditional == 'all' }}
+      delete {{=$data}}[{{=$key}}];
+    {{??}}
+      {{
+        var $currentErrorPath = it.errorPath;
+        var $additionalProperty = '\' + ' + $key + ' + \'';
+        if (it.opts._errorDataPathProperty) {
+          it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+        }
+      }}
+      {{? $noAdditional }}
+        {{? $removeAdditional }}
+          delete {{=$data}}[{{=$key}}];
+        {{??}}
+          {{=$nextValid}} = false;
+          {{
+            var $currErrSchemaPath = $errSchemaPath;
+            $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+          }}
+          {{# def.error:'additionalProperties' }}
+          {{ $errSchemaPath = $currErrSchemaPath; }}
+          {{? $breakOnError }} break; {{?}}
+        {{?}}
+      {{?? $additionalIsSchema }}
+        {{? $removeAdditional == 'failing' }}
+          var {{=$errs}} = errors;
+          {{# def.setCompositeRule }}
+
+          {{# def.validateAdditional }}
+
+          if (!{{=$nextValid}}) {
+            errors = {{=$errs}};
+            if (validate.errors !== null) {
+              if (errors) validate.errors.length = errors;
+              else validate.errors = null;
+            }
+            delete {{=$data}}[{{=$key}}];
+          }
+
+          {{# def.resetCompositeRule }}
+        {{??}}
+          {{# def.validateAdditional }}
+          {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
+        {{?}}
+      {{?}}
+      {{ it.errorPath = $currentErrorPath; }}
+    {{?}}
+    {{? $someProperties }}
+      }
+    {{?}}
+  }
+
+  {{# def.ifResultValid }}
+{{?}}
+
+{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }}
+
+{{? $schemaKeys.length }}
+  {{~ $schemaKeys:$propertyKey }}
+    {{ var $sch = $schema[$propertyKey]; }}
+
+    {{? {{# def.nonEmptySchema:$sch}} }}
+      {{
+        var $prop = it.util.getProperty($propertyKey)
+          , $passData = $data + $prop
+          , $hasDefault = $useDefaults && $sch.default !== undefined;
+        $it.schema = $sch;
+        $it.schemaPath = $schemaPath + $prop;
+        $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+        $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+        $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+      }}
+
+      {{# def.generateSubschemaCode }}
+
+      {{? {{# def.willOptimize }} }}
+        {{
+          $code = {{# def._optimizeValidate }};
+          var $useData = $passData;
+        }}
+      {{??}}
+        {{ var $useData = $nextData; }}
+        var {{=$nextData}} = {{=$passData}};
+      {{?}}
+
+      {{? $hasDefault }}
+        {{= $code }}
+      {{??}}
+        {{? $requiredHash && $requiredHash[$propertyKey] }}
+          if ({{# def.noPropertyInData }}) {
+            {{=$nextValid}} = false;
+            {{
+              var $currentErrorPath = it.errorPath
+                , $currErrSchemaPath = $errSchemaPath
+                , $missingProperty = it.util.escapeQuotes($propertyKey);
+              if (it.opts._errorDataPathProperty) {
+                it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+              }
+              $errSchemaPath = it.errSchemaPath + '/required';
+            }}
+            {{# def.error:'required' }}
+            {{ $errSchemaPath = $currErrSchemaPath; }}
+            {{ it.errorPath = $currentErrorPath; }}
+          } else {
+        {{??}}
+          {{? $breakOnError }}
+            if ({{# def.noPropertyInData }}) {
+              {{=$nextValid}} = true;
+            } else {
+          {{??}}
+            if ({{=$useData}} !== undefined
+              {{? $ownProperties }}
+                && {{# def.isOwnProperty }}
+              {{?}}
+            ) {
+          {{?}}
+        {{?}}
+
+          {{= $code }}
+        }
+      {{?}}  {{ /* $hasDefault */ }}
+    {{?}} {{ /* def.nonEmptySchema */ }}
+
+    {{# def.ifResultValid }}
+  {{~}}
+{{?}}
+
+{{? $pPropertyKeys.length }}
+  {{~ $pPropertyKeys:$pProperty }}
+    {{ var $sch = $pProperties[$pProperty]; }}
+
+    {{? {{# def.nonEmptySchema:$sch}} }}
+      {{
+        $it.schema = $sch;
+        $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+        $it.errSchemaPath = it.errSchemaPath + '/patternProperties/'
+                                             + it.util.escapeFragment($pProperty);
+      }}
+
+      {{# def.iterateProperties }}
+        if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
+          {{
+            $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+            var $passData = $data + '[' + $key + ']';
+            $it.dataPathArr[$dataNxt] = $key;
+          }}
+
+          {{# def.generateSubschemaCode }}
+          {{# def.optimizeValidate }}
+
+          {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
+        }
+        {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
+      }
+
+      {{# def.ifResultValid }}
+    {{?}} {{ /* def.nonEmptySchema */ }}
+  {{~}}
+{{?}}
+
+
+{{? $breakOnError }}
+  {{= $closingBraces }}
+  if ({{=$errs}} == errors) {
+{{?}}

+ 52 - 0
back/node_modules/ajv/lib/dot/propertyNames.jst

@@ -0,0 +1,52 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+var {{=$errs}} = errors;
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+  {{
+    $it.schema = $schema;
+    $it.schemaPath = $schemaPath;
+    $it.errSchemaPath = $errSchemaPath;
+  }}
+
+  {{
+    var $key = 'key' + $lvl
+      , $idx = 'idx' + $lvl
+      , $i = 'i' + $lvl
+      , $invalidName = '\' + ' + $key + ' + \''
+      , $dataNxt = $it.dataLevel = it.dataLevel + 1
+      , $nextData = 'data' + $dataNxt
+      , $dataProperties = 'dataProperties' + $lvl
+      , $ownProperties = it.opts.ownProperties
+      , $currentBaseId = it.baseId;
+  }}
+
+  {{? $ownProperties }}
+    var {{=$dataProperties}} = undefined;
+  {{?}}
+  {{# def.iterateProperties }}
+    var startErrs{{=$lvl}} = errors;
+
+    {{ var $passData = $key; }}
+    {{# def.setCompositeRule }}
+    {{# def.generateSubschemaCode }}
+    {{# def.optimizeValidate }}
+    {{# def.resetCompositeRule }}
+
+    if (!{{=$nextValid}}) {
+      for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}<errors; {{=$i}}++) {
+        vErrors[{{=$i}}].propertyName = {{=$key}};
+      }
+      {{# def.extraError:'propertyNames' }}
+      {{? $breakOnError }} break; {{?}}
+    }
+  }
+{{?}}
+
+{{? $breakOnError }}
+  {{= $closingBraces }}
+  if ({{=$errs}} == errors) {
+{{?}}

+ 85 - 0
back/node_modules/ajv/lib/dot/ref.jst

@@ -0,0 +1,85 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def._validateRef:_v:
+  {{? it.opts.passContext }}
+    {{=_v}}.call(this,
+  {{??}}
+    {{=_v}}(
+  {{?}}
+    {{=$data}}, {{# def.dataPath }}{{# def.passParentData }}, rootData)
+#}}
+
+{{ var $async, $refCode; }}
+{{? $schema == '#' || $schema == '#/' }}
+  {{
+    if (it.isRoot) {
+      $async = it.async;
+      $refCode = 'validate';
+    } else {
+      $async = it.root.schema.$async === true;
+      $refCode = 'root.refVal[0]';
+    }
+  }}
+{{??}}
+  {{ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); }}
+  {{? $refVal === undefined }}
+    {{ var $message = it.MissingRefError.message(it.baseId, $schema); }}
+    {{? it.opts.missingRefs == 'fail' }}
+      {{ it.logger.error($message); }}
+      {{# def.error:'$ref' }}
+      {{? $breakOnError }} if (false) { {{?}}
+    {{?? it.opts.missingRefs == 'ignore' }}
+      {{ it.logger.warn($message); }}
+      {{? $breakOnError }} if (true) { {{?}}
+    {{??}}
+      {{ throw new it.MissingRefError(it.baseId, $schema, $message); }}
+    {{?}}
+  {{?? $refVal.inline }}
+    {{# def.setupNextLevel }}
+    {{
+      $it.schema = $refVal.schema;
+      $it.schemaPath = '';
+      $it.errSchemaPath = $schema;
+    }}
+    {{ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); }}
+    {{= $code }}
+    {{? $breakOnError}}
+      if ({{=$nextValid}}) {
+    {{?}}
+  {{??}}
+    {{
+      $async = $refVal.$async === true || (it.async && $refVal.$async !== false);
+      $refCode = $refVal.code;
+    }}
+  {{?}}
+{{?}}
+
+{{? $refCode }}
+  {{# def.beginDefOut}}
+    {{# def._validateRef:$refCode }}
+  {{# def.storeDefOut:__callValidate }}
+
+  {{? $async }}
+    {{ if (!it.async) throw new Error('async schema referenced by sync schema'); }}
+    {{? $breakOnError }} var {{=$valid}}; {{?}}
+    try {
+      await {{=__callValidate}};
+      {{? $breakOnError }} {{=$valid}} = true; {{?}}
+    } catch (e) {
+      if (!(e instanceof ValidationError)) throw e;
+      if (vErrors === null) vErrors = e.errors;
+      else vErrors = vErrors.concat(e.errors);
+      errors = vErrors.length;
+      {{? $breakOnError }} {{=$valid}} = false; {{?}}
+    }
+    {{? $breakOnError }} if ({{=$valid}}) { {{?}}
+  {{??}}
+    if (!{{=__callValidate}}) {
+      if (vErrors === null) vErrors = {{=$refCode}}.errors;
+      else vErrors = vErrors.concat({{=$refCode}}.errors);
+      errors = vErrors.length;
+    } {{? $breakOnError }} else { {{?}}
+  {{?}}
+{{?}}

+ 108 - 0
back/node_modules/ajv/lib/dot/required.jst

@@ -0,0 +1,108 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $vSchema = 'schema' + $lvl; }}
+
+{{## def.setupLoop:
+  {{? !$isData }}
+    var {{=$vSchema}} = validate.schema{{=$schemaPath}};
+  {{?}}
+
+  {{
+    var $i = 'i' + $lvl
+      , $propertyPath = 'schema' + $lvl + '[' + $i + ']'
+      , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+    if (it.opts._errorDataPathProperty) {
+      it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+    }
+  }}
+#}}
+
+
+{{## def.isRequiredOwnProperty:
+  Object.prototype.hasOwnProperty.call({{=$data}}, {{=$vSchema}}[{{=$i}}])
+#}}
+
+
+{{? !$isData }}
+  {{? $schema.length < it.opts.loopRequired &&
+      it.schema.properties && Object.keys(it.schema.properties).length }}
+    {{ var $required = []; }}
+    {{~ $schema:$property }}
+      {{ var $propertySch = it.schema.properties[$property]; }}
+      {{? !($propertySch && {{# def.nonEmptySchema:$propertySch}}) }}
+        {{ $required[$required.length] = $property; }}
+      {{?}}
+    {{~}}
+  {{??}}
+    {{ var $required = $schema; }}
+  {{?}}
+{{?}}
+
+
+{{? $isData || $required.length }}
+  {{
+    var $currentErrorPath = it.errorPath
+      , $loopRequired = $isData || $required.length >= it.opts.loopRequired
+      , $ownProperties = it.opts.ownProperties;
+  }}
+
+  {{? $breakOnError }}
+    var missing{{=$lvl}};
+    {{? $loopRequired }}
+      {{# def.setupLoop }}
+      var {{=$valid}} = true;
+
+      {{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+      for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
+        {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined
+                      {{? $ownProperties }}
+                        && {{# def.isRequiredOwnProperty }}
+                      {{?}};
+        if (!{{=$valid}}) break;
+      }
+
+      {{? $isData }}  }  {{?}}
+
+      {{# def.checkError:'required' }}
+      else {
+    {{??}}
+      if ({{# def.checkMissingProperty:$required }}) {
+        {{# def.errorMissingProperty:'required' }}
+      } else {
+    {{?}}
+  {{??}}
+    {{? $loopRequired }}
+      {{# def.setupLoop }}
+      {{? $isData }}
+        if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) {
+          {{# def.addError:'required' }}
+        } else if ({{=$vSchema}} !== undefined) {
+      {{?}}
+
+      for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
+        if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined
+            {{? $ownProperties }}
+              || !{{# def.isRequiredOwnProperty }}
+            {{?}}) {
+          {{# def.addError:'required' }}
+        }
+      }
+
+      {{? $isData }}  }  {{?}}
+    {{??}}
+      {{~ $required:$propertyKey }}
+        {{# def.allErrorsMissingProperty:'required' }}
+      {{~}}
+    {{?}}
+  {{?}}
+
+  {{ it.errorPath = $currentErrorPath; }}
+
+{{?? $breakOnError }}
+  if (true) {
+{{?}}

+ 62 - 0
back/node_modules/ajv/lib/dot/uniqueItems.jst

@@ -0,0 +1,62 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+
+{{? ($schema || $isData) && it.opts.uniqueItems !== false }}
+  {{? $isData }}
+    var {{=$valid}};
+    if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined)
+      {{=$valid}} = true;
+    else if (typeof {{=$schemaValue}} != 'boolean')
+      {{=$valid}} = false;
+    else {
+  {{?}}
+
+  var i = {{=$data}}.length
+    , {{=$valid}} = true
+    , j;
+  if (i > 1) {
+    {{
+      var $itemType = it.schema.items && it.schema.items.type
+        , $typeIsArray = Array.isArray($itemType);
+    }}
+    {{? !$itemType || $itemType == 'object' || $itemType == 'array' ||
+        ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }}
+      outer:
+      for (;i--;) {
+        for (j = i; j--;) {
+          if (equal({{=$data}}[i], {{=$data}}[j])) {
+            {{=$valid}} = false;
+            break outer;
+          }
+        }
+      }
+    {{??}}
+      var itemIndices = {}, item;
+      for (;i--;) {
+        var item = {{=$data}}[i];
+        {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }}
+        if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue;
+        {{? $typeIsArray}}
+          if (typeof item == 'string') item = '"' + item;
+        {{?}}
+        if (typeof itemIndices[item] == 'number') {
+          {{=$valid}} = false;
+          j = itemIndices[item];
+          break;
+        }
+        itemIndices[item] = i;
+      }
+    {{?}}
+  }
+
+  {{? $isData }}  }  {{?}}
+
+  if (!{{=$valid}}) {
+    {{# def.error:'uniqueItems' }}
+  } {{? $breakOnError }} else { {{?}}
+{{??}}
+  {{? $breakOnError }} if (true) { {{?}}
+{{?}}

+ 276 - 0
back/node_modules/ajv/lib/dot/validate.jst

@@ -0,0 +1,276 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.defaults }}
+{{# def.coerce }}
+
+{{ /**
+    * schema compilation (render) time:
+    * it = { schema, RULES, _validate, opts }
+    * it.validate - this template function,
+    *   it is used recursively to generate code for subschemas
+    *
+    * runtime:
+    * "validate" is a variable name to which this function will be assigned
+    * validateRef etc. are defined in the parent scope in index.js
+    */ }}
+
+{{
+  var $async = it.schema.$async === true
+    , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref')
+    , $id = it.self._getId(it.schema);
+}}
+
+{{
+  if (it.opts.strictKeywords) {
+    var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
+    if ($unknownKwd) {
+      var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
+      if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
+      else throw new Error($keywordsMsg);
+    }
+  }
+}}
+
+{{? it.isTop }}
+  var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) {
+    'use strict';
+    {{? $id && (it.opts.sourceCode || it.opts.processCode) }}
+      {{= '/\*# sourceURL=' + $id + ' */' }}
+    {{?}}
+{{?}}
+
+{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }}
+  {{ var $keyword = 'false schema'; }}
+  {{# def.setupKeyword }}
+  {{? it.schema === false}}
+    {{? it.isTop}}
+      {{ $breakOnError = true; }}
+    {{??}}
+      var {{=$valid}} = false;
+    {{?}}
+    {{# def.error:'false schema' }}
+  {{??}}
+    {{? it.isTop}}
+      {{? $async }}
+        return data;
+      {{??}}
+        validate.errors = null;
+        return true;
+      {{?}}
+    {{??}}
+      var {{=$valid}} = true;
+    {{?}}
+  {{?}}
+
+  {{? it.isTop}}
+    };
+    return validate;
+  {{?}}
+
+  {{ return out; }}
+{{?}}
+
+
+{{? it.isTop }}
+  {{
+    var $top = it.isTop
+      , $lvl = it.level = 0
+      , $dataLvl = it.dataLevel = 0
+      , $data = 'data';
+    it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+    it.baseId = it.baseId || it.rootId;
+    delete it.isTop;
+
+    it.dataPathArr = [undefined];
+
+    if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
+      var $defaultMsg = 'default is ignored in the schema root';
+      if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+      else throw new Error($defaultMsg);
+    }
+  }}
+
+  var vErrors = null; {{ /* don't edit, used in replace */ }}
+  var errors = 0;     {{ /* don't edit, used in replace */ }}
+  if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }}
+{{??}}
+  {{
+    var $lvl = it.level
+      , $dataLvl = it.dataLevel
+      , $data = 'data' + ($dataLvl || '');
+
+    if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+
+    if ($async && !it.async) throw new Error('async schema in sync schema');
+  }}
+
+  var errs_{{=$lvl}} = errors;
+{{?}}
+
+{{
+  var $valid = 'valid' + $lvl
+    , $breakOnError = !it.opts.allErrors
+    , $closingBraces1 = ''
+    , $closingBraces2 = '';
+
+  var $errorKeyword;
+  var $typeSchema = it.schema.type
+    , $typeIsArray = Array.isArray($typeSchema);
+
+  if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
+    if ($typeIsArray) {
+      if ($typeSchema.indexOf('null') == -1)
+        $typeSchema = $typeSchema.concat('null');
+    } else if ($typeSchema != 'null') {
+      $typeSchema = [$typeSchema, 'null'];
+      $typeIsArray = true;
+    }
+  }
+
+  if ($typeIsArray && $typeSchema.length == 1) {
+    $typeSchema = $typeSchema[0];
+    $typeIsArray = false;
+  }
+}}
+
+{{## def.checkType:
+  {{
+    var $schemaPath = it.schemaPath + '.type'
+      , $errSchemaPath = it.errSchemaPath + '/type'
+      , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+  }}
+
+  if ({{= it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) }}) {
+#}}
+
+{{? it.schema.$ref && $refKeywords }}
+  {{? it.opts.extendRefs == 'fail' }}
+    {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }}
+  {{?? it.opts.extendRefs !== true }}
+    {{
+      $refKeywords = false;
+      it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+    }}
+  {{?}}
+{{?}}
+
+{{? it.schema.$comment && it.opts.$comment }}
+  {{= it.RULES.all.$comment.code(it, '$comment') }}
+{{?}}
+
+{{? $typeSchema }}
+  {{? it.opts.coerceTypes }}
+    {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
+  {{?}}
+
+  {{ var $rulesGroup = it.RULES.types[$typeSchema]; }}
+  {{? $coerceToTypes || $typeIsArray || $rulesGroup === true ||
+    ($rulesGroup && !$shouldUseGroup($rulesGroup)) }}
+    {{
+      var $schemaPath = it.schemaPath + '.type'
+        , $errSchemaPath = it.errSchemaPath + '/type';
+    }}
+    {{# def.checkType }}
+      {{? $coerceToTypes }}
+        {{# def.coerceType }}
+      {{??}}
+        {{# def.error:'type' }}
+      {{?}}
+    }
+  {{?}}
+{{?}}
+
+
+{{? it.schema.$ref && !$refKeywords }}
+  {{= it.RULES.all.$ref.code(it, '$ref') }}
+  {{? $breakOnError }}
+    }
+    if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+    {{ $closingBraces2 += '}'; }}
+  {{?}}
+{{??}}
+  {{~ it.RULES:$rulesGroup }}
+    {{? $shouldUseGroup($rulesGroup) }}
+      {{? $rulesGroup.type }}
+        if ({{= it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) }}) {
+      {{?}}
+        {{? it.opts.useDefaults }}
+          {{? $rulesGroup.type == 'object' && it.schema.properties }}
+            {{# def.defaultProperties }}
+          {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }}
+            {{# def.defaultItems }}
+          {{?}}
+        {{?}}
+        {{~ $rulesGroup.rules:$rule }}
+          {{? $shouldUseRule($rule) }}
+            {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }}
+            {{? $code }}
+              {{= $code }}
+              {{? $breakOnError }}
+                {{ $closingBraces1 += '}'; }}
+              {{?}}
+            {{?}}
+          {{?}}
+        {{~}}
+        {{? $breakOnError }}
+          {{= $closingBraces1 }}
+          {{ $closingBraces1 = ''; }}
+        {{?}}
+      {{? $rulesGroup.type }}
+        }
+        {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }}
+          else {
+            {{
+              var $schemaPath = it.schemaPath + '.type'
+                , $errSchemaPath = it.errSchemaPath + '/type';
+            }}
+            {{# def.error:'type' }}
+          }
+        {{?}}
+      {{?}}
+
+      {{? $breakOnError }}
+        if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+        {{ $closingBraces2 += '}'; }}
+      {{?}}
+    {{?}}
+  {{~}}
+{{?}}
+
+{{? $breakOnError }} {{= $closingBraces2 }} {{?}}
+
+{{? $top }}
+    {{? $async }}
+      if (errors === 0) return data;           {{ /* don't edit, used in replace */ }}
+      else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }}
+    {{??}}
+      validate.errors = vErrors; {{ /* don't edit, used in replace */ }}
+      return errors === 0;       {{ /* don't edit, used in replace */ }}
+    {{?}}
+  };
+
+  return validate;
+{{??}}
+  var {{=$valid}} = errors === errs_{{=$lvl}};
+{{?}}
+
+{{
+  function $shouldUseGroup($rulesGroup) {
+    var rules = $rulesGroup.rules;
+    for (var i=0; i < rules.length; i++)
+      if ($shouldUseRule(rules[i]))
+        return true;
+  }
+
+  function $shouldUseRule($rule) {
+    return it.schema[$rule.keyword] !== undefined ||
+           ($rule.implements && $ruleImplementsSomeKeyword($rule));
+  }
+
+  function $ruleImplementsSomeKeyword($rule) {
+    var impl = $rule.implements;
+    for (var i=0; i < impl.length; i++)
+      if (it.schema[impl[i]] !== undefined)
+        return true;
+  }
+}}

+ 3 - 0
back/node_modules/ajv/lib/dotjs/README.md

@@ -0,0 +1,3 @@
+These files are compiled dot templates from dot folder.
+
+Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder.

File diff suppressed because it is too large
+ 163 - 0
back/node_modules/ajv/lib/dotjs/_limit.js


+ 80 - 0
back/node_modules/ajv/lib/dotjs/_limitItems.js

@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $errorKeyword;
+  var $data = 'data' + ($dataLvl || '');
+  var $isData = it.opts.$data && $schema && $schema.$data,
+    $schemaValue;
+  if ($isData) {
+    out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+    $schemaValue = 'schema' + $lvl;
+  } else {
+    $schemaValue = $schema;
+  }
+  if (!($isData || typeof $schema == 'number')) {
+    throw new Error($keyword + ' must be number');
+  }
+  var $op = $keyword == 'maxItems' ? '>' : '<';
+  out += 'if ( ';
+  if ($isData) {
+    out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+  }
+  out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+  var $errorKeyword = $keyword;
+  var $$outStack = $$outStack || [];
+  $$outStack.push(out);
+  out = ''; /* istanbul ignore else */
+  if (it.createErrors !== false) {
+    out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+    if (it.opts.messages !== false) {
+      out += ' , message: \'should NOT have ';
+      if ($keyword == 'maxItems') {
+        out += 'more';
+      } else {
+        out += 'fewer';
+      }
+      out += ' than ';
+      if ($isData) {
+        out += '\' + ' + ($schemaValue) + ' + \'';
+      } else {
+        out += '' + ($schema);
+      }
+      out += ' items\' ';
+    }
+    if (it.opts.verbose) {
+      out += ' , schema:  ';
+      if ($isData) {
+        out += 'validate.schema' + ($schemaPath);
+      } else {
+        out += '' + ($schema);
+      }
+      out += '         , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+    }
+    out += ' } ';
+  } else {
+    out += ' {} ';
+  }
+  var __err = out;
+  out = $$outStack.pop();
+  if (!it.compositeRule && $breakOnError) {
+    /* istanbul ignore if */
+    if (it.async) {
+      out += ' throw new ValidationError([' + (__err) + ']); ';
+    } else {
+      out += ' validate.errors = [' + (__err) + ']; return false; ';
+    }
+  } else {
+    out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+  }
+  out += '} ';
+  if ($breakOnError) {
+    out += ' else { ';
+  }
+  return out;
+}

+ 85 - 0
back/node_modules/ajv/lib/dotjs/_limitLength.js

@@ -0,0 +1,85 @@
+'use strict';
+module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $errorKeyword;
+  var $data = 'data' + ($dataLvl || '');
+  var $isData = it.opts.$data && $schema && $schema.$data,
+    $schemaValue;
+  if ($isData) {
+    out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+    $schemaValue = 'schema' + $lvl;
+  } else {
+    $schemaValue = $schema;
+  }
+  if (!($isData || typeof $schema == 'number')) {
+    throw new Error($keyword + ' must be number');
+  }
+  var $op = $keyword == 'maxLength' ? '>' : '<';
+  out += 'if ( ';
+  if ($isData) {
+    out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+  }
+  if (it.opts.unicode === false) {
+    out += ' ' + ($data) + '.length ';
+  } else {
+    out += ' ucs2length(' + ($data) + ') ';
+  }
+  out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
+  var $errorKeyword = $keyword;
+  var $$outStack = $$outStack || [];
+  $$outStack.push(out);
+  out = ''; /* istanbul ignore else */
+  if (it.createErrors !== false) {
+    out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+    if (it.opts.messages !== false) {
+      out += ' , message: \'should NOT be ';
+      if ($keyword == 'maxLength') {
+        out += 'longer';
+      } else {
+        out += 'shorter';
+      }
+      out += ' than ';
+      if ($isData) {
+        out += '\' + ' + ($schemaValue) + ' + \'';
+      } else {
+        out += '' + ($schema);
+      }
+      out += ' characters\' ';
+    }
+    if (it.opts.verbose) {
+      out += ' , schema:  ';
+      if ($isData) {
+        out += 'validate.schema' + ($schemaPath);
+      } else {
+        out += '' + ($schema);
+      }
+      out += '         , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+    }
+    out += ' } ';
+  } else {
+    out += ' {} ';
+  }
+  var __err = out;
+  out = $$outStack.pop();
+  if (!it.compositeRule && $breakOnError) {
+    /* istanbul ignore if */
+    if (it.async) {
+      out += ' throw new ValidationError([' + (__err) + ']); ';
+    } else {
+      out += ' validate.errors = [' + (__err) + ']; return false; ';
+    }
+  } else {
+    out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+  }
+  out += '} ';
+  if ($breakOnError) {
+    out += ' else { ';
+  }
+  return out;
+}

+ 80 - 0
back/node_modules/ajv/lib/dotjs/_limitProperties.js

@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $errorKeyword;
+  var $data = 'data' + ($dataLvl || '');
+  var $isData = it.opts.$data && $schema && $schema.$data,
+    $schemaValue;
+  if ($isData) {
+    out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+    $schemaValue = 'schema' + $lvl;
+  } else {
+    $schemaValue = $schema;
+  }
+  if (!($isData || typeof $schema == 'number')) {
+    throw new Error($keyword + ' must be number');
+  }
+  var $op = $keyword == 'maxProperties' ? '>' : '<';
+  out += 'if ( ';
+  if ($isData) {
+    out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+  }
+  out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+  var $errorKeyword = $keyword;
+  var $$outStack = $$outStack || [];
+  $$outStack.push(out);
+  out = ''; /* istanbul ignore else */
+  if (it.createErrors !== false) {
+    out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+    if (it.opts.messages !== false) {
+      out += ' , message: \'should NOT have ';
+      if ($keyword == 'maxProperties') {
+        out += 'more';
+      } else {
+        out += 'fewer';
+      }
+      out += ' than ';
+      if ($isData) {
+        out += '\' + ' + ($schemaValue) + ' + \'';
+      } else {
+        out += '' + ($schema);
+      }
+      out += ' properties\' ';
+    }
+    if (it.opts.verbose) {
+      out += ' , schema:  ';
+      if ($isData) {
+        out += 'validate.schema' + ($schemaPath);
+      } else {
+        out += '' + ($schema);
+      }
+      out += '         , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+    }
+    out += ' } ';
+  } else {
+    out += ' {} ';
+  }
+  var __err = out;
+  out = $$outStack.pop();
+  if (!it.compositeRule && $breakOnError) {
+    /* istanbul ignore if */
+    if (it.async) {
+      out += ' throw new ValidationError([' + (__err) + ']); ';
+    } else {
+      out += ' validate.errors = [' + (__err) + ']; return false; ';
+    }
+  } else {
+    out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+  }
+  out += '} ';
+  if ($breakOnError) {
+    out += ' else { ';
+  }
+  return out;
+}

+ 42 - 0
back/node_modules/ajv/lib/dotjs/allOf.js

@@ -0,0 +1,42 @@
+'use strict';
+module.exports = function generate_allOf(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $it = it.util.copy(it);
+  var $closingBraces = '';
+  $it.level++;
+  var $nextValid = 'valid' + $it.level;
+  var $currentBaseId = $it.baseId,
+    $allSchemasEmpty = true;
+  var arr1 = $schema;
+  if (arr1) {
+    var $sch, $i = -1,
+      l1 = arr1.length - 1;
+    while ($i < l1) {
+      $sch = arr1[$i += 1];
+      if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
+        $allSchemasEmpty = false;
+        $it.schema = $sch;
+        $it.schemaPath = $schemaPath + '[' + $i + ']';
+        $it.errSchemaPath = $errSchemaPath + '/' + $i;
+        out += '  ' + (it.validate($it)) + ' ';
+        $it.baseId = $currentBaseId;
+        if ($breakOnError) {
+          out += ' if (' + ($nextValid) + ') { ';
+          $closingBraces += '}';
+        }
+      }
+    }
+  }
+  if ($breakOnError) {
+    if ($allSchemasEmpty) {
+      out += ' if (true) { ';
+    } else {
+      out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
+    }
+  }
+  return out;
+}

+ 73 - 0
back/node_modules/ajv/lib/dotjs/anyOf.js

@@ -0,0 +1,73 @@
+'use strict';
+module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $data = 'data' + ($dataLvl || '');
+  var $valid = 'valid' + $lvl;
+  var $errs = 'errs__' + $lvl;
+  var $it = it.util.copy(it);
+  var $closingBraces = '';
+  $it.level++;
+  var $nextValid = 'valid' + $it.level;
+  var $noEmptySchema = $schema.every(function($sch) {
+    return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all));
+  });
+  if ($noEmptySchema) {
+    var $currentBaseId = $it.baseId;
+    out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false;  ';
+    var $wasComposite = it.compositeRule;
+    it.compositeRule = $it.compositeRule = true;
+    var arr1 = $schema;
+    if (arr1) {
+      var $sch, $i = -1,
+        l1 = arr1.length - 1;
+      while ($i < l1) {
+        $sch = arr1[$i += 1];
+        $it.schema = $sch;
+        $it.schemaPath = $schemaPath + '[' + $i + ']';
+        $it.errSchemaPath = $errSchemaPath + '/' + $i;
+        out += '  ' + (it.validate($it)) + ' ';
+        $it.baseId = $currentBaseId;
+        out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
+        $closingBraces += '}';
+      }
+    }
+    it.compositeRule = $it.compositeRule = $wasComposite;
+    out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') {   var err =   '; /* istanbul ignore else */
+    if (it.createErrors !== false) {
+      out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+      if (it.opts.messages !== false) {
+        out += ' , message: \'should match some schema in anyOf\' ';
+      }
+      if (it.opts.verbose) {
+        out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+      }
+      out += ' } ';
+    } else {
+      out += ' {} ';
+    }
+    out += ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+    if (!it.compositeRule && $breakOnError) {
+      /* istanbul ignore if */
+      if (it.async) {
+        out += ' throw new ValidationError(vErrors); ';
+      } else {
+        out += ' validate.errors = vErrors; return false; ';
+      }
+    }
+    out += ' } else {  errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+    if (it.opts.allErrors) {
+      out += ' } ';
+    }
+  } else {
+    if ($breakOnError) {
+      out += ' if (true) { ';
+    }
+  }
+  return out;
+}

+ 14 - 0
back/node_modules/ajv/lib/dotjs/comment.js

@@ -0,0 +1,14 @@
+'use strict';
+module.exports = function generate_comment(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $schema = it.schema[$keyword];
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $comment = it.util.toQuotedString($schema);
+  if (it.opts.$comment === true) {
+    out += ' console.log(' + ($comment) + ');';
+  } else if (typeof it.opts.$comment == 'function') {
+    out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
+  }
+  return out;
+}

+ 56 - 0
back/node_modules/ajv/lib/dotjs/const.js

@@ -0,0 +1,56 @@
+'use strict';
+module.exports = function generate_const(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $data = 'data' + ($dataLvl || '');
+  var $valid = 'valid' + $lvl;
+  var $isData = it.opts.$data && $schema && $schema.$data,
+    $schemaValue;
+  if ($isData) {
+    out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+    $schemaValue = 'schema' + $lvl;
+  } else {
+    $schemaValue = $schema;
+  }
+  if (!$isData) {
+    out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+  }
+  out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') {   ';
+  var $$outStack = $$outStack || [];
+  $$outStack.push(out);
+  out = ''; /* istanbul ignore else */
+  if (it.createErrors !== false) {
+    out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';
+    if (it.opts.messages !== false) {
+      out += ' , message: \'should be equal to constant\' ';
+    }
+    if (it.opts.verbose) {
+      out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+    }
+    out += ' } ';
+  } else {
+    out += ' {} ';
+  }
+  var __err = out;
+  out = $$outStack.pop();
+  if (!it.compositeRule && $breakOnError) {
+    /* istanbul ignore if */
+    if (it.async) {
+      out += ' throw new ValidationError([' + (__err) + ']); ';
+    } else {
+      out += ' validate.errors = [' + (__err) + ']; return false; ';
+    }
+  } else {
+    out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+  }
+  out += ' }';
+  if ($breakOnError) {
+    out += ' else { ';
+  }
+  return out;
+}

+ 81 - 0
back/node_modules/ajv/lib/dotjs/contains.js

@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate_contains(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $data = 'data' + ($dataLvl || '');
+  var $valid = 'valid' + $lvl;
+  var $errs = 'errs__' + $lvl;
+  var $it = it.util.copy(it);
+  var $closingBraces = '';
+  $it.level++;
+  var $nextValid = 'valid' + $it.level;
+  var $idx = 'i' + $lvl,
+    $dataNxt = $it.dataLevel = it.dataLevel + 1,
+    $nextData = 'data' + $dataNxt,
+    $currentBaseId = it.baseId,
+    $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all));
+  out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+  if ($nonEmptySchema) {
+    var $wasComposite = it.compositeRule;
+    it.compositeRule = $it.compositeRule = true;
+    $it.schema = $schema;
+    $it.schemaPath = $schemaPath;
+    $it.errSchemaPath = $errSchemaPath;
+    out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+    $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+    var $passData = $data + '[' + $idx + ']';
+    $it.dataPathArr[$dataNxt] = $idx;
+    var $code = it.validate($it);
+    $it.baseId = $currentBaseId;
+    if (it.util.varOccurences($code, $nextData) < 2) {
+      out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+    } else {
+      out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+    }
+    out += ' if (' + ($nextValid) + ') break; }  ';
+    it.compositeRule = $it.compositeRule = $wasComposite;
+    out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
+  } else {
+    out += ' if (' + ($data) + '.length == 0) {';
+  }
+  var $$outStack = $$outStack || [];
+  $$outStack.push(out);
+  out = ''; /* istanbul ignore else */
+  if (it.createErrors !== false) {
+    out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+    if (it.opts.messages !== false) {
+      out += ' , message: \'should contain a valid item\' ';
+    }
+    if (it.opts.verbose) {
+      out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+    }
+    out += ' } ';
+  } else {
+    out += ' {} ';
+  }
+  var __err = out;
+  out = $$outStack.pop();
+  if (!it.compositeRule && $breakOnError) {
+    /* istanbul ignore if */
+    if (it.async) {
+      out += ' throw new ValidationError([' + (__err) + ']); ';
+    } else {
+      out += ' validate.errors = [' + (__err) + ']; return false; ';
+    }
+  } else {
+    out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+  }
+  out += ' } else { ';
+  if ($nonEmptySchema) {
+    out += '  errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+  }
+  if (it.opts.allErrors) {
+    out += ' } ';
+  }
+  return out;
+}

File diff suppressed because it is too large
+ 228 - 0
back/node_modules/ajv/lib/dotjs/custom.js


+ 168 - 0
back/node_modules/ajv/lib/dotjs/dependencies.js

@@ -0,0 +1,168 @@
+'use strict';
+module.exports = function generate_dependencies(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $data = 'data' + ($dataLvl || '');
+  var $errs = 'errs__' + $lvl;
+  var $it = it.util.copy(it);
+  var $closingBraces = '';
+  $it.level++;
+  var $nextValid = 'valid' + $it.level;
+  var $schemaDeps = {},
+    $propertyDeps = {},
+    $ownProperties = it.opts.ownProperties;
+  for ($property in $schema) {
+    if ($property == '__proto__') continue;
+    var $sch = $schema[$property];
+    var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+    $deps[$property] = $sch;
+  }
+  out += 'var ' + ($errs) + ' = errors;';
+  var $currentErrorPath = it.errorPath;
+  out += 'var missing' + ($lvl) + ';';
+  for (var $property in $propertyDeps) {
+    $deps = $propertyDeps[$property];
+    if ($deps.length) {
+      out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+      if ($ownProperties) {
+        out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+      }
+      if ($breakOnError) {
+        out += ' && ( ';
+        var arr1 = $deps;
+        if (arr1) {
+          var $propertyKey, $i = -1,
+            l1 = arr1.length - 1;
+          while ($i < l1) {
+            $propertyKey = arr1[$i += 1];
+            if ($i) {
+              out += ' || ';
+            }
+            var $prop = it.util.getProperty($propertyKey),
+              $useData = $data + $prop;
+            out += ' ( ( ' + ($useData) + ' === undefined ';
+            if ($ownProperties) {
+              out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+            }
+            out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+          }
+        }
+        out += ')) {  ';
+        var $propertyPath = 'missing' + $lvl,
+          $missingProperty = '\' + ' + $propertyPath + ' + \'';
+        if (it.opts._errorDataPathProperty) {
+          it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+        }
+        var $$outStack = $$outStack || [];
+        $$outStack.push(out);
+        out = ''; /* istanbul ignore else */
+        if (it.createErrors !== false) {
+          out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+          if (it.opts.messages !== false) {
+            out += ' , message: \'should have ';
+            if ($deps.length == 1) {
+              out += 'property ' + (it.util.escapeQuotes($deps[0]));
+            } else {
+              out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+            }
+            out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+          }
+          if (it.opts.verbose) {
+            out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+          }
+          out += ' } ';
+        } else {
+          out += ' {} ';
+        }
+        var __err = out;
+        out = $$outStack.pop();
+        if (!it.compositeRule && $breakOnError) {
+          /* istanbul ignore if */
+          if (it.async) {
+            out += ' throw new ValidationError([' + (__err) + ']); ';
+          } else {
+            out += ' validate.errors = [' + (__err) + ']; return false; ';
+          }
+        } else {
+          out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+        }
+      } else {
+        out += ' ) { ';
+        var arr2 = $deps;
+        if (arr2) {
+          var $propertyKey, i2 = -1,
+            l2 = arr2.length - 1;
+          while (i2 < l2) {
+            $propertyKey = arr2[i2 += 1];
+            var $prop = it.util.getProperty($propertyKey),
+              $missingProperty = it.util.escapeQuotes($propertyKey),
+              $useData = $data + $prop;
+            if (it.opts._errorDataPathProperty) {
+              it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+            }
+            out += ' if ( ' + ($useData) + ' === undefined ';
+            if ($ownProperties) {
+              out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+            }
+            out += ') {  var err =   '; /* istanbul ignore else */
+            if (it.createErrors !== false) {
+              out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+              if (it.opts.messages !== false) {
+                out += ' , message: \'should have ';
+                if ($deps.length == 1) {
+                  out += 'property ' + (it.util.escapeQuotes($deps[0]));
+                } else {
+                  out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+                }
+                out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+              }
+              if (it.opts.verbose) {
+                out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+              }
+              out += ' } ';
+            } else {
+              out += ' {} ';
+            }
+            out += ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+          }
+        }
+      }
+      out += ' }   ';
+      if ($breakOnError) {
+        $closingBraces += '}';
+        out += ' else { ';
+      }
+    }
+  }
+  it.errorPath = $currentErrorPath;
+  var $currentBaseId = $it.baseId;
+  for (var $property in $schemaDeps) {
+    var $sch = $schemaDeps[$property];
+    if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
+      out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+      if ($ownProperties) {
+        out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+      }
+      out += ') { ';
+      $it.schema = $sch;
+      $it.schemaPath = $schemaPath + it.util.getProperty($property);
+      $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+      out += '  ' + (it.validate($it)) + ' ';
+      $it.baseId = $currentBaseId;
+      out += ' }  ';
+      if ($breakOnError) {
+        out += ' if (' + ($nextValid) + ') { ';
+        $closingBraces += '}';
+      }
+    }
+  }
+  if ($breakOnError) {
+    out += '   ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+  }
+  return out;
+}

+ 66 - 0
back/node_modules/ajv/lib/dotjs/enum.js

@@ -0,0 +1,66 @@
+'use strict';
+module.exports = function generate_enum(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $data = 'data' + ($dataLvl || '');
+  var $valid = 'valid' + $lvl;
+  var $isData = it.opts.$data && $schema && $schema.$data,
+    $schemaValue;
+  if ($isData) {
+    out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+    $schemaValue = 'schema' + $lvl;
+  } else {
+    $schemaValue = $schema;
+  }
+  var $i = 'i' + $lvl,
+    $vSchema = 'schema' + $lvl;
+  if (!$isData) {
+    out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
+  }
+  out += 'var ' + ($valid) + ';';
+  if ($isData) {
+    out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+  }
+  out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
+  if ($isData) {
+    out += '  }  ';
+  }
+  out += ' if (!' + ($valid) + ') {   ';
+  var $$outStack = $$outStack || [];
+  $$outStack.push(out);
+  out = ''; /* istanbul ignore else */
+  if (it.createErrors !== false) {
+    out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
+    if (it.opts.messages !== false) {
+      out += ' , message: \'should be equal to one of the allowed values\' ';
+    }
+    if (it.opts.verbose) {
+      out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+    }
+    out += ' } ';
+  } else {
+    out += ' {} ';
+  }
+  var __err = out;
+  out = $$outStack.pop();
+  if (!it.compositeRule && $breakOnError) {
+    /* istanbul ignore if */
+    if (it.async) {
+      out += ' throw new ValidationError([' + (__err) + ']); ';
+    } else {
+      out += ' validate.errors = [' + (__err) + ']; return false; ';
+    }
+  } else {
+    out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+  }
+  out += ' }';
+  if ($breakOnError) {
+    out += ' else { ';
+  }
+  return out;
+}

+ 150 - 0
back/node_modules/ajv/lib/dotjs/format.js

@@ -0,0 +1,150 @@
+'use strict';
+module.exports = function generate_format(it, $keyword, $ruleType) {
+  var out = ' ';
+  var $lvl = it.level;
+  var $dataLvl = it.dataLevel;
+  var $schema = it.schema[$keyword];
+  var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+  var $breakOnError = !it.opts.allErrors;
+  var $data = 'data' + ($dataLvl || '');
+  if (it.opts.format === false) {
+    if ($breakOnError) {
+      out += ' if (true) { ';
+    }
+    return out;
+  }
+  var $isData = it.opts.$data && $schema && $schema.$data,
+    $schemaValue;
+  if ($isData) {
+    out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+    $schemaValue = 'schema' + $lvl;
+  } else {
+    $schemaValue = $schema;
+  }
+  var $unknownFormats = it.opts.unknownFormats,
+    $allowUnknown = Array.isArray($unknownFormats);
+  if ($isData) {
+    var $format = 'format' + $lvl,
+      $isObject = 'isObject' + $lvl,
+      $formatType = 'formatType' + $lvl;
+    out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+    if (it.async) {
+      out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
+    }
+    out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if (  ';
+    if ($isData) {
+      out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+    }
+    out += ' (';
+    if ($unknownFormats != 'ignore') {
+      out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
+      if ($allowUnknown) {
+        out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
+      }
+      out += ') || ';
+    }
+    out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+    if (it.async) {
+      out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+    } else {
+      out += ' ' + ($format) + '(' + ($data) + ') ';
+    }
+    out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
+  } else {
+    var $format = it.formats[$schema];
+    if (!$format) {
+      if ($unknownFormats == 'ignore') {
+        it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+        if ($breakOnError) {
+          out += ' if (true) { ';
+        }
+        return out;
+      } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
+        if ($breakOnError) {
+          out += ' if (true) { ';
+        }
+        return out;
+      } else {
+        throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+      }
+    }
+    var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+    var $formatType = $isObject && $format.type || 'string';
+    if ($isObject) {
+      var $async = $format.async === true;
+      $format = $format.validate;
+    }
+    if ($formatType != $ruleType) {
+      if ($breakOnError) {
+        out += ' if (true) { ';
+      }
+      return out;
+    }
+    if ($async) {
+      if (!it.async) throw new Error('async format in sync schema');
+      var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+      out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { ';
+    } else {
+      out += ' if (! ';
+      var $formatRef = 'formats' + it.util.getProperty($schema);
+      if ($isObject) $formatRef += '.validate';
+      if (typeof $format == 'function') {
+        out += ' ' + ($formatRef) + '(' + ($data) + ') ';
+      } else {
+        out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
+      }
+      out += ') { ';
+    }
+  }
+  var $$outStack = $$outStack || [];
+  $$outStack.push(out);
+  out = ''; /* istanbul ignore else */
+  if (it.createErrors !== false) {
+    out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format:  ';
+    if ($isData) {
+      out += '' + ($schemaValue);
+    } else {
+      out += '' + (it.util.toQuotedString($schema));
+    }
+    out += '  } ';
+    if (it.opts.messages !== false) {
+      out += ' , message: \'should match format "';
+      if ($isData) {
+        out += '\' + ' + ($schemaValue) + ' + \'';
+      } else {
+        out += '' + (it.util.escapeQuotes($schema));
+      }
+      out += '"\' ';
+    }
+    if (it.opts.verbose) {
+      out += ' , schema:  ';
+      if ($isData) {
+        out += 'validate.schema' + ($schemaPath);
+      } else {
+        out += '' + (it.util.toQuotedString($schema));
+      }
+      out += '         , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+    }
+    out += ' } ';
+  } else {
+    out += ' {} ';
+  }
+  var __err = out;
+  out = $$outStack.pop();
+  if (!it.compositeRule && $breakOnError) {
+    /* istanbul ignore if */
+    if (it.async) {
+      out += ' throw new ValidationError([' + (__err) + ']); ';
+    } else {
+      out += ' validate.errors = [' + (__err) + ']; return false; ';
+    }
+  } else {
+    out += ' var err = ' + (__err) + ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+  }
+  out += ' } ';
+  if ($breakOnError) {
+    out += ' else { ';
+  }
+  return out;
+}

+ 0 - 0
back/node_modules/ajv/lib/dotjs/if.js


Some files were not shown because too many files changed in this diff