@artstesh/postboy 2.1.10 → 3.0.0

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 (71) hide show
  1. package/README.md +27 -68
  2. package/lib/index.d.ts +2 -3
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +2 -3
  5. package/lib/index.js.map +1 -1
  6. package/lib/models/message-queue.model.js +2 -2
  7. package/lib/models/message-queue.model.js.map +1 -1
  8. package/lib/models/postboy-callback.message.d.ts +18 -0
  9. package/lib/models/postboy-callback.message.d.ts.map +1 -1
  10. package/lib/models/postboy-callback.message.js +18 -0
  11. package/lib/models/postboy-callback.message.js.map +1 -1
  12. package/lib/models/postboy-executor.d.ts +2 -2
  13. package/lib/models/postboy-executor.d.ts.map +1 -1
  14. package/lib/models/postboy-executor.js +2 -2
  15. package/lib/models/postboy-executor.js.map +1 -1
  16. package/lib/models/postboy-generic-message.d.ts +2 -2
  17. package/lib/models/postboy-generic-message.d.ts.map +1 -1
  18. package/lib/models/postboy-generic-message.js +2 -4
  19. package/lib/models/postboy-generic-message.js.map +1 -1
  20. package/lib/models/postboy-middleware.d.ts +5 -0
  21. package/lib/models/postboy-middleware.d.ts.map +1 -0
  22. package/lib/models/{postboy-bbb.js → postboy-middleware.js} +1 -1
  23. package/lib/models/postboy-middleware.js.map +1 -0
  24. package/lib/models/postboy.message.d.ts +4 -0
  25. package/lib/models/postboy.message.d.ts.map +1 -0
  26. package/lib/models/postboy.message.js +10 -0
  27. package/lib/models/postboy.message.js.map +1 -0
  28. package/lib/models/queue.d.ts +11 -0
  29. package/lib/models/queue.d.ts.map +1 -0
  30. package/lib/models/queue.js +34 -0
  31. package/lib/models/queue.js.map +1 -0
  32. package/lib/postboy-abstract.registrator.d.ts +0 -24
  33. package/lib/postboy-abstract.registrator.d.ts.map +1 -1
  34. package/lib/postboy-abstract.registrator.js +0 -33
  35. package/lib/postboy-abstract.registrator.js.map +1 -1
  36. package/lib/postboy.service.d.ts +25 -42
  37. package/lib/postboy.service.d.ts.map +1 -1
  38. package/lib/postboy.service.js +50 -71
  39. package/lib/postboy.service.js.map +1 -1
  40. package/package.json +2 -4
  41. package/lib/locker.store.d.ts +0 -9
  42. package/lib/locker.store.d.ts.map +0 -1
  43. package/lib/locker.store.js +0 -27
  44. package/lib/locker.store.js.map +0 -1
  45. package/lib/mocks/message-history-item-mock.d.ts +0 -10
  46. package/lib/mocks/message-history-item-mock.d.ts.map +0 -1
  47. package/lib/mocks/message-history-item-mock.js +0 -26
  48. package/lib/mocks/message-history-item-mock.js.map +0 -1
  49. package/lib/mocks/message-history-mock.d.ts +0 -9
  50. package/lib/mocks/message-history-mock.d.ts.map +0 -1
  51. package/lib/mocks/message-history-mock.js +0 -24
  52. package/lib/mocks/message-history-mock.js.map +0 -1
  53. package/lib/mocks/postboy-service-mock.d.ts +0 -22
  54. package/lib/mocks/postboy-service-mock.d.ts.map +0 -1
  55. package/lib/mocks/postboy-service-mock.js +0 -51
  56. package/lib/mocks/postboy-service-mock.js.map +0 -1
  57. package/lib/models/dictionary.d.ts +0 -18
  58. package/lib/models/dictionary.d.ts.map +0 -1
  59. package/lib/models/dictionary.js +0 -59
  60. package/lib/models/dictionary.js.map +0 -1
  61. package/lib/models/id-generator.d.ts +0 -4
  62. package/lib/models/id-generator.d.ts.map +0 -1
  63. package/lib/models/id-generator.js +0 -14
  64. package/lib/models/id-generator.js.map +0 -1
  65. package/lib/models/postboy-bbb.d.ts +0 -4
  66. package/lib/models/postboy-bbb.d.ts.map +0 -1
  67. package/lib/models/postboy-bbb.js.map +0 -1
  68. package/lib/models/postboy.locker.d.ts +0 -6
  69. package/lib/models/postboy.locker.d.ts.map +0 -1
  70. package/lib/models/postboy.locker.js +0 -3
  71. package/lib/models/postboy.locker.js.map +0 -1
