@flock/wirespec 0.18.4 → 0.18.6

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 (33) hide show
  1. package/clikt-clikt-mordant.mjs +39 -39
  2. package/colormath-root-colormath.mjs +406 -406
  3. package/kotlin-kotlin-stdlib.mjs +5 -5
  4. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  5. package/kotlin-openapi-bindings.mjs +4585 -4585
  6. package/kotlin-rgxgen.mjs +1757 -1757
  7. package/kotlinx-io-kotlinx-io-core.mjs +397 -397
  8. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1616 -1616
  9. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1271 -1271
  10. package/mordant-mordant.mjs +1097 -1097
  11. package/package.json +1 -1
  12. package/wirespec-src-compiler-emitters-java.mjs +189 -188
  13. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  14. package/wirespec-src-compiler-emitters-kotlin.mjs +166 -166
  15. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  16. package/wirespec-src-compiler-emitters-python.mjs +218 -217
  17. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  18. package/wirespec-src-compiler-emitters-rust.mjs +303 -292
  19. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  20. package/wirespec-src-compiler-emitters-scala.mjs +111 -110
  21. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
  22. package/wirespec-src-compiler-emitters-typescript.mjs +149 -146
  23. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  24. package/wirespec-src-compiler-emitters-wirespec.mjs +25 -25
  25. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  26. package/wirespec-src-compiler-ir.mjs +2974 -2934
  27. package/wirespec-src-compiler-ir.mjs.map +1 -1
  28. package/wirespec-src-converter-avro.mjs +475 -475
  29. package/wirespec-src-converter-openapi.mjs +365 -365
  30. package/wirespec-src-plugin-arguments.mjs +115 -115
  31. package/wirespec-src-plugin-cli.mjs +84 -84
  32. package/wirespec-src-plugin-npm.mjs +20 -20
  33. package/wirespec-src-tools-generator.mjs +2 -2
