1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ 2(function (global){(function (){ 3(function (global, factory) { 4 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 5 typeof define === 'function' && define.amd ? define(['exports'], factory) : 6 (factory((global.WHATWGFetch = {}))); 7}(this, (function (exports) { 'use strict';
vendor: 19,470 bytes, lines 7-657
7 8 9 /* eslint-disable no-prototype-builtins */ 10 var g = 11 (typeof globalThis !== 'undefined' && globalThis) || 12 (typeof self !== 'undefined' && self) || 13 // eslint-disable-next-line no-undef 14 (typeof global !== 'undefined' && global) || 15 {}; 16 17 var support = { 18 searchParams: 'URLSearchParams' in g, 19 iterable: 'Symbol' in g && 'iterator' in Symbol, 20 blob: 21 'FileReader' in g && 22 'Blob' in g && 23 (function() { 24 try { 25 new Blob(); 26 return true 27 } catch (e) { 28 return false 29 } 30 })(), 31 formData: 'FormData' in g, 32 arrayBuffer: 'ArrayBuffer' in g 33 }; 34 35 function isDataView(obj) { 36 return obj && DataView.prototype.isPrototypeOf(obj) 37 } 38 39 if (support.arrayBuffer) { 40 var viewClasses = [ 41 '[object Int8Array]', 42 '[object Uint8Array]', 43 '[object Uint8ClampedArray]', 44 '[object Int16Array]', 45 '[object Uint16Array]', 46 '[object Int32Array]', 47 '[object Uint32Array]', 48 '[object Float32Array]', 49 '[object Float64Array]' 50 ]; 51 52 var isArrayBufferView = 53 ArrayBuffer.isView || 54 function(obj) { 55 return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 56 }; 57 } 58 59 function normalizeName(name) { 60 if (typeof name !== 'string') { 61 name = String(name); 62 } 63 if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') { 64 throw new TypeError('Invalid character in header field name: "' + name + '"') 65 } 66 return name.toLowerCase() 67 } 68 69 function normalizeValue(value) { 70 if (typeof value !== 'string') { 71 value = String(value); 72 } 73 return value 74 } 75 76 // Build a destructive iterator for the value list 77 function iteratorFor(items) { 78 var iterator = { 79 next: function() { 80 var value = items.shift(); 81 return {done: value === undefined, value: value} 82 } 83 }; 84 85 if (support.iterable) { 86 iterator[Symbol.iterator] = function() { 87 return iterator 88 }; 89 } 90 91 return iterator 92 } 93 94 function Headers(headers) { 95 this.map = {}; 96 97 if (headers instanceof Headers) { 98 headers.forEach(function(value, name) { 99 this.append(name, value); 100 }, this); 101 } else if (Array.isArray(headers)) { 102 headers.forEach(function(header) { 103 if (header.length != 2) { 104 throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length) 105 } 106 this.append(header[0], header[1]); 107 }, this); 108 } else if (headers) { 109 Object.getOwnPropertyNames(headers).forEach(function(name) { 110 this.append(name, headers[name]); 111 }, this); 112 } 113 } 114 115 Headers.prototype.append = function(name, value) { 116 name = normalizeName(name); 117 value = normalizeValue(value); 118 var oldValue = this.map[name]; 119 this.map[name] = oldValue ? oldValue + ', ' + value : value; 120 }; 121 122 Headers.prototype['delete'] = function(name) { 123 delete this.map[normalizeName(name)]; 124 }; 125 126 Headers.prototype.get = function(name) { 127 name = normalizeName(name); 128 return this.has(name) ? this.map[name] : null 129 }; 130 131 Headers.prototype.has = function(name) { 132 return this.map.hasOwnProperty(normalizeName(name)) 133 }; 134 135 Headers.prototype.set = function(name, value) { 136 this.map[normalizeName(name)] = normalizeValue(value); 137 }; 138 139 Headers.prototype.forEach = function(callback, thisArg) { 140 for (var name in this.map) { 141 if (this.map.hasOwnProperty(name)) { 142 callback.call(thisArg, this.map[name], name, this); 143 } 144 } 145 }; 146 147 Headers.prototype.keys = function() { 148 var items = []; 149 this.forEach(function(value, name) { 150 items.push(name); 151 }); 152 return iteratorFor(items) 153 }; 154 155 Headers.prototype.values = function() { 156 var items = []; 157 this.forEach(function(value) { 158 items.push(value); 159 }); 160 return iteratorFor(items) 161 }; 162 163 Headers.prototype.entries = function() { 164 var items = []; 165 this.forEach(function(value, name) { 166 items.push([name, value]); 167 }); 168 return iteratorFor(items) 169 }; 170 171 if (support.iterable) { 172 Headers.prototype[Symbol.iterator] = Headers.prototype.entries; 173 } 174 175 function consumed(body) { 176 if (body._noBody) return 177 if (body.bodyUsed) { 178 return Promise.reject(new TypeError('Already read')) 179 } 180 body.bodyUsed = true; 181 } 182 183 function fileReaderReady(reader) { 184 return new Promise(function(resolve, reject) { 185 reader.onload = function() { 186 resolve(reader.result); 187 }; 188 reader.onerror = function() { 189 reject(reader.error); 190 }; 191 }) 192 } 193 194 function readBlobAsArrayBuffer(blob) { 195 var reader = new FileReader(); 196 var promise = fileReaderReady(reader); 197 reader.readAsArrayBuffer(blob); 198 return promise 199 } 200 201 function readBlobAsText(blob) { 202 var reader = new FileReader(); 203 var promise = fileReaderReady(reader); 204 var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type); 205 var encoding = match ? match[1] : 'utf-8'; 206 reader.readAsText(blob, encoding); 207 return promise 208 } 209 210 function readArrayBufferAsText(buf) { 211 var view = new Uint8Array(buf); 212 var chars = new Array(view.length); 213 214 for (var i = 0; i < view.length; i++) { 215 chars[i] = String.fromCharCode(view[i]); 216 } 217 return chars.join('') 218 } 219 220 function bufferClone(buf) { 221 if (buf.slice) { 222 return buf.slice(0) 223 } else { 224 var view = new Uint8Array(buf.byteLength); 225 view.set(new Uint8Array(buf)); 226 return view.buffer 227 } 228 } 229 230 function Body() { 231 this.bodyUsed = false; 232 233 this._initBody = function(body) { 234 /* 235 fetch-mock wraps the Response object in an ES6 Proxy to 236 provide useful test harness features such as flush. However, on 237 ES5 browsers without fetch or Proxy support pollyfills must be used; 238 the proxy-pollyfill is unable to proxy an attribute unless it exists 239 on the object before the Proxy is created. This change ensures 240 Response.bodyUsed exists on the instance, while maintaining the 241 semantic of setting Request.bodyUsed in the constructor before 242 _initBody is called. 243 */ 244 // eslint-disable-next-line no-self-assign 245 this.bodyUsed = this.bodyUsed; 246 this._bodyInit = body; 247 if (!body) { 248 this._noBody = true; 249 this._bodyText = ''; 250 } else if (typeof body === 'string') { 251 this._bodyText = body; 252 } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { 253 this._bodyBlob = body; 254 } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { 255 this._bodyFormData = body; 256 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { 257 this._bodyText = body.toString(); 258 } else if (support.arrayBuffer && support.blob && isDataView(body)) { 259 this._bodyArrayBuffer = bufferClone(body.buffer); 260 // IE 10-11 can't handle a DataView body. 261 this._bodyInit = new Blob([this._bodyArrayBuffer]); 262 } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { 263 this._bodyArrayBuffer = bufferClone(body); 264 } else { 265 this._bodyText = body = Object.prototype.toString.call(body); 266 } 267 268 if (!this.headers.get('content-type')) { 269 if (typeof body === 'string') { 270 this.headers.set('content-type', 'text/plain;charset=UTF-8'); 271 } else if (this._bodyBlob && this._bodyBlob.type) { 272 this.headers.set('content-type', this._bodyBlob.type); 273 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { 274 this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); 275 } 276 } 277 }; 278 279 if (support.blob) { 280 this.blob = function() { 281 var rejected = consumed(this); 282 if (rejected) { 283 return rejected 284 } 285 286 if (this._bodyBlob) { 287 return Promise.resolve(this._bodyBlob) 288 } else if (this._bodyArrayBuffer) { 289 return Promise.resolve(new Blob([this._bodyArrayBuffer])) 290 } else if (this._bodyFormData) { 291 throw new Error('could not read FormData body as blob') 292 } else { 293 return Promise.resolve(new Blob([this._bodyText])) 294 } 295 }; 296 } 297 298 this.arrayBuffer = function() { 299 if (this._bodyArrayBuffer) { 300 var isConsumed = consumed(this); 301 if (isConsumed) { 302 return isConsumed 303 } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) { 304 return Promise.resolve( 305 this._bodyArrayBuffer.buffer.slice( 306 this._bodyArrayBuffer.byteOffset, 307 this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength 308 ) 309 ) 310 } else { 311 return Promise.resolve(this._bodyArrayBuffer) 312 } 313 } else if (support.blob) { 314 return this.blob().then(readBlobAsArrayBuffer) 315 } else { 316 throw new Error('could not read as ArrayBuffer') 317 } 318 }; 319 320 this.text = function() { 321 var rejected = consumed(this); 322 if (rejected) { 323 return rejected 324 } 325 326 if (this._bodyBlob) { 327 return readBlobAsText(this._bodyBlob) 328 } else if (this._bodyArrayBuffer) { 329 return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) 330 } else if (this._bodyFormData) { 331 throw new Error('could not read FormData body as text') 332 } else { 333 return Promise.resolve(this._bodyText) 334 } 335 }; 336 337 if (support.formData) { 338 this.formData = function() { 339 return this.text().then(decode) 340 }; 341 } 342 343 this.json = function() { 344 return this.text().then(JSON.parse) 345 }; 346 347 return this 348 } 349 350 // HTTP methods whose capitalization should be normalized 351 var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']; 352 353 function normalizeMethod(method) { 354 var upcased = method.toUpperCase(); 355 return methods.indexOf(upcased) > -1 ? upcased : method 356 } 357 358 function Request(input, options) { 359 if (!(this instanceof Request)) { 360 throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') 361 } 362 363 options = options || {}; 364 var body = options.body; 365 366 if (input instanceof Request) { 367 if (input.bodyUsed) { 368 throw new TypeError('Already read') 369 } 370 this.url = input.url; 371 this.credentials = input.credentials; 372 if (!options.headers) { 373 this.headers = new Headers(input.headers); 374 } 375 this.method = input.method; 376 this.mode = input.mode; 377 this.signal = input.signal; 378 if (!body && input._bodyInit != null) { 379 body = input._bodyInit; 380 input.bodyUsed = true; 381 } 382 } else { 383 this.url = String(input); 384 } 385 386 this.credentials = options.credentials || this.credentials || 'same-origin'; 387 if (options.headers || !this.headers) { 388 this.headers = new Headers(options.headers); 389 } 390 this.method = normalizeMethod(options.method || this.method || 'GET'); 391 this.mode = options.mode || this.mode || null; 392 this.signal = options.signal || this.signal || (function () { 393 if ('AbortController' in g) { 394 var ctrl = new AbortController(); 395 return ctrl.signal; 396 } 397 }()); 398 this.referrer = null; 399 400 if ((this.method === 'GET' || this.method === 'HEAD') && body) { 401 throw new TypeError('Body not allowed for GET or HEAD requests') 402 } 403 this._initBody(body); 404 405 if (this.method === 'GET' || this.method === 'HEAD') { 406 if (options.cache === 'no-store' || options.cache === 'no-cache') { 407 // Search for a '_' parameter in the query string 408 var reParamSearch = /([?&])_=[^&]*/; 409 if (reParamSearch.test(this.url)) { 410 // If it already exists then set the value with the current time 411 this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime()); 412 } else { 413 // Otherwise add a new '_' parameter to the end with the current time 414 var reQueryString = /\?/; 415 this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime(); 416 } 417 } 418 } 419 } 420 421 Request.prototype.clone = function() { 422 return new Request(this, {body: this._bodyInit}) 423 }; 424 425 function decode(body) { 426 var form = new FormData(); 427 body 428 .trim() 429 .split('&') 430 .forEach(function(bytes) { 431 if (bytes) { 432 var split = bytes.split('='); 433 var name = split.shift().replace(/\+/g, ' '); 434 var value = split.join('=').replace(/\+/g, ' '); 435 form.append(decodeURIComponent(name), decodeURIComponent(value)); 436 } 437 }); 438 return form 439 } 440 441 function parseHeaders(rawHeaders) { 442 var headers = new Headers(); 443 // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space 444 // https://tools.ietf.org/html/rfc7230#section-3.2 445 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); 446 // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill 447 // https://github.com/github/fetch/issues/748 448 // https://github.com/zloirock/core-js/issues/751 449 preProcessedHeaders 450 .split('\r') 451 .map(function(header) { 452 return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header 453 }) 454 .forEach(function(line) { 455 var parts = line.split(':'); 456 var key = parts.shift().trim(); 457 if (key) { 458 var value = parts.join(':').trim(); 459 try { 460 headers.append(key, value); 461 } catch (error) { 462 console.warn('Response ' + error.message); 463 } 464 } 465 }); 466 return headers 467 } 468 469 Body.call(Request.prototype); 470 471 function Response(bodyInit, options) { 472 if (!(this instanceof Response)) { 473 throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') 474 } 475 if (!options) { 476 options = {}; 477 } 478 479 this.type = 'default'; 480 this.status = options.status === undefined ? 200 : options.status; 481 if (this.status < 200 || this.status > 599) { 482 throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].") 483 } 484 this.ok = this.status >= 200 && this.status < 300; 485 this.statusText = options.statusText === undefined ? '' : '' + options.statusText; 486 this.headers = new Headers(options.headers); 487 this.url = options.url || ''; 488 this._initBody(bodyInit); 489 } 490 491 Body.call(Response.prototype); 492 493 Response.prototype.clone = function() { 494 return new Response(this._bodyInit, { 495 status: this.status, 496 statusText: this.statusText, 497 headers: new Headers(this.headers), 498 url: this.url 499 }) 500 }; 501 502 Response.error = function() { 503 var response = new Response(null, {status: 200, statusText: ''}); 504 response.ok = false; 505 response.status = 0; 506 response.type = 'error'; 507 return response 508 }; 509 510 var redirectStatuses = [301, 302, 303, 307, 308]; 511 512 Response.redirect = function(url, status) { 513 if (redirectStatuses.indexOf(status) === -1) { 514 throw new RangeError('Invalid status code') 515 } 516 517 return new Response(null, {status: status, headers: {location: url}}) 518 }; 519 520 exports.DOMException = g.DOMException; 521 try { 522 new exports.DOMException(); 523 } catch (err) { 524 exports.DOMException = function(message, name) { 525 this.message = message; 526 this.name = name; 527 var error = Error(message); 528 this.stack = error.stack; 529 }; 530 exports.DOMException.prototype = Object.create(Error.prototype); 531 exports.DOMException.prototype.constructor = exports.DOMException; 532 } 533 534 function fetch(input, init) { 535 return new Promise(function(resolve, reject) { 536 var request = new Request(input, init); 537 538 if (request.signal && request.signal.aborted) { 539 return reject(new exports.DOMException('Aborted', 'AbortError')) 540 } 541 542 var xhr = new XMLHttpRequest(); 543 544 function abortXhr() { 545 xhr.abort(); 546 } 547 548 xhr.onload = function() { 549 var options = { 550 statusText: xhr.statusText, 551 headers: parseHeaders(xhr.getAllResponseHeaders() || '') 552 }; 553 // This check if specifically for when a user fetches a file locally from the file system 554 // Only if the status is out of a normal range 555 if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) { 556 options.status = 200; 557 } else { 558 options.status = xhr.status; 559 } 560 options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); 561 var body = 'response' in xhr ? xhr.response : xhr.responseText; 562 setTimeout(function() { 563 resolve(new Response(body, options)); 564 }, 0); 565 }; 566 567 xhr.onerror = function() { 568 setTimeout(function() { 569 reject(new TypeError('Network request failed')); 570 }, 0); 571 }; 572 573 xhr.ontimeout = function() { 574 setTimeout(function() { 575 reject(new TypeError('Network request timed out')); 576 }, 0); 577 }; 578 579 xhr.onabort = function() { 580 setTimeout(function() { 581 reject(new exports.DOMException('Aborted', 'AbortError')); 582 }, 0); 583 }; 584 585 function fixUrl(url) { 586 try { 587 return url === '' && g.location.href ? g.location.href : url 588 } catch (e) { 589 return url 590 } 591 } 592 593 xhr.open(request.method, fixUrl(request.url), true); 594 595 if (request.credentials === 'include') { 596 xhr.withCredentials = true; 597 } else if (request.credentials === 'omit') { 598 xhr.withCredentials = false; 599 } 600 601 if ('responseType' in xhr) { 602 if (support.blob) { 603 xhr.responseType = 'blob'; 604 } else if ( 605 support.arrayBuffer 606 ) { 607 xhr.responseType = 'arraybuffer'; 608 } 609 } 610 611 if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) { 612 var names = []; 613 Object.getOwnPropertyNames(init.headers).forEach(function(name) { 614 names.push(normalizeName(name)); 615 xhr.setRequestHeader(name, normalizeValue(init.headers[name])); 616 }); 617 request.headers.forEach(function(value, name) { 618 if (names.indexOf(name) === -1) { 619 xhr.setRequestHeader(name, value); 620 } 621 }); 622 } else { 623 request.headers.forEach(function(value, name) { 624 xhr.setRequestHeader(name, value); 625 }); 626 } 627 628 if (request.signal) { 629 request.signal.addEventListener('abort', abortXhr); 630 631 xhr.onreadystatechange = function() { 632 // DONE (success or failure) 633 if (xhr.readyState === 4) { 634 request.signal.removeEventListener('abort', abortXhr); 635 } 636 }; 637 } 638 639 xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); 640 }) 641 } 642 643 fetch.polyfill = true; 644 645 if (!g.fetch) { 646 g.fetch = fetch; 647 g.Headers = Headers; 648 g.Request = Request; 649 g.Response = Response; 650 } 651 652 exports.Headers = Headers; 653 exports.Request = Request; 654 exports.Response = Response; 655 exports.fetch = fetch; 656 657
657Object.defineProperty(exports, '__esModule', { value: true }); 658 659}))); 660 661}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 662},{}],2:[function(require,module,exports){ 663"use strict"; 664 665var uaTestStrings = require('./uaTestStrings'); 666var browserDetect = window.browserDetect = module.exports = { 667 init: function init() { 668 this.detectBrowser(navigator.userAgent); 669 670 // uncomment to print test cases to console 671 // this.testBrowserDetection(); 672 }, 673 detectBrowser: function detectBrowser(uaString) { 674 // Edge (legacy) 675 if (uaString.indexOf('Edge/') > -1) { 676 this.browser = 'Edge'; 677 this.version = uaString.match(/Edge\/([^.]+)/)[1]; 678 } 679 // Edge (Chromium) 680 else if (uaString.indexOf('Edg/') > -1) { 681 this.browser = 'Edge'; 682 this.version = uaString.match(/Edg\/([^.]+)/)[1]; 683 } else if (uaString.indexOf('WOW64') > -1) { 684 // IE 9/10 685 if (uaString.indexOf('MSIE') > -1) { 686 this.browser = 'IE'; 687 this.version = '9/10'; 688 // IE 11 689 } else if (uaString.indexOf('rv:11') > -1) { 690 this.browser = 'IE'; 691 this.version = '11'; 692 } 693 } 694 // Firefox 695 else if (uaString.indexOf('Firefox') > -1) { 696 this.browser = 'Firefox'; 697 this.version = uaString.match(/Firefox\/([^.]+)/)[1]; 698 } else if (uaString.indexOf('Safari') > -1) { 699 // Chrome + Brave 700 if (uaString.indexOf('Chrome') > -1) { 701 this.browser = 'Chrome'; 702 this.version = uaString.match(/Chrome\/([^.]+)/)[1]; 703 } else { 704 // Safari (iPhone) 705 if (uaString.indexOf('iPhone') > -1) { 706 this.browser = '(iPhone/iPod) Safari'; 707 // Safari (iPad) 708 } else if (uaString.indexOf('iPad') > -1) { 709 this.browser = '(iPad) Safari'; 710 // Safari (desktop) 711 } else { 712 this.browser = 'Safari'; 713 } 714 this.version = uaString.match(/Version\/([^.]+)/)[1]; 715 } 716 } 717 return this.browser + ' ' + this.version; 718 }, 719 testBrowserDetection: function testBrowserDetection() { 720 console.log('current UA string: ' + navigator.userAgent); 721 for (var i = 0; i < uaTestStrings.length; i++) { 722 var uaString = uaTestStrings[i].string; 723 var expectedResult = uaTestStrings[i].output; 724 console.log('Expected: ' + expectedResult + '\n' + 'Actual: ' + this.detectBrowser(uaString)); 725 } 726 } 727}; 728 729},{"./uaTestStrings":4}],3:[function(require,module,exports){ 730"use strict"; 731 732require("./browserDetect"); 733require("whatwg-fetch"); 734var sniffer = window.sniffer = module.exports = { 735 init: function init() { 736 browserDetect.init(); 737 738 // Special case: Fetch polyfill does not work <= IE9, and we know we want 739 // to show modal on IE9/10 regardless, so fire immediately 740 if (browserDetect.browser === 'IE' && browserDetect.version === '9/10') { 741 sniffer.modalInit(); 742 // Otherwise, get values from JSON and determine if modal should show 743 } else { 744 fetch(sniffer.vars.supportedBrowsersEndpoint).then(function (response) { 745 if (response.ok) { 746 return response.json(); 747 } else { 748 console.error('Browser Sniffer - Error fetching supportedBrowsers.json'); 749 } 750 }).then(function (data) { 751 sniffer.vars.supportedBrowsers = data; 752 sniffer.vars.user = sniffer.helpers.getCookie('browserunsupported'); 753 var htmlTag = document.querySelector('html'); 754 if (sniffer.helpers.isMobile()) { 755 htmlTag.classList.add('mobile'); 756 } else { 757 htmlTag.classList.add('not-mobile'); 758 if (sniffer.suggestUpgrade() && sniffer.vars.user === '') { 759 sniffer.modalInit(); 760 } 761 } 762 if (!sniffer.vars.suggest && sniffer.vars.user === '') { 763 sniffer.detectSmallScreens(); 764 } 765 }).catch(function (err) { 766 console.error('Browser Sniffer - ', err); 767 }); 768 } 769 }, 770 suggestUpgrade: function suggestUpgrade() { 771 if (browserDetect.browser in sniffer.vars.supportedBrowsers) { 772 var minVersion = parseInt(sniffer.vars.supportedBrowsers[browserDetect.browser]); 773 var version = parseInt(browserDetect.version); 774 if (version < minVersion) { 775 sniffer.vars.suggest = true; 776 } 777 } else if (!(browserDetect.browser in sniffer.vars.supportedBrowsers
777)) { 778 sniffer.vars.suggest = true; 779 } 780 return sniffer.vars.suggest; 781 }, 782 modalInit: function modalInit() { 783 var modalBodyContent = '<div class="unsupported-browser__message-intro"> ' + '<img class="unsupported-browser__logo" src="/content/dam/illumina-common/logo/illumina-full_logo-RGB-black.gif">' + '<strong>Upgrade your browser or select an alternate</strong>' + '<p>For the best experience using our website, we recommend that you upgrade to a newer version or use another web browser. A list of the most popular web browsers can be found below.<p>' + '<p>Click on an icon below to go to the download page or <span class="unsupported-browser__close-modal" data-close-modal>close this notice</span> to continue with the current experience.</p>' + '</div>' + '<div class="unsupported-browser__message-option-row">' + '<div class="unsupported-browser__message-option-item">' + '<a href="http://www.google.com/chrome"><img src="/content/dam/illumina-marketing/images/unsupported-browser/chrome.gif"> Chrome</a>' + '</div>' + '<div class="unsupported-browser__message-option-item">' + '<a href="http://www.mozilla.org/"><img src="/content/dam/illumina-marketing/images/unsupported-browser/firefox.gif"> Firefox</a>' + '</div>' + '<div class="unsupported-browser__message-option-item">' + '<a href="http://www.apple.com/safari/"><img src="/content/dam/illumina-marketing/images/unsupported-browser/safari.gif"> Safari</a>' + '</div>' + '<div class="unsupported-browser__message-option-item">' + '<a href="https://www.microsoft.com/edge"><img src="/content/dam/illumina-marketing/images/unsupported-browser/edge.gif"> Edge</a>' + '</div>' + '</div>'; 784 if (window.ilmnModals) { 785 window.ilmnModals.init(); 786 ilmnModals.populateModal('', modalBodyContent, { 787 hideX: true 788 }); 789 document.getElementById('ilmn-modal').addEventListener('closed', sniffer.setUnsupportedBrowserCookie); 790 ilmnModals.openModal(); 791 } else { 792 sniffer.vars.legacyModal = document.createElement('div'); 793 var legacyModalContent = '' + '<div class="unsupported-browser__modal">' + '<div class="unsupported-browser__message-intro"> ' + '<img class="unsupported-browser__logo" src="/content/dam/illumina-common/logo/illumina-full_logo-RGB-black.gif">' + '<strong>Upgrade your browser or select an alternate</strong>' + '<p>For the best experience using our website, we recommend that you upgrade to a newer version or use another web browser. A list of the most popular web browsers can be found below.<p>' + '<p>Click on an icon below to go to the download page or <span class="unsupported-browser__close-modal" id="unsupported-browser-close-modal">close this notice</span>.</p>' + '</div>' + '<div class="unsupported-browser__message-option-row">' + '<div class="unsupported-browser__message-option-item">' + '<a href="http://www.google.com/chrome"><img src="/content/dam/illumina-marketing/images/unsupported-browser/chrome.gif"> Chrome</a>' + '</div>' + '<div class="unsupported-browser__message-option-item">' + '<a href="http://www.mozilla.org/"><img src="/content/dam/illumina-marketing/images/unsupported-browser/firefox.gif"> Firefox</a>' + '</div>' + '<div class="unsupported-browser__message-option-item">' + '<a href="http://www.apple.com/safari/"><img src="/content/dam/illumina-marketing/images/unsupported-browser/safari.gif"> Safari</a>' + '</div>' + '<div class="unsupported-browser__message-option-item">' + '<a href="https://www.microsoft.com/edge"><img src="/content/dam/illumina-marketing/images/unsupported-browser/edge.gif"> Edge</a>' + '</div>' + '</div>' + '</div>' + '<div class="unsupported-browser__modal-bg" id="unsupported-browser-modal-bg"></div>'; 794 sniffer.vars.legacyModal.classList.add('unsupported-browser'); 795 sniffer.vars.legacyModal.innerHTML = legacyModalContent; 796 document.body.appendChild(sniffer.vars.legacyModal); 797 document.getElementById('unsupported-browser-modal-bg').addEventListener('click', sniffer.closeLegacyModal); 798 document.getElementById('unsupported-browser-close-modal').addEventListener('click', sniffer.closeLegacyModal); 799 } 800 }, 801 closeLegacyModal: function closeLegacyModal() { 802 sniffer.vars.legacyModal.innerHTML = '';
803 sniffer.helpers.setCookie('browserunsupported', 'true', 1); 804 }, 805 setUnsupportedBrowserCookie: function setUnsupportedBrowserCookie(ev) { 806 document.getElementById('ilmn-modal').removeEventListener('closed', sniffer.setUnsupportedBrowserCookie); 807 sniffer.helpers.setCookie('browserunsupported', 'true', 1); 808 }, 809 detectSmallScreens: function detectSmallScreens() { 810 if (window.innerWidth <= 320 && window.innerHeight <= 568 || window.innerWidth <= 568 && window.innerHeight < 320) { 811 var messaging = '<p>Attention: Your experience may not be optimal on this screen size. Viewing on desktop or on a larger mobile device is recommended.</p><p><a href="#" data-close-modal>Got It</a></p>'; 812 if (window.ilmnModals) { 813 window.ilmnModals.init(); 814 ilmnModals.populateModal('', messaging); 815 document.getElementById('ilmn-modal').addEventListener('closed', sniffer.setUnsupportedBrowserCookie); 816 ilmnModals.openModal(); 817 } 818 } 819 }, 820 helpers: { 821 isMobile: function isMobile() { 822 var $isMobile = false; //initiate as false 823 // device detection 824 if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
824substr(0, 4)) || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && !window.MSStream) { 825 $isMobile = true; 826 } 827 return $isMobile; 828 }, 829 getCookie: function getCookie(cname) { 830 var name = cname + "="; 831 var ca = document.cookie.split(';'); 832 for (var i = 0; i < ca.length; i++) { 833 var c = ca[i]; 834 while (c.charAt(0) == ' ') { 835 c = c.substring(1); 836 } 837 if (c.indexOf(name) == 0) { 838 try { 839 return decodeURIComponent(c.substring(name.length, c.length)); 840 } catch (e) { 841 return c.substring(name.length, c.length); 842 } 843 } 844 } 845 return ""; 846 }, 847 setCookie: function setCookie(name, value, days, domain) { 848 if (!domain) { 849 domain = sniffer.helpers.getCookieDomain(); 850 } 851 var expires = ''; 852 if (days) { 853 var date = new Date(); 854 date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); 855 expires = '; expires=' + date.toUTCString(); 856 } 857 document.cookie = name + '=' + (value || '') + expires + '; path=/' + (domain ? ";domain=" + domain : ""); 858 }, 859 getEnvironment: function getEnvironment() { 860 var environments = { 861 prodPublish: ['www.illumina.com.cn', 'illumina.com.cn', 'jp.illumina.com', 'sapac.illumina.com', 'emea.illumina.com', 'www.illumina.com', 'support.illumina.com.cn', 'jp.support.illumina.com', 'sapac.support.illumina.com', 'emea.support.illumina.com', 'support.illumina.com'], 862 prodAuthor: ['prod-author.illumina.com'], 863 stagePublish: ['www.stg-web.illumina.com'], 864 stageAuthor: ['stage-author.illumina.com'], 865 etpVal: ['etp.val-web.illumina.com'], 866 etpValAuthor: ['val-author.illumina.com'], 867 etpTest: ['etp.tst-web.illumina.com'], 868 test: ['www.tst-web.illumina.com'] 869 }; 870 var currentHostname = window.location.hostname; 871 var env = 'localhost'; 872 for (var environment in environments) { 873 if (environments[environment].indexOf(currentHostname) > -1) { 874 env = String(environment).replace(/([A-Z])/g, function ($1) { 875 return "-" + $1.toLowerCase(); 876 }); 877 } 878 } 879 return env; 880 }, 881 getCookieDomain: function getCookieDomain() { 882 var domain = '.illumina.com'; // default 883 if (window.location.href.indexOf("illumina.com.cn") > -1 || window.location.href.indexOf("apac/zh_CN") > -1) { 884 domain = '.illumina.com.cn'; 885 } else if (sniffer.helpers.getEnvironment() === 'localhost') { 886 domain = 'localhost'; 887 } 888 return domain; 889 } 890 }, 891 vars: { 892 user: '', 893 isMobile: false, 894 userAgent: navigator.userAgent, 895 suggest: false, 896 supportedBrowsersEndpoint: '/content/dam/illumina-common/sniffer/supportedBrowsers.json', 897 supportedBrowsers: {}, 898 legacyModal: {} 899 } 900}; 901if (document.readyState !== 'loading') { 902 sniffer.init(); 903} else { 904 document.addEventListener('DOMContentLoaded', sniffer.init); 905} 906 907},{"./browserDetect":2,"whatwg-fetch":1}],4:[function(require,module,exports){ 908"use strict"; 909 910var uaTestStrings = [{ 911 output: 'Edge 14', 912 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393' 913}, { 914 output: 'Edge 16', 915 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299' 916}, { 917 output: 'Edge 17', 918 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134' 919}, { 920 output: 'Edge 18', 921 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363' 922}, { 923 output: 'Edge 80', 924 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.106 Safari/537.36 Edg/80.0.361.56' 925}, { 926 output: 'IE 9', 927 string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)' 928}, { 929 output: 'IE 10', 930 string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)' 931}, { 932 output: 'IE 11', 933 string: 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko' 934}, { 935 output: 'Firefox 50', 936 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0' 937}, { 938 output: 'Firefox 65', 939 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0' 940}, { 941 output: 'Firefox 69', 942 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0' 943}, { 944 output: 'Firefox 70', 945 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0' 946}, { 947 output: 'Firefox 83', 948 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0' 949}, { 950 output: 'Chrome 50', 951 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36' 952}, { 953 output: 'Chrome 69', 954 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36' 955}, { 956 output: 'Chrome 70', 957 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36' 958}, { 959 output: 'Chrome 83', 960 string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36' 961}, { 962 output: 'Safari 8', 963 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9' 964}, { 965 output: 'Safari 9', 966 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/601.7.8' 967}, { 968 output: 'Safari 10', 969 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8' 970}, { 971 output: 'Safari 11', 972 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Safari/605.1.15' 973}, { 974 output: 'Safari 12', 975 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15' 976}, { 977 output: 'Safari 13', 978 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15' 979}, { 980 output: 'Safari 14', 981 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15' 982}, { 983 output: 'Chrome 87', 984 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36' 985}, { 986 output: 'Firefox 83', 987 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0' 988}, 989// { 990// output: 'Brave 1', 991// string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Safari/537.36]' 992// }, 993{ 994 output: '(iPhone/iPod) Safari 12', 995 string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1' 996}, { 997 output: '(iPhone/iPod) Safari 14', 998 string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1' 999}, { 1000 output: '(iPad) Safari 12', 1001 string: 'Mozilla/5.0 (iPad; CPU OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1' 1002}, { 1003 output: '(iPad) Safari 14', 1004 string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15' 1005}]; 1006module.exports = uaTestStrings; 1007 1008},{}]},{},[3]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.