@sddsjs/design-system-builder-cli 0.0.0-stage → 0.2.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.
- package/LICENSE +4 -0
- package/README.md +969 -2
- package/bin/dsbuilder.js +2 -0
- package/dist/kotlin/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +3170 -0
- package/dist/kotlin/Stately-stately-concurrency.js +32 -0
- package/dist/kotlin/Stately-stately-concurrent-collections.js +302 -0
- package/dist/kotlin/Stately-stately-strict.js +12 -0
- package/dist/kotlin/clikt-clikt-mordant.js +304 -0
- package/dist/kotlin/clikt-clikt.js +6960 -0
- package/dist/kotlin/colormath-root-colormath.js +1653 -0
- package/dist/kotlin/design-system-builder-frontend-analytics-metrica.js +1026 -0
- package/dist/kotlin/design-system-builder-frontend-cli.js +10690 -0
- package/dist/kotlin/design-system-builder-frontend-core-analytics.js +128 -0
- package/dist/kotlin/design-system-builder-frontend-core-application.js +3634 -0
- package/dist/kotlin/design-system-builder-frontend-core-auth.js +1772 -0
- package/dist/kotlin/design-system-builder-frontend-core-domain.js +501 -0
- package/dist/kotlin/design-system-builder-frontend-core-network.js +3318 -0
- package/dist/kotlin/design-system-builder-frontend-core-platform.js +972 -0
- package/dist/kotlin/design-system-builder-frontend-core-process.js +236 -0
- package/dist/kotlin/design-system-builder-frontend-core-workspace.js +1058 -0
- package/dist/kotlin/design-system-builder-frontend-feature-auth.js +1664 -0
- package/dist/kotlin/design-system-builder-frontend-feature-components.js +24819 -0
- package/dist/kotlin/design-system-builder-frontend-feature-docs.js +7625 -0
- package/dist/kotlin/design-system-builder-frontend-feature-ds.js +2219 -0
- package/dist/kotlin/design-system-builder-frontend-feature-init.js +318 -0
- package/dist/kotlin/design-system-builder-frontend-feature-projects.js +624 -0
- package/dist/kotlin/design-system-builder-frontend-feature-status.js +984 -0
- package/dist/kotlin/design-system-builder-frontend-feature-theme.js +10456 -0
- package/dist/kotlin/design-system-builder-frontend-feature-toolchain.js +586 -0
- package/dist/kotlin/design-system-builder-frontend-mcp-server-core.js +6878 -0
- package/dist/kotlin/design-system-builder-frontend-platform-android.js +451 -0
- package/dist/kotlin/design-system-builder-frontend-platform-ios.js +1858 -0
- package/dist/kotlin/design-system-builder-frontend-platform-web.js +1555 -0
- package/dist/kotlin/design-system-builder-frontend-runtime-node.js +1763 -0
- package/dist/kotlin/kotlin-kotlin-stdlib.js +17881 -0
- package/dist/kotlin/kotlin-logging.js +440 -0
- package/dist/kotlin/kotlin-sdk-kotlin-sdk-core.js +20228 -0
- package/dist/kotlin/kotlin-sdk-kotlin-sdk-server.js +2771 -0
- package/dist/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +8 -0
- package/dist/kotlin/kotlinx-atomicfu.js +252 -0
- package/dist/kotlin/kotlinx-coroutines-core.js +10822 -0
- package/dist/kotlin/kotlinx-io-kotlinx-io-bytestring.js +203 -0
- package/dist/kotlin/kotlinx-io-kotlinx-io-core.js +2032 -0
- package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +6171 -0
- package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +5690 -0
- package/dist/kotlin/ktor-ktor-client-core.js +8382 -0
- package/dist/kotlin/ktor-ktor-events.js +80 -0
- package/dist/kotlin/ktor-ktor-http-cio.js +2252 -0
- package/dist/kotlin/ktor-ktor-http.js +3320 -0
- package/dist/kotlin/ktor-ktor-io.js +3328 -0
- package/dist/kotlin/ktor-ktor-serialization.js +8 -0
- package/dist/kotlin/ktor-ktor-server-core.js +12 -0
- package/dist/kotlin/ktor-ktor-server-sse.js +8 -0
- package/dist/kotlin/ktor-ktor-server-websockets.js +8 -0
- package/dist/kotlin/ktor-ktor-sse.js +8 -0
- package/dist/kotlin/ktor-ktor-utils.js +2524 -0
- package/dist/kotlin/ktor-ktor-websocket-serialization.js +8 -0
- package/dist/kotlin/ktor-ktor-websockets.js +433 -0
- package/dist/kotlin/mordant-mordant-omnibus.js +8 -0
- package/dist/kotlin/mordant-mordant.js +12111 -0
- package/dist/kotlin/okio-parent-okio.js +2335 -0
- package/dist/kotlin/projects-core-koin-core.js +1285 -0
- package/package.json +26 -5
|
@@ -0,0 +1,1026 @@
|
|
|
1
|
+
(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_client_core, kotlin_design_system_builder_frontend_core_analytics, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json) {
|
|
2
|
+
'use strict';
|
|
3
|
+
//region block: imports
|
|
4
|
+
var Unit_instance = kotlin_kotlin.$_$.r5;
|
|
5
|
+
var CoroutineImpl = kotlin_kotlin.$_$.tb;
|
|
6
|
+
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.l;
|
|
7
|
+
var ParametersBuilder = kotlin_io_ktor_ktor_http.$_$.e1;
|
|
8
|
+
var VOID = kotlin_kotlin.$_$.c;
|
|
9
|
+
var submitForm = kotlin_io_ktor_ktor_client_core.$_$.a;
|
|
10
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.db;
|
|
11
|
+
var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
12
|
+
var isSuccess = kotlin_io_ktor_ktor_http.$_$.v1;
|
|
13
|
+
var THROW_CCE = kotlin_kotlin.$_$.wk;
|
|
14
|
+
var isCharSequence = kotlin_kotlin.$_$.be;
|
|
15
|
+
var trim = kotlin_kotlin.$_$.uj;
|
|
16
|
+
var toString = kotlin_kotlin.$_$.we;
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.te;
|
|
18
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.sd;
|
|
19
|
+
var initMetadataForClass = kotlin_kotlin.$_$.qd;
|
|
20
|
+
var toLongOrNull = kotlin_kotlin.$_$.cj;
|
|
21
|
+
var Long = kotlin_kotlin.$_$.qk;
|
|
22
|
+
var compare = kotlin_kotlin.$_$.fc;
|
|
23
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v1;
|
|
24
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.vd;
|
|
25
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.oe;
|
|
26
|
+
var subtract = kotlin_kotlin.$_$.uc;
|
|
27
|
+
var ClosedRange = kotlin_kotlin.$_$.af;
|
|
28
|
+
var isInterface = kotlin_kotlin.$_$.fe;
|
|
29
|
+
var contains = kotlin_kotlin.$_$.jf;
|
|
30
|
+
var Text = kotlin_design_system_builder_frontend_core_analytics.$_$.c;
|
|
31
|
+
var Triple = kotlin_kotlin.$_$.xk;
|
|
32
|
+
var KtMap = kotlin_kotlin.$_$.h6;
|
|
33
|
+
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j1;
|
|
34
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.vl;
|
|
35
|
+
var ClosedSendChannelException = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
|
|
36
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e1;
|
|
37
|
+
var coerceAtLeast = kotlin_kotlin.$_$.cf;
|
|
38
|
+
var withTimeoutOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
|
|
39
|
+
var AnalyticsFlushResult_TIMED_OUT_getInstance = kotlin_design_system_builder_frontend_core_analytics.$_$.e;
|
|
40
|
+
var AnalyticsFlushResult_COMPLETED_getInstance = kotlin_design_system_builder_frontend_core_analytics.$_$.d;
|
|
41
|
+
var to = kotlin_kotlin.$_$.cm;
|
|
42
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.w2;
|
|
43
|
+
var charArrayOf = kotlin_kotlin.$_$.bd;
|
|
44
|
+
var trimEnd = kotlin_kotlin.$_$.oj;
|
|
45
|
+
var mapCapacity = kotlin_kotlin.$_$.g9;
|
|
46
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.u;
|
|
47
|
+
var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.o;
|
|
48
|
+
var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.n;
|
|
49
|
+
var mapOf = kotlin_kotlin.$_$.i9;
|
|
50
|
+
var SupervisorJob = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m1;
|
|
51
|
+
var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l;
|
|
52
|
+
var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i1;
|
|
53
|
+
var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
|
|
54
|
+
var CoroutineStart_LAZY_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b;
|
|
55
|
+
var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o1;
|
|
56
|
+
var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v1;
|
|
57
|
+
var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p1;
|
|
58
|
+
var Exception = kotlin_kotlin.$_$.mk;
|
|
59
|
+
var CancellationException = kotlin_kotlin.$_$.cb;
|
|
60
|
+
var toSet = kotlin_kotlin.$_$.sa;
|
|
61
|
+
var isBlank = kotlin_kotlin.$_$.gh;
|
|
62
|
+
var Url = kotlin_io_ktor_ktor_http.$_$.h1;
|
|
63
|
+
var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.m;
|
|
64
|
+
var charSequenceLength = kotlin_kotlin.$_$.fd;
|
|
65
|
+
var contains_0 = kotlin_kotlin.$_$.sg;
|
|
66
|
+
var Collection = kotlin_kotlin.$_$.a6;
|
|
67
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.e1;
|
|
68
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.y6;
|
|
69
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
70
|
+
var replace = kotlin_kotlin.$_$.bi;
|
|
71
|
+
var getValue = kotlin_kotlin.$_$.l8;
|
|
72
|
+
var sorted = kotlin_kotlin.$_$.da;
|
|
73
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m;
|
|
74
|
+
var listOf = kotlin_kotlin.$_$.f9;
|
|
75
|
+
var addAll = kotlin_kotlin.$_$.o6;
|
|
76
|
+
var toMap = kotlin_kotlin.$_$.pa;
|
|
77
|
+
var take = kotlin_kotlin.$_$.si;
|
|
78
|
+
//endregion
|
|
79
|
+
//region block: pre-declaration
|
|
80
|
+
initMetadataForCoroutine($sendCOROUTINE$, CoroutineImpl);
|
|
81
|
+
initMetadataForClass(KtorMetricaTransport, 'KtorMetricaTransport', VOID, VOID, VOID, [1]);
|
|
82
|
+
initMetadataForLambda(MetricaAnalytics$clientId$slambda$slambda, CoroutineImpl, VOID, [0]);
|
|
83
|
+
initMetadataForLambda(MetricaAnalytics$slambda$slambda, CoroutineImpl, VOID, [0]);
|
|
84
|
+
initMetadataForLambda(MetricaAnalytics$clientId$slambda, CoroutineImpl, VOID, [1]);
|
|
85
|
+
initMetadataForLambda(MetricaAnalytics$slambda, CoroutineImpl, VOID, [1]);
|
|
86
|
+
initMetadataForLambda(MetricaAnalytics$flush$slambda, CoroutineImpl, VOID, [1]);
|
|
87
|
+
initMetadataForLambda(MetricaAnalytics$deliver$slambda, CoroutineImpl, VOID, [1]);
|
|
88
|
+
initMetadataForCoroutine($flushCOROUTINE$, CoroutineImpl);
|
|
89
|
+
initMetadataForCoroutine($deliverCOROUTINE$, CoroutineImpl);
|
|
90
|
+
initMetadataForClass(MetricaAnalytics, 'MetricaAnalytics', VOID, VOID, VOID, [1]);
|
|
91
|
+
initMetadataForClass(Event, 'Event');
|
|
92
|
+
initMetadataForClass(Barrier, 'Barrier');
|
|
93
|
+
initMetadataForCoroutine($metricaAttemptCOROUTINE$, CoroutineImpl);
|
|
94
|
+
initMetadataForClass(MetricaConfig, 'MetricaConfig');
|
|
95
|
+
initMetadataForClass(MetricaRequest, 'MetricaRequest');
|
|
96
|
+
//endregion
|
|
97
|
+
function KtorMetricaTransport$client$lambda($this$config) {
|
|
98
|
+
$this$config.c3t_1 = false;
|
|
99
|
+
return Unit_instance;
|
|
100
|
+
}
|
|
101
|
+
function $sendCOROUTINE$(_this__u8e3s4, request, resultContinuation) {
|
|
102
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
103
|
+
this.w4s_1 = _this__u8e3s4;
|
|
104
|
+
this.x4s_1 = request;
|
|
105
|
+
}
|
|
106
|
+
protoOf($sendCOROUTINE$).e9 = function () {
|
|
107
|
+
var suspendResult = this.y8_1;
|
|
108
|
+
$sm: do
|
|
109
|
+
try {
|
|
110
|
+
var tmp = this.w8_1;
|
|
111
|
+
switch (tmp) {
|
|
112
|
+
case 0:
|
|
113
|
+
this.x8_1 = 4;
|
|
114
|
+
this.w8_1 = 1;
|
|
115
|
+
Companion_getInstance();
|
|
116
|
+
var this_0 = ParametersBuilder();
|
|
117
|
+
var _iterator__ex2g4s = this.x4s_1.z4s_1.w().l();
|
|
118
|
+
while (_iterator__ex2g4s.m()) {
|
|
119
|
+
var element = _iterator__ex2g4s.n();
|
|
120
|
+
var key = element.x();
|
|
121
|
+
var value = element.y();
|
|
122
|
+
this_0.o2n(key, value);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
suspendResult = submitForm(this.w4s_1.b4t_1, 'https://mc.yandex.ru/collect', this_0.h2u(), VOID, VOID, this);
|
|
126
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
127
|
+
return suspendResult;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
continue $sm;
|
|
131
|
+
case 1:
|
|
132
|
+
var response = suspendResult;
|
|
133
|
+
if (isSuccess(response.k3u())) {
|
|
134
|
+
this.w8_1 = 2;
|
|
135
|
+
suspendResult = bodyAsText(response, VOID, this);
|
|
136
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
137
|
+
return suspendResult;
|
|
138
|
+
}
|
|
139
|
+
continue $sm;
|
|
140
|
+
} else {
|
|
141
|
+
this.y4s_1 = false;
|
|
142
|
+
this.w8_1 = 3;
|
|
143
|
+
continue $sm;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
case 2:
|
|
147
|
+
var this_1 = suspendResult;
|
|
148
|
+
this.y4s_1 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE())) === '<!-- OK -->';
|
|
149
|
+
this.w8_1 = 3;
|
|
150
|
+
continue $sm;
|
|
151
|
+
case 3:
|
|
152
|
+
return this.y4s_1;
|
|
153
|
+
case 4:
|
|
154
|
+
throw this.z8_1;
|
|
155
|
+
}
|
|
156
|
+
} catch ($p) {
|
|
157
|
+
var e = $p;
|
|
158
|
+
if (this.x8_1 === 4) {
|
|
159
|
+
throw e;
|
|
160
|
+
} else {
|
|
161
|
+
this.w8_1 = this.x8_1;
|
|
162
|
+
this.z8_1 = e;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
while (true);
|
|
166
|
+
};
|
|
167
|
+
function KtorMetricaTransport(httpClient) {
|
|
168
|
+
this.a4t_1 = httpClient;
|
|
169
|
+
var tmp = this;
|
|
170
|
+
tmp.b4t_1 = this.a4t_1.p3t(KtorMetricaTransport$client$lambda);
|
|
171
|
+
}
|
|
172
|
+
protoOf(KtorMetricaTransport).c4t = function (request, $completion) {
|
|
173
|
+
var tmp = new $sendCOROUTINE$(this, request, $completion);
|
|
174
|
+
tmp.y8_1 = Unit_instance;
|
|
175
|
+
tmp.z8_1 = null;
|
|
176
|
+
return tmp.e9();
|
|
177
|
+
};
|
|
178
|
+
protoOf(KtorMetricaTransport).p3 = function () {
|
|
179
|
+
this.b4t_1.p3();
|
|
180
|
+
this.a4t_1.p3();
|
|
181
|
+
};
|
|
182
|
+
function createMetricaAnalytics(config, context, identities, transport, nowEpochSeconds) {
|
|
183
|
+
return new MetricaAnalytics(config, context, identities, transport, nowEpochSeconds);
|
|
184
|
+
}
|
|
185
|
+
function MetricaAnalytics$clientId$slambda$slambda(this$0, resultContinuation) {
|
|
186
|
+
this.l4t_1 = this$0;
|
|
187
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
188
|
+
}
|
|
189
|
+
protoOf(MetricaAnalytics$clientId$slambda$slambda).m4t = function ($completion) {
|
|
190
|
+
var tmp = this.n4t($completion);
|
|
191
|
+
tmp.y8_1 = Unit_instance;
|
|
192
|
+
tmp.z8_1 = null;
|
|
193
|
+
return tmp.e9();
|
|
194
|
+
};
|
|
195
|
+
protoOf(MetricaAnalytics$clientId$slambda$slambda).na = function ($completion) {
|
|
196
|
+
return this.m4t($completion);
|
|
197
|
+
};
|
|
198
|
+
protoOf(MetricaAnalytics$clientId$slambda$slambda).e9 = function () {
|
|
199
|
+
var suspendResult = this.y8_1;
|
|
200
|
+
$sm: do
|
|
201
|
+
try {
|
|
202
|
+
var tmp = this.w8_1;
|
|
203
|
+
switch (tmp) {
|
|
204
|
+
case 0:
|
|
205
|
+
this.x8_1 = 2;
|
|
206
|
+
this.w8_1 = 1;
|
|
207
|
+
suspendResult = this.l4t_1.q4t_1.x4t(this);
|
|
208
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
209
|
+
return suspendResult;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
continue $sm;
|
|
213
|
+
case 1:
|
|
214
|
+
var this_0 = suspendResult;
|
|
215
|
+
var tmp0_safe_receiver = toLongOrNull(this_0);
|
|
216
|
+
var tmp_0;
|
|
217
|
+
if (tmp0_safe_receiver == null) {
|
|
218
|
+
tmp_0 = null;
|
|
219
|
+
} else {
|
|
220
|
+
tmp_0 = compare(tmp0_safe_receiver, new Long(0, 0)) > 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (!(tmp_0 === true)) {
|
|
224
|
+
var message = 'Failed requirement.';
|
|
225
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return this_0;
|
|
229
|
+
case 2:
|
|
230
|
+
throw this.z8_1;
|
|
231
|
+
}
|
|
232
|
+
} catch ($p) {
|
|
233
|
+
var e = $p;
|
|
234
|
+
if (this.x8_1 === 2) {
|
|
235
|
+
throw e;
|
|
236
|
+
} else {
|
|
237
|
+
this.w8_1 = this.x8_1;
|
|
238
|
+
this.z8_1 = e;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
while (true);
|
|
242
|
+
};
|
|
243
|
+
protoOf(MetricaAnalytics$clientId$slambda$slambda).n4t = function (completion) {
|
|
244
|
+
return new MetricaAnalytics$clientId$slambda$slambda(this.l4t_1, completion);
|
|
245
|
+
};
|
|
246
|
+
function MetricaAnalytics$clientId$slambda$slambda_0(this$0, resultContinuation) {
|
|
247
|
+
var i = new MetricaAnalytics$clientId$slambda$slambda(this$0, resultContinuation);
|
|
248
|
+
var l = function ($completion) {
|
|
249
|
+
return i.m4t($completion);
|
|
250
|
+
};
|
|
251
|
+
l.$arity = 0;
|
|
252
|
+
return l;
|
|
253
|
+
}
|
|
254
|
+
function MetricaAnalytics$slambda$slambda(this$0, $item, resultContinuation) {
|
|
255
|
+
this.g4u_1 = this$0;
|
|
256
|
+
this.h4u_1 = $item;
|
|
257
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
258
|
+
}
|
|
259
|
+
protoOf(MetricaAnalytics$slambda$slambda).w1x = function ($completion) {
|
|
260
|
+
var tmp = this.n4t($completion);
|
|
261
|
+
tmp.y8_1 = Unit_instance;
|
|
262
|
+
tmp.z8_1 = null;
|
|
263
|
+
return tmp.e9();
|
|
264
|
+
};
|
|
265
|
+
protoOf(MetricaAnalytics$slambda$slambda).na = function ($completion) {
|
|
266
|
+
return this.w1x($completion);
|
|
267
|
+
};
|
|
268
|
+
protoOf(MetricaAnalytics$slambda$slambda).e9 = function () {
|
|
269
|
+
var suspendResult = this.y8_1;
|
|
270
|
+
$sm: do
|
|
271
|
+
try {
|
|
272
|
+
var tmp = this.w8_1;
|
|
273
|
+
switch (tmp) {
|
|
274
|
+
case 0:
|
|
275
|
+
this.x8_1 = 2;
|
|
276
|
+
this.w8_1 = 1;
|
|
277
|
+
suspendResult = deliver(this.g4u_1, this.h4u_1.i4u_1, this);
|
|
278
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
279
|
+
return suspendResult;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
continue $sm;
|
|
283
|
+
case 1:
|
|
284
|
+
return Unit_instance;
|
|
285
|
+
case 2:
|
|
286
|
+
throw this.z8_1;
|
|
287
|
+
}
|
|
288
|
+
} catch ($p) {
|
|
289
|
+
var e = $p;
|
|
290
|
+
if (this.x8_1 === 2) {
|
|
291
|
+
throw e;
|
|
292
|
+
} else {
|
|
293
|
+
this.w8_1 = this.x8_1;
|
|
294
|
+
this.z8_1 = e;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
while (true);
|
|
298
|
+
};
|
|
299
|
+
protoOf(MetricaAnalytics$slambda$slambda).n4t = function (completion) {
|
|
300
|
+
return new MetricaAnalytics$slambda$slambda(this.g4u_1, this.h4u_1, completion);
|
|
301
|
+
};
|
|
302
|
+
function MetricaAnalytics$slambda$slambda_0(this$0, $item, resultContinuation) {
|
|
303
|
+
var i = new MetricaAnalytics$slambda$slambda(this$0, $item, resultContinuation);
|
|
304
|
+
var l = function ($completion) {
|
|
305
|
+
return i.w1x($completion);
|
|
306
|
+
};
|
|
307
|
+
l.$arity = 0;
|
|
308
|
+
return l;
|
|
309
|
+
}
|
|
310
|
+
function deliver($this, event, $completion) {
|
|
311
|
+
var tmp = new $deliverCOROUTINE$($this, event, $completion);
|
|
312
|
+
tmp.y8_1 = Unit_instance;
|
|
313
|
+
tmp.z8_1 = null;
|
|
314
|
+
return tmp.e9();
|
|
315
|
+
}
|
|
316
|
+
function page($this, event) {
|
|
317
|
+
var tmp0 = numberRangeToNumber(0, 43200);
|
|
318
|
+
// Inline function 'kotlin.ranges.contains' call
|
|
319
|
+
var value = subtract($this.s4t_1(), event.d35_1);
|
|
320
|
+
if (!contains(isInterface(tmp0, ClosedRange) ? tmp0 : THROW_CCE(), value))
|
|
321
|
+
return null;
|
|
322
|
+
var tmp = event.e35_1.c2('operation');
|
|
323
|
+
var tmp0_safe_receiver = tmp instanceof Text ? tmp : null;
|
|
324
|
+
var operation = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f35_1;
|
|
325
|
+
var tmp_0 = event.e35_1.c2('outcome');
|
|
326
|
+
var tmp1_safe_receiver = tmp_0 instanceof Text ? tmp_0 : null;
|
|
327
|
+
var outcome = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f35_1;
|
|
328
|
+
var tmp0_0 = $this.w4t_1;
|
|
329
|
+
// Inline function 'kotlin.collections.get' call
|
|
330
|
+
var key = new Triple(event.c35_1, operation, outcome);
|
|
331
|
+
return (isInterface(tmp0_0, KtMap) ? tmp0_0 : THROW_CCE()).c2(key);
|
|
332
|
+
}
|
|
333
|
+
function MetricaAnalytics$clientId$slambda(this$0, resultContinuation) {
|
|
334
|
+
this.c4v_1 = this$0;
|
|
335
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
336
|
+
}
|
|
337
|
+
protoOf(MetricaAnalytics$clientId$slambda).e4v = function ($this$async, $completion) {
|
|
338
|
+
var tmp = this.p1y($this$async, $completion);
|
|
339
|
+
tmp.y8_1 = Unit_instance;
|
|
340
|
+
tmp.z8_1 = null;
|
|
341
|
+
return tmp.e9();
|
|
342
|
+
};
|
|
343
|
+
protoOf(MetricaAnalytics$clientId$slambda).q9 = function (p1, $completion) {
|
|
344
|
+
return this.e4v((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
345
|
+
};
|
|
346
|
+
protoOf(MetricaAnalytics$clientId$slambda).e9 = function () {
|
|
347
|
+
var suspendResult = this.y8_1;
|
|
348
|
+
$sm: do
|
|
349
|
+
try {
|
|
350
|
+
var tmp = this.w8_1;
|
|
351
|
+
switch (tmp) {
|
|
352
|
+
case 0:
|
|
353
|
+
this.x8_1 = 2;
|
|
354
|
+
this.w8_1 = 1;
|
|
355
|
+
suspendResult = metricaAttempt(MetricaAnalytics$clientId$slambda$slambda_0(this.c4v_1, null), this);
|
|
356
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
357
|
+
return suspendResult;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
continue $sm;
|
|
361
|
+
case 1:
|
|
362
|
+
return suspendResult;
|
|
363
|
+
case 2:
|
|
364
|
+
throw this.z8_1;
|
|
365
|
+
}
|
|
366
|
+
} catch ($p) {
|
|
367
|
+
var e = $p;
|
|
368
|
+
if (this.x8_1 === 2) {
|
|
369
|
+
throw e;
|
|
370
|
+
} else {
|
|
371
|
+
this.w8_1 = this.x8_1;
|
|
372
|
+
this.z8_1 = e;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
while (true);
|
|
376
|
+
};
|
|
377
|
+
protoOf(MetricaAnalytics$clientId$slambda).p1y = function ($this$async, completion) {
|
|
378
|
+
var i = new MetricaAnalytics$clientId$slambda(this.c4v_1, completion);
|
|
379
|
+
i.d4v_1 = $this$async;
|
|
380
|
+
return i;
|
|
381
|
+
};
|
|
382
|
+
function MetricaAnalytics$clientId$slambda_0(this$0, resultContinuation) {
|
|
383
|
+
var i = new MetricaAnalytics$clientId$slambda(this$0, resultContinuation);
|
|
384
|
+
var l = function ($this$async, $completion) {
|
|
385
|
+
return i.e4v($this$async, $completion);
|
|
386
|
+
};
|
|
387
|
+
l.$arity = 1;
|
|
388
|
+
return l;
|
|
389
|
+
}
|
|
390
|
+
function MetricaAnalytics$slambda(this$0, resultContinuation) {
|
|
391
|
+
this.n4v_1 = this$0;
|
|
392
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
393
|
+
}
|
|
394
|
+
protoOf(MetricaAnalytics$slambda).o1y = function ($this$launch, $completion) {
|
|
395
|
+
var tmp = this.p1y($this$launch, $completion);
|
|
396
|
+
tmp.y8_1 = Unit_instance;
|
|
397
|
+
tmp.z8_1 = null;
|
|
398
|
+
return tmp.e9();
|
|
399
|
+
};
|
|
400
|
+
protoOf(MetricaAnalytics$slambda).q9 = function (p1, $completion) {
|
|
401
|
+
return this.o1y((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
402
|
+
};
|
|
403
|
+
protoOf(MetricaAnalytics$slambda).e9 = function () {
|
|
404
|
+
var suspendResult = this.y8_1;
|
|
405
|
+
$sm: do
|
|
406
|
+
try {
|
|
407
|
+
var tmp = this.w8_1;
|
|
408
|
+
switch (tmp) {
|
|
409
|
+
case 0:
|
|
410
|
+
this.x8_1 = 6;
|
|
411
|
+
this.q4v_1 = this.n4v_1.u4t_1.l();
|
|
412
|
+
this.w8_1 = 1;
|
|
413
|
+
continue $sm;
|
|
414
|
+
case 1:
|
|
415
|
+
this.w8_1 = 2;
|
|
416
|
+
suspendResult = this.q4v_1.p1b(this);
|
|
417
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
418
|
+
return suspendResult;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
continue $sm;
|
|
422
|
+
case 2:
|
|
423
|
+
if (!suspendResult) {
|
|
424
|
+
this.w8_1 = 5;
|
|
425
|
+
continue $sm;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
var item = this.q4v_1.n();
|
|
429
|
+
if (item instanceof Barrier) {
|
|
430
|
+
this.p4v_1 = item.r4v_1.y12(Unit_instance);
|
|
431
|
+
this.w8_1 = 4;
|
|
432
|
+
continue $sm;
|
|
433
|
+
} else {
|
|
434
|
+
if (item instanceof Event) {
|
|
435
|
+
this.w8_1 = 3;
|
|
436
|
+
suspendResult = metricaAttempt(MetricaAnalytics$slambda$slambda_0(this.n4v_1, item, null), this);
|
|
437
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
438
|
+
return suspendResult;
|
|
439
|
+
}
|
|
440
|
+
continue $sm;
|
|
441
|
+
} else {
|
|
442
|
+
var tmp_0 = this;
|
|
443
|
+
noWhenBranchMatchedException();
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
break;
|
|
448
|
+
case 3:
|
|
449
|
+
this.p4v_1 = suspendResult;
|
|
450
|
+
this.w8_1 = 4;
|
|
451
|
+
continue $sm;
|
|
452
|
+
case 4:
|
|
453
|
+
this.w8_1 = 1;
|
|
454
|
+
continue $sm;
|
|
455
|
+
case 5:
|
|
456
|
+
return Unit_instance;
|
|
457
|
+
case 6:
|
|
458
|
+
throw this.z8_1;
|
|
459
|
+
}
|
|
460
|
+
} catch ($p) {
|
|
461
|
+
var e = $p;
|
|
462
|
+
if (this.x8_1 === 6) {
|
|
463
|
+
throw e;
|
|
464
|
+
} else {
|
|
465
|
+
this.w8_1 = this.x8_1;
|
|
466
|
+
this.z8_1 = e;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
while (true);
|
|
470
|
+
};
|
|
471
|
+
protoOf(MetricaAnalytics$slambda).p1y = function ($this$launch, completion) {
|
|
472
|
+
var i = new MetricaAnalytics$slambda(this.n4v_1, completion);
|
|
473
|
+
i.o4v_1 = $this$launch;
|
|
474
|
+
return i;
|
|
475
|
+
};
|
|
476
|
+
function MetricaAnalytics$slambda_0(this$0, resultContinuation) {
|
|
477
|
+
var i = new MetricaAnalytics$slambda(this$0, resultContinuation);
|
|
478
|
+
var l = function ($this$launch, $completion) {
|
|
479
|
+
return i.o1y($this$launch, $completion);
|
|
480
|
+
};
|
|
481
|
+
l.$arity = 1;
|
|
482
|
+
return l;
|
|
483
|
+
}
|
|
484
|
+
function MetricaAnalytics$flush$slambda(this$0, $done, resultContinuation) {
|
|
485
|
+
this.a4w_1 = this$0;
|
|
486
|
+
this.b4w_1 = $done;
|
|
487
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
488
|
+
}
|
|
489
|
+
protoOf(MetricaAnalytics$flush$slambda).d4w = function ($this$withTimeoutOrNull, $completion) {
|
|
490
|
+
var tmp = this.p1y($this$withTimeoutOrNull, $completion);
|
|
491
|
+
tmp.y8_1 = Unit_instance;
|
|
492
|
+
tmp.z8_1 = null;
|
|
493
|
+
return tmp.e9();
|
|
494
|
+
};
|
|
495
|
+
protoOf(MetricaAnalytics$flush$slambda).q9 = function (p1, $completion) {
|
|
496
|
+
return this.d4w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
497
|
+
};
|
|
498
|
+
protoOf(MetricaAnalytics$flush$slambda).e9 = function () {
|
|
499
|
+
var suspendResult = this.y8_1;
|
|
500
|
+
$sm: do
|
|
501
|
+
try {
|
|
502
|
+
var tmp = this.w8_1;
|
|
503
|
+
switch (tmp) {
|
|
504
|
+
case 0:
|
|
505
|
+
this.x8_1 = 4;
|
|
506
|
+
this.x8_1 = 3;
|
|
507
|
+
this.w8_1 = 1;
|
|
508
|
+
suspendResult = this.a4w_1.u4t_1.t1c(new Barrier(this.b4w_1), this);
|
|
509
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
510
|
+
return suspendResult;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
continue $sm;
|
|
514
|
+
case 1:
|
|
515
|
+
this.w8_1 = 2;
|
|
516
|
+
suspendResult = this.b4w_1.kz(this);
|
|
517
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
518
|
+
return suspendResult;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
continue $sm;
|
|
522
|
+
case 2:
|
|
523
|
+
this.x8_1 = 4;
|
|
524
|
+
this.w8_1 = 5;
|
|
525
|
+
continue $sm;
|
|
526
|
+
case 3:
|
|
527
|
+
this.x8_1 = 4;
|
|
528
|
+
var tmp_0 = this.z8_1;
|
|
529
|
+
if (tmp_0 instanceof ClosedSendChannelException) {
|
|
530
|
+
var _unused_var__etf5q3 = this.z8_1;
|
|
531
|
+
this.w8_1 = 5;
|
|
532
|
+
continue $sm;
|
|
533
|
+
} else {
|
|
534
|
+
throw this.z8_1;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
case 4:
|
|
538
|
+
throw this.z8_1;
|
|
539
|
+
case 5:
|
|
540
|
+
this.x8_1 = 4;
|
|
541
|
+
return true;
|
|
542
|
+
}
|
|
543
|
+
} catch ($p) {
|
|
544
|
+
var e = $p;
|
|
545
|
+
if (this.x8_1 === 4) {
|
|
546
|
+
throw e;
|
|
547
|
+
} else {
|
|
548
|
+
this.w8_1 = this.x8_1;
|
|
549
|
+
this.z8_1 = e;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
while (true);
|
|
553
|
+
};
|
|
554
|
+
protoOf(MetricaAnalytics$flush$slambda).p1y = function ($this$withTimeoutOrNull, completion) {
|
|
555
|
+
var i = new MetricaAnalytics$flush$slambda(this.a4w_1, this.b4w_1, completion);
|
|
556
|
+
i.c4w_1 = $this$withTimeoutOrNull;
|
|
557
|
+
return i;
|
|
558
|
+
};
|
|
559
|
+
function MetricaAnalytics$flush$slambda_0(this$0, $done, resultContinuation) {
|
|
560
|
+
var i = new MetricaAnalytics$flush$slambda(this$0, $done, resultContinuation);
|
|
561
|
+
var l = function ($this$withTimeoutOrNull, $completion) {
|
|
562
|
+
return i.d4w($this$withTimeoutOrNull, $completion);
|
|
563
|
+
};
|
|
564
|
+
l.$arity = 1;
|
|
565
|
+
return l;
|
|
566
|
+
}
|
|
567
|
+
function MetricaAnalytics$deliver$slambda(this$0, $fields, resultContinuation) {
|
|
568
|
+
this.m4w_1 = this$0;
|
|
569
|
+
this.n4w_1 = $fields;
|
|
570
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
571
|
+
}
|
|
572
|
+
protoOf(MetricaAnalytics$deliver$slambda).d4w = function ($this$withTimeoutOrNull, $completion) {
|
|
573
|
+
var tmp = this.p1y($this$withTimeoutOrNull, $completion);
|
|
574
|
+
tmp.y8_1 = Unit_instance;
|
|
575
|
+
tmp.z8_1 = null;
|
|
576
|
+
return tmp.e9();
|
|
577
|
+
};
|
|
578
|
+
protoOf(MetricaAnalytics$deliver$slambda).q9 = function (p1, $completion) {
|
|
579
|
+
return this.d4w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
580
|
+
};
|
|
581
|
+
protoOf(MetricaAnalytics$deliver$slambda).e9 = function () {
|
|
582
|
+
var suspendResult = this.y8_1;
|
|
583
|
+
$sm: do
|
|
584
|
+
try {
|
|
585
|
+
var tmp = this.w8_1;
|
|
586
|
+
switch (tmp) {
|
|
587
|
+
case 0:
|
|
588
|
+
this.x8_1 = 2;
|
|
589
|
+
this.w8_1 = 1;
|
|
590
|
+
suspendResult = this.m4w_1.r4t_1.c4t(new MetricaRequest(this.n4w_1), this);
|
|
591
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
592
|
+
return suspendResult;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
continue $sm;
|
|
596
|
+
case 1:
|
|
597
|
+
return suspendResult;
|
|
598
|
+
case 2:
|
|
599
|
+
throw this.z8_1;
|
|
600
|
+
}
|
|
601
|
+
} catch ($p) {
|
|
602
|
+
var e = $p;
|
|
603
|
+
if (this.x8_1 === 2) {
|
|
604
|
+
throw e;
|
|
605
|
+
} else {
|
|
606
|
+
this.w8_1 = this.x8_1;
|
|
607
|
+
this.z8_1 = e;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
while (true);
|
|
611
|
+
};
|
|
612
|
+
protoOf(MetricaAnalytics$deliver$slambda).p1y = function ($this$withTimeoutOrNull, completion) {
|
|
613
|
+
var i = new MetricaAnalytics$deliver$slambda(this.m4w_1, this.n4w_1, completion);
|
|
614
|
+
i.o4w_1 = $this$withTimeoutOrNull;
|
|
615
|
+
return i;
|
|
616
|
+
};
|
|
617
|
+
function MetricaAnalytics$deliver$slambda_0(this$0, $fields, resultContinuation) {
|
|
618
|
+
var i = new MetricaAnalytics$deliver$slambda(this$0, $fields, resultContinuation);
|
|
619
|
+
var l = function ($this$withTimeoutOrNull, $completion) {
|
|
620
|
+
return i.d4w($this$withTimeoutOrNull, $completion);
|
|
621
|
+
};
|
|
622
|
+
l.$arity = 1;
|
|
623
|
+
return l;
|
|
624
|
+
}
|
|
625
|
+
function $flushCOROUTINE$(_this__u8e3s4, timeoutMillis, resultContinuation) {
|
|
626
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
627
|
+
this.x4w_1 = _this__u8e3s4;
|
|
628
|
+
this.y4w_1 = timeoutMillis;
|
|
629
|
+
}
|
|
630
|
+
protoOf($flushCOROUTINE$).e9 = function () {
|
|
631
|
+
var suspendResult = this.y8_1;
|
|
632
|
+
$sm: do
|
|
633
|
+
try {
|
|
634
|
+
var tmp = this.w8_1;
|
|
635
|
+
switch (tmp) {
|
|
636
|
+
case 0:
|
|
637
|
+
this.x8_1 = 2;
|
|
638
|
+
var done = CompletableDeferred();
|
|
639
|
+
this.w8_1 = 1;
|
|
640
|
+
var tmp_0 = coerceAtLeast(this.y4w_1, new Long(1, 0));
|
|
641
|
+
suspendResult = withTimeoutOrNull(tmp_0, MetricaAnalytics$flush$slambda_0(this.x4w_1, done, null), this);
|
|
642
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
643
|
+
return suspendResult;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
continue $sm;
|
|
647
|
+
case 1:
|
|
648
|
+
var tmp0_elvis_lhs = suspendResult;
|
|
649
|
+
var completed = tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;
|
|
650
|
+
return completed ? AnalyticsFlushResult_COMPLETED_getInstance() : AnalyticsFlushResult_TIMED_OUT_getInstance();
|
|
651
|
+
case 2:
|
|
652
|
+
throw this.z8_1;
|
|
653
|
+
}
|
|
654
|
+
} catch ($p) {
|
|
655
|
+
var e = $p;
|
|
656
|
+
if (this.x8_1 === 2) {
|
|
657
|
+
throw e;
|
|
658
|
+
} else {
|
|
659
|
+
this.w8_1 = this.x8_1;
|
|
660
|
+
this.z8_1 = e;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
while (true);
|
|
664
|
+
};
|
|
665
|
+
function $deliverCOROUTINE$(_this__u8e3s4, event, resultContinuation) {
|
|
666
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
667
|
+
this.r4u_1 = _this__u8e3s4;
|
|
668
|
+
this.s4u_1 = event;
|
|
669
|
+
}
|
|
670
|
+
protoOf($deliverCOROUTINE$).e9 = function () {
|
|
671
|
+
var suspendResult = this.y8_1;
|
|
672
|
+
$sm: do
|
|
673
|
+
try {
|
|
674
|
+
var tmp = this.w8_1;
|
|
675
|
+
switch (tmp) {
|
|
676
|
+
case 0:
|
|
677
|
+
this.x8_1 = 3;
|
|
678
|
+
var tmp_0 = this;
|
|
679
|
+
var tmp0_elvis_lhs = page(this.r4u_1, this.s4u_1);
|
|
680
|
+
var tmp_1;
|
|
681
|
+
if (tmp0_elvis_lhs == null) {
|
|
682
|
+
return Unit_instance;
|
|
683
|
+
} else {
|
|
684
|
+
tmp_1 = tmp0_elvis_lhs;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
tmp_0.t4u_1 = tmp_1;
|
|
688
|
+
this.w8_1 = 1;
|
|
689
|
+
suspendResult = this.r4u_1.v4t_1.kz(this);
|
|
690
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
691
|
+
return suspendResult;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
continue $sm;
|
|
695
|
+
case 1:
|
|
696
|
+
var tmp1_elvis_lhs = suspendResult;
|
|
697
|
+
var tmp_2;
|
|
698
|
+
if (tmp1_elvis_lhs == null) {
|
|
699
|
+
return Unit_instance;
|
|
700
|
+
} else {
|
|
701
|
+
tmp_2 = tmp1_elvis_lhs;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
var cid = tmp_2;
|
|
705
|
+
var tmp_3 = to('tid', this.r4u_1.o4t_1.z4w_1);
|
|
706
|
+
var tmp_4 = to('ms', this.r4u_1.o4t_1.a4x_1);
|
|
707
|
+
var tmp_5 = to('cid', cid);
|
|
708
|
+
var tmp_6 = to('et', this.s4u_1.d35_1.toString());
|
|
709
|
+
var tmp_7 = to('t', 'pageview');
|
|
710
|
+
var tmp_8 = to('dl', trimEnd(this.r4u_1.o4t_1.b4x_1, charArrayOf([_Char___init__impl__6a9atx(47)])) + this.t4u_1);
|
|
711
|
+
var tmp_9 = to('dt', 'DS Builder ' + this.r4u_1.p4t_1.i35_1);
|
|
712
|
+
var this_0 = visitProperties(this.r4u_1.p4t_1);
|
|
713
|
+
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.o()));
|
|
714
|
+
var _iterator__ex2g4s = this_0.w().l();
|
|
715
|
+
while (_iterator__ex2g4s.m()) {
|
|
716
|
+
var element = _iterator__ex2g4s.n();
|
|
717
|
+
var tmp_10 = element.x();
|
|
718
|
+
destination.f2(tmp_10, JsonPrimitive(element.y()));
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
var fields = mapOf([tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8, tmp_9, to('params', (new JsonObject(destination)).toString())]);
|
|
722
|
+
this.w8_1 = 2;
|
|
723
|
+
var tmp_11 = new Long(1000, 0);
|
|
724
|
+
suspendResult = withTimeoutOrNull(tmp_11, MetricaAnalytics$deliver$slambda_0(this.r4u_1, fields, null), this);
|
|
725
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
726
|
+
return suspendResult;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
continue $sm;
|
|
730
|
+
case 2:
|
|
731
|
+
return Unit_instance;
|
|
732
|
+
case 3:
|
|
733
|
+
throw this.z8_1;
|
|
734
|
+
}
|
|
735
|
+
} catch ($p) {
|
|
736
|
+
var e = $p;
|
|
737
|
+
if (this.x8_1 === 3) {
|
|
738
|
+
throw e;
|
|
739
|
+
} else {
|
|
740
|
+
this.w8_1 = this.x8_1;
|
|
741
|
+
this.z8_1 = e;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
while (true);
|
|
745
|
+
};
|
|
746
|
+
function MetricaAnalytics(config, context, identities, transport, now) {
|
|
747
|
+
this.o4t_1 = config;
|
|
748
|
+
this.p4t_1 = context;
|
|
749
|
+
this.q4t_1 = identities;
|
|
750
|
+
this.r4t_1 = transport;
|
|
751
|
+
this.s4t_1 = now;
|
|
752
|
+
this.t4t_1 = CoroutineScope_0(SupervisorJob().gj(Dispatchers_getInstance().s13_1));
|
|
753
|
+
this.u4t_1 = Channel(128);
|
|
754
|
+
var tmp = this;
|
|
755
|
+
var tmp_0 = CoroutineStart_LAZY_getInstance();
|
|
756
|
+
tmp.v4t_1 = async(this.t4t_1, VOID, tmp_0, MetricaAnalytics$clientId$slambda_0(this, null));
|
|
757
|
+
this.w4t_1 = metricaPageCatalog(this.p4t_1.i35_1, this.o4t_1.c4x_1);
|
|
758
|
+
launch(this.t4t_1, VOID, VOID, MetricaAnalytics$slambda_0(this, null));
|
|
759
|
+
}
|
|
760
|
+
protoOf(MetricaAnalytics).g35 = function (event) {
|
|
761
|
+
this.u4t_1.u1c(new Event(event));
|
|
762
|
+
};
|
|
763
|
+
protoOf(MetricaAnalytics).h35 = function (timeoutMillis, $completion) {
|
|
764
|
+
var tmp = new $flushCOROUTINE$(this, timeoutMillis, $completion);
|
|
765
|
+
tmp.y8_1 = Unit_instance;
|
|
766
|
+
tmp.z8_1 = null;
|
|
767
|
+
return tmp.e9();
|
|
768
|
+
};
|
|
769
|
+
protoOf(MetricaAnalytics).p3 = function () {
|
|
770
|
+
if (this.u4t_1.a1d()) {
|
|
771
|
+
cancel(this.t4t_1);
|
|
772
|
+
this.r4t_1.p3();
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
function Event(event) {
|
|
776
|
+
this.i4u_1 = event;
|
|
777
|
+
}
|
|
778
|
+
function Barrier(done) {
|
|
779
|
+
this.r4v_1 = done;
|
|
780
|
+
}
|
|
781
|
+
function metricaAttempt(block, $completion) {
|
|
782
|
+
var tmp = new $metricaAttemptCOROUTINE$(block, $completion);
|
|
783
|
+
tmp.y8_1 = Unit_instance;
|
|
784
|
+
tmp.z8_1 = null;
|
|
785
|
+
return tmp.e9();
|
|
786
|
+
}
|
|
787
|
+
function $metricaAttemptCOROUTINE$(block, resultContinuation) {
|
|
788
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
789
|
+
this.l4x_1 = block;
|
|
790
|
+
}
|
|
791
|
+
protoOf($metricaAttemptCOROUTINE$).e9 = function () {
|
|
792
|
+
var suspendResult = this.y8_1;
|
|
793
|
+
$sm: do
|
|
794
|
+
try {
|
|
795
|
+
var tmp = this.w8_1;
|
|
796
|
+
switch (tmp) {
|
|
797
|
+
case 0:
|
|
798
|
+
this.x8_1 = 3;
|
|
799
|
+
this.x8_1 = 2;
|
|
800
|
+
this.w8_1 = 1;
|
|
801
|
+
suspendResult = this.l4x_1(this);
|
|
802
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
803
|
+
return suspendResult;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
continue $sm;
|
|
807
|
+
case 1:
|
|
808
|
+
this.m4x_1 = suspendResult;
|
|
809
|
+
this.x8_1 = 3;
|
|
810
|
+
this.w8_1 = 4;
|
|
811
|
+
continue $sm;
|
|
812
|
+
case 2:
|
|
813
|
+
this.x8_1 = 3;
|
|
814
|
+
var tmp_0 = this.z8_1;
|
|
815
|
+
if (tmp_0 instanceof CancellationException) {
|
|
816
|
+
var cancelled = this.z8_1;
|
|
817
|
+
var tmp_1 = this;
|
|
818
|
+
throw cancelled;
|
|
819
|
+
} else {
|
|
820
|
+
var tmp_2 = this.z8_1;
|
|
821
|
+
if (tmp_2 instanceof Exception) {
|
|
822
|
+
var _unused_var__etf5q3 = this.z8_1;
|
|
823
|
+
var tmp_3 = this;
|
|
824
|
+
tmp_3.m4x_1 = null;
|
|
825
|
+
this.w8_1 = 4;
|
|
826
|
+
continue $sm;
|
|
827
|
+
} else {
|
|
828
|
+
throw this.z8_1;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
case 3:
|
|
833
|
+
throw this.z8_1;
|
|
834
|
+
case 4:
|
|
835
|
+
this.x8_1 = 3;
|
|
836
|
+
return this.m4x_1;
|
|
837
|
+
}
|
|
838
|
+
} catch ($p) {
|
|
839
|
+
var e = $p;
|
|
840
|
+
if (this.x8_1 === 3) {
|
|
841
|
+
throw e;
|
|
842
|
+
} else {
|
|
843
|
+
this.w8_1 = this.x8_1;
|
|
844
|
+
this.z8_1 = e;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
while (true);
|
|
848
|
+
};
|
|
849
|
+
function get_metricaEventNames() {
|
|
850
|
+
_init_properties_MetricaContracts_kt__p1vyo();
|
|
851
|
+
return metricaEventNames;
|
|
852
|
+
}
|
|
853
|
+
var metricaEventNames;
|
|
854
|
+
function MetricaConfig(counterId, token, baseUrl, operations) {
|
|
855
|
+
this.z4w_1 = counterId;
|
|
856
|
+
this.a4x_1 = token;
|
|
857
|
+
this.b4x_1 = baseUrl;
|
|
858
|
+
this.c4x_1 = toSet(operations);
|
|
859
|
+
var tmp0_safe_receiver = toLongOrNull(this.z4w_1);
|
|
860
|
+
var tmp;
|
|
861
|
+
if (tmp0_safe_receiver == null) {
|
|
862
|
+
tmp = null;
|
|
863
|
+
} else {
|
|
864
|
+
// Inline function 'kotlin.let' call
|
|
865
|
+
tmp = compare(tmp0_safe_receiver, new Long(0, 0)) > 0;
|
|
866
|
+
}
|
|
867
|
+
// Inline function 'kotlin.require' call
|
|
868
|
+
if (!(tmp === true)) {
|
|
869
|
+
var message = 'Invalid analytics counter';
|
|
870
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
871
|
+
}
|
|
872
|
+
// Inline function 'kotlin.text.isNotBlank' call
|
|
873
|
+
var this_0 = this.a4x_1;
|
|
874
|
+
// Inline function 'kotlin.require' call
|
|
875
|
+
if (!!isBlank(this_0)) {
|
|
876
|
+
var message_0 = 'Missing analytics token';
|
|
877
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
878
|
+
}
|
|
879
|
+
var url = Url(this.b4x_1);
|
|
880
|
+
var tmp_0;
|
|
881
|
+
var tmp_1;
|
|
882
|
+
var tmp_2;
|
|
883
|
+
var tmp_3;
|
|
884
|
+
var tmp_4;
|
|
885
|
+
if (url.m32_1.equals(Companion_getInstance_0().y32_1)) {
|
|
886
|
+
// Inline function 'kotlin.text.isNotBlank' call
|
|
887
|
+
var this_1 = url.a32_1;
|
|
888
|
+
tmp_4 = !isBlank(this_1);
|
|
889
|
+
} else {
|
|
890
|
+
tmp_4 = false;
|
|
891
|
+
}
|
|
892
|
+
if (tmp_4) {
|
|
893
|
+
// Inline function 'kotlin.text.isNullOrEmpty' call
|
|
894
|
+
var this_2 = url.e32_1;
|
|
895
|
+
tmp_3 = this_2 == null || charSequenceLength(this_2) === 0;
|
|
896
|
+
} else {
|
|
897
|
+
tmp_3 = false;
|
|
898
|
+
}
|
|
899
|
+
if (tmp_3) {
|
|
900
|
+
// Inline function 'kotlin.text.isNullOrEmpty' call
|
|
901
|
+
var this_3 = url.f32_1;
|
|
902
|
+
tmp_2 = this_3 == null || charSequenceLength(this_3) === 0;
|
|
903
|
+
} else {
|
|
904
|
+
tmp_2 = false;
|
|
905
|
+
}
|
|
906
|
+
if (tmp_2) {
|
|
907
|
+
tmp_1 = !contains_0(this.b4x_1, _Char___init__impl__6a9atx(63));
|
|
908
|
+
} else {
|
|
909
|
+
tmp_1 = false;
|
|
910
|
+
}
|
|
911
|
+
if (tmp_1) {
|
|
912
|
+
tmp_0 = !contains_0(this.b4x_1, _Char___init__impl__6a9atx(35));
|
|
913
|
+
} else {
|
|
914
|
+
tmp_0 = false;
|
|
915
|
+
}
|
|
916
|
+
// Inline function 'kotlin.require' call
|
|
917
|
+
// Inline function 'kotlin.require' call
|
|
918
|
+
if (!tmp_0) {
|
|
919
|
+
var message_1 = 'Failed requirement.';
|
|
920
|
+
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
921
|
+
}
|
|
922
|
+
var tmp_5;
|
|
923
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
924
|
+
if (!operations.r()) {
|
|
925
|
+
var tmp$ret$14;
|
|
926
|
+
$l$block_0: {
|
|
927
|
+
// Inline function 'kotlin.collections.all' call
|
|
928
|
+
var tmp_6;
|
|
929
|
+
if (isInterface(operations, Collection)) {
|
|
930
|
+
tmp_6 = operations.r();
|
|
931
|
+
} else {
|
|
932
|
+
tmp_6 = false;
|
|
933
|
+
}
|
|
934
|
+
if (tmp_6) {
|
|
935
|
+
tmp$ret$14 = true;
|
|
936
|
+
break $l$block_0;
|
|
937
|
+
}
|
|
938
|
+
var _iterator__ex2g4s = operations.l();
|
|
939
|
+
while (_iterator__ex2g4s.m()) {
|
|
940
|
+
var element = _iterator__ex2g4s.n();
|
|
941
|
+
// Inline function 'kotlin.text.matches' call
|
|
942
|
+
if (!Regex_init_$Create$('[a-z][a-z0-9_ -]{0,79}').ld(element)) {
|
|
943
|
+
tmp$ret$14 = false;
|
|
944
|
+
break $l$block_0;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
tmp$ret$14 = true;
|
|
948
|
+
}
|
|
949
|
+
tmp_5 = tmp$ret$14;
|
|
950
|
+
} else {
|
|
951
|
+
tmp_5 = false;
|
|
952
|
+
}
|
|
953
|
+
// Inline function 'kotlin.require' call
|
|
954
|
+
// Inline function 'kotlin.require' call
|
|
955
|
+
if (!tmp_5) {
|
|
956
|
+
var message_2 = 'Failed requirement.';
|
|
957
|
+
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
958
|
+
}
|
|
959
|
+
// Inline function 'kotlin.collections.map' call
|
|
960
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
961
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(operations, 10));
|
|
962
|
+
var _iterator__ex2g4s_0 = operations.l();
|
|
963
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
964
|
+
var item = _iterator__ex2g4s_0.n();
|
|
965
|
+
var tmp$ret$20 = normalizeOperation(item);
|
|
966
|
+
destination.j(tmp$ret$20);
|
|
967
|
+
}
|
|
968
|
+
// Inline function 'kotlin.require' call
|
|
969
|
+
if (!(toSet(destination).o() === operations.o())) {
|
|
970
|
+
var message_3 = 'Analytics operation collision';
|
|
971
|
+
throw IllegalArgumentException_init_$Create$(toString(message_3));
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
function MetricaRequest(fields) {
|
|
975
|
+
this.z4s_1 = fields;
|
|
976
|
+
}
|
|
977
|
+
function normalizeOperation(operation) {
|
|
978
|
+
_init_properties_MetricaContracts_kt__p1vyo();
|
|
979
|
+
return replace(replace(operation, _Char___init__impl__6a9atx(32), _Char___init__impl__6a9atx(95)), _Char___init__impl__6a9atx(45), _Char___init__impl__6a9atx(95));
|
|
980
|
+
}
|
|
981
|
+
function metricaPageCatalog(channel, operations) {
|
|
982
|
+
_init_properties_MetricaContracts_kt__p1vyo();
|
|
983
|
+
var eventName = getValue(get_metricaEventNames(), channel);
|
|
984
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
985
|
+
var tmp0 = sorted(operations);
|
|
986
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
987
|
+
var destination = ArrayList_init_$Create$_0();
|
|
988
|
+
var _iterator__ex2g4s = tmp0.l();
|
|
989
|
+
while (_iterator__ex2g4s.m()) {
|
|
990
|
+
var element = _iterator__ex2g4s.n();
|
|
991
|
+
// Inline function 'kotlin.collections.map' call
|
|
992
|
+
var this_0 = listOf(['success', 'failure', 'cancelled']);
|
|
993
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
994
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
995
|
+
var _iterator__ex2g4s_0 = this_0.l();
|
|
996
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
997
|
+
var item = _iterator__ex2g4s_0.n();
|
|
998
|
+
var tmp$ret$0 = to(new Triple(eventName, element, item), '/analytics/' + channel + '/' + normalizeOperation(element) + '/' + item);
|
|
999
|
+
destination_0.j(tmp$ret$0);
|
|
1000
|
+
}
|
|
1001
|
+
var list = destination_0;
|
|
1002
|
+
addAll(destination, list);
|
|
1003
|
+
}
|
|
1004
|
+
return toMap(destination);
|
|
1005
|
+
}
|
|
1006
|
+
function visitProperties(_this__u8e3s4) {
|
|
1007
|
+
_init_properties_MetricaContracts_kt__p1vyo();
|
|
1008
|
+
return mapOf([to('client_type', _this__u8e3s4.i35_1), to('client_version', take(_this__u8e3s4.j35_1, 64)), to('os_family', take(_this__u8e3s4.k35_1, 32)), to('schema_version', '2')]);
|
|
1009
|
+
}
|
|
1010
|
+
var properties_initialized_MetricaContracts_kt_xvl4qa;
|
|
1011
|
+
function _init_properties_MetricaContracts_kt__p1vyo() {
|
|
1012
|
+
if (!properties_initialized_MetricaContracts_kt_xvl4qa) {
|
|
1013
|
+
properties_initialized_MetricaContracts_kt_xvl4qa = true;
|
|
1014
|
+
metricaEventNames = mapOf([to('cli', 'cli_operation_finished'), to('mcp', 'mcp_tool_finished')]);
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
//region block: exports
|
|
1018
|
+
_.$_$ = _.$_$ || {};
|
|
1019
|
+
_.$_$.a = KtorMetricaTransport;
|
|
1020
|
+
_.$_$.b = MetricaConfig;
|
|
1021
|
+
_.$_$.c = createMetricaAnalytics;
|
|
1022
|
+
//endregion
|
|
1023
|
+
return _;
|
|
1024
|
+
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-client-core.js'), require('./design-system-builder-frontend-core-analytics.js'), require('./kotlinx-coroutines-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js')));
|
|
1025
|
+
|
|
1026
|
+
//# sourceMappingURL=design-system-builder-frontend-analytics-metrica.js.map
|