@webiny/api-form-builder-so-ddb-es 0.0.0-ee-vpcs.549378cf03

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -0
  3. package/configurations.d.ts +11 -0
  4. package/configurations.js +50 -0
  5. package/configurations.js.map +1 -0
  6. package/definitions/elasticsearch.d.ts +9 -0
  7. package/definitions/elasticsearch.js +43 -0
  8. package/definitions/elasticsearch.js.map +1 -0
  9. package/definitions/form.d.ts +9 -0
  10. package/definitions/form.js +100 -0
  11. package/definitions/form.js.map +1 -0
  12. package/definitions/settings.d.ts +9 -0
  13. package/definitions/settings.js +49 -0
  14. package/definitions/settings.js.map +1 -0
  15. package/definitions/submission.d.ts +9 -0
  16. package/definitions/submission.js +70 -0
  17. package/definitions/submission.js.map +1 -0
  18. package/definitions/system.d.ts +9 -0
  19. package/definitions/system.js +40 -0
  20. package/definitions/system.js.map +1 -0
  21. package/definitions/table.d.ts +8 -0
  22. package/definitions/table.js +23 -0
  23. package/definitions/table.js.map +1 -0
  24. package/definitions/tableElasticsearch.d.ts +8 -0
  25. package/definitions/tableElasticsearch.js +23 -0
  26. package/definitions/tableElasticsearch.js.map +1 -0
  27. package/elasticsearch/createElasticsearchIndex.d.ts +10 -0
  28. package/elasticsearch/createElasticsearchIndex.js +63 -0
  29. package/elasticsearch/createElasticsearchIndex.js.map +1 -0
  30. package/elasticsearch/indices/base.d.ts +2 -0
  31. package/elasticsearch/indices/base.js +15 -0
  32. package/elasticsearch/indices/base.js.map +1 -0
  33. package/elasticsearch/indices/index.d.ts +1 -0
  34. package/elasticsearch/indices/index.js +16 -0
  35. package/elasticsearch/indices/index.js.map +1 -0
  36. package/elasticsearch/indices/japanese.d.ts +2 -0
  37. package/elasticsearch/indices/japanese.js +16 -0
  38. package/elasticsearch/indices/japanese.js.map +1 -0
  39. package/index.d.ts +2 -0
  40. package/index.js +191 -0
  41. package/index.js.map +1 -0
  42. package/operations/form/elasticsearchBody.d.ts +13 -0
  43. package/operations/form/elasticsearchBody.js +170 -0
  44. package/operations/form/elasticsearchBody.js.map +1 -0
  45. package/operations/form/elasticsearchFields.d.ts +3 -0
  46. package/operations/form/elasticsearchFields.js +33 -0
  47. package/operations/form/elasticsearchFields.js.map +1 -0
  48. package/operations/form/fields.d.ts +3 -0
  49. package/operations/form/fields.js +15 -0
  50. package/operations/form/fields.js.map +1 -0
  51. package/operations/form/index.d.ts +17 -0
  52. package/operations/form/index.js +904 -0
  53. package/operations/form/index.js.map +1 -0
  54. package/operations/settings/index.d.ts +7 -0
  55. package/operations/settings/index.js +118 -0
  56. package/operations/settings/index.js.map +1 -0
  57. package/operations/submission/elasticsearchBody.d.ts +13 -0
  58. package/operations/submission/elasticsearchBody.js +187 -0
  59. package/operations/submission/elasticsearchBody.js.map +1 -0
  60. package/operations/submission/elasticsearchFields.d.ts +3 -0
  61. package/operations/submission/elasticsearchFields.js +30 -0
  62. package/operations/submission/elasticsearchFields.js.map +1 -0
  63. package/operations/submission/index.d.ts +12 -0
  64. package/operations/submission/index.js +335 -0
  65. package/operations/submission/index.js.map +1 -0
  66. package/operations/system/index.d.ts +7 -0
  67. package/operations/system/index.js +101 -0
  68. package/operations/system/index.js.map +1 -0
  69. package/package.json +63 -0
  70. package/plugins/FormDynamoDbFieldPlugin.d.ts +4 -0
  71. package/plugins/FormDynamoDbFieldPlugin.js +17 -0
  72. package/plugins/FormDynamoDbFieldPlugin.js.map +1 -0
  73. package/plugins/FormElasticsearchBodyModifierPlugin.d.ts +4 -0
  74. package/plugins/FormElasticsearchBodyModifierPlugin.js +17 -0
  75. package/plugins/FormElasticsearchBodyModifierPlugin.js.map +1 -0
  76. package/plugins/FormElasticsearchFieldPlugin.d.ts +4 -0
  77. package/plugins/FormElasticsearchFieldPlugin.js +17 -0
  78. package/plugins/FormElasticsearchFieldPlugin.js.map +1 -0
  79. package/plugins/FormElasticsearchIndexPlugin.d.ts +4 -0
  80. package/plugins/FormElasticsearchIndexPlugin.js +17 -0
  81. package/plugins/FormElasticsearchIndexPlugin.js.map +1 -0
  82. package/plugins/FormElasticsearchQueryModifierPlugin.d.ts +4 -0
  83. package/plugins/FormElasticsearchQueryModifierPlugin.js +17 -0
  84. package/plugins/FormElasticsearchQueryModifierPlugin.js.map +1 -0
  85. package/plugins/FormElasticsearchSortModifierPlugin.d.ts +4 -0
  86. package/plugins/FormElasticsearchSortModifierPlugin.js +17 -0
  87. package/plugins/FormElasticsearchSortModifierPlugin.js.map +1 -0
  88. package/plugins/SubmissionElasticsearchBodyModifierPlugin.d.ts +4 -0
  89. package/plugins/SubmissionElasticsearchBodyModifierPlugin.js +17 -0
  90. package/plugins/SubmissionElasticsearchBodyModifierPlugin.js.map +1 -0
  91. package/plugins/SubmissionElasticsearchFieldPlugin.d.ts +4 -0
  92. package/plugins/SubmissionElasticsearchFieldPlugin.js +17 -0
  93. package/plugins/SubmissionElasticsearchFieldPlugin.js.map +1 -0
  94. package/plugins/SubmissionElasticsearchQueryModifierPlugin.d.ts +4 -0
  95. package/plugins/SubmissionElasticsearchQueryModifierPlugin.js +17 -0
  96. package/plugins/SubmissionElasticsearchQueryModifierPlugin.js.map +1 -0
  97. package/plugins/SubmissionElasticsearchSortModifierPlugin.d.ts +4 -0
  98. package/plugins/SubmissionElasticsearchSortModifierPlugin.js +17 -0
  99. package/plugins/SubmissionElasticsearchSortModifierPlugin.js.map +1 -0
  100. package/types.d.ts +66 -0
  101. package/types.js +17 -0
  102. package/types.js.map +1 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Webiny
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # @webiny/api-form-builder-so-ddb-es
2
+ [![](https://img.shields.io/npm/dw/@webiny/api-form-builder-so-ddb-es.svg)](https://www.npmjs.com/package/@webiny/api-form-builder-so-ddb-es)
3
+ [![](https://img.shields.io/npm/v/@webiny/api-form-builder-so-ddb-es.svg)](https://www.npmjs.com/package/@webiny/api-form-builder-so-ddb-es)
4
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
5
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
6
+
7
+ The DynamoDB + Elasticsearch Storage Operations for the [Webiny Forms (@webiny/api-form-builder)](../api-form-builder) API.
8
+
9
+ ## Install
10
+ ```
11
+ yarn add @webiny/api-form-builder-so-ddb-es
12
+ ```
@@ -0,0 +1,11 @@
1
+ export interface ElasticsearchConfigParams {
2
+ tenant: string;
3
+ locale: string;
4
+ }
5
+ interface ElasticsearchConfig {
6
+ index: string;
7
+ }
8
+ export declare const configurations: {
9
+ es(params: ElasticsearchConfigParams): ElasticsearchConfig;
10
+ };
11
+ export {};
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.configurations = void 0;
9
+
10
+ var _error = _interopRequireDefault(require("@webiny/error"));
11
+
12
+ const configurations = {
13
+ es(params) {
14
+ const {
15
+ tenant,
16
+ locale
17
+ } = params;
18
+
19
+ if (!tenant) {
20
+ throw new _error.default(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
21
+ }
22
+
23
+ const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === "true";
24
+ const tenantId = sharedIndex ? "root" : tenant;
25
+ let localeCode = null;
26
+
27
+ if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === "true") {
28
+ if (!locale) {
29
+ throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
30
+ }
31
+
32
+ localeCode = locale;
33
+ }
34
+
35
+ const index = [tenantId, localeCode, "form-builder"].filter(Boolean).join("-").toLowerCase();
36
+ const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || "";
37
+
38
+ if (!prefix) {
39
+ return {
40
+ index
41
+ };
42
+ }
43
+
44
+ return {
45
+ index: prefix + index
46
+ };
47
+ }
48
+
49
+ };
50
+ exports.configurations = configurations;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["configurations","es","params","tenant","locale","WebinyError","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","tenantId","localeCode","WEBINY_ELASTICSEARCH_INDEX_LOCALE","index","filter","Boolean","join","toLowerCase","prefix","ELASTIC_SEARCH_INDEX_PREFIX"],"sources":["configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\n\nexport interface ElasticsearchConfigParams {\n tenant: string;\n locale: string;\n}\n\ninterface ElasticsearchConfig {\n index: string;\n}\n\nexport const configurations = {\n es(params: ElasticsearchConfigParams): ElasticsearchConfig {\n const { tenant, locale } = params;\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n\n const tenantId = sharedIndex ? \"root\" : tenant;\n let localeCode: string | null = null;\n if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === \"true\") {\n if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n localeCode = locale;\n }\n\n const index = [tenantId, localeCode, \"form-builder\"]\n .filter(Boolean)\n .join(\"-\")\n .toLowerCase();\n\n const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || \"\";\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n }\n};\n"],"mappings":";;;;;;;;;AAAA;;AAWO,MAAMA,cAAc,GAAG;EAC1BC,EAAE,CAACC,MAAD,EAAyD;IACvD,MAAM;MAAEC,MAAF;MAAUC;IAAV,IAAqBF,MAA3B;;IACA,IAAI,CAACC,MAAL,EAAa;MACT,MAAM,IAAIE,cAAJ,CACD,4EADC,EAEF,cAFE,CAAN;IAIH;;IAED,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAR,CAAYC,4BAAZ,KAA6C,MAAjE;IAEA,MAAMC,QAAQ,GAAGJ,WAAW,GAAG,MAAH,GAAYH,MAAxC;IACA,IAAIQ,UAAyB,GAAG,IAAhC;;IACA,IAAIJ,OAAO,CAACC,GAAR,CAAYI,iCAAZ,KAAkD,MAAtD,EAA8D;MAC1D,IAAI,CAACR,MAAL,EAAa;QACT,MAAM,IAAIC,cAAJ,CACD,4EADC,EAEF,cAFE,CAAN;MAIH;;MACDM,UAAU,GAAGP,MAAb;IACH;;IAED,MAAMS,KAAK,GAAG,CAACH,QAAD,EAAWC,UAAX,EAAuB,cAAvB,EACTG,MADS,CACFC,OADE,EAETC,IAFS,CAEJ,GAFI,EAGTC,WAHS,EAAd;IAKA,MAAMC,MAAM,GAAGX,OAAO,CAACC,GAAR,CAAYW,2BAAZ,IAA2C,EAA1D;;IACA,IAAI,CAACD,MAAL,EAAa;MACT,OAAO;QACHL;MADG,CAAP;IAGH;;IACD,OAAO;MACHA,KAAK,EAAEK,MAAM,GAAGL;IADb,CAAP;EAGH;;AAtCyB,CAAvB"}
@@ -0,0 +1,9 @@
1
+ import { Entity, Table } from "dynamodb-toolbox";
2
+ import { Attributes } from "../types";
3
+ interface Params {
4
+ table: Table;
5
+ entityName: string;
6
+ attributes: Attributes;
7
+ }
8
+ export declare const createElasticsearchEntity: (params: Params) => Entity<{}>;
9
+ export {};
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createElasticsearchEntity = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+
12
+ var _dynamodbToolbox = require("dynamodb-toolbox");
13
+
14
+ const createElasticsearchEntity = params => {
15
+ const {
16
+ table,
17
+ entityName,
18
+ attributes
19
+ } = params;
20
+ return new _dynamodbToolbox.Entity({
21
+ name: entityName,
22
+ table,
23
+ attributes: (0, _objectSpread2.default)({
24
+ PK: {
25
+ partitionKey: true
26
+ },
27
+ SK: {
28
+ sortKey: true
29
+ },
30
+ index: {
31
+ type: "string"
32
+ },
33
+ data: {
34
+ type: "map"
35
+ },
36
+ TYPE: {
37
+ type: "string"
38
+ }
39
+ }, attributes || {})
40
+ });
41
+ };
42
+
43
+ exports.createElasticsearchEntity = createElasticsearchEntity;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","index","type","data","TYPE"],"sources":["elasticsearch.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createElasticsearchEntity = (params: Params) => {\n const { table, entityName, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n TYPE: {\n type: \"string\"\n },\n\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,yBAAyB,GAAIC,MAAD,IAAoB;EACzD,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEH,UADQ;IAEdD,KAFc;IAGdE,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,KAAK,EAAE;QACHC,IAAI,EAAE;MADH,CAPD;MAUNC,IAAI,EAAE;QACFD,IAAI,EAAE;MADJ,CAVA;MAaNE,IAAI,EAAE;QACFF,IAAI,EAAE;MADJ;IAbA,GAiBFR,UAAU,IAAI,EAjBZ;EAHI,CAAX,CAAP;AAuBH,CAzBM"}
@@ -0,0 +1,9 @@
1
+ import { Entity, Table } from "dynamodb-toolbox";
2
+ import { Attributes } from "../types";
3
+ interface Params {
4
+ table: Table;
5
+ entityName: string;
6
+ attributes: Attributes;
7
+ }
8
+ export declare const createFormEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createFormEntity = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+
12
+ var _dynamodbToolbox = require("dynamodb-toolbox");
13
+
14
+ const createFormEntity = params => {
15
+ const {
16
+ table,
17
+ entityName,
18
+ attributes
19
+ } = params;
20
+ return new _dynamodbToolbox.Entity({
21
+ table,
22
+ name: entityName,
23
+ attributes: (0, _objectSpread2.default)({
24
+ PK: {
25
+ partitionKey: true
26
+ },
27
+ SK: {
28
+ sortKey: true
29
+ },
30
+ TYPE: {
31
+ type: "string"
32
+ },
33
+ id: {
34
+ type: "string"
35
+ },
36
+ formId: {
37
+ type: "string"
38
+ },
39
+ tenant: {
40
+ type: "string"
41
+ },
42
+ locale: {
43
+ type: "string"
44
+ },
45
+ createdBy: {
46
+ type: "map"
47
+ },
48
+ ownedBy: {
49
+ type: "map"
50
+ },
51
+ savedOn: {
52
+ type: "string"
53
+ },
54
+ createdOn: {
55
+ type: "string"
56
+ },
57
+ name: {
58
+ type: "string"
59
+ },
60
+ slug: {
61
+ type: "string"
62
+ },
63
+ version: {
64
+ type: "number"
65
+ },
66
+ locked: {
67
+ type: "boolean"
68
+ },
69
+ published: {
70
+ type: "boolean"
71
+ },
72
+ publishedOn: {
73
+ type: "string"
74
+ },
75
+ status: {
76
+ type: "string"
77
+ },
78
+ fields: {
79
+ type: "list"
80
+ },
81
+ layout: {
82
+ type: "list"
83
+ },
84
+ stats: {
85
+ type: "map"
86
+ },
87
+ settings: {
88
+ type: "map"
89
+ },
90
+ triggers: {
91
+ type: "map"
92
+ },
93
+ webinyVersion: {
94
+ type: "string"
95
+ }
96
+ }, attributes || {})
97
+ });
98
+ };
99
+
100
+ exports.createFormEntity = createFormEntity;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createFormEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","formId","tenant","locale","createdBy","ownedBy","savedOn","createdOn","slug","version","locked","published","publishedOn","status","fields","layout","stats","settings","triggers","webinyVersion"],"sources":["form.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createFormEntity = (params: Params): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n table,\n name: entityName,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n formId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n savedOn: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n locked: {\n type: \"boolean\"\n },\n published: {\n type: \"boolean\"\n },\n publishedOn: {\n type: \"string\"\n },\n status: {\n type: \"string\"\n },\n fields: {\n type: \"list\"\n },\n layout: {\n type: \"list\"\n },\n stats: {\n type: \"map\"\n },\n settings: {\n type: \"map\"\n },\n triggers: {\n type: \"map\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,gBAAgB,GAAIC,MAAD,IAAiC;EAC7D,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdH,KADc;IAEdI,IAAI,EAAEH,UAFQ;IAGdC,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,EAAE,EAAE;QACAD,IAAI,EAAE;MADN,CAVE;MAaNE,MAAM,EAAE;QACJF,IAAI,EAAE;MADF,CAbF;MAgBNG,MAAM,EAAE;QACJH,IAAI,EAAE;MADF,CAhBF;MAmBNI,MAAM,EAAE;QACJJ,IAAI,EAAE;MADF,CAnBF;MAsBNK,SAAS,EAAE;QACPL,IAAI,EAAE;MADC,CAtBL;MAyBNM,OAAO,EAAE;QACLN,IAAI,EAAE;MADD,CAzBH;MA4BNO,OAAO,EAAE;QACLP,IAAI,EAAE;MADD,CA5BH;MA+BNQ,SAAS,EAAE;QACPR,IAAI,EAAE;MADC,CA/BL;MAkCNN,IAAI,EAAE;QACFM,IAAI,EAAE;MADJ,CAlCA;MAqCNS,IAAI,EAAE;QACFT,IAAI,EAAE;MADJ,CArCA;MAwCNU,OAAO,EAAE;QACLV,IAAI,EAAE;MADD,CAxCH;MA2CNW,MAAM,EAAE;QACJX,IAAI,EAAE;MADF,CA3CF;MA8CNY,SAAS,EAAE;QACPZ,IAAI,EAAE;MADC,CA9CL;MAiDNa,WAAW,EAAE;QACTb,IAAI,EAAE;MADG,CAjDP;MAoDNc,MAAM,EAAE;QACJd,IAAI,EAAE;MADF,CApDF;MAuDNe,MAAM,EAAE;QACJf,IAAI,EAAE;MADF,CAvDF;MA0DNgB,MAAM,EAAE;QACJhB,IAAI,EAAE;MADF,CA1DF;MA6DNiB,KAAK,EAAE;QACHjB,IAAI,EAAE;MADH,CA7DD;MAgENkB,QAAQ,EAAE;QACNlB,IAAI,EAAE;MADA,CAhEJ;MAmENmB,QAAQ,EAAE;QACNnB,IAAI,EAAE;MADA,CAnEJ;MAsENoB,aAAa,EAAE;QACXpB,IAAI,EAAE;MADK;IAtET,GAyEFR,UAAU,IAAI,EAzEZ;EAHI,CAAX,CAAP;AA+EH,CAjFM"}
@@ -0,0 +1,9 @@
1
+ import { Entity, Table } from "dynamodb-toolbox";
2
+ import { Attributes } from "../types";
3
+ interface Params {
4
+ table: Table;
5
+ entityName: string;
6
+ attributes: Attributes;
7
+ }
8
+ export declare const createSettingsEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createSettingsEntity = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+
12
+ var _dynamodbToolbox = require("dynamodb-toolbox");
13
+
14
+ const createSettingsEntity = params => {
15
+ const {
16
+ entityName,
17
+ attributes,
18
+ table
19
+ } = params;
20
+ return new _dynamodbToolbox.Entity({
21
+ name: entityName,
22
+ table,
23
+ attributes: (0, _objectSpread2.default)({
24
+ PK: {
25
+ partitionKey: true
26
+ },
27
+ SK: {
28
+ sortKey: true
29
+ },
30
+ TYPE: {
31
+ type: "string"
32
+ },
33
+ reCaptcha: {
34
+ type: "map"
35
+ },
36
+ domain: {
37
+ type: "string"
38
+ },
39
+ tenant: {
40
+ type: "string"
41
+ },
42
+ locale: {
43
+ type: "string"
44
+ }
45
+ }, attributes || {})
46
+ });
47
+ };
48
+
49
+ exports.createSettingsEntity = createSettingsEntity;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createSettingsEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","reCaptcha","domain","tenant","locale"],"sources":["settings.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n reCaptcha: {\n type: \"map\"\n },\n domain: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,oBAAoB,GAAIC,MAAD,IAAiC;EACjE,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,SAAS,EAAE;QACPD,IAAI,EAAE;MADC,CAVL;MAaNE,MAAM,EAAE;QACJF,IAAI,EAAE;MADF,CAbF;MAgBNG,MAAM,EAAE;QACJH,IAAI,EAAE;MADF,CAhBF;MAmBNI,MAAM,EAAE;QACJJ,IAAI,EAAE;MADF;IAnBF,GAsBFT,UAAU,IAAI,EAtBZ;EAHI,CAAX,CAAP;AA4BH,CA9BM"}
@@ -0,0 +1,9 @@
1
+ import { Entity, Table } from "dynamodb-toolbox";
2
+ import { Attributes } from "../types";
3
+ interface Params {
4
+ table: Table;
5
+ entityName: string;
6
+ attributes: Attributes;
7
+ }
8
+ export declare const createSubmissionEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createSubmissionEntity = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+
12
+ var _dynamodbToolbox = require("dynamodb-toolbox");
13
+
14
+ const createSubmissionEntity = params => {
15
+ const {
16
+ table,
17
+ entityName,
18
+ attributes
19
+ } = params;
20
+ return new _dynamodbToolbox.Entity({
21
+ table,
22
+ name: entityName,
23
+ attributes: (0, _objectSpread2.default)({
24
+ PK: {
25
+ partitionKey: true
26
+ },
27
+ SK: {
28
+ sortKey: true
29
+ },
30
+ id: {
31
+ type: "string"
32
+ },
33
+ TYPE: {
34
+ type: "string"
35
+ },
36
+ data: {
37
+ type: "map"
38
+ },
39
+ meta: {
40
+ type: "map"
41
+ },
42
+ form: {
43
+ type: "map"
44
+ },
45
+ logs: {
46
+ type: "list"
47
+ },
48
+ createdOn: {
49
+ type: "string"
50
+ },
51
+ savedOn: {
52
+ type: "string"
53
+ },
54
+ ownedBy: {
55
+ type: "map"
56
+ },
57
+ tenant: {
58
+ type: "string"
59
+ },
60
+ locale: {
61
+ type: "string"
62
+ },
63
+ webinyVersion: {
64
+ type: "string"
65
+ }
66
+ }, attributes || {})
67
+ });
68
+ };
69
+
70
+ exports.createSubmissionEntity = createSubmissionEntity;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createSubmissionEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","id","type","TYPE","data","meta","form","logs","createdOn","savedOn","ownedBy","tenant","locale","webinyVersion"],"sources":["submission.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSubmissionEntity = (params: Params): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n table,\n name: entityName,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n id: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n meta: {\n type: \"map\"\n },\n form: {\n type: \"map\"\n },\n logs: {\n type: \"list\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n ownedBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,sBAAsB,GAAIC,MAAD,IAAiC;EACnE,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdH,KADc;IAEdI,IAAI,EAAEH,UAFQ;IAGdC,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,EAAE,EAAE;QACAC,IAAI,EAAE;MADN,CAPE;MAUNC,IAAI,EAAE;QACFD,IAAI,EAAE;MADJ,CAVA;MAaNE,IAAI,EAAE;QACFF,IAAI,EAAE;MADJ,CAbA;MAgBNG,IAAI,EAAE;QACFH,IAAI,EAAE;MADJ,CAhBA;MAmBNI,IAAI,EAAE;QACFJ,IAAI,EAAE;MADJ,CAnBA;MAsBNK,IAAI,EAAE;QACFL,IAAI,EAAE;MADJ,CAtBA;MAyBNM,SAAS,EAAE;QACPN,IAAI,EAAE;MADC,CAzBL;MA4BNO,OAAO,EAAE;QACLP,IAAI,EAAE;MADD,CA5BH;MA+BNQ,OAAO,EAAE;QACLR,IAAI,EAAE;MADD,CA/BH;MAkCNS,MAAM,EAAE;QACJT,IAAI,EAAE;MADF,CAlCF;MAqCNU,MAAM,EAAE;QACJV,IAAI,EAAE;MADF,CArCF;MAwCNW,aAAa,EAAE;QACXX,IAAI,EAAE;MADK;IAxCT,GA2CFR,UAAU,IAAI,EA3CZ;EAHI,CAAX,CAAP;AAiDH,CAnDM"}
@@ -0,0 +1,9 @@
1
+ import { Entity, Table } from "dynamodb-toolbox";
2
+ import { Attributes } from "../types";
3
+ interface Params {
4
+ table: Table;
5
+ entityName: string;
6
+ attributes: Attributes;
7
+ }
8
+ export declare const createSystemEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createSystemEntity = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+
12
+ var _dynamodbToolbox = require("dynamodb-toolbox");
13
+
14
+ const createSystemEntity = params => {
15
+ const {
16
+ entityName,
17
+ attributes,
18
+ table
19
+ } = params;
20
+ return new _dynamodbToolbox.Entity({
21
+ name: entityName,
22
+ table,
23
+ attributes: (0, _objectSpread2.default)({
24
+ PK: {
25
+ partitionKey: true
26
+ },
27
+ SK: {
28
+ sortKey: true
29
+ },
30
+ version: {
31
+ type: "string"
32
+ },
33
+ tenant: {
34
+ type: "string"
35
+ }
36
+ }, attributes || {})
37
+ });
38
+ };
39
+
40
+ exports.createSystemEntity = createSystemEntity;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","tenant"],"sources":["system.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,kBAAkB,GAAIC,MAAD,IAAiC;EAC/D,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,OAAO,EAAE;QACLC,IAAI,EAAE;MADD,CAPH;MAUNC,MAAM,EAAE;QACJD,IAAI,EAAE;MADF;IAVF,GAaFT,UAAU,IAAI,EAbZ;EAHI,CAAX,CAAP;AAmBH,CArBM"}
@@ -0,0 +1,8 @@
1
+ import { DocumentClient } from "aws-sdk/clients/dynamodb";
2
+ import { Table } from "dynamodb-toolbox";
3
+ interface Params {
4
+ tableName?: string;
5
+ documentClient: DocumentClient;
6
+ }
7
+ export declare const createTable: (params: Params) => Table;
8
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createTable = void 0;
7
+
8
+ var _dynamodbToolbox = require("dynamodb-toolbox");
9
+
10
+ const createTable = params => {
11
+ const {
12
+ tableName,
13
+ documentClient
14
+ } = params;
15
+ return new _dynamodbToolbox.Table({
16
+ name: tableName || process.env.DB_TABLE,
17
+ partitionKey: "PK",
18
+ sortKey: "SK",
19
+ DocumentClient: documentClient
20
+ });
21
+ };
22
+
23
+ exports.createTable = createTable;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE","partitionKey","sortKey","DocumentClient"],"sources":["table.ts"],"sourcesContent":["import { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\n\ninterface Params {\n tableName?: string;\n documentClient: DocumentClient;\n}\n\nexport const createTable = (params: Params): Table => {\n const { tableName, documentClient } = params;\n\n return new Table({\n name: tableName || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n });\n};\n"],"mappings":";;;;;;;AACA;;AAOO,MAAMA,WAAW,GAAIC,MAAD,IAA2B;EAClD,MAAM;IAAEC,SAAF;IAAaC;EAAb,IAAgCF,MAAtC;EAEA,OAAO,IAAIG,sBAAJ,CAAU;IACbC,IAAI,EAAEH,SAAS,IAAKI,OAAO,CAACC,GAAR,CAAYC,QADnB;IAEbC,YAAY,EAAE,IAFD;IAGbC,OAAO,EAAE,IAHI;IAIbC,cAAc,EAAER;EAJH,CAAV,CAAP;AAMH,CATM"}
@@ -0,0 +1,8 @@
1
+ import { Table } from "dynamodb-toolbox";
2
+ import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
+ interface Params {
4
+ documentClient: DocumentClient;
5
+ tableName?: string;
6
+ }
7
+ export declare const createElasticsearchTable: (params: Params) => Table;
8
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createElasticsearchTable = void 0;
7
+
8
+ var _dynamodbToolbox = require("dynamodb-toolbox");
9
+
10
+ const createElasticsearchTable = params => {
11
+ const {
12
+ tableName,
13
+ documentClient
14
+ } = params;
15
+ return new _dynamodbToolbox.Table({
16
+ name: tableName || process.env.DB_TABLE_ELASTICSEARCH,
17
+ partitionKey: "PK",
18
+ sortKey: "SK",
19
+ DocumentClient: documentClient
20
+ });
21
+ };
22
+
23
+ exports.createElasticsearchTable = createElasticsearchTable;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createElasticsearchTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { Table } from \"dynamodb-toolbox\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\n\ninterface Params {\n documentClient: DocumentClient;\n tableName?: string;\n}\n\nexport const createElasticsearchTable = (params: Params): Table => {\n const { tableName, documentClient } = params;\n return new Table({\n name: tableName || (process.env.DB_TABLE_ELASTICSEARCH as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n });\n};\n"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,wBAAwB,GAAIC,MAAD,IAA2B;EAC/D,MAAM;IAAEC,SAAF;IAAaC;EAAb,IAAgCF,MAAtC;EACA,OAAO,IAAIG,sBAAJ,CAAU;IACbC,IAAI,EAAEH,SAAS,IAAKI,OAAO,CAACC,GAAR,CAAYC,sBADnB;IAEbC,YAAY,EAAE,IAFD;IAGbC,OAAO,EAAE,IAHI;IAIbC,cAAc,EAAER;EAJH,CAAV,CAAP;AAMH,CARM"}
@@ -0,0 +1,10 @@
1
+ import { Client } from "@elastic/elasticsearch";
2
+ import { PluginsContainer } from "@webiny/plugins";
3
+ interface CreateElasticsearchIndexParams {
4
+ elasticsearch: Client;
5
+ plugins: PluginsContainer;
6
+ tenant: string;
7
+ locale: string;
8
+ }
9
+ export declare const createElasticsearchIndex: (params: CreateElasticsearchIndexParams) => Promise<void>;
10
+ export {};
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createElasticsearchIndex = void 0;
9
+
10
+ var _apiElasticsearch = require("@webiny/api-elasticsearch");
11
+
12
+ var _FormElasticsearchIndexPlugin = require("../plugins/FormElasticsearchIndexPlugin");
13
+
14
+ var _error = _interopRequireDefault(require("@webiny/error"));
15
+
16
+ var _configurations = require("../configurations");
17
+
18
+ const createElasticsearchIndex = async params => {
19
+ const {
20
+ elasticsearch,
21
+ plugins: container,
22
+ locale,
23
+ tenant
24
+ } = params;
25
+ const plugin = (0, _apiElasticsearch.getLastAddedIndexPlugin)({
26
+ container,
27
+ type: _FormElasticsearchIndexPlugin.FormElasticsearchIndexPlugin.type,
28
+ locale
29
+ });
30
+
31
+ const {
32
+ index
33
+ } = _configurations.configurations.es({
34
+ locale,
35
+ tenant
36
+ });
37
+
38
+ try {
39
+ const response = await elasticsearch.indices.exists({
40
+ index
41
+ });
42
+
43
+ if (response.body) {
44
+ return;
45
+ }
46
+
47
+ await elasticsearch.indices.create({
48
+ index,
49
+ body: plugin.body
50
+ });
51
+ } catch (ex) {
52
+ throw new _error.default(ex.message || "Could not create Elasticsearch index for the Form Builder.", ex.code || "FB_ELASTICSEARCH_INDEX_ERROR", {
53
+ error: ex,
54
+ type: _FormElasticsearchIndexPlugin.FormElasticsearchIndexPlugin.type,
55
+ locale,
56
+ tenant,
57
+ index,
58
+ body: plugin.body
59
+ });
60
+ }
61
+ };
62
+
63
+ exports.createElasticsearchIndex = createElasticsearchIndex;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createElasticsearchIndex","params","elasticsearch","plugins","container","locale","tenant","plugin","getLastAddedIndexPlugin","type","FormElasticsearchIndexPlugin","index","configurations","es","response","indices","exists","body","create","ex","WebinyError","message","code","error"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import { Client } from \"@elastic/elasticsearch\";\nimport { getLastAddedIndexPlugin } from \"@webiny/api-elasticsearch\";\nimport { FormElasticsearchIndexPlugin } from \"~/plugins/FormElasticsearchIndexPlugin\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport WebinyError from \"@webiny/error\";\nimport { configurations } from \"~/configurations\";\n\ninterface CreateElasticsearchIndexParams {\n elasticsearch: Client;\n plugins: PluginsContainer;\n tenant: string;\n locale: string;\n}\n\nexport const createElasticsearchIndex = async (params: CreateElasticsearchIndexParams) => {\n const { elasticsearch, plugins: container, locale, tenant } = params;\n\n const plugin = getLastAddedIndexPlugin<FormElasticsearchIndexPlugin>({\n container,\n type: FormElasticsearchIndexPlugin.type,\n locale\n });\n\n const { index } = configurations.es({\n locale,\n tenant\n });\n\n try {\n const response = await elasticsearch.indices.exists({\n index\n });\n if (response.body) {\n return;\n }\n\n await elasticsearch.indices.create({\n index,\n body: plugin.body\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not create Elasticsearch index for the Form Builder.\",\n ex.code || \"FB_ELASTICSEARCH_INDEX_ERROR\",\n {\n error: ex,\n type: FormElasticsearchIndexPlugin.type,\n locale,\n tenant,\n index,\n body: plugin.body\n }\n );\n }\n};\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AASO,MAAMA,wBAAwB,GAAG,MAAOC,MAAP,IAAkD;EACtF,MAAM;IAAEC,aAAF;IAAiBC,OAAO,EAAEC,SAA1B;IAAqCC,MAArC;IAA6CC;EAA7C,IAAwDL,MAA9D;EAEA,MAAMM,MAAM,GAAG,IAAAC,yCAAA,EAAsD;IACjEJ,SADiE;IAEjEK,IAAI,EAAEC,0DAAA,CAA6BD,IAF8B;IAGjEJ;EAHiE,CAAtD,CAAf;;EAMA,MAAM;IAAEM;EAAF,IAAYC,8BAAA,CAAeC,EAAf,CAAkB;IAChCR,MADgC;IAEhCC;EAFgC,CAAlB,CAAlB;;EAKA,IAAI;IACA,MAAMQ,QAAQ,GAAG,MAAMZ,aAAa,CAACa,OAAd,CAAsBC,MAAtB,CAA6B;MAChDL;IADgD,CAA7B,CAAvB;;IAGA,IAAIG,QAAQ,CAACG,IAAb,EAAmB;MACf;IACH;;IAED,MAAMf,aAAa,CAACa,OAAd,CAAsBG,MAAtB,CAA6B;MAC/BP,KAD+B;MAE/BM,IAAI,EAAEV,MAAM,CAACU;IAFkB,CAA7B,CAAN;EAIH,CAZD,CAYE,OAAOE,EAAP,EAAW;IACT,MAAM,IAAIC,cAAJ,CACFD,EAAE,CAACE,OAAH,IAAc,4DADZ,EAEFF,EAAE,CAACG,IAAH,IAAW,8BAFT,EAGF;MACIC,KAAK,EAAEJ,EADX;MAEIV,IAAI,EAAEC,0DAAA,CAA6BD,IAFvC;MAGIJ,MAHJ;MAIIC,MAJJ;MAKIK,KALJ;MAMIM,IAAI,EAAEV,MAAM,CAACU;IANjB,CAHE,CAAN;EAYH;AACJ,CAxCM"}