@flock/wirespec 0.20.0-RC.9 → 0.21.0

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 +1571 -1571
  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 +10257 -10257
  11. package/kotlin-rgxgen.mjs +1819 -1819
  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 +2462 -2388
  18. package/wirespec-src-compiler-core.mjs.map +1 -1
  19. package/wirespec-src-compiler-emitters-java.mjs +482 -1337
  20. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  21. package/wirespec-src-compiler-emitters-kotlin.mjs +376 -1060
  22. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  23. package/wirespec-src-compiler-emitters-python.mjs +424 -1417
  24. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  25. package/wirespec-src-compiler-emitters-rust.mjs +479 -417
  26. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  27. package/wirespec-src-compiler-emitters-scala.mjs +224 -184
  28. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
  29. package/wirespec-src-compiler-emitters-typescript.mjs +568 -1404
  30. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  31. package/wirespec-src-compiler-emitters-wirespec.mjs +113 -86
  32. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  33. package/wirespec-src-compiler-ir.mjs +4311 -4417
  34. package/wirespec-src-compiler-ir.mjs.map +1 -1
  35. package/wirespec-src-compiler-lib.mjs +352 -1141
  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 +772 -760
  40. package/wirespec-src-converter-openapi.mjs.map +1 -1
  41. package/wirespec-src-ide-lsp.mjs +1411 -1396
  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 +15 -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 +40 -35
  51. package/wirespec-src-tools-generator.mjs.map +1 -1