@@ -159,7 +159,7 @@ import {
159
159
  flattenNestedStructs2956rxx8q2zxl as flattenNestedStructs,
160
160
  Union38f3pecvfcpxh as Union_0,
161
161
  Struct39wf79cwtn4ty as Struct,
162
- Custom2si7lto3wompr as Custom_0,
162
+ Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
163
163
  Boolean_instance27opaqtiiiysz as Boolean_instance_0,
164
164
  String_instance3uxvo48ki208u as String_instance,
165
165
  RawExpression2bo7ldfrptjia as RawExpression,
@@ -170,6 +170,7 @@ import {
170
170
  convertConstraintkgpvomct0x0s as convertConstraint,
171
171
  transformChildrend9p91tpcqdkx as transformChildren_0,
172
172
  Interface3pn84xq686t2r as Interface,
173
+ Custom2si7lto3wompr as Custom_0,
173
174
  Parameteruqoxd4rzw7ga as Parameter,
174
175
  FunctionCall30872kpnbr7op as FunctionCall,
175
176
  } from './wirespec-src-compiler-ir.mjs';
@@ -184,10 +185,10 @@ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, V
184
185
  function emit_3(identifier) {
185
186
  var tmp;
186
187
  if (identifier instanceof DefinitionIdentifier) {
187
- tmp = this.c1w(identifier);
188
+ tmp = this.d1w(identifier);
188
189
  } else {
189
190
  if (identifier instanceof FieldIdentifier) {
190
- tmp = this.s1v(this.c1w(identifier));
191
+ tmp = this.t1v(this.d1w(identifier));
191
192
  } else {
192
193
  noWhenBranchMatchedException();
193
194
  }
@@ -243,19 +244,10 @@ function sanitize(_this__u8e3s4) {
243
244
  return tmp;
244
245
  }
245
246
  function sanitizeKeywords(_this__u8e3s4) {
246
- return Companion_getInstance_0().l1x_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
247
+ return Companion_getInstance_0().m1x_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
247
248
  }
248
249
  initMetadataForInterface(PythonIdentifierEmitter, 'PythonIdentifierEmitter');
249
- function emit_4(union) {
250
- return trimMargin('\n |class ' + this.wq(union.qo_1) + '(ABC):\n |' + Spacer_instance.toString() + 'pass\n ');
251
- }
252
- initMetadataForInterface(PythonUnionDefinitionEmitter, 'PythonUnionDefinitionEmitter', VOID, VOID, [PythonIdentifierEmitter]);
253
- function emit_5(enum_0, module_0) {
254
- var tmp = this.c1w(enum_0.gr_1);
255
- return trimMargin('\n |class ' + tmp + '(str, Enum):\n |' + joinToString(enum_0.hr_1, '\n', VOID, VOID, VOID, VOID, PythonEnumDefinitionEmitter$emit$lambda(this)) + '\n |\n |' + Spacer_instance.toString() + '@property\n |' + Spacer_instance.toString() + 'def label(self) -> str:\n |' + Spacer_instance.qr(2) + 'return self.value\n |\n |' + Spacer_instance.toString() + 'def __str__(self) -> str:\n |' + Spacer_instance.qr(2) + 'return self.value\n ');
256
- }
257
- initMetadataForInterface(PythonEnumDefinitionEmitter, 'PythonEnumDefinitionEmitter', VOID, VOID, [PythonIdentifierEmitter]);
258
- function emit_6(type, module_0) {
250
+ function emit_4(type, module_0) {
259
251
  var tmp;
260
252
  if (type.wo_1.so_1.r()) {
261
253
  var tmp_0 = this.wq(type.vo_1);
@@ -270,15 +262,15 @@ function emit_6(type, module_0) {
270
262
  }
271
263
  return tmp;
272
264
  }
273
- function emit_7(_this__u8e3s4) {
265
+ function emit_5(_this__u8e3s4) {
274
266
  return joinToString(_this__u8e3s4.so_1, '\n', VOID, VOID, VOID, VOID, PythonTypeDefinitionEmitter$emit$lambda_1(this));
275
267
  }
276
- function emit_8(_this__u8e3s4) {
268
+ function emit_6(_this__u8e3s4) {
277
269
  return this.wq(_this__u8e3s4.ap_1) + ": '" + this.xp(_this__u8e3s4.bp_1) + "'";
278
270
  }
279
- function emit_9(_this__u8e3s4) {
271
+ function emit_7(_this__u8e3s4) {
280
272
  // Inline function 'kotlin.let' call
281
- var it = this.j1x(_this__u8e3s4);
273
+ var it = this.k1x(_this__u8e3s4);
282
274
  return _this__u8e3s4.cu() ? 'Optional[' + it + ']' : it;
283
275
  }
284
276
  function emitType(_this__u8e3s4) {
@@ -299,7 +291,7 @@ function emitType(_this__u8e3s4) {
299
291
  tmp = _this__u8e3s4.ku_1;
300
292
  } else {
301
293
  if (_this__u8e3s4 instanceof Primitive) {
302
- tmp = this.h1x(_this__u8e3s4.ou_1);
294
+ tmp = this.i1x(_this__u8e3s4.ou_1);
303
295
  } else {
304
296
  noWhenBranchMatchedException();
305
297
  }
@@ -310,7 +302,7 @@ function emitType(_this__u8e3s4) {
310
302
  }
311
303
  return tmp;
312
304
  }
313
- function emit_10(_this__u8e3s4) {
305
+ function emit_8(_this__u8e3s4) {
314
306
  var tmp;
315
307
  if (_this__u8e3s4 instanceof String_0) {
316
308
  tmp = 'str';
@@ -335,7 +327,7 @@ function emit_10(_this__u8e3s4) {
335
327
  }
336
328
  return tmp;
337
329
  }
338
- function emit_11(_this__u8e3s4) {
330
+ function emit_9(_this__u8e3s4) {
339
331
  var tmp;
340
332
  if (_this__u8e3s4 instanceof RegExp_0) {
341
333
  tmp = 'bool(re.match(r"' + _RegExp___get_value__impl__7o7618(_this__u8e3s4.ys_1) + '", self.value))';
@@ -379,59 +371,15 @@ function emitReferenceCustomImports(_this__u8e3s4) {
379
371
  return 'from ..model.' + _this__u8e3s4.ku_1 + ' import ' + _this__u8e3s4.ku_1;
380
372
  }
381
373
  initMetadataForInterface(PythonTypeDefinitionEmitter, 'PythonTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, PythonIdentifierEmitter]);
382
- function emit_12(refined) {
383
- return trimMargin('\n |@dataclass\n |class ' + this.c1w(refined.br_1) + '(Wirespec.Refined):\n |' + Spacer_instance.toString() + 'value: ' + this.j1x(refined.cr_1) + '\n |\n |' + Spacer_instance.toString() + 'def validate(self) -> bool:\n |' + Spacer_instance.qr(2) + 'return ' + this.kr(refined) + '\n |\n |' + Spacer_instance.toString() + 'def __str__(self) -> str:\n |' + Spacer_instance.qr(2) + 'return str(self.value)\n |\n ');
384
- }
385
- function emitValidator(_this__u8e3s4) {
386
- var defaultReturn = 'True';
387
- var type = _this__u8e3s4.cr_1.ou_1;
388
- var tmp;
389
- if (type instanceof Integer) {
390
- var tmp0_safe_receiver = type.tt_1;
391
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.yp(tmp0_safe_receiver);
392
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
393
- } else {
394
- if (type instanceof Number_0) {
395
- var tmp2_safe_receiver = type.wt_1;
396
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.yp(tmp2_safe_receiver);
397
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
398
- } else {
399
- if (type instanceof String_0) {
400
- var tmp4_safe_receiver = type.qt_1;
401
- var tmp_0;
402
- var tmp_1 = tmp4_safe_receiver;
403
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
404
- tmp_0 = null;
405
- } else {
406
- tmp_0 = this.yp(new RegExp_0(tmp4_safe_receiver));
407
- }
408
- var tmp5_elvis_lhs = tmp_0;
409
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
410
- } else {
411
- if (equals(type, Boolean_instance)) {
412
- tmp = defaultReturn;
413
- } else {
414
- if (equals(type, Bytes_instance)) {
415
- tmp = defaultReturn;
416
- } else {
417
- noWhenBranchMatchedException();
418
- }
419
- }
420
- }
421
- }
422
- }
423
- return tmp;
424
- }
425
- initMetadataForInterface(PythonRefinedTypeDefinitionEmitter, 'PythonRefinedTypeDefinitionEmitter', VOID, VOID, [PythonTypeDefinitionEmitter, PythonIdentifierEmitter]);
426
- function emit_13(endpoint) {
374
+ function emit_10(endpoint) {
427
375
  var tmp = importReferences(endpoint);
428
376
  var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, PythonEndpointDefinitionEmitter$emit$lambda(this));
429
377
  var tmp_1 = this.wq(endpoint.ep_1);
430
- var tmp_2 = spacer(this.p1v(first(endpoint.jp_1), endpoint), 1);
378
+ var tmp_2 = spacer(this.q1v(first(endpoint.jp_1), endpoint), 1);
431
379
  var tmp_3 = distinctByStatus(endpoint.kp_1);
432
380
  return trimMargin('\n |' + tmp_0 + '\n |\n |class ' + tmp_1 + ' (Wirespec.Endpoint):\n |' + tmp_2 + '\n |' + spacer(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, PythonEndpointDefinitionEmitter$emit$lambda_0(this, endpoint)), 1) + '\n |' + spacer(emitResponseUnion(this, endpoint), 1) + '\n |' + spacer(emitHandleClass(this, endpoint), 1) + '\n |' + spacer(emitConvertClass(this, endpoint), 1) + '\n |\n ');
433
381
  }
434
- function emit_14(_this__u8e3s4, endpoint) {
382
+ function emit_11(_this__u8e3s4, endpoint) {
435
383
  var tmp = emit_18(this, _this__u8e3s4.np_1);
436
384
  var tmp_0 = get_pathParams(endpoint);
437
385
  var tmp_1 = emitObject$default(this, tmp_0, 'Path', 'Wirespec.Request.Path', VOID, PythonEndpointDefinitionEmitter$emit$lambda_1(this));
@@ -464,7 +412,7 @@ function emit_14(_this__u8e3s4, endpoint) {
464
412
  var tmp_28 = paramList(_this__u8e3s4, endpoint);
465
413
  return trimMargin('\n |@dataclass\n |class Request(Wirespec.Request[' + tmp + ']):\n |' + tmp_1 + '\n |' + tmp_2 + '\n |' + tmp_3 + '\n |\n |' + tmp_4 + '@property\n |' + tmp_5 + 'def body(self) -> ' + tmp_6 + ':\n |' + tmp_7 + tmp_8 + 'return self._body\n |\n |' + tmp_9 + '@property\n |' + tmp_10 + 'def path(self) -> Path:\n |' + tmp_11 + tmp_12 + 'return self._path\n |\n |' + tmp_13 + '@property\n |' + tmp_14 + 'def queries(self) -> Queries:\n |' + tmp_15 + tmp_16 + 'return self._queries\n |\n |' + tmp_17 + '@property\n |' + tmp_18 + 'def headers(self) -> Headers:\n |' + tmp_19 + tmp_20 + 'return self._headers\n |\n |' + tmp_21 + '_body: ' + tmp_22 + '\n |' + tmp_23 + '_headers: Headers\n |' + tmp_24 + '_queries: Queries\n |' + tmp_25 + '_path: Path\n |' + tmp_26 + 'method: Wirespec.Method = Wirespec.Method.' + endpoint.fp_1.a3_1 + '\n |\n |' + tmp_27 + 'def __init__(self, ' + joinToString(tmp_28, ', ', VOID, VOID, VOID, VOID, PythonEndpointDefinitionEmitter$emit$lambda_4(this)) + '):\n |' + spacer(emitAssignSelf_0(this, _this__u8e3s4, endpoint), 2) + '\n |\n ');
466
414
  }
467
- function emit_15(_this__u8e3s4, endpoint) {
415
+ function emit_12(_this__u8e3s4, endpoint) {
468
416
  var tmp = emit_18(this, _this__u8e3s4.sp_1);
469
417
  var tmp_0 = emitObject$default(this, _this__u8e3s4.rp_1, 'Headers', 'Wirespec.Response.Headers', VOID, PythonEndpointDefinitionEmitter$emit$lambda_5(this));
470
418
  var tmp_1 = Spacer_instance.toString();
@@ -485,7 +433,60 @@ function emit_15(_this__u8e3s4, endpoint) {
485
433
  return trimMargin('\n |@dataclass\n |class Response' + _this__u8e3s4.qp_1 + '(Wirespec.Response[' + tmp + ']):\n |' + tmp_0 + '\n |\n |' + tmp_1 + '@property\n |' + tmp_2 + 'def headers(self) -> Headers:\n |' + tmp_3 + tmp_4 + 'return self._headers\n |\n |' + tmp_5 + '@property\n |' + tmp_6 + 'def body(self) -> ' + tmp_7 + ':\n |' + tmp_8 + tmp_9 + 'return self._body\n |\n |' + tmp_10 + '_body: ' + tmp_11 + '\n |' + tmp_12 + '_headers: Headers\n |' + tmp_13 + 'status: int = ' + _this__u8e3s4.qp_1 + '\n |\n |' + tmp_14 + 'def __init__(self, ' + joinToString(tmp_15, ', ', VOID, VOID, VOID, VOID, PythonEndpointDefinitionEmitter$emit$lambda_6(this)) + '):\n |' + spacer(emitAssignSelf_1(this, _this__u8e3s4, endpoint), 2) + '\n |\n ');
486
434
  }
487
435
  initMetadataForInterface(PythonEndpointDefinitionEmitter, 'PythonEndpointDefinitionEmitter', VOID, VOID, [PythonTypeDefinitionEmitter]);
488
- initMetadataForClass(PythonEmitter, 'PythonEmitter', PythonEmitter, LanguageEmitter, [LanguageEmitter, PythonUnionDefinitionEmitter, PythonEnumDefinitionEmitter, PythonRefinedTypeDefinitionEmitter, PythonTypeDefinitionEmitter, PythonChannelDefinitionEmitter, PythonEndpointDefinitionEmitter, PythonIdentifierEmitter]);
436
+ function emit_13(union) {
437
+ return trimMargin('\n |class ' + this.wq(union.qo_1) + '(ABC):\n |' + Spacer_instance.toString() + 'pass\n ');
438
+ }
439
+ initMetadataForInterface(PythonUnionDefinitionEmitter, 'PythonUnionDefinitionEmitter', VOID, VOID, [PythonIdentifierEmitter]);
440
+ function emit_14(enum_0, module_0) {
441
+ var tmp = this.d1w(enum_0.gr_1);
442
+ return trimMargin('\n |class ' + tmp + '(str, Enum):\n |' + joinToString(enum_0.hr_1, '\n', VOID, VOID, VOID, VOID, PythonEnumDefinitionEmitter$emit$lambda(this)) + '\n |\n |' + Spacer_instance.toString() + '@property\n |' + Spacer_instance.toString() + 'def label(self) -> str:\n |' + Spacer_instance.qr(2) + 'return self.value\n |\n |' + Spacer_instance.toString() + 'def __str__(self) -> str:\n |' + Spacer_instance.qr(2) + 'return self.value\n ');
443
+ }
444
+ initMetadataForInterface(PythonEnumDefinitionEmitter, 'PythonEnumDefinitionEmitter', VOID, VOID, [PythonIdentifierEmitter]);
445
+ function emit_15(refined) {
446
+ return trimMargin('\n |@dataclass\n |class ' + this.d1w(refined.br_1) + '(Wirespec.Refined):\n |' + Spacer_instance.toString() + 'value: ' + this.k1x(refined.cr_1) + '\n |\n |' + Spacer_instance.toString() + 'def validate(self) -> bool:\n |' + Spacer_instance.qr(2) + 'return ' + this.kr(refined) + '\n |\n |' + Spacer_instance.toString() + 'def __str__(self) -> str:\n |' + Spacer_instance.qr(2) + 'return str(self.value)\n |\n ');
447
+ }
448
+ function emitValidator(_this__u8e3s4) {
449
+ var defaultReturn = 'True';
450
+ var type = _this__u8e3s4.cr_1.ou_1;
451
+ var tmp;
452
+ if (type instanceof Integer) {
453
+ var tmp0_safe_receiver = type.tt_1;
454
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.yp(tmp0_safe_receiver);
455
+ tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
456
+ } else {
457
+ if (type instanceof Number_0) {
458
+ var tmp2_safe_receiver = type.wt_1;
459
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.yp(tmp2_safe_receiver);
460
+ tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
461
+ } else {
462
+ if (type instanceof String_0) {
463
+ var tmp4_safe_receiver = type.qt_1;
464
+ var tmp_0;
465
+ var tmp_1 = tmp4_safe_receiver;
466
+ if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
467
+ tmp_0 = null;
468
+ } else {
469
+ tmp_0 = this.yp(new RegExp_0(tmp4_safe_receiver));
470
+ }
471
+ var tmp5_elvis_lhs = tmp_0;
472
+ tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
473
+ } else {
474
+ if (equals(type, Boolean_instance)) {
475
+ tmp = defaultReturn;
476
+ } else {
477
+ if (equals(type, Bytes_instance)) {
478
+ tmp = defaultReturn;
479
+ } else {
480
+ noWhenBranchMatchedException();
481
+ }
482
+ }
483
+ }
484
+ }
485
+ }
486
+ return tmp;
487
+ }
488
+ initMetadataForInterface(PythonRefinedTypeDefinitionEmitter, 'PythonRefinedTypeDefinitionEmitter', VOID, VOID, [PythonTypeDefinitionEmitter, PythonIdentifierEmitter]);
489
+ initMetadataForClass(PythonEmitter, 'PythonEmitter', PythonEmitter, LanguageEmitter, [LanguageEmitter, PythonEndpointDefinitionEmitter, PythonChannelDefinitionEmitter, PythonTypeDefinitionEmitter, PythonUnionDefinitionEmitter, PythonEnumDefinitionEmitter, PythonRefinedTypeDefinitionEmitter, PythonIdentifierEmitter]);
489
490
  initMetadataForCompanion(Companion);
490
491
  initMetadataForCompanion(Companion_0);
491
492
  initMetadataForClass(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
@@ -495,16 +496,16 @@ initMetadataForObject(PythonShared, 'PythonShared');
495
496
  function PythonChannelDefinitionEmitter() {
496
497
  }
497
498
  function sam$kotlin_Comparator$0(function_0) {
498
- this.x1w_1 = function_0;
499
+ this.y1w_1 = function_0;
499
500
  }
500
501
  protoOf(sam$kotlin_Comparator$0).qd = function (a, b) {
501
- return this.x1w_1(a, b);
502
+ return this.y1w_1(a, b);
502
503
  };
503
504
  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
504
505
  return this.qd(a, b);
505
506
  };
506
507
  protoOf(sam$kotlin_Comparator$0).l3 = function () {
507
- return this.x1w_1;
508
+ return this.y1w_1;
508
509
  };
509
510
  protoOf(sam$kotlin_Comparator$0).equals = function (other) {
510
511
  var tmp;
@@ -527,8 +528,8 @@ protoOf(sam$kotlin_Comparator$0).hashCode = function () {
527
528
  function PythonEmitter$emit$lambda(this$0) {
528
529
  return function (a, b) {
529
530
  // Inline function 'kotlin.comparisons.compareValuesBy' call
530
- var tmp = this$0.e1x(a);
531
- var tmp$ret$1 = this$0.e1x(b);
531
+ var tmp = this$0.f1x(a);
532
+ var tmp$ret$1 = this$0.f1x(b);
532
533
  return compareValues(tmp, tmp$ret$1);
533
534
  };
534
535
  }
@@ -539,23 +540,23 @@ function PythonEmitter(packageName, emitShared) {
539
540
  packageName = packageName === VOID ? Companion_instance.lr('community.flock.wirespec.generated') : packageName;
540
541
  emitShared = emitShared === VOID ? Companion_instance_0.go() : emitShared;
541
542
  LanguageEmitter.call(this);
542
- this.y1w_1 = packageName;
543
- this.z1w_1 = emitShared;
544
- this.a1x_1 = 'import re\n\nfrom abc import abstractmethod\nfrom dataclasses import dataclass\nfrom typing import List, Optional\nfrom enum import Enum\n\nfrom ..wirespec import T, Wirespec\n';
545
- this.b1x_1 = FileExtension_Python_getInstance();
546
- this.c1x_1 = PythonShared_instance;
547
- this.d1x_1 = '#';
543
+ this.z1w_1 = packageName;
544
+ this.a1x_1 = emitShared;
545
+ this.b1x_1 = 'import re\n\nfrom abc import abstractmethod\nfrom dataclasses import dataclass\nfrom typing import List, Optional\nfrom enum import Enum\n\nfrom ..wirespec import T, Wirespec\n';
546
+ this.c1x_1 = FileExtension_Python_getInstance();
547
+ this.d1x_1 = PythonShared_instance;
548
+ this.e1x_1 = '#';
548
549
  }
549
550
  protoOf(PythonEmitter).eq = function () {
550
- return this.b1x_1;
551
- };
552
- protoOf(PythonEmitter).l1v = function () {
553
551
  return this.c1x_1;
554
552
  };
555
- protoOf(PythonEmitter).fq = function () {
553
+ protoOf(PythonEmitter).m1v = function () {
556
554
  return this.d1x_1;
557
555
  };
558
- protoOf(PythonEmitter).e1x = function (definition) {
556
+ protoOf(PythonEmitter).fq = function () {
557
+ return this.e1x_1;
558
+ };
559
+ protoOf(PythonEmitter).f1x = function (definition) {
559
560
  var tmp;
560
561
  if (definition instanceof Enum) {
561
562
  tmp = 1;
@@ -595,8 +596,8 @@ protoOf(PythonEmitter).tq = function (module_0, logger) {
595
596
  var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).yl_1;
596
597
  // Inline function 'kotlin.let' call
597
598
  var it = protoOf(LanguageEmitter).tq.call(this, module_0.vu(VOID, statements), logger);
598
- var init = new Emitted(this.y1w_1.or() + '__init__', 'from . import model\nfrom . import endpoint\nfrom . import wirespec\n');
599
- var tmp_1 = this.y1w_1.or() + 'endpoint/' + '__init__';
599
+ var init = new Emitted(this.z1w_1.or() + '__init__', 'from . import model\nfrom . import endpoint\nfrom . import wirespec\n');
600
+ var tmp_1 = this.z1w_1.or() + 'endpoint/' + '__init__';
600
601
  // Inline function 'kotlin.collections.filter' call
601
602
  var tmp0 = new NonEmptyList(module_0.dq_1);
602
603
  // Inline function 'kotlin.collections.filterTo' call
@@ -618,7 +619,7 @@ protoOf(PythonEmitter).tq = function (module_0, logger) {
618
619
  destination_0.x(tmp$ret$5);
619
620
  }
620
621
  var initEndpoint = new Emitted(tmp_1, joinToString(destination_0, '\n'));
621
- var tmp_2 = this.y1w_1.or() + 'model/' + '__init__';
622
+ var tmp_2 = this.z1w_1.or() + 'model/' + '__init__';
622
623
  // Inline function 'kotlin.collections.filter' call
623
624
  var tmp0_0 = new NonEmptyList(module_0.dq_1);
624
625
  // Inline function 'kotlin.collections.filterTo' call
@@ -640,16 +641,16 @@ protoOf(PythonEmitter).tq = function (module_0, logger) {
640
641
  destination_2.x(tmp$ret$11);
641
642
  }
642
643
  var initModel = new Emitted(tmp_2, joinToString(destination_2, '\n'));
643
- var shared = new Emitted(this.y1w_1.or() + 'wirespec', this.l1v().g1x_1);
644
- return this.z1w_1.ho_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(it, init), initEndpoint), initModel), shared) : NonEmptyList__plus_impl_xqmb9(it, init);
644
+ var shared = new Emitted(this.z1w_1.or() + 'wirespec', this.m1v().h1x_1);
645
+ return this.a1x_1.ho_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(it, init), initEndpoint), initModel), shared) : NonEmptyList__plus_impl_xqmb9(it, init);
645
646
  };
646
647
  protoOf(PythonEmitter).uq = function (definition, module_0, logger) {
647
- var subPackageName = plus_1(this.y1w_1, definition);
648
+ var subPackageName = plus_1(this.z1w_1, definition);
648
649
  // Inline function 'kotlin.let' call
649
650
  var it = protoOf(LanguageEmitter).uq.call(this, definition, module_0, logger);
650
651
  var tmp = subPackageName.or() + it.io_1;
651
652
  // Inline function 'kotlin.text.trimStart' call
652
- var this_0 = trimMargin('\n |' + this.a1x_1 + '\n |' + it.jo_1 + '\n ');
653
+ var this_0 = trimMargin('\n |' + this.b1x_1 + '\n |' + it.jo_1 + '\n ');
653
654
  var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
654
655
  return new Emitted(tmp, tmp$ret$0);
655
656
  };
@@ -689,7 +690,7 @@ function emitToRawRequest($this, _this__u8e3s4, endpoint) {
689
690
  var tmp_19 = Spacer_instance.toString();
690
691
  var tmp0_safe_receiver = _this__u8e3s4.np_1;
691
692
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pp_1;
692
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.j1x(tmp1_safe_receiver);
693
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.k1x(tmp1_safe_receiver);
693
694
  return trimMargin("\n |@staticmethod\n |def to_raw_request(serialization: Wirespec.Serializer, request: '" + tmp + ".Request') -> Wirespec.RawRequest:\n |" + tmp_0 + 'return Wirespec.RawRequest(\n |' + tmp_1 + tmp_2 + 'path = [' + tmp_3 + '],\n |' + tmp_4 + tmp_5 + 'method = request.method.value,\n |' + tmp_6 + tmp_7 + 'queries = {\n |' + tmp_9 + '\n |' + tmp_10 + tmp_11 + '},\n |' + tmp_12 + tmp_13 + 'headers = {\n |' + tmp_15 + '\n |' + tmp_16 + tmp_17 + '},\n |' + tmp_18 + tmp_19 + 'body = serialization.serialize(request.body, ' + (tmp2_elvis_lhs == null ? 'type(None)' : tmp2_elvis_lhs) + '),\n |' + Spacer_instance.toString() + ')\n |\n ');
694
695
  }
695
696
  function emitFromRawRequest($this, _this__u8e3s4, endpoint) {
@@ -706,7 +707,7 @@ function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
706
707
  tmp_3 = null;
707
708
  } else {
708
709
  // Inline function 'kotlin.let' call
709
- tmp_3 = Spacer_instance.qr(3) + 'body = serialization.deserialize(request.body, ' + $this.j1x(tmp0_safe_receiver.pp_1) + '),';
710
+ tmp_3 = Spacer_instance.qr(3) + 'body = serialization.deserialize(request.body, ' + $this.k1x(tmp0_safe_receiver.pp_1) + '),';
710
711
  }
711
712
  // Inline function 'kotlin.let' call
712
713
  var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
@@ -806,18 +807,18 @@ function emitAssignSelf_1($this, _this__u8e3s4, endpoint) {
806
807
  return trimMargin('\n |self._headers = ' + tmp + '.Response' + _this__u8e3s4.qp_1 + '.Headers(' + tmp_1 + ')\n |self._body = ' + (tmp1_elvis_lhs == null ? 'None' : tmp1_elvis_lhs) + '\n ');
807
808
  }
808
809
  function emitDeserialized($this, _this__u8e3s4) {
809
- return Spacer_instance.qr(3) + $this.wq(_this__u8e3s4.me_1.lp_1) + ' = serialization.deserialize(request.path[' + _this__u8e3s4.le_1 + '], ' + $this.j1x(_this__u8e3s4.me_1.mp_1) + ')';
810
+ return Spacer_instance.qr(3) + $this.wq(_this__u8e3s4.me_1.lp_1) + ' = serialization.deserialize(request.path[' + _this__u8e3s4.le_1 + '], ' + $this.k1x(_this__u8e3s4.me_1.mp_1) + ')';
810
811
  }
811
812
  function emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive) {
812
813
  var tmp;
813
814
  if (caseSensitive) {
814
- tmp = Spacer_instance.qr(spaces) + $this.wq(_this__u8e3s4.ap_1) + ' = serialization.deserialize_param(' + type + '.' + fields + '.get("' + _this__u8e3s4.ap_1.l1() + '"), ' + $this.j1x(_this__u8e3s4.bp_1) + ')';
815
+ tmp = Spacer_instance.qr(spaces) + $this.wq(_this__u8e3s4.ap_1) + ' = serialization.deserialize_param(' + type + '.' + fields + '.get("' + _this__u8e3s4.ap_1.l1() + '"), ' + $this.k1x(_this__u8e3s4.bp_1) + ')';
815
816
  } else {
816
817
  var tmp_0 = Spacer_instance.qr(spaces);
817
818
  var tmp_1 = $this.wq(_this__u8e3s4.ap_1);
818
819
  // Inline function 'kotlin.text.lowercase' call
819
820
  // Inline function 'kotlin.js.asDynamic' call
820
- tmp = tmp_0 + tmp_1 + ' = serialization.deserialize_param(next((v for k, v in ' + type + '.' + fields + '.items() if k.lower() == "' + _this__u8e3s4.ap_1.l1().toLowerCase() + '"), None), ' + $this.j1x(_this__u8e3s4.bp_1) + ')';
821
+ tmp = tmp_0 + tmp_1 + ' = serialization.deserialize_param(next((v for k, v in ' + type + '.' + fields + '.items() if k.lower() == "' + _this__u8e3s4.ap_1.l1().toLowerCase() + '"), None), ' + $this.k1x(_this__u8e3s4.bp_1) + ')';
821
822
  }
822
823
  return tmp;
823
824
  }
@@ -855,7 +856,7 @@ function emitDeserialized_0($this, _this__u8e3s4, endpoint) {
855
856
  var tmp_1 = Spacer_instance.qr(2);
856
857
  var tmp0_safe_receiver = _this__u8e3s4.sp_1;
857
858
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pp_1;
858
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.j1x(tmp1_safe_receiver);
859
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.k1x(tmp1_safe_receiver);
859
860
  var tmp_2 = tmp_1 + 'body = serialization.deserialize(response.body, ' + (tmp2_elvis_lhs == null ? 'type(None)' : tmp2_elvis_lhs) + '),';
860
861
  return joinToString(listOfNotNull([tmp, tmp_0, tmp_2, orNull(joinToString(_this__u8e3s4.rp_1, ',\n', VOID, VOID, VOID, VOID, PythonEndpointDefinitionEmitter$emitDeserialized$lambda($this))), Spacer_instance.toString() + ')']), '\n');
861
862
  }
@@ -879,13 +880,13 @@ function emitSerialized($this, _this__u8e3s4, endpoint) {
879
880
  tmp_6 = null;
880
881
  } else {
881
882
  // Inline function 'kotlin.let' call
882
- tmp_6 = 'serialization.serialize(response.body, ' + $this.j1x(tmp0_safe_receiver.pp_1) + ')';
883
+ tmp_6 = 'serialization.serialize(response.body, ' + $this.k1x(tmp0_safe_receiver.pp_1) + ')';
883
884
  }
884
885
  var tmp1_elvis_lhs = tmp_6;
885
886
  return trimMargin('\n |case ' + tmp + '.Response' + _this__u8e3s4.qp_1 + '():\n |' + tmp_0 + 'return Wirespec.RawResponse(\n |' + tmp_1 + 'status_code = response.status,\n |' + tmp_2 + 'headers = ' + tmp_4 + ',\n |' + tmp_5 + 'body = ' + (tmp1_elvis_lhs == null ? 'type(None)' : tmp1_elvis_lhs) + ',\n |' + Spacer_instance.qr(1) + ')\n ');
886
887
  }
887
888
  function emitSerializedParams($this, _this__u8e3s4, type, fields) {
888
- return '"' + _this__u8e3s4.ap_1.l1() + '": serialization.serialize_param(' + type + '.' + fields + '.' + $this.wq(_this__u8e3s4.ap_1) + ', ' + $this.j1x(_this__u8e3s4.bp_1) + ')';
889
+ return '"' + _this__u8e3s4.ap_1.l1() + '": serialization.serialize_param(' + type + '.' + fields + '.' + $this.wq(_this__u8e3s4.ap_1) + ', ' + $this.k1x(_this__u8e3s4.bp_1) + ')';
889
890
  }
890
891
  function emitObject($this, _this__u8e3s4, name, extends_0, spaces, block) {
891
892
  var tmp;
@@ -912,12 +913,12 @@ function emit_18($this, _this__u8e3s4) {
912
913
  }
913
914
  function PythonEndpointDefinitionEmitter$emit$lambda(this$0) {
914
915
  return function (it) {
915
- return this$0.k1x(it);
916
+ return this$0.l1x(it);
916
917
  };
917
918
  }
918
919
  function PythonEndpointDefinitionEmitter$emit$lambda_0(this$0, $endpoint) {
919
920
  return function (it) {
920
- return this$0.i1x(it, $endpoint);
921
+ return this$0.j1x(it, $endpoint);
921
922
  };
922
923
  }
923
924
  function PythonEndpointDefinitionEmitter$emit$lambda_1(this$0) {
@@ -1064,14 +1065,14 @@ function sanitizeEnum($this, _this__u8e3s4) {
1064
1065
  }
1065
1066
  function PythonEnumDefinitionEmitter$emit$lambda(this$0) {
1066
1067
  return function (it) {
1067
- return Spacer_instance.toString() + this$0.s1v(sanitizeEnum(this$0, it)) + ' = "' + it + '"';
1068
+ return Spacer_instance.toString() + this$0.t1v(sanitizeEnum(this$0, it)) + ' = "' + it + '"';
1068
1069
  };
1069
1070
  }
1070
1071
  function PythonEnumDefinitionEmitter() {
1071
1072
  }
1072
1073
  function Companion() {
1073
1074
  Companion_instance_2 = this;
1074
- this.l1x_1 = setOf(['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']);
1075
+ this.m1x_1 = setOf(['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']);
1075
1076
  }
1076
1077
  var Companion_instance_2;
1077
1078
  function Companion_getInstance_0() {
@@ -1082,7 +1083,7 @@ function Companion_getInstance_0() {
1082
1083
  function PythonIdentifierEmitter() {
1083
1084
  }
1084
1085
  function _get_sanitizationConfig__sns434($this) {
1085
- var tmp0 = $this.q1x_1;
1086
+ var tmp0 = $this.r1x_1;
1086
1087
  var tmp = KProperty1;
1087
1088
  // Inline function 'kotlin.getValue' call
1088
1089
  getPropertyCallableRef('sanitizationConfig', 1, tmp, PythonIrEmitter$_get_sanitizationConfig_$ref_1q5eai(), null);
@@ -1145,7 +1146,7 @@ function sanitize_0($this, _this__u8e3s4) {
1145
1146
  return tmp_2;
1146
1147
  }
1147
1148
  function sanitizeKeywords_0($this, _this__u8e3s4) {
1148
- return Companion_getInstance_1().s1x_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
1149
+ return Companion_getInstance_1().t1x_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
1149
1150
  }
1150
1151
  function sanitizeEnum_0($this, _this__u8e3s4) {
1151
1152
  // Inline function 'kotlin.let' call
@@ -1171,7 +1172,7 @@ function buildImports($this, wirespecPath) {
1171
1172
  }
1172
1173
  function Companion_0() {
1173
1174
  Companion_instance_3 = this;
1174
- this.s1x_1 = setOf(['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']);
1175
+ this.t1x_1 = setOf(['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']);
1175
1176
  }
1176
1177
  var Companion_instance_3;
1177
1178
  function Companion_getInstance_1() {
@@ -1180,16 +1181,16 @@ function Companion_getInstance_1() {
1180
1181
  return Companion_instance_3;
1181
1182
  }
1182
1183
  function sam$kotlin_Comparator$0_0(function_0) {
1183
- this.t1x_1 = function_0;
1184
+ this.u1x_1 = function_0;
1184
1185
  }
1185
1186
  protoOf(sam$kotlin_Comparator$0_0).qd = function (a, b) {
1186
- return this.t1x_1(a, b);
1187
+ return this.u1x_1(a, b);
1187
1188
  };
1188
1189
  protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
1189
1190
  return this.qd(a, b);
1190
1191
  };
1191
1192
  protoOf(sam$kotlin_Comparator$0_0).l3 = function () {
1192
- return this.t1x_1;
1193
+ return this.u1x_1;
1193
1194
  };
1194
1195
  protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
1195
1196
  var tmp;
@@ -1213,11 +1214,11 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
1213
1214
  return '_' + it;
1214
1215
  }
1215
1216
  function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
1216
- var sanitized = name.m1h_1.a1() > 1 ? name.q1l() : name.r1h();
1217
+ var sanitized = name.g1h_1.a1() > 1 ? name.s1l() : name.s1h();
1217
1218
  return new Name(listOf_0(sanitized));
1218
1219
  }
1219
1220
  function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
1220
- return new Name(listOf_0(name.q1l()));
1221
+ return new Name(listOf_0(name.s1l()));
1221
1222
  }
1222
1223
  function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
1223
1224
  return it;
@@ -1226,9 +1227,9 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1226
1227
  return function (stmt, tr) {
1227
1228
  var tmp;
1228
1229
  if (stmt instanceof ConstructorStatement) {
1229
- var tmp_0 = tr.o1t(stmt.o1m_1);
1230
+ var tmp_0 = tr.p1t(stmt.p1m_1);
1230
1231
  // Inline function 'kotlin.collections.map' call
1231
- var this_0 = stmt.p1m_1;
1232
+ var this_0 = stmt.q1m_1;
1232
1233
  // Inline function 'kotlin.collections.mapTo' call
1233
1234
  var destination = ArrayList_init_$Create$_0(this_0.a1());
1234
1235
  // Inline function 'kotlin.collections.iterator' call
@@ -1239,7 +1240,7 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1239
1240
  var k = item.k1();
1240
1241
  // Inline function 'kotlin.collections.component2' call
1241
1242
  var v = item.l1();
1242
- var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.r1t(v));
1243
+ var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.s1t(v));
1243
1244
  destination.x(tmp$ret$3);
1244
1245
  }
1245
1246
  tmp = new ConstructorStatement(tmp_0, toMap(destination));
@@ -1251,7 +1252,7 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1251
1252
  }
1252
1253
  function PythonIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1253
1254
  return function () {
1254
- var tmp = Companion_getInstance_1().s1x_1;
1255
+ var tmp = Companion_getInstance_1().t1x_1;
1255
1256
  var tmp_0 = PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1256
1257
  var tmp_1 = PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
1257
1258
  var tmp_2 = PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
@@ -1282,31 +1283,31 @@ function PythonIrEmitter(packageName, emitShared) {
1282
1283
  Companion_getInstance_1();
1283
1284
  packageName = packageName === VOID ? Companion_instance.lr('community.flock.wirespec.generated') : packageName;
1284
1285
  emitShared = emitShared === VOID ? Companion_instance_0.go() : emitShared;
1285
- this.m1x_1 = packageName;
1286
- this.n1x_1 = emitShared;
1287
- this.o1x_1 = PythonGenerator_instance;
1288
- this.p1x_1 = FileExtension_Python_getInstance();
1286
+ this.n1x_1 = packageName;
1287
+ this.o1x_1 = emitShared;
1288
+ this.p1x_1 = PythonGenerator_instance;
1289
+ this.q1x_1 = FileExtension_Python_getInstance();
1289
1290
  var tmp = this;
1290
- tmp.q1x_1 = lazy(PythonIrEmitter$sanitizationConfig$delegate$lambda(this));
1291
- this.r1x_1 = "from __future__ import annotations\n\nimport enum\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom typing import Any, Generic, Optional, Type, TypeVar\n\nT = TypeVar('T')\n\n\ndef _raise(msg: str) -> Any:\n raise Exception(msg)\n\n";
1291
+ tmp.r1x_1 = lazy(PythonIrEmitter$sanitizationConfig$delegate$lambda(this));
1292
+ this.s1x_1 = "from __future__ import annotations\n\nimport enum\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom typing import Any, Generic, Optional, Type, TypeVar\n\nT = TypeVar('T')\n\n\ndef _raise(msg: str) -> Any:\n raise Exception(msg)\n\n";
1292
1293
  }
1293
- protoOf(PythonIrEmitter).j1u = function () {
1294
- return this.o1x_1;
1294
+ protoOf(PythonIrEmitter).k1u = function () {
1295
+ return this.p1x_1;
1295
1296
  };
1296
1297
  protoOf(PythonIrEmitter).eq = function () {
1297
- return this.p1x_1;
1298
+ return this.q1x_1;
1298
1299
  };
1299
- protoOf(PythonIrEmitter).m1u = function () {
1300
+ protoOf(PythonIrEmitter).n1u = function () {
1300
1301
  var source = convert(Companion_instance.lr('shared'));
1301
1302
  var tmp;
1302
- if (this.n1x_1.ho_1) {
1303
- tmp = new File(Companion_getInstance().l1h(this.m1x_1.or() + 'wirespec'), listOf_0(raw(this.r1x_1 + PythonGenerator_instance.k1u(source))));
1303
+ if (this.o1x_1.ho_1) {
1304
+ tmp = new File(Companion_getInstance().f1h(this.n1x_1.or() + 'wirespec'), listOf_0(raw(this.s1x_1 + PythonGenerator_instance.l1u(source))));
1304
1305
  } else {
1305
1306
  tmp = null;
1306
1307
  }
1307
1308
  return tmp;
1308
1309
  };
1309
- protoOf(PythonIrEmitter).l1u = function (module_0, logger) {
1310
+ protoOf(PythonIrEmitter).m1u = function (module_0, logger) {
1310
1311
  // Inline function 'kotlin.collections.sortedBy' call
1311
1312
  var this_0 = new NonEmptyList(module_0.dq_1);
1312
1313
  // Inline function 'kotlin.comparisons.compareBy' call
@@ -1341,7 +1342,7 @@ protoOf(PythonIrEmitter).l1u = function (module_0, logger) {
1341
1342
  tmp$ret$2 = false;
1342
1343
  }
1343
1344
  var hasEndpoints = tmp$ret$2;
1344
- var tmp_2 = Companion_getInstance().l1h(this.m1x_1.or() + '__init__');
1345
+ var tmp_2 = Companion_getInstance().f1h(this.n1x_1.or() + '__init__');
1345
1346
  // Inline function 'kotlin.collections.buildList' call
1346
1347
  // Inline function 'kotlin.collections.buildListInternal' call
1347
1348
  // Inline function 'kotlin.apply' call
@@ -1354,7 +1355,7 @@ protoOf(PythonIrEmitter).l1u = function (module_0, logger) {
1354
1355
  this_1.x(import_0('.', 'wirespec'));
1355
1356
  var tmp$ret$7 = this_1.o5();
1356
1357
  var init = new File(tmp_2, tmp$ret$7);
1357
- var tmp_3 = Companion_getInstance().l1h(this.m1x_1.or() + 'endpoint/' + '__init__');
1358
+ var tmp_3 = Companion_getInstance().f1h(this.n1x_1.or() + 'endpoint/' + '__init__');
1358
1359
  // Inline function 'kotlin.collections.filterIsInstance' call
1359
1360
  var tmp0_0 = new NonEmptyList(module_0.dq_1);
1360
1361
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
@@ -1376,7 +1377,7 @@ protoOf(PythonIrEmitter).l1u = function (module_0, logger) {
1376
1377
  destination_0.x(tmp$ret$10);
1377
1378
  }
1378
1379
  var initEndpoint = new File(tmp_3, destination_0);
1379
- var tmp_4 = Companion_getInstance().l1h(this.m1x_1.or() + 'model/' + '__init__');
1380
+ var tmp_4 = Companion_getInstance().f1h(this.n1x_1.or() + 'model/' + '__init__');
1380
1381
  // Inline function 'kotlin.collections.filterIsInstance' call
1381
1382
  var tmp0_1 = new NonEmptyList(module_0.dq_1);
1382
1383
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
@@ -1398,8 +1399,8 @@ protoOf(PythonIrEmitter).l1u = function (module_0, logger) {
1398
1399
  destination_2.x(tmp$ret$15);
1399
1400
  }
1400
1401
  var initModel = new File(tmp_4, destination_2);
1401
- var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().l1h(this.m1x_1.or() + 'client/' + '__init__'), emptyList())) : emptyList();
1402
- var tmp0_2 = dropLast(split(this.m1x_1.mr_1, ['.']), 1);
1402
+ var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().f1h(this.n1x_1.or() + 'client/' + '__init__'), emptyList())) : emptyList();
1403
+ var tmp0_2 = dropLast(split(this.n1x_1.mr_1, ['.']), 1);
1403
1404
  var tmp$ret$18;
1404
1405
  $l$block_1: {
1405
1406
  // Inline function 'kotlin.collections.runningFold' call
@@ -1436,15 +1437,15 @@ protoOf(PythonIrEmitter).l1u = function (module_0, logger) {
1436
1437
  var _iterator__ex2g4s_5 = this_3.t();
1437
1438
  while (_iterator__ex2g4s_5.u()) {
1438
1439
  var item_1 = _iterator__ex2g4s_5.v();
1439
- var tmp$ret$23 = new File(Companion_getInstance().l1h(item_1 + '/__init__'), emptyList());
1440
+ var tmp$ret$23 = new File(Companion_getInstance().f1h(item_1 + '/__init__'), emptyList());
1440
1441
  destination_3.x(tmp$ret$23);
1441
1442
  }
1442
1443
  var parentInits = destination_3;
1443
- return this.n1x_1.ho_1 ? NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(emitted, init), initEndpoint), initModel), initClient), parentInits) : NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9(emitted, init), parentInits);
1444
+ return this.o1x_1.ho_1 ? NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(emitted, init), initEndpoint), initModel), initClient), parentInits) : NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9(emitted, init), parentInits);
1444
1445
  };
1445
1446
  protoOf(PythonIrEmitter).uq = function (definition, module_0, logger) {
1446
1447
  var file = emit_0.call(this, definition, module_0, logger);
1447
- return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.m1x_1, definition);
1448
+ return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.n1x_1, definition);
1448
1449
  };
1449
1450
  protoOf(PythonIrEmitter).up = function (type, module_0) {
1450
1451
  // Inline function 'kotlin.collections.distinctBy' call
@@ -1527,13 +1528,13 @@ protoOf(PythonIrEmitter).jr = function (endpoint) {
1527
1528
  var endpointImports = destination;
1528
1529
  // Inline function 'kotlin.let' call
1529
1530
  var it = splitEndpointStructsToModuleLevel(convert_3(endpoint));
1530
- var tmp$ret$6 = it.v1m(VOID, plus(endpointImports, it.s1m_1));
1531
+ var tmp$ret$6 = it.w1m(VOID, plus(endpointImports, it.t1m_1));
1531
1532
  return sanitizeNames(snakeCaseHandlerAndCallMethods(tmp$ret$6), _get_sanitizationConfig__sns434(this));
1532
1533
  };
1533
1534
  protoOf(PythonIrEmitter).xq = function (channel) {
1534
1535
  return sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
1535
1536
  };
1536
- protoOf(PythonIrEmitter).o1u = function (endpoint) {
1537
+ protoOf(PythonIrEmitter).p1u = function (endpoint) {
1537
1538
  // Inline function 'kotlin.collections.distinctBy' call
1538
1539
  var this_0 = importReferences(endpoint);
1539
1540
  var set = HashSet_init_$Create$();
@@ -1559,10 +1560,10 @@ protoOf(PythonIrEmitter).o1u = function (endpoint) {
1559
1560
  var endpointImport = import_0('..endpoint.' + endpoint.ep_1.l1(), '*');
1560
1561
  var endpointName = endpoint.ep_1.l1();
1561
1562
  var file = flattenEndpointTypeRefs(snakeCaseClientFunctions(addSelfReceiverToClientFields(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)))), endpointName);
1562
- var subPackageName = plus_2(this.m1x_1, 'client');
1563
- return new File(Companion_getInstance().l1h(subPackageName.or() + file.r1m_1.w1l()), plus(plus(plus(buildImports(this, '..wirespec'), modelImports), listOf_0(endpointImport)), file.s1m_1));
1563
+ var subPackageName = plus_2(this.n1x_1, 'client');
1564
+ return new File(Companion_getInstance().f1h(subPackageName.or() + file.s1m_1.h1h()), plus(plus(plus(buildImports(this, '..wirespec'), modelImports), listOf_0(endpointImport)), file.t1m_1));
1564
1565
  };
1565
- protoOf(PythonIrEmitter).n1u = function (endpoints, logger) {
1566
+ protoOf(PythonIrEmitter).o1u = function (endpoints, logger) {
1566
1567
  // Inline function 'kotlin.collections.flatMap' call
1567
1568
  // Inline function 'kotlin.collections.flatMapTo' call
1568
1569
  var destination = ArrayList_init_$Create$();
@@ -1634,7 +1635,7 @@ protoOf(PythonIrEmitter).n1u = function (endpoints, logger) {
1634
1635
  accumulator = flattenEndpointTypeRefs(acc, element_0);
1635
1636
  }
1636
1637
  var file = accumulator;
1637
- return new File(Companion_getInstance().l1h(this.m1x_1.or() + file.r1m_1.w1l()), plus(plus(buildImports(this, '.wirespec'), allImports), file.s1m_1));
1638
+ return new File(Companion_getInstance().f1h(this.n1x_1.or() + file.s1m_1.h1h()), plus(plus(buildImports(this, '.wirespec'), allImports), file.t1m_1));
1638
1639
  };
1639
1640
  function replaceRefinedFunctions(_this__u8e3s4, refined) {
1640
1641
  // Inline function 'community.flock.wirespec.ir.core.transform' call
@@ -1642,14 +1643,14 @@ function replaceRefinedFunctions(_this__u8e3s4, refined) {
1642
1643
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1643
1644
  var tmp = scope;
1644
1645
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1645
- var this_0 = scope.w1t_1;
1646
+ var this_0 = scope.x1t_1;
1646
1647
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1647
1648
  // Inline function 'kotlin.apply' call
1648
1649
  var this_1 = new TransformerBuilder();
1649
1650
  this_1.c1h(replaceRefinedFunctions$lambda(refined));
1650
1651
  var tmp$ret$2 = this_1.d1h();
1651
- tmp.w1t_1 = transform(this_0, tmp$ret$2);
1652
- var tmp_0 = scope.w1t_1;
1652
+ tmp.x1t_1 = transform(this_0, tmp$ret$2);
1653
+ var tmp_0 = scope.x1t_1;
1653
1654
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1654
1655
  }
1655
1656
  function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
@@ -1658,20 +1659,20 @@ function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
1658
1659
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1659
1660
  var tmp = scope;
1660
1661
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1661
- var this_0 = scope.w1t_1;
1662
+ var this_0 = scope.x1t_1;
1662
1663
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1663
1664
  // Inline function 'kotlin.apply' call
1664
1665
  var this_1 = new TransformerBuilder();
1665
1666
  this_1.c1h(snakeCaseHandlerAndCallMethods$lambda);
1666
1667
  var tmp$ret$2 = this_1.d1h();
1667
- tmp.w1t_1 = transform(this_0, tmp$ret$2);
1668
- var tmp_0 = scope.w1t_1;
1668
+ tmp.x1t_1 = transform(this_0, tmp$ret$2);
1669
+ var tmp_0 = scope.x1t_1;
1669
1670
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1670
1671
  }
1671
1672
  function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
1672
1673
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1673
1674
  // Inline function 'kotlin.collections.filterIsInstance' call
1674
- var tmp0 = _this__u8e3s4.t1m();
1675
+ var tmp0 = _this__u8e3s4.u1m();
1675
1676
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1676
1677
  var destination = ArrayList_init_$Create$();
1677
1678
  var _iterator__ex2g4s = tmp0.t();
@@ -1685,7 +1686,7 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
1685
1686
  var namespace = ensureNotNull(tmp$ret$2);
1686
1687
  var flattened = flattenNestedStructs(namespace);
1687
1688
  // Inline function 'kotlin.collections.partition' call
1688
- var this_0 = flattened.y1m_1;
1689
+ var this_0 = flattened.z1m_1;
1689
1690
  var first = ArrayList_init_$Create$();
1690
1691
  var second = ArrayList_init_$Create$();
1691
1692
  var _iterator__ex2g4s_0 = this_0.t();
@@ -1706,14 +1707,14 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
1706
1707
  var _destruct__k2r9zo = new Pair(first, second);
1707
1708
  var moduleElements = _destruct__k2r9zo.ne();
1708
1709
  var classElements = _destruct__k2r9zo.oe();
1709
- var endpointClass = new Namespace(namespace.x1m_1, classElements, namespace.z1m_1);
1710
- return new File(namespace.x1m_1, plus_0(moduleElements, endpointClass));
1710
+ var endpointClass = new Namespace(namespace.y1m_1, classElements, namespace.a1n_1);
1711
+ return new File(namespace.y1m_1, plus_0(moduleElements, endpointClass));
1711
1712
  }
1712
1713
  function flattenEndpointTypeRefs(_this__u8e3s4, endpointName) {
1713
1714
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1714
1715
  var scope = new TransformScope(_this__u8e3s4);
1715
- scope.c1u(flattenEndpointTypeRefs$lambda(endpointName));
1716
- var tmp = scope.w1t_1;
1716
+ scope.d1u(flattenEndpointTypeRefs$lambda(endpointName));
1717
+ var tmp = scope.x1t_1;
1717
1718
  return isInterface(tmp, Element) ? tmp : THROW_CCE();
1718
1719
  }
1719
1720
  function snakeCaseClientFunctions(_this__u8e3s4) {
@@ -1722,15 +1723,15 @@ function snakeCaseClientFunctions(_this__u8e3s4) {
1722
1723
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1723
1724
  var tmp = scope;
1724
1725
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1725
- var this_0 = scope.w1t_1;
1726
+ var this_0 = scope.x1t_1;
1726
1727
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1727
1728
  // Inline function 'kotlin.apply' call
1728
1729
  var this_1 = new TransformerBuilder();
1729
1730
  this_1.c1h(snakeCaseClientFunctions$lambda);
1730
1731
  var tmp$ret$2 = this_1.d1h();
1731
- tmp.w1t_1 = transform(this_0, tmp$ret$2);
1732
- scope.f1u(snakeCaseClientFunctions$lambda_0);
1733
- var tmp_0 = scope.w1t_1;
1732
+ tmp.x1t_1 = transform(this_0, tmp$ret$2);
1733
+ scope.g1u(snakeCaseClientFunctions$lambda_0);
1734
+ var tmp_0 = scope.x1t_1;
1734
1735
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1735
1736
  }
1736
1737
  function addSelfReceiverToClientFields(_this__u8e3s4) {
@@ -1741,7 +1742,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
1741
1742
  } else {
1742
1743
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1743
1744
  // Inline function 'kotlin.collections.filterIsInstance' call
1744
- var tmp0 = tmp0_safe_receiver.t1m();
1745
+ var tmp0 = tmp0_safe_receiver.u1m();
1745
1746
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1746
1747
  var destination = ArrayList_init_$Create$();
1747
1748
  var _iterator__ex2g4s = tmp0.t();
@@ -1754,7 +1755,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
1754
1755
  tmp = firstOrNull_0(destination);
1755
1756
  }
1756
1757
  var struct = tmp;
1757
- var tmp2_safe_receiver = struct == null ? null : struct.d1n_1;
1758
+ var tmp2_safe_receiver = struct == null ? null : struct.e1n_1;
1758
1759
  var tmp_0;
1759
1760
  if (tmp2_safe_receiver == null) {
1760
1761
  tmp_0 = null;
@@ -1765,7 +1766,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
1765
1766
  var _iterator__ex2g4s_0 = tmp2_safe_receiver.t();
1766
1767
  while (_iterator__ex2g4s_0.u()) {
1767
1768
  var item = _iterator__ex2g4s_0.v();
1768
- var tmp$ret$3 = item.y1p_1.r1h();
1769
+ var tmp$ret$3 = item.z1p_1.s1h();
1769
1770
  destination_0.x(tmp$ret$3);
1770
1771
  }
1771
1772
  tmp_0 = destination_0;
@@ -1777,23 +1778,23 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
1777
1778
  return _this__u8e3s4;
1778
1779
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1779
1780
  var scope = new TransformScope(_this__u8e3s4);
1780
- scope.f1u(addSelfReceiverToClientFields$lambda(fieldNames));
1781
- var tmp_1 = scope.w1t_1;
1781
+ scope.g1u(addSelfReceiverToClientFields$lambda(fieldNames));
1782
+ var tmp_1 = scope.x1t_1;
1782
1783
  return isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
1783
1784
  }
1784
1785
  function replaceRefinedFunctions$lambda$lambda($constraintExpr) {
1785
1786
  return function ($this$function) {
1786
- $this$function.k1i('self', new Custom_0(''));
1787
- $this$function.j1i(Boolean_instance_0);
1788
- $this$function.i1k($constraintExpr);
1787
+ $this$function.l1i('self', Custom_init_$Create$(''));
1788
+ $this$function.k1i(Boolean_instance_0);
1789
+ $this$function.j1k($constraintExpr);
1789
1790
  return Unit_instance;
1790
1791
  };
1791
1792
  }
1792
1793
  function replaceRefinedFunctions$lambda$lambda_0($toStringExpr) {
1793
1794
  return function ($this$function) {
1794
- $this$function.k1i('self', new Custom_0(''));
1795
- $this$function.j1i(String_instance);
1796
- $this$function.i1k(new RawExpression($toStringExpr));
1795
+ $this$function.l1i('self', Custom_init_$Create$(''));
1796
+ $this$function.k1i(String_instance);
1797
+ $this$function.j1k(new RawExpression($toStringExpr));
1797
1798
  return Unit_instance;
1798
1799
  };
1799
1800
  }
@@ -1802,7 +1803,7 @@ function replaceRefinedFunctions$lambda($refined) {
1802
1803
  var tmp;
1803
1804
  if (element instanceof Struct) {
1804
1805
  // Inline function 'kotlin.collections.mapNotNull' call
1805
- var tmp0 = element.g1n_1;
1806
+ var tmp0 = element.h1n_1;
1806
1807
  // Inline function 'kotlin.collections.mapNotNullTo' call
1807
1808
  var destination = ArrayList_init_$Create$();
1808
1809
  // Inline function 'kotlin.collections.forEach' call
@@ -1812,17 +1813,17 @@ function replaceRefinedFunctions$lambda($refined) {
1812
1813
  var tmp_0;
1813
1814
  var tmp_1;
1814
1815
  if (element_0 instanceof Function) {
1815
- tmp_1 = element_0.s1j_1.equals(Companion_getInstance().l1h('validate'));
1816
+ tmp_1 = element_0.t1j_1.equals(Companion_getInstance().f1h('validate'));
1816
1817
  } else {
1817
1818
  tmp_1 = false;
1818
1819
  }
1819
1820
  if (tmp_1) {
1820
- var constraintExpr = convertConstraint($refined.cr_1, new FieldCall(new VariableReference(Companion_getInstance().l1h('self')), Companion_getInstance().l1h('value')));
1821
+ var constraintExpr = convertConstraint($refined.cr_1, new FieldCall(new VariableReference(Companion_getInstance().f1h('self')), Companion_getInstance().f1h('value')));
1821
1822
  tmp_0 = function_0('validate', VOID, VOID, replaceRefinedFunctions$lambda$lambda(constraintExpr));
1822
1823
  } else {
1823
1824
  var tmp_2;
1824
1825
  if (element_0 instanceof Function) {
1825
- tmp_2 = element_0.s1j_1.equals(Companion_getInstance().l1h('toString'));
1826
+ tmp_2 = element_0.t1j_1.equals(Companion_getInstance().f1h('toString'));
1826
1827
  } else {
1827
1828
  tmp_2 = false;
1828
1829
  }
@@ -1847,7 +1848,7 @@ function replaceRefinedFunctions$lambda($refined) {
1847
1848
  destination.x(tmp0_safe_receiver);
1848
1849
  }
1849
1850
  }
1850
- tmp = element.i1n(VOID, VOID, VOID, VOID, destination);
1851
+ tmp = element.j1n(VOID, VOID, VOID, VOID, destination);
1851
1852
  } else {
1852
1853
  tmp = element;
1853
1854
  }
@@ -1860,23 +1861,23 @@ function snakeCaseHandlerAndCallMethods$lambda(element, transformer) {
1860
1861
  if (element instanceof Interface) {
1861
1862
  var tmp$ret$0;
1862
1863
  $l$block: {
1863
- if (!element.j1n_1.equals(Companion_getInstance().l1h('Handler')) && !element.j1n_1.equals(Companion_getInstance().l1h('Call'))) {
1864
+ if (!element.k1n_1.equals(Companion_getInstance().f1h('Handler')) && !element.k1n_1.equals(Companion_getInstance().f1h('Call'))) {
1864
1865
  tmp$ret$0 = element;
1865
1866
  break $l$block;
1866
1867
  }
1867
1868
  // Inline function 'kotlin.collections.map' call
1868
- var this_0 = element.k1n_1;
1869
+ var this_0 = element.l1n_1;
1869
1870
  // Inline function 'kotlin.collections.mapTo' call
1870
1871
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1871
1872
  var _iterator__ex2g4s = this_0.t();
1872
1873
  while (_iterator__ex2g4s.u()) {
1873
1874
  var item = _iterator__ex2g4s.v();
1874
1875
  var tmp0_safe_receiver = item instanceof Function ? item : null;
1875
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a1k(Companion_getInstance().l1h(item.s1j_1.x1l()));
1876
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b1k(Companion_getInstance().f1h(item.t1j_1.y1l()));
1876
1877
  var tmp$ret$1 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
1877
1878
  destination.x(tmp$ret$1);
1878
1879
  }
1879
- tmp$ret$0 = element.q1n(VOID, destination);
1880
+ tmp$ret$0 = element.r1n(VOID, destination);
1880
1881
  }
1881
1882
  tmp = tmp$ret$0;
1882
1883
  } else {
@@ -1891,17 +1892,17 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
1891
1892
  if (!(type instanceof Custom_0)) {
1892
1893
  tmp = type;
1893
1894
  } else {
1894
- if (!startsWith(type.p1h_1, $endpointName + '.')) {
1895
+ if (!startsWith(type.q1h_1.h1h(), $endpointName + '.')) {
1895
1896
  tmp = type;
1896
1897
  } else {
1897
- var suffix = removePrefix(type.p1h_1, $endpointName + '.');
1898
+ var suffix = removePrefix(type.q1h_1.h1h(), $endpointName + '.');
1898
1899
  switch (suffix) {
1899
1900
  case 'Call':
1900
1901
  case 'Handler':
1901
1902
  tmp = type;
1902
1903
  break;
1903
1904
  default:
1904
- tmp = type.m1m(suffix);
1905
+ tmp = type.n1m(Companion_getInstance().f1h(suffix));
1905
1906
  break;
1906
1907
  }
1907
1908
  }
@@ -1912,7 +1913,7 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
1912
1913
  function snakeCaseClientFunctions$lambda(element, transformer) {
1913
1914
  var tmp;
1914
1915
  if (element instanceof Function) {
1915
- tmp = element.a1k(Companion_getInstance().l1h(element.s1j_1.x1l()), VOID, plus(listOf_0(new Parameter(Companion_getInstance().l1h('self'), new Custom_0(''))), element.u1j_1));
1916
+ tmp = element.b1k(Companion_getInstance().f1h(element.t1j_1.y1l()), VOID, plus(listOf_0(new Parameter(Companion_getInstance().f1h('self'), Custom_init_$Create$(''))), element.v1j_1));
1916
1917
  } else {
1917
1918
  tmp = element;
1918
1919
  }
@@ -1922,19 +1923,19 @@ function snakeCaseClientFunctions$lambda(element, transformer) {
1922
1923
  function snakeCaseClientFunctions$lambda_0(stmt, tr) {
1923
1924
  var tmp;
1924
1925
  if (stmt instanceof FunctionCall) {
1925
- var nameStr = stmt.a1m_1.r1h();
1926
- var newName = contains(nameStr, '.') ? stmt.a1m_1 : Companion_getInstance().l1h(Companion_getInstance().l1h(nameStr).x1l());
1927
- var tmp1_safe_receiver = stmt.y1l_1;
1926
+ var nameStr = stmt.b1m_1.s1h();
1927
+ var newName = contains(nameStr, '.') ? stmt.b1m_1 : Companion_getInstance().f1h(Companion_getInstance().f1h(nameStr).y1l());
1928
+ var tmp1_safe_receiver = stmt.z1l_1;
1928
1929
  var tmp_0;
1929
1930
  if (tmp1_safe_receiver == null) {
1930
1931
  tmp_0 = null;
1931
1932
  } else {
1932
1933
  // Inline function 'kotlin.let' call
1933
- tmp_0 = tr.r1t(tmp1_safe_receiver);
1934
+ tmp_0 = tr.s1t(tmp1_safe_receiver);
1934
1935
  }
1935
1936
  var tmp2_receiver = tmp_0;
1936
1937
  // Inline function 'kotlin.collections.mapValues' call
1937
- var this_0 = stmt.b1m_1;
1938
+ var this_0 = stmt.c1m_1;
1938
1939
  // Inline function 'kotlin.collections.mapValuesTo' call
1939
1940
  var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.a1()));
1940
1941
  // Inline function 'kotlin.collections.associateByTo' call
@@ -1944,10 +1945,10 @@ function snakeCaseClientFunctions$lambda_0(stmt, tr) {
1944
1945
  var tmp_1 = element.k1();
1945
1946
  // Inline function 'kotlin.collections.component2' call
1946
1947
  var v = element.l1();
1947
- var tmp$ret$4 = tr.r1t(v);
1948
+ var tmp$ret$4 = tr.s1t(v);
1948
1949
  destination.w2(tmp_1, tmp$ret$4);
1949
1950
  }
1950
- var tmp4_isAwait = !(stmt.y1l_1 == null);
1951
+ var tmp4_isAwait = !(stmt.z1l_1 == null);
1951
1952
  tmp = new FunctionCall(tmp2_receiver, VOID, newName, destination, tmp4_isAwait);
1952
1953
  } else {
1953
1954
  tmp = transformChildren(stmt, tr);
@@ -1960,28 +1961,28 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
1960
1961
  var tmp_0;
1961
1962
  var tmp_1;
1962
1963
  if (stmt instanceof FieldCall) {
1963
- tmp_1 = stmt.i1p_1 == null;
1964
+ tmp_1 = stmt.j1p_1 == null;
1964
1965
  } else {
1965
1966
  tmp_1 = false;
1966
1967
  }
1967
1968
  if (tmp_1) {
1968
- tmp_0 = $fieldNames.u1(stmt.j1p_1.r1h());
1969
+ tmp_0 = $fieldNames.u1(stmt.k1p_1.s1h());
1969
1970
  } else {
1970
1971
  tmp_0 = false;
1971
1972
  }
1972
1973
  if (tmp_0) {
1973
- tmp = new FieldCall(new VariableReference(Companion_getInstance().l1h('self')), stmt.j1p_1);
1974
+ tmp = new FieldCall(new VariableReference(Companion_getInstance().f1h('self')), stmt.k1p_1);
1974
1975
  } else {
1975
1976
  if (stmt instanceof FieldCall) {
1976
- var tmp0_safe_receiver = stmt.i1p_1;
1977
+ var tmp0_safe_receiver = stmt.j1p_1;
1977
1978
  var tmp_2;
1978
1979
  if (tmp0_safe_receiver == null) {
1979
1980
  tmp_2 = null;
1980
1981
  } else {
1981
1982
  // Inline function 'kotlin.let' call
1982
- tmp_2 = tr.r1t(tmp0_safe_receiver);
1983
+ tmp_2 = tr.s1t(tmp0_safe_receiver);
1983
1984
  }
1984
- tmp = new FieldCall(tmp_2, stmt.j1p_1);
1985
+ tmp = new FieldCall(tmp_2, stmt.k1p_1);
1985
1986
  } else {
1986
1987
  tmp = transformChildren(stmt, tr);
1987
1988
  }
@@ -1992,8 +1993,8 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
1992
1993
  function PythonRefinedTypeDefinitionEmitter() {
1993
1994
  }
1994
1995
  function PythonShared() {
1995
- this.f1x_1 = 'shared';
1996
- this.g1x_1 = "from abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom enum import Enum\nfrom typing import Generic, List, Dict, Optional, TypeVar\n\nT = TypeVar('T')\nREQ = TypeVar('REQ')\nRES = TypeVar('RES')\n\nclass Wirespec:\n\n class Refined(ABC, Generic[T]):\n @property\n @abstractmethod\n def value(self) -> T: pass\n\n class Endpoint(ABC):\n\n class Handler(ABC):\n pass\n\n class Convert(ABC, Generic[REQ, RES]):\n @staticmethod\n @abstractmethod\n def to_raw_request(serializer: 'Wirespec.Serializer', req: REQ) -> 'Wirespec.RawRequest': pass\n\n @staticmethod\n @abstractmethod\n def from_raw_response(serializer: 'Wirespec.Deserializer', res: 'Wirespec.RawResponse') -> RES: pass\n\n @staticmethod\n @abstractmethod\n def to_raw_response(serializer: 'Wirespec.Serializer', res: RES) -> 'Wirespec.RawResponse': pass\n\n @staticmethod\n @abstractmethod\n def from_raw_request(serializer: 'Wirespec.Deserializer[T]', req: 'Wirespec.RawRequest') -> REQ: pass\n\n class Method(Enum):\n GET = \"GET\"\n PUT = \"PUT\"\n POST = \"POST\"\n DELETE = \"DELETE\"\n OPTIONS = \"OPTIONS\"\n HEAD = \"HEAD\"\n PATCH = \"PATCH\"\n TRACE = \"TRACE\"\n\n class Request(Generic[T], ABC):\n\n class Path(ABC): pass\n\n class Queries(ABC): pass\n\n class Headers(ABC): pass\n\n @property\n @abstractmethod\n def path(self) -> Path: pass\n\n @property\n @abstractmethod\n def method(self) -> 'Wirespec.Method': pass\n\n @property\n @abstractmethod\n def queries(self) -> Queries: pass\n\n @property\n @abstractmethod\n def headers(self) -> Headers: pass\n\n @property\n @abstractmethod\n def body(self) -> T: pass\n\n class Response(Generic[T], ABC):\n\n class Headers(ABC): pass\n\n @property\n @abstractmethod\n def status(self) -> int: pass\n\n @property\n @abstractmethod\n def headers(self) -> Headers: pass\n\n @property\n @abstractmethod\n def body(self) -> T: pass\n\n class Serializer(Generic[T], ABC):\n @abstractmethod\n def serialize(self, value: T, t: type[T]) -> str: pass\n @abstractmethod\n def serialize_param(self, value: T, t: type[T]) -> List[str]: pass\n\n class Deserializer(Generic[T], ABC):\n @abstractmethod\n def deserialize(self, value: str | None, t: type[T]) -> T: pass\n @abstractmethod\n def deserialize_param(self, value: List[str] | None, t: type[T]) -> T: pass\n\n class Serialization(Serializer, Deserializer):\n @abstractmethod\n def serialize(self, value: T, t: type[T]) -> str: pass\n @abstractmethod\n def serialize_param(self, value: T, t: type[T]) -> List[str]: pass\n @abstractmethod\n def deserialize(self, value: str | None, t: type[T]) -> T: pass\n @abstractmethod\n def deserialize_param(self, value: List[str] | None, t: type[T]) -> T: pass\n\n @dataclass\n class RawRequest:\n method: str\n path: List[str]\n queries: Dict[str, List[str]]\n headers: Dict[str, List[str]]\n body: Optional[str]\n\n\n @dataclass\n class RawResponse:\n status_code: int\n headers: Dict[str, List[str]]\n body: Optional[str]\n";
1996
+ this.g1x_1 = 'shared';
1997
+ this.h1x_1 = "from abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom enum import Enum\nfrom typing import Generic, List, Dict, Optional, TypeVar\n\nT = TypeVar('T')\nREQ = TypeVar('REQ')\nRES = TypeVar('RES')\n\nclass Wirespec:\n\n class Refined(ABC, Generic[T]):\n @property\n @abstractmethod\n def value(self) -> T: pass\n\n class Endpoint(ABC):\n\n class Handler(ABC):\n pass\n\n class Convert(ABC, Generic[REQ, RES]):\n @staticmethod\n @abstractmethod\n def to_raw_request(serializer: 'Wirespec.Serializer', req: REQ) -> 'Wirespec.RawRequest': pass\n\n @staticmethod\n @abstractmethod\n def from_raw_response(serializer: 'Wirespec.Deserializer', res: 'Wirespec.RawResponse') -> RES: pass\n\n @staticmethod\n @abstractmethod\n def to_raw_response(serializer: 'Wirespec.Serializer', res: RES) -> 'Wirespec.RawResponse': pass\n\n @staticmethod\n @abstractmethod\n def from_raw_request(serializer: 'Wirespec.Deserializer[T]', req: 'Wirespec.RawRequest') -> REQ: pass\n\n class Method(Enum):\n GET = \"GET\"\n PUT = \"PUT\"\n POST = \"POST\"\n DELETE = \"DELETE\"\n OPTIONS = \"OPTIONS\"\n HEAD = \"HEAD\"\n PATCH = \"PATCH\"\n TRACE = \"TRACE\"\n\n class Request(Generic[T], ABC):\n\n class Path(ABC): pass\n\n class Queries(ABC): pass\n\n class Headers(ABC): pass\n\n @property\n @abstractmethod\n def path(self) -> Path: pass\n\n @property\n @abstractmethod\n def method(self) -> 'Wirespec.Method': pass\n\n @property\n @abstractmethod\n def queries(self) -> Queries: pass\n\n @property\n @abstractmethod\n def headers(self) -> Headers: pass\n\n @property\n @abstractmethod\n def body(self) -> T: pass\n\n class Response(Generic[T], ABC):\n\n class Headers(ABC): pass\n\n @property\n @abstractmethod\n def status(self) -> int: pass\n\n @property\n @abstractmethod\n def headers(self) -> Headers: pass\n\n @property\n @abstractmethod\n def body(self) -> T: pass\n\n class Serializer(Generic[T], ABC):\n @abstractmethod\n def serialize(self, value: T, t: type[T]) -> str: pass\n @abstractmethod\n def serialize_param(self, value: T, t: type[T]) -> List[str]: pass\n\n class Deserializer(Generic[T], ABC):\n @abstractmethod\n def deserialize(self, value: str | None, t: type[T]) -> T: pass\n @abstractmethod\n def deserialize_param(self, value: List[str] | None, t: type[T]) -> T: pass\n\n class Serialization(Serializer, Deserializer):\n @abstractmethod\n def serialize(self, value: T, t: type[T]) -> str: pass\n @abstractmethod\n def serialize_param(self, value: T, t: type[T]) -> List[str]: pass\n @abstractmethod\n def deserialize(self, value: str | None, t: type[T]) -> T: pass\n @abstractmethod\n def deserialize_param(self, value: List[str] | None, t: type[T]) -> T: pass\n\n @dataclass\n class RawRequest:\n method: str\n path: List[str]\n queries: Dict[str, List[str]]\n headers: Dict[str, List[str]]\n body: Optional[str]\n\n\n @dataclass\n class RawResponse:\n status_code: int\n headers: Dict[str, List[str]]\n body: Optional[str]\n";
1997
1998
  }
1998
1999
  protoOf(PythonShared).toString = function () {
1999
2000
  return 'PythonShared';
@@ -2014,12 +2015,12 @@ function PythonShared_getInstance() {
2014
2015
  }
2015
2016
  function PythonTypeDefinitionEmitter$emit$lambda(this$0) {
2016
2017
  return function (it) {
2017
- return this$0.k1x(it);
2018
+ return this$0.l1x(it);
2018
2019
  };
2019
2020
  }
2020
2021
  function PythonTypeDefinitionEmitter$emit$lambda_0(this$0) {
2021
2022
  return function (it) {
2022
- return this$0.k1x(it);
2023
+ return this$0.l1x(it);
2023
2024
  };
2024
2025
  }
2025
2026
  function PythonTypeDefinitionEmitter$emit$lambda_1(this$0) {
@@ -2032,25 +2033,25 @@ function PythonTypeDefinitionEmitter() {
2032
2033
  function PythonUnionDefinitionEmitter() {
2033
2034
  }
2034
2035
  //region block: post-declaration
2035
- protoOf(PythonEmitter).up = emit_6;
2036
- protoOf(PythonEmitter).vp = emit_7;
2037
- protoOf(PythonEmitter).wp = emit_8;
2038
- protoOf(PythonEmitter).xp = emit_9;
2039
- protoOf(PythonEmitter).yp = emit_11;
2040
- protoOf(PythonEmitter).ir = emit_5;
2041
- protoOf(PythonEmitter).dr = emit_12;
2042
- protoOf(PythonEmitter).jr = emit_13;
2043
- protoOf(PythonEmitter).yq = emit_4;
2036
+ protoOf(PythonEmitter).up = emit_4;
2037
+ protoOf(PythonEmitter).vp = emit_5;
2038
+ protoOf(PythonEmitter).wp = emit_6;
2039
+ protoOf(PythonEmitter).xp = emit_7;
2040
+ protoOf(PythonEmitter).yp = emit_9;
2041
+ protoOf(PythonEmitter).ir = emit_14;
2042
+ protoOf(PythonEmitter).dr = emit_15;
2043
+ protoOf(PythonEmitter).jr = emit_10;
2044
+ protoOf(PythonEmitter).yq = emit_13;
2044
2045
  protoOf(PythonEmitter).wq = emit_3;
2045
2046
  protoOf(PythonEmitter).xq = emit_2;
2046
- protoOf(PythonEmitter).h1x = emit_10;
2047
- protoOf(PythonEmitter).p1v = emit_14;
2048
- protoOf(PythonEmitter).i1x = emit_15;
2047
+ protoOf(PythonEmitter).i1x = emit_8;
2048
+ protoOf(PythonEmitter).q1v = emit_11;
2049
+ protoOf(PythonEmitter).j1x = emit_12;
2049
2050
  protoOf(PythonEmitter).kr = emitValidator;
2050
- protoOf(PythonEmitter).c1w = sanitize;
2051
- protoOf(PythonEmitter).s1v = sanitizeKeywords;
2052
- protoOf(PythonEmitter).j1x = emitType;
2053
- protoOf(PythonEmitter).k1x = emitReferenceCustomImports;
2051
+ protoOf(PythonEmitter).d1w = sanitize;
2052
+ protoOf(PythonEmitter).t1v = sanitizeKeywords;
2053
+ protoOf(PythonEmitter).k1x = emitType;
2054
+ protoOf(PythonEmitter).l1x = emitReferenceCustomImports;
2054
2055
  protoOf(PythonIrEmitter).on = emit_1;
2055
2056
  //endregion
2056
2057
  //region block: init