@decaf-ts/for-fabric 0.12.7 → 0.12.8

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 (130) hide show
  1. package/README.md +177 -146
  2. package/dist/for-fabric.cjs +1 -1
  3. package/dist/for-fabric.cjs.map +1 -1
  4. package/dist/for-fabric.js +1 -1
  5. package/dist/for-fabric.js.map +1 -1
  6. package/lib/cjs/cli-module.cjs +105 -1
  7. package/lib/cjs/cli-module.cjs.map +1 -1
  8. package/lib/cjs/client/indexes/generation.cjs +7 -2
  9. package/lib/cjs/client/indexes/generation.cjs.map +1 -1
  10. package/lib/cjs/contract/OtherLeafletContract.cjs +72 -0
  11. package/lib/cjs/contract/OtherLeafletContract.cjs.map +1 -0
  12. package/lib/cjs/contract/OtherLeafletFileContract.cjs +76 -0
  13. package/lib/cjs/contract/OtherLeafletFileContract.cjs.map +1 -0
  14. package/lib/cjs/contract/index.cjs +17 -18
  15. package/lib/cjs/contract/index.cjs.map +1 -1
  16. package/lib/cjs/contract/models/OtherAudit.cjs +1 -1
  17. package/lib/cjs/contract/models/OtherAudit.cjs.map +1 -1
  18. package/lib/cjs/contract/models/OtherBatchShared.cjs +135 -26
  19. package/lib/cjs/contract/models/OtherBatchShared.cjs.map +1 -1
  20. package/lib/cjs/contract/models/OtherLeaflet.cjs +1 -1
  21. package/lib/cjs/contract/models/OtherLeaflet.cjs.map +1 -1
  22. package/lib/cjs/contract/models/OtherLeafletFile.cjs +1 -1
  23. package/lib/cjs/contract/models/OtherLeafletFile.cjs.map +1 -1
  24. package/lib/cjs/contract/models/OtherMarket.cjs +1 -1
  25. package/lib/cjs/contract/models/OtherMarket.cjs.map +1 -1
  26. package/lib/cjs/contract/models/OtherProduct.cjs +1 -1
  27. package/lib/cjs/contract/models/OtherProduct.cjs.map +1 -1
  28. package/lib/cjs/contract/models/OtherProductImage.cjs +1 -1
  29. package/lib/cjs/contract/models/OtherProductImage.cjs.map +1 -1
  30. package/lib/cjs/contract/models/OtherProductShared.cjs +1 -1
  31. package/lib/cjs/contract/models/OtherProductShared.cjs.map +1 -1
  32. package/lib/cjs/contract/models/OtherProductStrength.cjs +1 -3
  33. package/lib/cjs/contract/models/OtherProductStrength.cjs.map +1 -1
  34. package/lib/cjs/contract/trackedModels/History.cjs +81 -0
  35. package/lib/cjs/contract/trackedModels/History.cjs.map +1 -0
  36. package/lib/cjs/contract/trackedModels/OtherAudit.cjs +124 -0
  37. package/lib/cjs/contract/trackedModels/OtherAudit.cjs.map +1 -0
  38. package/lib/cjs/contract/trackedModels/OtherLeaflet.cjs +121 -0
  39. package/lib/cjs/contract/trackedModels/OtherLeaflet.cjs.map +1 -0
  40. package/lib/cjs/contract/trackedModels/OtherLeafletFile.cjs +71 -0
  41. package/lib/cjs/contract/trackedModels/OtherLeafletFile.cjs.map +1 -0
  42. package/lib/cjs/contract/trackedModels/OtherMarket.cjs +90 -0
  43. package/lib/cjs/contract/trackedModels/OtherMarket.cjs.map +1 -0
  44. package/lib/cjs/contract/trackedModels/OtherProduct.cjs +83 -0
  45. package/lib/cjs/contract/trackedModels/OtherProduct.cjs.map +1 -0
  46. package/lib/cjs/contract/trackedModels/OtherProductImage.cjs +65 -0
  47. package/lib/cjs/contract/trackedModels/OtherProductImage.cjs.map +1 -0
  48. package/lib/cjs/contract/trackedModels/OtherProductShared.cjs +105 -0
  49. package/lib/cjs/contract/trackedModels/OtherProductShared.cjs.map +1 -0
  50. package/lib/cjs/contract/trackedModels/OtherProductStrength.cjs +91 -0
  51. package/lib/cjs/contract/trackedModels/OtherProductStrength.cjs.map +1 -0
  52. package/lib/cjs/contracts/fabric-overrides.cjs.map +1 -1
  53. package/lib/cjs/version.cjs +1 -1
  54. package/lib/esm/cli-module.js +105 -1
  55. package/lib/esm/cli-module.js.map +1 -1
  56. package/lib/esm/client/fabric-hsm.js.map +1 -1
  57. package/lib/esm/client/indexes/generation.js +7 -2
  58. package/lib/esm/client/indexes/generation.js.map +1 -1
  59. package/lib/esm/contract/OtherLeafletContract.js +63 -0
  60. package/lib/esm/contract/OtherLeafletContract.js.map +1 -0
  61. package/lib/esm/contract/OtherLeafletFileContract.js +67 -0
  62. package/lib/esm/contract/OtherLeafletFileContract.js.map +1 -0
  63. package/lib/esm/contract/index.js +17 -18
  64. package/lib/esm/contract/index.js.map +1 -1
  65. package/lib/esm/contract/models/OtherAudit.js +1 -1
  66. package/lib/esm/contract/models/OtherAudit.js.map +1 -1
  67. package/lib/esm/contract/models/OtherBatchShared.js +138 -30
  68. package/lib/esm/contract/models/OtherBatchShared.js.map +1 -1
  69. package/lib/esm/contract/models/OtherLeaflet.js +1 -1
  70. package/lib/esm/contract/models/OtherLeaflet.js.map +1 -1
  71. package/lib/esm/contract/models/OtherLeafletFile.js +1 -1
  72. package/lib/esm/contract/models/OtherLeafletFile.js.map +1 -1
  73. package/lib/esm/contract/models/OtherMarket.js +1 -1
  74. package/lib/esm/contract/models/OtherMarket.js.map +1 -1
  75. package/lib/esm/contract/models/OtherProduct.js +1 -1
  76. package/lib/esm/contract/models/OtherProduct.js.map +1 -1
  77. package/lib/esm/contract/models/OtherProductImage.js +1 -1
  78. package/lib/esm/contract/models/OtherProductImage.js.map +1 -1
  79. package/lib/esm/contract/models/OtherProductShared.js +1 -1
  80. package/lib/esm/contract/models/OtherProductShared.js.map +1 -1
  81. package/lib/esm/contract/models/OtherProductStrength.js +1 -3
  82. package/lib/esm/contract/models/OtherProductStrength.js.map +1 -1
  83. package/lib/esm/contract/trackedModels/History.js +72 -0
  84. package/lib/esm/contract/trackedModels/History.js.map +1 -0
  85. package/lib/esm/contract/trackedModels/OtherAudit.js +115 -0
  86. package/lib/esm/contract/trackedModels/OtherAudit.js.map +1 -0
  87. package/lib/esm/contract/trackedModels/OtherLeaflet.js +112 -0
  88. package/lib/esm/contract/trackedModels/OtherLeaflet.js.map +1 -0
  89. package/lib/esm/contract/trackedModels/OtherLeafletFile.js +62 -0
  90. package/lib/esm/contract/trackedModels/OtherLeafletFile.js.map +1 -0
  91. package/lib/esm/contract/trackedModels/OtherMarket.js +81 -0
  92. package/lib/esm/contract/trackedModels/OtherMarket.js.map +1 -0
  93. package/lib/esm/contract/trackedModels/OtherProduct.js +74 -0
  94. package/lib/esm/contract/trackedModels/OtherProduct.js.map +1 -0
  95. package/lib/esm/contract/trackedModels/OtherProductImage.js +56 -0
  96. package/lib/esm/contract/trackedModels/OtherProductImage.js.map +1 -0
  97. package/lib/esm/contract/trackedModels/OtherProductShared.js +96 -0
  98. package/lib/esm/contract/trackedModels/OtherProductShared.js.map +1 -0
  99. package/lib/esm/contract/trackedModels/OtherProductStrength.js +82 -0
  100. package/lib/esm/contract/trackedModels/OtherProductStrength.js.map +1 -0
  101. package/lib/esm/contracts/fabric-overrides.js +2 -2
  102. package/lib/esm/contracts/fabric-overrides.js.map +1 -1
  103. package/lib/esm/version.js +1 -1
  104. package/lib/types/contract/OtherLeafletContract.d.cts +18 -0
  105. package/lib/types/contract/OtherLeafletContract.d.mts +18 -0
  106. package/lib/types/contract/OtherLeafletFileContract.d.cts +17 -0
  107. package/lib/types/contract/OtherLeafletFileContract.d.mts +17 -0
  108. package/lib/types/contract/models/OtherBatchShared.d.cts +43 -6
  109. package/lib/types/contract/models/OtherBatchShared.d.mts +43 -6
  110. package/lib/types/contract/trackedModels/History.d.cts +9 -0
  111. package/lib/types/contract/trackedModels/History.d.mts +9 -0
  112. package/lib/types/contract/trackedModels/OtherAudit.d.cts +15 -0
  113. package/lib/types/contract/trackedModels/OtherAudit.d.mts +15 -0
  114. package/lib/types/contract/trackedModels/OtherLeaflet.d.cts +16 -0
  115. package/lib/types/contract/trackedModels/OtherLeaflet.d.mts +16 -0
  116. package/lib/types/contract/trackedModels/OtherLeafletFile.d.cts +10 -0
  117. package/lib/types/contract/trackedModels/OtherLeafletFile.d.mts +10 -0
  118. package/lib/types/contract/trackedModels/OtherMarket.d.cts +13 -0
  119. package/lib/types/contract/trackedModels/OtherMarket.d.mts +13 -0
  120. package/lib/types/contract/trackedModels/OtherProduct.d.cts +12 -0
  121. package/lib/types/contract/trackedModels/OtherProduct.d.mts +12 -0
  122. package/lib/types/contract/trackedModels/OtherProductImage.d.cts +9 -0
  123. package/lib/types/contract/trackedModels/OtherProductImage.d.mts +9 -0
  124. package/lib/types/contract/trackedModels/OtherProductShared.d.cts +18 -0
  125. package/lib/types/contract/trackedModels/OtherProductShared.d.mts +18 -0
  126. package/lib/types/contract/trackedModels/OtherProductStrength.d.cts +12 -0
  127. package/lib/types/contract/trackedModels/OtherProductStrength.d.mts +12 -0
  128. package/lib/types/version.d.cts +1 -1
  129. package/lib/types/version.d.mts +1 -1
  130. package/package.json +16 -5
