@aidc-toolkit/app-extension 1.0.27-beta → 1.0.28-beta

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 (37) hide show
  1. package/dist/index.cjs +1102 -877
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +79 -241
  4. package/dist/index.d.ts +79 -241
  5. package/dist/index.js +1100 -870
  6. package/dist/index.js.map +1 -1
  7. package/package.json +5 -5
  8. package/src/app-extension.ts +5 -5
  9. package/src/app-utility-proxy.ts +18 -24
  10. package/src/descriptor.ts +29 -259
  11. package/src/generator/generator.ts +86 -132
  12. package/src/generator/index.ts +0 -1
  13. package/src/generator/locale-resources-generator.ts +39 -14
  14. package/src/gs1/character-set-proxy.ts +5 -5
  15. package/src/gs1/check-proxy.ts +35 -42
  16. package/src/gs1/gtin-creator-proxy.ts +58 -0
  17. package/src/gs1/gtin-descriptor.ts +29 -0
  18. package/src/gs1/gtin-validator-proxy.ts +161 -0
  19. package/src/gs1/identifier-creator-proxy.ts +227 -0
  20. package/src/gs1/identifier-validator-proxy.ts +87 -0
  21. package/src/gs1/index.ts +5 -1
  22. package/src/gs1/non-gtin-creator-proxy.ts +119 -0
  23. package/src/gs1/non-gtin-validator-proxy.ts +119 -0
  24. package/src/gs1/prefix-definition-descriptor.ts +18 -0
  25. package/src/gs1/prefix-manager-proxy.ts +42 -0
  26. package/src/index.ts +1 -0
  27. package/src/lib-proxy.ts +1 -1
  28. package/src/proxy.ts +509 -0
  29. package/src/utility/character-set-descriptor.ts +5 -5
  30. package/src/utility/character-set-proxy.ts +31 -47
  31. package/src/utility/reg-exp-proxy.ts +11 -15
  32. package/src/utility/string-descriptor.ts +2 -2
  33. package/src/utility/transformer-descriptor.ts +3 -3
  34. package/src/utility/transformer-proxy.ts +16 -26
  35. package/tsconfig-src.json +1 -4
  36. package/src/generator/descriptor.ts +0 -125
  37. package/src/gs1/identifier-proxy.ts +0 -826
package/dist/index.cjs CHANGED
@@ -5,9 +5,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
8
9
  var __typeError = (msg) => {
9
10
  throw TypeError(msg);
10
11
  };
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
14
  var __export = (target, all) => {
12
15
  for (var name in all)
13
16
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -29,17 +32,44 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
32
  mod
30
33
  ));
31
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
- var __decorateClass = (decorators, target, key, kind) => {
33
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
34
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
35
- if (decorator = decorators[i])
36
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
37
- if (kind && result) __defProp(target, key, result);
38
- return result;
39
- };
40
- var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
35
+ var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
36
+ var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
37
+ var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
38
+ var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
39
+ var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
40
+ var __runInitializers = (array, flags, self, value) => {
41
+ for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
42
+ return value;
43
+ };
44
+ var __decorateElement = (array, flags, name, decorators, target, extra) => {
45
+ var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
46
+ var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
47
+ var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
48
+ var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
49
+ return __privateGet(this, extra);
50
+ }, set [name](x) {
51
+ return __privateSet(this, extra, x);
52
+ } }, name));
53
+ k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
54
+ for (var i = decorators.length - 1; i >= 0; i--) {
55
+ ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
56
+ if (k) {
57
+ ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
58
+ if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
59
+ if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
60
+ }
61
+ it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
62
+ if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
63
+ else if (typeof it !== "object" || it === null) __typeError("Object expected");
64
+ else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
65
+ }
66
+ return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
67
+ };
41
68
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
69
+ var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
70
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
42
71
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
72
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
43
73
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
44
74
 
45
75
  // src/index.ts
@@ -56,16 +86,12 @@ __export(index_exports, {
56
86
  HexadecimalProxy: () => HexadecimalProxy,
57
87
  LibProxy: () => LibProxy,
58
88
  NumericProxy: () => NumericProxy,
59
- ProxyClass: () => ProxyClass,
60
- ProxyMethod: () => ProxyMethod,
61
- ProxyParameter: () => ProxyParameter,
62
89
  RegExpProxy: () => RegExpProxy,
63
90
  TransformerProxy: () => TransformerProxy,
64
91
  Types: () => Types,
65
92
  appExtensionNS: () => appExtensionNS,
66
93
  appExtensionResources: () => appExtensionResources,
67
94
  expandParameterDescriptor: () => expandParameterDescriptor,
68
- getClassDescriptorsMap: () => getClassDescriptorsMap,
69
95
  i18nAppExtensionInit: () => i18nAppExtensionInit,
70
96
  i18nextAppExtension: () => i18nextAppExtension
71
97
  });
@@ -1706,91 +1732,266 @@ var Types = {
1706
1732
  */
1707
1733
  Any: 3
1708
1734
  };
1735
+
1736
+ // src/app-utility-proxy.ts
1737
+ var import_core3 = require("@aidc-toolkit/core");
1738
+
1739
+ // src/proxy.ts
1740
+ var import_core2 = require("@aidc-toolkit/core");
1709
1741
  function expandParameterDescriptor(parameterDescriptor) {
1710
1742
  return !("extendsDescriptor" in parameterDescriptor) ? parameterDescriptor : {
1711
1743
  ...expandParameterDescriptor(parameterDescriptor.extendsDescriptor),
1712
1744
  ...parameterDescriptor
1713
1745
  };
1714
1746
  }
