ouisys-engine 4.3.0-alpha.0 → 4.5.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/@types/window.d.js +1 -1
  2. package/dist/api/index.d.ts +43 -0
  3. package/dist/api/index.js +1 -728
  4. package/dist/common-types/AppThunk.d.ts +13 -0
  5. package/dist/common-types/AppThunk.js +1 -1
  6. package/dist/common-types/Either.d.ts +8 -0
  7. package/dist/common-types/Either.js +1 -1
  8. package/dist/common-types/IError.d.ts +3 -0
  9. package/dist/common-types/IError.js +1 -1
  10. package/dist/common-types/IOptInFlowName.d.ts +1 -0
  11. package/dist/common-types/ITracker.d.ts +9 -0
  12. package/dist/common-types/ITracker.js +1 -3
  13. package/dist/common-types/IVisitor.d.ts +14 -0
  14. package/dist/common-types/IVisitor.js +1 -1
  15. package/dist/common-types/RemoteDataState.d.ts +38 -0
  16. package/dist/common-types/RemoteDataState.js +1 -135
  17. package/dist/custom-hooks/useOneClickRedirectUrl.d.ts +3 -0
  18. package/dist/custom-hooks/useOneClickRedirectUrl.js +1 -0
  19. package/dist/custom-hooks/usePinEntryState.d.ts +8 -0
  20. package/dist/custom-hooks/usePinEntryState.js +1 -0
  21. package/dist/custom-hooks/useStrategyConfig.d.ts +4 -0
  22. package/dist/custom-hooks/useStrategyConfig.js +1 -0
  23. package/dist/flows/click2smsFlow.d.ts +6 -0
  24. package/dist/flows/click2smsFlow.js +1 -19
  25. package/dist/flows/creditCardFlow.d.ts +6 -0
  26. package/dist/flows/creditCardFlow.js +1 -0
  27. package/dist/flows/moFlow.d.ts +6 -0
  28. package/dist/flows/moFlow.js +1 -19
  29. package/dist/flows/moRedirFlow.d.ts +6 -0
  30. package/dist/flows/moRedirFlow.js +1 -19
  31. package/dist/flows/oneClickFlow.d.ts +7 -0
  32. package/dist/flows/oneClickFlow.js +1 -23
  33. package/dist/flows/pinFlow.d.ts +7 -0
  34. package/dist/flows/pinFlow.js +1 -23
  35. package/dist/flows/strategy.d.ts +14 -0
  36. package/dist/flows/strategy.js +1 -53
  37. package/dist/flows/ussdFlow.d.ts +6 -0
  38. package/dist/flows/ussdFlow.js +1 -19
  39. package/dist/index.d.ts +0 -0
  40. package/dist/index.js +0 -2
  41. package/dist/ips/tryGetIPRangeName.d.ts +2 -0
  42. package/dist/ips/tryGetIPRangeName.js +1 -74
  43. package/dist/jest.config.js +194 -0
  44. package/dist/pacman/index.d.ts +6 -0
  45. package/dist/pacman/index.js +1 -108
  46. package/dist/pacman/queryString.d.ts +3 -0
  47. package/dist/pacman/queryString.js +1 -45
  48. package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +76 -0
  49. package/dist/reducers/click2smsFlow/Click2smsTypes.js +1 -1
  50. package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +2 -0
  51. package/dist/reducers/click2smsFlow/IClick2smsConstants.js +1 -1
  52. package/dist/reducers/click2smsFlow/index.d.ts +5 -0
  53. package/dist/reducers/click2smsFlow/index.js +1 -183
  54. package/dist/reducers/click2smsFlow/utils.d.ts +4 -0
  55. package/dist/reducers/click2smsFlow/utils.js +1 -357
  56. package/dist/reducers/creditCardFlow/CreditCardTypes.d.ts +79 -0
  57. package/dist/reducers/creditCardFlow/CreditCardTypes.js +1 -0
  58. package/dist/reducers/creditCardFlow/ICreditCardConstants.d.ts +2 -0
  59. package/dist/reducers/creditCardFlow/ICreditCardConstants.js +1 -0
  60. package/dist/reducers/creditCardFlow/index.d.ts +5 -0
  61. package/dist/reducers/creditCardFlow/index.js +1 -0
  62. package/dist/reducers/creditCardFlow/utils.d.ts +8 -0
  63. package/dist/reducers/creditCardFlow/utils.js +1 -0
  64. package/dist/reducers/moFlow/IMoConstants.d.ts +2 -0
  65. package/dist/reducers/moFlow/IMoConstants.js +1 -1
  66. package/dist/reducers/moFlow/MoTypes.d.ts +88 -0
  67. package/dist/reducers/moFlow/MoTypes.js +1 -1
  68. package/dist/reducers/moFlow/index.d.ts +16 -0
  69. package/dist/reducers/moFlow/index.js +1 -251
  70. package/dist/reducers/moFlow/utils.d.ts +12 -0
  71. package/dist/reducers/moFlow/utils.js +1 -284
  72. package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +2 -0
  73. package/dist/reducers/moRedirFlow/IMoRedirConstants.js +1 -1
  74. package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +64 -0
  75. package/dist/reducers/moRedirFlow/MoRedirTypes.js +1 -1
  76. package/dist/reducers/moRedirFlow/index.d.ts +14 -0
  77. package/dist/reducers/moRedirFlow/index.js +1 -226
  78. package/dist/reducers/moRedirFlow/utils.d.ts +10 -0
  79. package/dist/reducers/moRedirFlow/utils.js +1 -186
  80. package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +2 -0
  81. package/dist/reducers/oneClickFlow/IOneClickConstants.js +1 -1
  82. package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +85 -0
  83. package/dist/reducers/oneClickFlow/OneClickTypes.js +1 -1
  84. package/dist/reducers/oneClickFlow/index.d.ts +13 -0
  85. package/dist/reducers/oneClickFlow/index.js +1 -409
  86. package/dist/reducers/oneClickFlow/utils.d.ts +16 -0
  87. package/dist/reducers/oneClickFlow/utils.js +1 -366
  88. package/dist/reducers/pinFlow/IPinConstants.d.ts +2 -0
  89. package/dist/reducers/pinFlow/IPinConstants.js +1 -1
  90. package/dist/reducers/pinFlow/PinTypes.d.ts +156 -0
  91. package/dist/reducers/pinFlow/PinTypes.js +1 -1
  92. package/dist/reducers/pinFlow/index.d.ts +19 -0
  93. package/dist/reducers/pinFlow/index.js +1 -514
  94. package/dist/reducers/pinFlow/utils.d.ts +11 -0
  95. package/dist/reducers/pinFlow/utils.js +1 -494
  96. package/dist/reducers/strategy/IStategyActionContants.d.ts +2 -0
  97. package/dist/reducers/strategy/IStategyActionContants.js +1 -1
  98. package/dist/reducers/strategy/StrategyTypes.d.ts +248 -0
  99. package/dist/reducers/strategy/StrategyTypes.js +1 -1
  100. package/dist/reducers/strategy/index.d.ts +13 -0
  101. package/dist/reducers/strategy/index.js +1 -389
  102. package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +15 -0
  103. package/dist/reducers/strategy/strategies/ask_mobile_number.js +1 -403
  104. package/dist/reducers/strategy/strategies/ask_operator.d.ts +5 -0
  105. package/dist/reducers/strategy/strategies/ask_operator.js +1 -305
  106. package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +10 -0
  107. package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +1 -459
  108. package/dist/reducers/strategy/strategies/header_enrichment.d.ts +7 -0
  109. package/dist/reducers/strategy/strategies/header_enrichment.js +1 -783
  110. package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.d.ts +2 -0
  111. package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.js +1 -0
  112. package/dist/reducers/strategy/utils.d.ts +30 -0
  113. package/dist/reducers/strategy/utils.js +1 -702
  114. package/dist/reducers/ussdFlow/IUssdConstants.d.ts +2 -0
  115. package/dist/reducers/ussdFlow/IUssdConstants.js +1 -1
  116. package/dist/reducers/ussdFlow/UssdTypes.d.ts +77 -0
  117. package/dist/reducers/ussdFlow/UssdTypes.js +1 -1
  118. package/dist/reducers/ussdFlow/index.d.ts +14 -0
  119. package/dist/reducers/ussdFlow/index.js +1 -251
  120. package/dist/reducers/ussdFlow/utils.d.ts +11 -0
  121. package/dist/reducers/ussdFlow/utils.js +1 -225
  122. package/dist/store/index.d.ts +14 -0
  123. package/dist/store/index.js +1 -177
  124. package/dist/store/reducers.d.ts +20 -0
  125. package/dist/store/reducers.js +1 -41
  126. package/dist/utilities/addEmpelloToken.d.ts +4 -0
  127. package/dist/utilities/addEmpelloToken.js +1 -0
  128. package/dist/utilities/handleSubmitNumber.d.ts +21 -0
  129. package/dist/utilities/handleSubmitNumber.js +1 -59
  130. package/dist/utilities/index.d.ts +14 -0
  131. package/dist/utilities/index.js +1 -0
  132. package/dist/utilities/loadScriptInnerHtml.d.ts +2 -0
  133. package/dist/utilities/loadScriptInnerHtml.js +1 -0
  134. package/dist/utilities/loadScriptSrc.d.ts +8 -0
  135. package/dist/utilities/loadScriptSrc.js +1 -0
  136. package/dist/utilities/replaceUrlParam.d.ts +1 -0
  137. package/dist/utilities/replaceUrlParam.js +1 -0
  138. package/dist/utilities/storeMsisdn.d.ts +3 -0
  139. package/dist/utilities/storeMsisdn.js +1 -0
  140. package/package.json +1 -1
  141. package/dist/app/store.js +0 -20
  142. package/dist/features/strategies/categories/askMobileNumber.js +0 -388
  143. package/dist/features/strategies/categories/askOperator.js +0 -313
  144. package/dist/features/strategies/categories/detectOperatorByIp.js +0 -599
  145. package/dist/features/strategies/categories/headerEnrichment.js +0 -665
  146. package/dist/features/strategies/categories/singleFlows/pin.js +0 -1
  147. package/dist/features/strategies/identifySlice.js +0 -355
  148. package/dist/features/strategies/pinFlowSlice.js +0 -338
  149. package/dist/flows/tpayHeFlow.js +0 -23
  150. package/dist/mockServer/browser.js +0 -48
  151. package/dist/mockServer/handlers.js +0 -22
  152. package/dist/mockServer/server.js +0 -48
  153. package/dist/reducers/tpayHeFlow/ITpayHeConstants.js +0 -1
  154. package/dist/reducers/tpayHeFlow/TpayHeTypes.js +0 -1
  155. package/dist/reducers/tpayHeFlow/index.js +0 -331
  156. package/dist/reducers/tpayHeFlow/utils.js +0 -510
  157. package/dist/test/setup.js +0 -24
  158. package/dist/test/test-utils.js +0 -51
