@flock/wirespec 0.20.0-RC.8 → 0.20.2

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 (51) hide show
  1. package/arrow-arrow-atomic.mjs +12 -12
  2. package/arrow-arrow-core.mjs +163 -163
  3. package/clikt-clikt-mordant.mjs +80 -80
  4. package/clikt-clikt-mordant.mjs.map +1 -1
  5. package/clikt-clikt.mjs +1575 -1575
  6. package/clikt-clikt.mjs.map +1 -1
  7. package/colormath-root-colormath.mjs +444 -444
  8. package/kotlin-kotlin-stdlib.mjs +2001 -1948
  9. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  10. package/kotlin-openapi-bindings.mjs +10254 -10254
  11. package/kotlin-rgxgen.mjs +1815 -1815
  12. package/kotlinx-io-kotlinx-io-core.mjs +440 -440
  13. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1890 -1890
  14. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1576 -1576
  15. package/mordant-mordant.mjs +1362 -1362
  16. package/package.json +2 -2
  17. package/wirespec-src-compiler-core.mjs +1768 -2207
  18. package/wirespec-src-compiler-core.mjs.map +1 -1
  19. package/wirespec-src-compiler-emitters-java.mjs +384 -1254
  20. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  21. package/wirespec-src-compiler-emitters-kotlin.mjs +366 -1065
  22. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  23. package/wirespec-src-compiler-emitters-python.mjs +400 -1422
  24. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  25. package/wirespec-src-compiler-emitters-rust.mjs +424 -422
  26. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  27. package/wirespec-src-compiler-emitters-scala.mjs +214 -189
  28. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
  29. package/wirespec-src-compiler-emitters-typescript.mjs +529 -1409
  30. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  31. package/wirespec-src-compiler-emitters-wirespec.mjs +92 -86
  32. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  33. package/wirespec-src-compiler-ir.mjs +4476 -4329
  34. package/wirespec-src-compiler-ir.mjs.map +1 -1
  35. package/wirespec-src-compiler-lib.mjs +250 -1120
  36. package/wirespec-src-compiler-lib.mjs.map +1 -1
  37. package/wirespec-src-converter-avro.mjs +512 -512
  38. package/wirespec-src-converter-avro.mjs.map +1 -1
  39. package/wirespec-src-converter-openapi.mjs +756 -756
  40. package/wirespec-src-converter-openapi.mjs.map +1 -1
  41. package/wirespec-src-ide-lsp.mjs +1408 -1393
  42. package/wirespec-src-ide-lsp.mjs.map +1 -1
  43. package/wirespec-src-plugin-arguments.mjs +185 -245
  44. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  45. package/wirespec-src-plugin-cli.mjs +102 -128
  46. package/wirespec-src-plugin-cli.mjs.map +1 -1
  47. package/wirespec-src-plugin-npm.d.mts +0 -104
  48. package/wirespec-src-plugin-npm.mjs +40 -40
  49. package/wirespec-src-plugin-npm.mjs.map +1 -1
  50. package/wirespec-src-tools-generator.mjs +34 -34
  51. package/wirespec-src-tools-generator.mjs.map +1 -1