package/README.md CHANGED
@@ -1,81 +1,40 @@
1
- The `@artstesh/postboy` library is designed to simplify the development of TypeScript applications using an event-driven approach. It provides convenient tools for working with the `rxjs` library, managing events, and handling dependencies, allowing developers to focus on business logic rather than boilerplate.
1
+ # Introduction
2
2
 
3
- ## Purpose of the Library
3
+ ## 1.1. About the Library
4
+ Modern web development often feels like a survival race: components are scattered across dependency trees, services communicate through layers of abstraction, and events multiply like rabbits in the Australian outback. In this chaos, managing communication isn’t just a task—it’s an art of balancing flexibility and order.
4
5
 
5
- In complex applications a developer always faces with a huge amount of services, subscriptions and, as a result, with a long list of dependencies in components of the system. Some services have to combine their own logic with providing of subscriptions, other exist only to define a list of observations to link components of the system. It is getting harder to support so many dependencies, testing becomes a nightmare add... to say the truth, it looks bad) Plus, it is neccessary to close all the subs properly to avoid memory leaks...
6
+ **Postboy** was born from this chaos. It’s not just another RxJS-based Event Bus—it’s an attempt to bridge the gap between the power of reactive programming and everyday simplicity. Over years of working with Angular, I’ve watched standard event-handling approaches drown in boilerplate code, while complex state managers morphed into impenetrable "black boxes." Postboy is my answer to these challenges.
6
7
 
7
- `@artstesh/postboy` is a tool aimed at reducing this complexity by removing repetitive tasks from development. It focuses on minimizing boilerplate code and eliminating issues such as subscription leaks and improper dependency handling.
8
+ **Key Features:**
9
+ - Lightweight architecture with zero hidden dependencies.
10
+ - Flexible messaging system backed by TypeScript typing.
11
+ - Middleware for intercepting and transforming events (logging, validation, metrics).
12
+ - Async operations and callback management tools.
13
+ - Reactive patterns out of the box: ReplaySubject, BehaviorSubject, and more.
8
14
 
9
- ## Key Features
15
+ Postboy doesn’t aim to replace NgRx or Akita—it solves a narrower set of problems but does so with minimal entry barriers.
10
16
 
11
- 1. **Event-Driven Architecture**
12
- Enables creating event-based applications with minimal overhead and explicit subscription management. This is especially useful for large-scale applications where data delivery and reaction to events play a critical role.
17
+ ---
13
18
 
14
- 2. **Integration with `rxjs`**
15
- Reactive programming is supported out of the box. This enables easy use of `rxjs` to process events.
19
+ ## 1.2. Core Concepts
20
+ Imagine Postboy as your app’s postal service. Here’s how it works:
16
21
 
17
- 3. **Dependency Management**
18
- The library simplifies dependency handling by providing an efficient mechanism for managing them.
22
+ - **Messages (PostboyMessage)**
23
+ These are data envelopes. Every message has a unique `ID` and can carry anything: a simple notification, a complex DTO, or even a `UserLoggedInEvent` or `DataFetchRequest`.
19
24
 
20
- 4. **Seamless Integration**
21
- `@artstesh/postboy` can be easily integrated into existing TypeScript projects and helps structure applications into independent components with clear responsibilities for events and reactions.
25
+ - **Subscriptions**
26
+ Like subscribing to a magazine. Components register interest in specific message types and react when they "arrive in the mailbox."
22
27
 
23
- 5. **Modularity and Scalability**
24
- Thanks to its approach, the library is suitable for both small applications and large-scale projects with complex functionality.
28
+ - **Handlers (Executors)**
29
+ Special agents that execute synchronous tasks on demand. Need to fetch data from a store or validate permissions? An Executor handles it without event spaghetti.
25
30
 
26
- ## Usage Example
31
+ - **Middleware**
32
+ Customs officers inspecting every message at the border. Need to add auth headers or log errors? Middleware centralizes these tasks.
27
33
 
28
- Let’s take a look at a simple example to demonstrate how `@artstesh/postboy` can be used to handle events.
34
+ - **Registrators**
35
+ Archivists managing subscription lifecycles. They prevent memory leaks and keep your codebase tidy.
29
36
 
