@aidc-toolkit/app-extension 1.0.49 → 1.0.50

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 (53) hide show
  1. package/dist/{character-set-proxy-BOW94WCe.d.cts → character-set-proxy-CQCOcqR3.d.cts} +92 -92
  2. package/dist/{character-set-proxy-BOW94WCe.d.ts → character-set-proxy-CQCOcqR3.d.ts} +92 -92
  3. package/dist/chunk-46ONQV2V.js +1 -0
  4. package/dist/chunk-4BTJEN4N.js +1 -0
  5. package/dist/chunk-WLXID4YR.js +1 -0
  6. package/dist/{descriptor-D6tZH-vc.d.cts → descriptor-Df-lif4q.d.cts} +1 -1
  7. package/dist/{descriptor-D6tZH-vc.d.ts → descriptor-Df-lif4q.d.ts} +1 -1
  8. package/dist/generator/index.cjs +1 -1
  9. package/dist/generator/index.d.cts +2 -18
  10. package/dist/generator/index.d.ts +2 -18
  11. package/dist/generator/index.js +1 -1
  12. package/dist/gs1/index.cjs +1 -1
  13. package/dist/gs1/index.d.cts +106 -106
  14. package/dist/gs1/index.d.ts +106 -106
  15. package/dist/gs1/index.js +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.cts +16 -31
  18. package/dist/index.d.ts +16 -31
  19. package/dist/index.js +1 -1
  20. package/package.json +5 -5
  21. package/src/app-extension-options.ts +61 -0
  22. package/src/app-extension.ts +22 -32
  23. package/src/app-helper-proxy.ts +21 -33
  24. package/src/generator/functions-generator.ts +14 -45
  25. package/src/generator/generator.ts +28 -18
  26. package/src/generator/locale-resources-generator.ts +79 -52
  27. package/src/gs1/character-set-proxy.ts +6 -7
  28. package/src/gs1/check-proxy.ts +8 -8
  29. package/src/gs1/gcp-length-proxy.ts +8 -8
  30. package/src/gs1/gtin-creator-proxy.ts +4 -4
  31. package/src/gs1/gtin-validator-proxy.ts +12 -12
  32. package/src/gs1/identifier-creator-proxy.ts +14 -14
  33. package/src/gs1/identifier-validator-proxy.ts +10 -10
  34. package/src/gs1/non-gtin-creator-proxy.ts +22 -23
  35. package/src/gs1/non-gtin-validator-proxy.ts +22 -23
  36. package/src/gs1/prefix-manager-proxy.ts +2 -2
  37. package/src/gs1/variable-measure-proxy.ts +4 -4
  38. package/src/gs1/verified-by-gs1-proxy.ts +5 -11
  39. package/src/index.ts +1 -0
  40. package/src/lib-proxy.ts +27 -43
  41. package/src/locale/en/locale-resources.ts +1 -1
  42. package/src/proxy.ts +12 -15
  43. package/src/streaming.ts +3 -3
  44. package/src/type.ts +3 -22
  45. package/src/utility/character-set-proxy.ts +17 -16
  46. package/src/utility/reg-exp-proxy.ts +2 -2
  47. package/src/utility/string-proxy.ts +2 -2
  48. package/src/utility/transformer-proxy.ts +6 -5
  49. package/src/version.ts +1 -1
  50. package/tsconfig-src.tsbuildinfo +1 -1
  51. package/dist/chunk-22IRLVWO.js +0 -1
  52. package/dist/chunk-MR63TJ3B.js +0 -1
  53. package/dist/chunk-TWX7TPRC.js +0 -1