@@ -1,1091 +1,189 @@
1
1
  import {
2
- paramList3pq2vf0mu7as2 as paramList,
3
- Spacer_instance1p6915grp4mfk as Spacer_instance,
4
- importReferencesy4xv7r53sjjs as importReferences,
5
- spacer28p2fwyb64afn as spacer,
6
- Emitted12h24rpo4uifw as Emitted,
7
- ClientEmitter36x0lk1twctuf as ClientEmitter,
8
- LanguageEmitterxhzgykhux3qm as LanguageEmitter,
9
- FileExtension_TypeScript_getInstancebhrmnb4pwt10 as FileExtension_TypeScript_getInstance,
10
- hasEndpointsl5cepru27xfm as hasEndpoints,
11
- namespace2467cajrmgrc5 as namespace,
12
- Companion_instance1a2xqc448tlhh as Companion_instance,
13
- plus3lrm73de10b42 as plus,
14
- emitClientEndpointRequest3pvx0vdco72lr as emitClientEndpointRequest,
15
- Paramvfwnys2w6aj1 as Param,
16
- Literal331hu9r04vptz as Literal,
17
- distinctByStatus134zrt4nyr6p2 as distinctByStatus,
18
- fixStatus2l9jrn3538wpy as fixStatus,
19
- get_indexedPathParams2pzt0qs62068 as get_indexedPathParams,
20
- Companion_instancebcq57hoyp8c2 as Companion_instance_0,
21
- get_pathParamsf41cxx5qebxt as get_pathParams,
22
- paramList1sr74geu9w202 as paramList_0,
23
- FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
24
- Bytes3eoc50vgt1uem as Bytes,
25
- Boolean1fpfi8m5jt3fg as Boolean_0,
26
- Number1mui0heypwdhp as Number_0,
27
- Integer39lqx4uc63u28 as Integer,
28
- String1czvr8pxnm6on as String_0,
29
- Primitive1i8my14jkp3nk as Primitive,
30
- Custom1lu6o8txpimqz as Custom,
31
- Anyv7qdq63z63rc as Any,
32
- Unit2z95clvxm08vr as Unit,
33
- Iterable29qbzfup67wqp as Iterable,
34
- Dict3g7w5wia7rncj as Dict,
35
- Unionccsavx6nrdr2 as Union,
36
- Refined1lkzc0dg6wey7 as Refined,
37
- Enum3l2iuc342kle6 as Enum,
38
- Type12n1gx16iqtcu as Type,
39
- plus14o24vdaiongg as plus_0,
40
- Bytes_instance1o9u095wd3kx6 as Bytes_instance,
41
- Boolean_instance237vwt01w3hs8 as Boolean_instance,
42
- RegExpiyof7szm5zfu as RegExp_0,
43
- Bound2mp7s0560derz as Bound,
44
- _RegExp___get_value__impl__7o76182iqk274prw39c as _RegExp___get_value__impl__7o7618,
45
- TypeDefinitionEmitter18est4d94fpw8 as TypeDefinitionEmitter,
46
- } from './wirespec-src-compiler-core.mjs';
47
- import {
48
- VOID3gxj6tk5isa35 as VOID,
49
- joinToString1cxrrlmo0chqs as joinToString,
50
- trimMarginhyd3fsmh8iev as trimMargin,
51
- Unit_instance28fytmsmm6r23 as Unit_instance,
52
- ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$,
53
- addAll1k27qatfgp3k5 as addAll,
54
- HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
55
- protoOf180f3jzyo7rfj as protoOf,
56
- initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
57
- THROW_CCE2g6jy02ryeudk as THROW_CCE,
58
- isCharSequence1ju9jr1w86plq as isCharSequence,
59
- trimStart5ewg8zf6cs5u as trimStart,
60
- toString1pkumu07cwy4m as toString,
61
- LinkedHashMap_init_$Create$3t495nfs82xn as LinkedHashMap_init_$Create$,
62
- ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$_0,
63
- collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
64
- initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
65
- noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
66
- prependIndentkl9wuvcodvmu as prependIndent,
67
- first58ocm7j58k3q as first,
68
- KProperty1ca4yb4wlo496 as KProperty1,
69
- getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
70
- StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
71
- charSequenceLength3278n89t01tmv as charSequenceLength,
72
- charSequenceGet1vxk1y5n17t1z as charSequenceGet,
73
- isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
74
- _Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
75
- charCodeAt1yspne1d8erbm as charCodeAt,
76
- toString3dhdjl9yf50de as toString_0,
77
- substring3saq8ornu0luv as substring,
78
- Regex_init_$Create$9xrx4twz2i6q as Regex_init_$Create$,
79
- getStringHashCode26igk1bx568vk as getStringHashCode,
80
- getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,
81
- listOf1jh22dvmctj1r as listOf,
82
- mapCapacity1h45rc3eh9p2l as mapCapacity,
83
- coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
84
- LinkedHashMap_init_$Create$1s75e1k23v4xj as LinkedHashMap_init_$Create$_0,
85
- removePrefix279df90bhrqqg as removePrefix,
86
- setOf45ia9pnfhe90 as setOf,
87
- initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
88
- listOfvhqybd2zx248 as listOf_0,
89
- to2cs3ny02qtbcb as to,
90
- toMap1vec9topfei08 as toMap,
91
- emptyList1g2z5xcrvp2zy as emptyList,
92
- plus310ted5e4i90h as plus_1,
93
- equals2au1ep9vhcato as equals,
94
- mapOf2zpbbmyqk8xpf as mapOf,
95
- plus2m1vv33moko5t as plus_2,
96
- startsWith26w8qjqapeeq6 as startsWith,
97
- substringBefore3n7kj60w69hju as substringBefore,
98
- endsWith3cq61xxngobwh as endsWith,
99
- isInterface3d6p8outrmvmk as isInterface,
100
- lazy2hsh8ze7j6ikd as lazy,
101
- asSequence2phdjljfh9jhx as asSequence,
102
- filterNot56uwv8hfomaa as filterNot,
103
- mapsbvh18eqox7a as map,
104
- distinct17vua5ffe1cfv as distinct,
105
- toListx6x8nvfmvvht as toList,
106
- LinkedHashSet_init_$Create$2lru2gvxodydo as LinkedHashSet_init_$Create$,
107
- distinct10qe1scfdvu5k as distinct_0,
108
- toSet2orjxp16sotqu as toSet,
109
- Collection1k04j3hzsbod0 as Collection,
110
- substringAfterLastuw9v7gfiiihe as substringAfterLast,
111
- toIntOrNull3w2d066r9pvwm as toIntOrNull,
112
- ensureNotNull1e947j3ixpazm as ensureNotNull,
113
- charArrayOf27f4r3dozbrk1 as charArrayOf,
114
- trimEndvvzjdhan75g as trimEnd,
115
- initMetadataForObject1cxne3s9w65el as initMetadataForObject,
116
- Char19o2r8palgjof as Char,
117
- asSequence3lsvgkvyzox0q as asSequence_0,
118
- filter184huxd00uyfg as filter,
119
- joinToStringooja5rkatz3u as joinToString_0,
120
- listOfNotNull2woi2boe01ub4 as listOfNotNull,
121
- } from './kotlin-kotlin-stdlib.mjs';
122
- import {
123
- _NonEmptyList___get_all__impl__pmf5092svcdxelgy1aa as _NonEmptyList___get_all__impl__pmf509,
124
- NonEmptyList3ak25ihy2gcvs as NonEmptyList,
125
- _NonEmptyList___init__impl__fxd0xp3qwfhfa83yk9f as _NonEmptyList___init__impl__fxd0xp,
126
- NonEmptyList__toList_impl_t5xcy2362qtlja6arn8 as NonEmptyList__toList_impl_t5xcy2,
127
- NonEmptyList__plus_impl_xqmb92tle8a7jcf2wm as NonEmptyList__plus_impl_xqmb9,
128
- NonEmptyList__plus_impl_xqmb91y38uyofmba13 as NonEmptyList__plus_impl_xqmb9_0,
129
- } from './arrow-arrow-core.mjs';
130
- import {
131
- Nameoqr8dt2fim9d as Name,
132
- transformChildren2mszeagj5nq4c as transformChildren,
133
- sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
134
- Assignment3kcxc8wlcbmkn as Assignment,
135
- ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
136
- VariableReference2vlynnhaw1i64 as VariableReference,
137
- SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
138
- RawElement2yts1x2rbem1g as RawElement,
139
- Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
140
- withElements2toq84v08e72 as withElements,
141
- Namespace345pal554qu3j as Namespace,
142
- transformChildrend9p91tpcqdkx as transformChildren_0,
143
- StringLiteral3ffeojfhsbsmg as StringLiteral,
144
- Field354s1ceh5pvhf as Field,
145
- Struct39wf79cwtn4ty as Struct,
146
- RawExpression2bo7ldfrptjia as RawExpression,
147
- FunctionCall30872kpnbr7op as FunctionCall,
148
- transformChildren3n5cjwmxlhwx9 as transformChildren_1,
149
- Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
150
- Custom2si7lto3wompr as Custom_0,
151
- String_instance3uxvo48ki208u as String_instance,
152
- Literal50s1y3607cdv as Literal_0,
153
- TransformScopeyrd3lf4zrk76 as TransformScope,
154
- TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
155
- transform3eti8i2bqvifx as transform,
156
- Elementitq62jg6fid3 as Element,
157
- TypeScriptGenerator_getInstance3w0ea8m4h2slw as TypeScriptGenerator_getInstance,
158
- convertnty9x0e63d0u as convert,
159
- emit1oxjujel6f3jb as emit,
160
- emitn3eihixilqyh as emit_0,
161
- import5uhkz67bd8tt as import_0,
162
- File3dimy4iqmuock as File,
163
- convertToGenerator2wzjrmaavxhph as convertToGenerator,
164
- convertToGeneratorkggw47cqose7 as convertToGenerator_0,
165
- convertToGenerator3rjr3azp4vdsx as convertToGenerator_1,
166
- convertToGenerator2msmr3acdd5nx as convertToGenerator_2,
167
- sanitizeNames2wqmyf8vafp9x as sanitizeNames,
168
- collectCustomTypeNames373f3lwl9sqd5 as collectCustomTypeNames,
169
- classifyValidatableFields11bv88x0ho39r as classifyValidatableFields,
170
- convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
171
- convert11ert2po54h1y as convert_0,
172
- convert37aabdzvtv9vg as convert_1,
173
- convert17zcptkz4mhr4 as convert_2,
174
- convertConstraintkgpvomct0x0s as convertConstraint,
175
- requestParameters1z8fdizgtviyb as requestParameters,
176
- convert32tuiui3czihh as convert_3,
177
- convert1cn4bolzoed8c as convert_4,
178
- get_extensions31c4or738wbxz as get_extensions,
179
- emit3bzdcd0f6nwtj as emit_1,
180
- beforeGenerate3o8idb3hey1b0 as beforeGenerate,
181
- IrEmitterh2m93ojzvkep as IrEmitter,
182
- rawttvqxl50flj9 as raw,
183
- Switch3a1zi3na98deu as Switch,
184
- Integer1uwg1wvo5lp6z as Integer_0,
185
- Case2i7oahw4alz6h as Case,
186
- FieldCall1iz7z2fx2xo4p as FieldCall,
187
- Parameteruqoxd4rzw7ga as Parameter,
188
- Function21cuq8qizkin7 as Function,
189
- Interface3pn84xq686t2r as Interface,
190
- ErrorStatement1fq19ynue37ia as ErrorStatement,
191
- BinaryOp35p72iprkxis9 as BinaryOp,
192
- } from './wirespec-src-compiler-ir.mjs';
193
- //region block: imports
194
- var imul = Math.imul;
195
- //endregion
196
- //region block: pre-declaration
197
- function emit_2(identifier) {
198
- return '"' + identifier.l1() + '"';
199
- }
200
- initMetadataForInterface(TypeScriptIdentifierEmitter, 'TypeScriptIdentifierEmitter');
201
- function sanitizeSymbol(_this__u8e3s4) {
202
- return this.j1x(_this__u8e3s4.l1());
203
- }
204
- function sanitizeSymbol_0(_this__u8e3s4) {
205
- var tmp = asSequence_0(_this__u8e3s4);
206
- return joinToString_0(filter(tmp, TypeScriptTypeDefinitionEmitter$sanitizeSymbol$lambda), '');
207
- }
208
- function emit_3(type, module_0) {
209
- // Inline function 'kotlin.collections.distinctBy' call
210
- var this_0 = importReferences(type);
211
- var set = HashSet_init_$Create$();
212
- var list = ArrayList_init_$Create$();
213
- var _iterator__ex2g4s = this_0.t();
214
- while (_iterator__ex2g4s.u()) {
215
- var e = _iterator__ex2g4s.v();
216
- var key = e.cv_1;
217
- if (set.x(key)) {
218
- list.x(e);
219
- }
220
- }
221
- // Inline function 'kotlin.collections.map' call
222
- // Inline function 'kotlin.collections.mapTo' call
223
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(list, 10));
224
- var _iterator__ex2g4s_0 = list.t();
225
- while (_iterator__ex2g4s_0.u()) {
226
- var item = _iterator__ex2g4s_0.v();
227
- var tmp$ret$2 = 'import {' + item.cv_1 + "} from './" + item.cv_1 + "'";
228
- destination.x(tmp$ret$2);
229
- }
230
- var tmp = destination;
231
- return trimMargin('\n |' + joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda) + '\n |export type ' + this.t20(type.mp_1) + ' = {\n |' + this.mq(type.np_1) + '\n |}\n |\n ');
232
- }
233
- function emit_4(_this__u8e3s4) {
234
- var tmp;
235
- if (_this__u8e3s4 instanceof Dict) {
236
- tmp = 'Record<string, ' + this.oq(_this__u8e3s4.so_1) + '>';
237
- } else {
238
- if (_this__u8e3s4 instanceof Iterable) {
239
- tmp = this.oq(_this__u8e3s4.po_1) + '[]';
240
- } else {
241
- if (_this__u8e3s4 instanceof Unit) {
242
- tmp = 'void';
243
- } else {
244
- if (_this__u8e3s4 instanceof Any) {
245
- tmp = 'any';
246
- } else {
247
- if (_this__u8e3s4 instanceof Custom) {
248
- tmp = this.j1x(_this__u8e3s4.cv_1);
249
- } else {
250
- if (_this__u8e3s4 instanceof Primitive) {
251
- tmp = this.u20(_this__u8e3s4);
252
- } else {
253
- noWhenBranchMatchedException();
254
- }
255
- }
256
- }
257
- }
258
- }
259
- }
260
- // Inline function 'kotlin.let' call
261
- return tmp + (_this__u8e3s4.uu() ? ' | undefined' : '');
262
- }
263
- function emitPrimitive(_this__u8e3s4) {
264
- var tmp0_subject = _this__u8e3s4.gv_1;
265
- var tmp;
266
- if (tmp0_subject instanceof String_0) {
267
- tmp = 'string';
268
- } else {
269
- if (tmp0_subject instanceof Integer) {
270
- tmp = 'number';
271
- } else {
272
- if (tmp0_subject instanceof Number_0) {
273
- tmp = 'number';
274
- } else {
275
- if (tmp0_subject instanceof Boolean_0) {
276
- tmp = 'boolean';
277
- } else {
278
- if (tmp0_subject instanceof Bytes) {
279
- tmp = 'ArrayBuffer';
280
- } else {
281
- noWhenBranchMatchedException();
282
- }
283
- }
284
- }
285
- }
286
- }
287
- return tmp;
288
- }
289
- function emit_5(_this__u8e3s4) {
290
- var tmp;
291
- if (_this__u8e3s4 instanceof RegExp_0) {
292
- tmp = Spacer_instance.toString() + 'return ' + _RegExp___get_value__impl__7o7618(_this__u8e3s4.qt_1) + '.test(value);';
293
- } else {
294
- if (_this__u8e3s4 instanceof Bound) {
295
- var tmp1_safe_receiver = _this__u8e3s4.gu_1;
296
- var tmp_0;
297
- if (tmp1_safe_receiver == null) {
298
- tmp_0 = null;
299
- } else {
300
- // Inline function 'kotlin.let' call
301
- tmp_0 = tmp1_safe_receiver + ' < value';
302
- }
303
- var minCheck = tmp_0;
304
- var tmp2_safe_receiver = _this__u8e3s4.hu_1;
305
- var tmp_1;
306
- if (tmp2_safe_receiver == null) {
307
- tmp_1 = null;
308
- } else {
309
- // Inline function 'kotlin.let' call
310
- tmp_1 = 'value < ' + tmp2_safe_receiver;
311
- }
312
- var maxCheck = tmp_1;
313
- var tmp_2 = Spacer_instance.toString();
314
- // Inline function 'kotlin.let' call
315
- // Inline function 'kotlin.text.ifEmpty' call
316
- var this_0 = joinToString(listOfNotNull([minCheck, maxCheck]), ' && ');
317
- var tmp_3;
318
- // Inline function 'kotlin.text.isEmpty' call
319
- if (charSequenceLength(this_0) === 0) {
320
- tmp_3 = 'true';
321
- } else {
322
- tmp_3 = this_0;
323
- }
324
- tmp = tmp_2 + 'return ' + tmp_3 + ';';
325
- } else {
326
- noWhenBranchMatchedException();
327
- }
328
- }
329
- return tmp;
330
- }
331
- function emit_6(_this__u8e3s4) {
332
- return joinToString(_this__u8e3s4.jp_1, ',\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda_0(this));
333
- }
334
- function emit_7(_this__u8e3s4) {
335
- return Spacer_instance.toString() + this.or(_this__u8e3s4.rp_1) + ': ' + this.oq(_this__u8e3s4.sp_1);
336
- }
337
- initMetadataForInterface(TypeScriptTypeDefinitionEmitter, 'TypeScriptTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, TypeScriptIdentifierEmitter]);
338
- function emitClient(ast) {
339
- var tmp = 'client.' + this.vq().er_1;
340
- var tmp_0 = this.rq(ast);
341
- var tmp_1 = joinToString(tmp_0, '\n', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClient$lambda);
342
- // Inline function 'arrow.core.NonEmptyList.flatMap' call
343
- var this_0 = ast.sq_1;
344
- // Inline function 'kotlin.collections.flatMap' call
345
- var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_0);
346
- // Inline function 'kotlin.collections.flatMapTo' call
347
- var destination = ArrayList_init_$Create$();
348
- var _iterator__ex2g4s = tmp0.t();
349
- while (_iterator__ex2g4s.u()) {
350
- var element = _iterator__ex2g4s.v();
351
- var list = new NonEmptyList(element.uq_1);
352
- addAll(destination, list);
353
- }
354
- var tmp$ret$3 = _NonEmptyList___init__impl__fxd0xp(destination);
355
- // Inline function 'kotlin.collections.flatMap' call
356
- var tmp0_0 = NonEmptyList__toList_impl_t5xcy2(tmp$ret$3);
357
- // Inline function 'kotlin.collections.flatMapTo' call
358
- var destination_0 = ArrayList_init_$Create$();
359
- var _iterator__ex2g4s_0 = tmp0_0.t();
360
- while (_iterator__ex2g4s_0.u()) {
361
- var element_0 = _iterator__ex2g4s_0.v();
362
- var list_0 = importReferences(element_0);
363
- addAll(destination_0, list_0);
364
- }
365
- // Inline function 'kotlin.collections.distinctBy' call
366
- var set = HashSet_init_$Create$();
367
- var list_1 = ArrayList_init_$Create$();
368
- var _iterator__ex2g4s_1 = destination_0.t();
369
- while (_iterator__ex2g4s_1.u()) {
370
- var e = _iterator__ex2g4s_1.v();
371
- var key = e.cv_1;
372
- if (set.x(key)) {
373
- list_1.x(e);
374
- }
375
- }
376
- var tmp_2 = list_1;
377
- var tmp_3 = joinToString(tmp_2, '\n', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClient$lambda_0);
378
- var tmp_4 = this.rq(ast);
379
- return new Emitted(tmp, trimMargin('\n |import {Wirespec} from "./Wirespec"\n |\n |' + tmp_1 + '\n |\n |' + tmp_3 + '\n |\n |type RawHandler = (req: Wirespec.RawRequest) => Promise<Wirespec.RawResponse>\n |\n |export const client = (serialization: Wirespec.Serialization, handler: RawHandler) => ({\n |' + spacer(joinToString(tmp_4, '\n', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClient$lambda_1(this)), 1) + '\n |})\n |\n '));
380
- }
381
- initMetadataForInterface(TypeScriptClientEmitter, 'TypeScriptClientEmitter', VOID, VOID, [ClientEmitter, TypeScriptTypeDefinitionEmitter]);
382
- function emit_8(endpoint) {
383
- // Inline function 'kotlin.collections.distinctBy' call
384
- var this_0 = importReferences(endpoint);
385
- var set = HashSet_init_$Create$();
386
- var list = ArrayList_init_$Create$();
387
- var _iterator__ex2g4s = this_0.t();
388
- while (_iterator__ex2g4s.u()) {
389
- var e = _iterator__ex2g4s.v();
390
- var key = e.cv_1;
391
- if (set.x(key)) {
392
- list.x(e);
393
- }
394
- }
395
- // Inline function 'kotlin.collections.map' call
396
- // Inline function 'kotlin.collections.mapTo' call
397
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(list, 10));
398
- var _iterator__ex2g4s_0 = list.t();
399
- while (_iterator__ex2g4s_0.u()) {
400
- var item = _iterator__ex2g4s_0.v();
401
- var tmp$ret$2 = 'import {type ' + item.cv_1 + "} from '../model'";
402
- destination.x(tmp$ret$2);
403
- }
404
- var tmp = destination;
405
- var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda);
406
- var tmp_1 = this.t20(endpoint.vp_1);
407
- var tmp_2 = get_pathParams(endpoint);
408
- var tmp_3 = emitType(this, tmp_2, 'Path', TypeScriptEndpointDefinitionEmitter$emit$lambda_0(this));
409
- var tmp_4 = emitType(this, endpoint.yp_1, 'Queries', TypeScriptEndpointDefinitionEmitter$emit$lambda_1(this));
410
- var tmp_5 = emitType(this, endpoint.zp_1, 'Headers', TypeScriptEndpointDefinitionEmitter$emit$lambda_2(this));
411
- var tmp_6 = emitType_1(this, first(endpoint.aq_1), endpoint);
412
- var tmp_7 = distinctByStatus(endpoint.bq_1);
413
- var tmp_8 = joinToString(tmp_7, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_3(this));
414
- var tmp_9 = Spacer_instance.toString();
415
- var tmp_10 = distinctByStatus(endpoint.bq_1);
416
- var tmp_11 = joinToString(tmp_10, ' | ', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_4(this));
417
- var tmp_12 = emitFunction_0(this, first(endpoint.aq_1), endpoint);
418
- var tmp_13 = distinctByStatus(endpoint.bq_1);
419
- var tmp_14 = joinToString(tmp_13, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_5(this));
420
- var tmp_15 = Spacer_instance.toString();
421
- var tmp_16 = Spacer_instance.is(2);
422
- var tmp_17 = emitHandleFunction(this, endpoint);
423
- var tmp_18 = Spacer_instance.toString();
424
- var tmp_19 = prependIndent(emitClient_0(this, endpoint), Spacer_instance.is(1));
425
- var tmp_20 = prependIndent(emitServer(this, endpoint), Spacer_instance.is(1));
426
- var tmp_21 = Spacer_instance.toString();
427
- var tmp_22 = Spacer_instance.is(2);
428
- var tmp_23 = Companion_instance_0.gr(this.t20(endpoint.vp_1));
429
- var tmp_24 = Spacer_instance.is(2);
430
- var tmp_25 = Spacer_instance.is(2);
431
- return trimMargin('\n |' + tmp_0 + '\n |export namespace ' + tmp_1 + ' {\n |' + tmp_3 + '\n |' + tmp_4 + '\n |' + tmp_5 + '\n |' + tmp_6 + '\n |' + tmp_8 + '\n |' + tmp_9 + 'export type Response = ' + tmp_11 + '\n |' + tmp_12 + '\n |' + tmp_14 + '\n |' + tmp_15 + 'export type Handler = {\n |' + tmp_16 + tmp_17 + '\n |' + tmp_18 + '}\n |' + tmp_19 + '\n |' + tmp_20 + '\n |' + tmp_21 + 'export const api = {\n |' + tmp_22 + 'name: "' + tmp_23 + '",\n |' + tmp_24 + 'method: "' + endpoint.wp_1.a3_1 + '",\n |' + tmp_25 + 'path: "' + joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_6(this)) + '",\n |' + Spacer_instance.is(2) + 'server,\n |' + Spacer_instance.is(2) + 'client\n |' + Spacer_instance.toString() + '} as const\n |}\n |\n ');
432
- }
433
- initMetadataForInterface(TypeScriptEndpointDefinitionEmitter, 'TypeScriptEndpointDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
434
- function emit_9(refined) {
435
- return trimMargin('\n |export type ' + this.t20(refined.tr_1) + ' = ' + this.oq(refined.ur_1) + ';\n |export const validate' + refined.tr_1.l1() + ' = (value: ' + this.oq(refined.ur_1) + '): value is ' + this.t20(refined.tr_1) + ' => {\n |' + this.cs(refined) + '\n |}\n |\n ');
436
- }
437
- function emitValidator(_this__u8e3s4) {
438
- var defaultReturn = Spacer_instance.toString() + 'return true;';
439
- var type = _this__u8e3s4.ur_1.gv_1;
440
- var tmp;
441
- if (type instanceof Integer) {
442
- var tmp0_safe_receiver = type.lu_1;
443
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.pq(tmp0_safe_receiver);
444
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
445
- } else {
446
- if (type instanceof Number_0) {
447
- var tmp2_safe_receiver = type.ou_1;
448
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.pq(tmp2_safe_receiver);
449
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
450
- } else {
451
- if (type instanceof String_0) {
452
- var tmp4_safe_receiver = type.iu_1;
453
- var tmp_0;
454
- var tmp_1 = tmp4_safe_receiver;
455
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
456
- tmp_0 = null;
457
- } else {
458
- tmp_0 = this.pq(new RegExp_0(tmp4_safe_receiver));
459
- }
460
- var tmp5_elvis_lhs = tmp_0;
461
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
462
- } else {
463
- if (equals(type, Boolean_instance)) {
464
- tmp = defaultReturn;
465
- } else {
466
- if (equals(type, Bytes_instance)) {
467
- tmp = defaultReturn;
468
- } else {
469
- noWhenBranchMatchedException();
470
- }
471
- }
472
- }
473
- }
474
- }
475
- return tmp;
476
- }
477
- initMetadataForInterface(TypeScriptRefinedTypeDefinitionEmitter, 'TypeScriptRefinedTypeDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
478
- function emit_10(enum_0, module_0) {
479
- var tmp = this.t20(enum_0.yr_1);
480
- return 'export type ' + tmp + ' = ' + joinToString(enum_0.zr_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEnumDefinitionEmitter$emit$lambda) + '\n';
481
- }
482
- initMetadataForInterface(TypeScriptEnumDefinitionEmitter, 'TypeScriptEnumDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
483
- initMetadataForClass(TypeScriptEmitter, 'TypeScriptEmitter', TypeScriptEmitter, LanguageEmitter, [LanguageEmitter, TypeScriptTypeDefinitionEmitter, TypeScriptIdentifierEmitter, TypeScriptEndpointDefinitionEmitter, TypeScriptRefinedTypeDefinitionEmitter, TypeScriptEnumDefinitionEmitter, TypeScriptClientEmitter]);
484
- initMetadataForClass(EndpointParam, 'EndpointParam');
485
- initMetadataForCompanion(Companion);
486
- initMetadataForClass(TypeScriptIrEmitter, 'TypeScriptIrEmitter', TypeScriptIrEmitter, VOID, [IrEmitter]);
487
- initMetadataForObject(TypeScriptShared, 'TypeScriptShared');
488
- //endregion
489
- function emitClientInterface($this, _this__u8e3s4, endpoint) {
490
- // Inline function 'kotlin.takeIf' call
491
- var this_0 = paramList(_this__u8e3s4, endpoint);
492
- var tmp;
493
- // Inline function 'kotlin.collections.isNotEmpty' call
494
- if (!this_0.r()) {
495
- tmp = this_0;
496
- } else {
497
- tmp = null;
498
- }
499
- var tmp0_safe_receiver = tmp;
500
- var tmp_0;
501
- if (tmp0_safe_receiver == null) {
502
- tmp_0 = null;
503
- } else {
504
- tmp_0 = joinToString(tmp0_safe_receiver, ', ', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClientInterface$lambda($this));
505
- }
506
- var tmp1_safe_receiver = tmp_0;
507
- var tmp_1;
508
- if (tmp1_safe_receiver == null) {
509
- tmp_1 = null;
510
- } else {
511
- // Inline function 'kotlin.let' call
512
- tmp_1 = 'params: {' + tmp1_safe_receiver + '}';
513
- }
514
- // Inline function 'kotlin.text.orEmpty' call
515
- var tmp0_elvis_lhs = tmp_1;
516
- return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
517
- }
518
- function emitFunction($this, endpoint, request) {
519
- var tmp = endpoint.vp_1.l1();
520
- var tmp_0 = emitClientInterface($this, request, endpoint);
521
- var tmp_1 = Spacer_instance.toString();
522
- var tmp_2 = endpoint.vp_1.l1();
523
- // Inline function 'kotlin.takeIf' call
524
- var this_0 = paramList(request, endpoint);
525
- var tmp_3;
526
- // Inline function 'kotlin.collections.isNotEmpty' call
527
- if (!this_0.r()) {
528
- tmp_3 = this_0;
529
- } else {
530
- tmp_3 = null;
531
- }
532
- var tmp_4;
533
- if (tmp_3 == null) {
534
- tmp_4 = null;
535
- } else {
536
- // Inline function 'kotlin.let' call
537
- tmp_4 = 'params';
538
- }
539
- // Inline function 'kotlin.text.orEmpty' call
540
- var tmp0_elvis_lhs = tmp_4;
541
- var tmp$ret$5 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
542
- return trimMargin('\n |' + tmp + ': async (' + tmp_0 + ') => {\n |' + tmp_1 + 'const req = ' + tmp_2 + '.request(' + tmp$ret$5 + ')\n |' + Spacer_instance.toString() + 'const rawRequest = ' + endpoint.vp_1.l1() + '.client(serialization).to(req)\n |' + Spacer_instance.toString() + 'const rawResponse = await handler(rawRequest)\n |' + Spacer_instance.toString() + 'return ' + endpoint.vp_1.l1() + '.client(serialization).from(rawResponse)\n |},\n ');
543
- }
544
- function TypeScriptClientEmitter$emitClient$lambda(_destruct__k2r9zo) {
545
- var endpoint = _destruct__k2r9zo.ve();
546
- return 'import {' + endpoint.vp_1.l1() + '} from "./endpoint/' + endpoint.vp_1.l1() + '"';
547
- }
548
- function TypeScriptClientEmitter$emitClient$lambda_0(it) {
549
- return 'import {type ' + it.cv_1 + '} from "./model/' + it.cv_1 + '"';
550
- }
551
- function TypeScriptClientEmitter$emitClient$lambda_1(this$0) {
552
- return function (_destruct__k2r9zo) {
553
- var endpoint = _destruct__k2r9zo.ve();
554
- var request = _destruct__k2r9zo.we();
555
- return emitFunction(this$0, endpoint, request);
556
- };
557
- }
558
- function TypeScriptClientEmitter$emitClientInterface$lambda(this$0) {
559
- return function (it) {
560
- return this$0.or(it.ar_1) + ': ' + this$0.oq(it.br_1);
561
- };
562
- }
563
- function TypeScriptClientEmitter() {
564
- }
565
- function TypeScriptEmitter$emit$lambda(it) {
566
- return 'export {' + it.nr().l1() + "} from './" + it.nr().l1() + "'";
567
- }
568
- function TypeScriptEmitter$emit$lambda_0(it) {
569
- // Inline function 'kotlin.text.trimStart' call
570
- return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
571
- }
572
- function TypeScriptEmitter$emit$lambda_1(this$0) {
573
- return function (it) {
574
- return this$0.oq(it);
575
- };
576
- }
577
- function TypeScriptEmitter() {
578
- LanguageEmitter.call(this);
579
- this.v20_1 = FileExtension_TypeScript_getInstance();
580
- this.w20_1 = TypeScriptShared_getInstance();
581
- this.x20_1 = '//';
582
- }
583
- protoOf(TypeScriptEmitter).vq = function () {
584
- return this.v20_1;
585
- };
586
- protoOf(TypeScriptEmitter).g1x = function () {
587
- return this.w20_1;
588
- };
589
- protoOf(TypeScriptEmitter).wq = function () {
590
- return this.x20_1;
591
- };
592
- protoOf(TypeScriptEmitter).eo = function (ast, logger) {
593
- // Inline function 'kotlin.run' call
594
- var $this$run = protoOf(LanguageEmitter).eo.call(this, ast, logger);
595
- var tmp;
596
- if (hasEndpoints(ast)) {
597
- tmp = NonEmptyList__plus_impl_xqmb9($this$run, this.s20(ast));
598
- } else {
599
- tmp = $this$run;
600
- }
601
- var tmp_0 = tmp;
602
- // Inline function 'arrow.core.NonEmptyList.flatMap' call
603
- var this_0 = ast.sq_1;
604
- // Inline function 'kotlin.collections.flatMap' call
605
- var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_0);
606
- // Inline function 'kotlin.collections.flatMapTo' call
607
- var destination = ArrayList_init_$Create$();
608
- var _iterator__ex2g4s = tmp0.t();
609
- while (_iterator__ex2g4s.u()) {
610
- var element = _iterator__ex2g4s.v();
611
- var list = new NonEmptyList(element.uq_1);
612
- addAll(destination, list);
613
- }
614
- var tmp$ret$5 = _NonEmptyList___init__impl__fxd0xp(destination);
615
- // Inline function 'kotlin.collections.groupBy' call
616
- var tmp0_0 = new NonEmptyList(tmp$ret$5);
617
- // Inline function 'kotlin.collections.groupByTo' call
618
- var destination_0 = LinkedHashMap_init_$Create$();
619
- var _iterator__ex2g4s_0 = tmp0_0.t();
620
- while (_iterator__ex2g4s_0.u()) {
621
- var element_0 = _iterator__ex2g4s_0.v();
622
- var key = namespace(element_0);
623
- // Inline function 'kotlin.collections.getOrPut' call
624
- var value = destination_0.p2(key);
625
- var tmp_1;
626
- if (value == null) {
627
- var answer = ArrayList_init_$Create$();
628
- destination_0.s2(key, answer);
629
- tmp_1 = answer;
630
- } else {
631
- tmp_1 = value;
632
- }
633
- var list_0 = tmp_1;
634
- list_0.x(element_0);
635
- }
636
- // Inline function 'kotlin.collections.map' call
637
- // Inline function 'kotlin.collections.mapTo' call
638
- var destination_1 = ArrayList_init_$Create$_0(destination_0.a1());
639
- // Inline function 'kotlin.collections.iterator' call
640
- var _iterator__ex2g4s_1 = destination_0.j1().t();
641
- while (_iterator__ex2g4s_1.u()) {
642
- var item = _iterator__ex2g4s_1.v();
643
- // Inline function 'kotlin.collections.component1' call
644
- var ns = item.k1();
645
- // Inline function 'kotlin.collections.component2' call
646
- var defs = item.l1();
647
- var tmp_2 = ns + '/index.' + this.vq().er_1;
648
- var tmp$ret$14 = new Emitted(tmp_2, joinToString(defs, '\n', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda));
649
- destination_1.x(tmp$ret$14);
650
- }
651
- return NonEmptyList__plus_impl_xqmb9_0(tmp_0, destination_1);
652
- };
653
- protoOf(TypeScriptEmitter).lr = function (module_0, logger) {
654
- // Inline function 'kotlin.let' call
655
- var it = protoOf(LanguageEmitter).lr.call(this, module_0, logger);
656
- return NonEmptyList__plus_impl_xqmb9(it, new Emitted('Wirespec', this.g1x().z20_1));
657
- };
658
- protoOf(TypeScriptEmitter).mr = function (definition, module_0, logger) {
659
- // Inline function 'kotlin.let' call
660
- var it = protoOf(LanguageEmitter).mr.call(this, definition, module_0, logger);
661
- var subPackageName = plus(Companion_instance.ds(''), definition);
662
- return new Emitted(subPackageName.gs() + this.j1x(it.yo_1), trimMargin("\n |import {Wirespec} from '../Wirespec'\n |\n |" + it.zo_1 + '\n '));
663
- };
664
- protoOf(TypeScriptEmitter).qr = function (union) {
665
- // Inline function 'kotlin.collections.distinctBy' call
666
- var this_0 = importReferences(union);
667
- var set = HashSet_init_$Create$();
668
- var list = ArrayList_init_$Create$();
669
- var _iterator__ex2g4s = this_0.t();
670
- while (_iterator__ex2g4s.u()) {
671
- var e = _iterator__ex2g4s.v();
672
- var key = e.cv_1;
673
- if (set.x(key)) {
674
- list.x(e);
675
- }
676
- }
677
- // Inline function 'kotlin.collections.map' call
678
- // Inline function 'kotlin.collections.mapTo' call
679
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(list, 10));
680
- var _iterator__ex2g4s_0 = list.t();
681
- while (_iterator__ex2g4s_0.u()) {
682
- var item = _iterator__ex2g4s_0.v();
683
- var tmp$ret$2 = 'import {type ' + item.cv_1 + "} from '../model'";
684
- destination.x(tmp$ret$2);
685
- }
686
- var tmp = destination;
687
- var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda_0);
688
- var tmp_1 = this.t20(union.hp_1);
689
- return trimMargin('\n |' + tmp_0 + '\n |export type ' + tmp_1 + ' = ' + joinToString(union.ip_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda_1(this)) + '\n |\n ');
690
- };
691
- protoOf(TypeScriptEmitter).pr = function (channel) {
692
- return this.xq();
693
- };
694
- function emit_11($this, _this__u8e3s4) {
695
- var tmp;
696
- if (_this__u8e3s4 instanceof Literal) {
697
- tmp = _this__u8e3s4.yq_1;
698
- } else {
699
- if (_this__u8e3s4 instanceof Param) {
700
- tmp = ':' + _this__u8e3s4.cq_1.l1();
701
- } else {
702
- noWhenBranchMatchedException();
703
- }
704
- }
705
- return tmp;
706
- }
707
- function emitClient_0($this, _this__u8e3s4) {
708
- return trimMargin('\n |export const client: Wirespec.Client<Request, Response> = (serialization: Wirespec.Serialization) => ({\n |' + prependIndent(emitClientTo($this, _this__u8e3s4), Spacer_instance.is(1)) + ',\n |' + prependIndent(emitClientFrom($this, _this__u8e3s4), Spacer_instance.is(1)) + '\n |})\n ');
709
- }
710
- function emitClientTo($this, _this__u8e3s4) {
711
- var tmp = Spacer_instance.is(1);
712
- // Inline function 'kotlin.text.uppercase' call
713
- // Inline function 'kotlin.js.asDynamic' call
714
- var tmp_0 = _this__u8e3s4.wp_1.a3_1.toUpperCase();
715
- var tmp_1 = Spacer_instance.is(1);
716
- var tmp_2 = emitPathArray($this, _this__u8e3s4);
717
- var tmp_3 = Spacer_instance.is(1);
718
- var tmp_4 = joinToString(_this__u8e3s4.yp_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda($this));
719
- var tmp_5 = Spacer_instance.is(1);
720
- return trimMargin('\n |to: (it) => ({\n |' + tmp + 'method: "' + tmp_0 + '",\n |' + tmp_1 + 'path: ' + tmp_2 + ',\n |' + tmp_3 + 'queries: {' + tmp_4 + '},\n |' + tmp_5 + 'headers: {' + joinToString(_this__u8e3s4.zp_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda_0($this)) + '},\n |' + Spacer_instance.is(1) + 'body: serialization.serialize(it.body)\n |})\n ');
721
- }
722
- function emitClientFrom($this, _this__u8e3s4) {
723
- var tmp = Spacer_instance.is(1);
724
- var tmp_0 = distinctByStatus(_this__u8e3s4.bq_1);
725
- return trimMargin('\n |from: (it) => {\n |' + tmp + 'switch (it.status) {\n |' + prependIndent(joinToString(tmp_0, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientFrom$lambda($this)), Spacer_instance.is(2)) + '\n |' + Spacer_instance.is(2) + 'default:\n |' + Spacer_instance.is(3) + 'throw new Error(`Cannot internalize response with status: ${it.status}`);\n |' + Spacer_instance.is(1) + '}\n |}\n ');
726
- }
727
- function emitClientFromResponse($this, _this__u8e3s4) {
728
- var tmp = fixStatus(_this__u8e3s4.hq_1);
729
- var tmp_0 = Spacer_instance.is(1);
730
- var tmp_1 = Spacer_instance.is(2);
731
- var tmp_2 = fixStatus(_this__u8e3s4.hq_1);
732
- var tmp_3 = Spacer_instance.is(2);
733
- return trimMargin('\n |case ' + tmp + ':\n |' + tmp_0 + 'return {\n |' + tmp_1 + 'status: ' + tmp_2 + ',\n |' + tmp_3 + 'headers: {' + joinToString(_this__u8e3s4.iq_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientFromResponse$lambda($this)) + '},\n |' + Spacer_instance.is(2) + 'body: serialization.deserialize<' + emitReference($this, _this__u8e3s4) + '>(it.body)\n |' + Spacer_instance.is(1) + '};\n ');
734
- }
735
- function emitServer($this, _this__u8e3s4) {
736
- return trimMargin('\n |export const server:Wirespec.Server<Request, Response> = (serialization: Wirespec.Serialization) => ({\n |' + prependIndent(emitServerFrom($this, _this__u8e3s4), Spacer_instance.is(1)) + ',\n |' + prependIndent(emitServerTo($this, _this__u8e3s4), Spacer_instance.is(1)) + '\n |})\n ');
737
- }
738
- function emitServerFrom($this, _this__u8e3s4) {
739
- var tmp = Spacer_instance.is(1);
740
- var tmp_0 = Spacer_instance.is(2);
741
- // Inline function 'kotlin.text.uppercase' call
742
- // Inline function 'kotlin.js.asDynamic' call
743
- var tmp_1 = _this__u8e3s4.wp_1.a3_1.toUpperCase();
744
- var tmp_2 = Spacer_instance.is(2);
745
- var tmp_3 = get_indexedPathParams(_this__u8e3s4);
746
- var tmp_4 = prependIndent(joinToString(tmp_3, ',\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda($this)), Spacer_instance.is(3));
747
- var tmp_5 = Spacer_instance.is(2);
748
- var tmp_6 = Spacer_instance.is(2);
749
- var tmp_7 = joinToString(_this__u8e3s4.yp_1, ',\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_0($this));
750
- var tmp_8 = Spacer_instance.is(2);
751
- var tmp_9 = Spacer_instance.is(2);
752
- return trimMargin('\n |from: (it) => {\n |' + tmp + 'return {\n |' + tmp_0 + 'method: "' + tmp_1 + '",\n |' + tmp_2 + 'path: {\n |' + tmp_4 + '\n |' + tmp_5 + '},\n |' + tmp_6 + 'queries: {\n |' + tmp_7 + '\n |' + tmp_8 + '},\n |' + tmp_9 + 'headers: {\n |' + joinToString(_this__u8e3s4.zp_1, ',\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_1($this)) + '\n |' + Spacer_instance.is(2) + '},\n |' + Spacer_instance.is(2) + 'body: serialization.deserialize(it.body)\n |' + Spacer_instance.is(1) + '}\n |}\n ');
753
- }
754
- function emitServerTo($this, _this__u8e3s4) {
755
- var tmp = Spacer_instance.is(1);
756
- var tmp_0 = distinctByStatus(_this__u8e3s4.bq_1);
757
- return trimMargin('\n |to: (it) => {\n |' + tmp + 'switch (it.status) {\n |' + prependIndent(joinToString(tmp_0, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerTo$lambda($this)), Spacer_instance.is(2)) + '\n |' + Spacer_instance.is(1) + '}\n |}\n ');
758
- }
759
- function emitServerToResponse($this, _this__u8e3s4) {
760
- var tmp = fixStatus(_this__u8e3s4.hq_1);
761
- var tmp_0 = Spacer_instance.is(1);
762
- var tmp_1 = Spacer_instance.is(2);
763
- var tmp_2 = fixStatus(_this__u8e3s4.hq_1);
764
- var tmp_3 = Spacer_instance.is(2);
765
- return trimMargin('\n |case ' + tmp + ':\n |' + tmp_0 + 'return {\n |' + tmp_1 + 'status: ' + tmp_2 + ',\n |' + tmp_3 + 'headers: {\n |' + prependIndent(joinToString(_this__u8e3s4.iq_1, ',\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerToResponse$lambda($this)), Spacer_instance.is(3)) + '\n |' + Spacer_instance.is(2) + '} as Record<string, string>,\n |' + Spacer_instance.is(2) + 'body: serialization.serialize(it.body),\n |' + Spacer_instance.is(1) + '};\n ');
766
- }
767
- function emitType($this, _this__u8e3s4, name, block) {
768
- var tmp;
769
- if (_this__u8e3s4.r()) {
770
- tmp = Spacer_instance.toString() + 'type ' + name + ' = {}';
771
- } else {
772
- var tmp_0 = Spacer_instance.toString();
773
- tmp = trimMargin('\n |' + tmp_0 + 'type ' + name + ' = {\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitType$lambda(block)) + ',\n |' + Spacer_instance.toString() + '}\n ');
774
- }
775
- return tmp;
776
- }
777
- function emitName($this, _this__u8e3s4) {
778
- return 'Response' + Companion_instance_0.fr(_this__u8e3s4.hq_1);
779
- }
780
- function emitFunction_0($this, _this__u8e3s4, endpoint) {
781
- var tmp = Spacer_instance.toString();
782
- var tmp_0 = paramList(_this__u8e3s4, endpoint);
783
- var tmp_1 = joinToObject($this, tmp_0, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda($this));
784
- var tmp_2 = Spacer_instance.toString();
785
- // Inline function 'kotlin.takeIf' call
786
- var this_0 = paramList(_this__u8e3s4, endpoint);
787
- var tmp_3;
788
- // Inline function 'kotlin.collections.isNotEmpty' call
789
- if (!this_0.r()) {
790
- tmp_3 = this_0;
791
- } else {
792
- tmp_3 = null;
793
- }
794
- var tmp_4;
795
- if (tmp_3 == null) {
796
- tmp_4 = null;
797
- } else {
798
- // Inline function 'kotlin.run' call
799
- tmp_4 = 'params: RequestParams';
800
- }
801
- // Inline function 'kotlin.text.orEmpty' call
802
- var tmp0_elvis_lhs = tmp_4;
803
- var tmp_5 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
804
- var tmp_6 = Spacer_instance.is(2);
805
- var tmp_7 = get_pathParams(endpoint);
806
- var tmp_8 = joinToObject($this, tmp_7, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_0($this));
807
- var tmp_9 = Spacer_instance.is(2);
808
- var tmp_10 = endpoint.wp_1.toString();
809
- var tmp_11 = Spacer_instance.is(2);
810
- var tmp_12 = joinToObject($this, endpoint.yp_1, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_1($this));
811
- var tmp_13 = Spacer_instance.is(2);
812
- var tmp_14 = joinToObject($this, endpoint.zp_1, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_2($this));
813
- var tmp_15 = Spacer_instance.is(2);
814
- var tmp_16;
815
- if (_this__u8e3s4.eq_1 == null) {
816
- tmp_16 = null;
817
- } else {
818
- // Inline function 'kotlin.let' call
819
- tmp_16 = 'params.body';
820
- }
821
- var tmp2_elvis_lhs = tmp_16;
822
- return trimMargin('\n |' + tmp + 'export type RequestParams = ' + tmp_1 + '\n |' + tmp_2 + 'export const request = (' + tmp_5 + '): Request => ({\n |' + tmp_6 + 'path: ' + tmp_8 + ',\n |' + tmp_9 + 'method: "' + tmp_10 + '",\n |' + tmp_11 + 'queries: ' + tmp_12 + ',\n |' + tmp_13 + 'headers: ' + tmp_14 + ',\n |' + tmp_15 + 'body: ' + (tmp2_elvis_lhs == null ? 'undefined' : tmp2_elvis_lhs) + ',\n |' + Spacer_instance.toString() + '})\n ');
823
- }
824
- function emitFunction_1($this, _this__u8e3s4) {
825
- var tmp = Spacer_instance.toString();
826
- var tmp_0 = Companion_instance_0.fr(_this__u8e3s4.hq_1);
827
- var tmp_1 = paramList_0(_this__u8e3s4);
828
- var tmp_2 = joinToObject($this, tmp_1, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_3($this));
829
- var tmp_3 = Spacer_instance.toString();
830
- var tmp_4 = Companion_instance_0.fr(_this__u8e3s4.hq_1);
831
- // Inline function 'kotlin.takeIf' call
832
- var this_0 = paramList_0(_this__u8e3s4);
833
- var tmp_5;
834
- // Inline function 'kotlin.collections.isNotEmpty' call
835
- if (!this_0.r()) {
836
- tmp_5 = this_0;
837
- } else {
838
- tmp_5 = null;
839
- }
840
- var tmp_6;
841
- if (tmp_5 == null) {
842
- tmp_6 = null;
843
- } else {
844
- // Inline function 'kotlin.run' call
845
- tmp_6 = 'params: Response' + Companion_instance_0.fr(_this__u8e3s4.hq_1) + 'Params';
846
- }
847
- // Inline function 'kotlin.text.orEmpty' call
848
- var tmp0_elvis_lhs = tmp_6;
849
- var tmp_7 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
850
- var tmp_8 = Companion_instance_0.fr(_this__u8e3s4.hq_1);
851
- var tmp_9 = Spacer_instance.is(2);
852
- var tmp_10 = fixStatus(_this__u8e3s4.hq_1);
853
- var tmp_11 = Spacer_instance.is(2);
854
- var tmp_12 = joinToObject($this, _this__u8e3s4.iq_1, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_4($this));
855
- var tmp_13 = Spacer_instance.is(2);
856
- var tmp_14;
857
- if (_this__u8e3s4.jq_1 == null) {
858
- tmp_14 = null;
859
- } else {
860
- // Inline function 'kotlin.let' call
861
- tmp_14 = 'params.body';
862
- }
863
- var tmp2_elvis_lhs = tmp_14;
864
- return trimMargin('\n |' + tmp + 'export type Response' + tmp_0 + 'Params = ' + tmp_2 + '\n |' + tmp_3 + 'export const response' + tmp_4 + ' = (' + tmp_7 + '): Response' + tmp_8 + ' => ({\n |' + tmp_9 + 'status: ' + tmp_10 + ',\n |' + tmp_11 + 'headers: ' + tmp_12 + ',\n |' + tmp_13 + 'body: ' + (tmp2_elvis_lhs == null ? 'undefined' : tmp2_elvis_lhs) + ',\n |' + Spacer_instance.toString() + '})\n ');
865
- }
866
- function emitReference($this, _this__u8e3s4) {
867
- var tmp0_safe_receiver = _this__u8e3s4.jq_1;
868
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gq_1;
869
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.oq(tmp1_safe_receiver);
870
- return tmp2_elvis_lhs == null ? 'undefined' : tmp2_elvis_lhs;
871
- }
872
- function emitPathArray($this, _this__u8e3s4) {
873
- return joinToString(_this__u8e3s4.xp_1, ', ', '[', ']', VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitPathArray$lambda($this));
874
- }
875
- function emitType_0($this, _this__u8e3s4) {
876
- var tmp = Spacer_instance.toString();
877
- var tmp_0 = emitName($this, _this__u8e3s4);
878
- var tmp_1 = Spacer_instance.is(2);
879
- var tmp_2 = fixStatus(_this__u8e3s4.hq_1);
880
- var tmp_3 = Spacer_instance.is(2);
881
- return trimMargin('\n |' + tmp + 'export type ' + tmp_0 + ' = {\n |' + tmp_1 + 'status: ' + tmp_2 + '\n |' + tmp_3 + 'headers: {' + joinToString(_this__u8e3s4.iq_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitType$lambda_0($this)) + '}\n |' + Spacer_instance.is(2) + 'body: ' + emitReference($this, _this__u8e3s4) + '\n |' + Spacer_instance.toString() + '}\n ');
882
- }
883
- function emitReference_0($this, _this__u8e3s4) {
884
- var tmp0_safe_receiver = _this__u8e3s4.eq_1;
885
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gq_1;
886
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.oq(tmp1_safe_receiver);
887
- return tmp2_elvis_lhs == null ? 'undefined' : tmp2_elvis_lhs;
888
- }
889
- function emitType_1($this, _this__u8e3s4, endpoint) {
890
- return trimMargin('\n |' + Spacer_instance.toString() + 'export type Request = {\n |' + Spacer_instance.is(2) + 'path: Path\n |' + Spacer_instance.is(2) + 'method: "' + endpoint.wp_1.toString() + '"\n |' + Spacer_instance.is(2) + 'queries: Queries\n |' + Spacer_instance.is(2) + 'headers: Headers\n |' + Spacer_instance.is(2) + 'body: ' + emitReference_0($this, _this__u8e3s4) + '\n |' + Spacer_instance.toString() + '}\n ');
891
- }
892
- function emit_12($this, _this__u8e3s4) {
893
- return Spacer_instance.toString() + $this.or(_this__u8e3s4.cq_1) + ': ' + $this.oq(_this__u8e3s4.dq_1);
894
- }
895
- function emit_13($this, _this__u8e3s4) {
896
- return $this.or(_this__u8e3s4.ar_1) + (_this__u8e3s4.br_1.uu() ? '?' : '') + ': ' + $this.oq(_this__u8e3s4.br_1.wu(false));
897
- }
898
- function emitDeserialize($this, _this__u8e3s4) {
899
- return $this.or(_this__u8e3s4.ue_1.cq_1) + ': serialization.deserialize(it.path[' + _this__u8e3s4.te_1 + '])';
900
- }
901
- function emitDeserialize_0($this, _this__u8e3s4, fields, caseSensitive) {
902
- return caseSensitive ? $this.or(_this__u8e3s4.rp_1) + ': serialization.deserialize(it.' + fields + '[' + $this.or(_this__u8e3s4.rp_1) + '])' : $this.or(_this__u8e3s4.rp_1) + ': serialization.deserialize(Object.entries(it.' + fields + ').find(([key]) => key.toLowerCase() === ' + $this.or(lowercase($this, _this__u8e3s4.rp_1)) + ')?.[1])';
903
- }
904
- function emitDeserialize$default($this, _this__u8e3s4, fields, caseSensitive, $super) {
905
- caseSensitive = caseSensitive === VOID ? true : caseSensitive;
906
- return emitDeserialize_0($this, _this__u8e3s4, fields, caseSensitive);
907
- }
908
- function emitSerialize($this, _this__u8e3s4, fields) {
909
- return $this.or(_this__u8e3s4.rp_1) + ': serialization.serialize(it.' + fields + '[' + $this.or(_this__u8e3s4.rp_1) + '])';
910
- }
911
- function joinToObject($this, _this__u8e3s4, transform) {
912
- return joinToString(_this__u8e3s4, ', ', '{', '}', VOID, VOID, transform);
913
- }
914
- function emitHandleFunction($this, endpoint) {
915
- return Companion_instance_0.gr($this.t20(endpoint.vp_1)) + ': (request:Request) => Promise<Response>';
916
- }
917
- function lowercase($this, _this__u8e3s4) {
918
- // Inline function 'kotlin.text.lowercase' call
919
- // Inline function 'kotlin.js.asDynamic' call
920
- var tmp$ret$1 = _this__u8e3s4.l1().toLowerCase();
921
- return new FieldIdentifier(tmp$ret$1);
922
- }
923
- function TypeScriptEndpointDefinitionEmitter$emit$lambda(it) {
924
- // Inline function 'kotlin.text.trimStart' call
925
- return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
926
- }
927
- function TypeScriptEndpointDefinitionEmitter$emit$lambda_0(this$0) {
928
- return function (it) {
929
- return emit_12(this$0, it);
930
- };
931
- }
932
- function TypeScriptEndpointDefinitionEmitter$emit$lambda_1(this$0) {
933
- return function (it) {
934
- return this$0.nq(it);
935
- };
936
- }
937
- function TypeScriptEndpointDefinitionEmitter$emit$lambda_2(this$0) {
938
- return function (it) {
939
- return this$0.nq(it);
940
- };
941
- }
942
- function TypeScriptEndpointDefinitionEmitter$emit$lambda_3(this$0) {
943
- return function (it) {
944
- return emitType_0(this$0, it);
945
- };
946
- }
947
- function TypeScriptEndpointDefinitionEmitter$emit$lambda_4(this$0) {
948
- return function (it) {
949
- return emitName(this$0, it);
950
- };
951
- }
952
- function TypeScriptEndpointDefinitionEmitter$emit$lambda_5(this$0) {
953
- return function (it) {
954
- return emitFunction_1(this$0, it);
955
- };
956
- }
957
- function TypeScriptEndpointDefinitionEmitter$emit$lambda_6(this$0) {
958
- return function (it) {
959
- return emit_11(this$0, it);
960
- };
961
- }
962
- function TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda(this$0) {
963
- return function (it) {
964
- return emitSerialize(this$0, it, 'queries');
965
- };
966
- }
967
- function TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda_0(this$0) {
968
- return function (it) {
969
- return emitSerialize(this$0, it, 'headers');
970
- };
971
- }
972
- function TypeScriptEndpointDefinitionEmitter$emitClientFrom$lambda(this$0) {
973
- return function (it) {
974
- return emitClientFromResponse(this$0, it);
975
- };
976
- }
977
- function TypeScriptEndpointDefinitionEmitter$emitClientFromResponse$lambda(this$0) {
978
- return function (it) {
979
- return emitDeserialize_0(this$0, it, 'headers', false);
980
- };
981
- }
982
- function TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda(this$0) {
983
- return function (it) {
984
- return emitDeserialize(this$0, it);
985
- };
986
- }
987
- function TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_0(this$0) {
988
- return function (it) {
989
- return prependIndent(emitDeserialize$default(this$0, it, 'queries'), Spacer_instance.is(3));
990
- };
991
- }
992
- function TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_1(this$0) {
993
- return function (it) {
994
- return prependIndent(emitDeserialize_0(this$0, it, 'headers', false), Spacer_instance.is(3));
995
- };
996
- }
997
- function TypeScriptEndpointDefinitionEmitter$emitServerTo$lambda(this$0) {
998
- return function (it) {
999
- return emitServerToResponse(this$0, it);
1000
- };
1001
- }
1002
- function TypeScriptEndpointDefinitionEmitter$emitServerToResponse$lambda(this$0) {
1003
- return function (it) {
1004
- return emitSerialize(this$0, it, 'headers');
1005
- };
1006
- }
1007
- function TypeScriptEndpointDefinitionEmitter$emitType$lambda($block) {
1008
- return function (it) {
1009
- return Spacer_instance.is(1) + $block(it);
1010
- };
1011
- }
1012
- function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda(this$0) {
1013
- return function (it) {
1014
- return emit_13(this$0, it);
1015
- };
1016
- }
1017
- function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_0(this$0) {
1018
- return function (it) {
1019
- return this$0.or(it.cq_1) + ': params[' + this$0.or(it.cq_1) + ']';
1020
- };
1021
- }
1022
- function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_1(this$0) {
1023
- return function (it) {
1024
- return this$0.or(it.rp_1) + ': params[' + this$0.or(it.rp_1) + ']';
1025
- };
1026
- }
1027
- function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_2(this$0) {
1028
- return function (it) {
1029
- return this$0.or(it.rp_1) + ': params[' + this$0.or(it.rp_1) + ']';
1030
- };
1031
- }
1032
- function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_3(this$0) {
1033
- return function (it) {
1034
- return emit_13(this$0, it);
1035
- };
1036
- }
1037
- function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_4(this$0) {
1038
- return function (it) {
1039
- return this$0.or(it.rp_1) + ': params[' + this$0.or(it.rp_1) + ']';
1040
- };
1041
- }
1042
- function TypeScriptEndpointDefinitionEmitter$emitPathArray$lambda(this$0) {
1043
- return function (it) {
1044
- var tmp;
1045
- if (it instanceof Literal) {
1046
- tmp = '"' + it.yq_1 + '"';
1047
- } else {
1048
- if (it instanceof Param) {
1049
- tmp = 'serialization.serialize(it.path[' + this$0.or(it.cq_1) + '])';
1050
- } else {
1051
- noWhenBranchMatchedException();
1052
- }
1053
- }
1054
- return tmp;
1055
- };
1056
- }
1057
- function TypeScriptEndpointDefinitionEmitter$emitType$lambda_0(this$0) {
1058
- return function (it) {
1059
- return this$0.or(it.rp_1) + ': ' + this$0.oq(it.sp_1);
1060
- };
1061
- }
1062
- function TypeScriptEndpointDefinitionEmitter() {
1063
- }
1064
- function TypeScriptEnumDefinitionEmitter$emit$lambda(it) {
1065
- return '"' + it + '"';
1066
- }
1067
- function TypeScriptEnumDefinitionEmitter() {
1068
- }
1069
- function TypeScriptIdentifierEmitter() {
1070
- }
2
+ KProperty1ca4yb4wlo496 as KProperty1,
3
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
4
+ StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
5
+ charSequenceLength3278n89t01tmv as charSequenceLength,
6
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
7
+ isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
8
+ _Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
9
+ Unit_instance28fytmsmm6r23 as Unit_instance,
10
+ charCodeAt1yspne1d8erbm as charCodeAt,
11
+ toString3dhdjl9yf50de as toString,
12
+ toString1pkumu07cwy4m as toString_0,
13
+ substring3saq8ornu0luv as substring,
14
+ Regex_init_$Create$9xrx4twz2i6q as Regex_init_$Create$,
15
+ ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$,
16
+ first58ocm7j58k3q as first,
17
+ noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
18
+ protoOf180f3jzyo7rfj as protoOf,
19
+ getStringHashCode26igk1bx568vk as getStringHashCode,
20
+ getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,
21
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
22
+ listOf1jh22dvmctj1r as listOf,
23
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
24
+ mapCapacity1h45rc3eh9p2l as mapCapacity,
25
+ coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
26
+ LinkedHashMap_init_$Create$1s75e1k23v4xj as LinkedHashMap_init_$Create$,
27
+ removePrefix279df90bhrqqg as removePrefix,
28
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
29
+ listOfvhqybd2zx248 as listOf_0,
30
+ ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$_0,
31
+ to2cs3ny02qtbcb as to,
32
+ toMap1vec9topfei08 as toMap,
33
+ VOID3gxj6tk5isa35 as VOID,
34
+ emptyList1g2z5xcrvp2zy as emptyList,
35
+ plus310ted5e4i90h as plus,
36
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
37
+ equals2au1ep9vhcato as equals,
38
+ mapOf2zpbbmyqk8xpf as mapOf,
39
+ plus2m1vv33moko5t as plus_0,
40
+ startsWith26w8qjqapeeq6 as startsWith,
41
+ substringBefore3n7kj60w69hju as substringBefore,
42
+ endsWith3cq61xxngobwh as endsWith,
43
+ isInterface3d6p8outrmvmk as isInterface,
44
+ lazy2hsh8ze7j6ikd as lazy,
45
+ addAll1k27qatfgp3k5 as addAll,
46
+ LinkedHashMap_init_$Create$3t495nfs82xn as LinkedHashMap_init_$Create$_0,
47
+ joinToString1cxrrlmo0chqs as joinToString,
48
+ asSequence2phdjljfh9jhx as asSequence,
49
+ filterNot56uwv8hfomaa as filterNot,
50
+ mapsbvh18eqox7a as map,
51
+ distinct17vua5ffe1cfv as distinct,
52
+ toListx6x8nvfmvvht as toList,
53
+ LinkedHashSet_init_$Create$2lru2gvxodydo as LinkedHashSet_init_$Create$,
54
+ distinct10qe1scfdvu5k as distinct_0,
55
+ HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
56
+ toSet2orjxp16sotqu as toSet,
57
+ trimMarginhyd3fsmh8iev as trimMargin,
58
+ Collection1k04j3hzsbod0 as Collection,
59
+ substringAfterLastuw9v7gfiiihe as substringAfterLast,
60
+ toIntOrNull3w2d066r9pvwm as toIntOrNull,
61
+ ensureNotNull1e947j3ixpazm as ensureNotNull,
62
+ charArrayOf27f4r3dozbrk1 as charArrayOf,
63
+ trimEndvvzjdhan75g as trimEnd,
64
+ } from './kotlin-kotlin-stdlib.mjs';
65
+ import {
66
+ Nameoqr8dt2fim9d as Name,
67
+ TypeScriptGenerator_getInstance3w0ea8m4h2slw as TypeScriptGenerator_getInstance,
68
+ transformChildren2mszeagj5nq4c as transformChildren,
69
+ sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
70
+ Assignment3kcxc8wlcbmkn as Assignment,
71
+ ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
72
+ VariableReference2vlynnhaw1i64 as VariableReference,
73
+ SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
74
+ RawElement2yts1x2rbem1g as RawElement,
75
+ Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
76
+ Mainb4yvz4x0nrxd as Main,
77
+ Enumlszg09mwd24f as Enum,
78
+ Interface3pn84xq686t2r as Interface,
79
+ Namespace345pal554qu3j as Namespace,
80
+ Struct39wf79cwtn4ty as Struct,
81
+ File3dimy4iqmuock as File,
82
+ transformChildrend9p91tpcqdkx as transformChildren_0,
83
+ StringLiteral3ffeojfhsbsmg as StringLiteral,
84
+ Field354s1ceh5pvhf as Field,
85
+ RawExpression2bo7ldfrptjia as RawExpression,
86
+ FunctionCall30872kpnbr7op as FunctionCall,
87
+ transformChildren3n5cjwmxlhwx9 as transformChildren_1,
88
+ Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
89
+ Custom2si7lto3wompr as Custom,
90
+ String_instance3uxvo48ki208u as String_instance,
91
+ Literal50s1y3607cdv as Literal,
92
+ TransformScopeyrd3lf4zrk76 as TransformScope,
93
+ TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
94
+ transform3eti8i2bqvifx as transform,
95
+ Elementitq62jg6fid3 as Element,
96
+ convertnty9x0e63d0u as convert,
97
+ emit1oxjujel6f3jb as emit,
98
+ emitn3eihixilqyh as emit_0,
99
+ import5uhkz67bd8tt as import_0,
100
+ convertToGenerator2wzjrmaavxhph as convertToGenerator,
101
+ convertToGeneratorkggw47cqose7 as convertToGenerator_0,
102
+ convertToGenerator3rjr3azp4vdsx as convertToGenerator_1,
103
+ convertToGenerator2msmr3acdd5nx as convertToGenerator_2,
104
+ sanitizeNames2wqmyf8vafp9x as sanitizeNames,
105
+ collectCustomTypeNames373f3lwl9sqd5 as collectCustomTypeNames,
106
+ classifyValidatableFields11bv88x0ho39r as classifyValidatableFields,
107
+ convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
108
+ convert11ert2po54h1y as convert_0,
109
+ convert37aabdzvtv9vg as convert_1,
110
+ convert17zcptkz4mhr4 as convert_2,
111
+ convertConstraintkgpvomct0x0s as convertConstraint,
112
+ requestParameters1z8fdizgtviyb as requestParameters,
113
+ convert32tuiui3czihh as convert_3,
114
+ convert1cn4bolzoed8c as convert_4,
115
+ get_extensions31c4or738wbxz as get_extensions,
116
+ emit3bzdcd0f6nwtj as emit_1,
117
+ beforeGenerate3o8idb3hey1b0 as beforeGenerate,
118
+ IrEmitterh2m93ojzvkep as IrEmitter,
119
+ rawttvqxl50flj9 as raw,
120
+ Switch3a1zi3na98deu as Switch,
121
+ Integer1uwg1wvo5lp6z as Integer,
122
+ Case2i7oahw4alz6h as Case,
123
+ FieldCall1iz7z2fx2xo4p as FieldCall,
124
+ Parameteruqoxd4rzw7ga as Parameter,
125
+ Function21cuq8qizkin7 as Function,
126
+ ErrorStatement1fq19ynue37ia as ErrorStatement,
127
+ BinaryOp35p72iprkxis9 as BinaryOp,
128
+ } from './wirespec-src-compiler-ir.mjs';
129
+ import {
130
+ Paramvfwnys2w6aj1 as Param,
131
+ Bytes3eoc50vgt1uem as Bytes,
132
+ Boolean1fpfi8m5jt3fg as Boolean_0,
133
+ Number1mui0heypwdhp as Number_0,
134
+ Integer39lqx4uc63u28 as Integer_0,
135
+ String1czvr8pxnm6on as String_0,
136
+ Primitive1i8my14jkp3nk as Primitive,
137
+ Custom1lu6o8txpimqz as Custom_0,
138
+ Anyv7qdq63z63rc as Any,
139
+ Unit2z95clvxm08vr as Unit,
140
+ Iterable29qbzfup67wqp as Iterable,
141
+ Dict3g7w5wia7rncj as Dict,
142
+ FileExtension_TypeScript_getInstancebhrmnb4pwt10 as FileExtension_TypeScript_getInstance,
143
+ Companion_instance1a2xqc448tlhh as Companion_instance,
144
+ namespace2467cajrmgrc5 as namespace,
145
+ Emitted12h24rpo4uifw as Emitted,
146
+ plus3lrm73de10b42 as plus_1,
147
+ Unionccsavx6nrdr2 as Union,
148
+ Refined1lkzc0dg6wey7 as Refined,
149
+ Enum3l2iuc342kle6 as Enum_0,
150
+ Type12n1gx16iqtcu as Type,
151
+ plus14o24vdaiongg as plus_2,
152
+ importReferencesy4xv7r53sjjs as importReferences,
153
+ Literal331hu9r04vptz as Literal_0,
154
+ } from './wirespec-src-compiler-core.mjs';
155
+ import {
156
+ _NonEmptyList___get_all__impl__pmf5092svcdxelgy1aa as _NonEmptyList___get_all__impl__pmf509,
157
+ NonEmptyList3ak25ihy2gcvs as NonEmptyList,
158
+ _NonEmptyList___init__impl__fxd0xp3qwfhfa83yk9f as _NonEmptyList___init__impl__fxd0xp,
159
+ NonEmptyList__plus_impl_xqmb91y38uyofmba13 as NonEmptyList__plus_impl_xqmb9,
160
+ } from './arrow-arrow-core.mjs';
161
+ //region block: imports
162
+ var imul = Math.imul;
163
+ //endregion
164
+ //region block: pre-declaration
165
+ initMetadataForClass(EndpointParam, 'EndpointParam');
166
+ initMetadataForCompanion(Companion);
167
+ initMetadataForClass(TypeScriptIrEmitter, 'TypeScriptIrEmitter', TypeScriptIrEmitter, VOID, [IrEmitter]);
168
+ //endregion
1071
169
  function _get_sanitizationConfig__sns434($this) {
1072
- var tmp0 = $this.c21_1;
170
+ var tmp0 = $this.m1z_1;
1073
171
  var tmp = KProperty1;
1074
172
  // Inline function 'kotlin.getValue' call
1075
173
  getPropertyCallableRef('sanitizationConfig', 1, tmp, TypeScriptIrEmitter$_get_sanitizationConfig_$ref_f6f0bh(), null);
1076
- return tmp0.l1();
174
+ return tmp0.m1();
1077
175
  }
1078
176
  function _get_modelSanitizationConfig__vgg831($this) {
1079
- var tmp0 = $this.d21_1;
177
+ var tmp0 = $this.n1z_1;
1080
178
  var tmp = KProperty1;
1081
179
  // Inline function 'kotlin.getValue' call
1082
180
  getPropertyCallableRef('modelSanitizationConfig', 1, tmp, TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88(), null);
1083
- return tmp0.l1();
181
+ return tmp0.m1();
1084
182
  }
1085
183
  function sanitize($this, _this__u8e3s4) {
1086
- return '"' + _this__u8e3s4.l1() + '"';
184
+ return '"' + _this__u8e3s4.m1() + '"';
1087
185
  }
1088
- function sanitizeSymbol_1($this, _this__u8e3s4) {
186
+ function sanitizeSymbol($this, _this__u8e3s4) {
1089
187
  // Inline function 'kotlin.text.filter' call
1090
188
  // Inline function 'kotlin.text.filterTo' call
1091
189
  var destination = StringBuilder_init_$Create$();
@@ -1104,7 +202,7 @@ function sanitizeSymbol_1($this, _this__u8e3s4) {
1104
202
  return destination.toString();
1105
203
  }
1106
204
  function sanitizeKeywords($this, _this__u8e3s4) {
1107
- return Companion_getInstance_0().f21_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
205
+ return Companion_getInstance_0().l1x().v1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
1108
206
  }
1109
207
  function firstToLower($this, _this__u8e3s4) {
1110
208
  // Inline function 'kotlin.text.replaceFirstChar' call
@@ -1115,18 +213,18 @@ function firstToLower($this, _this__u8e3s4) {
1115
213
  var this_0 = charCodeAt(_this__u8e3s4, 0);
1116
214
  // Inline function 'kotlin.js.asDynamic' call
1117
215
  // Inline function 'kotlin.js.unsafeCast' call
1118
- var tmp$ret$4 = toString_0(this_0).toLowerCase();
1119
- tmp = toString(tmp$ret$4) + substring(_this__u8e3s4, 1);
216
+ var tmp$ret$4 = toString(this_0).toLowerCase();
217
+ tmp = toString_0(tmp$ret$4) + substring(_this__u8e3s4, 1);
1120
218
  } else {
1121
219
  tmp = _this__u8e3s4;
1122
220
  }
1123
221
  return tmp;
1124
222
  }
1125
223
  function sanitizeParamName($this, identifier) {
1126
- var tmp0 = identifier.l1();
224
+ var tmp0 = identifier.m1();
1127
225
  // Inline function 'kotlin.text.split' call
1128
226
  // Inline function 'kotlin.collections.filter' call
1129
- var tmp0_0 = Regex_init_$Create$('[.\\s-]+').zc(tmp0, 0);
227
+ var tmp0_0 = Regex_init_$Create$('[.\\s-]+').ad(tmp0, 0);
1130
228
  // Inline function 'kotlin.collections.filterTo' call
1131
229
  var destination = ArrayList_init_$Create$();
1132
230
  var _iterator__ex2g4s = tmp0_0.t();
@@ -1138,8 +236,8 @@ function sanitizeParamName($this, identifier) {
1138
236
  }
1139
237
  }
1140
238
  var parts = destination;
1141
- var name = parts.a1() > 1 ? (new Name(parts)).u1m() : identifier.l1();
1142
- return sanitizeKeywords($this, sanitizeSymbol_1($this, name));
239
+ var name = parts.b1() > 1 ? (new Name(parts)).j1m() : identifier.m1();
240
+ return sanitizeKeywords($this, sanitizeSymbol($this, name));
1143
241
  }
1144
242
  function buildEndpointParams($this, endpoint) {
1145
243
  // Inline function 'kotlin.collections.buildList' call
@@ -1147,7 +245,7 @@ function buildEndpointParams($this, endpoint) {
1147
245
  // Inline function 'kotlin.apply' call
1148
246
  var this_0 = ArrayList_init_$Create$();
1149
247
  // Inline function 'kotlin.collections.filterIsInstance' call
1150
- var tmp0 = endpoint.xp_1;
248
+ var tmp0 = endpoint.gq_1;
1151
249
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1152
250
  var destination = ArrayList_init_$Create$();
1153
251
  var _iterator__ex2g4s = tmp0.t();
@@ -1161,36 +259,36 @@ function buildEndpointParams($this, endpoint) {
1161
259
  var _iterator__ex2g4s_0 = destination.t();
1162
260
  while (_iterator__ex2g4s_0.u()) {
1163
261
  var element_0 = _iterator__ex2g4s_0.v();
1164
- this_0.x(new EndpointParam(sanitizeParamName($this, element_0.cq_1), emitTypeScriptReference($this, element_0.dq_1.wu(false)), element_0.dq_1.uu()));
262
+ this_0.x(new EndpointParam(sanitizeParamName($this, element_0.lq_1), emitTypeScriptReference($this, element_0.mq_1.xu(false)), element_0.mq_1.vu()));
1165
263
  }
1166
264
  // Inline function 'kotlin.collections.forEach' call
1167
- var _iterator__ex2g4s_1 = endpoint.yp_1.t();
265
+ var _iterator__ex2g4s_1 = endpoint.hq_1.t();
1168
266
  while (_iterator__ex2g4s_1.u()) {
1169
267
  var element_1 = _iterator__ex2g4s_1.v();
1170
- this_0.x(new EndpointParam(sanitizeParamName($this, element_1.rp_1), emitTypeScriptReference($this, element_1.sp_1.wu(false)), element_1.sp_1.uu()));
268
+ this_0.x(new EndpointParam(sanitizeParamName($this, element_1.aq_1), emitTypeScriptReference($this, element_1.bq_1.xu(false)), element_1.bq_1.vu()));
1171
269
  }
1172
270
  // Inline function 'kotlin.collections.forEach' call
1173
- var _iterator__ex2g4s_2 = endpoint.zp_1.t();
271
+ var _iterator__ex2g4s_2 = endpoint.iq_1.t();
1174
272
  while (_iterator__ex2g4s_2.u()) {
1175
273
  var element_2 = _iterator__ex2g4s_2.v();
1176
- this_0.x(new EndpointParam(sanitizeParamName($this, element_2.rp_1), emitTypeScriptReference($this, element_2.sp_1.wu(false)), element_2.sp_1.uu()));
274
+ this_0.x(new EndpointParam(sanitizeParamName($this, element_2.aq_1), emitTypeScriptReference($this, element_2.bq_1.xu(false)), element_2.bq_1.vu()));
1177
275
  }
1178
- var tmp0_safe_receiver = first(endpoint.aq_1).eq_1;
276
+ var tmp0_safe_receiver = first(endpoint.jq_1).nq_1;
1179
277
  if (tmp0_safe_receiver == null)
1180
278
  null;
1181
279
  else {
1182
280
  // Inline function 'kotlin.let' call
1183
- this_0.x(new EndpointParam('body', emitTypeScriptReference($this, tmp0_safe_receiver.gq_1.wu(false)), tmp0_safe_receiver.gq_1.uu()));
281
+ this_0.x(new EndpointParam('body', emitTypeScriptReference($this, tmp0_safe_receiver.pq_1.xu(false)), tmp0_safe_receiver.pq_1.vu()));
1184
282
  }
1185
- return this_0.o5();
283
+ return this_0.p5();
1186
284
  }
1187
285
  function emitTypeScriptReference($this, ref) {
1188
286
  var tmp;
1189
287
  if (ref instanceof Dict) {
1190
- tmp = 'Record<string, ' + emitTypeScriptReference($this, ref.so_1) + '>';
288
+ tmp = 'Record<string, ' + emitTypeScriptReference($this, ref.bp_1) + '>';
1191
289
  } else {
1192
290
  if (ref instanceof Iterable) {
1193
- tmp = emitTypeScriptReference($this, ref.po_1) + '[]';
291
+ tmp = emitTypeScriptReference($this, ref.yo_1) + '[]';
1194
292
  } else {
1195
293
  if (ref instanceof Unit) {
1196
294
  tmp = 'undefined';
@@ -1198,16 +296,16 @@ function emitTypeScriptReference($this, ref) {
1198
296
  if (ref instanceof Any) {
1199
297
  tmp = 'any';
1200
298
  } else {
1201
- if (ref instanceof Custom) {
1202
- tmp = sanitizeSymbol_1($this, ref.cv_1);
299
+ if (ref instanceof Custom_0) {
300
+ tmp = sanitizeSymbol($this, ref.dv_1);
1203
301
  } else {
1204
302
  if (ref instanceof Primitive) {
1205
- var tmp1_subject = ref.gv_1;
303
+ var tmp1_subject = ref.ot_1;
1206
304
  var tmp_0;
1207
305
  if (tmp1_subject instanceof String_0) {
1208
306
  tmp_0 = 'string';
1209
307
  } else {
1210
- if (tmp1_subject instanceof Integer) {
308
+ if (tmp1_subject instanceof Integer_0) {
1211
309
  tmp_0 = 'number';
1212
310
  } else {
1213
311
  if (tmp1_subject instanceof Number_0) {
@@ -1235,20 +333,20 @@ function emitTypeScriptReference($this, ref) {
1235
333
  }
1236
334
  }
1237
335
  // Inline function 'kotlin.let' call
1238
- return tmp + (ref.uu() ? ' | undefined' : '');
336
+ return tmp + (ref.vu() ? ' | undefined' : '');
1239
337
  }
1240
338
  function EndpointParam(name, type, nullable) {
1241
- this.g21_1 = name;
1242
- this.h21_1 = type;
1243
- this.i21_1 = nullable;
339
+ this.q1z_1 = name;
340
+ this.r1z_1 = type;
341
+ this.s1z_1 = nullable;
1244
342
  }
1245
343
  protoOf(EndpointParam).toString = function () {
1246
- return 'EndpointParam(name=' + this.g21_1 + ', type=' + this.h21_1 + ', nullable=' + this.i21_1 + ')';
344
+ return 'EndpointParam(name=' + this.q1z_1 + ', type=' + this.r1z_1 + ', nullable=' + this.s1z_1 + ')';
1247
345
  };
1248
346
  protoOf(EndpointParam).hashCode = function () {
1249
- var result = getStringHashCode(this.g21_1);
1250
- result = imul(result, 31) + getStringHashCode(this.h21_1) | 0;
1251
- result = imul(result, 31) + getBooleanHashCode(this.i21_1) | 0;
347
+ var result = getStringHashCode(this.q1z_1);
348
+ result = imul(result, 31) + getStringHashCode(this.r1z_1) | 0;
349
+ result = imul(result, 31) + getBooleanHashCode(this.s1z_1) | 0;
1252
350
  return result;
1253
351
  };
1254
352
  protoOf(EndpointParam).equals = function (other) {
@@ -1256,20 +354,21 @@ protoOf(EndpointParam).equals = function (other) {
1256
354
  return true;
1257
355
  if (!(other instanceof EndpointParam))
1258
356
  return false;
1259
- if (!(this.g21_1 === other.g21_1))
357
+ if (!(this.q1z_1 === other.q1z_1))
1260
358
  return false;
1261
- if (!(this.h21_1 === other.h21_1))
359
+ if (!(this.r1z_1 === other.r1z_1))
1262
360
  return false;
1263
- if (!(this.i21_1 === other.i21_1))
361
+ if (!(this.s1z_1 === other.s1z_1))
1264
362
  return false;
1265
363
  return true;
1266
364
  };
1267
365
  function Companion() {
1268
- Companion_instance_1 = this;
366
+ Companion_instance_0 = this;
367
+ this.o1z_1 = TypeScriptGenerator_getInstance();
1269
368
  var tmp = this;
1270
369
  // Inline function 'kotlin.collections.associateWith' call
1271
370
  var this_0 = listOf(['GeneratorFieldString', 'GeneratorFieldInteger64', 'GeneratorFieldInteger32', 'GeneratorFieldNumber64', 'GeneratorFieldNumber32', 'GeneratorFieldBoolean', 'GeneratorFieldBytes', 'GeneratorFieldEnum', 'GeneratorFieldUnion', 'GeneratorFieldArray', 'GeneratorFieldNullable', 'GeneratorFieldShape', 'GeneratorFieldDict']);
1272
- var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16));
371
+ var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16));
1273
372
  // Inline function 'kotlin.collections.associateWithTo' call
1274
373
  var _iterator__ex2g4s = this_0.t();
1275
374
  while (_iterator__ex2g4s.u()) {
@@ -1277,29 +376,31 @@ function Companion() {
1277
376
  // Inline function 'kotlin.text.lowercase' call
1278
377
  // Inline function 'kotlin.js.asDynamic' call
1279
378
  var tmp$ret$2 = removePrefix(element, 'GeneratorField').toLowerCase();
1280
- result.s2(element, tmp$ret$2);
379
+ result.t2(element, tmp$ret$2);
1281
380
  }
1282
- tmp.e21_1 = result;
1283
- this.f21_1 = setOf(['break', 'case', 'catch', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'class', 'const', 'enum', 'export', 'extends', 'import', 'super', 'implements', 'interface', 'let', 'package', 'private', 'protected', 'public', 'static', 'yield', 'type', 'async', 'await']);
381
+ tmp.p1z_1 = result;
1284
382
  }
1285
- var Companion_instance_1;
383
+ protoOf(Companion).l1x = function () {
384
+ return this.o1z_1.x1w_1;
385
+ };
386
+ var Companion_instance_0;
1286
387
  function Companion_getInstance_0() {
1287
- if (Companion_instance_1 == null)
388
+ if (Companion_instance_0 == null)
1288
389
  new Companion();
1289
- return Companion_instance_1;
390
+ return Companion_instance_0;
1290
391
  }
1291
392
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
1292
393
  return it;
1293
394
  }
1294
395
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
1295
396
  return function (name) {
1296
- var sanitized = name.q1h_1.a1() > 1 ? name.u1m() : sanitizeSymbol_1(this$0, name.o1j());
397
+ var sanitized = name.v1g_1.b1() > 1 ? name.j1m() : sanitizeSymbol(this$0, name.w1i());
1297
398
  return new Name(listOf_0(sanitized));
1298
399
  };
1299
400
  }
1300
401
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
1301
402
  return function (name) {
1302
- var sanitized = name.q1h_1.a1() > 1 ? name.u1m() : sanitizeSymbol_1(this$0, name.o1j());
403
+ var sanitized = name.v1g_1.b1() > 1 ? name.j1m() : sanitizeSymbol(this$0, name.w1i());
1303
404
  return new Name(listOf_0(sanitized));
1304
405
  };
1305
406
  }
@@ -1325,29 +426,29 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0)
1325
426
  return function (stmt, tr) {
1326
427
  var tmp;
1327
428
  if (stmt instanceof VariableReference) {
1328
- tmp = new VariableReference(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.o1p_1));
429
+ tmp = new VariableReference(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.r1n_1));
1329
430
  } else {
1330
431
  if (stmt instanceof ConstructorStatement) {
1331
- var tmp_0 = tr.b1v(stmt.w1n_1);
432
+ var tmp_0 = tr.i1v(stmt.o1n_1);
1332
433
  // Inline function 'kotlin.collections.map' call
1333
- var this_0 = stmt.x1n_1;
434
+ var this_0 = stmt.p1n_1;
1334
435
  // Inline function 'kotlin.collections.mapTo' call
1335
- var destination = ArrayList_init_$Create$_0(this_0.a1());
436
+ var destination = ArrayList_init_$Create$_0(this_0.b1());
1336
437
  // Inline function 'kotlin.collections.iterator' call
1337
- var _iterator__ex2g4s = this_0.j1().t();
438
+ var _iterator__ex2g4s = this_0.k1().t();
1338
439
  while (_iterator__ex2g4s.u()) {
1339
440
  var item = _iterator__ex2g4s.v();
1340
441
  // Inline function 'kotlin.collections.component1' call
1341
- var key = item.k1();
442
+ var key = item.l1();
1342
443
  // Inline function 'kotlin.collections.component2' call
1343
- var value = item.l1();
1344
- var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), key), tr.e1v(value));
444
+ var value = item.m1();
445
+ var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), key), tr.l1v(value));
1345
446
  destination.x(tmp$ret$3);
1346
447
  }
1347
448
  tmp = new ConstructorStatement(tmp_0, toMap(destination));
1348
449
  } else {
1349
450
  if (stmt instanceof Assignment) {
1350
- tmp = new Assignment(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.r1p_1), tr.e1v(stmt.s1p_1), stmt.t1p_1);
451
+ tmp = new Assignment(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.i1q_1), tr.l1v(stmt.j1q_1), stmt.k1q_1);
1351
452
  } else {
1352
453
  tmp = transformChildren(stmt, tr);
1353
454
  }
@@ -1358,7 +459,7 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0)
1358
459
  }
1359
460
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1360
461
  return function () {
1361
- var tmp0_reservedKeywords = Companion_getInstance_0().f21_1;
462
+ var tmp0_reservedKeywords = Companion_getInstance_0().l1x();
1362
463
  var tmp = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1363
464
  var tmp_0 = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
1364
465
  var tmp_1 = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
@@ -1372,7 +473,7 @@ function TypeScriptIrEmitter$_get_sanitizationConfig_$ref_f6f0bh() {
1372
473
  };
1373
474
  }
1374
475
  function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
1375
- return new Name(listOf_0(name.o1j()));
476
+ return new Name(listOf_0(name.w1i()));
1376
477
  }
