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