@@ -3,13 +3,57 @@ import { StringValidation, StringValidator, CharacterSetValidator, Exclusion, Ch
3
3
  import { Logger } from 'tslog';
4
4
 
5
5
  /**
6
- * Type that error type is expected to extend. If the application framework reports errors through the throw/catch
7
- * mechanism, the error type is expected to extend {@linkcode Error}. Otherwise, it may extend any object type.
8
- *
9
- * @template ThrowError
6
+ * Application extension options. Never instantiated; used only as extension point for custom application extension
7
+ * options to define types.
8
+ */
9
+ interface AppExtensionOptions {
10
+ /**
11
+ * If true, errors are reported through the throw/catch mechanism.
12
+ */
13
+ ThrowError: boolean;
14
+ /**
15
+ * Application error.
16
+ */
17
+ ApplicationError: object;
18
+ /**
19
+ * Invocation context.
20
+ */
21
+ InvocationContext: unknown;
22
+ /**
23
+ * Streaming context.
24
+ */
25
+ StreamingContext: unknown;
26
+ /**
27
+ * Big integer representation.
28
+ */
29
+ BigInteger: number | bigint;
30
+ }
31
+ /**
32
+ * Custom application extension options.
33
+ */
34
+ interface CustomAppExtensionOptions extends AppExtensionOptions {
35
+ }
36
+ /**
10
37
  * If true, errors are reported through the throw/catch mechanism.
11
38
  */
12
- type ErrorExtends<ThrowError extends boolean> = ThrowError extends true ? Error : object;
39
+ type ThrowError = CustomAppExtensionOptions["ThrowError"];
40
+ /**
41
+ * Application error type.
42
+ */
43
+ type ApplicationError = CustomAppExtensionOptions["ApplicationError"];
44
+ /**
45
+ * Invocation context type.
46
+ */
47
+ type InvocationContext = CustomAppExtensionOptions["InvocationContext"];
48
+ /**
49
+ * Streaming context type.
50
+ */
51
+ type StreamingContext = CustomAppExtensionOptions["StreamingContext"];
52
+ /**
53
+ * Big integer representation type.
54
+ */
55
+ type BigInteger = CustomAppExtensionOptions["BigInteger"];
56
+
13
57
  /**
14
58
  * Sheet.
15
59
  */
@@ -69,14 +113,8 @@ type Matrix<T> = T[][];
69
113
  *
70
114
  * @template TResult
71
115
  * Result type.
72
- *
73
- * @template ThrowError
74
- * If true, errors are reported through the throw/catch mechanism.
75
- *
76
- * @template TError
77
- * Error type.
78
116
  */
79
- type SingletonResult<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = ThrowError extends false ? TResult | TError : TResult;
117
+ type SingletonResult<TResult> = ThrowError extends true ? TResult : TResult | ApplicationError;
80
118
  /**
81
119
  * Function matrix return, possibly including an error return in each element. If the application extension reports
82
120
  * errors through the return value, the individual element result is the union of the return type and the error type;
@@ -84,19 +122,13 @@ type SingletonResult<TResult, ThrowError extends boolean, TError extends ErrorEx
84
122
  *
85
123
  * @template TResult
86
124
  * Result type.
87
- *
88
- * @template ThrowError
89
- * If true, errors are reported through the throw/catch mechanism.
90
- *
91
- * @template TError
92
- * Error type.
93
125
  */
94
- type MatrixResult<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = Matrix<SingletonResult<TResult, ThrowError, TError>>;
126
+ type MatrixResult<TResult> = Matrix<SingletonResult<TResult>>;
95
127
 
96
128
  /**
97
129
  * Streaming consumer callback, returned by application extension implementation.
98
130
  */
99
- type StreamingConsumerCallback<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = (result: MatrixResult<TResult, ThrowError, TError>) => void;
131
+ type StreamingConsumerCallback<TResult> = (result: MatrixResult<TResult>) => void;
100
132
  /**
101
133
  * Streaming cancelled callback, passed to application extension implementation.
102
134
  */
@@ -104,23 +136,8 @@ type StreamingCancelledCallback = () => void;
104
136
 
105
137
  /**
106
138
  * Library proxy.
107
- *
108
- * @template ThrowError
109
- * If true, errors are reported through the throw/catch mechanism.
110
- *
111
- * @template TError
112
- * Error type.
113
- *
114
- * @template TInvocationContext
115
- * Application-specific invocation context type.
116
- *
117
- * @template TStreamingInvocationContext
118
- * Application-specific streaming invocation context type.
119
- *
120
- * @template TBigInt
121
- * Type to which big integer is mapped.
122
139
  */
123
- declare abstract class LibProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> {
140
+ declare abstract class LibProxy {
124
141
  #private;
125
142
  /**
126
143
  * Constructor.
@@ -128,11 +145,11 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
128
145
  * @param appExtension
129
146
  * Application extension.
130
147
  */
131
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
148
+ constructor(appExtension: AppExtension);
132
149
  /**
133
150
  * Get the application extension.
134
151
  */
135
- get appExtension(): AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>;
152
+ get appExtension(): AppExtension;
136
153
  /**
137
154
  * Map big integer to another type if necessary.
138
155
  *
@@ -142,7 +159,7 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
142
159
  * @returns
143
160
  * Mapped big integer value.
144
161
  */
145
- mapBigInt(value: bigint): SingletonResult<TBigInt, ThrowError, TError>;
162
+ mapBigInt(value: bigint): SingletonResult<BigInteger>;
146
163
  /**
147
164
  * Call a singleton result function with error handling.
148
165
  *
@@ -152,7 +169,7 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
152
169
  * @returns
153
170
  * Callback return or error if errors are not thrown.
154
171
  */
155
- singletonResult<TResult>(callback: () => SingletonResult<TResult, ThrowError, TError>): SingletonResult<TResult, ThrowError, TError>;
172
+ singletonResult<TResult>(callback: () => SingletonResult<TResult>): SingletonResult<TResult>;
156
173
  /**
157
174
  * Call a matrix result function with error handling.
158
175
  *
@@ -165,7 +182,7 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
165
182
  * @returns
166
183
  * Matrix of callback results and errors if errors are not thrown.
167
184
  */
168
- protected matrixResult<TValue, TResult>(matrixValues: Matrix<TValue>, valueCallback: (value: TValue) => SingletonResult<TResult, ThrowError, TError>): MatrixResult<TResult, ThrowError, TError>;
185
+ protected matrixResult<TValue, TResult>(matrixValues: Matrix<TValue>, valueCallback: (value: TValue) => SingletonResult<TResult>): MatrixResult<TResult>;
169
186
  /**
170
187
  * Map a matrix of validate string results to boolean. If the string is empty, the result is true, indicating that
171
188
  * there is no error.
@@ -176,7 +193,7 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
176
193
  * @returns
177
194
  * Matrix of boolean values, true if corresponding string is empty.
178
195
  */
179
- protected isValidString(matrixValidateResults: MatrixResult<string, ThrowError, TError>): Matrix<boolean>;
196
+ protected isValidString(matrixValidateResults: MatrixResult<string>): Matrix<boolean>;
180
197
  /**
181
198
  * Set up a mapping and call a matrix result function with error handling.
182
199
  *
@@ -192,7 +209,7 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
192
209
  * @returns
193
210
  * Matrix of callback results and errors if errors are not thrown.
194
211
  */
195
- protected setUpMatrixResult<TSetup, TValue, TResult>(setUpCallback: () => TSetup, matrixValues: Matrix<TValue>, valueCallback: (setup: TSetup, value: TValue) => SingletonResult<TResult, ThrowError, TError>): MatrixResult<TResult, ThrowError, TError>;
212
+ protected setUpMatrixResult<TSetup, TValue, TResult>(setUpCallback: () => TSetup, matrixValues: Matrix<TValue>, valueCallback: (setup: TSetup, value: TValue) => SingletonResult<TResult>): MatrixResult<TResult>;
196
213
  /**
197
214
  * Call an array result function with error handling and map to a matrix.
198
215
  *
@@ -205,7 +222,7 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
205
222
  * @returns
206
223
  * Matrix of callback results and errors if errors are not thrown.
207
224
  */
208
- protected arrayResult<TValue, TResult>(matrixValues: Matrix<TValue>, callback: (value: TValue) => Array<SingletonResult<TResult, ThrowError, TError>>): MatrixResult<TResult, ThrowError, TError>;
225
+ protected arrayResult<TValue, TResult>(matrixValues: Matrix<TValue>, callback: (value: TValue) => Array<SingletonResult<TResult>>): MatrixResult<TResult>;
209
226
  /**
210
227
  * Call a matrix result function with error handling and map a non-error result to an empty string and {@linkcode
211
228
  * RangeError} to the string error message.
@@ -232,28 +249,13 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
232
249
  * @returns
233
250
  * Matrix of callback results.
234
251
  */
235
- protected iterableResult<TResult>(iterableCallback: () => Iterable<SingletonResult<TResult, ThrowError, TError>>): MatrixResult<TResult, ThrowError, TError>;
252
+ protected iterableResult<TResult>(iterableCallback: () => Iterable<SingletonResult<TResult>>): MatrixResult<TResult>;
236
253
  }
237
254
 
238
255
  /**
239
256
  * Application extension.
240
- *
241
- * @template ThrowError
242
- * If true, errors are reported through the throw/catch mechanism.
243
- *
244
- * @template TError
245
- * Error type.
246
- *
247
- * @template TInvocationContext
248
- * Application-specific invocation context type.
249
- *
250
- * @template TStreamingInvocationContext
251
- * Application-specific streaming invocation context type.
252
- *
253
- * @template TBigInt
254
- * Type to which big integer is mapped.
255
257
  */
256
- declare abstract class AppExtension<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> {
258
+ declare abstract class AppExtension {
257
259
  #private;
258
260
  /**
259
261
  * Application name.
@@ -317,7 +319,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
317
319
  * @returns
318
320
  * Proxy instance.
319
321
  */
320
- getProxy<T extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>>(ProxyConstructor: new (appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) => T): T;
322
+ getProxy<T extends LibProxy>(ProxyConstructor: new (appExtension: AppExtension) => T): T;
321
323
  /**
322
324
  * Get the sheet address from an invocation context.
323
325
  *
@@ -327,7 +329,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
327
329
  * @returns
328
330
  * Sheet address.
329
331
  */
330
- abstract getSheetAddress(invocationContext: TInvocationContext): Promisable<SheetAddress>;
332
+ abstract getSheetAddress(invocationContext: InvocationContext): Promisable<SheetAddress>;
331
333
  /**
332
334
  * Get a parameter range from an invocation context.
333
335
  *
@@ -340,12 +342,12 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
340
342
  * @returns
341
343
  * Sheet range or null if parameter is not a range.
342
344
  */
343
- abstract getParameterSheetRange(invocationContext: TInvocationContext, parameterNumber: number): Promisable<SheetRange | null>;
345
+ abstract getParameterSheetRange(invocationContext: InvocationContext, parameterNumber: number): Promisable<SheetRange | null>;
344
346
  /**
345
- * Set up streaming for a streaming function.
347
+ * Install a streaming function.
346
348
  *
347
- * @param streamingInvocationContext
348
- * Streaming invocation context.
349
+ * @param streamingContext
350
+ * Streaming context.
349
351
  *
350
352
  * @param streamingCancelledCallback
351
353
  * Streaming cancelled callback, called when streaming is cancelled.
@@ -353,7 +355,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
353
355
  * @returns
354
356
  * Streaming consumer callback, called when stream contents updated.
355
357
  */
356
- abstract setUpStreaming<TResult>(streamingInvocationContext: TStreamingInvocationContext, streamingCancelledCallback: StreamingCancelledCallback): StreamingConsumerCallback<TResult, ThrowError, TError>;
358
+ abstract installStreaming<TResult>(streamingContext: StreamingContext, streamingCancelledCallback: StreamingCancelledCallback): StreamingConsumerCallback<TResult>;
357
359
  /**
358
360
  * Get a property stored within the active document.
359
361
  *
@@ -401,7 +403,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
401
403
  */
402
404
  validateSequenceCount(sequenceCount: number): void;
403
405
  /**
404
- * Map big integer to another type if necessary.
406
+ * Map a big integer to its representation type.
405
407
  *
406
408
  * @param value
407
409
  * Big integer value to map.
@@ -409,27 +411,25 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
409
411
  * @returns
410
412
  * Mapped big integer value.
411
413
  */
412
- abstract mapBigInt(value: bigint): SingletonResult<TBigInt, ThrowError, TError>;
414
+ abstract mapBigInt(value: bigint): SingletonResult<BigInteger>;
413
415
  /**
414
416
  * Map hyperlink results to a form suitable for the application.
415
417
  *
416
- * @param invocationContext
417
- * Invocation context.
418
- *
419
418
  * @param matrixHyperlinkResults
420
419
  * Matrix of hyperlink results from function call.
421
420
  *
422
421
  * @returns
423
422
  * Matrix of results in a form suitable for the application.
424
423
  */
425
- abstract mapHyperlinkResults(invocationContext: TInvocationContext, matrixHyperlinkResults: MatrixResult<Hyperlink, ThrowError, TError>): Promisable<MatrixResult<unknown, ThrowError, TError>>;
424
+ abstract mapHyperlinkResults(matrixHyperlinkResults: MatrixResult<Hyperlink>): Promisable<MatrixResult<unknown>>;
426
425
  /**
427
426
  * Map a range error (thrown by the library) to an application-specific error. If errors are reported through the
428
427
  * throw/catch mechanism, the implementation may return the range error unmodified if that is supported.
429
428
  *
430
429
  * @param rangeError
430
+ * Range error.
431
431
  */
432
- abstract mapRangeError(rangeError: RangeError): TError;
432
+ abstract mapRangeError(rangeError: RangeError): ApplicationError;
433
433
  /**
434
434
  * Handle an error with a message; called when an exception occurs outside the control of the AIDC Toolkit library.
435
435
  * Implementation must not return, most likely by throwing the message wrapped in an error type.
@@ -440,34 +440,34 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
440
440
  abstract handleError(message: string): never;
441
441
  }
442
442
 
443
- declare abstract class StringProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
443
+ declare abstract class StringProxy extends LibProxy {
444
444
  protected validateString<TStringValidation extends StringValidation>(validator: StringValidator<TStringValidation>, matrixSs: Matrix<string>, validation?: TStringValidation): Matrix<string>;
445
445
  }
446
446
 
447
- declare abstract class CharacterSetValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends StringProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
447
+ declare abstract class CharacterSetValidatorProxy extends StringProxy {
448
448
  #private;
449
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, characterSetValidator: CharacterSetValidator);
449
+ constructor(appExtension: AppExtension, characterSetValidator: CharacterSetValidator);
450
450
  validate(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): Matrix<string>;
451
451
  isValid(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): Matrix<boolean>;
452
452
  }
453
- declare abstract class CharacterSetCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
453
+ declare abstract class CharacterSetCreatorProxy extends CharacterSetValidatorProxy {
454
454
  #private;
455
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, characterSetCreator: CharacterSetCreator);
456
- create(length: number, matrixValues: Matrix<number | bigint>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string, ThrowError, TError>;
457
- createSequence(length: number, startValue: number, count: number, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string, ThrowError, TError>;
458
- valueFor(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<TBigInt, ThrowError, TError>;
455
+ constructor(appExtension: AppExtension, characterSetCreator: CharacterSetCreator);
456
+ create(length: number, matrixValues: Matrix<number | bigint>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string>;
457
+ createSequence(length: number, startValue: number, count: number, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string>;
458
+ valueFor(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<BigInteger>;
459
459
  }
460
- declare class NumericProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
461
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
460
+ declare class NumericProxy extends CharacterSetCreatorProxy {
461
+ constructor(appExtension: AppExtension);
462
462
  }
463
- declare class HexadecimalProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
464
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
463
+ declare class HexadecimalProxy extends CharacterSetCreatorProxy {
464
+ constructor(appExtension: AppExtension);
465
465
  }
466
- declare class AlphabeticProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
467
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
466
+ declare class AlphabeticProxy extends CharacterSetCreatorProxy {
467
+ constructor(appExtension: AppExtension);
468
468
  }
469
- declare class AlphanumericProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
470
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
469
+ declare class AlphanumericProxy extends CharacterSetCreatorProxy {
470
+ constructor(appExtension: AppExtension);
471
471
  }
472
472
 
473
- export { type Address as A, CharacterSetValidatorProxy as C, type ErrorExtends as E, HexadecimalProxy as H, LibProxy as L, type Matrix as M, NumericProxy as N, type Range as R, StringProxy as S, type MatrixResult as a, type Sheet as b, type SheetAddress as c, type SheetRange as d, type SingletonResult as e, type StreamingConsumerCallback as f, type StreamingCancelledCallback as g, AppExtension as h, CharacterSetCreatorProxy as i, AlphabeticProxy as j, AlphanumericProxy as k };
473
+ export { type Address as A, type BigInteger as B, CharacterSetCreatorProxy as C, HexadecimalProxy as H, type InvocationContext as I, LibProxy as L, type Matrix as M, NumericProxy as N, type Range as R, type StreamingContext as S, type ThrowError as T, type MatrixResult as a, StringProxy as b, AlphabeticProxy as c, AlphanumericProxy as d, AppExtension as e, type AppExtensionOptions as f, type ApplicationError as g, CharacterSetValidatorProxy as h, type CustomAppExtensionOptions as i, type Sheet as j, type SheetAddress as k, type SheetRange as l, type SingletonResult as m, type StreamingCancelledCallback as n, type StreamingConsumerCallback as o };
@@ -0,0 +1 @@
1
+ import{b as C,c as L,d as f,e as S,f as P,h as k,k as A,m as q,n as d,o as h,q as x}from"./chunk-WLXID4YR.js";import{isNullish as M,logLevelOf as O}from"@aidc-toolkit/core";var Y={name:"spillArray",type:d.Any,multiplicity:h.Array,isRequired:!0},K={name:"spillMaximum",type:d.Number,multiplicity:h.Singleton,isRequired:!1},Z={extendsDescriptor:K,sortOrder:0,name:"spillMaximumWidth"},$={extendsDescriptor:K,sortOrder:1,name:"spillMaximumHeight"},T={name:"logLevel",type:d.String,multiplicity:h.Singleton,isRequired:!1},j,G,z,B,F,J,b,p,N,Q;J=[x.describeClass(!1,{category:"helper"})];var n=class n extends(F=q,B=[x.describeMethod({type:d.String,multiplicity:h.Singleton,parameterDescriptors:[]})],z=[x.describeMethod({type:d.Any,multiplicity:h.Matrix,isAsync:!0,requiresContext:!0,parameterDescriptors:[Y,$,Z]})],G=[x.describeMethod({type:d.String,multiplicity:h.Array,isHidden:!0,parameterDescriptors:[T]})],j=[x.describeMethod({type:d.String,multiplicity:h.Array,isHidden:!0,isStream:!0,parameterDescriptors:[T]})],F){constructor(){super(...arguments);L(p,5,this);P(this,N)}version(){return this.appExtension.version}async spill(t,l,e,o){let i,s=t.length,a=s!==0?t[0].length:0,y=this.singletonResult(()=>{if(s>1&&a>1)throw new RangeError(A.t("Proxy.matrixMustBeArray"));return!0});if(y===!0){let w=await k(this,N,Q).call(this,{width:e,height:l},o),v=s===1,m=v?a:s,D=v?w.width:w.height,E=v?w.height:w.width,U=D*E;if(m>1&&m<=U){let R=Math.sqrt(m),u;if(Number.isInteger(Math.log10(m))){let r=10**Math.ceil(Math.log10(R));r>D&&(r/=10),r<=D&&m/r<=E&&(u=r)}u??=Math.max(Math.min(Math.ceil(R),D),Math.floor(m/E));let I=Math.ceil(m/u);if(i=[],v){let r=0;do{let g=r+u,c=t[0].slice(r,g);if(c.length<u){let X=c.length;c.length=u,c.fill("",X,u)}i.push(c),r=g}while(r<m)}else for(let r=0;r<u;r++){let g=[];for(let c=r;c<m;c+=u)g.push(t[c][0]);g.length<I&&(g[I-1]=""),i.push(g)}}else i=t}else i=[[y]];return i}loggerMessages(t){let l=this.appExtension,e;if(!M(t))try{e=O(t)}catch{}return e!==void 0&&(l.logger.settings.minLevel=e),l.memoryTransport.messages.map(o=>[o])}loggerStream(t,l){if(M(l))throw new Error("Streaming context not provided by application");let e=this.appExtension,o=!1,i,s=e.installStreaming(l,()=>{o&&e.memoryTransport.removeNotificationCallback(S(n,b)),i!==void 0&&(e.logger.settings.minLevel=i)});if(e.memoryTransport.addNotificationCallback(S(n,b),(a,y)=>{s(this.iterableResult(()=>y))})){o=!0;let a;if(!M(t))try{a=O(t)}catch{}a!==void 0&&(i=e.logger.settings.minLevel,e.logger.settings.minLevel=a)}else s([["Only one logger stream allowable per workbook"]])}};p=C(F),b=new WeakMap,N=new WeakSet,Q=async function(t,l){if(M(l))throw new Error("Invocation context not provided by application");let e=t.width,o=t.height,i,s;if(M(e)||M(o)){let a=await this.appExtension.getSheetAddress(l);i=e??this.appExtension.maximumWidth-a.columnIndex,s=o??this.appExtension.maximumHeight-a.rowIndex}else i=e,s=o;return{width:i,height:s}},f(p,1,"version",B,n),f(p,1,"spill",z,n),f(p,1,"loggerMessages",G,n),f(p,1,"loggerStream",j,n),n=f(p,0,"AppHelperProxy",J,n),P(n,b,"loggerStream"),L(p,1,n);var W=n;export{W as a};
@@ -0,0 +1 @@
1
+ import{A as Je,a as Ai,b as c,c as s,d as r,e as Ne,f as Xe,g as At,h as ze,k as R,m as d,n as a,o as n,p as Se,q as i,r as Re,s as kt,t as Ct,v as wt,x as Ye,y as B,z as Ot}from"./chunk-WLXID4YR.js";var Bs={};Ai(Bs,{AI39Proxy:()=>H,AI64Proxy:()=>$,AI82Proxy:()=>_,CPIDCreatorProxy:()=>Te,CPIDValidatorProxy:()=>ce,CheckProxy:()=>x,GCNCreatorProxy:()=>Me,GCNValidatorProxy:()=>ae,GCPLengthProxy:()=>v,GDTICreatorProxy:()=>ge,GDTIValidatorProxy:()=>se,GIAICreatorProxy:()=>fe,GIAIValidatorProxy:()=>re,GINCCreatorProxy:()=>he,GINCValidatorProxy:()=>ne,GLNCreatorProxy:()=>le,GLNValidatorProxy:()=>V,GMNCreatorProxy:()=>be,GMNValidatorProxy:()=>oe,GRAICreatorProxy:()=>de,GRAIValidatorProxy:()=>te,GSINCreatorProxy:()=>De,GSINValidatorProxy:()=>pe,GSRNCreatorProxy:()=>xe,GSRNValidatorProxy:()=>ie,GTIN12ValidatorProxy:()=>Z,GTIN13ValidatorProxy:()=>Q,GTIN8ValidatorProxy:()=>P,GTINCreatorProxy:()=>F,GTINValidatorStaticProxy:()=>f,PrefixManagerProxy:()=>L,SSCCCreatorProxy:()=>ue,SSCCValidatorProxy:()=>ee,VariableMeasureProxy:()=>C,VerifiedByGS1Proxy:()=>G});import{AI39_CREATOR as ki,AI64_VALIDATOR as Ci,AI82_CREATOR as wi}from"@aidc-toolkit/gs1";var qt,Ke,Oi;qt=[i.describeClass(!1,{namespace:"GS1",methodInfix:"AI82",replacementParameterDescriptors:[{name:Se(Ye).name,replacement:B}]})];var _=class extends(Oi=Je){constructor(t){super(t,wi)}};Ke=c(Oi),_=r(Ke,0,"AI82Proxy",qt,_),s(Ke,1,_);var zt,Qe,qi;zt=[i.describeClass(!1,{namespace:"GS1",methodInfix:"AI39",replacementParameterDescriptors:[{name:Se(Ye).name,replacement:B}]})];var H=class extends(qi=Je){constructor(t){super(t,ki)}};Qe=c(qi),H=r(Qe,0,"AI39Proxy",zt,H),s(Qe,1,H);var Lt,Ze,zi;Lt=[i.describeClass(!1,{namespace:"GS1",methodInfix:"AI64"})];var $=class extends(zi=Ot){constructor(t){super(t,Ci)}};Ze=c(zi),$=r(Ze,0,"AI64Proxy",Lt,$),s(Ze,1,$);import{checkCharacterPair as Li,checkDigit as Ui,hasValidCheckCharacterPair as ji,hasValidCheckDigit as Fi,isValidPriceOrWeightCheckDigit as Gi,priceOrWeightCheckDigit as Wi}from"@aidc-toolkit/gs1";var Xt={name:"checkS",type:a.String,multiplicity:n.Matrix,isRequired:!0},Le={extendsDescriptor:Xt,name:"numericS"},Ut={extendsDescriptor:Le,sortOrder:0,name:"numericSFourOrFiveDigits"},Bi={extendsDescriptor:Le,sortOrder:1,name:"numericSWithCheckDigit"},_i={extendsDescriptor:Le,sortOrder:2,name:"checkDigit",multiplicity:n.Singleton},Yt={extendsDescriptor:Xt,name:"ai82S"},Hi={extendsDescriptor:Yt,name:"ai82SWithCheckCharacterPair"},jt,Ft,Gt,Wt,Bt,_t,Ht,$t,N;$t=[i.describeClass(!1,{namespace:"GS1",category:"checkCharacter"})];var x=class extends(Ht=d,_t=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Le]})],Bt=[i.describeMethod({type:a.Boolean,multiplicity:n.Matrix,parameterDescriptors:[Bi]})],Wt=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Ut]})],Gt=[i.describeMethod({type:a.Boolean,multiplicity:n.Singleton,parameterDescriptors:[{...Ut,multiplicity:n.Singleton},_i]})],Ft=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Yt]})],jt=[i.describeMethod({type:a.Boolean,multiplicity:n.Matrix,parameterDescriptors:[Hi]})],Ht){constructor(){super(...arguments);s(N,5,this)}checkDigit(e){return this.matrixResult(e,p=>Ui(p))}hasValidCheckDigit(e){return this.matrixResult(e,p=>Fi(p))}priceOrWeightCheckDigit(e){return this.matrixResult(e,p=>Wi(p))}isValidPriceOrWeightCheckDigit(e,p){return this.singletonResult(()=>Gi(e,p))}checkCharacterPair(e){return this.matrixResult(e,p=>Li(p))}hasValidCheckCharacterPair(e){return this.matrixResult(e,p=>ji(p))}};N=c(Ht),r(N,1,"checkDigit",_t,x),r(N,1,"hasValidCheckDigit",Bt,x),r(N,1,"priceOrWeightCheckDigit",Wt,x),r(N,1,"isValidPriceOrWeightCheckDigit",Gt,x),r(N,1,"checkCharacterPair",Ft,x),r(N,1,"hasValidCheckCharacterPair",jt,x),x=r(N,0,"CheckProxy",$t,x),s(N,1,x);import{GTINLengths as rt,GTINValidator as K,IdentifierValidators as it}from"@aidc-toolkit/gs1";var Ue={name:"indicatorDigit",type:a.String,multiplicity:n.Singleton,isRequired:!0};var je={name:"identifierType",type:a.String,multiplicity:n.Singleton,isRequired:!0},u={name:"identifier",type:a.String,multiplicity:n.Matrix,isRequired:!0};var Fe={extendsDescriptor:u,sortOrder:0,name:"validateIdentifier"},$i={extendsDescriptor:u,sortOrder:1,name:"splitIdentifier",multiplicity:n.Array},Jt,Pe,Xi;Jt=[i.describeClass(!0,{namespace:"GS1",category:"identifierValidation"})];var q=class extends(Xi=wt){#e;constructor(t,e){super(t),this.#e=e}get validator(){return this.#e}};Pe=c(Xi),q=r(Pe,0,"IdentifierValidatorProxy",Jt,q),s(Pe,1,q);var Kt,Qt,Zt,Pt,X;Pt=[i.describeClass(!0)];var E=class extends(Zt=q,Qt=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Fe]})],Kt=[i.describeMethod({type:a.Boolean,multiplicity:n.Matrix,parameterDescriptors:[Fe]})],Zt){constructor(){super(...arguments);s(X,5,this)}validate(e){return this.validateString(this.validator,e)}isValid(e){return this.isValidString(this.validate(e))}};X=c(Zt),r(X,1,"validate",Qt,E),r(X,1,"isValid",Kt,E),E=r(X,0,"NumericIdentifierValidatorProxy",Pt,E),s(X,1,E);var J=class extends E{},Ge=class extends E{},z=class extends Ge{},Vt,er,tr,Ee;tr=[i.describeClass(!0)];var S=class extends(er=Ge,Vt=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[$i]})],er){constructor(){super(...arguments);s(Ee,5,this)}split(e){return this.arrayResult(e,p=>{let m=this.validator.split(p);return[m.baseIdentifier,m.serialComponent]})}};Ee=c(er),r(Ee,1,"split",Vt,S),S=r(Ee,0,"SerializableNumericIdentifierValidatorProxy",tr,S),s(Ee,1,S);var rr,ir,sr,nr,Y;nr=[i.describeClass(!0)];var g=class extends(sr=q,ir=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Fe,B]})],rr=[i.describeMethod({type:a.Boolean,multiplicity:n.Matrix,parameterDescriptors:[Fe,B]})],sr){constructor(){super(...arguments);s(Y,5,this)}validate(e,p){return this.validateString(this.validator,e,{exclusion:p??void 0})}isValid(e,p){return this.isValidString(this.validate(e,p))}};Y=c(sr),r(Y,1,"validate",ir,g),r(Y,1,"isValid",rr,g),g=r(Y,0,"NonNumericIdentifierValidatorProxy",nr,g),s(Y,1,g);var or,Ve,Zi;or=[i.describeClass(!1,{methodInfix:"GTIN13"})];var Q=class extends(Zi=J){constructor(t){super(t,it.GTIN[rt.GTIN13])}};Ve=c(Zi),Q=r(Ve,0,"GTIN13ValidatorProxy",or,Q),s(Ve,1,Q);var mr,et,Pi;mr=[i.describeClass(!1,{methodInfix:"GTIN12"})];var Z=class extends(Pi=J){constructor(t){super(t,it.GTIN[rt.GTIN12])}};et=c(Pi),Z=r(et,0,"GTIN12ValidatorProxy",mr,Z),s(et,1,Z);var lr,tt,Vi;lr=[i.describeClass(!1,{methodInfix:"GTIN8"})];var P=class extends(Vi=J){constructor(t){super(t,it.GTIN[rt.GTIN8])}};tt=c(Vi),P=r(tt,0,"GTIN8ValidatorProxy",lr,P),s(tt,1,P);var Yi={extendsDescriptor:u,name:"zeroSuppressibleGTIN12"},Ji={extendsDescriptor:u,name:"zeroSuppressedGTIN12"},Ki={extendsDescriptor:u,name:"convertGTIN"},Qi={extendsDescriptor:u,name:"normalizeGTIN"},pr={extendsDescriptor:u,name:"validateGTIN"},ar={name:"gtinLevel",type:a.Number,multiplicity:n.Singleton,isRequired:!1},cr={extendsDescriptor:u,name:"validateGTIN14"},ur,dr,fr,xr,gr,hr,Dr,Mr,Tr,br,h;br=[i.describeClass(!1,{namespace:"GS1",category:"identifierValidation"})];var f=class extends(Tr=d,Mr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Yi]})],Dr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Ji]})],hr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Ue,Ki]})],gr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[Qi]})],xr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[pr,ar]})],fr=[i.describeMethod({type:a.Boolean,multiplicity:n.Matrix,parameterDescriptors:[pr,ar]})],dr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[cr]})],ur=[i.describeMethod({type:a.Boolean,multiplicity:n.Matrix,parameterDescriptors:[cr]})],Tr){constructor(){super(...arguments);s(h,5,this)}zeroSuppressGTIN12(e){return this.matrixResult(e,p=>K.zeroSuppress(p))}zeroExpandGTIN12(e){return this.matrixResult(e,p=>K.zeroExpand(p))}convertToGTIN14(e,p){return this.matrixResult(p,m=>K.convertToGTIN14(e,m))}normalizeGTIN(e){return this.matrixResult(e,p=>K.normalize(p))}validateGTIN(e,p){let m=p??void 0;return this.matrixErrorResult(e,l=>{K.validateAny(l,m)})}isValidGTIN(e,p){return this.isValidString(this.validateGTIN(e,p))}validateGTIN14(e){return this.matrixErrorResult(e,p=>{K.validateGTIN14(p)})}isValidGTIN14(e){return this.isValidString(this.validateGTIN14(e))}};h=c(Tr),r(h,1,"zeroSuppressGTIN12",Mr,f),r(h,1,"zeroExpandGTIN12",Dr,f),r(h,1,"convertToGTIN14",hr,f),r(h,1,"normalizeGTIN",gr,f),r(h,1,"validateGTIN",xr,f),r(h,1,"isValidGTIN",fr,f),r(h,1,"validateGTIN14",dr,f),r(h,1,"isValidGTIN14",ur,f),f=r(h,0,"GTINValidatorStaticProxy",br,f),s(h,1,f);import{IdentifierValidators as M}from"@aidc-toolkit/gs1";var yr,st,es;yr=[i.describeClass(!1,{methodInfix:"GLN"})];var V=class extends(es=z){constructor(t){super(t,M.GLN)}};st=c(es),V=r(st,0,"GLNValidatorProxy",yr,V),s(st,1,V);var Ir,nt,ts;Ir=[i.describeClass(!1,{methodInfix:"SSCC"})];var ee=class extends(ts=z){constructor(t){super(t,M.SSCC)}};nt=c(ts),ee=r(nt,0,"SSCCValidatorProxy",Ir,ee),s(nt,1,ee);var Nr,pt,rs;Nr=[i.describeClass(!1,{methodInfix:"GRAI"})];var te=class extends(rs=S){constructor(t){super(t,M.GRAI)}};pt=c(rs),te=r(pt,0,"GRAIValidatorProxy",Nr,te),s(pt,1,te);var Sr,at,is;Sr=[i.describeClass(!1,{methodInfix:"GIAI"})];var re=class extends(is=g){constructor(t){super(t,M.GIAI)}};at=c(is),re=r(at,0,"GIAIValidatorProxy",Sr,re),s(at,1,re);var Rr,ct,ss;Rr=[i.describeClass(!1,{methodInfix:"GSRN"})];var ie=class extends(ss=z){constructor(t){super(t,M.GSRN)}};ct=c(ss),ie=r(ct,0,"GSRNValidatorProxy",Rr,ie),s(ct,1,ie);var Er,ot,ns;Er=[i.describeClass(!1,{methodInfix:"GDTI"})];var se=class extends(ns=S){constructor(t){super(t,M.GDTI)}};ot=c(ns),se=r(ot,0,"GDTIValidatorProxy",Er,se),s(ot,1,se);var vr,mt,ps;vr=[i.describeClass(!1,{methodInfix:"GINC"})];var ne=class extends(ps=g){constructor(t){super(t,M.GINC)}};mt=c(ps),ne=r(mt,0,"GINCValidatorProxy",vr,ne),s(mt,1,ne);var Ar,lt,as;Ar=[i.describeClass(!1,{methodInfix:"GSIN"})];var pe=class extends(as=z){constructor(t){super(t,M.GSIN)}};lt=c(as),pe=r(lt,0,"GSINValidatorProxy",Ar,pe),s(lt,1,pe);var kr,ut,cs;kr=[i.describeClass(!1,{methodInfix:"GCN"})];var ae=class extends(cs=S){constructor(t){super(t,M.GCN)}};ut=c(cs),ae=r(ut,0,"GCNValidatorProxy",kr,ae),s(ut,1,ae);var Cr,dt,os;Cr=[i.describeClass(!1,{methodInfix:"CPID"})];var ce=class extends(os=g){constructor(t){super(t,M.CPID)}};dt=c(os),ce=r(dt,0,"CPIDValidatorProxy",Cr,ce),s(dt,1,ce);var wr,ft,ms;wr=[i.describeClass(!1,{methodInfix:"GMN"})];var oe=class extends(ms=g){constructor(t){super(t,M.GMN)}};ft=c(ms),oe=r(ft,0,"GMNValidatorProxy",wr,oe),s(ft,1,oe);var ls={name:"prefix",type:a.String,multiplicity:n.Singleton,isRequired:!0},us={name:"prefixType",type:a.Number,multiplicity:n.Singleton,isRequired:!1},ds={name:"tweakFactor",type:a.Number,multiplicity:n.Singleton,isRequired:!1},Or,qr,zr,ve;zr=[i.describeClass(!1,{namespace:"GS1",category:"prefix"})];var L=class extends(qr=d,Or=[i.describeMethod({type:a.Any,multiplicity:n.SingletonArray,parameterDescriptors:[ls,us,ds]})],qr){constructor(){super(...arguments);s(ve,5,this)}definePrefix(e,p,m){return[[e,p,m]]}};ve=c(qr),r(ve,1,"definePrefix",Or,L),L=r(ve,0,"PrefixManagerProxy",zr,L),s(ve,1,L);import{isNullish as Ur}from"@aidc-toolkit/core";import{PrefixManager as fs,PrefixTypes as We,PrefixValidator as jr}from"@aidc-toolkit/gs1";import{Sequence as xs}from"@aidc-toolkit/utility";var Lr={name:"prefixDefinition",type:a.Any,multiplicity:n.SingletonArray,isRequired:!0},A={extendsDescriptor:Lr,name:"prefixDefinitionGS1UPC"},xt={extendsDescriptor:Lr,name:"prefixDefinitionAny"};var Gr,gt,Ms;Gr=[i.describeClass(!0,{namespace:"GS1",category:"identifierCreation"})];var k=class k extends(Ms=d){static#e=[We.GS1CompanyPrefix,We.UPCCompanyPrefix,We.GS18Prefix];#t;constructor(t,e){super(t),this.#t=e}getCreator(t){let e=t.length===1?t[0]:t.map(Oe=>{if(Oe.length!==1)throw new RangeError(R.t("IdentifierCreatorProxy.prefixDefinitionMustBeOneDimensional"));return Oe[0]});if(e.length>3)throw new RangeError(R.t("IdentifierCreatorProxy.prefixDefinitionMustHaveMaximumThreeElements"));let p=e[0];if(typeof p!="string")throw new RangeError(R.t("IdentifierCreatorProxy.prefixMustBeString"));function m(Oe,vi){let qe=e[Oe];return!Ur(qe)&&qe!==0&&qe!==""?qe:vi}let l=m(1,0);if(typeof l!="number"||l<0||l>=k.#e.length)throw new RangeError(R.t("IdentifierCreatorProxy.prefixTypeMustBeNumber",{maximumPrefixType:k.#e.length-1}));let I=k.#e[l];if(I===void 0)throw new RangeError(R.t("IdentifierCreatorProxy.invalidPrefixType"));let D=fs.get(I,p),O=m(2,null);if(Ur(O))D.resetTweakFactor();else{if(typeof O!="number")throw new RangeError(R.t("IdentifierCreatorProxy.tweakFactorMustBeNumber"));D.tweakFactor=O}return this.#t(D)}};gt=c(Ms),k=r(gt,0,"IdentifierCreatorProxy",Gr,k),s(gt,1,k);var Be=k,ke={name:"sparse",type:a.Boolean,multiplicity:n.Singleton,isRequired:!1},Wr,Br,_r,Hr,$r,U;$r=[i.describeClass(!0)];var T=class extends(Hr=Be,_r=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[A,Re,ke]})],Br=[i.describeMethod({infixBefore:"Sequence",type:a.String,multiplicity:n.Array,parameterDescriptors:[A,kt,Ct,ke]})],Wr=[i.describeMethod({type:a.String,multiplicity:n.Array,parameterDescriptors:[A]})],Hr){constructor(){super(...arguments);s(U,5,this)}create(e,p,m){let l=m??void 0;return this.setUpMatrixResult(()=>this.getCreator(e),p,(I,D)=>I.create(D,l))}createSequence(e,p,m,l){return this.iterableResult(()=>(this.appExtension.validateSequenceCount(m),this.getCreator(e).create(new xs(p,m),l??void 0)))}createAll(e){return this.iterableResult(()=>{let p=this.getCreator(e);return this.appExtension.validateSequenceCount(p.capacity),p.createAll()})}};U=c(Hr),r(U,1,"create",_r,T),r(U,1,"createSequence",Br,T),r(U,1,"createAll",Wr,T),T=r(U,0,"NumericIdentifierCreatorProxy",$r,T),s(U,1,T);var _e=class extends T{},j=class extends _e{},gs={extendsDescriptor:Re,multiplicity:n.Singleton},hs={extendsDescriptor:u,name:"baseIdentifier",multiplicity:n.Singleton},Fr={name:"serialComponent",type:a.String,multiplicity:n.Matrix,isRequired:!0},Xr,Yr,Jr,Kr,me;Kr=[i.describeClass(!0)];var b=class extends(Jr=_e,Yr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[A,gs,Fr,ke]})],Xr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[hs,Fr]})],Jr){constructor(){super(...arguments);s(me,5,this)}createSerialized(e,p,m,l){let I=l??void 0;return this.setUpMatrixResult(()=>this.getCreator(e),m,(D,O)=>D.createSerialized(p,O,I))}concatenate(e,p){return this.setUpMatrixResult(()=>this.getCreator([[e.substring(0,e.startsWith("0")?jr.UPC_COMPANY_PREFIX_MINIMUM_LENGTH+1:jr.GS1_COMPANY_PREFIX_MINIMUM_LENGTH),We.GS1CompanyPrefix]]),p,(m,l)=>m.concatenate(e,l))}};me=c(Jr),r(me,1,"createSerialized",Yr,b),r(me,1,"concatenate",Xr,b),b=r(me,0,"SerializableNumericIdentifierCreatorProxy",Kr,b),s(me,1,b);var Ds={name:"reference",type:a.String,multiplicity:n.Matrix,isRequired:!0},Qr,Zr,Pr,Ae;Pr=[i.describeClass(!0)];var y=class extends(Zr=Be,Qr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,parameterDescriptors:[A,Ds]})],Zr){constructor(){super(...arguments);s(Ae,5,this)}create(e,p){return this.setUpMatrixResult(()=>this.getCreator(e),p,(m,l)=>m.create(l))}};Ae=c(Zr),r(Ae,1,"create",Qr,y),y=r(Ae,0,"NonNumericIdentifierCreatorProxy",Pr,y),s(Ae,1,y);var Vr,ei,ti,Ce;ti=[i.describeClass(!1,{methodInfix:"GTIN",replacementParameterDescriptors:[{name:Se(A).name,replacement:xt}]})];var F=class extends(ei=T,Vr=[i.describeMethod({type:a.String,multiplicity:n.Matrix,ignoreInfix:!0,parameterDescriptors:[Ue,xt,Re,ke]})],ei){constructor(e){super(e,p=>p.gtinCreator);s(Ce,5,this)}createGTIN14(e,p,m,l){let I=l??void 0;return this.setUpMatrixResult(()=>this.getCreator(p),m,(D,O)=>D.createGTIN14(e,O,I))}};Ce=c(ei),r(Ce,1,"createGTIN14",Vr,F),F=r(Ce,0,"GTINCreatorProxy",ti,F),s(Ce,1,F);var ri,ht,Ts;ri=[i.describeClass(!1,{methodInfix:"GLN"})];var le=class extends(Ts=j){constructor(t){super(t,e=>e.glnCreator)}};ht=c(Ts),le=r(ht,0,"GLNCreatorProxy",ri,le),s(ht,1,le);var ii,Dt,bs;ii=[i.describeClass(!1,{methodInfix:"SSCC"})];var ue=class extends(bs=j){constructor(t){super(t,e=>e.ssccCreator)}};Dt=c(bs),ue=r(Dt,0,"SSCCCreatorProxy",ii,ue),s(Dt,1,ue);var si,Mt,ys;si=[i.describeClass(!1,{methodInfix:"GRAI"})];var de=class extends(ys=b){constructor(t){super(t,e=>e.graiCreator)}};Mt=c(ys),de=r(Mt,0,"GRAICreatorProxy",si,de),s(Mt,1,de);var ni,Tt,Is;ni=[i.describeClass(!1,{methodInfix:"GIAI"})];var fe=class extends(Is=y){constructor(t){super(t,e=>e.giaiCreator)}};Tt=c(Is),fe=r(Tt,0,"GIAICreatorProxy",ni,fe),s(Tt,1,fe);var pi,bt,Ns;pi=[i.describeClass(!1,{methodInfix:"GSRN"})];var xe=class extends(Ns=j){constructor(t){super(t,e=>e.gsrnCreator)}};bt=c(Ns),xe=r(bt,0,"GSRNCreatorProxy",pi,xe),s(bt,1,xe);var ai,yt,Ss;ai=[i.describeClass(!1,{methodInfix:"GDTI"})];var ge=class extends(Ss=b){constructor(t){super(t,e=>e.gdtiCreator)}};yt=c(Ss),ge=r(yt,0,"GDTICreatorProxy",ai,ge),s(yt,1,ge);var ci,It,Rs;ci=[i.describeClass(!1,{methodInfix:"GINC"})];var he=class extends(Rs=y){constructor(t){super(t,e=>e.gincCreator)}};It=c(Rs),he=r(It,0,"GINCCreatorProxy",ci,he),s(It,1,he);var oi,Nt,Es;oi=[i.describeClass(!1,{methodInfix:"GSIN"})];var De=class extends(Es=j){constructor(t){super(t,e=>e.gsinCreator)}};Nt=c(Es),De=r(Nt,0,"GSINCreatorProxy",oi,De),s(Nt,1,De);var mi,St,vs;mi=[i.describeClass(!1,{methodInfix:"GCN"})];var Me=class extends(vs=b){constructor(t){super(t,e=>e.gcnCreator)}};St=c(vs),Me=r(St,0,"GCNCreatorProxy",mi,Me),s(St,1,Me);var li,Rt,As;li=[i.describeClass(!1,{methodInfix:"CPID"})];var Te=class extends(As=y){constructor(t){super(t,e=>e.cpidCreator)}};Rt=c(As),Te=r(Rt,0,"CPIDCreatorProxy",li,Te),s(Rt,1,Te);var ui,Et,ks;ui=[i.describeClass(!1,{methodInfix:"GMN"})];var be=class extends(ks=y){constructor(t){super(t,e=>e.gmnCreator)}};Et=c(ks),be=r(Et,0,"GMNCreatorProxy",ui,be),s(Et,1,be);import{VariableMeasure as di}from"@aidc-toolkit/gs1";var fi={name:"rcnFormat",type:a.String,multiplicity:n.Singleton,isRequired:!0},Cs={name:"rcn",type:a.String,multiplicity:n.Array,isRequired:!0},ws={name:"rcnItemReference",type:a.Number,multiplicity:n.Singleton,isRequired:!0},Os={name:"rcnPriceOrWeight",type:a.Number,multiplicity:n.Matrix,isRequired:!0},xi,gi,hi,Di,ye;Di=[i.describeClass(!1,{namespace:"GS1",category:"variableMeasure"})];var C=class extends(hi=d,gi=[i.describeMethod({type:a.Number,multiplicity:n.Matrix,parameterDescriptors:[fi,Cs]})],xi=[i.describeMethod({type:a.String,multiplicity:n.Matrix,ignoreInfix:!0,parameterDescriptors:[fi,ws,Os]})],hi){constructor(){super(...arguments);s(ye,5,this)}parseVariableMeasureRCN(e,p){return this.arrayResult(p,m=>{let l=di.parseRCN(e,m);return[l.itemReference,l.priceOrWeight]})}createVariableMeasureRCN(e,p,m){return this.matrixResult(m,l=>di.createRCN(e,p,l))}};ye=c(hi),r(ye,1,"parseVariableMeasureRCN",gi,C),r(ye,1,"createVariableMeasureRCN",xi,C),C=r(ye,0,"VariableMeasureProxy",Di,C),s(ye,1,C);import{verifiedByGS1 as Ls}from"@aidc-toolkit/gs1";import{IdentifierTypes as qs}from"@aidc-toolkit/gs1";function zs(o){return o in qs}function He(o){let t=o.toUpperCase();if(!zs(t))throw new RangeError(R.t("ServiceProxy.invalidIdentifierType",{identifierType:o}));return t}var Us={extendsDescriptor:u,name:"hyperlinkIdentifier"},js={name:"hyperlinkText",type:a.String,multiplicity:n.Singleton,isRequired:!1},Fs={name:"hyperlinkDetails",type:a.String,multiplicity:n.Singleton,isRequired:!1},Mi,Ti,bi,we;bi=[i.describeClass(!1,{namespace:"GS1",category:"service"})];var G=class extends(Ti=d,Mi=[i.describeMethod({type:a.Any,multiplicity:n.Matrix,isAsync:!0,parameterDescriptors:[je,Us,js,Fs]})],Ti){constructor(){super(...arguments);s(we,5,this)}async verifiedByGS1(e,p,m,l){return this.appExtension.mapHyperlinkResults(this.setUpMatrixResult(()=>He(e),p,(I,D)=>Ls(I,D,m??void 0,l??void 0)))}};we=c(Ti),r(we,1,"verifiedByGS1",Mi,G),G=r(we,0,"VerifiedByGS1Proxy",bi,G),s(we,1,G);import{GCPLength as Gs,RemoteGCPLengthCache as yi}from"@aidc-toolkit/gs1";var Ws={extendsDescriptor:u,name:"gcpLengthIdentifier"},vt=class extends yi{#e;constructor(t){super(t.sharedAppDataStorage,yi.DEFAULT_BASE_URL,t.httpFetch),this.#e=t.logger}get nextCheckDateTime(){return super.nextCheckDateTime.then(t=>(this.#e.debug(`GS1 Company Prefix length next check date/time ${t?.toISOString()}`),t))}get cacheDateTime(){return super.cacheDateTime.then(t=>(this.#e.debug(`GS1 Company Prefix length cache date/time ${t?.toISOString()}`),t))}get cacheData(){return super.cacheData.then(t=>(this.#e.debug("GS1 Company Prefix length cache data retrieved"),t))}get sourceDateTime(){return super.sourceDateTime.then(t=>(this.#e.debug(`GS1 Company Prefix source date/time ${t.toISOString()}`),t))}get sourceData(){return super.sourceData.then(t=>(this.#e.debug("GS1 Company Prefix length source data retrieved"),t))}async update(t,e,p){return super.update(t,e,p).then(()=>{this.#e.trace(`GS1 Company Prefix length saved to shared data with next check date/time ${t.toISOString()}`)})}},Ii,Ni,Si,Ri,Ei,w,Ie,$e,W;Ei=[i.describeClass(!1,{namespace:"GS1",category:"service"})];var v=class extends(Ri=d,Si=[i.describeMethod({type:a.Number,multiplicity:n.Matrix,isAsync:!0,parameterDescriptors:[je,Ws]})],Ni=[i.describeMethod({type:a.String,multiplicity:n.Singleton,isAsync:!0,parameterDescriptors:[]})],Ii=[i.describeMethod({type:a.String,multiplicity:n.Singleton,isAsync:!0,parameterDescriptors:[]})],Ri){constructor(e){super(e);s(W,5,this);Xe(this,Ie);Xe(this,w);At(this,w,new Gs(new vt(e)))}async gcpLengthOf(e,p){return ze(this,Ie,$e).call(this).then(()=>this.setUpMatrixResult(()=>He(e),p,(m,l)=>Ne(this,w).lengthOf(m,l)))}async gcpLengthDateTime(){return ze(this,Ie,$e).call(this).then(()=>this.singletonResult(()=>Ne(this,w).dateTime.toISOString()))}async gcpLengthDisclaimer(){return ze(this,Ie,$e).call(this).then(()=>this.singletonResult(()=>Ne(this,w).disclaimer))}};W=c(Ri),w=new WeakMap,Ie=new WeakSet,$e=async function(){return Ne(this,w).load().catch(e=>{this.appExtension.logger.error("Load GS1 Company Prefix length data failed",e)})},r(W,1,"gcpLengthOf",Si,v),r(W,1,"gcpLengthDateTime",Ni,v),r(W,1,"gcpLengthDisclaimer",Ii,v),v=r(W,0,"GCPLengthProxy",Ei,v),s(W,1,v);export{_ as a,H as b,$ as c,x as d,Q as e,Z as f,P as g,f as h,V as i,ee as j,te as k,re as l,ie as m,se as n,ne as o,pe as p,ae as q,ce as r,oe as s,L as t,F as u,le as v,ue as w,de as x,fe as y,xe as z,ge as A,he as B,De as C,Me as D,Te as E,be as F,C as G,G as H,v as I,Bs as J};