xml-model 1.2.0 → 1.3.1

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 (131) hide show
  1. package/README.md +0 -1
  2. package/dist/_virtual/Reflect.js +8 -0
  3. package/dist/_virtual/Reflect2.js +5 -0
  4. package/{vite/dist → dist}/_virtual/_commonjsHelpers.js +10 -4
  5. package/dist/defaults.d.ts +1 -0
  6. package/dist/errors.d.ts +1 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/middleware.d.ts +1 -0
  9. package/dist/model/built-ins.d.ts +1 -0
  10. package/dist/model/index.d.ts +1 -0
  11. package/dist/model/index.js +1 -0
  12. package/dist/model/property.d.ts +1 -0
  13. package/dist/model/registry.d.ts +1 -0
  14. package/dist/model/types.d.ts +1 -0
  15. package/dist/node_modules/reflect-metadata/Reflect.js +867 -0
  16. package/dist/types.d.ts +1 -0
  17. package/dist/util/is-regexp.d.ts +1 -0
  18. package/dist/util/kebab-case.d.ts +1 -0
  19. package/dist/util/merge-maps.d.ts +1 -0
  20. package/dist/xml/index.d.ts +1 -0
  21. package/dist/xml/xml-js.d.ts +1 -0
  22. package/package.json +4 -4
  23. package/vite/dist/index.js +2 -3
  24. package/vite/dist/node_modules/typescript-rtti/dist.esm/common/format.js +105 -0
  25. package/vite/dist/node_modules/typescript-rtti/dist.esm/common/index.js +55 -0
  26. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/api-call-transformer.js +152 -0
  27. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/class-analyzer.js +83 -0
  28. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/compile-error.js +8 -0
  29. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/import-analyzer.js +89 -0
  30. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/interface-analyzer.js +58 -0
  31. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/visitor-base.js +93 -0
  32. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/declarations-emitter.js +31 -0
  33. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/encode-parameter.js +64 -0
  34. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/find-relative-path.js +41 -0
  35. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/flags.js +43 -0
  36. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/forward-ref.js +20 -0
  37. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/get-exports-for-symbol.js +64 -0
  38. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/index.js +130 -0
  39. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/legacy-decorator.js +10 -0
  40. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/legacy-type-encoder.js +82 -0
  41. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/literal-node.js +9 -0
  42. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-collector.js +56 -0
  43. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-decorator.js +80 -0
  44. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-emitter.js +425 -0
  45. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-encoder.js +212 -0
  46. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/rt-helper.js +96 -0
  47. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/rtti-visitor-base.js +28 -0
  48. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/serialize.js +31 -0
  49. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/type-encoder.js +76 -0
  50. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/type-literal.js +499 -0
  51. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/utils.js +906 -0
  52. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/workarounds.js +7 -0
  53. package/vite/dist/src/class-names.test.d.ts +9 -0
  54. package/vite/dist/src/defaults.d.ts +15 -0
  55. package/vite/dist/src/errors.d.ts +24 -0
  56. package/vite/dist/src/index.d.ts +8 -0
  57. package/vite/dist/src/middleware.d.ts +10 -0
  58. package/vite/dist/src/model/built-ins.d.ts +3 -0
  59. package/vite/dist/src/model/index.d.ts +21 -0
  60. package/vite/dist/src/model/property.d.ts +6 -0
  61. package/vite/dist/src/model/registry.d.ts +9 -0
  62. package/vite/dist/src/model/types.d.ts +74 -0
  63. package/vite/dist/src/model.test.d.ts +2 -0
  64. package/vite/dist/src/types.d.ts +17 -0
  65. package/vite/dist/src/util/is-regexp.d.ts +12 -0
  66. package/vite/dist/src/util/kebab-case.d.ts +16 -0
  67. package/vite/dist/src/util/merge-maps.d.ts +2 -0
  68. package/vite/dist/src/xml/index.d.ts +33 -0
  69. package/vite/dist/src/xml/xml-js.d.ts +7 -0
  70. package/vite/dist/_virtual/_commonjs-dynamic-modules.js +0 -7
  71. package/vite/dist/_virtual/_typescript.js +0 -5
  72. package/vite/dist/_virtual/api-call-transformer.js +0 -5
  73. package/vite/dist/_virtual/class-analyzer.js +0 -5
  74. package/vite/dist/_virtual/compile-error.js +0 -5
  75. package/vite/dist/_virtual/declarations-emitter.js +0 -5
  76. package/vite/dist/_virtual/encode-parameter.js +0 -5
  77. package/vite/dist/_virtual/find-relative-path.js +0 -5
  78. package/vite/dist/_virtual/flags.js +0 -5
  79. package/vite/dist/_virtual/format.js +0 -5
  80. package/vite/dist/_virtual/forward-ref.js +0 -5
  81. package/vite/dist/_virtual/get-exports-for-symbol.js +0 -5
  82. package/vite/dist/_virtual/import-analyzer.js +0 -5
  83. package/vite/dist/_virtual/index.js +0 -8
  84. package/vite/dist/_virtual/index2.js +0 -5
  85. package/vite/dist/_virtual/index3.js +0 -5
  86. package/vite/dist/_virtual/interface-analyzer.js +0 -5
  87. package/vite/dist/_virtual/legacy-decorator.js +0 -5
  88. package/vite/dist/_virtual/legacy-type-encoder.js +0 -5
  89. package/vite/dist/_virtual/literal-node.js +0 -5
  90. package/vite/dist/_virtual/metadata-collector.js +0 -5
  91. package/vite/dist/_virtual/metadata-decorator.js +0 -5
  92. package/vite/dist/_virtual/metadata-emitter.js +0 -5
  93. package/vite/dist/_virtual/metadata-encoder.js +0 -5
  94. package/vite/dist/_virtual/rt-helper.js +0 -5
  95. package/vite/dist/_virtual/rtti-visitor-base.js +0 -5
  96. package/vite/dist/_virtual/serialize.js +0 -5
  97. package/vite/dist/_virtual/type-encoder.js +0 -5
  98. package/vite/dist/_virtual/type-literal.js +0 -5
  99. package/vite/dist/_virtual/utils.js +0 -5
  100. package/vite/dist/_virtual/visitor-base.js +0 -5
  101. package/vite/dist/_virtual/workarounds.js +0 -5
  102. package/vite/dist/index.d.ts +0 -28
  103. package/vite/dist/node_modules/typescript-rtti/dist/common/format.js +0 -69
  104. package/vite/dist/node_modules/typescript-rtti/dist/common/index.js +0 -34
  105. package/vite/dist/node_modules/typescript-rtti/dist/transformer/api-call-transformer.js +0 -197
  106. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/class-analyzer.js +0 -124
  107. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/compile-error.js +0 -18
  108. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/import-analyzer.js +0 -130
  109. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/interface-analyzer.js +0 -98
  110. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/visitor-base.js +0 -132
  111. package/vite/dist/node_modules/typescript-rtti/dist/transformer/declarations-emitter.js +0 -72
  112. package/vite/dist/node_modules/typescript-rtti/dist/transformer/encode-parameter.js +0 -110
  113. package/vite/dist/node_modules/typescript-rtti/dist/transformer/find-relative-path.js +0 -51
  114. package/vite/dist/node_modules/typescript-rtti/dist/transformer/flags.js +0 -59
  115. package/vite/dist/node_modules/typescript-rtti/dist/transformer/forward-ref.js +0 -35
  116. package/vite/dist/node_modules/typescript-rtti/dist/transformer/get-exports-for-symbol.js +0 -75
  117. package/vite/dist/node_modules/typescript-rtti/dist/transformer/index.js +0 -174
  118. package/vite/dist/node_modules/typescript-rtti/dist/transformer/legacy-decorator.js +0 -20
  119. package/vite/dist/node_modules/typescript-rtti/dist/transformer/legacy-type-encoder.js +0 -123
  120. package/vite/dist/node_modules/typescript-rtti/dist/transformer/literal-node.js +0 -19
  121. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-collector.js +0 -96
  122. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-decorator.js +0 -99
  123. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-emitter.js +0 -475
  124. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-encoder.js +0 -261
  125. package/vite/dist/node_modules/typescript-rtti/dist/transformer/rt-helper.js +0 -113
  126. package/vite/dist/node_modules/typescript-rtti/dist/transformer/rtti-visitor-base.js +0 -39
  127. package/vite/dist/node_modules/typescript-rtti/dist/transformer/serialize.js +0 -46
  128. package/vite/dist/node_modules/typescript-rtti/dist/transformer/type-encoder.js +0 -96
  129. package/vite/dist/node_modules/typescript-rtti/dist/transformer/type-literal.js +0 -546
  130. package/vite/dist/node_modules/typescript-rtti/dist/transformer/utils.js +0 -922
  131. package/vite/dist/node_modules/typescript-rtti/dist/transformer/workarounds.js +0 -16