package/dist/api/index.js CHANGED
@@ -1,728 +1 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.concat");
4
-
5
- require("core-js/modules/es.object.to-string");
6
-
7
- require("core-js/modules/es.promise");
8
-
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- exports.RealTallyman = exports.MockTallyman = void 0;
13
-
14
- require("regenerator-runtime/runtime");
15
-
16
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
17
-
18
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
19
-
20
- var bupperizeCountry = function bupperizeCountry(c) {
21
- return c == 'gb' ? 'uk' : c;
22
- };
23
-
24
- function sleep(milliseconds) {
25
- var date = Date.now();
26
- var currentDate = null;
27
-
28
- do {
29
- currentDate = Date.now();
30
- } while (currentDate - date < milliseconds);
31
- }
32
-
33
- var MockTallyman = {
34
- identify: function () {
35
- var _identify = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(host, slug, country, msisdn, device, offer, rockmanId) {
36
- return regeneratorRuntime.wrap(function _callee$(_context) {
37
- while (1) {
38
- switch (_context.prev = _context.next) {
39
- case 0:
40
- console.log("MockTallyman");
41
- sleep(2000);
42
- return _context.abrupt("return", {
43
- operator: "",
44
- flow: "",
45
- success: true,
46
- rockman_id: ""
47
- });
48
-
49
- case 3:
50
- case "end":
51
- return _context.stop();
52
- }
53
- }
54
- }, _callee);
55
- }));
56
-
57
- function identify(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
58
- return _identify.apply(this, arguments);
59
- }
60
-
61
- return identify;
62
- }(),
63
- triggerPin: function () {
64
- var _triggerPin = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(host, country, slug, device, offer, msisdn, rockmanId, extraParamsQs, search, uniqid) {
65
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
66
- while (1) {
67
- switch (_context2.prev = _context2.next) {
68
- case 0:
69
- console.log("MockTallyman");
70
- sleep(2000);
71
- return _context2.abrupt("return", {
72
- success: true,
73
- operator: "",
74
- rockman_id: "",
75
- pin: "",
76
- product_url: ""
77
- });
78
-
79
- case 3:
80
- case "end":
81
- return _context2.stop();
82
- }
83
- }
84
- }, _callee2);
85
- }));
86
-
87
- function triggerPin(_x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
88
- return _triggerPin.apply(this, arguments);
89
- }
90
-
91
- return triggerPin;
92
- }(),
93
- verifyPin: function () {
94
- var _verifyPin = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(host, country, slug, device, offer, rockmanId, pin, extraParamsQs, uniqid) {
95
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
96
- while (1) {
97
- switch (_context3.prev = _context3.next) {
98
- case 0:
99
- console.log("MockTallyman");
100
- sleep(2000);
101
- return _context3.abrupt("return", {
102
- success: true,
103
- rockman_id: "000",
104
- product_url: "https://www.yahoo.com/",
105
- async: false
106
- });
107
-
108
- case 3:
109
- case "end":
110
- return _context3.stop();
111
- }
112
- }
113
- }, _callee3);
114
- }));
115
-
116
- function verifyPin(_x18, _x19, _x20, _x21, _x22, _x23, _x24, _x25, _x26) {
117
- return _verifyPin.apply(this, arguments);
118
- }
119
-
120
- return verifyPin;
121
- }(),
122
- checkSubscription: function () {
123
- var _checkSubscription = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(host, country, slug, device, offer, rockmanId, pin, extraParamsQs) {
124
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
125
- while (1) {
126
- switch (_context4.prev = _context4.next) {
127
- case 0:
128
- console.log("MockTallyman");
129
- sleep(2000);
130
- return _context4.abrupt("return", {
131
- success: true,
132
- rockman_id: "000",
133
- product_url: "https://www.yahoo.com/",
134
- msisdn: "000"
135
- });
136
-
137
- case 3:
138
- case "end":
139
- return _context4.stop();
140
- }
141
- }
142
- }, _callee4);
143
- }));
144
-
145
- function checkSubscription(_x27, _x28, _x29, _x30, _x31, _x32, _x33, _x34) {
146
- return _checkSubscription.apply(this, arguments);
147
- }
148
-
149
- return checkSubscription;
150
- }(),
151
- checkSubscriptionByRockmanIdOnly: function () {
152
- var _checkSubscriptionByRockmanIdOnly = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(host, rockmanId) {
153
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
154
- while (1) {
155
- switch (_context5.prev = _context5.next) {
156
- case 0:
157
- console.log("MockTallyman");
158
- sleep(2000);
159
- return _context5.abrupt("return", {
160
- success: true,
161
- rockman_id: "000",
162
- product_url: "https://www.yahoo.com/",
163
- msisdn: "000"
164
- });
165
-
166
- case 3:
167
- case "end":
168
- return _context5.stop();
169
- }
170
- }
171
- }, _callee5);
172
- }));
173
-
174
- function checkSubscriptionByRockmanIdOnly(_x35, _x36) {
175
- return _checkSubscriptionByRockmanIdOnly.apply(this, arguments);
176
- }
177
-
178
- return checkSubscriptionByRockmanIdOnly;
179
- }(),
180
- redirect: function () {
181
- var _redirect = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(host, slug, country, msisdn, device, offer, rockmanId, ip_range_name, search, extraParamsQs) {
182
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
183
- while (1) {
184
- switch (_context6.prev = _context6.next) {
185
- case 0:
186
- console.log("MockTallyman");
187
- sleep(2000);
188
- return _context6.abrupt("return", {
189
- success: true,
190
- rockman_id: "000",
191
- redirect_url: "https://www.yahoo.com/"
192
- });
193
-
194
- case 3:
195
- case "end":
196
- return _context6.stop();
197
- }
198
- }
199
- }, _callee6);
200
- }));
201
-
202
- function redirect(_x37, _x38, _x39, _x40, _x41, _x42, _x43, _x44, _x45, _x46) {
203
- return _redirect.apply(this, arguments);
204
- }
205
-
206
- return redirect;
207
- }(),
208
- triggerMessage: function () {
209
- var _triggerMessage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
210
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
211
- while (1) {
212
- switch (_context7.prev = _context7.next) {
213
- case 0:
214
- console.log("MockTallyman");
215
- sleep(2000);
216
- return _context7.abrupt("return", {
217
- success: true,
218
- rockman_id: "0000",
219
- keyword: 'TEST OK',
220
- shortcode: '666'
221
- });
222
-
223
- case 3:
224
- case "end":
225
- return _context7.stop();
226
- }
227
- }
228
- }, _callee7);
229
- }));
230
-
231
- function triggerMessage(_x47, _x48, _x49, _x50, _x51, _x52, _x53, _x54, _x55) {
232
- return _triggerMessage.apply(this, arguments);
233
- }
234
-
235
- return triggerMessage;
236
- }(),
237
- ussd: function () {
238
- var _ussd = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
239
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
240
- while (1) {
241
- switch (_context8.prev = _context8.next) {
242
- case 0:
243
- console.log("MockTallyman");
244
- sleep(2000);
245
- return _context8.abrupt("return", {
246
- success: true,
247
- rockman_id: "0000",
248
- keyword: 'TEST OK',
249
- shortcode: '666'
250
- });
251
-
252
- case 3:
253
- case "end":
254
- return _context8.stop();
255
- }
256
- }
257
- }, _callee8);
258
- }));
259
-
260
- function ussd(_x56, _x57, _x58, _x59, _x60, _x61, _x62, _x63, _x64) {
261
- return _ussd.apply(this, arguments);
262
- }
263
-
264
- return ussd;
265
- }(),
266
- oc2sms: function () {
267
- var _oc2sms = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(host, country, slug, offer, rockmanId, keyword, operator, search) {
268
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
269
- while (1) {
270
- switch (_context9.prev = _context9.next) {
271
- case 0:
272
- console.log("MockTallyman");
273
- sleep(2000);
274
- return _context9.abrupt("return", {
275
- success: true,
276
- uid: "1",
277
- keyword: 'TEST OK',
278
- displayKeyword: "TEST OK",
279
- shortcode: '666'
280
- });
281
-
282
- case 3:
283
- case "end":
284
- return _context9.stop();
285
- }
286
- }
287
- }, _callee9);
288
- }));
289
-
290
- function oc2sms(_x65, _x66, _x67, _x68, _x69, _x70, _x71, _x72) {
291
- return _oc2sms.apply(this, arguments);
292
- }
293
-
294
- return oc2sms;
295
- }(),
296
- tpayConsentConfig: function () {
297
- var _tpayConsentConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(host, country, slug, device, offer, rockmanId, search) {
298
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
299
- while (1) {
300
- switch (_context10.prev = _context10.next) {
301
- case 0:
302
- console.log("MockTallyman");
303
- sleep(2000);
304
- return _context10.abrupt("return", {
305
- "prodSku": "gamelords",
306
- "lang": "ar",
307
- "country": "eg",
308
- "subscription_url": "http:\/\/n.vidflixz.com\/tallyman\/v1\/?action=one-click-subscribe&device=smart&slug=tpay-he-vidflixz&country=eg&offerId=1&rockman_id=13643b4780fb40bb8adf2feb2a400d7f&",
309
- "config": {
310
- "product_url": "http:\/\/eg.game-lords.com\/#\/?uid=fdf098fcc6",
311
- "subscription_plan_id": 829,
312
- "public": "HFyenUyCJCxl1QTgtVCA",
313
- "private": "vazlmVhGFyxKLOav6DvW",
314
- "flow": "consent",
315
- "catalog_name": {
316
- "60201": "gamelords_org",
317
- "60202": "gamelords_vdf",
318
- "60203": "gamelords_etst"
319
- }
320
- },
321
- "redirectUrl": "http:\/\/n.game-lords.com\/eg\/animal-game?country=eg&handle=animal-game&offer=1&device=smart&_extracted=957ad26679cd47a09d4efe28d4a4af72&operator=#operator#&msisdnSubmitted=Y&network_type=mobile_data&atmobirun=true&force_mcb_page=true&skipTrigger=true",
322
- "rid": "957ad26679cd47a09d4efe28d4a4af72",
323
- "success": true
324
- });
325
-
326
- case 3:
327
- case "end":
328
- return _context10.stop();
329
- }
330
- }
331
- }, _callee10);
332
- }));
333
-
334
- function tpayConsentConfig(_x73, _x74, _x75, _x76, _x77, _x78, _x79) {
335
- return _tpayConsentConfig.apply(this, arguments);
336
- }
337
-
338
- return tpayConsentConfig;
339
- }(),
340
- mcpShield: function () {
341
- var _mcpShield = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(host, country, slug, device, offer, rockmanId, operator) {
342
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
343
- while (1) {
344
- switch (_context11.prev = _context11.next) {
345
- case 0:
346
- console.log("MockTallyman");
347
- sleep(2000);
348
- return _context11.abrupt("return", {
349
- "source": "**********some very long text**********",
350
- "uniqid": "a26e7c3983a9cebd469601d695c7dbc4",
351
- "success": true,
352
- "rockman_id": "d66ac1a3ee6d40c289c23322ecd9aa79"
353
- });
354
-
355
- case 3:
356
- case "end":
357
- return _context11.stop();
358
- }
359
- }
360
- }, _callee11);
361
- }));
362
-
363
- function mcpShield(_x80, _x81, _x82, _x83, _x84, _x85, _x86) {
364
- return _mcpShield.apply(this, arguments);
365
- }
366
-
367
- return mcpShield;
368
- }()
369
- };
370
- exports.MockTallyman = MockTallyman;
371
- var RealTallyman = {
372
- identify: function () {
373
- var _identify2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(host, slug, country, msisdn, device, offer, rockmanId) {
374
- var isDMB, newHost;
375
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
376
- while (1) {
377
- switch (_context12.prev = _context12.next) {
378
- case 0:
379
- console.log("RealTallyman");
380
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
381
- newHost = isDMB ? "de.tallymans.com" : host;
382
- _context12.next = 5;
383
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=identify&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId)).then(function (x) {
384
- return x.json();
385
- });
386
-
387
- case 5:
388
- return _context12.abrupt("return", _context12.sent);
389
-
390
- case 6:
391
- case "end":
392
- return _context12.stop();
393
- }
394
- }
395
- }, _callee12);
396
- }));
397
-
398
- function identify(_x87, _x88, _x89, _x90, _x91, _x92, _x93) {
399
- return _identify2.apply(this, arguments);
400
- }
401
-
402
- return identify;
403
- }(),
404
- triggerPin: function () {
405
- var _triggerPin2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(host, country, slug, device, offer, msisdn, rockmanId, extraParamsQs, search, uniqid) {
406
- var isDMB, newHost;
407
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
408
- while (1) {
409
- switch (_context13.prev = _context13.next) {
410
- case 0:
411
- console.log("RealTallyman");
412
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
413
- newHost = isDMB ? "de.tallymans.com" : host;
414
- _context13.next = 5;
415
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=trigger-pin&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&msisdn=").concat(msisdn, "&rockman_id=").concat(rockmanId).concat(uniqid).concat(extraParamsQs, "&").concat(search)).then(function (x) {
416
- return x.json();
417
- });
418
-
419
- case 5:
420
- return _context13.abrupt("return", _context13.sent);
421
-
422
- case 6:
423
- case "end":
424
- return _context13.stop();
425
- }
426
- }
427
- }, _callee13);
428
- }));
429
-
430
- function triggerPin(_x94, _x95, _x96, _x97, _x98, _x99, _x100, _x101, _x102, _x103) {
431
- return _triggerPin2.apply(this, arguments);
432
- }
433
-
434
- return triggerPin;
435
- }(),
436
- verifyPin: function () {
437
- var _verifyPin2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(host, country, slug, device, offer, rockmanId, pin, extraParamsQs, uniqid) {
438
- var isDMB, newHost;
439
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
440
- while (1) {
441
- switch (_context14.prev = _context14.next) {
442
- case 0:
443
- console.log("RealTallyman");
444
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
445
- newHost = isDMB ? "de.tallymans.com" : host;
446
- _context14.next = 5;
447
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=verify-pin&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&pin=").concat(pin).concat(uniqid).concat(extraParamsQs)).then(function (x) {
448
- return x.json();
449
- });
450
-
451
- case 5:
452
- return _context14.abrupt("return", _context14.sent);
453
-
454
- case 6:
455
- case "end":
456
- return _context14.stop();
457
- }
458
- }
459
- }, _callee14);
460
- }));
461
-
462
- function verifyPin(_x104, _x105, _x106, _x107, _x108, _x109, _x110, _x111, _x112) {
463
- return _verifyPin2.apply(this, arguments);
464
- }
465
-
466
- return verifyPin;
467
- }(),
468
- checkSubscription: function () {
469
- var _checkSubscription2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(host, country, slug, device, offer, rockmanId, pin, extraParamsQs) {
470
- var isDMB, newHost;
471
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
472
- while (1) {
473
- switch (_context15.prev = _context15.next) {
474
- case 0:
475
- console.log("RealTallyman");
476
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
477
- newHost = isDMB ? "de.tallymans.com" : host;
478
- _context15.next = 5;
479
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=check-subscription&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId)).then(function (x) {
480
- return x.json();
481
- });
482
-
483
- case 5:
484
- return _context15.abrupt("return", _context15.sent);
485
-
486
- case 6:
487
- case "end":
488
- return _context15.stop();
489
- }
490
- }
491
- }, _callee15);
492
- }));
493
-
494
- function checkSubscription(_x113, _x114, _x115, _x116, _x117, _x118, _x119, _x120) {
495
- return _checkSubscription2.apply(this, arguments);
496
- }
497
-
498
- return checkSubscription;
499
- }(),
500
- checkSubscriptionByRockmanIdOnly: function () {
501
- var _checkSubscriptionByRockmanIdOnly2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(host, rockmanId) {
502
- var isDMB, newHost;
503
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
504
- while (1) {
505
- switch (_context16.prev = _context16.next) {
506
- case 0:
507
- console.log("RealTallyman");
508
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
509
- newHost = isDMB ? "de.tallymans.com" : host;
510
- _context16.next = 5;
511
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=check-subscription&rockman_id=").concat(rockmanId)).then(function (x) {
512
- return x.json();
513
- });
514
-
515
- case 5:
516
- return _context16.abrupt("return", _context16.sent);
517
-
518
- case 6:
519
- case "end":
520
- return _context16.stop();
521
- }
522
- }
523
- }, _callee16);
524
- }));
525
-
526
- function checkSubscriptionByRockmanIdOnly(_x121, _x122) {
527
- return _checkSubscriptionByRockmanIdOnly2.apply(this, arguments);
528
- }
529
-
530
- return checkSubscriptionByRockmanIdOnly;
531
- }(),
532
- redirect: function () {
533
- var _redirect2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(host, slug, country, msisdn, device, offer, rockmanId, ip_range_name, search, extraParamsQs) {
534
- var isDMB, newHost;
535
- return regeneratorRuntime.wrap(function _callee17$(_context17) {
536
- while (1) {
537
- switch (_context17.prev = _context17.next) {
538
- case 0:
539
- console.log("RealTallyman");
540
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
541
- newHost = isDMB ? "de.tallymans.com" : host;
542
- _context17.next = 5;
543
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=redirect&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&network_type=").concat(!ip_range_name ? "wifi" : "", "&").concat(search).concat(extraParamsQs)).then(function (x) {
544
- return x.json();
545
- });
546
-
547
- case 5:
548
- return _context17.abrupt("return", _context17.sent);
549
-
550
- case 6:
551
- case "end":
552
- return _context17.stop();
553
- }
554
- }
555
- }, _callee17);
556
- }));
557
-
558
- function redirect(_x123, _x124, _x125, _x126, _x127, _x128, _x129, _x130, _x131, _x132) {
559
- return _redirect2.apply(this, arguments);
560
- }
561
-
562
- return redirect;
563
- }(),
564
- triggerMessage: function () {
565
- var _triggerMessage2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
566
- var isDMB, newHost;
567
- return regeneratorRuntime.wrap(function _callee18$(_context18) {
568
- while (1) {
569
- switch (_context18.prev = _context18.next) {
570
- case 0:
571
- console.log("RealTallyman");
572
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
573
- newHost = isDMB ? "de.tallymans.com" : host;
574
- _context18.next = 5;
575
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=trigger-message&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&").concat(search).concat(extraParamsQs)).then(function (x) {
576
- return x.json();
577
- });
578
-
579
- case 5:
580
- return _context18.abrupt("return", _context18.sent);
581
-
582
- case 6:
583
- case "end":
584
- return _context18.stop();
585
- }
586
- }
587
- }, _callee18);
588
- }));
589
-
590
- function triggerMessage(_x133, _x134, _x135, _x136, _x137, _x138, _x139, _x140, _x141) {
591
- return _triggerMessage2.apply(this, arguments);
592
- }
593
-
594
- return triggerMessage;
595
- }(),
596
- ussd: function () {
597
- var _ussd2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
598
- var isDMB, newHost;
599
- return regeneratorRuntime.wrap(function _callee19$(_context19) {
600
- while (1) {
601
- switch (_context19.prev = _context19.next) {
602
- case 0:
603
- console.log("RealTallyman");
604
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
605
- newHost = isDMB ? "de.tallymans.com" : host;
606
- _context19.next = 5;
607
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=ussd&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&").concat(search).concat(extraParamsQs)).then(function (x) {
608
- return x.json();
609
- });
610
-
611
- case 5:
612
- return _context19.abrupt("return", _context19.sent);
613
-
614
- case 6:
615
- case "end":
616
- return _context19.stop();
617
- }
618
- }
619
- }, _callee19);
620
- }));
621
-
622
- function ussd(_x142, _x143, _x144, _x145, _x146, _x147, _x148, _x149, _x150) {
623
- return _ussd2.apply(this, arguments);
624
- }
625
-
626
- return ussd;
627
- }(),
628
- oc2sms: function () {
629
- var _oc2sms2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(host, country, slug, offer, rockmanId, keyword, operator, search) {
630
- var isDMB, newHost;
631
- return regeneratorRuntime.wrap(function _callee20$(_context20) {
632
- while (1) {
633
- switch (_context20.prev = _context20.next) {
634
- case 0:
635
- console.log("RealTallyman");
636
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
637
- newHost = isDMB ? "de.tallymans.com" : host;
638
- _context20.next = 5;
639
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=oc2sms&country=").concat(country, "&slug=").concat(slug, "&offerId=").concat(offer).concat(!!keyword ? '&keyword=' + keyword : '', "&device=smart&rockman_id=").concat(rockmanId).concat(!!operator ? '&operator=' + operator : '', "&").concat(search)).then(function (x) {
640
- return x.json();
641
- });
642
-
643
- case 5:
644
- return _context20.abrupt("return", _context20.sent);
645
-
646
- case 6:
647
- case "end":
648
- return _context20.stop();
649
- }
650
- }
651
- }, _callee20);
652
- }));
653
-
654
- function oc2sms(_x151, _x152, _x153, _x154, _x155, _x156, _x157, _x158) {
655
- return _oc2sms2.apply(this, arguments);
656
- }
657
-
658
- return oc2sms;
659
- }(),
660
- tpayConsentConfig: function () {
661
- var _tpayConsentConfig2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21(host, country, slug, device, offer, rockmanId, search) {
662
- var isDMB, newHost;
663
- return regeneratorRuntime.wrap(function _callee21$(_context21) {
664
- while (1) {
665
- switch (_context21.prev = _context21.next) {
666
- case 0:
667
- console.log("RealTallyman");
668
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
669
- newHost = isDMB ? "de.tallymans.com" : host;
670
- _context21.next = 5;
671
- return fetch("https://".concat(newHost, "/tallyman/helper/?action=tpay-consent-config&country=").concat(country, "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&device=smart&rockman_id=").concat(rockmanId, "&").concat(search)).then(function (x) {
672
- return x.json();
673
- });
674
-
675
- case 5:
676
- return _context21.abrupt("return", _context21.sent);
677
-
678
- case 6:
679
- case "end":
680
- return _context21.stop();
681
- }
682
- }
683
- }, _callee21);
684
- }));
685
-
686
- function tpayConsentConfig(_x159, _x160, _x161, _x162, _x163, _x164, _x165) {
687
- return _tpayConsentConfig2.apply(this, arguments);
688
- }
689
-
690
- return tpayConsentConfig;
691
- }(),
692
- mcpShield: function () {
693
- var _mcpShield2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22(host, country, slug, device, offer, rockmanId, operator, uniqid) {
694
- var isDMB, newHost, pageUrl, ipAdd, userIp;
695
- return regeneratorRuntime.wrap(function _callee22$(_context22) {
696
- while (1) {
697
- switch (_context22.prev = _context22.next) {
698
- case 0:
699
- console.log("RealTallyman");
700
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
701
- newHost = isDMB ? "de.tallymans.com" : host;
702
- pageUrl = window.location.href;
703
- ipAdd = window.pac_analytics.visitor.ip;
704
- userIp = ipAdd ? "&client_ip=".concat(ipAdd) : '';
705
- _context22.next = 8;
706
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=mcp-shield&country=").concat(country, "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&operator=").concat(operator || '', "&rockman_id=").concat(rockmanId, "&client_lpu=").concat(pageUrl).concat(userIp).concat(uniqid || '')).then(function (x) {
707
- return x.json();
708
- });
709
-
710
- case 8:
711
- return _context22.abrupt("return", _context22.sent);
712
-
713
- case 9:
714
- case "end":
715
- return _context22.stop();
716
- }
717
- }
718
- }, _callee22);
719
- }));
720
-
721
- function mcpShield(_x166, _x167, _x168, _x169, _x170, _x171, _x172, _x173) {
722
- return _mcpShield2.apply(this, arguments);
723
- }
724
-
725
- return mcpShield;
726
- }()
727
- };
728
- exports.RealTallyman = RealTallyman;
1
+ "use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.from.js"),require("core-js/modules/es.regexp.test.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.get-own-property-descriptors.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.RealTallyman=exports.MockTallyman=void 0,require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.string.search.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.array.join.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.object.entries.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.string.includes.js"),require("core-js/modules/es.json.stringify.js");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!(i&&_arr.length===i));_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i["return"]||_i["return"]()}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _regeneratorRuntime(){"use strict";function define(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){define(prototype,method,function(arg){return this._invoke(method,arg)})})}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject)},function(err){invoke("throw",err,resolve,reject)}):PromiseImpl.resolve(value).then(function(unwrapped){result.value=unwrapped,resolve(result)},function(error){return invoke("throw",error,resolve,reject)})}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl(function(resolve,reject){invoke(method,arg,resolve,reject)})}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i<iterable.length;)if(hasOwn.call(iterable,i))return next.value=iterable[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";try{define({},"")}catch(err){define=function(obj,key,value){return obj[key]=value}}exports.wrap=wrap;var ContinueSentinel={},IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,function(){return this});var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);return GeneratorFunction.prototype=GeneratorFunctionPrototype,define(Gp,"constructor",GeneratorFunctionPrototype),define(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,toStringTagSymbol,"GeneratorFunction"),exports.isGeneratorFunction=function(genFun){var ctor="function"==typeof genFun&&genFun.constructor;return!!ctor&&(ctor===GeneratorFunction||"GeneratorFunction"===(ctor.displayName||ctor.name))},exports.mark=function(genFun){return Object.setPrototypeOf?Object.setPrototypeOf(genFun,GeneratorFunctionPrototype):(genFun.__proto__=GeneratorFunctionPrototype,define(genFun,toStringTagSymbol,"GeneratorFunction")),genFun.prototype=Object.create(Gp),genFun},exports.awrap=function(arg){return{__await:arg}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,asyncIteratorSymbol,function(){return this}),exports.AsyncIterator=AsyncIterator,exports.async=function(innerFn,outerFn,self,tryLocsList,PromiseImpl){void 0===PromiseImpl&&(PromiseImpl=Promise);var iter=new AsyncIterator(wrap(innerFn,outerFn,self,tryLocsList),PromiseImpl);return exports.isGeneratorFunction(outerFn)?iter:iter.next().then(function(result){return result.done?result.value:iter.next()})},defineIteratorMethods(Gp),define(Gp,toStringTagSymbol,"Generator"),define(Gp,iteratorSymbol,function(){return this}),define(Gp,"toString",function(){return"[object Generator]"}),exports.keys=function(object){var keys=[];for(var key in object)keys.push(key);return keys.reverse(),function next(){for(;keys.length;){var key=keys.pop();if(key in object)return next.value=key,next.done=!1,next}return next.done=!0,next}},exports.values=values,Context.prototype={constructor:Context,reset:function reset(skipTempReset){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=void 0)},stop:function stop(){this.done=!0;var rootRecord=this.tryEntries[0].completion;if("throw"===rootRecord.type)throw rootRecord.arg;return this.rval},dispatchException:function dispatchException(exception){function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=void 0),!!caught}if(this.done)throw exception;for(var context=this,i=this.tryEntries.length-1;0<=i;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0);if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(!hasCatch){if(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}}},abrupt:function abrupt(type,arg){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev<entry.finallyLoc){var finallyEntry=entry;break}finallyEntry&&("break"===type||"continue"===type)&&finallyEntry.tryLoc<=arg&&arg<=finallyEntry.finallyLoc&&(finallyEntry=null);var record=finallyEntry?finallyEntry.completion:{};return record.type=type,record.arg=arg,finallyEntry?(this.method="next",this.next=finallyEntry.finallyLoc,ContinueSentinel):this.complete(record)},complete:function complete(record,afterLoc){if("throw"===record.type)throw record.arg;return"break"===record.type||"continue"===record.type?this.next=record.arg:"return"===record.type?(this.rval=this.arg=record.arg,this.method="return",this.next="end"):"normal"===record.type&&afterLoc&&(this.next=afterLoc),ContinueSentinel},finish:function finish(finallyLoc){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel},catch:function _catch(tryLoc){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}var gen=fn.apply(self,args);_next(void 0)})}}var bupperizeCountry=function(c){return"gb"===c?"uk":c},logMockTallyman=function(mock){return console.log(mock)},checkIsCleanTraffic=function(country){return"be"===country?"undefined"!=typeof window&&!0===window.shouldBlock?"&is-clean-traffic=false":"&is-clean-traffic=true":""};function sleep(milliseconds){var date=Date.now(),currentDate=null;do currentDate=Date.now();while(currentDate-date<milliseconds)}var MockTallyman={identify:function(){function identify(){return _identify.apply(this,arguments)}var _identify=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context){for(;1;)switch(_context.prev=_context.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context.abrupt("return",{operator:"",flow:"",success:!0,rockman_id:""});case 3:case"end":return _context.stop();}},_callee)}));return identify}(),triggerPin:function(){function triggerPin(_x8,_x9,_x10,_x11,_x12,_x13,_x14,_x15,_x16,_x17,_x18){return _triggerPin.apply(this,arguments)}var _triggerPin=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(_host,_country,_slug,_device,_offer,_msisdn,_rockmanId,_extraParams,_search,_uniqid,_evinaTid){return _regeneratorRuntime().wrap(function _callee2$(_context2){for(;1;)switch(_context2.prev=_context2.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context2.abrupt("return",{success:!0,operator:"",rockman_id:"",pin:"",product_url:""});case 3:case"end":return _context2.stop();}},_callee2)}));return triggerPin}(),verifyPin:function(){function verifyPin(_x19,_x20,_x21,_x22,_x23,_x24,_x25,_x26,_x27){return _verifyPin.apply(this,arguments)}var _verifyPin=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(_host,_country,_slug,_device,_offer,_rockmanId,_pin,_extraParams,_uniqid){return _regeneratorRuntime().wrap(function _callee3$(_context3){for(;1;)switch(_context3.prev=_context3.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context3.abrupt("return",{success:!0,rockman_id:"000",product_url:"/product",async:!1});case 3:case"end":return _context3.stop();}},_callee3)}));return verifyPin}(),checkSubscription:function(){function checkSubscription(_x28,_x29,_x30,_x31,_x32,_x33,_x34,_x35){return _checkSubscription.apply(this,arguments)}var _checkSubscription=_asyncToGenerator(_regeneratorRuntime().mark(function _callee4(_host,_country,_slug,_device,_offer,_rockmanId,_pin,extraParams){return _regeneratorRuntime().wrap(function _callee4$(_context4){for(;1;)switch(_context4.prev=_context4.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context4.abrupt("return",{success:!0,rockman_id:"000",product_url:"/product",msisdn:"000"});case 3:case"end":return _context4.stop();}},_callee4)}));return checkSubscription}(),checkSubscriptionByRockmanIdOnly:function(){function checkSubscriptionByRockmanIdOnly(_x36,_x37){return _checkSubscriptionByRockmanIdOnly.apply(this,arguments)}var _checkSubscriptionByRockmanIdOnly=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(_host,_rockmanId){return _regeneratorRuntime().wrap(function _callee5$(_context5){for(;1;)switch(_context5.prev=_context5.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context5.abrupt("return",{success:!0,rockman_id:"000",product_url:"/product",msisdn:"000"});case 3:case"end":return _context5.stop();}},_callee5)}));return checkSubscriptionByRockmanIdOnly}(),redirect:function(){function redirect(_x38){return _redirect.apply(this,arguments)}var _redirect=_asyncToGenerator(_regeneratorRuntime().mark(function _callee6(_ref){var host,slug,country,msisdn,device,offer,rockmanId,ip_range_name,search,extraParamsQs,email,password;return _regeneratorRuntime().wrap(function _callee6$(_context6){for(;1;)switch(_context6.prev=_context6.next){case 0:return host=_ref.host,slug=_ref.slug,country=_ref.country,msisdn=_ref.msisdn,device=_ref.device,offer=_ref.offer,rockmanId=_ref.rockmanId,ip_range_name=_ref.ip_range_name,search=_ref.search,extraParamsQs=_ref.extraParamsQs,email=_ref.email,password=_ref.password,logMockTallyman("MockTallyman"),sleep(2e3),_context6.abrupt("return",{success:!0,rockman_id:"000",redirect_url:"/product"});case 4:case"end":return _context6.stop();}},_callee6)}));return redirect}(),triggerMessage:function(){function triggerMessage(_x39,_x40,_x41,_x42,_x43,_x44,_x45,_x46,_x47){return _triggerMessage.apply(this,arguments)}var _triggerMessage=_asyncToGenerator(_regeneratorRuntime().mark(function _callee7(_host,_slug,_country,_msisdn,_device,_offer,_rockmanId,_search,_extraParamsQs){return _regeneratorRuntime().wrap(function _callee7$(_context7){for(;1;)switch(_context7.prev=_context7.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context7.abrupt("return",{success:!0,rockman_id:"0000",keyword:"TEST OK",shortcode:"777",displayKeyword:"TEST OK"});case 3:case"end":return _context7.stop();}},_callee7)}));return triggerMessage}(),ussd:function(){function ussd(_x48,_x49,_x50,_x51,_x52,_x53,_x54,_x55,_x56){return _ussd.apply(this,arguments)}var _ussd=_asyncToGenerator(_regeneratorRuntime().mark(function _callee8(_host,_slug,_country,_msisdn,_device,_offer,_rockmanId,_search,_extraParamsQs){return _regeneratorRuntime().wrap(function _callee8$(_context8){for(;1;)switch(_context8.prev=_context8.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context8.abrupt("return",{success:!0,rockman_id:"0000",keyword:"TEST OK",shortcode:"777",displayKeyword:"TEST OK"});case 3:case"end":return _context8.stop();}},_callee8)}));return ussd}(),oc2sms:function(){function oc2sms(_x57,_x58,_x59,_x60,_x61,_x62,_x63,_x64){return _oc2sms.apply(this,arguments)}var _oc2sms=_asyncToGenerator(_regeneratorRuntime().mark(function _callee9(_host,_country,_slug,_offer,_rockmanId,_keyword,_operator,_search){return _regeneratorRuntime().wrap(function _callee9$(_context9){for(;1;)switch(_context9.prev=_context9.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context9.abrupt("return",{success:!0,uid:"1",keyword:"TEST OK",displayKeyword:"TEST OK",shortcode:"777"});case 3:case"end":return _context9.stop();}},_callee9)}));return oc2sms}(),mcpShield:function(){function mcpShield(_x65,_x66,_x67,_x68,_x69,_x70,_x71){return _mcpShield.apply(this,arguments)}var _mcpShield=_asyncToGenerator(_regeneratorRuntime().mark(function _callee10(_host,_country,_slug,_device,_offer,_rockmanId,_operator){return _regeneratorRuntime().wrap(function _callee10$(_context10){for(;1;)switch(_context10.prev=_context10.next){case 0:return logMockTallyman("MockTallyman"),sleep(2e3),_context10.abrupt("return",{source:"**********some very long text**********",uniqid:"a26e7c3983a9cebd469601d695c7dbc4",success:!0,rockman_id:"d66ac1a3ee6d40c289c23322ecd9aa79"});case 3:case"end":return _context10.stop();}},_callee10)}));return mcpShield}(),getGoogleCaptcha:function(){function getGoogleCaptcha(_x72,_x73,_x74,_x75,_x76){return _getGoogleCaptcha.apply(this,arguments)}var _getGoogleCaptcha=_asyncToGenerator(_regeneratorRuntime().mark(function _callee11(_host,_country,_slug,_device,_domain){return _regeneratorRuntime().wrap(function _callee11$(_context11){for(;1;)switch(_context11.prev=_context11.next){case 0:return _context11.abrupt("return",{site_key:"6LfMTS8fAAAAAHw-cibJXMfnsIYNpWh81GatD1lw",secret_key:"6LfMTS8fAAAAAIAET7tvHjrU-tRPGuqSdfCZZX6G",domains:"",success:!0});case 1:case"end":return _context11.stop();}},_callee11)}));return getGoogleCaptcha}(),storeEmail:function(){function storeEmail(_x77,_x78,_x79,_x80,_x81){return _storeEmail.apply(this,arguments)}var _storeEmail=_asyncToGenerator(_regeneratorRuntime().mark(function _callee12(_host,_slug,_service,_rockmanId,_email){return _regeneratorRuntime().wrap(function _callee12$(_context12){for(;1;)switch(_context12.prev=_context12.next){case 0:return _context12.abrupt("return",{success:!0});case 1:case"end":return _context12.stop();}},_callee12)}));return storeEmail}(),creditCardPayment:function creditCardPayment(_userDetails,_extraConfig){return{gateway_url:"/product",success:!0}}};exports.MockTallyman=MockTallyman;var RealTallyman={identify:function(){function identify(_x82,_x83,_x84,_x85,_x86,_x87,_x88){return _identify2.apply(this,arguments)}var _identify2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee13(host,slug,country,msisdn,device,offer,rockmanId){var _window,_window$location,languageCode;return _regeneratorRuntime().wrap(function _callee13$(_context13){for(;1;)switch(_context13.prev=_context13.next){case 0:return languageCode=window.languageCode?"&language_code=".concat(window.languageCode):"",_context13.abrupt("return",fetch("/tallyman/v1/?action=identify&slug=".concat(slug,"&country=").concat(country,"&msisdn=").concat(msisdn,"&device=").concat(device,"&offerId=").concat(offer,"&rockman_id=").concat(rockmanId,"&page=").concat(encodeURIComponent(null===(_window=window)||void 0===_window||null===(_window$location=_window.location)||void 0===_window$location?void 0:_window$location.href)).concat(languageCode)).then(function(x){return x.json()}));case 2:case"end":return _context13.stop();}},_callee13)}));return identify}(),triggerPin:function(){function triggerPin(_x89,_x90,_x91,_x92,_x93,_x94,_x95,_x96,_x97,_x98,_x99){return _triggerPin2.apply(this,arguments)}var _triggerPin2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee14(host,country,slug,device,offer,msisdn,rockmanId,extraParams,search,uniqid,evinaTid){var _window2,_window2$location,cleanTrafficString,extraParamsQs,params,queryString,url;return _regeneratorRuntime().wrap(function _callee14$(_context14){for(;1;)switch(_context14.prev=_context14.next){case 0:return cleanTrafficString=checkIsCleanTraffic(country),extraParamsQs="&".concat(Object.keys(extraParams).map(function(k){return"".concat(k,"=").concat(extraParams[k])}).join("&")),params={action:"trigger-pin",country:bupperizeCountry(country),slug:slug,device:device,offerId:offer,msisdn:msisdn,rockman_id:rockmanId,sam_evina_tid:evinaTid,page:encodeURIComponent(null===(_window2=window)||void 0===_window2||null===(_window2$location=_window2.location)||void 0===_window2$location?void 0:_window2$location.href),language_code:window.languageCode||"",antifraud_id:window.antifraud_id||"",partner_transaction_id:window.partner_transaction_id||"",partner_timestamp:window.partner_timestamp||"",partner_cid:window.partner_cid||"",uniqid:uniqid||""},queryString=Object.entries(params).filter(function(_ref2){var _ref3=_slicedToArray(_ref2,2),_=_ref3[0],value=_ref3[1];return value}).map(function(_ref4){var _ref5=_slicedToArray(_ref4,2),key=_ref5[0],value=_ref5[1];return"".concat(key,"=").concat(value)}).join("&"),url="/tallyman/v1/?".concat(queryString).concat(cleanTrafficString).concat(extraParamsQs,"&").concat(search),_context14.abrupt("return",fetch(url).then(function(x){return x.json()}));case 6:case"end":return _context14.stop();}},_callee14)}));return triggerPin}(),verifyPin:function(){function verifyPin(_x100,_x101,_x102,_x103,_x104,_x105,_x106,_x107,_x108,_x109){return _verifyPin2.apply(this,arguments)}var _verifyPin2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee15(host,country,slug,device,offer,rockmanId,pin,extraParams,uniqid,evinaTid){var _window3,_window3$location,cleanTrafficString,extraParamsQs,params,queryString,url;return _regeneratorRuntime().wrap(function _callee15$(_context15){for(;1;)switch(_context15.prev=_context15.next){case 0:return cleanTrafficString=checkIsCleanTraffic(country),extraParamsQs="&".concat(Object.keys(extraParams).map(function(k){return"".concat(k,"=").concat(extraParams[k])}).join("&")),params={action:"verify-pin",country:bupperizeCountry(country),slug:slug,device:device,offerId:offer,rockman_id:rockmanId,pin:pin,page:encodeURIComponent(null===(_window3=window)||void 0===_window3||null===(_window3$location=_window3.location)||void 0===_window3$location?void 0:_window3$location.href),language_code:window.languageCode||"",antifraud_id:window.antifraud_id||"",ClickID:window.antifraud_click_id||"",partner_cid:window.partner_cid||"",sam_evina_tid:evinaTid,uniqid:uniqid},queryString=Object.entries(params).filter(function(_ref6){var _ref7=_slicedToArray(_ref6,2),_=_ref7[0],value=_ref7[1];return value}).map(function(_ref8){var _ref9=_slicedToArray(_ref8,2),key=_ref9[0],value=_ref9[1];return"".concat(key,"=").concat(value)}).join("&"),url="/tallyman/v1/?".concat(queryString).concat(cleanTrafficString).concat(extraParamsQs),_context15.abrupt("return",fetch(url).then(function(x){return x.json()}));case 6:case"end":return _context15.stop();}},_callee15)}));return verifyPin}(),checkSubscription:function(){function checkSubscription(_x110,_x111,_x112,_x113,_x114,_x115,_x116,_x117){return _checkSubscription2.apply(this,arguments)}var _checkSubscription2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee16(host,country,slug,device,offer,rockmanId,_pin,_extraParams){return _regeneratorRuntime().wrap(function _callee16$(_context16){for(;1;)switch(_context16.prev=_context16.next){case 0:return _context16.abrupt("return",fetch("/tallyman/v1/?action=check-subscription&country=".concat(bupperizeCountry(country),"&slug=").concat(slug,"&device=").concat(device,"&offerId=").concat(offer,"&rockman_id=").concat(rockmanId)).then(function(x){return x.json()}));case 1:case"end":return _context16.stop();}},_callee16)}));return checkSubscription}(),checkSubscriptionByRockmanIdOnly:function(){function checkSubscriptionByRockmanIdOnly(_x118,_x119){return _checkSubscriptionByRockmanIdOnly2.apply(this,arguments)}var _checkSubscriptionByRockmanIdOnly2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee17(host,rockmanId){var _window$pac_analytics,_window$pac_analytics2,_window$pac_analytics3,_window$pac_analytics4,isDMB;return _regeneratorRuntime().wrap(function _callee17$(_context17){for(;1;)switch(_context17.prev=_context17.next){case 0:return isDMB=null!==window.pac_analytics.visitor.xaid&&-1!==(-1!==(null===(_window$pac_analytics=window.pac_analytics.visitor.xaid)||void 0===_window$pac_analytics||null===(_window$pac_analytics2=_window$pac_analytics.toLowerCase())||void 0===_window$pac_analytics2?void 0:_window$pac_analytics2.indexOf("dmb"))||(null===(_window$pac_analytics3=window.pac_analytics.visitor.xaid)||void 0===_window$pac_analytics3||null===(_window$pac_analytics4=_window$pac_analytics3.toLowerCase())||void 0===_window$pac_analytics4?void 0:_window$pac_analytics4.indexOf("amb"))),_context17.abrupt("return",fetch("/tallyman/v1/?action=check-subscription&rockman_id=".concat(rockmanId)).then(function(x){return x.json()}));case 2:case"end":return _context17.stop();}},_callee17)}));return checkSubscriptionByRockmanIdOnly}(),redirect:function(){function redirect(_x120){return _redirect2.apply(this,arguments)}var _redirect2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee18(_ref10){var _window$pac_analytics5,_window$pac_analytics6,_window4,_window5,_window5$location,host,slug,country,msisdn,device,offer,rockmanId,ip_range_name,search,extraParamsQs,email,password,isDMB,evinaTid,securityProcessId,languageCode,userDetails,searchQs,url;return _regeneratorRuntime().wrap(function _callee18$(_context18){for(;1;)switch(_context18.prev=_context18.next){case 0:if(host=_ref10.host,slug=_ref10.slug,country=_ref10.country,msisdn=_ref10.msisdn,device=_ref10.device,offer=_ref10.offer,rockmanId=_ref10.rockmanId,ip_range_name=_ref10.ip_range_name,search=_ref10.search,extraParamsQs=_ref10.extraParamsQs,email=_ref10.email,password=_ref10.password,isDMB=null!==window.pac_analytics.visitor.xaid&&-1!==(-1!==(null===(_window$pac_analytics5=window.pac_analytics.visitor.xaid)||void 0===_window$pac_analytics5?void 0:_window$pac_analytics5.toLowerCase().indexOf("dmb"))||(null===(_window$pac_analytics6=window.pac_analytics.visitor.xaid)||void 0===_window$pac_analytics6?void 0:_window$pac_analytics6.toLowerCase().indexOf("amb"))),evinaTid="a2"===(null===country||void 0===country?void 0:country.toLowerCase())?"&evinaTi=".concat(rockmanId):"",securityProcessId=null!==(_window4=window)&&void 0!==_window4&&_window4.securityProcessId?"&securityProcessId=".concat(window.securityProcessId):"",languageCode=window.languageCode?"&language_code=".concat(window.languageCode):"",userDetails=email&&password?"&email=".concat(email,"&password=").concat(password):"&msisdn=".concat(msisdn),searchQs=search&&""!==search?"".concat(search,"&"):"",url="/tallyman/v1/?action=redirect&slug=".concat(slug,"&country=").concat(country,"&device=").concat(device,"&offerId=").concat(offer,"&rockman_id=").concat(rockmanId,"&page=").concat(encodeURIComponent(null===(_window5=window)||void 0===_window5||null===(_window5$location=_window5.location)||void 0===_window5$location?void 0:_window5$location.href),"&network_type=").concat(ip_range_name?"":"wifi","&").concat(searchQs,"&").concat(evinaTid).concat(securityProcessId).concat(languageCode).concat(userDetails,"&").concat(extraParamsQs||""),!slug.includes("za-mtn-beyondvr-r7")){_context18.next=10;break}return _context18.abrupt("return",{success:!0,rockman_id:rockmanId,redirect_url:url});case 10:return _context18.abrupt("return",fetch(url).then(function(x){return x.json()}));case 11:case"end":return _context18.stop();}},_callee18)}));return redirect}(),triggerMessage:function(){function triggerMessage(_x121,_x122,_x123,_x124,_x125,_x126,_x127,_x128,_x129){return _triggerMessage2.apply(this,arguments)}var _triggerMessage2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee19(host,slug,country,msisdn,device,offer,rockmanId,search,extraParamsQs){var _window6,_window6$location,partnerAjaxResopnse,params,queryString,url;return _regeneratorRuntime().wrap(function _callee19$(_context19){for(;1;)switch(_context19.prev=_context19.next){case 0:if(!window.api_ajax_url){_context19.next=6;break}return _context19.next=3,fetch(window.api_ajax_url).then(function(x){return x.json()});case 3:_context19.t0=_context19.sent,_context19.next=7;break;case 6:_context19.t0=null;case 7:return partnerAjaxResopnse=_context19.t0,params={action:"trigger-message",slug:slug,country:country,msisdn:msisdn,device:device,offerId:offer,rockman_id:rockmanId,page:encodeURIComponent(null===(_window6=window)||void 0===_window6||null===(_window6$location=_window6.location)||void 0===_window6$location?void 0:_window6$location.href),sam_g_token:window.reCaptchaToken||"",antifraud_id:window.antifraud_id||"",language_code:window.languageCode||"",partner_form_action:(null===partnerAjaxResopnse||void 0===partnerAjaxResopnse?void 0:partnerAjaxResopnse.form_action)||""},queryString=Object.entries(params).filter(function(_ref11){var _ref12=_slicedToArray(_ref11,2),_=_ref12[0],value=_ref12[1];return value}).map(function(_ref13){var _ref14=_slicedToArray(_ref13,2),key=_ref14[0],value=_ref14[1];return"".concat(key,"=").concat(value)}).join("&"),url="/tallyman/v1/?".concat(queryString).concat(search).concat(extraParamsQs),_context19.abrupt("return",fetch(url).then(function(x){return x.json()}));case 12:case"end":return _context19.stop();}},_callee19)}));return triggerMessage}(),ussd:function(){function ussd(_x130,_x131,_x132,_x133,_x134,_x135,_x136,_x137,_x138){return _ussd2.apply(this,arguments)}var _ussd2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee20(host,slug,country,msisdn,device,offer,rockmanId,search,extraParamsQs){return _regeneratorRuntime().wrap(function _callee20$(_context20){for(;1;)switch(_context20.prev=_context20.next){case 0:return _context20.abrupt("return",fetch("/tallyman/v1/?action=ussd&slug=".concat(slug,"&country=").concat(country,"&msisdn=").concat(msisdn,"&device=").concat(device,"&offerId=").concat(offer,"&rockman_id=").concat(rockmanId,"&").concat(search).concat(extraParamsQs)).then(function(x){return x.json()}));case 1:case"end":return _context20.stop();}},_callee20)}));return ussd}(),oc2sms:function(){function oc2sms(_x139,_x140,_x141,_x142,_x143,_x144,_x145,_x146){return _oc2sms2.apply(this,arguments)}var _oc2sms2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee21(host,country,slug,offer,rockmanId,keyword,operator,search){var _window7,_window7$location;return _regeneratorRuntime().wrap(function _callee21$(_context21){for(;1;)switch(_context21.prev=_context21.next){case 0:return _context21.abrupt("return",fetch("/tallyman/v1/?action=oc2sms&country=".concat(country,"&slug=").concat(slug,"&offerId=").concat(offer,"&page=").concat(encodeURIComponent(null===(_window7=window)||void 0===_window7||null===(_window7$location=_window7.location)||void 0===_window7$location?void 0:_window7$location.href)).concat(keyword?"&keyword=".concat(keyword):"","&device=smart&rockman_id=").concat(rockmanId).concat(operator?"&operator=".concat(operator):"","&").concat(search)).then(function(x){return x.json()}));case 1:case"end":return _context21.stop();}},_callee21)}));return oc2sms}(),mcpShield:function(){function mcpShield(_x147,_x148,_x149,_x150,_x151,_x152,_x153,_x154){return _mcpShield2.apply(this,arguments)}var _mcpShield2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee22(host,country,slug,device,offer,rockmanId,operator,uniqid){var pageUrl,ipAdd,userIp;return _regeneratorRuntime().wrap(function _callee22$(_context22){for(;1;)switch(_context22.prev=_context22.next){case 0:return pageUrl=window.location.href,ipAdd=window.pac_analytics.visitor.ip,userIp=ipAdd?"&client_ip=".concat(ipAdd):"",_context22.abrupt("return",fetch("/tallyman/v1/?action=mcp-shield&country=".concat(country,"&slug=").concat(slug,"&device=").concat(device,"&offerId=").concat(offer,"&operator=").concat(operator||"","&rockman_id=").concat(rockmanId,"&client_lpu=").concat(pageUrl).concat(userIp).concat(uniqid||"")).then(function(x){return x.json()}));case 4:case"end":return _context22.stop();}},_callee22)}));return mcpShield}(),getGoogleCaptcha:function(){function getGoogleCaptcha(_x155,_x156,_x157,_x158,_x159){return _getGoogleCaptcha2.apply(this,arguments)}var _getGoogleCaptcha2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee23(host,country,slug,device,domain){return _regeneratorRuntime().wrap(function _callee23$(_context23){for(;1;)switch(_context23.prev=_context23.next){case 0:return _context23.abrupt("return",fetch("/tallyman/helper/?action=google-captcha-v3-config&country=".concat(country,"&slug=").concat(slug,"&device=").concat(device,"&domain=").concat(domain)).then(function(x){return x.json()}));case 1:case"end":return _context23.stop();}},_callee23)}));return getGoogleCaptcha}(),storeEmail:function(){function storeEmail(_x160,_x161,_x162,_x163,_x164){return _storeEmail2.apply(this,arguments)}var _storeEmail2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee24(host,slug,service,rockmanId,email){return _regeneratorRuntime().wrap(function _callee24$(_context24){for(;1;)switch(_context24.prev=_context24.next){case 0:return _context24.abrupt("return",fetch("/tallyman/helper/?action=store-email&slug=".concat(slug,"&rockman_id=").concat(rockmanId,"&email=").concat(email,"&product_identifier=").concat(service)).then(function(x){return x.json()}));case 1:case"end":return _context24.stop();}},_callee24)}));return storeEmail}(),creditCardPayment:function creditCardPayment(userDetails,extraConfig){var _window9,_window9$pac_analytic,_window9$pac_analytic2,myHeaders=new Headers;if(myHeaders.append("Content-Type","application/json"),"cc_number"in userDetails){var _window8,_window8$pac_analytic,_window8$pac_analytic2,_newUserDetails=_objectSpread({rockman_id:null===(_window8=window)||void 0===_window8||null===(_window8$pac_analytic=_window8.pac_analytics)||void 0===_window8$pac_analytic||null===(_window8$pac_analytic2=_window8$pac_analytic.visitor)||void 0===_window8$pac_analytic2?void 0:_window8$pac_analytic2.rockmanId,landing_page_url:window.location.href,service_id:null===extraConfig||void 0===extraConfig?void 0:extraConfig.serviceId},userDetails),_requestOptions={method:"POST",body:JSON.stringify(_newUserDetails),headers:myHeaders};return fetch("/api/v1/maxpay/frontend/initiate-payment",_requestOptions).then(function(x){return x.json()})}var newUserDetails=_objectSpread({rockman_id:null===(_window9=window)||void 0===_window9||null===(_window9$pac_analytic=_window9.pac_analytics)||void 0===_window9$pac_analytic||null===(_window9$pac_analytic2=_window9$pac_analytic.visitor)||void 0===_window9$pac_analytic2?void 0:_window9$pac_analytic2.rockmanId,landing_page_url:window.location.href,service_id:2,user_agent:window.navigator.userAgent,ip:window.pac_analytics.visitor.ip},userDetails),requestOptions={method:"POST",body:JSON.stringify(newUserDetails),headers:myHeaders};return fetch("/api/v1/ecardon/frontend/initiate-payment",requestOptions).then(function(x){return x.json()})}};exports.RealTallyman=RealTallyman;