@bigbinary/neeto-molecules 1.0.7 → 1.0.9

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 (39) hide show
  1. package/dist/BrowserSupport.cjs.js +2 -1462
  2. package/dist/BrowserSupport.js +2 -1456
  3. package/dist/Columns.cjs.js +1 -183
  4. package/dist/Columns.js +1 -177
  5. package/dist/CustomDomain.cjs.js +2 -753
  6. package/dist/CustomDomain.js +2 -727
  7. package/dist/DateFormat.cjs.js +1 -46
  8. package/dist/DateFormat.js +1 -40
  9. package/dist/DateRangeFilter.cjs.js +1 -233
  10. package/dist/DateRangeFilter.js +1 -226
  11. package/dist/DynamicVariables.cjs.js +1 -112
  12. package/dist/DynamicVariables.js +1 -106
  13. package/dist/EmailPreview.cjs.js +1 -89
  14. package/dist/EmailPreview.js +1 -83
  15. package/dist/ErrorPage.cjs.js +1 -189
  16. package/dist/ErrorPage.js +1 -165
  17. package/dist/IpRestriction.cjs.js +1 -3578
  18. package/dist/IpRestriction.js +1 -3552
  19. package/dist/KeyboardShortcuts.cjs.js +6 -2193
  20. package/dist/KeyboardShortcuts.js +6 -2186
  21. package/dist/LoginPage.cjs.js +1 -598
  22. package/dist/LoginPage.js +1 -573
  23. package/dist/NeetoWidget.cjs.js +3 -86957
  24. package/dist/NeetoWidget.js +3 -86931
  25. package/dist/PublishBlock.cjs.js +2 -184
  26. package/dist/PublishBlock.js +2 -178
  27. package/dist/Schedule.cjs.js +1 -950
  28. package/dist/Schedule.js +1 -919
  29. package/dist/ShareViaEmail.cjs.js +2 -2832
  30. package/dist/ShareViaEmail.js +2 -2805
  31. package/dist/ShareViaLink.cjs.js +2 -1243
  32. package/dist/ShareViaLink.js +2 -1237
  33. package/dist/Sidebar.cjs.js +1 -222
  34. package/dist/Sidebar.js +1 -195
  35. package/dist/TimeFormat.cjs.js +1 -11
  36. package/dist/TimeFormat.js +1 -5
  37. package/package.json +2 -1
  38. package/src/translations/en.json +0 -1
  39. package/types/ShareViaEmail.d.ts +9 -2
@@ -1,1468 +1,8 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var neetoui = require('@bigbinary/neetoui');
5
- var i18next = require('i18next');
6
- var ramda = require('ramda');
7
- var reactI18next = require('react-i18next');
8
-
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
-
13
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
14
-
15
- var platform$1 = {exports: {}};
16
-
1
+ "use strict";var e=require("react"),t=require("@bigbinary/neetoui"),r=require("i18next"),n=require("ramda"),o=require("react-i18next");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s={exports:{}};
17
2
  /*!
18
3
  * Platform.js v1.3.6
19
4
  * Copyright 2014-2020 Benjamin Tan
20
5
  * Copyright 2011-2013 John-David Dalton
21
6
  * Available under MIT license
22
7
  */