@@ -0,0 +1,72 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Model, model, required, } from "@decaf-ts/decorator-validation";
11
+ import { column, index, OrderDirection, pk, table } from "@decaf-ts/core";
12
+ import { BlockOperations, composed, OperationKeys, readonly, } from "@decaf-ts/db-decorators";
13
+ import { description, uses } from "@decaf-ts/decoration";
14
+ import { FabricFlavour, mirror, NamespaceCollection, sharedData, } from "./../../shared/index.js";
15
+ let History = class History extends Model {
16
+ constructor(model) {
17
+ super(model);
18
+ }
19
+ };
20
+ __decorate([
21
+ pk(),
22
+ mirror("ptp-history-mirror", "PharmaledgerassocMSP"),
23
+ composed(["table", "key", "version"], ":"),
24
+ description("Unique identifier of the history record."),
25
+ __metadata("design:type", String)
26
+ ], History.prototype, "id", void 0);
27
+ __decorate([
28
+ column(),
29
+ readonly(),
30
+ readonly(),
31
+ index([OrderDirection.ASC, OrderDirection.DSC]),
32
+ description("table this history object refers to"),
33
+ __metadata("design:type", String)
34
+ ], History.prototype, "table", void 0);
35
+ __decorate([
36
+ column(),
37
+ required(),
38
+ readonly(),
39
+ index([OrderDirection.ASC, OrderDirection.DSC]),
40
+ description("id of the original object"),
41
+ __metadata("design:type", String)
42
+ ], History.prototype, "key", void 0);
43
+ __decorate([
44
+ column(),
45
+ required(),
46
+ readonly(),
47
+ index([OrderDirection.ASC, OrderDirection.DSC]),
48
+ description("the version of the original object"),
49
+ __metadata("design:type", Number)
50
+ ], History.prototype, "version", void 0);
51
+ __decorate([
52
+ column(),
53
+ required(),
54
+ readonly(),
55
+ description("the object to keep history of"),
56
+ __metadata("design:type", Object)
57
+ ], History.prototype, "record", void 0);
58
+ History = __decorate([
59
+ description("Logs user activity for auditing purposes."),
60
+ uses(FabricFlavour),
61
+ BlockOperations([
62
+ OperationKeys.CREATE,
63
+ OperationKeys.UPDATE,
64
+ OperationKeys.DELETE,
65
+ ]),
66
+ table("history"),
67
+ sharedData(NamespaceCollection("ptp-history")),
68
+ model(),
69
+ __metadata("design:paramtypes", [Object])
70
+ ], History);
71
+ export { History };
72
+ //# sourceMappingURL=History.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"History.js","sourceRoot":"","sources":["../../../../src/contract/trackedModels/History.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,KAAK,EACL,KAAK,EAEL,QAAQ,GACT,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACL,eAAe,EACf,QAAQ,EACR,aAAa,EACb,QAAQ,GACT,MAAM,yBAAyB,CAAC;A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AAM;QACpB,aAAa,CAAC,MAAM;KACrB,CAAC;IACD,KAAK,CAAC,SAAS,CAAC;IAChB,UAAU,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAC9C,KAAK,EAAE;;GACK,OAAO,CAqCnB"}
@@ -0,0 +1,115 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { model, required, type, } from "@decaf-ts/decorator-validation";
11
+ import { BlockOperations, InternalError, OperationKeys, readonly, serialize, } from "@decaf-ts/db-decorators";
12
+ import { description, uses } from "@decaf-ts/decoration";
13
+ import { table, pk, createdBy, column, OrderDirection, index, uuid, defaultQueryAttr, } from "@decaf-ts/core";
14
+ import { BaseModel } from "./../models/BaseModel.js";
15
+ import { AuditOperations } from "./../models/constants.js";
16
+ import { FabricFlavour, mirror, NamespaceCollection, ownedBy, sharedData, transactionId, } from "./../../shared/index.js";
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
+ function uuidSeed(m, ...args) {
19
+ try {
20
+ return `${m.model}${m.action}${m.recordId}${m.userId}${m.transaction}${JSON.stringify(m.diffs)}`;
21
+ }
22
+ catch (e) {
23
+ throw new InternalError(`Failed to generate deterministic uuid: ${e}`);
24
+ }
25
+ }
26
+ let OtherAudit = class OtherAudit extends BaseModel {
27
+ constructor(model) {
28
+ super(model);
29
+ }
30
+ };
31
+ __decorate([
32
+ pk(),
33
+ uuid(uuidSeed),
34
+ mirror("mirror-collection", "PharmaledgerassocMSP"),
35
+ description("Unique identifier of the audit record."),
36
+ __metadata("design:type", String)
37
+ ], OtherAudit.prototype, "id", void 0);
38
+ __decorate([
39
+ column(),
40
+ required(),
41
+ readonly(),
42
+ index([OrderDirection.ASC, OrderDirection.DSC]),
43
+ description("model/entity affected by the action"),
44
+ defaultQueryAttr(),
45
+ __metadata("design:type", String)
46
+ ], OtherAudit.prototype, "model", void 0);
47
+ __decorate([
48
+ column(),
49
+ required(),
50
+ readonly(),
51
+ type(String),
52
+ index([OrderDirection.ASC, OrderDirection.DSC]),
53
+ description("Type of action performed by the user."),
54
+ __metadata("design:type", String)
55
+ ], OtherAudit.prototype, "action", void 0);
56
+ __decorate([
57
+ description("Id from the model recorded in the audit"),
58
+ column(),
59
+ index([OrderDirection.ASC, OrderDirection.DSC]),
60
+ required(),
61
+ defaultQueryAttr(),
62
+ __metadata("design:type", String)
63
+ ], OtherAudit.prototype, "recordId", void 0);
64
+ __decorate([
65
+ column(),
66
+ createdBy(),
67
+ index([OrderDirection.ASC, OrderDirection.DSC]),
68
+ description("Identifier of the user who performed the action."),
69
+ defaultQueryAttr(),
70
+ __metadata("design:type", String)
71
+ ], OtherAudit.prototype, "userId", void 0);
72
+ __decorate([
73
+ column(),
74
+ required(),
75
+ readonly(),
76
+ type(String),
77
+ index([OrderDirection.ASC, OrderDirection.DSC]),
78
+ description("Group or role of the user who performed the action."),
79
+ __metadata("design:type", String)
80
+ ], OtherAudit.prototype, "userGroup", void 0);
81
+ __decorate([
82
+ column(),
83
+ required(),
84
+ readonly(),
85
+ transactionId(),
86
+ description("the transaction the audit record was created in"),
87
+ __metadata("design:type", String)
88
+ ], OtherAudit.prototype, "transaction", void 0);
89
+ __decorate([
90
+ column(),
91
+ readonly(),
92
+ serialize(),
93
+ description("the diffs for the action."),
94
+ __metadata("design:type", Object)
95
+ ], OtherAudit.prototype, "diffs", void 0);
96
+ __decorate([
97
+ ownedBy(),
98
+ description("the owner (msp) of the audit log"),
99
+ __metadata("design:type", String)
100
+ ], OtherAudit.prototype, "owner", void 0);
101
+ OtherAudit = __decorate([
102
+ description("Logs user activity for auditing purposes."),
103
+ BlockOperations([
104
+ // OperationKeys.CREATE,
105
+ OperationKeys.UPDATE,
106
+ OperationKeys.DELETE,
107
+ ]),
108
+ uses(FabricFlavour),
109
+ sharedData(NamespaceCollection("decaf-namespace")),
110
+ table("audit"),
111
+ model(),
112
+ __metadata("design:paramtypes", [Object])
113
+ ], OtherAudit);
114
+ export { OtherAudit };
115
+ //# sourceMappingURL=OtherAudit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtherAudit.js","sourceRoot":"","sources":["../../../../src/contract/trackedModels/OtherAudit.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,KAAK,EAEL,QAAQ,EACR,IAAI,GACL,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,KAAK,EACL,EAAE,EACF,SAAS,EACT,MAAM,EACN,cAAc,EACd,KAAK,EACL,IAAI,EAEJ,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,iCAA4B;AAChD,OAAO,EAAE,eAAe,EAAE,iCAA4B;AACtD,OAAO,EACL,aAAa,EACb,MAAM,EACN,mBAAmB,EACnB,OAAO,EACP,UAAU,EACV,aAAa,GACd,gCAA2B;AAE5B,6DAA6D;AAC7D,SAAS,QAAQ,CAAC,CAAa,EAAE,GAAG,IAAyB;IAC3D,IAAI,CAAC;QACH,OAAO,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,MAAM,G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IAC/D,gBAAgB,EAAE;;0CACH;AAQhB;IANC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,QAAQ,EAAE;IACV,IAAI,CAAC,MAAM,CAAC;IACZ,KAAK,CAAC,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC/C,WAAW,CAAC,qDAAqD,CAAC;;6CAChD;AAOnB;IALC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,QAAQ,EAAE;IACV,aAAa,EAAE;IACf,WAAW,CAAC,iDAAiD,CAAC;;+CAC1C;AAMrB;IAJC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,SAAS,EAAE;IACX,WAAW,CAAC,2BAA2B,CAAC;;yCACb;AAI5B;IAFC,OAAO,EAAE;IACT,WAAW,CAAC,kCAAkC,CAAC;;yCACjC;AA5DJ,UAAU;IAVtB,WAAW,CAAC,2CAA2C,CAAC;IACxD,eAAe,CAAC;QACf,wBAAwB;QACxB,aAAa,CAAC,MAAM;QACpB,aAAa,CAAC,MAAM;KACrB,CAAC;IACD,IAAI,CAAC,aAAa,CAAC;IACnB,UAAU,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAClD,KAAK,CAAC,OAAO,CAAC;IACd,KAAK,EAAE;;GACK,UAAU,CAiEtB"}
@@ -0,0 +1,112 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { model, required } from "@decaf-ts/decorator-validation";
11
+ import { Cascade, column, defaultQueryAttr, index, oneToMany, oneToOne, OrderDirection, pk, table, } from "@decaf-ts/core";
12
+ import { composed, readonly } from "@decaf-ts/db-decorators";
13
+ import { description, uses } from "@decaf-ts/decoration";
14
+ import { BaseIdentifiedModel } from "./../models/BaseIdentifiedModel.js";
15
+ import { FabricFlavour, mirror, NamespaceCollection, ownedBy, sharedData, } from "./../../shared/index.js";
16
+ import { audit } from "./../models/decorators-private.js";
17
+ import { historyDec } from "./../models/history-dec.js";
18
+ import { gtin } from "./../models/gtin.js";
19
+ import { OtherLeafletFile } from "./OtherLeafletFile.js";
20
+ let Leaflet = class Leaflet extends BaseIdentifiedModel {
21
+ constructor(model) {
22
+ super(model);
23
+ this.leafletType = "leaflet";
24
+ }
25
+ compare(other, ...exceptions) {
26
+ return super.compare(other, ...[
27
+ ...new Set([
28
+ exceptions,
29
+ "updatedAt",
30
+ "updatedBy",
31
+ "otherFilesContent",
32
+ "xmlFileContent",
33
+ ]).values(),
34
+ ]);
35
+ }
36
+ };
37
+ __decorate([
38
+ pk(),
39
+ historyDec(),
40
+ mirror("mirror-collection", "PharmaledgerassocMSP"),
41
+ audit(Leaflet),
42
+ composed(["productCode", "batchNumber", "leafletType", "lang", "epiMarket"], ":", ["batchNumber", "epiMarket"]),
43
+ description("Unique identifier composed of product code, batch number, and language."),
44
+ __metadata("design:type", String)
45
+ ], Leaflet.prototype, "id", void 0);
46
+ __decorate([
47
+ gtin(),
48
+ column(),
49
+ required(),
50
+ readonly(),
51
+ index([OrderDirection.ASC, OrderDirection.DSC]),
52
+ description("GTIN code of the product associated with this leaflet."),
53
+ defaultQueryAttr(),
54
+ __metadata("design:type", String)
55
+ ], Leaflet.prototype, "productCode", void 0);
56
+ __decorate([
57
+ column(),
58
+ readonly(),
59
+ index([OrderDirection.ASC, OrderDirection.DSC]),
60
+ description("Batch number linked to the product, if applicable."),
61
+ defaultQueryAttr(),
62
+ __metadata("design:type", String)
63
+ ], Leaflet.prototype, "batchNumber", void 0);
64
+ __decorate([
65
+ column(),
66
+ required(),
67
+ readonly(),
68
+ index([OrderDirection.ASC, OrderDirection.DSC]),
69
+ description("Type category the leaflet belongs to."),
70
+ __metadata("design:type", String)
71
+ ], Leaflet.prototype, "leafletType", void 0);
72
+ __decorate([
73
+ column(),
74
+ required(),
75
+ readonly(),
76
+ index([OrderDirection.ASC, OrderDirection.DSC]),
77
+ description("Language code of the leaflet (e.g., 'en', 'pt', 'es')."),
78
+ __metadata("design:type", String)
79
+ ], Leaflet.prototype, "lang", void 0);
80
+ __decorate([
81
+ column(),
82
+ readonly(),
83
+ __metadata("design:type", String)
84
+ ], Leaflet.prototype, "epiMarket", void 0);
85
+ __decorate([
86
+ column(),
87
+ required(),
88
+ description("Main XML content of the electronic leaflet."),
89
+ oneToOne(() => OtherLeafletFile, { update: Cascade.CASCADE, delete: Cascade.CASCADE }, false),
90
+ description("file with the xml content of the leaflet"),
91
+ __metadata("design:type", Object)
92
+ ], Leaflet.prototype, "xmlFileContent", void 0);
93
+ __decorate([
94
+ oneToMany(() => OtherLeafletFile, { update: Cascade.CASCADE, delete: Cascade.CASCADE }, false),
95
+ description("List of additional files linked to the leaflet, such as PDFs or images."),
96
+ __metadata("design:type", Array)
97
+ ], Leaflet.prototype, "otherFilesContent", void 0);
98
+ __decorate([
99
+ ownedBy(),
100
+ description("the owner (msp) of the leaflet"),
101
+ __metadata("design:type", String)
102
+ ], Leaflet.prototype, "owner", void 0);
103
+ Leaflet = __decorate([
104
+ description("Represents the ePI leaflet linked to a specific product, batch, and language."),
105
+ uses(FabricFlavour),
106
+ table("other_leaflet"),
107
+ sharedData(NamespaceCollection("decaf-namespace")),
108
+ model(),
109
+ __metadata("design:paramtypes", [Object])
110
+ ], Leaflet);
111
+ export { Leaflet };
112
+ //# sourceMappingURL=OtherLeaflet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtherLeaflet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CACb;AAU3C;IARC,SAAS,CACR,GAAG,EAAE,CAAC,gBAAgB,EACtB,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,EACpD,KAAK,CACN;IACA,WAAW,CACV,yEAAyE,CAC1E;;kDACiD;AAIlD;IAFC,OAAO,EAAE;IACT,WAAW,CAAC,gCAAgC,CAAC;;sCAC/B;AAxEJ,OAAO;IAPnB,WAAW,CACV,+EAA+E,CAChF;IACA,IAAI,CAAC,aAAa,CAAC;IACnB,KAAK,CAAC,eAAe,CAAC;IACtB,UAAU,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAClD,KAAK,EAAE;;GACK,OAAO,CA+FnB"}
@@ -0,0 +1,62 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { model, required } from "@decaf-ts/decorator-validation";
11
+ import { column, index, OrderDirection, pk, table } from "@decaf-ts/core";
12
+ import { description, uses } from "@decaf-ts/decoration";
13
+ import { composed } from "@decaf-ts/db-decorators";
14
+ import { BaseIdentifiedModel } from "./../models/BaseIdentifiedModel.js";
15
+ import { FabricFlavour, mirror, NamespaceCollection, ownedBy, sharedData, } from "./../../shared/index.js";
16
+ let OtherLeafletFile = class OtherLeafletFile extends BaseIdentifiedModel {
17
+ constructor(model) {
18
+ super(model);
19
+ }
20
+ };
21
+ __decorate([
22
+ pk(),
23
+ mirror("mirror-collection", "PharmaledgerassocMSP"),
24
+ composed(["leafletId", "fileName"], ":"),
25
+ description("Unique identifier of the leaflet file."),
26
+ __metadata("design:type", String)
27
+ ], OtherLeafletFile.prototype, "id", void 0);
28
+ __decorate([
29
+ column(),
30
+ required(),
31
+ index([OrderDirection.ASC, OrderDirection.DSC]),
32
+ description("Identifier of the leaflet this file belongs to."),
33
+ __metadata("design:type", String)
34
+ ], OtherLeafletFile.prototype, "leafletId", void 0);
35
+ __decorate([
36
+ column(),
37
+ required(),
38
+ index([OrderDirection.ASC, OrderDirection.DSC]),
39
+ description("Name of the file, including its extension."),
40
+ __metadata("design:type", String)
41
+ ], OtherLeafletFile.prototype, "fileName", void 0);
42
+ __decorate([
43
+ column(),
44
+ required(),
45
+ description("Base64-encoded content of the file."),
46
+ __metadata("design:type", String)
47
+ ], OtherLeafletFile.prototype, "fileContent", void 0);
48
+ __decorate([
49
+ ownedBy(),
50
+ description("the owner (msp) of the leaflet"),
51
+ __metadata("design:type", String)
52
+ ], OtherLeafletFile.prototype, "owner", void 0);
53
+ OtherLeafletFile = __decorate([
54
+ description("Represents an additional file associated with a leaflet, such as a PDF or image."),
55
+ uses(FabricFlavour),
56
+ table("other_leaflet_file"),
57
+ sharedData(NamespaceCollection("decaf-namespace")),
58
+ model(),
59
+ __metadata("design:paramtypes", [Object])
60
+ ], OtherLeafletFile);
61
+ export { OtherLeafletFile };
62
+ //# sourceMappingURL=OtherLeafletFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtherLeafletFile.js","sourceRoot":"","sources":["../../../../src/contract/trackedModels/OtherLeafletFile.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC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+B5B"}
@@ -0,0 +1,81 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { maxlength, minlength, model, required, } from "@decaf-ts/decorator-validation";
11
+ import { column, defaultQueryAttr, index, OrderDirection, pk, table, } from "@decaf-ts/core";
12
+ import { composed, version } from "@decaf-ts/db-decorators";
13
+ import { description, uses } from "@decaf-ts/decoration";
14
+ import { BaseIdentifiedModel } from "./../models/BaseIdentifiedModel.js";
15
+ import { gtin } from "./../models/gtin.js";
16
+ import { FabricFlavour, mirror, NamespaceCollection, sharedData, } from "./../../shared/index.js";
17
+ import { historyDec } from "./../models/history-dec.js";
18
+ let OtherMarket = class OtherMarket extends BaseIdentifiedModel {
19
+ constructor(model) {
20
+ super(model);
21
+ }
22
+ };
23
+ __decorate([
24
+ pk({ type: String, generated: false }),
25
+ historyDec(),
26
+ mirror("mirror-collection", "PharmaledgerassocMSP"),
27
+ composed(["productCode", "marketId"], ":", true),
28
+ description("Unique identifier composed of product code and market ID."),
29
+ __metadata("design:type", String)
30
+ ], OtherMarket.prototype, "id", void 0);
31
+ __decorate([
32
+ column(),
33
+ required(),
34
+ defaultQueryAttr(),
35
+ index([OrderDirection.ASC, OrderDirection.DSC]),
36
+ description("Identifier of the market where the product is registered or sold."),
37
+ __metadata("design:type", String)
38
+ ], OtherMarket.prototype, "marketId", void 0);
39
+ __decorate([
40
+ column(),
41
+ gtin(),
42
+ required(),
43
+ defaultQueryAttr(),
44
+ __metadata("design:type", String)
45
+ ], OtherMarket.prototype, "productCode", void 0);
46
+ __decorate([
47
+ column(),
48
+ minlength(2),
49
+ maxlength(2),
50
+ description("Two-letter national code (ISO format) representing the market's country."),
51
+ __metadata("design:type", String)
52
+ ], OtherMarket.prototype, "nationalCode", void 0);
53
+ __decorate([
54
+ column(),
55
+ description("Name of the Marketing Authorization Holder (MAH)."),
56
+ __metadata("design:type", String)
57
+ ], OtherMarket.prototype, "mahName", void 0);
58
+ __decorate([
59
+ column(),
60
+ description("Name of the legal entity responsible for the product in this market."),
61
+ __metadata("design:type", String)
62
+ ], OtherMarket.prototype, "legalEntityName", void 0);
63
+ __decorate([
64
+ column(),
65
+ description("Address of the Marketing Authorization Holder or responsible legal entity."),
66
+ __metadata("design:type", String)
67
+ ], OtherMarket.prototype, "mahAddress", void 0);
68
+ __decorate([
69
+ version(),
70
+ __metadata("design:type", Number)
71
+ ], OtherMarket.prototype, "counter", void 0);
72
+ OtherMarket = __decorate([
73
+ sharedData(NamespaceCollection("decaf-namespace")),
74
+ description("Links a product to a specific market."),
75
+ uses(FabricFlavour),
76
+ table("other_market"),
77
+ model(),
78
+ __metadata("design:paramtypes", [Object])
79
+ ], OtherMarket);
80
+ export { OtherMarket };
81
+ //# sourceMappingURL=OtherMarket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtherMarket.js","sourceRoot":"","sources":["../../../../src/contract/trackedModels/OtherMarket.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EACL,SAAS,EACT,SAAS,EACT,KAAK,EACL,QAAQ,GACT,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,EAAE,EACF,KAAK,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO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AGpB;IADC,OAAO,EAAE;;4CACO;AAhDN,WAAW;IALvB,UAAU,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAClD,WAAW,CAAC,uCAAuC,CAAC;IACpD,IAAI,CAAC,aAAa,CAAC;IACnB,KAAK,CAAC,cAAc,CAAC;IACrB,KAAK,EAAE;;GACK,WAAW,CAqDvB"}
@@ -0,0 +1,74 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { model, required } from "@decaf-ts/decorator-validation";
11
+ import { column, index, OrderDirection, pk, table } from "@decaf-ts/core";
12
+ // import {BlockOperations, OperationKeys, readonly} from "@decaf-ts/db-decorators";
13
+ import { uses } from "@decaf-ts/decoration";
14
+ import { BaseIdentifiedModel } from "./../models/BaseIdentifiedModel.js";
15
+ import { gtin } from "./../models/gtin.js";
16
+ import { audit } from "./../models/decorators.js";
17
+ import { FabricFlavour, mirror, ownedBy, privateData, } from "./../../shared/index.js";
18
+ import { version } from "@decaf-ts/db-decorators";
19
+ import { historyDec } from "./../models/history-dec.js";
20
+ let OtherProduct = class OtherProduct extends BaseIdentifiedModel {
21
+ constructor(args) {
22
+ super(args);
23
+ this.productRecall = false;
24
+ }
25
+ };
26
+ __decorate([
27
+ pk(),
28
+ gtin(),
29
+ historyDec(),
30
+ mirror("mirror-collection", "PharmaledgerassocMSP"),
31
+ audit(OtherProduct),
32
+ __metadata("design:type", String)
33
+ ], OtherProduct.prototype, "productCode", void 0);
34
+ __decorate([
35
+ column(),
36
+ required(),
37
+ index([OrderDirection.ASC, OrderDirection.DSC]),
38
+ __metadata("design:type", String)
39
+ ], OtherProduct.prototype, "inventedName", void 0);
40
+ __decorate([
41
+ column(),
42
+ required(),
43
+ index([OrderDirection.ASC, OrderDirection.DSC]),
44
+ __metadata("design:type", String)
45
+ ], OtherProduct.prototype, "nameMedicinalProduct", void 0);
46
+ __decorate([
47
+ column(),
48
+ __metadata("design:type", String)
49
+ ], OtherProduct.prototype, "internalMaterialCode", void 0);
50
+ __decorate([
51
+ column(),
52
+ index([OrderDirection.ASC, OrderDirection.DSC]),
53
+ __metadata("design:type", Boolean)
54
+ ], OtherProduct.prototype, "productRecall", void 0);
55
+ __decorate([
56
+ version(),
57
+ __metadata("design:type", Number)
58
+ ], OtherProduct.prototype, "counter", void 0);
59
+ __decorate([
60
+ column(),
61
+ ownedBy(),
62
+ __metadata("design:type", String)
63
+ ], OtherProduct.prototype, "ownedBy", void 0);
64
+ OtherProduct = __decorate([
65
+ privateData(),
66
+ uses(FabricFlavour)
67
+ // @BlockOperations([OperationKeys.DELETE])
68
+ ,
69
+ table("other_product"),
70
+ model(),
71
+ __metadata("design:paramtypes", [Object])
72
+ ], OtherProduct);
73
+ export { OtherProduct };
74
+ //# sourceMappingURL=OtherProduct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtherProduct.js","sourceRoot":"","sources":["../../../../src/contract/trackedModels/OtherProduct.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC1E,oFAAoF;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EA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
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { model, required } from "@decaf-ts/decorator-validation";
11
+ import { column, defaultQueryAttr, pk, table } from "@decaf-ts/core";
12
+ // import {BlockOperations, OperationKeys, readonly} from "@decaf-ts/db-decorators";
13
+ import { uses } from "@decaf-ts/decoration";
14
+ import { gtin } from "./../models/gtin.js";
15
+ import { historyDec } from "./../models/history-dec.js";
16
+ import { version } from "@decaf-ts/db-decorators";
17
+ import { FabricFlavour, mirror, NamespaceCollection, ownedBy, sharedData, } from "./../../shared/index.js";
18
+ import { BaseIdentifiedModel } from "./../models/BaseIdentifiedModel.js";
19
+ let OtherProductImage = class OtherProductImage extends BaseIdentifiedModel {
20
+ constructor(model) {
21
+ super(model);
22
+ }
23
+ };
24
+ __decorate([
25
+ pk(),
26
+ historyDec(),
27
+ gtin(),
28
+ defaultQueryAttr(),
29
+ mirror("mirror-collection", "PharmaledgerassocMSP"),
30
+ __metadata("design:type", String)
31
+ ], OtherProductImage.prototype, "productCode", void 0);
32
+ __decorate([
33
+ column(),
34
+ required(),
35
+ defaultQueryAttr(),
36
+ __metadata("design:type", String)
37
+ ], OtherProductImage.prototype, "content", void 0);
38
+ __decorate([
39
+ ownedBy(),
40
+ __metadata("design:type", String)
41
+ ], OtherProductImage.prototype, "owner", void 0);
42
+ __decorate([
43
+ version(),
44
+ __metadata("design:type", Number)
45
+ ], OtherProductImage.prototype, "counter", void 0);
46
+ OtherProductImage = __decorate([
47
+ sharedData(NamespaceCollection("decaf-namespace")),
48
+ uses(FabricFlavour)
49
+ // @BlockOperations([OperationKeys.DELETE])
50
+ ,
51
+ table("other_product_image"),
52
+ model(),
53
+ __metadata("design:paramtypes", [Object])
54
+ ], OtherProductImage);
55
+ export { OtherProductImage };
56
+ //# sourceMappingURL=OtherProductImage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtherProductImage.js","sourceRoot":"","sources":["../../../../src/contract/trackedModels/OtherProductImage.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrE,oFAAoF;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,4BAAuB;AACtC,OAAO,EAAE,UAAU,EAAE,mCAA8B;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EACL,aAAa,EACb,MAAM,EACN,mBAAmB,EACnB,OAAO,EACP,UAAU,GACX,gCAA2B;AAC5B,OAAO,EAAE,mBAAmB,EAAE,2CAAsC;AAO7D,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,mBAAmB;IAmBxD,YAAY,KAAmC;QAC7C,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;CACF,CAAA;AAhBC;IALC,EAAE,EAAE;IACJ,UAAU,EAAE;IACZ,IAAI,EAAE;IACN,gBAAgB,EAAE;IAClB,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC;;sDAC/B;AAKrB;IAHC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,gBAAgB,EAAE;;kDACF;AAGjB;IADC,OAAO,EAAE;;gDACK;AAGf;IADC,OAAO,EAAE;;kDACO;AAjBN,iBAAiB;IAL7B,UAAU,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAClD,IAAI,CAAC,aAAa,CAAC;IACpB,2CAA2C;;IAC1C,KAAK,CAAC,qBAAqB,CAAC;IAC5B,KAAK,EAAE;;GACK,iBAAiB,CAsB7B"}