1715
- var pendingParameterDescriptors = [];
1716
- var classMethodsDescriptorsMap = /* @__PURE__ */ new Map();
1717
- var classDescriptorsMap = /* @__PURE__ */ new Map();
1718
- function ProxyParameter(parameterDescriptor) {
1719
- return (_target, _propertyKey, parameterIndex) => {
1720
- pendingParameterDescriptors[parameterIndex] = parameterDescriptor;
1721
- };
1722
- }
1723
- function ProxyMethod(methodDescriptor) {
1724
- return (target, propertyKey, propertyDescriptor) => {
1725
- const declarationClassName = target.constructor.name;
1726
- if (typeof propertyDescriptor.value !== "function") {
1727
- throw new Error(`${declarationClassName}.${propertyKey} is not a method`);
1747
+ var Proxy2 = class _Proxy {
1748
+ /**
1749
+ * Logger.
1750
+ */
1751
+ #logger = (0, import_core2.getLogger)(import_core2.LogLevels.Info);
1752
+ /**
1753
+ * Abstract class descriptors map, keyed on declaration class name. Abstract classes are not used directly by target
1754
+ * applications.
1755
+ */
1756
+ #abstractClassDescriptorsMap = /* @__PURE__ */ new Map();
1757
+ /**
1758
+ * Concrete class descriptors map, keyed on declaration class name.
1759
+ */
1760
+ #concreteClassDescriptorsMap = /* @__PURE__ */ new Map();
1761
+ /**
1762
+ * Interim object.
1763
+ */
1764
+ #interim = void 0;
1765
+ /**
1766
+ * Get the proper JSON representation of a value.
1767
+ *
1768
+ * @param value
1769
+ * Value.
1770
+ *
1771
+ * @returns
1772
+ * Replacement value.
1773
+ */
1774
+ static #jsonValue(value) {
1775
+ let replacementValue;
1776
+ switch (typeof value) {
1777
+ case "string":
1778
+ case "number":
1779
+ case "boolean":
1780
+ case "undefined":
1781
+ replacementValue = value;
1782
+ break;
1783
+ case "bigint":
1784
+ replacementValue = value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER ? Number(value) : value.toString(10);
1785
+ break;
1786
+ case "object":
1787
+ if (value === null) {
1788
+ replacementValue = value;
1789
+ } else if (Array.isArray(value)) {
1790
+ replacementValue = value.map((entry) => _Proxy.#jsonValue(entry));
1791
+ } else {
1792
+ replacementValue = Object.fromEntries(Object.entries(value).map(([k, v]) => [k, _Proxy.#jsonValue(v)]));
1793
+ }
1794
+ break;
1795
+ case "symbol":
1796
+ case "function":
1797
+ throw new Error(`Unsupported ${typeof value} value type`);
1728
1798
  }
1729
- const parameterCount = propertyDescriptor.value.length - (!(methodDescriptor.requiresContext ?? false) ? 0 : 1);
1730
- let anyOptional = false;
1731
- for (let index = 0; index < parameterCount; index++) {
1732
- const parameterDescriptor = expandParameterDescriptor(pendingParameterDescriptors[index]);
1733
- if (typeof parameterDescriptor === "undefined") {
1734
- throw new Error(`Missing parameter descriptor at index ${index} of ${declarationClassName}.${propertyKey}`);
1799
+ return replacementValue;
1800
+ }
1801
+ /**
1802
+ * Describe a proxy class.
1803
+ *
1804
+ * @template T
1805
+ * Proxy class type.
1806
+ *
1807
+ * @template IsAbstract
1808
+ * True if the proxy class is abstract.
1809
+ *
1810
+ * @template TConstructor
1811
+ * Proxy class constructor type.
1812
+ *
1813
+ * @template TProxyClassConstructor
1814
+ * Narrowed proxy class constructor type.
1815
+ *
1816
+ * @param isAbstract
1817
+ * True if class is abstract.
1818
+ *
1819
+ * @param decoratorClassDescriptor
1820
+ * Class descriptor.
1821
+ *
1822
+ * @returns
1823
+ * Function with which to decorate the class.
1824
+ */
1825
+ describeClass(isAbstract, decoratorClassDescriptor = {}) {
1826
+ const interimClassDescriptor = decoratorClassDescriptor.replaceParameterDescriptors === void 0 ? (0, import_core2.omit)(decoratorClassDescriptor, "replaceParameterDescriptors") : {
1827
+ ...decoratorClassDescriptor,
1828
+ replaceParameterDescriptors: decoratorClassDescriptor.replaceParameterDescriptors.map((replaceParameterDescriptor) => ({
1829
+ ...replaceParameterDescriptor,
1830
+ replacement: expandParameterDescriptor(replaceParameterDescriptor.replacement)
1831
+ }))
1832
+ };
1833
+ const interim = {
1834
+ classDescriptor: interimClassDescriptor,
1835
+ methodDescriptors: []
1836
+ };
1837
+ this.#interim = interim;
1838
+ return (Target, context) => {
1839
+ const name = context.name;
1840
+ if (typeof name !== "string") {
1841
+ throw new Error(`${String(name)} has an invalid name`);
1735
1842
  }
1736
- if (!parameterDescriptor.isRequired) {
1737
- anyOptional = true;
1738
- } else if (anyOptional) {
1739
- throw new Error(`Parameter descriptor ${parameterDescriptor.name} at index ${index} of ${declarationClassName}.${propertyKey} is required but prior parameter descriptor ${pendingParameterDescriptors[index - 1].name} is optional`);
1843
+ const namespacePrefix = decoratorClassDescriptor.namespace === void 0 ? "" : `${decoratorClassDescriptor.namespace}.`;
1844
+ const namespaceClassName = `${namespacePrefix}${name}`;
1845
+ const abstractClassDescriptorsMap = this.#abstractClassDescriptorsMap;
1846
+ const concreteClassDescriptorsMap = this.#concreteClassDescriptorsMap;
1847
+ if (abstractClassDescriptorsMap.has(namespaceClassName) || concreteClassDescriptorsMap.has(namespaceClassName)) {
1848
+ throw new Error(`Duplicate class ${namespaceClassName}`);
1740
1849
  }
1741
- }
1742
- let methodDescriptors = classMethodsDescriptorsMap.get(declarationClassName);
1743
- if (methodDescriptors === void 0) {
1744
- methodDescriptors = [];
1745
- classMethodsDescriptorsMap.set(declarationClassName, methodDescriptors);
1746
- }
1747
- methodDescriptors.push({
1748
- name: propertyKey,
1749
- ...methodDescriptor,
1750
- parameterDescriptors: pendingParameterDescriptors
1751
- });
1752
- pendingParameterDescriptors = [];
1753
- };
1754
- }
1755
- function ProxyClass(classDescriptor = {}) {
1756
- return (classType) => {
1757
- const methodDescriptorsMap = /* @__PURE__ */ new Map();
1758
- function buildMethodDescriptorsMap(classType2) {
1759
- const baseClassType = Object.getPrototypeOf(classType2);
1760
- if (baseClassType !== LibProxy) {
1761
- buildMethodDescriptorsMap(baseClassType);
1850
+ let baseClassType = Target;
1851
+ let baseClassDescriptor;
1852
+ do {
1853
+ baseClassType = Object.getPrototypeOf(baseClassType);
1854
+ const namespaceBaseClassName = `${namespacePrefix}${baseClassType.name}`;
1855
+ baseClassDescriptor = abstractClassDescriptorsMap.get(namespaceBaseClassName) ?? abstractClassDescriptorsMap.get(baseClassType.name) ?? concreteClassDescriptorsMap.get(namespaceBaseClassName) ?? concreteClassDescriptorsMap.get(baseClassType.name);
1856
+ } while (baseClassType !== LibProxy && baseClassDescriptor === void 0);
1857
+ let interimMethodDescriptors;
1858
+ if (baseClassDescriptor !== void 0) {
1859
+ const baseClassMethodDescriptors = baseClassDescriptor.methodDescriptors;
1860
+ const replaceParameterDescriptors = decoratorClassDescriptor.replaceParameterDescriptors;
1861
+ if (replaceParameterDescriptors !== void 0) {
1862
+ const replacementParameterDescriptorsMap = new Map(replaceParameterDescriptors.map((replaceParameterDescriptor) => [replaceParameterDescriptor.name, expandParameterDescriptor(replaceParameterDescriptor.replacement)]));
1863
+ interimMethodDescriptors = baseClassMethodDescriptors.map((baseClassMethodDescriptor) => ({
1864
+ ...baseClassMethodDescriptor,
1865
+ parameterDescriptors: baseClassMethodDescriptor.parameterDescriptors.map((parameterDescriptor) => replacementParameterDescriptorsMap.get(parameterDescriptor.name) ?? parameterDescriptor)
1866
+ }));
1867
+ } else {
1868
+ interimMethodDescriptors = baseClassMethodDescriptors.slice();
1869
+ }
1870
+ } else {
1871
+ interimMethodDescriptors = [];
1762
1872
  }
1763
- const classMethodDescriptors = classMethodsDescriptorsMap.get(classType2.name);
1764
- if (classMethodDescriptors !== void 0) {
1765
- for (const classMethodDescriptor of classMethodDescriptors) {
1766
- methodDescriptorsMap.set(classMethodDescriptor.name, classMethodDescriptor);
1873
+ for (const classInterimMethodDescriptor of interim.methodDescriptors) {
1874
+ const existingIndex = interimMethodDescriptors.findIndex((interimMethodDescriptor) => interimMethodDescriptor.name === classInterimMethodDescriptor.name);
1875
+ if (existingIndex !== -1) {
1876
+ interimMethodDescriptors[existingIndex] = classInterimMethodDescriptor;
1877
+ } else {
1878
+ interimMethodDescriptors.push(classInterimMethodDescriptor);
1767
1879
  }
1768
1880
  }
1769
- }
1770
- buildMethodDescriptorsMap(classType);
1771
- let methodDescriptors;
1772
- if (classDescriptor.replaceParameterDescriptors !== void 0) {
1773
- const replacementParameterDescriptorsMap = new Map(classDescriptor.replaceParameterDescriptors.map((replaceParameterDescriptor) => [replaceParameterDescriptor.name, replaceParameterDescriptor.replacement]));
1774
- methodDescriptors = Array.from(methodDescriptorsMap.values()).map((methodDescriptor) => ({
1775
- ...methodDescriptor,
1776
- parameterDescriptors: methodDescriptor.parameterDescriptors.map((parameterDescriptor) => replacementParameterDescriptorsMap.get(expandParameterDescriptor(parameterDescriptor).name) ?? parameterDescriptor)
1777
- }));
1778
- } else {
1779
- methodDescriptors = Array.from(methodDescriptorsMap.values());
1780
- }
1781
- classDescriptorsMap.set(classType.name, {
1782
- name: classType.name,
1783
- ...classDescriptor,
1784
- methodDescriptors
1785
- });
1786
- };
1787
- }
1788
- function getClassDescriptorsMap() {
1789
- return classDescriptorsMap;
1790
- }
1881
+ const methodDescriptors = [];
1882
+ const methodInfix = decoratorClassDescriptor.methodInfix;
1883
+ for (const interimMethodDescriptor of interimMethodDescriptors) {
1884
+ const methodName = interimMethodDescriptor.name;
1885
+ const infixBefore = interimMethodDescriptor.infixBefore;
1886
+ let functionName;
1887
+ if (methodInfix === void 0 || interimMethodDescriptor.ignoreInfix === true) {
1888
+ functionName = methodName;
1889
+ } else if (infixBefore === void 0) {
1890
+ functionName = `${methodName}${methodInfix}`;
1891
+ } else {
1892
+ const insertIndex = methodName.indexOf(infixBefore);
1893
+ if (insertIndex === -1) {
1894
+ throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
1895
+ }
1896
+ functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;
1897
+ }
1898
+ const namespaceFunctionName = `${namespacePrefix}${functionName}`;
1899
+ const methodDescriptor = {
1900
+ ...interimMethodDescriptor,
1901
+ functionName,
1902
+ namespaceFunctionName
1903
+ };
1904
+ methodDescriptors.push(methodDescriptor);
1905
+ }
1906
+ const objectNameGroups = /^(?<namespaceFirstWord>[A-Z]+[0-9]*|[A-Z][^A-Z.]*)(?<namespaceRemaining>[A-Z][^.]*|)\.?(?<className>[A-Z].*|)$/.exec(namespaceClassName)?.groups;
1907
+ if (objectNameGroups === void 0) {
1908
+ throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);
1909
+ }
1910
+ const classDescriptor = {
1911
+ name,
1912
+ ...interimClassDescriptor,
1913
+ namespaceClassName,
1914
+ objectName: `${objectNameGroups["namespaceFirstWord"].toLowerCase()}${objectNameGroups["namespaceRemaining"]}${objectNameGroups["className"]}`,
1915
+ methodDescriptors
1916
+ };
1917
+ (isAbstract ? abstractClassDescriptorsMap : concreteClassDescriptorsMap).set(namespaceClassName, classDescriptor);
1918
+ const methodDescriptorsMap = /* @__PURE__ */ new Map();
1919
+ for (const methodDescriptor of methodDescriptors) {
1920
+ methodDescriptorsMap.set(methodDescriptor.name, methodDescriptor);
1921
+ }
1922
+ this.#interim = void 0;
1923
+ const logger = this.#logger;
1924
+ return class extends Target {
1925
+ /**
1926
+ * @inheritDoc
1927
+ */
1928
+ log(methodName, args, result) {
1929
+ const methodDescriptor = methodDescriptorsMap.get(methodName);
1930
+ logger.info(JSON.stringify({
1931
+ namespace: decoratorClassDescriptor.namespace,
1932
+ className: name,
1933
+ methodName,
1934
+ functionName: methodDescriptor.functionName,
1935
+ parameters: methodDescriptor.parameterDescriptors.map((parameterDescriptor, index) => ({
1936
+ name: parameterDescriptor.name,
1937
+ value: args[index]
1938
+ })),
1939
+ result: _Proxy.#jsonValue(result)
1940
+ }, null, 2));
1941
+ }
1942
+ };
1943
+ };
1944
+ }
1945
+ /**
1946
+ * Describe a proxy method.
1947
+ *
1948
+ * @template TFunction
1949
+ * Function type.
1950
+ *
1951
+ * @param decoratorMethodDescriptor
1952
+ * Method descriptor.
1953
+ *
1954
+ * @returns
1955
+ * Function with which to decorate the method.
1956
+ */
1957
+ describeMethod(decoratorMethodDescriptor) {
1958
+ return (target, context) => {
1959
+ const name = context.name;
1960
+ if (this.#interim === void 0 || typeof name !== "string" || context.static || context.private) {
1961
+ throw new Error(`${String(name)} is not defined within a supported class, has an invalid name, is static, or is private`);
1962
+ }
1963
+ let anyOptional = false;
1964
+ const parameterDescriptors = decoratorMethodDescriptor.parameterDescriptors.map((decoratorParameterDescriptor) => {
1965
+ const parameterDescriptor = expandParameterDescriptor(decoratorParameterDescriptor);
1966
+ if (!parameterDescriptor.isRequired) {
1967
+ anyOptional = true;
1968
+ } else if (anyOptional) {
1969
+ throw new Error(`Parameter ${parameterDescriptor.name} descriptor of method ${name} is required but prior parameter descriptor is optional`);
1970
+ }
1971
+ return parameterDescriptor;
1972
+ });
1973
+ this.#interim.methodDescriptors.push({
1974
+ name,
1975
+ ...decoratorMethodDescriptor,
1976
+ parameterDescriptors
1977
+ });
1978
+ return function methodProxy(...args) {
1979
+ const result = target.call(this, ...args);
1980
+ this.log(name, args, result);
1981
+ return result;
1982
+ };
1983
+ };
1984
+ }
1985
+ /**
1986
+ * Get the class descriptors map.
1987
+ */
1988
+ get classDescriptorsMap() {
1989
+ return this.#concreteClassDescriptorsMap;
1990
+ }
1991
+ };
1992
+ var proxy = new Proxy2();
1791
1993
 
1792
1994
  // src/app-utility-proxy.ts
1793
- var import_core2 = require("@aidc-toolkit/core");
1794
1995
  var spillMatrix = {
1795
1996
  name: "spillMatrix",
1796
1997
  type: Types.Any,
@@ -1813,10 +2014,26 @@ var spillMaximumHeightParameterDescriptor = {
1813
2014
  sortOrder: 1,
1814
2015
  name: "spillMaximumHeight"
1815
2016
  };
1816
- var _AppUtilityProxy_instances, defaultMaximums_fn;
1817
- var AppUtilityProxy = class extends LibProxy {
2017
+ var _hSpill_dec, _vSpill_dec, _version_dec, _a, _AppUtilityProxy_decorators, _init, _AppUtilityProxy_instances, defaultMaximums_fn;
2018
+ _AppUtilityProxy_decorators = [proxy.describeClass(false)];
2019
+ var AppUtilityProxy = class extends (_a = LibProxy, _version_dec = [proxy.describeMethod({
2020
+ type: Types.String,
2021
+ isMatrix: false,
2022
+ parameterDescriptors: []
2023
+ })], _vSpill_dec = [proxy.describeMethod({
2024
+ requiresContext: true,
2025
+ type: Types.Any,
2026
+ isMatrix: true,
2027
+ parameterDescriptors: [spillMatrix, spillMaximumWidthParameterDescriptor, spillMaximumHeightParameterDescriptor]
2028
+ })], _hSpill_dec = [proxy.describeMethod({
2029
+ requiresContext: true,
2030
+ type: Types.Any,
2031
+ isMatrix: true,
2032
+ parameterDescriptors: [spillMatrix, spillMaximumHeightParameterDescriptor, spillMaximumWidthParameterDescriptor]
2033
+ })], _a) {
1818
2034
  constructor() {
1819
2035
  super(...arguments);
2036
+ __runInitializers(_init, 5, this);
1820
2037
  __privateAdd(this, _AppUtilityProxy_instances);
1821
2038
  }
1822
2039
  version() {
@@ -1837,7 +2054,7 @@ var AppUtilityProxy = class extends LibProxy {
1837
2054
  if (hLength > 1 && hLength <= maximumArea) {
1838
2055
  let spillWidth = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.width);
1839
2056
  if (Number.isInteger(Math.log10(hLength))) {
1840
- const spillWidth10 = Math.pow(10, Math.floor(Math.log10(spillWidth)));
2057
+ const spillWidth10 = 10 ** Math.floor(Math.log10(spillWidth));
1841
2058
  if (hLength / spillWidth10 <= maximumDimensions.height) {
1842
2059
  spillWidth = spillWidth10;
1843
2060
  }
@@ -1870,7 +2087,7 @@ var AppUtilityProxy = class extends LibProxy {
1870
2087
  if (vLength > 1 && vLength <= maximumArea) {
1871
2088
  let spillHeight = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.height);
1872
2089
  if (Number.isInteger(Math.log10(vLength))) {
1873
- const spillHeight10 = Math.pow(10, Math.floor(Math.log10(spillHeight)));
2090
+ const spillHeight10 = 10 ** Math.floor(Math.log10(spillHeight));
1874
2091
  if (vLength / spillHeight10 <= maximumDimensions.width) {
1875
2092
  spillHeight = spillHeight10;
1876
2093
  }
@@ -1889,16 +2106,17 @@ var AppUtilityProxy = class extends LibProxy {
1889
2106
  return result;
1890
2107
  }
1891
2108
  };
2109
+ _init = __decoratorStart(_a);
1892
2110
  _AppUtilityProxy_instances = new WeakSet();
1893
2111
  defaultMaximums_fn = async function(maximumDimensions, invocationContext) {
1894
- if ((0, import_core2.isNullish)(invocationContext)) {
2112
+ if ((0, import_core3.isNullish)(invocationContext)) {
1895
2113
  throw new Error("Invocation context not provided by application");
1896
2114
  }
1897
2115
  const maximumWidth = maximumDimensions.width;
1898
2116
  const maximumHeight = maximumDimensions.height;
1899
2117
  let definedMaximumWidth;
1900
2118
  let definedMaximumHeight;
1901
- if ((0, import_core2.isNullish)(maximumWidth) || (0, import_core2.isNullish)(maximumHeight)) {
2119
+ if ((0, import_core3.isNullish)(maximumWidth) || (0, import_core3.isNullish)(maximumHeight)) {
1902
2120
  const sheetAddress = await this.appExtension.getSheetAddress(invocationContext);
1903
2121
  definedMaximumWidth = maximumWidth ?? await this.appExtension.maximumWidth() - sheetAddress.columnIndex;
1904
2122
  definedMaximumHeight = maximumHeight ?? await this.appExtension.maximumHeight() - sheetAddress.rowIndex;
@@ -1911,35 +2129,11 @@ defaultMaximums_fn = async function(maximumDimensions, invocationContext) {
1911
2129
  height: definedMaximumHeight
1912
2130
  };
1913
2131
  };
1914
- __decorateClass([
1915
- ProxyMethod({
1916
- type: Types.String,
1917
- isMatrix: false
1918
- })
1919
- ], AppUtilityProxy.prototype, "version", 1);
1920
- __decorateClass([
1921
- ProxyMethod({
1922
- requiresContext: true,
1923
- type: Types.Any,
1924
- isMatrix: true
1925
- }),
1926
- __decorateParam(0, ProxyParameter(spillMatrix)),
1927
- __decorateParam(1, ProxyParameter(spillMaximumWidthParameterDescriptor)),
1928
- __decorateParam(2, ProxyParameter(spillMaximumHeightParameterDescriptor))
1929
- ], AppUtilityProxy.prototype, "vSpill", 1);
1930
- __decorateClass([
1931
- ProxyMethod({
1932
- requiresContext: true,
1933
- type: Types.Any,
1934
- isMatrix: true
1935
- }),
1936
- __decorateParam(0, ProxyParameter(spillMatrix)),
1937
- __decorateParam(1, ProxyParameter(spillMaximumHeightParameterDescriptor)),
1938
- __decorateParam(2, ProxyParameter(spillMaximumWidthParameterDescriptor))
1939
- ], AppUtilityProxy.prototype, "hSpill", 1);
1940
- AppUtilityProxy = __decorateClass([
1941
- ProxyClass()
1942
- ], AppUtilityProxy);
2132
+ __decorateElement(_init, 1, "version", _version_dec, AppUtilityProxy);
2133
+ __decorateElement(_init, 1, "vSpill", _vSpill_dec, AppUtilityProxy);
2134
+ __decorateElement(_init, 1, "hSpill", _hSpill_dec, AppUtilityProxy);
2135
+ AppUtilityProxy = __decorateElement(_init, 0, "AppUtilityProxy", _AppUtilityProxy_decorators, AppUtilityProxy);
2136
+ __runInitializers(_init, 1, AppUtilityProxy);
1943
2137
 
1944
2138
  // src/utility/index.ts
1945
2139
  var utility_exports = {};
@@ -1992,7 +2186,28 @@ var transformedValueParameterDescriptor = {
1992
2186
  extendsDescriptor: valueParameterDescriptor,
1993
2187
  name: "transformedValue"
1994
2188
  };
1995
- var TransformerProxy = class extends LibProxy {
2189
+ var _reverse_dec, _forwardSequence_dec, _forward_dec, _a2, _TransformerProxy_decorators, _init2;
2190
+ _TransformerProxy_decorators = [proxy.describeClass(false, {
2191
+ methodInfix: "Transform"
2192
+ })];
2193
+ var TransformerProxy = class extends (_a2 = LibProxy, _forward_dec = [proxy.describeMethod({
2194
+ type: Types.Number,
2195
+ isMatrix: true,
2196
+ parameterDescriptors: [domainParameterDescriptor, valueParameterDescriptor, tweakParameterDescriptor]
2197
+ })], _forwardSequence_dec = [proxy.describeMethod({
2198
+ infixBefore: "Sequence",
2199
+ type: Types.Number,
2200
+ isMatrix: true,
2201
+ parameterDescriptors: [domainParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, tweakParameterDescriptor]
2202
+ })], _reverse_dec = [proxy.describeMethod({
2203
+ type: Types.Number,
2204
+ isMatrix: true,
2205
+ parameterDescriptors: [domainParameterDescriptor, transformedValueParameterDescriptor, tweakParameterDescriptor]
2206
+ })], _a2) {
2207
+ constructor() {
2208
+ super(...arguments);
2209
+ __runInitializers(_init2, 5, this);
2210
+ }
1996
2211
  forward(domain, matrixValues, tweak) {
1997
2212
  const transformer = import_utility3.Transformer.get(domain, tweak ?? void 0);
1998
2213
  return this.mapMatrix(matrixValues, (value) => this.mapBigInt(transformer.forward(value)));
@@ -2006,40 +2221,12 @@ var TransformerProxy = class extends LibProxy {
2006
2221
  return this.mapMatrix(matrixTransformedValues, (transformedValue) => this.mapBigInt(transformer.reverse(transformedValue)));
2007
2222
  }
2008
2223
  };
2009
- __decorateClass([
2010
- ProxyMethod({
2011
- type: Types.Number,
2012
- isMatrix: true
2013
- }),
2014
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
2015
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2016
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
2017
- ], TransformerProxy.prototype, "forward", 1);
2018
- __decorateClass([
2019
- ProxyMethod({
2020
- infixBefore: "Sequence",
2021
- type: Types.Number,
2022
- isMatrix: true
2023
- }),
2024
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
2025
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
2026
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
2027
- __decorateParam(3, ProxyParameter(tweakParameterDescriptor))
2028
- ], TransformerProxy.prototype, "forwardSequence", 1);
2029
- __decorateClass([
2030
- ProxyMethod({
2031
- type: Types.Number,
2032
- isMatrix: true
2033
- }),
2034
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
2035
- __decorateParam(1, ProxyParameter(transformedValueParameterDescriptor)),
2036
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
2037
- ], TransformerProxy.prototype, "reverse", 1);
2038
- TransformerProxy = __decorateClass([
2039
- ProxyClass({
2040
- methodInfix: "Transform"
2041
- })
2042
- ], TransformerProxy);
2224
+ _init2 = __decoratorStart(_a2);
2225
+ __decorateElement(_init2, 1, "forward", _forward_dec, TransformerProxy);
2226
+ __decorateElement(_init2, 1, "forwardSequence", _forwardSequence_dec, TransformerProxy);
2227
+ __decorateElement(_init2, 1, "reverse", _reverse_dec, TransformerProxy);
2228
+ TransformerProxy = __decorateElement(_init2, 0, "TransformerProxy", _TransformerProxy_decorators, TransformerProxy);
2229
+ __runInitializers(_init2, 1, TransformerProxy);
2043
2230
 
2044
2231
  // src/utility/reg-exp-proxy.ts
2045
2232
  var import_utility4 = require("@aidc-toolkit/utility");
@@ -2081,7 +2268,23 @@ var errorMessageParameterDescriptor = {
2081
2268
  isMatrix: false,
2082
2269
  isRequired: false
2083
2270
  };
2084
- var RegExpProxy = class extends StringProxy {
2271
+ var _isValid_dec, _validate_dec, _a3, _RegExpProxy_decorators, _init3;
2272
+ _RegExpProxy_decorators = [proxy.describeClass(false, {
2273
+ methodInfix: "RegExp"
2274
+ })];
2275
+ var RegExpProxy = class extends (_a3 = StringProxy, _validate_dec = [proxy.describeMethod({
2276
+ type: Types.String,
2277
+ isMatrix: true,
2278
+ parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor, errorMessageParameterDescriptor]
2279
+ })], _isValid_dec = [proxy.describeMethod({
2280
+ type: Types.Boolean,
2281
+ isMatrix: true,
2282
+ parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor]
2283
+ })], _a3) {
2284
+ constructor() {
2285
+ super(...arguments);
2286
+ __runInitializers(_init3, 5, this);
2287
+ }
2085
2288
  validate(regExp, matrixSs, errorMessage) {
2086
2289
  return this.validateString(new class extends import_utility4.RegExpValidator {
2087
2290
  createErrorMessage(s) {
@@ -2093,28 +2296,11 @@ var RegExpProxy = class extends StringProxy {
2093
2296
  return this.isValidString(this.validate(regExp, matrixSs, void 0));
2094
2297
  }
2095
2298
  };
2096
- __decorateClass([
2097
- ProxyMethod({
2098
- type: Types.String,
2099
- isMatrix: true
2100
- }),
2101
- __decorateParam(0, ProxyParameter(regExpParameterDescriptor)),
2102
- __decorateParam(1, ProxyParameter(validateSParameterDescriptor)),
2103
- __decorateParam(2, ProxyParameter(errorMessageParameterDescriptor))
2104
- ], RegExpProxy.prototype, "validate", 1);
2105
- __decorateClass([
2106
- ProxyMethod({
2107
- type: Types.Boolean,
2108
- isMatrix: true
2109
- }),
2110
- __decorateParam(0, ProxyParameter(regExpParameterDescriptor)),
2111
- __decorateParam(1, ProxyParameter(validateSParameterDescriptor))
2112
- ], RegExpProxy.prototype, "isValid", 1);
2113
- RegExpProxy = __decorateClass([
2114
- ProxyClass({
2115
- methodInfix: "RegExp"
2116
- })
2117
- ], RegExpProxy);
2299
+ _init3 = __decoratorStart(_a3);
2300
+ __decorateElement(_init3, 1, "validate", _validate_dec, RegExpProxy);
2301
+ __decorateElement(_init3, 1, "isValid", _isValid_dec, RegExpProxy);
2302
+ RegExpProxy = __decorateElement(_init3, 0, "RegExpProxy", _RegExpProxy_decorators, RegExpProxy);
2303
+ __runInitializers(_init3, 1, RegExpProxy);
2118
2304
 
2119
2305
  // src/utility/character-set-proxy.ts
2120
2306
  var import_utility5 = require("@aidc-toolkit/utility");
@@ -2158,14 +2344,25 @@ var valueForSParameterDescriptor = {
2158
2344
  extendsDescriptor: sParameterDescriptor,
2159
2345
  name: "valueForS"
2160
2346
  };
2161
- var CharacterSetValidatorProxy = class extends StringProxy {
2162
- #characterSetValidator;
2347
+ var _isValid_dec2, _validate_dec2, _a4, _CharacterSetValidatorProxy_decorators, _characterSetValidator, _init4;
2348
+ _CharacterSetValidatorProxy_decorators = [proxy.describeClass(true)];
2349
+ var CharacterSetValidatorProxy = class extends (_a4 = StringProxy, _validate_dec2 = [proxy.describeMethod({
2350
+ type: Types.String,
2351
+ isMatrix: true,
2352
+ parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
2353
+ })], _isValid_dec2 = [proxy.describeMethod({
2354
+ type: Types.Boolean,
2355
+ isMatrix: true,
2356
+ parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
2357
+ })], _a4) {
2163
2358
  constructor(appExtension, characterSetValidator) {
2164
2359
  super(appExtension);
2165
- this.#characterSetValidator = characterSetValidator;
2360
+ __runInitializers(_init4, 5, this);
2361
+ __privateAdd(this, _characterSetValidator);
2362
+ __privateSet(this, _characterSetValidator, characterSetValidator);
2166
2363
  }
2167
2364
  validate(matrixSs, exclusion) {
2168
- return this.validateString(this.#characterSetValidator, matrixSs, {
2365
+ return this.validateString(__privateGet(this, _characterSetValidator), matrixSs, {
2169
2366
  exclusion: exclusion ?? void 0
2170
2367
  });
2171
2368
  }
@@ -2173,134 +2370,124 @@ var CharacterSetValidatorProxy = class extends StringProxy {
2173
2370
  return this.isValidString(this.validate(matrixSs, exclusion));
2174
2371
  }
2175
2372
  };
2176
- __decorateClass([
2177
- ProxyMethod({
2178
- type: Types.String,
2179
- isMatrix: true
2180
- }),
2181
- __decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
2182
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
2183
- ], CharacterSetValidatorProxy.prototype, "validate", 1);
2184
- __decorateClass([
2185
- ProxyMethod({
2186
- type: Types.Boolean,
2187
- isMatrix: true
2188
- }),
2189
- __decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
2190
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
2191
- ], CharacterSetValidatorProxy.prototype, "isValid", 1);
2192
- var CharacterSetCreatorProxy = class extends CharacterSetValidatorProxy {
2193
- #characterSetCreator;
2373
+ _init4 = __decoratorStart(_a4);
2374
+ _characterSetValidator = new WeakMap();
2375
+ __decorateElement(_init4, 1, "validate", _validate_dec2, CharacterSetValidatorProxy);
2376
+ __decorateElement(_init4, 1, "isValid", _isValid_dec2, CharacterSetValidatorProxy);
2377
+ CharacterSetValidatorProxy = __decorateElement(_init4, 0, "CharacterSetValidatorProxy", _CharacterSetValidatorProxy_decorators, CharacterSetValidatorProxy);
2378
+ __runInitializers(_init4, 1, CharacterSetValidatorProxy);
2379
+ var _valueFor_dec, _createSequence_dec, _create_dec, _a5, _CharacterSetCreatorProxy_decorators, _characterSetCreator, _init5;
2380
+ _CharacterSetCreatorProxy_decorators = [proxy.describeClass(true)];
2381
+ var CharacterSetCreatorProxy = class extends (_a5 = CharacterSetValidatorProxy, _create_dec = [proxy.describeMethod({
2382
+ type: Types.String,
2383
+ isMatrix: true,
2384
+ parameterDescriptors: [lengthParameterDescriptor, valueParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2385
+ })], _createSequence_dec = [proxy.describeMethod({
2386
+ infixBefore: "Sequence",
2387
+ type: Types.String,
2388
+ isMatrix: true,
2389
+ parameterDescriptors: [lengthParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2390
+ })], _valueFor_dec = [proxy.describeMethod({
2391
+ type: Types.Number,
2392
+ isMatrix: true,
2393
+ parameterDescriptors: [valueForSParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2394
+ })], _a5) {
2194
2395
  constructor(appExtension, characterSetCreator) {
2195
2396
  super(appExtension, characterSetCreator);
2196
- this.#characterSetCreator = characterSetCreator;
2397
+ __runInitializers(_init5, 5, this);
2398
+ __privateAdd(this, _characterSetCreator);
2399
+ __privateSet(this, _characterSetCreator, characterSetCreator);
2197
2400
  }
2198
2401
  create(length, matrixValues, exclusion, tweak) {
2199
2402
  const exclusionOrUndefined = exclusion ?? void 0;
2200
2403
  const tweakOrUndefined = tweak ?? void 0;
2201
- return this.mapMatrix(matrixValues, (value) => this.#characterSetCreator.create(length, value, exclusionOrUndefined, tweakOrUndefined));
2404
+ return this.mapMatrix(matrixValues, (value) => __privateGet(this, _characterSetCreator).create(length, value, exclusionOrUndefined, tweakOrUndefined));
2202
2405
  }
2203
2406
  createSequence(length, startValue, count, exclusion, tweak) {
2204
2407
  this.appExtension.validateSequenceCount(count);
2205
2408
  const exclusionOrUndefined = exclusion ?? void 0;
2206
2409
  const tweakOrUndefined = tweak ?? void 0;
2207
- return LibProxy.matrixResult(this.#characterSetCreator.create(length, new import_utility5.Sequence(startValue, count), exclusionOrUndefined, tweakOrUndefined));
2410
+ return LibProxy.matrixResult(__privateGet(this, _characterSetCreator).create(length, new import_utility5.Sequence(startValue, count), exclusionOrUndefined, tweakOrUndefined));
2208
2411
  }
2209
2412
  valueFor(matrixSs, exclusion, tweak) {
2210
2413
  const exclusionOrUndefined = exclusion ?? void 0;
2211
2414
  const tweakOrUndefined = tweak ?? void 0;
2212
- return this.mapMatrix(matrixSs, (s) => this.mapBigInt(this.#characterSetCreator.valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
2213
- }
2214
- };
2215
- __decorateClass([
2216
- ProxyMethod({
2217
- type: Types.String,
2218
- isMatrix: true
2219
- }),
2220
- __decorateParam(0, ProxyParameter(lengthParameterDescriptor)),
2221
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2222
- __decorateParam(2, ProxyParameter(exclusionNoneParameterDescriptor)),
2223
- __decorateParam(3, ProxyParameter(tweakParameterDescriptor))
2224
- ], CharacterSetCreatorProxy.prototype, "create", 1);
2225
- __decorateClass([
2226
- ProxyMethod({
2227
- infixBefore: "Sequence",
2228
- type: Types.String,
2229
- isMatrix: true
2230
- }),
2231
- __decorateParam(0, ProxyParameter(lengthParameterDescriptor)),
2232
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
2233
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
2234
- __decorateParam(3, ProxyParameter(exclusionNoneParameterDescriptor)),
2235
- __decorateParam(4, ProxyParameter(tweakParameterDescriptor))
2236
- ], CharacterSetCreatorProxy.prototype, "createSequence", 1);
2237
- __decorateClass([
2238
- ProxyMethod({
2239
- type: Types.Number,
2240
- isMatrix: true
2241
- }),
2242
- __decorateParam(0, ProxyParameter(valueForSParameterDescriptor)),
2243
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor)),
2244
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
2245
- ], CharacterSetCreatorProxy.prototype, "valueFor", 1);
2246
- var NumericProxy = class extends CharacterSetCreatorProxy {
2415
+ return this.mapMatrix(matrixSs, (s) => this.mapBigInt(__privateGet(this, _characterSetCreator).valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
2416
+ }
2417
+ };
2418
+ _init5 = __decoratorStart(_a5);
2419
+ _characterSetCreator = new WeakMap();
2420
+ __decorateElement(_init5, 1, "create", _create_dec, CharacterSetCreatorProxy);
2421
+ __decorateElement(_init5, 1, "createSequence", _createSequence_dec, CharacterSetCreatorProxy);
2422
+ __decorateElement(_init5, 1, "valueFor", _valueFor_dec, CharacterSetCreatorProxy);
2423
+ CharacterSetCreatorProxy = __decorateElement(_init5, 0, "CharacterSetCreatorProxy", _CharacterSetCreatorProxy_decorators, CharacterSetCreatorProxy);
2424
+ __runInitializers(_init5, 1, CharacterSetCreatorProxy);
2425
+ var _NumericProxy_decorators, _init6, _a6;
2426
+ _NumericProxy_decorators = [proxy.describeClass(false, {
2427
+ methodInfix: "Numeric",
2428
+ replaceParameterDescriptors: [
2429
+ {
2430
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2431
+ replacement: exclusionFirstZeroParameterDescriptor
2432
+ }
2433
+ ]
2434
+ })];
2435
+ var NumericProxy = class extends (_a6 = CharacterSetCreatorProxy) {
2247
2436
  constructor(appExtension) {
2248
2437
  super(appExtension, import_utility5.NUMERIC_CREATOR);
2249
2438
  }
2250
2439
  };
2251
- NumericProxy = __decorateClass([
2252
- ProxyClass({
2253
- methodInfix: "Numeric",
2254
- replaceParameterDescriptors: [
2255
- {
2256
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2257
- replacement: exclusionFirstZeroParameterDescriptor
2258
- }
2259
- ]
2260
- })
2261
- ], NumericProxy);
2262
- var HexadecimalProxy = class extends CharacterSetCreatorProxy {
2440
+ _init6 = __decoratorStart(_a6);
2441
+ NumericProxy = __decorateElement(_init6, 0, "NumericProxy", _NumericProxy_decorators, NumericProxy);
2442
+ __runInitializers(_init6, 1, NumericProxy);
2443
+ var _HexadecimalProxy_decorators, _init7, _a7;
2444
+ _HexadecimalProxy_decorators = [proxy.describeClass(false, {
2445
+ methodInfix: "Hexadecimal",
2446
+ replaceParameterDescriptors: [
2447
+ {
2448
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2449
+ replacement: exclusionAnyParameterDescriptor
2450
+ }
2451
+ ]
2452
+ })];
2453
+ var HexadecimalProxy = class extends (_a7 = CharacterSetCreatorProxy) {
2263
2454
  constructor(appExtension) {
2264
2455
  super(appExtension, import_utility5.HEXADECIMAL_CREATOR);
2265
2456
  }
2266
2457
  };
2267
- HexadecimalProxy = __decorateClass([
2268
- ProxyClass({
2269
- methodInfix: "Hexadecimal",
2270
- replaceParameterDescriptors: [
2271
- {
2272
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2273
- replacement: exclusionAnyParameterDescriptor
2274
- }
2275
- ]
2276
- })
2277
- ], HexadecimalProxy);
2278
- var AlphabeticProxy = class extends CharacterSetCreatorProxy {
2458
+ _init7 = __decoratorStart(_a7);
2459
+ HexadecimalProxy = __decorateElement(_init7, 0, "HexadecimalProxy", _HexadecimalProxy_decorators, HexadecimalProxy);
2460
+ __runInitializers(_init7, 1, HexadecimalProxy);
2461
+ var _AlphabeticProxy_decorators, _init8, _a8;
2462
+ _AlphabeticProxy_decorators = [proxy.describeClass(false, {
2463
+ methodInfix: "Alphabetic"
2464
+ })];
2465
+ var AlphabeticProxy = class extends (_a8 = CharacterSetCreatorProxy) {
2279
2466
  constructor(appExtension) {
2280
2467
  super(appExtension, import_utility5.ALPHABETIC_CREATOR);
2281
2468
  }
2282
2469
  };
2283
- AlphabeticProxy = __decorateClass([
2284
- ProxyClass({
2285
- methodInfix: "Alphabetic"
2286
- })
2287
- ], AlphabeticProxy);
2288
- var AlphanumericProxy = class extends CharacterSetCreatorProxy {
2470
+ _init8 = __decoratorStart(_a8);
2471
+ AlphabeticProxy = __decorateElement(_init8, 0, "AlphabeticProxy", _AlphabeticProxy_decorators, AlphabeticProxy);
2472
+ __runInitializers(_init8, 1, AlphabeticProxy);
2473
+ var _AlphanumericProxy_decorators, _init9, _a9;
2474
+ _AlphanumericProxy_decorators = [proxy.describeClass(false, {
2475
+ methodInfix: "Alphanumeric",
2476
+ replaceParameterDescriptors: [
2477
+ {
2478
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2479
+ replacement: exclusionAnyParameterDescriptor
2480
+ }
2481
+ ]
2482
+ })];
2483
+ var AlphanumericProxy = class extends (_a9 = CharacterSetCreatorProxy) {
2289
2484
  constructor(appExtension) {
2290
2485
  super(appExtension, import_utility5.ALPHANUMERIC_CREATOR);
2291
2486
  }
2292
2487
  };
2293
- AlphanumericProxy = __decorateClass([
2294
- ProxyClass({
2295
- methodInfix: "Alphanumeric",
2296
- replaceParameterDescriptors: [
2297
- {
2298
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2299
- replacement: exclusionAnyParameterDescriptor
2300
- }
2301
- ]
2302
- })
2303
- ], AlphanumericProxy);
2488
+ _init9 = __decoratorStart(_a9);
2489
+ AlphanumericProxy = __decorateElement(_init9, 0, "AlphanumericProxy", _AlphanumericProxy_decorators, AlphanumericProxy);
2490
+ __runInitializers(_init9, 1, AlphanumericProxy);
2304
2491
 
2305
2492
  // src/gs1/index.ts
2306
2493
  var gs1_exports = {};
@@ -2341,51 +2528,57 @@ __export(gs1_exports, {
2341
2528
 
2342
2529
  // src/gs1/character-set-proxy.ts
2343
2530
  var import_gs12 = require("@aidc-toolkit/gs1");
2344
- var AI82Proxy = class extends CharacterSetCreatorProxy {
2531
+ var _AI82Proxy_decorators, _init10, _a10;
2532
+ _AI82Proxy_decorators = [proxy.describeClass(false, {
2533
+ namespace: "GS1",
2534
+ methodInfix: "AI82",
2535
+ replaceParameterDescriptors: [
2536
+ {
2537
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2538
+ replacement: exclusionAllNumericParameterDescriptor
2539
+ }
2540
+ ]
2541
+ })];
2542
+ var AI82Proxy = class extends (_a10 = CharacterSetCreatorProxy) {
2345
2543
  constructor(appExtension) {
2346
2544
  super(appExtension, import_gs12.AI82_CREATOR);
2347
2545
  }
2348
2546
  };
2349
- AI82Proxy = __decorateClass([
2350
- ProxyClass({
2351
- namespace: "GS1",
2352
- methodInfix: "AI82",
2353
- replaceParameterDescriptors: [
2354
- {
2355
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2356
- replacement: exclusionAllNumericParameterDescriptor
2357
- }
2358
- ]
2359
- })
2360
- ], AI82Proxy);
2361
- var AI39Proxy = class extends CharacterSetCreatorProxy {
2547
+ _init10 = __decoratorStart(_a10);
2548
+ AI82Proxy = __decorateElement(_init10, 0, "AI82Proxy", _AI82Proxy_decorators, AI82Proxy);
2549
+ __runInitializers(_init10, 1, AI82Proxy);
2550
+ var _AI39Proxy_decorators, _init11, _a11;
2551
+ _AI39Proxy_decorators = [proxy.describeClass(false, {
2552
+ namespace: "GS1",
2553
+ methodInfix: "AI39",
2554
+ replaceParameterDescriptors: [
2555
+ {
2556
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2557
+ replacement: exclusionAllNumericParameterDescriptor
2558
+ }
2559
+ ]
2560
+ })];
2561
+ var AI39Proxy = class extends (_a11 = CharacterSetCreatorProxy) {
2362
2562
  constructor(appExtension) {
2363
2563
  super(appExtension, import_gs12.AI39_CREATOR);
2364
2564
  }
2365
2565
  };
2366
- AI39Proxy = __decorateClass([
2367
- ProxyClass({
2368
- namespace: "GS1",
2369
- methodInfix: "AI39",
2370
- replaceParameterDescriptors: [
2371
- {
2372
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2373
- replacement: exclusionAllNumericParameterDescriptor
2374
- }
2375
- ]
2376
- })
2377
- ], AI39Proxy);
2378
- var AI64Proxy = class extends CharacterSetValidatorProxy {
2566
+ _init11 = __decoratorStart(_a11);
2567
+ AI39Proxy = __decorateElement(_init11, 0, "AI39Proxy", _AI39Proxy_decorators, AI39Proxy);
2568
+ __runInitializers(_init11, 1, AI39Proxy);
2569
+ var _AI64Proxy_decorators, _init12, _a12;
2570
+ _AI64Proxy_decorators = [proxy.describeClass(false, {
2571
+ namespace: "GS1",
2572
+ methodInfix: "AI64"
2573
+ })];
2574
+ var AI64Proxy = class extends (_a12 = CharacterSetValidatorProxy) {
2379
2575
  constructor(appExtension) {
2380
2576
  super(appExtension, import_gs12.AI64_VALIDATOR);
2381
2577
  }
2382
2578
  };
2383
- AI64Proxy = __decorateClass([
2384
- ProxyClass({
2385
- namespace: "GS1",
2386
- methodInfix: "AI64"
2387
- })
2388
- ], AI64Proxy);
2579
+ _init12 = __decoratorStart(_a12);
2580
+ AI64Proxy = __decorateElement(_init12, 0, "AI64Proxy", _AI64Proxy_decorators, AI64Proxy);
2581
+ __runInitializers(_init12, 1, AI64Proxy);
2389
2582
 
2390
2583
  // src/gs1/check-proxy.ts
2391
2584
  var import_gs13 = require("@aidc-toolkit/gs1");
@@ -2423,7 +2616,42 @@ var ai82SWithCheckCharacterPairParameterDescriptor = {
2423
2616
  extendsDescriptor: ai82SParameterDescriptor,
2424
2617
  name: "ai82SWithCheckCharacterPair"
2425
2618
  };
2426
- var CheckProxy = class extends LibProxy {
2619
+ var _hasValidCheckCharacterPair_dec, _checkCharacterPair_dec, _isValidPriceOrWeightCheckDigit_dec, _priceOrWeightCheckDigit_dec, _hasValidCheckDigit_dec, _checkDigit_dec, _a13, _CheckProxy_decorators, _init13;
2620
+ _CheckProxy_decorators = [proxy.describeClass(false, {
2621
+ namespace: "GS1"
2622
+ })];
2623
+ var CheckProxy = class extends (_a13 = LibProxy, _checkDigit_dec = [proxy.describeMethod({
2624
+ type: Types.String,
2625
+ isMatrix: true,
2626
+ parameterDescriptors: [numericSParameterDescriptor]
2627
+ })], _hasValidCheckDigit_dec = [proxy.describeMethod({
2628
+ type: Types.String,
2629
+ isMatrix: true,
2630
+ parameterDescriptors: [numericSWithCheckDigitParameterDescriptor]
2631
+ })], _priceOrWeightCheckDigit_dec = [proxy.describeMethod({
2632
+ type: Types.String,
2633
+ isMatrix: true,
2634
+ parameterDescriptors: [numericSFourOrFiveDigitsParameterDescriptor]
2635
+ })], _isValidPriceOrWeightCheckDigit_dec = [proxy.describeMethod({
2636
+ type: Types.String,
2637
+ isMatrix: false,
2638
+ parameterDescriptors: [{
2639
+ ...numericSFourOrFiveDigitsParameterDescriptor,
2640
+ isMatrix: false
2641
+ }, checkDigitParameterDescriptor]
2642
+ })], _checkCharacterPair_dec = [proxy.describeMethod({
2643
+ type: Types.String,
2644
+ isMatrix: true,
2645
+ parameterDescriptors: [ai82SParameterDescriptor]
2646
+ })], _hasValidCheckCharacterPair_dec = [proxy.describeMethod({
2647
+ type: Types.String,
2648
+ isMatrix: true,
2649
+ parameterDescriptors: [ai82SWithCheckCharacterPairParameterDescriptor]
2650
+ })], _a13) {
2651
+ constructor() {
2652
+ super(...arguments);
2653
+ __runInitializers(_init13, 5, this);
2654
+ }
2427
2655
  checkDigit(matrixSs) {
2428
2656
  return this.mapMatrix(matrixSs, (s) => (0, import_gs13.checkDigit)(s));
2429
2657
  }
@@ -2443,62 +2671,46 @@ var CheckProxy = class extends LibProxy {
2443
2671
  return this.mapMatrix(matrixSs, (s) => (0, import_gs13.hasValidCheckCharacterPair)(s));
2444
2672
  }
2445
2673
  };
2446
- __decorateClass([
2447
- ProxyMethod({
2448
- type: Types.String,
2449
- isMatrix: true
2450
- }),
2451
- __decorateParam(0, ProxyParameter(numericSParameterDescriptor))
2452
- ], CheckProxy.prototype, "checkDigit", 1);
2453
- __decorateClass([
2454
- ProxyMethod({
2455
- type: Types.String,
2456
- isMatrix: true
2457
- }),
2458
- __decorateParam(0, ProxyParameter(numericSWithCheckDigitParameterDescriptor))
2459
- ], CheckProxy.prototype, "hasValidCheckDigit", 1);
2460
- __decorateClass([
2461
- ProxyMethod({
2462
- type: Types.String,
2463
- isMatrix: true
2464
- }),
2465
- __decorateParam(0, ProxyParameter(numericSFourOrFiveDigitsParameterDescriptor))
2466
- ], CheckProxy.prototype, "priceOrWeightCheckDigit", 1);
2467
- __decorateClass([
2468
- ProxyMethod({
2469
- type: Types.String,
2470
- isMatrix: false
2471
- }),
2472
- __decorateParam(0, ProxyParameter({
2473
- ...numericSFourOrFiveDigitsParameterDescriptor,
2474
- isMatrix: false
2475
- })),
2476
- __decorateParam(1, ProxyParameter(checkDigitParameterDescriptor))
2477
- ], CheckProxy.prototype, "isValidPriceOrWeightCheckDigit", 1);
2478
- __decorateClass([
2479
- ProxyMethod({
2480
- type: Types.String,
2481
- isMatrix: true
2482
- }),
2483
- __decorateParam(0, ProxyParameter(ai82SParameterDescriptor))
2484
- ], CheckProxy.prototype, "checkCharacterPair", 1);
2485
- __decorateClass([
2486
- ProxyMethod({
2487
- type: Types.String,
2488
- isMatrix: true
2489
- }),
2490
- __decorateParam(0, ProxyParameter(ai82SWithCheckCharacterPairParameterDescriptor))
2491
- ], CheckProxy.prototype, "hasValidCheckCharacterPair", 1);
2492
- CheckProxy = __decorateClass([
2493
- ProxyClass({
2494
- namespace: "GS1"
2495
- })
2496
- ], CheckProxy);
2674
+ _init13 = __decoratorStart(_a13);
2675
+ __decorateElement(_init13, 1, "checkDigit", _checkDigit_dec, CheckProxy);
2676
+ __decorateElement(_init13, 1, "hasValidCheckDigit", _hasValidCheckDigit_dec, CheckProxy);
2677
+ __decorateElement(_init13, 1, "priceOrWeightCheckDigit", _priceOrWeightCheckDigit_dec, CheckProxy);
2678
+ __decorateElement(_init13, 1, "isValidPriceOrWeightCheckDigit", _isValidPriceOrWeightCheckDigit_dec, CheckProxy);
2679
+ __decorateElement(_init13, 1, "checkCharacterPair", _checkCharacterPair_dec, CheckProxy);
2680
+ __decorateElement(_init13, 1, "hasValidCheckCharacterPair", _hasValidCheckCharacterPair_dec, CheckProxy);
2681
+ CheckProxy = __decorateElement(_init13, 0, "CheckProxy", _CheckProxy_decorators, CheckProxy);
2682
+ __runInitializers(_init13, 1, CheckProxy);
2497
2683
 
2498
- // src/gs1/identifier-proxy.ts
2499
- var import_core3 = require("@aidc-toolkit/core");
2684
+ // src/gs1/gtin-validator-proxy.ts
2500
2685
  var import_gs14 = require("@aidc-toolkit/gs1");
2501
- var import_utility7 = require("@aidc-toolkit/utility");
2686
+
2687
+ // src/gs1/gtin-descriptor.ts
2688
+ var indicatorDigitParameterDescriptor = {
2689
+ name: "indicatorDigit",
2690
+ type: Types.String,
2691
+ isMatrix: false,
2692
+ isRequired: true
2693
+ };
2694
+ var rcnFormatParameterDescriptor = {
2695
+ name: "rcnFormat",
2696
+ type: Types.String,
2697
+ isMatrix: false,
2698
+ isRequired: true
2699
+ };
2700
+ var rcnItemReferenceParameterDescriptor = {
2701
+ name: "rcnItemReference",
2702
+ type: Types.Number,
2703
+ isMatrix: false,
2704
+ isRequired: true
2705
+ };
2706
+ var rcnPriceOrWeightParameterDescriptor = {
2707
+ name: "rcnPriceOrWeight",
2708
+ type: Types.Number,
2709
+ isMatrix: true,
2710
+ isRequired: true
2711
+ };
2712
+
2713
+ // src/gs1/identifier-validator-proxy.ts
2502
2714
  var identifierParameterDescriptor = {
2503
2715
  name: "identifier",
2504
2716
  type: Types.String,
@@ -2520,18 +2732,27 @@ var IdentifierValidatorProxy = class extends StringProxy {
2520
2732
  return this.#validator;
2521
2733
  }
2522
2734
  };
2523
- var NumericIdentifierValidatorProxy = class extends IdentifierValidatorProxy {
2735
+ var _validate_dec3, _a14, _NumericIdentifierValidatorProxy_decorators, _init14;
2736
+ _NumericIdentifierValidatorProxy_decorators = [proxy.describeClass(true, {
2737
+ namespace: "GS1"
2738
+ })];
2739
+ var NumericIdentifierValidatorProxy = class extends (_a14 = IdentifierValidatorProxy, _validate_dec3 = [proxy.describeMethod({
2740
+ type: Types.String,
2741
+ isMatrix: true,
2742
+ parameterDescriptors: [validateIdentifierParameterDescriptor]
2743
+ })], _a14) {
2744
+ constructor() {
2745
+ super(...arguments);
2746
+ __runInitializers(_init14, 5, this);
2747
+ }
2524
2748
  validate(matrixIdentifiers) {
2525
2749
  return this.validateString(this.validator, matrixIdentifiers);
2526
2750
  }
2527
2751
  };
2528
- __decorateClass([
2529
- ProxyMethod({
2530
- type: Types.String,
2531
- isMatrix: true
2532
- }),
2533
- __decorateParam(0, ProxyParameter(validateIdentifierParameterDescriptor))
2534
- ], NumericIdentifierValidatorProxy.prototype, "validate", 1);
2752
+ _init14 = __decoratorStart(_a14);
2753
+ __decorateElement(_init14, 1, "validate", _validate_dec3, NumericIdentifierValidatorProxy);
2754
+ NumericIdentifierValidatorProxy = __decorateElement(_init14, 0, "NumericIdentifierValidatorProxy", _NumericIdentifierValidatorProxy_decorators, NumericIdentifierValidatorProxy);
2755
+ __runInitializers(_init14, 1, NumericIdentifierValidatorProxy);
2535
2756
  var GTINValidatorProxy = class extends NumericIdentifierValidatorProxy {
2536
2757
  };
2537
2758
  var NonGTINNumericIdentifierValidatorProxy = class extends NumericIdentifierValidatorProxy {
@@ -2540,54 +2761,70 @@ var NonSerializableNumericIdentifierValidatorProxy = class extends NonGTINNumeri
2540
2761
  };
2541
2762
  var SerializableNumericIdentifierValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
2542
2763
  };
2543
- var NonNumericIdentifierValidatorProxy = class extends IdentifierValidatorProxy {
2764
+ var _validate_dec4, _a15, _NonNumericIdentifierValidatorProxy_decorators, _init15;
2765
+ _NonNumericIdentifierValidatorProxy_decorators = [proxy.describeClass(true, {
2766
+ namespace: "GS1"
2767
+ })];
2768
+ var NonNumericIdentifierValidatorProxy = class extends (_a15 = IdentifierValidatorProxy, _validate_dec4 = [proxy.describeMethod({
2769
+ type: Types.String,
2770
+ isMatrix: true,
2771
+ parameterDescriptors: [validateIdentifierParameterDescriptor, exclusionAllNumericParameterDescriptor]
2772
+ })], _a15) {
2773
+ constructor() {
2774
+ super(...arguments);
2775
+ __runInitializers(_init15, 5, this);
2776
+ }
2544
2777
  validate(matrixIdentifiers, exclusion) {
2545
2778
  return this.validateString(this.validator, matrixIdentifiers, {
2546
2779
  exclusion: exclusion ?? void 0
2547
2780
  });
2548
2781
  }
2549
2782
  };
2550
- __decorateClass([
2551
- ProxyMethod({
2552
- type: Types.String,
2553
- isMatrix: true
2554
- }),
2555
- __decorateParam(0, ProxyParameter(validateIdentifierParameterDescriptor)),
2556
- __decorateParam(1, ProxyParameter(exclusionAllNumericParameterDescriptor))
2557
- ], NonNumericIdentifierValidatorProxy.prototype, "validate", 1);
2558
- var GTIN13ValidatorProxy = class extends GTINValidatorProxy {
2783
+ _init15 = __decoratorStart(_a15);
2784
+ __decorateElement(_init15, 1, "validate", _validate_dec4, NonNumericIdentifierValidatorProxy);
2785
+ NonNumericIdentifierValidatorProxy = __decorateElement(_init15, 0, "NonNumericIdentifierValidatorProxy", _NonNumericIdentifierValidatorProxy_decorators, NonNumericIdentifierValidatorProxy);
2786
+ __runInitializers(_init15, 1, NonNumericIdentifierValidatorProxy);
2787
+
2788
+ // src/gs1/gtin-validator-proxy.ts
2789
+ var _GTIN13ValidatorProxy_decorators, _init16, _a16;
2790
+ _GTIN13ValidatorProxy_decorators = [proxy.describeClass(false, {
2791
+ namespace: "GS1",
2792
+ methodInfix: "GTIN13"
2793
+ })];
2794
+ var GTIN13ValidatorProxy = class extends (_a16 = GTINValidatorProxy) {
2559
2795
  constructor(appExtension) {
2560
2796
  super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINLengths.GTIN13]);
2561
2797
  }
2562
2798
  };
2563
- GTIN13ValidatorProxy = __decorateClass([
2564
- ProxyClass({
2565
- namespace: "GS1",
2566
- methodInfix: "GTIN13"
2567
- })
2568
- ], GTIN13ValidatorProxy);
2569
- var GTIN12ValidatorProxy = class extends GTINValidatorProxy {
2799
+ _init16 = __decoratorStart(_a16);
2800
+ GTIN13ValidatorProxy = __decorateElement(_init16, 0, "GTIN13ValidatorProxy", _GTIN13ValidatorProxy_decorators, GTIN13ValidatorProxy);
2801
+ __runInitializers(_init16, 1, GTIN13ValidatorProxy);
2802
+ var _GTIN12ValidatorProxy_decorators, _init17, _a17;
2803
+ _GTIN12ValidatorProxy_decorators = [proxy.describeClass(false, {
2804
+ namespace: "GS1",
2805
+ methodInfix: "GTIN12"
2806
+ })];
2807
+ var GTIN12ValidatorProxy = class extends (_a17 = GTINValidatorProxy) {
2570
2808
  constructor(appExtension) {
2571
2809
  super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINLengths.GTIN12]);
2572
2810
  }
2573
2811
  };
2574
- GTIN12ValidatorProxy = __decorateClass([
2575
- ProxyClass({
2576
- namespace: "GS1",
2577
- methodInfix: "GTIN12"
2578
- })
2579
- ], GTIN12ValidatorProxy);
2580
- var GTIN8ValidatorProxy = class extends GTINValidatorProxy {
2812
+ _init17 = __decoratorStart(_a17);
2813
+ GTIN12ValidatorProxy = __decorateElement(_init17, 0, "GTIN12ValidatorProxy", _GTIN12ValidatorProxy_decorators, GTIN12ValidatorProxy);
2814
+ __runInitializers(_init17, 1, GTIN12ValidatorProxy);
2815
+ var _GTIN8ValidatorProxy_decorators, _init18, _a18;
2816
+ _GTIN8ValidatorProxy_decorators = [proxy.describeClass(false, {
2817
+ namespace: "GS1",
2818
+ methodInfix: "GTIN8"
2819
+ })];
2820
+ var GTIN8ValidatorProxy = class extends (_a18 = GTINValidatorProxy) {
2581
2821
  constructor(appExtension) {
2582
2822
  super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINLengths.GTIN8]);
2583
2823
  }
2584
2824
  };
2585
- GTIN8ValidatorProxy = __decorateClass([
2586
- ProxyClass({
2587
- namespace: "GS1",
2588
- methodInfix: "GTIN8"
2589
- })
2590
- ], GTIN8ValidatorProxy);
2825
+ _init18 = __decoratorStart(_a18);
2826
+ GTIN8ValidatorProxy = __decorateElement(_init18, 0, "GTIN8ValidatorProxy", _GTIN8ValidatorProxy_decorators, GTIN8ValidatorProxy);
2827
+ __runInitializers(_init18, 1, GTIN8ValidatorProxy);
2591
2828
  var zeroSuppressibleGTIN12ParameterDescriptor = {
2592
2829
  extendsDescriptor: identifierParameterDescriptor,
2593
2830
  name: "zeroSuppressibleGTIN12"
@@ -2596,12 +2833,6 @@ var zeroSuppressedGTIN12ParameterDescriptor = {
2596
2833
  extendsDescriptor: identifierParameterDescriptor,
2597
2834
  name: "zeroSuppressedGTIN12"
2598
2835
  };
2599
- var indicatorDigitParameterDescriptor = {
2600
- name: "indicatorDigit",
2601
- type: Types.String,
2602
- isMatrix: false,
2603
- isRequired: true
2604
- };
2605
2836
  var convertGTINParameterDescriptor = {
2606
2837
  extendsDescriptor: identifierParameterDescriptor,
2607
2838
  name: "convertGTIN"
@@ -2624,31 +2855,49 @@ var validateGTIN14ParameterDescriptor = {
2624
2855
  extendsDescriptor: identifierParameterDescriptor,
2625
2856
  name: "validateGTIN14"
2626
2857
  };
2627
- var rcnFormatParameterDescriptor = {
2628
- name: "rcnFormat",
2629
- type: Types.String,
2630
- isMatrix: false,
2631
- isRequired: true
2632
- };
2633
2858
  var rcnParameterDescriptor = {
2634
2859
  name: "rcn",
2635
2860
  type: Types.String,
2636
2861
  isMatrix: true,
2637
2862
  isRequired: true
2638
2863
  };
2639
- var rcnItemReferenceParameterDescriptor = {
2640
- name: "rcnItemReference",
2641
- type: Types.Number,
2642
- isMatrix: false,
2643
- isRequired: true
2644
- };
2645
- var rcnPriceOrWeightParameterDescriptor = {
2646
- name: "rcnPriceOrWeight",
2864
+ var _parseVariableMeasureRCN_dec, _validateGTIN14_dec, _validateGTIN_dec, _normalizeGTIN_dec, _convertToGTIN14_dec, _zeroExpandGTIN12_dec, _zeroSuppressGTIN12_dec, _a19, _GTINValidatorStaticProxy_decorators, _init19;
2865
+ _GTINValidatorStaticProxy_decorators = [proxy.describeClass(false, {
2866
+ namespace: "GS1"
2867
+ })];
2868
+ var GTINValidatorStaticProxy = class extends (_a19 = LibProxy, _zeroSuppressGTIN12_dec = [proxy.describeMethod({
2869
+ type: Types.String,
2870
+ isMatrix: true,
2871
+ parameterDescriptors: [zeroSuppressibleGTIN12ParameterDescriptor]
2872
+ })], _zeroExpandGTIN12_dec = [proxy.describeMethod({
2873
+ type: Types.String,
2874
+ isMatrix: true,
2875
+ parameterDescriptors: [zeroSuppressedGTIN12ParameterDescriptor]
2876
+ })], _convertToGTIN14_dec = [proxy.describeMethod({
2877
+ type: Types.String,
2878
+ isMatrix: true,
2879
+ parameterDescriptors: [indicatorDigitParameterDescriptor, convertGTINParameterDescriptor]
2880
+ })], _normalizeGTIN_dec = [proxy.describeMethod({
2881
+ type: Types.String,
2882
+ isMatrix: true,
2883
+ parameterDescriptors: [normalizeGTINParameterDescriptor]
2884
+ })], _validateGTIN_dec = [proxy.describeMethod({
2885
+ type: Types.String,
2886
+ isMatrix: true,
2887
+ parameterDescriptors: [validateGTINParameterDescriptor, gtinLevelParameterDescriptor]
2888
+ })], _validateGTIN14_dec = [proxy.describeMethod({
2889
+ type: Types.String,
2890
+ isMatrix: true,
2891
+ parameterDescriptors: [validateGTIN14ParameterDescriptor]
2892
+ })], _parseVariableMeasureRCN_dec = [proxy.describeMethod({
2647
2893
  type: Types.Number,
2648
2894
  isMatrix: true,
2649
- isRequired: true
2650
- };
2651
- var GTINValidatorStaticProxy = class extends LibProxy {
2895
+ parameterDescriptors: [rcnFormatParameterDescriptor, rcnParameterDescriptor]
2896
+ })], _a19) {
2897
+ constructor() {
2898
+ super(...arguments);
2899
+ __runInitializers(_init19, 5, this);
2900
+ }
2652
2901
  zeroSuppressGTIN12(matrixGTIN12s) {
2653
2902
  return this.mapMatrix(matrixGTIN12s, (gtin12) => import_gs14.GTINValidator.zeroSuppress(gtin12));
2654
2903
  }
@@ -2679,184 +2928,164 @@ var GTINValidatorStaticProxy = class extends LibProxy {
2679
2928
  });
2680
2929
  }
2681
2930
  };
2682
- __decorateClass([
2683
- ProxyMethod({
2684
- type: Types.String,
2685
- isMatrix: true
2686
- }),
2687
- __decorateParam(0, ProxyParameter(zeroSuppressibleGTIN12ParameterDescriptor))
2688
- ], GTINValidatorStaticProxy.prototype, "zeroSuppressGTIN12", 1);
2689
- __decorateClass([
2690
- ProxyMethod({
2691
- type: Types.String,
2692
- isMatrix: true
2693
- }),
2694
- __decorateParam(0, ProxyParameter(zeroSuppressedGTIN12ParameterDescriptor))
2695
- ], GTINValidatorStaticProxy.prototype, "zeroExpandGTIN12", 1);
2696
- __decorateClass([
2697
- ProxyMethod({
2698
- type: Types.String,
2699
- isMatrix: true
2700
- }),
2701
- __decorateParam(0, ProxyParameter(indicatorDigitParameterDescriptor)),
2702
- __decorateParam(1, ProxyParameter(convertGTINParameterDescriptor))
2703
- ], GTINValidatorStaticProxy.prototype, "convertToGTIN14", 1);
2704
- __decorateClass([
2705
- ProxyMethod({
2706
- type: Types.String,
2707
- isMatrix: true
2708
- }),
2709
- __decorateParam(0, ProxyParameter(normalizeGTINParameterDescriptor))
2710
- ], GTINValidatorStaticProxy.prototype, "normalizeGTIN", 1);
2711
- __decorateClass([
2712
- ProxyMethod({
2713
- type: Types.String,
2714
- isMatrix: true
2715
- }),
2716
- __decorateParam(0, ProxyParameter(validateGTINParameterDescriptor)),
2717
- __decorateParam(1, ProxyParameter(gtinLevelParameterDescriptor))
2718
- ], GTINValidatorStaticProxy.prototype, "validateGTIN", 1);
2719
- __decorateClass([
2720
- ProxyMethod({
2721
- type: Types.String,
2722
- isMatrix: true
2723
- }),
2724
- __decorateParam(0, ProxyParameter(validateGTIN14ParameterDescriptor))
2725
- ], GTINValidatorStaticProxy.prototype, "validateGTIN14", 1);
2726
- __decorateClass([
2727
- ProxyMethod({
2728
- type: Types.Number,
2729
- isMatrix: true
2730
- }),
2731
- __decorateParam(0, ProxyParameter(rcnFormatParameterDescriptor)),
2732
- __decorateParam(1, ProxyParameter(rcnParameterDescriptor))
2733
- ], GTINValidatorStaticProxy.prototype, "parseVariableMeasureRCN", 1);
2734
- GTINValidatorStaticProxy = __decorateClass([
2735
- ProxyClass({
2736
- namespace: "GS1"
2737
- })
2738
- ], GTINValidatorStaticProxy);
2739
- var GLNValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
2931
+ _init19 = __decoratorStart(_a19);
2932
+ __decorateElement(_init19, 1, "zeroSuppressGTIN12", _zeroSuppressGTIN12_dec, GTINValidatorStaticProxy);
2933
+ __decorateElement(_init19, 1, "zeroExpandGTIN12", _zeroExpandGTIN12_dec, GTINValidatorStaticProxy);
2934
+ __decorateElement(_init19, 1, "convertToGTIN14", _convertToGTIN14_dec, GTINValidatorStaticProxy);
2935
+ __decorateElement(_init19, 1, "normalizeGTIN", _normalizeGTIN_dec, GTINValidatorStaticProxy);
2936
+ __decorateElement(_init19, 1, "validateGTIN", _validateGTIN_dec, GTINValidatorStaticProxy);
2937
+ __decorateElement(_init19, 1, "validateGTIN14", _validateGTIN14_dec, GTINValidatorStaticProxy);
2938
+ __decorateElement(_init19, 1, "parseVariableMeasureRCN", _parseVariableMeasureRCN_dec, GTINValidatorStaticProxy);
2939
+ GTINValidatorStaticProxy = __decorateElement(_init19, 0, "GTINValidatorStaticProxy", _GTINValidatorStaticProxy_decorators, GTINValidatorStaticProxy);
2940
+ __runInitializers(_init19, 1, GTINValidatorStaticProxy);
2941
+
2942
+ // src/gs1/non-gtin-validator-proxy.ts
2943
+ var import_gs15 = require("@aidc-toolkit/gs1");
2944
+ var _GLNValidatorProxy_decorators, _init20, _a20;
2945
+ _GLNValidatorProxy_decorators = [proxy.describeClass(false, {
2946
+ namespace: "GS1",
2947
+ methodInfix: "GLN"
2948
+ })];
2949
+ var GLNValidatorProxy = class extends (_a20 = NonSerializableNumericIdentifierValidatorProxy) {
2740
2950
  constructor(appExtension) {
2741
- super(appExtension, import_gs14.IdentifierValidators.GLN);
2742
- }
2743
- };
2744
- GLNValidatorProxy = __decorateClass([
2745
- ProxyClass({
2746
- namespace: "GS1",
2747
- methodInfix: "GLN"
2748
- })
2749
- ], GLNValidatorProxy);
2750
- var SSCCValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
2951
+ super(appExtension, import_gs15.IdentifierValidators.GLN);
2952
+ }
2953
+ };
2954
+ _init20 = __decoratorStart(_a20);
2955
+ GLNValidatorProxy = __decorateElement(_init20, 0, "GLNValidatorProxy", _GLNValidatorProxy_decorators, GLNValidatorProxy);
2956
+ __runInitializers(_init20, 1, GLNValidatorProxy);
2957
+ var _SSCCValidatorProxy_decorators, _init21, _a21;
2958
+ _SSCCValidatorProxy_decorators = [proxy.describeClass(false, {
2959
+ namespace: "GS1",
2960
+ methodInfix: "SSCC"
2961
+ })];
2962
+ var SSCCValidatorProxy = class extends (_a21 = NonSerializableNumericIdentifierValidatorProxy) {
2751
2963
  constructor(appExtension) {
2752
- super(appExtension, import_gs14.IdentifierValidators.SSCC);
2753
- }
2754
- };
2755
- SSCCValidatorProxy = __decorateClass([
2756
- ProxyClass({
2757
- namespace: "GS1",
2758
- methodInfix: "SSCC"
2759
- })
2760
- ], SSCCValidatorProxy);
2761
- var GRAIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
2964
+ super(appExtension, import_gs15.IdentifierValidators.SSCC);
2965
+ }
2966
+ };
2967
+ _init21 = __decoratorStart(_a21);
2968
+ SSCCValidatorProxy = __decorateElement(_init21, 0, "SSCCValidatorProxy", _SSCCValidatorProxy_decorators, SSCCValidatorProxy);
2969
+ __runInitializers(_init21, 1, SSCCValidatorProxy);
2970
+ var _GRAIValidatorProxy_decorators, _init22, _a22;
2971
+ _GRAIValidatorProxy_decorators = [proxy.describeClass(false, {
2972
+ namespace: "GS1",
2973
+ methodInfix: "GRAI"
2974
+ })];
2975
+ var GRAIValidatorProxy = class extends (_a22 = SerializableNumericIdentifierValidatorProxy) {
2762
2976
  constructor(appExtension) {
2763
- super(appExtension, import_gs14.IdentifierValidators.GRAI);
2764
- }
2765
- };
2766
- GRAIValidatorProxy = __decorateClass([
2767
- ProxyClass({
2768
- namespace: "GS1",
2769
- methodInfix: "GRAI"
2770
- })
2771
- ], GRAIValidatorProxy);
2772
- var GIAIValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
2977
+ super(appExtension, import_gs15.IdentifierValidators.GRAI);
2978
+ }
2979
+ };
2980
+ _init22 = __decoratorStart(_a22);
2981
+ GRAIValidatorProxy = __decorateElement(_init22, 0, "GRAIValidatorProxy", _GRAIValidatorProxy_decorators, GRAIValidatorProxy);
2982
+ __runInitializers(_init22, 1, GRAIValidatorProxy);
2983
+ var _GIAIValidatorProxy_decorators, _init23, _a23;
2984
+ _GIAIValidatorProxy_decorators = [proxy.describeClass(false, {
2985
+ namespace: "GS1",
2986
+ methodInfix: "GIAI"
2987
+ })];
2988
+ var GIAIValidatorProxy = class extends (_a23 = NonNumericIdentifierValidatorProxy) {
2773
2989
  constructor(appExtension) {
2774
- super(appExtension, import_gs14.IdentifierValidators.GIAI);
2775
- }
2776
- };
2777
- GIAIValidatorProxy = __decorateClass([
2778
- ProxyClass({
2779
- namespace: "GS1",
2780
- methodInfix: "GIAI"
2781
- })
2782
- ], GIAIValidatorProxy);
2783
- var GSRNValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
2990
+ super(appExtension, import_gs15.IdentifierValidators.GIAI);
2991
+ }
2992
+ };
2993
+ _init23 = __decoratorStart(_a23);
2994
+ GIAIValidatorProxy = __decorateElement(_init23, 0, "GIAIValidatorProxy", _GIAIValidatorProxy_decorators, GIAIValidatorProxy);
2995
+ __runInitializers(_init23, 1, GIAIValidatorProxy);
2996
+ var _GSRNValidatorProxy_decorators, _init24, _a24;
2997
+ _GSRNValidatorProxy_decorators = [proxy.describeClass(false, {
2998
+ namespace: "GS1",
2999
+ methodInfix: "GSRN"
3000
+ })];
3001
+ var GSRNValidatorProxy = class extends (_a24 = NonSerializableNumericIdentifierValidatorProxy) {
2784
3002
  constructor(appExtension) {
2785
- super(appExtension, import_gs14.IdentifierValidators.GSRN);
2786
- }
2787
- };
2788
- GSRNValidatorProxy = __decorateClass([
2789
- ProxyClass({
2790
- namespace: "GS1",
2791
- methodInfix: "GSRN"
2792
- })
2793
- ], GSRNValidatorProxy);
2794
- var GDTIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
3003
+ super(appExtension, import_gs15.IdentifierValidators.GSRN);
3004
+ }
3005
+ };
3006
+ _init24 = __decoratorStart(_a24);
3007
+ GSRNValidatorProxy = __decorateElement(_init24, 0, "GSRNValidatorProxy", _GSRNValidatorProxy_decorators, GSRNValidatorProxy);
3008
+ __runInitializers(_init24, 1, GSRNValidatorProxy);
3009
+ var _GDTIValidatorProxy_decorators, _init25, _a25;
3010
+ _GDTIValidatorProxy_decorators = [proxy.describeClass(false, {
3011
+ namespace: "GS1",
3012
+ methodInfix: "GDTI"
3013
+ })];
3014
+ var GDTIValidatorProxy = class extends (_a25 = SerializableNumericIdentifierValidatorProxy) {
2795
3015
  constructor(appExtension) {
2796
- super(appExtension, import_gs14.IdentifierValidators.GDTI);
2797
- }
2798
- };
2799
- GDTIValidatorProxy = __decorateClass([
2800
- ProxyClass({
2801
- namespace: "GS1",
2802
- methodInfix: "GDTI"
2803
- })
2804
- ], GDTIValidatorProxy);
2805
- var GINCValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
3016
+ super(appExtension, import_gs15.IdentifierValidators.GDTI);
3017
+ }
3018
+ };
3019
+ _init25 = __decoratorStart(_a25);
3020
+ GDTIValidatorProxy = __decorateElement(_init25, 0, "GDTIValidatorProxy", _GDTIValidatorProxy_decorators, GDTIValidatorProxy);
3021
+ __runInitializers(_init25, 1, GDTIValidatorProxy);
3022
+ var _GINCValidatorProxy_decorators, _init26, _a26;
3023
+ _GINCValidatorProxy_decorators = [proxy.describeClass(false, {
3024
+ namespace: "GS1",
3025
+ methodInfix: "GINC"
3026
+ })];
3027
+ var GINCValidatorProxy = class extends (_a26 = NonNumericIdentifierValidatorProxy) {
2806
3028
  constructor(appExtension) {
2807
- super(appExtension, import_gs14.IdentifierValidators.GINC);
2808
- }
2809
- };
2810
- GINCValidatorProxy = __decorateClass([
2811
- ProxyClass({
2812
- namespace: "GS1",
2813
- methodInfix: "GINC"
2814
- })
2815
- ], GINCValidatorProxy);
2816
- var GSINValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
3029
+ super(appExtension, import_gs15.IdentifierValidators.GINC);
3030
+ }
3031
+ };
3032
+ _init26 = __decoratorStart(_a26);
3033
+ GINCValidatorProxy = __decorateElement(_init26, 0, "GINCValidatorProxy", _GINCValidatorProxy_decorators, GINCValidatorProxy);
3034
+ __runInitializers(_init26, 1, GINCValidatorProxy);
3035
+ var _GSINValidatorProxy_decorators, _init27, _a27;
3036
+ _GSINValidatorProxy_decorators = [proxy.describeClass(false, {
3037
+ namespace: "GS1",
3038
+ methodInfix: "GSIN"
3039
+ })];
3040
+ var GSINValidatorProxy = class extends (_a27 = NonSerializableNumericIdentifierValidatorProxy) {
2817
3041
  constructor(appExtension) {
2818
- super(appExtension, import_gs14.IdentifierValidators.GSIN);
2819
- }
2820
- };
2821
- GSINValidatorProxy = __decorateClass([
2822
- ProxyClass({
2823
- namespace: "GS1",
2824
- methodInfix: "GSIN"
2825
- })
2826
- ], GSINValidatorProxy);
2827
- var GCNValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
3042
+ super(appExtension, import_gs15.IdentifierValidators.GSIN);
3043
+ }
3044
+ };
3045
+ _init27 = __decoratorStart(_a27);
3046
+ GSINValidatorProxy = __decorateElement(_init27, 0, "GSINValidatorProxy", _GSINValidatorProxy_decorators, GSINValidatorProxy);
3047
+ __runInitializers(_init27, 1, GSINValidatorProxy);
3048
+ var _GCNValidatorProxy_decorators, _init28, _a28;
3049
+ _GCNValidatorProxy_decorators = [proxy.describeClass(false, {
3050
+ namespace: "GS1",
3051
+ methodInfix: "GCN"
3052
+ })];
3053
+ var GCNValidatorProxy = class extends (_a28 = SerializableNumericIdentifierValidatorProxy) {
2828
3054
  constructor(appExtension) {
2829
- super(appExtension, import_gs14.IdentifierValidators.GCN);
2830
- }
2831
- };
2832
- GCNValidatorProxy = __decorateClass([
2833
- ProxyClass({
2834
- namespace: "GS1",
2835
- methodInfix: "GCN"
2836
- })
2837
- ], GCNValidatorProxy);
2838
- var CPIDValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
3055
+ super(appExtension, import_gs15.IdentifierValidators.GCN);
3056
+ }
3057
+ };
3058
+ _init28 = __decoratorStart(_a28);
3059
+ GCNValidatorProxy = __decorateElement(_init28, 0, "GCNValidatorProxy", _GCNValidatorProxy_decorators, GCNValidatorProxy);
3060
+ __runInitializers(_init28, 1, GCNValidatorProxy);
3061
+ var _CPIDValidatorProxy_decorators, _init29, _a29;
3062
+ _CPIDValidatorProxy_decorators = [proxy.describeClass(false, {
3063
+ namespace: "GS1",
3064
+ methodInfix: "CPID"
3065
+ })];
3066
+ var CPIDValidatorProxy = class extends (_a29 = NonNumericIdentifierValidatorProxy) {
2839
3067
  constructor(appExtension) {
2840
- super(appExtension, import_gs14.IdentifierValidators.CPID);
2841
- }
2842
- };
2843
- CPIDValidatorProxy = __decorateClass([
2844
- ProxyClass({
2845
- namespace: "GS1",
2846
- methodInfix: "CPID"
2847
- })
2848
- ], CPIDValidatorProxy);
2849
- var GMNValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
3068
+ super(appExtension, import_gs15.IdentifierValidators.CPID);
3069
+ }
3070
+ };
3071
+ _init29 = __decoratorStart(_a29);
3072
+ CPIDValidatorProxy = __decorateElement(_init29, 0, "CPIDValidatorProxy", _CPIDValidatorProxy_decorators, CPIDValidatorProxy);
3073
+ __runInitializers(_init29, 1, CPIDValidatorProxy);
3074
+ var _GMNValidatorProxy_decorators, _init30, _a30;
3075
+ _GMNValidatorProxy_decorators = [proxy.describeClass(false, {
3076
+ namespace: "GS1",
3077
+ methodInfix: "GMN"
3078
+ })];
3079
+ var GMNValidatorProxy = class extends (_a30 = NonNumericIdentifierValidatorProxy) {
2850
3080
  constructor(appExtension) {
2851
- super(appExtension, import_gs14.IdentifierValidators.GMN);
3081
+ super(appExtension, import_gs15.IdentifierValidators.GMN);
2852
3082
  }
2853
3083
  };
2854
- GMNValidatorProxy = __decorateClass([
2855
- ProxyClass({
2856
- namespace: "GS1",
2857
- methodInfix: "GMN"
2858
- })
2859
- ], GMNValidatorProxy);
3084
+ _init30 = __decoratorStart(_a30);
3085
+ GMNValidatorProxy = __decorateElement(_init30, 0, "GMNValidatorProxy", _GMNValidatorProxy_decorators, GMNValidatorProxy);
3086
+ __runInitializers(_init30, 1, GMNValidatorProxy);
3087
+
3088
+ // src/gs1/prefix-manager-proxy.ts
2860
3089
  var prefixParameterDescriptor = {
2861
3090
  name: "prefix",
2862
3091
  type: Types.String,
@@ -2875,6 +3104,37 @@ var tweakFactorParameterDescriptor = {
2875
3104
  isMatrix: false,
2876
3105
  isRequired: false
2877
3106
  };
3107
+ var _definePrefix_dec, _a31, _PrefixManagerProxy_decorators, _init31;
3108
+ _PrefixManagerProxy_decorators = [proxy.describeClass(false, {
3109
+ namespace: "GS1"
3110
+ })];
3111
+ var PrefixManagerProxy = class extends (_a31 = LibProxy, _definePrefix_dec = [proxy.describeMethod({
3112
+ type: Types.Any,
3113
+ isMatrix: true,
3114
+ parameterDescriptors: [prefixParameterDescriptor, prefixTypeParameterDescriptor, tweakFactorParameterDescriptor]
3115
+ })], _a31) {
3116
+ constructor() {
3117
+ super(...arguments);
3118
+ __runInitializers(_init31, 5, this);
3119
+ }
3120
+ definePrefix(prefix, prefixType, tweakFactor) {
3121
+ return [[prefix, prefixType, tweakFactor]];
3122
+ }
3123
+ };
3124
+ _init31 = __decoratorStart(_a31);
3125
+ __decorateElement(_init31, 1, "definePrefix", _definePrefix_dec, PrefixManagerProxy);
3126
+ PrefixManagerProxy = __decorateElement(_init31, 0, "PrefixManagerProxy", _PrefixManagerProxy_decorators, PrefixManagerProxy);
3127
+ __runInitializers(_init31, 1, PrefixManagerProxy);
3128
+
3129
+ // src/gs1/gtin-creator-proxy.ts
3130
+ var import_gs17 = require("@aidc-toolkit/gs1");
3131
+
3132
+ // src/gs1/identifier-creator-proxy.ts
3133
+ var import_core4 = require("@aidc-toolkit/core");
3134
+ var import_gs16 = require("@aidc-toolkit/gs1");
3135
+ var import_utility7 = require("@aidc-toolkit/utility");
3136
+
3137
+ // src/gs1/prefix-definition-descriptor.ts
2878
3138
  var prefixDefinitionParameterDescriptor = {
2879
3139
  name: "prefixDefinition",
2880
3140
  type: Types.Any,
@@ -2889,27 +3149,10 @@ var prefixDefinitionAnyParameterDescriptor = {
2889
3149
  extendsDescriptor: prefixDefinitionParameterDescriptor,
2890
3150
  name: "prefixDefinitionAny"
2891
3151
  };
2892
- var PrefixManagerProxy = class extends LibProxy {
2893
- definePrefix(prefix, prefixType, tweakFactor) {
2894
- return [[prefix, prefixType, tweakFactor]];
2895
- }
2896
- };
2897
- __decorateClass([
2898
- ProxyMethod({
2899
- type: Types.Any,
2900
- isMatrix: true
2901
- }),
2902
- __decorateParam(0, ProxyParameter(prefixParameterDescriptor)),
2903
- __decorateParam(1, ProxyParameter(prefixTypeParameterDescriptor)),
2904
- __decorateParam(2, ProxyParameter(tweakFactorParameterDescriptor))
2905
- ], PrefixManagerProxy.prototype, "definePrefix", 1);
2906
- PrefixManagerProxy = __decorateClass([
2907
- ProxyClass({
2908
- namespace: "GS1"
2909
- })
2910
- ], PrefixManagerProxy);
3152
+
3153
+ // src/gs1/identifier-creator-proxy.ts
2911
3154
  var IdentifierCreatorProxy = class _IdentifierCreatorProxy extends LibProxy {
2912
- static #PREFIX_TYPES = [import_gs14.PrefixTypes.GS1CompanyPrefix, import_gs14.PrefixTypes.UPCCompanyPrefix, import_gs14.PrefixTypes.GS18Prefix];
3155
+ static #PREFIX_TYPES = [import_gs16.PrefixTypes.GS1CompanyPrefix, import_gs16.PrefixTypes.UPCCompanyPrefix, import_gs16.PrefixTypes.GS18Prefix];
2913
3156
  #getCreator;
2914
3157
  constructor(appExtension, getCreator) {
2915
3158
  super(appExtension);
@@ -2945,9 +3188,9 @@ var IdentifierCreatorProxy = class _IdentifierCreatorProxy extends LibProxy {
2945
3188
  if (prefixType === void 0) {
2946
3189
  throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.invalidPrefixType"));
2947
3190
  }
2948
- const prefixManager = import_gs14.PrefixManager.get(prefixType, prefix);
3191
+ const prefixManager = import_gs16.PrefixManager.get(prefixType, prefix);
2949
3192
  const tweakFactor = reducedPrefixDefinition[2];
2950
- if (!(0, import_core3.isNullish)(tweakFactor)) {
3193
+ if (!(0, import_core4.isNullish)(tweakFactor)) {
2951
3194
  if (typeof tweakFactor !== "number") {
2952
3195
  throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.tweakFactorMustBeNumber"));
2953
3196
  }
@@ -2964,7 +3207,28 @@ var sparseParameterDescriptor = {
2964
3207
  isMatrix: false,
2965
3208
  isRequired: false
2966
3209
  };
2967
- var NumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
3210
+ var _createAll_dec, _createSequence_dec2, _create_dec2, _a32, _NumericIdentifierCreatorProxy_decorators, _init32;
3211
+ _NumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3212
+ namespace: "GS1"
3213
+ })];
3214
+ var NumericIdentifierCreatorProxy = class extends (_a32 = IdentifierCreatorProxy, _create_dec2 = [proxy.describeMethod({
3215
+ type: Types.String,
3216
+ isMatrix: true,
3217
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]
3218
+ })], _createSequence_dec2 = [proxy.describeMethod({
3219
+ infixBefore: "Sequence",
3220
+ type: Types.String,
3221
+ isMatrix: true,
3222
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, sparseParameterDescriptor]
3223
+ })], _createAll_dec = [proxy.describeMethod({
3224
+ type: Types.String,
3225
+ isMatrix: true,
3226
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor]
3227
+ })], _a32) {
3228
+ constructor() {
3229
+ super(...arguments);
3230
+ __runInitializers(_init32, 5, this);
3231
+ }
2968
3232
  create(prefixDefinition, matrixValues, sparse) {
2969
3233
  const creator = this.getCreator(prefixDefinition);
2970
3234
  const sparseOrUndefined = sparse ?? void 0;
@@ -2980,33 +3244,12 @@ var NumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
2980
3244
  return LibProxy.matrixResult(creator.createAll());
2981
3245
  }
2982
3246
  };
2983
- __decorateClass([
2984
- ProxyMethod({
2985
- type: Types.String,
2986
- isMatrix: true
2987
- }),
2988
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
2989
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2990
- __decorateParam(2, ProxyParameter(sparseParameterDescriptor))
2991
- ], NumericIdentifierCreatorProxy.prototype, "create", 1);
2992
- __decorateClass([
2993
- ProxyMethod({
2994
- infixBefore: "Sequence",
2995
- type: Types.String,
2996
- isMatrix: true
2997
- }),
2998
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
2999
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
3000
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
3001
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3002
- ], NumericIdentifierCreatorProxy.prototype, "createSequence", 1);
3003
- __decorateClass([
3004
- ProxyMethod({
3005
- type: Types.String,
3006
- isMatrix: true
3007
- }),
3008
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor))
3009
- ], NumericIdentifierCreatorProxy.prototype, "createAll", 1);
3247
+ _init32 = __decoratorStart(_a32);
3248
+ __decorateElement(_init32, 1, "create", _create_dec2, NumericIdentifierCreatorProxy);
3249
+ __decorateElement(_init32, 1, "createSequence", _createSequence_dec2, NumericIdentifierCreatorProxy);
3250
+ __decorateElement(_init32, 1, "createAll", _createAll_dec, NumericIdentifierCreatorProxy);
3251
+ NumericIdentifierCreatorProxy = __decorateElement(_init32, 0, "NumericIdentifierCreatorProxy", _NumericIdentifierCreatorProxy_decorators, NumericIdentifierCreatorProxy);
3252
+ __runInitializers(_init32, 1, NumericIdentifierCreatorProxy);
3010
3253
  var NonGTINNumericIdentifierCreatorProxy = class extends NumericIdentifierCreatorProxy {
3011
3254
  };
3012
3255
  var NonSerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIdentifierCreatorProxy {
@@ -3026,58 +3269,93 @@ var serialComponentParameterDescriptor = {
3026
3269
  isMatrix: true,
3027
3270
  isRequired: true
3028
3271
  };
3029
- var SerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIdentifierCreatorProxy {
3272
+ var _concatenate_dec, _createSerialized_dec, _a33, _SerializableNumericIdentifierCreatorProxy_decorators, _init33;
3273
+ _SerializableNumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3274
+ namespace: "GS1"
3275
+ })];
3276
+ var SerializableNumericIdentifierCreatorProxy = class extends (_a33 = NonGTINNumericIdentifierCreatorProxy, _createSerialized_dec = [proxy.describeMethod({
3277
+ type: Types.String,
3278
+ isMatrix: true,
3279
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, singleValueParameterDescriptor, serialComponentParameterDescriptor, sparseParameterDescriptor]
3280
+ })], _concatenate_dec = [proxy.describeMethod({
3281
+ type: Types.String,
3282
+ isMatrix: true,
3283
+ parameterDescriptors: [baseIdentifierParameterDescriptor, serialComponentParameterDescriptor]
3284
+ })], _a33) {
3285
+ constructor() {
3286
+ super(...arguments);
3287
+ __runInitializers(_init33, 5, this);
3288
+ }
3030
3289
  createSerialized(prefixDefinition, value, matrixSerialComponents, sparse) {
3031
3290
  const creator = this.getCreator(prefixDefinition);
3032
3291
  const sparseOrUndefined = sparse ?? void 0;
3033
3292
  return this.mapMatrix(matrixSerialComponents, (serialComponent) => creator.createSerialized(value, serialComponent, sparseOrUndefined));
3034
3293
  }
3035
3294
  concatenate(baseIdentifier, matrixSerialComponents) {
3036
- const creator = this.getCreator([[baseIdentifier.substring(0, !baseIdentifier.startsWith("0") ? import_gs14.PrefixValidator.GS1_COMPANY_PREFIX_MINIMUM_LENGTH : import_gs14.PrefixValidator.UPC_COMPANY_PREFIX_MINIMUM_LENGTH + 1), import_gs14.PrefixTypes.GS1CompanyPrefix]]);
3295
+ const creator = this.getCreator([[baseIdentifier.substring(0, !baseIdentifier.startsWith("0") ? import_gs16.PrefixValidator.GS1_COMPANY_PREFIX_MINIMUM_LENGTH : import_gs16.PrefixValidator.UPC_COMPANY_PREFIX_MINIMUM_LENGTH + 1), import_gs16.PrefixTypes.GS1CompanyPrefix]]);
3037
3296
  return this.mapMatrix(matrixSerialComponents, (serialComponent) => creator.concatenate(baseIdentifier, serialComponent));
3038
3297
  }
3039
3298
  };
3040
- __decorateClass([
3041
- ProxyMethod({
3042
- type: Types.String,
3043
- isMatrix: true
3044
- }),
3045
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
3046
- __decorateParam(1, ProxyParameter(singleValueParameterDescriptor)),
3047
- __decorateParam(2, ProxyParameter(serialComponentParameterDescriptor)),
3048
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3049
- ], SerializableNumericIdentifierCreatorProxy.prototype, "createSerialized", 1);
3050
- __decorateClass([
3051
- ProxyMethod({
3052
- type: Types.String,
3053
- isMatrix: true
3054
- }),
3055
- __decorateParam(0, ProxyParameter(baseIdentifierParameterDescriptor)),
3056
- __decorateParam(1, ProxyParameter(serialComponentParameterDescriptor))
3057
- ], SerializableNumericIdentifierCreatorProxy.prototype, "concatenate", 1);
3299
+ _init33 = __decoratorStart(_a33);
3300
+ __decorateElement(_init33, 1, "createSerialized", _createSerialized_dec, SerializableNumericIdentifierCreatorProxy);
3301
+ __decorateElement(_init33, 1, "concatenate", _concatenate_dec, SerializableNumericIdentifierCreatorProxy);
3302
+ SerializableNumericIdentifierCreatorProxy = __decorateElement(_init33, 0, "SerializableNumericIdentifierCreatorProxy", _SerializableNumericIdentifierCreatorProxy_decorators, SerializableNumericIdentifierCreatorProxy);
3303
+ __runInitializers(_init33, 1, SerializableNumericIdentifierCreatorProxy);
3058
3304
  var referenceParameterDescriptor = {
3059
3305
  name: "reference",
3060
3306
  type: Types.String,
3061
3307
  isMatrix: true,
3062
3308
  isRequired: true
3063
3309
  };
3064
- var NonNumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
3310
+ var _create_dec3, _a34, _NonNumericIdentifierCreatorProxy_decorators, _init34;
3311
+ _NonNumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3312
+ namespace: "GS1"
3313
+ })];
3314
+ var NonNumericIdentifierCreatorProxy = class extends (_a34 = IdentifierCreatorProxy, _create_dec3 = [proxy.describeMethod({
3315
+ type: Types.String,
3316
+ isMatrix: true,
3317
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, referenceParameterDescriptor]
3318
+ })], _a34) {
3319
+ constructor() {
3320
+ super(...arguments);
3321
+ __runInitializers(_init34, 5, this);
3322
+ }
3065
3323
  create(prefixDefinition, matrixReferences) {
3066
3324
  const creator = this.getCreator(prefixDefinition);
3067
3325
  return this.mapMatrix(matrixReferences, (reference) => creator.create(reference));
3068
3326
  }
3069
3327
  };
3070
- __decorateClass([
3071
- ProxyMethod({
3072
- type: Types.String,
3073
- isMatrix: true
3074
- }),
3075
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
3076
- __decorateParam(1, ProxyParameter(referenceParameterDescriptor))
3077
- ], NonNumericIdentifierCreatorProxy.prototype, "create", 1);
3078
- var GTINCreatorProxy = class extends NumericIdentifierCreatorProxy {
3328
+ _init34 = __decoratorStart(_a34);
3329
+ __decorateElement(_init34, 1, "create", _create_dec3, NonNumericIdentifierCreatorProxy);
3330
+ NonNumericIdentifierCreatorProxy = __decorateElement(_init34, 0, "NonNumericIdentifierCreatorProxy", _NonNumericIdentifierCreatorProxy_decorators, NonNumericIdentifierCreatorProxy);
3331
+ __runInitializers(_init34, 1, NonNumericIdentifierCreatorProxy);
3332
+
3333
+ // src/gs1/gtin-creator-proxy.ts
3334
+ var _createVariableMeasureRCN_dec, _createGTIN14_dec, _a35, _GTINCreatorProxy_decorators, _init35;
3335
+ _GTINCreatorProxy_decorators = [proxy.describeClass(false, {
3336
+ namespace: "GS1",
3337
+ methodInfix: "GTIN",
3338
+ replaceParameterDescriptors: [
3339
+ {
3340
+ name: expandParameterDescriptor(prefixDefinitionGS1UPCParameterDescriptor).name,
3341
+ replacement: prefixDefinitionAnyParameterDescriptor
3342
+ }
3343
+ ]
3344
+ })];
3345
+ var GTINCreatorProxy = class extends (_a35 = NumericIdentifierCreatorProxy, _createGTIN14_dec = [proxy.describeMethod({
3346
+ type: Types.String,
3347
+ isMatrix: true,
3348
+ ignoreInfix: true,
3349
+ parameterDescriptors: [indicatorDigitParameterDescriptor, prefixDefinitionAnyParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]
3350
+ })], _createVariableMeasureRCN_dec = [proxy.describeMethod({
3351
+ type: Types.String,
3352
+ isMatrix: true,
3353
+ ignoreInfix: true,
3354
+ parameterDescriptors: [rcnFormatParameterDescriptor, rcnItemReferenceParameterDescriptor, rcnPriceOrWeightParameterDescriptor]
3355
+ })], _a35) {
3079
3356
  constructor(appExtension) {
3080
3357
  super(appExtension, (prefixManager) => prefixManager.gtinCreator);
3358
+ __runInitializers(_init35, 5, this);
3081
3359
  }
3082
3360
  createGTIN14(indicatorDigit, prefixDefinition, matrixValues, sparse) {
3083
3361
  const creator = this.getCreator(prefixDefinition);
@@ -3085,166 +3363,162 @@ var GTINCreatorProxy = class extends NumericIdentifierCreatorProxy {
3085
3363
  return this.mapMatrix(matrixValues, (value) => creator.createGTIN14(indicatorDigit, value, sparseOrUndefined));
3086
3364
  }
3087
3365
  createVariableMeasureRCN(format, itemReference, matrixPricesOrWeights) {
3088
- return this.mapMatrix(matrixPricesOrWeights, (priceOrWeight) => import_gs14.GTINCreator.createVariableMeasureRCN(format, itemReference, priceOrWeight));
3089
- }
3090
- };
3091
- __decorateClass([
3092
- ProxyMethod({
3093
- type: Types.String,
3094
- isMatrix: true,
3095
- ignoreInfix: true
3096
- }),
3097
- __decorateParam(0, ProxyParameter(indicatorDigitParameterDescriptor)),
3098
- __decorateParam(1, ProxyParameter(prefixDefinitionAnyParameterDescriptor)),
3099
- __decorateParam(2, ProxyParameter(valueParameterDescriptor)),
3100
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3101
- ], GTINCreatorProxy.prototype, "createGTIN14", 1);
3102
- __decorateClass([
3103
- ProxyMethod({
3104
- type: Types.String,
3105
- isMatrix: true,
3106
- ignoreInfix: true
3107
- }),
3108
- __decorateParam(0, ProxyParameter(rcnFormatParameterDescriptor)),
3109
- __decorateParam(1, ProxyParameter(rcnItemReferenceParameterDescriptor)),
3110
- __decorateParam(2, ProxyParameter(rcnPriceOrWeightParameterDescriptor))
3111
- ], GTINCreatorProxy.prototype, "createVariableMeasureRCN", 1);
3112
- GTINCreatorProxy = __decorateClass([
3113
- ProxyClass({
3114
- namespace: "GS1",
3115
- methodInfix: "GTIN",
3116
- replaceParameterDescriptors: [
3117
- {
3118
- name: expandParameterDescriptor(prefixDefinitionGS1UPCParameterDescriptor).name,
3119
- replacement: prefixDefinitionAnyParameterDescriptor
3120
- }
3121
- ]
3122
- })
3123
- ], GTINCreatorProxy);
3124
- var GLNCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3366
+ return this.mapMatrix(matrixPricesOrWeights, (priceOrWeight) => import_gs17.GTINCreator.createVariableMeasureRCN(format, itemReference, priceOrWeight));
3367
+ }
3368
+ };
3369
+ _init35 = __decoratorStart(_a35);
3370
+ __decorateElement(_init35, 1, "createGTIN14", _createGTIN14_dec, GTINCreatorProxy);
3371
+ __decorateElement(_init35, 1, "createVariableMeasureRCN", _createVariableMeasureRCN_dec, GTINCreatorProxy);
3372
+ GTINCreatorProxy = __decorateElement(_init35, 0, "GTINCreatorProxy", _GTINCreatorProxy_decorators, GTINCreatorProxy);
3373
+ __runInitializers(_init35, 1, GTINCreatorProxy);
3374
+
3375
+ // src/gs1/non-gtin-creator-proxy.ts
3376
+ var _GLNCreatorProxy_decorators, _init36, _a36;
3377
+ _GLNCreatorProxy_decorators = [proxy.describeClass(false, {
3378
+ namespace: "GS1",
3379
+ methodInfix: "GLN"
3380
+ })];
3381
+ var GLNCreatorProxy = class extends (_a36 = NonSerializableNumericIdentifierCreatorProxy) {
3125
3382
  constructor(appExtension) {
3126
3383
  super(appExtension, (prefixManager) => prefixManager.glnCreator);
3127
3384
  }
3128
3385
  };
3129
- GLNCreatorProxy = __decorateClass([
3130
- ProxyClass({
3131
- namespace: "GS1",
3132
- methodInfix: "GLN"
3133
- })
3134
- ], GLNCreatorProxy);
3135
- var SSCCCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3386
+ _init36 = __decoratorStart(_a36);
3387
+ GLNCreatorProxy = __decorateElement(_init36, 0, "GLNCreatorProxy", _GLNCreatorProxy_decorators, GLNCreatorProxy);
3388
+ __runInitializers(_init36, 1, GLNCreatorProxy);
3389
+ var _SSCCCreatorProxy_decorators, _init37, _a37;
3390
+ _SSCCCreatorProxy_decorators = [proxy.describeClass(false, {
3391
+ namespace: "GS1",
3392
+ methodInfix: "SSCC"
3393
+ })];
3394
+ var SSCCCreatorProxy = class extends (_a37 = NonSerializableNumericIdentifierCreatorProxy) {
3136
3395
  constructor(appExtension) {
3137
3396
  super(appExtension, (prefixManager) => prefixManager.ssccCreator);
3138
3397
  }
3139
3398
  };
3140
- SSCCCreatorProxy = __decorateClass([
3141
- ProxyClass({
3142
- namespace: "GS1",
3143
- methodInfix: "SSCC"
3144
- })
3145
- ], SSCCCreatorProxy);
3146
- var GRAICreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
3399
+ _init37 = __decoratorStart(_a37);
3400
+ SSCCCreatorProxy = __decorateElement(_init37, 0, "SSCCCreatorProxy", _SSCCCreatorProxy_decorators, SSCCCreatorProxy);
3401
+ __runInitializers(_init37, 1, SSCCCreatorProxy);
3402
+ var _GRAICreatorProxy_decorators, _init38, _a38;
3403
+ _GRAICreatorProxy_decorators = [proxy.describeClass(false, {
3404
+ namespace: "GS1",
3405
+ methodInfix: "GRAI"
3406
+ })];
3407
+ var GRAICreatorProxy = class extends (_a38 = SerializableNumericIdentifierCreatorProxy) {
3147
3408
  constructor(appExtension) {
3148
3409
  super(appExtension, (prefixManager) => prefixManager.graiCreator);
3149
3410
  }
3150
3411
  };
3151
- GRAICreatorProxy = __decorateClass([
3152
- ProxyClass({
3153
- namespace: "GS1",
3154
- methodInfix: "GRAI"
3155
- })
3156
- ], GRAICreatorProxy);
3157
- var GIAICreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3412
+ _init38 = __decoratorStart(_a38);
3413
+ GRAICreatorProxy = __decorateElement(_init38, 0, "GRAICreatorProxy", _GRAICreatorProxy_decorators, GRAICreatorProxy);
3414
+ __runInitializers(_init38, 1, GRAICreatorProxy);
3415
+ var _GIAICreatorProxy_decorators, _init39, _a39;
3416
+ _GIAICreatorProxy_decorators = [proxy.describeClass(false, {
3417
+ namespace: "GS1",
3418
+ methodInfix: "GIAI"
3419
+ })];
3420
+ var GIAICreatorProxy = class extends (_a39 = NonNumericIdentifierCreatorProxy) {
3158
3421
  constructor(appExtension) {
3159
3422
  super(appExtension, (prefixManager) => prefixManager.giaiCreator);
3160
3423
  }
3161
3424
  };
3162
- GIAICreatorProxy = __decorateClass([
3163
- ProxyClass({
3164
- namespace: "GS1",
3165
- methodInfix: "GIAI"
3166
- })
3167
- ], GIAICreatorProxy);
3168
- var GSRNCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3425
+ _init39 = __decoratorStart(_a39);
3426
+ GIAICreatorProxy = __decorateElement(_init39, 0, "GIAICreatorProxy", _GIAICreatorProxy_decorators, GIAICreatorProxy);
3427
+ __runInitializers(_init39, 1, GIAICreatorProxy);
3428
+ var _GSRNCreatorProxy_decorators, _init40, _a40;
3429
+ _GSRNCreatorProxy_decorators = [proxy.describeClass(false, {
3430
+ namespace: "GS1",
3431
+ methodInfix: "GSRN"
3432
+ })];
3433
+ var GSRNCreatorProxy = class extends (_a40 = NonSerializableNumericIdentifierCreatorProxy) {
3169
3434
  constructor(appExtension) {
3170
3435
  super(appExtension, (prefixManager) => prefixManager.gsrnCreator);
3171
3436
  }
3172
3437
  };
3173
- GSRNCreatorProxy = __decorateClass([
3174
- ProxyClass({
3175
- namespace: "GS1",
3176
- methodInfix: "GSRN"
3177
- })
3178
- ], GSRNCreatorProxy);
3179
- var GDTICreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
3438
+ _init40 = __decoratorStart(_a40);
3439
+ GSRNCreatorProxy = __decorateElement(_init40, 0, "GSRNCreatorProxy", _GSRNCreatorProxy_decorators, GSRNCreatorProxy);
3440
+ __runInitializers(_init40, 1, GSRNCreatorProxy);
3441
+ var _GDTICreatorProxy_decorators, _init41, _a41;
3442
+ _GDTICreatorProxy_decorators = [proxy.describeClass(false, {
3443
+ namespace: "GS1",
3444
+ methodInfix: "GDTI"
3445
+ })];
3446
+ var GDTICreatorProxy = class extends (_a41 = SerializableNumericIdentifierCreatorProxy) {
3180
3447
  constructor(appExtension) {
3181
3448
  super(appExtension, (prefixManager) => prefixManager.gdtiCreator);
3182
3449
  }
3183
3450
  };
3184
- GDTICreatorProxy = __decorateClass([
3185
- ProxyClass({
3186
- namespace: "GS1",
3187
- methodInfix: "GDTI"
3188
- })
3189
- ], GDTICreatorProxy);
3190
- var GINCCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3451
+ _init41 = __decoratorStart(_a41);
3452
+ GDTICreatorProxy = __decorateElement(_init41, 0, "GDTICreatorProxy", _GDTICreatorProxy_decorators, GDTICreatorProxy);
3453
+ __runInitializers(_init41, 1, GDTICreatorProxy);
3454
+ var _GINCCreatorProxy_decorators, _init42, _a42;
3455
+ _GINCCreatorProxy_decorators = [proxy.describeClass(false, {
3456
+ namespace: "GS1",
3457
+ methodInfix: "GINC"
3458
+ })];
3459
+ var GINCCreatorProxy = class extends (_a42 = NonNumericIdentifierCreatorProxy) {
3191
3460
  constructor(appExtension) {
3192
3461
  super(appExtension, (prefixManager) => prefixManager.gincCreator);
3193
3462
  }
3194
3463
  };
3195
- GINCCreatorProxy = __decorateClass([
3196
- ProxyClass({
3197
- namespace: "GS1",
3198
- methodInfix: "GINC"
3199
- })
3200
- ], GINCCreatorProxy);
3201
- var GSINCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3464
+ _init42 = __decoratorStart(_a42);
3465
+ GINCCreatorProxy = __decorateElement(_init42, 0, "GINCCreatorProxy", _GINCCreatorProxy_decorators, GINCCreatorProxy);
3466
+ __runInitializers(_init42, 1, GINCCreatorProxy);
3467
+ var _GSINCreatorProxy_decorators, _init43, _a43;
3468
+ _GSINCreatorProxy_decorators = [proxy.describeClass(false, {
3469
+ namespace: "GS1",
3470
+ methodInfix: "GSIN"
3471
+ })];
3472
+ var GSINCreatorProxy = class extends (_a43 = NonSerializableNumericIdentifierCreatorProxy) {
3202
3473
  constructor(appExtension) {
3203
3474
  super(appExtension, (prefixManager) => prefixManager.gsinCreator);
3204
3475
  }
3205
3476
  };
3206
- GSINCreatorProxy = __decorateClass([
3207
- ProxyClass({
3208
- namespace: "GS1",
3209
- methodInfix: "GSIN"
3210
- })
3211
- ], GSINCreatorProxy);
3212
- var GCNCreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
3477
+ _init43 = __decoratorStart(_a43);
3478
+ GSINCreatorProxy = __decorateElement(_init43, 0, "GSINCreatorProxy", _GSINCreatorProxy_decorators, GSINCreatorProxy);
3479
+ __runInitializers(_init43, 1, GSINCreatorProxy);
3480
+ var _GCNCreatorProxy_decorators, _init44, _a44;
3481
+ _GCNCreatorProxy_decorators = [proxy.describeClass(false, {
3482
+ namespace: "GS1",
3483
+ methodInfix: "GCN"
3484
+ })];
3485
+ var GCNCreatorProxy = class extends (_a44 = SerializableNumericIdentifierCreatorProxy) {
3213
3486
  constructor(appExtension) {
3214
3487
  super(appExtension, (prefixManager) => prefixManager.gcnCreator);
3215
3488
  }
3216
3489
  };
3217
- GCNCreatorProxy = __decorateClass([
3218
- ProxyClass({
3219
- namespace: "GS1",
3220
- methodInfix: "GCN"
3221
- })
3222
- ], GCNCreatorProxy);
3223
- var CPIDCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3490
+ _init44 = __decoratorStart(_a44);
3491
+ GCNCreatorProxy = __decorateElement(_init44, 0, "GCNCreatorProxy", _GCNCreatorProxy_decorators, GCNCreatorProxy);
3492
+ __runInitializers(_init44, 1, GCNCreatorProxy);
3493
+ var _CPIDCreatorProxy_decorators, _init45, _a45;
3494
+ _CPIDCreatorProxy_decorators = [proxy.describeClass(false, {
3495
+ namespace: "GS1",
3496
+ methodInfix: "CPID"
3497
+ })];
3498
+ var CPIDCreatorProxy = class extends (_a45 = NonNumericIdentifierCreatorProxy) {
3224
3499
  constructor(appExtension) {
3225
3500
  super(appExtension, (prefixManager) => prefixManager.cpidCreator);
3226
3501
  }
3227
3502
  };
3228
- CPIDCreatorProxy = __decorateClass([
3229
- ProxyClass({
3230
- namespace: "GS1",
3231
- methodInfix: "CPID"
3232
- })
3233
- ], CPIDCreatorProxy);
3234
- var GMNCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3503
+ _init45 = __decoratorStart(_a45);
3504
+ CPIDCreatorProxy = __decorateElement(_init45, 0, "CPIDCreatorProxy", _CPIDCreatorProxy_decorators, CPIDCreatorProxy);
3505
+ __runInitializers(_init45, 1, CPIDCreatorProxy);
3506
+ var _GMNCreatorProxy_decorators, _init46, _a46;
3507
+ _GMNCreatorProxy_decorators = [proxy.describeClass(false, {
3508
+ namespace: "GS1",
3509
+ methodInfix: "GMN"
3510
+ })];
3511
+ var GMNCreatorProxy = class extends (_a46 = NonNumericIdentifierCreatorProxy) {
3235
3512
  constructor(appExtension) {
3236
3513
  super(appExtension, (prefixManager) => prefixManager.gmnCreator);
3237
3514
  }
3238
3515
  };
3239
- GMNCreatorProxy = __decorateClass([
3240
- ProxyClass({
3241
- namespace: "GS1",
3242
- methodInfix: "GMN"
3243
- })
3244
- ], GMNCreatorProxy);
3516
+ _init46 = __decoratorStart(_a46);
3517
+ GMNCreatorProxy = __decorateElement(_init46, 0, "GMNCreatorProxy", _GMNCreatorProxy_decorators, GMNCreatorProxy);
3518
+ __runInitializers(_init46, 1, GMNCreatorProxy);
3245
3519
 
3246
3520
  // src/generator/generator.ts
3247
- var import_core4 = require("@aidc-toolkit/core");
3521
+ var import_core5 = require("@aidc-toolkit/core");
3248
3522
  function registerProxies(..._proxies) {
3249
3523
  }
3250
3524
  registerProxies(AppUtilityProxy, utility_exports, gs1_exports);
@@ -3269,13 +3543,6 @@ var Generator = class _Generator {
3269
3543
  * Map of function localizations maps by namespace function name.
3270
3544
  */
3271
3545
  #functionLocalizationsMapsMap = /* @__PURE__ */ new Map();
3272
- /**
3273
- * Map of parameter localizations maps by namespace function parameter name.
3274
- */
3275
- #parameterLocalizationsMapsMap = /* @__PURE__ */ new Map();
3276
- /**
3277
- *
3278
- */
3279
3546
  /**
3280
3547
  * Constructor.
3281
3548
  *
@@ -3301,16 +3568,16 @@ var Generator = class _Generator {
3301
3568
  /**
3302
3569
  * Get function localization.
3303
3570
  *
3304
- * @param namespaceFunctionName
3305
- * Namespace function name.
3306
- *
3307
3571
  * @param locale
3308
3572
  * Locale.
3309
3573
  *
3574
+ * @param namespaceFunctionName
3575
+ * Namespace function name.
3576
+ *
3310
3577
  * @returns
3311
3578
  * Function localization.
3312
3579
  */
3313
- getFunctionLocalization(namespaceFunctionName, locale) {
3580
+ getFunctionLocalization(locale, namespaceFunctionName) {
3314
3581
  const functionLocalization = this.#functionLocalizationsMapsMap.get(namespaceFunctionName)?.get(locale);
3315
3582
  if (functionLocalization === void 0) {
3316
3583
  throw new Error(`${locale} localization for function ${namespaceFunctionName} not found`);
@@ -3320,31 +3587,34 @@ var Generator = class _Generator {
3320
3587
  /**
3321
3588
  * Get parameter localization.
3322
3589
  *
3590
+ * @param locale
3591
+ * Locale.
3592
+ *
3323
3593
  * @param namespaceFunctionName
3324
3594
  * Namespace function name.
3325
3595
  *
3326
3596
  * @param parameterName
3327
3597
  * Parameter name.
3328
3598
  *
3329
- * @param locale
3330
- * Locale.
3331
- *
3332
3599
  * @returns
3333
- * Function localization.
3600
+ * Parameter localization.
3334
3601
  */
3335
- getParameterLocalization(namespaceFunctionName, parameterName, locale) {
3336
- const parameterLocalization = this.#parameterLocalizationsMapsMap.get(`${namespaceFunctionName}.${parameterName}`)?.get(locale);
3602
+ getParameterLocalization(locale, namespaceFunctionName, parameterName) {
3603
+ const parameterLocalization = this.getFunctionLocalization(locale, namespaceFunctionName).parametersMap.get(parameterName);
3337
3604
  if (parameterLocalization === void 0) {
3338
3605
  throw new Error(`${locale} localization for function ${namespaceFunctionName} parameter ${parameterName} not found`);
3339
3606
  }
3340
3607
  return parameterLocalization;
3341
3608
  }
3342
3609
  /**
3343
- * Generate localizations map.
3610
+ * Generate a localization.
3344
3611
  *
3345
3612
  * @template TLocalization
3346
3613
  * Localization type.
3347
3614
  *
3615
+ * @param locale
3616
+ * Locale.
3617
+ *
3348
3618
  * @param localizedKeyPrefix
3349
3619
  * Localized key prefix.
3350
3620
  *
@@ -3352,87 +3622,46 @@ var Generator = class _Generator {
3352
3622
  * Callback to finalize localization.
3353
3623
  *
3354
3624
  * @returns
3355
- * Localization map.
3625
+ * Localization.
3356
3626
  */
3357
- #generateLocalizationsMap(localizedKeyPrefix, localizationCallback) {
3358
- return new Map(this.#locales.map((locale) => {
3359
- const lngOption = {
3360
- lng: locale
3361
- };
3362
- return [locale, localizationCallback(locale, {
3363
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3364
- name: i18nextAppExtension.t(`${localizedKeyPrefix}name`, lngOption),
3365
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3366
- description: i18nextAppExtension.t(`${localizedKeyPrefix}description`, lngOption)
3367
- })];
3368
- }));
3627
+ #generateLocalization(locale, localizedKeyPrefix, localizationCallback) {
3628
+ const lngOption = {
3629
+ lng: locale
3630
+ };
3631
+ return localizationCallback(locale, {
3632
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3633
+ name: i18nextAppExtension.t(`${localizedKeyPrefix}name`, lngOption),
3634
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3635
+ description: i18nextAppExtension.t(`${localizedKeyPrefix}description`, lngOption)
3636
+ });
3369
3637
  }
3370
3638
  /**
3371
3639
  * Generate by processing individual imports.
3372
3640
  */
3373
3641
  async generate() {
3374
3642
  let success = false;
3375
- await i18nAppExtensionInit(import_core4.I18nEnvironments.CLI);
3643
+ await i18nAppExtensionInit(import_core5.I18nEnvironments.CLI);
3376
3644
  this.initialize();
3377
3645
  try {
3378
- for (const classDescriptor of getClassDescriptorsMap().values()) {
3646
+ for (const [_namespaceClassName, classDescriptor] of proxy.classDescriptorsMap.entries()) {
3379
3647
  const namespace = classDescriptor.namespace;
3380
- const namespacePrefix = namespace === void 0 ? "" : `${namespace}.`;
3381
- const className = classDescriptor.name;
3382
- const methodInfix = classDescriptor.methodInfix;
3383
- const namespaceClassName = `${namespacePrefix}${className}`;
3384
- const classNameMatch = /^([A-Z]+[0-9]*|[A-Z][^A-Z.]*)([A-Z][^.]*|)\.?([A-Z].*|)$/.exec(namespaceClassName);
3385
- if (classNameMatch === null) {
3386
- throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);
3387
- }
3388
- const proxyObjectDescriptor = {
3389
- namespace,
3390
- className,
3391
- namespaceClassName,
3392
- classDescriptor,
3393
- objectName: `${classNameMatch[1].toLowerCase()}${classNameMatch[2]}${classNameMatch[3]}`
3394
- };
3395
- this.createProxyObject(proxyObjectDescriptor);
3648
+ this.createProxyObject(classDescriptor);
3396
3649
  for (const methodDescriptor of classDescriptor.methodDescriptors) {
3397
- const methodName = methodDescriptor.name;
3398
- const infixBefore = methodDescriptor.infixBefore;
3399
- let functionName;
3400
- if (methodInfix === void 0 || methodDescriptor.ignoreInfix === true) {
3401
- functionName = methodName;
3402
- } else if (infixBefore === void 0) {
3403
- functionName = `${methodName}${methodInfix}`;
3404
- } else {
3405
- const insertIndex = methodName.indexOf(infixBefore);
3406
- if (insertIndex === -1) {
3407
- throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
3408
- }
3409
- functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;
3410
- }
3411
- const namespaceFunctionName = `${namespacePrefix}${functionName}`;
3412
- const functionLocalizationsMap = this.#generateLocalizationsMap(`Functions.${namespaceFunctionName}.`, (locale, localization) => ({
3413
- ...localization,
3414
- documentationURL: `${_Generator.#DOCUMENTATION_BASE_URL}${locale === this.defaultLocale ? "" : `${locale}/`}${_Generator.#DOCUMENTATION_PATH}${namespace === void 0 ? "" : `${namespace}/`}${localization.name}.html`
3415
- }));
3650
+ const namespaceFunctionName = methodDescriptor.namespaceFunctionName;
3651
+ const functionLocalizationsMap = new Map(this.#locales.map(
3652
+ (locale) => [locale, this.#generateLocalization(locale, `Functions.${namespaceFunctionName}.`, (locale2, localization) => ({
3653
+ ...localization,
3654
+ documentationURL: `${_Generator.#DOCUMENTATION_BASE_URL}${locale2 === this.defaultLocale ? "" : `${locale2}/`}${_Generator.#DOCUMENTATION_PATH}${namespace === void 0 ? "" : `${namespace}/`}${localization.name}.html`,
3655
+ parametersMap: new Map(methodDescriptor.parameterDescriptors.map(
3656
+ (parameterDescriptor) => (
3657
+ // eslint-disable-next-line max-nested-callbacks -- Callback is empty.
3658
+ [parameterDescriptor.name, this.#generateLocalization(locale2, `Parameters.${parameterDescriptor.name}.`, (_locale, localization2) => localization2)]
3659
+ )
3660
+ ))
3661
+ }))]
3662
+ ));
3416
3663
  this.#functionLocalizationsMapsMap.set(namespaceFunctionName, functionLocalizationsMap);
3417
- this.createProxyFunction({
3418
- ...proxyObjectDescriptor,
3419
- functionName,
3420
- namespaceFunctionName,
3421
- localizationsMap: functionLocalizationsMap,
3422
- proxyParameterDescriptors: methodDescriptor.parameterDescriptors.map((parameterDescriptor) => {
3423
- const expandedParameterDescriptor = expandParameterDescriptor(parameterDescriptor);
3424
- const parameterName = expandedParameterDescriptor.name;
3425
- const parameterLocalizationsMap = this.#generateLocalizationsMap(`Parameters.${parameterName}.`, (_locale, localization) => localization);
3426
- this.#parameterLocalizationsMapsMap.set(`${namespaceFunctionName}.${parameterName}`, parameterLocalizationsMap);
3427
- return {
3428
- namespace,
3429
- parameterName,
3430
- localizationsMap: parameterLocalizationsMap,
3431
- parameterDescriptor: expandedParameterDescriptor
3432
- };
3433
- }),
3434
- methodDescriptor
3435
- });
3664
+ this.createProxyFunction(classDescriptor, methodDescriptor, functionLocalizationsMap);
3436
3665
  }
3437
3666
  }
3438
3667
  success = true;
@@ -3454,16 +3683,12 @@ var Generator = class _Generator {
3454
3683
  HexadecimalProxy,
3455
3684
  LibProxy,
3456
3685
  NumericProxy,
3457
- ProxyClass,
3458
- ProxyMethod,
3459
- ProxyParameter,
3460
3686
  RegExpProxy,
3461
3687
  TransformerProxy,
3462
3688
  Types,
3463
3689
  appExtensionNS,
3464
3690
  appExtensionResources,
3465
3691
  expandParameterDescriptor,
3466
- getClassDescriptorsMap,
3467
3692
  i18nAppExtensionInit,
3468
3693
  i18nextAppExtension
3469
3694
  });