@@ -1,1091 +1,190 @@
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.h1y(_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.r21(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.h1y(_this__u8e3s4.cv_1);
249
- } else {
250
- if (_this__u8e3s4 instanceof Primitive) {
251
- tmp = this.s21(_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(enum_0, module_0) {
383
- var tmp = this.r21(enum_0.yr_1);
384
- return 'export type ' + tmp + ' = ' + joinToString(enum_0.zr_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEnumDefinitionEmitter$emit$lambda) + '\n';
385
- }
386
- initMetadataForInterface(TypeScriptEnumDefinitionEmitter, 'TypeScriptEnumDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
387
- function emit_9(refined) {
388
- return trimMargin('\n |export type ' + this.r21(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.r21(refined.tr_1) + ' => {\n |' + this.cs(refined) + '\n |}\n |\n ');
389
- }
390
- function emitValidator(_this__u8e3s4) {
391
- var defaultReturn = Spacer_instance.toString() + 'return true;';
392
- var type = _this__u8e3s4.ur_1.gv_1;
393
- var tmp;
394
- if (type instanceof Integer) {
395
- var tmp0_safe_receiver = type.lu_1;
396
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.pq(tmp0_safe_receiver);
397
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
398
- } else {
399
- if (type instanceof Number_0) {
400
- var tmp2_safe_receiver = type.ou_1;
401
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.pq(tmp2_safe_receiver);
402
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
403
- } else {
404
- if (type instanceof String_0) {
405
- var tmp4_safe_receiver = type.iu_1;
406
- var tmp_0;
407
- var tmp_1 = tmp4_safe_receiver;
408
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
409
- tmp_0 = null;
410
- } else {
411
- tmp_0 = this.pq(new RegExp_0(tmp4_safe_receiver));
412
- }
413
- var tmp5_elvis_lhs = tmp_0;
414
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
415
- } else {
416
- if (equals(type, Boolean_instance)) {
417
- tmp = defaultReturn;
418
- } else {
419
- if (equals(type, Bytes_instance)) {
420
- tmp = defaultReturn;
421
- } else {
422
- noWhenBranchMatchedException();
423
- }
424
- }
425
- }
426
- }
427
- }
428
- return tmp;
429
- }
430
- initMetadataForInterface(TypeScriptRefinedTypeDefinitionEmitter, 'TypeScriptRefinedTypeDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
431
- function emit_10(endpoint) {
432
- // Inline function 'kotlin.collections.distinctBy' call
433
- var this_0 = importReferences(endpoint);
434
- var set = HashSet_init_$Create$();
435
- var list = ArrayList_init_$Create$();
436
- var _iterator__ex2g4s = this_0.t();
437
- while (_iterator__ex2g4s.u()) {
438
- var e = _iterator__ex2g4s.v();
439
- var key = e.cv_1;
440
- if (set.x(key)) {
441
- list.x(e);
442
- }
443
- }
444
- // Inline function 'kotlin.collections.map' call
445
- // Inline function 'kotlin.collections.mapTo' call
446
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(list, 10));
447
- var _iterator__ex2g4s_0 = list.t();
448
- while (_iterator__ex2g4s_0.u()) {
449
- var item = _iterator__ex2g4s_0.v();
450
- var tmp$ret$2 = 'import {type ' + item.cv_1 + "} from '../model'";
451
- destination.x(tmp$ret$2);
452
- }
453
- var tmp = destination;
454
- var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda);
455
- var tmp_1 = this.r21(endpoint.vp_1);
456
- var tmp_2 = get_pathParams(endpoint);
457
- var tmp_3 = emitType(this, tmp_2, 'Path', TypeScriptEndpointDefinitionEmitter$emit$lambda_0(this));
458
- var tmp_4 = emitType(this, endpoint.yp_1, 'Queries', TypeScriptEndpointDefinitionEmitter$emit$lambda_1(this));
459
- var tmp_5 = emitType(this, endpoint.zp_1, 'Headers', TypeScriptEndpointDefinitionEmitter$emit$lambda_2(this));
460
- var tmp_6 = emitType_1(this, first(endpoint.aq_1), endpoint);
461
- var tmp_7 = distinctByStatus(endpoint.bq_1);
462
- var tmp_8 = joinToString(tmp_7, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_3(this));
463
- var tmp_9 = Spacer_instance.toString();
464
- var tmp_10 = distinctByStatus(endpoint.bq_1);
465
- var tmp_11 = joinToString(tmp_10, ' | ', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_4(this));
466
- var tmp_12 = emitFunction_0(this, first(endpoint.aq_1), endpoint);
467
- var tmp_13 = distinctByStatus(endpoint.bq_1);
468
- var tmp_14 = joinToString(tmp_13, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_5(this));
469
- var tmp_15 = Spacer_instance.toString();
470
- var tmp_16 = Spacer_instance.is(2);
471
- var tmp_17 = emitHandleFunction(this, endpoint);
472
- var tmp_18 = Spacer_instance.toString();
473
- var tmp_19 = prependIndent(emitClient_0(this, endpoint), Spacer_instance.is(1));
474
- var tmp_20 = prependIndent(emitServer(this, endpoint), Spacer_instance.is(1));
475
- var tmp_21 = Spacer_instance.toString();
476
- var tmp_22 = Spacer_instance.is(2);
477
- var tmp_23 = Companion_instance_0.gr(this.r21(endpoint.vp_1));
478
- var tmp_24 = Spacer_instance.is(2);
479
- var tmp_25 = Spacer_instance.is(2);
480
- 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 ');
481
- }
482
- initMetadataForInterface(TypeScriptEndpointDefinitionEmitter, 'TypeScriptEndpointDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
483
- initMetadataForClass(TypeScriptEmitter, 'TypeScriptEmitter', TypeScriptEmitter, LanguageEmitter, [LanguageEmitter, TypeScriptClientEmitter, TypeScriptEnumDefinitionEmitter, TypeScriptIdentifierEmitter, TypeScriptRefinedTypeDefinitionEmitter, TypeScriptTypeDefinitionEmitter, TypeScriptEndpointDefinitionEmitter]);
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.t21_1 = FileExtension_TypeScript_getInstance();
580
- this.u21_1 = TypeScriptShared_getInstance();
581
- this.v21_1 = '//';
582
- }
583
- protoOf(TypeScriptEmitter).vq = function () {
584
- return this.t21_1;
585
- };
586
- protoOf(TypeScriptEmitter).e1y = function () {
587
- return this.u21_1;
588
- };
589
- protoOf(TypeScriptEmitter).wq = function () {
590
- return this.v21_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.q21(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.e1y().x21_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.h1y(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.r21(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.r21(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
+ convert3ewo9inue7gua as convert_5,
116
+ get_extensions31c4or738wbxz as get_extensions,
117
+ emit3bzdcd0f6nwtj as emit_1,
118
+ beforeGenerate3o8idb3hey1b0 as beforeGenerate,
119
+ IrEmitterh2m93ojzvkep as IrEmitter,
120
+ rawttvqxl50flj9 as raw,
121
+ Switch3a1zi3na98deu as Switch,
122
+ Integer1uwg1wvo5lp6z as Integer,
123
+ Case2i7oahw4alz6h as Case,
124
+ FieldCall1iz7z2fx2xo4p as FieldCall,
125
+ Parameteruqoxd4rzw7ga as Parameter,
126
+ Function21cuq8qizkin7 as Function,
127
+ ErrorStatement1fq19ynue37ia as ErrorStatement,
128
+ BinaryOp35p72iprkxis9 as BinaryOp,
129
+ } from './wirespec-src-compiler-ir.mjs';
130
+ import {
131
+ Paramvfwnys2w6aj1 as Param,
132
+ Bytes3eoc50vgt1uem as Bytes,
133
+ Boolean1fpfi8m5jt3fg as Boolean_0,
134
+ Number1mui0heypwdhp as Number_0,
135
+ Integer39lqx4uc63u28 as Integer_0,
136
+ String1czvr8pxnm6on as String_0,
137
+ Primitive1i8my14jkp3nk as Primitive,
138
+ Custom1lu6o8txpimqz as Custom_0,
139
+ Anyv7qdq63z63rc as Any,
140
+ Unit2z95clvxm08vr as Unit,
141
+ Iterable29qbzfup67wqp as Iterable,
142
+ Dict3g7w5wia7rncj as Dict,
143
+ FileExtension_TypeScript_getInstancebhrmnb4pwt10 as FileExtension_TypeScript_getInstance,
144
+ Companion_instance1a2xqc448tlhh as Companion_instance,
145
+ namespace2467cajrmgrc5 as namespace,
146
+ Emitted12h24rpo4uifw as Emitted,
147
+ plus3lrm73de10b42 as plus_1,
148
+ Unionccsavx6nrdr2 as Union,
149
+ Refined1lkzc0dg6wey7 as Refined,
150
+ Enum3l2iuc342kle6 as Enum_0,
151
+ Type12n1gx16iqtcu as Type,
152
+ plus14o24vdaiongg as plus_2,
153
+ importReferencesy4xv7r53sjjs as importReferences,
154
+ Literal331hu9r04vptz as Literal_0,
155
+ } from './wirespec-src-compiler-core.mjs';
156
+ import {
157
+ _NonEmptyList___get_all__impl__pmf5092svcdxelgy1aa as _NonEmptyList___get_all__impl__pmf509,
158
+ NonEmptyList3ak25ihy2gcvs as NonEmptyList,
159
+ _NonEmptyList___init__impl__fxd0xp3qwfhfa83yk9f as _NonEmptyList___init__impl__fxd0xp,
160
+ NonEmptyList__plus_impl_xqmb91y38uyofmba13 as NonEmptyList__plus_impl_xqmb9,
161
+ } from './arrow-arrow-core.mjs';
162
+ //region block: imports
163
+ var imul = Math.imul;
164
+ //endregion
165
+ //region block: pre-declaration
166
+ initMetadataForClass(EndpointParam, 'EndpointParam');
167
+ initMetadataForCompanion(Companion);
168
+ initMetadataForClass(TypeScriptIrEmitter, 'TypeScriptIrEmitter', TypeScriptIrEmitter, VOID, [IrEmitter]);
169
+ //endregion
1071
170
  function _get_sanitizationConfig__sns434($this) {
1072
- var tmp0 = $this.a22_1;
171
+ var tmp0 = $this.w1z_1;
1073
172
  var tmp = KProperty1;
1074
173
  // Inline function 'kotlin.getValue' call
1075
174
  getPropertyCallableRef('sanitizationConfig', 1, tmp, TypeScriptIrEmitter$_get_sanitizationConfig_$ref_f6f0bh(), null);
1076
- return tmp0.l1();
175
+ return tmp0.m1();
1077
176
  }
1078
177
  function _get_modelSanitizationConfig__vgg831($this) {
1079
- var tmp0 = $this.b22_1;
178
+ var tmp0 = $this.x1z_1;
1080
179
  var tmp = KProperty1;
1081
180
  // Inline function 'kotlin.getValue' call
1082
181
  getPropertyCallableRef('modelSanitizationConfig', 1, tmp, TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88(), null);
1083
- return tmp0.l1();
182
+ return tmp0.m1();
1084
183
  }
1085
184
  function sanitize($this, _this__u8e3s4) {
1086
- return '"' + _this__u8e3s4.l1() + '"';
185
+ return '"' + _this__u8e3s4.m1() + '"';
1087
186
  }
1088
- function sanitizeSymbol_1($this, _this__u8e3s4) {
187
+ function sanitizeSymbol($this, _this__u8e3s4) {
1089
188
  // Inline function 'kotlin.text.filter' call
1090
189
  // Inline function 'kotlin.text.filterTo' call
1091
190
  var destination = StringBuilder_init_$Create$();
@@ -1104,7 +203,7 @@ function sanitizeSymbol_1($this, _this__u8e3s4) {
1104
203
  return destination.toString();
1105
204
  }
1106
205
  function sanitizeKeywords($this, _this__u8e3s4) {
1107
- return Companion_getInstance_0().d22_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
206
+ return Companion_getInstance_0().v1x().v1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
1108
207
  }
1109
208
  function firstToLower($this, _this__u8e3s4) {
1110
209
  // Inline function 'kotlin.text.replaceFirstChar' call
@@ -1115,18 +214,18 @@ function firstToLower($this, _this__u8e3s4) {
1115
214
  var this_0 = charCodeAt(_this__u8e3s4, 0);
1116
215
  // Inline function 'kotlin.js.asDynamic' call
1117
216
  // 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);
217
+ var tmp$ret$4 = toString(this_0).toLowerCase();
218
+ tmp = toString_0(tmp$ret$4) + substring(_this__u8e3s4, 1);
1120
219
  } else {
1121
220
  tmp = _this__u8e3s4;
1122
221
  }
1123
222
  return tmp;
1124
223
  }
1125
224
  function sanitizeParamName($this, identifier) {
1126
- var tmp0 = identifier.l1();
225
+ var tmp0 = identifier.m1();
1127
226
  // Inline function 'kotlin.text.split' call
1128
227
  // Inline function 'kotlin.collections.filter' call
1129
- var tmp0_0 = Regex_init_$Create$('[.\\s-]+').zc(tmp0, 0);
228
+ var tmp0_0 = Regex_init_$Create$('[.\\s-]+').ad(tmp0, 0);
1130
229
  // Inline function 'kotlin.collections.filterTo' call
1131
230
  var destination = ArrayList_init_$Create$();
1132
231
  var _iterator__ex2g4s = tmp0_0.t();
@@ -1138,8 +237,8 @@ function sanitizeParamName($this, identifier) {
1138
237
  }
1139
238
  }
1140
239
  var parts = destination;
1141
- var name = parts.a1() > 1 ? (new Name(parts)).e1n() : identifier.l1();
1142
- return sanitizeKeywords($this, sanitizeSymbol_1($this, name));
240
+ var name = parts.b1() > 1 ? (new Name(parts)).t1m() : identifier.m1();
241
+ return sanitizeKeywords($this, sanitizeSymbol($this, name));
1143
242
  }
1144
243
  function buildEndpointParams($this, endpoint) {
1145
244
  // Inline function 'kotlin.collections.buildList' call
@@ -1147,7 +246,7 @@ function buildEndpointParams($this, endpoint) {
1147
246
  // Inline function 'kotlin.apply' call
1148
247
  var this_0 = ArrayList_init_$Create$();
1149
248
  // Inline function 'kotlin.collections.filterIsInstance' call
1150
- var tmp0 = endpoint.xp_1;
249
+ var tmp0 = endpoint.mq_1;
1151
250
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1152
251
  var destination = ArrayList_init_$Create$();
1153
252
  var _iterator__ex2g4s = tmp0.t();
@@ -1161,36 +260,36 @@ function buildEndpointParams($this, endpoint) {
1161
260
  var _iterator__ex2g4s_0 = destination.t();
1162
261
  while (_iterator__ex2g4s_0.u()) {
1163
262
  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()));
263
+ this_0.x(new EndpointParam(sanitizeParamName($this, element_0.rq_1), emitTypeScriptReference($this, element_0.sq_1.fv(false)), element_0.sq_1.dv()));
1165
264
  }
1166
265
  // Inline function 'kotlin.collections.forEach' call
1167
- var _iterator__ex2g4s_1 = endpoint.yp_1.t();
266
+ var _iterator__ex2g4s_1 = endpoint.nq_1.t();
1168
267
  while (_iterator__ex2g4s_1.u()) {
1169
268
  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()));
269
+ this_0.x(new EndpointParam(sanitizeParamName($this, element_1.sp_1), emitTypeScriptReference($this, element_1.tp_1.fv(false)), element_1.tp_1.dv()));
1171
270
  }
1172
271
  // Inline function 'kotlin.collections.forEach' call
1173
- var _iterator__ex2g4s_2 = endpoint.zp_1.t();
272
+ var _iterator__ex2g4s_2 = endpoint.oq_1.t();
1174
273
  while (_iterator__ex2g4s_2.u()) {
1175
274
  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()));
275
+ this_0.x(new EndpointParam(sanitizeParamName($this, element_2.sp_1), emitTypeScriptReference($this, element_2.tp_1.fv(false)), element_2.tp_1.dv()));
1177
276
  }
1178
- var tmp0_safe_receiver = first(endpoint.aq_1).eq_1;
277
+ var tmp0_safe_receiver = first(endpoint.pq_1).tq_1;
1179
278
  if (tmp0_safe_receiver == null)
1180
279
  null;
1181
280
  else {
1182
281
  // 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()));
282
+ this_0.x(new EndpointParam('body', emitTypeScriptReference($this, tmp0_safe_receiver.vq_1.fv(false)), tmp0_safe_receiver.vq_1.dv()));
1184
283
  }
1185
- return this_0.o5();
284
+ return this_0.p5();
1186
285
  }
1187
286
  function emitTypeScriptReference($this, ref) {
1188
287
  var tmp;
1189
288
  if (ref instanceof Dict) {
1190
- tmp = 'Record<string, ' + emitTypeScriptReference($this, ref.so_1) + '>';
289
+ tmp = 'Record<string, ' + emitTypeScriptReference($this, ref.bp_1) + '>';
1191
290
  } else {
1192
291
  if (ref instanceof Iterable) {
1193
- tmp = emitTypeScriptReference($this, ref.po_1) + '[]';
292
+ tmp = emitTypeScriptReference($this, ref.yo_1) + '[]';
1194
293
  } else {
1195
294
  if (ref instanceof Unit) {
1196
295
  tmp = 'undefined';
@@ -1198,16 +297,16 @@ function emitTypeScriptReference($this, ref) {
1198
297
  if (ref instanceof Any) {
1199
298
  tmp = 'any';
1200
299
  } else {
1201
- if (ref instanceof Custom) {
1202
- tmp = sanitizeSymbol_1($this, ref.cv_1);
300
+ if (ref instanceof Custom_0) {
301
+ tmp = sanitizeSymbol($this, ref.lv_1);
1203
302
  } else {
1204
303
  if (ref instanceof Primitive) {
1205
- var tmp1_subject = ref.gv_1;
304
+ var tmp1_subject = ref.wt_1;
1206
305
  var tmp_0;
1207
306
  if (tmp1_subject instanceof String_0) {
1208
307
  tmp_0 = 'string';
1209
308
  } else {
1210
- if (tmp1_subject instanceof Integer) {
309
+ if (tmp1_subject instanceof Integer_0) {
1211
310
  tmp_0 = 'number';
1212
311
  } else {
1213
312
  if (tmp1_subject instanceof Number_0) {
@@ -1235,20 +334,20 @@ function emitTypeScriptReference($this, ref) {
1235
334
  }
1236
335
  }
1237
336
  // Inline function 'kotlin.let' call
1238
- return tmp + (ref.uu() ? ' | undefined' : '');
337
+ return tmp + (ref.dv() ? ' | undefined' : '');
1239
338
  }
1240
339
  function EndpointParam(name, type, nullable) {
1241
- this.e22_1 = name;
1242
- this.f22_1 = type;
1243
- this.g22_1 = nullable;
340
+ this.a20_1 = name;
341
+ this.b20_1 = type;
342
+ this.c20_1 = nullable;
1244
343
  }
1245
344
  protoOf(EndpointParam).toString = function () {
1246
- return 'EndpointParam(name=' + this.e22_1 + ', type=' + this.f22_1 + ', nullable=' + this.g22_1 + ')';
345
+ return 'EndpointParam(name=' + this.a20_1 + ', type=' + this.b20_1 + ', nullable=' + this.c20_1 + ')';
1247
346
  };
1248
347
  protoOf(EndpointParam).hashCode = function () {
1249
- var result = getStringHashCode(this.e22_1);
1250
- result = imul(result, 31) + getStringHashCode(this.f22_1) | 0;
1251
- result = imul(result, 31) + getBooleanHashCode(this.g22_1) | 0;
348
+ var result = getStringHashCode(this.a20_1);
349
+ result = imul(result, 31) + getStringHashCode(this.b20_1) | 0;
350
+ result = imul(result, 31) + getBooleanHashCode(this.c20_1) | 0;
1252
351
  return result;
1253
352
  };
1254
353
  protoOf(EndpointParam).equals = function (other) {
@@ -1256,20 +355,21 @@ protoOf(EndpointParam).equals = function (other) {
1256
355
  return true;
1257
356
  if (!(other instanceof EndpointParam))
1258
357
  return false;
1259
- if (!(this.e22_1 === other.e22_1))
358
+ if (!(this.a20_1 === other.a20_1))
1260
359
  return false;
1261
- if (!(this.f22_1 === other.f22_1))
360
+ if (!(this.b20_1 === other.b20_1))
1262
361
  return false;
1263
- if (!(this.g22_1 === other.g22_1))
362
+ if (!(this.c20_1 === other.c20_1))
1264
363
  return false;
1265
364
  return true;
1266
365
  };
1267
366
  function Companion() {
1268
- Companion_instance_1 = this;
367
+ Companion_instance_0 = this;
368
+ this.y1z_1 = TypeScriptGenerator_getInstance();
1269
369
  var tmp = this;
1270
370
  // Inline function 'kotlin.collections.associateWith' call
1271
371
  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));
372
+ var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16));
1273
373
  // Inline function 'kotlin.collections.associateWithTo' call
1274
374
  var _iterator__ex2g4s = this_0.t();
1275
375
  while (_iterator__ex2g4s.u()) {
@@ -1277,29 +377,31 @@ function Companion() {
1277
377
  // Inline function 'kotlin.text.lowercase' call
1278
378
  // Inline function 'kotlin.js.asDynamic' call
1279
379
  var tmp$ret$2 = removePrefix(element, 'GeneratorField').toLowerCase();
1280
- result.s2(element, tmp$ret$2);
380
+ result.t2(element, tmp$ret$2);
1281
381
  }
1282
- tmp.c22_1 = result;
1283
- this.d22_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']);
382
+ tmp.z1z_1 = result;
1284
383
  }
1285
- var Companion_instance_1;
384
+ protoOf(Companion).v1x = function () {
385
+ return this.y1z_1.h1x_1;
386
+ };
387
+ var Companion_instance_0;
1286
388
  function Companion_getInstance_0() {
1287
- if (Companion_instance_1 == null)
389
+ if (Companion_instance_0 == null)
1288
390
  new Companion();
1289
- return Companion_instance_1;
391
+ return Companion_instance_0;
1290
392
  }
1291
393
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
1292
394
  return it;
1293
395
  }
1294
396
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
1295
397
  return function (name) {
1296
- var sanitized = name.q1h_1.a1() > 1 ? name.e1n() : sanitizeSymbol_1(this$0, name.r1j());
398
+ var sanitized = name.f1h_1.b1() > 1 ? name.t1m() : sanitizeSymbol(this$0, name.g1j());
1297
399
  return new Name(listOf_0(sanitized));
1298
400
  };
1299
401
  }
1300
402
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
1301
403
  return function (name) {
1302
- var sanitized = name.q1h_1.a1() > 1 ? name.e1n() : sanitizeSymbol_1(this$0, name.r1j());
404
+ var sanitized = name.f1h_1.b1() > 1 ? name.t1m() : sanitizeSymbol(this$0, name.g1j());
1303
405
  return new Name(listOf_0(sanitized));
1304
406
  };
1305
407
  }
@@ -1325,29 +427,29 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0)
1325
427
  return function (stmt, tr) {
1326
428
  var tmp;
1327
429
  if (stmt instanceof VariableReference) {
1328
- tmp = new VariableReference(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.f1q_1));
430
+ tmp = new VariableReference(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.b1o_1));
1329
431
  } else {
1330
432
  if (stmt instanceof ConstructorStatement) {
1331
- var tmp_0 = tr.z1v(stmt.j1o_1);
433
+ var tmp_0 = tr.s1v(stmt.y1n_1);
1332
434
  // Inline function 'kotlin.collections.map' call
1333
- var this_0 = stmt.k1o_1;
435
+ var this_0 = stmt.z1n_1;
1334
436
  // Inline function 'kotlin.collections.mapTo' call
1335
- var destination = ArrayList_init_$Create$_0(this_0.a1());
437
+ var destination = ArrayList_init_$Create$_0(this_0.b1());
1336
438
  // Inline function 'kotlin.collections.iterator' call
1337
- var _iterator__ex2g4s = this_0.j1().t();
439
+ var _iterator__ex2g4s = this_0.k1().t();
1338
440
  while (_iterator__ex2g4s.u()) {
1339
441
  var item = _iterator__ex2g4s.v();
1340
442
  // Inline function 'kotlin.collections.component1' call
1341
- var key = item.k1();
443
+ var key = item.l1();
1342
444
  // 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.c1w(value));
445
+ var value = item.m1();
446
+ var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), key), tr.v1v(value));
1345
447
  destination.x(tmp$ret$3);
1346
448
  }
1347
449
  tmp = new ConstructorStatement(tmp_0, toMap(destination));
1348
450
  } else {
1349
451
  if (stmt instanceof Assignment) {
1350
- tmp = new Assignment(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.i1q_1), tr.c1w(stmt.j1q_1), stmt.k1q_1);
452
+ tmp = new Assignment(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.s1q_1), tr.v1v(stmt.t1q_1), stmt.u1q_1);
1351
453
  } else {
1352
454
  tmp = transformChildren(stmt, tr);
1353
455
  }
@@ -1358,7 +460,7 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0)
1358
460
  }
1359
461
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1360
462
  return function () {
1361
- var tmp0_reservedKeywords = Companion_getInstance_0().d22_1;
463
+ var tmp0_reservedKeywords = Companion_getInstance_0().v1x();
1362
464
  var tmp = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1363
465
  var tmp_0 = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
1364
466
  var tmp_1 = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
@@ -1372,7 +474,7 @@ function TypeScriptIrEmitter$_get_sanitizationConfig_$ref_f6f0bh() {
1372
474
  };
1373
475
  }
1374
476
  function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
1375
- return new Name(listOf_0(name.r1j()));
477
+ return new Name(listOf_0(name.g1j()));
1376
478
  }
1377
479
  function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(it) {
1378
480
  return it;
@@ -1381,7 +483,7 @@ function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
1381
483
  return function () {
1382
484
  var tmp = _get_sanitizationConfig__sns434(this$0);
1383
485
  var tmp_0 = TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
1384
- return tmp.u1x(VOID, VOID, tmp_0, VOID, TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0);
486
+ return tmp.t1x(VOID, VOID, tmp_0, VOID, TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0);
1385
487
  };
1386
488
  }
1387
489
  function TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88() {
@@ -1392,11 +494,40 @@ function TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88() {
1392
494
  function TypeScriptIrEmitter$emitShared$lambda(element, transformer) {
1393
495
  var tmp;
1394
496
  if (element instanceof Namespace) {
1395
- var injected = element.s1o_1.equals(Companion_getInstance().s1h('Wirespec')) ? listOf_0(new RawElement('export type Type = string')) : emptyList();
497
+ var injected = element.i1o_1.equals(Companion_getInstance().h1h('Wirespec')) ? listOf_0(new RawElement('export type Type = string')) : emptyList();
1396
498
  var tmp_0;
1397
499
  // Inline function 'kotlin.collections.isNotEmpty' call
1398
500
  if (!injected.r()) {
1399
- tmp_0 = withElements(element, plus_1(injected, element.o1o()));
501
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
502
+ var elements = plus(injected, element.e1o());
503
+ var tmp_1;
504
+ if (element instanceof File) {
505
+ tmp_1 = element.g1o(VOID, elements);
506
+ } else {
507
+ if (element instanceof Struct) {
508
+ tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
509
+ } else {
510
+ if (element instanceof Namespace) {
511
+ tmp_1 = element.n1o(VOID, elements);
512
+ } else {
513
+ if (element instanceof Interface) {
514
+ tmp_1 = element.w1o(VOID, elements);
515
+ } else {
516
+ if (element instanceof Enum) {
517
+ tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
518
+ } else {
519
+ if (element instanceof Main) {
520
+ tmp_1 = element;
521
+ } else {
522
+ tmp_1 = element;
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
528
+ }
529
+ var tmp_2 = tmp_1;
530
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1400
531
  } else {
1401
532
  tmp_0 = element;
1402
533
  }
@@ -1411,11 +542,40 @@ function TypeScriptIrEmitter$emitShared$lambda_0($api) {
1411
542
  return function (element, transformer) {
1412
543
  var tmp;
1413
544
  if (element instanceof Namespace) {
1414
- var injected = element.s1o_1.equals(Companion_getInstance().s1h('Wirespec')) ? listOf_0(new RawElement($api)) : emptyList();
545
+ var injected = element.i1o_1.equals(Companion_getInstance().h1h('Wirespec')) ? listOf_0(new RawElement($api)) : emptyList();
1415
546
  var tmp_0;
1416
547
  // Inline function 'kotlin.collections.isNotEmpty' call
1417
548
  if (!injected.r()) {
1418
- tmp_0 = withElements(element, plus_1(element.o1o(), injected));
549
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
550
+ var elements = plus(element.e1o(), injected);
551
+ var tmp_1;
552
+ if (element instanceof File) {
553
+ tmp_1 = element.g1o(VOID, elements);
554
+ } else {
555
+ if (element instanceof Struct) {
556
+ tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
557
+ } else {
558
+ if (element instanceof Namespace) {
559
+ tmp_1 = element.n1o(VOID, elements);
560
+ } else {
561
+ if (element instanceof Interface) {
562
+ tmp_1 = element.w1o(VOID, elements);
563
+ } else {
564
+ if (element instanceof Enum) {
565
+ tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
566
+ } else {
567
+ if (element instanceof Main) {
568
+ tmp_1 = element;
569
+ } else {
570
+ tmp_1 = element;
571
+ }
572
+ }
573
+ }
574
+ }
575
+ }
576
+ }
577
+ var tmp_2 = tmp_1;
578
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1419
579
  } else {
1420
580
  tmp_0 = element;
1421
581
  }
@@ -1430,13 +590,13 @@ function TypeScriptIrEmitter$emitShared$lambda_0($api) {
1430
590
  function TypeScriptIrEmitter$emitShared$lambda_1(element, transformer) {
1431
591
  var tmp;
1432
592
  if (element instanceof Struct) {
1433
- var tmp0_safe_receiver = Companion_getInstance_0().c22_1.p2(element.x1o_1.r1j());
593
+ var tmp0_safe_receiver = Companion_getInstance_0().z1z_1.q2(element.c1q_1.g1j());
1434
594
  var tmp_0;
1435
595
  if (tmp0_safe_receiver == null) {
1436
596
  tmp_0 = null;
1437
597
  } else {
1438
598
  // Inline function 'kotlin.let' call
1439
- tmp_0 = element.i1p(VOID, plus_1(listOf_0(new Field(Companion_getInstance().s1h('kind'), new StringLiteral(tmp0_safe_receiver))), element.y1o_1));
599
+ tmp_0 = element.n1q(VOID, plus(listOf_0(new Field(Companion_getInstance().h1h('kind'), new StringLiteral(tmp0_safe_receiver))), element.d1q_1));
1440
600
  }
1441
601
  var tmp1_elvis_lhs = tmp_0;
1442
602
  tmp = tmp1_elvis_lhs == null ? element : tmp1_elvis_lhs;
@@ -1447,7 +607,7 @@ function TypeScriptIrEmitter$emitShared$lambda_1(element, transformer) {
1447
607
  return transformChildren_0(transformed, transformer);
1448
608
  }
1449
609
  function TypeScriptIrEmitter$emit$lambda(it) {
1450
- return 'export {' + it.nr().l1() + "} from './" + it.nr().l1() + "'";
610
+ return 'export {' + it.mr().m1() + "} from './" + it.mr().m1() + "'";
1451
611
  }
1452
612
  function TypeScriptIrEmitter$emitGenerator$lambda($definition) {
1453
613
  return function (expr, t) {
@@ -1456,24 +616,24 @@ function TypeScriptIrEmitter$emitGenerator$lambda($definition) {
1456
616
  var tmp_1;
1457
617
  var tmp_2;
1458
618
  if (expr instanceof FunctionCall) {
1459
- var tmp_3 = expr.m1n_1;
619
+ var tmp_3 = expr.b1n_1;
1460
620
  tmp_2 = tmp_3 instanceof RawExpression;
1461
621
  } else {
1462
622
  tmp_2 = false;
1463
623
  }
1464
624
  if (tmp_2) {
1465
- var tmp_4 = expr.m1n_1;
1466
- tmp_1 = (tmp_4 instanceof RawExpression ? tmp_4 : THROW_CCE()).h1q_1 === $definition.yr_1.l1();
625
+ var tmp_4 = expr.b1n_1;
626
+ tmp_1 = (tmp_4 instanceof RawExpression ? tmp_4 : THROW_CCE()).r1q_1 === $definition.yr_1.m1();
1467
627
  } else {
1468
628
  tmp_1 = false;
1469
629
  }
1470
630
  if (tmp_1) {
1471
- tmp_0 = expr.o1n_1.equals(Companion_getInstance().s1h('valueOf'));
631
+ tmp_0 = expr.d1n_1.equals(Companion_getInstance().h1h('valueOf'));
1472
632
  } else {
1473
633
  tmp_0 = false;
1474
634
  }
1475
635
  if (tmp_0) {
1476
- var tmp0_elvis_lhs = expr.p1n_1.p2(Companion_getInstance().s1h('label'));
636
+ var tmp0_elvis_lhs = expr.e1n_1.q2(Companion_getInstance().h1h('label'));
1477
637
  tmp = tmp0_elvis_lhs == null ? expr : tmp0_elvis_lhs;
1478
638
  } else {
1479
639
  tmp = transformChildren_1(expr, t);
@@ -1486,12 +646,12 @@ function TypeScriptIrEmitter$emitGenerator$lambda_0($definition) {
1486
646
  var tmp;
1487
647
  var tmp_0;
1488
648
  if (expr instanceof ConstructorStatement) {
1489
- tmp_0 = equals(expr.j1o_1, Custom_init_$Create$($definition.tr_1.l1()));
649
+ tmp_0 = equals(expr.y1n_1, Custom_init_$Create$($definition.tr_1.m1()));
1490
650
  } else {
1491
651
  tmp_0 = false;
1492
652
  }
1493
653
  if (tmp_0) {
1494
- var tmp0_elvis_lhs = expr.k1o_1.p2(Companion_getInstance().s1h('value'));
654
+ var tmp0_elvis_lhs = expr.z1n_1.q2(Companion_getInstance().h1h('value'));
1495
655
  tmp = tmp0_elvis_lhs == null ? expr : tmp0_elvis_lhs;
1496
656
  } else {
1497
657
  tmp = transformChildren_1(expr, t);
@@ -1502,37 +662,37 @@ function TypeScriptIrEmitter$emitGenerator$lambda_0($definition) {
1502
662
  function TypeScriptIrEmitter$emitGenerator$lambda_1(expr, t) {
1503
663
  var tmp;
1504
664
  if (expr instanceof ConstructorStatement) {
1505
- var tmp_0 = expr.j1o_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.p1j_1;
1508
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r1j();
665
+ var tmp_0 = expr.y1n_1;
666
+ var tmp0_safe_receiver = tmp_0 instanceof Custom ? tmp_0 : null;
667
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e1j_1;
668
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g1j();
1509
669
  var typeName = tmp2_safe_receiver == null ? null : removePrefix(tmp2_safe_receiver, 'Wirespec.');
1510
670
  var tmp_1;
1511
671
  if (typeName == null) {
1512
672
  tmp_1 = null;
1513
673
  } else {
1514
674
  // Inline function 'kotlin.let' call
1515
- tmp_1 = Companion_getInstance_0().c22_1.p2(typeName);
675
+ tmp_1 = Companion_getInstance_0().z1z_1.q2(typeName);
1516
676
  }
1517
677
  var kind = tmp_1;
1518
678
  var tmp_2;
1519
679
  if (!(kind == null)) {
1520
- var tmp_3 = mapOf(to(Companion_getInstance().s1h('kind'), new Literal_0(kind, String_instance)));
680
+ var tmp_3 = mapOf(to(Companion_getInstance().h1h('kind'), new Literal(kind, String_instance)));
1521
681
  // Inline function 'kotlin.collections.mapValues' call
1522
- var this_0 = expr.k1o_1;
682
+ var this_0 = expr.z1n_1;
1523
683
  // Inline function 'kotlin.collections.mapValuesTo' call
1524
- var destination = LinkedHashMap_init_$Create$_0(mapCapacity(this_0.a1()));
684
+ var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
1525
685
  // Inline function 'kotlin.collections.associateByTo' call
1526
- var _iterator__ex2g4s = this_0.j1().t();
686
+ var _iterator__ex2g4s = this_0.k1().t();
1527
687
  while (_iterator__ex2g4s.u()) {
1528
688
  var element = _iterator__ex2g4s.v();
1529
- var tmp_4 = element.k1();
689
+ var tmp_4 = element.l1();
1530
690
  // Inline function 'kotlin.collections.component2' call
1531
- var v = element.l1();
1532
- var tmp$ret$4 = t.c1w(v);
1533
- destination.s2(tmp_4, tmp$ret$4);
691
+ var v = element.m1();
692
+ var tmp$ret$4 = t.v1v(v);
693
+ destination.t2(tmp_4, tmp$ret$4);
1534
694
  }
1535
- tmp_2 = new ConstructorStatement(expr.j1o_1, plus_2(tmp_3, destination));
695
+ tmp_2 = new ConstructorStatement(expr.y1n_1, plus_0(tmp_3, destination));
1536
696
  } else {
1537
697
  tmp_2 = transformChildren(expr, t);
1538
698
  }
@@ -1559,17 +719,17 @@ function TypeScriptIrEmitter$emitGenerator$lambda_5($generatorOwnName, $generato
1559
719
  var tmp_0;
1560
720
  var tmp_1;
1561
721
  if (expr instanceof RawExpression) {
1562
- tmp_1 = endsWith(expr.h1q_1, 'Generator');
722
+ tmp_1 = endsWith(expr.r1q_1, 'Generator');
1563
723
  } else {
1564
724
  tmp_1 = false;
1565
725
  }
1566
726
  if (tmp_1) {
1567
- tmp_0 = !(expr.h1q_1 === $generatorOwnName);
727
+ tmp_0 = !(expr.r1q_1 === $generatorOwnName);
1568
728
  } else {
1569
729
  tmp_0 = false;
1570
730
  }
1571
731
  if (tmp_0) {
1572
- $generatorRefs.x(expr.h1q_1);
732
+ $generatorRefs.x(expr.r1q_1);
1573
733
  tmp = Unit_instance;
1574
734
  }
1575
735
  return transformChildren_1(expr, t);
@@ -1583,7 +743,36 @@ function TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint) {
1583
743
  var tmp_0;
1584
744
  // Inline function 'kotlin.collections.isNotEmpty' call
1585
745
  if (!injected.r()) {
1586
- tmp_0 = withElements(element, plus_1(element.o1o(), injected));
746
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
747
+ var elements = plus(element.e1o(), injected);
748
+ var tmp_1;
749
+ if (element instanceof File) {
750
+ tmp_1 = element.g1o(VOID, elements);
751
+ } else {
752
+ if (element instanceof Struct) {
753
+ tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
754
+ } else {
755
+ if (element instanceof Namespace) {
756
+ tmp_1 = element.n1o(VOID, elements);
757
+ } else {
758
+ if (element instanceof Interface) {
759
+ tmp_1 = element.w1o(VOID, elements);
760
+ } else {
761
+ if (element instanceof Enum) {
762
+ tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
763
+ } else {
764
+ if (element instanceof Main) {
765
+ tmp_1 = element;
766
+ } else {
767
+ tmp_1 = element;
768
+ }
769
+ }
770
+ }
771
+ }
772
+ }
773
+ }
774
+ var tmp_2 = tmp_1;
775
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1587
776
  } else {
1588
777
  tmp_0 = element;
1589
778
  }
@@ -1602,14 +791,14 @@ function emit$injectApiConst(_this__u8e3s4, $endpoint) {
1602
791
  var tmp = scope;
1603
792
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1604
793
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1605
- var this_0 = scope.h1w_1;
794
+ var this_0 = scope.a1w_1;
1606
795
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1607
796
  // Inline function 'kotlin.apply' call
1608
797
  var this_1 = new TransformerBuilder();
1609
- this_1.f1j(TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint));
1610
- var tmp$ret$2 = this_1.g1j();
1611
- tmp.h1w_1 = transform(this_0, tmp$ret$2);
1612
- var tmp_0 = scope.h1w_1;
798
+ this_1.u1i(TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint));
799
+ var tmp$ret$2 = this_1.v1i();
800
+ tmp.a1w_1 = transform(this_0, tmp$ret$2);
801
+ var tmp_0 = scope.a1w_1;
1613
802
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1614
803
  }
1615
804
  function emit$applyCallParamsIfNeeded(_this__u8e3s4, hasRequestParams) {
@@ -1617,27 +806,27 @@ function emit$applyCallParamsIfNeeded(_this__u8e3s4, hasRequestParams) {
1617
806
  }
1618
807
  function TypeScriptIrEmitter$emitClient$lambda(this$0) {
1619
808
  return function (it) {
1620
- var methodName = firstToLower(this$0, it.vp_1.l1());
809
+ var methodName = firstToLower(this$0, it.kq_1.m1());
1621
810
  return ' ...' + methodName + 'Client(serialization, transportation),';
1622
811
  };
1623
812
  }
1624
813
  function TypeScriptIrEmitter() {
1625
814
  Companion_getInstance_0();
1626
- this.y21_1 = TypeScriptGenerator_getInstance();
1627
- this.z21_1 = FileExtension_TypeScript_getInstance();
815
+ this.u1z_1 = TypeScriptGenerator_getInstance();
816
+ this.v1z_1 = FileExtension_TypeScript_getInstance();
1628
817
  var tmp = this;
1629
- tmp.a22_1 = lazy(TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this));
818
+ tmp.w1z_1 = lazy(TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this));
1630
819
  var tmp_0 = this;
1631
- tmp_0.b22_1 = lazy(TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this));
820
+ tmp_0.x1z_1 = lazy(TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this));
1632
821
  }
1633
- protoOf(TypeScriptIrEmitter).u1w = function () {
1634
- return this.y21_1;
822
+ protoOf(TypeScriptIrEmitter).n1w = function () {
823
+ return this.u1z_1;
1635
824
  };
1636
- protoOf(TypeScriptIrEmitter).vq = function () {
1637
- return this.z21_1;
825
+ protoOf(TypeScriptIrEmitter).kr = function () {
826
+ return this.v1z_1;
1638
827
  };
1639
- protoOf(TypeScriptIrEmitter).y1w = function () {
1640
- var packageName = Companion_instance.ds('community.flock.wirespec');
828
+ protoOf(TypeScriptIrEmitter).r1w = function () {
829
+ var packageName = Companion_instance.is('community.flock.wirespec');
1641
830
  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
831
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1643
832
  var this_0 = convert(packageName);
@@ -1646,41 +835,41 @@ protoOf(TypeScriptIrEmitter).y1w = function () {
1646
835
  var tmp = scope;
1647
836
  // Inline function 'community.flock.wirespec.ir.core.injectBefore' call
1648
837
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1649
- var this_1 = scope.h1w_1;
838
+ var this_1 = scope.a1w_1;
1650
839
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1651
840
  // Inline function 'kotlin.apply' call
1652
841
  var this_2 = new TransformerBuilder();
1653
- this_2.f1j(TypeScriptIrEmitter$emitShared$lambda);
1654
- var tmp$ret$2 = this_2.g1j();
1655
- tmp.h1w_1 = transform(this_1, tmp$ret$2);
842
+ this_2.u1i(TypeScriptIrEmitter$emitShared$lambda);
843
+ var tmp$ret$2 = this_2.v1i();
844
+ tmp.a1w_1 = transform(this_1, tmp$ret$2);
1656
845
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
1657
846
  var tmp_0 = scope;
1658
847
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1659
848
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1660
- var this_3 = scope.h1w_1;
849
+ var this_3 = scope.a1w_1;
1661
850
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1662
851
  // Inline function 'kotlin.apply' call
1663
852
  var this_4 = new TransformerBuilder();
1664
- this_4.f1j(TypeScriptIrEmitter$emitShared$lambda_0(api));
1665
- var tmp$ret$8 = this_4.g1j();
1666
- tmp_0.h1w_1 = transform(this_3, tmp$ret$8);
853
+ this_4.u1i(TypeScriptIrEmitter$emitShared$lambda_0(api));
854
+ var tmp$ret$8 = this_4.v1i();
855
+ tmp_0.a1w_1 = transform(this_3, tmp$ret$8);
1667
856
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1668
857
  var tmp_1 = scope;
1669
858
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1670
- var this_5 = scope.h1w_1;
859
+ var this_5 = scope.a1w_1;
1671
860
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1672
861
  // Inline function 'kotlin.apply' call
1673
862
  var this_6 = new TransformerBuilder();
1674
- this_6.f1j(TypeScriptIrEmitter$emitShared$lambda_1);
1675
- var tmp$ret$14 = this_6.g1j();
1676
- tmp_1.h1w_1 = transform(this_5, tmp$ret$14);
1677
- var tmp_2 = scope.h1w_1;
863
+ this_6.u1i(TypeScriptIrEmitter$emitShared$lambda_1);
864
+ var tmp$ret$14 = this_6.v1i();
865
+ tmp_1.a1w_1 = transform(this_5, tmp$ret$14);
866
+ var tmp_2 = scope.a1w_1;
1678
867
  return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
1679
868
  };
1680
- protoOf(TypeScriptIrEmitter).eo = function (ast, logger) {
869
+ protoOf(TypeScriptIrEmitter).no = function (ast, logger) {
1681
870
  var tmp = emit.call(this, ast, logger);
1682
871
  // Inline function 'arrow.core.NonEmptyList.flatMap' call
1683
- var this_0 = ast.sq_1;
872
+ var this_0 = ast.hr_1;
1684
873
  // Inline function 'kotlin.collections.flatMap' call
1685
874
  var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_0);
1686
875
  // Inline function 'kotlin.collections.flatMapTo' call
@@ -1688,24 +877,24 @@ protoOf(TypeScriptIrEmitter).eo = function (ast, logger) {
1688
877
  var _iterator__ex2g4s = tmp0.t();
1689
878
  while (_iterator__ex2g4s.u()) {
1690
879
  var element = _iterator__ex2g4s.v();
1691
- var list = new NonEmptyList(element.uq_1);
880
+ var list = new NonEmptyList(element.gr_1);
1692
881
  addAll(destination, list);
1693
882
  }
1694
883
  var tmp$ret$3 = _NonEmptyList___init__impl__fxd0xp(destination);
1695
884
  // Inline function 'kotlin.collections.groupBy' call
1696
885
  var tmp0_0 = new NonEmptyList(tmp$ret$3);
1697
886
  // Inline function 'kotlin.collections.groupByTo' call
1698
- var destination_0 = LinkedHashMap_init_$Create$();
887
+ var destination_0 = LinkedHashMap_init_$Create$_0();
1699
888
  var _iterator__ex2g4s_0 = tmp0_0.t();
1700
889
  while (_iterator__ex2g4s_0.u()) {
1701
890
  var element_0 = _iterator__ex2g4s_0.v();
1702
891
  var key = namespace(element_0);
1703
892
  // Inline function 'kotlin.collections.getOrPut' call
1704
- var value = destination_0.p2(key);
893
+ var value = destination_0.q2(key);
1705
894
  var tmp_0;
1706
895
  if (value == null) {
1707
896
  var answer = ArrayList_init_$Create$();
1708
- destination_0.s2(key, answer);
897
+ destination_0.t2(key, answer);
1709
898
  tmp_0 = answer;
1710
899
  } else {
1711
900
  tmp_0 = value;
@@ -1715,45 +904,45 @@ protoOf(TypeScriptIrEmitter).eo = function (ast, logger) {
1715
904
  }
1716
905
  // Inline function 'kotlin.collections.map' call
1717
906
  // Inline function 'kotlin.collections.mapTo' call
1718
- var destination_1 = ArrayList_init_$Create$_0(destination_0.a1());
907
+ var destination_1 = ArrayList_init_$Create$_0(destination_0.b1());
1719
908
  // Inline function 'kotlin.collections.iterator' call
1720
- var _iterator__ex2g4s_1 = destination_0.j1().t();
909
+ var _iterator__ex2g4s_1 = destination_0.k1().t();
1721
910
  while (_iterator__ex2g4s_1.u()) {
1722
911
  var item = _iterator__ex2g4s_1.v();
1723
912
  // Inline function 'kotlin.collections.component1' call
1724
- var ns = item.k1();
913
+ var ns = item.l1();
1725
914
  // Inline function 'kotlin.collections.component2' call
1726
- var defs = item.l1();
1727
- var tmp_1 = ns + '/index.' + this.vq().er_1;
915
+ var defs = item.m1();
916
+ var tmp_1 = ns + '/index.' + this.kr().cr_1;
1728
917
  var tmp$ret$12 = new Emitted(tmp_1, joinToString(defs, '\n', VOID, VOID, VOID, VOID, TypeScriptIrEmitter$emit$lambda));
1729
918
  destination_1.x(tmp$ret$12);
1730
919
  }
1731
- return NonEmptyList__plus_impl_xqmb9_0(tmp, destination_1);
920
+ return NonEmptyList__plus_impl_xqmb9(tmp, destination_1);
1732
921
  };
1733
- protoOf(TypeScriptIrEmitter).mr = function (definition, module_0, logger) {
922
+ protoOf(TypeScriptIrEmitter).lr = function (definition, module_0, logger) {
1734
923
  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.m1o_1.t1h())), plus_1(listOf_0(import_0('../Wirespec', 'Wirespec')), file.n1o_1));
924
+ var subPackageName = plus_1(Companion_instance.is(''), definition);
925
+ return new File(Companion_getInstance().h1h(subPackageName.ls() + sanitizeSymbol(this, file.c1o_1.i1h())), plus(listOf_0(import_0('../Wirespec', 'Wirespec')), file.d1o_1));
1737
926
  };
1738
- protoOf(TypeScriptIrEmitter).d1x = function (definition, module_0) {
927
+ protoOf(TypeScriptIrEmitter).w1w = function (definition, module_0) {
1739
928
  var tmp;
1740
929
  if (definition instanceof Type) {
1741
930
  tmp = convertToGenerator_2(definition, module_0);
1742
931
  } else {
1743
- if (definition instanceof Enum) {
932
+ if (definition instanceof Enum_0) {
1744
933
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1745
934
  var this_0 = convertToGenerator_1(definition);
1746
935
  var scope = new TransformScope(this_0);
1747
- scope.p1w(TypeScriptIrEmitter$emitGenerator$lambda(definition));
1748
- var tmp_0 = scope.h1w_1;
936
+ scope.i1w(TypeScriptIrEmitter$emitGenerator$lambda(definition));
937
+ var tmp_0 = scope.a1w_1;
1749
938
  tmp = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1750
939
  } else {
1751
940
  if (definition instanceof Refined) {
1752
941
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1753
942
  var this_1 = convertToGenerator_0(definition);
1754
943
  var scope_0 = new TransformScope(this_1);
1755
- scope_0.p1w(TypeScriptIrEmitter$emitGenerator$lambda_0(definition));
1756
- var tmp_1 = scope_0.h1w_1;
944
+ scope_0.i1w(TypeScriptIrEmitter$emitGenerator$lambda_0(definition));
945
+ var tmp_1 = scope_0.a1w_1;
1757
946
  tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
1758
947
  } else {
1759
948
  if (definition instanceof Union) {
@@ -1767,10 +956,10 @@ protoOf(TypeScriptIrEmitter).d1x = function (definition, module_0) {
1767
956
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1768
957
  var this_2 = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
1769
958
  var scope_1 = new TransformScope(this_2);
1770
- scope_1.p1w(TypeScriptIrEmitter$emitGenerator$lambda_1);
1771
- var tmp_2 = scope_1.h1w_1;
959
+ scope_1.i1w(TypeScriptIrEmitter$emitGenerator$lambda_1);
960
+ var tmp_2 = scope_1.a1w_1;
1772
961
  var generatorFile = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
1773
- var generatorOwnName = definition.nr().l1() + 'Generator';
962
+ var generatorOwnName = definition.mr().m1() + 'Generator';
1774
963
  var tmp_3 = asSequence(collectCustomTypeNames(generatorFile));
1775
964
  var tmp_4 = filterNot(tmp_3, TypeScriptIrEmitter$emitGenerator$lambda_2);
1776
965
  var tmp_5 = filterNot(tmp_4, TypeScriptIrEmitter$emitGenerator$lambda_3(generatorOwnName));
@@ -1779,8 +968,8 @@ protoOf(TypeScriptIrEmitter).d1x = function (definition, module_0) {
1779
968
  var generatorRefs = LinkedHashSet_init_$Create$();
1780
969
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1781
970
  var scope_2 = new TransformScope(generatorFile);
1782
- scope_2.p1w(TypeScriptIrEmitter$emitGenerator$lambda_5(generatorOwnName, generatorRefs));
1783
- var tmp_6 = scope_2.h1w_1;
971
+ scope_2.i1w(TypeScriptIrEmitter$emitGenerator$lambda_5(generatorOwnName, generatorRefs));
972
+ var tmp_6 = scope_2.a1w_1;
1784
973
  isInterface(tmp_6, Element) || THROW_CCE();
1785
974
  // Inline function 'kotlin.collections.filter' call
1786
975
  // Inline function 'kotlin.collections.filterTo' call
@@ -1793,7 +982,7 @@ protoOf(TypeScriptIrEmitter).d1x = function (definition, module_0) {
1793
982
  }
1794
983
  }
1795
984
  // Inline function 'kotlin.collections.map' call
1796
- var this_3 = distinct_0(plus_1(destination, generatorRefs));
985
+ var this_3 = distinct_0(plus(destination, generatorRefs));
1797
986
  // Inline function 'kotlin.collections.mapTo' call
1798
987
  var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
1799
988
  var _iterator__ex2g4s_0 = this_3.t();
@@ -1823,10 +1012,10 @@ protoOf(TypeScriptIrEmitter).d1x = function (definition, module_0) {
1823
1012
  destination_2.x(tmp$ret$18);
1824
1013
  }
1825
1014
  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.m1o_1.t1h())), plus_1(plus_1(plus_1(listOf_0(import_0('../Wirespec', 'Wirespec')), modelImports), generatorImports), generatorFile.n1o_1));
1015
+ var subPackageName = plus_2(Companion_instance.is(''), 'generator');
1016
+ return new File(Companion_getInstance().h1h(subPackageName.ls() + sanitizeSymbol(this, generatorFile.c1o_1.i1h())), plus(plus(plus(listOf_0(import_0('../Wirespec', 'Wirespec')), modelImports), generatorImports), generatorFile.d1o_1));
1828
1017
  };
1829
- protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1018
+ protoOf(TypeScriptIrEmitter).cs = function (type, module_0) {
1830
1019
  var fieldValidations = classifyValidatableFields(type, module_0);
1831
1020
  // Inline function 'kotlin.collections.distinctBy' call
1832
1021
  var this_0 = importReferences(type);
@@ -1835,7 +1024,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1835
1024
  var _iterator__ex2g4s = this_0.t();
1836
1025
  while (_iterator__ex2g4s.u()) {
1837
1026
  var e = _iterator__ex2g4s.v();
1838
- var key = e.cv_1;
1027
+ var key = e.lv_1;
1839
1028
  if (set.x(key)) {
1840
1029
  list.x(e);
1841
1030
  }
@@ -1846,7 +1035,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1846
1035
  var _iterator__ex2g4s_0 = list.t();
1847
1036
  while (_iterator__ex2g4s_0.u()) {
1848
1037
  var item = _iterator__ex2g4s_0.v();
1849
- var tmp$ret$2 = import_0('./' + item.cv_1, item.cv_1);
1038
+ var tmp$ret$2 = import_0('./' + item.lv_1, item.lv_1);
1850
1039
  destination.x(tmp$ret$2);
1851
1040
  }
1852
1041
  var typeImports = destination;
@@ -1856,7 +1045,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1856
1045
  var _iterator__ex2g4s_1 = fieldValidations.t();
1857
1046
  while (_iterator__ex2g4s_1.u()) {
1858
1047
  var item_0 = _iterator__ex2g4s_1.v();
1859
- var tmp$ret$5 = item_0.l1j_1;
1048
+ var tmp$ret$5 = item_0.a1j_1;
1860
1049
  destination_0.x(tmp$ret$5);
1861
1050
  }
1862
1051
  // Inline function 'kotlin.collections.filter' call
@@ -1866,7 +1055,7 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1866
1055
  var _iterator__ex2g4s_2 = tmp0.t();
1867
1056
  while (_iterator__ex2g4s_2.u()) {
1868
1057
  var element = _iterator__ex2g4s_2.v();
1869
- if (!(element === type.mp_1.l1())) {
1058
+ if (!(element === type.eq_1.m1())) {
1870
1059
  destination_1.x(element);
1871
1060
  }
1872
1061
  }
@@ -1880,23 +1069,23 @@ protoOf(TypeScriptIrEmitter).lq = function (type, module_0) {
1880
1069
  destination_2.x(tmp$ret$11);
1881
1070
  }
1882
1071
  var validateImports = destination_2;
1883
- var allImports = plus_1(typeImports, validateImports);
1072
+ var allImports = plus(typeImports, validateImports);
1884
1073
  // Inline function 'kotlin.collections.map' call
1885
- var this_1 = type.np_1.jp_1;
1074
+ var this_1 = type.fq_1.kp_1;
1886
1075
  // Inline function 'kotlin.collections.mapTo' call
1887
1076
  var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
1888
1077
  var _iterator__ex2g4s_4 = this_1.t();
1889
1078
  while (_iterator__ex2g4s_4.u()) {
1890
1079
  var item_2 = _iterator__ex2g4s_4.v();
1891
- var tmp$ret$14 = item_2.rp_1.l1();
1080
+ var tmp$ret$14 = item_2.sp_1.m1();
1892
1081
  destination_3.x(tmp$ret$14);
1893
1082
  }
1894
1083
  var fieldNames = toSet(destination_3);
1895
- var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)), type.mp_1.l1(), fieldNames);
1084
+ var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)), type.eq_1.m1(), fieldNames);
1896
1085
  var tmp;
1897
1086
  // Inline function 'kotlin.collections.isNotEmpty' call
1898
1087
  if (!allImports.r()) {
1899
- tmp = file.q1o(VOID, plus_1(allImports, file.n1o_1));
1088
+ tmp = file.g1o(VOID, plus(allImports, file.d1o_1));
1900
1089
  } else {
1901
1090
  tmp = file;
1902
1091
  }
@@ -1913,7 +1102,7 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
1913
1102
  var _iterator__ex2g4s = this_0.t();
1914
1103
  while (_iterator__ex2g4s.u()) {
1915
1104
  var e = _iterator__ex2g4s.v();
1916
- var key = e.cv_1;
1105
+ var key = e.lv_1;
1917
1106
  if (set.x(key)) {
1918
1107
  list.x(e);
1919
1108
  }
@@ -1924,7 +1113,7 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
1924
1113
  var _iterator__ex2g4s_0 = list.t();
1925
1114
  while (_iterator__ex2g4s_0.u()) {
1926
1115
  var item = _iterator__ex2g4s_0.v();
1927
- var tmp$ret$2 = import_0('../model', item.cv_1, true);
1116
+ var tmp$ret$2 = import_0('../model', item.lv_1, true);
1928
1117
  destination.x(tmp$ret$2);
1929
1118
  }
1930
1119
  var imports = destination;
@@ -1932,7 +1121,7 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
1932
1121
  var tmp;
1933
1122
  // Inline function 'kotlin.collections.isNotEmpty' call
1934
1123
  if (!imports.r()) {
1935
- tmp = file.q1o(VOID, plus_1(imports, file.n1o_1));
1124
+ tmp = file.g1o(VOID, plus(imports, file.d1o_1));
1936
1125
  } else {
1937
1126
  tmp = file;
1938
1127
  }
@@ -1940,9 +1129,9 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
1940
1129
  };
1941
1130
  protoOf(TypeScriptIrEmitter).vr = function (refined) {
1942
1131
  var converted = convert_2(refined);
1943
- var constraintExpr = convertConstraint(refined.ur_1, new VariableReference(Companion_getInstance().s1h('value')));
1944
- var validatorStr = TypeScriptGenerator_getInstance().l1x(constraintExpr);
1945
- return new File(converted.m1o_1, listOf([new RawElement('export type ' + converted.m1o_1.t1h() + ' = ' + emitTypeScriptReference(this, refined.ur_1) + ';'), new RawElement('export const validate' + refined.tr_1.l1() + ' = (value: ' + emitTypeScriptReference(this, refined.ur_1) + ') =>\n ' + validatorStr + ';')]));
1132
+ var constraintExpr = convertConstraint(refined.ur_1, new VariableReference(Companion_getInstance().h1h('value')));
1133
+ var validatorStr = TypeScriptGenerator_getInstance().k1x(constraintExpr);
1134
+ return new File(converted.c1o_1, listOf([new RawElement('export type ' + converted.c1o_1.i1h() + ' = ' + emitTypeScriptReference(this, refined.ur_1) + ';'), new RawElement('export const validate' + refined.tr_1.m1() + ' = (value: ' + emitTypeScriptReference(this, refined.ur_1) + ') =>\n ' + validatorStr + ';')]));
1946
1135
  };
1947
1136
  protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1948
1137
  // Inline function 'kotlin.collections.distinctBy' call
@@ -1952,7 +1141,7 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1952
1141
  var _iterator__ex2g4s = this_0.t();
1953
1142
  while (_iterator__ex2g4s.u()) {
1954
1143
  var e = _iterator__ex2g4s.v();
1955
- var key = e.cv_1;
1144
+ var key = e.lv_1;
1956
1145
  if (set.x(key)) {
1957
1146
  list.x(e);
1958
1147
  }
@@ -1963,7 +1152,7 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1963
1152
  var _iterator__ex2g4s_0 = list.t();
1964
1153
  while (_iterator__ex2g4s_0.u()) {
1965
1154
  var item = _iterator__ex2g4s_0.v();
1966
- var tmp$ret$2 = import_0('../model', item.cv_1, true);
1155
+ var tmp$ret$2 = import_0('../model', item.lv_1, true);
1967
1156
  destination.x(tmp$ret$2);
1968
1157
  }
1969
1158
  var imports = destination;
@@ -1972,15 +1161,15 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1972
1161
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1973
1162
  var this_1 = stripTrailingSpaceFromErrorMessage(convert_3(endpoint));
1974
1163
  var scope = new TransformScope(this_1);
1975
- scope.m1w(transformPatternSwitchToValueSwitch());
1976
- var tmp = scope.h1w_1;
1164
+ scope.f1w(transformPatternSwitchToValueSwitch());
1165
+ var tmp = scope.a1w_1;
1977
1166
  var tmp$ret$7 = isInterface(tmp, Element) ? tmp : THROW_CCE();
1978
1167
  // Inline function 'kotlin.let' call
1979
- var it = sanitizeNames(emit$injectApiConst(emit$applyCallParamsIfNeeded(tmp$ret$7, hasRequestParams), endpoint).q1o(Companion_getInstance().s1h(sanitize(this, endpoint.vp_1))), _get_sanitizationConfig__sns434(this));
1168
+ var it = sanitizeNames(emit$injectApiConst(emit$applyCallParamsIfNeeded(tmp$ret$7, hasRequestParams), endpoint).g1o(Companion_getInstance().h1h(sanitize(this, endpoint.kq_1))), _get_sanitizationConfig__sns434(this));
1980
1169
  var tmp_0;
1981
1170
  // Inline function 'kotlin.collections.isNotEmpty' call
1982
1171
  if (!imports.r()) {
1983
- tmp_0 = it.q1o(VOID, plus_1(imports, it.n1o_1));
1172
+ tmp_0 = it.g1o(VOID, plus(imports, it.d1o_1));
1984
1173
  } else {
1985
1174
  tmp_0 = it;
1986
1175
  }
@@ -1989,8 +1178,51 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
1989
1178
  protoOf(TypeScriptIrEmitter).pr = function (channel) {
1990
1179
  return sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
1991
1180
  };
1992
- protoOf(TypeScriptIrEmitter).c1x = function (endpoint) {
1993
- var endpointName = endpoint.vp_1.l1();
1181
+ protoOf(TypeScriptIrEmitter).or = function (rpc) {
1182
+ // Inline function 'kotlin.let' call
1183
+ var file = sanitizeNames(convert_5(rpc), _get_sanitizationConfig__sns434(this));
1184
+ // Inline function 'kotlin.collections.distinctBy' call
1185
+ var this_0 = importReferences(rpc);
1186
+ var set = HashSet_init_$Create$();
1187
+ var list = ArrayList_init_$Create$();
1188
+ var _iterator__ex2g4s = this_0.t();
1189
+ while (_iterator__ex2g4s.u()) {
1190
+ var e = _iterator__ex2g4s.v();
1191
+ var key = e.lv_1;
1192
+ if (set.x(key)) {
1193
+ list.x(e);
1194
+ }
1195
+ }
1196
+ // Inline function 'kotlin.collections.map' call
1197
+ // Inline function 'kotlin.collections.mapTo' call
1198
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(list, 10));
1199
+ var _iterator__ex2g4s_0 = list.t();
1200
+ while (_iterator__ex2g4s_0.u()) {
1201
+ var item = _iterator__ex2g4s_0.v();
1202
+ var tmp$ret$2 = import_0('../model', item.lv_1, true);
1203
+ destination.x(tmp$ret$2);
1204
+ }
1205
+ // Inline function 'kotlin.takeIf' call
1206
+ var tmp;
1207
+ // Inline function 'kotlin.collections.isNotEmpty' call
1208
+ if (!destination.r()) {
1209
+ tmp = destination;
1210
+ } else {
1211
+ tmp = null;
1212
+ }
1213
+ var tmp0_safe_receiver = tmp;
1214
+ var tmp_0;
1215
+ if (tmp0_safe_receiver == null) {
1216
+ tmp_0 = null;
1217
+ } else {
1218
+ // Inline function 'kotlin.let' call
1219
+ tmp_0 = file.g1o(VOID, plus(tmp0_safe_receiver, file.d1o_1));
1220
+ }
1221
+ var tmp1_elvis_lhs = tmp_0;
1222
+ return tmp1_elvis_lhs == null ? file : tmp1_elvis_lhs;
1223
+ };
1224
+ protoOf(TypeScriptIrEmitter).v1w = function (endpoint) {
1225
+ var endpointName = endpoint.kq_1.m1();
1994
1226
  var methodName = firstToLower(this, endpointName);
1995
1227
  // Inline function 'kotlin.collections.distinctBy' call
1996
1228
  var this_0 = importReferences(endpoint);
@@ -1999,7 +1231,7 @@ protoOf(TypeScriptIrEmitter).c1x = function (endpoint) {
1999
1231
  var _iterator__ex2g4s = this_0.t();
2000
1232
  while (_iterator__ex2g4s.u()) {
2001
1233
  var e = _iterator__ex2g4s.v();
2002
- var key = e.cv_1;
1234
+ var key = e.lv_1;
2003
1235
  if (set.x(key)) {
2004
1236
  list.x(e);
2005
1237
  }
@@ -2010,7 +1242,7 @@ protoOf(TypeScriptIrEmitter).c1x = function (endpoint) {
2010
1242
  var _iterator__ex2g4s_0 = list.t();
2011
1243
  while (_iterator__ex2g4s_0.u()) {
2012
1244
  var item = _iterator__ex2g4s_0.v();
2013
- var tmp$ret$2 = import_0('../model', item.cv_1, true);
1245
+ var tmp$ret$2 = import_0('../model', item.lv_1, true);
2014
1246
  destination.x(tmp$ret$2);
2015
1247
  }
2016
1248
  var imports = destination;
@@ -2032,50 +1264,50 @@ protoOf(TypeScriptIrEmitter).c1x = function (endpoint) {
2032
1264
  }
2033
1265
  var requestArgs = tmp_0;
2034
1266
  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');
1267
+ var tmp_1 = Companion_getInstance().h1h('client/' + endpointName + 'Client');
2036
1268
  // Inline function 'kotlin.collections.buildList' call
2037
1269
  // Inline function 'kotlin.collections.buildListInternal' call
2038
1270
  // Inline function 'kotlin.apply' call
2039
1271
  var this_1 = ArrayList_init_$Create$();
2040
1272
  this_1.x(import_0('../Wirespec', 'Wirespec'));
2041
1273
  this_1.x(import_0('../endpoint/' + endpointName, endpointName));
2042
- this_1.f1(imports);
1274
+ this_1.g1(imports);
2043
1275
  this_1.x(new RawElement(code));
2044
- var tmp$ret$10 = this_1.o5();
1276
+ var tmp$ret$10 = this_1.p5();
2045
1277
  return new File(tmp_1, tmp$ret$10);
2046
1278
  };
2047
- protoOf(TypeScriptIrEmitter).z1w = function (endpoints, logger) {
2048
- logger.kr('Emitting main Client for ' + endpoints.a1() + ' endpoints');
1279
+ protoOf(TypeScriptIrEmitter).s1w = function (endpoints, logger) {
1280
+ logger.ir('Emitting main Client for ' + endpoints.b1() + ' endpoints');
2049
1281
  // Inline function 'kotlin.collections.map' call
2050
1282
  // Inline function 'kotlin.collections.mapTo' call
2051
1283
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(endpoints, 10));
2052
1284
  var _iterator__ex2g4s = endpoints.t();
2053
1285
  while (_iterator__ex2g4s.u()) {
2054
1286
  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');
1287
+ var methodName = firstToLower(this, item.kq_1.m1());
1288
+ var tmp$ret$0 = import_0('./client/' + item.kq_1.m1() + 'Client', methodName + 'Client');
2057
1289
  destination.x(tmp$ret$0);
2058
1290
  }
2059
1291
  var clientImports = destination;
2060
1292
  var spreadEntries = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, TypeScriptIrEmitter$emitClient$lambda(this));
2061
1293
  var code = trimMargin('\n |export const client = (serialization: Wirespec.Serialization, transportation: Wirespec.Transportation) => ({\n |' + spreadEntries + '\n |})\n ');
2062
- var tmp = Companion_getInstance().s1h('Client');
1294
+ var tmp = Companion_getInstance().h1h('Client');
2063
1295
  // Inline function 'kotlin.collections.buildList' call
2064
1296
  // Inline function 'kotlin.collections.buildListInternal' call
2065
1297
  // Inline function 'kotlin.apply' call
2066
1298
  var this_0 = ArrayList_init_$Create$();
2067
1299
  this_0.x(import_0('./Wirespec', 'Wirespec'));
2068
- this_0.f1(clientImports);
1300
+ this_0.g1(clientImports);
2069
1301
  this_0.x(new RawElement(code));
2070
- var tmp$ret$6 = this_0.o5();
1302
+ var tmp$ret$6 = this_0.p5();
2071
1303
  return new File(tmp, tmp$ret$6);
2072
1304
  };
2073
1305
  function transformPatternSwitchToValueSwitch() {
2074
1306
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
2075
1307
  // Inline function 'kotlin.apply' call
2076
1308
  var this_0 = new TransformerBuilder();
2077
- this_0.o1w(transformPatternSwitchToValueSwitch$lambda);
2078
- return this_0.g1j();
1309
+ this_0.h1w(transformPatternSwitchToValueSwitch$lambda);
1310
+ return this_0.v1i();
2079
1311
  }
2080
1312
  function renameValidateAndBindObjReceiver(_this__u8e3s4, typeName, fieldNames) {
2081
1313
  // Inline function 'community.flock.wirespec.ir.core.transform' call
@@ -2083,19 +1315,19 @@ function renameValidateAndBindObjReceiver(_this__u8e3s4, typeName, fieldNames) {
2083
1315
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
2084
1316
  var tmp = scope;
2085
1317
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
2086
- var this_0 = scope.h1w_1;
1318
+ var this_0 = scope.a1w_1;
2087
1319
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
2088
1320
  // Inline function 'kotlin.apply' call
2089
1321
  var this_1 = new TransformerBuilder();
2090
- this_1.f1j(renameValidateAndBindObjReceiver$lambda(typeName, fieldNames));
2091
- var tmp$ret$2 = this_1.g1j();
2092
- tmp.h1w_1 = transform(this_0, tmp$ret$2);
2093
- var tmp_0 = scope.h1w_1;
1322
+ this_1.u1i(renameValidateAndBindObjReceiver$lambda(typeName, fieldNames));
1323
+ var tmp$ret$2 = this_1.v1i();
1324
+ tmp.a1w_1 = transform(this_0, tmp$ret$2);
1325
+ var tmp_0 = scope.a1w_1;
2094
1326
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
2095
1327
  }
2096
1328
  function buildApiConst(endpoint) {
2097
1329
  // Inline function 'kotlin.text.replaceFirstChar' call
2098
- var this_0 = endpoint.vp_1.l1();
1330
+ var this_0 = endpoint.kq_1.m1();
2099
1331
  var tmp;
2100
1332
  // Inline function 'kotlin.text.isNotEmpty' call
2101
1333
  if (charSequenceLength(this_0) > 0) {
@@ -2103,14 +1335,14 @@ function buildApiConst(endpoint) {
2103
1335
  var this_1 = charCodeAt(this_0, 0);
2104
1336
  // Inline function 'kotlin.js.asDynamic' call
2105
1337
  // 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);
1338
+ var tmp$ret$4 = toString(this_1).toLowerCase();
1339
+ tmp = toString_0(tmp$ret$4) + substring(this_0, 1);
2108
1340
  } else {
2109
1341
  tmp = this_0;
2110
1342
  }
2111
1343
  var apiName = tmp;
2112
- var method = endpoint.wp_1.a3_1;
2113
- var pathString = joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, buildApiConst$lambda);
1344
+ var method = endpoint.lq_1.b3_1;
1345
+ var pathString = joinToString(endpoint.mq_1, '/', VOID, VOID, VOID, VOID, buildApiConst$lambda);
2114
1346
  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
1347
  }
2116
1348
  function bindCallToRequestParams(_this__u8e3s4) {
@@ -2119,21 +1351,21 @@ function bindCallToRequestParams(_this__u8e3s4) {
2119
1351
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
2120
1352
  var tmp = scope;
2121
1353
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
2122
- var this_0 = scope.h1w_1;
1354
+ var this_0 = scope.a1w_1;
2123
1355
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
2124
1356
  // Inline function 'kotlin.apply' call
2125
1357
  var this_1 = new TransformerBuilder();
2126
- this_1.f1j(bindCallToRequestParams$lambda);
2127
- var tmp$ret$2 = this_1.g1j();
2128
- tmp.h1w_1 = transform(this_0, tmp$ret$2);
2129
- var tmp_0 = scope.h1w_1;
1358
+ this_1.u1i(bindCallToRequestParams$lambda);
1359
+ var tmp$ret$2 = this_1.v1i();
1360
+ tmp.a1w_1 = transform(this_0, tmp$ret$2);
1361
+ var tmp_0 = scope.a1w_1;
2130
1362
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
2131
1363
  }
2132
1364
  function stripTrailingSpaceFromErrorMessage(_this__u8e3s4) {
2133
1365
  // Inline function 'community.flock.wirespec.ir.core.transform' call
2134
1366
  var scope = new TransformScope(_this__u8e3s4);
2135
- scope.o1w(stripTrailingSpaceFromErrorMessage$lambda);
2136
- var tmp = scope.h1w_1;
1367
+ scope.h1w(stripTrailingSpaceFromErrorMessage$lambda);
1368
+ var tmp = scope.a1w_1;
2137
1369
  return isInterface(tmp, Element) ? tmp : THROW_CCE();
2138
1370
  }
2139
1371
  function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
@@ -2141,7 +1373,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2141
1373
  if (!(stmt instanceof Switch)) {
2142
1374
  tmp = true;
2143
1375
  } else {
2144
- var tmp0 = stmt.f1r_1;
1376
+ var tmp0 = stmt.e1r_1;
2145
1377
  var tmp$ret$0;
2146
1378
  $l$block_0: {
2147
1379
  // Inline function 'kotlin.collections.none' call
@@ -2158,7 +1390,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2158
1390
  var _iterator__ex2g4s = tmp0.t();
2159
1391
  while (_iterator__ex2g4s.u()) {
2160
1392
  var element = _iterator__ex2g4s.v();
2161
- if (!(element.m1r_1 == null)) {
1393
+ if (!(element.l1r_1 == null)) {
2162
1394
  tmp$ret$0 = false;
2163
1395
  break $l$block_0;
2164
1396
  }
@@ -2169,11 +1401,11 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2169
1401
  }
2170
1402
  if (tmp)
2171
1403
  return transformChildren(stmt, tr);
2172
- var tmp0_safe_receiver = stmt.h1r_1;
2173
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e1n();
1404
+ var tmp0_safe_receiver = stmt.g1r_1;
1405
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1m();
2174
1406
  var varName = tmp1_elvis_lhs == null ? 'r' : tmp1_elvis_lhs;
2175
1407
  // Inline function 'kotlin.collections.map' call
2176
- var this_0 = stmt.f1r_1;
1408
+ var this_0 = stmt.e1r_1;
2177
1409
  // Inline function 'kotlin.collections.mapTo' call
2178
1410
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2179
1411
  var _iterator__ex2g4s_0 = this_0.t();
@@ -2181,48 +1413,48 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2181
1413
  var item = _iterator__ex2g4s_0.v();
2182
1414
  var tmp$ret$5;
2183
1415
  $l$block_1: {
2184
- var tmp_1 = item.m1r_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.p1j_1;
2187
- var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t1h();
1416
+ var tmp_1 = item.l1r_1;
1417
+ var tmp0_safe_receiver_0 = tmp_1 instanceof Custom ? tmp_1 : null;
1418
+ var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.e1j_1;
1419
+ var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i1h();
2188
1420
  var tmp3_safe_receiver = typeName == null ? null : substringAfterLast(typeName, '.');
2189
1421
  var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : removePrefix(tmp3_safe_receiver, 'Response');
2190
1422
  var statusNum = tmp4_safe_receiver == null ? null : toIntOrNull(tmp4_safe_receiver);
2191
- if (statusNum == null || typeName == null) {
1423
+ if (statusNum == null) {
2192
1424
  // Inline function 'kotlin.collections.map' call
2193
- var this_1 = item.l1r_1;
1425
+ var this_1 = item.k1r_1;
2194
1426
  // Inline function 'kotlin.collections.mapTo' call
2195
1427
  var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
2196
1428
  var _iterator__ex2g4s_1 = this_1.t();
2197
1429
  while (_iterator__ex2g4s_1.u()) {
2198
1430
  var item_0 = _iterator__ex2g4s_1.v();
2199
- var tmp$ret$2 = tr.b1w(item_0);
1431
+ var tmp$ret$2 = tr.u1v(item_0);
2200
1432
  destination_0.x(tmp$ret$2);
2201
1433
  }
2202
- tmp$ret$5 = item.o1r(VOID, destination_0);
1434
+ tmp$ret$5 = item.n1r(VOID, destination_0);
2203
1435
  break $l$block_1;
2204
1436
  }
2205
- var exprCode = TypeScriptGenerator_getInstance().l1x(tr.c1w(stmt.e1r_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());
1437
+ var exprCode = TypeScriptGenerator_getInstance().k1x(tr.v1v(stmt.d1r_1));
1438
+ var castAssignment = new Assignment(Companion_getInstance().h1h(varName), new RawExpression(exprCode + ' as ' + typeName), false);
1439
+ var tmp_2 = new Literal(statusNum, new Integer());
2208
1440
  var tmp_3 = listOf_0(castAssignment);
2209
1441
  // Inline function 'kotlin.collections.map' call
2210
- var this_2 = item.l1r_1;
1442
+ var this_2 = item.k1r_1;
2211
1443
  // Inline function 'kotlin.collections.mapTo' call
2212
1444
  var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
2213
1445
  var _iterator__ex2g4s_2 = this_2.t();
2214
1446
  while (_iterator__ex2g4s_2.u()) {
2215
1447
  var item_1 = _iterator__ex2g4s_2.v();
2216
- var tmp$ret$6 = tr.b1w(item_1);
1448
+ var tmp$ret$6 = tr.u1v(item_1);
2217
1449
  destination_1.x(tmp$ret$6);
2218
1450
  }
2219
- tmp$ret$5 = new Case(tmp_2, plus_1(tmp_3, destination_1), null);
1451
+ tmp$ret$5 = new Case(tmp_2, plus(tmp_3, destination_1), null);
2220
1452
  }
2221
1453
  destination.x(tmp$ret$5);
2222
1454
  }
2223
1455
  var transformedCases = destination;
2224
- var tmp_4 = new FieldCall(tr.c1w(stmt.e1r_1), Companion_getInstance().s1h('status'));
2225
- var tmp2_safe_receiver = stmt.g1r_1;
1456
+ var tmp_4 = new FieldCall(tr.v1v(stmt.d1r_1), Companion_getInstance().h1h('status'));
1457
+ var tmp2_safe_receiver = stmt.f1r_1;
2226
1458
  var tmp_5;
2227
1459
  if (tmp2_safe_receiver == null) {
2228
1460
  tmp_5 = null;
@@ -2233,7 +1465,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
2233
1465
  var _iterator__ex2g4s_3 = tmp2_safe_receiver.t();
2234
1466
  while (_iterator__ex2g4s_3.u()) {
2235
1467
  var item_2 = _iterator__ex2g4s_3.v();
2236
- var tmp$ret$11 = tr.b1w(item_2);
1468
+ var tmp$ret$11 = tr.u1v(item_2);
2237
1469
  destination_2.x(tmp$ret$11);
2238
1470
  }
2239
1471
  tmp_5 = destination_2;
@@ -2244,46 +1476,34 @@ function renameValidateAndBindObjReceiver$lambda$lambda($fieldNames) {
2244
1476
  return function (s, t) {
2245
1477
  var tmp;
2246
1478
  var tmp_0;
2247
- var tmp_1;
2248
- var tmp_2;
2249
1479
  if (s instanceof FunctionCall) {
2250
- tmp_2 = s.o1n_1.equals(Companion_getInstance().s1h('validate'));
2251
- } else {
2252
- tmp_2 = false;
2253
- }
2254
- if (tmp_2) {
2255
- tmp_1 = !(s.m1n_1 == null);
2256
- } else {
2257
- tmp_1 = false;
2258
- }
2259
- if (tmp_1) {
2260
- // Inline function 'kotlin.collections.isNotEmpty' call
2261
- tmp_0 = !s.n1n_1.r();
1480
+ var tmp_1;
1481
+ if (s.d1n_1.equals(Companion_getInstance().h1h('validate')) && !(s.b1n_1 == null)) {
1482
+ // Inline function 'kotlin.collections.isNotEmpty' call
1483
+ tmp_1 = !s.c1n_1.r();
1484
+ } else {
1485
+ tmp_1 = false;
1486
+ }
1487
+ tmp_0 = tmp_1;
2262
1488
  } else {
2263
1489
  tmp_0 = false;
2264
1490
  }
2265
1491
  if (tmp_0) {
2266
- var tmp_3 = first(s.n1n_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.p1j_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.c1w(ensureNotNull(s.m1n_1)))));
1492
+ var tmp_2 = first(s.c1n_1);
1493
+ var tmp1_safe_receiver = tmp_2 instanceof Custom ? tmp_2 : null;
1494
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.e1j_1;
1495
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.i1h();
1496
+ var tn = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
1497
+ tmp = new FunctionCall(VOID, VOID, Companion_getInstance().h1h('validate' + tn), mapOf(to(Companion_getInstance().h1h('obj'), t.v1v(ensureNotNull(s.b1n_1)))));
2272
1498
  } else {
2273
- var tmp_4;
2274
- var tmp_5;
1499
+ var tmp_3;
2275
1500
  if (s instanceof FieldCall) {
2276
- tmp_5 = s.p1r_1 == null;
2277
- } else {
2278
- tmp_5 = false;
2279
- }
2280
- if (tmp_5) {
2281
- tmp_4 = $fieldNames.u1(s.q1r_1.e1n());
1501
+ tmp_3 = (s.o1r_1 == null && $fieldNames.v1(s.p1r_1.t1m()));
2282
1502
  } else {
2283
- tmp_4 = false;
1503
+ tmp_3 = false;
2284
1504
  }
2285
- if (tmp_4) {
2286
- tmp = new FieldCall(new VariableReference(Companion_getInstance().s1h('obj')), s.q1r_1);
1505
+ if (tmp_3) {
1506
+ tmp = new FieldCall(new VariableReference(Companion_getInstance().h1h('obj')), s.p1r_1);
2287
1507
  } else {
2288
1508
  tmp = transformChildren(s, t);
2289
1509
  }
@@ -2297,15 +1517,15 @@ function renameValidateAndBindObjReceiver$lambda($typeName, $fieldNames) {
2297
1517
  if (element instanceof Function) {
2298
1518
  var tmp$ret$0;
2299
1519
  $l$block: {
2300
- if (!element.p1l_1.equals(Companion_getInstance().s1h('validate'))) {
1520
+ if (!element.e1l_1.equals(Companion_getInstance().h1h('validate'))) {
2301
1521
  tmp$ret$0 = element;
2302
1522
  break $l$block;
2303
1523
  }
2304
1524
  // Inline function 'community.flock.wirespec.ir.core.transform' call
2305
- var this_0 = element.a1m(Companion_getInstance().s1h('validate' + $typeName), VOID, listOf_0(new Parameter(Companion_getInstance().s1h('obj'), Custom_init_$Create$($typeName))));
1525
+ var this_0 = element.p1l(Companion_getInstance().h1h('validate' + $typeName), VOID, listOf_0(new Parameter(Companion_getInstance().h1h('obj'), Custom_init_$Create$($typeName))));
2306
1526
  var scope = new TransformScope(this_0);
2307
- scope.q1w(renameValidateAndBindObjReceiver$lambda$lambda($fieldNames));
2308
- var tmp_0 = scope.h1w_1;
1527
+ scope.j1w(renameValidateAndBindObjReceiver$lambda$lambda($fieldNames));
1528
+ var tmp_0 = scope.a1w_1;
2309
1529
  tmp$ret$0 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
2310
1530
  }
2311
1531
  tmp = tmp$ret$0;
@@ -2318,11 +1538,11 @@ function renameValidateAndBindObjReceiver$lambda($typeName, $fieldNames) {
2318
1538
  }
2319
1539
  function buildApiConst$lambda(it) {
2320
1540
  var tmp;
2321
- if (it instanceof Literal) {
2322
- tmp = it.yq_1;
1541
+ if (it instanceof Literal_0) {
1542
+ tmp = it.bu_1;
2323
1543
  } else {
2324
1544
  if (it instanceof Param) {
2325
- tmp = '{' + it.cq_1.l1() + '}';
1545
+ tmp = '{' + it.rq_1.m1() + '}';
2326
1546
  } else {
2327
1547
  noWhenBranchMatchedException();
2328
1548
  }
@@ -2334,23 +1554,23 @@ function bindCallToRequestParams$lambda(element, transformer) {
2334
1554
  if (element instanceof Interface) {
2335
1555
  var tmp$ret$0;
2336
1556
  $l$block: {
2337
- if (!element.k1p_1.equals(Companion_getInstance().s1h('Call'))) {
1557
+ if (!element.o1o_1.equals(Companion_getInstance().h1h('Call'))) {
2338
1558
  tmp$ret$0 = element;
2339
1559
  break $l$block;
2340
1560
  }
2341
1561
  // Inline function 'kotlin.collections.map' call
2342
- var this_0 = element.l1p_1;
1562
+ var this_0 = element.p1o_1;
2343
1563
  // Inline function 'kotlin.collections.mapTo' call
2344
1564
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2345
1565
  var _iterator__ex2g4s = this_0.t();
2346
1566
  while (_iterator__ex2g4s.u()) {
2347
1567
  var item = _iterator__ex2g4s.v();
2348
1568
  var tmp0_safe_receiver = item instanceof Function ? item : null;
2349
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a1m(VOID, VOID, listOf_0(new Parameter(Companion_getInstance().s1h('params'), Custom_init_$Create$('RequestParams'))));
1569
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1l(VOID, VOID, listOf_0(new Parameter(Companion_getInstance().h1h('params'), Custom_init_$Create$('RequestParams'))));
2350
1570
  var tmp$ret$1 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
2351
1571
  destination.x(tmp$ret$1);
2352
1572
  }
2353
- tmp$ret$0 = element.r1p(VOID, destination);
1573
+ tmp$ret$0 = element.w1o(VOID, destination);
2354
1574
  }
2355
1575
  tmp = tmp$ret$0;
2356
1576
  } else {
@@ -2362,7 +1582,7 @@ function bindCallToRequestParams$lambda(element, transformer) {
2362
1582
  function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2363
1583
  var tmp;
2364
1584
  if (stmt instanceof Switch) {
2365
- var tmp1_safe_receiver = stmt.g1r_1;
1585
+ var tmp1_safe_receiver = stmt.f1r_1;
2366
1586
  var tmp_0;
2367
1587
  if (tmp1_safe_receiver == null) {
2368
1588
  tmp_0 = null;
@@ -2384,7 +1604,7 @@ function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2384
1604
  tmp_1 = tmp0_elvis_lhs;
2385
1605
  }
2386
1606
  var errorStmt = tmp_1;
2387
- var tmp_2 = errorStmt.y1r_1;
1607
+ var tmp_2 = errorStmt.x1r_1;
2388
1608
  var tmp1_elvis_lhs = tmp_2 instanceof BinaryOp ? tmp_2 : null;
2389
1609
  var tmp_3;
2390
1610
  if (tmp1_elvis_lhs == null) {
@@ -2394,8 +1614,8 @@ function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2394
1614
  tmp_3 = tmp1_elvis_lhs;
2395
1615
  }
2396
1616
  var binary = tmp_3;
2397
- var tmp_4 = binary.z1r_1;
2398
- var tmp2_elvis_lhs = tmp_4 instanceof Literal_0 ? tmp_4 : null;
1617
+ var tmp_4 = binary.y1r_1;
1618
+ var tmp2_elvis_lhs = tmp_4 instanceof Literal ? tmp_4 : null;
2399
1619
  var tmp_5;
2400
1620
  if (tmp2_elvis_lhs == null) {
2401
1621
  tmp$ret$0 = item;
@@ -2404,81 +1624,25 @@ function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
2404
1624
  tmp_5 = tmp2_elvis_lhs;
2405
1625
  }
2406
1626
  var literal = tmp_5;
2407
- tmp$ret$0 = new ErrorStatement(new Literal_0(trimEnd(toString(literal.p1q_1), charArrayOf([_Char___init__impl__6a9atx(32)])), literal.q1q_1));
1627
+ tmp$ret$0 = new ErrorStatement(new Literal(trimEnd(toString_0(literal.z1q_1), charArrayOf([_Char___init__impl__6a9atx(32)])), literal.a1r_1));
2408
1628
  }
2409
1629
  destination.x(tmp$ret$0);
2410
1630
  }
2411
1631
  tmp_0 = destination;
2412
1632
  }
2413
- tmp = transformChildren(stmt.j1r(VOID, VOID, tmp_0), transformer);
1633
+ tmp = transformChildren(stmt.i1r(VOID, VOID, tmp_0), transformer);
2414
1634
  } else {
2415
1635
  tmp = transformChildren(stmt, transformer);
2416
1636
  }
2417
1637
  return tmp;
2418
1638
  }
2419
- function TypeScriptRefinedTypeDefinitionEmitter() {
2420
- }
2421
- function TypeScriptShared() {
2422
- TypeScriptShared_instance = this;
2423
- this.w21_1 = 'community.flock.wirespec';
2424
- this.x21_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
1639
  //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_8;
2466
- protoOf(TypeScriptEmitter).vr = emit_9;
2467
- protoOf(TypeScriptEmitter).bs = emit_10;
2468
- protoOf(TypeScriptEmitter).or = emit_2;
2469
- protoOf(TypeScriptEmitter).cs = emitValidator;
2470
- protoOf(TypeScriptEmitter).r21 = sanitizeSymbol;
2471
- protoOf(TypeScriptEmitter).h1y = sanitizeSymbol_0;
2472
- protoOf(TypeScriptEmitter).s21 = emitPrimitive;
2473
- protoOf(TypeScriptEmitter).q21 = emitClient;
2474
- protoOf(TypeScriptEmitter).rq = emitClientEndpointRequest;
2475
- protoOf(TypeScriptIrEmitter).w1w = get_extensions;
2476
- protoOf(TypeScriptIrEmitter).x1w = emit_1;
2477
- protoOf(TypeScriptIrEmitter).b1x = beforeGenerate;
1640
+ protoOf(TypeScriptIrEmitter).p1w = get_extensions;
1641
+ protoOf(TypeScriptIrEmitter).q1w = emit_1;
1642
+ protoOf(TypeScriptIrEmitter).u1w = beforeGenerate;
2478
1643
  //endregion
2479
1644
  //region block: exports
2480
1645
  export {
2481
- TypeScriptEmitter as TypeScriptEmitter1b8xo1btx35xi,
2482
1646
  TypeScriptIrEmitter as TypeScriptIrEmitter3q01omscsvyj9,
2483
1647
  };
2484
1648
  //endregion