@@ -0,0 +1,867 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { commonjsGlobal } from "../../_virtual/_commonjsHelpers.js";
4
+ import { __exports as _Reflect } from "../../_virtual/Reflect2.js";
5
+ var hasRequired_Reflect;
6
+ function require_Reflect() {
7
+ if (hasRequired_Reflect) return _Reflect;
8
+ hasRequired_Reflect = 1;
9
+ var Reflect2;
10
+ (function(Reflect3) {
11
+ (function(factory) {
12
+ var root = typeof commonjsGlobal === "object" ? commonjsGlobal : typeof self === "object" ? self : typeof this === "object" ? this : Function("return this;")();
13
+ var exporter = makeExporter(Reflect3);
14
+ if (typeof root.Reflect === "undefined") {
15
+ root.Reflect = Reflect3;
16
+ } else {
17
+ exporter = makeExporter(root.Reflect, exporter);
18
+ }
19
+ factory(exporter);
20
+ function makeExporter(target, previous) {
21
+ return function(key, value) {
22
+ if (typeof target[key] !== "function") {
23
+ Object.defineProperty(target, key, { configurable: true, writable: true, value });
24
+ }
25
+ if (previous)
26
+ previous(key, value);
27
+ };
28
+ }
29
+ __name(makeExporter, "makeExporter");
30
+ })(function(exporter) {
31
+ var hasOwn = Object.prototype.hasOwnProperty;
32
+ var supportsSymbol = typeof Symbol === "function";
33
+ var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
34
+ var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
35
+ var supportsCreate = typeof Object.create === "function";
36
+ var supportsProto = { __proto__: [] } instanceof Array;
37
+ var downLevel = !supportsCreate && !supportsProto;
38
+ var HashMap = {
39
+ // create an object in dictionary mode (a.k.a. "slow" mode in v8)
40
+ create: supportsCreate ? function() {
41
+ return MakeDictionary(/* @__PURE__ */ Object.create(null));
42
+ } : supportsProto ? function() {
43
+ return MakeDictionary({ __proto__: null });
44
+ } : function() {
45
+ return MakeDictionary({});
46
+ },
47
+ has: downLevel ? function(map, key) {
48
+ return hasOwn.call(map, key);
49
+ } : function(map, key) {
50
+ return key in map;
51
+ },
52
+ get: downLevel ? function(map, key) {
53
+ return hasOwn.call(map, key) ? map[key] : void 0;
54
+ } : function(map, key) {
55
+ return map[key];
56
+ }
57
+ };
58
+ var functionPrototype = Object.getPrototypeOf(Function);
59
+ var usePolyfill = typeof process === "object" && process["env"] && process["env"]["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true";
60
+ var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
61
+ var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
62
+ var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
63
+ var Metadata = new _WeakMap();
64
+ function decorate(decorators, target, propertyKey, attributes) {
65
+ if (!IsUndefined(propertyKey)) {
66
+ if (!IsArray(decorators))
67
+ throw new TypeError();
68
+ if (!IsObject(target))
69
+ throw new TypeError();
70
+ if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
71
+ throw new TypeError();
72
+ if (IsNull(attributes))
73
+ attributes = void 0;
74
+ propertyKey = ToPropertyKey(propertyKey);
75
+ return DecorateProperty(decorators, target, propertyKey, attributes);
76
+ } else {
77
+ if (!IsArray(decorators))
78
+ throw new TypeError();
79
+ if (!IsConstructor(target))
80
+ throw new TypeError();
81
+ return DecorateConstructor(decorators, target);
82
+ }
83
+ }
84
+ __name(decorate, "decorate");
85
+ exporter("decorate", decorate);
86
+ function metadata(metadataKey, metadataValue) {
87
+ function decorator(target, propertyKey) {
88
+ if (!IsObject(target))
89
+ throw new TypeError();
90
+ if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
91
+ throw new TypeError();
92
+ OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
93
+ }
94
+ __name(decorator, "decorator");
95
+ return decorator;
96
+ }
97
+ __name(metadata, "metadata");
98
+ exporter("metadata", metadata);
99
+ function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
100
+ if (!IsObject(target))
101
+ throw new TypeError();
102
+ if (!IsUndefined(propertyKey))
103
+ propertyKey = ToPropertyKey(propertyKey);
104
+ return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
105
+ }
106
+ __name(defineMetadata, "defineMetadata");
107
+ exporter("defineMetadata", defineMetadata);
108
+ function hasMetadata(metadataKey, target, propertyKey) {
109
+ if (!IsObject(target))
110
+ throw new TypeError();
111
+ if (!IsUndefined(propertyKey))
112
+ propertyKey = ToPropertyKey(propertyKey);
113
+ return OrdinaryHasMetadata(metadataKey, target, propertyKey);
114
+ }
115
+ __name(hasMetadata, "hasMetadata");
116
+ exporter("hasMetadata", hasMetadata);
117
+ function hasOwnMetadata(metadataKey, target, propertyKey) {
118
+ if (!IsObject(target))
119
+ throw new TypeError();
120
+ if (!IsUndefined(propertyKey))
121
+ propertyKey = ToPropertyKey(propertyKey);
122
+ return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
123
+ }
124
+ __name(hasOwnMetadata, "hasOwnMetadata");
125
+ exporter("hasOwnMetadata", hasOwnMetadata);
126
+ function getMetadata(metadataKey, target, propertyKey) {
127
+ if (!IsObject(target))
128
+ throw new TypeError();
129
+ if (!IsUndefined(propertyKey))
130
+ propertyKey = ToPropertyKey(propertyKey);
131
+ return OrdinaryGetMetadata(metadataKey, target, propertyKey);
132
+ }
133
+ __name(getMetadata, "getMetadata");
134
+ exporter("getMetadata", getMetadata);
135
+ function getOwnMetadata(metadataKey, target, propertyKey) {
136
+ if (!IsObject(target))
137
+ throw new TypeError();
138
+ if (!IsUndefined(propertyKey))
139
+ propertyKey = ToPropertyKey(propertyKey);
140
+ return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
141
+ }
142
+ __name(getOwnMetadata, "getOwnMetadata");
143
+ exporter("getOwnMetadata", getOwnMetadata);
144
+ function getMetadataKeys(target, propertyKey) {
145
+ if (!IsObject(target))
146
+ throw new TypeError();
147
+ if (!IsUndefined(propertyKey))
148
+ propertyKey = ToPropertyKey(propertyKey);
149
+ return OrdinaryMetadataKeys(target, propertyKey);
150
+ }
151
+ __name(getMetadataKeys, "getMetadataKeys");
152
+ exporter("getMetadataKeys", getMetadataKeys);
153
+ function getOwnMetadataKeys(target, propertyKey) {
154
+ if (!IsObject(target))
155
+ throw new TypeError();
156
+ if (!IsUndefined(propertyKey))
157
+ propertyKey = ToPropertyKey(propertyKey);
158
+ return OrdinaryOwnMetadataKeys(target, propertyKey);
159
+ }
160
+ __name(getOwnMetadataKeys, "getOwnMetadataKeys");
161
+ exporter("getOwnMetadataKeys", getOwnMetadataKeys);
162
+ function deleteMetadata(metadataKey, target, propertyKey) {
163
+ if (!IsObject(target))
164
+ throw new TypeError();
165
+ if (!IsUndefined(propertyKey))
166
+ propertyKey = ToPropertyKey(propertyKey);
167
+ var metadataMap = GetOrCreateMetadataMap(
168
+ target,
169
+ propertyKey,
170
+ /*Create*/
171
+ false
172
+ );
173
+ if (IsUndefined(metadataMap))
174
+ return false;
175
+ if (!metadataMap.delete(metadataKey))
176
+ return false;
177
+ if (metadataMap.size > 0)
178
+ return true;
179
+ var targetMetadata = Metadata.get(target);
180
+ targetMetadata.delete(propertyKey);
181
+ if (targetMetadata.size > 0)
182
+ return true;
183
+ Metadata.delete(target);
184
+ return true;
185
+ }
186
+ __name(deleteMetadata, "deleteMetadata");
187
+ exporter("deleteMetadata", deleteMetadata);
188
+ function DecorateConstructor(decorators, target) {
189
+ for (var i = decorators.length - 1; i >= 0; --i) {
190
+ var decorator = decorators[i];
191
+ var decorated = decorator(target);
192
+ if (!IsUndefined(decorated) && !IsNull(decorated)) {
193
+ if (!IsConstructor(decorated))
194
+ throw new TypeError();
195
+ target = decorated;
196
+ }
197
+ }
198
+ return target;
199
+ }
200
+ __name(DecorateConstructor, "DecorateConstructor");
201
+ function DecorateProperty(decorators, target, propertyKey, descriptor) {
202
+ for (var i = decorators.length - 1; i >= 0; --i) {
203
+ var decorator = decorators[i];
204
+ var decorated = decorator(target, propertyKey, descriptor);
205
+ if (!IsUndefined(decorated) && !IsNull(decorated)) {
206
+ if (!IsObject(decorated))
207
+ throw new TypeError();
208
+ descriptor = decorated;
209
+ }
210
+ }
211
+ return descriptor;
212
+ }
213
+ __name(DecorateProperty, "DecorateProperty");
214
+ function GetOrCreateMetadataMap(O, P, Create) {
215
+ var targetMetadata = Metadata.get(O);
216
+ if (IsUndefined(targetMetadata)) {
217
+ if (!Create)
218
+ return void 0;
219
+ targetMetadata = new _Map();
220
+ Metadata.set(O, targetMetadata);
221
+ }
222
+ var metadataMap = targetMetadata.get(P);
223
+ if (IsUndefined(metadataMap)) {
224
+ if (!Create)
225
+ return void 0;
226
+ metadataMap = new _Map();
227
+ targetMetadata.set(P, metadataMap);
228
+ }
229
+ return metadataMap;
230
+ }
231
+ __name(GetOrCreateMetadataMap, "GetOrCreateMetadataMap");
232
+ function OrdinaryHasMetadata(MetadataKey, O, P) {
233
+ var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
234
+ if (hasOwn2)
235
+ return true;
236
+ var parent = OrdinaryGetPrototypeOf(O);
237
+ if (!IsNull(parent))
238
+ return OrdinaryHasMetadata(MetadataKey, parent, P);
239
+ return false;
240
+ }
241
+ __name(OrdinaryHasMetadata, "OrdinaryHasMetadata");
242
+ function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
243
+ var metadataMap = GetOrCreateMetadataMap(
244
+ O,
245
+ P,
246
+ /*Create*/
247
+ false
248
+ );
249
+ if (IsUndefined(metadataMap))
250
+ return false;
251
+ return ToBoolean(metadataMap.has(MetadataKey));
252
+ }
253
+ __name(OrdinaryHasOwnMetadata, "OrdinaryHasOwnMetadata");
254
+ function OrdinaryGetMetadata(MetadataKey, O, P) {
255
+ var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
256
+ if (hasOwn2)
257
+ return OrdinaryGetOwnMetadata(MetadataKey, O, P);
258
+ var parent = OrdinaryGetPrototypeOf(O);
259
+ if (!IsNull(parent))
260
+ return OrdinaryGetMetadata(MetadataKey, parent, P);
261
+ return void 0;
262
+ }
263
+ __name(OrdinaryGetMetadata, "OrdinaryGetMetadata");
264
+ function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
265
+ var metadataMap = GetOrCreateMetadataMap(
266
+ O,
267
+ P,
268
+ /*Create*/
269
+ false
270
+ );
271
+ if (IsUndefined(metadataMap))
272
+ return void 0;
273
+ return metadataMap.get(MetadataKey);
274
+ }
275
+ __name(OrdinaryGetOwnMetadata, "OrdinaryGetOwnMetadata");
276
+ function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
277
+ var metadataMap = GetOrCreateMetadataMap(
278
+ O,
279
+ P,
280
+ /*Create*/
281
+ true
282
+ );
283
+ metadataMap.set(MetadataKey, MetadataValue);
284
+ }
285
+ __name(OrdinaryDefineOwnMetadata, "OrdinaryDefineOwnMetadata");
286
+ function OrdinaryMetadataKeys(O, P) {
287
+ var ownKeys = OrdinaryOwnMetadataKeys(O, P);
288
+ var parent = OrdinaryGetPrototypeOf(O);
289
+ if (parent === null)
290
+ return ownKeys;
291
+ var parentKeys = OrdinaryMetadataKeys(parent, P);
292
+ if (parentKeys.length <= 0)
293
+ return ownKeys;
294
+ if (ownKeys.length <= 0)
295
+ return parentKeys;
296
+ var set = new _Set();
297
+ var keys = [];
298
+ for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
299
+ var key = ownKeys_1[_i];
300
+ var hasKey = set.has(key);
301
+ if (!hasKey) {
302
+ set.add(key);
303
+ keys.push(key);
304
+ }
305
+ }
306
+ for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {
307
+ var key = parentKeys_1[_a];
308
+ var hasKey = set.has(key);
309
+ if (!hasKey) {
310
+ set.add(key);
311
+ keys.push(key);
312
+ }
313
+ }
314
+ return keys;
315
+ }
316
+ __name(OrdinaryMetadataKeys, "OrdinaryMetadataKeys");
317
+ function OrdinaryOwnMetadataKeys(O, P) {
318
+ var keys = [];
319
+ var metadataMap = GetOrCreateMetadataMap(
320
+ O,
321
+ P,
322
+ /*Create*/
323
+ false
324
+ );
325
+ if (IsUndefined(metadataMap))
326
+ return keys;
327
+ var keysObj = metadataMap.keys();
328
+ var iterator = GetIterator(keysObj);
329
+ var k = 0;
330
+ while (true) {
331
+ var next = IteratorStep(iterator);
332
+ if (!next) {
333
+ keys.length = k;
334
+ return keys;
335
+ }
336
+ var nextValue = IteratorValue(next);
337
+ try {
338
+ keys[k] = nextValue;
339
+ } catch (e) {
340
+ try {
341
+ IteratorClose(iterator);
342
+ } finally {
343
+ throw e;
344
+ }
345
+ }
346
+ k++;
347
+ }
348
+ }
349
+ __name(OrdinaryOwnMetadataKeys, "OrdinaryOwnMetadataKeys");
350
+ function Type(x) {
351
+ if (x === null)
352
+ return 1;
353
+ switch (typeof x) {
354
+ case "undefined":
355
+ return 0;
356
+ case "boolean":
357
+ return 2;
358
+ case "string":
359
+ return 3;
360
+ case "symbol":
361
+ return 4;
362
+ case "number":
363
+ return 5;
364
+ case "object":
365
+ return x === null ? 1 : 6;
366
+ default:
367
+ return 6;
368
+ }
369
+ }
370
+ __name(Type, "Type");
371
+ function IsUndefined(x) {
372
+ return x === void 0;
373
+ }
374
+ __name(IsUndefined, "IsUndefined");
375
+ function IsNull(x) {
376
+ return x === null;
377
+ }
378
+ __name(IsNull, "IsNull");
379
+ function IsSymbol(x) {
380
+ return typeof x === "symbol";
381
+ }
382
+ __name(IsSymbol, "IsSymbol");
383
+ function IsObject(x) {
384
+ return typeof x === "object" ? x !== null : typeof x === "function";
385
+ }
386
+ __name(IsObject, "IsObject");
387
+ function ToPrimitive(input, PreferredType) {
388
+ switch (Type(input)) {
389
+ case 0:
390
+ return input;
391
+ case 1:
392
+ return input;
393
+ case 2:
394
+ return input;
395
+ case 3:
396
+ return input;
397
+ case 4:
398
+ return input;
399
+ case 5:
400
+ return input;
401
+ }
402
+ var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default";
403
+ var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
404
+ if (exoticToPrim !== void 0) {
405
+ var result = exoticToPrim.call(input, hint);
406
+ if (IsObject(result))
407
+ throw new TypeError();
408
+ return result;
409
+ }
410
+ return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
411
+ }
412
+ __name(ToPrimitive, "ToPrimitive");
413
+ function OrdinaryToPrimitive(O, hint) {
414
+ if (hint === "string") {
415
+ var toString_1 = O.toString;
416
+ if (IsCallable(toString_1)) {
417
+ var result = toString_1.call(O);
418
+ if (!IsObject(result))
419
+ return result;
420
+ }
421
+ var valueOf = O.valueOf;
422
+ if (IsCallable(valueOf)) {
423
+ var result = valueOf.call(O);
424
+ if (!IsObject(result))
425
+ return result;
426
+ }
427
+ } else {
428
+ var valueOf = O.valueOf;
429
+ if (IsCallable(valueOf)) {
430
+ var result = valueOf.call(O);
431
+ if (!IsObject(result))
432
+ return result;
433
+ }
434
+ var toString_2 = O.toString;
435
+ if (IsCallable(toString_2)) {
436
+ var result = toString_2.call(O);
437
+ if (!IsObject(result))
438
+ return result;
439
+ }
440
+ }
441
+ throw new TypeError();
442
+ }
443
+ __name(OrdinaryToPrimitive, "OrdinaryToPrimitive");
444
+ function ToBoolean(argument) {
445
+ return !!argument;
446
+ }
447
+ __name(ToBoolean, "ToBoolean");
448
+ function ToString(argument) {
449
+ return "" + argument;
450
+ }
451
+ __name(ToString, "ToString");
452
+ function ToPropertyKey(argument) {
453
+ var key = ToPrimitive(
454
+ argument,
455
+ 3
456
+ /* String */
457
+ );
458
+ if (IsSymbol(key))
459
+ return key;
460
+ return ToString(key);
461
+ }
462
+ __name(ToPropertyKey, "ToPropertyKey");
463
+ function IsArray(argument) {
464
+ return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
465
+ }
466
+ __name(IsArray, "IsArray");
467
+ function IsCallable(argument) {
468
+ return typeof argument === "function";
469
+ }
470
+ __name(IsCallable, "IsCallable");
471
+ function IsConstructor(argument) {
472
+ return typeof argument === "function";
473
+ }
474
+ __name(IsConstructor, "IsConstructor");
475
+ function IsPropertyKey(argument) {
476
+ switch (Type(argument)) {
477
+ case 3:
478
+ return true;
479
+ case 4:
480
+ return true;
481
+ default:
482
+ return false;
483
+ }
484
+ }
485
+ __name(IsPropertyKey, "IsPropertyKey");
486
+ function GetMethod(V, P) {
487
+ var func = V[P];
488
+ if (func === void 0 || func === null)
489
+ return void 0;
490
+ if (!IsCallable(func))
491
+ throw new TypeError();
492
+ return func;
493
+ }
494
+ __name(GetMethod, "GetMethod");
495
+ function GetIterator(obj) {
496
+ var method = GetMethod(obj, iteratorSymbol);
497
+ if (!IsCallable(method))
498
+ throw new TypeError();
499
+ var iterator = method.call(obj);
500
+ if (!IsObject(iterator))
501
+ throw new TypeError();
502
+ return iterator;
503
+ }
504
+ __name(GetIterator, "GetIterator");
505
+ function IteratorValue(iterResult) {
506
+ return iterResult.value;
507
+ }
508
+ __name(IteratorValue, "IteratorValue");
509
+ function IteratorStep(iterator) {
510
+ var result = iterator.next();
511
+ return result.done ? false : result;
512
+ }
513
+ __name(IteratorStep, "IteratorStep");
514
+ function IteratorClose(iterator) {
515
+ var f = iterator["return"];
516
+ if (f)
517
+ f.call(iterator);
518
+ }
519
+ __name(IteratorClose, "IteratorClose");
520
+ function OrdinaryGetPrototypeOf(O) {
521
+ var proto = Object.getPrototypeOf(O);
522
+ if (typeof O !== "function" || O === functionPrototype)
523
+ return proto;
524
+ if (proto !== functionPrototype)
525
+ return proto;
526
+ var prototype = O.prototype;
527
+ var prototypeProto = prototype && Object.getPrototypeOf(prototype);
528
+ if (prototypeProto == null || prototypeProto === Object.prototype)
529
+ return proto;
530
+ var constructor = prototypeProto.constructor;
531
+ if (typeof constructor !== "function")
532
+ return proto;
533
+ if (constructor === O)
534
+ return proto;
535
+ return constructor;
536
+ }
537
+ __name(OrdinaryGetPrototypeOf, "OrdinaryGetPrototypeOf");
538
+ function CreateMapPolyfill() {
539
+ var cacheSentinel = {};
540
+ var arraySentinel = [];
541
+ var MapIterator = (
542
+ /** @class */
543
+ (function() {
544
+ function MapIterator2(keys, values, selector) {
545
+ this._index = 0;
546
+ this._keys = keys;
547
+ this._values = values;
548
+ this._selector = selector;
549
+ }
550
+ __name(MapIterator2, "MapIterator");
551
+ MapIterator2.prototype["@@iterator"] = function() {
552
+ return this;
553
+ };
554
+ MapIterator2.prototype[iteratorSymbol] = function() {
555
+ return this;
556
+ };
557
+ MapIterator2.prototype.next = function() {
558
+ var index = this._index;
559
+ if (index >= 0 && index < this._keys.length) {
560
+ var result = this._selector(this._keys[index], this._values[index]);
561
+ if (index + 1 >= this._keys.length) {
562
+ this._index = -1;
563
+ this._keys = arraySentinel;
564
+ this._values = arraySentinel;
565
+ } else {
566
+ this._index++;
567
+ }
568
+ return { value: result, done: false };
569
+ }
570
+ return { value: void 0, done: true };
571
+ };
572
+ MapIterator2.prototype.throw = function(error) {
573
+ if (this._index >= 0) {
574
+ this._index = -1;
575
+ this._keys = arraySentinel;
576
+ this._values = arraySentinel;
577
+ }
578
+ throw error;
579
+ };
580
+ MapIterator2.prototype.return = function(value) {
581
+ if (this._index >= 0) {
582
+ this._index = -1;
583
+ this._keys = arraySentinel;
584
+ this._values = arraySentinel;
585
+ }
586
+ return { value, done: true };
587
+ };
588
+ return MapIterator2;
589
+ })()
590
+ );
591
+ return (
592
+ /** @class */
593
+ (function() {
594
+ function Map2() {
595
+ this._keys = [];
596
+ this._values = [];
597
+ this._cacheKey = cacheSentinel;
598
+ this._cacheIndex = -2;
599
+ }
600
+ __name(Map2, "Map");
601
+ Object.defineProperty(Map2.prototype, "size", {
602
+ get: /* @__PURE__ */ __name(function() {
603
+ return this._keys.length;
604
+ }, "get"),
605
+ enumerable: true,
606
+ configurable: true
607
+ });
608
+ Map2.prototype.has = function(key) {
609
+ return this._find(
610
+ key,
611
+ /*insert*/
612
+ false
613
+ ) >= 0;
614
+ };
615
+ Map2.prototype.get = function(key) {
616
+ var index = this._find(
617
+ key,
618
+ /*insert*/
619
+ false
620
+ );
621
+ return index >= 0 ? this._values[index] : void 0;
622
+ };
623
+ Map2.prototype.set = function(key, value) {
624
+ var index = this._find(
625
+ key,
626
+ /*insert*/
627
+ true
628
+ );
629
+ this._values[index] = value;
630
+ return this;
631
+ };
632
+ Map2.prototype.delete = function(key) {
633
+ var index = this._find(
634
+ key,
635
+ /*insert*/
636
+ false
637
+ );
638
+ if (index >= 0) {
639
+ var size = this._keys.length;
640
+ for (var i = index + 1; i < size; i++) {
641
+ this._keys[i - 1] = this._keys[i];
642
+ this._values[i - 1] = this._values[i];
643
+ }
644
+ this._keys.length--;
645
+ this._values.length--;
646
+ if (key === this._cacheKey) {
647
+ this._cacheKey = cacheSentinel;
648
+ this._cacheIndex = -2;
649
+ }
650
+ return true;
651
+ }
652
+ return false;
653
+ };
654
+ Map2.prototype.clear = function() {
655
+ this._keys.length = 0;
656
+ this._values.length = 0;
657
+ this._cacheKey = cacheSentinel;
658
+ this._cacheIndex = -2;
659
+ };
660
+ Map2.prototype.keys = function() {
661
+ return new MapIterator(this._keys, this._values, getKey);
662
+ };
663
+ Map2.prototype.values = function() {
664
+ return new MapIterator(this._keys, this._values, getValue);
665
+ };
666
+ Map2.prototype.entries = function() {
667
+ return new MapIterator(this._keys, this._values, getEntry);
668
+ };
669
+ Map2.prototype["@@iterator"] = function() {
670
+ return this.entries();
671
+ };
672
+ Map2.prototype[iteratorSymbol] = function() {
673
+ return this.entries();
674
+ };
675
+ Map2.prototype._find = function(key, insert) {
676
+ if (this._cacheKey !== key) {
677
+ this._cacheIndex = this._keys.indexOf(this._cacheKey = key);
678
+ }
679
+ if (this._cacheIndex < 0 && insert) {
680
+ this._cacheIndex = this._keys.length;
681
+ this._keys.push(key);
682
+ this._values.push(void 0);
683
+ }
684
+ return this._cacheIndex;
685
+ };
686
+ return Map2;
687
+ })()
688
+ );
689
+ function getKey(key, _) {
690
+ return key;
691
+ }
692
+ __name(getKey, "getKey");
693
+ function getValue(_, value) {
694
+ return value;
695
+ }
696
+ __name(getValue, "getValue");
697
+ function getEntry(key, value) {
698
+ return [key, value];
699
+ }
700
+ __name(getEntry, "getEntry");
701
+ }
702
+ __name(CreateMapPolyfill, "CreateMapPolyfill");
703
+ function CreateSetPolyfill() {
704
+ return (
705
+ /** @class */
706
+ (function() {
707
+ function Set2() {
708
+ this._map = new _Map();
709
+ }
710
+ __name(Set2, "Set");
711
+ Object.defineProperty(Set2.prototype, "size", {
712
+ get: /* @__PURE__ */ __name(function() {
713
+ return this._map.size;
714
+ }, "get"),
715
+ enumerable: true,
716
+ configurable: true
717
+ });
718
+ Set2.prototype.has = function(value) {
719
+ return this._map.has(value);
720
+ };
721
+ Set2.prototype.add = function(value) {
722
+ return this._map.set(value, value), this;
723
+ };
724
+ Set2.prototype.delete = function(value) {
725
+ return this._map.delete(value);
726
+ };
727
+ Set2.prototype.clear = function() {
728
+ this._map.clear();
729
+ };
730
+ Set2.prototype.keys = function() {
731
+ return this._map.keys();
732
+ };
733
+ Set2.prototype.values = function() {
734
+ return this._map.values();
735
+ };
736
+ Set2.prototype.entries = function() {
737
+ return this._map.entries();
738
+ };
739
+ Set2.prototype["@@iterator"] = function() {
740
+ return this.keys();
741
+ };
742
+ Set2.prototype[iteratorSymbol] = function() {
743
+ return this.keys();
744
+ };
745
+ return Set2;
746
+ })()
747
+ );
748
+ }
749
+ __name(CreateSetPolyfill, "CreateSetPolyfill");
750
+ function CreateWeakMapPolyfill() {
751
+ var UUID_SIZE = 16;
752
+ var keys = HashMap.create();
753
+ var rootKey = CreateUniqueKey();
754
+ return (
755
+ /** @class */
756
+ (function() {
757
+ function WeakMap2() {
758
+ this._key = CreateUniqueKey();
759
+ }
760
+ __name(WeakMap2, "WeakMap");
761
+ WeakMap2.prototype.has = function(target) {
762
+ var table = GetOrCreateWeakMapTable(
763
+ target,
764
+ /*create*/
765
+ false
766
+ );
767
+ return table !== void 0 ? HashMap.has(table, this._key) : false;
768
+ };
769
+ WeakMap2.prototype.get = function(target) {
770
+ var table = GetOrCreateWeakMapTable(
771
+ target,
772
+ /*create*/
773
+ false
774
+ );
775
+ return table !== void 0 ? HashMap.get(table, this._key) : void 0;
776
+ };
777
+ WeakMap2.prototype.set = function(target, value) {
778
+ var table = GetOrCreateWeakMapTable(
779
+ target,
780
+ /*create*/
781
+ true
782
+ );
783
+ table[this._key] = value;
784
+ return this;
785
+ };
786
+ WeakMap2.prototype.delete = function(target) {
787
+ var table = GetOrCreateWeakMapTable(
788
+ target,
789
+ /*create*/
790
+ false
791
+ );
792
+ return table !== void 0 ? delete table[this._key] : false;
793
+ };
794
+ WeakMap2.prototype.clear = function() {
795
+ this._key = CreateUniqueKey();
796
+ };
797
+ return WeakMap2;
798
+ })()
799
+ );
800
+ function CreateUniqueKey() {
801
+ var key;
802
+ do
803
+ key = "@@WeakMap@@" + CreateUUID();
804
+ while (HashMap.has(keys, key));
805
+ keys[key] = true;
806
+ return key;
807
+ }
808
+ __name(CreateUniqueKey, "CreateUniqueKey");
809
+ function GetOrCreateWeakMapTable(target, create) {
810
+ if (!hasOwn.call(target, rootKey)) {
811
+ if (!create)
812
+ return void 0;
813
+ Object.defineProperty(target, rootKey, { value: HashMap.create() });
814
+ }
815
+ return target[rootKey];
816
+ }
817
+ __name(GetOrCreateWeakMapTable, "GetOrCreateWeakMapTable");
818
+ function FillRandomBytes(buffer, size) {
819
+ for (var i = 0; i < size; ++i)
820
+ buffer[i] = Math.random() * 255 | 0;
821
+ return buffer;
822
+ }
823
+ __name(FillRandomBytes, "FillRandomBytes");
824
+ function GenRandomBytes(size) {
825
+ if (typeof Uint8Array === "function") {
826
+ if (typeof crypto !== "undefined")
827
+ return crypto.getRandomValues(new Uint8Array(size));
828
+ if (typeof msCrypto !== "undefined")
829
+ return msCrypto.getRandomValues(new Uint8Array(size));
830
+ return FillRandomBytes(new Uint8Array(size), size);
831
+ }
832
+ return FillRandomBytes(new Array(size), size);
833
+ }
834
+ __name(GenRandomBytes, "GenRandomBytes");
835
+ function CreateUUID() {
836
+ var data = GenRandomBytes(UUID_SIZE);
837
+ data[6] = data[6] & 79 | 64;
838
+ data[8] = data[8] & 191 | 128;
839
+ var result = "";
840
+ for (var offset = 0; offset < UUID_SIZE; ++offset) {
841
+ var byte = data[offset];
842
+ if (offset === 4 || offset === 6 || offset === 8)
843
+ result += "-";
844
+ if (byte < 16)
845
+ result += "0";
846
+ result += byte.toString(16).toLowerCase();
847
+ }
848
+ return result;
849
+ }
850
+ __name(CreateUUID, "CreateUUID");
851
+ }
852
+ __name(CreateWeakMapPolyfill, "CreateWeakMapPolyfill");
853
+ function MakeDictionary(obj) {
854
+ obj.__ = void 0;
855
+ delete obj.__;
856
+ return obj;
857
+ }
858
+ __name(MakeDictionary, "MakeDictionary");
859
+ });
860
+ })(Reflect2 || (Reflect2 = {}));
861
+ return _Reflect;
862
+ }
863
+ __name(require_Reflect, "require_Reflect");
864
+ export {
865
+ require_Reflect as __require
866
+ };
867
+ //# sourceMappingURL=Reflect.js.map