1var EasyAffiliateLinks; 2/******/ (() => { // webpackBootstrap 3/******/ var __webpack_modules__ = ({ 4 5/***/ 4181: 6/***/ (function() { 7 8var _this = this; 9 10function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } 11 12function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 13 14function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 15 16function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 17 18function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 19 20function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 21 22function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 23 24window.EasyAffiliateLinks = window.EasyAffiliateLinks || {}; 25window.EasyAffiliateLinks.clicks = { 26 init: function init() { 27 // On Click Direct Link 28 document.addEventListener('click', function (e) { 29 for (var target = e.target; target && target != _this; target = target.parentNode) { 30 if (target.classList && target.classList.contains('eafl-link-direct')) { 31 window.EasyAffiliateLinks.clicks.onClickDirectLink(target, e); 32 break; 33 } 34 } 35 }, false); // Check any HTML links. 36 37 var htmlLinks = _toConsumableArray(document.querySelectorAll('.eafl-link-html')); 38 39 var _iterator = _createForOfIteratorHelper(htmlLinks), 40 _step; 41 42 try { 43 for (_iterator.s(); !(_step = _iterator.n()).done;) { 44 var htmlLink = _step.value; 45 window.EasyAffiliateLinks.clicks.initHtmlLink(htmlLink); 46 } 47 } catch (err) { 48 _iterator.e(err); 49 } finally { 50 _iterator.f(); 51 } 52 }, 53 initHtmlLink: function initHtmlLink(container) { 54 var eaflId = parseInt(container.dataset.eaflId); 55 56 if (0 < eaflId) { 57 // Check for links inside first. 58 var links = _toConsumableArray(container.querySelectorAll('a')); 59 60 if (0 < links.length) { 61 var _iterator2 = _createForOfIteratorHelper(links), 62 _step2; 63 64 try { 65 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { 66 var link = _step2.value; 67 link.addEventListener('click', function (e) { 68 window.EasyAffiliateLinks.clicks.register(eaflId); 69 }); 70 } 71 } catch (err) { 72 _iterator2.e(err); 73 } finally { 74 _iterator2.f(); 75 } 76 } else { 77 // No links? Check for iframe. 78 var iframes = _toConsumableArray(container.querySelectorAll('iframe')); 79 80 var _iterator3 = _createForOfIteratorHelper(iframes), 81 _step3; 82 83 try { 84 for (_iterator3.s();
84 !(_step3 = _iterator3.n()).done;) { 85 var iframe = _step3.value; 86 window.EasyAffiliateLinks.clicks.iframeListen(eaflId, iframe); 87 } 88 } catch (err) { 89 _iterator3.e(err); 90 } finally { 91 _iterator3.f(); 92 } 93 } 94 } 95 }, 96 iframeElems: [], 97 iframeIds: [], 98 iframeLastClicked: false, 99 iframeTimeout: false, 100 iframeListen: function iframeListen(eaflId, elem) { 101 var clicks = window.EasyAffiliateLinks.clicks; 102 103 if (false === clicks.iframeTimeout) { 104 // Start listening for iframe clicks. 105 clicks.iframeTimeout = setInterval(function () { 106 var elem = document.activeElement; 107 108 if (elem && elem.tagName == 'IFRAME' && clicks.iframeElems.includes(elem)) { 109 var index = clicks.iframeElems.indexOf(elem); 110 var eaflIdClicked = clicks.iframeIds[index]; 111 112 if (eaflIdClicked && eaflIdClicked !== clicks.iframeLastClicked) { 113 clicks.register(eaflIdClicked); 114 clicks.iframeLastClicked = eaflIdClicked; 115 } 116 } 117 }, 250); 118 } // Add elem to iframe elems. 119 120 121 clicks.iframeElems.push(elem); 122 clicks.iframeIds.push(eaflId); 123 }, 124 onClickDirectLink: function onClickDirectLink(elem, e) { 125 var id = elem.dataset.eaflId; 126 127 if (!id) { 128 id = elem.dataset.eaflGridId; 129 } 130 131 if (id) { 132 window.EasyAffiliateLinks.clicks.register(id); 133 } 134 }, 135 register: function register(id) { 136 id = parseInt(id); 137 138 if (0 < id) { 139 fetch(eafl_public.ajax_url, { 140 method: 'POST', 141 credentials: 'same-origin', 142 body: 'action=eafl_register_click&link=' + id + '&security=' + eafl_public.nonce, 143 headers: { 144 'Accept': 'application/json, text/plain, */*', 145 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' 146 } 147 }); 148 } 149 } 150}; 151ready(function () { 152 window.EasyAffiliateLinks.clicks.init(); 153}); 154 155function ready(fn) { 156 if (document.readyState != 'loading') { 157 fn(); 158 } else { 159 document.addEventListener('DOMContentLoaded', fn); 160 } 161} 162 163/***/ }) 164 165/******/ }); 166/************************************************************************/ 167/******/ // The module cache 168/******/ var __webpack_module_cache__ = {}; 169/******/ 170/******/ // The require function 171/******/ function __webpack_require__(moduleId) { 172/******/ // Check if module is in cache 173/******/ var cachedModule = __webpack_module_cache__[moduleId]; 174/******/ if (cachedModule !== undefined) { 175/******/ return cachedModule.exports; 176/******/ } 177/******/ // Create a new module (and put it into the cache) 178/******/ var module = __webpack_module_cache__[moduleId] = { 179/******/ // no module.id needed 180/******/ // no module.loaded needed 181/******/ exports: {} 182/******/ }; 183/******/ 184/******/ // Execute the module function 185/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); 186/******/ 187/******/ // Return the exports of the module 188/******/ return module.exports; 189/******/ } 190/******/ 191/************************************************************************/ 192/******/ /* webpack/runtime/make namespace object */ 193/******/ (() => { 194/******/ // define __esModule on exports 195/******/ __webpack_require__.r = (exports) => { 196/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 197/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 198/******/ } 199/******/ Object.defineProperty(exports, '__esModule', { value: true }); 200/******/ }; 201/******/ })(); 202/******/ 203/************************************************************************/ 204var __webpack_exports__ = {}; 205// This entry need to be wrapped in an IIFE because it need to be in strict mode. 206(() => { 207"use strict";
vendor: 8,892 bytes, lines 208-543
208// ESM COMPAT FLAG 209__webpack_require__.r(__webpack_exports__); 210 211;// CONCATENATED MODULE: ./node_modules/whatwg-fetch/fetch.js 212var global = 213 (typeof globalThis !== 'undefined' && globalThis) || 214 (typeof self !== 'undefined' && self) || 215 (typeof global !== 'undefined' && global) 216 217var support = { 218 searchParams: 'URLSearchParams' in global, 219 iterable: 'Symbol' in global && 'iterator' in Symbol, 220 blob: 221 'FileReader' in global && 222 'Blob' in global && 223 (function() { 224 try { 225 new Blob() 226 return true 227 } catch (e) { 228 return false 229 } 230 })(), 231 formData: 'FormData' in global, 232 arrayBuffer: 'ArrayBuffer' in global 233} 234 235function isDataView(obj) { 236 return obj && DataView.prototype.isPrototypeOf(obj) 237} 238 239if (support.arrayBuffer) { 240 var viewClasses = [ 241 '[object Int8Array]', 242 '[object Uint8Array]', 243 '[object Uint8ClampedArray]', 244 '[object Int16Array]', 245 '[object Uint16Array]', 246 '[object Int32Array]', 247 '[object Uint32Array]', 248 '[object Float32Array]', 249 '[object Float64Array]' 250 ] 251 252 var isArrayBufferView = 253 ArrayBuffer.isView || 254 function(obj) { 255 return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 256 } 257} 258 259function normalizeName(name) { 260 if (typeof name !== 'string') { 261 name = String(name) 262 } 263 if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') { 264 throw new TypeError('Invalid character in header field name: "' + name + '"') 265 } 266 return name.toLowerCase() 267} 268 269function normalizeValue(value) { 270 if (typeof value !== 'string') { 271 value = String(value) 272 } 273 return value 274} 275 276// Build a destructive iterator for the value list 277function iteratorFor(items) { 278 var iterator = { 279 next: function() { 280 var value = items.shift() 281 return {done: value === undefined, value: value} 282 } 283 } 284 285 if (support.iterable) { 286 iterator[Symbol.iterator] = function() { 287 return iterator 288 } 289 } 290 291 return iterator 292} 293 294function Headers(headers) { 295 this.map = {} 296 297 if (headers instanceof Headers) { 298 headers.forEach(function(value, name) { 299 this.append(name, value) 300 }, this) 301 } else if (Array.isArray(headers)) { 302 headers.forEach(function(header) { 303 this.append(header[0], header[1]) 304 }, this) 305 } else if (headers) { 306 Object.getOwnPropertyNames(headers).forEach(function(name) { 307 this.append(name, headers[name]) 308 }, this) 309 } 310} 311 312Headers.prototype.append = function(name, value) { 313 name = normalizeName(name) 314 value = normalizeValue(value) 315 var oldValue = this.map[name] 316 this.map[name] = oldValue ? oldValue + ', ' + value : value 317} 318 319Headers.prototype['delete'] = function(name) { 320 delete this.map[normalizeName(name)] 321} 322 323Headers.prototype.get = function(name) { 324 name = normalizeName(name) 325 return this.has(name) ? this.map[name] : null 326} 327 328Headers.prototype.has = function(name) { 329 return this.map.hasOwnProperty(normalizeName(name)) 330} 331 332Headers.prototype.set = function(name, value) { 333 this.map[normalizeName(name)] = normalizeValue(value) 334} 335 336Headers.prototype.forEach = function(callback, thisArg) { 337 for (var name in this.map) { 338 if (this.map.hasOwnProperty(name)) { 339 callback.call(thisArg, this.map[name], name, this) 340 } 341 } 342} 343 344Headers.prototype.keys = function() { 345 var items = [] 346 this.forEach(function(value, name) { 347 items.push(name) 348 }) 349 return iteratorFor(items) 350} 351 352Headers.prototype.values = function() { 353 var items = [] 354 this.forEach(function(value) { 355 items.push(value) 356 }) 357 return iteratorFor(items) 358} 359 360Headers.prototype.entries = function() { 361 var items = [] 362 this.forEach(function(value, name) { 363 items.push([name, value]) 364 }) 365 return iteratorFor(items) 366} 367 368if (support.iterable) { 369 Headers.prototype[Symbol.iterator] = Headers.prototype.entries 370} 371 372function consumed(body) { 373 if (body.bodyUsed) { 374 return Promise.reject(new TypeError('Already read')) 375 } 376 body.bodyUsed = true 377} 378 379function fileReaderReady(reader) { 380 return new Promise(function(resolve, reject) { 381 reader.onload = function() { 382 resolve(reader.result) 383 } 384 reader.onerror = function() { 385 reject(reader.error) 386 } 387 }) 388} 389 390function readBlobAsArrayBuffer(blob) { 391 var reader = new FileReader() 392 var promise = fileReaderReady(reader) 393 reader.readAsArrayBuffer(blob) 394 return promise 395} 396 397function readBlobAsText(blob) { 398 var reader = new FileReader() 399 var promise = fileReaderReady(reader) 400 reader.readAsText(blob) 401 return promise 402} 403 404function readArrayBufferAsText(buf) { 405 var view = new Uint8Array(buf) 406 var chars = new Array(view.length) 407 408 for (var i = 0; i < view.length; i++) { 409 chars[i] = String.fromCharCode(view[i]) 410 } 411 return chars.join('') 412} 413 414function bufferClone(buf) { 415 if (buf.slice) { 416 return buf.slice(0) 417 } else { 418 var view = new Uint8Array(buf.byteLength) 419 view.set(new Uint8Array(buf)) 420 return view.buffer 421 } 422} 423 424function Body() { 425 this.bodyUsed = false 426 427 this._initBody = function(body) { 428 /* 429 fetch-mock wraps the Response object in an ES6 Proxy to 430 provide useful test harness features such as flush. However, on 431 ES5 browsers without fetch or Proxy support pollyfills must be used; 432 the proxy-pollyfill is unable to proxy an attribute unless it exists 433 on the object before the Proxy is created. This change ensures 434 Response.bodyUsed exists on the instance, while maintaining the 435 semantic of setting Request.bodyUsed in the constructor before 436 _initBody is called. 437 */ 438 this.bodyUsed = this.bodyUsed 439 this._bodyInit = body 440 if (!body) { 441 this._bodyText = '' 442 } else if (typeof body === 'string') { 443 this._bodyText = body 444 } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { 445 this._bodyBlob = body 446 } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { 447 this._bodyFormData = body 448 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { 449 this._bodyText = body.toString() 450 } else if (support.arrayBuffer && support.blob && isDataView(body)) { 451 this._bodyArrayBuffer = bufferClone(body.buffer) 452 // IE 10-11 can't handle a DataView body. 453 this._bodyInit = new Blob([this._bodyArrayBuffer]) 454 } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { 455 this._bodyArrayBuffer = bufferClone(body) 456 } else { 457 this._bodyText = body = Object.prototype.toString.call(body) 458 } 459 460 if (!this.headers.get('content-type')) { 461 if (typeof body === 'string') { 462 this.headers.set('content-type', 'text/plain;charset=UTF-8') 463 } else if (this._bodyBlob && this._bodyBlob.type) { 464 this.headers.set('content-type', this._bodyBlob.type) 465 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { 466 this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') 467 } 468 } 469 } 470 471 if (support.blob) { 472 this.blob = function() { 473 var rejected = consumed(this) 474 if (rejected) { 475 return rejected 476 } 477 478 if (this._bodyBlob) { 479 return Promise.resolve(this._bodyBlob) 480 } else if (this._bodyArrayBuffer) { 481 return Promise.resolve(new Blob([this._bodyArrayBuffer])) 482 } else if (this._bodyFormData) { 483 throw new Error('could not read FormData body as blob') 484 } else { 485 return Promise.resolve(new Blob([this._bodyText])) 486 } 487 } 488 489 this.arrayBuffer = function() { 490 if (this._bodyArrayBuffer) { 491 var isConsumed = consumed(this) 492 if (isConsumed) { 493 return isConsumed 494 } 495 if (ArrayBuffer.isView(this._bodyArrayBuffer)) { 496 return Promise.resolve( 497 this._bodyArrayBuffer.buffer.slice( 498 this._bodyArrayBuffer.byteOffset, 499 this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength 500 ) 501 ) 502 } else { 503 return Promise.resolve(this._bodyArrayBuffer) 504 } 505 } else { 506 return this.blob().then(readBlobAsArrayBuffer) 507 } 508 } 509 } 510 511 this.text = function() { 512 var rejected = consumed(this) 513 if (rejected) { 514 return rejected 515 } 516 517 if (this._bodyBlob) { 518 return readBlobAsText(this._bodyBlob) 519 } else if (this._bodyArrayBuffer) { 520 return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) 521 } else if (this._bodyFormData) { 522 throw new Error('could not read FormData body as text') 523 } else { 524 return Promise.resolve(this._bodyText) 525 } 526 } 527 528 if (support.formData) { 529 this.formData = function() { 530 return this.text().then(decode) 531 } 532 } 533 534 this.json = function() { 535 return this.text().then(JSON.parse) 536 } 537 538 return this 539} 540 541// HTTP methods whose capitalization should be normalized 542var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] 543
vendor: 8,184 bytes, lines 544-827
544function normalizeMethod(method) { 545 var upcased = method.toUpperCase() 546 return methods.indexOf(upcased) > -1 ? upcased : method 547} 548 549function Request(input, options) { 550 if (!(this instanceof Request)) { 551 throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') 552 } 553 554 options = options || {} 555 var body = options.body 556 557 if (input instanceof Request) { 558 if (input.bodyUsed) { 559 throw new TypeError('Already read') 560 } 561 this.url = input.url 562 this.credentials = input.credentials 563 if (!options.headers) { 564 this.headers = new Headers(input.headers) 565 } 566 this.method = input.method 567 this.mode = input.mode 568 this.signal = input.signal 569 if (!body && input._bodyInit != null) { 570 body = input._bodyInit 571 input.bodyUsed = true 572 } 573 } else { 574 this.url = String(input) 575 } 576 577 this.credentials = options.credentials || this.credentials || 'same-origin' 578 if (options.headers || !this.headers) { 579 this.headers = new Headers(options.headers) 580 } 581 this.method = normalizeMethod(options.method || this.method || 'GET') 582 this.mode = options.mode || this.mode || null 583 this.signal = options.signal || this.signal 584 this.referrer = null 585 586 if ((this.method === 'GET' || this.method === 'HEAD') && body) { 587 throw new TypeError('Body not allowed for GET or HEAD requests') 588 } 589 this._initBody(body) 590 591 if (this.method === 'GET' || this.method === 'HEAD') { 592 if (options.cache === 'no-store' || options.cache === 'no-cache') { 593 // Search for a '_' parameter in the query string 594 var reParamSearch = /([?&])_=[^&]*/ 595 if (reParamSearch.test(this.url)) { 596 // If it already exists then set the value with the current time 597 this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime()) 598 } else { 599 // Otherwise add a new '_' parameter to the end with the current time 600 var reQueryString = /\?/ 601 this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime() 602 } 603 } 604 } 605} 606 607Request.prototype.clone = function() { 608 return new Request(this, {body: this._bodyInit}) 609} 610 611function decode(body) { 612 var form = new FormData() 613 body 614 .trim() 615 .split('&') 616 .forEach(function(bytes) { 617 if (bytes) { 618 var split = bytes.split('=') 619 var name = split.shift().replace(/\+/g, ' ') 620 var value = split.join('=').replace(/\+/g, ' ') 621 form.append(decodeURIComponent(name), decodeURIComponent(value)) 622 } 623 }) 624 return form 625} 626 627function parseHeaders(rawHeaders) { 628 var headers = new Headers() 629 // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space 630 // https://tools.ietf.org/html/rfc7230#section-3.2 631 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ') 632 // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill 633 // https://github.com/github/fetch/issues/748 634 // https://github.com/zloirock/core-js/issues/751 635 preProcessedHeaders 636 .split('\r') 637 .map(function(header) { 638 return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header 639 }) 640 .forEach(function(line) { 641 var parts = line.split(':') 642 var key = parts.shift().trim() 643 if (key) { 644 var value = parts.join(':').trim() 645 headers.append(key, value) 646 } 647 }) 648 return headers 649} 650 651Body.call(Request.prototype) 652 653function Response(bodyInit, options) { 654 if (!(this instanceof Response)) { 655 throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') 656 } 657 if (!options) { 658 options = {} 659 } 660 661 this.type = 'default' 662 this.status = options.status === undefined ? 200 : options.status 663 this.ok = this.status >= 200 && this.status < 300 664 this.statusText = options.statusText === undefined ? '' : '' + options.statusText 665 this.headers = new Headers(options.headers) 666 this.url = options.url || '' 667 this._initBody(bodyInit) 668} 669 670Body.call(Response.prototype) 671 672Response.prototype.clone = function() { 673 return new Response(this._bodyInit, { 674 status: this.status, 675 statusText: this.statusText, 676 headers: new Headers(this.headers), 677 url: this.url 678 }) 679} 680 681Response.error = function() { 682 var response = new Response(null, {status: 0, statusText: ''}) 683 response.type = 'error' 684 return response 685} 686 687var redirectStatuses = [301, 302, 303, 307, 308] 688 689Response.redirect = function(url, status) { 690 if (redirectStatuses.indexOf(status) === -1) { 691 throw new RangeError('Invalid status code') 692 } 693 694 return new Response(null, {status: status, headers: {location: url}}) 695} 696 697var DOMException = global.DOMException 698try { 699 new DOMException() 700} catch (err) { 701 DOMException = function(message, name) { 702 this.message = message 703 this.name = name 704 var error = Error(message) 705 this.stack = error.stack 706 } 707 DOMException.prototype = Object.create(Error.prototype) 708 DOMException.prototype.constructor = DOMException 709} 710 711function fetch(input, init) { 712 return new Promise(function(resolve, reject) { 713 var request = new Request(input, init) 714 715 if (request.signal && request.signal.aborted) { 716 return reject(new DOMException('Aborted', 'AbortError')) 717 } 718 719 var xhr = new XMLHttpRequest() 720 721 function abortXhr() { 722 xhr.abort() 723 } 724 725 xhr.onload = function() { 726 var options = { 727 status: xhr.status, 728 statusText: xhr.statusText, 729 headers: parseHeaders(xhr.getAllResponseHeaders() || '') 730 } 731 options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') 732 var body = 'response' in xhr ? xhr.response : xhr.responseText 733 setTimeout(function() { 734 resolve(new Response(body, options)) 735 }, 0) 736 } 737 738 xhr.onerror = function() { 739 setTimeout(function() { 740 reject(new TypeError('Network request failed')) 741 }, 0) 742 } 743 744 xhr.ontimeout = function() { 745 setTimeout(function() { 746 reject(new TypeError('Network request failed')) 747 }, 0) 748 } 749 750 xhr.onabort = function() { 751 setTimeout(function() { 752 reject(new DOMException('Aborted', 'AbortError')) 753 }, 0) 754 } 755 756 function fixUrl(url) { 757 try { 758 return url === '' && global.location.href ? global.location.href : url 759 } catch (e) { 760 return url 761 } 762 } 763 764 xhr.open(request.method, fixUrl(request.url), true) 765 766 if (request.credentials === 'include') { 767 xhr.withCredentials = true 768 } else if (request.credentials === 'omit') { 769 xhr.withCredentials = false 770 } 771 772 if ('responseType' in xhr) { 773 if (support.blob) { 774 xhr.responseType = 'blob' 775 } else if ( 776 support.arrayBuffer && 777 request.headers.get('Content-Type') && 778 request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1 779 ) { 780 xhr.responseType = 'arraybuffer' 781 } 782 } 783 784 if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) { 785 Object.getOwnPropertyNames(init.headers).forEach(function(name) { 786 xhr.setRequestHeader(name, normalizeValue(init.headers[name])) 787 }) 788 } else { 789 request.headers.forEach(function(value, name) { 790 xhr.setRequestHeader(name, value) 791 }) 792 } 793 794 if (request.signal) { 795 request.signal.addEventListener('abort', abortXhr) 796 797 xhr.onreadystatechange = function() { 798 // DONE (success or failure) 799 if (xhr.readyState === 4) { 800 request.signal.removeEventListener('abort', abortXhr) 801 } 802 } 803 } 804 805 xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) 806 }) 807} 808 809fetch.polyfill = true 810 811if (!global.fetch) { 812 global.fetch = fetch 813 global.Headers = Headers 814 global.Request = Request 815 global.Response = Response 816} 817 818// EXTERNAL MODULE: ./easy-affiliate-links/assets/js/public/clicks.js 819var clicks = __webpack_require__(4181); 820;// CONCATENATED MODULE: ./easy-affiliate-links/assets/js/public.js 821 822 823})(); 824 825(EasyAffiliateLinks = typeof EasyAffiliateLinks === "undefined" ? {} : EasyAffiliateLinks)["public"] = __webpack_exports__; 826/******/ })() 827;
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.