30
- ### The case
31
-
32
- Suppose we such a simple structure in an Angular application:
33
-
34
- <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNDAwIiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7IGZvbnQtZmFtaWx5OiBBcmlhbCwgc2Fucy1zZXJpZjsgZm9udC1zaXplOiAxNHB4OyI+DQogIDwhLS0gRmlyc3QgTGV2ZWwgQ29tcG9uZW50IC0tPg0KICA8cmVjdCB4PSIyMzAiIHk9IjIwIiB3aWR0aD0iMTQwIiBoZWlnaHQ9IjUwIiBmaWxsPSIjYzhlNmM5IiBzdHJva2U9IiMyZTdkMzIiIHN0cm9rZS13aWR0aD0iMiIgcng9IjYiPjwvcmVjdD4NCiAgPHRleHQgeD0iMzAwIiB5PSI1MCIg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4NCiAgPGxpbmUgeDE9IjQwMCIgeTE9IjE3MCIgeDI9IjQ2MCIgeTI9IjI0MCIgc3Ryb2tlPSIjNjA2MDYwIiBzdHJva2Utd2lkdGg9IjIiIG1hcmtlci1lbmQ9InVybCgjYXJyb3doZWFkKSI+PC9saW5lPg0KDQogIDwhLS0gQXJyb3doZWFkIG1hcmtlciAtLT4NCiAgPGRlZnM+DQogICAgPG1hcmtlciBpZD0iYXJyb3doZWFkIiBtYXJrZXJXaWR0aD0iMTAiIG1hcmtlckhlaWdodD0iNyIgcmVmWD0iMTAiIHJlZlk9IjMuNSIgb3JpZW50PSJhdXRvIj4NCiAgICAgIDxwb2x5Z29uIHBvaW50cz0iMCAwLCAxMCAzLjUsIDAgNyIgZmlsbD0iIzYwNjA2MCI+PC9wb2x5Z29uPg0KICAgIDwvbWFya2VyPg0KICA8L2RlZnM+DQo8L3N2Zz4NCg==">
35
-
36
- **Child B** contains a text input and **Child A** have show the value of the input.
37
-
38
- In a common case, we would create a specific service with an observable; but it alse means that we have to get an instance of the service in **Child A** and **Child B** and the service itself looks pretty bad - it is just a wrapper over the observable.
39
-
40
- *I don't event want to describe the idea of sending information through the parents - it is much more painful and dirty.
41
-
42
- ### The postboy approach
43
-
44
- ```typescript
45
- import {PostboyService} from '@artstesh/postboy';
46
-
47
- public class ChildA {
48
- constructor(private postboy: PostboyService) {
49
- }
50
-
51
- public ngOnInit(){
52
- this.postboy.sub(UserInputEvent).subscribe(ev => {
53
- console.log(ev.text);
54
- })
55
- }
56
- }
57
-
58
- public class ChildB {
59
- constructor(private postboy: PostboyService) {
60
- }
61
-
62
- public onInput(){
63
- this.postboy.fire(new UserInputEvent(this.text));
64
- }
65
- }
66
- ```
67
-
68
- ### Key Benefits of This Approach
69
-
70
- - Clear separation of event generation and event handling.
71
- - TypeScript interfaces ensure strict typing for the data passed between different parts of the application.
72
- - The members of the system know nothing about each other
73
- - No need to create specific mediators
74
-
75
- ## Advantages of the Library
76
-
77
- - **Simplicity:** Clear structure for managing events and their processing.
78
- - **Safety:** TypeScript ensures type-safety, minimizing potential errors.
79
- - **Flexibility:** `rxjs` integration allows advanced event processing, such as filtering, pre-processing, and combining event streams.
80
- - **Scalability:** Code becomes clean and easy to extend without introducing unnecessary complexity.
37
+ ---
81
38
 
39
+ ### Why Does It Work?
40
+ Over the past five years, I’ve built dozens of enterprise apps. One recurring issue? Logic fragmentation. Components communicate via `@Output()` chains and services until a single button change breaks three screens. Postboy offers an alternative: a centralized yet unobtrusive event bus that doesn’t demand architectural overhauls.
package/lib/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  export * from './postboy.service';
2
- export * from './mocks/postboy-service-mock';
3
2
  export * from './i-postboy-depending.service';
4
3
  export * from './postboy-abstract.registrator';
5
4
  export * from './models/postboy-generic-message';
