@coderoftime/fints 0.1.0 → 0.3.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 (289) hide show
  1. package/CHANGELOG.md +519 -1
  2. package/README.md +138 -40
  3. package/dist/client.d.ts +49 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +242 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/core/account.d.ts +46 -7
  8. package/dist/core/account.d.ts.map +1 -1
  9. package/dist/core/account.js +143 -24
  10. package/dist/core/account.js.map +1 -1
  11. package/dist/core/amount.d.ts +15 -4
  12. package/dist/core/amount.d.ts.map +1 -1
  13. package/dist/core/amount.js +46 -9
  14. package/dist/core/amount.js.map +1 -1
  15. package/dist/core/balance.d.ts +4 -0
  16. package/dist/core/balance.d.ts.map +1 -1
  17. package/dist/core/balance.js +11 -5
  18. package/dist/core/balance.js.map +1 -1
  19. package/dist/core/bank-info.d.ts +21 -4
  20. package/dist/core/bank-info.d.ts.map +1 -1
  21. package/dist/core/bank-info.js +26 -5
  22. package/dist/core/bank-info.js.map +1 -1
  23. package/dist/core/client.d.ts +81 -19
  24. package/dist/core/client.d.ts.map +1 -1
  25. package/dist/core/config.d.ts +40 -20
  26. package/dist/core/config.d.ts.map +1 -1
  27. package/dist/core/config.js +85 -30
  28. package/dist/core/config.js.map +1 -1
  29. package/dist/core/errors.d.ts +100 -26
  30. package/dist/core/errors.d.ts.map +1 -1
  31. package/dist/core/errors.js +136 -53
  32. package/dist/core/errors.js.map +1 -1
  33. package/dist/core/feedback.d.ts +11 -1
  34. package/dist/core/feedback.d.ts.map +1 -1
  35. package/dist/core/feedback.js +14 -2
  36. package/dist/core/feedback.js.map +1 -1
  37. package/dist/core/transaction.d.ts +11 -1
  38. package/dist/core/transaction.d.ts.map +1 -1
  39. package/dist/core/transaction.js +21 -4
  40. package/dist/core/transaction.js.map +1 -1
  41. package/dist/core/transport.d.ts +48 -6
  42. package/dist/core/transport.d.ts.map +1 -1
  43. package/dist/core/transport.js +126 -29
  44. package/dist/core/transport.js.map +1 -1
  45. package/dist/formats/camt.d.ts +28 -5
  46. package/dist/formats/camt.d.ts.map +1 -1
  47. package/dist/formats/camt.js +132 -50
  48. package/dist/formats/camt.js.map +1 -1
  49. package/dist/formats/mt940.d.ts +29 -5
  50. package/dist/formats/mt940.d.ts.map +1 -1
  51. package/dist/formats/mt940.js +209 -113
  52. package/dist/formats/mt940.js.map +1 -1
  53. package/dist/formats/readers.d.ts +6 -2
  54. package/dist/formats/readers.d.ts.map +1 -1
  55. package/dist/formats/readers.js +28 -29
  56. package/dist/formats/readers.js.map +1 -1
  57. package/dist/formats/record-budget.d.ts +7 -0
  58. package/dist/formats/record-budget.d.ts.map +1 -0
  59. package/dist/formats/record-budget.js +17 -0
  60. package/dist/formats/record-budget.js.map +1 -0
  61. package/dist/formats/sepa-purpose.d.ts +9 -0
  62. package/dist/formats/sepa-purpose.d.ts.map +1 -1
  63. package/dist/formats/sepa-purpose.js +32 -2
  64. package/dist/formats/sepa-purpose.js.map +1 -1
  65. package/dist/index.d.ts +3 -3
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +2 -2
  68. package/dist/index.js.map +1 -1
  69. package/dist/session/app-approval.d.ts +11 -5
  70. package/dist/session/app-approval.d.ts.map +1 -1
  71. package/dist/session/app-approval.js +23 -12
  72. package/dist/session/app-approval.js.map +1 -1
  73. package/dist/session/dialog-runner.d.ts +11 -11
  74. package/dist/session/dialog-runner.d.ts.map +1 -1
  75. package/dist/session/dialog-runner.js +34 -19
  76. package/dist/session/dialog-runner.js.map +1 -1
  77. package/dist/session/login-guard.d.ts +54 -49
  78. package/dist/session/login-guard.d.ts.map +1 -1
  79. package/dist/session/login-guard.js +170 -83
  80. package/dist/session/login-guard.js.map +1 -1
  81. package/dist/session/sepa-accounts.d.ts +20 -14
  82. package/dist/session/sepa-accounts.d.ts.map +1 -1
  83. package/dist/session/sepa-accounts.js +62 -46
  84. package/dist/session/sepa-accounts.js.map +1 -1
  85. package/dist/session/session-setup.d.ts +41 -24
  86. package/dist/session/session-setup.d.ts.map +1 -1
  87. package/dist/session/session-setup.js +106 -63
  88. package/dist/session/session-setup.js.map +1 -1
  89. package/dist/session/session-state.d.ts +10 -6
  90. package/dist/session/session-state.d.ts.map +1 -1
  91. package/dist/session/session-state.js +72 -18
  92. package/dist/session/session-state.js.map +1 -1
  93. package/dist/session/signed-dialog.d.ts +83 -0
  94. package/dist/session/signed-dialog.d.ts.map +1 -0
  95. package/dist/session/signed-dialog.js +185 -0
  96. package/dist/session/signed-dialog.js.map +1 -0
  97. package/dist/session/tan-selection.d.ts +26 -18
  98. package/dist/session/tan-selection.d.ts.map +1 -1
  99. package/dist/session/tan-selection.js +44 -33
  100. package/dist/session/tan-selection.js.map +1 -1
  101. package/dist/session/user-prompts.d.ts +14 -5
  102. package/dist/session/user-prompts.d.ts.map +1 -1
  103. package/dist/session/user-prompts.js +53 -18
  104. package/dist/session/user-prompts.js.map +1 -1
  105. package/dist/tan/challenge.d.ts +47 -24
  106. package/dist/tan/challenge.d.ts.map +1 -1
  107. package/dist/tan/challenge.js +56 -51
  108. package/dist/tan/challenge.js.map +1 -1
  109. package/dist/tan/flicker.d.ts +11 -1
  110. package/dist/tan/flicker.d.ts.map +1 -1
  111. package/dist/tan/flicker.js +70 -24
  112. package/dist/tan/flicker.js.map +1 -1
  113. package/dist/tan/tan-image.d.ts +6 -2
  114. package/dist/tan/tan-image.d.ts.map +1 -1
  115. package/dist/tan/tan-image.js +14 -6
  116. package/dist/tan/tan-image.js.map +1 -1
  117. package/dist/tan/tan-models.d.ts +14 -2
  118. package/dist/tan/tan-models.d.ts.map +1 -1
  119. package/dist/tan/tan-models.js +24 -7
  120. package/dist/tan/tan-models.js.map +1 -1
  121. package/dist/util/arguments.d.ts +13 -0
  122. package/dist/util/arguments.d.ts.map +1 -0
  123. package/dist/util/arguments.js +40 -0
  124. package/dist/util/arguments.js.map +1 -0
  125. package/dist/util/async.d.ts +4 -3
  126. package/dist/util/async.d.ts.map +1 -1
  127. package/dist/util/async.js +6 -7
  128. package/dist/util/async.js.map +1 -1
  129. package/dist/util/bytes.d.ts +3 -4
  130. package/dist/util/bytes.d.ts.map +1 -1
  131. package/dist/util/bytes.js +13 -21
  132. package/dist/util/bytes.js.map +1 -1
  133. package/dist/util/call-context.d.ts.map +1 -1
  134. package/dist/util/call-context.js +3 -2
  135. package/dist/util/call-context.js.map +1 -1
  136. package/dist/util/dates.d.ts +6 -20
  137. package/dist/util/dates.d.ts.map +1 -1
  138. package/dist/util/dates.js +58 -28
  139. package/dist/util/dates.js.map +1 -1
  140. package/dist/util/errors.d.ts +13 -3
  141. package/dist/util/errors.d.ts.map +1 -1
  142. package/dist/util/errors.js +19 -6
  143. package/dist/util/errors.js.map +1 -1
  144. package/dist/util/immutable-map.d.ts +5 -2
  145. package/dist/util/immutable-map.d.ts.map +1 -1
  146. package/dist/util/immutable-map.js +15 -12
  147. package/dist/util/immutable-map.js.map +1 -1
  148. package/dist/util/inspect.d.ts +11 -0
  149. package/dist/util/inspect.d.ts.map +1 -0
  150. package/dist/util/inspect.js +14 -0
  151. package/dist/util/inspect.js.map +1 -0
  152. package/dist/util/json.d.ts +4 -0
  153. package/dist/util/json.d.ts.map +1 -1
  154. package/dist/util/json.js +18 -0
  155. package/dist/util/json.js.map +1 -1
  156. package/dist/util/text.d.ts +38 -5
  157. package/dist/util/text.d.ts.map +1 -1
  158. package/dist/util/text.js +90 -16
  159. package/dist/util/text.js.map +1 -1
  160. package/dist/util/xml.d.ts +9 -6
  161. package/dist/util/xml.d.ts.map +1 -1
  162. package/dist/util/xml.js +129 -56
  163. package/dist/util/xml.js.map +1 -1
  164. package/dist/v3/account-extension.d.ts.map +1 -1
  165. package/dist/v3/account-extension.js +7 -10
  166. package/dist/v3/account-extension.js.map +1 -1
  167. package/dist/v3/bank-connection.d.ts +54 -0
  168. package/dist/v3/bank-connection.d.ts.map +1 -0
  169. package/dist/v3/bank-connection.js +118 -0
  170. package/dist/v3/bank-connection.js.map +1 -0
  171. package/dist/v3/dialog.d.ts +84 -46
  172. package/dist/v3/dialog.d.ts.map +1 -1
  173. package/dist/v3/dialog.js +174 -60
  174. package/dist/v3/dialog.js.map +1 -1
  175. package/dist/v3/message.d.ts +32 -11
  176. package/dist/v3/message.d.ts.map +1 -1
  177. package/dist/v3/message.js +144 -83
  178. package/dist/v3/message.js.map +1 -1
  179. package/dist/v3/parameter-store.d.ts +111 -0
  180. package/dist/v3/parameter-store.d.ts.map +1 -0
  181. package/dist/v3/parameter-store.js +197 -0
  182. package/dist/v3/parameter-store.js.map +1 -0
  183. package/dist/v3/parameters.d.ts +44 -17
  184. package/dist/v3/parameters.d.ts.map +1 -1
  185. package/dist/v3/parameters.js +136 -60
  186. package/dist/v3/parameters.js.map +1 -1
  187. package/dist/v3/protocol.d.ts +50 -50
  188. package/dist/v3/protocol.d.ts.map +1 -1
  189. package/dist/v3/protocol.js +91 -210
  190. package/dist/v3/protocol.js.map +1 -1
  191. package/dist/v3/queries.d.ts +51 -0
  192. package/dist/v3/queries.d.ts.map +1 -0
  193. package/dist/v3/queries.js +128 -0
  194. package/dist/v3/queries.js.map +1 -0
  195. package/dist/v3/segments.d.ts +43 -19
  196. package/dist/v3/segments.d.ts.map +1 -1
  197. package/dist/v3/segments.js +84 -33
  198. package/dist/v3/segments.js.map +1 -1
  199. package/dist/v3/syntax.d.ts +68 -13
  200. package/dist/v3/syntax.d.ts.map +1 -1
  201. package/dist/v3/syntax.js +183 -102
  202. package/dist/v3/syntax.js.map +1 -1
  203. package/package.json +10 -6
  204. package/src/client.ts +293 -0
  205. package/src/core/account.ts +153 -24
  206. package/src/core/amount.ts +45 -10
  207. package/src/core/balance.ts +12 -5
  208. package/src/core/bank-info.ts +29 -5
  209. package/src/core/client.ts +83 -19
  210. package/src/core/config.ts +95 -35
  211. package/src/core/errors.ts +148 -54
  212. package/src/core/feedback.ts +16 -2
  213. package/src/core/transaction.ts +22 -4
  214. package/src/core/transport.ts +153 -32
  215. package/src/formats/camt.ts +153 -45
  216. package/src/formats/mt940.ts +244 -122
  217. package/src/formats/readers.ts +28 -31
  218. package/src/formats/record-budget.ts +18 -0
  219. package/src/formats/sepa-purpose.ts +29 -2
  220. package/src/index.ts +4 -2
  221. package/src/session/app-approval.ts +51 -38
  222. package/src/session/dialog-runner.ts +61 -31
  223. package/src/session/login-guard.ts +189 -87
  224. package/src/session/sepa-accounts.ts +63 -45
  225. package/src/session/session-setup.ts +105 -68
  226. package/src/session/session-state.ts +74 -23
  227. package/src/session/signed-dialog.ts +222 -0
  228. package/src/session/tan-selection.ts +50 -39
  229. package/src/session/user-prompts.ts +62 -18
  230. package/src/tan/challenge.ts +87 -64
  231. package/src/tan/flicker.ts +72 -23
  232. package/src/tan/tan-image.ts +15 -6
  233. package/src/tan/tan-models.ts +26 -7
  234. package/src/util/arguments.ts +40 -0
  235. package/src/util/async.ts +10 -9
  236. package/src/util/bytes.ts +14 -20
  237. package/src/util/call-context.ts +3 -2
  238. package/src/util/dates.ts +64 -33
  239. package/src/util/errors.ts +22 -6
  240. package/src/util/immutable-map.ts +15 -12
  241. package/src/util/inspect.ts +14 -0
  242. package/src/util/json.ts +16 -0
  243. package/src/util/text.ts +87 -15
  244. package/src/util/xml.ts +130 -52
  245. package/src/v3/account-extension.ts +7 -12
  246. package/src/v3/bank-connection.ts +126 -0
  247. package/src/v3/dialog.ts +186 -92
  248. package/src/v3/message.ts +140 -79
  249. package/src/v3/parameter-store.ts +226 -0
  250. package/src/v3/parameters.ts +166 -66
  251. package/src/v3/protocol.ts +103 -253
  252. package/src/v3/queries.ts +198 -0
  253. package/src/v3/segments.ts +86 -31
  254. package/src/v3/syntax.ts +172 -93
  255. package/dist/session/bank-connection.d.ts +0 -28
  256. package/dist/session/bank-connection.d.ts.map +0 -1
  257. package/dist/session/bank-connection.js +0 -48
  258. package/dist/session/bank-connection.js.map +0 -1
  259. package/dist/session/parameter-data.d.ts +0 -83
  260. package/dist/session/parameter-data.d.ts.map +0 -1
  261. package/dist/session/parameter-data.js +0 -68
  262. package/dist/session/parameter-data.js.map +0 -1
  263. package/dist/session/pin-tan-client.d.ts +0 -54
  264. package/dist/session/pin-tan-client.d.ts.map +0 -1
  265. package/dist/session/pin-tan-client.js +0 -153
  266. package/dist/session/pin-tan-client.js.map +0 -1
  267. package/dist/session/pin-tan-dialog.d.ts +0 -71
  268. package/dist/session/pin-tan-dialog.d.ts.map +0 -1
  269. package/dist/session/pin-tan-dialog.js +0 -124
  270. package/dist/session/pin-tan-dialog.js.map +0 -1
  271. package/dist/session/protocol.d.ts +0 -209
  272. package/dist/session/protocol.d.ts.map +0 -1
  273. package/dist/session/protocol.js +0 -75
  274. package/dist/session/protocol.js.map +0 -1
  275. package/dist/session/response-handler.d.ts +0 -48
  276. package/dist/session/response-handler.d.ts.map +0 -1
  277. package/dist/session/response-handler.js +0 -121
  278. package/dist/session/response-handler.js.map +0 -1
  279. package/dist/v3/client.d.ts +0 -24
  280. package/dist/v3/client.d.ts.map +0 -1
  281. package/dist/v3/client.js +0 -16
  282. package/dist/v3/client.js.map +0 -1
  283. package/src/session/bank-connection.ts +0 -51
  284. package/src/session/parameter-data.ts +0 -137
  285. package/src/session/pin-tan-client.ts +0 -186
  286. package/src/session/pin-tan-dialog.ts +0 -160
  287. package/src/session/protocol.ts +0 -311
  288. package/src/session/response-handler.ts +0 -130
  289. package/src/v3/client.ts +0 -29
