5
(function (global, factory) {
6
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
7
typeof define === 'function' && define.amd ? define(['exports'], factory) :
8
(factory((global['fontawesome-free-conflict-detection'] = {})));
9
}(this, (function (exports) { 'use strict';
11
function _typeof(obj) {
12
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
13
_typeof = function (obj) {
17
_typeof = function (obj) {
18
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
25
function _defineProperty(obj, key, value) {
27
Object.defineProperty(obj, key, {
40
function _objectSpread(target) {
41
for (var i = 1; i < arguments.length; i++) {
42
var source = arguments[i] != null ? arguments[i] : {};
43
var ownKeys = Object.keys(source);
45
if (typeof Object.getOwnPropertySymbols === 'function') {
46
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
47
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
51
ownKeys.forEach(function (key) {
52
_defineProperty(target, key, source[key]);
63
if (typeof window !== 'undefined') _WINDOW = window;
64
if (typeof document !== 'undefined') _DOCUMENT = document;
67
var _ref = _WINDOW.navigator || {},
68
_ref$userAgent = _ref.userAgent,
69
userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;
72
var DOCUMENT = _DOCUMENT;
73
var IS_BROWSER = !!WINDOW.document;
74
var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';
75
var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
79
var listener = function listener() {
80
DOCUMENT.removeEventListener('DOMContentLoaded', listener);
82
functions.map(function (fn) {
90
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
91
if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);
94
function domready (fn) {
96
loaded ? setTimeout(fn, 0) : functions.push(fn);
99
function report (_ref) {
100
var nodesTested = _ref.nodesTested,
101
nodesFound = _ref.nodesFound;
102
var timedOutTests = {};
104
for (var key in nodesFound) {
105
if (!(nodesTested.conflict[key] || nodesTested.noConflict[key])) {
106
timedOutTests[key] = nodesFound[key];
110
var conflictsCount = Object.keys(nodesTested.conflict).length;
112
if (conflictsCount > 0) {
113
console.info("%cConflict".concat(conflictsCount > 1 ? 's' : '', " found:"), 'color: darkred; font-size: large');
116
for (var _key in nodesTested.conflict) {
117
var item = nodesTested.conflict[_key];
119
'tagName': item.tagName,
120
'src/href': item.src || item.href || 'n/a',
121
'innerText excerpt': item.innerText && item.innerText !== '' ? item.innerText.slice(0, 200) + '...' : '(empty)'
128
var noConflictsCount = Object.keys(nodesTested.noConflict).length;
130
if (noConflictsCount > 0) {
131
console.info("%cNo conflict".concat(noConflictsCount > 1 ? 's' : '', " found with ").concat(noConflictsCount == 1 ? 'this' : 'these', ":"), 'color: green; font-size: large');
134
for (var _key2 in nodesTested.noConflict) {
135
var _item = nodesTested.noConflict[_key2];
137
'tagName': _item.tagName,
138
'src/href': _item.src || _item.href || 'n/a',
139
'innerText excerpt': _item.innerText && _item.innerText !== '' ? _item.innerText.slice(0, 200) + '...' : '(empty)'
143
console.table(_data);
146
var timeOutCount = Object.keys(timedOutTests).length;
148
if (timeOutCount > 0) {
149
console.info("%cLeftovers--we timed out before collecting test results for ".concat(timeOutCount == 1 ? 'this' : 'these', ":"), 'color: blue; font-size: large');
152
for (var _key3 in timedOutTests) {
153
var _item2 = timedOutTests[_key3];
155
'tagName': _item2.tagName,
156
'src/href': _item2.src || _item2.href || 'n/a',
157
'innerText excerpt': _item2.innerText && _item2.innerText !== '' ? _item2.innerText.slice(0, 200) + '...' : '(empty)'
161
console.table(_data2);
165
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
167
function createCommonjsModule(fn, module) {
168
return module = { exports: {} }, fn(module, module.exports), module.exports;
171
var md5 = createCommonjsModule(function (module) {
183
function safeAdd(x, y) {
184
var lsw = (x & 0xffff) + (y & 0xffff);
185
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
186
return msw << 16 | lsw & 0xffff;
197
function bitRotateLeft(num, cnt) {
198
return num << cnt | num >>> 32 - cnt;
213
function md5cmn(q, a, b, x, s, t) {
214
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
230
function md5ff(a, b, c, d, x, s, t) {
231
return md5cmn(b & c | ~b & d, a, b, x, s, t);
247
function md5gg(a, b, c, d, x, s, t) {
248
return md5cmn(b & d | c & ~d, a, b, x, s, t);
264
function md5hh(a, b, c, d, x, s, t) {
265
return md5cmn(b ^ c ^ d, a, b, x, s, t);
281
function md5ii(a, b, c, d, x, s, t) {
282
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
293
function binlMD5(x, len) {
295
x[len >> 5] |= 0x80 << len % 32;
296
x[(len + 64 >>> 9 << 4) + 14] = len;
307
for (i = 0; i < x.length; i += 16) {
312
a = md5ff(a, b, c, d, x[i], 7, -680876936);
313
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
314
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
315
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
316
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
317
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
318
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
319
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
320
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
321
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
322
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
323
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
324
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
325
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
326
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
327
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
328
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
329
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
330
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
331
b = md5gg(b, c, d, a, x[i], 20, -373897302);
332
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
333
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
334
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
335
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
336
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
337
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
338
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
339
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
340
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
341
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
342
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
343
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
344
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
345
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
346
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
347
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
348
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
349
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
350
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
351
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
352
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
353
d = md5hh(d, a, b, c, x[i], 11, -358537222);
354
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
355
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
356
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
357
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
358
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
359
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
360
a = md5ii(a, b, c, d, x[i], 6, -198630844);
361
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
362
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
363
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
364
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
365
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
366
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
367
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
368
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
369
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
370
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
371
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
372
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
373
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
374
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
375
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
376
a = safeAdd(a, olda);
377
b = safeAdd(b, oldb);
378
c = safeAdd(c, oldc);
379
d = safeAdd(d, oldd);
392
function binl2rstr(input) {
395
var length32 = input.length * 32;
397
for (i = 0; i < length32; i += 8) {
398
output += String.fromCharCode(input[i >> 5] >>> i % 32 & 0xff);
412
function rstr2binl(input) {
415
output[(input.length >> 2) - 1] = undefined;
417
for (i = 0; i < output.length; i += 1) {
421
var length8 = input.length * 8;
423
for (i = 0; i < length8; i += 8) {
424
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32;
437
function rstrMD5(s) {
438
return binl2rstr(binlMD5(rstr2binl(s), s.length * 8));
449
function rstrHMACMD5(key, data) {
451
var bkey = rstr2binl(key);
455
ipad[15] = opad[15] = undefined;
457
if (bkey.length > 16) {
458
bkey = binlMD5(bkey, key.length * 8);
461
for (i = 0; i < 16; i += 1) {
462
ipad[i] = bkey[i] ^ 0x36363636;
463
opad[i] = bkey[i] ^ 0x5c5c5c5c;
466
hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
467
return binl2rstr(binlMD5(opad.concat(hash), 512 + 128));
477
function rstr2hex(input) {
478
var hexTab = '0123456789abcdef';
483
for (i = 0; i < input.length; i += 1) {
484
x = input.charCodeAt(i);
485
output += hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f);
498
function str2rstrUTF8(input) {
499
return unescape(encodeURIComponent(input));
510
return rstrMD5(str2rstrUTF8(s));
521
return rstr2hex(rawMD5(s));
532
function rawHMACMD5(k, d) {
533
return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d));
544
function hexHMACMD5(k, d) {
545
return rstr2hex(rawHMACMD5(k, d));
559
function md5(string, key, raw) {
562
return hexMD5(string);
565
return rawMD5(string);
569
return hexHMACMD5(key, string);
572
return rawHMACMD5(key, string);
575
if (module.exports) {
576
module.exports = md5;
583
function md5ForNode(node) {
584
if (null === node || 'object' !== _typeof(node)) return undefined;
587
return md5(node.src);
588
} else if (node.href) {
589
return md5(node.href);
590
} else if (node.innerText && '' !== node.innerText) {
592
return md5(node.innerText);
598
var diagScriptId = 'fa-kits-diag';
599
var nodeUnderTestId = 'fa-kits-node-under-test';
600
var md5Attr = 'data-md5';
601
var detectionIgnoreAttr = 'data-fa-detection-ignore';
602
var timeoutAttr = 'data-fa-detection-timeout';
603
var resultsCollectionMaxWaitAttr = 'data-fa-detection-results-collection-max-wait';
605
var silenceErrors = function silenceErrors(e) {
610
function pollUntil(_ref) {
611
var _ref$fn = _ref.fn,
612
fn = _ref$fn === void 0 ? function () {
615
_ref$initialDuration = _ref.initialDuration,
616
initialDuration = _ref$initialDuration === void 0 ? 1 : _ref$initialDuration,
617
_ref$maxDuration = _ref.maxDuration,
618
maxDuration = _ref$maxDuration === void 0 ? WINDOW.FontAwesomeDetection.timeout : _ref$maxDuration,
619
_ref$showProgress = _ref.showProgress,
620
showProgress = _ref$showProgress === void 0 ? false : _ref$showProgress,
621
progressIndicator = _ref.progressIndicator;
622
return new Promise(function (resolve, reject) {
624
function poll(duration, cumulativeDuration) {
625
setTimeout(function () {
629
console.info(progressIndicator);
636
var nextDuration = 250;
637
var nextCumulativeDuration = nextDuration + cumulativeDuration;
639
if (nextCumulativeDuration <= maxDuration) {
640
poll(nextDuration, nextCumulativeDuration);
648
poll(initialDuration, 0);
652
function detectWebfontConflicts() {
653
var linkTags = Array.from(DOCUMENT.getElementsByTagName('link')).filter(function (t) {
654
return !t.hasAttribute(detectionIgnoreAttr);
656
var styleTags = Array.from(DOCUMENT.getElementsByTagName('style')).filter(function (t) {
657
if (t.hasAttribute(detectionIgnoreAttr)) {
664
if (WINDOW.FontAwesomeConfig && t.innerText.match(new RegExp("svg:not\\(:root\\)\\.".concat(WINDOW.FontAwesomeConfig.replacementClass)))) {
671
function runDiag(scriptOrLinkTag, md5) {
672
var diagFrame = DOCUMENT.createElement('iframe');
675
diagFrame.setAttribute('style', 'visibility: hidden; position: absolute; height: 0; width: 0;');
676
var testIconId = 'fa-test-icon-' + md5;
677
var iTag = DOCUMENT.createElement('i');
678
iTag.setAttribute('class', 'fa fa-coffee');
679
iTag.setAttribute('id', testIconId);
680
var diagScript = DOCUMENT.createElement('script');
681
diagScript.setAttribute('id', diagScriptId);
689
var diagScriptFun = function diagScriptFun(nodeUnderTestId, testIconId, md5, parentOrigin) {
690
parent.FontAwesomeDetection.__pollUntil({
692
var iEl = document.getElementById(testIconId);
693
var computedStyle = window.getComputedStyle(iEl);
694
var fontFamily = computedStyle.getPropertyValue('font-family');
696
if (!!fontFamily.match(/FontAwesome/) || !!fontFamily.match(/Font Awesome 5/)) {
702
}).then(function () {
703
var node = document.getElementById(nodeUnderTestId);
705
type: 'fontawesome-conflict',
706
technology: 'webfont',
708
innerText: node.innerText,
709
tagName: node.tagName,
712
}).catch(function (e) {
713
var node = document.getElementById(nodeUnderTestId);
715
if (e === 'timeout') {
718
technology: 'webfont',
720
innerText: node.innerText,
721
tagName: node.tagName,
730
var parentOrigin = WINDOW.location.origin === 'file://' ? '*' : WINDOW.location.origin;
731
diagScript.innerText = "(".concat(diagScriptFun.toString(), ")('").concat(nodeUnderTestId, "', '").concat(testIconId || 'foo', "', '").concat(md5, "', '").concat(parentOrigin, "');");
733
diagFrame.onload = function () {
734
diagFrame.contentWindow.addEventListener('error', silenceErrors, true);
735
diagFrame.contentDocument.head.appendChild(diagScript);
736
diagFrame.contentDocument.head.appendChild(scriptOrLinkTag);
737
diagFrame.contentDocument.body.appendChild(iTag);
740
domready(function () {
741
return DOCUMENT.body.appendChild(diagFrame);
747
for (var i = 0; i < linkTags.length; i++) {
748
var linkUnderTest = DOCUMENT.createElement('link');
749
linkUnderTest.setAttribute('id', nodeUnderTestId);
750
linkUnderTest.setAttribute('href', linkTags[i].href);
751
linkUnderTest.setAttribute('rel', linkTags[i].rel);
752
var md5ForLink = md5ForNode(linkTags[i]);
753
linkUnderTest.setAttribute(md5Attr, md5ForLink);
754
cssByMD5[md5ForLink] = linkTags[i];
755
runDiag(linkUnderTest, md5ForLink);
758
for (var _i = 0; _i < styleTags.length; _i++) {
759
var styleUnderTest = DOCUMENT.createElement('style');
760
styleUnderTest.setAttribute('id', nodeUnderTestId);
761
var md5ForStyle = md5ForNode(styleTags[_i]);
762
styleUnderTest.setAttribute(md5Attr, md5ForStyle);
763
styleUnderTest.innerText = styleTags[_i].innerText;
764
cssByMD5[md5ForStyle] = styleTags[_i];
765
runDiag(styleUnderTest, md5ForStyle);
771
function detectSvgConflicts(currentScript) {
772
var scripts = Array.from(DOCUMENT.scripts).filter(function (t) {
773
return !t.hasAttribute(detectionIgnoreAttr) && t !== currentScript;
775
var scriptsByMD5 = {};
777
var _loop = function _loop(scriptIdx) {
778
var diagFrame = DOCUMENT.createElement('iframe');
779
diagFrame.setAttribute('style', 'display:none;');
780
var scriptUnderTest = DOCUMENT.createElement('script');
781
scriptUnderTest.setAttribute('id', nodeUnderTestId);
782
var md5ForScript = md5ForNode(scripts[scriptIdx]);
783
scriptUnderTest.setAttribute(md5Attr, md5ForScript);
784
scriptsByMD5[md5ForScript] = scripts[scriptIdx];
786
if (scripts[scriptIdx].src !== '') {
787
scriptUnderTest.src = scripts[scriptIdx].src;
790
if (scripts[scriptIdx].innerText !== '') {
791
scriptUnderTest.innerText = scripts[scriptIdx].innerText;
794
scriptUnderTest.async = true;
795
var diagScript = DOCUMENT.createElement('script');
796
diagScript.setAttribute('id', diagScriptId);
797
var parentOrigin = WINDOW.location.origin === 'file://' ? '*' : WINDOW.location.origin;
799
var diagScriptFun = function diagScriptFun(nodeUnderTestId, md5, parentOrigin) {
800
parent.FontAwesomeDetection.__pollUntil({
802
return !!window.FontAwesomeConfig || !!window.FontAwesomeKitConfig;
804
}).then(function () {
805
var scriptNode = document.getElementById(nodeUnderTestId);
807
type: 'fontawesome-conflict',
810
innerText: scriptNode.innerText,
811
tagName: scriptNode.tagName,
814
}).catch(function (e) {
815
var scriptNode = document.getElementById(nodeUnderTestId);
817
if (e === 'timeout') {
821
innerText: scriptNode.innerText,
822
tagName: scriptNode.tagName,
831
diagScript.innerText = "(".concat(diagScriptFun.toString(), ")('").concat(nodeUnderTestId, "', '").concat(md5ForScript, "', '").concat(parentOrigin, "');");
833
diagFrame.onload = function () {
834
diagFrame.contentWindow.addEventListener('error', silenceErrors, true);
835
diagFrame.contentDocument.head.appendChild(diagScript);
836
diagFrame.contentDocument.head.appendChild(scriptUnderTest);
839
domready(function () {
840
return DOCUMENT.body.appendChild(diagFrame);
844
for (var scriptIdx = 0; scriptIdx < scripts.length; scriptIdx++) {
851
function setDoneResults(_ref2) {
852
var nodesTested = _ref2.nodesTested,
853
nodesFound = _ref2.nodesFound;
854
WINDOW.FontAwesomeDetection = WINDOW.FontAwesomeDetection || {};
855
WINDOW.FontAwesomeDetection.nodesTested = nodesTested;
856
WINDOW.FontAwesomeDetection.nodesFound = nodesFound;
857
WINDOW.FontAwesomeDetection.detectionDone = true;
860
function conflictDetection() {
861
var report$$1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
867
WINDOW.onmessage = function (e) {
868
if (WINDOW.location.origin === 'file://' || e.origin === WINDOW.location.origin) {
870
if (e.data.type === 'fontawesome-conflict') {
871
nodesTested.conflict[e.data.md5] = e.data;
872
} else if (e.data.type === 'no-conflict') {
873
nodesTested.noConflict[e.data.md5] = e.data;
879
var scriptsToTest = detectSvgConflicts(DOCUMENT.currentScript);
880
var cssToTest = detectWebfontConflicts();
882
var nodesFound = _objectSpread({}, scriptsToTest, cssToTest);
884
var testCount = Object.keys(scriptsToTest).length + Object.keys(cssToTest).length;
891
var masterTimeout = WINDOW.FontAwesomeDetection.timeout + WINDOW.FontAwesomeDetection.resultsCollectionMaxWait;
892
console.group('Font Awesome Detector');
894
if (testCount === 0) {
895
console.info('%cAll Good!', 'color: green; font-size: large');
896
console.info('We didn\'t find anything that needs testing for conflicts. Ergo, no conflicts.');
898
console.info("Testing ".concat(testCount, " possible conflicts."));
899
console.info("We'll wait about ".concat(Math.round(WINDOW.FontAwesomeDetection.timeout / 10) / 100, " seconds while testing these and\n") + "then up to another ".concat(Math.round(WINDOW.FontAwesomeDetection.resultsCollectionMaxWait / 10) / 100, " to allow the browser time\n") + "to accumulate the results. But we'll probably be outta here way before then.\n\n");
900
console.info("You can adjust those durations by assigning values to these attributes on the <script> element that loads this detection:");
901
console.info("\t%c".concat(timeoutAttr, "%c: milliseconds to wait for each test before deciding whether it's a conflict."), 'font-weight: bold;', 'font-size: normal;');
902
console.info("\t%c".concat(resultsCollectionMaxWaitAttr, "%c: milliseconds to wait for the browser to accumulate test results before giving up."), 'font-weight: bold;', 'font-size: normal;');
905
maxDuration: masterTimeout,
907
progressIndicator: 'waiting...',
909
return Object.keys(nodesTested.conflict).length + Object.keys(nodesTested.noConflict).length >= testCount;
911
}).then(function () {
912
console.info('DONE!');
914
nodesTested: nodesTested,
915
nodesFound: nodesFound
918
nodesTested: nodesTested,
919
nodesFound: nodesFound
922
}).catch(function (e) {
923
if (e === 'timeout') {
924
console.info('TIME OUT! We waited until we got tired. Here\'s what we found:');
926
nodesTested: nodesTested,
927
nodesFound: nodesFound
930
nodesTested: nodesTested,
931
nodesFound: nodesFound
934
console.info('Whoops! We hit an error:', e);
935
console.info('Here\'s what we\'d found up until that error:');
937
nodesTested: nodesTested,
938
nodesFound: nodesFound
941
nodesTested: nodesTested,
942
nodesFound: nodesFound
951
var initialConfig = WINDOW.FontAwesomeDetection || {};
955
timeout: +(DOCUMENT.currentScript.getAttribute(timeoutAttr) || "2000"),
956
resultsCollectionMaxWait: +(DOCUMENT.currentScript.getAttribute(resultsCollectionMaxWaitAttr) || "5000")
959
var _config = _objectSpread({}, _default, initialConfig, {
961
__pollUntil: pollUntil,
962
md5ForNode: md5ForNode,
963
detectionDone: false,
968
WINDOW.FontAwesomeDetection = _config;
970
var PRODUCTION = function () {
972
return process.env.NODE_ENV === 'production';
978
function bunker(fn) {
989
if (IS_BROWSER && IS_DOM) {
990
conflictDetection(window.FontAwesomeDetection.report);
994
exports.conflictDetection = conflictDetection;
996
Object.defineProperty(exports, '__esModule', { value: true });