6
5
  export * from './models/postboy-callback.message';
7
- export * from './models/postboy.locker';
8
6
  export * from './models/postboy-execution.handler';
9
7
  export * from './models/postboy-executor';
10
- export * from './models/message-queue.model';
8
+ export * from './models/postboy-middleware';
9
+ export * from './models/postboy.message';
11
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC"}
package/lib/index.js CHANGED
@@ -18,13 +18,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  __exportStar(require("./postboy.service"), exports);
21
- __exportStar(require("./mocks/postboy-service-mock"), exports);
22
21
  __exportStar(require("./i-postboy-depending.service"), exports);
23
22
  __exportStar(require("./postboy-abstract.registrator"), exports);
24
23
  __exportStar(require("./models/postboy-generic-message"), exports);
25
24
  __exportStar(require("./models/postboy-callback.message"), exports);
26
- __exportStar(require("./models/postboy.locker"), exports);
27
25
  __exportStar(require("./models/postboy-execution.handler"), exports);
28
26
  __exportStar(require("./models/postboy-executor"), exports);
29
- __exportStar(require("./models/message-queue.model"), exports);
27
+ __exportStar(require("./models/postboy-middleware"), exports);
28
+ __exportStar(require("./models/postboy.message"), exports);
30
29
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,mEAAiD;AACjD,oEAAkD;AAClD,0DAAwC;AACxC,qEAAmD;AACnD,4DAA0C;AAC1C,+DAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,gEAA8C;AAC9C,iEAA+C;AAC/C,mEAAiD;AACjD,oEAAkD;AAClD,qEAAmD;AACnD,4DAA0C;AAC1C,8DAA4C;AAC5C,2DAAyC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MessageQueue = void 0;
4
- const collections_1 = require("@artstesh/collections");
4
+ const queue_1 = require("./queue");
5
5
  class MessageQueue {
6
6
  /**
7
7
  * Gets the current data stored in the instance.
@@ -13,7 +13,7 @@ class MessageQueue {
13
13
  }
14
14
  constructor(cache = true) {
15
15
  this.cache = cache;
16
- this.queries = new collections_1.Queue();
16
+ this.queries = new queue_1.Queue();
17
17
  this._requestInProgress = true;
18
18
  this._data = null;
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"message-queue.model.js","sourceRoot":"","sources":["../../src/models/message-queue.model.ts"],"names":[],"mappings":";;;AACA,uDAA8C;AAE9C,MAAa,YAAY;IACvB;;;;OAIG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAMD,YAAoB,QAAiB,IAAI;QAArB,UAAK,GAAL,KAAK,CAAgB;QAJjC,YAAO,GAAqC,IAAI,mBAAK,EAA6B,CAAC;QACnF,uBAAkB,GAAY,IAAI,CAAC;QACnC,UAAK,GAAa,IAAI,CAAC;IAEa,CAAC;IAE7C;;;;;OAKG;IACI,KAAK;QACV,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACI,SAAS,CAAC,KAAgC;QAC/C,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;QAC5F,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,KAAgC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,IAAO;QACnB,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF;AA7DD,oCA6DC"}
1
+ {"version":3,"file":"message-queue.model.js","sourceRoot":"","sources":["../../src/models/message-queue.model.ts"],"names":[],"mappings":";;;AACA,mCAA8B;AAE9B,MAAa,YAAY;IACvB;;;;OAIG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAMD,YAAoB,QAAiB,IAAI;QAArB,UAAK,GAAL,KAAK,CAAgB;QAJjC,YAAO,GAAqC,IAAI,aAAK,EAA6B,CAAC;QACnF,uBAAkB,GAAY,IAAI,CAAC;QACnC,UAAK,GAAa,IAAI,CAAC;IAEa,CAAC;IAE7C;;;;;OAKG;IACI,KAAK;QACV,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACI,SAAS,CAAC,KAAgC;QAC/C,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;QAC5F,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,KAAgC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,IAAO;QACnB,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF;AA7DD,oCA6DC"}
@@ -1,5 +1,23 @@
1
1
  import { Observable, Subject } from 'rxjs';
2
2
  import { PostboyGenericMessage } from './postboy-generic-message';
3
+ /**
4
+ * An abstract class extending PostboyGenericMessage that provides mechanisms for managing
5
+ * asynchronous data communication using RxJS observables. It is designed to work with
6
+ * callback-based operations that emit a result of type T.
7
+ *
8
+ * @template T - The type of the data emitted by the observables in this class.
9
+ *
10
+ * @extends PostboyGenericMessage
11
+ *
12
+ * @property {Observable<T>} result - An observable that emits the result of the operation
13
+ * and completes once the operation is finished.
14
+ *
15
+ * @method next - Emits the next value for the result observable.
16
+ * @param {T} value - The value to be emitted by the result observable.
17
+ *
18
+ * @method finish - Emits the final value for the result observable and completes it.
19
+ * @param {T} value - The final value for the observable emission.
20
+ */
3
21
  export declare abstract class PostboyCallbackMessage<T> extends PostboyGenericMessage {
4
22
  protected result$: Subject<T>;
5
23
  result: Observable<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-callback.message.d.ts","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,8BAAsB,sBAAsB,CAAC,CAAC,CAAE,SAAQ,qBAAqB;IAC3E,SAAS,CAAC,OAAO,aAAoB;IAC9B,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAA+B;IAEpD,IAAI,UAAW,CAAC,KAAG,IAAI,CAA6B;IAEpD,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;CAI9B"}
1
+ {"version":3,"file":"postboy-callback.message.d.ts","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,sBAAsB,CAAC,CAAC,CAAE,SAAQ,qBAAqB;IAC3E,SAAS,CAAC,OAAO,aAAoB;IAC9B,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAA+B;IAEpD,IAAI,UAAW,CAAC,KAAG,IAAI,CAA6B;IAEpD,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;CAI9B"}
@@ -3,6 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostboyCallbackMessage = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const postboy_generic_message_1 = require("./postboy-generic-message");
6
+ /**
7
+ * An abstract class extending PostboyGenericMessage that provides mechanisms for managing
8
+ * asynchronous data communication using RxJS observables. It is designed to work with
9
+ * callback-based operations that emit a result of type T.
10
+ *
11
+ * @template T - The type of the data emitted by the observables in this class.
12
+ *
13
+ * @extends PostboyGenericMessage
14
+ *
15
+ * @property {Observable<T>} result - An observable that emits the result of the operation
16
+ * and completes once the operation is finished.
17
+ *
18
+ * @method next - Emits the next value for the result observable.
19
+ * @param {T} value - The value to be emitted by the result observable.
20
+ *
21
+ * @method finish - Emits the final value for the result observable and completes it.
22
+ * @param {T} value - The final value for the observable emission.
23
+ */
6
24
  class PostboyCallbackMessage extends postboy_generic_message_1.PostboyGenericMessage {
7
25
  constructor() {
8
26
  super(...arguments);
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-callback.message.js","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,uEAAkE;AAElE,MAAsB,sBAA0B,SAAQ,+CAAqB;IAA7E;;QACY,YAAO,GAAG,IAAI,cAAO,EAAK,CAAC;QAC9B,WAAM,GAAkB,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAEpD,SAAI,GAAG,CAAC,KAAQ,EAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAM7D,CAAC;IAJQ,MAAM,CAAC,KAAQ;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACF;AAVD,wDAUC"}
1
+ {"version":3,"file":"postboy-callback.message.js","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,uEAAkE;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAsB,sBAA0B,SAAQ,+CAAqB;IAA7E;;QACY,YAAO,GAAG,IAAI,cAAO,EAAK,CAAC;QAC9B,WAAM,GAAkB,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAEpD,SAAI,GAAG,CAAC,KAAQ,EAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAM7D,CAAC;IAJQ,MAAM,CAAC,KAAQ;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACF;AAVD,wDAUC"}
@@ -1,4 +1,4 @@
1
- import { PostboyGenericMessage } from './postboy-generic-message';
2
- export declare abstract class PostboyExecutor<T> extends PostboyGenericMessage {
1
+ import { PostboyMessage } from "./postboy.message";
2
+ export declare abstract class PostboyExecutor<T> extends PostboyMessage {
3
3
  }
4
4
  //# sourceMappingURL=postboy-executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-executor.d.ts","sourceRoot":"","sources":["../../src/models/postboy-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,8BAAsB,eAAe,CAAC,CAAC,CAAE,SAAQ,qBAAqB;CAAG"}
1
+ {"version":3,"file":"postboy-executor.d.ts","sourceRoot":"","sources":["../../src/models/postboy-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,8BAAsB,eAAe,CAAC,CAAC,CAAG,SAAQ,cAAc;CAAE"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostboyExecutor = void 0;
4
- const postboy_generic_message_1 = require("./postboy-generic-message");
5
- class PostboyExecutor extends postboy_generic_message_1.PostboyGenericMessage {
4
+ const postboy_message_1 = require("./postboy.message");
5
+ class PostboyExecutor extends postboy_message_1.PostboyMessage {
6
6
  }
7
7
  exports.PostboyExecutor = PostboyExecutor;
8
8
  //# sourceMappingURL=postboy-executor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-executor.js","sourceRoot":"","sources":["../../src/models/postboy-executor.ts"],"names":[],"mappings":";;;AAAA,uEAAkE;AAElE,MAAsB,eAAmB,SAAQ,+CAAqB;CAAG;AAAzE,0CAAyE"}
1
+ {"version":3,"file":"postboy-executor.js","sourceRoot":"","sources":["../../src/models/postboy-executor.ts"],"names":[],"mappings":";;;AAAA,uDAAiD;AAEjD,MAAsB,eAAoB,SAAQ,gCAAc;CAAE;AAAlE,0CAAkE"}
@@ -1,8 +1,8 @@
1
+ import { PostboyMessage } from "./postboy.message";
1
2
  /**
2
3
  * An inheritor should have a static ID field
3
4
  */
4
- export declare abstract class PostboyGenericMessage {
5
- get id(): string;
5
+ export declare abstract class PostboyGenericMessage extends PostboyMessage {
6
6
  }
7
7
  export declare function checkId(message: new (...args: any[]) => any): string;
8
8
  //# sourceMappingURL=postboy-generic-message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-generic-message.d.ts","sourceRoot":"","sources":["../../src/models/postboy-generic-message.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,8BAAsB,qBAAqB;IACzC,IAAW,EAAE,IAAI,MAAM,CAEtB;CACF;AACD,wBAAgB,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,MAAM,CAGpE"}
1
+ {"version":3,"file":"postboy-generic-message.d.ts","sourceRoot":"","sources":["../../src/models/postboy-generic-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,8BAAsB,qBAAsB,SAAQ,cAAc;CACjE;AACD,wBAAgB,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,MAAM,CAGpE"}
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkId = exports.PostboyGenericMessage = void 0;
4
+ const postboy_message_1 = require("./postboy.message");
4
5
  /**
5
6
  * An inheritor should have a static ID field
6
7
  */
7
- class PostboyGenericMessage {
8
- get id() {
9
- return this.constructor.ID;
10
- }
8
+ class PostboyGenericMessage extends postboy_message_1.PostboyMessage {
11
9
  }
12
10
  exports.PostboyGenericMessage = PostboyGenericMessage;
13
11
  function checkId(message) {
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-generic-message.js","sourceRoot":"","sources":["../../src/models/postboy-generic-message.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,qBAAqB;IACzC,IAAW,EAAE;QACX,OAAQ,IAAI,CAAC,WAAmB,CAAC,EAAE,CAAC;IACtC,CAAC;CACF;AAJD,sDAIC;AACD,SAAgB,OAAO,CAAC,OAAoC;IAC1D,IAAI,CAAE,OAAe,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC3F,OAAQ,OAAe,CAAC,EAAE,CAAC;AAC7B,CAAC;AAHD,0BAGC"}
1
+ {"version":3,"file":"postboy-generic-message.js","sourceRoot":"","sources":["../../src/models/postboy-generic-message.ts"],"names":[],"mappings":";;;AAAA,uDAAiD;AAEjD;;GAEG;AACH,MAAsB,qBAAsB,SAAQ,gCAAc;CACjE;AADD,sDACC;AACD,SAAgB,OAAO,CAAC,OAAoC;IAC1D,IAAI,CAAE,OAAe,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC3F,OAAQ,OAAe,CAAC,EAAE,CAAC;AAC7B,CAAC;AAHD,0BAGC"}
@@ -0,0 +1,5 @@
1
+ import { PostboyMessage } from "./postboy.message";
2
+ export interface PostboyMiddleware {
3
+ handle(message: PostboyMessage): void;
4
+ }
5
+ //# sourceMappingURL=postboy-middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy-middleware.d.ts","sourceRoot":"","sources":["../../src/models/postboy-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=postboy-bbb.js.map
3
+ //# sourceMappingURL=postboy-middleware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy-middleware.js","sourceRoot":"","sources":["../../src/models/postboy-middleware.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare abstract class PostboyMessage {
2
+ get id(): string;
3
+ }
4
+ //# sourceMappingURL=postboy.message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy.message.d.ts","sourceRoot":"","sources":["../../src/models/postboy.message.ts"],"names":[],"mappings":"AAAA,8BAAsB,cAAc;IAClC,IAAW,EAAE,IAAI,MAAM,CAEtB;CACF"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PostboyMessage = void 0;
4
+ class PostboyMessage {
5
+ get id() {
6
+ return this.constructor.ID;
7
+ }
8
+ }
9
+ exports.PostboyMessage = PostboyMessage;
10
+ //# sourceMappingURL=postboy.message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy.message.js","sourceRoot":"","sources":["../../src/models/postboy.message.ts"],"names":[],"mappings":";;;AAAA,MAAsB,cAAc;IAClC,IAAW,EAAE;QACX,OAAQ,IAAI,CAAC,WAAmB,CAAC,EAAE,CAAC;IACtC,CAAC;CACF;AAJD,wCAIC"}
@@ -0,0 +1,11 @@
1
+ export declare class Queue<T> {
2
+ private storage;
3
+ private head;
4
+ private tail;
5
+ put(item: T): this;
6
+ putMany(items: T[]): this;
7
+ take(): T | undefined;
8
+ get size(): number;
9
+ each(action: (e: T) => void): void;
10
+ }
11
+ //# sourceMappingURL=queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/models/queue.ts"],"names":[],"mappings":"AAAA,qBAAa,KAAK,CAAC,CAAC;IAClB,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,IAAI,CAAa;IAEzB,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAMlB,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI;IAKzB,IAAI,IAAI,CAAC,GAAG,SAAS;IAMrB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI;CAG5B"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Queue = void 0;
4
+ class Queue {
5
+ constructor() {
6
+ this.storage = {};
7
+ this.head = 0;
8
+ this.tail = 0;
9
+ }
10
+ put(item) {
11
+ this.storage[this.tail] = item;
12
+ this.tail++;
13
+ return this;
14
+ }
15
+ putMany(items) {
16
+ items.forEach((i) => this.put(i));
17
+ return this;
18
+ }
19
+ take() {
20
+ const item = this.storage[this.head];
21
+ if (item)
22
+ delete this.storage[this.head++];
23
+ return item;
24
+ }
25
+ get size() {
26
+ return this.tail - this.head;
27
+ }
28
+ each(action) {
29
+ while (this.size)
30
+ action(this.take());
31
+ }
32
+ }
33
+ exports.Queue = Queue;
34
+ //# sourceMappingURL=queue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/models/queue.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;IAAlB;QACU,YAAO,GAAsB,EAAE,CAAC;QAChC,SAAI,GAAW,CAAC,CAAC;QACjB,SAAI,GAAW,CAAC,CAAC;IA0B3B,CAAC;IAxBC,GAAG,CAAC,IAAO;QACT,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,KAAU;QAChB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI;QACF,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED,IAAI,CAAC,MAAsB;QACzB,OAAO,IAAI,CAAC,IAAI;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAG,CAAC,CAAC;IACzC,CAAC;CACF;AA7BD,sBA6BC"}
@@ -19,30 +19,6 @@ export declare abstract class PostboyAbstractRegistrator {
19
19
  registerServices(services: IPostboyDependingService[]): void;
20
20
  up(): void;
21
21
  protected abstract _up(): void;
22
- /**
23
- * @deprecated The method should be replaced with recordExecutor<T>
24
- */
25
- registerExecutor<E extends PostboyExecutor<T>, T>(id: string, exec: (e: E) => T): void;
26
- /**
27
- * @deprecated The method should be replaced with record<T>
28
- */
29
- register<T>(id: string, sub: Subject<T>): void;
30
- /**
31
- * @deprecated The method should be replaced with recordWithPipe<T>
32
- */
33
- registerWithPipe<T>(id: string, sub: Subject<T>, pipe: (s: Subject<T>) => Observable<T>): void;
34
- /**
35
- * @deprecated The method should be replaced with recordReplay<T>
36
- */
37
- registerReplay: <T>(id: string, bufferSize?: number) => void;
38
- /**
39
- * @deprecated The method should be replaced with recordBehavior<T>
40
- */
41
- registerBehavior: <T>(id: string, initial: T) => void;
42
- /**
43
- * @deprecated The method should be replaced with recordSubject<T>
44
- */
45
- registerSubject: <T>(id: string) => void;
46
22
  down(): void;
47
23
  /**
48
24
  * Records a type and its corresponding Subject<T> into the Postboy system and updates the internal identifiers.
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-abstract.registrator.d.ts","sourceRoot":"","sources":["../src/postboy-abstract.registrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAmB,UAAU,EAAiB,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BA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KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI;IAIhH;;;;;;OAMG;IACI,aAAa,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAClD,QAAQ,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACnC,OAAO,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,GACrC,IAAI;IAIP;;;;;;;;;;;;OAYG;IACI,YAAY,0CAA2C,YAAY,CAAC,CAAC,+BACtB;IAEtD;;;;;;;;;OASG;IACI,cAAc,0CAA2C,YAAY,CAAC,CAAC,WAAW,CAAC,UACrC;IAErD;;;;;;OAMG;IACI,aAAa,0CAA2C,YAAY,CAAC,CAAC,UAAyC;CACvH"}
@@ -8,18 +8,6 @@ class PostboyAbstractRegistrator {
8
8
  this.postboy = postboy;
9
9
  this.ids = [];
10
10
  this.services = [];
11
- /**
12
- * @deprecated The method should be replaced with recordReplay<T>
13
- */
14
- this.registerReplay = (id, bufferSize = 1) => this.register(id, new rxjs_1.ReplaySubject(bufferSize));
15
- /**
16
- * @deprecated The method should be replaced with recordBehavior<T>
17
- */
18
- this.registerBehavior = (id, initial) => this.register(id, new rxjs_1.BehaviorSubject(initial));
19
- /**
20
- * @deprecated The method should be replaced with recordSubject<T>
21
- */
22
- this.registerSubject = (id) => this.register(id, new rxjs_1.Subject());
23
11
  /**
24
12
  * A utility function that facilitates the recording and replaying of messages
25
13
  * using a ReplaySubject. This function is designed to handle messages of a
@@ -67,31 +55,10 @@ class PostboyAbstractRegistrator {
67
55
  this._up();
68
56
  this.services.forEach((s) => s.up());
69
57
  }
70
- /**
71
- * @deprecated The method should be replaced with recordExecutor<T>
72
- */
73
- registerExecutor(id, exec) {
74
- this.postboy.registerExecutor(id, exec);
75
- }
76
- /**
77
- * @deprecated The method should be replaced with record<T>
78
- */
79
- register(id, sub) {
80
- this.ids.push(id);
81
- this.postboy.register(id, sub);
82
- }
83
- /**
84
- * @deprecated The method should be replaced with recordWithPipe<T>
85
- */
86
- registerWithPipe(id, sub, pipe) {
87
- this.ids.push(id);
88
- this.postboy.registerWithPipe(id, sub, pipe);
89
- }
90
58
  down() {
91
59
  this.services = [];
92
60
  this.ids.forEach((id) => this.postboy.unregister(id));
93
61
  }
94
- // future
95
62
  /**
96
63
  * Records a type and its corresponding Subject<T> into the Postboy system and updates the internal identifiers.
97
64
  *
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-abstract.registrator.js","sourceRoot":"","sources":["../src/postboy-abstract.registrator.ts"],"names":[],"mappings":";;;AACA,+BAA2E;AAG3E,8EAAkF;AAKlF,MAAsB,0BAA0B;IAI9C,YAAsB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAHrC,QAAG,GAAa,EAAE,CAAC;QACnB,aAAQ,GAA+B,EAAE,CAAC;QA4ClD;;WAEG;QACI,mBAAc,GAAG,CAAI,EAAU,EAAE,UAAU,GAAG,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,oBAAa,CAAI,UAAU,CAAC,CAAC,CAAC;QAE/G;;WAEG;QACI,qBAAgB,GAAG,CAAI,EAAU,EAAE,OAAU,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,sBAAe,CAAI,OAAO,CAAC,CAAC,CAAC;QAE5G;;WAEG;QACI,oBAAe,GAAG,CAAI,EAAU,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,cAAO,EAAK,CAAC,CAAC;QAiEhF;;;;;;;;;;;;WAYG;QACI,iBAAY,GAAG,CAAkC,IAAoB,EAAE,UAAU,GAAG,CAAC,EAAE,EAAE,CAC9F,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,oBAAa,CAAI,UAAU,CAAC,CAAC,CAAC;QAEtD;;;;;;;;;WASG;QACI,mBA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