@@ -1,4 +1,5 @@
1
- import { formatIsoDate } from '../util/dates.js';
1
+ import { copyDate, formatIsoDate } from '../util/dates.js';
2
+ import { inspectCustom } from '../util/inspect.js';
2
3
  /** Account balance as reported by the bank. */
3
4
  export class Balance {
4
5
  /** The account the balance belongs to. */
@@ -28,18 +29,19 @@ export class Balance {
28
29
  bookingTime;
29
30
  /** The bank's name for the account, for example `Girokonto`. */
30
31
  productName;
32
+ /** Takes copies of the dates of `init`: each balance has its own, which no other one shares. */
31
33
  constructor(init) {
32
34
  this.account = init.account;
33
35
  this.booked = init.booked;
34
- this.bookedAsOf = init.bookedAsOf;
35
- this.bookedAsOfTime = init.bookedAsOfTime;
36
+ this.bookedAsOf = copyDate(init.bookedAsOf);
37
+ this.bookedAsOfTime = copyDate(init.bookedAsOfTime);
36
38
  this.pending = init.pending;
37
39
  this.creditLine = init.creditLine;
38
40
  this.available = init.available;
39
41
  this.used = init.used;
40
42
  this.overdraft = init.overdraft;
41
- this.bookingDate = init.bookingDate;
42
- this.bookingTime = init.bookingTime;
43
+ this.bookingDate = copyDate(init.bookingDate);
44
+ this.bookingTime = copyDate(init.bookingTime);
43
45
  this.productName = init.productName;
44
46
  }
45
47
  /**
@@ -49,5 +51,9 @@ export class Balance {
49
51
  toString() {
50
52
  return `Balance(${this.account.toString()}, ${formatIsoDate(this.bookedAsOf)})`;
51
53
  }
54
+ /** What Node.js's `util.inspect` and `console.log` show: `toString`, not the fields. */
55
+ [inspectCustom]() {
56
+ return this.toString();
57
+ }
52
58
  }
53
59
  //# sourceMappingURL=balance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"balance.js","sourceRoot":"","sources":["../../src/core/balance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAoBjD,+CAA+C;AAC/C,MAAM,OAAO,OAAO;IAClB,0CAA0C;IACjC,OAAO,CAAU;IAE1B,+CAA+C;IACtC,MAAM,CAAS;IAExB;;;OAGG;IACM,UAAU,CAAO;IAE1B,8GAA8G;IACrG,cAAc,CAAmB;IAE1C,gFAAgF;IACvE,OAAO,CAAqB;IAErC,gCAAgC;IACvB,UAAU,CAAqB;IAExC,+CAA+C;IACtC,SAAS,CAAqB;IAEvC,mDAAmD;IAC1C,IAAI,CAAqB;IAElC,qDAAqD;IAC5C,SAAS,CAAqB;IAEvC,oGAAoG;IAC3F,WAAW,CAAmB;IAEvC,+GAA+G;IACtG,WAAW,CAAmB;IAEvC,gEAAgE;IACvD,WAAW,CAAqB;IAEzC,Y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EAAE,CAAC;IACzB,CAAC;CACF"}
@@ -1,4 +1,8 @@
1
- /** General bank information from the bank parameter data (BPD). */
1
+ import { inspectCustom } from '../util/inspect.js';
2
+ /**
3
+ * General bank information from the bank parameter data (BPD). The maximum message size and the timeouts are
4
+ * `undefined` where the bank states none, or more than 9999, the four digits HIBPA allows.
5
+ */
2
6
  export declare class BankInfo {
3
7
  /** German bank code (BLZ). */
4
8
  readonly bankCode: string;
@@ -10,7 +14,7 @@ export declare class BankInfo {
10
14
  readonly supportedVersions: readonly string[];
11
15
  /** Languages the bank's messages come in, as codes the bank defines. */
12
16
  readonly languages: readonly string[];
13
- /** Largest message in kilobytes (1024 bytes) the bank accepts; the client sends nothing larger. */
17
+ /** Largest message in kilobytes (1024 bytes) the bank accepts, `0` for no limit; the client sends nothing larger. */
14
18
  readonly maxMessageSize: number | undefined;
15
19
  /**
16
20
  * Time in seconds before which a client must not send a life-indicator message to keep an idle dialog open, `0` for
@@ -19,7 +23,7 @@ export declare class BankInfo {
19
23
  readonly minTimeout: number | undefined;
20
24
  /**
21
25
  * Time in seconds after which the bank will likely end a dialog without messages, `0` for no limit (HIBPA, Formals
22
- * C.9). The client starts a new dialog for a call after that time.
26
+ * C.9). The client starts a new dialog for a call after that time, or after 5 minutes where the bank states none.
23
27
  */
24
28
  readonly maxTimeout: number | undefined;
25
29
  constructor(init: {
@@ -32,8 +36,15 @@ export declare class BankInfo {
32
36
  minTimeout?: number | undefined;
33
37
  maxTimeout?: number | undefined;
34
38
  });
39
+ /** What Node.js's `util.inspect` and `console.log` show: the bank code and the version of the parameter data. */
40
+ [inspectCustom](): string;
35
41
  }
36
- /** Free-text message sent by the bank during login. */
42
+ /**
43
+ * Free-text message sent by the bank during login.
44
+ *
45
+ * Subject and text are the bank's, of any length: show them as text only, never as HTML (`innerHTML`, `v-html`), since
46
+ * they are no markup to trust.
47
+ */
37
48
  export declare class BankMessage {
38
49
  /** What the message is about. */
39
50
  readonly subject: string;
@@ -44,6 +55,12 @@ export declare class BankMessage {
44
55
  subject: string,
45
56
  /** The message itself. */
46
57
  text: string);
58
+ /**
59
+ * Neither subject nor text, which may address the user, so that logs and crash reports do not collect them; show
60
+ * `subject` and `text` to the user.
61
+ */
47
62
  toString(): string;
63
+ /** What Node.js's `util.inspect` and `console.log` show: `toString`, not the fields. */
64
+ [inspectCustom](): string;
48
65
  }
49
66
  //# sourceMappingURL=bank-info.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bank-info.d.ts","sourceRoot":"","sources":["../../src/core/bank-info.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,qBAAa,QAAQ;IACnB,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,0DAA0D;IAC1D,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAE9C,wEAAwE;IACxE,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAEtC,mGAAmG;IACnG,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5C;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE5B,IAAI,EAAE;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QACtC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC9B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACpC,UAAU,CAAC,EAAE,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AAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC9B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACpC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAChC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACjC;IAWD,iHAAiH;IACjH,CAAC,aAAa,CAAC,IAAI,MAAM;CAG1B;AAED;;;;;GAKG;AACH,qBAAa,WAAW;IAEpB,iCAAiC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,0BAA0B;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM;;IAHrB,iCAAiC;IACxB,OAAO,EAAE,MAAM;IACxB,0BAA0B;IACjB,IAAI,EAAE,MAAM;IAGvB;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB,wFAAwF;IACxF,CAAC,aAAa,CAAC,IAAI,MAAM;CAG1B"}
@@ -1,4 +1,8 @@
1
- /** General bank information from the bank parameter data (BPD). */
1
+ import { inspectCustom } from '../util/inspect.js';
2
+ /**
3
+ * General bank information from the bank parameter data (BPD). The maximum message size and the timeouts are
4
+ * `undefined` where the bank states none, or more than 9999, the four digits HIBPA allows.
5
+ */
2
6
  export class BankInfo {
3
7
  /** German bank code (BLZ). */
4
8
  bankCode;
@@ -10,7 +14,7 @@ export class BankInfo {
10
14
  supportedVersions;
11
15
  /** Languages the bank's messages come in, as codes the bank defines. */
12
16
  languages;
13
- /** Largest message in kilobytes (1024 bytes) the bank accepts; the client sends nothing larger. */
17
+ /** Largest message in kilobytes (1024 bytes) the bank accepts, `0` for no limit; the client sends nothing larger. */
14
18
  maxMessageSize;
15
19
  /**
16
20
  * Time in seconds before which a client must not send a life-indicator message to keep an idle dialog open, `0` for
@@ -19,7 +23,7 @@ export class BankInfo {
19
23
  minTimeout;
20
24
  /**
21
25
  * Time in seconds after which the bank will likely end a dialog without messages, `0` for no limit (HIBPA, Formals
22
- * C.9). The client starts a new dialog for a call after that time.
26
+ * C.9). The client starts a new dialog for a call after that time, or after 5 minutes where the bank states none.
23
27
  */
24
28
  maxTimeout;
25
29
  constructor(init) {
@@ -32,8 +36,17 @@ export class BankInfo {
32
36
  this.minTimeout = init.minTimeout;
33
37
  this.maxTimeout = init.maxTimeout;
34
38
  }
39
+ /** What Node.js's `util.inspect` and `console.log` show: the bank code and the version of the parameter data. */
40
+ [inspectCustom]() {
41
+ return `BankInfo(${this.bankCode}, BPD version ${this.bpdVersion})`;
42
+ }
35
43
  }
36
- /** Free-text message sent by the bank during login. */
44
+ /**
45
+ * Free-text message sent by the bank during login.
46
+ *
47
+ * Subject and text are the bank's, of any length: show them as text only, never as HTML (`innerHTML`, `v-html`), since
48
+ * they are no markup to trust.
49
+ */
37
50
  export class BankMessage {
38
51
  subject;
39
52
  text;
@@ -45,8 +58,16 @@ export class BankMessage {
45
58
  this.subject = subject;
46
59
  this.text = text;
47
60
  }
61
+ /**
62
+ * Neither subject nor text, which may address the user, so that logs and crash reports do not collect them; show
63
+ * `subject` and `text` to the user.
64
+ */
48
65
  toString() {
49
- return `${this.subject}: ${this.text}`;
66
+ return 'BankMessage(…)';
67
+ }
68
+ /** What Node.js's `util.inspect` and `console.log` show: `toString`, not the fields. */
69
+ [inspectCustom]() {
70
+ return this.toString();
50
71
  }
51
72
  }
52
73
  //# sourceMappingURL=bank-info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bank-info.js","sourceRoot":"","sources":["../../src/core/bank-info.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,MAAM,OAAO,QAAQ;IACnB,8BAA8B;IACrB,QAAQ,CAAS;IAE1B,uBAAuB;IACd,IAAI,CAAqB;IAElC,sEAAsE;IAC7D,UAAU,CAAS;IAE5B,0DAA0D;IACjD,iBAAiB,CAAoB;IAE9C,wEAAwE;IAC/D,SAAS,CAAoB;IAEtC,mGAAmG;IAC1F,cAAc,CAAqB;IAE5C;;;OAGG;IACM,UAAU,CAAqB;IAExC;;;OAGG;IACM,UAAU,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3,7 @@ import type { TanMedium, TanMethod } from '../tan/tan-models.js';
3
3
  import type { Account } from './account.js';
4
4
  import type { Balance } from './balance.js';
5
5
  import type { BankInfo, BankMessage } from './bank-info.js';
6
+ import type { FinTsLoginRefusedError } from './errors.js';
6
7
  import type { FinTsFeedback } from './feedback.js';
7
8
  import type { Transaction, TransactionFormat } from './transaction.js';
8
9
  import type { FinTsTransport } from './transport.js';
@@ -20,6 +21,11 @@ export type WarningHandler = (warning: FinTsFeedback) => void;
20
21
  * An error thrown by a callback that only informs the app (`onBankMessage`, `onWarning`, `logger`) fails the call once
21
22
  * the call's exchange with the bank is over, so that it cannot break off a dialog half-way; an error of the call itself
22
23
  * takes precedence.
24
+ *
25
+ * The client reads the options once, when it is built: changing them later changes nothing. Its constructor throws
26
+ * `TypeError` for a `tanCallback` that is no function, another callback that is neither a function nor `undefined` or
27
+ * `null`, which mean none, a `state` that is neither a string nor either of these, and a `transport` without the
28
+ * functions `post` and `close`.
23
29
  */
24
30
  export interface FinTsClientOptions {
25
31
  /** Called whenever the bank asks for a TAN or an app approval. */
@@ -28,19 +34,31 @@ export interface FinTsClientOptions {
28
34
  tanMethodSelector?: TanMethodSelector;
29
35
  /** Picks the TAN medium when the method needs one and the user has several; the first is used without it. */
30
36
  tanMediumSelector?: TanMediumSelector;
31
- /** Receives the free-text messages the bank sends during login. */
37
+ /**
38
+ * Receives the free-text messages the bank sends during login. How many there are and how long they are is the
39
+ * bank's choice, without a limit, so bound what the app shows of them; show their text as text, never as markup.
40
+ */
32
41
  onBankMessage?: BankMessageHandler;
33
42
  /**
34
43
  * Receives the bank's warnings, such as 3951 (switch to another TAN method), but not those the client acts on itself,
35
- * such as 3040 (more data follow). Show them to the user with code and text, as the specification asks.
44
+ * such as 3040 (more data follow). Show them to the user with code and text, as the specification asks. How many
45
+ * there are and how long they are is the bank's choice, without a limit, so bound what the app shows of them; show
46
+ * their text as text, never as markup.
36
47
  */
37
48
  onWarning?: WarningHandler;
38
49
  /** Receives every FinTS message with PIN and TAN masked, for diagnosis; the messages contain account data. */
39
50
  logger?: MessageLogger;
40
51
  /**
41
- * The `FinTsClient.state` of a previous session, which skips the bank setup steps.
52
+ * The `FinTsClient.state` of a previous session, which skips the bank setup steps. A refused login in it keeps the
53
+ * client from sending the PIN (`FinTsClient.loginRefusal`).
54
+ *
55
+ * A state belongs to one client at a time: restore the clients of one bank user one after another, each from the
56
+ * state the one before saved, never two at once from the same state. The state saved last wins, and could lift a
57
+ * refused login the other client saved.
42
58
  *
43
- * A state saved for another user or bank is ignored.
59
+ * A state saved for another user or bank is ignored, and of one saved for another server of the bank, such as before
60
+ * the bank moved its FinTS URL, or for FinTS 4.1 by the Dart package, only the refused login and the count of logins
61
+ * whose answer was lost hold.
44
62
  */
45
63
  state?: string | undefined;
46
64
  /**
@@ -62,35 +80,67 @@ export interface TransactionQuery {
62
80
  /**
63
81
  * Read access to a bank account over FinTS.
64
82
  *
65
- * All calls share one bank dialog, so strong authentication happens once per session. Calls run one after another; call
66
- * `close` when done.
83
+ * A call logs in where it needs to, which sends the PIN and may ask the callbacks for a TAN method, a TAN medium and an
84
+ * approval. Calls share one bank dialog while it is open, so that the approval of its login serves them all. The next
85
+ * call logs in anew, which may ask for another approval, once the dialog has idled longer than `BankInfo.maxTimeout`,
86
+ * after `selectTanMethod` and `clearLoginRefusal`, once the bank has ended the dialog, and after a message failed with
87
+ * another error than the bank's (`FinTsBankError`), such as a cancelled approval or a broken connection. Calls run one
88
+ * after another; call `close` when done.
67
89
  *
68
90
  * A callback in `FinTsClientOptions` must not wait for another call of its client, which would wait for the running
69
- * call. On Node.js, Deno and Bun such a call fails with `FinTsStateError`; elsewhere it would wait forever. `close` works
70
- * from anywhere.
91
+ * call. On Node.js, Deno 2.1 and Bun 1.2.6 or later such a call fails with `FinTsStateError`; elsewhere it waits
92
+ * forever. `close` works from anywhere.
71
93
  */
72
94
  export interface FinTsClient {
73
95
  /**
74
96
  * Serialized session data: bank and user parameters, customer system ID, the TAN methods the user may use, the chosen
75
- * TAN method and medium, and the SEPA account list.
97
+ * TAN method and medium, the SEPA account list, and a refused login (`loginRefusal`) with the count of logins whose
98
+ * answer was lost.
76
99
  *
77
- * Contains no PIN or TAN, but account details, so store it encrypted.
100
+ * Contains no PIN or TAN, but the user ID and customer ID, the customer system ID, the account holders' names and
101
+ * account details, and after a refused login the texts and parameters of the bank's return codes as the bank sent
102
+ * them, which for return code 3072 are the new login data; so store it encrypted. It holds what this client knows,
103
+ * and replaces the state it was restored from: one client at a time per state (`FinTsClientOptions.state`).
78
104
  */
79
105
  readonly state: string;
106
+ /**
107
+ * The refused login that keeps the client from sending the PIN again (`FinTsLoginRefusedError`); `undefined` while
108
+ * there is none. It is kept in `state` until `clearLoginRefusal`.
109
+ */
110
+ readonly loginRefusal: FinTsLoginRefusedError | undefined;
80
111
  /** Security function code of the TAN method in use, for example `942`; `undefined` before the first login. */
81
112
  readonly selectedTanMethod: string | undefined;
82
- /** Name of the TAN medium sent to the bank, if the method needs one. */
113
+ /**
114
+ * Name of the TAN medium in use, if the method needs one, as the app passed it or the bank listed it; one the app
115
+ * passed goes out without blanks at either end.
116
+ */
83
117
  readonly selectedTanMedium: string | undefined;
84
118
  /**
85
119
  * Switches to another TAN method, and optionally TAN medium, for the following calls.
86
120
  *
87
121
  * Ends the current dialog, so the next call logs in again with the new method. If the bank does not offer
88
- * `securityFunction`, the client picks another method at that login.
122
+ * `securityFunction`, the client picks another method at that login. Without `tanMedium`, also for `null`, that login
123
+ * looks the TAN media up where the method needs one. Rejects with `TypeError`, before it ends the dialog, for a
124
+ * `securityFunction` or `tanMedium` that is no string.
89
125
  */
90
126
  selectTanMethod(securityFunction: string, tanMedium?: string): Promise<void>;
127
+ /**
128
+ * Lifts `loginRefusal` and signs with `pin` from now on. Ends the current dialog, so that the next call logs in with
129
+ * it, and forgets the TAN medium, which the bank may have refused, such as that of a phone the user has replaced: where
130
+ * the TAN method needs one, the next call looks the media up anew and asks the `tanMediumSelector`.
131
+ *
132
+ * Pass a PIN the user has entered after the refusal, never a stored one unasked: banks lock the access after a few
133
+ * failed logins. Rejects with `TypeError` for a PIN the client cannot send, as its constructor throws, and with the
134
+ * refusal where it is a `FinTsLoginDataChangedError`: only a new client with the new login data can log in.
135
+ */
136
+ clearLoginRefusal(pin: string): Promise<void>;
91
137
  /** General information about the bank, from the bank parameter data. */
92
138
  getBankInfo(): Promise<BankInfo>;
93
- /** TAN procedures the bank allows for this user. */
139
+ /**
140
+ * TAN procedures the bank allows for this user, which the synchronization reports. Where the session has no customer
141
+ * system ID yet, as without a saved state, this call logs in for it: it may ask `tanMethodSelector` where the bank
142
+ * refuses the one-step method, and `tanCallback` for an approval.
143
+ */
94
144
  getTanMethods(): Promise<TanMethod[]>;
95
145
  /** TAN devices registered for this user. */
96
146
  getTanMedia(): Promise<TanMedium[]>;
@@ -102,7 +152,9 @@ export interface FinTsClient {
102
152
  * Where the user parameter data carry the complete balance (account extension), possibly from the saved `state`, it
103
153
  * comes from there without a query; `Balance.bookedAsOf` tells the day it states.
104
154
  *
105
- * Throws `FinTsUnsupportedError`, without asking the bank, where the parameter data rule the query out.
155
+ * Rejects with `FinTsUnsupportedError` where the parameter data rule the query out, without sending it; the login,
156
+ * which delivers them, may have gone out. Rejects with `TypeError`, before it waits for other calls, for an `account`
157
+ * that is no `Account`, such as one written to JSON and read back.
106
158
  */
107
159
  getBalance(account: Account): Promise<Balance>;
108
160
  /**
@@ -110,16 +162,26 @@ export interface FinTsClient {
110
162
  * the same day in the bank's order.
111
163
  *
112
164
  * Only the local calendar day counts, and a day in the future counts as today. Banks typically ask for a TAN when
113
- * `from` is more than 90 days ago; see also `Account.dataStatus`. Throws `TypeError` if `from` lies on a day after
114
- * `to`, and `FinTsUnsupportedError`, without asking the bank, where the parameter data rule the query out.
165
+ * `from` is more than 90 days ago; see also `Account.dataStatus`. Rejects with `TypeError`, before it waits for other
166
+ * calls, if `account` is no `Account`, `from` or `to` is no valid `Date`, `from` lies on a day after `to` or `format`
167
+ * is no `TransactionFormat`, and with `FinTsUnsupportedError`, without sending the query, where the parameter data
168
+ * rule it out; the login may have gone out.
115
169
  */
116
170
  getTransactions(account: Account, query?: TransactionQuery): Promise<Transaction[]>;
117
171
  /**
118
- * Ends the bank dialog and releases the connection.
172
+ * Ends the bank dialog, releases the connection and forgets the PIN.
119
173
  *
120
174
  * A running call stops at its next step, also while it waits for a TAN, an app approval or a selection, and fails with
121
- * `FinTsStateError`, as do all later calls. A request already on its way is awaited, at most for the transport's
122
- * timeout.
175
+ * `FinTsStateError`, as do all later calls. A request already on its way has five seconds to bring its answer, which
176
+ * counts as any other: the logger gets it, and the client keeps what it brings, such as the parameter data or the
177
+ * customer system ID. The call fails with `FinTsStateError` all the same, also where that answer completes it, unless
178
+ * the answer brings an error, such as a rejected PIN, which the call fails with instead. After those five seconds the
179
+ * client stops waiting for the request, whatever the transport, and aborts it where the transport supports that, as
180
+ * `HttpTransport` does: the call fails with `FinTsTransportError` then, as after a broken connection, and an aborted
181
+ * login counts as one whose answer was lost. After the request, the call sends nothing but the end of its
182
+ * dialogs, that of an aborted message included, unless the message opened it. These dialog ends have five seconds
183
+ * once that request, if any, is over: then they are aborted the same way, and none goes out later, so that a bank
184
+ * that has stopped answering holds up neither `close` nor the call for longer.
123
185
  */
124
186
  close(): Promise<void>;
125
187
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CA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,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEpF;;;;;;;;;;;;;;OAcG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
@@ -1,33 +1,40 @@
1
- /** Numeric country code of Germany (ISO 3166), where FinTS banks are. */
1
+ import { inspectCustom } from '../util/inspect.js';
2
+ /**
3
+ * The country code FinTS gives Germany, where FinTS banks are: the ISO 3166 code of the Federal Republic before 1990,
4
+ * not today's `276`.
5
+ */
2
6
  export declare const defaultCountryCode = "280";
3
7
  /** What `FinTsConfig` takes. */
4
8
  export interface FinTsConfigInit {
5
- /** The bank's FinTS PIN/TAN endpoint; must be https. */
9
+ /** The bank's FinTS PIN/TAN endpoint; must be https, without user name or password. */
6
10
  url: string | URL;
7
- /** German bank code (BLZ). */
11
+ /** Bank code: for a German bank its BLZ, eight digits. */
8
12
  bankCode: string;
9
- /** Login name (Benutzerkennung / Legitimations-ID). */
13
+ /** Login name (Benutzerkennung / Legitimations-ID); at most 30 characters. */
10
14
  userId: string;
11
- /** Customer ID; defaults to `userId`. */
15
+ /** Customer ID, at most 30 characters; defaults to `userId`. */
12
16
  customerId?: string | undefined;
13
17
  /** FinTS product registration number from the Deutsche Kreditwirtschaft; at most 25 characters. */
14
18
  productId: string;
15
19
  /** Version of the app as registered with the product; at most five characters. `1.0` by default. */
16
20
  productVersion?: string;
17
- /** Numeric country code of the bank, `280` (Germany) by default. */
21
+ /** Country code of the bank, three digits: `280`, the default, for Germany. */
18
22
  countryCode?: string;
19
23
  /**
20
24
  * Allows plain http for the loopback addresses `localhost`, `127.x.x.x` and `::1`, for tests against a local server.
21
25
  *
22
- * Any other host must use https, whatever this says: the PIN travels with every message.
26
+ * Any other host must use https, whatever this says: the PIN travels with every message. The default `HttpTransport`
27
+ * sends plain http wherever the global `fetch` sends it, though, as it sends https: a replacement of that `fetch` and
28
+ * a global dispatcher get the PIN, and a proxy that `fetch` takes from the environment sees it unencrypted. See
29
+ * `HttpTransport`.
23
30
  */
24
31
  allowInsecureUrl?: boolean;
25
32
  }
26
- /** Connection and login data for one bank user. */
33
+ /** Connection and login data for one bank user; frozen, so that the client sends what the constructor has checked. */
27
34
  export declare class FinTsConfig {
28
- /** Numeric country code of Germany (ISO 3166), where FinTS banks are. */
35
+ /** The country code FinTS gives Germany, where FinTS banks are: `280`, not today's ISO 3166 code `276`. */
29
36
  static readonly defaultCountryCode = "280";
30
- readonly url: URL;
37
+ private readonly href;
31
38
  readonly bankCode: string;
32
39
  readonly userId: string;
33
40
  private readonly explicitCustomerId;
@@ -36,24 +43,37 @@ export declare class FinTsConfig {
36
43
  readonly countryCode: string;
37
44
  readonly allowInsecureUrl: boolean;
38
45
  /**
39
- * Throws `TypeError` if `url` is not a valid URL, has no host or is not https, unless `allowInsecureUrl` is set and
40
- * `url` is a loopback address, and if a login detail or the product is empty: the bank would refuse the login.
46
+ * Throws `TypeError` if `url` is not a valid URL, has no host, holds a user name or password, or is not https, unless
47
+ * `allowInsecureUrl` is set and `url` is a loopback address. Throws as well where the bank would refuse the login: for
48
+ * a login or product detail that is empty, has characters FinTS 3.0 cannot send (it uses ISO 8859-1, so `€` and most
49
+ * non-Latin letters are not possible) or is longer than its field (30 characters for the bank code, the user ID and
50
+ * the customer ID, 25 for the product ID, 5 for its version), for a country code of other than three digits, and for
51
+ * a German bank code of other than eight. Throws as well for a detail of another type than `FinTsConfigInit` names,
52
+ * such as a number as `bankCode` or the string `'false'` as `allowInsecureUrl`; `null` counts as a detail not given.
53
+ * The message leaves out the value.
54
+ *
55
+ * Drops leading and trailing blanks of the login details and the product, as FinTS sends them without (Formals
56
+ * B.4.1): `'alice '` is the user `alice`, also for a saved state.
41
57
  */
42
58
  constructor(init: FinTsConfigInit);
59
+ /**
60
+ * The bank's FinTS PIN/TAN endpoint, as checked by the constructor. A new `URL` on each access, so that changing one
61
+ * cannot change where the client posts the PIN.
62
+ */
63
+ get url(): URL;
43
64
  /** Customer ID; defaults to `userId`. */
44
65
  get customerId(): string;
66
+ /** What Node.js's `util.inspect` and `console.log` show: the bank code, neither the login data nor the product ID. */
67
+ [inspectCustom](): string;
45
68
  }
69
+ /** `text`, unless it has characters FinTS 3.0 cannot send (ISO 8859-1 only); the message leaves out the value. */
70
+ export declare function requireLatin1(text: string, name: string): string;
46
71
  /** The host of `url` without the brackets of an IPv6 address, as `URL` writes it. */
47
72
  export declare function hostOf(url: URL): string;
48
73
  /**
49
- * Throws `TypeError` unless `url` names a host and uses https: the PIN travels with every message.
50
- *
51
- * With `allowInsecure`, http is accepted for loopback hosts only.
52
- */
53
- export declare function requireSecureUrl(url: URL, allowInsecure?: boolean): void;
54
- /**
55
- * Throws `TypeError` for an empty PIN, which the bank would count as a failed attempt, and for one with leading or
56
- * trailing blanks: FinTS values carry none (Formals B.4.1), so such a PIN could only go out changed.
74
+ * `pin`, unless FinTS 3.0 cannot send it: throws `TypeError` for an empty PIN, which the bank would count as a failed
75
+ * attempt, for one with leading or trailing blanks, which would go out without them since FinTS values carry none
76
+ * (Formals B.4.1), and for one with characters outside ISO 8859-1.
57
77
  *
58
78
  * The message leaves out the value.
59
79
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC,gCAAgC;AAChC,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;IAClB,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,WAAW,C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