1377
478
  function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(it) {
1378
479
  return it;
@@ -1381,7 +482,7 @@ function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
1381
482
  return function () {
1382
483
  var tmp = _get_sanitizationConfig__sns434(this$0);
1383
484
  var tmp_0 = TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
1384
- return tmp.w1w(VOID, VOID, tmp_0, VOID, TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0);
485
+ return tmp.j1x(VOID, VOID, tmp_0, VOID, TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0);
1385
486
  };
1386
487
  }
1387
488
  function TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88() {
@@ -1392,11 +493,40 @@ function TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88() {
1392
493
  function TypeScriptIrEmitter$emitShared$lambda(element, transformer) {
1393
494
  var tmp;
1394
495
  if (element instanceof Namespace) {
1395
- var injected = element.f1o_1.equals(Companion_getInstance().s1h('Wirespec')) ? listOf_0(new RawElement('export type Type = string')) : emptyList();
496
+ var injected = element.y1n_1.equals(Companion_getInstance().x1g('Wirespec')) ? listOf_0(new RawElement('export type Type = string')) : emptyList();
1396
497
  var tmp_0;
1397
498
  // Inline function 'kotlin.collections.isNotEmpty' call
1398
499
  if (!injected.r()) {
1399
- tmp_0 = withElements(element, plus_1(injected, element.b1o()));
500
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
501
+ var elements = plus(injected, element.u1n());
502
+ var tmp_1;
503
+ if (element instanceof File) {
504
+ tmp_1 = element.w1n(VOID, elements);
505
+ } else {
506
+ if (element instanceof Struct) {
507
+ tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
508
+ } else {
509
+ if (element instanceof Namespace) {
510
+ tmp_1 = element.d1o(VOID, elements);
511
+ } else {
512
+ if (element instanceof Interface) {
513
+ tmp_1 = element.m1o(VOID, elements);
514
+ } else {
515
+ if (element instanceof Enum) {
516
+ tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
517
+ } else {
518
+ if (element instanceof Main) {
519
+ tmp_1 = element;
520
+ } else {
521
+ tmp_1 = element;
522
+ }
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
528
+ var tmp_2 = tmp_1;
529
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1400
530
  } else {
1401
531
  tmp_0 = element;
1402
532
  }
@@ -1411,11 +541,40 @@ function TypeScriptIrEmitter$emitShared$lambda_0($api) {
1411
541
  return function (element, transformer) {
1412
542
  var tmp;
1413
543
  if (element instanceof Namespace) {
1414
- var injected = element.f1o_1.equals(Companion_getInstance().s1h('Wirespec')) ? listOf_0(new RawElement($api)) : emptyList();
544
+ var injected = element.y1n_1.equals(Companion_getInstance().x1g('Wirespec')) ? listOf_0(new RawElement($api)) : emptyList();
1415
545
  var tmp_0;
1416
546
  // Inline function 'kotlin.collections.isNotEmpty' call
1417
547
  if (!injected.r()) {
1418
- tmp_0 = withElements(element, plus_1(element.b1o(), injected));
548
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
549
+ var elements = plus(element.u1n(), injected);
550
+ var tmp_1;
551
+ if (element instanceof File) {
552
+ tmp_1 = element.w1n(VOID, elements);
553
+ } else {
554
+ if (element instanceof Struct) {
555
+ tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
556
+ } else {
557
+ if (element instanceof Namespace) {
558
+ tmp_1 = element.d1o(VOID, elements);
559
+ } else {
560
+ if (element instanceof Interface) {
561
+ tmp_1 = element.m1o(VOID, elements);
562
+ } else {
563
+ if (element instanceof Enum) {
564
+ tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
565
+ } else {
566
+ if (element instanceof Main) {
567
+ tmp_1 = element;
568
+ } else {
569
+ tmp_1 = element;
570
+ }
571
+ }
572
+ }
573
+ }
574
+ }
575
+ }
576
+ var tmp_2 = tmp_1;
577
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1419
578
  } else {
1420
579
  tmp_0 = element;
1421
580
  }
@@ -1430,13 +589,13 @@ function TypeScriptIrEmitter$emitShared$lambda_0($api) {
1430
589
  function TypeScriptIrEmitter$emitShared$lambda_1(element, transformer) {
1431
590
  var tmp;
1432
591
  if (element instanceof Struct) {
1433
- var tmp0_safe_receiver = Companion_getInstance_0().e21_1.p2(element.k1o_1.o1j());
592
+ var tmp0_safe_receiver = Companion_getInstance_0().p1z_1.q2(element.s1p_1.w1i());
1434
593
  var tmp_0;
1435
594
  if (tmp0_safe_receiver == null) {
1436
595
  tmp_0 = null;
1437
596
  } else {
1438
597
  // Inline function 'kotlin.let' call
1439
- tmp_0 = element.r1o(VOID, plus_1(listOf_0(new Field(Companion_getInstance().s1h('kind'), new StringLiteral(tmp0_safe_receiver))), element.l1o_1));
598
+ tmp_0 = element.d1q(VOID, plus(listOf_0(new Field(Companion_getInstance().x1g('kind'), new StringLiteral(tmp0_safe_receiver))), element.t1p_1));
1440
599
  }
1441
600
  var tmp1_elvis_lhs = tmp_0;
1442
601
  tmp = tmp1_elvis_lhs == null ? element : tmp1_elvis_lhs;
@@ -1447,7 +606,7 @@ function TypeScriptIrEmitter$emitShared$lambda_1(element, transformer) {
1447
606
  return transformChildren_0(transformed, transformer);
1448
607
  }
1449
608
  function TypeScriptIrEmitter$emit$lambda(it) {
1450
- return 'export {' + it.nr().l1() + "} from './" + it.nr().l1() + "'";
609
+ return 'export {' + it.gr().m1() + "} from './" + it.gr().m1() + "'";
1451
610
  }
1452
611
  function TypeScriptIrEmitter$emitGenerator$lambda($definition) {
1453
612
  return function (expr, t) {
@@ -1456,24 +615,24 @@ function TypeScriptIrEmitter$emitGenerator$lambda($definition) {
1456
615
  var tmp_1;
1457
616
  var tmp_2;
1458
617
  if (expr instanceof FunctionCall) {
1459
- var tmp_3 = expr.c1n_1;
618
+ var tmp_3 = expr.r1m_1;
1460
619
  tmp_2 = tmp_3 instanceof RawExpression;
1461
620
  } else {
1462
621
  tmp_2 = false;
1463
622
  }
1464
623
  if (tmp_2) {
1465
- var tmp_4 = expr.c1n_1;
1466
- tmp_1 = (tmp_4 instanceof RawExpression ? tmp_4 : THROW_CCE()).q1p_1 === $definition.yr_1.l1();
624
+ var tmp_4 = expr.r1m_1;
625
+ tmp_1 = (tmp_4 instanceof RawExpression ? tmp_4 : THROW_CCE()).h1q_1 === $definition.rr_1.m1();
1467
626
  } else {
1468
627
  tmp_1 = false;
1469
628
  }
1470
629
  if (tmp_1) {
1471
- tmp_0 = expr.e1n_1.equals(Companion_getInstance().s1h('valueOf'));
630
+ tmp_0 = expr.t1m_1.equals(Companion_getInstance().x1g('valueOf'));
1472
631
  } else {
1473
632
  tmp_0 = false;
1474
633
  }
1475
634
  if (tmp_0) {
1476
- var tmp0_elvis_lhs = expr.f1n_1.p2(Companion_getInstance().s1h('label'));
635
+ var tmp0_elvis_lhs = expr.u1m_1.q2(Companion_getInstance().x1g('label'));
1477
636
  tmp = tmp0_elvis_lhs == null ? expr : tmp0_elvis_lhs;
1478
637
  } else {
1479
638
  tmp = transformChildren_1(expr, t);
@@ -1486,12 +645,12 @@ function TypeScriptIrEmitter$emitGenerator$lambda_0($definition) {
1486
645
  var tmp;
1487
646
  var tmp_0;
1488
647
  if (expr instanceof ConstructorStatement) {
1489
- tmp_0 = equals(expr.w1n_1, Custom_init_$Create$($definition.tr_1.l1()));
648
+ tmp_0 = equals(expr.o1n_1, Custom_init_$Create$($definition.mr_1.m1()));
1490
649
  } else {
1491
650
  tmp_0 = false;
1492
651
  }
1493
652
  if (tmp_0) {
1494
- var tmp0_elvis_lhs = expr.x1n_1.p2(Companion_getInstance().s1h('value'));
653
+ var tmp0_elvis_lhs = expr.p1n_1.q2(Companion_getInstance().x1g('value'));
1495
654
  tmp = tmp0_elvis_lhs == null ? expr : tmp0_elvis_lhs;
1496
655
  } else {
1497
656
  tmp = transformChildren_1(expr, t);
@@ -1502,37 +661,37 @@ function TypeScriptIrEmitter$emitGenerator$lambda_0($definition) {
1502
661
  function TypeScriptIrEmitter$emitGenerator$lambda_1(expr, t) {
1503
662
  var tmp;
1504
663
  if (expr instanceof ConstructorStatement) {
1505
- var tmp_0 = expr.w1n_1;
1506
- var tmp0_safe_receiver = tmp_0 instanceof Custom_0 ? tmp_0 : null;
1507
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m1j_1;
1508
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o1j();
664
+ var tmp_0 = expr.o1n_1;
665
+ var tmp0_safe_receiver = tmp_0 instanceof Custom ? tmp_0 : null;
666
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1i_1;
667
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.w1i();
1509
668
  var typeName = tmp2_safe_receiver == null ? null : removePrefix(tmp2_safe_receiver, 'Wirespec.');
1510
669
  var tmp_1;
1511
670
  if (typeName == null) {
1512
671
  tmp_1 = null;
1513
672
  } else {
1514
673
  // Inline function 'kotlin.let' call
1515
- tmp_1 = Companion_getInstance_0().e21_1.p2(typeName);
674
+ tmp_1 = Companion_getInstance_0().p1z_1.q2(typeName);
1516
675
  }
1517
676
  var kind = tmp_1;
1518
677
  var tmp_2;
1519
678
  if (!(kind == null)) {
1520
- var tmp_3 = mapOf(to(Companion_getInstance().s1h('kind'), new Literal_0(kind, String_instance)));
679
+ var tmp_3 = mapOf(to(Companion_getInstance().x1g('kind'), new Literal(kind, String_instance)));
1521
680
  // Inline function 'kotlin.collections.mapValues' call
1522
- var this_0 = expr.x1n_1;
681
+ var this_0 = expr.p1n_1;
1523
682
  // Inline function 'kotlin.collections.mapValuesTo' call
1524
- var destination = LinkedHashMap_init_$Create$_0(mapCapacity(this_0.a1()));
683
+ var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
1525
684
  // Inline function 'kotlin.collections.associateByTo' call
1526
- var _iterator__ex2g4s = this_0.j1().t();
685
+ var _iterator__ex2g4s = this_0.k1().t();
1527
686
  while (_iterator__ex2g4s.u()) {
1528
687
  var element = _iterator__ex2g4s.v();
1529
- var tmp_4 = element.k1();
688
+ var tmp_4 = element.l1();
1530
689
  // Inline function 'kotlin.collections.component2' call
1531
- var v = element.l1();
1532
- var tmp$ret$4 = t.e1v(v);
1533
- destination.s2(tmp_4, tmp$ret$4);
690
+ var v = element.m1();
691
+ var tmp$ret$4 = t.l1v(v);
692
+ destination.t2(tmp_4, tmp$ret$4);
1534
693
  }
1535
- tmp_2 = new ConstructorStatement(expr.w1n_1, plus_2(tmp_3, destination));
694
+ tmp_2 = new ConstructorStatement(expr.o1n_1, plus_0(tmp_3, destination));
1536
695
  } else {
1537
696
  tmp_2 = transformChildren(expr, t);
1538
697
  }
@@ -1559,17 +718,17 @@ function TypeScriptIrEmitter$emitGenerator$lambda_5($generatorOwnName, $generato
1559
718
  var tmp_0;
1560
719
  var tmp_1;
1561
720
  if (expr instanceof RawExpression) {
1562
- tmp_1 = endsWith(expr.q1p_1, 'Generator');
721
+ tmp_1 = endsWith(expr.h1q_1, 'Generator');
1563
722
  } else {
1564
723
  tmp_1 = false;
1565
724
  }
1566
725
  if (tmp_1) {
1567
- tmp_0 = !(expr.q1p_1 === $generatorOwnName);
726
+ tmp_0 = !(expr.h1q_1 === $generatorOwnName);
1568
727
  } else {
1569
728
  tmp_0 = false;
1570
729
  }
1571
730
  if (tmp_0) {
1572
- $generatorRefs.x(expr.q1p_1);
731
+ $generatorRefs.x(expr.h1q_1);
1573
732
  tmp = Unit_instance;
1574
733
  }
1575
734
  return transformChildren_1(expr, t);
@@ -1583,7 +742,36 @@ function TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint) {
1583
742
  var tmp_0;
1584
743
  // Inline function 'kotlin.collections.isNotEmpty' call
1585
744
  if (!injected.r()) {
1586
- tmp_0 = withElements(element, plus_1(element.b1o(), injected));
745
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
746
+ var elements = plus(element.u1n(), injected);
747
+ var tmp_1;
748
+ if (element instanceof File) {
749
+ tmp_1 = element.w1n(VOID, elements);
750
+ } else {
751
+ if (element instanceof Struct) {
752
+ tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
753
+ } else {
754
+ if (element instanceof Namespace) {
755
+ tmp_1 = element.d1o(VOID, elements);
756
+ } else {
757
+ if (element instanceof Interface) {
758
+ tmp_1 = element.m1o(VOID, elements);
759
+ } else {
760
+ if (element instanceof Enum) {
761
+ tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
762
+ } else {
763
+ if (element instanceof Main) {
764
+ tmp_1 = element;
765
+ } else {
766
+ tmp_1 = element;
767
+ }
768
+ }
769
+ }
770
+ }
771
+ }
772
+ }
773
+ var tmp_2 = tmp_1;
774
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1587
775
  } else {
1588
776
  tmp_0 = element;
1589
777
  }
@@ -1602,14 +790,14 @@ function emit$injectApiConst(_this__u8e3s4, $endpoint) {
1602
790
  var tmp = scope;
1603
791
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1604
792
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1605
- var this_0 = scope.j1v_1;
793
+ var this_0 = scope.q1v_1;
1606
794
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1607
795
  // Inline function 'kotlin.apply' call
1608
796
  var this_1 = new TransformerBuilder();
1609
- this_1.c1j(TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint));
1610
- var tmp$ret$2 = this_1.d1j();
1611
- tmp.j1v_1 = transform(this_0, tmp$ret$2);
1612
- var tmp_0 = scope.j1v_1;
797
+ this_1.k1i(TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint));
798
+ var tmp$ret$2 = this_1.l1i();
799
+ tmp.q1v_1 = transform(this_0, tmp$ret$2);
800
+ var tmp_0 = scope.q1v_1;
1613
801
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1614
802
  }
1615
803
  function emit$applyCallParamsIfNeeded(_this__u8e3s4, hasRequestParams) {
@@ -1617,27 +805,27 @@ function emit$applyCallParamsIfNeeded(_this__u8e3s4, hasRequestParams) {
1617
805
  }
1618
806
  function TypeScriptIrEmitter$emitClient$lambda(this$0) {
1619
807
  return function (it) {
1620
- var methodName = firstToLower(this$0, it.vp_1.l1());
808
+ var methodName = firstToLower(this$0, it.eq_1.m1());
1621
809
  return ' ...' + methodName + 'Client(serialization, transportation),';
1622
810
  };
1623
811
  }
1624
812
  function TypeScriptIrEmitter() {
1625
813
  Companion_getInstance_0();
1626
- this.a21_1 = TypeScriptGenerator_getInstance();
1627
- this.b21_1 = FileExtension_TypeScript_getInstance();
814
+ this.k1z_1 = TypeScriptGenerator_getInstance();
815
+ this.l1z_1 = FileExtension_TypeScript_getInstance();
1628
816
  var tmp = this;
1629
- tmp.c21_1 = lazy(TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this));
817
+ tmp.m1z_1 = lazy(TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this));
1630
818
  var tmp_0 = this;
1631
- tmp_0.d21_1 = lazy(TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this));
819
+ tmp_0.n1z_1 = lazy(TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this));
1632
820
  }
1633
- protoOf(TypeScriptIrEmitter).w1v = function () {
1634
- return this.a21_1;
821
+ protoOf(TypeScriptIrEmitter).d1w = function () {
822
+ return this.k1z_1;
1635
823
  };
1636
- protoOf(TypeScriptIrEmitter).vq = function () {
1637
- return this.b21_1;
824
+ protoOf(TypeScriptIrEmitter).er = function () {
825
+ return this.l1z_1;
1638
826
  };
1639
- protoOf(TypeScriptIrEmitter).a1w = function () {
1640
- var packageName = Companion_instance.ds('community.flock.wirespec');
827
+ protoOf(TypeScriptIrEmitter).h1w = function () {
828
+ var packageName = Companion_instance.bs('community.flock.wirespec');
1641
829
  var api = 'export type Client<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => {\n to: (request: REQ) => RawRequest;\n from: (response: RawResponse) => RES\n}\nexport type Server<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => {\n from: (request: RawRequest) => REQ;\n to: (response: RES) => RawResponse\n}\nexport type Api<REQ extends Request<unknown>, RES extends Response<unknown>> = {\n name: string;\n method: Method,\n path: string,\n client: Client<REQ, RES>;\n server: Server<REQ, RES>\n}';
1642
830
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1643
831
  var this_0 = convert(packageName);
@@ -1646,41 +834,41 @@ protoOf(TypeScriptIrEmitter).a1w = function () {
1646
834
  var tmp = scope;
1647
835
  // Inline function 'community.flock.wirespec.ir.core.injectBefore' call
1648
836
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1649
- var this_1 = scope.j1v_1;
837
+ var this_1 = scope.q1v_1;
1650
838
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1651
839
  // Inline function 'kotlin.apply' call
1652
840
  var this_2 = new TransformerBuilder();
1653
- this_2.c1j(TypeScriptIrEmitter$emitShared$lambda);
1654
- var tmp$ret$2 = this_2.d1j();
1655
- tmp.j1v_1 = transform(this_1, tmp$ret$2);
841
+ this_2.k1i(TypeScriptIrEmitter$emitShared$lambda);
842
+ var tmp$ret$2 = this_2.l1i();
843
+ tmp.q1v_1 = transform(this_1, tmp$ret$2);
1656
844
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
1657
845
  var tmp_0 = scope;
1658
846
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1659
847
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1660
- var this_3 = scope.j1v_1;
848
+ var this_3 = scope.q1v_1;
1661
849
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1662
850
  // Inline function 'kotlin.apply' call
1663
851
  var this_4 = new TransformerBuilder();
1664
- this_4.c1j(TypeScriptIrEmitter$emitShared$lambda_0(api));
1665
- var tmp$ret$8 = this_4.d1j();
1666
- tmp_0.j1v_1 = transform(this_3, tmp$ret$8);
852
+ this_4.k1i(TypeScriptIrEmitter$emitShared$lambda_0(api));
853
+ var tmp$ret$8 = this_4.l1i();
854
+ tmp_0.q1v_1 = transform(this_3, tmp$ret$8);
1667
855
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1668
856
  var tmp_1 = scope;
1669
857
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1670
- var this_5 = scope.j1v_1;
858
+ var this_5 = scope.q1v_1;
1671
859
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1672
860
  // Inline function 'kotlin.apply' call
1673
861
  var this_6 = new TransformerBuilder();
1674
- this_6.c1j(TypeScriptIrEmitter$emitShared$lambda_1);
1675
- var tmp$ret$14 = this_6.d1j();
1676
- tmp_1.j1v_1 = transform(this_5, tmp$ret$14);
1677
- var tmp_2 = scope.j1v_1;
862
+ this_6.k1i(TypeScriptIrEmitter$emitShared$lambda_1);
863
+ var tmp$ret$14 = this_6.l1i();
864
+ tmp_1.q1v_1 = transform(this_5, tmp$ret$14);
865
+ var tmp_2 = scope.q1v_1;
1678
866
  return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
1679
867
  };
1680
- protoOf(TypeScriptIrEmitter).eo = function (ast, logger) {
868
+ protoOf(TypeScriptIrEmitter).no = function (ast, logger) {
1681
869
  var tmp = emit.call(this, ast, logger);
1682
870
  // Inline function 'arrow.core.NonEmptyList.flatMap' call
1683
- var this_0 = ast.sq_1;
871
+ var this_0 = ast.br_1;
1684
872
  // Inline function 'kotlin.collections.flatMap' call
1685
873
  var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_0);
1686
874
  // Inline function 'kotlin.collections.flatMapTo' call
@@ -1688,24 +876,24 @@ protoOf(TypeScriptIrEmitter).eo = function (ast, logger) {
1688
876
  var _iterator__ex2g4s = tmp0.t();
1689
877
  while (_iterator__ex2g4s.u()) {
1690
878
  var element = _iterator__ex2g4s.v();
1691
- var list = new NonEmptyList(element.uq_1);
879
+ var list = new NonEmptyList(element.ar_1);
1692
880
  addAll(destination, list);
1693
881
  }
1694
882
  var tmp$ret$3 = _NonEmptyList___init__impl__fxd0xp(destination);
1695
883
  // Inline function 'kotlin.collections.groupBy' call
1696
884
  var tmp0_0 = new NonEmptyList(tmp$ret$3);
1697
885
  // Inline function 'kotlin.collections.groupByTo' call
1698
- var destination_0 = LinkedHashMap_init_$Create$();
886
+ var destination_0 = LinkedHashMap_init_$Create$_0();
1699
887
  var _iterator__ex2g4s_0 = tmp0_0.t();
1700
888
  while (_iterator__ex2g4s_0.u()) {
1701
889
  var element_0 = _iterator__ex2g4s_0.v();
1702
890
  var key = namespace(element_0);
1703
891
  // Inline function 'kotlin.collections.getOrPut' call
1704
- var value = destination_0.p2(key);
892
+ var value = destination_0.q2(key);
1705
893
  var tmp_0;
1706
894
  if (value == null) {
1707
895
  var answer = ArrayList_init_$Create$();
1708
- destination_0.s2(key, answer);
896
+ destination_0.t2(key, answer);
1709
897
  tmp_0 = answer;
1710
898
  } else {
1711
899
  tmp_0 = value;
@@ -1715,45 +903,45 @@ protoOf(TypeScriptIrEmitter).eo = function (ast, logger) {
1715
903
  }
1716
904
  // Inline function 'kotlin.collections.map' call
1717
905
  // Inline function 'kotlin.collections.mapTo' call
1718
- var destination_1 = ArrayList_init_$Create$_0(destination_0.a1());
906
+ var destination_1 = ArrayList_init_$Create$_0(destination_0.b1());
1719
907
  // Inline function 'kotlin.collections.iterator' call
1720
- var _iterator__ex2g4s_1 = destination_0.j1().t();
908
+ var _iterator__ex2g4s_1 = destination_0.k1().t();
1721
909
  while (_iterator__ex2g4s_1.u()) {
1722
910
  var item = _iterator__ex2g4s_1.v();
1723
911
  // Inline function 'kotlin.collections.component1' call
1724
- var ns = item.k1();
912
+ var ns = item.l1();
1725
913
  // Inline function 'kotlin.collections.component2' call
1726
- var defs = item.l1();
1727
- var tmp_1 = ns + '/index.' + this.vq().er_1;
914
+ var defs = item.m1();
915
+ var tmp_1 = ns + '/index.' + this.er().wq_1;
1728
916
  var tmp$ret$12 = new Emitted(tmp_1, joinToString(defs, '\n', VOID, VOID, VOID, VOID, TypeScriptIrEmitter$emit$lambda));
1729
917
  destination_1.x(tmp$ret$12);
1730
918
  }
1731
- return NonEmptyList__plus_impl_xqmb9_0(tmp, destination_1);
919
+ return NonEmptyList__plus_impl_xqmb9(tmp, destination_1);
1732
920
  };
1733
- protoOf(TypeScriptIrEmitter).mr = function (definition, module_0, logger) {
921
+ protoOf(TypeScriptIrEmitter).fr = function (definition, module_0, logger) {
1734
922
  var file = emit_0.call(this, definition, module_0, logger);
1735
- var subPackageName = plus(Companion_instance.ds(''), definition);
1736
- return new File(Companion_getInstance().s1h(subPackageName.gs() + sanitizeSymbol_1(this, file.z1n_1.t1h())), plus_1(listOf_0(import_0('../Wirespec', 'Wirespec')), file.a1o_1));
923
+ var subPackageName = plus_1(Companion_instance.bs(''), definition);
924
+ return new File(Companion_getInstance().x1g(subPackageName.es() + sanitizeSymbol(this, file.s1n_1.y1g())), plus(listOf_0(import_0('../Wirespec', 'Wirespec')), file.t1n_1));
1737
925
  };
1738
- protoOf(TypeScriptIrEmitter).f1w = function (definition, module_0) {
926
+ protoOf(TypeScriptIrEmitter).m1w = function (definition, module_0) {
1739
927
  var tmp;
1740
928
  if (definition instanceof Type) {
1741
929
  tmp = convertToGenerator_2(definition, module_0);
1742
930
  } else {
1743
- if (definition instanceof Enum) {
931
+ if (definition instanceof Enum_0) {
1744
932
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1745
933
  var this_0 = convertToGenerator_1(definition);
1746
934
  var scope = new TransformScope(this_0);
1747
- scope.r1v(TypeScriptIrEmitter$emitGenerator$lambda(definition));
1748
- var tmp_0 = scope.j1v_1;
935
+ scope.y1v(TypeScriptIrEmitter$emitGenerator$lambda(definition));
936
+ var tmp_0 = scope.q1v_1;
1749
937
  tmp = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1750
938
  } else {
1751
939
  if (definition instanceof Refined) {
1752
940
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1753
941
  var this_1 = convertToGenerator_0(definition);
1754
942
  var scope_0 = new TransformScope(this_1);
1755
- scope_0.r1v(TypeScriptIrEmitter$emitGenerator$lambda_0(definition));
1756
- var tmp_1 = scope_0.j1v_1;
943
+ scope_0.y1v(TypeScriptIrEmitter$emitGenerator$lambda_0(definition));
944
+ var tmp_1 = scope_0.q1v_1;
1757
945
  tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
1758
946
  } else {
1759
947
  if (definition instanceof Union) {
@@ -1767,10 +955,10 @@ protoOf(TypeScriptIrEmitter).f1w = function (definition, module_0) {
1767
955
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1768
956
  var this_2 = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
1769
957
  var scope_1 = new TransformScope(this_2);
1770
- scope_1.r1v(TypeScriptIrEmitter$emitGenerator$lambda_1);
1771
- var tmp_2 = scope_1.j1v_1;
958
+ scope_1.y1v(TypeScriptIrEmitter$emitGenerator$lambda_1);
959
+ var tmp_2 = scope_1.q1v_1;
1772
960
  var generatorFile = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
1773
- var generatorOwnName = definition.nr().l1() + 'Generator';
961
+ var generatorOwnName = definition.gr().m1() + 'Generator';
1774
962
  var tmp_3 = asSequence(collectCustomTypeNames(generatorFile));
1775
963
  var tmp_4 = filterNot(tmp_3, TypeScriptIrEmitter$emitGenerator$lambda_2);
1776
964
  var tmp_5 = filterNot(tmp_4, TypeScriptIrEmitter$emitGenerator$lambda_3(generatorOwnName));
@@ -1779,8 +967,8 @@ protoOf(TypeScriptIrEmitter).f1w = function (definition, module_0) {
1779
967
  var generatorRefs = LinkedHashSet_init_$Create$();
1780
968
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1781
969
  var scope_2 = new TransformScope(generatorFile);
1782
- scope_2.r1v(TypeScriptIrEmitter$emitGenerator$lambda_5(generatorOwnName, generatorRefs));
1783
- var tmp_6 = scope_2.j1v_1;
970
+ scope_2.y1v(TypeScriptIrEmitter$emitGenerator$lambda_5(generatorOwnName, generatorRefs));
971
+ var tmp_6 = scope_2.q1v_1;
1784
972
  isInterface(tmp_6, Element) || THROW_CCE();
1785
973
  // Inline function 'kotlin.collections.filter' call
1786
974
  // Inline function 'kotlin.collections.filterTo' call
@@ -1793,7 +981,7 @@ protoOf(TypeScriptIrEmitter).f1w = function (definition, module_0) {
1793
981
  }
1794
982
  }
1795
983
  // Inline function 'kotlin.collections.map' call
1796
- var this_3 = distinct_0(plus_1(destination, generatorRefs));
984
+ var this_3 = distinct_0(plus(destination, generatorRefs));
1797
985
  // Inline function 'kotlin.collections.mapTo' call
1798
986
  var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
1799
987
  var _iterator__ex2g4s_0 = this_3.t();
@@ -1823,10 +1011,10 @@ protoOf(TypeScriptIrEmitter).f1w = function (definition, module_0) {
1823
1011
  destination_2.x(tmp$ret$18);
1824
1012
  }
1825
1013
  var modelImports = destination_2;
1826
- var subPackageName = plus_0(Companion_instance.ds(''), 'generator');
1827
- return new File(Companion_getInstance().s1h(subPackageName.gs() + sanitizeSymbol_1(this, generatorFile.z1n_1.t1h())), plus_1(plus_1(plus_1(listOf_0(import_0('../Wirespec', 'Wirespec')), modelImports), generatorImports), generatorFile.a1o_1));
1014
+ var subPackageName = plus_2(Companion_instance.bs(''), 'generator');
1015
+ return new File(Companion_getInstance().x1g(subPackageName.es() + sanitizeSymbol(this, generatorFile.s1n_1.y1g())), plus(plus(plus(listOf_0(import_0('../Wirespec', 'Wirespec')), modelImports), generatorImports), generatorFile.t1n_1));
1828
1016
  };
1829
- protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1017
+ protoOf(TypeScriptIrEmitter).vr = function (type, module_0) {
1830
1018
  var fieldValidations = classifyValidatableFields(type, module_0);
1831
1019
  // Inline function 'kotlin.collections.distinctBy' call
1832
1020
  var this_0 = importReferences(type);
@@ -1835,7 +1023,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1835
1023
  var _iterator__ex2g4s = this_0.t();
1836
1024
  while (_iterator__ex2g4s.u()) {
1837
1025
  var e = _iterator__ex2g4s.v();
1838
- var key = e.cv_1;
1026
+ var key = e.dv_1;
1839
1027
  if (set.x(key)) {
1840
1028
  list.x(e);
1841
1029
  }
@@ -1846,7 +1034,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1846
1034
  var _iterator__ex2g4s_0 = list.t();
1847
1035
  while (_iterator__ex2g4s_0.u()) {
1848
1036
  var item = _iterator__ex2g4s_0.v();
1849
- var tmp$ret$2 = import_0('./' + item.cv_1, item.cv_1);
1037
+ var tmp$ret$2 = import_0('./' + item.dv_1, item.dv_1);
1850
1038
  destination.x(tmp$ret$2);
1851
1039
  }
1852
1040
  var typeImports = destination;
@@ -1856,7 +1044,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1856
1044
  var _iterator__ex2g4s_1 = fieldValidations.t();
1857
1045
  while (_iterator__ex2g4s_1.u()) {
1858
1046
  var item_0 = _iterator__ex2g4s_1.v();
1859
- var tmp$ret$5 = item_0.i1j_1;
1047
+ var tmp$ret$5 = item_0.q1i_1;
1860
1048
  destination_0.x(tmp$ret$5);
1861
1049
  }
1862
1050
  // Inline function 'kotlin.collections.filter' call
@@ -1866,7 +1054,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1866
1054
  var _iterator__ex2g4s_2 = tmp0.t();
1867
1055
  while (_iterator__ex2g4s_2.u()) {
1868
1056
  var element = _iterator__ex2g4s_2.v();
1869
- if (!(element === type.mp_1.l1())) {
1057
+ if (!(element === type.vp_1.m1())) {
1870
1058
  destination_1.x(element);
1871
1059
  }
1872
1060
  }
@@ -1880,32 +1068,32 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1880
1068
  destination_2.x(tmp$ret$11);
1881
1069
  }
1882
1070
  var validateImports = destination_2;
1883
- var allImports = plus_1(typeImports, validateImports);
1071
+ var allImports = plus(typeImports, validateImports);
1884
1072
  // Inline function 'kotlin.collections.map' call
1885
- var this_1 = type.np_1.jp_1;
1073
+ var this_1 = type.wp_1.sp_1;
1886
1074
  // Inline function 'kotlin.collections.mapTo' call
1887
1075
  var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
1888
1076
  var _iterator__ex2g4s_4 = this_1.t();
1889
1077
  while (_iterator__ex2g4s_4.u()) {
1890
1078
  var item_2 = _iterator__ex2g4s_4.v();
1891
- var tmp$ret$14 = item_2.rp_1.l1();
1079
+ var tmp$ret$14 = item_2.aq_1.m1();
1892
1080
  destination_3.x(tmp$ret$14);
1893
1081
  }
1894
1082
  var fieldNames = toSet(destination_3);
1895
- var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)), type.mp_1.l1(), fieldNames);
1083
+ var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)), type.vp_1.m1(), fieldNames);
1896
1084
  var tmp;
1897
1085
  // Inline function 'kotlin.collections.isNotEmpty' call
1898
1086
  if (!allImports.r()) {
1899
- tmp = file.d1o(VOID, plus_1(allImports, file.a1o_1));
1087
+ tmp = file.w1n(VOID, plus(allImports, file.t1n_1));
1900
1088
  } else {
1901
1089
  tmp = file;
1902
1090
  }
1903
1091
  return tmp;
1904
1092
  };
1905
- protoOf(TypeScriptIrEmitter).as = function (enum_0, module_0) {
1093
+ protoOf(TypeScriptIrEmitter).tr = function (enum_0, module_0) {
1906
1094
  return sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
1907
1095
  };
1908
- protoOf(TypeScriptIrEmitter).qr = function (union) {
1096
+ protoOf(TypeScriptIrEmitter).jr = function (union) {
1909
1097
  // Inline function 'kotlin.collections.distinctBy' call
1910
1098
  var this_0 = importReferences(union);
1911
1099
  var set = HashSet_init_$Create$();
@@ -1913,7 +1101,7 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
1913
1101
  var _iterator__ex2g4s = this_0.t();
1914
1102
  while (_iterator__ex2g4s.u()) {
1915
1103
  var e = _iterator__ex2g4s.v();
1916
- var key = e.cv_1;
1104
+ var key = e.dv_1;
1917
1105
  if (set.x(key)) {
1918
1106
  list.x(e);
1919
1107
  }
@@ -1924,7 +1112,7 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
1924
1112
  var _iterator__ex2g4s_0 = list.t();
1925
1113
  while (_iterator__ex2g4s_0.u()) {
1926
1114
  var item = _iterator__ex2g4s_0.v();
1927
- var tmp$ret$2 = import_0('../model', item.cv_1, true);
1115
+ var tmp$ret$2 = import_0('../model', item.dv_1, true);
1928
1116
  destination.x(tmp$ret$2);
1929
1117
  }
1930
1118
  var imports = destination;
@@ -1932,19 +1120,19 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
1932
1120
  var tmp;
1933
1121
  // Inline function 'kotlin.collections.isNotEmpty' call
1934
1122
  if (!imports.r()) {
1935
- tmp = file.d1o(VOID, plus_1(imports, file.a1o_1));
1123
+ tmp = file.w1n(VOID, plus(imports, file.t1n_1));
1936
1124
  } else {
1937
1125
  tmp = file;
1938
1126
  }
1939
1127
  return tmp;
1940
1128
  };
1941
- protoOf(TypeScriptIrEmitter).vr = function (refined) {
1129
+ protoOf(TypeScriptIrEmitter).or = function (refined) {
1942
1130
  var converted = convert_2(refined);
1943
- var constraintExpr = convertConstraint(refined.ur_1, new VariableReference(Companion_getInstance().s1h('value')));
1944
- var validatorStr = TypeScriptGenerator_getInstance().n1w(constraintExpr);
1945
- return new File(converted.z1n_1, listOf([new RawElement('export type ' + converted.z1n_1.t1h() + ' = ' + emitTypeScriptReference(this, refined.ur_1) + ';'), new RawElement('export const validate' + refined.tr_1.l1() + ' = (value: ' + emitTypeScriptReference(this, refined.ur_1) + ') =>\n ' + validatorStr + ';')]));
1131
+ var constraintExpr = convertConstraint(refined.nr_1, new VariableReference(Companion_getInstance().x1g('value')));
1132
+ var validatorStr = TypeScriptGenerator_getInstance().a1x(constraintExpr);
1133
+ return new File(converted.s1n_1, listOf([new RawElement('export type ' + converted.s1n_1.y1g() + ' = ' + emitTypeScriptReference(this, refined.nr_1) + ';'), new RawElement('export const validate' + refined.mr_1.m1() + ' = (value: ' + emitTypeScriptReference(this, refined.nr_1) + ') =>\n ' + validatorStr + ';')]));
1946
1134
  };
1947
- protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1135
+ protoOf(TypeScriptIrEmitter).ur = function (endpoint) {
1948
1136
  // Inline function 'kotlin.collections.distinctBy' call
1949
1137
  var this_0 = importReferences(endpoint);
1950
1138
  var set = HashSet_init_$Create$();
@@ -1952,7 +1140,7 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1952
1140
  var _iterator__ex2g4s = this_0.t();
1953
1141
  while (_iterator__ex2g4s.u()) {
1954
1142
  var e = _iterator__ex2g4s.v();
1955
- var key = e.cv_1;
1143
+ var key = e.dv_1;
1956
1144
  if (set.x(key)) {
1957
1145
  list.x(e);
1958
1146
  }
@@ -1963,7 +1151,7 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1963
1151
  var _iterator__ex2g4s_0 = list.t();
1964
1152
  while (_iterator__ex2g4s_0.u()) {
1965
1153
  var item = _iterator__ex2g4s_0.v();
1966
- var tmp$ret$2 = import_0('../model', item.cv_1, true);
1154
+ var tmp$ret$2 = import_0('../model', item.dv_1, true);
1967
1155
  destination.x(tmp$ret$2);
1968
1156
  }
1969
1157
  var imports = destination;
@@ -1972,25 +1160,25 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1972
1160
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1973
1161
  var this_1 = stripTrailingSpaceFromErrorMessage(convert_3(endpoint));
1974
1162
  var scope = new TransformScope(this_1);
1975
- scope.o1v(transformPatternSwitchToValueSwitch());
1976
- var tmp = scope.j1v_1;
1163
+ scope.v1v(transformPatternSwitchToValueSwitch());
1164
+ var tmp = scope.q1v_1;
1977
1165
  var tmp$ret$7 = isInterface(tmp, Element) ? tmp : THROW_CCE();
1978
1166
  // Inline function 'kotlin.let' call
1979
- var it = sanitizeNames(emit$injectApiConst(emit$applyCallParamsIfNeeded(tmp$ret$7, hasRequestParams), endpoint).d1o(Companion_getInstance().s1h(sanitize(this, endpoint.vp_1))), _get_sanitizationConfig__sns434(this));
1167
+ var it = sanitizeNames(emit$injectApiConst(emit$applyCallParamsIfNeeded(tmp$ret$7, hasRequestParams), endpoint).w1n(Companion_getInstance().x1g(sanitize(this, endpoint.eq_1))), _get_sanitizationConfig__sns434(this));
1980
1168
  var tmp_0;
1981
1169
  // Inline function 'kotlin.collections.isNotEmpty' call
1982
1170
  if (!imports.r()) {
1983
- tmp_0 = it.d1o(VOID, plus_1(imports, it.a1o_1));
1171
+ tmp_0 = it.w1n(VOID, plus(imports, it.t1n_1));
1984
1172
  } else {
1985
1173
  tmp_0 = it;
1986
1174
  }
1987
1175
  return tmp_0;
1988
1176
  };
1989
- protoOf(TypeScriptIrEmitter).pr = function (channel) {
1177
+ protoOf(TypeScriptIrEmitter).ir = function (channel) {
1990
1178
  return sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
1991
1179
  };
1992
- protoOf(TypeScriptIrEmitter).e1w = function (endpoint) {
1993
- var endpointName = endpoint.vp_1.l1();
1180
+ protoOf(TypeScriptIrEmitter).l1w = function (endpoint) {
1181
+ var endpointName = endpoint.eq_1.m1();
1994
1182
  var methodName = firstToLower(this, endpointName);
1995
1183
  // Inline function 'kotlin.collections.distinctBy' call
1996
1184
  var this_0 = importReferences(endpoint);
@@ -1999,7 +1187,7 @@ protoOf(TypeScriptIrEmitter).e1w = function (endpoint) {
1999
1187
  var _iterator__ex2g4s = this_0.t();
2000
1188
  while (_iterator__ex2g4s.u()) {
2001
1189
  var e = _iterator__ex2g4s.v();
2002
- var key = e.cv_1;
1190
+ var key = e.dv_1;
2003
1191
  if (set.x(key)) {
2004
1192
  list.x(e);
2005
1193
  }
@@ -2010,7 +1198,7 @@ protoOf(TypeScriptIrEmitter).e1w = function (endpoint) {
2010
1198
  var _iterator__ex2g4s_0 = list.t();
2011
1199
  while (_iterator__ex2g4s_0.u()) {
2012
1200
  var item = _iterator__ex2g4s_0.v();
2013
- var tmp$ret$2 = import_0('../model', item.cv_1, true);
1201
+ var tmp$ret$2 = import_0('../model', item.dv_1, true);
2014
1202
  destination.x(tmp$ret$2);
2015
1203
  }
2016
1204
  var imports = destination;
@@ -2032,50 +1220,50 @@ protoOf(TypeScriptIrEmitter).e1w = function (endpoint) {
2032
1220
  }
2033
1221
  var requestArgs = tmp_0;
2034
1222
  var code = trimMargin('\n |export const ' + methodName + 'Client = (serialization: Wirespec.Serialization, transportation: Wirespec.Transportation) => ({\n | ' + methodName + ': async (' + paramList + '): Promise<' + endpointName + '.Response<unknown>> => {\n | const request: ' + endpointName + '.Request = ' + requestArgs + ';\n | const rawRequest = ' + endpointName + '.toRawRequest(serialization, request);\n | const rawResponse = await transportation.transport(rawRequest);\n | return ' + endpointName + '.fromRawResponse(serialization, rawResponse);\n | }\n |})\n ');
2035
- var tmp_1 = Companion_getInstance().s1h('client/' + endpointName + 'Client');
1223
+ var tmp_1 = Companion_getInstance().x1g('client/' + endpointName + 'Client');
2036
1224
  // Inline function 'kotlin.collections.buildList' call
2037
1225
  // Inline function 'kotlin.collections.buildListInternal' call
2038
1226
  // Inline function 'kotlin.apply' call
2039
1227
  var this_1 = ArrayList_init_$Create$();
2040
1228
  this_1.x(import_0('../Wirespec', 'Wirespec'));
2041
1229
  this_1.x(import_0('../endpoint/' + endpointName, endpointName));
2042
- this_1.f1(imports);
1230
+ this_1.g1(imports);
2043
1231
  this_1.x(new RawElement(code));
2044
- var tmp$ret$10 = this_1.o5();
1232
+ var tmp$ret$10 = this_1.p5();
2045
1233
  return new File(tmp_1, tmp$ret$10);
2046
1234
  };
2047
- protoOf(TypeScriptIrEmitter).b1w = function (endpoints, logger) {
2048
- logger.kr('Emitting main Client for ' + endpoints.a1() + ' endpoints');
1235
+ protoOf(TypeScriptIrEmitter).i1w = function (endpoints, logger) {
1236
+ logger.cr('Emitting main Client for ' + endpoints.b1() + ' endpoints');
2049
1237
  // Inline function 'kotlin.collections.map' call
2050
1238
  // Inline function 'kotlin.collections.mapTo' call
2051
1239
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(endpoints, 10));
2052
1240
  var _iterator__ex2g4s = endpoints.t();
2053
1241
  while (_iterator__ex2g4s.u()) {
2054
1242
  var item = _iterator__ex2g4s.v();
2055
- var methodName = firstToLower(this, item.vp_1.l1());
2056
- var tmp$ret$0 = import_0('./client/' + item.vp_1.l1() + 'Client', methodName + 'Client');
1243
+ var methodName = firstToLower(this, item.eq_1.m1());
1244
+ var tmp$ret$0 = import_0('./client/' + item.eq_1.m1() + 'Client', methodName + 'Client');
2057
1245
  destination.x(tmp$ret$0);
2058
1246
  }
2059
1247
  var clientImports = destination;
2060
1248
  var spreadEntries = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, TypeScriptIrEmitter$emitClient$lambda(this));
2061
1249
  var code = trimMargin('\n |export const client = (serialization: Wirespec.Serialization, transportation: Wirespec.Transportation) => ({\n |' + spreadEntries + '\n |})\n ');
2062
- var tmp = Companion_getInstance().s1h('Client');
1250
+ var tmp = Companion_getInstance().x1g('Client');
2063
1251
  // Inline function 'kotlin.collections.buildList' call
2064
1252
  // Inline function 'kotlin.collections.buildListInternal' call
2065
1253
  // Inline function 'kotlin.apply' call
2066
1254
  var this_0 = ArrayList_init_$Create$();
2067
1255
  this_0.x(import_0('./Wirespec', 'Wirespec'));
2068
- this_0.f1(clientImports);
1256
+ this_0.g1(clientImports);
2069
1257
  this_0.x(new RawElement(code));
2070
- var tmp$ret$6 = this_0.o5();
1258
+ var tmp$ret$6 = this_0.p5();
2071
1259
  return new File(tmp, tmp$ret$6);
2072
1260
  };
2073
1261
  function transformPatternSwitchToValueSwitch() {
2074
1262
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
2075
1263
  // Inline function 'kotlin.apply' call
2076
1264
  var this_0 = new TransformerBuilder();
2077
- this_0.q1v(transformPatternSwitchToValueSwitch$lambda);
2078
- return this_0.d1j();
1265
+ this_0.x1v(transformPatternSwitchToValueSwitch$lambda);
1266
+ return this_0.l1i();
2079
1267
  }
2080
1268
  function renameValidateAndBindObjReceiver(_this__u8e3s4, typeName, fieldNames) {
2081
1269
  // Inline function 'community.flock.wirespec.ir.core.transform' call
@@ -2083,19 +1271,19 @@ function renameValidateAndBindObjReceiver(_this__u8e3s4, typeName, fieldNames) {
2083
1271
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
2084
1272
  var tmp = scope;
2085
1273
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
2086
- var this_0 = scope.j1v_1;
1274
+ var this_0 = scope.q1v_1;
2087
1275
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
2088
1276
  // Inline function 'kotlin.apply' call
2089
1277
  var this_1 = new TransformerBuilder();
2090
- this_1.c1j(renameValidateAndBindObjReceiver$lambda(typeName, fieldNames));
2091
- var tmp$ret$2 = this_1.d1j();
2092
- tmp.j1v_1 = transform(this_0, tmp$ret$2);
2093
- var tmp_0 = scope.j1v_1;
1278
+ this_1.k1i(renameValidateAndBindObjReceiver$lambda(typeName, fieldNames));
1279
+ var tmp$ret$2 = this_1.l1i();
1280
+ tmp.q1v_1 = transform(this_0, tmp$ret$2);
1281
+ var tmp_0 = scope.q1v_1;
2094
1282
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
2095
1283
  }
2096
1284
  function buildApiConst(endpoint) {
2097
1285
  // Inline function 'kotlin.text.replaceFirstChar' call
2098
- var this_0 = endpoint.vp_1.l1();
1286
+ var this_0 = endpoint.eq_1.m1();
2099
1287
  var tmp;
2100
1288
  // Inline function 'kotlin.text.isNotEmpty' call
2101
1289
  if (charSequenceLength(this_0) > 0) {
@@ -2103,14 +1291,14 @@ function buildApiConst(endpoint) {
2103
1291
  var this_1 = charCodeAt(this_0, 0);
2104
1292
  // Inline function 'kotlin.js.asDynamic' call
2105
1293
  // Inline function 'kotlin.js.unsafeCast' call
2106
- var tmp$ret$4 = toString_0(this_1).toLowerCase();
2107
- tmp = toString(tmp$ret$4) + substring(this_0, 1);
1294
+ var tmp$ret$4 = toString(this_1).toLowerCase();
1295
+ tmp = toString_0(tmp$ret$4) + substring(this_0, 1);
2108
1296
  } else {
2109
1297
  tmp = this_0;
2110
1298
  }
2111
1299
  var apiName = tmp;
2112
- var method = endpoint.wp_1.a3_1;
2113
- var pathString = joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, buildApiConst$lambda);
1300
+ var method = endpoint.fq_1.b3_1;
1301
+ var pathString = joinToString(endpoint.gq_1, '/', VOID, VOID, VOID, VOID, buildApiConst$lambda);
2114
1302
  return raw(trimMargin('\n |export const client:Wirespec.Client<Request, Response> = (serialization: Wirespec.Serialization) => ({\n | from: (it) => fromRawResponse(serialization, it),\n | to: (it) => toRawRequest(serialization, it)\n |})\n |export const server:Wirespec.Server<Request, Response> = (serialization: Wirespec.Serialization) => ({\n | from: (it) => fromRawRequest(serialization, it),\n | to: (it) => toRawResponse(serialization, it)\n |})\n |export const api = {\n | name: "' + apiName + '",\n | method: "' + method + '",\n | path: "' + pathString + '",\n | server,\n | client\n |} as const\n '));
2115
1303
  }
2116
1304
  function bindCallToRequestParams(_this__u8e3s4) {
@@ -2119,21 +1307,21 @@ function bindCallToRequestParams(_this__u8e3s4) {
2119
1307
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
2120
1308
  var tmp = scope;
2121
1309
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
2122
- var this_0 = scope.j1v_1;
1310
+ var this_0 = scope.q1v_1;
2123
1311
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
2124
1312
  // Inline function 'kotlin.apply' call
2125
1313
  var this_1 = new TransformerBuilder();
2126
- this_1.c1j(bindCallToRequestParams$lambda);
2127
- var tmp$ret$2 = this_1.d1j();
2128
- tmp.j1v_1 = transform(this_0, tmp$ret$2);
2129
- var tmp_0 = scope.j1v_1;
1314
+ this_1.k1i(bindCallToRequestParams$lambda);
1315
+ var tmp$ret$2 = this_1.l1i();
1316
+ tmp.q1v_1 = transform(this_0, tmp$ret$2);
1317
+ var tmp_0 = scope.q1v_1;
2130
1318
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
2131
1319
  }
2132
1320
  function stripTrailingSpaceFromErrorMessage(_this__u8e3s4) {
2133
1321
  // Inline function 'community.flock.wirespec.ir.core.transform' call
2134
1322
  var scope = new TransformScope(_this__u8e3s4);
2135
- scope.q1v(stripTrailingSpaceFromErrorMessage$lambda);
2136
- var tmp = scope.j1v_1;
1323
+ scope.x1v(stripTrailingSpaceFromErrorMessage$lambda);
1324
+ var tmp = scope.q1v_1;
2137
1325
  return isInterface(tmp, Element) ? tmp : THROW_CCE();
2138
1326
  }
2139
1327
  function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
@@ -2141,7 +1329,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2141
1329
  if (!(stmt instanceof Switch)) {
2142
1330
  tmp = true;
2143
1331
  } else {
2144
- var tmp0 = stmt.i1q_1;
1332
+ var tmp0 = stmt.u1q_1;
2145
1333
  var tmp$ret$0;
2146
1334
  $l$block_0: {
2147
1335
  // Inline function 'kotlin.collections.none' call
@@ -2158,7 +1346,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2158
1346
  var _iterator__ex2g4s = tmp0.t();
2159
1347
  while (_iterator__ex2g4s.u()) {
2160
1348
  var element = _iterator__ex2g4s.v();
2161
- if (!(element.p1q_1 == null)) {
1349
+ if (!(element.b1r_1 == null)) {
2162
1350
  tmp$ret$0 = false;
2163
1351
  break $l$block_0;
2164
1352
  }
@@ -2169,11 +1357,11 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2169
1357
  }
2170
1358
  if (tmp)
2171
1359
  return transformChildren(stmt, tr);
2172
- var tmp0_safe_receiver = stmt.k1q_1;
2173
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1m();
1360
+ var tmp0_safe_receiver = stmt.w1q_1;
1361
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j1m();
2174
1362
  var varName = tmp1_elvis_lhs == null ? 'r' : tmp1_elvis_lhs;
2175
1363
  // Inline function 'kotlin.collections.map' call
2176
- var this_0 = stmt.i1q_1;
1364
+ var this_0 = stmt.u1q_1;
2177
1365
  // Inline function 'kotlin.collections.mapTo' call
2178
1366
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2179
1367
  var _iterator__ex2g4s_0 = this_0.t();
@@ -2181,48 +1369,48 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2181
1369
  var item = _iterator__ex2g4s_0.v();
2182
1370
  var tmp$ret$5;
2183
1371
  $l$block_1: {
2184
- var tmp_1 = item.p1q_1;
2185
- var tmp0_safe_receiver_0 = tmp_1 instanceof Custom_0 ? tmp_1 : null;
2186
- var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.m1j_1;
2187
- var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t1h();
1372
+ var tmp_1 = item.b1r_1;
1373
+ var tmp0_safe_receiver_0 = tmp_1 instanceof Custom ? tmp_1 : null;
1374
+ var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.u1i_1;
1375
+ var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y1g();
2188
1376
  var tmp3_safe_receiver = typeName == null ? null : substringAfterLast(typeName, '.');
2189
1377
  var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : removePrefix(tmp3_safe_receiver, 'Response');
2190
1378
  var statusNum = tmp4_safe_receiver == null ? null : toIntOrNull(tmp4_safe_receiver);
2191
- if (statusNum == null || typeName == null) {
1379
+ if (statusNum == null) {
2192
1380
  // Inline function 'kotlin.collections.map' call
2193
- var this_1 = item.o1q_1;
1381
+ var this_1 = item.a1r_1;
2194
1382
  // Inline function 'kotlin.collections.mapTo' call
2195
1383
  var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
2196
1384
  var _iterator__ex2g4s_1 = this_1.t();
2197
1385
  while (_iterator__ex2g4s_1.u()) {
2198
1386
  var item_0 = _iterator__ex2g4s_1.v();
2199
- var tmp$ret$2 = tr.d1v(item_0);
1387
+ var tmp$ret$2 = tr.k1v(item_0);
2200
1388
  destination_0.x(tmp$ret$2);
2201
1389
  }
2202
- tmp$ret$5 = item.r1q(VOID, destination_0);
1390
+ tmp$ret$5 = item.d1r(VOID, destination_0);
2203
1391
  break $l$block_1;
2204
1392
  }
2205
- var exprCode = TypeScriptGenerator_getInstance().n1w(tr.e1v(stmt.h1q_1));
2206
- var castAssignment = new Assignment(Companion_getInstance().s1h(varName), new RawExpression(exprCode + ' as ' + typeName), false);
2207
- var tmp_2 = new Literal_0(statusNum, new Integer_0());
1393
+ var exprCode = TypeScriptGenerator_getInstance().a1x(tr.l1v(stmt.t1q_1));
1394
+ var castAssignment = new Assignment(Companion_getInstance().x1g(varName), new RawExpression(exprCode + ' as ' + typeName), false);
1395
+ var tmp_2 = new Literal(statusNum, new Integer());
2208
1396
  var tmp_3 = listOf_0(castAssignment);
2209
1397
  // Inline function 'kotlin.collections.map' call
2210
- var this_2 = item.o1q_1;
1398
+ var this_2 = item.a1r_1;
2211
1399
  // Inline function 'kotlin.collections.mapTo' call
2212
1400
  var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
2213
1401
  var _iterator__ex2g4s_2 = this_2.t();
2214
1402
  while (_iterator__ex2g4s_2.u()) {
2215
1403
  var item_1 = _iterator__ex2g4s_2.v();
2216
- var tmp$ret$6 = tr.d1v(item_1);
1404
+ var tmp$ret$6 = tr.k1v(item_1);
2217
1405
  destination_1.x(tmp$ret$6);
2218
1406
  }
2219
- tmp$ret$5 = new Case(tmp_2, plus_1(tmp_3, destination_1), null);
1407
+ tmp$ret$5 = new Case(tmp_2, plus(tmp_3, destination_1), null);
2220
1408
  }
2221
1409
  destination.x(tmp$ret$5);
2222
1410
  }
2223
1411
  var transformedCases = destination;
2224
- var tmp_4 = new FieldCall(tr.e1v(stmt.h1q_1), Companion_getInstance().s1h('status'));
2225
- var tmp2_safe_receiver = stmt.j1q_1;
1412
+ var tmp_4 = new FieldCall(tr.l1v(stmt.t1q_1), Companion_getInstance().x1g('status'));
1413
+ var tmp2_safe_receiver = stmt.v1q_1;
2226
1414
  var tmp_5;
2227
1415
  if (tmp2_safe_receiver == null) {
2228
1416
  tmp_5 = null;
@@ -2233,7 +1421,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2233
1421
  var _iterator__ex2g4s_3 = tmp2_safe_receiver.t();
2234
1422
  while (_iterator__ex2g4s_3.u()) {
2235
1423
  var item_2 = _iterator__ex2g4s_3.v();
2236
- var tmp$ret$11 = tr.d1v(item_2);
1424
+ var tmp$ret$11 = tr.k1v(item_2);
2237
1425
  destination_2.x(tmp$ret$11);
2238
1426
  }
2239
1427
  tmp_5 = destination_2;
@@ -2244,46 +1432,34 @@ function renameValidateAndBindObjReceiver$lambda$lambda($fieldNames) {
2244
1432
  return function (s, t) {
2245
1433
  var tmp;
2246
1434
  var tmp_0;
2247
- var tmp_1;
2248
- var tmp_2;
2249
1435
  if (s instanceof FunctionCall) {
2250
- tmp_2 = s.e1n_1.equals(Companion_getInstance().s1h('validate'));
2251
- } else {
2252
- tmp_2 = false;
2253
- }
2254
- if (tmp_2) {
2255
- tmp_1 = !(s.c1n_1 == null);
2256
- } else {
2257
- tmp_1 = false;
2258
- }
2259
- if (tmp_1) {
2260
- // Inline function 'kotlin.collections.isNotEmpty' call
2261
- tmp_0 = !s.d1n_1.r();
1436
+ var tmp_1;
1437
+ if (s.t1m_1.equals(Companion_getInstance().x1g('validate')) && !(s.r1m_1 == null)) {
1438
+ // Inline function 'kotlin.collections.isNotEmpty' call
1439
+ tmp_1 = !s.s1m_1.r();
1440
+ } else {
1441
+ tmp_1 = false;
1442
+ }
1443
+ tmp_0 = tmp_1;
2262
1444
  } else {
2263
1445
  tmp_0 = false;
2264
1446
  }
2265
1447
  if (tmp_0) {
2266
- var tmp_3 = first(s.d1n_1);
2267
- var tmp0_safe_receiver = tmp_3 instanceof Custom_0 ? tmp_3 : null;
2268
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m1j_1;
2269
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t1h();
2270
- var tn = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
2271
- tmp = new FunctionCall(VOID, VOID, Companion_getInstance().s1h('validate' + tn), mapOf(to(Companion_getInstance().s1h('obj'), t.e1v(ensureNotNull(s.c1n_1)))));
1448
+ var tmp_2 = first(s.s1m_1);
1449
+ var tmp1_safe_receiver = tmp_2 instanceof Custom ? tmp_2 : null;
1450
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u1i_1;
1451
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.y1g();
1452
+ var tn = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
1453
+ tmp = new FunctionCall(VOID, VOID, Companion_getInstance().x1g('validate' + tn), mapOf(to(Companion_getInstance().x1g('obj'), t.l1v(ensureNotNull(s.r1m_1)))));
2272
1454
  } else {
2273
- var tmp_4;
2274
- var tmp_5;
1455
+ var tmp_3;
2275
1456
  if (s instanceof FieldCall) {
2276
- tmp_5 = s.s1q_1 == null;
2277
- } else {
2278
- tmp_5 = false;
2279
- }
2280
- if (tmp_5) {
2281
- tmp_4 = $fieldNames.u1(s.t1q_1.u1m());
1457
+ tmp_3 = (s.e1r_1 == null && $fieldNames.v1(s.f1r_1.j1m()));
2282
1458
  } else {
2283
- tmp_4 = false;
1459
+ tmp_3 = false;
2284
1460
  }
2285
- if (tmp_4) {
2286
- tmp = new FieldCall(new VariableReference(Companion_getInstance().s1h('obj')), s.t1q_1);
1461
+ if (tmp_3) {
1462
+ tmp = new FieldCall(new VariableReference(Companion_getInstance().x1g('obj')), s.f1r_1);
2287
1463
  } else {
2288
1464
  tmp = transformChildren(s, t);
2289
1465
  }
@@ -2297,15 +1473,15 @@ function renameValidateAndBindObjReceiver$lambda($typeName, $fieldNames) {
2297
1473
  if (element instanceof Function) {
2298
1474
  var tmp$ret$0;
2299
1475
  $l$block: {
2300
- if (!element.i1l_1.equals(Companion_getInstance().s1h('validate'))) {
1476
+ if (!element.u1k_1.equals(Companion_getInstance().x1g('validate'))) {
2301
1477
  tmp$ret$0 = element;
2302
1478
  break $l$block;
2303
1479
  }
2304
1480
  // Inline function 'community.flock.wirespec.ir.core.transform' call
2305
- var this_0 = element.q1l(Companion_getInstance().s1h('validate' + $typeName), VOID, listOf_0(new Parameter(Companion_getInstance().s1h('obj'), Custom_init_$Create$($typeName))));
1481
+ var this_0 = element.f1l(Companion_getInstance().x1g('validate' + $typeName), VOID, listOf_0(new Parameter(Companion_getInstance().x1g('obj'), Custom_init_$Create$($typeName))));
2306
1482
  var scope = new TransformScope(this_0);
2307
- scope.s1v(renameValidateAndBindObjReceiver$lambda$lambda($fieldNames));
2308
- var tmp_0 = scope.j1v_1;
1483
+ scope.z1v(renameValidateAndBindObjReceiver$lambda$lambda($fieldNames));
1484
+ var tmp_0 = scope.q1v_1;
2309
1485
  tmp$ret$0 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
2310
1486
  }
2311
1487
  tmp = tmp$ret$0;
@@ -2318,11 +1494,11 @@ function renameValidateAndBindObjReceiver$lambda($typeName, $fieldNames) {
2318
1494
  }
2319
1495
  function buildApiConst$lambda(it) {
2320
1496
  var tmp;
2321
- if (it instanceof Literal) {
2322
- tmp = it.yq_1;
1497
+ if (it instanceof Literal_0) {
1498
+ tmp = it.tt_1;
2323
1499
  } else {
2324
1500
  if (it instanceof Param) {
2325
- tmp = '{' + it.cq_1.l1() + '}';
1501
+ tmp = '{' + it.lq_1.m1() + '}';
2326
1502
  } else {
2327
1503
  noWhenBranchMatchedException();
2328
1504
  }
@@ -2334,23 +1510,23 @@ function bindCallToRequestParams$lambda(element, transformer) {
2334
1510
  if (element instanceof Interface) {
2335
1511
  var tmp$ret$0;
2336
1512
  $l$block: {
2337
- if (!element.t1o_1.equals(Companion_getInstance().s1h('Call'))) {
1513
+ if (!element.e1o_1.equals(Companion_getInstance().x1g('Call'))) {
2338
1514
  tmp$ret$0 = element;
2339
1515
  break $l$block;
2340
1516
  }
2341
1517
  // Inline function 'kotlin.collections.map' call
2342
- var this_0 = element.u1o_1;
1518
+ var this_0 = element.f1o_1;
2343
1519
  // Inline function 'kotlin.collections.mapTo' call
2344
1520
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2345
1521
  var _iterator__ex2g4s = this_0.t();
2346
1522
  while (_iterator__ex2g4s.u()) {
2347
1523
  var item = _iterator__ex2g4s.v();
2348
1524
  var tmp0_safe_receiver = item instanceof Function ? item : null;
2349
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q1l(VOID, VOID, listOf_0(new Parameter(Companion_getInstance().s1h('params'), Custom_init_$Create$('RequestParams'))));
1525
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1l(VOID, VOID, listOf_0(new Parameter(Companion_getInstance().x1g('params'), Custom_init_$Create$('RequestParams'))));
2350
1526
  var tmp$ret$1 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
2351
1527
  destination.x(tmp$ret$1);
2352
1528
  }
2353
- tmp$ret$0 = element.a1p(VOID, destination);
1529
+ tmp$ret$0 = element.m1o(VOID, destination);
2354
1530
  }
2355
1531
  tmp = tmp$ret$0;
2356
1532
  } else {
@@ -2362,7 +1538,7 @@ function bindCallToRequestParams$lambda(element, transformer) {
2362
1538
  function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2363
1539
  var tmp;
2364
1540
  if (stmt instanceof Switch) {
2365
- var tmp1_safe_receiver = stmt.j1q_1;
1541
+ var tmp1_safe_receiver = stmt.v1q_1;
2366
1542
  var tmp_0;
2367
1543
  if (tmp1_safe_receiver == null) {
2368
1544
  tmp_0 = null;
@@ -2384,7 +1560,7 @@ function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2384
1560
  tmp_1 = tmp0_elvis_lhs;
2385
1561
  }
2386
1562
  var errorStmt = tmp_1;
2387
- var tmp_2 = errorStmt.a1r_1;
1563
+ var tmp_2 = errorStmt.n1r_1;
2388
1564
  var tmp1_elvis_lhs = tmp_2 instanceof BinaryOp ? tmp_2 : null;
2389
1565
  var tmp_3;
2390
1566
  if (tmp1_elvis_lhs == null) {
@@ -2394,8 +1570,8 @@ function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2394
1570
  tmp_3 = tmp1_elvis_lhs;
2395
1571
  }
2396
1572
  var binary = tmp_3;
2397
- var tmp_4 = binary.b1r_1;
2398
- var tmp2_elvis_lhs = tmp_4 instanceof Literal_0 ? tmp_4 : null;
1573
+ var tmp_4 = binary.o1r_1;
1574
+ var tmp2_elvis_lhs = tmp_4 instanceof Literal ? tmp_4 : null;
2399
1575
  var tmp_5;
2400
1576
  if (tmp2_elvis_lhs == null) {
2401
1577
  tmp$ret$0 = item;
@@ -2404,81 +1580,25 @@ function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2404
1580
  tmp_5 = tmp2_elvis_lhs;
2405
1581
  }
2406
1582
  var literal = tmp_5;
2407
- tmp$ret$0 = new ErrorStatement(new Literal_0(trimEnd(toString(literal.y1p_1), charArrayOf([_Char___init__impl__6a9atx(32)])), literal.z1p_1));
1583
+ tmp$ret$0 = new ErrorStatement(new Literal(trimEnd(toString_0(literal.p1q_1), charArrayOf([_Char___init__impl__6a9atx(32)])), literal.q1q_1));
2408
1584
  }
2409
1585
  destination.x(tmp$ret$0);
2410
1586
  }
2411
1587
  tmp_0 = destination;
2412
1588
  }
2413
- tmp = transformChildren(stmt.m1q(VOID, VOID, tmp_0), transformer);
1589
+ tmp = transformChildren(stmt.y1q(VOID, VOID, tmp_0), transformer);
2414
1590
  } else {
2415
1591
  tmp = transformChildren(stmt, transformer);
2416
1592
  }
2417
1593
  return tmp;
2418
1594
  }
2419
- function TypeScriptRefinedTypeDefinitionEmitter() {
2420
- }
2421
- function TypeScriptShared() {
2422
- TypeScriptShared_instance = this;
2423
- this.y20_1 = 'community.flock.wirespec';
2424
- this.z20_1 = trimMargin('\n |export namespace Wirespec {\n |' + Spacer_instance.toString() + 'export type Method = "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH" | "TRACE"\n |' + Spacer_instance.toString() + 'export type RawRequest = { method: Method, path: string[], queries: Record<string, string>, headers: Record<string, string>, body?: string }\n |' + Spacer_instance.toString() + 'export type RawResponse = { status: number, headers: Record<string, string>, body?: string }\n |' + Spacer_instance.toString() + 'export type Request<T> = { path: Record<string, unknown>, method: Method, queries?: Record<string, unknown>, headers?: Record<string, unknown>, body?:T }\n |' + Spacer_instance.toString() + 'export type Response<T> = { status:number, headers?: Record<string, unknown>, body?:T }\n |' + Spacer_instance.toString() + 'export type Serialization = { serialize: <T>(type: T) => string; deserialize: <T>(raw: string | undefined) => T }\n |' + Spacer_instance.toString() + 'export type Client<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => { to: (request: REQ) => RawRequest; from: (response: RawResponse) => RES }\n |' + Spacer_instance.toString() + 'export type Server<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => { from: (request: RawRequest) => REQ; to: (response: RES) => RawResponse }\n |' + Spacer_instance.toString() + 'export type Api<REQ extends Request<unknown>, RES extends Response<unknown>> = { name: string; method: Method, path: string, client: Client<REQ, RES>; server: Server<REQ, RES> }\n |}\n ');
2425
- }
2426
- protoOf(TypeScriptShared).toString = function () {
2427
- return 'TypeScriptShared';
2428
- };
2429
- protoOf(TypeScriptShared).hashCode = function () {
2430
- return -646698634;
2431
- };
2432
- protoOf(TypeScriptShared).equals = function (other) {
2433
- if (this === other)
2434
- return true;
2435
- if (!(other instanceof TypeScriptShared))
2436
- return false;
2437
- return true;
2438
- };
2439
- var TypeScriptShared_instance;
2440
- function TypeScriptShared_getInstance() {
2441
- if (TypeScriptShared_instance == null)
2442
- new TypeScriptShared();
2443
- return TypeScriptShared_instance;
2444
- }
2445
- function TypeScriptTypeDefinitionEmitter$sanitizeSymbol$lambda(it) {
2446
- return isLetterOrDigit(it.h1_1) || listOf_0(new Char(_Char___init__impl__6a9atx(95))).u1(it);
2447
- }
2448
- function TypeScriptTypeDefinitionEmitter$emit$lambda(it) {
2449
- // Inline function 'kotlin.text.trimStart' call
2450
- return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
2451
- }
2452
- function TypeScriptTypeDefinitionEmitter$emit$lambda_0(this$0) {
2453
- return function (it) {
2454
- return this$0.nq(it);
2455
- };
2456
- }
2457
- function TypeScriptTypeDefinitionEmitter() {
2458
- }
2459
1595
  //region block: post-declaration
2460
- protoOf(TypeScriptEmitter).lq = emit_3;
2461
- protoOf(TypeScriptEmitter).mq = emit_6;
2462
- protoOf(TypeScriptEmitter).nq = emit_7;
2463
- protoOf(TypeScriptEmitter).oq = emit_4;
2464
- protoOf(TypeScriptEmitter).pq = emit_5;
2465
- protoOf(TypeScriptEmitter).as = emit_10;
2466
- protoOf(TypeScriptEmitter).vr = emit_9;
2467
- protoOf(TypeScriptEmitter).bs = emit_8;
2468
- protoOf(TypeScriptEmitter).or = emit_2;
2469
- protoOf(TypeScriptEmitter).cs = emitValidator;
2470
- protoOf(TypeScriptEmitter).t20 = sanitizeSymbol;
2471
- protoOf(TypeScriptEmitter).j1x = sanitizeSymbol_0;
2472
- protoOf(TypeScriptEmitter).u20 = emitPrimitive;
2473
- protoOf(TypeScriptEmitter).s20 = emitClient;
2474
- protoOf(TypeScriptEmitter).rq = emitClientEndpointRequest;
2475
- protoOf(TypeScriptIrEmitter).y1v = get_extensions;
2476
- protoOf(TypeScriptIrEmitter).z1v = emit_1;
2477
- protoOf(TypeScriptIrEmitter).d1w = beforeGenerate;
1596
+ protoOf(TypeScriptIrEmitter).f1w = get_extensions;
1597
+ protoOf(TypeScriptIrEmitter).g1w = emit_1;
1598
+ protoOf(TypeScriptIrEmitter).k1w = beforeGenerate;
2478
1599
  //endregion
2479
1600
  //region block: exports
2480
1601
  export {
2481
- TypeScriptEmitter as TypeScriptEmitter1b8xo1btx35xi,
2482
1602
  TypeScriptIrEmitter as TypeScriptIrEmitter3q01omscsvyj9,
2483
1603
  };
2484
1604
  //endregion