23
-
24
- (function (module, exports) {
25
- (function() {
26
-
27
- /** Used to determine if values are of the language type `Object`. */
28
- var objectTypes = {
29
- 'function': true,
30
- 'object': true
31
- };
32
-
33
- /** Used as a reference to the global object. */
34
- var root = (objectTypes[typeof window] && window) || this;
35
-
36
- /** Detect free variable `exports`. */
37
- var freeExports = exports;
38
-
39
- /** Detect free variable `module`. */
40
- var freeModule = module && !module.nodeType && module;
41
-
42
- /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
43
- var freeGlobal = freeExports && freeModule && typeof commonjsGlobal == 'object' && commonjsGlobal;
44
- if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
45
- root = freeGlobal;
46
- }
47
-
48
- /**
49
- * Used as the maximum length of an array-like object.
50
- * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
51
- * for more details.
52
- */
53
- var maxSafeInteger = Math.pow(2, 53) - 1;
54
-
55
- /** Regular expression to detect Opera. */
56
- var reOpera = /\bOpera/;
57
-
58
- /** Used for native method references. */
59
- var objectProto = Object.prototype;
60
-
61
- /** Used to check for own properties of an object. */
62
- var hasOwnProperty = objectProto.hasOwnProperty;
63
-
64
- /** Used to resolve the internal `[[Class]]` of values. */
65
- var toString = objectProto.toString;
66
-
67
- /*--------------------------------------------------------------------------*/
68
-
69
- /**
70
- * Capitalizes a string value.
71
- *
72
- * @private
73
- * @param {string} string The string to capitalize.
74
- * @returns {string} The capitalized string.
75
- */
76
- function capitalize(string) {
77
- string = String(string);
78
- return string.charAt(0).toUpperCase() + string.slice(1);
79
- }
80
-
81
- /**
82
- * A utility function to clean up the OS name.
83
- *
84
- * @private
85
- * @param {string} os The OS name to clean up.
86
- * @param {string} [pattern] A `RegExp` pattern matching the OS name.
87
- * @param {string} [label] A label for the OS.
88
- */
89
- function cleanupOS(os, pattern, label) {
90
- // Platform tokens are defined at:
91
- // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx
92
- // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx
93
- var data = {
94
- '10.0': '10',
95
- '6.4': '10 Technical Preview',
96
- '6.3': '8.1',
97
- '6.2': '8',
98
- '6.1': 'Server 2008 R2 / 7',
99
- '6.0': 'Server 2008 / Vista',
100
- '5.2': 'Server 2003 / XP 64-bit',
101
- '5.1': 'XP',
102
- '5.01': '2000 SP1',
103
- '5.0': '2000',
104
- '4.0': 'NT',
105
- '4.90': 'ME'
106
- };
107
- // Detect Windows version from platform tokens.
108
- if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) &&
109
- (data = data[/[\d.]+$/.exec(os)])) {
110
- os = 'Windows ' + data;
111
- }
112
- // Correct character case and cleanup string.
113
- os = String(os);
114
-
115
- if (pattern && label) {
116
- os = os.replace(RegExp(pattern, 'i'), label);
117
- }
118
-
119
- os = format(
120
- os.replace(/ ce$/i, ' CE')
121
- .replace(/\bhpw/i, 'web')
122
- .replace(/\bMacintosh\b/, 'Mac OS')
123
- .replace(/_PowerPC\b/i, ' OS')
124
- .replace(/\b(OS X) [^ \d]+/i, '$1')
125
- .replace(/\bMac (OS X)\b/, '$1')
126
- .replace(/\/(\d)/, ' $1')
127
- .replace(/_/g, '.')
128
- .replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, '')
129
- .replace(/\bx86\.64\b/gi, 'x86_64')
130
- .replace(/\b(Windows Phone) OS\b/, '$1')
131
- .replace(/\b(Chrome OS \w+) [\d.]+\b/, '$1')
132
- .split(' on ')[0]
133
- );
134
-
135
- return os;
136
- }
137
-
138
- /**
139
- * An iteration utility for arrays and objects.
140
- *
141
- * @private
142
- * @param {Array|Object} object The object to iterate over.
143
- * @param {Function} callback The function called per iteration.
144
- */
145
- function each(object, callback) {
146
- var index = -1,
147
- length = object ? object.length : 0;
148
-
149
- if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) {
150
- while (++index < length) {
151
- callback(object[index], index, object);
152
- }
153
- } else {
154
- forOwn(object, callback);
155
- }
156
- }
157
-
158
- /**
159
- * Trim and conditionally capitalize string values.
160
- *
161
- * @private
162
- * @param {string} string The string to format.
163
- * @returns {string} The formatted string.
164
- */
165
- function format(string) {
166
- string = trim(string);
167
- return /^(?:webOS|i(?:OS|P))/.test(string)
168
- ? string
169
- : capitalize(string);
170
- }
171
-
172
- /**
173
- * Iterates over an object's own properties, executing the `callback` for each.
174
- *
175
- * @private
176
- * @param {Object} object The object to iterate over.
177
- * @param {Function} callback The function executed per own property.
178
- */
179
- function forOwn(object, callback) {
180
- for (var key in object) {
181
- if (hasOwnProperty.call(object, key)) {
182
- callback(object[key], key, object);
183
- }
184
- }
185
- }
186
-
187
- /**
188
- * Gets the internal `[[Class]]` of a value.
189
- *
190
- * @private
191
- * @param {*} value The value.
192
- * @returns {string} The `[[Class]]`.
193
- */
194
- function getClassOf(value) {
195
- return value == null
196
- ? capitalize(value)
197
- : toString.call(value).slice(8, -1);
198
- }
199
-
200
- /**
201
- * Host objects can return type values that are different from their actual
202
- * data type. The objects we are concerned with usually return non-primitive
203
- * types of "object", "function", or "unknown".
204
- *
205
- * @private
206
- * @param {*} object The owner of the property.
207
- * @param {string} property The property to check.
208
- * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.
209
- */
210
- function isHostType(object, property) {
211
- var type = object != null ? typeof object[property] : 'number';
212
- return !/^(?:boolean|number|string|undefined)$/.test(type) &&
213
- (type == 'object' ? !!object[property] : true);
214
- }
215
-
216
- /**
217
- * Prepares a string for use in a `RegExp` by making hyphens and spaces optional.
218
- *
219
- * @private
220
- * @param {string} string The string to qualify.
221
- * @returns {string} The qualified string.
222
- */
223
- function qualify(string) {
224
- return String(string).replace(/([ -])(?!$)/g, '$1?');
225
- }
226
-
227
- /**
228
- * A bare-bones `Array#reduce` like utility function.
229
- *
230
- * @private
231
- * @param {Array} array The array to iterate over.
232
- * @param {Function} callback The function called per iteration.
233
- * @returns {*} The accumulated result.
234
- */
235
- function reduce(array, callback) {
236
- var accumulator = null;
237
- each(array, function(value, index) {
238
- accumulator = callback(accumulator, value, index, array);
239
- });
240
- return accumulator;
241
- }
242
-
243
- /**
244
- * Removes leading and trailing whitespace from a string.
245
- *
246
- * @private
247
- * @param {string} string The string to trim.
248
- * @returns {string} The trimmed string.
249
- */
250
- function trim(string) {
251
- return String(string).replace(/^ +| +$/g, '');
252
- }
253
-
254
- /*--------------------------------------------------------------------------*/
255
-
256
- /**
257
- * Creates a new platform object.
258
- *
259
- * @memberOf platform
260
- * @param {Object|string} [ua=navigator.userAgent] The user agent string or
261
- * context object.
262
- * @returns {Object} A platform object.
263
- */
264
- function parse(ua) {
265
-
266
- /** The environment context object. */
267
- var context = root;
268
-
269
- /** Used to flag when a custom context is provided. */
270
- var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String';
271
-
272
- // Juggle arguments.
273
- if (isCustomContext) {
274
- context = ua;
275
- ua = null;
276
- }
277
-
278
- /** Browser navigator object. */
279
- var nav = context.navigator || {};
280
-
281
- /** Browser user agent string. */
282
- var userAgent = nav.userAgent || '';
283
-
284
- ua || (ua = userAgent);
285
-
286
- /** Used to detect if browser is like Chrome. */
287
- var likeChrome = isCustomContext
288
- ? !!nav.likeChrome
289
- : /\bChrome\b/.test(ua) && !/internal|\n/i.test(toString.toString());
290
-
291
- /** Internal `[[Class]]` value shortcuts. */
292
- var objectClass = 'Object',
293
- airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject',
294
- enviroClass = isCustomContext ? objectClass : 'Environment',
295
- javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java),
296
- phantomClass = isCustomContext ? objectClass : 'RuntimeObject';
297
-
298
- /** Detect Java environments. */
299
- var java = /\bJava/.test(javaClass) && context.java;
300
-
301
- /** Detect Rhino. */
302
- var rhino = java && getClassOf(context.environment) == enviroClass;
303
-
304
- /** A character to represent alpha. */
305
- var alpha = java ? 'a' : '\u03b1';
306
-
307
- /** A character to represent beta. */
308
- var beta = java ? 'b' : '\u03b2';
309
-
310
- /** Browser document object. */
311
- var doc = context.document || {};
312
-
313
- /**
314
- * Detect Opera browser (Presto-based).
315
- * http://www.howtocreate.co.uk/operaStuff/operaObject.html
316
- * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini
317
- */
318
- var opera = context.operamini || context.opera;
319
-
320
- /** Opera `[[Class]]`. */
321
- var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera))
322
- ? operaClass
323
- : (opera = null);
324
-
325
- /*------------------------------------------------------------------------*/
326
-
327
- /** Temporary variable used over the script's lifetime. */
328
- var data;
329
-
330
- /** The CPU architecture. */
331
- var arch = ua;
332
-
333
- /** Platform description array. */
334
- var description = [];
335
-
336
- /** Platform alpha/beta indicator. */
337
- var prerelease = null;
338
-
339
- /** A flag to indicate that environment features should be used to resolve the platform. */
340
- var useFeatures = ua == userAgent;
341
-
342
- /** The browser/environment version. */
343
- var version = useFeatures && opera && typeof opera.version == 'function' && opera.version();
344
-
345
- /** A flag to indicate if the OS ends with "/ Version" */
346
- var isSpecialCasedOS;
347
-
348
- /* Detectable layout engines (order is important). */
349
- var layout = getLayout([
350
- { 'label': 'EdgeHTML', 'pattern': 'Edge' },
351
- 'Trident',
352
- { 'label': 'WebKit', 'pattern': 'AppleWebKit' },
353
- 'iCab',
354
- 'Presto',
355
- 'NetFront',
356
- 'Tasman',
357
- 'KHTML',
358
- 'Gecko'
359
- ]);
360
-
361
- /* Detectable browser names (order is important). */
362
- var name = getName([
363
- 'Adobe AIR',
364
- 'Arora',
365
- 'Avant Browser',
366
- 'Breach',
367
- 'Camino',
368
- 'Electron',
369
- 'Epiphany',
370
- 'Fennec',
371
- 'Flock',
372
- 'Galeon',
373
- 'GreenBrowser',
374
- 'iCab',
375
- 'Iceweasel',
376
- 'K-Meleon',
377
- 'Konqueror',
378
- 'Lunascape',
379
- 'Maxthon',
380
- { 'label': 'Microsoft Edge', 'pattern': '(?:Edge|Edg|EdgA|EdgiOS)' },
381
- 'Midori',
382
- 'Nook Browser',
383
- 'PaleMoon',
384
- 'PhantomJS',
385
- 'Raven',
386
- 'Rekonq',
387
- 'RockMelt',
388
- { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' },
389
- 'SeaMonkey',
390
- { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' },
391
- 'Sleipnir',
392
- 'SlimBrowser',
393
- { 'label': 'SRWare Iron', 'pattern': 'Iron' },
394
- 'Sunrise',
395
- 'Swiftfox',
396
- 'Vivaldi',
397
- 'Waterfox',
398
- 'WebPositive',
399
- { 'label': 'Yandex Browser', 'pattern': 'YaBrowser' },
400
- { 'label': 'UC Browser', 'pattern': 'UCBrowser' },
401
- 'Opera Mini',
402
- { 'label': 'Opera Mini', 'pattern': 'OPiOS' },
403
- 'Opera',
404
- { 'label': 'Opera', 'pattern': 'OPR' },
405
- 'Chromium',
406
- 'Chrome',
407
- { 'label': 'Chrome', 'pattern': '(?:HeadlessChrome)' },
408
- { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },
409
- { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },
410
- { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' },
411
- { 'label': 'IE', 'pattern': 'IEMobile' },
412
- { 'label': 'IE', 'pattern': 'MSIE' },
413
- 'Safari'
414
- ]);
415
-
416
- /* Detectable products (order is important). */
417
- var product = getProduct([
418
- { 'label': 'BlackBerry', 'pattern': 'BB10' },
419
- 'BlackBerry',
420
- { 'label': 'Galaxy S', 'pattern': 'GT-I9000' },
421
- { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' },
422
- { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' },
423
- { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' },
424
- { 'label': 'Galaxy S5', 'pattern': 'SM-G900' },
425
- { 'label': 'Galaxy S6', 'pattern': 'SM-G920' },
426
- { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' },
427
- { 'label': 'Galaxy S7', 'pattern': 'SM-G930' },
428
- { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' },
429
- 'Google TV',
430
- 'Lumia',
431
- 'iPad',
432
- 'iPod',
433
- 'iPhone',
434
- 'Kindle',
435
- { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' },
436
- 'Nexus',
437
- 'Nook',
438
- 'PlayBook',
439
- 'PlayStation Vita',
440
- 'PlayStation',
441
- 'TouchPad',
442
- 'Transformer',
443
- { 'label': 'Wii U', 'pattern': 'WiiU' },
444
- 'Wii',
445
- 'Xbox One',
446
- { 'label': 'Xbox 360', 'pattern': 'Xbox' },
447
- 'Xoom'
448
- ]);
449
-
450
- /* Detectable manufacturers. */
451
- var manufacturer = getManufacturer({
452
- 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 },
453
- 'Alcatel': {},
454
- 'Archos': {},
455
- 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 },
456
- 'Asus': { 'Transformer': 1 },
457
- 'Barnes & Noble': { 'Nook': 1 },
458
- 'BlackBerry': { 'PlayBook': 1 },
459
- 'Google': { 'Google TV': 1, 'Nexus': 1 },
460
- 'HP': { 'TouchPad': 1 },
461
- 'HTC': {},
462
- 'Huawei': {},
463
- 'Lenovo': {},
464
- 'LG': {},
465
- 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 },
466
- 'Motorola': { 'Xoom': 1 },
467
- 'Nintendo': { 'Wii U': 1, 'Wii': 1 },
468
- 'Nokia': { 'Lumia': 1 },
469
- 'Oppo': {},
470
- 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },
471
- 'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 },
472
- 'Xiaomi': { 'Mi': 1, 'Redmi': 1 }
473
- });
474
-
475
- /* Detectable operating systems (order is important). */
476
- var os = getOS([
477
- 'Windows Phone',
478
- 'KaiOS',
479
- 'Android',
480
- 'CentOS',
481
- { 'label': 'Chrome OS', 'pattern': 'CrOS' },
482
- 'Debian',
483
- { 'label': 'DragonFly BSD', 'pattern': 'DragonFly' },
484
- 'Fedora',
485
- 'FreeBSD',
486
- 'Gentoo',
487
- 'Haiku',
488
- 'Kubuntu',
489
- 'Linux Mint',
490
- 'OpenBSD',
491
- 'Red Hat',
492
- 'SuSE',
493
- 'Ubuntu',
494
- 'Xubuntu',
495
- 'Cygwin',
496
- 'Symbian OS',
497
- 'hpwOS',
498
- 'webOS ',
499
- 'webOS',
500
- 'Tablet OS',
501
- 'Tizen',
502
- 'Linux',
503
- 'Mac OS X',
504
- 'Macintosh',
505
- 'Mac',
506
- 'Windows 98;',
507
- 'Windows '
508
- ]);
509
-
510
- /*------------------------------------------------------------------------*/
511
-
512
- /**
513
- * Picks the layout engine from an array of guesses.
514
- *
515
- * @private
516
- * @param {Array} guesses An array of guesses.
517
- * @returns {null|string} The detected layout engine.
518
- */
519
- function getLayout(guesses) {
520
- return reduce(guesses, function(result, guess) {
521
- return result || RegExp('\\b' + (
522
- guess.pattern || qualify(guess)
523
- ) + '\\b', 'i').exec(ua) && (guess.label || guess);
524
- });
525
- }
526
-
527
- /**
528
- * Picks the manufacturer from an array of guesses.
529
- *
530
- * @private
531
- * @param {Array} guesses An object of guesses.
532
- * @returns {null|string} The detected manufacturer.
533
- */
534
- function getManufacturer(guesses) {
535
- return reduce(guesses, function(result, value, key) {
536
- // Lookup the manufacturer by product or scan the UA for the manufacturer.
537
- return result || (
538
- value[product] ||
539
- value[/^[a-z]+(?: +[a-z]+\b)*/i.exec(product)] ||
540
- RegExp('\\b' + qualify(key) + '(?:\\b|\\w*\\d)', 'i').exec(ua)
541
- ) && key;
542
- });
543
- }
544
-
545
- /**
546
- * Picks the browser name from an array of guesses.
547
- *
548
- * @private
549
- * @param {Array} guesses An array of guesses.
550
- * @returns {null|string} The detected browser name.
551
- */
552
- function getName(guesses) {
553
- return reduce(guesses, function(result, guess) {
554
- return result || RegExp('\\b' + (
555
- guess.pattern || qualify(guess)
556
- ) + '\\b', 'i').exec(ua) && (guess.label || guess);
557
- });
558
- }
559
-
560
- /**
561
- * Picks the OS name from an array of guesses.
562
- *
563
- * @private
564
- * @param {Array} guesses An array of guesses.
565
- * @returns {null|string} The detected OS name.
566
- */
567
- function getOS(guesses) {
568
- return reduce(guesses, function(result, guess) {
569
- var pattern = guess.pattern || qualify(guess);
570
- if (!result && (result =
571
- RegExp('\\b' + pattern + '(?:/[\\d.]+|[ \\w.]*)', 'i').exec(ua)
572
- )) {
573
- result = cleanupOS(result, pattern, guess.label || guess);
574
- }
575
- return result;
576
- });
577
- }
578
-
579
- /**
580
- * Picks the product name from an array of guesses.
581
- *
582
- * @private
583
- * @param {Array} guesses An array of guesses.
584
- * @returns {null|string} The detected product name.
585
- */
586
- function getProduct(guesses) {
587
- return reduce(guesses, function(result, guess) {
588
- var pattern = guess.pattern || qualify(guess);
589
- if (!result && (result =
590
- RegExp('\\b' + pattern + ' *\\d+[.\\w_]*', 'i').exec(ua) ||
591
- RegExp('\\b' + pattern + ' *\\w+-[\\w]*', 'i').exec(ua) ||
592
- RegExp('\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)', 'i').exec(ua)
593
- )) {
594
- // Split by forward slash and append product version if needed.
595
- if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\d.]+/.test(result[0])) {
596
- result[0] += ' ' + result[1];
597
- }
598
- // Correct character case and cleanup string.
599
- guess = guess.label || guess;
600
- result = format(result[0]
601
- .replace(RegExp(pattern, 'i'), guess)
602
- .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ')
603
- .replace(RegExp('(' + guess + ')[-_.]?(\\w)', 'i'), '$1 $2'));
604
- }
605
- return result;
606
- });
607
- }
608
-
609
- /**
610
- * Resolves the version using an array of UA patterns.
611
- *
612
- * @private
613
- * @param {Array} patterns An array of UA patterns.
614
- * @returns {null|string} The detected version.
615
- */
616
- function getVersion(patterns) {
617
- return reduce(patterns, function(result, pattern) {
618
- return result || (RegExp(pattern +
619
- '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;
620
- });
621
- }
622
-
623
- /**
624
- * Returns `platform.description` when the platform object is coerced to a string.
625
- *
626
- * @name toString
627
- * @memberOf platform
628
- * @returns {string} Returns `platform.description` if available, else an empty string.
629
- */
630
- function toStringPlatform() {
631
- return this.description || '';
632
- }
633
-
634
- /*------------------------------------------------------------------------*/
635
-
636
- // Convert layout to an array so we can add extra details.
637
- layout && (layout = [layout]);
638
-
639
- // Detect Android products.
640
- // Browsers on Android devices typically provide their product IDS after "Android;"
641
- // up to "Build" or ") AppleWebKit".
642
- // Example:
643
- // "Mozilla/5.0 (Linux; Android 8.1.0; Moto G (5) Plus) AppleWebKit/537.36
644
- // (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36"
645
- if (/\bAndroid\b/.test(os) && !product &&
646
- (data = /\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(ua))) {
647
- product = trim(data[1])
648
- // Replace any language codes (eg. "en-US").
649
- .replace(/^[a-z]{2}-[a-z]{2};\s*/i, '')
650
- || null;
651
- }
652
- // Detect product names that contain their manufacturer's name.
653
- if (manufacturer && !product) {
654
- product = getProduct([manufacturer]);
655
- } else if (manufacturer && product) {
656
- product = product
657
- .replace(RegExp('^(' + qualify(manufacturer) + ')[-_.\\s]', 'i'), manufacturer + ' ')
658
- .replace(RegExp('^(' + qualify(manufacturer) + ')[-_.]?(\\w)', 'i'), manufacturer + ' $2');
659
- }
660
- // Clean up Google TV.
661
- if ((data = /\bGoogle TV\b/.exec(product))) {
662
- product = data[0];
663
- }
664
- // Detect simulators.
665
- if (/\bSimulator\b/i.test(ua)) {
666
- product = (product ? product + ' ' : '') + 'Simulator';
667
- }
668
- // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS.
669
- if (name == 'Opera Mini' && /\bOPiOS\b/.test(ua)) {
670
- description.push('running in Turbo/Uncompressed mode');
671
- }
672
- // Detect IE Mobile 11.
673
- if (name == 'IE' && /\blike iPhone OS\b/.test(ua)) {
674
- data = parse(ua.replace(/like iPhone OS/, ''));
675
- manufacturer = data.manufacturer;
676
- product = data.product;
677
- }
678
- // Detect iOS.
679
- else if (/^iP/.test(product)) {
680
- name || (name = 'Safari');
681
- os = 'iOS' + ((data = / OS ([\d_]+)/i.exec(ua))
682
- ? ' ' + data[1].replace(/_/g, '.')
683
- : '');
684
- }
685
- // Detect Kubuntu.
686
- else if (name == 'Konqueror' && /^Linux\b/i.test(os)) {
687
- os = 'Kubuntu';
688
- }
689
- // Detect Android browsers.
690
- else if ((manufacturer && manufacturer != 'Google' &&
691
- ((/Chrome/.test(name) && !/\bMobile Safari\b/i.test(ua)) || /\bVita\b/.test(product))) ||
692
- (/\bAndroid\b/.test(os) && /^Chrome/.test(name) && /\bVersion\//i.test(ua))) {
693
- name = 'Android Browser';
694
- os = /\bAndroid\b/.test(os) ? os : 'Android';
695
- }
696
- // Detect Silk desktop/accelerated modes.
697
- else if (name == 'Silk') {
698
- if (!/\bMobi/i.test(ua)) {
699
- os = 'Android';
700
- description.unshift('desktop mode');
701
- }
702
- if (/Accelerated *= *true/i.test(ua)) {
703
- description.unshift('accelerated');
704
- }
705
- }
706
- // Detect UC Browser speed mode.
707
- else if (name == 'UC Browser' && /\bUCWEB\b/.test(ua)) {
708
- description.push('speed mode');
709
- }
710
- // Detect PaleMoon identifying as Firefox.
711
- else if (name == 'PaleMoon' && (data = /\bFirefox\/([\d.]+)\b/.exec(ua))) {
712
- description.push('identifying as Firefox ' + data[1]);
713
- }
714
- // Detect Firefox OS and products running Firefox.
715
- else if (name == 'Firefox' && (data = /\b(Mobile|Tablet|TV)\b/i.exec(ua))) {
716
- os || (os = 'Firefox OS');
717
- product || (product = data[1]);
718
- }
719
- // Detect false positives for Firefox/Safari.
720
- else if (!name || (data = !/\bMinefield\b/i.test(ua) && /\b(?:Firefox|Safari)\b/.exec(name))) {
721
- // Escape the `/` for Firefox 1.
722
- if (name && !product && /[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) {
723
- // Clear name of false positives.
724
- name = null;
725
- }
726
- // Reassign a generic name.
727
- if ((data = product || manufacturer || os) &&
728
- (product || manufacturer || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(os))) {
729
- name = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(os) ? os : data) + ' Browser';
730
- }
731
- }
732
- // Add Chrome version to description for Electron.
733
- else if (name == 'Electron' && (data = (/\bChrome\/([\d.]+)\b/.exec(ua) || 0)[1])) {
734
- description.push('Chromium ' + data);
735
- }
736
- // Detect non-Opera (Presto-based) versions (order is important).
737
- if (!version) {
738
- version = getVersion([
739
- '(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)',
740
- 'Version',
741
- qualify(name),
742
- '(?:Firefox|Minefield|NetFront)'
743
- ]);
744
- }
745
- // Detect stubborn layout engines.
746
- if ((data =
747
- layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' ||
748
- /\bOpera\b/.test(name) && (/\bOPR\b/.test(ua) ? 'Blink' : 'Presto') ||
749
- /\b(?:Midori|Nook|Safari)\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' ||
750
- !layout && /\bMSIE\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') ||
751
- layout == 'WebKit' && /\bPlayStation\b(?! Vita\b)/i.test(name) && 'NetFront'
752
- )) {
753
- layout = [data];
754
- }
755
- // Detect Windows Phone 7 desktop mode.
756
- if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) {
757
- name += ' Mobile';
758
- os = 'Windows Phone ' + (/\+$/.test(data) ? data : data + '.x');
759
- description.unshift('desktop mode');
760
- }
761
- // Detect Windows Phone 8.x desktop mode.
762
- else if (/\bWPDesktop\b/i.test(ua)) {
763
- name = 'IE Mobile';
764
- os = 'Windows Phone 8.x';
765
- description.unshift('desktop mode');
766
- version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]);
767
- }
768
- // Detect IE 11 identifying as other browsers.
769
- else if (name != 'IE' && layout == 'Trident' && (data = /\brv:([\d.]+)/.exec(ua))) {
770
- if (name) {
771
- description.push('identifying as ' + name + (version ? ' ' + version : ''));
772
- }
773
- name = 'IE';
774
- version = data[1];
775
- }
776
- // Leverage environment features.
777
- if (useFeatures) {
778
- // Detect server-side environments.
779
- // Rhino has a global function while others have a global object.
780
- if (isHostType(context, 'global')) {
781
- if (java) {
782
- data = java.lang.System;
783
- arch = data.getProperty('os.arch');
784
- os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version');
785
- }
786
- if (rhino) {
787
- try {
788
- version = context.require('ringo/engine').version.join('.');
789
- name = 'RingoJS';
790
- } catch(e) {
791
- if ((data = context.system) && data.global.system == context.system) {
792
- name = 'Narwhal';
793
- os || (os = data[0].os || null);
794
- }
795
- }
796
- if (!name) {
797
- name = 'Rhino';
798
- }
799
- }
800
- else if (
801
- typeof context.process == 'object' && !context.process.browser &&
802
- (data = context.process)
803
- ) {
804
- if (typeof data.versions == 'object') {
805
- if (typeof data.versions.electron == 'string') {
806
- description.push('Node ' + data.versions.node);
807
- name = 'Electron';
808
- version = data.versions.electron;
809
- } else if (typeof data.versions.nw == 'string') {
810
- description.push('Chromium ' + version, 'Node ' + data.versions.node);
811
- name = 'NW.js';
812
- version = data.versions.nw;
813
- }
814
- }
815
- if (!name) {
816
- name = 'Node.js';
817
- arch = data.arch;
818
- os = data.platform;
819
- version = /[\d.]+/.exec(data.version);
820
- version = version ? version[0] : null;
821
- }
822
- }
823
- }
824
- // Detect Adobe AIR.
825
- else if (getClassOf((data = context.runtime)) == airRuntimeClass) {
826
- name = 'Adobe AIR';
827
- os = data.flash.system.Capabilities.os;
828
- }
829
- // Detect PhantomJS.
830
- else if (getClassOf((data = context.phantom)) == phantomClass) {
831
- name = 'PhantomJS';
832
- version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch);
833
- }
834
- // Detect IE compatibility modes.
835
- else if (typeof doc.documentMode == 'number' && (data = /\bTrident\/(\d+)/i.exec(ua))) {
836
- // We're in compatibility mode when the Trident version + 4 doesn't
837
- // equal the document mode.
838
- version = [version, doc.documentMode];
839
- if ((data = +data[1] + 4) != version[1]) {
840
- description.push('IE ' + version[1] + ' mode');
841
- layout && (layout[1] = '');
842
- version[1] = data;
843
- }
844
- version = name == 'IE' ? String(version[1].toFixed(1)) : version[0];
845
- }
846
- // Detect IE 11 masking as other browsers.
847
- else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\b/.test(name)) {
848
- description.push('masking as ' + name + ' ' + version);
849
- name = 'IE';
850
- version = '11.0';
851
- layout = ['Trident'];
852
- os = 'Windows';
853
- }
854
- os = os && format(os);
855
- }
856
- // Detect prerelease phases.
857
- if (version && (data =
858
- /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version) ||
859
- /(?:alpha|beta)(?: ?\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) ||
860
- /\bMinefield\b/i.test(ua) && 'a'
861
- )) {
862
- prerelease = /b/i.test(data) ? 'beta' : 'alpha';
863
- version = version.replace(RegExp(data + '\\+?$'), '') +
864
- (prerelease == 'beta' ? beta : alpha) + (/\d+\+?/.exec(data) || '');
865
- }
866
- // Detect Firefox Mobile.
867
- if (name == 'Fennec' || name == 'Firefox' && /\b(?:Android|Firefox OS|KaiOS)\b/.test(os)) {
868
- name = 'Firefox Mobile';
869
- }
870
- // Obscure Maxthon's unreliable version.
871
- else if (name == 'Maxthon' && version) {
872
- version = version.replace(/\.[\d.]+/, '.x');
873
- }
874
- // Detect Xbox 360 and Xbox One.
875
- else if (/\bXbox\b/i.test(product)) {
876
- if (product == 'Xbox 360') {
877
- os = null;
878
- }
879
- if (product == 'Xbox 360' && /\bIEMobile\b/.test(ua)) {
880
- description.unshift('mobile mode');
881
- }
882
- }
883
- // Add mobile postfix.
884
- else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) &&
885
- (os == 'Windows CE' || /Mobi/i.test(ua))) {
886
- name += ' Mobile';
887
- }
888
- // Detect IE platform preview.
889
- else if (name == 'IE' && useFeatures) {
890
- try {
891
- if (context.external === null) {
892
- description.unshift('platform preview');
893
- }
894
- } catch(e) {
895
- description.unshift('embedded');
896
- }
897
- }
898
- // Detect BlackBerry OS version.
899
- // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp
900
- else if ((/\bBlackBerry\b/.test(product) || /\bBB10\b/.test(ua)) && (data =
901
- (RegExp(product.replace(/ +/g, ' *') + '/([.\\d]+)', 'i').exec(ua) || 0)[1] ||
902
- version
903
- )) {
904
- data = [data, /BB10/.test(ua)];
905
- os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0];
906
- version = null;
907
- }
908
- // Detect Opera identifying/masking itself as another browser.
909
- // http://www.opera.com/support/kb/view/843/
910
- else if (this != forOwn && product != 'Wii' && (
911
- (useFeatures && opera) ||
912
- (/Opera/.test(name) && /\b(?:MSIE|Firefox)\b/i.test(ua)) ||
913
- (name == 'Firefox' && /\bOS X (?:\d+\.){2,}/.test(os)) ||
914
- (name == 'IE' && (
915
- (os && !/^Win/.test(os) && version > 5.5) ||
916
- /\bWindows XP\b/.test(os) && version > 8 ||
917
- version == 8 && !/\bTrident\b/.test(ua)
918
- ))
919
- ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) {
920
- // When "identifying", the UA contains both Opera and the other browser's name.
921
- data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : '');
922
- if (reOpera.test(name)) {
923
- if (/\bIE\b/.test(data) && os == 'Mac OS') {
924
- os = null;
925
- }
926
- data = 'identify' + data;
927
- }
928
- // When "masking", the UA contains only the other browser's name.
929
- else {
930
- data = 'mask' + data;
931
- if (operaClass) {
932
- name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2'));
933
- } else {
934
- name = 'Opera';
935
- }
936
- if (/\bIE\b/.test(data)) {
937
- os = null;
938
- }
939
- if (!useFeatures) {
940
- version = null;
941
- }
942
- }
943
- layout = ['Presto'];
944
- description.push(data);
945
- }
946
- // Detect WebKit Nightly and approximate Chrome/Safari versions.
947
- if ((data = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua) || 0)[1])) {
948
- // Correct build number for numeric comparison.
949
- // (e.g. "532.5" becomes "532.05")
950
- data = [parseFloat(data.replace(/\.(\d)$/, '.0$1')), data];
951
- // Nightly builds are postfixed with a "+".
952
- if (name == 'Safari' && data[1].slice(-1) == '+') {
953
- name = 'WebKit Nightly';
954
- prerelease = 'alpha';
955
- version = data[1].slice(0, -1);
956
- }
957
- // Clear incorrect browser versions.
958
- else if (version == data[1] ||
959
- version == (data[2] = (/\bSafari\/([\d.]+\+?)/i.exec(ua) || 0)[1])) {
960
- version = null;
961
- }
962
- // Use the full Chrome version when available.
963
- data[1] = (/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(ua) || 0)[1];
964
- // Detect Blink layout engine.
965
- if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') {
966
- layout = ['Blink'];
967
- }
968
- // Detect JavaScriptCore.
969
- // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi
970
- if (!useFeatures || (!likeChrome && !data[1])) {
971
- layout && (layout[1] = 'like Safari');
972
- data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : data < 602 ? 9 : data < 604 ? 10 : data < 606 ? 11 : data < 608 ? 12 : '12');
973
- } else {
974
- layout && (layout[1] = 'like Chrome');
975
- data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28');
976
- }
977
- // Add the postfix of ".x" or "+" for approximate versions.
978
- layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+'));
979
- // Obscure version for some Safari 1-2 releases.
980
- if (name == 'Safari' && (!version || parseInt(version) > 45)) {
981
- version = data;
982
- } else if (name == 'Chrome' && /\bHeadlessChrome/i.test(ua)) {
983
- description.unshift('headless');
984
- }
985
- }
986
- // Detect Opera desktop modes.
987
- if (name == 'Opera' && (data = /\bzbov|zvav$/.exec(os))) {
988
- name += ' ';
989
- description.unshift('desktop mode');
990
- if (data == 'zvav') {
991
- name += 'Mini';
992
- version = null;
993
- } else {
994
- name += 'Mobile';
995
- }
996
- os = os.replace(RegExp(' *' + data + '$'), '');
997
- }
998
- // Detect Chrome desktop mode.
999
- else if (name == 'Safari' && /\bChrome\b/.exec(layout && layout[1])) {
1000
- description.unshift('desktop mode');
1001
- name = 'Chrome Mobile';
1002
- version = null;
1003
-
1004
- if (/\bOS X\b/.test(os)) {
1005
- manufacturer = 'Apple';
1006
- os = 'iOS 4.3+';
1007
- } else {
1008
- os = null;
1009
- }
1010
- }
1011
- // Newer versions of SRWare Iron uses the Chrome tag to indicate its version number.
1012
- else if (/\bSRWare Iron\b/.test(name) && !version) {
1013
- version = getVersion('Chrome');
1014
- }
1015
- // Strip incorrect OS versions.
1016
- if (version && version.indexOf((data = /[\d.]+$/.exec(os))) == 0 &&
1017
- ua.indexOf('/' + data + '-') > -1) {
1018
- os = trim(os.replace(data, ''));
1019
- }
1020
- // Ensure OS does not include the browser name.
1021
- if (os && os.indexOf(name) != -1 && !RegExp(name + ' OS').test(os)) {
1022
- os = os.replace(RegExp(' *' + qualify(name) + ' *'), '');
1023
- }
1024
- // Add layout engine.
1025
- if (layout && !/\b(?:Avant|Nook)\b/.test(name) && (
1026
- /Browser|Lunascape|Maxthon/.test(name) ||
1027
- name != 'Safari' && /^iOS/.test(os) && /\bSafari\b/.test(layout[1]) ||
1028
- /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(name) && layout[1])) {
1029
- // Don't add layout details to description if they are falsey.
1030
- (data = layout[layout.length - 1]) && description.push(data);
1031
- }
1032
- // Combine contextual information.
1033
- if (description.length) {
1034
- description = ['(' + description.join('; ') + ')'];
1035
- }
1036
- // Append manufacturer to description.
1037
- if (manufacturer && product && product.indexOf(manufacturer) < 0) {
1038
- description.push('on ' + manufacturer);
1039
- }
1040
- // Append product to description.
1041
- if (product) {
1042
- description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product);
1043
- }
1044
- // Parse the OS into an object.
1045
- if (os) {
1046
- data = / ([\d.+]+)$/.exec(os);
1047
- isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/';
1048
- os = {
1049
- 'architecture': 32,
1050
- 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os,
1051
- 'version': data ? data[1] : null,
1052
- 'toString': function() {
1053
- var version = this.version;
1054
- return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : '');
1055
- }
1056
- };
1057
- }
1058
- // Add browser/OS architecture.
1059
- if ((data = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch)) && !/\bi686\b/i.test(arch)) {
1060
- if (os) {
1061
- os.architecture = 64;
1062
- os.family = os.family.replace(RegExp(' *' + data), '');
1063
- }
1064
- if (
1065
- name && (/\bWOW64\b/i.test(ua) ||
1066
- (useFeatures && /\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\bWin64; x64\b/i.test(ua)))
1067
- ) {
1068
- description.unshift('32-bit');
1069
- }
1070
- }
1071
- // Chrome 39 and above on OS X is always 64-bit.
1072
- else if (
1073
- os && /^OS X/.test(os.family) &&
1074
- name == 'Chrome' && parseFloat(version) >= 39
1075
- ) {
1076
- os.architecture = 64;
1077
- }
1078
-
1079
- ua || (ua = null);
1080
-
1081
- /*------------------------------------------------------------------------*/
1082
-
1083
- /**
1084
- * The platform object.
1085
- *
1086
- * @name platform
1087
- * @type Object
1088
- */
1089
- var platform = {};
1090
-
1091
- /**
1092
- * The platform description.
1093
- *
1094
- * @memberOf platform
1095
- * @type string|null
1096
- */
1097
- platform.description = ua;
1098
-
1099
- /**
1100
- * The name of the browser's layout engine.
1101
- *
1102
- * The list of common layout engines include:
1103
- * "Blink", "EdgeHTML", "Gecko", "Trident" and "WebKit"
1104
- *
1105
- * @memberOf platform
1106
- * @type string|null
1107
- */
1108
- platform.layout = layout && layout[0];
1109
-
1110
- /**
1111
- * The name of the product's manufacturer.
1112
- *
1113
- * The list of manufacturers include:
1114
- * "Apple", "Archos", "Amazon", "Asus", "Barnes & Noble", "BlackBerry",
1115
- * "Google", "HP", "HTC", "LG", "Microsoft", "Motorola", "Nintendo",
1116
- * "Nokia", "Samsung" and "Sony"
1117
- *
1118
- * @memberOf platform
1119
- * @type string|null
1120
- */
1121
- platform.manufacturer = manufacturer;
1122
-
1123
- /**
1124
- * The name of the browser/environment.
1125
- *
1126
- * The list of common browser names include:
1127
- * "Chrome", "Electron", "Firefox", "Firefox for iOS", "IE",
1128
- * "Microsoft Edge", "PhantomJS", "Safari", "SeaMonkey", "Silk",
1129
- * "Opera Mini" and "Opera"
1130
- *
1131
- * Mobile versions of some browsers have "Mobile" appended to their name:
1132
- * eg. "Chrome Mobile", "Firefox Mobile", "IE Mobile" and "Opera Mobile"
1133
- *
1134
- * @memberOf platform
1135
- * @type string|null
1136
- */
1137
- platform.name = name;
1138
-
1139
- /**
1140
- * The alpha/beta release indicator.
1141
- *
1142
- * @memberOf platform
1143
- * @type string|null
1144
- */
1145
- platform.prerelease = prerelease;
1146
-
1147
- /**
1148
- * The name of the product hosting the browser.
1149
- *
1150
- * The list of common products include:
1151
- *
1152
- * "BlackBerry", "Galaxy S4", "Lumia", "iPad", "iPod", "iPhone", "Kindle",
1153
- * "Kindle Fire", "Nexus", "Nook", "PlayBook", "TouchPad" and "Transformer"
1154
- *
1155
- * @memberOf platform
1156
- * @type string|null
1157
- */
1158
- platform.product = product;
1159
-
1160
- /**
1161
- * The browser's user agent string.
1162
- *
1163
- * @memberOf platform
1164
- * @type string|null
1165
- */
1166
- platform.ua = ua;
1167
-
1168
- /**
1169
- * The browser/environment version.
1170
- *
1171
- * @memberOf platform
1172
- * @type string|null
1173
- */
1174
- platform.version = name && version;
1175
-
1176
- /**
1177
- * The name of the operating system.
1178
- *
1179
- * @memberOf platform
1180
- * @type Object
1181
- */
1182
- platform.os = os || {
1183
-
1184
- /**
1185
- * The CPU architecture the OS is built for.
1186
- *
1187
- * @memberOf platform.os
1188
- * @type number|null
1189
- */
1190
- 'architecture': null,
1191
-
1192
- /**
1193
- * The family of the OS.
1194
- *
1195
- * Common values include:
1196
- * "Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista",
1197
- * "Windows XP", "OS X", "Linux", "Ubuntu", "Debian", "Fedora", "Red Hat",
1198
- * "SuSE", "Android", "iOS" and "Windows Phone"
1199
- *
1200
- * @memberOf platform.os
1201
- * @type string|null
1202
- */
1203
- 'family': null,
1204
-
1205
- /**
1206
- * The version of the OS.
1207
- *
1208
- * @memberOf platform.os
1209
- * @type string|null
1210
- */
1211
- 'version': null,
1212
-
1213
- /**
1214
- * Returns the OS string.
1215
- *
1216
- * @memberOf platform.os
1217
- * @returns {string} The OS string.
1218
- */
1219
- 'toString': function() { return 'null'; }
1220
- };
1221
-
1222
- platform.parse = parse;
1223
- platform.toString = toStringPlatform;
1224
-
1225
- if (platform.version) {
1226
- description.unshift(version);
1227
- }
1228
- if (platform.name) {
1229
- description.unshift(name);
1230
- }
1231
- if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) {
1232
- description.push(product ? '(' + os + ')' : 'on ' + os);
1233
- }
1234
- if (description.length) {
1235
- platform.description = description.join(' ');
1236
- }
1237
- return platform;
1238
- }
1239
-
1240
- /*--------------------------------------------------------------------------*/
1241
-
1242
- // Export platform.
1243
- var platform = parse();
1244
-
1245
- // Some AMD build optimizers, like r.js, check for condition patterns like the following:
1246
- if (freeExports && freeModule) {
1247
- // Export for CommonJS support.
1248
- forOwn(platform, function(value, key) {
1249
- freeExports[key] = value;
1250
- });
1251
- }
1252
- else {
1253
- // Export to the global object.
1254
- root.platform = platform;
1255
- }
1256
- }.call(commonjsGlobal));
1257
- } (platform$1, platform$1.exports));
1258
-
1259
- var platform = platform$1.exports;
1260
-
1261
- var DEFAULT_MINIMUM_SUPPORTED_BROWSER_VERSIONS = {
1262
- Chrome: 79,
1263
- MicrosoftEdge: 104,
1264
- Firefox: 91,
1265
- IE: 11,
1266
- Opera: 73,
1267
- Safari: 12.2,
1268
- AndroidBrowser: 4.4,
1269
- OperaMini: 1,
1270
- ChromeMobile: 105,
1271
- FirefoxMobile: 104,
1272
- UCBrowser: 13.4,
1273
- SamsungInternet: 4
1274
- };
1275
- var BROWSER_UPGRADE_PAGE_LINKS = {
1276
- Chrome: "https://www.google.com/chrome/update",
1277
- MicrosoftEdge: "https://support.microsoft.com/en-us/topic/microsoft-edge-update-settings-af8aaca2-1b69-4870-94fe-18822dbb7ef1#:~:text=Update%20once,Download%20and%20install%20to%20proceed",
1278
- Firefox: "https://support.mozilla.org/en-US/kb/update-firefox-latest-release",
1279
- IE: "https://support.microsoft.com/en-us/topic/microsoft-edge-update-settings-af8aaca2-1b69-4870-94fe-18822dbb7ef1#:~:text=Update%20once,Download%20and%20install%20to%20proceed",
1280
- Opera: "https://help.opera.com/en/latest/crashes-and-issues/#updateBrowser",
1281
- Safari: "https://support.apple.com/en-in/HT204416",
1282
- AndroidBrowser: "https://play.google.com/store/apps/details?id=com.android.chrome&hl=en_IN&gl=US",
1283
- OperaMini: "https://play.google.com/store/apps/details?id=com.opera.mini.native&hl=en_IN&gl=US&pli=1",
1284
- ChromeMobile: "https://play.google.com/store/apps/details?id=com.android.chrome&hl=en_IN&gl=US",
1285
- FirefoxMobile: "https://play.google.com/store/apps/details?id=org.mozilla.firefox&hl=en_IN&gl=US",
1286
- UCBrowser: "https://play.google.com/store/apps/details?id=com.UCMobile.intl&hl=en_IN&gl=US",
1287
- SamsungInternet: "https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser&hl=en_IN&gl=US"
1288
- };
1289
-
1290
- var ContactUs = function ContactUs() {
1291
- return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
1292
- i18nKey: "neetoMolecules.browserSupport.contactUs.main",
1293
- components: {
1294
- button: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
1295
- className: "ml-1",
1296
- label: i18next.t("neetoMolecules.browserSupport.contactUs.buttonLabel"),
1297
- style: "link",
1298
- onClick: function onClick() {
1299
- var _window$NeetoChat, _window$NeetoChat$con, _window$NeetoChat2, _window$NeetoChat2$co;
1300
- (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 ? void 0 : (_window$NeetoChat$con = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat$con === void 0 ? void 0 : _window$NeetoChat$con.maximizeWidget();
1301
- (_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 ? void 0 : (_window$NeetoChat2$co = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2$co === void 0 ? void 0 : _window$NeetoChat2$co.openWidget();
1302
- }
1303
- })
1304
- }
1305
- });
1306
- };
1307
-
1308
- function _arrayWithHoles(arr) {
1309
- if (Array.isArray(arr)) return arr;
1310
- }
1311
-
1312
- function _iterableToArrayLimit(arr, i) {
1313
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1314
- if (null != _i) {
1315
- var _s,
1316
- _e,
1317
- _x,
1318
- _r,
1319
- _arr = [],
1320
- _n = !0,
1321
- _d = !1;
1322
- try {
1323
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
1324
- if (Object(_i) !== _i) return;
1325
- _n = !1;
1326
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1327
- } catch (err) {
1328
- _d = !0, _e = err;
1329
- } finally {
1330
- try {
1331
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1332
- } finally {
1333
- if (_d) throw _e;
1334
- }
1335
- }
1336
- return _arr;
1337
- }
1338
- }
1339
-
1340
- function _arrayLikeToArray(arr, len) {
1341
- if (len == null || len > arr.length) len = arr.length;
1342
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1343
- return arr2;
1344
- }
1345
-
1346
- function _unsupportedIterableToArray(o, minLen) {
1347
- if (!o) return;
1348
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1349
- var n = Object.prototype.toString.call(o).slice(8, -1);
1350
- if (n === "Object" && o.constructor) n = o.constructor.name;
1351
- if (n === "Map" || n === "Set") return Array.from(o);
1352
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1353
- }
1354
-
1355
- function _nonIterableRest() {
1356
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1357
- }
1358
-
1359
- function _slicedToArray(arr, i) {
1360
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1361
- }
1362
-
1363
- var convertToPlatformBrowserName = function convertToPlatformBrowserName(browserName) {
1364
- return browserName.replace(/\s/g, "");
1365
- };
1366
- var getRequiredMinBrowserVersion = function getRequiredMinBrowserVersion(browserName, supportedBrowserVersionsMap) {
1367
- return supportedBrowserVersionsMap[convertToPlatformBrowserName(browserName)];
1368
- };
1369
- var convertSemverToFloat = function convertSemverToFloat(browserVersion) {
1370
- var _browserVersion$split = browserVersion.split("."),
1371
- _browserVersion$split2 = _slicedToArray(_browserVersion$split, 2),
1372
- majorVersion = _browserVersion$split2[0],
1373
- minorVersion = _browserVersion$split2[1];
1374
- return parseFloat("".concat(majorVersion, ".").concat(minorVersion));
1375
- };
1376
- var isVersionSupported = function isVersionSupported(browserVersion, requiredMinBrowserVersion) {
1377
- return convertSemverToFloat(browserVersion) >= requiredMinBrowserVersion;
1378
- };
1379
- var buildDownloadPageLink = function buildDownloadPageLink(browserName) {
1380
- return BROWSER_UPGRADE_PAGE_LINKS[convertToPlatformBrowserName(browserName)];
1381
- };
1382
- var isBrowserNameInTheSupportedList = function isBrowserNameInTheSupportedList(browserName, supportedBrowserVersionsMap) {
1383
- return !!supportedBrowserVersionsMap[convertToPlatformBrowserName(browserName)];
1384
- };
1385
- var getBrowserMajorVersion = function getBrowserMajorVersion(browserVersion) {
1386
- return String(browserVersion).split(".")[0];
1387
- };
1388
-
1389
- var UnsupportedBrowser = function UnsupportedBrowser(_ref) {
1390
- var browserName = _ref.browserName,
1391
- browserVersion = _ref.browserVersion;
1392
- return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
1393
- components: {
1394
- contactUs: /*#__PURE__*/React__default["default"].createElement(ContactUs, null)
1395
- },
1396
- i18nKey: "neetoMolecules.browserSupport.unsupportedBrowser",
1397
- values: {
1398
- browserName: browserName,
1399
- browserVersion: getBrowserMajorVersion(browserVersion)
1400
- }
1401
- });
1402
- };
1403
-
1404
- var DownloadLink = function DownloadLink(_ref) {
1405
- var link = _ref.link;
1406
- return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
1407
- i18nKey: "neetoMolecules.browserSupport.downloadLink.main",
1408
- components: {
1409
- button: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
1410
- href: link,
1411
- label: i18next.t("neetoMolecules.browserSupport.downloadLink.buttonLabel"),
1412
- style: "link"
1413
- })
1414
- }
1415
- });
1416
- };
1417
-
1418
- var UnsupportedBrowserVersion = function UnsupportedBrowserVersion(_ref) {
1419
- var browserName = _ref.browserName,
1420
- browserVersion = _ref.browserVersion,
1421
- requiredMinBrowserVersion = _ref.requiredMinBrowserVersion,
1422
- downloadPageLink = _ref.downloadPageLink;
1423
- return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
1424
- i18nKey: "neetoMolecules.browserSupport.unsupportedBrowserVersion",
1425
- components: {
1426
- downloadLink: /*#__PURE__*/React__default["default"].createElement(DownloadLink, {
1427
- link: downloadPageLink
1428
- }),
1429
- contactUs: /*#__PURE__*/React__default["default"].createElement(ContactUs, null)
1430
- },
1431
- values: {
1432
- browserName: browserName,
1433
- browserVersion: getBrowserMajorVersion(browserVersion),
1434
- requiredMinBrowserVersion: getBrowserMajorVersion(requiredMinBrowserVersion)
1435
- }
1436
- });
1437
- };
1438
-
1439
- var BrowserSupport = function BrowserSupport(_ref) {
1440
- var _ref$overrides = _ref.overrides,
1441
- overrides = _ref$overrides === void 0 ? {} : _ref$overrides;
1442
- var platformInfo = platform.parse(navigator.userAgent);
1443
- var browserName = platformInfo.name || i18next.t("neetoMolecules.browserSupport.unknownBrowserMsg");
1444
- var browserVersion = platformInfo.version || "";
1445
- var supportedBrowserVersionsMap = ramda.mergeLeft(overrides, DEFAULT_MINIMUM_SUPPORTED_BROWSER_VERSIONS);
1446
- var requiredMinBrowserVersion = getRequiredMinBrowserVersion(browserName, supportedBrowserVersionsMap);
1447
- var isUsersBrowserSupported = isVersionSupported(browserVersion, requiredMinBrowserVersion);
1448
- var downloadPageLink = buildDownloadPageLink(browserName);
1449
- var isUnsupportedBrowserVersion = isBrowserNameInTheSupportedList(browserName, supportedBrowserVersionsMap);
1450
- if (isUsersBrowserSupported) return null;
1451
- return /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
1452
- className: "justify-center gap-0 rounded-none",
1453
- "data-testid": "browser-support-callout",
1454
- style: "danger"
1455
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
1456
- style: "body2"
1457
- }, isUnsupportedBrowserVersion ? /*#__PURE__*/React__default["default"].createElement(UnsupportedBrowserVersion, {
1458
- browserName: browserName,
1459
- browserVersion: browserVersion,
1460
- downloadPageLink: downloadPageLink,
1461
- requiredMinBrowserVersion: requiredMinBrowserVersion
1462
- }) : /*#__PURE__*/React__default["default"].createElement(UnsupportedBrowser, {
1463
- browserName: browserName,
1464
- browserVersion: browserVersion
1465
- })));
1466
- };
1467
-
1468
- module.exports = BrowserSupport;
8
+ !function(e,t){(function(){var r={function:!0,object:!0}[typeof window]&&window||this,n=t,o=e&&!e.nodeType&&e,i=n&&o&&"object"==typeof l&&l;!i||i.global!==i&&i.window!==i&&i.self!==i||(r=i);var a=Math.pow(2,53)-1,s=/\bOpera/,u=Object.prototype,c=u.hasOwnProperty,p=u.toString;function b(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function d(e){return e=g(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:b(e)}function f(e,t){for(var r in e)c.call(e,r)&&t(e[r],r,e)}function m(e){return null==e?b(e):p.call(e).slice(8,-1)}function S(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function h(e,t){var r=null;return function(e,t){var r=-1,n=e?e.length:0;if("number"==typeof n&&n>-1&&n<=a)for(;++r<n;)t(e[r],r,e);else f(e,t)}(e,(function(n,o){r=t(r,n,o,e)})),r}function g(e){return String(e).replace(/^ +| +$/g,"")}var x=function e(t){var n=r,o=t&&"object"==typeof t&&"String"!=m(t);o&&(n=t,t=null);var i=n.navigator||{},a=i.userAgent||"";t||(t=a);var l,u,c,b,x,w=o?!!i.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(p.toString()),y="Object",v=o?y:"ScriptBridgingProxyObject",M=o?y:"Environment",O=o&&n.java?"JavaPackage":m(n.java),E=o?y:"RuntimeObject",C=/\bJava/.test(O)&&n.java,B=C&&m(n.environment)==M,P=C?"a":"α",k=C?"b":"β",I=n.document||{},A=n.operamini||n.opera,W=s.test(W=o&&A?A["[[Class]]"]:m(A))?W:A=null,T=t,R=[],F=null,N=t==a,G=N&&A&&"function"==typeof A.version&&A.version(),$=h([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,r){return e||RegExp("\\b"+(r.pattern||S(r))+"\\b","i").exec(t)&&(r.label||r)})),U=function(e){return h(e,(function(e,r){return e||RegExp("\\b"+(r.pattern||S(r))+"\\b","i").exec(t)&&(r.label||r)}))}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),j=X([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),K=function(e){return h(e,(function(e,r,n){return e||(r[j]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(j)]||RegExp("\\b"+S(n)+"(?:\\b|\\w*\\d)","i").exec(t))&&n}))}({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),V=function(e){return h(e,(function(e,r){var n=r.pattern||S(r);return!e&&(e=RegExp("\\b"+n+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,r){var n={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&r&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(n=n[/[\d.]+$/.exec(e)])&&(e="Windows "+n),e=String(e),t&&r&&(e=e.replace(RegExp(t,"i"),r)),d(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(e,n,r.label||r)),e}))}(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function X(e){return h(e,(function(e,r){var n=r.pattern||S(r);return!e&&(e=RegExp("\\b"+n+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+n+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+n+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(r.label&&!RegExp(n,"i").test(r.label)?r.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),r=r.label||r,e=d(e[0].replace(RegExp(n,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}function L(e){return h(e,(function(e,r){return e||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}if($&&($=[$]),/\bAndroid\b/.test(V)&&!j&&(l=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(t))&&(j=g(l[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),K&&!j?j=X([K]):K&&j&&(j=j.replace(RegExp("^("+S(K)+")[-_.\\s]","i"),K+" ").replace(RegExp("^("+S(K)+")[-_.]?(\\w)","i"),K+" $2")),(l=/\bGoogle TV\b/.exec(j))&&(j=l[0]),/\bSimulator\b/i.test(t)&&(j=(j?j+" ":"")+"Simulator"),"Opera Mini"==U&&/\bOPiOS\b/.test(t)&&R.push("running in Turbo/Uncompressed mode"),"IE"==U&&/\blike iPhone OS\b/.test(t)?(K=(l=e(t.replace(/like iPhone OS/,""))).manufacturer,j=l.product):/^iP/.test(j)?(U||(U="Safari"),V="iOS"+((l=/ OS ([\d_]+)/i.exec(t))?" "+l[1].replace(/_/g,"."):"")):"Konqueror"==U&&/^Linux\b/i.test(V)?V="Kubuntu":K&&"Google"!=K&&(/Chrome/.test(U)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(j))||/\bAndroid\b/.test(V)&&/^Chrome/.test(U)&&/\bVersion\//i.test(t)?(U="Android Browser",V=/\bAndroid\b/.test(V)?V:"Android"):"Silk"==U?(/\bMobi/i.test(t)||(V="Android",R.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&R.unshift("accelerated")):"UC Browser"==U&&/\bUCWEB\b/.test(t)?R.push("speed mode"):"PaleMoon"==U&&(l=/\bFirefox\/([\d.]+)\b/.exec(t))?R.push("identifying as Firefox "+l[1]):"Firefox"==U&&(l=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(V||(V="Firefox OS"),j||(j=l[1])):!U||(l=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(U))?(U&&!j&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(l+"/")+8))&&(U=null),(l=j||K||V)&&(j||K||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(V))&&(U=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(V)?V:l)+" Browser")):"Electron"==U&&(l=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&R.push("Chromium "+l),G||(G=L(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",S(U),"(?:Firefox|Minefield|NetFront)"])),(l=("iCab"==$&&parseFloat(G)>3?"WebKit":/\bOpera\b/.test(U)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test($)&&"WebKit"||!$&&/\bMSIE\b/i.test(t)&&("Mac OS"==V?"Tasman":"Trident")||"WebKit"==$&&/\bPlayStation\b(?! Vita\b)/i.test(U)&&"NetFront")&&($=[l]),"IE"==U&&(l=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(U+=" Mobile",V="Windows Phone "+(/\+$/.test(l)?l:l+".x"),R.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(U="IE Mobile",V="Windows Phone 8.x",R.unshift("desktop mode"),G||(G=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=U&&"Trident"==$&&(l=/\brv:([\d.]+)/.exec(t))&&(U&&R.push("identifying as "+U+(G?" "+G:"")),U="IE",G=l[1]),N){if(b="global",x=null!=(c=n)?typeof c[b]:"number",/^(?:boolean|number|string|undefined)$/.test(x)||"object"==x&&!c[b])m(l=n.runtime)==v?(U="Adobe AIR",V=l.flash.system.Capabilities.os):m(l=n.phantom)==E?(U="PhantomJS",G=(l=l.version||null)&&l.major+"."+l.minor+"."+l.patch):"number"==typeof I.documentMode&&(l=/\bTrident\/(\d+)/i.exec(t))?(G=[G,I.documentMode],(l=+l[1]+4)!=G[1]&&(R.push("IE "+G[1]+" mode"),$&&($[1]=""),G[1]=l),G="IE"==U?String(G[1].toFixed(1)):G[0]):"number"==typeof I.documentMode&&/^(?:Chrome|Firefox)\b/.test(U)&&(R.push("masking as "+U+" "+G),U="IE",G="11.0",$=["Trident"],V="Windows");else if(C&&(T=(l=C.lang.System).getProperty("os.arch"),V=V||l.getProperty("os.name")+" "+l.getProperty("os.version")),B){try{G=n.require("ringo/engine").version.join("."),U="RingoJS"}catch(e){(l=n.system)&&l.global.system==n.system&&(U="Narwhal",V||(V=l[0].os||null))}U||(U="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(l=n.process)&&("object"==typeof l.versions&&("string"==typeof l.versions.electron?(R.push("Node "+l.versions.node),U="Electron",G=l.versions.electron):"string"==typeof l.versions.nw&&(R.push("Chromium "+G,"Node "+l.versions.node),U="NW.js",G=l.versions.nw)),U||(U="Node.js",T=l.arch,V=l.platform,G=(G=/[\d.]+/.exec(l.version))?G[0]:null));V=V&&d(V)}if(G&&(l=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(G)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(N&&i.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(F=/b/i.test(l)?"beta":"alpha",G=G.replace(RegExp(l+"\\+?$"),"")+("beta"==F?k:P)+(/\d+\+?/.exec(l)||"")),"Fennec"==U||"Firefox"==U&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(V))U="Firefox Mobile";else if("Maxthon"==U&&G)G=G.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(j))"Xbox 360"==j&&(V=null),"Xbox 360"==j&&/\bIEMobile\b/.test(t)&&R.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(U)&&(!U||j||/Browser|Mobi/.test(U))||"Windows CE"!=V&&!/Mobi/i.test(t))if("IE"==U&&N)try{null===n.external&&R.unshift("platform preview")}catch(e){R.unshift("embedded")}else(/\bBlackBerry\b/.test(j)||/\bBB10\b/.test(t))&&(l=(RegExp(j.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||G)?(V=((l=[l,/BB10/.test(t)])[1]?(j=null,K="BlackBerry"):"Device Software")+" "+l[0],G=null):this!=f&&"Wii"!=j&&(N&&A||/Opera/.test(U)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==U&&/\bOS X (?:\d+\.){2,}/.test(V)||"IE"==U&&(V&&!/^Win/.test(V)&&G>5.5||/\bWindows XP\b/.test(V)&&G>8||8==G&&!/\bTrident\b/.test(t)))&&!s.test(l=e.call(f,t.replace(s,"")+";"))&&l.name&&(l="ing as "+l.name+((l=l.version)?" "+l:""),s.test(U)?(/\bIE\b/.test(l)&&"Mac OS"==V&&(V=null),l="identify"+l):(l="mask"+l,U=W?d(W.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(l)&&(V=null),N||(G=null)),$=["Presto"],R.push(l));else U+=" Mobile";(l=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(l=[parseFloat(l.replace(/\.(\d)$/,".0$1")),l],"Safari"==U&&"+"==l[1].slice(-1)?(U="WebKit Nightly",F="alpha",G=l[1].slice(0,-1)):G!=l[1]&&G!=(l[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(G=null),l[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(t)||0)[1],537.36==l[0]&&537.36==l[2]&&parseFloat(l[1])>=28&&"WebKit"==$&&($=["Blink"]),N&&(w||l[1])?($&&($[1]="like Chrome"),l=l[1]||((l=l[0])<530?1:l<532?2:l<532.05?3:l<533?4:l<534.03?5:l<534.07?6:l<534.1?7:l<534.13?8:l<534.16?9:l<534.24?10:l<534.3?11:l<535.01?12:l<535.02?"13+":l<535.07?15:l<535.11?16:l<535.19?17:l<536.05?18:l<536.1?19:l<537.01?20:l<537.11?"21+":l<537.13?23:l<537.18?24:l<537.24?25:l<537.36?26:"Blink"!=$?"27":"28")):($&&($[1]="like Safari"),l=(l=l[0])<400?1:l<500?2:l<526?3:l<533?4:l<534?"4+":l<535?5:l<537?6:l<538?7:l<601?8:l<602?9:l<604?10:l<606?11:l<608?12:"12"),$&&($[1]+=" "+(l+="number"==typeof l?".x":/[.+]/.test(l)?"":"+")),"Safari"==U&&(!G||parseInt(G)>45)?G=l:"Chrome"==U&&/\bHeadlessChrome/i.test(t)&&R.unshift("headless")),"Opera"==U&&(l=/\bzbov|zvav$/.exec(V))?(U+=" ",R.unshift("desktop mode"),"zvav"==l?(U+="Mini",G=null):U+="Mobile",V=V.replace(RegExp(" *"+l+"$"),"")):"Safari"==U&&/\bChrome\b/.exec($&&$[1])?(R.unshift("desktop mode"),U="Chrome Mobile",G=null,/\bOS X\b/.test(V)?(K="Apple",V="iOS 4.3+"):V=null):/\bSRWare Iron\b/.test(U)&&!G&&(G=L("Chrome")),G&&0==G.indexOf(l=/[\d.]+$/.exec(V))&&t.indexOf("/"+l+"-")>-1&&(V=g(V.replace(l,""))),V&&-1!=V.indexOf(U)&&!RegExp(U+" OS").test(V)&&(V=V.replace(RegExp(" *"+S(U)+" *"),"")),$&&!/\b(?:Avant|Nook)\b/.test(U)&&(/Browser|Lunascape|Maxthon/.test(U)||"Safari"!=U&&/^iOS/.test(V)&&/\bSafari\b/.test($[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(U)&&$[1])&&(l=$[$.length-1])&&R.push(l),R.length&&(R=["("+R.join("; ")+")"]),K&&j&&j.indexOf(K)<0&&R.push("on "+K),j&&R.push((/^on /.test(R[R.length-1])?"":"on ")+j),V&&(l=/ ([\d.+]+)$/.exec(V),u=l&&"/"==V.charAt(V.length-l[0].length-1),V={architecture:32,family:l&&!u?V.replace(l[0],""):V,version:l?l[1]:null,toString:function(){var e=this.version;return this.family+(e&&!u?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(l=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(T))&&!/\bi686\b/i.test(T)?(V&&(V.architecture=64,V.family=V.family.replace(RegExp(" *"+l),"")),U&&(/\bWOW64\b/i.test(t)||N&&/\w(?:86|32)$/.test(i.cpuClass||i.platform)&&!/\bWin64; x64\b/i.test(t))&&R.unshift("32-bit")):V&&/^OS X/.test(V.family)&&"Chrome"==U&&parseFloat(G)>=39&&(V.architecture=64),t||(t=null);var _={};return _.description=t,_.layout=$&&$[0],_.manufacturer=K,_.name=U,_.prerelease=F,_.product=j,_.ua=t,_.version=U&&G,_.os=V||{architecture:null,family:null,version:null,toString:function(){return"null"}},_.parse=e,_.toString=function(){return this.description||""},_.version&&R.unshift(G),_.name&&R.unshift(U),V&&U&&(V!=String(V).split(" ")[0]||V!=U.split(" ")[0]&&!j)&&R.push(j?"("+V+")":"on "+V),R.length&&(_.description=R.join(" ")),_}();n&&o?f(x,(function(e,t){n[t]=e})):r.platform=x}).call(l)}(s,s.exports);var u=s.exports,c={Chrome:79,MicrosoftEdge:104,Firefox:91,IE:11,Opera:73,Safari:12.2,AndroidBrowser:4.4,OperaMini:1,ChromeMobile:105,FirefoxMobile:104,UCBrowser:13.4,SamsungInternet:4},p={Chrome:"https://www.google.com/chrome/update",MicrosoftEdge:"https://support.microsoft.com/en-us/topic/microsoft-edge-update-settings-af8aaca2-1b69-4870-94fe-18822dbb7ef1#:~:text=Update%20once,Download%20and%20install%20to%20proceed",Firefox:"https://support.mozilla.org/en-US/kb/update-firefox-latest-release",IE:"https://support.microsoft.com/en-us/topic/microsoft-edge-update-settings-af8aaca2-1b69-4870-94fe-18822dbb7ef1#:~:text=Update%20once,Download%20and%20install%20to%20proceed",Opera:"https://help.opera.com/en/latest/crashes-and-issues/#updateBrowser",Safari:"https://support.apple.com/en-in/HT204416",AndroidBrowser:"https://play.google.com/store/apps/details?id=com.android.chrome&hl=en_IN&gl=US",OperaMini:"https://play.google.com/store/apps/details?id=com.opera.mini.native&hl=en_IN&gl=US&pli=1",ChromeMobile:"https://play.google.com/store/apps/details?id=com.android.chrome&hl=en_IN&gl=US",FirefoxMobile:"https://play.google.com/store/apps/details?id=org.mozilla.firefox&hl=en_IN&gl=US",UCBrowser:"https://play.google.com/store/apps/details?id=com.UCMobile.intl&hl=en_IN&gl=US",SamsungInternet:"https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser&hl=en_IN&gl=US"},b=function(){return a.default.createElement(o.Trans,{i18nKey:"neetoMolecules.browserSupport.contactUs.main",components:{button:a.default.createElement(t.Button,{className:"ml-1",label:r.t("neetoMolecules.browserSupport.contactUs.buttonLabel"),style:"link",onClick:function(){var e,t,r,n;null===(e=window.NeetoChat)||void 0===e||null===(t=e.contextualHelp)||void 0===t||t.maximizeWidget(),null===(r=window.NeetoChat)||void 0===r||null===(n=r.contextualHelp)||void 0===n||n.openWidget()}})}})};function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=function(e){return e.replace(/\s/g,"")},S=function(e,t){return function(e){var t=f(e.split("."),2),r=t[0],n=t[1];return parseFloat("".concat(r,".").concat(n))}(e)>=t},h=function(e){return String(e).split(".")[0]},g=function(e){var t=e.browserName,r=e.browserVersion;return a.default.createElement(o.Trans,{components:{contactUs:a.default.createElement(b,null)},i18nKey:"neetoMolecules.browserSupport.unsupportedBrowser",values:{browserName:t,browserVersion:h(r)}})},x=function(e){var n=e.link;return a.default.createElement(o.Trans,{i18nKey:"neetoMolecules.browserSupport.downloadLink.main",components:{button:a.default.createElement(t.Button,{href:n,label:r.t("neetoMolecules.browserSupport.downloadLink.buttonLabel"),style:"link"})}})},w=function(e){var t=e.browserName,r=e.browserVersion,n=e.requiredMinBrowserVersion,i=e.downloadPageLink;return a.default.createElement(o.Trans,{i18nKey:"neetoMolecules.browserSupport.unsupportedBrowserVersion",components:{downloadLink:a.default.createElement(x,{link:i}),contactUs:a.default.createElement(b,null)},values:{browserName:t,browserVersion:h(r),requiredMinBrowserVersion:h(n)}})};module.exports=function(e){var o=e.overrides,i=void 0===o?{}:o,l=u.parse(navigator.userAgent),s=l.name||r.t("neetoMolecules.browserSupport.unknownBrowserMsg"),b=l.version||"",d=n.mergeLeft(i,c),f=function(e,t){return t[m(e)]}(s,d),h=S(b,f),x=function(e){return p[m(e)]}(s),y=function(e,t){return!!t[m(e)]}(s,d);return h?null:a.default.createElement(t.Callout,{className:"justify-center gap-0 rounded-none","data-testid":"browser-support-callout",style:"danger"},a.default.createElement(t.Typography,{style:"body2"},y?a.default.createElement(w,{browserName:s,browserVersion:b,downloadPageLink:x,requiredMinBrowserVersion:f}):a.default.createElement(g,{browserName:s,browserVersion:b})))};