1(function() { 2 window._satellite = window._satellite || {}; 3 window._satellite.container = { 4 "buildInfo": { 5 "buildDate": "2026-09-22T11:27:05Z", 6 "turbineBuildDate": "2026-06-04T21:23:22Z", 7 "turbineVersion": "29.1.0" 8 }, 9 "environment": { 10 "id": "EN3cc9b5d493c645ca8e3b43e67722e5e3", 11 "stage": "development" 12 }, 13 "dataElements": { 14 "6SENSE_FIRMOGRAPHIC": { 15 "storageDuration": "pageview", 16 "modulePath": "core/src/lib/dataElements/customCode.js", 17 "settings": { 18 "source": function(event) { 19 var stored = localStorage.getItem("_6senseCompanyDetails"); 20if(stored !== null && JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 21 var parsed = JSON.parse(stored); 22 23 var retVar = parsed.company.employee_range+":"+parsed.company.employee_count+":::::"+parsed.company.revenue_range+":"+parsed.company.annual_revenue+"::::"; 24 return (retVar === ':::::::::::') ? '' : retVar; 25} else { 26 return ''; 27} 28} 29 } 30 }, 31 "PRODUCT:DL": { 32 "defaultValue": "", 33 "storageDuration": "pageview", 34 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 35 "settings": { 36 "path": "digitalData.product" 37 } 38 }, 39 "PRODNOTIFY": { 40 "defaultValue": "", 41 "storageDuration": "pageview", 42 "modulePath": "core/src/lib/dataElements/customCode.js", 43 "settings": { 44 "source": function(event) { 45 function getParameterByName(name, url = window.location.href) { 46 name = name.replace(/[\[\]]/g, '\\$&'); 47 var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'), 48 results = regex.exec(url); 49 if (!results) return null; 50 if (!results[2]) return ''; 51 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 52} 53 54return getParameterByName("prodnotify"); 55} 56 } 57 }, 58 "DNB_SICCODE": { 59 "defaultValue": "", 60 "storageDuration": "pageview", 61 "modulePath": "core/src/lib/dataElements/customCode.js", 62 "settings": { 63 "source": function(event) { 64 var dnbStorageKey = 'dnb'; 65 66if(sessionStorage.getItem(dnbStorageKey) !== null) { 67 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 68 return dnb_Data.sicCodes; 69} else{ 70 return ''; 71} 72} 73 } 74 }, 75 "CARTID:DL": { 76 "defaultValue": "", 77 "forceLowerCase": true, 78 "storageDuration": "pageview", 79 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 80 "settings": { 81 "path": "digitalData.cart.cartID" 82 } 83 }, 84 "ONSITESEARCHTYPEDORSUGGESTED:OSI:OS:DL": { 85 "defaultValue": "", 86 "storageDuration": "pageview", 87 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 88 "settings": { 89 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchTypedOrSuggested" 90 } 91 }, 92 "ONSITESEARCHRESULTS:OSI:OS:DL": { 93 "defaultValue": "", 94 "storageDuration": "pageview", 95 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 96 "settings": { 97 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchResults" 98 } 99 }, 100 "FIRST_PRODUCTCATEGORY:METATAG": { 101 "defaultValue": "", 102 "storageDuration": "pageview", 103 "modulePath": "core/src/lib/dataElements/customCode.js", 104 "settings": { 105 "source": function(event) { 106 var metaTagArray = document.getElementsByTagName("meta"); 107for (var i = 0; i < metaTagArray.length; i++) { 108 if (metaTagArray[i].name.toLowerCase() === "productcategories") { 109 return metaTagArray[i].content.split(",")[0].replace(/^\s+|\s+$/gm,''); 110 } 111} 112} 113 } 114 }, 115 "REFDATA_PAGE": { 116 "defaultValue": "", 117 "storageDuration": "pageview", 118 "modulePath": "core/src/lib/dataElements/customCode.js", 119 "settings": { 120 "source": function(event) { 121 if ((typeof digitalData != "undefined" && 122 typeof digitalData.page != "undefined" && 123 typeof digitalData.page.pageInfo != "undefined" && 124 (["swProdOverview", "hwProdOverview", "swHowDoI", "swDownload", "swUpgrade", "swArchives", "welcome", "swCompare", "pmDownload", "shop", "swEdition", "swDownloadConfirm", "systemsOverview", "dimensionaldrawing", "hwModel", "accpdp", "cepdp", "ceProdOverview", "hwbunpdp", "hwbunProdOverview", "pdp", "hwProdOverview", "lwpp", "lwmp", "platformpdp", "swpdp", "swProdOverview", "swWhy", "swbunpdp", "hwmodel", "servicespdp", "hwCategory", "productDetails", "swProdOverview", "swplp", "swpdp", "coursesplp", "swRenewals", "swCoterm", "swUpgrades"].indexOf(digitalData.page.pageInfo.template) > -1) 125 ) || 126 /* Data Layer element product is not empty */ 127 ((typeof digitalData != "undefined" && 128 typeof digitalData.product != "undefined" && 129 typeof digitalData.product[0] != "undefined") && 130 /* Either any child of category or productInfo exists */ 131 ( 132 (typeof digitalData.product[0].category != "undefined" && 133 (typeof digitalData.product[0].category.hardwareForm != "undefined" || 134 typeof digitalData.product[0].category.platformCategory != "undefined" || 135 typeof digitalData.product[0].category.category != "undefined" || 136 typeof digitalData.product[0].category.categoryID != "undefined") 137 ) || 138 (typeof digitalData.product[0].productInfo != "undefined" && typeof digitalData.product[0].productInfo.productName != "undefined")))) { 139 return "true"; 140} else { 141 return "false"; 142} 143} 144 } 145 }, 146 "PAGETABCONTENT:PI:PA:DL": { 147 "defaultValue": "", 148 "storageDuration": "pageview", 149 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 150 "settings": { 151 "path": "digitalData.page.pageInfo.pageTabContent" 152 } 153 }, 154 "PAGENAME_FOR_TARGET_PART6": { 155 "defaultValue": "", 156 "storageDuration": "pageview", 157 "modulePath": "core/src/lib/dataElements/customCode.js", 158 "settings": { 159 "source": function(event) { 160 return _satellite.getVar("DETAILED_PAGENAME").split(":")[5]; 161} 162 } 163 }, 164 "OneTrust_STATUS": { 165 "modulePath": "core/src/lib/dataElements/customCode.js", 166 "settings": { 167 "source": function(event) {
168 return (_satellite.getVar("OneTrust_Performance_Consent") ? "C002" : "not given")+"|"+ 169(_satellite.getVar("OneTrust_Functional_Consent") ? "C003" : "not given")+"|"+ 170(_satellite.getVar("OneTrust_Targeting_Consent") ? "C004" : "not given"); 171} 172 } 173 }, 174 "Sat_Track_Cookie": { 175 "defaultValue": "false", 176 "forceLowerCase": true, 177 "cleanText": true, 178 "modulePath": "core/src/lib/dataElements/cookie.js", 179 "settings": { 180 "name": "sat_track" 181 } 182 }, 183 "SHORT_PAGENAME": { 184 "defaultValue": "", 185 "forceLowerCase": true, 186 "storageDuration": "pageview", 187 "modulePath": "core/src/lib/dataElements/customCode.js", 188 "settings": { 189 "source": function(event) { 190 return _satellite.getVar("PAGENAME")[2]; 191} 192 } 193 }, 194 "AUTH0_HINT:COOKIE": { 195 "defaultValue": "anon", 196 "storageDuration": "pageview", 197 "modulePath": "core/src/lib/dataElements/cookie.js", 198 "settings": { 199 "name": "ni_auth_login_hint" 200 } 201 }, 202 "S_CART_LOGIN": { 203 "defaultValue": "0", 204 "modulePath": "core/src/lib/dataElements/cookie.js", 205 "settings": { 206 "name": "s_cart_login" 207 } 208 }, 209 "ONSITESEARCHSEARCHINSTEADFOR:OSI:OS:DL": { 210 "defaultValue": "", 211 "storageDuration": "pageview", 212 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 213 "settings": { 214 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchSearchInsteadFor" 215 } 216 }, 217 "DOCUMENTID:METATAG": { 218 "defaultValue": "", 219 "storageDuration": "pageview", 220 "modulePath": "core/src/lib/dataElements/customCode.js", 221 "settings": { 222 "source": function(event) { 223 var forumDID = _satellite.getVar("FORUM_DOCUMENTID") 224if(forumDID != ""){ 225 return forumDID; 226} else { 227 return NIAnalytics.getMetaTag("documentid") !== "" ? NIAnalytics.getMetaTag("documentid") : NIAnalytics.getMetaFromDataLayer("documentId"); 228} 229 230} 231 } 232 }, 233 "MD5_HASH": { 234 "defaultValue": "", 235 "modulePath": "core/src/lib/dataElements/customCode.js", 236 "settings": { 237 "source": function(event) { 238 function RotateLeft(lValue, iShiftBits) { 239 return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); 240} 241 242function AddUnsigned(lX, lY) { 243 var lX4, lY4, lX8, lY8, lResult; 244 lX8 = (lX & 0x80000000); 245 lY8 = (lY & 0x80000000); 246 lX4 = (lX & 0x40000000); 247 lY4 = (lY & 0x40000000); 248 lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); 249 if (lX4 & lY4) { 250 return (lResult ^ 0x80000000 ^ lX8 ^ lY8); 251 } 252 if (lX4 | lY4) { 253 if (lResult & 0x40000000) { 254 return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); 255 } else { 256 return (lResult ^ 0x40000000 ^ lX8 ^ lY8); 257 } 258 } else { 259 return (lResult ^ lX8 ^ lY8); 260 } 261} 262 263function F(x, y, z) { return (x & y) | ((~x) & z); } 264function G(x, y, z) { return (x & z) | (y & (~z)); } 265function H(x, y, z) { return (x ^ y ^ z); } 266function I(x, y, z) { return (y ^ (x | (~z))); } 267 268function FF(a, b, c, d, x, s, ac) { 269 a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); 270 return AddUnsigned(RotateLeft(a, s), b); 271}; 272 273function GG(a, b, c, d, x, s, ac) { 274 a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); 275 return AddUnsigned(RotateLeft(a, s), b); 276}; 277 278function HH(a, b, c, d, x, s, ac) { 279 a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); 280 return AddUnsigned(RotateLeft(a, s), b); 281}; 282 283function II(a, b, c, d, x, s, ac) { 284 a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); 285 return AddUnsigned(RotateLeft(a, s), b); 286}; 287 288function ConvertToWordArray(string) { 289 var lWordCount; 290 var lMessageLength = string.length; 291 var lNumberOfWords_temp1 = lMessageLength + 8; 292 var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64; 293 var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16; 294 var lWordArray = Array(lNumberOfWords - 1); 295 var lBytePosition = 0; 296 var lByteCount = 0; 297 while (lByteCount < lMessageLength) { 298 lWordCount = (lByteCount - (lByteCount % 4)) / 4; 299 lBytePosition = (lByteCount % 4) * 8; 300 lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition)); 301 lByteCount++; 302 } 303 lWordCount = (lByteCount - (lByteCount % 4)) / 4; 304 lBytePosition = (lByteCount % 4) * 8; 305 lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); 306 lWordArray[lNumberOfWords - 2] = lMessageLength << 3; 307 lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; 308 return lWordArray; 309}; 310 311function WordToHex(lValue) { 312 var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount; 313 for (lCount = 0; lCount <= 3; lCount++) { 314 lByte = (lValue >>> (lCount * 8)) & 255; 315 WordToHexValue_temp = "0" + lByte.toString(16); 316 WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2); 317 } 318 return WordToHexValue; 319}; 320 321function Utf8Encode(string) { 322 string = string.replace(/\r\n/g, "\n"); 323 var utftext = ""; 324 325 for (var n = 0; n < string.length; n++) { 326 327 var c = string.charCodeAt(n); 328 329 if (c < 128) { 330 utftext += String.fromCharCode(c); 331 } 332 else if ((c > 127) && (c < 2048)) { 333 utftext += String.fromCharCode((c >> 6) | 192); 334 utftext += String.fromCharCode((c & 63) | 128); 335 } 336 else { 337 utftext += String.fromCharCode((c >> 12) | 224); 338 utftext += String.fromCharCode(((c >> 6) & 63) | 128); 339 utftext += String.fromCharCode((c & 63) | 128); 340 } 341 342 } 343 344 return utftext; 345}; 346 347var x = Array(); 348var k, AA, BB, CC, DD, a, b, c, d; 349var S11 = 7, S12 = 12, S13 = 17, S14 = 22; 350var S21 = 5, S22 = 9, S23 = 14, S24 = 20; 351var S31 = 4, S32 = 11, S33 = 16, S34 = 23; 352var S41 = 6, S42 = 10, S43 = 15, S44 = 21; 353 354if (typeof digitalData.valueToHash === "undefined") { 355 return ''; 356} else { 357 358 string = Utf8Encode(digitalData.valueToHash); 359 360 x = ConvertToWordArray(string); 361
362 a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476; 363 364 for (k = 0; k < x.length; k += 16) { 365 AA = a; BB = b; CC = c; DD = d; 366 a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478); 367 d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756); 368 c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB); 369 b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE); 370 a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF); 371 d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A); 372 c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613); 373 b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501); 374 a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8); 375 d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF); 376 c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1); 377 b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE); 378 a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122); 379 d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193); 380 c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E); 381 b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821); 382 a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562); 383 d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340); 384 c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51); 385 b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA); 386 a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D); 387 d = GG(d, a, b, c, x[k + 10], S22, 0x2441453); 388 c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681); 389 b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8); 390 a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6); 391 d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6); 392 c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87); 393 b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED); 394 a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905); 395 d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8); 396 c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9); 397 b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A); 398 a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942); 399 d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681); 400 c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122); 401 b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C); 402 a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44); 403 d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9); 404 c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60); 405 b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70); 406 a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6); 407 d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA); 408 c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085); 409 b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05); 410 a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039); 411 d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5); 412 c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8); 413 b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665); 414 a = II(a, b, c, d, x[k + 0], S41, 0xF4292244); 415 d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97); 416 c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7); 417 b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039); 418 a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3); 419 d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92); 420 c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D); 421 b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1); 422 a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F); 423 d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0); 424 c = II(c, d, a, b, x[k + 6], S43, 0xA3014314); 425 b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1); 426 a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82); 427 d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235); 428 c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB); 429 b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391); 430 a = AddUnsigned(a, AA); 431 b = AddUnsigned(b, BB); 432 c = AddUnsigned(c, CC); 433 d = AddUnsigned(d, DD); 434 } 435 436 var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d); 437 return temp.toLowerCase(); 438 439} 440 441} 442 } 443 }, 444 "PRODUCTCATEGORIES:METATAG": { 445 "defaultValue": "", 446 "storageDuration": "pageview", 447 "modulePath": "core/src/lib/dataElements/customCode.js", 448 "settings": { 449 "source": function(event) { 450 var metaTagArray = document.getElementsByTagName("meta"); 451for (var i = 0; i < metaTagArray.length; i++) { 452 if (metaTagArray[i].name.toLowerCase() === "productcategories") { 453 return metaTagArray[i].content; 454 } 455} 456} 457 } 458 }, 459 "CART_TRANSACTION_AMOUNT:DL": { 460 "cleanText": true, 461 "storageDuration": "pageview", 462 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 463 "settings": { 464 "path": "digitalData.page.transaction.amount" 465 } 466 }, 467 "DisableAnalyticsCookie": { 468 "defaultValue": "false", 469 "forceLowerCase": true, 470 "cleanText": true, 471 "modulePath": "core/src/lib/dataElements/cookie.js", 472 "settings": { 473 "name": "disableAnalytics" 474 } 475 }, 476 "SEO_H1_VALUES": { 477 "defaultValue": "", 478 "storageDuration": "pageview", 479 "modulePath": "core/src/lib/dataElements/customCode.js", 480 "settings": { 481 "source": function(event) { 482 var h1Tags = document.getElementsByTagName("h1"); 483var h1Class = document.querySelectorAll(".h1"); 484var result = ""; 485 486if(typeof String.prototype.trim !== 'function') { 487 String.prototype.trim = function() { 488 return this.replace(/^\s+|\s+$/g, ''); 489 } 490} 491 492var content; 493 494for(i = 0; i < h1Tags.length; i++){ 495 content = h1Tags[i].innerText || h1Tags[i].textContent; 496 result += i>0 ? "|"+content.trim() : content.trim(); 497} 498 499if(typeof h1Class !== "undefined"){ 500 for(i = 0; i < h1Class.length; i++){ 501 content = h1Class[i].innerText || h1Class[i].textContent; 502 result += (i>0 | result !== "") ? "|"+content.trim() : content.trim(); 503 } 504} 505 506return result === "" ? "no value" : result; 507} 508 } 509 }, 510 "WORDCOUNT:PI:PA:DL": { 511 "defaultValue": "", 512 "storageDuration": "pageview", 513 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 514 "settings": { 515 "path": "digitalData.page.pageInfo.wordCount" 516 } 517 }, 518 "CAPTURENAVIGATION_LINK_CLICK_DETAILS_WITHOUT_DETAILED_PAGENAME": { 519 "storageDuration": "pageview", 520 "modulePath": "core/src/lib/dataElements/customCode.js", 521 "settings": { 522 "source": function(event) { 523 // For these event names the result will be event_name:event_label 524return [ 525 "myproductregister", 526 "myproductselect", 527 "gb widget", 528 "select edition", 529 "lv prod overview", 530 "nxg prod overview", 531 "flexlogger prod overview", 532 "crio plat category",
533 "cdaq plat category", 534 "pxi plat category", 535 "measure ctrl plat category", 536 "systemlink prod overview", 537 "multisim prod overview", 538 "multisim for designers prod overview", 539 "multisim for education prod overview", 540 "instrument studio prod overview", 541 "teststand prod overview", 542 "diadem prod overview", 543 "labview communications prod overview", 544 "crio dev guide", 545 "dc management landing", 546 "insightcm prod overview", 547 "innovations trends tab", 548 "electromech sys application", 549 "nxg web module prod overview", 550 "VBAI prod overview", 551 "FPGA dev module prod overview", 552 "real time module prod overview", 553 "company ni corp giving", 554 "company ni leadership", 555 "company ni supply chain", 556 "ni trend watch 2019", 557 "fpga mod prod overview", 558 "vision builder for auto inspect prod overview", 559 "vision dev mod prod overview", 560 "compare versions", 561 "measurement studio prod overview", 562 "contact us", 563 "sw products popular download suggestions", 564 "drivers popular download suggestions", 565 "checkout review", 566 "dc measurements", 567 "continue shopping", 568 "veristand prod overview", 569 "popular download tile", 570 "LabWinCVI prod overview", 571 "innovations automotive", 572 "online training", 573 "niweek registration", 574 "slash support", 575 "systemlink asset module prod overview", 576 "5g nr test ue solution", 577 "test coverage wifi 6 pa fem components", 578 "mmwave ota validation test", 579 "aero def elec mfg test", 580 "systemlink tdm datafinder module prod overview", 581 "systemlink server prod overview", 582 "systemlink test module prod overview", 583 "hil simulator prod overview", 584 "read more component", 585 "elec functional test solution", 586 "semiconductor validation", 587 "hardware services", 588 "hil industrial controllers", 589 "auto hil test", 590 "automotive adas app", 591 "perspectives", 592 "work with NI partner", 593 "vehicle compute hw", 594 "eloqua form", 595 "homepage cta", 596 "auto end of line test", 597 "hil industrial controllers", 598 "ind mach data logging", 599 "elec test cell and connectivity", 600 "ate systems and sw app", 601 "future proof adas hil test", 602 "ate sys and sw reduce time to market", 603 "ate sys and sw onboard new hires", 604 "education services", 605 "download link pdp product compare", 606 "email link pdp product compare", 607 "search results language", 608 "pdp compare button", 609 "releasenoteslink", 610 "perspective filter", 611 "srm home cta", 612 "continueshopupsell", 613 "wafer level parametric test", 614 "ADAS test autonomous vehicles", 615 "systemlink sw products", 616 "systemlink sw workflows", 617 "what is systemlink server", 618 "rffe validation", 619 "mmwave 5g functl test", 620 "online ordering", 621 "powertrain batt test sys", 622 "rf microwave components", 623 "nfc interface test", 624 "aerodef radar ew", 625 "test adas sensors", 626 "validate radar systems", 627 "daq home", 628 "lvtn browse products", 629 "pcb sys level pwr test", 630 "pricing promo banner", 631 "configure a custom system", 632 "contact partner", 633 "lv demo welcome", 634 "lv demo thank you", 635 "aero def esa reference architecture", 636 "validate radar systems", 637 "aero def radar ew rdp testbed solution", 638 "aerodef radar ew RDP solution", 639 "powertrain batt test sys", 640 "elec functional test solution", 641 "accelerometer daq system solution", 642 "expandable multi-sensor validation system solution", 643 "load and strain daq system solution", 644 "thermocouple daq system solution", 645 "nfc interface test", 646 "adg static fatigue structural testing", 647 "xRAN Testbed Solution", 648 "remove from compare", 649 "ni connect banner", 650 "ni connect in page banner", 651 "test workflow banner", 652 "contact ni partner", 653 "hwProductDocumentationCarousel", 654 "mmo select bundle", 655 "try product why page", 656 "Try Product Why Page", 657 "select bundle product overview", 658 "in page banner", 659 "ni connect page", 660 "contact a technical expert", 661 "watch the webinar", 662 "download the solution brochure", 663 "daq-stock-up" 664]; 665} 666 } 667 }, 668 "DESCRIPTION:METATAG": { 669 "defaultValue": "no value", 670 "storageDuration": "pageview", 671 "modulePath": "core/src/lib/dataElements/customCode.js", 672 "settings": { 673 "source": function(event) { 674 var metaTagArray = document.getElementsByTagName("meta"); 675for (var i = 0; i < metaTagArray.length; i++) { 676 if (metaTagArray[i].name.toLowerCase() === "description") { 677 return metaTagArray[i].content; 678 } 679} 680} 681 } 682 }, 683 "CONTENTTYPE:METATAG": { 684 "defaultValue": "nocontenttypevalue", 685 "storageDuration": "pageview", 686 "modulePath": "core/src/lib/dataElements/customCode.js", 687 "settings": { 688 "source": function(event) { 689 if (typeof NIAnalytics === "undefined") { 690 function NIAnalytics() {} 691} 692 693if (typeof NIAnalytics.getMetaTag === "undefined"){ 694 NIAnalytics.getMetaTag = function (name) { 695 var metaTagArray = document.getElementsByTagName("meta"); 696 for (var i = 0; i < metaTagArray.length; i++) { 697 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 698 return metaTagArray[i].content; 699 } 700 } 701 return ""; 702 } 703} 704 705if (typeof NIAnalytics.getMetaFromDataLayer === "undefined"){ 706 NIAnalytics.getMetaFromDataLayer = function(name) { 707 return (typeof digitalData !== "undefined" && typeof digitalData.page !== "undefined" && typeof digitalData.page.pageInfo !== "undefined" && typeof digitalData.page.pageInfo[name] !== "undefined") ? digitalData.page.pageInfo[name] : ""; 708 } 709} 710 711return NIAnalytics.getMetaTag("contenttype") !== "" ? NIAnalytics.getMetaTag("contenttype") : NIAnalytics.getMetaFromDataLayer("contentType"); 712} 713 } 714 }, 715 "PAGE_NAME": { 716 "defaultValue": "", 717 "storageDuration": "pageview", 718 "modulePath": "core/src/lib/dataElements/customCode.js", 719 "settings": { 720 "source": function(event) { 721 if (_satellite.getVar("SECTION:METATAG") === "homepage" && 722 _satellite.getVar("CONTENTTYPE:METATAG") === "homepage" && 723 _satellite.getVar("PAGETYPE:METATAG") === "homepage"){ 724 return "homepage"; 725} 726if (["swPortfolio", "landing"].indexOf(_satellite.getVar("TEMPLATE:PI:PA:DL")) === -1 && _satellite.getVar("DELIVEREDBY:METATAG") === "CMS" && _satellite.getVar("PAGETYPE:METATAG") === "homepage"){ 727 switch(_satellite.getVar("SECTION:METATAG")){ 728 case "products": return "shop:hardware:main"; 729 case "support": return "support:main"; 730 case "community": return "community:main"; 731 case "innovations": if (_satellite.getVar("CONTENTTYPE:METATAG") === "solution") return "innovations:industries:main"; break; 732 default: break; 733 } 734} 735 736var myPageName; 737var meta_contenttype = _satellite.getVar('CONTENTTYPE:METATAG'); 738var meta_pagetype = _satellite.getVar('PAGETYPE:METATAG'); 739var template = _satellite.getVar("TEMPLATE:PI:PA:DL"); 740var myPath = location.pathname; 741var myHost = location.hostname; 742var pathRegex = new RegExp( 743 "/((?:lang/)?(?:d|esa|f|i|ja|ko|zhs|zht|en|de|es|fr|it|pt|nl|pl|ru|cs|sv|fi|da|no|hu|ro|sr|sl|hr)(?:/|$))" 744 ); 745//For Removing unneccessary substrings 746var cleanUpRegex = /(?:\/(rating|lang\/invalid|lang|diff|clone|edit|delete))|(?:\.(?:html|htm))/g; 747 748if ((myPath.indexOf("no/ap") !== -1) || (template === "searchResults")) { 749 myPageName = meta_contenttype + "-" + meta_pagetype; 750} else if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\/.*/)) { 751 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}(\/.*)/, "$1"); 752} else if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\.html/)) { 753 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}\.html/, "/"); 754} else if (myPath.match(/\/[a-z]{2}\/.*/)) { 755 myPageName = myHost + myPath.replace(/\/[a-z]{2}(\/.*)/, "$1"); 756} else if (myPath.match(/\/[a-z]{2}\.html/)) { 757 myPageName = myHost + myPath.replace(/\/[a-z]{2}\.html/, "/"); 758} else { 759 myPageName = myHost + myPath.replace(pathRegex, "/"); 760} 761 762for (var i = 1; i<21; i++){ 763 if (i<6) myPageName = myPageName.replace("/rating/"+i,""); 764 myPageName = myPageName.replace("/version/"+i, ""); 765} 766 767myPageName = myPageName.replace(cleanUpRegex, ""); 768 769if (myPageName.substring(myPageName.length-7, myPageName.length) === "support" || 770 myPageName.substring(myPageName.length-9, myPageName.length) === "community") myPageName += "/"; 771 772/* Cart & Checkout pagenames - Start */ 773if (window.location.pathname.indexOf("ni_addr_book.main") > -1){ 774 return "products:checkout:address book"; 775} 776if (window.location.pathname.indexOf("nios.store") > -1 || window.location.pathname.indexOf("shop/cart") > -1){ 777 var forms = document.getElementsByTagName("form"); 778 for (var i = 0; i < forms.length; i++){ 779 if (forms[i].getAttribute("action") == "nios.store"){ 780 var inputs = forms[i].getElementsByTagName("input") 781 for (var j = 0; j < inputs.length; j++){ 782 if (inputs[j].getAttribute("name") === "action" && inputs[j].getAttribute("value") === "retrieve_cart"){ 783 analyticsPagenameArray.push("products:cart:retrieve cart"); 784 analyticsPagenameArray.push("products:cart:retrieve cart"); 785 analyticsPagenameArray.push("products:cart"); 786 return analyticsPagenameArray; 787 } 788 } 789 } 790 } 791 if (_satellite.getVar("ACTION:URL_PARAM") === "purchase_form"){ 792 analyticsPagenameArray.push("products:order by part number:main"); 793 analyticsPagenameArray.push("products:order by part number:main"); 794 analyticsPagenameArray.push("products:order by part number:main"); 795 return analyticsPagenameArray; 796 } 797 var forms = document.getElementsByTagName("form") 798 for (var i = 0; i< forms.length; i++){ 799 if (forms[i].getAttribute("name") === "retrieveQuote"){ 800 analyticsPagenameArray.push("products:cart:empty cart"); 801 analyticsPagenameArray.push("products:cart:empty cart"); 802 analyticsPagenameArray.push("products:cart"); 803 return analyticsPagenameArray; 804 } 805 } 806 807 if(digitalData.cart.items.length < 1 || digitalData.cart.items[0] === ""){ 808 analyticsPagenameArray.push("products:cart:empty cart"); 809 analyticsPagenameArray.push("products:cart:empty cart"); 810 analyticsPagenameArray.push("products:cart"); 811 return analyticsPagenameArray; 812 } 813 814 analyticsPagenameArray.push("products:cart:shopping cart"); 815 analyticsPagenameArray.push("products:cart:shopping cart"); 816 analyticsPagenameArray.push("products:cart"); 817 return analyticsPagenameArray; 818} 819if (window.location.pathname.indexOf("nios.checkout") > -1) { 820 var formTagArray = document.getElementsByTagName("form"); 821 var mark = 3; 822 for (var i = 0; i < formTagArray.length; i++) { 823 if (formTagArray[i].getAttribute("action") === "nios.checkout" && formTagArray[i].getAttribute("name") === "ship") { mark = 0; break; } 824 if (formTagArray[i].getAttribute("action") === "nios.checkout" && formTagArray[i].getAttribute("name") === "pmt") { mark = 1; break; } 825 if (formTagArray[i].getAttribute("action") === "nios.store") { mark = 2; } 826 } 827 switch (mark){ 828 case 0: 829 return "products:checkout:step2shipping"; 830 case 1: 831 return "products:checkout:step3billing"; 832 case 2: 833 return "products:checkout:step4review"; 834 case 3: 835 return "products:checkout:confirmation"; 836 default: break; 837 } 838} 839/* Cart & Checkout pagenames - Start */ 840 841/* Remove jsessionid URL param - Start */ 842if (myPageName.indexOf(";jsessionid=") > -1) { 843 myPageName = myPageName.split(";jsessionid=")[0]; 844} 845/* Remove jsessionid URL param - End */ 846
847return decodeURIComponent(myPageName); 848} 849 } 850 }, 851 "CAPTURENAVIGATION_EVENT_RELATEDPRODUCTID:EV:DL": { 852 "defaultValue": "", 853 "storageDuration": "pageview", 854 "modulePath": "core/src/lib/dataElements/customCode.js", 855 "settings": { 856 "source": function(event) { 857 var eventArray = _satellite.getVar("EVENT:DL"); 858if (NIAnalytics.eventIndex !== -1 859 && eventArray[NIAnalytics.eventIndex].eventInfo.relatedProductID !== undefined) { 860 return eventArray[NIAnalytics.eventIndex].eventInfo.relatedProductID; 861} 862return ""; 863 864} 865 } 866 }, 867 "ONSITESEARCHSECONDARYFILTER:OSI:OS:DL": { 868 "defaultValue": "", 869 "storageDuration": "pageview", 870 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 871 "settings": { 872 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchSecondaryFilter" 873 } 874 }, 875 "6SENSE_SCORES": { 876 "storageDuration": "pageview", 877 "modulePath": "core/src/lib/dataElements/customCode.js", 878 "settings": { 879 "source": function(event) { 880 var stored = localStorage.getItem("_6senseCompanyDetails"); 881if(stored !== null && JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 882 var parsed = JSON.parse(stored); 883 884 var retVar = ''; 885 886 if(parsed.hasOwnProperty("scores")){ 887 Object.keys(parsed.scores).forEach(function(key,index) { 888 retVar += (index == 0 ? '' :";") + key.toLowerCase()+":"+parsed.scores[key].buying_stage.toLowerCase()+":"+parsed.scores[key].intent_score.toLowerCase()+":"+parsed.scores[key].profile_fit.toLowerCase()+":"+parsed.scores[key].profile_score.toLowerCase(); 889 }); 890 } 891 892 return retVar; 893 894} else { 895 return ''; 896} 897} 898 } 899 }, 900 "NIBOOSTS_RATING_NUMBER:METATAG": { 901 "defaultValue": "", 902 "storageDuration": "pageview", 903 "modulePath": "core/src/lib/dataElements/customCode.js", 904 "settings": { 905 "source": function(event) { 906 var niBoostsTmp = NIAnalytics.getMetaTag("niboosts"); 907var rnLocation = niBoostsTmp.indexOf("RN:"); 908if(rnLocation < 0) { 909 return ""; 910} else { 911 niBoostsTmp = niBoostsTmp.substring(rnLocation+3); 912 if(niBoostsTmp.indexOf(",") > -1) niBoostsTmp = niBoostsTmp.substring(0,niBoostsTmp.indexOf(",")); 913 return niBoostsTmp; 914} 915} 916 } 917 }, 918 "CONTENT_CLASS:METATAG": { 919 "defaultValue": "", 920 "storageDuration": "pageview", 921 "modulePath": "core/src/lib/dataElements/customCode.js", 922 "settings": { 923 "source": function(event) { 924 var metaTagArray = document.getElementsByTagName("meta"); 925for (var i = 0; i < metaTagArray.length; i++) { 926 if (metaTagArray[i].name.toLowerCase() === "contentclass") { 927 return metaTagArray[i].content; 928 } 929} 930} 931 } 932 }, 933 "DOCSTATUS:METATAG": { 934 "defaultValue": "", 935 "storageDuration": "pageview", 936 "modulePath": "core/src/lib/dataElements/customCode.js", 937 "settings": { 938 "source": function(event) { 939 var metaTagArray = document.getElementsByTagName("meta"); 940for (var i = 0; i < metaTagArray.length; i++) { 941 if (metaTagArray[i].name.toLowerCase() === "docstatus") { 942 return metaTagArray[i].content; 943 } 944} 945} 946 } 947 }, 948 "ANALYTICS_ERROR_MESSAGE": { 949 "defaultValue": "No error message caught", 950 "storageDuration": "pageview", 951 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 952 "settings": { 953 "path": "analyticsErrorMessage" 954 } 955 }, 956 "INDUSTRY:AT:PA:DL": { 957 "defaultValue": "", 958 "storageDuration": "pageview", 959 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 960 "settings": { 961 "path": "digitalData.page.attributes.industry" 962 } 963 }, 964 "DNB_JOB": { 965 "defaultValue": "", 966 "storageDuration": "pageview", 967 "modulePath": "core/src/lib/dataElements/customCode.js", 968 "settings": { 969 "source": function(event) { 970 var dnbStorageKey = 'dnb'; 971 972if(sessionStorage.getItem(dnbStorageKey) !== null) { 973 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 974 var retVar = dnb_Data.jobFunction + ":" + dnb_Data.jobSeniority; 975 return (retVar === ':') ? '' : retVar; 976} else{ 977 return ''; 978} 979} 980 } 981 }, 982 "CART_TRANSACTION_LAST_NAME:DL": { 983 "defaultValue": "", 984 "storageDuration": "pageview", 985 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 986 "settings": { 987 "path": "digitalData.page.transaction.lastName" 988 } 989 }, 990 "ONSITESEARCHSECONDARYFILTERORSCENARIO": { 991 "defaultValue": "", 992 "storageDuration": "pageview", 993 "modulePath": "core/src/lib/dataElements/customCode.js", 994 "settings": { 995 "source": function(event) { 996 var secFilter = _satellite.getVar("ONSITESEARCHSECONDARYFILTER:OSI:OS:DL"); 997var scenario = _satellite.getVar("ONSITESEARCHSCENARIO:OSI:OS:DL"); 998 999if (NIAnalytics.captureSearchFilterParam === "onsiteSearchScenario") { 1000 return scenario; 1001} 1002return secFilter; 1003} 1004 } 1005 }, 1006 "NODE_ID:METATAG": { 1007 "defaultValue": "", 1008 "storageDuration": "pageview", 1009 "modulePath": "core/src/lib/dataElements/customCode.js", 1010 "settings": { 1011 "source": function(event) { 1012 var metaTagArray = document.getElementsByTagName("meta"); 1013for (var i = 0; i < metaTagArray.length; i++) { 1014 if (metaTagArray[i].name.toLowerCase() === "nodeid") { 1015 return metaTagArray[i].content; 1016 } 1017} 1018} 1019 } 1020 }, 1021 "PAGENAME_FOR_TARGET_PART4": { 1022 "defaultValue": "", 1023 "storageDuration": "pageview", 1024 "modulePath": "core/src/lib/dataElements/customCode.js", 1025 "settings": { 1026 "source": function(event) { 1027 return _satellite.getVar("DETAILED_PAGENAME").split(":")[3]; 1028} 1029 } 1030 }, 1031 "ASSESSMENT_LABEL:EV:DL": { 1032 "defaultValue": "", 1033 "storageDuration": "pageview", 1034 "modulePath": "core/src/lib/dataElements/customCode.js", 1035 "settings": { 1036 "source": function(event) { 1037 return event.detail.eventName === "assessment" ? event.detail.assessmentLabel || "" : ""; 1038} 1039 } 1040 }, 1041 "ASSESSMENT_PERSONA": { 1042 "defaultValue": "", 1043 "cleanText": true, 1044 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1045 "settings": { 1046 "path": "digitalData.user.persona" 1047 } 1048 }, 1049 "DOCUMENT_DATE:METATAG": { 1050 "defaultValue": "", 1051 "storageDuration": "pageview", 1052 "modulePath": "core/src/lib/dataElements/customCode.js", 1053 "settings": { 1054 "source": function(event) { 1055 var metaTagArray = document.getElementsByTagName("meta"); 1056 1057for (var i = 0; i < metaTagArray.length; i++) { 1058 if (metaTagArray[i].name.toLowerCase() === "date") { 1059 return metaTagArray[i].content.substring(0, metaTagArray[i].content.indexOf("T")); 1060 } 1061} 1062 1063} 1064 } 1065 }, 1066 "WRAPPER:METATAG": { 1067 "defaultValue": "no", 1068 "storageDuration": "pageview", 1069 "modulePath": "core/src/lib/dataElements/customCode.js", 1070 "settings": { 1071 "source": function(event) { 1072 return NIAnalytics.getMetaTag("wrapper") || 'no'; 1073} 1074 } 1075 }, 1076 "6SENSE_COMPANY_GEO": { 1077 "storageDuration": "pageview", 1078 "modulePath": "core/src/lib/dataElements/customCode.js", 1079 "settings": { 1080 "source": function(event) { 1081 var stored = localStorage.getItem("_6senseCompanyDetails"); 1082if(stored !== null && JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 1083 var parsed = JSON.parse(stored); 1084 1085 var retVar = parsed.company.address + ":" + parsed.company.city + ":" + parsed.company.state + ":" + parsed.company.zip + ":" + parsed.company.country + "::" + parsed.company.region + ":"; 1086 return (retVar === ':::::::') ? '' : retVar; 1087} else { 1088 return ''; 1089} 1090} 1091 } 1092 }, 1093 "DNB_DUNS": { 1094 "defaultValue": "", 1095 "storageDuration": "pageview", 1096 "modulePath": "core/src/lib/dataElements/customCode.js", 1097 "settings": { 1098 "source": function(event) { 1099 var dnbStorageKey = 'dnb'; 1100 1101if(sessionStorage.getItem(dnbStorageKey) !== null) { 1102 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey));
1103 var retVar = dnb_Data.duns + ":" + dnb_Data.parentDuns + ":" + dnb_Data.domesticUltimateDuns + ":" + dnb_Data.ultimateDuns; 1104 return (retVar === ':::') ? '' : retVar; 1105} else{ 1106 return ''; 1107} 1108} 1109 } 1110 }, 1111 "IS_PRODUCTION_TIER": { 1112 "storageDuration": "pageview", 1113 "modulePath": "core/src/lib/dataElements/customCode.js", 1114 "settings": { 1115 "source": function(event) { 1116 return _satellite.environment.stage.toLowerCase() === "production"; 1117} 1118 } 1119 }, 1120 "NIGEN3:METATAG": { 1121 "defaultValue": "", 1122 "storageDuration": "pageview", 1123 "modulePath": "core/src/lib/dataElements/customCode.js", 1124 "settings": { 1125 "source": function(event) { 1126 var metaTagArray = document.getElementsByTagName("meta"); 1127for (var i = 0; i < metaTagArray.length; i++) { 1128 if (metaTagArray[i].name.toLowerCase() === "nigen3") { 1129 return metaTagArray[i].content; 1130 } 1131} 1132return ""; 1133 1134} 1135 } 1136 }, 1137 "PAGETYPE:METATAG": { 1138 "defaultValue": "", 1139 "modulePath": "core/src/lib/dataElements/customCode.js", 1140 "settings": { 1141 "source": function(event) { 1142 /*var metaTagArray = document.getElementsByTagName("meta"); 1143for (var i = 0; i < metaTagArray.length; i++) { 1144 if (metaTagArray[i].name.toLowerCase() === "pagetype") { 1145 return metaTagArray[i].content; 1146 } 1147}*/ 1148 1149if (typeof NIAnalytics === "undefined") { 1150 function NIAnalytics() {} 1151} 1152 1153if (typeof NIAnalytics.getMetaTag === "undefined"){ 1154 NIAnalytics.getMetaTag = function (name) { 1155 var metaTagArray = document.getElementsByTagName("meta"); 1156 for (var i = 0; i < metaTagArray.length; i++) { 1157 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 1158 return metaTagArray[i].content; 1159 } 1160 } 1161 return ""; 1162 } 1163} 1164 1165if (typeof NIAnalytics.getMetaFromDataLayer === "undefined"){ 1166 NIAnalytics.getMetaFromDataLayer = function(name) { 1167 return (typeof digitalData !== "undefined" && typeof digitalData.page !== "undefined" && typeof digitalData.page.pageInfo !== "undefined" && typeof digitalData.page.pageInfo[name] !== "undefined") ? digitalData.page.pageInfo[name] : ""; 1168 } 1169} 1170 1171return NIAnalytics.getMetaTag("pagetype") !== "" ? NIAnalytics.getMetaTag("pagetype") : NIAnalytics.getMetaFromDataLayer("pageType"); 1172} 1173 } 1174 }, 1175 "FILTERNAV:AT:PA:DL": { 1176 "defaultValue": "", 1177 "storageDuration": "pageview", 1178 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1179 "settings": { 1180 "path": "digitalData.page.attributes.filterNav" 1181 } 1182 }, 1183 "HASHED_EMAIL": { 1184 "defaultValue": "", 1185 "storageDuration": "pageview", 1186 "modulePath": "core/src/lib/dataElements/customCode.js", 1187 "settings": { 1188 "source": function(event) { 1189 // Target fallback 1190if (typeof NIAnalytics === "undefined") { 1191 function NIAnalytics() { } 1192} 1193 1194if(!NIAnalytics.createNestedObject){ 1195 NIAnalytics.createNestedObject = function( base, names, value ) { 1196 var lastName = arguments.length === 3 ? names.pop() : false; 1197 for( var i = 0; i < names.length; i++ ) { 1198 base = base[ names[i] ] = base[ names[i] ] || {}; 1199 } 1200 if( lastName ) base = base[ lastName ] = value; 1201 return base; 1202 }; 1203} 1204 1205if(!NIAnalytics.getCookie){ 1206 NIAnalytics.getCookie = function getCookie(name) { 1207 const value = document.cookie 1208 .split('; ') 1209 .find(row => row.startsWith(name + '=')); 1210 1211 return value ? decodeURIComponent(value.split('=')[1]) : undefined; 1212 }; 1213} 1214 1215if (typeof digitalData == "undefined") { 1216 digitalData = { }; 1217} 1218 1219NIAnalytics.createNestedObject( digitalData, ["valueToHash"], "" ); 1220 1221let hashedEmail = NIAnalytics.getCookie("ni_auth_login_hint") || ''; 1222if(hashedEmail){ 1223 NIAnalytics.createNestedObject( digitalData, ["user", "hashedEmail"], hashedEmail ); 1224} 1225return hashedEmail; 1226 1227} 1228 } 1229 }, 1230 "SECTION:METATAG": { 1231 "defaultValue": "", 1232 "storageDuration": "pageview", 1233 "modulePath": "core/src/lib/dataElements/customCode.js", 1234 "settings": { 1235 "source": function(event) { 1236 /*var metaTagArray = document.getElementsByTagName("meta"); 1237for (var i = 0; i < metaTagArray.length; i++) { 1238 if (metaTagArray[i].name.toLowerCase() === "section") { 1239 return metaTagArray[i].content; 1240 } 1241}*/ 1242 1243if (typeof NIAnalytics === "undefined") { 1244 function NIAnalytics() {} 1245} 1246 1247if (typeof NIAnalytics.getMetaTag === "undefined"){ 1248 NIAnalytics.getMetaTag = function (name) { 1249 var metaTagArray = document.getElementsByTagName("meta"); 1250 for (var i = 0; i < metaTagArray.length; i++) { 1251 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 1252 return metaTagArray[i].content; 1253 } 1254 } 1255 return ""; 1256 } 1257} 1258 1259if (typeof NIAnalytics.getMetaFromDataLayer === "undefined"){ 1260 NIAnalytics.getMetaFromDataLayer = function(name) { 1261 return (typeof digitalData !== "undefined" && typeof digitalData.page !== "undefined" && typeof digitalData.page.pageInfo !== "undefined" && typeof digitalData.page.pageInfo[name] !== "undefined") ? digitalData.page.pageInfo[name] : ""; 1262 } 1263} 1264 1265return NIAnalytics.getMetaTag("section") !== "" ? NIAnalytics.getMetaTag("section") : NIAnalytics.getMetaFromDataLayer("section"); 1266} 1267 } 1268 }, 1269 "NI_SEARCHRESULTSCOUNT:METATAG": { 1270 "defaultValue": "zero", 1271 "storageDuration": "pageview", 1272 "modulePath": "core/src/lib/dataElements/customCode.js", 1273 "settings": { 1274 "source": function(event) { 1275 return NIAnalytics.getMetaTag("ni_searchresultscount"); 1276/*var metaTagArray = document.getElementsByTagName("meta"); 1277 for (var i = 0; i < metaTagArray.length; i++) { 1278 if (metaTagArray[i].name.toLowerCase() === "ni_searchresultscount") { 1279 return metaTagArray[i].content; 1280 } 1281 } 1282 return "";*/ 1283} 1284 } 1285 }, 1286 "TT_VOC:URL_PARAM": { 1287 "defaultValue": "", 1288 "storageDuration": "pageview", 1289 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 1290 "settings": { 1291 "name": "ttvoc", 1292 "caseInsensitive": true 1293 } 1294 }, 1295 "CONTENTSQUARE_TAG_ID": { 1296 "storageDuration": "pageview", 1297 "modulePath": "core/src/lib/dataElements/conditionalValue.js", 1298 "settings": { 1299 "comparison": { 1300 "operator": "isTrue" 1301 }, 1302 "leftOperand": "%IS_PRODUCTION_TIER%", 1303 "fallbackValue": "a870b8ba03405", 1304 "conditionalValue": "a80ac3f17e94a" 1305 } 1306 }, 1307 "PREV_DOCUMENTID": { 1308 "defaultValue": "", 1309 "storageDuration": "pageview", 1310 "modulePath": "core/src/lib/dataElements/customCode.js", 1311 "settings": { 1312 "source": function(event) { 1313 var ret = s.getPreviousValue(_satellite.getVar('DOCUMENTID:METATAG'), 'gpv_di', ''); 1314 1315if (typeof(ret) === undefined) { 1316 return ""; 1317} 1318 1319return ret; 1320} 1321 } 1322 }, 1323 "DNB_COMPANY_GEO": { 1324 "defaultValue": "", 1325 "storageDuration": "pageview", 1326 "modulePath": "core/src/lib/dataElements/customCode.js", 1327 "settings": { 1328 "source": function(event) { 1329 var dnbStorageKey = 'dnb'; 1330 1331if(sessionStorage.getItem(dnbStorageKey) !== null) { 1332 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 1333 var retVar = dnb_Data.companyAddress + ":" + dnb_Data.companyCity + ":" + dnb_Data.companyState + ":" + dnb_Data.companyZip5 + ":" + dnb_Data.companyCountry + ":" + dnb_Data.companyCounty + ":" + dnb_Data.companyMsa + ":" + dnb_Data.companyRegion + ":" + dnb_Data.companyZip4; 1334 return (retVar === '::::::::') ? '' : retVar; 1335} else{ 1336 return ''; 1337} 1338} 1339 } 1340 }, 1341 "ONSITESEARCHTERM:OSI:OS:DL": { 1342 "defaultValue": "blank search term", 1343 "forceLowerCase": true, 1344 "storageDuration": "pageview", 1345 "modulePath": "core/src/lib/dataElements/customCode.js", 1346 "settings": { 1347 "source": function(event) { 1348 if(typeof digitalData !== "undefined" && typeof digitalData.onsiteSearch !== "undefined" && typeof digitalData.onsiteSearch.onsiteSearchInfo !== "undefined" && typeof digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchTerm !== "undefined"){ 1349 if(digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchTerm !== ""){ 1350 return digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchTerm; 1351 } else{ 1352 var queryString = window.location.search;
1353 var urlParams = new URLSearchParams(queryString); 1354 return urlParams.has("q") ? urlParams.get("q") :"blank search term"; 1355 } 1356} 1357} 1358 } 1359 }, 1360 "DELIVEREDBY:METATAG": { 1361 "defaultValue": "", 1362 "storageDuration": "pageview", 1363 "modulePath": "core/src/lib/dataElements/customCode.js", 1364 "settings": { 1365 "source": function(event) { 1366 var metaTagArray = document.getElementsByTagName("meta"); 1367for (var i = 0; i < metaTagArray.length; i++) { 1368 if (metaTagArray[i].name.toLowerCase() === "deliveredby") { 1369 return metaTagArray[i].content; 1370 } 1371} 1372 1373} 1374 } 1375 }, 1376 "INDUSTRY_S:METATAG": { 1377 "defaultValue": "", 1378 "storageDuration": "pageview", 1379 "modulePath": "core/src/lib/dataElements/customCode.js", 1380 "settings": { 1381 "source": function(event) { 1382 return NIAnalytics.getMetaTag("Industry_s"); 1383} 1384 } 1385 }, 1386 "TEMPLATE:PI:PA:DL": { 1387 "defaultValue": "none", 1388 "cleanText": true, 1389 "storageDuration": "pageview", 1390 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1391 "settings": { 1392 "path": "digitalData.page.pageInfo.template" 1393 } 1394 }, 1395 "ESPUID:URL_PARAM": { 1396 "defaultValue": "", 1397 "storageDuration": "session", 1398 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 1399 "settings": { 1400 "name": "espuid" 1401 } 1402 }, 1403 "PCID": { 1404 "defaultValue": "", 1405 "storageDuration": "pageview", 1406 "modulePath": "core/src/lib/dataElements/customCode.js", 1407 "settings": { 1408 "source": function(event) { 1409 var tmp = _satellite.cookie.get('mbox'); 1410if (typeof tmp !== "undefined") { 1411 var start = tmp.indexOf('PC#')+3; 1412 var slice = tmp.substring(start); 1413 return slice.substring(0, slice.indexOf('#')); 1414} else { 1415 return ''; 1416} 1417} 1418 } 1419 }, 1420 "PROMOTION_CODE:DL": { 1421 "defaultValue": "", 1422 "storageDuration": "pageview", 1423 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1424 "settings": { 1425 "path": "digitalData.transaction.attributes.promotionCode" 1426 } 1427 }, 1428 "TT_META": { 1429 "modulePath": "target-to-analytics/src/lib/dataElements/targetActivitiesByName.js", 1430 "settings": {} 1431 }, 1432 "VANITYURL:PI:PA:DL": { 1433 "defaultValue": "", 1434 "storageDuration": "pageview", 1435 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1436 "settings": { 1437 "path": "digitalData.page.pageInfo.vanityURL" 1438 } 1439 }, 1440 "OneTrust_Performance_Consent": { 1441 "storageDuration": "pageview", 1442 "modulePath": "core/src/lib/dataElements/customCode.js", 1443 "settings": { 1444 "source": function(event) { 1445 if (typeof NIAnalytics === "undefined") { 1446 function NIAnalytics() {} 1447} 1448 1449if (typeof NIAnalytics.getCookie === "undefined"){ 1450 NIAnalytics.getCookie = function (cName) { 1451 var name = cName + "="; 1452 var cDecoded = decodeURIComponent(document.cookie); 1453 var cArr = cDecoded.split('; '); 1454 var res; 1455 return cArr.forEach(function (val) { 1456 val.indexOf(name) === 0 && (res = val.substring(name.length)); 1457 }), res; 1458 }; 1459} 1460 1461return (/C0002:1/).test(NIAnalytics.getCookie('OptanonConsent')); 1462} 1463 } 1464 }, 1465 "CAPTURESEARCHSUBMIT_EVENT:DL": { 1466 "defaultValue": "", 1467 "storageDuration": "pageview", 1468 "modulePath": "core/src/lib/dataElements/customCode.js", 1469 "settings": { 1470 "source": function(event) { 1471 var eventArray = _satellite.getVar("EVENT:DL"); 1472for (var i = 0; i < eventArray.length; i++){ 1473 if (eventArray[i].eventInfo.eventName === "searchType") return eventArray[i].eventInfo.eventLabel; 1474} 1475return ""; 1476} 1477 } 1478 }, 1479 "PRODUCT_MANUFACTURER:DL": { 1480 "modulePath": "core/src/lib/dataElements/customCode.js", 1481 "settings": { 1482 "source": function(event) { 1483 return (NIAnalytics.checkNestedObject(digitalData, "product[0].productInfo.manufacturer") && digitalData.product[0].productInfo.manufacturer.length > 0) ? digitalData.product[0].productInfo.manufacturer : 'unspecified'; 1484} 1485 } 1486 }, 1487 "TEMPLATE_S:METATAG": { 1488 "defaultValue": "", 1489 "storageDuration": "pageview", 1490 "modulePath": "core/src/lib/dataElements/customCode.js", 1491 "settings": { 1492 "source": function(event) { 1493 return NIAnalytics.getMetaTag("Template_s"); 1494} 1495 } 1496 }, 1497 "PAGE_URL": {
1498 "defaultValue": "No URL", 1499 "storageDuration": "pageview", 1500 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1501 "settings": { 1502 "path": "window.location.href" 1503 } 1504 }, 1505 "SHIPPING_POSTAL_CODE:DL": { 1506 "defaultValue": "", 1507 "storageDuration": "pageview", 1508 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1509 "settings": { 1510 "path": "digitalData.transaction.profile.shippingAddress.postalCode" 1511 } 1512 }, 1513 "PROFILE_ID:COOKIE": { 1514 "defaultValue": "anon", 1515 "storageDuration": "pageview", 1516 "modulePath": "core/src/lib/dataElements/customCode.js", 1517 "settings": { 1518 "source": function(event) { 1519 const cookieValue = NIAnalytics.getCookie("ni_auth_login_hint"); 1520if(cookieValue && sessionStorage.hasOwnProperty("profileId")){ 1521 const profileData = JSON.parse(sessionStorage.getItem("profileId")); 1522 return profileData.hasOwnProperty(cookieValue) ? profileData[cookieValue] : "anon"; 1523} 1524 1525return "anon"; 1526} 1527 } 1528 }, 1529 "FORUM_UPDATE_DATE:METATAG": { 1530 "defaultValue": "", 1531 "storageDuration": "pageview", 1532 "modulePath": "core/src/lib/dataElements/customCode.js", 1533 "settings": { 1534 "source": function(event) { 1535 var metaTagArray = document.getElementsByTagName("meta"); 1536 for (var i = 0; i < metaTagArray.length; i++) { 1537 if (metaTagArray[i].name.toLowerCase() === "updatedate") { 1538 return metaTagArray[i].getAttribute("content"); 1539 } 1540} 1541} 1542 } 1543 }, 1544 "TRAFFICTYPE_META": { 1545 "defaultValue": "human", 1546 "storageDuration": "pageview", 1547 "modulePath": "core/src/lib/dataElements/customCode.js", 1548 "settings": { 1549 "source": function(event) { 1550 return NIAnalytics.getMetaTag("trafficType"); 1551} 1552 } 1553 }, 1554 "ONSITESEARCHAUTOCOMPLETERANK:OSI:OS:DL": { 1555 "defaultValue": "", 1556 "storageDuration": "pageview", 1557 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1558 "settings": { 1559 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchAutocompleteRank" 1560 } 1561 }, 1562 "PRODUCT_ID:DL": { 1563 "defaultValue": "", 1564 "cleanText": true, 1565 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1566 "settings": { 1567 "path": "digitalData.product[0].productInfo.productID" 1568 } 1569 }, 1570 "KEYWORDS_PART2:METATAG": { 1571 "defaultValue": "", 1572 "storageDuration": "pageview", 1573 "modulePath": "core/src/lib/dataElements/customCode.js", 1574 "settings": { 1575 "source": function(event) { 1576 var forumKW = _satellite.getVar("FORUM_KEYWORDS:METATAG"); 1577 1578if(forumKW !== ""){ 1579 return forumKW.substring(255); 1580} else { 1581 return NIAnalytics.getMetaTag("keywords").substring(255); 1582} 1583} 1584 } 1585 }, 1586 "NICOM_PAGE": { 1587 "defaultValue": "", 1588 "storageDuration": "pageview", 1589 "modulePath": "core/src/lib/dataElements/customCode.js", 1590 "settings": { 1591 "source": function(event) { 1592 var url = location.href; 1593if (url.indexOf("?") > -1){ 1594 url = url.split("?")[0]; 1595} 1596if (url.replace(/(-test2|-test|-dev2|-dev)/, "").search(/delta.ni.com\/nipr/i) > -1) return "false"; 1597return "true"; 1598} 1599 } 1600 }, 1601 "GENERIC_PAGENAME": { 1602 "defaultValue": "", 1603 "forceLowerCase": true, 1604 "storageDuration": "pageview", 1605 "modulePath": "core/src/lib/dataElements/customCode.js", 1606 "settings": { 1607 "source": function(event) { 1608 return _satellite.getVar("PAGENAME")[1]; 1609} 1610 } 1611 }, 1612 "DNB_FIRMOGRAPHIC": { 1613 "defaultValue": "", 1614 "storageDuration": "pageview", 1615 "modulePath": "core/src/lib/dataElements/customCode.js", 1616 "settings": { 1617 "source": function(event) { 1618 var dnbStorageKey = 'dnb'; 1619 1620if(sessionStorage.getItem(dnbStorageKey) !== null) { 1621 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 1622 var retVar = dnb_Data.employeesAtLocation +":" + dnb_Data.employeesAtLocationNum +":" + dnb_Data.employeesInAllLocations +":" + dnb_Data.employeesInAllLocationsNum +":" + dnb_Data.familyTreeSize +":" + dnb_Data.familyTreeSizeNum +":" + dnb_Data.salesAnnual +":" + dnb_Data.salesAnnualNum +":" + dnb_Data.fortune1000 +":" + dnb_Data.networth +":" + dnb_Data.networthNum +":" + dnb_Data.walletSize; 1623 return (retVar === ':::::::::::') ? '' : retVar; 1624} else{ 1625 return ''; 1626} 1627} 1628 } 1629 }, 1630 "SHORTTITLE:METATAG": { 1631 "defaultValue": "", 1632 "storageDuration": "pageview", 1633 "modulePath": "core/src/lib/dataElements/customCode.js", 1634 "settings": { 1635 "source": function(event) { 1636 var metaTagArray = document.getElementsByTagName("meta"); 1637for (var i = 0; i < metaTagArray.length; i++) { 1638 if (metaTagArray[i].name.toLowerCase() === "shorttitle") { 1639 return metaTagArray[i].content; 1640 } 1641} 1642} 1643 } 1644 }, 1645 "CART_TRANSACTION_FIRST_NAME:DL": { 1646 "defaultValue": "", 1647 "storageDuration": "pageview", 1648 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1649 "settings": { 1650 "path": "digitalData.page.transaction.firstName" 1651 } 1652 }, 1653 "ACTION:URL_PARAM": { 1654 "defaultValue": "", 1655 "cleanText": true, 1656 "storageDuration": "pageview", 1657 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 1658 "settings": { 1659 "name": "action", 1660 "caseInsensitive": true 1661 } 1662 }, 1663 "LANGUAGE:METATAG": { 1664 "defaultValue": "", 1665 "storageDuration": "pageview", 1666 "modulePath": "core/src/lib/dataElements/customCode.js", 1667 "settings": { 1668 "source": function(event) { 1669 var metaTagArray = document.getElementsByTagName("meta"); 1670for (var i = 0; i < metaTagArray.length; i++) { 1671 if (metaTagArray[i].name.toLowerCase() === "language") { 1672 return metaTagArray[i].content; 1673 } 1674} 1675return ""; 1676 1677} 1678 } 1679 }, 1680 "SCREEN_WIDTH": { 1681 "cleanText": true, 1682 "storageDuration": "pageview", 1683 "modulePath": "core/src/lib/dataElements/customCode.js", 1684 "settings": { 1685 "source": function(event) { 1686 return window.screen.width; 1687} 1688 } 1689 }, 1690 "COUNTRY_METATAG": { 1691 "cleanText": true, 1692 "storageDuration": "pageview", 1693 "modulePath": "core/src/lib/dataElements/customCode.js", 1694 "settings": { 1695 "source": function(event) { 1696 return NIAnalytics.getMetaTag("cf:country"); 1697} 1698 } 1699 }, 1700 "B2BCookieExists": { 1701 "storageDuration": "session", 1702 "modulePath": "core/src/lib/dataElements/customCode.js", 1703 "settings": { 1704 "source": function(event) {
1705 return document.cookie.indexOf('b2b_experience=') > -1; 1706} 1707 } 1708 }, 1709 "ONSITESEARCHCLICKTITLE:OSI:OS:DL": { 1710 "defaultValue": "", 1711 "storageDuration": "pageview", 1712 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1713 "settings": { 1714 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchClickTitle" 1715 } 1716 }, 1717 "VOC:COOKIE": { 1718 "defaultValue": "", 1719 "storageDuration": "pageview", 1720 "modulePath": "core/src/lib/dataElements/cookie.js", 1721 "settings": { 1722 "name": "mcxSurveyQuarantine" 1723 } 1724 }, 1725 "HTML_TITLE": { 1726 "defaultValue": "", 1727 "storageDuration": "pageview", 1728 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1729 "settings": { 1730 "path": "document.title" 1731 } 1732 }, 1733 "LOGGED_IN": { 1734 "defaultValue": "not logged in", 1735 "storageDuration": "pageview", 1736 "modulePath": "core/src/lib/dataElements/customCode.js", 1737 "settings": { 1738 "source": function(event) { 1739 var upid = _satellite.getVar('AUTH0_HINT:COOKIE'); 1740 1741if (upid !== 'anon' && upid !== '' && typeof(upid) !== undefined ) { 1742 return "logged in"; 1743} 1744 1745return "not logged in"; 1746} 1747 } 1748 }, 1749 "TAX_EXEMPT:DL": { 1750 "defaultValue": "", 1751 "storageDuration": "pageview", 1752 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1753 "settings": { 1754 "path": "digitalData.transaction.total.taxExempt" 1755 } 1756 }, 1757 "CART_TRANSACTION_EMAIL:DL": { 1758 "defaultValue": "", 1759 "forceLowerCase": true, 1760 "storageDuration": "pageview", 1761 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1762 "settings": { 1763 "path": "digitalData.page.transaction.email" 1764 } 1765 }, 1766 "DETAILED_PAGENAME": { 1767 "defaultValue": "", 1768 "forceLowerCase": true, 1769 "storageDuration": "pageview", 1770 "modulePath": "core/src/lib/dataElements/customCode.js", 1771 "settings": { 1772 "source": function(event) { 1773 return _satellite.getVar("PAGENAME")[0]; 1774} 1775 } 1776 }, 1777 "SEO_H2_VALUES": { 1778 "defaultValue": "", 1779 "storageDuration": "pageview", 1780 "modulePath": "core/src/lib/dataElements/customCode.js", 1781 "settings": { 1782 "source": function(event) { 1783 var h2Tags = document.getElementsByTagName("h2"); 1784var h2Class = document.querySelectorAll(".h2"); 1785var result = ""; 1786 1787if(typeof String.prototype.trim !== 'function') { 1788 String.prototype.trim = function() { 1789 return this.replace(/^\s+|\s+$/g, ''); 1790 } 1791} 1792 1793var content; 1794 1795for(i = 0; i < h2Tags.length; i++){ 1796 content = h2Tags[i].innerText || h2Tags[i].textContent; 1797 result += i>0 ? "|"+content.trim() : content.trim(); 1798} 1799 1800for(i = 0; i < h2Class.length; i++){ 1801 content = h2Class[i].innerText || h2Class[i].textContent; 1802 result += (i>0 | result !== "") ? "|"+content.trim() : content.trim(); 1803} 1804 1805return result === "" ? "no value" : result; 1806} 1807 } 1808 }, 1809 "EVENT:DL": { 1810 "defaultValue": "", 1811 "storageDuration": "pageview", 1812 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1813 "settings": { 1814 "path": "digitalData.event" 1815 } 1816 }, 1817 "PRODREF:URL_PARAM": { 1818 "defaultValue": "", 1819 "storageDuration": "pageview", 1820 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 1821 "settings": { 1822 "name": "prodref", 1823 "caseInsensitive": true 1824 } 1825 }, 1826 "ASSESSMENT_QUESTIONID:EV:DL": { 1827 "defaultValue": "", 1828 "storageDuration": "pageview", 1829 "modulePath": "core/src/lib/dataElements/customCode.js", 1830 "settings": { 1831 "source": function(event) { 1832 var eventArray = _satellite.getVar("EVENT:DL"); 1833for (var i = 0; i < eventArray.length; i++){ 1834 if (eventArray[i].eventInfo.eventName === "assessment") return eventArray[i].eventInfo.questionID; 1835} 1836return ""; 1837} 1838 } 1839 }, 1840 "PRODREF": { 1841 "defaultValue": "", 1842 "storageDuration": "pageview", 1843 "modulePath": "core/src/lib/dataElements/customCode.js", 1844 "settings": { 1845 "source": function(event) { 1846 var params = location.pathname.split("/"); 1847 1848for (i = 0; i < params.length; i++) { 1849 if (params[i] === "prodref") { 1850 return decodeURIComponent(params[i+1]); 1851 } 1852} 1853 1854return _satellite.getVar('PRODREF:URL_PARAM'); 1855} 1856 } 1857 }, 1858 "PRODUCT_NUMBERS": { 1859 "defaultValue": "", 1860 "storageDuration": "pageview", 1861 "modulePath": "core/src/lib/dataElements/customCode.js", 1862 "settings": { 1863 "source": function(event) { 1864 var inputArray = document.getElementsByTagName("input"); 1865var ret = ""; 1866for (var i = 0; i < inputArray.length; i++) { 1867 if (inputArray[i].name === "pn") { 1868 ret += ", " + inputArray[i].getAttribute("value"); 1869 } 1870} 1871return ret.substring(2); 1872} 1873 } 1874 }, 1875 "EMAIL:EV:DL": { 1876 "defaultValue": "", 1877 "storageDuration": "pageview", 1878 "modulePath": "core/src/lib/dataElements/customCode.js", 1879 "settings": { 1880 "source": function(event) { 1881 var eventArray = _satellite.getVar("EVENT:DL"); 1882if (NIAnalytics.eventIndex !== -1 && 1883 eventArray[NIAnalytics.eventIndex].eventInfo.email !== undefined) { 1884 return eventArray[NIAnalytics.eventIndex].eventInfo.email; 1885} 1886return ""; 1887 1888} 1889 } 1890 }, 1891 "FORUM_DOCUMENTID": { 1892 "defaultValue": "", 1893 "storageDuration": "pageview", 1894 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 1895 "settings": { 1896 "path": "LITHIUM.CommunityJsonObject.Page.object.id" 1897 } 1898 }, 1899 "PAGENAME_FOR_TARGET_PART1": { 1900 "defaultValue": "", 1901 "storageDuration": "pageview", 1902 "modulePath": "core/src/lib/dataElements/customCode.js", 1903 "settings": { 1904 "source": function(event) { 1905 return _satellite.getVar("DETAILED_PAGENAME").split(":")[0]; 1906} 1907 } 1908 }, 1909 "LIST1": { 1910 "defaultValue": "", 1911 "modulePath": "core/src/lib/dataElements/customCode.js", 1912 "settings": { 1913 "source": function(event) { 1914 var product = _satellite.getVar("PRODUCT:DL"); 1915if (typeof product[0] != "undefined"){ 1916 if (typeof product[0].productInfo != "undefined") { 1917 var modelName = product[0].productInfo.modelName; 1918 var productName = product[0].productInfo.productName; 1919 var versionId = product[0].productInfo.versionID; 1920 if (typeof versionId !== "undefined" && versionId !== ""){ 1921 return versionId; 1922 } else if (typeof modelName !== "undefined" && modelName !== "") { 1923 return modelName; 1924 } else if (typeof productName !== "undefined" && productName !== "") { 1925 return productName; 1926 } 1927 } else if (typeof product[0].category !== "undefined") { 1928 var hardwareForm = product[0].category.hardwareForm; 1929 var categoryID = product[0].category.categoryID; 1930 var platformModule = product[0].category.platformModule; 1931 var category = product[0].category.category; 1932 var platformCategory = product[0].category.platformCategory; 1933 if (typeof hardwareForm !== "undefined" && hardwareForm !== "") { 1934 return hardwareForm; 1935 } else if (typeof categoryID !== "undefined" && categoryID !== "") { 1936 return categoryID; 1937 } else if (typeof platformModule !== "undefined" && platformModule !== "") { 1938 return platformModule; 1939 } else if (typeof category !== "undefined" && category !== "") { 1940 return category; 1941 } else if (typeof platformCategory !== "undefined" && platformCategory !== "") { 1942 return platformCategory; 1943 } 1944 } 1945} 1946var productMetatag = _satellite.getVar("PRODUCTCATEGORIES:METATAG"); 1947if (productMetatag !== "") { 1948 return productMetatag; 1949} 1950 1951} 1952 } 1953 }, 1954 "WORD_COUNT": { 1955 "defaultValue": "", 1956 "storageDuration": "pageview", 1957 "modulePath": "core/src/lib/dataElements/customCode.js", 1958 "settings": { 1959 "source": function(event) { 1960 var analyticsWordCount = _satellite.getVar("WORDCOUNT:PI:PA:DL"); 1961var analyticsLang = _satellite.getVar("LANGUAGE:METATAG"); 1962var deliveredBy = _satellite.getVar("DELIVEREDBY:METATAG").toLowerCase(); 1963var contenttype = _satellite.getVar("CONTENTTYPE:METATAG").toLowerCase(); 1964 1965if(!NIAnalytics.createNestedObject){ 1966 NIAnalytics.createNestedObject = function( base, names, value ) { 1967 var lastName = arguments.length === 3 ? names.pop() : false;
1968 for( var i = 0; i < names.length; i++ ) { 1969 base = base[ names[i] ] = base[ names[i] ] || {}; 1970 } 1971 if( lastName ) base = base[ lastName ] = value; 1972 return base; 1973 }; 1974} 1975 1976function textNodesUnder(node) { 1977 var all = []; 1978 if (node.nodeName === 'STYLE' || node.nodeName === 'A') return []; 1979 if (typeof node.className === "string") { 1980 if (node.className.indexOf("noindex") !== -1) return []; 1981 else if (node.className.indexOf("UserSignature") !== -1) return []; // Lithium examples 1982 } 1983 for (node = node.firstChild; node; node = node.nextSibling) { 1984 if (node.nodeType === 3) all.push(node); 1985 else if (node.nodeName != "SCRIPT") all = all.concat(textNodesUnder(node)); 1986 } 1987 return all; 1988} 1989 1990function isAncestor(el, cls) { 1991 while ((el = el.parentNode) && el.parentNode && el.className.indexOf(cls) < 0); 1992 return el !== document; 1993} 1994 1995if (analyticsWordCount == "" || digitalData.page.pageInfo.letterCount == undefined || digitalData.page.pageInfo.letterCount == "") { 1996 var arr = []; 1997 var innerContent = false; 1998 var sth; 1999 // Don't mess up with the order 2000 //Community Examples 2001 if ((window.location.hostname === "forums.ni.com" || window.location.hostname === "forumstage.ni.com") && (contenttype === "communitydocument" || contenttype === "example")) { 2002 var tmp = document.querySelectorAll('div.custom-body-wrap'); 2003 if (!tmp.length) { 2004 tmp = document.querySelectorAll('div.lia-message-template-overview-zone, div.lia-message-template-description-zone, div.lia-message-template-requirements-zone,' 2005 + 'div.lia-message-template-execute-zone, div.lia-message-template-additional-info-zone'); 2006 } 2007 if(!tmp.length){ 2008 tmp = document.querySelectorAll('div.lia-message-template-content-zone'); 2009 } 2010 if (!tmp.length) { 2011 var fallbackDiv = document.getElementsByClassName("lia-message-body-content")[0]; 2012 tmp = fallbackDiv ? [fallbackDiv] : []; 2013 } 2014 for (var i = 0; i < tmp.length; i++) { 2015 if (!isAncestor(tmp[i], "CommentList")) { 2016 arr.push(tmp[i]); 2017 } 2018 } 2019 if (arr.length > 0) { sth = arr; innerContent = true; } 2020 } 2021 if (sth == undefined || sth.length == 0) { // Knowledgebase 2022 var tmp = document.getElementsByClassName("blog-post"); 2023 if (tmp.length > 0) { sth = arr = tmp; innerContent = true; } 2024 } 2025 if (sth == undefined || sth.length == 0) { 2026 var niPageWrap = document.getElementsByClassName("ni-page-wrap"); 2027 sth = niPageWrap[niPageWrap.length - 1]; 2028 } 2029 if (sth == undefined || sth.length == 0) { // VCM Docs (white papers, product documentation, examples) 2030 var tmp = document.getElementsByClassName("tutorial-body"); 2031 if (tmp.length > 0) { sth = arr = tmp; innerContent = true; } 2032 } 2033 if (sth == undefined || sth.length == 0) sth = document.getElementById("ni-main-page-content"); 2034 if (sth == undefined || sth.length == 0) sth = document.getElementById("main-content"); 2035 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("my-profile")[0]; 2036 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("pnx-content")[0]; 2037 if (sth == undefined || sth.length == 0) sth = document.getElementsByTagName("main")[0]; 2038 if (sth == undefined || sth.length == 0) sth = document.getElementById("bodycontainer"); 2039 if (sth == undefined || sth.length == 0) sth = document.getElementById("wrapper"); 2040 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("wrapper")[0]; 2041 if (sth == undefined || sth.length == 0) sth = document.getElementById("messageBodySimpleDisplay"); //Lithium examples 2042 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("MinimumWidthContainer")[0]; 2043 if (sth == undefined || sth.length == 0) sth = document.getElementById("page-content"); 2044 if ((sth == undefined || sth.length == 0) && document.getElementsByClassName("banner-section")[0] != undefined) { 2045 sth = document.getElementsByClassName("banner-section")[0].cloneNode(true); 2046 sth.appendChild(document.getElementsByClassName("content-wrapper")[0].cloneNode(true)); 2047 } 2048 if (sth == undefined || sth.length == 0) sth = deliveredBy === "searchable product documentation" ? document.getElementsByClassName("container")[5] : document.getElementsByClassName("container")[0]; //Should be the last condition 2049 if (sth == undefined || sth.length == 0) return 0; 2050 if (!innerContent) { 2051 for (var i = 0; i < sth.children.length; i++) { 2052 if (sth.children[i].nodeName === "DIV" || sth.children[i].nodeName === "FORM" || sth.children[i].nodeName === "TABLE" || sth.children[i].nodeName === "SECTION") { 2053 if (sth.children[i].className.indexOf("noindex") === -1 && sth.children[i].id !== "cookieLaw" && sth.children[i].className.indexOf("ni-search-tips-modal") === -1 && sth.children[i].id !== "ni-vis-head" && sth.children[i].id !== "ni-vis-foot") arr.push(sth.children[i]); 2054 } 2055 } 2056 } 2057 var wordCount = 0; 2058 var letterCount = 0; 2059 for (j = 0; j < arr.length; j++) { 2060 var tmp = textNodesUnder(arr[j]); 2061 2062 var tmp2 = ""; 2063 var tmp3 = ""; 2064 for (i = 0; i < tmp.length; i++) { 2065 if (tmp[i].nodeValue !== undefined && tmp[i].nodeValue.replace(/^\s+|\s+$/gm, '') !== "") { 2066 tmp2 = tmp2.concat(" ", tmp[i].nodeValue.replace(/\n/g, ''), " "); 2067 tmp3 += tmp[i].nodeValue.replace(/\n/g, '').replace(/\s{2,}/g, ''); 2068 } 2069 } 2070 if (/ja|ko|zh-TW|zh-CN/g.test(analyticsLang)) { 2071 tmp2 = tmp2.replace(/\n|\xa0| |\t|\u2714|\u2716/g, ""); 2072 tmp3 = tmp3.replace(/\n|\xa0| |\t/g, ""); 2073 2074 } else { 2075 for (i = 0; i < tmp2.length - 1; i++) { 2076 if (tmp2.charAt(i) == " " || tmp2.charAt(i) == "\t" || tmp2.charAt(i) == "\xa0") { 2077 if (tmp2.charAt(i + 1) == " " || tmp2.charAt(i + 1) == "\t" || tmp2.charAt(i + 1) == "\xa0") { tmp2 = tmp2.slice(0, i + 1) + tmp2.slice(i + 2); i--; } 2078 if (tmp2.charCodeAt(i + 1) == "10004" || tmp2.charCodeAt(i + 1) == "10006") { tmp2 = tmp2.slice(0, i + 1) + tmp2.slice(i + 2); i--; } //Excluding special chars 2079 } 2080 } 2081 for (i = 0; i < tmp3.length - 1; i++) { 2082 if ((tmp3.charAt(i) == " " || tmp3.charAt(i) == "\t" || tmp3.charAt(i) == "\xa0") && (tmp3.charAt(i + 1) == " " || tmp3.charAt(i + 1) == "\t" || tmp3.charAt(i + 1) == "\xa0")) { tmp3 = tmp3.slice(0, i + 1) + tmp3.slice(i + 2); i--; } 2083 } 2084 } 2085 if (tmp2.charAt(tmp2.length - 1) == " " || tmp2.charAt(tmp2.length - 1) == "/t" || tmp2.charAt(tmp2.length - 1) == "\xa0") tmp2 = tmp2.slice(0, tmp2.length - 1); 2086 if (tmp2.charAt(0) == " " || tmp2.charAt(0) == "\t" || tmp2.charAt(0) == "\xa0") tmp2 = tmp2.slice(1); 2087 2088 if (tmp3.charAt(tmp3.length - 1) == " " || tmp3.charAt(tmp3.length - 1) == "/t" || tmp3.charAt(tmp3.length - 1) == "\xa0") tmp3 = tmp3.slice(0, tmp3.length - 1); 2089 if (tmp3.charAt(0) == " " || tmp3.charAt(0) == "\t" || tmp3.charAt(0) == "\xa0") tmp3 = tmp3.slice(1); 2090 2091 letterCount += tmp3.length; 2092 if (tmp2.length !== 0) { 2093 if (/ja|ko|zh-TW|zh-CN/g.test(analyticsLang)) { 2094 wordCount = tmp2.length; 2095 } else { 2096 wordCount++; 2097 for (i = 0; i < tmp2.length - 1; i++) { 2098 if (tmp2.charAt(i) == " " || tmp2.charAt(i) == "\t" || tmp2.charAt(i) == "\xa0") wordCount++; 2099 } 2100 } 2101 } 2102 } 2103 if (typeof digitalData === "undefined") digitalData = {}; 2104 NIAnalytics.createNestedObject( digitalData, ["page", "pageInfo", "wordCount"], wordCount ); 2105 NIAnalytics.createNestedObject( digitalData, ["page", "pageInfo", "letterCount"], letterCount ); 2106 return wordCount !== 0 ? wordCount : "0"; 2107} else return analyticsWordCount; 2108 2109} 2110 } 2111 }, 2112 "ONSITESEARCHSCENARIO:OSI:OS:DL": { 2113 "defaultValue": "", 2114 "storageDuration": "pageview", 2115 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 2116 "settings": { 2117 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchScenario" 2118 } 2119 }, 2120 "SURVEY_FILTER": { 2121 "defaultValue": "true", 2122 "storageDuration": "pageview", 2123 "modulePath": "core/src/lib/dataElements/customCode.js", 2124 "settings": { 2125 "source": function(event) { 2126 var vocDomain = document.domain; 2127var vocLink = document.location.href.toLowerCase(); 2128var vocReferrer = document.referrer.toLowerCase(); 2129 2130if (vocDomain.indexOf("landing") > -1) return "false"; 2131if (vocDomain.indexOf("lumen") > -1 && vocLink.indexOf("prodevaluation") > -1) return "false"; 2132if (vocDomain.indexOf("lumen") > -1 && vocLink.indexOf("prodactivation") > -1) return "false"; 2133if (vocDomain.indexOf("delta") > -1 && vocLink.indexOf("customer_activate_details") > -1) return "false"; 2134if (vocDomain.indexOf("delta") > -1 && vocLink.indexOf("extendedevaluation") > -1) return "false"; 2135if (vocLink.indexOf("nipartslist") > -1) return "false"; 2136if (vocLink.indexOf("labview/product-questionnaire") > -1) return "false"; 2137if (vocLink.indexOf("?prodref=") > -1 || vocLink.indexOf("&prodref=") > -1) return "false"; 2138if (vocReferrer.indexOf("multisim") > -1 && vocReferrer.indexOf("softonic.com") > -1) return "false"; 2139if (vocReferrer.indexOf("beta.multisim.com") > -1) return "false"; 2140if (vocLink.indexOf("/shop/labview/labview-nxg.html") > -1) return "false"; 2141return "true"; 2142} 2143 } 2144 }, 2145 "SHIPPING_COUNTRY:DL": { 2146 "defaultValue": "", 2147 "storageDuration": "pageview", 2148 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 2149 "settings": { 2150 "path": "digitalData.transaction.profile.shippingAddress.country" 2151 } 2152 }, 2153 "PAGENAME_FOR_TARGET_PART5": { 2154 "defaultValue": "", 2155 "storageDuration": "pageview", 2156 "modulePath": "core/src/lib/dataElements/customCode.js", 2157 "settings": { 2158 "source": function(event) { 2159 return _satellite.getVar("DETAILED_PAGENAME").split(":")[4]; 2160} 2161 } 2162 }, 2163 "6SENSE_INDUSTRY": { 2164 "storageDuration": "pageview", 2165 "modulePath": "core/src/lib/dataElements/customCode.js", 2166 "settings": { 2167 "source": function(event) { 2168 var stored = localStorage.getItem("_6senseCompanyDetails"); 2169if(stored !== null && JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 2170 var parsed = JSON.parse(stored); 2171 2172 var retVar = parsed.company.naics + ":" + parsed.company.naics_description + ":" + parsed.company.sic_description + ":" +parsed.company.industry; 2173 return (retVar === ':::') ? '' : retVar; 2174} else { 2175 return ''; 2176} 2177} 2178 } 2179 }, 2180 "LAST_CID_URL_PARAM": { 2181 "defaultValue": "", 2182 "storageDuration": "pageview", 2183 "modulePath": "core/src/lib/dataElements/customCode.js", 2184 "settings": { 2185 "source": function(event) { 2186 var cid = _satellite.getVar("CID:URL_PARAM"); 2187return Array.isArray(cid) ? cid[cid.length - 1] : cid; 2188} 2189 } 2190 }, 2191 "TargetAutohideEnabled": { 2192 "modulePath": "core/src/lib/dataElements/customCode.js", 2193 "settings": { 2194 "source": function(event) { 2195 return !document.querySelector("meta[name='TargetAutohideEnabled' i][content='false' i]"); 2196} 2197 } 2198 }, 2199 "NAVIGATION_SECTION": { 2200 "defaultValue": "", 2201 "storageDuration": "pageview", 2202 "modulePath": "core/src/lib/dataElements/customCode.js", 2203 "settings": { 2204 "source": function(event) { 2205 if (_satellite.getVar("PAGENAME") !== "" ) return _satellite.getVar("PAGENAME")[0].split(":")[0]; 2206} 2207 } 2208 }, 2209 "PAYMENT_METHOD:DL": { 2210 "defaultValue": "", 2211 "storageDuration": "pageview", 2212 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 2213 "settings": { 2214 "path": "digitalData.transaction.attributes.paymentMethod" 2215 } 2216 }, 2217 "ENGLISHSHORTTITLE:METATAG": { 2218 "defaultValue": "", 2219 "storageDuration": "pageview", 2220 "modulePath": "core/src/lib/dataElements/customCode.js", 2221 "settings": { 2222 "source": function(event) { 2223 /*var metaTagArray = document.getElementsByTagName("meta"); 2224for (var i = 0; i < metaTagArray.length; i++) { 2225 if (metaTagArray[i].name.toLowerCase() === "englishshorttitle") { 2226 return metaTagArray[i].content; 2227 } 2228}*/ 2229 2230if (typeof NIAnalytics === "undefined") { 2231 function NIAnalytics() {} 2232} 2233 2234if (typeof NIAnalytics.getMetaTag === "undefined"){ 2235 NIAnalytics.getMetaTag = function (name) { 2236 var metaTagArray = document.getElementsByTagName("meta"); 2237 for (var i = 0; i < metaTagArray.length; i++) { 2238 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 2239 return metaTagArray[i].content; 2240 } 2241 } 2242 return ""; 2243 } 2244} 2245 2246if (typeof NIAnalytics.getMetaFromDataLayer === "undefined"){ 2247 NIAnalytics.getMetaFromDataLayer = function(name) { 2248 return (typeof digitalData !== "undefined" && typeof digitalData.page !== "undefined" && typeof digitalData.page.pageInfo !== "undefined" && typeof digitalData.page.pageInfo[name] !== "undefined") ? digitalData.page.pageInfo[name] : ""; 2249 } 2250} 2251 2252return NIAnalytics.getMetaTag("englishshorttitle") !== "" ? NIAnalytics.getMetaTag("englishshorttitle") : NIAnalytics.getMetaFromDataLayer("englishShortTitle"); 2253} 2254 } 2255 }, 2256 "NISRC:URL_PARAM": { 2257 "defaultValue": "", 2258 "storageDuration": "pageview", 2259 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 2260 "settings": { 2261 "name": "nisrc" 2262 } 2263 }, 2264 "PREV_LOGGED_IN": { 2265 "defaultValue": "not logged in", 2266 "storageDuration": "pageview", 2267 "modulePath": "core/src/lib/dataElements/customCode.js", 2268 "settings": { 2269 "source": function(event) { 2270 return s.getPreviousValue(s.eVar9, 'gpv_profile', ''); 2271} 2272 } 2273 }, 2274 "6SENSE_SICCODE": { 2275 "storageDuration": "pageview", 2276 "modulePath": "core/src/lib/dataElements/customCode.js", 2277 "settings": { 2278 "source": function(event) { 2279 var stored = localStorage.getItem("_6senseCompanyDetails"); 2280if(stored !== null && JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 2281 var parsed = JSON.parse(stored); 2282 2283 return parsed.company.sic; 2284} else { 2285 return ''; 2286} 2287} 2288 } 2289 }, 2290 "CURRENT_ISO_DATE_STRING": { 2291 "modulePath": "core/src/lib/dataElements/customCode.js", 2292 "settings": { 2293 "source": function(event) { 2294 return new Date().toISOString(); 2295} 2296 } 2297 }, 2298 "FILTERFACET:AT:PA:DL": { 2299 "defaultValue": "", 2300 "storageDuration": "pageview", 2301 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 2302 "settings": { 2303 "path": "digitalData.page.attributes.filterFacet" 2304 } 2305 }, 2306 "GOOGLE_SHOPPING_FILTER": { 2307 "defaultValue": "", 2308 "storageDuration": "pageview", 2309 "modulePath": "core/src/lib/dataElements/customCode.js", 2310 "settings": { 2311 "source": function(event) { 2312 var pagenames = [ 2313 "products:cart:shopping cart", 2314 "products:checkout:confirmation" 2315]; 2316 2317return ((pagenames.indexOf(_satellite.getVar("DETAILED_PAGENAME")) > -1) || (_satellite.getVar("TEMPLATE:PI:PA:DL") === "checkout" && _satellite.getVar("SUBTEMPLATE:PI:PA:DL") === "confirmation")) ? "true" : "false"; 2318} 2319 } 2320 }, 2321 "EVENT_NAME:EV:DL_BY_ENAME": { 2322 "defaultValue": "", 2323 "storageDuration": "pageview", 2324 "modulePath": "core/src/lib/dataElements/customCode.js", 2325 "settings": { 2326 "source": function(event) { 2327 var eventArray = _satellite.getVar("EVENT:DL"); 2328for (var i = 0; i < eventArray.length; i++){ 2329 if (eventArray[i].eventInfo.eventName === NIAnalytics.eventName) return eventArray[i].eventInfo.eventName; 2330} 2331return ""; 2332} 2333 } 2334 }, 2335 "DNB_STATUS": { 2336 "defaultValue": "", 2337 "storageDuration": "pageview", 2338 "modulePath": "core/src/lib/dataElements/customCode.js", 2339 "settings": { 2340 "source": function(event) { 2341 var dnbStorageKey = 'dnb'; 2342 2343if(sessionStorage.getItem(dnbStorageKey) !== null) { 2344 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 2345 var retVar = dnb_Data.status + ":" + dnb_Data.message + ":" + dnb_Data.id; 2346 return (retVar === '::') ? '' : retVar; 2347} else{ 2348 return ''; 2349} 2350} 2351 } 2352 }, 2353 "NIBOOSTS_RATING_VALUE:METATAG": { 2354 "defaultValue": "", 2355 "storageDuration": "pageview", 2356 "modulePath": "core/src/lib/dataElements/customCode.js", 2357 "settings": { 2358 "source": function(event) { 2359 var niBoostsTmp = NIAnalytics.getMetaTag("niboosts"); 2360var rvLocation = niBoostsTmp.indexOf("RV:"); 2361if(rvLocation < 0) { 2362 return ""; 2363} else { 2364 niBoostsTmp = niBoostsTmp.substring(rvLocation+3);
2365 if(niBoostsTmp.indexOf(",") > -1) niBoostsTmp = niBoostsTmp.substring(0,niBoostsTmp.indexOf(",")); 2366 return niBoostsTmp; 2367} 2368} 2369 } 2370 }, 2371 "DNB_INDUSTRY": { 2372 "defaultValue": "", 2373 "storageDuration": "pageview", 2374 "modulePath": "core/src/lib/dataElements/customCode.js", 2375 "settings": { 2376 "source": function(event) { 2377 var dnbStorageKey = 'dnb'; 2378 2379if(sessionStorage.getItem(dnbStorageKey) !== null) { 2380 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 2381 var retVar = dnb_Data.naicsCodes + ":" + dnb_Data.industryNaics + ":" + dnb_Data.industrySic 2382 return (retVar === '::') ? '' : retVar; 2383} else{ 2384 return ''; 2385} 2386} 2387 } 2388 }, 2389 "DNB_DUNS_ALONE": { 2390 "defaultValue": "", 2391 "storageDuration": "pageview", 2392 "modulePath": "core/src/lib/dataElements/customCode.js", 2393 "settings": { 2394 "source": function(event) { 2395 var dnbStorageKey = 'dnb'; 2396 2397if(sessionStorage.getItem(dnbStorageKey) !== null) { 2398 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 2399 return dnb_Data.duns; 2400} else{ 2401 return ''; 2402} 2403} 2404 } 2405 }, 2406 "DOCUMENTCOREID:METATAG": { 2407 "defaultValue": "", 2408 "storageDuration": "pageview", 2409 "modulePath": "core/src/lib/dataElements/customCode.js", 2410 "settings": { 2411 "source": function(event) { 2412 var metaTagArray = document.getElementsByTagName("meta"); 2413 for (var i = 0; i < metaTagArray.length; i++) { 2414 if (metaTagArray[i].name.toLowerCase() === "documentcoreid") { 2415 return metaTagArray[i].content; 2416 } 2417 } 2418return ""; 2419} 2420 } 2421 }, 2422 "EVENTACTION:EV:DL": { 2423 "defaultValue": "", 2424 "storageDuration": "pageview", 2425 "modulePath": "core/src/lib/dataElements/customCode.js", 2426 "settings": { 2427 "source": function(event) { 2428 var eventArray = _satellite.getVar("EVENT:DL"); 2429if (NIAnalytics.eventIndex !== -1 2430 && eventArray[NIAnalytics.eventIndex].eventInfo.eventAction !== undefined) { 2431 return eventArray[NIAnalytics.eventIndex].eventInfo.eventAction; 2432} 2433return ""; 2434 2435} 2436 } 2437 }, 2438 "ICID:URL_PARAM": { 2439 "defaultValue": "", 2440 "storageDuration": "pageview", 2441 "modulePath": "core/src/lib/dataElements/customCode.js", 2442 "settings": { 2443 "source": function(event) { 2444 function getParameterByName(name, url = window.location.href) { 2445 name = name.replace(/[\[\]]/g, '\\$&'); 2446 var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'), 2447 results = regex.exec(url); 2448 if (!results) return null; 2449 if (!results[2]) return ''; 2450 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 2451} 2452 2453return getParameterByName("icid"); 2454} 2455 } 2456 }, 2457 "WRAPPERID:METATAG": { 2458 "defaultValue": "no", 2459 "storageDuration": "pageview", 2460 "modulePath": "core/src/lib/dataElements/customCode.js", 2461 "settings": { 2462 "source": function(event) { 2463 return NIAnalytics.getMetaTag("wrapperid") || 'no'; 2464} 2465 } 2466 }, 2467 "ASSESSMENT_OUTCOME_LABEL:EV:DL": { 2468 "defaultValue": "", 2469 "storageDuration": "pageview", 2470 "modulePath": "core/src/lib/dataElements/customCode.js", 2471 "settings": { 2472 "source": function(event) { 2473 return event.detail.eventName === "assessment" ? event.detail.outcomeLabel || "" : ""; 2474} 2475 } 2476 }, 2477 "EXPERIENCE_CLOUD_ID": { 2478 "defaultValue": "", 2479 "storageDuration": "pageview", 2480 "modulePath": "core/src/lib/dataElements/customCode.js", 2481 "settings": { 2482 "source": function(event) { 2483 var tmp = _satellite.getVisitorId().getMarketingCloudVisitorID(); 2484if(tmp !== undefined){ 2485 return tmp; 2486} 2487var mcmidCookie = decodeURIComponent(_satellite.cookie.get(encodeURIComponent(_satellite.getVisitorId().cookieName))); 2488tmp = mcmidCookie.substring(mcmidCookie.indexOf('MCMID|')+6); 2489return tmp.substring(0,tmp.indexOf('|')); 2490} 2491 } 2492 }, 2493 "SHIPPING_METHOD:DL": { 2494 "defaultValue": "", 2495 "storageDuration": "pageview", 2496 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 2497 "settings": { 2498 "path": "digitalData.transaction.total.shippingMethod" 2499 } 2500 }, 2501 "FULLSTORY_SESSIONID": { 2502 "defaultValue": "", 2503 "storageDuration": "pageview", 2504 "modulePath": "core/src/lib/dataElements/customCode.js", 2505 "settings": { 2506 "source": function(event) { 2507 var fs_cookie = _satellite.cookie.get('fs_uid'); 2508if (typeof fs_cookie !== "undefined") { 2509 var tmp = fs_cookie.split('`'); 2510 if (tmp.length >= 3) { 2511 if (tmp[2].indexOf(':') > -1) { 2512 var sessionId = tmp[2].split(':')[1]; 2513 return sessionId; 2514 } 2515 } 2516} 2517return "session_recording"; 2518} 2519 } 2520 }, 2521 "NIBOOSTS_UPDATE_DATE:METATAG": { 2522 "defaultValue": "", 2523 "storageDuration": "pageview", 2524 "modulePath": "core/src/lib/dataElements/customCode.js", 2525 "settings": { 2526 "source": function(event) { 2527 var forumUD = _satellite.getVar("FORUM_UPDATE_DATE:METATAG"); 2528if(forumUD !== ""){ 2529 return forumUD.substring(0,forumUD.indexOf("T")); 2530} else { 2531 var niBoostsTmp = NIAnalytics.getMetaTag("niboosts"); 2532 var udLocation = niBoostsTmp.indexOf("UD:"); 2533 if(udLocation < 0) { 2534 return ""; 2535 } else { 2536 niBoostsTmp = niBoostsTmp.substring(udLocation+3); 2537 if (niBoostsTmp.indexOf(",") > -1) niBoostsTmp = niBoostsTmp.substring(0,niBoostsTmp.indexOf(",")); 2538 if (niBoostsTmp.indexOf("T") > -1) niBoostsTmp = niBoostsTmp.substring(0,niBoostsTmp.indexOf("T")); 2539 return niBoostsTmp; 2540 } 2541} 2542} 2543 } 2544 }, 2545 "SUB_CAT_ID:METATAG": { 2546 "defaultValue": "", 2547 "storageDuration": "pageview", 2548 "modulePath": "core/src/lib/dataElements/customCode.js", 2549 "settings": { 2550 "source": function(event) { 2551 var metaTagArray = document.getElementsByTagName("meta"); 2552for (var i = 0; i < metaTagArray.length; i++) { 2553 if (metaTagArray[i].name.toLowerCase() === "subcatid") { 2554 return metaTagArray[i].content; 2555 } 2556} 2557} 2558 } 2559 }, 2560 "FILTERPAIR:AT:PA:DL": { 2561 "defaultValue": "", 2562 "storageDuration": "pageview", 2563 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 2564 "settings": { 2565 "path": "digitalData.page.attributes.filterPair" 2566 } 2567 }, 2568 "LETTER_COUNT": { 2569 "defaultValue": "", 2570 "storageDuration": "pageview", 2571 "modulePath": "core/src/lib/dataElements/customCode.js", 2572 "settings": { 2573 "source": function(event) { 2574 if (typeof digitalData == "undefined") digitalData = { }; 2575if (typeof digitalData.page == "undefined") digitalData.page = { }; 2576if (typeof digitalData.page.pageInfo == "undefined") digitalData.page.pageInfo = { }; 2577 2578if (typeof digitalData.page.pageInfo.letterCount == "undefined"){ 2579 var wordCount = _satellite.getVar("WORD_COUNT"); 2580} 2581return digitalData.page.pageInfo.letterCount; 2582 2583} 2584 } 2585 }, 2586 "ONSITESEARCHAUTOCOMPLETELOV:OSI:OS:DL": { 2587 "defaultValue": "", 2588 "storageDuration": "pageview", 2589 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 2590 "settings": { 2591 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchAutocompleteLOV" 2592 } 2593 }, 2594 "6SENSE_COMPANYNAME": { 2595 "storageDuration": "pageview", 2596 "modulePath": "core/src/lib/dataElements/customCode.js", 2597 "settings": { 2598 "source": function(event) { 2599 var stored = localStorage.getItem("_6senseCompanyDetails"); 2600if (stored !== null && JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match") { 2601 var parsed = JSON.parse(stored); 2602 var companyName = ''; 2603 switch (parsed.company.company_match) { 2604 case "Match": 2605 companyName = parsed.company.name; 2606 break; 2607 case "Non-actionable Match": 2608 companyName = "(Non-company Visit)"; 2609 break; 2610 default: 2611 companyName = "(Unidentified Visit)"; 2612 } 2613 2614 var retVar = companyName + ":" + parsed.company.domain; 2615 return (retVar === ':') ? '' : retVar; 2616} else { 2617 return ''; 2618} 2619} 2620 } 2621 }, 2622 "CONTENTTYPE_HIERARCHY_OLD": { 2623 "defaultValue": "", 2624 "storageDuration": "pageview", 2625 "modulePath": "core/src/lib/dataElements/customCode.js", 2626 "settings": { 2627 "source": function(event) { 2628 var contentType = _satellite.getVar("CONTENTTYPE:METATAG"); 2629var section = _satellite.getVar("SECTION:METATAG"); 2630var template = _satellite.getVar("TEMPLATE:PI:PA:DL"); 2631 2632if (contentType === "community") return "community"; 2633if (contentType === "blog") return "community:blogs"; 2634if (contentType === "communitydocument") return "community:documents"; 2635if (contentType === "company") return "company"; 2636if (contentType === "legal" && section === "company") return "company"; 2637if (contentType === "news") return "company:news"; 2638if (contentType === "presskit") return "company:news"; 2639if (contentType === "newsletter") return "company:newsletters"; 2640if (contentType === "eventproductpage") return "events"; 2641if (contentType === "event") return "events"; 2642if (contentType === "globalevent") return "events:globalevents"; 2643if (contentType === "eventnidays") return "events:nidays"; 2644if (contentType === "eventniweek") return "events:niweek"; 2645if (contentType === "regionalevent") return "events:regionalevents"; 2646if (contentType === "seminar") return "events:seminars"; 2647if (contentType === "tradeshow") return "events:tradeshows"; 2648if (contentType === "video") return "innovations:videos"; 2649if (contentType === "webcast") return "innovations:webcasts"; 2650if (contentType === "homepage") return "homepage"; 2651if (contentType === "solution") return "innovations:solutions"; 2652if (contentType === "whatis" && section === "innovations") return "innovations"; 2653if (contentType === "courseware") return "innovations:academic"; 2654if (contentType === "trend") return "innovations:trends"; 2655if (contentType === "industry") return "innovations:industries"; 2656if (contentType === "application") return "innovations:industries"; 2657if (contentType === "white-paper") return "innovations:whitepapers"; 2658if (contentType === "landing" && section === "support") return "support:learn"; 2659if (contentType === "landing") return "landing"; 2660if (contentType === "contactni") return "myni"; 2661if (contentType === "orders") return "myni:orders"; 2662if (contentType === "myproducts") return "myni:myproducts"; 2663if (contentType === "catalog" && template === "hwCategory") return "products:hardware"; 2664if (contentType === "catalog" && template === "swCategory") return "products:software"; 2665if (contentType === "catalog" && template === "accCategory") return "products:accs"; 2666if (contentType === "catalog" && template === "platformCategory") return "products:platform"; 2667if (contentType === "product" && template === "pdp") return "products:hardware"; 2668if (contentType === "product" && template === "swpdp") return "products:software"; 2669if (contentType === "product" && template === "accpdp") return "products:accs"; 2670if (contentType === "product" && template === "platformpdp") return "products:platform"; 2671if (contentType === "product" && template === "hwbunpdp") return "products:hwbundle"; 2672if (contentType === "product" && template === "swbunpdp") return "products:swbundle"; 2673if (contentType === "product") return "products"; 2674if (contentType === "cart") return "products:cart"; 2675if (contentType === "checkout") return "products:checkout"; 2676if (contentType === "catalog" && template === "resources") return "products:resources"; 2677if (contentType === "catalog" && template === "consultServices") return "products:consultservices"; 2678if (contentType === "catalog" && template === "hwServices") return "products:hwservices"; 2679if (contentType === "catalog" && template === "swServices") return "products:swservices"; 2680if (contentType === "catalog" && section === "support") return "support:learn:catalog"; 2681if (contentType === "catalog") return "products"; 2682if (contentType === "productdatasheet") return "products"; 2683if (contentType === "quote") return "products"; 2684if (contentType === "whatis" && section === "products") return "products"; 2685if (contentType === "productoverview" && template === "swServices") return "products:swservices"; 2686if (contentType === "productoverview" && template === "hwServices") return "products:hwservices"; 2687if (contentType === "productoverview") return "products"; 2688if (contentType === "advisors") return "products:advisors"; 2689if (contentType === "training" && template === "eduServices") return "products:eduservices"; 2690if (contentType === "training" && section === "support") return "support:learn"; 2691if (contentType === "training") return "products:custed"; 2692if (contentType === "reference" && section === "products") return "products:reference"; 2693if (contentType === "portfolio") return "products:portfolio"; 2694if (contentType === "search") return "sitewide"; 2695if (contentType === "profile") return "sitewide"; 2696if (contentType === "whatis" && section === "support") return "support"; 2697if (contentType === "ipnet") return "support"; 2698if (contentType === "support" && section === "support") return "support"; 2699if (contentType === "legal" && section === "documentation") return "support:documentation"; 2700if (contentType === "newfeature") return "support:documentation"; 2701if (contentType === "reference" && section === "support") return "support:documentation"; 2702if (contentType === "whatis" && section === "documentation") return "support:documentation"; 2703if (contentType === "legal") return "support:documentation"; 2704if (contentType === "knownissue") return "support:documentation"; 2705if (contentType === "pinout") return "support:documentation"; 2706if (contentType === "apireference") return "support:documentation"; 2707if (contentType === "documentation" && template !== "releaseNoteMisc") return "support:documentation"; 2708if (contentType === "productmanual" && section === "documentation") return "support:documentation"; 2709if (contentType === "readme") return "support:documentation"; 2710if (contentType === "onlinehelp") return "support:documentation"; 2711if (contentType === "specifications") return "support:documentation"; 2712if (contentType === "applicationnote") return "support:documentation"; 2713if (contentType === "datasheet") return "support:documentation"; 2714if (contentType === "releasenote") return "support:documentation:releaseN
2714ote"; 2715if (contentType === "upgradenote") return "support:documentation"; 2716if (contentType === "productmanual" && section === "productmanuals") return "support:documentation:productmanuals"; 2717if (contentType === "dimensionaldrawing") return "support:documentation:dimensionaldrawings"; 2718if (contentType === "productcertification") return "support:documentation:productcertifications"; 2719if (contentType === "download") return "support:downloads"; 2720if (contentType === "camerafile") return "support:downloads:camerafiles"; 2721if (contentType === "dataplugin") return "support:downloads:dataplugins"; 2722if (contentType === "alldrivers") return "support:downloads:drivers"; 2723if (contentType === "instrumentdriver") return "support:downloads:drivers:instrumentdrivers"; 2724if (contentType === "instrumentmodel") return "support:downloads:drivers:instrumentdrivers"; 2725if (contentType === "driver") return "support:downloads:drivers:nidrivers"; 2726if (contentType === "addon") return "support:downloads:productdownloads"; 2727if (contentType === "applicationsoftware") return "support:downloads:productdownloads"; 2728if (contentType === "runtimeengine") return "support:downloads:productdownloads"; 2729if (contentType === "example") return "support:examples"; 2730if (contentType === "code") return "support:examples"; 2731if (contentType === "knowledgebase" && template === "howTo") return "support:howTo"; 2732if (contentType === "knowledgebase") return "support:knowledgebase"; 2733if (contentType === "productsupportpage") return "support:models"; 2734if (contentType === "model") return "support:models"; 2735if (contentType === "partner" && section === "partners") return "partners:partner"; 2736if (contentType === "partner") return "support:partners"; 2737if (contentType === "support" && section === "security") return "support:security"; 2738if (contentType === "whatis" && section === "security") return "support:security"; 2739if (contentType === "servicerequest") return "support:servicerequestmanager"; 2740if (contentType === "tutorial" && section === "products") return "products:tutorials"; 2741if (contentType === "tutorial" && section === "support") return "support:tutorials"; 2742if (contentType === "" && section === "webcasts and videos") return "webcastsvideos"; 2743if (contentType === "Eventsnav") return "events"; 2744if (contentType === "Academic") return "innovations:academic"; 2745if (contentType === "Industry") return "innovations:industries"; 2746if (contentType === "myni") return "myni"; 2747if (contentType === "casestudy") return "innovations:casestudies"; 2748if (contentType === "editionselect" && template === "swServices") return "products:swservices"; 2749if (contentType === "editionselect" && template === "hwServices") return "products:hwservices"; 2750if (contentType === "editionselect") return "products"; 2751if (contentType === "platform") return "products:platform"; 2752if (contentType === "downloadconfirm") return "support:downloads"; 2753if (contentType === "forum") return "community:forums"; 2754if (contentType === "cust ed registration page") return "products:checkout"; 2755if (contentType === "shipping") return "products:checkout"; 2756if (contentType === "payment") return "products:checkout"; 2757if (contentType === "review") return "products:checkout"; 2758if (contentType === "confirmation") return "products:checkout"; 2759if (contentType === "usergroup") return "community:usergroup"; 2760if (contentType === "idea") return "community:idea"; 2761if (contentType === "compatibility") return "support:documentation:compatibility"; 2762if (contentType === "bugs" && template === "releaseNoteBug") return "support:documentation:bug"; 2763if (contentType === "bugs" && template === "releaseNoteKnown") return "support:documentation:knownIssue"; 2764if (contentType === "documentation" && template === "releaseNoteMisc") return "support:documentation:supplemental"; 2765if (contentType === "bugs" && template === "errata") return "support:documentation:errata"; 2766if (contentType === "perspective") return "innovations:perspectives"; 2767if (contentType === "letterofvolatility") return "support:documentation:letterofvolatility"; 2768if (contentType === "investor") return "company:investor"; 2769if (contentType === "lifecycle") return "support"; 2770} 2771 } 2772 }, 2773 "ContentSquareEnabled": { 2774 "defaultValue": "false", 2775 "storageDuration": "session", 2776 "modulePath": "core/src/lib/dataElements/customCode.js", 2777 "settings": { 2778 "source": function(event) { 2779 const ContentsquareEndDate = new Date('2024-09-24'); 2780const now = new Date(); 2781 2782return (now < ContentsquareEndDate); 2783} 2784 } 2785 }, 2786 "PRODNOTIFY:URL_PARAM": { 2787 "defaultValue": "", 2788 "storageDuration": "pageview", 2789 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 2790 "settings": { 2791 "name": "prodnotify", 2792 "caseInsensitive": true 2793 } 2794 }, 2795 "TRANSACTION_ID": { 2796 "defaultValue": "", 2797 "storageDuration": "pageview", 2798 "modulePath": "core/src/lib/dataElements/customCode.js", 2799 "settings": { 2800 "source": function(event) { 2801 function S4() { 2802 return (((1+Math.random())*0x10000)|0).toString(16).substring(1); 2803} 2804return "act_" + (S4() + S4() + "-" + S4() + "-4" + S4().substr(0,3) + "-" + S4() + "-" + S4() + S4() + S4()).toLowerCase(); 2805} 2806 } 2807 }, 2808 "TEST": { 2809 "defaultValue": "", 2810 "modulePath": "core/src/lib/dataElements/customCode.js", 2811 "settings": { 2812 "source": function(event) { 2813 NIANALYTICSTEST = {}; 2814NIANALYTICSTEST.functionTest = function() { 2815 return "test function"; 2816} 2817} 2818 } 2819 }, 2820 "ORDER_TOTAL": { 2821 "defaultValue": "", 2822 "storageDuration": "pageview", 2823 "modulePath": "core/src/lib/dataElements/customCode.js", 2824 "settings": { 2825 "source": function(event) { 2826 try { 2827 var rawValue; 2828 var root = document.getElementsByClassName("cart-totals")[0].getElementsByTagName("tbody")[0]; 2829 if (document.getElementsByClassName("yoursavings").length === 0) { 2830 rawValue = root.lastChild.childNodes[1].innerHTML; 2831 } else { 2832 rawValue = root.lastChild.previousSibling.childNodes[1].innerHTML; 2833 } 2834 return rawValue.split(",").join("").match(/[+-]?\d+(\.\d+)?/g)[0]; 2835} catch (e) { 2836 return ""; 2837} 2838 2839} 2840 } 2841 }, 2842 "KEYWORDS_COUNT": { 2843 "defaultValue": "", 2844 "storageDuration": "pageview", 2845 "modulePath": "core/src/lib/dataElements/customCode.js", 2846 "settings": { 2847 "source": function(event) { 2848 var forumKW = _satellite.getVar("FORUM_KEYWORDS:METATAG"); 2849 2850if(forumKW !== ""){ 2851 if (forumKW.length === 0) return "0"; 2852 else return (forumKW.match(/,/g) || []).length+1; 2853} else { 2854 if (NIAnalytics.getMetaTag("keywords").length === 0) return "0"; 2855 else return (NIAnalytics.getMetaTag("keywords").match(/,/g) || []).length+1; 2856} 2857} 2858 } 2859 }, 2860 "DNB_MARKETING": { 2861 "defaultValue": "", 2862 "storageDuration": "pageview", 2863 "modulePath": "core/src/lib/dataElements/customCode.js", 2864 "settings": { 2865 "source": function(event) { 2866 var dnbStorageKey = 'dnb'; 2867 2868if(sessionStorage.getItem(dnbStorageKey) !== null) { 2869 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 2870 var retVar = dnb_Data.cardOfferResponsiveness + ":" + dnb_Data.propensityForLease + ":" + dnb_Data.propensityForLoan + ":" + dnb_Data.propensityForLoc + ":" + dnb_Data.itExpense + ":" + dnb_Data.telecomSpend + ":" + dnb_Data.techOfficeDemand; 2871 return (retVar === '::::::') ? '' : retVar; 2872} else{ 2873 return ''; 2874} 2875} 2876 } 2877 }, 2878 "KEYWORDS_PART1:METATAG": { 2879 "defaultValue": "", 2880 "storageDuration": "pageview", 2881 "modulePath": "core/src/lib/dataElements/customCode.js", 2882 "settings": { 2883 "source": function(event) { 2884 var forumKW = _satellite.getVar("FORUM_KEYWORDS:METATAG") 2885 2886if(forumKW !== ""){ 2887 return forumKW.substring(0,255); 2888} else { 2889 return NIAnalytics.getMetaTag("keywords").substring(0,255); 2890} 2891} 2892 } 2893 }, 2894 "CONTENTTYPE_HIERARCHY": { 2895 "defaultValue": "", 2896 "modulePath": "content-type-hierarchy-tool/src/lib/dataElements/contentTypeHierarchy.js", 2897 "settings": { 2898 "data": [ 2899 { 2900 "then": { 2901 "valueString": "community" 2902 }, 2903 "condition": { 2904 "dataElement": "§CONTENTTYPE:METATAG§", 2905 "valueString": "community" 2906 } 2907 }, 2908 { 2909 "then": { 2910 "valueString": "community:blogs" 2911 }, 2912 "condition": { 2913 "dataElement": "§CONTENTTYPE:METATAG§", 2914 "valueString": "blog" 2915 } 2916 }, 2917 { 2918 "then": { 2919 "valueString": "community:documents" 2920 }, 2921 "condition": { 2922 "dataElement": "§CONTENTTYPE:METATAG§", 2923 "valueString": "communitydocument" 2924 } 2925 }, 2926 { 2927 "then": { 2928 "valueString": "company" 2929 }, 2930 "condition": { 2931 "dataElement": "§CONTENTTYPE:METATAG§", 2932 "valueString": "company" 2933 } 2934 }, 2935 { 2936 "then": { 2937 "valueString": "company" 2938 }, 2939 "condition": { 2940 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 2941 "valueString": "legal:company" 2942 } 2943 }, 2944 { 2945 "then": { 2946 "valueString": "company:news" 2947 }, 2948 "condition": { 2949 "dataElement": "§CONTENTTYPE:METATAG§", 2950 "valueString": "news" 2951 } 2952 }, 2953 { 2954 "then": { 2955 "valueString": "company:news" 2956 }, 2957 "condition": { 2958 "dataElement": "§CONTENTTYPE:METATAG§", 2959 "valueString": "presskit" 2960 } 2961 }, 2962 { 2963 "then": { 2964 "valueString": "company:newsletters" 2965 }, 2966 "condition": { 2967 "dataElement": "§CONTENTTYPE:METATAG§", 2968 "valueString": "newsletter" 2969 } 2970 }, 2971 { 2972 "then": { 2973 "valueString": "events" 2974 }, 2975 "condition": { 2976 "dataElement": "§CONTENTTYPE:METATAG§", 2977 "valueString": "eventproductpage" 2978 } 2979 }, 2980 { 2981 "then": { 2982 "valueString": "events" 2983 }, 2984 "condition": { 2985 "dataElement": "§CONTENTTYPE:METATAG§", 2986 "valueString": "event" 2987 } 2988 }, 2989 { 2990 "then": { 2991 "valueString": "events:globalevents" 2992 }, 2993 "condition": { 2994 "dataElement": "§CONTENTTYPE:METATAG§", 2995 "valueString": "globalevent" 2996 } 2997 }, 2998 { 2999 "then": { 3000 "valueString": "events:nidays" 3001 }, 3002 "condition": { 3003 "dataElement": "§CONTENTTYPE:METATAG§", 3004 "valueString": "eventnidays" 3005 } 3006 }, 3007 { 3008 "then": { 3009 "valueString": "events:niweek" 3010 }, 3011 "condition": { 3012 "dataElement": "§CONTENTTYPE:METATAG§", 3013 "valueString": "eventniweek" 3014 } 3015 }, 3016 { 3017 "then": { 3018 "valueString": "events:regionalevents" 3019 }, 3020 "condition": { 3021 "dataElement": "§CONTENTTYPE:METATAG§", 3022 "valueString": "regionalevent" 3023 } 3024 }, 3025 { 3026 "then": { 3027 "valueString": "events:seminars" 3028 }, 3029 "condition": { 3030 "dataElement": "§CONTENTTYPE:METATAG§", 3031 "valueString": "seminar" 3032 } 3033 }, 3034 { 3035 "then": { 3036 "valueString": "events:tradeshows" 3037 }, 3038 "condition": { 3039 "dataElement": "§CONTENTTYPE:METATAG§", 3040 "valueString": "tradeshow" 3041 } 3042 }, 3043 { 3044 "then": { 3045 "valueString": "innovations:videos" 3046 }, 3047 "condition": { 3048 "dataElement": "§CONTENTTYPE:METATAG§", 3049 "valueString": "video" 3050 } 3051 }, 3052 { 3053 "then": { 3054 "valueString": "innovations:webcasts" 3055 }, 3056 "condition": { 3057 "dataElement": "§CONTENTTYPE:METATAG§", 3058 "valueString": "webcast" 3059 } 3060 }, 3061 { 3062 "then": { 3063 "valueString": "homepage" 3064 }, 3065 "condition": { 3066 "dataElement": "§CONTENTTYPE:METATAG§", 3067 "valueString": "homepage" 3068 } 3069 }, 3070 { 3071 "then": { 3072 "valueString": "partners:solution" 3073 }, 3074 "condition": { 3075 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3076 "valueString": "solution:partners" 3077 } 3078 }, 3079 { 3080 "then": { 3081 "valueString": "innovations:solutions" 3082 }, 3083 "condition": { 3084 "dataElement": "§CONTENTTYPE:METATAG§", 3085 "valueString": "solution" 3086 } 3087 }, 3088 { 3089 "then": { 3090 "valueString": "innovations" 3091 }, 3092 "condition": { 3093 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3094 "valueString": "whatis:innovations" 3095 } 3096 }, 3097 { 3098 "then": { 3099 "valueString": "innovations:academic" 3100 }, 3101 "condition": { 3102 "dataElement": "§CONTENTTYPE:METATAG§", 3103 "valueString": "courseware" 3104 } 3105 }, 3106 { 3107 "then": { 3108 "valueString": "innovations:trends" 3109 }, 3110 "condition": { 3111 "dataElement": "§CONTENTTYPE:METATAG§", 3112 "valueString": "trend" 3113 } 3114 }, 3115 { 3116 "then": { 3117 "valueString": "myni:helpcenter" 3118 }, 3119 "condition": { 3120 "dataElement": "§TEMPLATE:PI:PA:DL§:§SECTION:METATAG§", 3121 "valueString": "helpCenter:myni" 3122 } 3123 }, 3124 { 3125 "then": { 3126 "valueString": "innovations:industries" 3127 }, 3128 "condition": { 3129 "dataElement": "§CONTENTTYPE:METATAG§", 3130 "valueString": "industry" 3131 } 3132 }, 3133 { 3134 "then": { 3135 "valueString": "innovations:industries" 3136 }, 3137 "condition": { 3138 "dataElement": "§CONTENTTYPE:METATAG§", 3139 "valueString": "application" 3140 } 3141 }, 3142 { 3143 "then": { 3144 "valueString": "innovations:whitepapers" 3145 }, 3146 "condition": { 3147 "dataElement": "§CONTENTTYPE:METATAG§", 3148 "valueString": "white-paper" 3149 } 3150 }, 3151 { 3152 "then": { 3153 "valueString": "support:learn" 3154 }, 3155 "condition": { 3156 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3157 "valueString": "landing:support" 3158 } 3159 }, 3160 { 3161 "then": { 3162 "valueString": "landing" 3163 }, 3164 "condition": { 3165 "dataElement": "§CONTENTTYPE:METATAG§", 3166 "valueString": "landing" 3167 } 3168 }, 3169 { 3170 "then": { 3171 "valueString": "myni" 3172 }, 3173 "condition": { 3174 "dataElement": "§CONTENTTYPE:METATAG§", 3175 "valueString": "contactni" 3176 } 3177 }, 3178 { 3179 "then": { 3180 "valueString": "myni:orders" 3181 }, 3182 "condition": { 3183 "dataElement": "§CONTENTTYPE:METATAG§", 3184 "valueString": "orders" 3185 } 3186 }, 3187 { 3188 "then": { 3189 "valueString": "myni:myproducts" 3190 }, 3191 "condition": { 3192 "dataElement": "§CONTENTTYPE:METATAG§", 3193 "valueString": "myproducts" 3194 } 3195 }, 3196 { 3197 "then": { 3198 "valueString": "products:hardware" 3199 }, 3200 "condition": { 3201 "dataElement": "§CON
3201TENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3202 "valueString": "catalog:hwCategory" 3203 } 3204 }, 3205 { 3206 "then": { 3207 "valueString": "products:software" 3208 }, 3209 "condition": { 3210 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3211 "valueString": "catalog:swCategory" 3212 } 3213 }, 3214 { 3215 "then": { 3216 "valueString": "products:accs" 3217 }, 3218 "condition": { 3219 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3220 "valueString": "catalog:accCategory" 3221 } 3222 }, 3223 { 3224 "then": { 3225 "valueString": "products:platform" 3226 }, 3227 "condition": { 3228 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3229 "valueString": "catalog:platformCategory" 3230 } 3231 }, 3232 { 3233 "then": { 3234 "valueString": "products:hardware" 3235 }, 3236 "condition": { 3237 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3238 "valueString": "product:pdp" 3239 } 3240 }, 3241 { 3242 "then": { 3243 "valueString": "products:software" 3244 }, 3245 "condition": { 3246 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3247 "valueString": "product:swpdp" 3248 } 3249 }, 3250 { 3251 "then": { 3252 "valueString": "products:accs" 3253 }, 3254 "condition": { 3255 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3256 "valueString": "product:accpdp" 3257 } 3258 }, 3259 { 3260 "then": { 3261 "valueString": "products:platform" 3262 }, 3263 "condition": { 3264 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3265 "valueString": "product:platformpdp" 3266 } 3267 }, 3268 { 3269 "then": { 3270 "valueString": "products:hwbundle" 3271 }, 3272 "condition": { 3273 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3274 "valueString": "product:hwbunpdp" 3275 } 3276 }, 3277 { 3278 "then": { 3279 "valueString": "products:swbundle" 3280 }, 3281 "condition": { 3282 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3283 "valueString": "product:swbunpdp" 3284 } 3285 }, 3286 { 3287 "then": { 3288 "valueString": "products" 3289 }, 3290 "condition": { 3291 "dataElement": "§CONTENTTYPE:METATAG§", 3292 "valueString": "product" 3293 } 3294 }, 3295 { 3296 "then": { 3297 "valueString": "products:cart" 3298 }, 3299 "condition": { 3300 "dataElement": "§CONTENTTYPE:METATAG§", 3301 "valueString": "cart" 3302 } 3303 }, 3304 { 3305 "then": { 3306 "valueString": "products:checkout" 3307 }, 3308 "condition": { 3309 "dataElement": "§CONTENTTYPE:METATAG§", 3310 "valueString": "checkout" 3311 } 3312 }, 3313 { 3314 "then": { 3315 "valueString": "products:resources" 3316 }, 3317 "condition": { 3318 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3319 "valueString": "catalog:resources" 3320 } 3321 }, 3322 { 3323 "then": { 3324 "valueString": "products:consultservices" 3325 }, 3326 "condition": { 3327 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3328 "valueString": "catalog:consultServices" 3329 } 3330 }, 3331 { 3332 "then": { 3333 "valueString": "products:hwservices" 3334 }, 3335 "condition": { 3336 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3337 "valueString": "catalog:hwServices" 3338 } 3339 }, 3340 { 3341 "then": { 3342 "valueString": "products:swservices" 3343 }, 3344 "condition": { 3345 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3346 "valueString": "catalog:swServices" 3347 } 3348 }, 3349 { 3350 "then": { 3351 "valueString": "support:learn:catalog" 3352 }, 3353 "condition": { 3354 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3355 "valueString": "catalog:support" 3356 } 3357 }, 3358 { 3359 "then": { 3360 "valueString": "products" 3361 }, 3362 "condition": { 3363 "dataElement": "§CONTENTTYPE:METATAG§", 3364 "valueString": "catalog" 3365 } 3366 }, 3367 { 3368 "then": { 3369 "valueString": "products" 3370 }, 3371 "condition": { 3372 "dataElement": "§CONTENTTYPE:METATAG§", 3373 "valueString": "productdatasheet" 3374 } 3375 }, 3376 { 3377 "then": { 3378 "valueString": "products" 3379 }, 3380 "condition": { 3381 "dataElement": "§CONTENTTYPE:METATAG§", 3382 "valueString": "quote" 3383 } 3384 }, 3385 { 3386 "then": { 3387 "valueString": "products" 3388 }, 3389 "condition": { 3390 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3391 "valueString": "whatis:products" 3392 } 3393 }, 3394 { 3395 "then": { 3396 "valueString": "products:swservices" 3397 }, 3398 "condition": { 3399 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3400 "valueString": "productoverview:swServices" 3401 } 3402 }, 3403 { 3404 "then": { 3405 "valueString": "products:hwservices" 3406 }, 3407 "condition": { 3408 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3409 "valueString": "productoverview:hwServices" 3410 } 3411 }, 3412 { 3413 "then": { 3414 "valueString": "products" 3415 }, 3416 "condition": { 3417 "dataElement": "§CONTENTTYPE:METATAG§", 3418 "valueString": "productoverview" 3419 } 3420 }, 3421 { 3422 "then": { 3423 "valueString": "products:advisors" 3424 }, 3425 "condition": { 3426 "dataElement": "§CONTENTTYPE:METATAG§", 3427 "valueString": "advisors" 3428 } 3429 }, 3430 { 3431 "then": { 3432 "valueString": "products:eduservices" 3433 }, 3434 "condition": { 3435 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3436 "valueString": "training:eduServices" 3437 } 3438 }, 3439 { 3440 "then": { 3441 "valueString": "support:learn" 3442 }, 3443 "condition": { 3444 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3445 "valueString": "training:support" 3446 } 3447 }, 3448 { 3449 "then": { 3450 "valueString": "products:custed" 3451 }, 3452 "condition": { 3453 "dataElement": "§CONTENTTYPE:METATAG§", 3454 "valueString": "training" 3455 } 3456 }, 3457 { 3458 "then": { 3459 "valueString": "products:reference" 3460 }, 3461 "condition": { 3462 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3463 "valueString": "reference:products" 3464 } 3465 }, 3466 { 3467 "then": { 3468 "valueString": "products:portfolio" 3469 }, 3470 "condition": { 3471 "dataElement": "§CONTENTTYPE:METATAG§", 3472 "valueString": "portfolio" 3473 } 3474 }, 3475 { 3476 "then": { 3477 "valueString": "sitewide" 3478 }, 3479 "condition": { 3480 "dataElement": "§CONTENTTYPE:METATAG§", 3481 "valueString": "search" 3482 } 3483 }, 3484 { 3485 "then": { 3486 "valueString": "sitewide" 3487 }, 3488 "condition": { 3489 "dataElement": "§CONTENTTYPE:METATAG§", 3490 "valueString": "profile" 3491 } 3492 }, 3493 { 3494 "then": { 3495 "valueString": "support" 3496 }, 3497 "condition": { 3498 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3499 "valueString": "whatis:support" 3500 } 3501 }, 3502 { 3503 "then": { 3504 "valueString": "support" 3505 }, 3506 "condition": { 3507 "dataElement": "§CONTENTTYPE:METATAG§", 3508 "valueString": "ipnet" 3509 } 3510 }, 3511 { 3512 "then": { 3513 "valueString": "support" 3514 }, 3515 "condition": { 3516 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3517 "valueString": "support:support" 3518 } 3519 }, 3520 { 3521 "then": { 3522 "valueString": "support:documentation" 3523 }, 3524 "condition": { 3525 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3526 "valueString": "legal:documentation" 3527 } 3528 }, 3529 { 3530 "then": { 3531 "valueString": "support:documentation" 3532 }, 3533 "condition": { 3534 "dataElement": "§CONTENTTYPE:METATAG§", 3535 "valueString": "newfeature" 3536 } 3537 }, 3538 { 3539 "then": { 3540 "valueString": "support:documentation" 3541 }, 3542 "condition": { 3543 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3544 "valueString": "reference:support" 3545 } 3546 }, 3547 { 3548 "then": { 3549 "valueString": "support:documentation" 3550 }, 3551 "condition": { 3552 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3553 "valueString": "whatis:documentation" 3554 } 3555 }, 3556 { 3557 "then": { 3558 "valueString": "support:documentation" 3559 }, 3560 "condition": { 3561 "dataElement": "§CONTENTTYPE:METATAG§", 3562 "valueString": "legal" 3563 } 3564 }, 3565 { 3566 "then": { 3567 "valueString": "support:documentation" 3568 }, 3569 "condition": { 3570 "dataElement": "§CONTENTTYPE:METATAG§", 3571 "valueString": "knownissue" 3572 } 3573 }, 3574 { 3575 "then": { 3576 "valueString": "support:documentation" 3577 }, 3578 "condition": { 3579 "dataElement": "§CONTENTTYPE:METATAG§", 3580 "valueString": "pinout" 3581 } 3582 }, 3583 { 3584 "then": { 3585 "valueString": "support:documentation" 3586 }, 3587 "condition": { 3588 "dataElement": "§CONTENTTYPE:METATAG§", 3589 "valueString": "apireference" 3590 } 3591 }, 3592 { 3593 "then": { 3594 "valueString": "support:documentation" 3595 }, 3596 "condition": { 3597 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3598 "valueString": "productmanual:documentation" 3599 } 3600 }, 3601 { 3602 "then": { 3603 "valueString": "support:documentation" 3604 }, 3605 "condition": { 3606 "dataElement": "§CONTENTTYPE:METATAG§", 3607 "valueString": "readme" 3608 } 3609 }, 3610 { 3611 "then": { 3612 "valueString": "support:documentation" 3613 }, 3614 "condition": { 3615 "dataElement": "§CONTENTTYPE:METATAG§", 3616 "valueString": "onlinehelp" 3617 } 3618 }, 3619 { 3620 "then": { 3621 "valueString": "support:documentation" 3622 }, 3623 "condition": { 3624 "dataElement": "§CONTENTTYPE:METATAG§", 3625 "valueString": "specifications" 3626 } 3627 }, 3628 { 3629 "then": { 3630 "valueString": "support:documentation" 3631 }, 3632 "condition": { 3633 "dataElement": "§CONTENTTYPE:METATAG§", 3634 "valueString": "applicationnote" 3635 } 3636 }, 3637 { 3638 "then": { 3639 "valueString": "support:documentation" 3640 }, 3641 "condition": { 3642 "dataElement": "§CONTENTTYPE:METATAG§", 3643 "valueString": "datasheet" 3644 } 3645 }, 3646 { 3647 "then": {
3648 "valueString": "support:documentation:releaseNote" 3649 }, 3650 "condition": { 3651 "dataElement": "§CONTENTTYPE:METATAG§", 3652 "valueString": "releasenote" 3653 } 3654 }, 3655 { 3656 "then": { 3657 "valueString": "support:documentation" 3658 }, 3659 "condition": { 3660 "dataElement": "§CONTENTTYPE:METATAG§", 3661 "valueString": "upgradenote" 3662 } 3663 }, 3664 { 3665 "then": { 3666 "valueString": "support:documentation:productmanuals" 3667 }, 3668 "condition": { 3669 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3670 "valueString": "productmanual:productmanuals" 3671 } 3672 }, 3673 { 3674 "then": { 3675 "valueString": "support:documentation:dimensionaldrawings" 3676 }, 3677 "condition": { 3678 "dataElement": "§CONTENTTYPE:METATAG§", 3679 "valueString": "dimensionaldrawing" 3680 } 3681 }, 3682 { 3683 "then": { 3684 "valueString": "support:documentation:productcertifications" 3685 }, 3686 "condition": { 3687 "dataElement": "§CONTENTTYPE:METATAG§", 3688 "valueString": "productcertification" 3689 } 3690 }, 3691 { 3692 "then": { 3693 "valueString": "support:downloads" 3694 }, 3695 "condition": { 3696 "dataElement": "§CONTENTTYPE:METATAG§", 3697 "valueString": "download" 3698 } 3699 }, 3700 { 3701 "then": { 3702 "valueString": "support:downloads:camerafiles" 3703 }, 3704 "condition": { 3705 "dataElement": "§CONTENTTYPE:METATAG§", 3706 "valueString": "camerafile" 3707 } 3708 }, 3709 { 3710 "then": { 3711 "valueString": "support:downloads:dataplugins" 3712 }, 3713 "condition": { 3714 "dataElement": "§CONTENTTYPE:METATAG§", 3715 "valueString": "dataplugin" 3716 } 3717 }, 3718 { 3719 "then": { 3720 "valueString": "support:downloads:drivers" 3721 }, 3722 "condition": { 3723 "dataElement": "§CONTENTTYPE:METATAG§", 3724 "valueString": "alldrivers" 3725 } 3726 }, 3727 { 3728 "then": { 3729 "valueString": "support:downloads:drivers:instrumentdrivers" 3730 }, 3731 "condition": { 3732 "dataElement": "§CONTENTTYPE:METATAG§", 3733 "valueString": "instrumentdriver" 3734 } 3735 }, 3736 { 3737 "then": { 3738 "valueString": "support:downloads:drivers:instrumentdrivers" 3739 }, 3740 "condition": { 3741 "dataElement": "§CONTENTTYPE:METATAG§", 3742 "valueString": "instrumentmodel" 3743 } 3744 }, 3745 { 3746 "then": { 3747 "valueString": "support:downloads:drivers:nidrivers" 3748 }, 3749 "condition": { 3750 "dataElement": "§CONTENTTYPE:METATAG§", 3751 "valueString": "driver" 3752 } 3753 }, 3754 { 3755 "then": { 3756 "valueString": "support:downloads:productdownloads" 3757 }, 3758 "condition": { 3759 "dataElement": "§CONTENTTYPE:METATAG§", 3760 "valueString": "addon" 3761 } 3762 }, 3763 { 3764 "then": { 3765 "valueString": "support:downloads:productdownloads" 3766 }, 3767 "condition": { 3768 "dataElement": "§CONTENTTYPE:METATAG§", 3769 "valueString": "applicationsoftware" 3770 } 3771 }, 3772 { 3773 "then": { 3774 "valueString": "support:downloads:productdownloads" 3775 }, 3776 "condition": { 3777 "dataElement": "§CONTENTTYPE:METATAG§", 3778 "valueString": "runtimeengine" 3779 } 3780 }, 3781 { 3782 "then": { 3783 "valueString": "support:examples" 3784 }, 3785 "condition": { 3786 "dataElement": "§CONTENTTYPE:METATAG§", 3787 "valueString": "example" 3788 } 3789 }, 3790 { 3791 "then": { 3792 "valueString": "support:examples" 3793 }, 3794 "condition": { 3795 "dataElement": "§CONTENTTYPE:METATAG§", 3796 "valueString": "code" 3797 } 3798 }, 3799 { 3800 "then": { 3801 "valueString": "support:howTo" 3802 }, 3803 "condition": { 3804 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3805 "valueString": "knowledgebase:howTo" 3806 } 3807 }, 3808 { 3809 "then": { 3810 "valueString": "support:knowledgebase" 3811 }, 3812 "condition": { 3813 "dataElement": "§CONTENTTYPE:METATAG§", 3814 "valueString": "knowledgebase" 3815 } 3816 }, 3817 { 3818 "then": { 3819 "valueString": "support:models" 3820 }, 3821 "condition": { 3822 "dataElement": "§CONTENTTYPE:METATAG§", 3823 "valueString": "productsupportpage" 3824 } 3825 }, 3826 { 3827 "then": { 3828 "valueString": "support:models" 3829 }, 3830 "condition": { 3831 "dataElement": "§CONTENTTYPE:METATAG§", 3832 "valueString": "model" 3833 } 3834 }, 3835 { 3836 "then": { 3837 "valueString": "partners:partner" 3838 }, 3839 "condition": { 3840 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3841 "valueString": "partner:partners" 3842 } 3843 }, 3844 { 3845 "then": { 3846 "valueString": "support:partners" 3847 }, 3848 "condition": { 3849 "dataElement": "§CONTENTTYPE:METATAG§", 3850 "valueString": "partner" 3851 } 3852 }, 3853 { 3854 "then": { 3855 "valueString": "support:security" 3856 }, 3857 "condition": { 3858 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3859 "valueString": "support:security" 3860 } 3861 }, 3862 { 3863 "then": { 3864 "valueString": "support:security" 3865 }, 3866 "condition": { 3867 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3868 "valueString": "whatis:security" 3869 } 3870 }, 3871 { 3872 "then": { 3873 "valueString": "support:servicerequestmanager" 3874 }, 3875 "condition": { 3876 "dataElement": "§CONTENTTYPE:METATAG§", 3877 "valueString": "servicerequest" 3878 } 3879 }, 3880 { 3881 "then": { 3882 "valueString": "products:tutorials" 3883 }, 3884 "condition": { 3885 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3886 "valueString": "tutorial:products" 3887 } 3888 }, 3889 { 3890 "then": { 3891 "valueString": "support:tutorials" 3892 }, 3893 "condition": { 3894 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3895 "valueString": "tutorial:support" 3896 } 3897 }, 3898 { 3899 "then": { 3900 "valueString": "webcastsvideos" 3901 }, 3902 "condition": { 3903 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 3904 "valueString": ":webcasts and videos" 3905 } 3906 }, 3907 { 3908 "then": { 3909 "valueString": "events" 3910 }, 3911 "condition": { 3912 "dataElement": "§CONTENTTYPE:METATAG§", 3913 "valueString": "Eventsnav" 3914 } 3915 }, 3916 { 3917 "then": { 3918 "valueString": "innovations:academic" 3919 }, 3920 "condition": { 3921 "dataElement": "§CONTENTTYPE:METATAG§", 3922 "valueString": "Academic" 3923 } 3924 }, 3925 { 3926 "then": { 3927 "valueString": "innovations:industries" 3928 }, 3929 "condition": { 3930 "dataElement": "§CONTENTTYPE:METATAG§", 3931 "valueString": "Industry" 3932 } 3933 }, 3934 { 3935 "then": { 3936 "valueString": "myni" 3937 }, 3938 "condition": { 3939 "dataElement": "§CONTENTTYPE:METATAG§", 3940 "valueString": "myni" 3941 } 3942 }, 3943 { 3944 "then": { 3945 "valueString": "innovations:casestudies" 3946 }, 3947 "condition": { 3948 "dataElement": "§CONTENTTYPE:METATAG§", 3949 "valueString": "casestudy" 3950 } 3951 }, 3952 { 3953 "then": { 3954 "valueString": "products:swservices" 3955 }, 3956 "condition": { 3957 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3958 "valueString": "editionselect:swServices" 3959 } 3960 }, 3961 { 3962 "then": { 3963 "valueString": "products:hwservices" 3964 }, 3965 "condition": { 3966 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 3967 "valueString": "editionselect:hwServices" 3968 } 3969 }, 3970 { 3971 "then": { 3972 "valueString": "products" 3973 }, 3974 "condition": { 3975 "dataElement": "§CONTENTTYPE:METATAG§", 3976 "valueString": "editionselect" 3977 } 3978 }, 3979 { 3980 "then": { 3981 "valueString": "products:platform" 3982 }, 3983 "condition": { 3984 "dataElement": "§CONTENTTYPE:METATAG§", 3985 "valueString": "platform" 3986 } 3987 }, 3988 { 3989 "then": { 3990 "valueString": "support:downloads" 3991 }, 3992 "condition": { 3993 "dataElement": "§CONTENTTYPE:METATAG§", 3994 "valueString": "downloadconfirm" 3995 } 3996 }, 3997 { 3998 "then": { 3999 "valueString": "community:forums" 4000 }, 4001 "condition": { 4002 "dataElement": "§CONTENTTYPE:METATAG§", 4003 "valueString": "forum" 4004 } 4005 }, 4006 { 4007 "then": { 4008 "valueString": "products:checkout" 4009 }, 4010 "condition": { 4011 "dataElement": "§CONTENTTYPE:METATAG§", 4012 "valueString": "cust ed registration page" 4013 } 4014 }, 4015 { 4016 "then": { 4017 "valueString": "products:checkout" 4018 }, 4019 "condition": { 4020 "dataElement": "§CONTENTTYPE:METATAG§", 4021 "valueString": "shipping" 4022 } 4023 }, 4024 { 4025 "then": { 4026 "valueString": "products:checkout" 4027 }, 4028 "condition": { 4029 "dataElement": "§CONTENTTYPE:METATAG§", 4030 "valueString": "payment" 4031 } 4032 }, 4033 { 4034 "then": { 4035 "valueString": "products:checkout" 4036 }, 4037 "condition": { 4038 "dataElement": "§CONTENTTYPE:METATAG§", 4039 "valueString": "review" 4040 } 4041 }, 4042 { 4043 "then": { 4044 "valueString": "products:checkout" 4045 }, 4046 "condition": { 4047 "dataElement": "§CONTENTTYPE:METATAG§", 4048 "valueString": "confirmation" 4049 } 4050 }, 4051 { 4052 "then": { 4053 "valueString": "community:usergroup" 4054 }, 4055 "condition": { 4056 "dataElement": "§CONTENTTYPE:METATAG§", 4057 "valueString": "usergroup" 4058 } 4059 }, 4060 { 4061 "then": { 4062 "valueString": "community:idea" 4063 }, 4064 "condition": { 4065 "dataElement": "§CONTENTTYPE:METATAG§", 4066 "valueString": "idea" 4067 } 4068 }, 4069 { 4070 "then": { 4071 "valueString": "support:documentation:compatibility" 4072 }, 4073 "condition": { 4074 "dataElement": "§CONTENTTYPE:METATAG§", 4075 "valueString": "compatibility" 4076 } 4077 }, 4078 { 4079 "then": { 4080 "valueString": "support:documentation:bug" 4081 }, 4082 "condition": { 4083 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§",
4084 "valueString": "bugs:releaseNoteBug" 4085 } 4086 }, 4087 { 4088 "then": { 4089 "valueString": "support:documentation:knownIssue" 4090 }, 4091 "condition": { 4092 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 4093 "valueString": "bugs:releaseNoteKnown" 4094 } 4095 }, 4096 { 4097 "then": { 4098 "valueString": "support:documentation:supplemental" 4099 }, 4100 "condition": { 4101 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 4102 "valueString": "documentation:releaseNoteMisc" 4103 } 4104 }, 4105 { 4106 "then": { 4107 "valueString": "support:documentation" 4108 }, 4109 "condition": { 4110 "dataElement": "§CONTENTTYPE:METATAG§", 4111 "valueString": "documentation" 4112 } 4113 }, 4114 { 4115 "then": { 4116 "valueString": "support:documentation:errata" 4117 }, 4118 "condition": { 4119 "dataElement": "§CONTENTTYPE:METATAG§:§TEMPLATE:PI:PA:DL§", 4120 "valueString": "bugs:errata" 4121 } 4122 }, 4123 { 4124 "then": { 4125 "valueString": "innovations:perspectives" 4126 }, 4127 "condition": { 4128 "dataElement": "§CONTENTTYPE:METATAG§", 4129 "valueString": "perspective" 4130 } 4131 }, 4132 { 4133 "then": { 4134 "valueString": "support:documentation:letterofvolatility" 4135 }, 4136 "condition": { 4137 "dataElement": "§CONTENTTYPE:METATAG§", 4138 "valueString": "letterofvolatility" 4139 } 4140 }, 4141 { 4142 "then": { 4143 "valueString": "company:investor" 4144 }, 4145 "condition": { 4146 "dataElement": "§CONTENTTYPE:METATAG§", 4147 "valueString": "investor" 4148 } 4149 }, 4150 { 4151 "then": { 4152 "valueString": "support" 4153 }, 4154 "condition": { 4155 "dataElement": "§CONTENTTYPE:METATAG§", 4156 "valueString": "lifecycle" 4157 } 4158 }, 4159 { 4160 "then": { 4161 "valueString": "support:documentation" 4162 }, 4163 "condition": { 4164 "dataElement": "§CONTENTTYPE:METATAG§", 4165 "valueString": "supplemental" 4166 } 4167 }, 4168 { 4169 "then": { 4170 "valueString": "innovations:focus" 4171 }, 4172 "condition": { 4173 "dataElement": "§CONTENTTYPE:METATAG§", 4174 "valueString": "focus" 4175 } 4176 }, 4177 { 4178 "then": { 4179 "valueString": "company:career" 4180 }, 4181 "condition": { 4182 "dataElement": "§CONTENTTYPE:METATAG§:§SECTION:METATAG§", 4183 "valueString": "joblisting:company" 4184 } 4185 }, 4186 { 4187 "then": { 4188 "valueString": "innovations:form" 4189 }, 4190 "condition": { 4191 "dataElement": "§CONTENTTYPE:METATAG§", 4192 "valueString": "form" 4193 } 4194 }, 4195 { 4196 "then": { 4197 "valueString": "innovations:result" 4198 }, 4199 "condition": { 4200 "dataElement": "§CONTENTTYPE:METATAG§", 4201 "valueString": "result" 4202 } 4203 }, 4204 { 4205 "then": { 4206 "valueString": "support:documentation:feature" 4207 }, 4208 "condition": { 4209 "dataElement": "§CONTENTTYPE:METATAG§", 4210 "valueString": "feature" 4211 } 4212 }, 4213 { 4214 "then": { 4215 "valueString": "support:documentation:process" 4216 }, 4217 "condition": { 4218 "dataElement": "§CONTENTTYPE:METATAG§", 4219 "valueString": "process" 4220 } 4221 }, 4222 { 4223 "then": { 4224 "valueString": "support:documentation:apireference" 4225 }, 4226 "condition": { 4227 "dataElement": "§CONTENTTYPE:METATAG§", 4228 "valueString": "apireference" 4229 } 4230 }, 4231 { 4232 "then": { 4233 "valueString": "support:documentation:apioverview" 4234 }, 4235 "condition": { 4236 "dataElement": "§CONTENTTYPE:METATAG§", 4237 "valueString": "apioverview" 4238 } 4239 }, 4240 { 4241 "then": { 4242 "valueString": "support:documentation:calibrationprocedure" 4243 }, 4244 "condition": { 4245 "dataElement": "§CONTENTTYPE:METATAG§", 4246 "valueString": "calibrationprocedure" 4247 } 4248 }, 4249 { 4250 "then": { 4251 "valueString": "support:documentation:specifications" 4252 }, 4253 "condition": { 4254 "dataElement": "§CONTENTTYPE:METATAG§", 4255 "valueString": "specifications" 4256 } 4257 }, 4258 { 4259 "then": { 4260 "valueString": "support:documentation:gettingstarted" 4261 }, 4262 "condition": { 4263 "dataElement": "§CONTENTTYPE:METATAG§", 4264 "valueString": "gettingstarted" 4265 } 4266 }, 4267 { 4268 "then": { 4269 "valueString": "support:documentation:seri" 4270 }, 4271 "condition": { 4272 "dataElement": "§CONTENTTYPE:METATAG§", 4273 "valueString": "seri" 4274 } 4275 }, 4276 { 4277 "then": { 4278 "valueString": "support:documentation:specifications" 4279 }, 4280 "condition": { 4281 "dataElement": "§CONTENTTYPE:METATAG§", 4282 "valueString": "gettingstarted, specifications" 4283 } 4284 }, 4285 { 4286 "then": { 4287 "valueString": "freetrial" 4288 }, 4289 "condition": { 4290 "dataElement": "§CONTENTTYPE:METATAG§", 4291 "valueString": "freetrial" 4292 } 4293 } 4294 ] 4295 } 4296 }, 4297 "TITLE_LENGTH": { 4298 "defaultValue": "", 4299 "storageDuration": "pageview", 4300 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4301 "settings": { 4302 "path": "document.title.length" 4303 } 4304 }, 4305 "IS_SEARCH_SPA": { 4306 "storageDuration": "pageview", 4307 "modulePath": "core/src/lib/dataElements/customCode.js", 4308 "settings": { 4309 "source": function(event) { 4310 var metaTagArray = document.getElementsByTagName("meta"); 4311var result = false;
4312for (var i = 0; i < metaTagArray.length; i++) { 4313 if ((metaTagArray[i].name.toLowerCase() === "searchspa") || (metaTagArray[i].name.toLowerCase() === "search-spa")) { 4314 result = metaTagArray[i].content.toLowerCase() === "true"; 4315 } 4316} 4317 4318return result; 4319} 4320 } 4321 }, 4322 "SHIPPING_STATE:DL": { 4323 "defaultValue": "", 4324 "storageDuration": "pageview", 4325 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4326 "settings": { 4327 "path": "digitalData.transaction.profile.shippingAddress.stateProvince" 4328 } 4329 }, 4330 "PAGENAME_FOR_TARGET_PART3": { 4331 "defaultValue": "", 4332 "storageDuration": "pageview", 4333 "modulePath": "core/src/lib/dataElements/customCode.js", 4334 "settings": { 4335 "source": function(event) { 4336 return _satellite.getVar("DETAILED_PAGENAME").split(":")[2]; 4337} 4338 } 4339 }, 4340 "ONSITESEARCHDYM:OSI:OS:DL": { 4341 "defaultValue": "", 4342 "storageDuration": "pageview", 4343 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4344 "settings": { 4345 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchDym" 4346 } 4347 }, 4348 "CID:URL_PARAM": { 4349 "storageDuration": "pageview", 4350 "modulePath": "core/src/lib/dataElements/customCode.js", 4351 "settings": { 4352 "source": function(event) { 4353 function getParameterByName(name, url = window.location.href) { 4354 name = name.replace(/[\[\]]/g, '\\$&'); 4355 var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), 4356 results = regex.exec(url); 4357 if (!results) return null; 4358 if (!results[2]) return ''; 4359 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 4360} 4361 4362return getParameterByName('cid'); 4363} 4364 } 4365 }, 4366 "PREV_DETAILED_PAGENAME": { 4367 "defaultValue": "", 4368 "storageDuration": "pageview", 4369 "modulePath": "core/src/lib/dataElements/customCode.js", 4370 "settings": { 4371 "source": function(event) { 4372 var ret = s.getPreviousValue(_satellite.getVar("DETAILED_PAGENAME"), 'gpv_dpn', ''); 4373 4374if (typeof(ret) === undefined) { 4375 return ""; 4376} 4377 4378return ret; 4379} 4380 } 4381 }, 4382 "OneTrust_Social_Media_Consent": { 4383 "storageDuration": "pageview", 4384 "modulePath": "core/src/lib/dataElements/customCode.js", 4385 "settings": { 4386 "source": function(event) { 4387 if (typeof NIAnalytics === "undefined") { 4388 function NIAnalytics() {} 4389} 4390 4391if (typeof NIAnalytics.getCookie === "undefined"){ 4392 NIAnalytics.getCookie = function (cName) { 4393 var name = cName + "="; 4394 var cDecoded = decodeURIComponent(document.cookie); 4395 var cArr = cDecoded.split('; '); 4396 var res; 4397 return cArr.forEach(function (val) { 4398 val.indexOf(name) === 0 && (res = val.substring(name.length)); 4399 }), res; 4400 }; 4401} 4402 4403return (/C0005:1/).test(NIAnalytics.getCookie('OptanonConsent')); 4404} 4405 } 4406 }, 4407 "PRODUCTLINE:METATAG": { 4408 "defaultValue": "", 4409 "storageDuration": "pageview", 4410 "modulePath": "core/src/lib/dataElements/customCode.js", 4411 "settings": { 4412 "source": function(event) { 4413 var metaTagArray = document.getElementsByTagName("meta"); 4414for (var i = 0; i < metaTagArray.length; i++) { 4415 if (metaTagArray[i].name.toLowerCase() === "productline") { 4416 return metaTagArray[i].content; 4417 } 4418} 4419} 4420 } 4421 }, 4422 "CART_TOTAL_QUANTITY:DL": { 4423 "defaultValue": "", 4424 "storageDuration": "pageview", 4425 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4426 "settings": { 4427 "path": "digitalData.transaction.total.quantity" 4428 } 4429 }, 4430 "ADV:URLCROP": { 4431 "defaultValue": "", 4432 "storageDuration": "pageview", 4433 "modulePath": "core/src/lib/dataElements/customCode.js", 4434 "settings": { 4435 "source": function(event) { 4436 return location.href.split("/")[location.href.split("/").length-1].split(".")[0]; 4437} 4438 } 4439 }, 4440 "OneTrust_Targeting_Consent": { 4441 "storageDuration": "pageview", 4442 "modulePath": "core/src/lib/dataElements/customCode.js", 4443 "settings": { 4444 "source": function(event) { 4445 if (typeof NIAnalytics === "undefined") { 4446 function NIAnalytics() {} 4447} 4448 4449if (typeof NIAnalytics.getCookie === "undefined"){ 4450 NIAnalytics.getCookie = function (cName) { 4451 var name = cName + "="; 4452 var cDecoded = decodeURIComponent(document.cookie); 4453 var cArr = cDecoded.split('; '); 4454 var res; 4455 return cArr.forEach(function (val) { 4456 val.indexOf(name) === 0 && (res = val.substring(name.length)); 4457 }), res; 4458 }; 4459} 4460return (/C0004:1/).test(NIAnalytics.getCookie('OptanonConsent')); 4461} 4462 } 4463 }, 4464 "PREV_PAGE_VIEWED_PERCENTAGE": { 4465 "defaultValue": "", 4466 "storageDuration": "pageview", 4467 "modulePath": "core/src/lib/dataElements/customCode.js", 4468 "settings": { 4469 "source": function(event) { 4470 return s.getPercentPageViewed(); 4471} 4472 } 4473 }, 4474 "DNB_PRESCREENING": { 4475 "defaultValue": "", 4476 "storageDuration": "pageview", 4477 "modulePath": "core/src/lib/dataElements/customCode.js", 4478 "settings": { 4479 "source": function(event) { 4480 var dnbStorageKey = 'dnb'; 4481 4482if(sessionStorage.getItem(dnbStorageKey) !== null) { 4483 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 4484 var retVar = dnb_Data.delinquencyRate + ":" + dnb_Data.howTheyPay + ":" + dnb_Data.marketability; 4485 return (retVar === '::') ? '' : retVar; 4486} else{ 4487 return ''; 4488} 4489} 4490 } 4491 }, 4492 "SUBTEMPLATE:PI:PA:DL": { 4493 "defaultValue": "", 4494 "storageDuration": "pageview", 4495 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4496 "settings": { 4497 "path": "digitalData.page.pageInfo.subTemplate" 4498 } 4499 }, 4500 "NEWSLETTER_ID:PATH_PARAM": { 4501 "defaultValue": "", 4502 "storageDuration": "pageview", 4503 "modulePath": "core/src/lib/dataElements/customCode.js", 4504 "settings": { 4505 "source": function(event) { 4506 urlPieces = location.pathname.split("/"); 4507for (var i = 0; i < urlPieces.length ; i++){
4508 if (urlPieces[i] === "newsletter") return urlPieces[i+1]; 4509} 4510return ""; 4511} 4512 } 4513 }, 4514 "CURRENT_TIME": { 4515 "defaultValue": "", 4516 "storageDuration": "pageview", 4517 "modulePath": "core/src/lib/dataElements/customCode.js", 4518 "settings": { 4519 "source": function(event) { 4520 return new Date().getTime(); 4521} 4522 } 4523 }, 4524 "LOCALE:COOKIE": { 4525 "defaultValue": "nolocalevalue", 4526 "storageDuration": "pageview", 4527 "modulePath": "core/src/lib/dataElements/cookie.js", 4528 "settings": { 4529 "name": "locale" 4530 } 4531 }, 4532 "HASHED_EMAIL:USER:DL": { 4533 "defaultValue": "", 4534 "storageDuration": "pageview", 4535 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4536 "settings": { 4537 "path": "digitalData.user.hashedEmail" 4538 } 4539 }, 4540 "FORUM_KEYWORDS:METATAG": { 4541 "defaultValue": "", 4542 "storageDuration": "pageview", 4543 "modulePath": "core/src/lib/dataElements/customCode.js", 4544 "settings": { 4545 "source": function(event) { 4546 var keywordsChained = ""; 4547var metaTagArray = document.getElementsByTagName("meta"); 4548 for (var i = 0; i < metaTagArray.length; i++) { 4549 if (metaTagArray[i].getAttribute("property") === "article:tag") { 4550 keywordsChained += metaTagArray[i].getAttribute("content") + ", "; 4551 } 4552} 4553keywordsChained = keywordsChained.substring(0,keywordsChained.length-2) 4554return keywordsChained; 4555} 4556 } 4557 }, 4558 "REFERRER": { 4559 "defaultValue": "", 4560 "storageDuration": "pageview", 4561 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4562 "settings": { 4563 "path": "document.referrer" 4564 } 4565 }, 4566 "CONTENT-SECTION:METATAG": { 4567 "defaultValue": "", 4568 "modulePath": "data-element-assistant/src/lib/dataElements/concatenate.js", 4569 "settings": { 4570 "trailingDelimiter": "", 4571 "dataElementsAndDelimiters": [ 4572 { 4573 "delimiter": "", 4574 "dataElement": "%CONTENTTYPE:METATAG%" 4575 }, 4576 { 4577 "delimiter": ":", 4578 "dataElement": "%SECTION:METATAG%" 4579 } 4580 ] 4581 } 4582 }, 4583 "USER:DL": { 4584 "defaultValue": "", 4585 "storageDuration": "pageview", 4586 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4587 "settings": { 4588 "path": "digitalData.user" 4589 } 4590 }, 4591 "SEO_H3_VALUES": { 4592 "defaultValue": "", 4593 "storageDuration": "pageview", 4594 "modulePath": "core/src/lib/dataElements/customCode.js", 4595 "settings": { 4596 "source": function(event) { 4597 var h3Tags = document.getElementsByTagName("h3"); 4598var h3Class = document.querySelectorAll(".h3"); 4599var result = ""; 4600 4601if(typeof String.prototype.trim !== 'function') { 4602 String.prototype.trim = function() { 4603 return this.replace(/^\s+|\s+$/g, ''); 4604 } 4605} 4606 4607var content; 4608for(i = 0; i < h3Tags.length; i++){ 4609 content = h3Tags[i].innerText || h3Tags[i].textContent; 4610 result += i>0 ? "|"+content.trim() : content.trim(); 4611} 4612 4613for(i = 0; i < h3Class.length; i++){ 4614 content = h3Class[i].innerText || h3Class[i].textContent; 4615 result += (i>0 | result !== "") ? "|"+content.trim() : content.trim(); 4616} 4617 4618return result === "" ? "no value" : result; 4619} 4620 } 4621 }, 4622 "ADVNAME:METATAG": { 4623 "defaultValue": "", 4624 "storageDuration": "pageview", 4625 "modulePath": "core/src/lib/dataElements/customCode.js", 4626 "settings": { 4627 "source": function(event) { 4628 var s = ""; 4629var metaTagArray = document.getElementsByTagName("meta"); 4630for (var i = 0; i < metaTagArray.length; i++) { 4631 if (metaTagArray[i].name.toLowerCase() === "dcsext.ni_advisorname") { 4632 s = metaTagArray[i].content; 4633 } 4634} 4635var t = s.split(" "); 4636var s = t[0]; 4637for (var i = 1 ; i < t.length-1 ; i++){ 4638 s = s + " " + t[i]; 4639} 4640return s; 4641} 4642 } 4643 }, 4644 "CAPTURENAVIGATION_LINK_CLICK_DETAILS_WITH_EVENT_DETAIL": { 4645 "storageDuration": "pageview", 4646 "modulePath": "core/src/lib/dataElements/customCode.js", 4647 "settings": { 4648 "source": function(event) { 4649 // For these event names the result will be event_name:event_detail:event_label 4650return [ 4651 "chat", 4652 "event carousel", 4653 "LowLeakage", 4654 "GPIBType", 4655 "BackendConnection/ConnectionType", 4656 "QuantitySold", 4657 "HasDCOutlets", 4658 "ControllerOS", 4659 "ProcessorCore", 4660 "ARINC429_NumberOfChannels", 4661 "AO_NumberOfChannels", 4662 "NumberOfInputOnlyChannels", 4663 "MaximumBaudRate", 4664 "IsolationType", 4665 "AI_VoltageRange", 4666 "VoltageRange", 4667 "SourceAdapt", 4668 "Device_SupportedPowerInput", 4669 "RFSignalAnalyzers_NumberOfChannels", 4670 "CAN_ExternalTimingAndTriggering", 4671 "HighPrecisionOscillator", 4672 "RFPowerMeters_FrequencyRange/High", 4673 "RFSignalAnalyzers_FrequencyRange", 4674 "CableShielding", 4675 "Controller_MaximumBandwidth", 4676 "HarddriveMemorySize", 4677 "RFSignalAnalyzers_ThirdOrderIntercept", 4678 "AverageNoiseLevel", 4679 "RFSignalAnalyzers_OnBoardMemorySize", 4680 "IncludesPreAmplifier", 4681 "IOType", 4682 "RFSignalGenerators_InstantaneousOutputBandwidth", 4683 "RFSignalGenerators_FrequencyRange", 4684 "RFSignalAnalyzers_TypicalTuningTime", 4685 "BackendConnection/ConnectionGender", 4686 "BackendConnection/NumberofPins", 4687 "FrontendConnection/ConnectionGender", 4688 "FrontendConnection/ConnectionType", 4689 "FrontendConnection/NumberofPins", 4690 "PhysicalDimensions/Length", 4691 "CableWiring", 4692 "Profile", 4693 "SustainedThroughput", 4694 "MXICommunicationLevel", 4695 "TEDS", 4696 "NumberOfRibbonConnections", 4697 "Impedance", 4698 "SupportedSerialProtocols", 4699 "OpticalFiberType", 4700 "TwistedPairing", 4701 "LIN_PhysicalLayer", 4702 "CAN_PhysicalLayer", 4703 "Terminated", 4704 "ThermocoupleType", 4705 "OperatingTemperatureRange", 4706 "ThermocoupleMaterial", 4707 "MountsTo", 4708 "SMU_VoltageRange", 4709 "FrequencyRange", 4710 "InputPowerPhase", 4711 "NumberOfPowerOutlets", 4712 "RackHeight", 4713 "MaximumCurrent", 4714 "PowerInput", 4715 "GenerationVoltageRange", 4716 "GenerationCurrentRange", 4717 "SupportedProgrammingMode", 4718 "SynchronizationEnabled", 4719 "FPGAProcessor", 4720 "SlotCount", 4721 "ChassisPXIType", 4722 "NumberOfBidirectionalChannels", 4723 "ParametricControl", 4724 "BusFunction", 4725 "MIL-STD-1553_NumberOfChannels", 4726 "CommunicationProtocols", 4727 "TSN_Enabled", 4728 "DevelopmentKit", 4729 "NumberOfSingleEndedChannels", 4730 "NumberOfDifferentialInputChannels", 4731 "NumberOfDigitalDifferentialInputChannels", 4732 "RMCConnector", 4733 "ConformalCoated", 4734 "BusTypeFormFactor", 4735 "NumberOfCountersTimers", 4736 "AnalogInputChannels", 4737 "MaximumSamplingRate", 4738 "TrainingFormat", 4739 "NumberOfOutputOnlyChannels", 4740 "DIO_LogicLevels", 4741 "DIO_MaximumUpdateRate", 4742 "Enclosed", 4743 "MaximumSystemBandwidth", 4744 "Chassis_PowerSupplyType", 4745 "SlotCoolingCapacity", 4746 "PulsedCurrentRange", 4747 "IntendedChannel", 4748 "cDAQ_BusConnection", 4749 "MaximumI2CClockRate", 4750 "MaximumClockRate", 4751 "LogicLevelsAndRange", 4752 "DigitsOfResolution", 4753 "DCVoltageRange", 4754 "DCCurrentRange", 4755 "PerformsLCR", 4756 "DC_VoltageAccuracy", 4757 "AI_Bandwidth", 4758 "AO_Bandwidth", 4759 "SupportedFPGAChip", 4760 "BrandedCompanyName", 4761 "TimingAndSynch_MaximumSourceFrequency", 4762 "DIO_Isolation", 4763 "MaximumSPIClockRate", 4764 "Mountable(WithoutAccessories)", 4765 "CANOpen_NumberOfChannels", 4766 "PROFIBUS_NetworkRole", 4767 "ProductPlatform", 4768 "CameraInterfaceType", 4769 "ImageSensorColor", 4770 "PixelSize(um)", 4771 "AI_NumberOfChannels", 4772 "BridgeConfigurations", 4773 "NominalResistance", 4774 "AI_Isolation", 4775 "ElectricalSignalMeasured", 4776 "SupportedSensorType", 4777 "TemperatureMeasurementAccuracy", 4778 "SupportedSensors", 4779 "CAN_NumberOfPorts", 4780 "LIN_ExternalTimingAndTriggering", 4781 "LIN_NumberOfPorts", 4782 "TotalOutputPower", 4783 "RFFrequencyRange", 4784 "RFSignalTransceivers_InstantaneousInputBandwidth", 4785 "ArbWfrmGen_NumberOfChannels", 4786 "GPSDO", 4787 "TypicalLinearity", 4788 "DynamicRange", 4789 "MeasurementSpeed", 4790 "RFPowerMeters_FrequencyRange/Low", 4791 "InsertionLoss", 4792 "Switch_Bandwidth", 4793 "CharacteristicImpedance", 4794 "ModelBandwidth", 4795 "ModuleWidth", 4796 "Serial_NumberOfChannels", 4797 "AI_Resolution", 4798 "NumberOfSMUChannels", 4799 "MaxDCSourcingPower", 4800 "MaxDCSinkingPower", 4801 "CurrentSensitivity", 4802 "PowerSupply_IncludesAuxPower", 4803 "NumberOfBanks", 4804 "NumberOfRows", 4805 "MaximumSwitchingCurrentDC", 4806 "ScanRate(SwitchingTime)", 4807 "Oscilloscope_MaximumBandwidth", 4808 "AI_NumberOfVoltageChannels", 4809 "RFSignalAnalyzers_InstantaneousInputBandwidth" 4810]; 4811} 4812 } 4813 }, 4814 "TARGET_ENABLED": { 4815 "defaultValue": "", 4816 "storageDuration": "pageview", 4817 "modulePath": "core/src/lib/dataElements/customCode.js", 4818 "settings": { 4819 "source": function(event) { 4820 var excludedDeliverers = ['advisors']; 4821var urlPatterns = ['ni.com/status', 'sine.ni.com/nips', 'sine-dev.ni.com/nips', 'sine-dev2.ni.com/nips', 'sine-test.ni.com/nips', 'sine-test2.ni.com/nips', 'venus.ni.com/nips', 'venus-dev.ni.com/nips', 'venus-dev2.ni.com/nips', 'venus-test.ni.com/nips', 'venus-test2.ni.com/nips', 'ohm.ni.com/advisors/', 'ohm-dev.ni.com/advisors/', 'ohm-dev2.ni.com/advisors/', 'ohm-test.ni.com/advisors/', 'ohm-test2.ni.com/advisors/', 'sine.ni.com/nipartslist', 'sine-dev.ni.com/nipartslist', 'sine-dev2.ni.com/nipartslist', 'sine-test.ni.com/nipartslist', 'sine-test2.ni.com/nipartslist', 'pef.fa.us1.oraclecloud.com/hcmUI/CandidateExperience', 'event.on24.com', 'dev2-natinst.cs219.force.com']; 4822 4823var currentURL = window.location.href.toLowerCase(); 4824var contentType = _satellite.getVar("CONTENTTYPE:METATAG").toLowerCase(); 4825var delivered = _satellite.getVar("DELIVEREDBY:METATAG").toLowerCase(); 4826 4827for (var i = 0; i < urlPatterns.length; i++){ 4828 if(currentURL.indexOf(urlPatterns[i]) > -1){ 4829 return false;
4830 } 4831} 4832 4833return excludedDeliverers.indexOf(delivered) === -1; 4834} 4835 } 4836 }, 4837 "ONSITESEARCHCLICKEDRANK:OSI:OS:DL": { 4838 "defaultValue": "", 4839 "storageDuration": "pageview", 4840 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4841 "settings": { 4842 "path": "digitalData.onsiteSearch.onsiteSearchInfo.onsiteSearchClickedRank" 4843 } 4844 }, 4845 "CAT_ID:METATAG": { 4846 "defaultValue": "", 4847 "storageDuration": "pageview", 4848 "modulePath": "core/src/lib/dataElements/customCode.js", 4849 "settings": { 4850 "source": function(event) { 4851 var metaTagArray = document.getElementsByTagName("meta"); 4852for (var i = 0; i < metaTagArray.length; i++) { 4853 if (metaTagArray[i].name.toLowerCase() === "catid") { 4854 return metaTagArray[i].content; 4855 } 4856} 4857} 4858 } 4859 }, 4860 "IS_CART_OR_CHECKOUT_PAGE": { 4861 "modulePath": "core/src/lib/dataElements/customCode.js", 4862 "settings": { 4863 "source": function(event) { 4864 function isMatchingUrl() { 4865 const urlPath = window.location.pathname; 4866 4867 // Regex for lang-code: 2-3 letters or 2 letters + dash + 2 letters, case-insensitive 4868 const langCodePattern = '(?:[a-zA-Z]{2,3}|[a-zA-Z]{2}-[a-zA-Z]{2})'; 4869 4870 // Regex for cart-id: alphanumeric, dashes, underscores 4871 const cartIdPattern = '[a-zA-Z0-9_-]+'; 4872 4873 // Define full patterns 4874 const patterns = [ 4875 new RegExp(`^/${langCodePattern}/cart$`, 'i'), 4876 new RegExp(`^/${langCodePattern}/cart/${cartIdPattern}$`, 'i'), 4877 new RegExp(`^/${langCodePattern}/checkout/${cartIdPattern}$`, 'i'), 4878 new RegExp(`^/${langCodePattern}/checkout/confirmation$`, 'i') 4879 ]; 4880 4881 return patterns.some(pattern => pattern.test(urlPath)); 4882} 4883 4884return isMatchingUrl(); 4885} 4886 } 4887 }, 4888 "INTERNALCAMPAIGN:AT:PA:DL": { 4889 "defaultValue": "", 4890 "storageDuration": "pageview", 4891 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4892 "settings": { 4893 "path": "digitalData.page.attributes.internalCampaign" 4894 } 4895 }, 4896 "OneTrust_Functional_Consent": { 4897 "storageDuration": "pageview", 4898 "modulePath": "core/src/lib/dataElements/customCode.js", 4899 "settings": { 4900 "source": function(event) { 4901 if (typeof NIAnalytics === "undefined") { 4902 function NIAnalytics() {} 4903} 4904 4905if (typeof NIAnalytics.getCookie === "undefined"){ 4906 NIAnalytics.getCookie = function (cName) { 4907 var name = cName + "="; 4908 var cDecoded = decodeURIComponent(document.cookie); 4909 var cArr = cDecoded.split('; '); 4910 var res; 4911 return cArr.forEach(function (val) { 4912 val.indexOf(name) === 0 && (res = val.substring(name.length)); 4913 }), res; 4914 }; 4915} 4916 4917return (/C0003:1/).test(NIAnalytics.getCookie('OptanonConsent')); 4918} 4919 } 4920 }, 4921 "EVENTNAME:EV:DL": { 4922 "defaultValue": "", 4923 "storageDuration": "pageview", 4924 "modulePath": "core/src/lib/dataElements/customCode.js", 4925 "settings": { 4926 "source": function(event) { 4927 var eventArray = _satellite.getVar("EVENT:DL"); 4928if (NIAnalytics.eventIndex !== -1 && 4929 eventArray[NIAnalytics.eventIndex].eventInfo.eventName !== undefined) { 4930 return eventArray[NIAnalytics.eventIndex].eventInfo.eventName; 4931} 4932return ""; 4933 4934} 4935 } 4936 }, 4937 "PRODUCT_FILTERING_OPTIONS": { 4938 "defaultValue": "", 4939 "storageDuration": "pageview", 4940 "modulePath": "core/src/lib/dataElements/customCode.js", 4941 "settings": { 4942 "source": function(event) { 4943 if(digitalData.product && digitalData.product[0] && digitalData.product[0].productInfo && (digitalData.product[0].productInfo.productID || digitalData.product[0].productInfo.productName)){ 4944 var product = _satellite.getVar("PRODUCT:DL")[0].productInfo.productID ? _satellite.getVar("PRODUCT:DL")[0].productInfo.productID : _satellite.getVar("PRODUCT:DL")[0].productInfo.productName; 4945 return NIAnalytics.getMappedValue("refdata.hrid.pmdm_products", product) + ":" + _satellite.getVar('FILTERNAV:AT:PA:DL') + ":" + _satellite.getVar('FILTERFACET:AT:PA:DL'); 4946}else{ 4947 var category = isNaN(parseInt(digitalData.product[0].category.categoryID)) ? digitalData.product[0].category.categoryID : NIAnalytics.getMappedValue("refdata.hrid.pmdm_categories", digitalData.product[0].category.categoryID); 4948 return category + ":" + _satellite.getVar('FILTERNAV:AT:PA:DL') + ":" + _satellite.getVar('FILTERFACET:AT:PA:DL'); 4949} 4950 4951} 4952 } 4953 }, 4954 "APPLICATIONAREA_S:METATAG": { 4955 "defaultValue": "", 4956 "storageDuration": "pageview", 4957 "modulePath": "core/src/lib/dataElements/customCode.js", 4958 "settings": { 4959 "source": function(event) { 4960 var metaTagArray = document.getElementsByTagName("meta"); 4961for (var i = 0; i < metaTagArray.length; i++) { 4962 if (metaTagArray[i].name.toLowerCase() === "applicationarea_s") { 4963 return metaTagArray[i].content; 4964 } 4965} 4966 4967} 4968 } 4969 }, 4970 "DNB_COMPANYNAME": { 4971 "defaultValue": "", 4972 "storageDuration": "pageview", 4973 "modulePath": "core/src/lib/dataElements/customCode.js", 4974 "settings": { 4975 "source": function(event) { 4976 var dnbStorageKey = 'dnb'; 4977 4978if(sessionStorage.getItem(dnbStorageKey) !== null) { 4979 var dnb_Data = JSON.parse(sessionStorage.getItem(dnbStorageKey)); 4980 return dnb_Data.companyName; 4981} else{ 4982 return ''; 4983} 4984} 4985 } 4986 }, 4987 "CLICKTITLEURL:OSI:OS:DL": { 4988 "defaultValue": "", 4989 "storageDuration": "pageview", 4990 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4991 "settings": { 4992 "path": "digitalData.onsiteSearch.onsiteSearchInfo.clickTitleUrl" 4993 } 4994 }, 4995 "CART_TRANSACTION_ORDERID:DL": { 4996 "defaultValue": "", 4997 "storageDuration": "pageview", 4998 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 4999 "settings": { 5000 "path": "digitalData.page.transaction.orderId" 5001 } 5002 }, 5003 "SOCIAL_PIXEL_FILTER": { 5004 "defaultValue": "", 5005 "storageDuration": "pageview", 5006 "modulePath": "core/src/lib/dataElements/customCode.js", 5007 "settings": { 5008 "source": function(event) { 5009 var filter = [ 5010 "www.ni.com/shop/labview/labview-nxg", 5011 "www.ni.com/shop/data-acquisition-and-control/what-is-fielddaq", 5012 "www.ni.com/shop/compactrio/what-are-compactrio-controllers", 5013 "www.ni.com/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/instrumentstudio", 5014 "www.ni.com/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/instrumentstudio/how-do-i-use-instrumentstudio-to-interact-with-multiple-instruments", 5015 "learn.ni.com/teach", 5016 "www.ni.com/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/systemlink", 5017 "www.ni.com/shop/data-acquisition-and-control/flexlogger", 5018 "www.ni.com/shop/labview", 5019 "www.ni.com/shop/data-acquisition-and-control/application-software-for-data-acquisition-and-control-category/what-is-insightcm" 5020 ]; 5021 var pagenames = [ 5022 "products:hardware:detail:what is ni elvis?", 5023 "products:cart:shopping cart", 5024 "products:checkout:confirmation" 5025 ]; 5026 5027 var excluded = [ 5028 "products:checkout:shipping", 5029 "products:checkout:billing", 5030 "products:checkout:review" 5031 ]; 5032 5033 var sections = [ 5034 "innovations", 5035 "landing", 5036 "perspectives", 5037 "solutions", 5038 "products", 5039 "events", 5040 "company" 5041 ]; 5042 var section = _satellite.getVar("SECTION:METATAG").toLowerCase(); 5043 var contentType = _satellite.getVar("CONTENTTYPE:METATAG"); 5044 var acceptedContentTypes = ["profile", "contactni", "downloadconfirm", "landing"]; 5045 var pn = _satellite.getVar("PAGE_NAME"); 5046 5047 if(excluded.indexOf(_satellite.getVar("DETAILED_PAGENAME")) > -1) return "false"; 5048 5049 if(sections.indexOf(section) > -1) return "true"; 5050 if (_satellite.getVar("TEMPLATE:PI:PA:DL") === "blog") return "true"; 5051 if (pagenames.indexOf(_satellite.getVar("DETAILED_PAGENAME")) > -1) return "true"; 5052 5053 if(acceptedContentTypes.indexOf(contentType) > -1 || pn === "homepage" || pn.indexOf("ni.com/gate/gb") > -1 || pn.indexOf("forums.ni.com/t5/NI-Blog/") === 0){ 5054 return "true"; 5055 } 5056 5057return filter.indexOf(pn) > -1 ? "true" : "false"; 5058 5059} 5060 } 5061 }, 5062 "VISITSTART:COOKIE": { 5063 "defaultValue": "", 5064 "storageDuration": "pageview", 5065 "modulePath": "core/src/lib/dataElements/customCode.js", 5066 "settings": { 5067 "source": function(event) { 5068 return s.getVisitStart('s_vs'); 5069} 5070 } 5071 }, 5072 "CART_TOTAL_CURRENCY:DL": { 5073 "defaultValue": "USD", 5074 "storageDuration": "pageview", 5075 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 5076 "settings": { 5077 "path": "digitalData.transaction.total.currency" 5078 } 5079 }, 5080 "DOMAIN": { 5081 "defaultValue": "", 5082 "storageDuration": "pageview", 5083 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 5084 "settings": { 5085 "path": "location.hostname" 5086 } 5087 }, 5088 "EVENT_ACTION:EV:DL_BY_ENAME": { 5089 "defaultValue": "", 5090 "storageDuration": "pageview", 5091 "modulePath": "core/src/lib/dataElements/customCode.js", 5092 "settings": { 5093 "source": function(event) { 5094 var eventArray = _satellite.getVar("EVENT:DL"); 5095for (var i = 0; i < eventArray.length; i++){ 5096 if (eventArray[i].eventInfo.eventName === NIAnalytics.eventName) return eventArray[i].eventInfo.eventAction; 5097} 5098return ""; 5099} 5100 } 5101 }, 5102 "EVENTITEM:EV:DL": { 5103 "defaultValue": "", 5104 "modulePath": "core/src/lib/dataElements/customCode.js", 5105 "settings": { 5106 "source": function(event) { 5107 var eventArray = _satellite.getVar("EVENT:DL"); 5108if (NIAnalytics.eventIndex !== -1 5109 && eventArray[NIAnalytics.eventIndex].eventInfo.items !== undefined) { 5110 return eventArray[NIAnalytics.eventIndex].eventInfo.items; 5111} 5112return ""; 5113} 5114 } 5115 }, 5116 "CF_SEARCH_BOT:METATAG": { 5117 "storageDuration": "pageview", 5118 "modulePath": "core/src/lib/dataElements/customCode.js", 5119 "settings": { 5120 "source": function(event) { 5121 return NIAnalytics.getMetaTag("cf-search-bot"); 5122} 5123 } 5124 }, 5125 "AT_PREVIEW_TOKEN:URL_PARAM": { 5126 "defaultValue": "", 5127 "cleanText": true, 5128 "storageDuration": "pageview", 5129 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 5130 "settings": { 5131 "name": "at_preview_token", 5132 "caseInsensitive": true 5133 } 5134 }, 5135 "PAGENAME": { 5136 "defaultValue": "", 5137 "modulePath": "core/src/lib/dataElements/customCode.js", 5138 "settings": { 5139 "source": function(event) { 5140 var getDomain = function(){ 5141 return location.host.split(".")[0] 5142} 5143 5144var isInPathParams = function(param) { 5145 for (var i = 0; i < location.pathname.split("/").length ; i++){ 5146 if (location.pathname.split("/")[i] == param) return true; 5147 } 5148 return false;
5149} 5150 5151function getPageType(ptMeta){ 5152 return ((ptMeta === "homepage")?"main":((ptMeta === "navigation")?"category":((ptMeta === "leaf")?"detail":ptMeta))); 5153} 5154 5155var getTranslatedRefData = function(hrids){ 5156 var storedMap = sessionStorage.getItem("refdataMap") ? JSON.parse(sessionStorage.getItem("refdataMap")) : {}; 5157 5158 var hridParams = ""; 5159 5160 switch(typeof hrids){ 5161 case "string": 5162 case "number": 5163 if(!storedMap.hasOwnProperty(hrids)){ 5164 hridParams = hrids; 5165 } 5166 break; 5167 5168 case "object": 5169 for(var i=0; i<hrids.length; i++){ 5170 if(!storedMap.hasOwnProperty(hrids[i])){ 5171 hridParams += hrids[i] + ","; 5172 } 5173 } 5174 break; 5175 } 5176 5177 if(hridParams !== ""){ 5178 var request = new XMLHttpRequest(); 5179 var refdataTimeout = setTimeout(function () { 5180 _satellite.logger.log("Analytics error: Refdata service timed out. Proceeding with s.t()."); 5181 request.abort(); 5182 }, 5000); 5183 request.open("get", (_satellite.environment.stage == "production" ? "https://www.ni.com/refdata-rest/1?ni-api-key=cd9a922c-dc20-436d-a09a-c7143406edfc&hrids="+hridParams : "https://www-dev.ni.com/refdata-rest/1?ni-api-key=cd9a922c-dc20-436d-a09a-c7143406edfc&hrids="+hridParams), false); 5184 request.onload = function () { 5185 if (request.status === 200) { 5186 if (refdataTimeout) clearTimeout(refdataTimeout); 5187 var response = JSON.parse(request.responseText); 5188 for (var id in response) { 5189 storedMap[id] = response[id]; 5190 } 5191 sessionStorage.setItem("refdataMap", JSON.stringify(storedMap)); 5192 } else if (/^4|5+/.test(request.status.toString())) { 5193 _satellite.logger.log("Analytics error: Refdata service is unavailable."); 5194 } 5195 } 5196 request.send(); 5197 } 5198 5199 return JSON.parse(sessionStorage.getItem("refdataMap")); 5200}; 5201 5202/* WARN: DON'T MESS WITH THE ORDER OF THE LOGIC */ 5203var analyticsPagenameArray = []; 5204/* Cart and Checkout */ 5205if (window.location.pathname.indexOf("ni_addr_book.main") > -1){ 5206 analyticsPagenameArray.push("products:checkout:address book"); 5207 analyticsPagenameArray.push("products:checkout:address book"); 5208 analyticsPagenameArray.push("products:checkout"); 5209 return analyticsPagenameArray; 5210} 5211if (window.location.pathname.indexOf("niwq.request_instant_quote") > -1){ 5212 analyticsPagenameArray.push("products:quote preview:main"); 5213 analyticsPagenameArray.push("products:quote preview:main"); 5214 analyticsPagenameArray.push("products:quote preview:main"); 5215 return analyticsPagenameArray; 5216} 5217if (window.location.pathname.indexOf("nios.store") > -1 || window.location.pathname.indexOf("shop/cart") > -1){ 5218 var forms = document.getElementsByTagName("form"); 5219 for (var i = 0; i < forms.length; i++){ 5220 if (forms[i].getAttribute("action") == "nios.store"){ 5221 var inputs = forms[i].getElementsByTagName("input") 5222 for (var j = 0; j < inputs.length; j++){ 5223 if (inputs[j].getAttribute("name") === "action" && inputs[j].getAttribute("value") === "retrieve_cart"){ 5224 analyticsPagenameArray.push("products:cart:retrieve cart"); 5225 analyticsPagenameArray.push("products:cart:retrieve cart"); 5226 analyticsPagenameArray.push("products:cart"); 5227 return analyticsPagenameArray; 5228 } 5229 } 5230 } 5231 } 5232 if (_satellite.getVar("ACTION:URL_PARAM") === "purchase_form"){ 5233 analyticsPagenameArray.push("products:order by part number:main"); 5234 analyticsPagenameArray.push("products:order by part number:main"); 5235 analyticsPagenameArray.push("products:order by part number:main"); 5236 return analyticsPagenameArray; 5237 } 5238 var forms = document.getElementsByTagName("form") 5239 for (var i = 0; i< forms.length; i++){ 5240 if (forms[i].getAttribute("name") === "retrieveQuote"){ 5241 analyticsPagenameArray.push("products:cart:empty cart"); 5242 analyticsPagenameArray.push("products:cart:empty cart"); 5243 analyticsPagenameArray.push("products:cart"); 5244 return analyticsPagenameArray; 5245 } 5246 } 5247 5248 5249 if((digitalData.cart.items.length < 1) || (digitalData.cart.items[0] === "")){ 5250 analyticsPagenameArray.push("products:cart:empty cart"); 5251 analyticsPagenameArray.push("products:cart:empty cart"); 5252 analyticsPagenameArray.push("products:cart"); 5253 return analyticsPagenameArray; 5254 } 5255 5256 analyticsPagenameArray.push("products:cart:shopping cart"); 5257 analyticsPagenameArray.push("products:cart:shopping cart"); 5258 analyticsPagenameArray.push("products:cart"); 5259 return analyticsPagenameArray; 5260} 5261if (window.location.pathname.indexOf("nios.checkout") > -1) { 5262 var formTagArray = document.getElementsByTagName("form"); 5263 var mark = 3; 5264 for (var i = 0; i < formTagArray.length; i++) { 5265 if (formTagArray[i].getAttribute("action") === "nios.checkout" && formTagArray[i].getAttribute("name") === "ship") { mark = 0; break; } 5266 if (formTagArray[i].getAttribute("action") === "nios.checkout" && formTagArray[i].getAttribute("name") === "pmt") { mark = 1; break; } 5267 if (formTagArray[i].getAttribute("action") === "nios.store") { mark = 2; } 5268 } 5269 switch (mark){ 5270 case 0: 5271 analyticsPagenameArray.push("products:checkout:step2shipping"); 5272 analyticsPagenameArray.push("products:checkout:step2shipping"); 5273 analyticsPagenameArray.push("products:checkout"); 5274 return analyticsPagenameArray; 5275 case 1: 5276 analyticsPagenameArray.push("products:checkout:step3billing"); 5277 analyticsPagenameArray.push("products:checkout:step3billing"); 5278 analyticsPagenameArray.push("products:checkout"); 5279 return analyticsPagenameArray; 5280 case 2: 5281 analyticsPagenameArray.push("products:checkout:step4review"); 5282 analyticsPagenameArray.push("products:checkout:step4review"); 5283 analyticsPagenameArray.push("products:checkout"); 5284 return analyticsPagenameArray; 5285 case 3: 5286 analyticsPagenameArray.push("products:checkout:confirmation"); 5287 analyticsPagenameArray.push("products:checkout:confirmation"); 5288 analyticsPagenameArray.push("products:checkout"); 5289 return analyticsPagenameArray; 5290 default: break; 5291 } 5292} 5293 5294if (typeof NIAnalytics === "undefined") { 5295 function NIAnalytics() {} 5296} 5297 5298if (typeof NIAnalytics.getMetaTag === "undefined"){ 5299 NIAnalytics.getMetaTag = function (name) { 5300 var metaTagArray = document.getElementsByTagName("meta"); 5301 for (var i = 0; i < metaTagArray.length; i++) { 5302 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 5303 return metaTagArray[i].content; 5304 } 5305 } 5306 return ""; 5307 } 5308} 5309 5310if (typeof NIAnalytics.getMetaFromDataLayer === "undefined"){ 5311 NIAnalytics.getMetaFromDataLayer = function(name) { 5312 return (typeof digitalData !== "undefined" && typeof digitalData.page !== "undefined" && typeof digitalData.page.pageInfo !== "undefined" && typeof digitalData.page.pageInfo[name] !== "undefined") ? digitalData.page.pageInfo[name] : ""; 5313 } 5314} 5315 5316if (typeof NIAnalytics.getMappedValueFromDataLayer === "undefined"){ 5317NIAnalytics.getMappedValueFromDataLayer = function (map, keyString) { 5318 if (typeof keyString === "undefined" || keyString === "") return ""; 5319 if ( 5320 ((keyString.indexOf("digitalData.product") > -1) && !digitalData.hasOwnProperty("product")) || 5321 ((keyString.indexOf("digitalData.salesforce") > -1) && !digitalData.hasOwnProperty("salesforce")) 5322 ) return ""; 5323 var key; 5324 var levels = keyString.split("."); 5325 if (levels[0] === "digitalData") { 5326 levels.splice(0, 1); 5327 5328 function dig(inWhat, levels) { 5329 if (levels.length == 1) { 5330 if (levels[0].indexOf("[") === -1) { 5331 var deepest = inWhat[levels[0]]; 5332 if (typeof deepest !== "undefined") { 5333 return deepest; 5334 } 5335 } else { 5336 var deepestWithArray = inWhat[levels[0].split("[")[0]][levels[0].split("[")[1].split("]")[0]]; 5337 if (typeof deepestWithArray !== "undefined") { 5338 return deepestWithArray; 5339 } 5340 } 5341 } else { 5342 if (levels[0].indexOf("[") === -1) { 5343 var deep = inWhat[levels[0]]; 5344 if (typeof deep !== "undefined") { 5345 return dig(deep, levels.splice(1, levels.length - 1)); 5346 } 5347 } else { 5348 if (!digitalData.hasOwnProperty(levels[0].split("[")[0])) { 5349 return ""; 5350 } 5351 var deepWithArray = inWhat[levels[0].split("[")[0]][levels[0].split("[")[1].split("]")[0]]; 5352 if (typeof deepWithArray !== "undefined") { 5353 return dig(deepWithArray, levels.splice(1, levels.length - 1)); 5354 } 5355 } 5356 } 5357 } 5358 key = dig(digitalData, levels); 5359 } else return ""; 5360 5361 var cat; 5362 var mapPieces = map.split("."); 5363 var tmp = window; 5364 for (var i = 0; i < mapPieces.length; i++) { 5365 if (tmp[mapPieces[i]] !== undefined && tmp[mapPieces[i]] !== null) { 5366 tmp = tmp[mapPieces[i]]; 5367 if (i === mapPieces.length - 1) { 5368 cat = tmp[key]; 5369 } 5370 } else break; 5371 } 5372 5373 var manualCat;
5374 var manualMapPieces = "refdata.hrid.manual-entry".split("."); 5375 var manualTmp = window; 5376 for (var i = 0; i < manualMapPieces.length; i++) { 5377 if (manualTmp[manualMapPieces[i]] !== undefined && manualTmp[manualMapPieces[i]] !== null) { 5378 manualTmp = manualTmp[manualMapPieces[i]]; 5379 if (i === manualMapPieces.length - 1) { 5380 manualCat = manualTmp[key]; 5381 } 5382 } else if (cat === undefined) return key; 5383 } 5384 5385 return ((cat !== undefined) ? cat : ((manualCat !== undefined) ? manualCat : key)); 5386} 5387} 5388 5389/* Init */ 5390var sMeta = _satellite.getVar("SECTION:METATAG"); 5391var ctMeta = _satellite.getVar("CONTENTTYPE:METATAG"); 5392var ptMeta = _satellite.getVar("PAGETYPE:METATAG"); 5393var pageType = getPageType(ptMeta); 5394var dbMeta = _satellite.getVar("DELIVEREDBY:METATAG"); 5395var ctHier = _satellite.getVar("CONTENTTYPE_HIERARCHY"); 5396var engSTitle = _satellite.getVar("ENGLISHSHORTTITLE:METATAG").toLowerCase(); 5397var sTitle = _satellite.getVar("SHORTTITLE:METATAG").toLowerCase(); 5398var finalTitle = engSTitle!==""?engSTitle:sTitle; 5399var title = _satellite.getVar("HTML_TITLE").toLowerCase().split(" - ")[0]; 5400var tab = _satellite.getVar("PAGETABCONTENT:PI:PA:DL"); 5401var pLine = _satellite.getVar("PRODUCTLINE:METATAG").toLowerCase(); 5402var advName = _satellite.getVar("ADVNAME:METATAG").toLowerCase(); 5403var advCateg = _satellite.getVar("ADV:URLCROP"); 5404var cClass = _satellite.getVar("CONTENT_CLASS:METATAG"); 5405var nlID = _satellite.getVar("NEWSLETTER_ID:PATH_PARAM"); 5406var pr = _satellite.getVar("PRODUCT:DL"); 5407var ind = _satellite.getVar("INDUSTRY:AT:PA:DL"); 5408var template = _satellite.getVar("TEMPLATE:PI:PA:DL"); 5409var pcMeta = _satellite.getVar("PRODUCTCATEGORIES:METATAG"); 5410var nigen3Meta = _satellite.getVar("NIGEN3:METATAG"); 5411var documentID = _satellite.getVar("DOCUMENTID:METATAG"); 5412var firstProdCat = _satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG'); 5413var catID = _satellite.getVar("CAT_ID:METATAG"); 5414var subCatID = _satellite.getVar("SUB_CAT_ID:METATAG"); 5415var nodeID = _satellite.getVar("NODE_ID:METATAG"); 5416 5417/* Ind & App */ 5418if (ind !== "" && template !== "industry" && template !== "application"){ 5419 if (ctMeta == "industry"){ 5420 analyticsPagenameArray.push(ctHier + ":" + ind + ":main"); 5421 analyticsPagenameArray.push(ctHier + ":" + ind + ":main"); 5422 analyticsPagenameArray.push(ctHier + ":main"); 5423 return analyticsPagenameArray; 5424 } 5425 if (ctMeta == "application"){ 5426 analyticsPagenameArray.push(ctHier + ":" + ind + ":detail:" + finalTitle); 5427 analyticsPagenameArray.push(ctHier + ":" + ind + ":detail:" + finalTitle); 5428 analyticsPagenameArray.push(ctHier + ":detail"); 5429 return analyticsPagenameArray; 5430 } 5431} 5432/* Shop - Product Overview */ 5433if (template == "hwProdOverview"){ 5434 analyticsPagenameArray.push(ctHier + ":hardware:" + pageType + ":" + finalTitle); 5435 analyticsPagenameArray.push(ctHier + ":hardware:" + pageType + ":" + finalTitle); 5436 analyticsPagenameArray.push(ctHier + ":hardware:" + pageType); 5437 return analyticsPagenameArray; 5438} 5439/* Shop - Homepage */ 5440if (template == "shop"){ 5441 analyticsPagenameArray.push(ctHier + ((tab === "")?"":(":" + tab)) + ":main"); 5442 analyticsPagenameArray.push(ctHier + ":main"); 5443 analyticsPagenameArray.push(ctHier + ":main"); 5444 return analyticsPagenameArray; 5445} 5446/* Platform Category Page */ 5447if (template == "platformCategory"){ 5448 var map = getTranslatedRefData(digitalData.product[0].category.hardwareForm); 5449 dlName = map[digitalData.product[0].category.hardwareForm]; 5450 var tmpName = ctHier + ":" + pageType + ":" + dlName; 5451 analyticsPagenameArray.push(tmpName, tmpName); 5452 analyticsPagenameArray.push(ctHier + ":" + pageType); 5453 return analyticsPagenameArray; 5454} 5455/* PCP */ 5456if (template === "pcp"){ 5457 var map = getTranslatedRefData([digitalData.product[0].productInfo.productName, _satellite.getVar("CATEGORY:CA:PR:DL")]); 5458 var cat = map[_satellite.getVar("CATEGORY:CA:PR:DL")]; 5459 var categNull = cat === _satellite.getVar("CATEGORY:CA:PR:DL") ? "null" : cat; 5460 dlName = map[digitalData.product[0].productInfo.productName]; 5461 var tmpName = ctHier + ":" + categNull + ":" + pageType + ":" + dlName; 5462 analyticsPagenameArray.push(tmpName + ":" + tab); 5463 analyticsPagenameArray.push(tmpName); 5464 analyticsPagenameArray.push(ctHier + ":hardware:" + pageType + ":" + tab); 5465 return analyticsPagenameArray; 5466} 5467 5468/* PDP */ 5469if(template === "pdp" || template === "platformpdp" || template === "hwbunpdp"){ 5470 var map = getTranslatedRefData([digitalData.product[0].category.category,digitalData.product[0].productInfo.productID]); 5471 var category = map[digitalData.product[0].category.category]; 5472 var productID = map[digitalData.product[0].productInfo.productID]; 5473 analyticsPagenameArray.push(ctHier + ":" + category + ":" + pageType + ":" + productID + ":" + tab); 5474 analyticsPagenameArray.push(ctHier + ":" + category + ":" + pageType + ":" + productID); 5475 analyticsPagenameArray.push(ctHier + ":" + pageType); 5476 return analyticsPagenameArray; 5477} 5478 5479if(template === "swpdp" || template === "swbunpdp"){ 5480 var category = digitalData.product[0].category.category ? digitalData.product[0].category.category : digitalData.product[0].category.platformCategory; 5481 var map = getTranslatedRefData([digitalData.product[0].productInfo.productID,category]); 5482 var productID = map[digitalData.product[0].productInfo.productID]; 5483 analyticsPagenameArray.push(ctHier + ":" + map[category] + ":" + pageType + ":" + productID + ((tab === "")?"":(":" + tab))); 5484 analyticsPagenameArray.push(ctHier + ":" + map[category] + ":" + pageType + ":" + productID); 5485 analyticsPagenameArray.push(ctHier + ":" + pageType); 5486 return analyticsPagenameArray; 5487} 5488 5489if(template === "accpdp"){ 5490 var map = getTranslatedRefData(digitalData.product[0].productInfo.productID); 5491 var productID = map[digitalData.product[0].productInfo.productID]; 5492 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + productID + ((tab === "")?"":(":" + tab))); 5493 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + productID); 5494 analyticsPagenameArray.push(ctHier + ":" + pageType); 5495 return analyticsPagenameArray; 5496} 5497 5498/* Category page */ 5499if (template === "hwCategory" || template === "swCategory"){ 5500 var dlName = ""; 5501 var tmpName = "";
5502 if(digitalData.hasOwnProperty("product")){ 5503 dlName = digitalData.hasOwnProperty("product") ? digitalData.product[0].category.categoryID ? NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_categories", "digitalData.product[0].category.categoryID") : NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_categories", "digitalData.product[0].category.platformCategory") : ""; 5504 tmpName = ctHier + ":" + NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_categories", "digitalData.product[0].category.category") + ":" + pageType + ":" + dlName; 5505 } else if(digitalData.hasOwnProperty("salesforce") && (typeof digitalData.salesforce[0] !== 'undefined') && digitalData.salesforce[0].hasOwnProperty("category") && digitalData.salesforce[0].category.hasOwnProperty("categoryID")){ 5506 var map = getTranslatedRefData(digitalData.salesforce[0].category.categoryID); 5507 dlName = map[digitalData.salesforce[0].category.categoryID]; 5508 tmpName = ctHier + ":" + pageType + ":" + dlName; 5509 } 5510 analyticsPagenameArray.push(tmpName, tmpName); 5511 analyticsPagenameArray.push(ctHier + ":" + pageType); 5512 return analyticsPagenameArray; 5513} 5514 5515if(template === "accCategory"){ 5516 var dlName = "";
5517 if(digitalData.hasOwnProperty("product")){ 5518 dlName = digitalData.hasOwnProperty("product") ? digitalData.product[0].category.categoryID ? NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_categories", "digitalData.product[0].category.categoryID") : NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_categories", "digitalData.product[0].category.platformCategory") : ""; 5519 } else if(digitalData.hasOwnProperty("salesforce") && (typeof digitalData.salesforce[0] !== 'undefined') && digitalData.salesforce[0].hasOwnProperty("category") && digitalData.salesforce[0].category.hasOwnProperty("categoryID")){ 5520 var map = getTranslatedRefData(digitalData.salesforce[0].category.categoryID); 5521 dlName = map[digitalData.salesforce[0].category.categoryID]; 5522 } 5523 var tmpName = ctHier + ":" + pageType + ":" + dlName; 5524 analyticsPagenameArray.push(tmpName, tmpName); 5525 analyticsPagenameArray.push(ctHier + ":" + pageType); 5526 return analyticsPagenameArray; 5527} 5528 5529/* LWMP */ 5530if (template === "lwmp" || template === "lwpp"){ 5531 /*var tmpName = ctHier + ":" + pageType + ":" + NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_products", "digitalData.product[0].productInfo.productName") + ":" + NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_models", "digitalData.product[0].productInfo.modelName");*/ 5532 var map = getTranslatedRefData([digitalData.product[0].productInfo.productName, digitalData.product[0].productInfo.modelName]); 5533 var tmpName = ctHier + ":" + pageType + ":" + map[digitalData.product[0].productInfo.productName] + ":" + map[digitalData.product[0].productInfo.modelName]; 5534 analyticsPagenameArray.push(tmpName, tmpName); 5535 analyticsPagenameArray.push(ctHier + ":" + pageType); 5536 return analyticsPagenameArray; 5537} 5538/* BLV Splash */ 5539if (template === "pmDownload"){ 5540 /*var prodCat = NIAnalytics.getMappedValue("refdata.hrid.pmdm_products", _satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')); 5541 prodCat = NIAnalytics.getMappedValue("refdata.hrid.pmdm_models",prodCat);*/ 5542 var tmp = ctHier + ":software:" + pageType; 5543 analyticsPagenameArray.push(tmp + ":" + finalTitle, tmp + ":" + finalTitle, tmp); 5544 return analyticsPagenameArray; 5545} 5546/* BLV PKGMGR & SW How do I & SW Overview & SW Uprade & SW Archives */ 5547if (template === "pmDownload" || 5548 template === "swHowDoI" || 5549 template === "swUpgrade" || 5550 template === "swArchives"){ 5551 5552 var map = getTranslatedRefData(_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')); 5553 var prodCat = map[_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')]; 5554 var tmp = ctHier + ":software:" + prodCat + ":" + pageType + ":" + finalTitle; 5555 analyticsPagenameArray.push(tmp, tmp); 5556 analyticsPagenameArray.push(ctHier + ":software:" + pageType); 5557 return analyticsPagenameArray; 5558} 5559 5560if (template === "swProdOverview") { 5561 var map = getTranslatedRefData(digitalData.product[0].productInfo.productID); 5562 var prodID = map[digitalData.product[0].productInfo.productID]; 5563 var tmp = ctHier + ":software:" + prodID + ":" + pageType + ":" + finalTitle; 5564 analyticsPagenameArray.push(tmp, tmp); 5565 analyticsPagenameArray.push(ctHier + ":software:" + pageType + ":overview"); 5566 return analyticsPagenameArray; 5567} 5568 5569/* LV Compare & SW Download */ 5570if (template === "swCompare"){ 5571 var map = getTranslatedRefData(_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')); 5572 var prodCat = map[_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')]; 5573 var tmp = ctHier + ":software:" + prodCat + ":" + pageType + ":" + engSTitle; 5574 analyticsPagenameArray.push(tmp + ":" + tab); 5575 analyticsPagenameArray.push(tmp); 5576 analyticsPagenameArray.push(ctHier + ":software:" + pageType); 5577 return analyticsPagenameArray; 5578} 5579 5580if (template === "swDownload"){ 5581 var map = getTranslatedRefData(_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')); 5582 var prodCat = map[_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')]; 5583 var tmp = ctHier + ":software:" + prodCat + ":" + pageType; 5584 tab === "" ? analyticsPagenameArray.push(tmp) : analyticsPagenameArray.push(tmp + ":" + tab); 5585 analyticsPagenameArray.push(tmp); 5586 analyticsPagenameArray.push(ctHier + ":software:" + pageType); 5587 return analyticsPagenameArray; 5588} 5589 5590if (template === "swDownloadConfirm") { 5591 var map = getTranslatedRefData([_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG'),digitalData.product[0].productInfo.productID]); 5592 prodCat = map[_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')]; 5593 var contentType = _satellite.getVar("CONTENTTYPE:METATAG"); 5594 var tmp = ctHier + ":software:" + prodCat + ":" + pageType + ":" + engSTitle; 5595 var prodID = map[digitalData.product[0].productInfo.productID]; 5596 var product = _satellite.getVar("PRODUCT:DL"); 5597 var versionID = ""; 5598 if (typeof product[0] !== "undefined"){ 5599 if (typeof product[0].productInfo !== "undefined") { 5600 var tmp = getTranslatedRefData(product[0].productInfo.versionID); 5601 versionID = tmp[product[0].productInfo.versionID]; 5602 } 5603 } 5604 5605 if (contentType === "downloadconfirm") { 5606 var packaged = window.location.href.substr(window.location.href.search("download/") + ("download/").length).split(".")[0]; 5607 analyticsPagenameArray.push(ctHier + ":software:" + versionID + ":" + pageType + ":" + engSTitle + ":" + packaged); 5608 analyticsPagenameArray.push(ctHier + ":software:" + prodID + ":" + pageType + ":" + engSTitle); 5609 } else { 5610 analyticsPagenameArray.push(ctHier + ":software:" + versionID + ":" + pageType + ":" + engSTitle); 5611 analyticsPagenameArray.push(ctHier + ":software:" + prodID + ":" + pageType + ":" + engSTitle); 5612 } 5613 analyticsPagenameArray.push(ctHier + ":software:" + pageType + ":" + "confirmation"); 5614 return analyticsPagenameArray; 5615} 5616 5617if (template === "swEdition") { 5618 var map = getTranslatedRefData(digitalData.product[0].productInfo.productID); 5619 var prodID = map[digitalData.product[0].productInfo.productID]; 5620 var tmp = ctHier + ":software:" + prodID + ":" + pageType + ":" + engSTitle; 5621 analyticsPagenameArray.push(tmp + ":" + tab); 5622 analyticsPagenameArray.push(tmp); 5623 analyticsPagenameArray.push(ctHier + ":software:" + pageType + ":" + "editions"); 5624 return analyticsPagenameArray; 5625} 5626 5627/* SW Welcome */ 5628if (template === "welcome"){ 5629 var map = getTranslatedRefData(_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')); 5630 var prodCat = map[_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')]; 5631 analyticsPagenameArray.push(ctHier + ":software:" + prodCat + ":" + pageType + ":welcome"); 5632 analyticsPagenameArray.push(ctHier + ":software:" + prodCat + ":" + pageType + ":welcome"); 5633 analyticsPagenameArray.push(ctHier + ":software:" + pageType); 5634 return analyticsPagenameArray; 5635} 5636/* SW Portfolio */ 5637if (template === "swPortfolio"){ 5638 var tmp = ctHier + ":software:" + pageType; 5639 analyticsPagenameArray.push(tmp, tmp, tmp); 5640 return analyticsPagenameArray; 5641} 5642 5643if (template === "innovations") { 5644 analyticsPagenameArray.push(ctHier + ":" + pageType); 5645 analyticsPagenameArray.push(ctHier + ":" + pageType); 5646 analyticsPagenameArray.push(ctHier + ":" + pageType); 5647 return analyticsPagenameArray; 5648} 5649 5650 5651if (template === "industry") { 5652 analyticsPagenameArray.push(ctHier + ":" + ind + ":" + pageType); 5653 analyticsPagenameArray.push(ctHier + ":" + ind + ":" + pageType); 5654 analyticsPagenameArray.push(ctHier + ":" + pageType); 5655 return analyticsPagenameArray; 5656} 5657 5658if (template === "application") { 5659 analyticsPagenameArray.push(ctHier + ":" + ind + ":" + pageType + ":" + finalTitle); 5660 analyticsPagenameArray.push(ctHier + ":" + ind + ":" + pageType + ":" + finalTitle); 5661 analyticsPagenameArray.push(ctHier + ":" + pageType); 5662 return analyticsPagenameArray; 5663} 5664 5665/* Events Homepage */ 5666if (template === "eventGateway") { 5667 analyticsPagenameArray.push(ctHier + ":main"); 5668 analyticsPagenameArray.push(ctHier + ":main"); 5669 analyticsPagenameArray.push(ctHier + ":main"); 5670 return analyticsPagenameArray; 5671} 5672 5673if (template === "eventEntry") { 5674 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5675 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5676 analyticsPagenameArray.push(ctHier + ":" + pageType); 5677 return analyticsPagenameArray; 5678} 5679 5680if (template === "eventConfirm") { 5681 analyticsPagenameArray.push(ctHier + ":confirmation:" + pageType + ":" + finalTitle); 5682 analyticsPagenameArray.push(ctHier + ":confirmation:" + pageType + ":" + finalTitle); 5683 analyticsPagenameArray.push(ctHier + ":confirmation:" + pageType); 5684 return analyticsPagenameArray; 5685} 5686 5687if (template === "eventRegistration") { 5688 analyticsPagenameArray.push(ctHier + ":registration:" + pageType + ":" + finalTitle); 5689 analyticsPagenameArray.push(ctHier + ":registration:" + pageType + ":" + finalTitle); 5690 analyticsPagenameArray.push(ctHier + ":registration:" + pageType); 5691 return analyticsPagenameArray; 5692} 5693 5694if (template === "eventCancel") { 5695 analyticsPagenameArray.push(ctHier + ":cancellation:" + pageType + ":" + finalTitle); 5696 analyticsPagenameArray.push(ctHier + ":cancellation:" + pageType + ":" + finalTitle); 5697 analyticsPagenameArray.push(ctHier + ":cancellation:" + pageType); 5698 return analyticsPagenameArray; 5699} 5700 5701if (template === "casestudy" || template === "landing" || template === "hwServices" || template === "swServices" || template === "eduServices" || template === "consultServices" || template === "partnerSolution" || template === "intServices") { 5702 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5703 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5704 analyticsPagenameArray.push(ctHier + ":" + pageType); 5705 return analyticsPagenameArray; 5706} 5707 5708if(template === "partnerPage"){ 5709 if(ptMeta === "leaf"){ 5710 var url = window.location.pathname.split("/"); 5711 var pagenameFromURL = url[url.length-1].replaceAll("-", " "); 5712 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + pagenameFromURL); 5713 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + pagenameFromURL); 5714 analyticsPagenameArray.push(ctHier + ":" + pageType); 5715 }else{ 5716 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5717 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5718 analyticsPagenameArray.push(ctHier + ":" + pageType); 5719 } 5720 return analyticsPagenameArray; 5721} 5722 5723if (template === "whitepaper" || template === "howTo" || template === "example" || template === "productDoc" || template === "company" || template === "multimedia" || template === "kbArticle") { 5724 if (template === "company") analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5725 else analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + documentID + ":" + finalTitle); 5726 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5727 analyticsPagenameArray.push(ctHier + ":" + pageType); 5728 return analyticsPagenameArray; 5729} 5730 5731if (template == "systemsOverview") { 5732 var map = getTranslatedRefData(digitalData.product[0].productInfo.productID); 5733 var prodID = map[digitalData.product[0].productInfo.productID]; 5734 analyticsPagenameArray.push(ctHier + ":systems:" + pageType + ":" + prodID + ((tab === "")?"":(":" + tab))); 5735 analyticsPagenameArray.push(ctHier + ":systems:" + pageType + ":" + prodID); 5736 analyticsPagenameArray.push(ctHier + ":systems:" + pageType); 5737 return analyticsPagenameArray; 5738} 5739 5740if (template === "swDownloadUmbrella"){ 5741 var map = getTranslatedRefData(_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')); 5742 var prodCat = map[_satellite.getVar('FIRST_PRODUCTCATEGORY:METATAG')]; 5743 var pageType = pageType; 5744 analyticsPagenameArray.push(ctHier + ":software:" + prodCat + ":" + pageType + ":umbrella"); 5745 analyticsPagenameArray.push(ctHier + ":software:" + prodCat + ":" + pageType + ":umbrella"); 5746 analyticsPagenameArray.push(ctHier + ":software:" + pageType + ":umbrella"); 5747 return analyticsPagenameArray; 5748} 5749 5750if (template === "trends" && sMeta === "innovations"){ 5751 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5752 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5753 analyticsPagenameArray.push(ctHier + ":" + pageType); 5754 return analyticsPagenameArray; 5755} 5756 5757if (template === "dimensionaldrawing" && sMeta === "support") { 5758 if (digitalData.product && digitalData.product[0] && digitalData.product[0].productInfo) { 5759 var prodID, prodIDOrig = typeof digitalData.product[0].productInfo.productID === "undefined" ? "" : digitalData.product[0].productInfo.productID; 5760 /*prodID = NIAnalytics.getMappedValueFromDataLayer("refdata.hrid.pmdm_models", "digitalData.product[0].productInfo.productID"); 5761 if (prodID === prodIDOrig) { 5762 prodID = NIAnalytics.getMappedValue("refdata.hrid.pmdm_products", prodID); 5763 }*/ 5764 var map = getTranslatedRefData(digitalData.product[0].productInfo.productID); 5765 prodID = map[digitalData.product[0].productInfo.productID]; 5766 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + prodID + ":" + engSTitle); 5767 } else { 5768 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5769 } 5770 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5771 analyticsPagenameArray.push(ctHier + ":" + pageType); 5772 return analyticsPagenameArray; 5773} 5774 5775if (template === "prodcertification" && sMeta === "support"){ 5776 var map = getTranslatedRefData(digitalData.product[0].productInfo.productID); 5777 var prodID = map[digitalData.product[0].productInfo.productID]; 5778 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + prodID + ":" + engSTitle); 5779 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5780 analyticsPagenameArray.push(ctHier + ":" + pageType); 5781 return analyticsPagenameArray; 5782} 5783 5784if (template === "support") { 5785 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5786 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5787 analyticsPagenameArray.push(ctHier + ":" + pageType); 5788 return analyticsPagenameArray; 5789} 5790 5791/* Cart&Checkout */ 5792if(template === "cart"){ 5793 analyticsPagenameArray.push(ctHier + ":" + engSTitle); 5794 analyticsPagenameArray.push(ctHier + ":" + engSTitle); 5795 analyticsPagenameArray.push(ctHier); 5796 return analyticsPagenameArray; 5797} 5798 5799if(template === "checkout"){ 5800 analyticsPagenameArray.push(ctHier + ":" + engSTitle + ((tab === "")?"":(":" + tab))); 5801 analyticsPagenameArray.push(ctHier + ":" + engSTitle); 5802 analyticsPagenameArray.push(ctHier); 5803 return analyticsPagenameArray; 5804} 5805 5806if(template === "continueshopping"){ 5807 analyticsPagenameArray.push(ctHier + ":" + engSTitle); 5808 analyticsPagenameArray.push(ctHier + ":" + engSTitle); 5809 analyticsPagenameArray.push(ctHier + ":" + engSTitle); 5810 return analyticsPagenameArray; 5811} 5812 5813if( template === "releaseNoteProduct" || template === "releaseNoteBug" || template === "releaseNoteKnown" || template === "compatibility" || template === "releaseNoteMisc") { 5814 if(template === "releaseNoteProduct"){ 5815 var map = getTranslatedRefData(digitalData.product[0].productInfo.productID); 5816 var prodID = map[digitalData.product[0].productInfo.productID]; 5817 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + documentID + ":" + prodID + ":Release Note"); 5818 }else{ 5819 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + documentID + ":" + engSTitle); 5820 } 5821 5822 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5823 analyticsPagenameArray.push(ctHier + ":" + pageType); 5824 return analyticsPagenameArray; 5825} 5826 5827if(template === "multimediagated"){ 5828 analyticsPagenameArray.push(ctHier + ":" + pageType + ":gated:" + engSTitle); 5829 analyticsPagenameArray.push(ctHier + ":" + pageType + ":gated:" + engSTitle); 5830 analyticsPagenameArray.push(ctHier + ":" + pageType); 5831 return analyticsPagenameArray; 5832} 5833 5834if(template === "multimediaNonGated"){ 5835 analyticsPagenameArray.push(ctHier + ":" + pageType + ":non gated:" + engSTitle); 5836 analyticsPagenameArray.push(ctHier + ":" + pageType + ":non gated:" + engSTitle); 5837 analyticsPagenameArray.push(ctHier + ":" + pageType); 5838 return analyticsPagenameArray; 5839} 5840 5841if(template === "errata"){ 5842 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + documentID + ":" + engSTitle); 5843 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5844 analyticsPagenameArray.push(ctHier + ":" + pageType); 5845 return analyticsPagenameArray; 5846} 5847 5848// Search Results 5849if(templa
5849te === "searchResults"){ 5850 analyticsPagenameArray.push(ctHier + ":results" + ((tab === "")?"":(":" + tab))); 5851 analyticsPagenameArray.push(ctHier + ":results"); 5852 analyticsPagenameArray.push(ctHier + ":results"); 5853 return analyticsPagenameArray; 5854} 5855 5856if(template === "letterofvolatility" || template === "releaseNoteLanding") { 5857 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5858 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5859 analyticsPagenameArray.push(ctHier + ":" + pageType); 5860 return analyticsPagenameArray; 5861} 5862 5863if (template === "resources") { 5864 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5865 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5866 analyticsPagenameArray.push(ctHier + ":" + pageType); 5867 return analyticsPagenameArray; 5868} 5869 5870if (template === "compare") { 5871 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5872 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5873 analyticsPagenameArray.push(ctHier + ":" + pageType); 5874 return analyticsPagenameArray; 5875} 5876 5877if (template === "helpCenter"){ 5878 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5879 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + finalTitle); 5880 analyticsPagenameArray.push(ctHier + ":" + pageType); 5881 return analyticsPagenameArray; 5882} 5883 5884/* Community */ 5885if(ctMeta === "community"){ 5886 if(ptMeta === "homepage"){ 5887 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + title); 5888 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + title); 5889 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + title); 5890 return analyticsPagenameArray; 5891 } 5892 5893 if(ptMeta === "navigation"){ 5894 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + catID +((subCatID === "")?"":(":"+subCatID))); 5895 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + catID); 5896 analyticsPagenameArray.push(ctHier + ":" + pageType); 5897 return analyticsPagenameArray; 5898 } 5899 5900} 5901 5902/* Forum && Blog && Usergroup && Communitydocument*/ 5903if(ctMeta === "forum" || ctMeta === "blog" || ctMeta === "usergroup" || ctMeta === "communitydocument"){ 5904 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + subCatID + ":" + nodeID); 5905 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + subCatID); 5906 analyticsPagenameArray.push(ctHier + ":" + pageType); 5907 return analyticsPagenameArray; 5908} 5909 5910/* Careers */ 5911if(ctMeta === "joblisting"){ 5912 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5913 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + engSTitle); 5914 analyticsPagenameArray.push(ctHier + ":" + pageType); 5915 return analyticsPagenameArray; 5916} 5917 5918/* Idea */ 5919if(ctMeta === "idea"){ 5920 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + subCatID); 5921 analyticsPagenameArray.push(ctHier + ":" + pageType + ":" + subCatID); 5922 analyticsPagenameArray.push(ctHier + ":" + pageType); 5923 return analyticsPagenameArray; 5924} 5925 5926/* Product Detail */ 5927if (ctMeta === "productdatasheet") { 5928 analyticsPagenameArray.push(ctHier + ":buy:detail:" + finalTitle + ((tab === "")?"":(":" + tab))); 5929 analyticsPagenameArray.push(ctHier + ":buy:detail:" + finalTitle); 5930 analyticsPagenameArray.push(ctHier + ":buy:detail"); 5931 return analyticsPagenameArray; 5932} 5933/* Homepage */ 5934if (ctMeta === "homepage" && ptMeta === "homepage" && sMeta === "homepage") { 5935 analyticsPagenameArray.push("homepage"); 5936 analyticsPagenameArray.push("homepage"); 5937 analyticsPagenameArray.push("homepage"); 5938 return analyticsPagenameArray; 5939} 5940/* Product Learn Detail */ 5941if (dbMeta === "Shop" && cClass === "ProductInfo" && ctMeta !== "catalog") { 5942 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":learn:detail:" + finalTitle); 5943 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":learn:detail:" + finalTitle); 5944 analyticsPagenameArray.push(ctHier + ":learn:detail"); 5945 return analyticsPagenameArray; 5946} 5947/* Generic Detail */ 5948if (ptMeta === "leaf") {
5949 analyticsPagenameArray.push(ctHier + ":detail:" + finalTitle + ((tab === "")?"":(":" + tab)) + ((ctMeta !== "newsletter")?"":(":" + nlID))); 5950 analyticsPagenameArray.push(ctHier + ":detail:" + finalTitle + ((ctMeta !== "newsletter")?"":(":" + nlID))); 5951 analyticsPagenameArray.push(ctHier + ":detail"); 5952 return analyticsPagenameArray; 5953} 5954/* Product Learn Main */ 5955if ((dbMeta === "Flex" || dbMeta === "Shop") && ctMeta !== "" && ptMeta == "homepage") { 5956 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":learn:main"); 5957 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":learn:main"); 5958 analyticsPagenameArray.push(ctHier + ":learn:main"); 5959 return analyticsPagenameArray; 5960} 5961/* Product Results */ 5962if (ctMeta === "catalog" && dbMeta === "Shop") { 5963 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":buy:results"); 5964 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":buy:results"); 5965 analyticsPagenameArray.push(ctHier + ":buy:results"); 5966 return analyticsPagenameArray; 5967} 5968/* Product Learn Category */ 5969if ((dbMeta === "Product Pages" && ctMeta === "catalog" && ptMeta === "navigation") || (dbMeta === "Flex" && ctMeta !== "homepage") || (dbMeta === "Shop" && cClass === "ProductInfo" && ctMeta === "catalog")) { 5970 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":learn:category:" + finalTitle); 5971 analyticsPagenameArray.push(ctHier + ((pLine === "")?"":(":" + pLine)) + ":learn:category:" + finalTitle); 5972 analyticsPagenameArray.push(ctHier + ":learn:category"); 5973 return analyticsPagenameArray; 5974} 5975/* Advisor Home */ 5976if (location.href.indexOf("ni.com/advisor/") > -1) { 5977 analyticsPagenameArray.push("products:advisor:main"); 5978 analyticsPagenameArray.push("products:advisor:main"); 5979 analyticsPagenameArray.push("products:advisor:main"); 5980 return analyticsPagenameArray; 5981} 5982/* Advisor Main */ 5983if (ctMeta === "advisors" && ptMeta === "homepage") { 5984 analyticsPagenameArray.push(ctHier + ":" + advName + ":main"); 5985 analyticsPagenameArray.push(ctHier + ":" + advName + ":main"); 5986 analyticsPagenameArray.push(ctHier + ":main"); 5987 return analyticsPagenameArray; 5988} 5989/* Advisor Summary */ 5990if (advCateg === "summary") { 5991 analyticsPagenameArray.push(ctHier + ":" + advName + ":" + advCateg); 5992 analyticsPagenameArray.push(ctHier + ":" + advName + ":" + advCateg); 5993 analyticsPagenameArray.push(ctHier + ":" + advCateg); 5994 return analyticsPagenameArray; 5995} 5996/* Advisor Detail */ 5997if (ctMeta === "advisors" && ptMeta !== "homepage") { 5998 analyticsPagenameArray.push(ctHier + ":" + advName + ":detail:" + advCateg); 5999 analyticsPagenameArray.push(ctHier + ":" + advName + ":detail:" + advCateg); 6000 analyticsPagenameArray.push(ctHier + ":detail"); 6001 return analyticsPagenameArray; 6002} 6003/* Generic Main */ 6004if (ptMeta === "homepage") { 6005 analyticsPagenameArray.push(ctHier + ((tab === "")?"":(":" + tab)) + ":main"); 6006 analyticsPagenameArray.push(ctHier+ ":main"); 6007 analyticsPagenameArray.push(ctHier+ ":main"); 6008 return analyticsPagenameArray; 6009} 6010/* Forum */ 6011if (getDomain().indexOf("forum") > -1) { 6012 analyticsPagenameArray.push("community:forums:board:" + finalTitle + ":main"); 6013 analyticsPagenameArray.push("community:forums:board:" + finalTitle + ":main"); 6014 analyticsPagenameArray.push("community"); 6015 return analyticsPagenameArray; 6016} 6017/* Generic Results */ 6018if (ptMeta === "navigation" && (getDomain() === "search" || isInPathParams("nisearch") || (getDomain() === "sine" && isInPathParams("np")))) { 6019 analyticsPagenameArray.push(ctHier + ":results" + ((tab === "")?"":(":" + tab))); 6020 analyticsPagenameArray.push(ctHier + ":results"); 6021 analyticsPagenameArray.push(ctHier + ":results"); 6022 return analyticsPagenameArray; 6023} 6024/* Generic Category */ 6025if (ptMeta === "navigation" && !(getDomain() === "search" || isInPathParams("nisearch") || (getDomain() === "sine" && isInPathParams("np")))) { 6026 analyticsPagenameArray.push(ctHier + ":category:" + finalTitle + ((tab === "")?"":(":" + tab))); 6027 analyticsPagenameArray.push(ctHier + ":category:" + finalTitle); 6028 analyticsPagenameArray.push(ctHier + ":category"); 6029 return analyticsPagenameArray; 6030} 6031/* Error Page */ 6032if (ptMeta === "errorPage") { 6033 analyticsPagenameArray.push("errorPage"); 6034 analyticsPagenameArray.push("errorPage"); 6035 analyticsPagenameArray.push("errorPage"); 6036 return analyticsPagenameArray; 6037} 6038/* Product White Papers */ 6039if (ctMeta === "white-paper") { 6040 analyticsPagenameArray.push(ctHier + ":detail:" + advCateg); 6041 analyticsPagenameArray.push(ctHier + ":detail:" + advCateg); 6042 analyticsPagenameArray.push(ctHier + ":detail:" + advCateg); 6043 return analyticsPagenameArray; 6044} 6045/* Gated Marketing Content Forms */ 6046if (location.href.indexOf("gate/gb/GB_") > -1) { 6047 var k = location.href.split("/"); 6048 for (var i = 0; i < k.length; i++){
6049 if (k[i].indexOf("GB_") === 0) { 6050 k = k[i]; 6051 analyticsPagenameArray.push("myni:gatedcontent:" + k.toLowerCase()); 6052 analyticsPagenameArray.push("myni:gatedcontent:" + k.toLowerCase()); 6053 analyticsPagenameArray.push("myni:gatedcontent"); 6054 return analyticsPagenameArray; 6055 } 6056 } 6057} 6058/* Lumen */ 6059if (location.href.indexOf("ni.com/nicif") > -1) { 6060 if(location.href.indexOf("content.xhtml") > -1) { 6061 if(location.href.toLowerCase().indexOf("header_login") > -1 || location.href.toLowerCase().indexOf("lms_login") > -1 || location.href.toLowerCase().indexOf("gb_srm") > -1){ 6062 analyticsPagenameArray.push("myni:account:login"); 6063 analyticsPagenameArray.push("myni:account:login"); 6064 analyticsPagenameArray.push("myni:account:login"); 6065 return analyticsPagenameArray; 6066 } else if(location.href.toLowerCase().indexOf("/os_checkout/") > -1){ 6067 analyticsPagenameArray.push("products:checkout:step1login"); 6068 analyticsPagenameArray.push("products:checkout:step1login"); 6069 analyticsPagenameArray.push("products:checkout"); 6070 return analyticsPagenameArray; 6071 } else { 6072 var k = location.href.split("/"); 6073 for (var i = 0; i < k.length; i++){ 6074 if (k[i].indexOf("GB_") === 0) { 6075 k = k[i]; 6076 analyticsPagenameArray.push("myni:gate:" + k.toLowerCase()); 6077 analyticsPagenameArray.push("myni:gate:" + k.toLowerCase()); 6078 analyticsPagenameArray.push("myni:gate"); 6079 return analyticsPagenameArray; 6080 } 6081 } 6082 analyticsPagenameArray.push("myni:gate:" + k[k.length-2]); 6083 analyticsPagenameArray.push("myni:gate:" + k[k.length-2]); 6084 analyticsPagenameArray.push("myni:gate"); 6085 return analyticsPagenameArray; 6086 } 6087 } else if(location.href.indexOf("emailchange.xhtml") > -1) { 6088 analyticsPagenameArray.push("myni:account:change email"); 6089 analyticsPagenameArray.push("myni:account:change email"); 6090 analyticsPagenameArray.push("myni:account:change email"); 6091 return analyticsPagenameArray; 6092 } else if(location.href.indexOf("pwresetrequest.xhtml") > -1) { 6093 analyticsPagenameArray.push("myni:account:password:request reset"); 6094 analyticsPagenameArray.push("myni:account:password:request reset"); 6095 analyticsPagenameArray.push("myni:account:password:request reset"); 6096 return analyticsPagenameArray; 6097 } else if(location.href.indexOf("emailconf.xhtml") > -1) { 6098 analyticsPagenameArray.push("myni:account:confirm"); 6099 analyticsPagenameArray.push("myni:account:confirm"); 6100 analyticsPagenameArray.push("myni:account:confirm"); 6101 return analyticsPagenameArray; 6102 } else if(location.href.indexOf("create.xhtml") > -1) { 6103 analyticsPagenameArray.push("myni:account:create"); 6104 analyticsPagenameArray.push("myni:account:create"); 6105 analyticsPagenameArray.push("myni:account:create"); 6106 return analyticsPagenameArray; 6107 } else if(location.href.indexOf("expired.xhtml") > -1) { 6108 analyticsPagenameArray.push("myni:account:expired"); 6109 analyticsPagenameArray.push("myni:account:expired"); 6110 analyticsPagenameArray.push("myni:account:expired"); 6111 return analyticsPagenameArray; 6112 } else if(location.href.indexOf("extend.xhtml") > -1) { 6113 analyticsPagenameArray.push("myni:account:extend"); 6114 analyticsPagenameArray.push("myni:account:extend"); 6115 analyticsPagenameArray.push("myni:account:extend"); 6116 return analyticsPagenameArray; 6117 } else if(location.href.indexOf("login.xhtml") > -1) { 6118 analyticsPagenameArray.push("myni:account:login"); 6119 analyticsPagenameArray.push("myni:account:login"); 6120 analyticsPagenameArray.push("myni:account:login"); 6121 return analyticsPagenameArray; 6122 } 6123} 6124/* Email prefs */ 6125if(location.host.indexOf("sine") > -1 && location.href.indexOf("comprefs") > -1) { 6126 analyticsPagenameArray.push("myni:account:email preferences"); 6127 analyticsPagenameArray.push("myni:account:email preferences"); 6128 analyticsPagenameArray.push("myni:account:email preferences"); 6129 return analyticsPagenameArray; 6130} 6131/* Info Codes */ 6132if (location.href.indexOf("digital.ni.com/express.nsf/express") > -1) { 6133 analyticsPagenameArray.push("sitewide:info codes:main"); 6134 analyticsPagenameArray.push("sitewide:info codes:main"); 6135 analyticsPagenameArray.push("sitewide:info codes:main"); 6136 return analyticsPagenameArray; 6137} 6138/* MyNI Account */ 6139if (ctMeta === "myni" && ptMeta === "homepage") { 6140 analyticsPagenameArray.push("myni:main"); 6141 analyticsPagenameArray.push("myni:main"); 6142 analyticsPagenameArray.push("myni:main"); 6143 return analyticsPagenameArray; 6144} 6145/* Legal */ 6146if (ctMeta === "Legal" && ptMeta === "" && sMeta === "") { 6147 analyticsPagenameArray.push(ctHier + ":privacy statement"); 6148 analyticsPagenameArray.push(ctHier + ":privacy statement"); 6149 analyticsPagenameArray.push(ctHier + ":privacy statement"); 6150 return analyticsPagenameArray; 6151} 6152/* Academic */ 6153if (ctMeta === "Academic" && ptMeta === "" && sMeta === "") {
6154 analyticsPagenameArray.push(ctHier + ":detail:" + finalTitle); 6155 analyticsPagenameArray.push(ctHier + ":detail:" + finalTitle); 6156 analyticsPagenameArray.push(ctHier + ":detail"); 6157 return analyticsPagenameArray; 6158} 6159/* Service Request */ 6160if (ctMeta === "servicerequest") { 6161 if (location.href.split("/")[location.href.split("/").length-1].toLowerCase().indexOf("myservicerequests") > -1){ 6162 analyticsPagenameArray.push(ctHier + ":main"); 6163 analyticsPagenameArray.push(ctHier + ":main"); 6164 analyticsPagenameArray.push(ctHier + ":main"); 6165 return analyticsPagenameArray; 6166 } else if(location.href.split("/")[location.href.split("/").length-1].toLowerCase().indexOf("getassistance") > -1) { 6167 analyticsPagenameArray.push(ctHier + ":open service request"); 6168 analyticsPagenameArray.push(ctHier + ":open service request"); 6169 analyticsPagenameArray.push(ctHier + ":open service request"); 6170 return analyticsPagenameArray; 6171 } else { 6172 analyticsPagenameArray.push(ctHier + ":service request"); 6173 analyticsPagenameArray.push(ctHier + ":service request"); 6174 analyticsPagenameArray.push(ctHier + ":service request"); 6175 return analyticsPagenameArray; 6176 } 6177} 6178/* Quote */ 6179if (ctMeta === "quote" && ptMeta === "misc") { 6180 analyticsPagenameArray.push(ctHier + ":quote preview:main"); 6181 analyticsPagenameArray.push(ctHier + ":quote preview:main"); 6182 analyticsPagenameArray.push(ctHier + ":quote preview:main"); 6183 return analyticsPagenameArray; 6184} 6185 6186} 6187 } 6188 }, 6189 "CAPTURENAVIGATION_LINK_CLICK_DETAILS_WITH_DETAILED_PAGENAME": { 6190 "storageDuration": "pageview", 6191 "modulePath": "core/src/lib/dataElements/customCode.js", 6192 "settings": { 6193 "source": function(event) { 6194 // For these event names the result will be event_name:detailed_pagename:event_label 6195return [ 6196 "pdp carousel", 6197 "license type", 6198 "swpdp carousel", 6199 "sort by", 6200 "select options", 6201 "chat widget a", 6202 "chat widget b", 6203 "pre chat form", 6204 "contact sales", 6205 "chat" 6206]; 6207} 6208 } 6209 }, 6210 "LINKCOUNT:PI:PA:DL": { 6211 "defaultValue": "", 6212 "storageDuration": "pageview", 6213 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 6214 "settings": { 6215 "path": "digitalData.page.pageInfo.linkCount" 6216 } 6217 }, 6218 "NIGEN2:METATAG": { 6219 "defaultValue": "", 6220 "storageDuration": "pageview", 6221 "modulePath": "core/src/lib/dataElements/customCode.js", 6222 "settings": { 6223 "source": function(event) { 6224 var metaTagArray = document.getElementsByTagName("meta"); 6225for (var i = 0; i < metaTagArray.length; i++) { 6226 if (metaTagArray[i].name.toLowerCase() === "nigen2") { 6227 return metaTagArray[i].content; 6228 } 6229} 6230return ""; 6231} 6232 } 6233 }, 6234 "GUESTBOOK_CODE": { 6235 "defaultValue": "", 6236 "storageDuration": "pageview", 6237 "modulePath": "core/src/lib/dataElements/customCode.js", 6238 "settings": { 6239 "source": function(event) { 6240 var url = location.href; 6241if (url.indexOf("/gate/gb") > -1) { 6242 var splitURL = url.split("/"); 6243 return splitURL[splitURL.indexOf("gb") + 1]; 6244} 6245 6246if(typeof digitalData !== "undefined" && digitalData.hasOwnProperty('page') && digitalData.page.hasOwnProperty('attributes') && digitalData.page.attributes.hasOwnProperty('gbroot')){ 6247 return digitalData.page.attributes.gbroot; 6248} 6249return ""; 6250} 6251 } 6252 }, 6253 "PAGENAME_FOR_TARGET_PART7": { 6254 "defaultValue": "", 6255 "storageDuration": "pageview", 6256 "modulePath": "core/src/lib/dataElements/customCode.js", 6257 "settings": { 6258 "source": function(event) { 6259 return _satellite.getVar("DETAILED_PAGENAME").split(":")[6]; 6260} 6261 } 6262 }, 6263 "LINK_COUNT": { 6264 "defaultValue": "", 6265 "storageDuration": "pageview", 6266 "modulePath": "core/src/lib/dataElements/customCode.js", 6267 "settings": { 6268 "source": function(event) { 6269 var analyticsLinkCount = _satellite.getVar("LINKCOUNT:PI:PA:DL"); 6270var deliveredBy = _satellite.getVar("DELIVEREDBY:METATAG").toLowerCase(); 6271var contenttype = _satellite.getVar("CONTENTTYPE:METATAG").toLowerCase(); 6272 6273function getParents(el, parentSelector) { 6274 6275 if (parentSelector === undefined) { 6276 parentSelector = document; 6277 } 6278 6279 var parents = []; 6280 var p = el.parentNode; 6281 6282 while (p !== parentSelector) { 6283 var o = p; 6284 parents.push(o); 6285 p = o.parentNode; 6286 } 6287 parents.push(parentSelector); 6288 6289 return parents; 6290} 6291 6292function isAncestor(el, cls) { 6293 while ((el = el.parentNode) && el.parentNode && el.className.indexOf(cls) < 0); 6294 return el !== document; 6295} 6296 6297if (analyticsLinkCount === "") { 6298 if(!NIAnalytics.createNestedObject){ 6299 NIAnalytics.createNestedObject = function( base, names, value ) { 6300 var lastName = arguments.length === 3 ? names.pop() : false;
6301 for( var i = 0; i < names.length; i++ ) { 6302 base = base[ names[i] ] = base[ names[i] ] || {}; 6303 } 6304 if( lastName ) base = base[ lastName ] = value; 6305 return base; 6306 }; 6307 } 6308 6309 var arr = []; 6310 var arr2 = []; 6311 var innerContent = false; 6312 var sth; 6313 // Don't mess up with the order 6314 //Community Examples 6315 if ((window.location.hostname === "forums.ni.com" || window.location.hostname === "forumstage.ni.com") && (contenttype === "communitydocument" || contenttype === "example")) { 6316 var tmp = document.querySelectorAll('div.custom-body-wrap'); 6317 if (!tmp.length) { 6318 tmp = document.querySelectorAll('div.lia-message-template-overview-zone, div.lia-message-template-description-zone, div.lia-message-template-requirements-zone,' 6319 + 'div.lia-message-template-execute-zone, div.lia-message-template-additional-info-zone'); 6320 } 6321 if(!tmp.length){ 6322 tmp = document.querySelectorAll('div.lia-message-template-content-zone'); 6323 } 6324 if (!tmp.length) { 6325 var fallbackDiv = document.getElementsByClassName("lia-message-body-content")[0]; 6326 tmp = fallbackDiv ? [fallbackDiv] : []; 6327 } 6328 for (var i = 0; i < tmp.length; i++) { 6329 if (!isAncestor(tmp[i], "CommentList")) { 6330 arr.push(tmp[i]); 6331 } 6332 } 6333 if (arr.length > 0) { sth = arr; innerContent = true; } 6334 } 6335 6336 if (sth == undefined || sth.length == 0) { // Knowledgebase 6337 var tmp = document.getElementsByClassName("blog-post"); 6338 if (tmp.length > 0) { sth = arr = tmp; innerContent = true; } 6339 } 6340 if (sth == undefined || sth.length == 0) { 6341 var niPageWrap = document.getElementsByClassName("ni-page-wrap"); 6342 sth = niPageWrap[niPageWrap.length - 1]; 6343 } 6344 if (sth == undefined || sth.length == 0) { // VCM Docs (white papers, product documentation, examples) 6345 var tmp = document.getElementsByClassName("tutorial-body"); 6346 if (tmp.length > 0) { sth = arr = tmp; innerContent = true; } 6347 } 6348 if (sth == undefined || sth.length == 0) sth = document.getElementById("ni-main-page-content"); 6349 if (sth == undefined || sth.length == 0) sth = document.getElementById("main-content"); 6350 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("my-profile")[0]; 6351 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("pnx-content")[0]; 6352 if (sth == undefined || sth.length == 0) sth = document.getElementsByTagName("main")[0]; 6353 if (sth == undefined || sth.length == 0) sth = document.getElementById("bodycontainer"); 6354 if (sth == undefined || sth.length == 0) sth = document.getElementById("wrapper"); 6355 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("wrapper")[0]; 6356 if (sth == undefined || sth.length == 0) sth = document.getElementById("messageBodySimpleDisplay"); //Lithium examples 6357 if (sth == undefined || sth.length == 0) sth = document.getElementsByClassName("MinimumWidthContainer")[0]; 6358 if (sth == undefined || sth.length == 0) sth = document.getElementById("page-content"); 6359 if ((sth == undefined || sth.length == 0) && deliveredBy === "searchable product documentation") { 6360 sth = document.getElementsByClassName("container")[5]; 6361 } 6362 if ((sth == undefined || sth.length == 0) && document.getElementsByClassName("banner-section")[0] !== undefined) { 6363 sth = document.getElementsByClassName("banner-section")[0].cloneNode(true); 6364 sth.appendChild(document.getElementsByClassName("content-wrapper")[0].cloneNode(true)); 6365 } 6366 if (sth == undefined || sth.length == 0) return 0; 6367 6368 if (!innerContent) { 6369 for (var i = 0; i < sth.children.length; i++) { 6370 if (sth.children[i].nodeName === "DIV" || sth.children[i].nodeName === "FORM" || sth.children[i].nodeName === "TABLE" || sth.children[i].nodeName === "SECTION") { 6371 if (sth.children[i].className.indexOf("noindex") === -1 && sth.children[i].id !== "cookieLaw" && sth.children[i].id !== "ni-vis-head" && sth.children[i].id !== "ni-vis-foot") arr.push(sth.children[i]); 6372 } 6373 } 6374 } 6375 6376 for (var i = 0; i < arr.length; i++) { 6377 var tmp = arr[i].getElementsByTagName("a"); 6378 for (var j = 0; j < tmp.length; j++) { 6379 var parents = getParents(tmp[j], arr[i]); 6380 var ok = true; 6381 for (var k = 0; k < parents.length; k++) { 6382 if (parents[k].className.indexOf("noindex") !== -1 || parents[k].className.indexOf("lia-message-signature") !== -1 || parents[k].id === "cookieLaw" || parents[k].id === "ni-vis-head" || parents[k].id === "ni-vis-foot") { 6383 ok = false;
6384 break; 6385 } 6386 } 6387 if (ok) { 6388 arr2 = arr2.concat(tmp[j]); 6389 } 6390 } 6391 } 6392 var linkCount = 0; 6393 for (var i = 0; i < arr2.length; i++) { 6394 if (arr2[i].getAttribute("href") !== null && arr2[i].getAttribute("href").charAt(0) !== "#") linkCount++; 6395 } 6396 if (typeof digitalData === "undefined") digitalData = {}; 6397 NIAnalytics.createNestedObject( digitalData, ["page", "pageInfo", "linkCount"], linkCount ); 6398 return linkCount !== 0 ? linkCount : "0"; 6399} else return analyticsLinkCount; 6400 6401} 6402 } 6403 }, 6404 "USECASEID:URL_PARAM": { 6405 "defaultValue": "", 6406 "storageDuration": "pageview", 6407 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 6408 "settings": { 6409 "name": "usecaseID", 6410 "caseInsensitive": true 6411 } 6412 }, 6413 "EXP:URL_PARAM": { 6414 "defaultValue": "", 6415 "storageDuration": "pageview", 6416 "modulePath": "core/src/lib/dataElements/queryStringParameter.js", 6417 "settings": { 6418 "name": "exp", 6419 "caseInsensitive": true 6420 } 6421 }, 6422 "CART_TOTAL_REVENUE:DL": { 6423 "defaultValue": "", 6424 "storageDuration": "pageview", 6425 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 6426 "settings": { 6427 "path": "digitalData.transaction.total.transactionTotal" 6428 } 6429 }, 6430 "PREV_PAGE_NAME": { 6431 "defaultValue": "", 6432 "storageDuration": "pageview", 6433 "modulePath": "core/src/lib/dataElements/customCode.js", 6434 "settings": { 6435 "source": function(event) { 6436 var ret = s.getPreviousValue(_satellite.getVar("PAGE_NAME"), 'gpv', ''); 6437 6438if (typeof(ret) === undefined) { 6439 return ""; 6440} 6441 6442return ret; 6443} 6444 } 6445 }, 6446 "PAGENAME_FOR_TARGET_PART2": { 6447 "defaultValue": "", 6448 "storageDuration": "pageview", 6449 "modulePath": "core/src/lib/dataElements/customCode.js", 6450 "settings": { 6451 "source": function(event) { 6452 return _satellite.getVar("DETAILED_PAGENAME").split(":")[1]; 6453} 6454 } 6455 }, 6456 "PREV_SEARCH_TERM": { 6457 "defaultValue": "", 6458 "storageDuration": "pageview", 6459 "modulePath": "core/src/lib/dataElements/customCode.js", 6460 "settings": { 6461 "source": function(event) { 6462 return s.getPreviousValue(s.eVar2, 'gpv_ps', ''); 6463} 6464 } 6465 }, 6466 "CATEGORY:CA:PR:DL": { 6467 "defaultValue": "", 6468 "storageDuration": "pageview", 6469 "modulePath": "core/src/lib/dataElements/javascriptVariable.js", 6470 "settings": { 6471 "path": "digitalData.product.0.category.category" 6472 } 6473 }, 6474 "CAPTURENAVIGATION_LINK_CLICK_DETAILS": { 6475 "defaultValue": "", 6476 "storageDuration": "pageview", 6477 "modulePath": "core/src/lib/dataElements/customCode.js", 6478 "settings": { 6479 "source": function(event) { 6480 var eventName = event.detail.eventName || ""; 6481var eventLabel = event.detail.eventLabel || ""; 6482var eventDetail = event.detail.eventDetail || ""; 6483var detailedPagename = _satellite.getVar("DETAILED_PAGENAME"); 6484 6485var eventnames = [ 6486 "myproductregister", 6487 "myproductselect", 6488 "gb widget", 6489 "select edition", 6490 "lv prod overview", 6491 "nxg prod overview", 6492 "flexlogger prod overview", 6493 "crio plat category", 6494 "cdaq plat category", 6495 "pxi plat category", 6496 "measure ctrl plat category", 6497 "systemlink prod overview", 6498 "multisim prod overview", 6499 "multisim for designers prod overview", 6500 "multisim for education prod overview", 6501 "instrument studio prod overview", 6502 "teststand prod overview", 6503 "diadem prod overview", 6504 "labview communications prod overview", 6505 "crio dev guide", 6506 "dc management landing",
6507 "insightcm prod overview", 6508 "innovations trends tab", 6509 "electromech sys application", 6510 "nxg web module prod overview", 6511 "VBAI prod overview", 6512 "FPGA dev module prod overview", 6513 "real time module prod overview", 6514 "company ni corp giving", 6515 "company ni leadership", 6516 "company ni supply chain", 6517 "ni trend watch 2019", 6518 "fpga mod prod overview", 6519 "vision builder for auto inspect prod overview", 6520 "vision dev mod prod overview", 6521 "compare versions", 6522 "measurement studio prod overview", 6523 "contact us", 6524 "sw products popular download suggestions", 6525 "drivers popular download suggestions", 6526 "checkout review", 6527 "dc measurements", 6528 "continue shopping", 6529 "veristand prod overview", 6530 "popular download tile", 6531 "LabWinCVI prod overview", 6532 "innovations automotive", 6533 "online training", 6534 "niweek registration", 6535 "slash support", 6536 "systemlink asset module prod overview", 6537 "5g nr test ue solution", 6538 "test coverage wifi 6 pa fem components", 6539 "mmwave ota validation test", 6540 "aero def elec mfg test", 6541 "systemlink tdm datafinder module prod overview", 6542 "systemlink server prod overview", 6543 "systemlink test module prod overview", 6544 "hil simulator prod overview", 6545 "read more component", 6546 "elec functional test solution", 6547 "semiconductor validation", 6548 "hardware services", 6549 "hil industrial controllers", 6550 "auto hil test", 6551 "automotive adas app", 6552 "perspectives", 6553 "work with NI partner", 6554 "vehicle compute hw", 6555 "eloqua form", 6556 "homepage cta", 6557 "auto end of line test", 6558 "hil industrial controllers", 6559 "ind mach data logging", 6560 "elec test cell and connectivity", 6561 "ate systems and sw app", 6562 "future proof adas hil test", 6563 "ate sys and sw reduce time to market", 6564 "ate sys and sw onboard new hires", 6565 "education services", 6566 "download link pdp product compare", 6567 "email link pdp product compare", 6568 "search results language", 6569 "pdp compare button", 6570 "releasenoteslink", 6571 "perspective filter", 6572 "srm home cta", 6573 "continueshopupsell", 6574 "wafer level parametric test", 6575 "ADAS test autonomous vehicles", 6576 "systemlink sw products", 6577 "systemlink sw workflows", 6578 "what is systemlink server", 6579 "rffe validation", 6580 "mmwave 5g functl test", 6581 "online ordering", 6582 "powertrain batt test sys", 6583 "rf microwave components", 6584 "nfc interface test", 6585 "aerodef radar ew", 6586 "test adas sensors", 6587 "validate radar systems", 6588 "daq home", 6589 "lvtn browse products", 6590 "pcb sys level pwr test", 6591 "try product why page" 6592]; 6593 6594if (eventLabel === "") { 6595 return ""; 6596} else if (/pdp carousel|license type|swpdp carousel|sort by|select options|chat widget a|chat widget b|pre chat form|contact sales|chat/.test(eventName)) { 6597 return eventName + ":" + detailedPagename.split(":").join("_") + ":" + eventLabel; 6598} else if (eventName === "event carousel" && eventDetail !== "") { 6599 return eventName + ":" + eventDetail + ":" + eventLabel; 6600} else if (eventnames.indexOf(eventName) > -1) { 6601 return eventName + ":" + eventLabel; 6602} else { 6603 return eventLabel; 6604} 6605} 6606 } 6607 } 6608 }, 6609 "extensions": { 6610 "adobe-mcid": { 6611 "displayName": "Experience Cloud ID Service", 6612 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP31a59fd25d824db7be52972a70e94c1c/", 6613 "settings": { 6614 "orgId": "B3902DB45388D9620A490D4C@AdobeOrg", 6615 "variables": [ 6616 { 6617 "name": "trackingServer", 6618 "value": "nsmetrics.ni.com" 6619 }, 6620 { 6621 "name": "trackingServerSecure", 6622 "value": "smetrics.ni.com" 6623 }, 6624 { 6625 "name": "marketingCloudServer", 6626 "value": "nsmetrics.ni.com" 6627 }, 6628 { 6629 "name": "marketingCloudServerSecure", 6630 "value": "smetrics.ni.com" 6631 } 6632 ] 6633 }, 6634 "modules": { 6635 "adobe-mcid/src/lib/actions/setCustomerIds.js": { 6636 "name": "set-customer-ids", 6637 "displayName": "Set Customer IDs", 6638 "script": function(module, exports, require, turbine) { 6639/************************************************************************* 6640 * ADOBE CONFIDENTIAL 6641 * ___________________ 6642 * 6643 * Copyright 2016 Adobe Systems Incorporated 6644 * All Rights Reserved. 6645 *
6646 * NOTICE: All information contained herein is, and remains 6647 * the property of Adobe Systems Incorporated and its suppliers, 6648 * if any. The intellectual and technical concepts contained 6649 * herein are proprietary to Adobe Systems Incorporated and its 6650 * suppliers and are protected by all applicable intellectual property 6651 * laws, including trade secret and copyright laws. 6652 * Dissemination of this information or reproduction of this material 6653 * is strictly forbidden unless prior written permission is obtained 6654 * from Adobe Systems Incorporated. 6655 **************************************************************************/ 6656'use strict'; 6657 6658var mcidInstance = require('../sharedModules/mcidInstance'); 6659var logger = turbine.logger; 6660 6661var isPopulatedString = function(val) { 6662 return typeof val === 'string' && val.length > 0; 6663}; 6664 6665/** 6666 * Formats custom ids from an array of objects to an object keyed by integration code. 6667 * @param customerIds 6668 * @returns {} 6669 */ 6670var formatForMcid = function(customerIds) { 6671 var formatted = {}; 6672 var rejected = []; 6673 6674 customerIds.forEach(function(customerId) { 6675 var integrationCode = customerId.integrationCode; 6676 var value = customerId.value; 6677 6678 if (isPopulatedString(integrationCode) && isPopulatedString(value)) { 6679 formatted[integrationCode] = { 6680 id: value 6681 }; 6682 6683 if (customerId.hasOwnProperty('authState')) { 6684 formatted[customerId.integrationCode].authState = customerId.authState; 6685 } 6686 6687 if (customerId.hasOwnProperty('hashType')) { 6688 formatted[customerId.integrationCode].hashType = customerId.hashType; 6689 } 6690 } else { 6691 rejected.push(customerId); 6692 } 6693 }); 6694 6695 if (rejected.length) { 6696 logger.warn('Rejected these customer ids: ' + JSON.stringify(rejected)); 6697 } 6698 6699 return formatted; 6700}; 6701 6702/** 6703 * Set the map of Customer IDs. customerIDs = A map of customerIDType = customerID pairs 6704 * @param {Object} settings Action settings. 6705 * @param {Object[]} settings.customerIds Array of customer ID configurations. 6706 * @param {String} settings.customerIds[].integrationCode 6707 * @param {*} settings.customerIds[].value 6708 * @param {number} [settings.customerIds[].authState] 6709 * @param {String} [settings.customerIds[].hashType] 6710 */ 6711module.exports = function(settings) { 6712 if (!mcidInstance) { 6713 logger.warn('MCID instance cannot be found. Cannot set Customer IDs.'); 6714 return; 6715 } 6716 6717 var customerIds = formatForMcid(settings.customerIds); 6718 mcidInstance.setCustomerIDs(customerIds); 6719 logger.info('Set Customer IDs: ' + JSON.stringify(customerIds)); 6720}; 6721 6722 } 6723 6724 }, 6725 "adobe-mcid/src/lib/sharedModules/mcidInstance.js": { 6726 "script": function(module, exports, require, turbine) { 6727/************************************************************************* 6728* ADOBE CONFIDENTIAL 6729* ___________________ 6730* 6731* Copyright 2016 Adobe Systems Incorporated 6732* All Rights Reserved. 6733*
6734* NOTICE: All information contained herein is, and remains 6735* the property of Adobe Systems Incorporated and its suppliers, 6736* if any. The intellectual and technical concepts contained 6737* herein are proprietary to Adobe Systems Incorporated and its 6738* suppliers and are protected by all applicable intellectual property 6739* laws, including trade secret and copyright laws. 6740* Dissemination of this information or reproduction of this material 6741* is strictly forbidden unless prior written permission is obtained 6742* from Adobe Systems Incorporated. 6743**************************************************************************/ 6744 6745'use strict'; 6746var document = require('@adobe/reactor-document'); 6747var VisitorAPI = require('../codeLibrary/VisitorAPI'); 6748var timeUnits = require('../../view/utils/timeUnits'); 6749 6750var transformArrayToObject = function(configs) { 6751 var initConfig = configs.reduce(function(obj, config) { 6752 var value = /^(true|false)$/i.test(config.value) ? JSON.parse(config.value) : config.value; 6753 6754 obj[config.name] = value; 6755 6756 return obj; 6757 }, {}); 6758 6759 return initConfig; 6760}; 6761 6762var initializeVisitorId = function(Visitor) { 6763 var extensionSettings = turbine.getExtensionSettings(); 6764 if (typeof extensionSettings.orgId !== 'string') { 6765 throw new TypeError('Org ID is not a string.'); 6766 } 6767 6768 var initConfig = transformArrayToObject(extensionSettings.variables || []); 6769 var doesOptInApply = extensionSettings.doesOptInApply; 6770 if (doesOptInApply) { 6771 if (typeof doesOptInApply === 'boolean') { 6772 initConfig['doesOptInApply'] = doesOptInApply; 6773 } else if (extensionSettings.optInCallback) { 6774 initConfig['doesOptInApply'] = extensionSettings.optInCallback; 6775 } 6776 } 6777 6778 var isOptInStorageEnabled = extensionSettings.isOptInStorageEnabled; 6779 if (isOptInStorageEnabled) { 6780 initConfig['isOptInStorageEnabled'] = isOptInStorageEnabled; 6781 } 6782 6783 var optInCookieDomain = extensionSettings.optInCookieDomain; 6784 if (optInCookieDomain) { 6785 initConfig['optInCookieDomain'] = optInCookieDomain; 6786 } 6787 6788 var optInStorageExpiry = extensionSettings.optInStorageExpiry; 6789 if (optInStorageExpiry) { 6790 var timeUnit = extensionSettings.timeUnit; 6791 if (timeUnit && timeUnits[timeUnit]) { 6792 var seconds = optInStorageExpiry * timeUnits[timeUnit]; 6793 initConfig['optInStorageExpiry'] = seconds; 6794 } 6795 } else if (isOptInStorageEnabled === true) { 6796 // default is 13 months 6797 initConfig['optInStorageExpiry'] = 13 * 30 * 24 * 3600; 6798 } 6799 6800 var previousPermissions = extensionSettings.previousPermissions; 6801 if (previousPermissions) { 6802 initConfig['previousPermissions'] = previousPermissions; 6803 } 6804 6805 var preOptInApprovals = extensionSettings.preOptInApprovals; 6806 if (preOptInApprovals) { 6807 initConfig['preOptInApprovals'] = preOptInApprovals; 6808 } else { 6809 var preOptInApprovalInput = extensionSettings.preOptInApprovalInput; 6810 if (preOptInApprovalInput) { 6811 initConfig['preOptInApprovals'] = preOptInApprovalInput; 6812 } 6813 } 6814 6815 var isIabContext = extensionSettings.isIabContext; 6816 if (isIabContext) { 6817 initConfig['isIabContext'] = isIabContext; 6818 } 6819 6820 var instance = Visitor.getInstance(extensionSettings.orgId, initConfig); 6821 6822 turbine.logger.info('Created instance using orgId: "' + extensionSettings.orgId + '"'); 6823 turbine.logger.info('Set variables: ' + JSON.stringify(initConfig)); 6824 6825 // getMarketingCloudVisitorID is called automatically when the instance is created, but 6826 // we call it here so that we can log the ID once it has been retrieved from the server. 6827 // Calling getMarketingCloudVisitorID multiple times will not result in multiple requests 6828 // to the server. 6829 instance.getMarketingCloudVisitorID(function(id) { 6830 turbine.logger.info('Obtained Marketing Cloud Visitor Id: ' + id); 6831 }, true); 6832 6833 return instance; 6834}; 6835 6836var excludePathsMatched = function(path) { 6837 var extensionSettings = turbine.getExtensionSettings(); 6838 var pathExclusions = extensionSettings.pathExclusions || []; 6839 6840 return pathExclusions.some(function(pathExclusion) { 6841 if (pathExclusion.valueIsRegex) { 6842 return new RegExp(pathExclusion.value, 'i').test(path); 6843 } else { 6844 return pathExclusion.value === path; 6845 } 6846 }); 6847}; 6848 6849var visitorIdInstance = null; 6850 6851// Overwrite the getVisitorId exposed in Turbine. This is largely for backward compatibility
6852// since DTM supported this method on _satellite. 6853_satellite.getVisitorId = function() { return visitorIdInstance; }; 6854 6855if (excludePathsMatched(document.location.pathname)) { 6856 turbine.logger.warn('MCID library not loaded. One of the path exclusions matches the ' + 6857 'current path.'); 6858} else { 6859 visitorIdInstance = initializeVisitorId(VisitorAPI); 6860} 6861 6862module.exports = visitorIdInstance; 6863 6864 } 6865, 6866 "name": "mcid-instance", 6867 "shared": true 6868 }, 6869 "adobe-mcid/src/lib/codeLibrary/VisitorAPI.js": { 6870 "script": function(module, exports, require, turbine) { 6871/* istanbul ignore next */ 6872module.exports = function() { 6873/** 6874 * @license 6875 * Adobe Visitor API for JavaScript version: 5.5.0 6876 * Copyright 2022 Adobe, Inc. All Rights Reserved 6877 * More info available at https://marketing.adobe.com/resources/help/en_US/mcvid/ 6878 */ 6879 var e=function(){"use strict";function e(t){"@babel/helpers - typeof";return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(){return{callbacks:{},add:function(e,t){this.callbacks[e]=this.callbacks[e]||[];var n=this.callbacks[e].push(t)-1,i=this;return function(){i.callbacks[e].splice(n,1)}},execute:function(e,t){if(this.callbacks[e]){t=void 0===t?[]:t,t=t instanceof Array?t:[t];try{for(;this.callbacks[e].length;){var n=this.callbacks[e].shift();"function"==typeof n?n.apply(null,t):n instanceof Array&&n[1].apply(n[0],t)}delete this.callbacks[e]}catch(e){}}},executeAll:function(e,t){(t||e&&!U.isObjectEmpty(e))&&Object.keys(this.callbacks).forEac
6879h(function(t){var n=void 0!==e[t]?e[t]:"";this.execute(t,n)},this)},hasCallbacks:function(){return Boolean(Object.keys(this.callbacks).length)}}}function i(e,t,n){var i=null==e?void 0:e[t];return void 0===i?n:i}function r(e){for(var t=/^\d+$/,n=0,i=e.length;n<i;n++)if(!t.test(e[n]))return!1;return!0}function a(e,t){for(;e.length<t.length;)e.push("0");for(;t.length<e.length;)t.push("0")}function o(e,t){for(var n=0;n<e.length;n++){var i=parseInt(e[n],10),r=parseInt(t[n],10);if(i>r)return 1;if(r>i)return-1}return 0}function s(e,t){if(e===t)return 0;var n=e.toString().split("."),i=t.toString().split(".");return r(n.concat(i))?(a(n,i),o(n,i)):NaN}function c(e){return e===Object(e)&&0===Object.keys(e).length}function u(e){return"function"==typeof e||e instanceof Array&&e.length}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};this.log=Ie("log",e,t),this.warn=Ie("warn",e,t),this.error=Ie("error",e,t)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cookieName,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.cookies;if(!t||!i)return{get:xe,set:xe,remove:xe};var r={remove:function(){i.remove(t)},get:function(){var e=i.get(t),n={};try{n=JSON.parse(e)}catch(e){n={}}return n}
6879,set:function(e,n){n=n||{};var a=r.get(),o=Object.assign(a,e);i.set(t,JSON.stringify(o),{domain:n.optInCookieDomain||"",cookieLifetime:n.optInStorageExpiry||3419e4,secure:n.secure,sameSite:n.sameSite,expires:!0})}};return r}function f(e){this.name=this.constructor.name,this.message=e,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}function p(){function e(e,t){var n=Ae(e);return n.length?n.every(function(e){return!!t[e]}):Oe(t)}function t(){E(M),k(de.COMPLETE),S(C.status,C.permissions),s&&_.set(C.permissions,{optInCookieDomain:c,optInStorageExpiry:u,secure:f,sameSite:p}),I.execute(He)}function n(e){return function(n,i){if(!Me(n))throw new Error("[OptIn] Invalid category(-ies). Please use the `OptIn.Categories` enum.");return k(de.CHANGED),Object.assign(M,ke(Ae(n),e)),i||t(),C}}var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.doesOptInApply,a=i.previousPermissions,o=i.preOptInApprovals,s=i.isOptInStorageEnabled,c=i.optInCookieDomain,u=i.optInStorageExpiry,l=i.isIabContext,f=i.secureCookie,p=i.sameSiteCookie,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=g.cookies,h=Ne(a);Fe(h,"Invalid `previousPermissions`!"),Fe(o,"Invalid `preOptInApprovals`!");var _=d({cookieName:"adobeujs-optin"},{cookies:m}),C=this,S=le(C),I=_e(),v=Le(h),D=Le(o),y=s?_.get():{},b={},A=function(e,t){return Pe(e)||t&&Pe(t)?de.COMPLETE:de.PENDING}(v,y),O=function(e,t,n){var i=ke(he,!r);return r?Object.assign({},i,e,t,n):i}(D,v,y),M=Ee(O),k=function(e){return A=e},E=function(e){return O=e};C.deny=n(!1),C.approve=n(!0),C.denyAll=C.deny.bind(C,he),C.approveAll=C.approve.bind(C,he),C.isApproved=function(t){return e(t,C.permissions)},C.isPreApproved=function(t){return e(t,D)},C.fetchPermissions=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?C.on(de.COMPLETE,e):xe;return!r||r&&C.isComplete||!!o?e(C.permissions):t||I.add(He,function(){return e(C.permissions)}),n},C.complete=function(){C.status===de.CHANGED&&t()},C.registerPlugin=function(e){if(!e||!e.name||"function"!=typeof e.onRegister)throw new Error(Be);b[e.name]||(b[e.name]=e,e.onRegister.call(e,C))},C.execute=Ue(b),C.memoizeContent=function(e){we(e)&&_.set(e,{optInCookieDomain:c,optInStorageExpiry:u,secure:f,sameSite:p})},C.getMemoizedContent=function(e){var t=_.get();if(t)return t[e]},Object.defineProperties(C,{permissions:{get:function(){return O}},status:{get:function(){return A}},Categories:{get:function(){return fe}},doesOptInApply:{get:function(){return!!r}},isPending:{get:function(){return C.status===de.PENDING}},isComplete:{get:function(){return C.status===de.COMPLETE}},__plugins:{get:function(){return Object.keys(b)}},isIabContext:{get:function(){return l}}})}function g(e,t){function n(){r=null,e.call(e,new f("The call took longer than you wanted!"))}function i(){r&&(clearTimeout(r),e.apply(e,arguments))}if(void 0===t)return e;var r=setTimeout(n,t);return i}function m(){if(window.__tcfapi)return window.__tcfapi;var e=window;if(e===window.top)return void ye.error("__tcfapi not found");for(var t;!t;){e=e.parent;try{e.frames.__tcfapiLocator&&(t=e)}catch(e){}if(e===window.top)break}if(!t)return void ye.error("__tcfapi not found");var n={};return window.__tcfapi=function(e,i,r,a){var o=Math.random()+"",s={__tcfapiCall:{command:e,parameter:a,version:i,callId:o}};n[o]=r,t.postMessage(s,"*")},window.addEventListener("message",function(e){var t=e.data;if("string"==typeof t)try{t=JSON.parse(e.data)}catch(e){}if(t.__tcfapiReturn){var i=t.__tcfapiReturn;"function"==typeof n[i.callId]&&(n[i.callId](i.returnValue,i.success),delete n[i.callId])}},!1),window.__tcfapi}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=!0===e.vendor.consents[t],r=n.every(function(t){return!0===e.purpose.consents[t]});return i&&r}function _(){var e=this;e.name="iabPlugin",e.version="0.0.2";var t,n=_e(),i={transparencyAndConsentData:null},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i[e]=t};e.fetchConsentData=function(e){var t=e.callback,n=e.timeout,i=g(t,n);a({callback:i})},e.isApproved=function(e){var t=e.callback,n=e.category,r=e.timeout;if(i.transparencyAndConsentData)return t(null,h(i.transparencyAndConsentData,pe[n],ge[n]));var o=g(function(e,i){t(e,h(i,pe[n],ge[n]))},r);a({category:n,callback:o})},e.onRegister=function(n){t=n;var i=Object.keys(pe),r=function(e,t){!e&&t&&(i.forEach(function(e){var i=h(t,pe[e],ge[e]);n[i?"approve":"deny"](e,!0)}),n.complete())};e.fetchConsentData({callback:r})};var a=function(e){var a=e.callback;if(i.transparencyAndConsentData)return a(null,i.transparencyAndConsentData);n.add("FETCH_CONSENT_DATA",a),o(function(e,a){if(a){var o=Ee(e),s=t.getMemoizedContent("iabConsentHash"),c=De(o.tcString).toString(32);o.consentString=e.tcString,o.hasConsentChangedSinceLastCmpPull=s!==c,r("transparencyAndConsentData",o),t.memoizeContent({iabConsentHash:c})}n.execute("FETCH_CONSENT_DATA",[null,i.transparencyAndConsentData])})},o=function(e){var t=Ve(pe),n=m();"function"==typeof n&&n("getTCData",2,e,t)}}var C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};Object.assign=Object.assign||function(e){for(var t,n,i=1;i<arguments.length;++i){n=arguments[i];for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e};
6879var S,I,v={HANDSHAKE:"HANDSHAKE",GETSTATE:"GETSTATE",PARENTSTATE:"PARENTSTATE"},D={MCMID:"MCMID",MCAID:"MCAID",MCAAMB:"MCAAMB",MCAAMLH:"MCAAMLH",MCOPTOUT:"MCOPTOUT",CUSTOMERIDS:"CUSTOMERIDS"},y={MCMID:"getMarketingCloudVisitorID",MCAID:"getAnalyticsVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",ALLFIELDS:"getVisitorValues"},b={CUSTOMERIDS:"getCustomerIDs"},A={MCMID:"getMarketingCloudVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",MCAID:"getAnalyticsVisitorID",CUSTOMERIDS:"getCustomerIDs",ALLFIELDS:"getVisitorValues"},O={MC:"MCMID",A:"MCAID",AAM:"MCAAMB"},M={MCMID:"MCMID",MCOPTOUT:"MCOPTOUT",MCAID:"MCAID",MCAAMLH:"MCAAMLH",MCAAMB:"MCAAMB"},k={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2},E={GLOBAL:"global"},T={LAX:"Lax",STRICT:"Strict",NONE:"None"},L={MESSAGES:v,STATE_KEYS_MAP:D,ASYNC_API_MAP:y,SYNC_API_MAP:b,ALL_APIS:A,FIELDGROUP_TO_FIELD:O,FIELDS:M,AUTH_STATE:k,OPT_OUT:E,SAME_SITE_VALUES:T},P=L.STATE_KEYS_MAP,R=function(e){function t(){}function n(t,n){var i=this;return function(){var r=e(0,t),a={};return a[t]=r,i.setStateAndPublish(a),n(r),r}}this.getMarketingCloudVisitorID=function(e){e=e||t;var i=this.findField(P.MCMID,e),r=n.call(this,P.MCMID,e);return void 0!==i?i:r()},this.getVisitorValues=function(e){this.getMarketingCloudVisitorID(function(t){e({MCMID:t})})}},w=L.MESSAGES,x=L.ASYNC_API_MAP,N=L.SYNC_API_MAP,F=function(){function e(){}function t(e,t){var n=this;return function(){return n.callbackRegistry.add(e,t),n.messageParent(w.GETSTATE),""}}function n(n){this[x[n]]=function(i){i=i||e;var r=this.findField(n,i),a=t.call(this,n,i);return void 0!==r?r:a()}}function i(t){this[N[t]]=function(){return this.findField(t,e)||{}}}Object.keys(x).forEach(n,this),Object.keys(N).forEach(i,this)},j=L.ASYNC_API_MAP,V=function(){Object.keys(j).forEach(function(e){this[j[e]]=function(t){this.callbackRegistry.add(e,t)}},this)},U=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(t,n){n.isObjectEmpty=function(e){return e===Object(e)&&0===Object.keys(e).length},n.isValueEmpty=function(e){return""===e||n.isObjectEmpty(e)};var i=function(){var e=navigator.appName,t=navigator.userAgent;return"Microsoft Internet Explorer"===e||t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0&&t.indexOf("Windows NT 6")>=0};n.getIeVersion=function(){return document.documentMode?document.documentMode:i()?7:null},n.isFirefox=function(e){return!!/Firefox\/([0-9\.]+)(?:\s|$)/.test(e||window.navigator.userAgent)},n.encodeAndBuildRequest=function(e,t){return e.map(encodeURIComponent).join(t)},n.isObject=function(t){return null!==t&&"object"===e(t)&&!1===Array.isArray(t)},n.defineGlobalNamespace=function(){return window.adobe=n.isObject(window.adobe)?window.adobe:{},window.adobe},n.pluck=function(e,t){return t.reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},Object.create(null))},n.parseOptOut=function(e,t,n){t||(t=n,e.d_optout&&e.d_optout instanceof Array&&(t=e.d_optout.join(",")));var i=parseInt(e.d_ottl,10);return isNaN(i)&&(i=7200),{optOut:t,d_ottl:i}},n.normalizeBoolean=function(e){var t=e;return"true"===e?t=!0:"false"===e&&(t=!1),t}}),H=(U.isObjectEmpty,U.isValueEmpty,U.getIeVersion,U.isFirefox,U.encodeAndBuildRequest,U.isObject,U.defineGlobalNamespace,U.pluck,U.parseOptOut,U.normalizeBoolean,n),B=L.MESSAGES,G={0:"prefix",1:"orgID",2:"state"},Y=function(e,t){this.parse=function(e){try{var t={};return e.data.split("|").forEach(function(e,n){if(void 0!==e){t[G[n]]=2!==n?e:JSON.parse(e)}}),t}catch(e){}},this.isInvalid=function(n){var i=this.parse(n);if(!i||Object.keys(i).length<2)return!0;var r=e!==i.orgID,a=!t||n.origin!==t,o=-1===Object.keys(B).indexOf(i.prefix);return r||a||o},this.send=function(n,i,r){var a=i+"|"+e;r&&r===Object(r)&&(a+="|"+JSON.stringify(r));try{n.postMessage(a,t)}catch(e){}}},q=L.MESSAGES,W=function(e,t,n,i){function r(e){Object.assign(p,e)}function a(e){Object.assign(p.state,e),Object.assign(p.state.ALLFIELDS,e),p.callbackRegistry.executeAll(p.state)}function o(e){if(!h.isInvalid(e)){m=!1;var t=h.parse(e);p.setStateAndPublish(t.state)}}function s(e){!m&&g&&(m=!0,h.send(i,e))}function c(){r(new R(n._generateID)),p.getMarketingCloudVisitorID(),p.callbackRegistry.executeAll(p.state,!0),C.removeEventListener("message",u)}function u(e){if(!h.isInvalid(e)){var t=h.parse(e);m=!1,C.clearTimeout(p._handshakeTimeout),C.removeEventListener("message",u),r(new F(p)),C.addEventListener("message",o),p.setStateAndPublish(t.state),p.callbackRegistry.hasCallbacks()&&s(q.GETSTATE)}}function l(){g&&postMessage?(C.addEventListener("message",u),s(q.HANDSHAKE),p._handshakeTimeout=setTimeout(c,250)):c()}function d(){C.s_c_in||(C.s_c_il=[],C.s_c_in=0),p._c="Visitor",p._il=C.s_c_il,p._in=C.s_c_in,p._il[p._in]=p,C.s_c_in++}function f(){function e(e){0!==e.indexOf("_")&&"function"==typeof n[e]&&(p[e]=function(){})}
6879Object.keys(n).forEach(e),p.getSupplementalDataID=n.getSupplementalDataID,p.isAllowed=function(){return!0}}var p=this,g=t.whitelistParentDomain;p.state={ALLFIELDS:{}},p.version=n.version,p.marketingCloudOrgID=e,p.cookieDomain=n.cookieDomain||"",p._instanceType="child";var m=!1,h=new Y(e,g);p.callbackRegistry=H(),p.init=function(){d(),f(),r(new V(p)),l()},p.findField=function(e,t){if(void 0!==p.state[e])return t(p.state[e]),p.state[e]},p.messageParent=s,p.setStateAndPublish=a},X=L.MESSAGES,K=L.ALL_APIS,J=L.ASYNC_API_MAP,z=L.FIELDGROUP_TO_FIELD,Q=function(e,t){function n(){var t={};return Object.keys(K).forEach(function(n){var i=K[n],r=e[i]();U.isValueEmpty(r)||(t[n]=r)}),t}function i(){var t=[];return e._loading&&Object.keys(e._loading).forEach(function(n){if(e._loading[n]){var i=z[n];t.push(i)}}),t.length?t:null}function r(t){return function n(r){var a=i();if(a){var o=J[a[0]];e[o](n,!0)}else t()}}function a(e,i){var r=n();t.send(e,i,r)}function o(e){c(e),a(e,X.HANDSHAKE)}function s(e){r(function(){a(e,X.PARENTSTATE)})()}function c(n){function i(i){r.call(e,i),t.send(n,X.PARENTSTATE,{CUSTOMERIDS:e.getCustomerIDs()})}var r=e.setCustomerIDs;e.setCustomerIDs=i}return function(e){if(!t.isInvalid(e)){(t.parse(e).prefix===X.HANDSHAKE?o:s)(e.source)}}},$=function(e,t){function n(e){return function(n){i[e]=n,r++,r===a&&t(i)}}var i={},r=0,a=Object.keys(e).length;Object.keys(e).forEach(function(t){var i=e[t];if(i.fn){var r=i.args||[];r.unshift(n(t)),i.fn.apply(i.context||null,r)}})},Z={get:function(e){e=encodeURIComponent(e);var t=(";"+document.cookie).split(" ").join(";"),n=t.indexOf(";"+e+"="),i=n<0?n:t.indexOf(";",n+1);return n<0?"":decodeURIComponent(t.substring(n+2+e.length,i<0?t.length:i))},set:function(e,t,n){var r=i(n,"cookieLifetime"),a=i(n,"expires"),o=i(n,"domain"),s=i(n,"secure"),c=i(n,"sameSite"),u=s?"Secure":"",l=c?"SameSite="+c+";":"";if(a&&"SESSION"!==r&&"NONE"!==r){var d=""!==t?parseInt(r||0,10):-60;if(d)a=new Date,a.setTime(a.getTime()+1e3*d);else if(1===a){a=new Date;var f=a.getYear();a.setYear(f+2+(f<1900?1900:0))}}else a=0;return e&&"NONE"!==r?(document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+"; path=/;"+(a?" expires="+a.toGMTString()+";":"")+(o?" domain="+o+";":"")+l+u,this.get(e)===t):0},remove:function(e,t){var n=i(t,"domain");n=n?" domain="+n+";":"";var r=i(t,"secure"),a=i(t,"sameSite"),o=r?"Secure":"",s=a?"SameSite="+a+";":"";document.cookie=encodeURIComponent(e)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+n+s+o}},ee=function(e,t){var n;!e&&C.location&&(e=C.location.hostname),n=e;var i,r=n.split("."),a=t||{};for(i=r.length-2;i>=0;i--)if(a.domain=r.slice(i).join("."),Z.set("TEST_AMCV_COOKIE_WRITE","cookie",a))return Z.remove("TEST_AMCV_COOKIE_WRITE",a),a.domain;return""},te={compare:s,isLessThan:function(e,t){return s(e,t)<0},areVersionsDifferent:function(e,t){return 0!==s(e,t)},isGreaterThan:function(e,t){return s(e,t)>0},isEqual:function(e,t){return 0===s(e,t)}},ne=!!C.postMessage,ie={postMessage:function(e,t,n){var i=1;t&&(ne?n.postMessage(e,t.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):t&&(n.location=t.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+e))},receiveMessage:function(e,t){var n;try{ne&&(e&&(n=function(n){if("string"==typeof t&&n.origin!==t||"[object Function]"===Object.prototype.toString.call(t)&&!1===t(n.origin))return!1;e(n)}),C.addEventListener?C[e?"addEventListener":"removeEventListener"]("message",n):C[e?"attachEvent":"detachEvent"]("onmessage",n))}catch(e){}}},re=function(e){var t,n,i="0123456789",r="",a="",o=8,s=10,c=10,u=""+Date.now(),l=u.substr(-6).split("").reverse("").join("");if(1==e){for(i+="ABCDEF",t=0;16>t;t++)n=Math.floor(Math.random()*o),4>t&&l[t]<o&&(n=+l[t]),r+=i.substring(n,n+1),n=Math.floor(Math.random()*o),a+=i.substring(n,n+1),o=16;return r+"-"+a}for(t=0;19>t;t++)n=Math.floor(Math.random()*s),6>t&&l[t]<s?(r+=l[t],n=l[t]):r+=i.substring(n,n+1),0===t&&9==n?s=3:(1==t||2==t)&&10!=s&&2>n?s=10:2<t&&(s=10),n=Math.floor(Math.random()*c),a+=i.substring(n,n+1),0===t&&9==n?c=3:(1==t||2==t)&&10!=c&&2>n?c=10:2<t&&(c=10);return r+a},ae=function(e,t){return{corsMetadata:function(){var e="none",t=!0;return"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?e="XMLHttpRequest":"undefined"!=typeof XDomainRequest&&XDomainRequest===Object(XDomainRequest)&&(t=!1),Object.prototype.toString.call(C.HTMLElement).indexOf("Constructor")>
68790&&(t=!1)),{corsType:e,corsCookiesEnabled:t}}(),getCORSInstance:function(){return"none"===this.corsMetadata.corsType?null:new C[this.corsMetadata.corsType]},fireCORS:function(t,n,i){function r(e){var n;try{if((n=JSON.parse(e))!==Object(n))return void a.handleCORSError(t,null,"Response is not JSON")}catch(e){return void a.handleCORSError(t,e,"Error parsing response as JSON")}try{for(var i=t.callback,r=C,o=0;o<i.length;o++)r=r[i[o]];r(n)}catch(e){a.handleCORSError(t,e,"Error forming callback function")}}var a=this;n&&(t.loadErrorHandler=n);try{var o=this.getCORSInstance();o.open("get",t.corsUrl+"&ts="+(new Date).getTime(),!0),"XMLHttpRequest"===this.corsMetadata.corsType&&(o.withCredentials=!0,o.timeout=e.loadTimeout,o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.onreadystatechange=function(){4===this.readyState&&200===this.status&&r(this.responseText)}),o.onerror=function(e){a.handleCORSError(t,e,"onerror")},o.ontimeout=function(e){a.handleCORSError(t,e,"ontimeout")},o.send(),e._log.requests.push(t.corsUrl)}catch(e){this.handleCORSError(t,e,"try-catch")}},handleCORSError:function(t,n,i){e.CORSErrors.push({corsData:t,error:n,description:i}),t.loadErrorHandler&&("ontimeout"===i?t.loadErrorHandler(!0):t.loadErrorHandler(!1))}}},oe={POST_MESSAGE_ENABLED:!!C.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,FIRST_PARTY_SERVER_COOKIE:"s_ecid"},se=function(e,t){var n=C.document;return{THROTTLE_START:3e4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:null,onPagePixels:[],iframeHost:null,getIframeHost:function(e){if("string"==typeof e){var t=e.split("/");return t[0]+"//"+t[2]}},subdomain:null,url:null,getUrl:function(){var t,i="http://fast.",r="?d_nsid="+e.idSyncContainerID+"#"+encodeURIComponent(n.location.origin);return this.subdomain||(this.subdomain="nosubdomainreturned"),e.loadSSL&&(i=e.idSyncSSLUseAkamai?"https://fast.":"https://"),t=i+this.subdomain+".demdex.net/dest5.html"+r,this.iframeHost=this.getIframeHost(t),this.id="destination_publishing_iframe_"+this.subdomain+"_"+e.idSyncContainerID,t},checkDPIframeSrc:function(){var t="?d_nsid="+e.idSyncContainerID+"#"+encodeURIComponent(n.location.href);"string"==typeof e.dpIframeSrc&&e.dpIframeSrc.length&&(this.id="destination_publishing_iframe_"+(e._subdomain||this.subdomain||(new Date).getTime())+"_"+e.idSyncContainerID,this.iframeHost=this.getIframeHost(e.dpIframeSrc),this.url=e.dpIframeSrc+t)},idCallNotProcesssed:null,doAttachIframe:!1,startedAttachingIframe:!1,iframeHasLoaded:null,iframeIdChanged:null,newIframeCreated:null,originalIframeHasLoadedAlready:null,iframeLoadedCallbacks:[],regionChanged:!1,timesRegionChanged:0,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:oe.POST_MESSAGE_ENABLED?null:100,onPageDestinationsFired:[],jsonForComparison:[],jsonDuplicates:[],jsonWaiting:[],jsonProcessed:[],canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,readyToAttachIframePreliminary:function(){return!(e.idSyncDisableSyncs||e.disableIdSyncs||e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies||e.disableThirdPartyCalls)},readyToAttachIframe:function(){return this.readyToAttachIframePreliminary()&&(this.doAttachIframe||e._doAttachIframe)&&(this.subdomain&&"nosubdomainreturned"!==this.subdomain||e._subdomain)&&this.url&&!this.startedAttachingIframe},attachIframe:function(){function e(){r=n.createElement("iframe"),r.sandbox="allow-scripts allow-same-origin",r.title="Adobe ID Syncing iFrame",r.id=i.id,r.name=i.id+"_name",r.style.cssText="display: none; width: 0; height: 0;",r.src=i.url,i.newIframeCreated=!0,t(),n.body.appendChild(r)}function t(e){r.addEventListener("load",function(){r.className="aamIframeLoaded",i.iframeHasLoaded=!0,i.fireIframeLoadedCallbacks(e),i.requestToProcess()})}this.startedAttachingIframe=!0;var i=this,r=n.getElementById(this.id);r?"IFRAME"!==r.nodeName?(this.id+="_2",this.iframeIdChanged=!0,e()):(this.newIframeCreated=!1,"aamIframeLoaded"!==r.className?(this.originalIframeHasLoadedAlready=!1,t("The destination publishing iframe already exists from a different library, but hadn't loaded yet.")):(this.originalIframeHasLoadedAlready=!0,this.iframeHasLoaded=!0,this.iframe=r,this.fireIframeLoadedCallbacks("The destination publishing iframe already exists from a different library, and had loaded alresady."),this.requestToProcess())):e(),this.iframe=r},fireIframeLoadedCallbacks:function(e){this.iframeLoadedCallbacks.forEach(function(t){"function"==typeof t&&t({message:e||"The destination publishing iframe was attached and loaded successfully."})}),this.iframeLoadedCallbacks=[]},requestToProcess:function(t){function n(){r.jsonForComparison.push(t),r.jsonWaiting.push(t),r.processSyncOnPage(t)}
6879var i,r=this;if(t===Object(t)&&t.ibs)if(i=JSON.stringify(t.ibs||[]),this.jsonForComparison.length){var a,o,s,c=!1;for(a=0,o=this.jsonForComparison.length;a<o;a++)if(s=this.jsonForComparison[a],i===JSON.stringify(s.ibs||[])){c=!0;break}c?this.jsonDuplicates.push(t):n()}else n();if((this.receivedThirdPartyCookiesNotification||!oe.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var u=this.jsonWaiting.shift();this.process(u),this.requestToProcess()}e.idSyncDisableSyncs||e.disableIdSyncs||!this.iframeHasLoaded||!this.messages.length||this.sendingMessages||(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){r.messageSendingInterval=oe.POST_MESSAGE_ENABLED?null:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},getRegionAndCheckIfChanged:function(t,n){var i=e._getField("MCAAMLH"),r=t.d_region||t.dcs_region;return i?r&&(e._setFieldExpire("MCAAMLH",n),e._setField("MCAAMLH",r),parseInt(i,10)!==r&&(this.regionChanged=!0,this.timesRegionChanged++,e._setField("MCSYNCSOP",""),e._setField("MCSYNCS",""),i=r)):(i=r)&&(e._setFieldExpire("MCAAMLH",n),e._setField("MCAAMLH",i)),i||(i=""),i},processSyncOnPage:function(e){var t,n,i,r;if((t=e.ibs)&&t instanceof Array&&(n=t.length))for(i=0;i<n;i++)r=t[i],r.syncOnPage&&this.checkFirstPartyCookie(r,"","syncOnPage")},process:function(e){var t,n,i,r,a,o=encodeURIComponent,s=!1;if((t=e.ibs)&&t instanceof Array&&(n=t.length))for(s=!0,i=0;i<n;i++)r=t[i],a=[o("ibs"),o(r.id||""),o(r.tag||""),U.encodeAndBuildRequest(r.url||[],","),o(r.ttl||""),"","",r.fireURLSync?"true":"false"],r.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(a.join("|")):r.fireURLSync&&this.checkFirstPartyCookie(r,a.join("|")));s&&this.jsonProcessed.push(e)},checkFirstPartyCookie:function(t,n,i){var r="syncOnPage"===i,a=r?"MCSYNCSOP":"MCSYNCS";e._readVisitor();var o,s,c=e._getField(a),u=!1,l=!1,d=Math.ceil((new Date).getTime()/oe.MILLIS_PER_DAY);c?(o=c.split("*"),s=this.pruneSyncData(o,t.id,d),u=s.dataPresent,l=s.dataValid,u&&l||this.fireSync(r,t,n,o,a,d)):(o=[],this.fireSync(r,t,n,o,a,d))},pruneSyncData:function(e,t,n){var i,r,a,o=!1,s=!1;for(r=0;r<e.length;r++)i=e[r],a=parseInt(i.split("-")[1],10),i.match("^"+t+"-")?(o=!0,n<a?s=!0:(e.splice(r,1),r--)):n>=a&&(e.splice(r,1),r--);return{dataPresent:o,dataValid:s}},manageSyncsSize:function(e){if(e.join("*").length>this.MAX_SYNCS_LENGTH)for(e.sort(function(e,t){return parseInt(e.split("-")[1],10)-parseInt(t.split("-")[1],10)});e.join("*").length>this.MAX_SYNCS_LENGTH;)e.shift()},fireSync:function(t,n,i,r,a,o){var s=this;if(t){if("img"===n.tag){var c,u,l,d,f=n.url,p=e.loadSSL?"https:":"http:";for(c=0,u=f.length;c<u;c++){l=f[c],d=/^\/\//.test(l);var g=new Image;g.addEventListener("load",function(t,n,i,r){return function(){s.onPagePixels[t]=null,e._readVisitor();var o,c=e._getField(a),u=[];if(c){o=c.split("*");var l,d,f;for(l=0,d=o.length;l<d;l++)f=o[l],f.match("^"+n.id+"-")||u.push(f)}s.setSyncTrackingData(u,n,i,r)}}(this.onPagePixels.length,n,a,o)),g.src=(d?p:"")+l,this.onPagePixels.push(g)}}}else this.addMessage(i),this.setSyncTrackingData(r,n,a,o)},addMessage:function(t){var n=encodeURIComponent,i=n(e._enableErrorReporting?"---destpub-debug---":"---destpub---");this.messages.push((oe.POST_MESSAGE_ENABLED?"":i)+t)},setSyncTrackingData:function(t,n,i,r){t.push(n.id+"-"+(r+Math.ceil(n.ttl/60/24))),this.manageSyncsSize(t),e._setField(i,t.join("*"))},sendMessages:function(){var e,t=this,n="",i=encodeURIComponent;this.regionChanged&&(n=i("---destpub-clear-dextp---"),this.regionChanged=!1),this.messages.length?oe.POST_MESSAGE_ENABLED?(e=n+i("---destpub-combined---")+this.messages.join("%01"),this.postMessage(e),this.messages=[],this.sendingMessages=!1):(e=this.messages.shift(),this.postMessage(n+e),setTimeout(function(){t.sendMessages()},this.messageSendingInterval)):this.sendingMessages=!1},postMessage:function(e){ie.postMessage(e,this.url,this.iframe.contentWindow),this.messagesPosted.push(e)},receiveMessage:function(e){var t,n=/^---destpub-to-parent---/;"string"==typeof e&&n.test(e)&&(t=e.replace(n,"").split("|"),"canSetThirdPartyCookies"===t[0]&&(this.canSetThirdPartyCookies="true"===t[1],this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(e))},processIDCallData:function(i){(null==this.url||i.subdomain&&"nosubdomainreturned"===this.subdomain)&&("string"==typeof e._subdomain&&e._subdomain.length?this.subdomain=e._subdomain:this.subdomain=i.subdomain||"",this.url=this.getUrl()),i.ibs instanceof Array&&i.ibs.length&&(this.doAttachIframe=!0),this.readyToAttachIframe()&&(e.idSyncAttachIframeOnWindowLoad?(t.windowLoaded||"complete"===n.readyState||"loaded"===n.readyState)&&this.attachIframe():this.attachIframeASAP()),"function"==typeof e.idSyncIDCallResult?e.idSyncIDCallResult(i):this.requestToProcess(i),"function"==typeof e.idSyncAfterIDCallResult&&e.idSyncAfterIDCallResult(i)},canMakeSyncIDCall:function(t,n){return e._forceSyncIDCall||!t||n-t>oe.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function e(){t.startedAttachingIframe||(n.body?t.attachIframe():setTimeout(e,3
68790))}var t=this;e()}}},ce={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},doesOptInApply:{type:"boolean"},disableThirdPartyCalls:{type:"boolean"},discardTrackingServerECID:{type:"boolean"},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{type:"boolean"},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{type:"boolean"},disableThirdPartyCookies:{type:"boolean"},idSyncDisableSyncs:{type:"boolean"},disableIdSyncs:{type:"boolean"},idSyncIDCallResult:{},idSyncSSLUseAkamai:{type:"boolean"},isCoopSafe:{type:"boolean"},isIabContext:{type:"boolean"},isOptInStorageEnabled:{type:"boolean"},loadSSL:{type:"boolean"},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},optInCookieDomain:{},optInStorageExpiry:{},overwriteCrossDomainMCIDAndAID:{type:"boolean"},preOptInApprovals:{},previousPermissions:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},secureCookie:{type:"boolean"},sameSiteCookie:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},useLocalStorage:{type:"boolean"},whitelistIframeDomains:{},whitelistParentDomain:{}},ue={getConfigNames:function(){return Object.keys(ce)},getConfigs:function(){return ce},normalizeConfig:function(e,t){return ce[e]&&"boolean"===ce[e].type?"function"!=typeof t?t:t():t}},le=function(e){var t={};return e.on=function(e,n,i){if(!n||"function"!=typeof n)throw new Error("[ON] Callback should be a function.");t.hasOwnProperty(e)||(t[e]=[]);var r=t[e].push({callback:n,context:i})-1;return function(){t[e].splice(r,1),t[e].length||delete t[e]}},e.off=function(e,n){t.hasOwnProperty(e)&&(t[e]=t[e].filter(function(e){if(e.callback!==n)return e}))},e.publish=function(e){if(t.hasOwnProperty(e)){var n=[].slice.call(arguments,1);t[e].slice(0).forEach(function(e){e.callback.apply(e.context,n)})}},e.publish},de={PENDING:"pending",CHANGED:"changed",COMPLETE:"complete"},fe={AAM:"aam",ADCLOUD:"adcloud",ANALYTICS:"aa",CAMPAIGN:"campaign",ECID:"ecid",LIVEFYRE:"livefyre",TARGET:"target",MEDIA_ANALYTICS:"mediaaa"},pe=(S={},t(S,fe.AAM,565),t(S,fe.ECID,565),S),ge=(I={},t(I,fe.AAM,[1,10]),t(I,fe.ECID,[1,10]),I),me=["videoaa","iabConsentHash"],he=function(e){return Object.keys(e).map(function(t){return e[t]})}(fe),_e=function(){var e={};return e.callbacks=Object.create(null),e.add=function(t,n){if(!u(n))throw new Error("[callbackRegistryFactory] Make sure callback is a function or an array of functions.");e.callbacks[t]=e.callbacks[t]||[];var i=e.callbacks[t].push(n)-1;return function(){e.callbacks[t].splice(i,1)}},e.execute=function(t,n){if(e.callbacks[t]){n=void 0===n?[]:n,n=n instanceof Array?n:[n];try{for(;e.callbacks[t].length;){var i=e.callbacks[t].shift();"function"==typeof i?i.apply(null,n):i instanceof Array&&i[1].apply(i[0],n)}delete e.callbacks[t]}catch(e){}}},e.executeAll=function(t,n){(n||t&&!c(t))&&Object.keys(e.callbacks).forEac
6879h(function(n){var i=void 0!==t[n]?t[n]:"";e.execute(n,i)},e)},e.hasCallbacks=function(){return Boolean(Object.keys(e.callbacks).length)},e},Ce=function(){},Se=function(e){var t=window,n=t.console;return!!n&&"function"==typeof n[e]},Ie=function(e,t,n){return n()?function(){if(Se(e)){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];console[e].apply(console,[t].concat(i))}}:Ce},ve=l,De=function(){for(var e=[],t=0;t<256;t++){for(var n=t,i=0;i<8;i++)n=1&n?3988292384^n>>>1:n>>>1;e.push(n)}return function(t,n){t=unescape(encodeURIComponent(t)),n||(n=0),n^=-1;for(var i=0;i<t.length;i++){var r=255&(n^t.charCodeAt(i));n=n>>>8^e[r]}return(n^=-1)>>>0}}(),ye=new ve("[ADOBE OPT-IN]"),be=function(t,n){return e(t)===n},Ae=function(e,t){return e instanceof Array?e:be(e,"string")?[e]:t||[]},Oe=function(e){var t=Object.keys(e);return!!t.length&&t.every(function(t){return!0===e[t]})},Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!e||Te(e))&&Ae(e).every(function(e){return he.indexOf(e)>-1||t&&me.indexOf(e)>-1})},ke=function(e,t){return e.reduce(function(e,n){return e[n]=t,e},{})},Ee=function(e){return JSON.parse(JSON.stringify(e))},Te=function(e){return"[object Array]"===Object.prototype.toString.call(e)&&!e.length},Le=function(e){if(we(e))return e;try{return JSON.parse(e)}catch(e){return{}}},Pe=function(e){return void 0===e||(we(e)?Me(Object.keys(e),!0):Re(e))},Re=function(e){try{var t=JSON.parse(e);return!!e&&be(e,"string")&&Me(Object.keys(t),!0)}catch(e){return!1}},we=function(e){return null!==e&&be(e,"object")&&!1===Array.isArray(e)},xe=function(){},Ne=function(e){return be(e,"function")?e():e},Fe=function(e,t){Pe(e)||ye.error("".concat(t))},je=function(e){return Object.keys(e).map(function(t){return e[t]})},Ve=function(e){return je(e).filter(function(e,t,n){return n.indexOf(e)===t})},Ue=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.command,i=t.params,r=void 0===i?{}:i,a=t.callback,o=void 0===a?xe:a 6880 ;if(!n||-1===n.indexOf("."))throw new Error("[OptIn.execute] Please provide a valid command.");try{var s=n.split("."),c=e[s[0]],u=s[1];if(!c||"function"!=typeof c[u])throw new Error("Make sure the plugin and API name exist.");var l=Object.assign(r,{callback:o});c[u].call(c,l)}catch(e){ye.error("[execute] Something went wrong: "+e.message)}}};f.prototype=Object.create(Error.prototype),f.prototype.constructor=f;var He="fetchPermissions",Be="[OptIn#registerPlugin] Plugin is invalid.";p.Categories=fe,p.TimeoutError=f;var Ge=Object.freeze({OptIn:p,IabPlugin:_}),Ye=function(e,t){e.publishDestinations=function(n){var i=arguments[1],r=arguments[2];try{r="function"==typeof r?r:n.callback}catch(e){r=function(){}}var a=t;if(!a.readyToAttachIframePreliminary())return void r({error:"The destination publishing iframe is disabled in the Visitor library."});if("string"==typeof n){if(!n.length)return void r({error:"subdomain is not a populated string."});if(!(i instanceof Array&&i.length))return void r({error:"messages is not a populated array."});var o=!1;if(i.forEach(function(e){"string"==typeof e&&e.length&&(a.addMessage(e),o=!0)}),!o)return void r({error:"None of the messages are populated strings."})}else{if(!U.isObject(n))return void r({error:"Invalid parameters passed."});var s=n;if("string"!=typeof(n=s.subdomain)||!n.length)return void r({error:"config.subdomain is not a populated string."});var c=s.urlDestinations;if(!(c instanceof Array&&c.length))return void r({error:"config.urlDestinations is not a populated array."});var u=[];c.forEach(function(e){U.isObject(e)&&(e.hideReferrer?e.message&&a.addMessage(e.message):u.push(e))});!function e(){u.length&&setTimeout(function(){var t=new Image,n=u.shift();t.src=n.url,a.onPageDestinationsFired.push(n),e()},100)}()}a.iframe?(r({message:"The destination publishing iframe is already attached and loaded."}),a.requestToProcess()):!e.subdomain&&e._getField("MCMID")?(a.subdomain=n,a.doAttachIframe=!0,a.url=a.getUrl(),a.readyToAttachIframe()?(a.iframeLoadedCallbacks.push(function(e){r({message:"Attempted to attach and load the destination publishing iframe through this API call. Result: "+(e.message||"no result")})}),a.attachIframe()):r({error:"Encountered a problem in attempting to attach and load the destination publishing iframe through this API call."})):a.iframeLoadedCallbacks.push(function(e){r({message:"Attempted to attach and load the destination publishing iframe through normal Visitor API processing. Result: "+(e.message||"no result")})})}},qe=function e(t){function n(e,t){return e>>>t|e<<32-t}for(var i,r,a=Math.pow,o=a(2,32),s="",c=[],u=8*t.length,l=e.h=e.h||[],d=e.k=e.k||[],f=d.length,p={},g=2;f<64;g++)if(!p[g]){for(i=0;i<313;i+=g)p[i]=g;l[f]=a(g,.5)*o|0,d[f++]=a(g,1/3)*o|0}for(t+="€";t.length%64-56;)t+="\0";for(i=0;i<t.length;i++){if((r=t.charCodeAt(i))>>8)return;c[i>>2]|=r<<(3-i)%4*8}for(c[c.length]=u/o|0,c[c.length]=u,r=0;r<c.length;){var m=c.slice(r,r+=16),h=l;for(l=l.slice(0,8),i=0;i<64;i++){var _=m[i-15],C=m[i-2],S=l[0],I=l[4],v=l[7]+(n(I,6)^n(I,11)^n(I,25))+(I&l[5]^~I&l[6])+d[i]+(m[i]=i<16?m[i]:m[i-16]+(n(_,7)^n(_,18)^_>>>3)+m[i-7]+(n(C,17)^n(C,19)^C>>>10)|0);l=[v+((n(S,2)^n(S,13)^n(S,22))+(S&l[1]^S&l[2]^l[1]&l[2]))|0].concat(l),l[4]=l[4]+v|0}for(i=0;i<8;i++)l[i]=l[i]+h[i]|0}for(i=0;i<8;i++)for(r=3;r+1;r--){var D=l[i]>>8*r&255;s+=(D<16?0:"")+D.toString(16)}return s},We=function(e,t){return"SHA-256"!==t&&"SHA256"!==t&&"sha256"!==t&&"sha-256"!==t||(e=qe(e)),e},Xe=function(e){return String(e).trim().toLowerCase()},Ke=Ge.OptIn;U.defineGlobalNamespace(),window.adobe.OptInCategories=Ke.Categories;var Je=function(t,n,i){function r(){S._customerIDsHashChanged=!1}function a(e){var t=e;return function(e){var n=e||A.location.href;try{var i=S._extractParamFromUri(n,t);if(i)return q.parsePipeDelimetedKeyValues(i)}catch(e){}}}function o(e){function t(e,t,n){e&&e.match(oe.VALID_VISITOR_ID_REGEX)&&(n===T&&(b=!0),t(e))}t(e[T],S.setMarketingCloudVisitorID,T),S._setFieldExpire(N,-1),t(e[w],S.setAnalyticsVisitorID)}function s(e){e=e||{},S._supplementalDataIDCurrent=e.supplementalDataIDCurrent||"",S._supplementalDataIDCurrentConsumed=e.supplementalDataIDCurrentConsumed||{},S._supplementalDataIDLast=e.supplementalDataIDLast||"",S._supplementalDataIDLastConsumed=e.supplementalDataIDLastConsumed||{}}function c(e){function t(e,t,n){return n=n?n+="|":n,n+=e+"="+encodeURIComponent(t)}function n(e,n){var i=n[0],r=n[1];return null!=r&&r!==F&&(e=t(i,r,e)),e}var i=e.reduce(n,"");return function(e){var t=q.getTimestampInSeconds();return e=e?e+="|":e,e+="TS="+t}(i)}function u(e){var t=e.minutesToLive,n="";return(S.idSyncDisableSyncs||S.disableIdSyncs)&&(n=n||"Error: id syncs have been disabled"),"string"==typeof e.dpid&&e.dpid.length||(n=n||"Error: config.dpid is empty"),"string"==typeof e.url&&e.url.length||(n=n||"Error: config.url is empty"),void 0===t?t=20160:(t=parseInt(t,10),(isNaN(t)||t<=0)&&(n=n||"Error: config.minutesToLive needs to be a positive number")),{error:n,ttl:t}}function l(){return!!S.configs.doesOptInApply&&!(I.optIn.isComplete&&d())}function d(){return S.configs.doesOptInApply&&S.configs.isIabContext?I.optIn.isApproved(I.optIn.Categories.ECID)&&y:I.optIn.isApproved(I.optIn.Categories.ECID)}function f(){[["getMarketingCloudVisitorID"],["setCustomerIDs",void 0],["syncIdentity",void 0],["getAnalyticsVisitorID"],["getAudienceManagerLocationHint"],["getLocationHint"],["getAudienceManagerBlob"]].forEac
6880h(function(e){var t=e[0],n=2===e.length?e[1]:"",i=S[t];S[t]=function(e){return d()&&S.isAllowed()?i.apply(S,arguments):("function"==typeof e&&S._callCallback(e,[n]),n)}})}function p(){var e=S._getAudienceManagerURLData(),t=e.url;return S._loadData(E,t,null,e)}function g(e,t){if(y=!0,e)throw new Error("[IAB plugin] : "+e);t&&t.gdprApplies&&(v=t.consentString,D=t.hasConsentChangedSinceLastCmpPull?1:0),p(),_()}function m(e,t){if(y=!0,e)throw new Error("[IAB plugin] : "+e);t.gdprApplies&&(v=t.consentString,D=t.hasConsentChangedSinceLastCmpPull?1:0),S.init(),_()}function h(){I.optIn.isComplete&&(I.optIn.isApproved(I.optIn.Categories.ECID)?S.configs.isIabContext?I.optIn.execute({command:"iabPlugin.fetchConsentData",callback:m}):(S.init(),_()):S.configs.isIabContext?I.optIn.execute({command:"iabPlugin.fetchConsentData",callback:g}):(f(),_()))}function _(){I.optIn.off("complete",h)}if(!i||i.split("").reverse().join("")!==t)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var S=this,I=window.adobe,v="",D=0,y=!1,b=!1;S.version="5.5.0";var A=C,O=A.Visitor;O.version=S.version,O.AuthState=L.AUTH_STATE,O.OptOut=L.OPT_OUT,A.s_c_in||(A.s_c_il=[],A.s_c_in=0),S._c="Visitor",S._il=A.s_c_il,S._in=A.s_c_in,S._il[S._in]=S,A.s_c_in++,S._instanceType="regular",S._log={requests:[]},S.marketingCloudOrgID=t,S.cookieName="AMCV_"+t,S.sessionCookieName="AMCVS_"+t;var M={};n&&n.secureCookie&&n.sameSiteCookie&&(M={sameSite:n.sameSiteCookie,secure:n.secureCookie}),S.cookieDomain=S.useLocalStorage?"":ee(null,M),S.loadSSL=!0,S.loadTimeout=3e4,S.CORSErrors=[],S.marketingCloudServer=S.audienceManagerServer="dpm.demdex.net",S.sdidParamExpiry=30;var k=null,E="MC",T="MCMID",P="MCIDTS",R="A",w="MCAID",x="AAM",N="MCAAMB",F="NONE",j=function(e){return!Object.prototype[e]},V=ae(S);S.FIELDS=L.FIELDS,S.cookieRead=function(e){return S.useLocalStorage?e===S.sessionCookieName?sessionStorage.getItem(e):localStorage.getItem(e):Z.get(e)},S.cookieWrite=function(e,t,n){var i=""+t;if(S.useLocalStorage)return e===S.sessionCookieName?sessionStorage.setItem(e,i):localStorage.setItem(e,i);var r=S.cookieLifetime?(""+S.cookieLifetime).toUpperCase():"",a={expires:n,domain:S.cookieDomain,cookieLifetime:r};return S.configs&&S.configs.secureCookie&&"https:"===location.protocol&&(a.secure=!0),S.configs&&S.configs.sameSiteCookie&&"https:"===location.protocol&&(a.sameSite=L.SAME_SITE_VALUES[S.configs.sameSiteCookie.toUpperCase()]||"Lax"),Z.set(e,i,a)},S.removeCookie=function(e){if(S.useLocalStorage)return e===S.sessionCookieName?sessionStorage.removeItem(e):localStorage.removeItem(e);var t={domain:S.cookieDomain};return S.configs&&S.configs.secureCookie&&"https:"===location.protocol&&(t.secure=!0),S.configs&&S.configs.sameSiteCookie&&"https:"===location.protocol&&(t.sameSite=L.SAME_SITE_VALUES[S.configs.sameSiteCookie.toUpperCase()]||"Lax"),Z.remove(e,t)},S.resetState=function(e){e?S._mergeServerState(e):s()},S._isAllowedDone=!1,S._isAllowedFlag=!1,S.isAllowed=function(){return S._isAllowedDone||(S._isAllowedDone=!0,(S.cookieRead(S.cookieName)||S.cookieWrite(S.cookieName,"T",1))&&(S._isAllowedFlag=!0)),"T"===S.cookieRead(S.cookieName)&&S.removeCookie(S.cookieName),S._isAllowedFlag},S.setMarketingCloudVisitorID=function(e){S._setMarketingCloudFields(e)},S._use1stPartyMarketingCloudServer=!1,S.getMarketingCloudVisitorID=function(e,t){S.marketingCloudServer&&S.marketingCloudServer.indexOf(".demdex.net")<0&&(S._use1stPartyMarketingCloudServer=!0);var n=S._getAudienceManagerURLData("_setMarketingCloudFields"),i=n.url;return S._getRemoteField(T,i,e,t,n)};var H=function(e,t){var n={};S.getMarketingCloudVisitorID(function(){t.forEach(function(e){n[e]=S._getField(e,!0)}),-1!==t.indexOf("MCOPTOUT")?S.isOptedOut(function(t){n.MCOPTOUT=t,e(n)},null,!0):e(n)},!0)};S.getVisitorValues=function(e,t){var n={MCMID:{fn:S.getMarketingCloudVisitorID,args:[!0],context:S},MCOPTOUT:{fn:S.isOptedOut,args:[void 0,!0],context:S},MCAID:{fn:S.getAnalyticsVisitorID,args:[!0],context:S},MCAAMLH:{fn:S.getAudienceManagerLocationHint,args:[!0],context:S},MCAAMB:{fn:S.getAudienceManagerBlob,args:[!0],context:S}},i=t&&t.length?U.pluck(n,t):n;t&&-1===t.indexOf("MCAID")?H(e,t):$(i,e)},S._currentCustomerIDs={},S._customerIDsHashChanged=!1,S._newCustomerIDsHash="",S.setCustomerIDs=function(t,n){if(!S.isOptedOut()&&t){if(!U.isObject(t)||U.isObjectEmpty(t))return!1;S._readVisitor();var i,a,o,s;for(i in t)if(j(i)&&(S._currentCustomerIDs.dataSources=S._currentCustomerIDs.dataSources||{},a=t[i],n=a.hasOwnProperty("hashType")?a.hashType:n,a))if("object"===e(a
6880)){var c={};if(a.id){if(n){if(!(s=We(Xe(a.id),n)))return;a.id=s,c.hashType=n}c.id=a.id}void 0!=a.authState&&(c.authState=a.authState),S._currentCustomerIDs.dataSources[i]=c}else if(n){if(!(s=We(Xe(a),n)))return;S._currentCustomerIDs.dataSources[i]={id:s,hashType:n}}else S._currentCustomerIDs.dataSources[i]={id:a};var u=S.getCustomerIDs(!0),l=S._getField("MCCIDH"),d="";l||(l=0);for(o in u){var f=u[o];if(!U.isObjectEmpty(f))for(i in f)j(i)&&(a=f[i],d+=(d?"|":"")+i+"|"+(a.id?a.id:"")+(a.authState?a.authState:""))}S._newCustomerIDsHash=String(S._hash(d)),S._newCustomerIDsHash!==l&&(S._customerIDsHashChanged=!0,S._mapCustomerIDs(r))}},S.syncIdentity=function(t,n){if(!S.isOptedOut()&&t){if(!U.isObject(t)||U.isObjectEmpty(t))return!1;S._readVisitor();var i,a,o,s,c;for(i in t)if(j(i)&&(S._currentCustomerIDs.nameSpaces=S._currentCustomerIDs.nameSpaces||{},a=t[i],n=a.hasOwnProperty("hashType")?a.hashType:n,a&&"object"===e(a))){var u={};if(a.id){if(n){if(!(o=We(Xe(a.id),n)))return;a.id=o,u.hashType=n}u.id=a.id}void 0!=a.authState&&(u.authState=a.authState),a.dataSource&&(S._currentCustomerIDs.dataSources=S._currentCustomerIDs.dataSources||{},s=a.dataSource,S._currentCustomerIDs.dataSources[s]=u),S._currentCustomerIDs.nameSpaces[i]=u}var l=S.getCustomerIDs(!0),d=S._getField("MCCIDH"),f="";d||(d="0");for(c in l){var p=l[c];if(!U.isObjectEmpty(p))for(i in p)j(i)&&(a=p[i],f+=(f?"|":"")+i+"|"+(a.id?a.id:"")+(a.authState?a.authState:""))}S._newCustomerIDsHash=String(S._hash(f)),S._newCustomerIDsHash!==d&&(S._customerIDsHashChanged=!0,S._mapCustomerIDs(r))}},S.getCustomerIDs=function(e){S._readVisitor();var t,n,i={dataSources:{},nameSpaces:{}},r=S._currentCustomerIDs.dataSources;for(t in r)j(t)&&(n=r[t],n.id&&(i.dataSources[t]||(i.dataSources[t]={}),i.dataSources[t].id=n.id,void 0!=n.authState?i.dataSources[t].authState=n.authState:i.dataSources[t].authState=O.AuthState.UNKNOWN,n.hashType&&(i.dataSources[t].hashType=n.hashType)));var a=S._currentCustomerIDs.nameSpaces;for(t in a)j(t)&&(n=a[t],n.id&&(i.nameSpaces[t]||(i.nameSpaces[t]={}),i.nameSpaces[t].id=n.id,void 0!=n.authState?i.nameSpaces[t].authState=n.authState:i.nameSpaces[t].authState=O.AuthState.UNKNOWN,n.hashType&&(i.nameSpaces[t].hashType=n.hashType)));return e?i:i.dataSources},S.setAnalyticsVisitorID=function(e){S._setAnalyticsFields(e)},S.getAnalyticsVisitorID=function(e,t,n){if(!q.isTrackingServerPopulated()&&!n)return S._callCallback(e,[""]),"";var i="";if(n||(i=S.getMarketingCloudVisitorID(function(t){S.getAnalyticsVisitorID(e,!0)})),i||n){var r=n?S.marketingCloudServer:S.trackingServer,a="";S.loadSSL&&(n?S.marketingCloudServerSecure&&(r=S.marketingCloudServerSecure):S.trackingServerSecure&&(r=S.trackingServerSecure));var o={};if(r){var s="http"+(S.loadSSL?"s":"")+"://"+r+"/id",c=S.configs.cookieLifetime,u="d_visid_ver="+S.version+"&mcorgid="+encodeURIComponent(S.marketingCloudOrgID)+(i?"&mid="+encodeURIComponent(i):"")+(c?"&cl="+encodeURIComponent(c):"")+(S.idSyncDisable3rdPartySyncing||S.disableThirdPartyCookies?"&d_coppa=true":""),l=["s_c_il",S._in,"_set"+(n?"MarketingCloud":"Analytics")+"Fields"];a=s+"?"+u+"&callback=s_c_il%5B"+S._in+"%5D._set"+(n?"MarketingCloud":"Analytics")+"Fields",o.corsUrl=s+"?"+u,o.callback=l}return o.url=a,S._getRemoteField(n?T:w,a,e,t,o)}return""},S.getAudienceManagerLocationHint=function(e,t){if(S.getMarketingCloudVisitorID(function(t){S.getAudienceManagerLocationHint(e,!0)})){var n=S._getField(w);if(!n&&q.isTrackingServerPopulated()&&(n=S.getAnalyticsVisitorID(function(t){S.getAudienceManagerLocationHint(e,!0)})),n||!q.isTrackingServerPopulated()){var i=S._getAudienceManagerURLData(),r=i.url;return S._getRemoteField("MCAAMLH",r,e,t,i)}}return""},S.getLocationHint=S.getAudienceManagerLocationHint,S.getAudienceManagerBlob=function(e,t){if(S.getMarketingCloudVisitorID(function(t){S.getAudienceManagerBlob(e,!0)})){var n=S._getField(w);if(!n&&q.isTrackingServerPopulated()&&(n=S.getAnalyticsVisitorID(function(t){S.getAudienceManagerBlob(e,!0)})),n||!q.isTrackingServerPopulated()){var i=S._getAudienceManagerURLData(),r=i.url;return S._customerIDsHashChanged&&S._setFieldExpire(N,-1),S._getRemoteField(N,r,e,t,i)}}return""},S._supplementalDataIDCurrent="",S._supplementalDataIDCurrentConsumed={},S._supplementalDataIDLast="",S._supplementalDataIDLastConsumed={},S.getSupplementalDataID=function(e,t){S._supplementalDataIDCurrent||t||(S._supplementalDataIDCurrent=S._generateID(1));var n=S._supplementalDataIDCurrent;return S._supplementalDataIDLast&&!S._supplementalDataIDLastConsumed[e]?(n=S._supplementalDataIDLast,S._supplementalDataIDLastConsumed[e]=!0):n&&(S._supplementalDataIDCurrentConsumed[e]&&(S._supplementalDataIDLast=S._supplementalDataIDCurrent,S._supplementalDataIDLastConsumed=S._supplementalDataIDCurrentConsumed,S._supplementalDataIDCurrent=n=t?"":S._generateID(1),S._supplementalDataIDCurrentConsumed={}),n&&(S._supplementalDataIDCurrentConsumed[e]=!0)),n};var B=!1;S._liberatedOptOut=null,S.getOptOut=function(e,t){var n=S._getAudienceManagerURLData("_setMarketingCloudFields"),i=n.url;if(d())return S._getRemoteField("MCOPTOUT",i,e,t,n);if(S._registerCallback("liberatedOptOut",e),null!==S._liberatedOptOut)return S._callAllCallbacks("liberatedOptOut",[S._liberatedOptOut]),B=!1,S._liberatedOptOut;if(B)return null;B=!0;var r="liberatedGetOptOut";return n.corsUrl=n.corsUrl.replace(/\.demdex\.net\/id\?/,".demdex.net/optOutStatus?"),n.callback=[r],C[r]=function(e){if(e===Object(e)){var t,n,i=U.parseOptOut(e,t,F);t=i.optOut,n=1e3*i.d_ottl,S._liberatedOptOut=t,setTimeout(function(){S._liberatedOptOut=null},n)}S._callAllCallbacks("liberatedOptOut",[t]),B=!1},V.fireCORS(n),null},S.isOptedOut=function(e,t,n){t||(t=O.OptOut.GLOBAL);var i=S.getOptOut(function(n){var i=n===O.OptOut.GLOBAL||n.indexOf(t)>=0;S._callCallback(e,[i])},n);return i?i===O.OptOut.GLOBAL||i.indexOf(t)>=0:null};var G={subscribed:!1,callbacks:[]};S.onReceiveEcid=function(e){if(d())return S.getMarketingCloudVisitorID(e,!0);G.subscribed=!0,e&&"function"==typeof e&&G.callbacks.push(e)},S._fields=null,S._fieldsExpired=null,S._hash=function(e){var t,n,i=0;if(e)for(t=0;t<e.length;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i},S._generateID=re,S._generateLocalMID=function(){var e=S._generateID(0);return X.isClientSideMarketingCloudVisitorID=!0,e},S._callbackList=null,S._callCallback=function(e,t){try{"function"==typeof e?e.apply(A,t):e[1].apply(e[0],t)}catch(e){}},S._registerCallback=function(e,t){t&&(null==S._callbackList&&(S._callbackList={}),void 0==S._callbackList[e]&&(S._callbackList[e]=[]),S._callbackList[e].push(t))},S._callAllCallbacks=function(e,t){if(null!=S._callbackList){var n=S._callbackList[e];if(n)for(;n.length>0;)S._callCallback(n.shift(),t)}},S._addQuerystringParam=function(e,t,n,i){var r=encodeURIComponent(t)+"="+encodeURIComponent(n),a=q.parseHash(e),o=q.hashlessUrl(e);if(-1===o.indexOf("?"))return o+"?"+r+a;var s=o.split("?"),c=s[0]+"?",u=s[1];return c+q.addQueryParamAtLocation(u,r,i)+a},S._extractParamFromUri=function(e,t){var n=new RegExp("[\\?&#]"+t+"=([^&#]*)"),i=n.exec(e);if(i&&i.length)return decodeURIComponent(i[1])},S._parseAdobeMcFromUrl=a(oe.ADOBE_MC),S._parseAdobeMcSdidFromUrl=a(oe.ADOBE_MC_SDID),S._attemptToPopulateSdidFromUrl=function(e){var n=S._parseAdobeMcSdidFromUrl(e),i=1e9;n&&n.TS&&(i=q.getTimestampInSeconds()-n.TS),n&&n.SDID&&n.MCORGID===t&&i<S.sdidParamExpiry&&(S._supplementalDataIDCurrent=n.SDID,S._supplementalDataIDCurrentConsumed.SDID_URL_PARAM=!0)},S._attemptToPopulateIdsFromUrl=function(){var e=S._parseAdobeMcFromUrl();if(e&&e.TS){var n=q.getTimestampInSeconds(),i=n-e.TS;
6880if(Math.floor(i/60)>oe.ADOBE_MC_TTL_IN_MIN||e.MCORGID!==t)return;o(e)}},S._mergeServerState=function(e){if(e)try{if(e=function(e){return q.isObject(e)?e:JSON.parse(e)}(e),e[S.marketingCloudOrgID]){var t=e[S.marketingCloudOrgID];!function(e){q.isObject(e)&&S.setCustomerIDs(e)}(t.customerIDs),s(t.sdid)}}catch(e){throw new Error("`serverState` has an invalid format.")}},S._timeout=null,S._loadData=function(e,t,n,i){t=S._addQuerystringParam(t,"d_fieldgroup",e,1),i.url=S._addQuerystringParam(i.url,"d_fieldgroup",e,1),i.corsUrl=S._addQuerystringParam(i.corsUrl,"d_fieldgroup",e,1),X.fieldGroupObj[e]=!0,i===Object(i)&&i.corsUrl&&"XMLHttpRequest"===V.corsMetadata.corsType&&V.fireCORS(i,n,e)},S._clearTimeout=function(e){null!=S._timeout&&S._timeout[e]&&(clearTimeout(S._timeout[e]),S._timeout[e]=0)},S._settingsDigest=0,S._getSettingsDigest=function(){if(!S._settingsDigest){var e=S.version;S.audienceManagerServer&&(e+="|"+S.audienceManagerServer),S.audienceManagerServerSecure&&(e+="|"+S.audienceManagerServerSecure),S._settingsDigest=S._hash(e)}return S._settingsDigest},S._readVisitorDone=!1,S._readVisitor=function(){if(!S._readVisitorDone){S._readVisitorDone=!0;var e,t,n,i,r,a,o=S._getSettingsDigest(),s=!1,c=S.cookieRead(S.cookieName),u=new Date;if(c||b||S.discardTrackingServerECID||(c=S.cookieRead(oe.FIRST_PARTY_SERVER_COOKIE)),null==S._fields&&(S._fields={}),c&&"T"!==c)for(c=c.split("|"),c[0].match(/^[\-0-9]+$/)&&(parseInt(c[0],10)!==o&&(s=!0),c.shift()),c.length%2==1&&c.pop(),e=0;e<c.length;e+=2)t=c[e].split("-"),n=t[0],i=c[e+1],t.length>1?(r=parseInt(t[1],10),a=t[1].indexOf("s")>0):(r=0,a=!1),s&&("MCCIDH"===n&&(i=""),r>0&&(r=u.getTime()/1e3-60)),n&&i&&(S._setField(n,i,1),r>0&&(S._fields["expire"+n]=r+(a?"s":""),(u.getTime()>=1e3*r||a&&!S.cookieRead(S.sessionCookieName))&&(S._fieldsExpired||(S._fieldsExpired={}),S._fieldsExpired[n]=!0)));!S._getField(w)&&q.isTrackingServerPopulated()&&(c=S.cookieRead("s_vi"))&&(c=c.split("|"),c.length>1&&c[0].indexOf("v1")>=0&&(i=c[1],e=i.indexOf("["),e>=0&&(i=i.substring(0,e)),i&&i.match(oe.VALID_VISITOR_ID_REGEX)&&S._setField(w,i)))}},S._appendVersionTo=function(e){var t="vVersion|"+S.version,n=e?S._getCookieVersion(e):null;return n?te.areVersionsDifferent(n,S.version)&&(e=e.replace(oe.VERSION_REGEX,t)):e+=(e?"|":"")+t,e},S._writeVisitor=function(){var e,t,n=S._getSettingsDigest();for(e in S._fields)j(e)&&S._fields[e]&&"expire"!==e.substring(0,6)&&(t=S._fields[e],n+=(n?"|":"")+e+(S._fields["expire"+e]?"-"+S._fields["expire"+e]:"")+"|"+t);n=S._appendVersionTo(n),S.cookieWrite(S.cookieName,n,1)},S._getField=function(e,t){return null==S._fields||!t&&S._fieldsExpired&&S._fieldsExpired[e]?null:S._fields[e]},S._setField=function(e,t,n){null==S._fields&&(S._fields={}),S._fields[e]=t,n||S._writeVisitor()},S._getFieldList=function(e,t){var n=S._getField(e,t);return n?n.split("*"):null},S._setFieldList=function(e,t,n){S._setField(e,t?t.join("*"):"",n)},S._getFieldMap=function(e,t){var n=S._getFieldList(e,t);if(n){var i,r={};for(i=0;i<n.length;i+=2)r[n[i]]=n[i+1];return r}return null},S._setFieldMap=function(e,t,n){var i,r=null;if(t){r=[];for(i in t)j(i)&&(r.push(i),r.push(t[i]))}S._setFieldList(e,r,n)},S._setFieldExpire=function(e,t,n){var i=new Date;i.setTime(i.getTime()+1e3*t),null==S._fields&&(S._fields={}),S._fields["expire"+e]=Math.floor(i.getTime()/1e3)+(n?"s":""),t<0?(S._fieldsExpired||(S._fieldsExpired={}),S._fieldsExpired[e]=!0):S._fieldsExpired&&(S._fieldsExpired[e]=!1),n&&(S.cookieRead(S.sessionCookieName)||S.cookieWrite(S.sessionCookieName,"1"))},S._findVisitorID=function(t){return t&&("object"===e(t)&&(t=t.d_mid?t.d_mid:t.visitorID?t.visitorID:t.id?t.id:t.uuid?t.uuid:""+t),t&&"NOTARGET"===(t=t.toUpperCase())&&(t=F),t&&(t===F||t.match(oe.VALID_VISITOR_ID_REGEX))||(t="")),t},S._setFields=function(t,n){if(S._clearTimeout(t),null!=S._loading&&(S._loading[t]=!1),X.fieldGroupObj[t]&&X.setState(t,!1),t===E){!0!==X.isClientSideMarketingCloudVisitorID&&(X.isClientSideMarketingCloudVisitorID=!1);var i=S._getField(T);if(!i||S.overwriteCrossDomainMCIDAndAID){if(!(i="object"===e(n)&&n.mid?n.mid:S._findVisitorID(n))){if(S._use1stPartyMarketingCloudServer&&!S.tried1stPartyMarketingCloudServer)return S.tried1stPartyMarketingCloudServer=!0,void S.getAnalyticsVisitorID(null,!1,!0);i=S._generateLocalMID()}S._setField(T,i)}i&&i!==F||(i=""),"object"===e(n)&&((n.d_region||n.dcs_region||n.d_blob||n.blob)&&S._setFields(x,n),S._use1stPartyMarketingCloudServer&&n.mid&&S._setFields(R,{id:n.id})),S._callAllCallbacks(T,[i])}if(t===x&&"object"===e(n)){var r=604800;void 0!=n.id_sync_ttl&&n.id_sync_ttl&&(r=parseInt(n.id_sync_ttl,10));var a=W.getRegionAndCheckIfChanged(n,r);S._callAllCallbacks("MCAAMLH",[a]);var o=S._getField(N);(n.d_blob||n.blob)&&(o=n.d_blob,o||(o=n.blob),S._setFieldExpire(N,r),S._setField(N,o)),o||(o=""),S._callAllCallbacks(N,[o]),!n.error_msg&&S._newCustomerIDsHash&&S._setField("MCCIDH",S._newCustomerIDsHash)}if(t===R){var s=S._getField(w);s&&!S.overwriteCrossDomainMCIDAndAID||(s=S._findVisitorID(n),s?s!==F&&S._setFieldExpire(N,-1):s=F,S._setField(w,s)),s&&s!==F||(s=""),S._callAllCallbacks(w,[s])}if(S.idSyncDisableSyncs||S.disableIdSyncs)W.idCallNotProcesssed=!0;else{W.idCallNotProcesssed=!1;var c={};c.ibs=n.ibs,c.subdomain=n.subdomain,W.processIDCallData(c)}if(n===Object(n)){var u,l;d()&&S.isAllowed()&&(u=S._getField("MCOPTOUT"));var f=U.parseOptOut(n,u,F);u=f.optOut,l=f.d_ottl,S._setFieldExpire("MCOPTOUT",l,!0),S._setField("MCOPTOUT",u),S._callAllCallbacks("MCOPTOUT",[u])}},S._loading=null,S._getRemoteField=function(e,t,n,i,r){var a,o="",s=q.isFirstPartyAnalyticsVisitorIDCall(e),c={MCAAMLH:!0,MCAAMB:!0};if(d()&&S.isAllowed()){S._readVisitor(),o=S._getField(e,!0===c[e]);if(function(){return(!o||S._fieldsExpired&&S._fieldsExpired[e])&&(!S.disableThirdPartyCalls||s)}()){if(e===T||"MCOPTOUT"===e?a=E:"MCAAMLH"===e||e===N?a=x:e===w&&(a=R),a)return!t||null!=S._loading&&S._loading[a]||(null==S._loading&&(S._loading={}
6880),S._loading[a]=!0,a===x&&(D=0),S._loadData(a,t,function(t){if(!S._getField(e)){t&&X.setState(a,!0);var n="";e===T?n=S._generateLocalMID():a===x&&(n={error_msg:"timeout"}),S._setFields(a,n)}},r)),S._registerCallback(e,n),o||(t||S._setFields(a,{id:F}),"")}else o||(e===T?(S._registerCallback(e,n),o=S._generateLocalMID(),S.setMarketingCloudVisitorID(o)):e===w?(S._registerCallback(e,n),o="",S.setAnalyticsVisitorID(o)):(o="",i=!0))}return e!==T&&e!==w||o!==F||(o="",i=!0),n&&i&&S._callCallback(n,[o]),e===T&&G.subscribed&&(G.callbacks&&G.callbacks.length&&G.callbacks.forEach(function(e){S._callCallback(e,[o])}),G.subscribed=!1,G.callbacks.length=0),o},S._setMarketingCloudFields=function(e){S._readVisitor(),S._setFields(E,e)},S._mapCustomerIDs=function(e){S.getAudienceManagerBlob(e,!0)},S._setAnalyticsFields=function(e){S._readVisitor(),S._setFields(R,e)},S._setAudienceManagerFields=function(e){S._readVisitor(),S._setFields(x,e)},S._getAudienceManagerURLData=function(e){var t=S.audienceManagerServer,n="",i=S._getField(T),r=S._getField(N,!0),a=S._getField(w),o=a&&a!==F?"&d_cid_ic=AVID%01"+encodeURIComponent(a):"";if(S.loadSSL&&S.audienceManagerServerSecure&&(t=S.audienceManagerServerSecure),t){var s,c,u,l=S.getCustomerIDs(!0);if(l)for(c in l){var d=l[c];if(!U.isObjectEmpty(d)){var f="nameSpaces"===c?"&d_cid_ns=":"&d_cid_ic=";for(s in d)j(s)&&(u=d[s],o+=f+encodeURIComponent(s)+"%01"+encodeURIComponent(u.id?u.id:"")+(u.authState?"%01"+u.authState:""))}}e||(e="_setAudienceManagerFields");var p="http"+(S.loadSSL?"s":"")+"://"+t+"/id",g="d_visid_ver="+S.version+(v&&-1!==p.indexOf("demdex.net")?"&gdpr=1&gdpr_consent="+v:"")+(D&&-1!==p.indexOf("demdex.net")?"&d_cf="+D:"")+"&d_rtbd=json&d_ver=2"+(!i&&S._use1stPartyMarketingCloudServer?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(S.marketingCloudOrgID)+"&d_nsid="+(S.idSyncContainerID||0)+(i?"&d_mid="+encodeURIComponent(i):"")+(S.idSyncDisable3rdPartySyncing||S.disableThirdPartyCookies?"&d_coppa=true":"")+(!0===k?"&d_coop_safe=1":!1===k?"&d_coop_unsafe=1":"")+(r?"&d_blob="+encodeURIComponent(r):"")+o,m=["s_c_il",S._in,e];return n=p+"?"+g+"&d_cb=s_c_il%5B"+S._in+"%5D."+e,{url:n,corsUrl:p+"?"+g,callback:m}}return{url:n}},S.appendVisitorIDsTo=function(e){try{var t=[[T,S._getField(T)],[w,S._getField(w)],["MCORGID",S.marketingCloudOrgID]];return S._addQuerystringParam(e,oe.ADOBE_MC,c(t))}catch(t){return e}},S.appendSupplementalDataIDTo=function(e,t){if(!(t=t||S.getSupplementalDataID(q.generateRandomString(),!0)))return e;try{var n=c([["SDID",t],["MCORGID",S.marketingCloudOrgID]]);return S._addQuerystringParam(e,oe.ADOBE_MC_SDID,n)}catch(t){return e}};var q={parseHash:function(e){var t=e.indexOf("#");return t>0?e.substr(t):""},hashlessUrl:function(e){var t=e.indexOf("#");return t>0?e.substr(0,t):e},addQueryParamAtLocation:function(e,t,n){var i=e.split("&");return n=null!=n?n:i.length,i.splice(n,0,t),i.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(e,t,n){if(e!==w)return!1;var i;return t||(t=S.trackingServer),n||(n=S.trackingServerSecure),!("string"!=typeof(i=S.loadSSL?n:t)||!i.length)&&(i.indexOf("2o7.net")<0&&i.indexOf("omtrdc.net")<0)},isObject:function(e){return Boolean(e&&e===Object(e))},removeCookie:function(e){Z.remove(e,{domain:S.cookieDomain})},isTrackingServerPopulated:function(){return!!S.trackingServer||!!S.trackingServerSecure},getTimestampInSeconds:function(){return Math.round((new Date).getTime()/1e3)},parsePipeDelimetedKeyValues:function(e){return e.split("|").reduce(function(e,t){var n=t.split("=");return e[n[0]]=decodeURIComponent(n[1]),e},{})},generateRandomString:function(e){e=e||5;for(var t="",n="abcdefghijklmnopqrstuvwxyz0123456789";e--;)t+=n[Math.floor(Math.random()*n.length)];return t},normalizeBoolean:function(e){return"true"===e||"false"!==e&&e},parseBoolean:function(e){return"true"===e||"false"!==e&&null},replaceMethodsWithFunction:function(e,t){for(var n in e)e.hasOwnProperty(n)&&"function"==typeof e[n]&&(e[n]=t);return e}};S._helpers=q;var W=se(S,O);S._destinationPublishing=W,S.timeoutMetricsLog=[];var X={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(e,t){switch(e){case E:!1===t?!0!==this.MCIDCallTimedOut&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=t;break;case R:!1===t?!0!==this.AnalyticsIDCallTimedOut&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=t;break;case x:!1===t?!0!==this.AAMIDCallTimedOut&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=t}}};S.isClientSideMarketingCloudVisitorID=function(){return X.isClientSideMarketingCloudVisitorID},S.MCIDCallTimedOut=function(){return X.MCIDCallTimedOut},S.AnalyticsIDCallTimedOut=function(){return X.AnalyticsIDCallTimedOut},S.AAMIDCallTimedOut=function(){return X.AAMIDCallTimedOut},S.idSyncGetOnPageSyncInfo=function(){return S._readVisitor(),S._getField("MCSYNCSOP")},S.idSyncByURL=function(e){if(!S.isOptedOut()){var t=u(e||{});if(t.error)return t.error;var n,i,r=e.url,a=encodeURIComponent,o=W;return r=r.replace(/^https:/,"").replace(/^http:/,""),n=U.encodeAndBuildRequest(["",e.dpid,e.dpuuid||""],","),i=["ibs",a(e.dpid),"img",a(r),t.ttl,"",n],o.addMessage(i.join("|")),o.requestToProcess(),"Successfully queued"}},S.idSyncByDataSource=function(e){if(!S.isOptedOut())return e===Object(e)&&"string"==typeof e.dpuuid&&e.dpuuid.length?(e.url="//dpm.demdex.net/ibs:dpid="+e.dpid+"&dpuuid="+e.dpuuid,S.idSyncByURL(e)):"Error: config or config.dpuuid is empty"},Ye(S,W),S._getCookieVersion=function(e){e=e||S.cookieRead(S.cookieName);var t=oe.VERSION_REGEX.exec(e);return t&&t.length>1?t[1]:null},S._resetAmcvCookie=function(e){var t=S._getCookieVersion();t&&!te.isLessThan(t,e)||S.removeCookie(S.cookieName)},S.setAsCoopSafe=function(){k=!0},S.setAsCoopUnsafe=function(){k=!1},function(){if(S.configs=Object.create(null),q.isObject(n))for(var e in n)j(e)&&(S[e]=n[e],S.configs[e]=n[e])}(),f();var K;S.init=function(){l()&&(I.optIn.fetchPermissions(h,!0),!I.optIn.isApproved(I.optIn.Categories.ECID))||K||(K=!0,function(){if(q.isObject(n)){S.idSyncContainerID=S.idSyncContainerID||0,k="boolean"==typeof S.isCoopSafe?S.isCoopSafe:q.parseBoolean(S.isCoopSafe),S.resetBeforeVersion&&S._resetAmcvCookie(S.resetBeforeVersion),S._attemptToPopulateIdsFromUrl(),S._attemptToPopulateSdidFromUrl(),S._readVisitor();var e=S._getField(P),t=Math.ceil((new Date).getTime()/oe.MILLIS_PER_DAY);S.idSyncDisableSyncs||S.disableIdSyncs||!W.canMakeSyncIDCall(e,t)||(S._setFieldExpire(N,-1),S._setField(P,t)),S.getMarketingCloudVisitorID(),S.getAudienceManagerLocationHint(),S.getAudienceManagerBlob(),S._mergeServerState(S.serverState)}else S._attemptToPopulateIdsFromUrl(),S._attemptToPopulateSdidFromUrl()}(),function(){if(!S.idSyncDisableSyncs&&!S.disableIdSyncs){W.checkDPIframeSrc();var e=function(){var e=W;e.readyToAttachIframe()&&e.attachIframe()};A.addEventListener("load",function(){O.windowLoaded=!0,e()});try{ie.receiveMessage(function(e){W.receiveMessage(e.data)},W.iframeHost)}catch(e){}}}(),function(){S.whitelistIframeDomains&&oe.POST_MESSAGE_ENABLED&&(S.whitelistIframeDomains=S.whitelistIframeDomains instanceof Array?S.whitelistIframeDomains:[S.whitelistIframeDomains],S.whitelistIframeDomains.forEach(function(e){var n=new Y(t,e),i=Q(S,n);ie.receiveMessage(i,e)}))}())}};Je.config=ue,C.Visitor=Je;var ze=Je,Qe=function(e){if(U.isObject(e))return Object.keys(e).filter(function(t){return""!==e[t]&&ue.getConfigs()[t]}).reduce(function(t,n){var i=ue.normalizeConfig(n,e[n]),r=U.normalizeBoolean(i);return t[n]=r,t},Object.create(null))},$e=Ge.OptIn,Ze=Ge.IabPlugin;return ze.getInstance=function(e,t){if(!e)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");e.indexOf("@")<0&&(e+="@AdobeOrg");var n=function(){var t=C.s_c_il;if(t)for(var n=0;n<t.length;n++){var i=t[n];if(i&&"Visitor"===i._c&&i.marketingCloudOrgID===e)return i}}();if(n)return n;var i=Qe(t)||{};!function(e){C.adobe.optIn=C.adobe.optIn||function(){var t=U.pluck(e,["doesOptInApply","previousPermissions","preOptInApprovals","isOptInStorageEnabled","optInStorageExpiry","isIabC
6880ontext","sameSiteCookie","secureCookie"]),n=e.optInCookieDomain||e.cookieDomain;n=n||ee(),n=n===window.location.hostname?"":n,t.optInCookieDomain=n;var i=new $e(t,{cookies:Z});if(t.isIabContext&&t.doesOptInApply){var r=new Ze;i.registerPlugin(r)}return i}()}(i||{});var r=e,a=r.split("").reverse().join(""),o=new ze(e,null,a);i.cookieDomain&&(o.cookieDomain=i.cookieDomain), 6881 i.sameSiteCookie&&i.secureCookie&&(o.configs={sameSiteCookie:i.sameSiteCookie,secureCookie:i.secureCookie}),function(){C.s_c_il.splice(--C.s_c_in,1)}();var s=U.getIeVersion();if("number"==typeof s&&s<10)return o._helpers.replaceMethodsWithFunction(o,function(){});var c=function(){try{return C.self!==C.parent}catch(e){return!0}}()&&(!function(e){return e.cookieWrite("TEST_AMCV_COOKIE","T",1),"T"===e.cookieRead("TEST_AMCV_COOKIE")&&(e.removeCookie("TEST_AMCV_COOKIE"),!0)}(o)||U.isFirefox()&&!function(t){var n="AMCV_"+e;return!!t.cookieRead(n)}(o)&&i.whitelistParentDomain)&&C.parent?new W(e,i,o,C.parent):new ze(e,i,a);return o=null,c.init(),c},function(){function e(){ze.windowLoaded=!0}C.addEventListener?C.addEventListener("load",e):C.attachEvent&&C.attachEvent("onload",e),ze.codeLoadEnd=(new Date).getTime()}(),ze}(); 6882 6883 return Visitor; 6884}(); 6885 6886 } 6887 6888 }, 6889 "adobe-mcid/src/view/utils/timeUnits.js": { 6890 "script": function(module, exports, require, turbine) { 6891/************************************************************************* 6892* ADOBE CONFIDENTIAL 6893* ___________________ 6894* 6895* Copyright 2018 Adobe Systems Incorporated 6896* All Rights Reserved. 6897*
6898* NOTICE: All information contained herein is, and remains 6899* the property of Adobe Systems Incorporated and its suppliers, 6900* if any. The intellectual and technical concepts contained 6901* herein are proprietary to Adobe Systems Incorporated and its 6902* suppliers and are protected by all applicable intellectual property 6903* laws, including trade secret and copyright laws. 6904* Dissemination of this information or reproduction of this material 6905* is strictly forbidden unless prior written permission is obtained 6906* from Adobe Systems Incorporated. 6907**************************************************************************/ 6908 6909var timeUnits = { 6910 Hours: 3600, 6911 Days: 24 * 3600, 6912 Weeks: 7 * 24 * 3600, 6913 Months: 30 * 24 * 3600, 6914 Years: 365 * 24 * 3600 6915}; 6916 6917module.exports = timeUnits; 6918 6919 } 6920 6921 } 6922 } 6923 }, 6924 "content-type-hierarchy-tool": { 6925 "displayName": "Content Type Hierarchy Tool", 6926 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP92ffbfa825944005b4c4970d68fc8eb6/", 6927 "modules": { 6928 "content-type-hierarchy-tool/src/lib/dataElements/contentTypeHierarchy.js": { 6929 "name": "content-type-hierarchy", 6930 "displayName": "Content Type Hierarchy", 6931 "script": function(module, exports, require, turbine) { 6932'use strict'; 6933 6934module.exports = function (settings) { 6935 for (var i = 0; i < settings.data.length; i++) { 6936 6937 if(settings.data[i].condition.dataElement.indexOf("§:§") > -1){ 6938 var dataElements = settings.data[i].condition.dataElement.split("§:§"); 6939 var dataElementValues = []; 6940 6941 for(var j=0; j< dataElements.length; j++){ 6942 dataElementValues[j] = _satellite.getVar(dataElements[j].replaceAll("§", "")); 6943 } 6944 6945 if(dataElementValues.join(":") === settings.data[i].condition.valueString){ 6946 return settings.data[i].then.valueString; 6947 } 6948 6949 }else if (_satellite.getVar(settings.data[i].condition.dataElement.replaceAll("§", "")) === settings.data[i].condition.valueString){ 6950 return settings.data[i].then.valueString; 6951 } 6952 6953 } 6954}; 6955 } 6956 6957 } 6958 } 6959 }, 6960 "acronym-gtag.js": { 6961 "displayName": "Google Global Site Tag (gtag)", 6962 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP4088787701664ce4bfc67739775f5c33/", 6963 "settings": { 6964 "accounts": { 6965 "1669969140614": { 6966 "id": "1669969140614", 6967 "name": "ni.com - Global", 6968 "type": "ga", 6969 "options": [], 6970 "accounts": { 6971 "staging": "", 6972 "production": "G-X7HB08ST47", 6973 "development": "" 6974 }, 6975 "settings": { 6976 "linker": { 6977 "domains": "", 6978 "decorate_forms": false, 6979 "accept_incoming": true 6980 }, 6981 "user_id": "", 6982 "cookie_name": "", 6983 "optimize_id": "", 6984 "anonymize_ip": false, 6985 "cookie_domain": "", 6986 "cookie_expires": "" 6987 }, 6988 "custom_map": [] 6989 } 6990 }, 6991 "configCode": function(gtag, dataLayer) { 6992 6993}, 6994 "functionName": "", 6995 "dataLayerName": "", 6996 "displayFeatures": true 6997 }, 6998 "modules": { 6999 "acronym-gtag.js/src/lib/actions/pageview.js": { 7000 "name": "send-gtag.js-pageview", 7001 "displayName": "Send a page view", 7002 "script": function(module, exports, require, turbine) { 7003'use strict'; 7004 7005/** 7006 * Send a page view action 7007 * 7008 * @package acronym-gtag 7009 * @param settings Action Settings 7010 */ 7011module.exports = function(settings) { 7012 var gtag = require("../helpers/loadGtag")(), 7013 castOptionTypes = require("../helpers/castOptionTypes"), 7014 getAccountId = require("../helpers/getAccountId"), 7015 extensionSettings = turbine.getExtensionSettings(); 7016 7017 if(typeof settings["accounts"] === "object" && settings["accounts"] !== null && Object.keys(settings["accounts"]).length > 0) { 7018 for(var account in settings["accounts"]) { 7019 if(settings["accounts"].hasOwnProperty(account)
7020 && (settings["accounts"][account]["enabled"] === true || settings["accounts"][account]["enabled"] === "true")) { 7021 var extensionAccount = extensionSettings["accounts"][account]; 7022 if(typeof extensionAccount === "undefined") { 7023 turbine.logger.warn("ACRGTAG-201: An account was removed in the extension config but is still enabled in the rule") 7024 continue; 7025 } 7026 var accountId = getAccountId(extensionAccount), 7027 options = { 7028 "send_to": [accountId] 7029 }; 7030 7031 // Merge any additional variables from the rule action 7032 (settings["accounts"][account]["options"]||[]).forEach(function(option) { 7033 options[option[0]] = option[1]; 7034 }); 7035 7036 // Cast our options and send it! 7037 options = castOptionTypes(options); 7038 gtag("event", "page_view", options); 7039 turbine.logger.log("page view fired for account " + accountId + " with the options:", JSON.stringify(options)); 7040 } 7041 } 7042 } else { 7043 turbine.logger.warn("ACRGTAG-200 - No accounts enabled for the page_view event"); 7044 } 7045}; 7046 7047 } 7048 7049 }, 7050 "acronym-gtag.js/src/lib/helpers/loadGtag.js": { 7051 "script": function(module, exports, require, turbine) { 7052"use strict"; 7053 7054/** 7055 * Configure and load gtag 7056 * 7057 * @package acronym-gtag 7058 */ 7059module.exports = function() { 7060 var extensionSettings = turbine.getExtensionSettings(), 7061 dataLayerName = extensionSettings.dataLayerName || "dataLayer", 7062 functionName = extensionSettings.functionName || "gtag", 7063 window = require("@adobe/reactor-window"), 7064 loadScript = require("@adobe/reactor-load-script"), 7065 getAccountId = require("../helpers/getAccountId"), 7066 castOptionTypes = require("../helpers/castOptionTypes"), 7067 accountId = ""; 7068 7069 // Setup the gtag( ) function 7070 if(!window[functionName]) { 7071 window[dataLayerName] = window[dataLayerName] || []; 7072 window[functionName] = function(){ 7073 if(Array.isArray(window[dataLayerName])) { 7074 window[dataLayerName].push(arguments); 7075 } else { 7076 turbine.logger.error("ACRGTAG-104: Data layer variable '"+dataLayerName+"' malformed", window[dataLayerName]); 7077 } 7078 }; 7079 window[functionName]("js", new Date()); 7080 } 7081 7082 7083 // Check the load library nonce to see if we've already loaded the library 7084 if(!_satellite.getVar("__acronym_gtag_loaded")) { 7085 7086 // Set the load library nonce 7087 _satellite.setVar("__acronym_gtag_loaded", true); 7088 7089 7090 // Load pre-config code 7091 if(typeof extensionSettings.preConfigCode === "function") { 7092 try { 7093 extensionSettings.preConfigCode(window[functionName], window[dataLayerName]); 7094 } catch(error) { 7095 turbine.logger.error("ACRGTAG-101: Custom pre-account config code error:", error); 7096 } 7097 } 7098 7099 // If display features is disabled, disable it for ALL accounts 7100 if((typeof extensionSettings.displayFeatures === "string" && extensionSettings.displayFeatures !== "true") 7101 || (typeof extensionSettings.displayFeatures !== "string" && !Boolean(extensionSettings.displayFeatures))) { 7102 window[functionName]("set", {"allow_ad_personalization_signals": false}); 7103 turbine.logger.log("Display features are disabled"); 7104 } 7105 7106 // Setup our accounts 7107 if(typeof extensionSettings["accounts"] === "object" && extensionSettings["accounts"] !== null && Object.keys(extensionSettings["accounts"]).length > 0) { 7108 for(var accountUID in extensionSettings["accounts"]) { 7109 if(extensionSettings["accounts"].hasOwnProperty(accountUID)) { 7110 var account = extensionSettings["accounts"][accountU
7110ID], 7111 options = account["settings"] || {}; 7112 7113 accountId = getAccountId(account); 7114 7115 if(typeof account["custom_map"] === "object" && account["custom_map"].length) { 7116 options["custom_map"] = options["custom_map"] || {}; 7117 account["custom_map"].forEach(function(mapping) { 7118 options["custom_map"][mapping[0]] = mapping[1]; 7119 }); 7120 } 7121 7122 (account["options"]||[]).forEach(function(option) { 7123 options[option[0]] = option[1]; 7124 }); 7125 7126 // By default, we do not want to send the page view (let the user decide when that happens) 7127 options["send_page_view"] = false; 7128 7129 options = castOptionTypes(options); 7130 window[functionName]("config", accountId, options); 7131 turbine.logger.log("account " + accountId + " was loaded with the options:", JSON.stringify(options)); 7132 } 7133 } 7134 7135 // Load any custom code 7136 if(typeof extensionSettings.configCode === "function") { 7137 try { 7138 extensionSettings.configCode(window[functionName], window[dataLayerName]); 7139 } catch(error) { 7140 turbine.logger.error("ACRGTAG-101: Custom post-account config code error:", error); 7141 } 7142 } 7143 } else { 7144 turbine.logger.warn("ACRGTAG-102: No accounts configured"); 7145 } 7146 7147 // Load the library 7148 var g = "gtag.js library"; 7149 turbine.logger.log("loading " + g); 7150 loadScript("https://www.googletagmanager.com/gtag/js?id=" + accountId + "&l=" + dataLayerName).then(function() { 7151 turbine.logger.log(g + " successfully loaded"); 7152 }, function() { 7153 turbine.logger.error("ACRGTAG-100: " + g + " could not be loaded"); 7154 }); 7155 } 7156 7157 // Return gtag( ) 7158 return window[functionName]; 7159}; 7160 } 7161, 7162 "name": "get-gtag", 7163 "shared": true 7164 }, 7165 "acronym-gtag.js/src/lib/helpers/castOptionTypes.js": { 7166 "script": function(module, exports, require, turbine) { 7167'use strict'; 7168 7169/** 7170 * Cast options object to the proper type 7171 * 7172 * @package acronym-gtag 7173 * @param settings Action Settings 7174 */ 7175module.exports = function(options) { 7176 var cast = { 7177 // Boolean 7178 bool: function (value) { return (typeof value === "string") ? value === "true" : Boolean(value); }, 7179 7180 // Integer 7181 int: function (value) { var int = parseInt(value); return isNaN(int) ? 0 : int; }, 7182 7183 // Float 7184 float: function (value) { var flt = parseFloat(value); return isNaN(flt) ? 0 : flt; }, 7185 7186 // Comma separated list 7187 csv: function(value) { return (typeof value === "string") ? (value === "" ? undefined : value.split(",")) : value; }, 7188 7189 // Custom mapping (CSV with key:value pairs into an object) 7190 custom_map: function(value) { 7191 var obj = {}; 7192 if(typeof value === "string") { 7193 value.split(",").forEach(function(mapping) { 7194 var map = mapping.split(":"); 7195 if(map.length === 2) { 7196 obj[map[0]] = map[1]; 7197 } 7198 }); 7199 } else if(typeof value === "object") { 7200 obj = value; 7201 } 7202 return obj; 7203 } 7204 }, 7205 // Map the key to the type 7206 mapping = { 7207 "accept_incoming": cast.bool, 7208 "allow_ad_personalization_signals": cast.bool, 7209 "anonymize_ip": cast.bool, 7210 "checkout_step": cast.int, 7211 "cookie_expires": cast.int, 7212 "custom_map": cast.custom_map, 7213 "event_timeout": cast.int, 7214 "fatal": cast.bool, 7215 "levels": cast.int, 7216 "link_attribution": cast.bool, 7217 "linker": { 7218 "domains": cast.csv, 7219 "accept_incoming": cast.bool, 7220 "decorate_forms": cast.bool 7221 }, 7222 "non_interaction": cast.bool, 7223 "value": cast.float 7224 }; 7225
7226 Object.keys(options).forEach(function(key) { 7227 if(typeof mapping[key] === "function") { 7228 options[key] = mapping[key](options[key]); 7229 } else if (typeof mapping[key] === "object" && typeof options[key] === "object" && options[key] !== null) { 7230 Object.keys(options[key]).forEach(function(objKey) { 7231 if(typeof mapping[key][objKey] === "function") { 7232 options[key][objKey] = mapping[key][objKey](options[key][objKey]); 7233 } 7234 }); 7235 } 7236 }); 7237 return options; 7238}; 7239 } 7240 7241 }, 7242 "acronym-gtag.js/src/lib/helpers/getAccountId.js": { 7243 "script": function(module, exports, require, turbine) { 7244'use strict'; 7245 7246/** 7247 * Grab the account ID for the environment 7248 * 7249 * @package acronym-gtag 7250 * @param account Account Settings 7251 * @param environment Current Environment 7252 */ 7253module.exports = function(account, environment) { 7254 var accountId; 7255 if(!environment) { environment = turbine.environment.stage; } 7256 if(typeof account.accounts[environment] === "string" && account.accounts[environment] !== "") { 7257 accountId = account.accounts[environment]; 7258 } else { 7259 accountId = account.accounts.production; 7260 } 7261 return accountId; 7262}; 7263 } 7264 7265 } 7266 } 7267 }, 7268 "custom-debug-logger": { 7269 "displayName": "Custom Debug Logger", 7270 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP0d8a11285ee9412e83027db87fe8f301/", 7271 "modules": { 7272 "custom-debug-logger/src/lib/actions/satelliteLogger.js": { 7273 "name": "satellite-logger-log", 7274 "displayName": "Log", 7275 "script": function(module, exports, require, turbine) { 7276'use strict'; 7277 7278module.exports = function (settings, event) { 7279 let { 7280 message, 7281 logTypeSelected, 7282 prependRuleSwitch, 7283 customTextColor, 7284 customBackgroundColor, 7285 emoji, 7286 logInput, 7287 logLevel, 7288 ruleName, 7289 } = settings; 7290 7291 // get current debug status 7292 const debugModeEnabled = 7293 localStorage.getItem('com.adobe.reactor.debug') === 'true'; 7294 7295 // v1 settings still apply 7296 if (logInput) { 7297 message = logInput; 7298 } 7299 if (logLevel) { 7300 logTypeSelected = logLevel; 7301 } 7302 if (ruleName) { 7303 prependRuleSwitch = ruleName; 7304 } 7305 7306 //prepend rule name if selected 7307 if (prependRuleSwitch) { 7308 message = `[${event.$rule.name}] ${message}`; 7309 } 7310 7311 if (message) { 7312 switch (logTypeSelected) { 7313 case 'warn': 7314 return turbine.logger.warn(message); 7315 case 'log': 7316 return turbine.logger.log(message); 7317 case 'info': 7318 return turbine.logger.info(message); 7319 case 'error': 7320 return turbine.logger.error(message); 7321 case 'debug': 7322 return turbine.logger.debug(message); 7323 case 'color': 7324 if (debugModeEnabled) { 7325 return console.log( 7326 `%c${emoji} ${message}`, 7327 `color: ${customTextColor}; background-color: ${customBackgroundColor}; padding:6px;}` 7328 ); 7329 } 7330 default: 7331 return turbine.logger.log(message); 7332 } 7333 } 7334}; 7335 7336 } 7337 7338 } 7339 } 7340 }, 7341 "data-element-assistant": { 7342 "displayName": "Data Element Assistant", 7343 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP634d430f78964f1597e7328a6af419f8/", 7344 "modules": { 7345 "data-element-assistant/src/lib/dataElements/concatenate.js": { 7346 "name": "concatenate", 7347 "displayName": "Concatenate", 7348 "script": function(module, exports, require, turbine) { 7349'use strict'; 7350var logger = require('./utils/logger'); 7351var findTargetValue = require('./utils/findTargetValue'); 7352var is = require('./utils/is'); 7353/** 7354 * Concatenate 7355 * 7356 * Concatenates values either hard codes are found on the window 7357 * 7358 * @param {Object} settings Settings object passed from Launch 7359 * @param {Object[]} dataElementsAndDelimiters array of settings for each field 7360 * @param {string} dataElementsAndDelimiters[].inputType the input type 'path' or 'dataelement' 7361 * @param {string} dataElementsAndDelimiters[].path - The path to a deeply nested value. 7362 * @param {string} dataElementsAndDelimiters[].dataElement The value Launch returns from data element or hard coded input 7363 * @param {boolean} dataElementsAndDelimiters[].omitWhenEmpty Whether or not to exclude a field when empty 7364 * @param {string} dataElementsAndDelimiters[].delimiter Delimiter value if entered 7365 7366 */ 7367module.exports = function (settings) { 7368 try { 7369 var arr = settings.dataElementsAndDelimiters; 7370 var returnEmpty = settings.returnEmpty; 7371 var valueNotFound = true; 7372 7373 var concatVal = arr.reduce(function (accum, item) { 7374 var value = ''; 7375 7376 if (item.inputType === 'path') { 7377 value = findTargetValue(window, item.path); 7378 value = is.nil(value) ? '' : value; 7379 } else { 7380 value = item.dataElement; 7381 } 7382 7383 if (is.nil(value) || value === '') { 7384 if (item.omitWhenEmpty === true) { 7385 return accum; 7386 } 7387 } else { 7388 valueNotFound = false;
7389 } 7390 7391 return accum + item.delimiter + value; 7392 }, ''); 7393 7394 if (settings.trailingDelimiter != '') { 7395 concatVal += settings.trailingDelimiter; 7396 } 7397 7398 if (returnEmpty && valueNotFound) { 7399 return; 7400 } else { 7401 return concatVal; 7402 } 7403 } catch (error) { 7404 return logger.log('error', 'Concatenate', error.message); 7405 } 7406}; 7407 7408 } 7409 7410 }, 7411 "data-element-assistant/src/lib/dataElements/utils/logger.js": { 7412 "script": function(module, exports, require, turbine) { 7413var isCreated = false; 7414var logger; 7415 7416module.exports = (function() { 7417 if (isCreated) return logger; 7418 7419 var levelTagLookup = { 7420 'error': '[Error]' 7421 }; 7422 7423 logger = { 7424 log: function(level, dataElement, message) { 7425 var levelTag = levelTagLookup[level] || ''; 7426 var taggedMessage = 'DEA ' + dataElement + 7427 levelTag + ': ' + message; 7428 7429 if (typeof turbine !== 'undefined') { 7430 turbine.logger[level](taggedMessage); 7431 } 7432 } 7433 }; 7434 7435 isCreated = true; 7436 7437 return logger; 7438})(); 7439 7440 7441 } 7442 7443 }, 7444 "data-element-assistant/src/lib/dataElements/utils/findTargetValue.js": { 7445 "script": function(module, exports, require, turbine) { 7446module.exports = function findTargetValue(target, key) { 7447 return key.split('.').reduce(function (acc, curr) { 7448 return (acc || {})[curr]; 7449 }, target); 7450}; 7451 7452 } 7453 7454 }, 7455 "data-element-assistant/src/lib/dataElements/utils/is.js": { 7456 "script": function(module, exports, require, turbine) { 7457module.exports = (function is() { 7458 var toString = Object.prototype.toString; 7459 var BOOLEAN = '[object Boolean]'; 7460 var STRING = '[object String]'; 7461 var NUMBER = '[object Number]'; 7462 var ARRAY = '[object Array]'; 7463 var OBJECT = '[object Object]'; 7464 var FUNCTION = '[object Function]'; 7465 var NULL = '[object Null]'; 7466 var UNDEFINED = '[object Undefined]'; 7467 7468 function prepareTypeCheck(type) { 7469 return function(item) { 7470 return toString.call(item) === type; 7471 } 7472 } 7473 7474 return { 7475 array: prepareTypeCheck(ARRAY), 7476 object: prepareTypeCheck(OBJECT), 7477 'function': prepareTypeCheck(FUNCTION), 7478 'null': prepareTypeCheck(NULL), 7479 'undefined': prepareTypeCheck(UNDEFINED), 7480 string: prepareTypeCheck(STRING), 7481 number: prepareTypeCheck(NUMBER), 7482 'boolean': prepareTypeCheck(BOOLEAN), 7483 nil: function(item) { 7484 return this.null(item) || this.undefined(item); 7485 } 7486 }; 7487})(); 7488 7489 7490 } 7491 7492 } 7493 } 7494 }, 7495 "spa-view-change-event": { 7496 "displayName": "SPA View Change Event", 7497 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EPd168f6d78ef442589dc72c9af909e487/", 7498 "modules": { 7499 "spa-view-change-event/src/lib/events/spaViewChange.js": { 7500 "name": "on-spa-view-change", 7501 "displayName": "On SPA View Change", 7502 "script": function(module, exports, require, turbine) { 7503'use strict'; 7504 7505module.exports = function(settings, trigger) { 7506 // Start watching for an event. Call trigger when the event occurs. 7507 7508 var uniqueId = new Date().getTime(); 7509 document.addEventListener('spa-view-change--'+uniqueId, function(rule){ 7510 trigger(); 7511 }, false); 7512 7513 /** 7514 NOTE: extension code "adobe.target.ext.universalspa.events.js" version 0.1.0 7515 */ 7516 var userConfig = { 7517 rules:[ 7518 { 7519 id: 'spa-view-change--'+uniqueId // required id; 7520 // @todo: for now, rules are not utilized and event is dipatched on all pages 7521 } 7522 ], 7523 id: uniqueId, 7524 // Optional, to skip initial page load notification if at.js handles Target call 7525 isEnableOnPageLoad: (settings && settings.isEnableOnPageLoad) || false, 7526 logger: turbine.logger.info 7527 }; 7528 7529 !(function(config){ 7530 'use strict'; 7531 7532 var VERSION = "0.1.0", 7533 clientData = [], 7534 id = ("id" in config) ? config.id : new Date().getTime(), 7535 thisPageUrl = '', 7536 observerConfig = {childList: true, subtree: true }, 7537 log = ("logger" in config && typeof config.logger === "function") ? config.logger : function () {}, 7538 emptyFn = function() {}; 7539 7540 var CUSTOM_EVENT_SPA_VIEW_CHANGE = "spa-view-change"+"--"+id, 7541 CUSTOM_EVENT_SPA_VIEW_CHANGE_BEFORE = "spa-view-change-before"+"--"+id, 7542 CUSTOM_EVENT_SPA_VIEW_CHANGE_AFTER = "spa-view-change-after"+"--"+id, 7543 CUSTOM_EVENT_MUTATION_OBSERVED = "mutation-observed"+"--"+id; 7544 7545 // Polyfill Element.matches 7546 if (!Element.prototype.matches) { 7547 Element.prototype.matches = 7548 Element.prototype.matchesSelector || 7549 Element.prototype.mozMatchesSelector || 7550 Element.prototype.msMatchesSelector || 7551 Element.prototype.oMatchesSelector || 7552 Element.prototype.webkitMatchesSelector || 7553 function(s) { 7554 var matches = (this.document || this.ownerDocument).querySelectorAll(s), 7555 i = matches.length; 7556 while (--i >= 0 && matches.item(i) !== this) {} 7557 return i > -1; 7558 }; 7559 } 7560 7561 // Utils 7562 var isNotEmptyArray = function(arr){ 7563 return (Array.isArray(arr) && arr.length>0) || false; 7564 } 7565 7566 var isStrInArray = function(str, arr){ 7567 for (var i = arr.length - 1; i >= 0; i--) { 7568 var part = arr[i];// ['/#'] 7569 if (typeof part==='object' && part.test(str)===true) 7570 return true; 7571 else if (str.indexOf(part)!==-1) 7572 return true; 7573 }; 7574 return false;
7575 } 7576 7577 // @todo potential bug if ['#/'] allowed and [/#\/./gi] disallowed 7578 var isRouteAllowed = function (routeName, opts) { 7579 var result = true; //empty list - allow all 7580 if (isNotEmptyArray(opts.allow)) { 7581 result = isStrInArray(routeName, opts.allow); 7582 } 7583 if (isNotEmptyArray(opts.disallow)) { 7584 result = !isStrInArray(routeName, opts.disallow); 7585 }; 7586 return result; 7587 }; 7588 7589 // Listens to DOM mutations 7590 var startListeningToDomMutations = function(){ 7591 validateRules(); // First time page load (may be harmlessly redundant depending on implementation) 7592 var observer = new MutationObserver(function(mutations) { 7593 // Fire custom event to notifiy that DOM update was detected to trigger Offer Queue in "universalspa" 7594 var event = new CustomEvent(CUSTOM_EVENT_MUTATION_OBSERVED, { "detail": {} }); 7595 document.dispatchEvent(event); 7596 validateRules();//consequent calls 7597 }); 7598 var targetNode = document.body; 7599 if(!targetNode){ 7600 document.addEventListener('DOMContentLoaded', function(){ //make sure DOM is ready 7601 targetNode = document.body; 7602 observer.observe(targetNode, observerConfig); 7603 }, false); 7604 }else{ 7605 observer.observe(targetNode, observerConfig); 7606 } 7607 }; 7608 7609 var validateRules = function(){ 7610 log('validateRules'); 7611 7612 if(clientData.isRunOnLoad === false && thisPageUrl === ''){ // First page load and flag to skip call 7613 thisPageUrl = window.location.href; 7614 } 7615 if (window.location.href !== thisPageUrl) { 7616 thisPageUrl = window.location.href; 7617 7618 //TODO: reset listeners? 7619 7620 // Loop thru all rules and make a call if applicable 7621 var isEventDispatched = false; 7622 if(clientData.rules){ 7623 for (var i = 0; i < clientData.rules.length; i++) { 7624 var rule = clientData.rules[i]; 7625 if (typeof rule.id === 'string') { 7626 if(isRouteAllowed(thisPageUrl, rule)){ 7627 if (isEventDispatched === false) {//dispatch only once before view change 7628 dispatchEvent(CUSTOM_EVENT_SPA_VIEW_CHANGE_BEFORE, rule, clientData.before); 7629 } 7630 // dispatch View Change Event for rule 7631 dispatchEvent(CUSTOM_EVENT_SPA_VIEW_CHANGE, rule); 7632 isEventDispatched = true; 7633 }else{log('rule excluded',rule);} 7634 }; 7635 } 7636 }else{log("error: rules not configured");} 7637 // Dispatch custom event to notifiy subscribers 7638 if (isEventDispatched) { 7639 dispatchEvent(CUSTOM_EVENT_SPA_VIEW_CHANGE_AFTER, rule, clientData.after); 7640 } 7641 7642 }; 7643 }; 7644 7645 // dispatchEvent(CUSTOM_EVENT_SPA_VIEW_CHANGE_AFTER, rule, clientData.after) 7646 var dispatchEvent = function(eventName, rule, callback){ 7647 var event = new CustomEvent(eventName, { detail: rule }); 7648 document.dispatchEvent(event); 7649 if(typeof callback === "function") 7650 clientData.after(rule, log); 7651 log('Dispatched Event for Rule', eventName, thisPageUrl, rule); 7652 } 7653 7654 //@todo: extra test needed 7655 function delegate(el, evt, sel, handler) { 7656 el.addEventListener(evt, function(event) { 7657 var t = event.target; 7658 while (t && t !== this) { 7659 if (t.matches(sel)) { 7660 handler.call(t, event); 7661 } 7662 t = t.parentNode; 7663 } 7664 }); 7665 }; 7666 7667 var applyForceActions = function () { 7668 // Loop thru all rules of domEventNotifications to add an event listener 7669 for (var i = 0; i < clientData.rules.length; i++) { 7670 (function(rule){//closure 7671 if ('domEventNotifications' in rule) { 7672 var events = rule.domEventNotifications; 7673 log('applying domEventNotifications',events); 7674 for (var evt in events) { 7675 if (events.hasOwnProperty(evt)) { 7676 var actions = events[evt]; 7677 for (var j = 0; j < actions.length; j++) { 7678 (function(action){ 7679 var sel = action.selector; 7680 delegate(document, evt, sel, function(){ 7681 if(isRouteAllowed(thisPageUrl, action)){ 7682 log('delegate callback for action',action); 7683 dispatchViewChangeEvent(rule); 7684 } 7685 }); 7686 })(actions[j]); 7687 } 7688 } 7689 } 7690 }; 7691 })(clientData.rules[i]); 7692 } 7693 }; 7694 7695 var init = function (rules, isEnableOnPageLoad, beforeFn, afterFn) { 7696 7697 // Assign client specific settings and options to internal variable 7698 clientData = { 7699 rules: rules, 7700 before: (typeof beforeFn==='function') ? beforeFn : emptyFn, 7701 after: (typeof afterFn==='function') ? afterFn : emptyFn, 7702 isRunOnLoad: (typeof isEnableOnPageLoad==='boolean') ? isEnableOnPageLoad : false 7703 }; 7704 7705 log("init v." + VERSION, "Config", clientData); 7706 7707 // Start listening to DOM changes 7708 startListeningToDomMutations(); 7709 7710 // Apply domEventNotifications if we need to fire events while URL remains the same 7711 applyForceActions(); 7712 7713 }; 7714 7715 init(config.rules, config.isEnableOnPageLoad, config.before, config.after); 7716 7717 })(userConfig); 7718 7719}; 7720 } 7721 7722 } 7723 } 7724 }, 7725 "target-to-analytics": { 7726 "displayName": "Adobe Target Toolkit", 7727 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP099293c1b7574d5f9747486f603cbe8d/", 7728 "modules": { 7729 "target-to-analytics/src/lib/dataElements/targetActivitiesByName.js": {
7730 "name": "target_activities_by_name", 7731 "displayName": "List of Target Activity/Experience Names", 7732 "script": function(module, exports, require, turbine) { 7733'use strict'; 7734 7735module.exports = function(settings) { 7736 if (window.targetExperiences) { 7737 var vals = ''; 7738 for (var i=0; i<targetExperiences.length; i++) { 7739 vals += (vals ? ',' : '') + targetExperiences[i]['activityName'] + ':' + targetExperiences[i]['experienceName']; 7740 } 7741 return vals; 7742 } else { 7743 return ''; 7744 } 7745}; 7746 7747 } 7748 7749 }, 7750 "target-to-analytics/src/lib/actions/addTargetListener.js": { 7751 "name": "add_target_listener", 7752 "displayName": "Add Adobe Target Response Listener", 7753 "script": function(module, exports, require, turbine) { 7754module.exports = function(settings) { 7755 if (window.adobe && adobe.target) { 7756 document.addEventListener(adobe.target.event.REQUEST_SUCCEEDED, function(e) { 7757 if (e.detail.responseTokens) { 7758 var rt = e.detail.responseTokens; 7759 window.targetExperiences = []; 7760 for (var i=0; i<rt.length; i++) { 7761 var inList = false; 7762 for (var j=0; j<targetExperiences.length; j++) { 7763 if (targetExperiences[j].activityId == rt[i]['activity.id']) { 7764 inList = true; 7765 break; 7766 } 7767 } 7768 if (!inList) { 7769 targetExperiences.push({ 7770 activityId: rt[i]['activity.id'], 7771 activityName: rt[i]['activity.name'], 7772 experienceId: rt[i]['experience.id'], 7773 experienceName: rt[i]['experience.name'] 7774 }); 7775 } 7776 } 7777 } 7778 7779 var eventName = window.targetLoaded ? settings.postPageLoadEvent : settings.pageLoadEvent; 7780 window.targetLoaded = true; 7781 _satellite.track(eventName); 7782 _satellite.logger.info('Adobe Target Toolkit alerted to an Adobe Target response and firing direct call rule ' + eventName); 7783 }); 7784 } 7785 7786 // set failsafe in case Target doesn't load 7787 setTimeout(function() { 7788 if (!window.targetLoaded) { 7789 _satellite.track(settings.pageLoadEvent); 7790 _satellite.logger.info('Target did not load; Adobe Target Toolkit extension firing failsafe event to ensure page is tracked'); 7791 } 7792 }, 5000); 7793}; 7794 7795 } 7796 7797 } 7798 } 7799 }, 7800 "bing-ads-extension": { 7801 "displayName": "Bing Ads UET Tag", 7802 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP05eac6e292f1486a812623da300a51b4/", 7803 "settings": { 7804 "qname": "uetq", 7805 "tagid": "5857068", 7806 "navTimingApi": true, 7807 "storeConvTrackCookies": true 7808 }, 7809 "modules": { 7810 "bing-ads-extension/src/lib/actions/baseTag.js": { 7811 "name": "basetag", 7812 "displayName": "Base Tag", 7813 "script": function(module, exports, require, turbine) { 7814'use strict'; 7815 7816module.exports = function(settings) { 7817 var loadBase = require('../helpers/getBatJsBase'); 7818 7819 loadBase().then(function() { 7820 turbine.logger.log('Base code loaded and a page load event is sent.'); 7821 }); 7822}; 7823 7824 } 7825 7826 }, 7827 "bing-ads-extension/src/lib/helpers/getBatJsBase.js": { 7828 "script": function(module, exports, require, turbine) { 7829'use strict'; 7830 7831module.exports = function () { 7832 var window = require('@adobe/reactor-window'); 7833 var loadScript = require('@adobe/reactor-load-script'); 7834 var extensionSettings = turbine.getExtensionSettings(); 7835 var qname = extensionSettings.qname || 'uetq'; 7836 7837 window[qname] = window[qname] || []; 7838 7839 return loadScript('//bat.bing.com/bat.js').then(function () { 7840 var initData = { 7841 ti: extensionSettings.tagid, 7842 navTimingApi: extensionSettings.navTimingApi, 7843 storeConvTrackCookies: extensionSettings.storeConvTrackCookies, 7844 tm: 'al001' 7845 }; 7846 initData.q = window[qname]; 7847 window[qname] = new UET(initData); 7848 window[qname].push('pageLoad'); 7849 turbine.logger.log('BingAds Base Code successfully loaded.'); 7850 }) 7851 .catch(function () { 7852 turbine.logger.error('BingAds Base Code could not be loaded.'); 7853 }); 7854} 7855 7856 } 7857 7858 } 7859 } 7860 }, 7861 "adobe-analytics": { 7862 "displayName": "Adobe Analytics", 7863 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP31dbb9c60e404ba1aa6e746d49be6f29/", 7864 "settings": { 7865 "orgId": "B3902DB45388D9620A490D4C@AdobeOrg", 7866 "libraryCode": { 7867 "type": "custom", 7868 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/EX84d8ecdb144b49b2987765fa5a5eeef9-libraryCode_source.js', 7869 "trackerVariableName": "s" 7870 }, 7871 "trackerProperties": { 7872 "charSet": "UTF-8", 7873 "currencyCode": "USD", 7874 "trackingServer": "nsmetrics.ni.com", 7875 "trackInlineStats": true, 7876 "trackDownloadLinks": true, 7877 "trackExternalLinks": true, 7878 "linkExternalFilters": [], 7879 "linkInternalFilters": [ 7880 ".ni.com", 7881 "javascript:" 7882 ], 7883 "linkLeaveQueryString": false, 7884 "trackingServerSecure": "smetrics.ni.com", 7885 "linkDownloadFileTypes": [ 7886 "aia", 7887 "apk", 7888 "avi", 7889 "bz2", 7890 "css", 7891 "csv", 7892 "ctl", 7893 "dmg", 7894 "doc", 7895 "docx", 7896 "dxf", 7897 "eps", 7898 "exe", 7899 "gz", 7900 "iso", 7901 "jpg", 7902 "js", 7903 "lc", 7904 "lic", 7905 "llb", 7906 "m4v", 7907 "mov", 7908 "mp3", 7909 "nihelp", 7910 "nipkg", 7911 "opkg", 7912 "pdf", 7913 "png", 7914 "ppt", 7915 "pptx", 7916 "rar", 7917 "sh", 7918 "svg", 7919 "tab", 7920 "txt", 7921 "vi", 7922 "vsd", 7923 "vxd", 7924 "wav", 7925 "wma", 7926 "wmv", 7927 "xls", 7928 "xlsx", 7929 "xml", 7930 "zip", 7931 "icd", 7932 "7z" 7933 ] 7934 } 7935 }, 7936 "modules": { 7937 "adobe-analytics/src/lib/actions/setVariables.js": { 7938 "name": "set-variables", 7939 "displayName": "Set Variables", 7940 "script": function(module, exports, require, turbine) { 7941/************************************************************************* 7942* ADOBE CONFIDENTIAL 7943* ___________________ 7944* 7945* Copyright 2016 Adobe Systems Incorporated 7946* All Rights Reserved. 7947*
7948* NOTICE: All information contained herein is, and remains 7949* the property of Adobe Systems Incorporated and its suppliers, 7950* if any. The intellectual and technical concepts contained 7951* herein are proprietary to Adobe Systems Incorporated and its 7952* suppliers and are protected by all applicable intellectual property 7953* laws, including trade secret and copyright laws. 7954* Dissemination of this information or reproduction of this material 7955* is strictly forbidden unless prior written permission is obtained 7956* from Adobe Systems Incorporated. 7957**************************************************************************/ 7958 7959'use strict'; 7960 7961var getTracker = require('../sharedModules/getTracker'); 7962var applyTrackerVariables = require('../helpers/applyTrackerVariables'); 7963 7964module.exports = function(settings, event) { 7965 return getTracker().then(function(tracker) { 7966 turbine.logger.info('Set variables on the tracker.'); 7967 applyTrackerVariables(tracker, settings.trackerProperties); 7968 if (settings.customSetup && settings.customSetup.source) { 7969 settings.customSetup.source.call(event.element, event, tracker); 7970 } 7971 }, function(errorMessage) { 7972 turbine.logger.error( 7973 'Cannot set variables: ' + 7974 errorMessage 7975 ); 7976 }); 7977}; 7978 7979 } 7980 7981 }, 7982 "adobe-analytics/src/lib/actions/sendBeacon.js": { 7983 "name": "send-beacon", 7984 "displayName": "Send Beacon", 7985 "script": function(module, exports, require, turbine) { 7986/************************************************************************* 7987* ADOBE CONFIDENTIAL 7988* ___________________ 7989* 7990* Copyright 2016 Adobe Systems Incorporated 7991* All Rights Reserved. 7992*
7993* NOTICE: All information contained herein is, and remains 7994* the property of Adobe Systems Incorporated and its suppliers, 7995* if any. The intellectual and technical concepts contained 7996* herein are proprietary to Adobe Systems Incorporated and its 7997* suppliers and are protected by all applicable intellectual property 7998* laws, including trade secret and copyright laws. 7999* Dissemination of this information or reproduction of this material 8000* is strictly forbidden unless prior written permission is obtained 8001* from Adobe Systems Incorporated. 8002**************************************************************************/ 8003 8004'use strict'; 8005 8006var getTracker = require('../sharedModules/getTracker'); 8007var getNodeLinkText = require('../helpers/getNodeLinkText'); 8008 8009var isLink = function(element) { 8010 return element && element.nodeName && element.nodeName.toLowerCase() === 'a'; 8011}; 8012 8013var getLinkName = function(element) { 8014 if (isLink(element)) { 8015 return getNodeLinkText(element); 8016 } else { 8017 return 'link clicked'; 8018 } 8019}; 8020 8021var sendBeacon = function(tracker, settings, targetElement) { 8022 if (settings.type === 'page') { 8023 turbine.logger.info('Firing page view beacon.'); 8024 tracker.t(); 8025 } else { 8026 var linkSettings = { 8027 linkType: settings.linkType || 'o', 8028 linkName: settings.linkName || getLinkName(targetElement) 8029 }; 8030 8031 turbine.logger.info( 8032 'Firing link track beacon using the values: ' + 8033 JSON.stringify(linkSettings) + '.' 8034 ); 8035 8036 tracker.tl( 8037 isLink(targetElement) ? targetElement : 'true', 8038 linkSettings.linkType, 8039 linkSettings.linkName 8040 ); 8041 } 8042}; 8043 8044module.exports = function(settings, event) { 8045 return getTracker().then(function(tracker) { 8046 sendBeacon(tracker, settings, event.element); 8047 }, function(errorMessage) { 8048 turbine.logger.error( 8049 'Cannot send beacon: ' + 8050 errorMessage 8051 ); 8052 }); 8053}; 8054 8055 } 8056 8057 }, 8058 "adobe-analytics/src/lib/actions/clearVariables.js": { 8059 "name": "clear-variables", 8060 "displayName": "Clear Variables", 8061 "script": function(module, exports, require, turbine) { 8062/************************************************************************* 8063* ADOBE CONFIDENTIAL 8064* ___________________ 8065* 8066* Copyright 2016 Adobe Systems Incorporated 8067* All Rights Reserved. 8068*
8069* NOTICE: All information contained herein is, and remains 8070* the property of Adobe Systems Incorporated and its suppliers, 8071* if any. The intellectual and technical concepts contained 8072* herein are proprietary to Adobe Systems Incorporated and its 8073* suppliers and are protected by all applicable intellectual property 8074* laws, including trade secret and copyright laws. 8075* Dissemination of this information or reproduction of this material 8076* is strictly forbidden unless prior written permission is obtained 8077* from Adobe Systems Incorporated. 8078**************************************************************************/ 8079 8080'use strict'; 8081 8082var getTracker = require('../sharedModules/getTracker'); 8083 8084module.exports = function() { 8085 return getTracker().then(function(tracker) { 8086 if (tracker.clearVars) { 8087 turbine.logger.info('Clear variables.'); 8088 tracker.clearVars(); 8089 } 8090 }, function(errorMessage) { 8091 turbine.logger.error( 8092 'Cannot clear variables: ' + 8093 errorMessage 8094 ); 8095 }); 8096}; 8097 8098 } 8099 8100 }, 8101 "adobe-analytics/src/lib/sharedModules/getTracker.js": { 8102 "script": function(module, exports, require, turbine) { 8103/************************************************************************* 8104* ADOBE CONFIDENTIAL 8105* ___________________ 8106* 8107* Copyright 2016 Adobe Systems Incorporated 8108* All Rights Reserved. 8109*
8110* NOTICE: All information contained herein is, and remains 8111* the property of Adobe Systems Incorporated and its suppliers, 8112* if any. The intellectual and technical concepts contained 8113* herein are proprietary to Adobe Systems Incorporated and its 8114* suppliers and are protected by all applicable intellectual property 8115* laws, including trade secret and copyright laws. 8116* Dissemination of this information or reproduction of this material 8117* is strictly forbidden unless prior written permission is obtained 8118* from Adobe Systems Incorporated. 8119**************************************************************************/ 8120 8121'use strict'; 8122 8123var cookie = require('@adobe/reactor-cookie'); 8124var Promise = require('@adobe/reactor-promise'); 8125var window = require('@adobe/reactor-window'); 8126var settingsHelper = require('../helpers/settingsHelper'); 8127var augmenters = require('../helpers/augmenters'); 8128 8129var applyTrackerVariables = require('../helpers/applyTrackerVariables'); 8130var loadLibrary = require('../helpers/loadLibrary'); 8131var generateVersion = require('../helpers/generateVersion'); 8132 8133var version = generateVersion(turbine.buildInfo.turbineBuildDate); 8134var BEFORE_SETTINGS_LOAD_PHASE = 'beforeSettings'; 8135 8136var mcidInstance = turbine.getSharedModule('adobe-mcid', 'mcid-instance'); 8137 8138var checkEuCompliance = function(trackingCoookieName) { 8139 if (!trackingCoookieName) { 8140 return true; 8141 } 8142 8143 var euCookieValue = cookie.get(trackingCoookieName); 8144 return euCookieValue === 'true'; 8145}; 8146 8147var augmentTracker = function(tracker) { 8148 return Promise.all(augmenters.map(function(augmenterFn) { 8149 var result; 8150 8151 // If a tracker augmenter fails, we don't want to fail too. We'll re-throw the error in a 8152 // timeout so it still hits the console but doesn't reject our promise. 8153 try { 8154 result = augmenterFn(tracker); 8155 } catch (e) { 8156 setTimeout(function() { 8157 throw e; 8158 }); 8159 } 8160 8161 return Promise.resolve(result); 8162 })).then(function() { 8163 return tracker; 8164 }); 8165}; 8166 8167var linkVisitorId = function(tracker) { 8168 if (mcidInstance) { 8169 turbine.logger.info('Setting MCID instance on the tracker.'); 8170 tracker.visitor = mcidInstance; 8171 } 8172 8173 return tracker; 8174}; 8175 8176var updateTrackerVersion = function(tracker) { 8177 turbine.logger.info('Setting version on tracker: "' + version + '".'); 8178 8179 if (typeof tracker.tagContainerMarker !== 'undefined') { 8180 tracker.tagContainerMarker = version; 8181 } else if (typeof tracker.version === 'string' 8182 && tracker.version.substring(tracker.version.length - 5) !== ('-' + version)) { 8183 tracker.version += '-' + version; 8184 } 8185 8186 return tracker; 8187}; 8188 8189var updateTrackerVariables = function(trackerProperties, customSetup, tracker) { 8190 if (customSetup.loadPhase === BEFORE_SETTINGS_LOAD_PHASE && customSetup.source) { 8191 turbine.logger.info('Calling custom script before settings.'); 8192 customSetup.source.call(window, tracker); 8193 } 8194 8195 applyTrackerVariables(tracker, trackerProperties || {}); 8196 8197 if (customSetup.loadPhase !== BEFORE_SETTINGS_LOAD_PHASE && customSetup.source) { 8198 turbine.logger.info('Calling custom script after settings.'); 8199 customSetup.source.call(window, tracker); 8200 } 8201 8202 return tracker; 8203}; 8204 8205var initializeAudienceManagement = function(settings, tracker) { 8206 if (settingsHelper.isAudienceManagementEnabled(settings)) { 8207 tracker.loadModule('AudienceManagement'); 8208 turbine.logger.info('Initializing AudienceManagement module'); 8209 tracker.AudienceManagement.setup(settings.moduleProperties.audienceManager.config); 8210 } 8211 return tracker; 8212}; 8213 8214var initialize = function(settings) { 8215 if (checkEuCompliance(settings.trackingCookieName)) { 8216 return loadLibrary(settings) 8217 .then(augmentTracker) 8218 .then(linkVisitorId) 8219 .then(updateTrackerVersion) 8220 .then(updateTrackerVariables.bind( 8221 null, 8222 settings.trackerProperties, 8223 settings.customSetup || {} 8224 )) 8225 .then(initializeAudienceManagement.bind(null, settings)); 8226 } else { 8227 return Promise.reject('EU compliance was not acknowledged by the user.'); 8228 } 8229}; 8230 8231var promise = initialize(turbine.getExtensionSettings()); 8232module.exports = function() { 8233 return promise; 8234}; 8235 8236 } 8237, 8238 "name": "get-tracker", 8239 "shared": true 8240 }, 8241 "adobe-analytics/src/lib/sharedModules/augmentTracker.js": { 8242 "name": "augment-tracker", 8243 "shared": true, 8244 "script": function(module, exports, require, turbine) { 8245/************************************************************************* 8246 * ADOBE CONFIDENTIAL 8247 * ___________________ 8248 * 8249 * Copyright 2017 Adobe Systems Incorporated 8250 * All Rights Reserved. 8251 *
8252 * NOTICE: All information contained herein is, and remains 8253 * the property of Adobe Systems Incorporated and its suppliers, 8254 * if any. The intellectual and technical concepts contained 8255 * herein are proprietary to Adobe Systems Incorporated and its 8256 * suppliers and are protected by all applicable intellectual property 8257 * laws, including trade secret and copyright laws. 8258 * Dissemination of this information or reproduction of this material 8259 * is strictly forbidden unless prior written permission is obtained 8260 * from Adobe Systems Incorporated. 8261 **************************************************************************/ 8262 8263'use strict'; 8264 8265var augmenters = require('../helpers/augmenters'); 8266 8267module.exports = function(fn) { 8268 augmenters.push(fn); 8269}; 8270 8271 } 8272 8273 }, 8274 "adobe-analytics/src/lib/helpers/applyTrackerVariables.js": { 8275 "script": function(module, exports, require, turbine) { 8276/************************************************************************* 8277* ADOBE CONFIDENTIAL 8278* ___________________ 8279* 8280* Copyright 2016 Adobe Systems Incorporated 8281* All Rights Reserved. 8282*
8283* NOTICE: All information contained herein is, and remains 8284* the property of Adobe Systems Incorporated and its suppliers, 8285* if any. The intellectual and technical concepts contained 8286* herein are proprietary to Adobe Systems Incorporated and its 8287* suppliers and are protected by all applicable intellectual property 8288* laws, including trade secret and copyright laws. 8289* Dissemination of this information or reproduction of this material 8290* is strictly forbidden unless prior written permission is obtained 8291* from Adobe Systems Incorporated. 8292**************************************************************************/ 8293 8294'use strict'; 8295 8296var queryString = require('@adobe/reactor-query-string'); 8297var window = require('@adobe/reactor-window'); 8298 8299var eVarRegExp = /eVar([0-9]+)/; 8300var propRegExp = /prop([0-9]+)/; 8301var linkTrackVarsKeys = new RegExp('^(eVar[0-9]+)|(prop[0-9]+)|(hier[0-9]+)|campaign|purchaseID|' + 8302 'channel|server|state|zip|pageType$'); 8303 8304var onlyUnique = function(value, index, self) { 8305 return self.indexOf(value) === index; 8306}; 8307 8308var buildLinkTrackVars = function(tracker, newTrackerProperties, addEvents) { 8309 var linkTrackVarsValues = Object.keys(newTrackerProperties) 8310 .filter(linkTrackVarsKeys.test.bind(linkTrackVarsKeys)); 8311 8312 if (addEvents) { 8313 linkTrackVarsValues.push('events'); 8314 } 8315 8316 // Merge with the values already set on tracker. 8317 linkTrackVarsValues = linkTrackVarsValues.concat((tracker.linkTrackVars || '').split(',')); 8318 8319 return linkTrackVarsValues.filter(function(value, index) { 8320 return value !== 'None' && value && onlyUnique(value, index, linkTrackVarsValues); 8321 }).join(','); 8322}; 8323 8324var buildLinkTrackEvents = function(tracker, eventsData) { 8325 var linkTrackEventsValues = eventsData.map(function(event) { 8326 return event.name; 8327 }); 8328 8329 // Merge with the values already set on tracker. 8330 linkTrackEventsValues = linkTrackEventsValues.concat((tracker.linkTrackEvents || '').split(',')); 8331 8332 return linkTrackEventsValues.filter(function(value, index) { 8333 return value !== 'None' && onlyUnique(value, index, linkTrackEventsValues); 8334 }).join(','); 8335}; 8336 8337var commaJoin = function(store, keyName, trackerProperties) { 8338 store[keyName] = trackerProperties[keyName].join(','); 8339}; 8340 8341var variablesTransform = function(store, keyName, trackerProperties) { 8342 var dynamicVariablePrefix = trackerProperties.dynamicVariablePrefix || 'D='; 8343 8344 trackerProperties[keyName].forEach(function(variableData) { 8345 var value; 8346 if (variableData.type === 'value') { 8347 value = variableData.value; 8348 } else { 8349 var eVarData = eVarRegExp.exec(variableData.value); 8350 8351 if (eVarData) { 8352 value = dynamicVariablePrefix + 'v' + eVarData[1]; 8353 } else { 8354 var propData = propRegExp.exec(variableData.value); 8355 8356 if (propData) { 8357 value = dynamicVariablePrefix + 'c' + propData[1]; 8358 } 8359 } 8360 } 8361 8362 store[variableData.name] = value; 8363 }); 8364}; 8365 8366var transformers = { 8367 linkDownloadFileTypes: commaJoin, 8368 linkExternalFilters: commaJoin, 8369 linkInternalFilters: commaJoin, 8370 hierarchies: function(store, keyName, trackerProperties) { 8371 trackerProperties[keyName].forEach(function(hierarchyData) { 8372 store[hierarchyData.name] = hierarchyData.sections.join(hierarchyData.delimiter); 8373 }); 8374 }, 8375 props: variablesTransform, 8376 eVars: variablesTransform, 8377 campaign: function(store, keyName, trackerProperties) { 8378 if (trackerProperties[keyName].type === 'queryParam') { 8379 var queryParams = queryString.parse(window.location.search); 8380 store[keyName] = queryParams[trackerProperties[keyName].value]; 8381 } else { 8382 store[keyName] = trackerProperties[keyName].value; 8383 } 8384 }, 8385 events: function(store, keyName, trackerProperties) { 8386 var events = trackerProperties[keyName].map(function(data) { 8387 var entry = data.name; 8388 if (data.id) { 8389 entry = [entry, data.id].join(':'); 8390 } 8391 if (data.value) { 8392 entry = [entry, data.value].join('='); 8393 } 8394 return entry; 8395 }); 8396 store[keyName] = events.join(','); 8397 } 8398}; 8399 8400module.exports = function(tracker, trackerProperties) { 8401 var newProperties = {}; 8402 trackerProperties = trackerProperties || {}; 8403
8404 Object.keys(trackerProperties).forEach(function(propertyName) { 8405 var transform = transformers[propertyName]; 8406 var value = trackerProperties[propertyName]; 8407 8408 if (transform) { 8409 transform(newProperties, propertyName, trackerProperties); 8410 } else { 8411 newProperties[propertyName] = value; 8412 } 8413 }); 8414 8415 // New events are added to existing tracker events 8416 if (newProperties.events) { 8417 if (tracker.events && tracker.events.length > 0) { 8418 newProperties.events = tracker.events + ',' + newProperties.events; 8419 } 8420 } 8421 8422 var hasEvents = 8423 trackerProperties && trackerProperties.events && trackerProperties.events.length > 0; 8424 var linkTrackVars = buildLinkTrackVars(tracker, newProperties, hasEvents); 8425 if (linkTrackVars) { 8426 newProperties.linkTrackVars = linkTrackVars; 8427 } 8428 8429 var linkTrackEvents = buildLinkTrackEvents(tracker, trackerProperties.events || []); 8430 if (linkTrackEvents) { 8431 newProperties.linkTrackEvents = linkTrackEvents; 8432 } 8433 8434 turbine.logger.info( 8435 'Applying the following properties on tracker: "' + 8436 JSON.stringify(newProperties) + 8437 '".' 8438 ); 8439 8440 Object.keys(newProperties).forEach(function(propertyName) { 8441 tracker[propertyName] = newProperties[propertyName]; 8442 }); 8443}; 8444 8445 } 8446 8447 }, 8448 "adobe-analytics/src/lib/helpers/settingsHelper.js": { 8449 "script": function(module, exports, require, turbine) { 8450/************************************************************************* 8451 * ADOBE CONFIDENTIAL 8452 * ___________________ 8453 * 8454 * Copyright 2020 Adobe Systems Incorporated 8455 * All Rights Reserved. 8456 *
8457 * NOTICE: All information contained herein is, and remains 8458 * the property of Adobe Systems Incorporated and its suppliers, 8459 * if any. The intellectual and technical concepts contained 8460 * herein are proprietary to Adobe Systems Incorporated and its 8461 * suppliers and are protected by all applicable intellectual property 8462 * laws, including trade secret and copyright laws. 8463 * Dissemination of this information or reproduction of this material 8464 * is strictly forbidden unless prior written permission is obtained 8465 * from Adobe Systems Incorporated. 8466 **************************************************************************/ 8467 8468'use strict'; 8469 8470var window = require('@adobe/reactor-window'); 8471 8472var settingsHelper = { 8473 LIB_TYPES: { 8474 MANAGED: 'managed', 8475 PREINSTALLED: 'preinstalled', 8476 REMOTE: 'remote', 8477 CUSTOM: 'custom' 8478 }, 8479 8480 MANAGED_LIB_PATHS: { 8481 APP_MEASUREMENT: 'AppMeasurement.js', 8482 ACTIVITY_MAP: 'AppMeasurement_Module_ActivityMap.js', 8483 AUDIENCE_MANAGEMENT: 'AppMeasurement_Module_AudienceManagement.js', 8484 }, 8485 8486 getReportSuites: function(reportSuitesData) { 8487 var reportSuiteValues = reportSuitesData.production; 8488 if (reportSuitesData[turbine.environment.stage]) { 8489 reportSuiteValues = reportSuitesData[turbine.environment.stage]; 8490 } 8491 8492 return reportSuiteValues.join(','); 8493 }, 8494 8495 isActivityMapEnabled: function(settings) { 8496 return !(settings.libraryCode && 8497 !settings.libraryCode.useActivityMap && 8498 settings.libraryCode.useActivityMap === false); 8499 }, 8500 8501 isAudienceManagementEnabled: function(settings) { 8502 var isEnabled = false; 8503 // check if audience management module should be enabled 8504 if (settings && 8505 settings.moduleProperties && 8506 settings.moduleProperties.audienceManager && 8507 settings.moduleProperties.audienceManager.config && 8508 window && 8509 window._satellite && 8510 window._satellite.company && 8511 window._satellite.company.orgId) { 8512 isEnabled = true; 8513 } 8514 8515 return isEnabled; 8516 } 8517}; 8518 8519module.exports = settingsHelper; 8520 8521 } 8522 8523 }, 8524 "adobe-analytics/src/lib/helpers/augmenters.js": { 8525 "script": function(module, exports, require, turbine) { 8526/************************************************************************* 8527 * ADOBE CONFIDENTIAL 8528 * ___________________ 8529 * 8530 * Copyright 2017 Adobe Systems Incorporated 8531 * All Rights Reserved. 8532 *
8533 * NOTICE: All information contained herein is, and remains 8534 * the property of Adobe Systems Incorporated and its suppliers, 8535 * if any. The intellectual and technical concepts contained 8536 * herein are proprietary to Adobe Systems Incorporated and its 8537 * suppliers and are protected by all applicable intellectual property 8538 * laws, including trade secret and copyright laws. 8539 * Dissemination of this information or reproduction of this material 8540 * is strictly forbidden unless prior written permission is obtained 8541 * from Adobe Systems Incorporated. 8542 **************************************************************************/ 8543 8544'use strict'; 8545 8546module.exports = []; 8547 8548 } 8549 8550 }, 8551 "adobe-analytics/src/lib/helpers/loadLibrary.js": { 8552 "script": function(module, exports, require, turbine) { 8553/************************************************************************* 8554* ADOBE CONFIDENTIAL 8555* ___________________ 8556* 8557* Copyright 2016 Adobe Systems Incorporated 8558* All Rights Reserved. 8559* 8560* NOTICE: All information contained herein
8560is, and remains 8561* the property of Adobe Systems Incorporated and its suppliers, 8562* if any. The intellectual and technical concepts contained 8563* herein are proprietary to Adobe Systems Incorporated and its 8564* suppliers and are protected by all applicable intellectual property 8565* laws, including trade secret and copyright laws. 8566* Dissemination of this information or reproduction of this material 8567* is strictly forbidden unless prior written permission is obtained 8568* from Adobe Systems Incorporated. 8569**************************************************************************/ 8570 8571'use strict'; 8572 8573var loadScript = require('@adobe/reactor-load-script'); 8574var window = require('@adobe/reactor-window'); 8575var Promise = require('@adobe/reactor-promise'); 8576var settingsHelper = require('./settingsHelper'); 8577var pollHelper = require('./pollHelper'); 8578 8579var createTracker = function(settings, reportSuites) { 8580 if (!window.s_gi) { 8581 throw new Error( 8582 'Unable to create AppMeasurement tracker, `s_gi` function not found.' + window.AppMeasurement 8583 ); 8584 } 8585 turbine.logger.info('Creating AppMeasurement tracker with these report suites: "' + 8586 reportSuites + '"'); 8587 var tracker = window.s_gi(reportSuites); 8588 if (settings.libraryCode.scopeTrackerGlobally) { 8589 turbine.logger.info('Setting the tracker as window.s'); 8590 window.s = tracker; 8591 } 8592 return tracker; 8593}; 8594 8595/** 8596 * @param settings 8597 * 8598 * @return array 8599 */ 8600var getUrlsToLoad = function(settings) { 8601 var urls = []; 8602 switch (settings.libraryCode.type) { 8603 case settingsHelper.LIB_TYPES.MANAGED: 8604 // load app measurement 8605 urls.push(turbine.getHostedLibFileUrl(settingsHelper.MANAGED_LIB_PATHS.APP_MEASUREMENT)); 8606 // check if activity map should be loaded 8607 if (settingsHelper.isActivityMapEnabled(settings)) { 8608 urls.push(turbine.getHostedLibFileUrl(settingsHelper.MANAGED_LIB_PATHS.ACTIVITY_MAP)); 8609 } 8610 break; 8611 case settingsHelper.LIB_TYPES.CUSTOM: 8612 urls.push(settings.libraryCode.source); 8613 break; 8614 case settingsHelper.LIB_TYPES.REMOTE: 8615 urls.push(window.location.protocol === 'https:' ? 8616 settings.libraryCode.httpsUrl : settings.libraryCode.httpUrl); 8617 break; 8618 } 8619 // check if audience management should be loaded 8620 if (settingsHelper.isAudienceManagementEnabled(settings)) { 8621 var visitorServiceConfig = { 8622 namespace: window._satellite.company.orgId 8623 }; 8624 settings.moduleProperties.audienceManager.config.visitorService = visitorServiceConfig; 8625 urls.push(turbine.getHostedLibFileUrl(settingsHelper.MANAGED_LIB_PATHS.AUDIENCE_MANAGEMENT)); 8626 } 8627 return urls; 8628}; 8629 8630var loadLibraryScripts = function(settings) { 8631 return Promise.all(getUrlsToLoad(settings).map(function(url) { 8632 turbine.logger.info("Loading script: " + url); 8633 return loadScript(url); 8634 })); 8635}; 8636 8637var setReportSuitesOnTracker = function(settings, tracker) { 8638 if (settings.libraryCode.accounts) { 8639 if (!tracker.sa) { 8640 turbine.logger.warn('Cannot set report suites on tracker. `sa` method not available.'); 8641 } else { 8642 var reportSuites = settingsHelper.getReportSuites(settings.libraryCode.accounts); 8643 turbine.logger.info('Setting the following report suites on the tracker: "' + 8644 reportSuites + '"'); 8645 tracker.sa(reportSuites); 8646 } 8647 } 8648 8649 return tracker; 8650}; 8651 8652var getTrackerFromVariable = function(trackerVariableName) { 8653 if (window[trackerVariableName]) { 8654 turbine.logger.info('Found tracker located at: "' + trackerVariableName + '".'); 8655 return window[trackerVariableName]; 8656 } else { 8657 throw new Error('Cannot find the global variable name: "' + trackerVariableName + '".'); 8658 } 8659}; 8660 8661// returns a promise that resolves with the tracker 8662module.exports = function(settings) { 8663 // loads all libraries from urls in parallel 8664 var loadLibraries = loadLibraryScripts(settings); 8665 8666 // now setup the tracker 8667 switch (settings.libraryCode.type) { 8668 case settingsHelper.LIB_TYPES.MANAGED: 8669 var reportSuites = settingsHelper.getReportSuites(settings.libraryCode.accounts); 8670 return loadLibraries 8671 .then(createTracker.bind(null, settings, reportSuites)); 8672 8673 case settingsHelper.LIB_TYPES.PREINSTALLED: 8674 return loadLibraries 8675 .then(pollHelper.poll.bind(null, window, settings.libraryCode.trackerVariableName)) 8676 .then(setReportSuitesOnTracker.bind(null, settings)); 8677 8678 case settingsHelper.LIB_TYPES.CUSTOM: 8679 case settingsHelper.LIB_TYPES.REMOTE: 8680 return loadLibraries 8681 .then(getTrackerFromVariable.bind(null, settings.libraryCode.trackerVariableName)) 8682 .then(setReportSuitesOnTracker.bind(null, settings)); 8683 8684 default: 8685 throw new Error('Cannot load library. Type not supported.'); 8686 8687 } 8688}; 8689 8690 } 8691 8692 }, 8693 "adobe-analytics/src/lib/helpers/generateVersion.js": { 8694 "script": function(module, exports, require, turbine) { 8695/************************************************************************* 8696* ADOBE CONFIDENTIAL 8697* ___________________ 8698* 8699* Copyright 2016 Adobe Systems Incorporated 8700* All Rights Reserved. 8701*
8702* NOTICE: All information contained herein is, and remains 8703* the property of Adobe Systems Incorporated and its suppliers, 8704* if any. The intellectual and technical concepts contained 8705* herein are proprietary to Adobe Systems Incorporated and its 8706* suppliers and are protected by all applicable intellectual property 8707* laws, including trade secret and copyright laws. 8708* Dissemination of this information or reproduction of this material 8709* is strictly forbidden unless prior written permission is obtained 8710* from Adobe Systems Incorporated. 8711**************************************************************************/ 8712 8713// The Launch code version is a 4 characters string. The first character will always be L 8714// followed by year, month, and day codes. 8715// For example: JS-1.4.3-L53O = JS 1.4.3 code, Launch 2015 March 24th release (revision 1) 8716// More info: https://wiki.corp.adobe.com/pages/viewpage.action?spaceKey=tagmanager&title=DTM+Analytics+Code+Versions 8717 8718'use strict'; 8719 8720var THIRD_OF_DAY = 8; //hours 8721 8722var getDayField = function(date) { 8723 return date.getUTCDate().toString(36); 8724}; 8725 8726var getLastChar = function(str) { 8727 return str.substr(str.length - 1); 8728}; 8729 8730var getRevision = function(date) { 8731 // We are under the assumption that a Turbine version will be release at least 8h apart (max 3 8732 // releases per day). 8733 return Math.floor(date.getUTCHours() / THIRD_OF_DAY); 8734}; 8735 8736var getMonthField = function(date) { 8737 var monthNumber = date.getUTCMonth() + 1; 8738 var revision = getRevision(date); 8739 8740 var monthField = (monthNumber + revision * 12).toString(36); 8741 8742 return getLastChar(monthField); 8743}; 8744 8745var getYearField = function(date) { 8746 return (date.getUTCFullYear() - 2010).toString(36); 8747}; 8748 8749module.exports = function(dateString) { 8750 var date = new Date(dateString); 8751 8752 if (isNaN(date)) { 8753 throw new Error('Invalid date provided'); 8754 } 8755 8756 return ('L' + getYearField(date) + getMonthField(date) + getDayField(date)).toUpperCase(); 8757}; 8758 8759 } 8760 8761 }, 8762 "adobe-analytics/src/lib/helpers/pollHelper.js": { 8763 "script": function(module, exports, require, turbine) { 8764/************************************************************************* 8765 * ADOBE CONFIDENTIAL 8766 * ___________________ 8767 * 8768 * Copyright 2020 Adobe Systems Incorporated 8769 * All Rights Reserved. 8770 *
8771 * NOTICE: All information contained herein is, and remains 8772 * the property of Adobe Systems Incorporated and its suppliers, 8773 * if any. The intellectual and technical concepts contained 8774 * herein are proprietary to Adobe Systems Incorporated and its 8775 * suppliers and are protected by all applicable intellectual property 8776 * laws, including trade secret and copyright laws. 8777 * Dissemination of this information or reproduction of this material 8778 * is strictly forbidden unless prior written permission is obtained 8779 * from Adobe Systems Incorporated. 8780 **************************************************************************/ 8781 8782'use strict'; 8783 8784var Promise = require('@adobe/reactor-promise'); 8785 8786var MAX_ITERATIONS = 40; 8787var INTERVAL = 250; 8788 8789var found = function(resolve, variableName, result) { 8790 turbine.logger.info('Found property located at: "' + variableName + '"].'); 8791 resolve(result); 8792}; 8793 8794var getPromise = function(object, variableName) { 8795 return new Promise(function(resolve, reject) { 8796 if (object[variableName]) { 8797 return found(resolve, variableName, object[variableName]); 8798 } 8799 var i = 1; 8800 var intervalId = setInterval(function() { 8801 if (object[variableName]) { 8802 found(resolve, variableName, object[variableName]); 8803 clearInterval(intervalId); 8804 } 8805 // give up after 10 seconds 8806 if (i >= MAX_ITERATIONS) { 8807 clearInterval(intervalId); 8808 reject(new Error( 8809 'Bailing out. Cannot find the variable name: "' + variableName + '"].')); 8810 } 8811 i++; 8812 }, INTERVAL); // every 1/4th second 8813 }); 8814}; 8815 8816module.exports = { 8817 poll: function(object, variableName) { 8818 turbine.logger.info('Waiting for the property to become accessible at: "' 8819 + variableName + '"].'); 8820 return getPromise(object, variableName); 8821 } 8822}; 8823 8824 } 8825 8826 }, 8827 "adobe-analytics/src/lib/helpers/getNodeLinkText.js": { 8828 "script": function(module, exports, require, turbine) { 8829/************************************************************************* 8830* ADOBE CONFIDENTIAL 8831* ___________________ 8832* 8833* Copyright 2016 Adobe Systems Incorporated 8834* All Rights Reserved. 8835*
8836* NOTICE: All information contained herein is, and remains 8837* the property of Adobe Systems Incorporated and its suppliers, 8838* if any. The intellectual and technical concepts contained 8839* herein are proprietary to Adobe Systems Incorporated and its 8840* suppliers and are protected by all applicable intellectual property 8841* laws, including trade secret and copyright laws. 8842* Dissemination of this information or reproduction of this material 8843* is strictly forbidden unless prior written permission is obtained 8844* from Adobe Systems Incorporated. 8845**************************************************************************/ 8846 8847'use strict'; 8848 8849/** 8850 * Reduces repeated whitespace within a string. Whitespace surrounding the string 8851 * is trimmed and any occurrence of whitespace within the string is replaced with 8852 * a single space. 8853 * @param {string} str String to be formatted. 8854 * @returns {string} Formatted string. 8855 */ 8856var truncateWhiteSpace = function(str) { 8857 return str && str.replace(/\s+/g, ' ').trim(); 8858}; 8859 8860var unsupportedNodeNames = /^(SCRIPT|STYLE|LINK|CANVAS|NOSCRIPT|#COMMENT)$/i; 8861 8862/** 8863 * Determines if a node qualifies as a supported link text node. 8864 * @param {*} node Node to determine support for. 8865 * @returns {boolean} 8866 */ 8867var isSupportedTextNode = function(node) { 8868 if (node && node.nodeName) { 8869 if (node.nodeName.match(unsupportedNodeNames)) { 8870 return false; 8871 } 8872 } 8873 return true; 8874}; 8875 8876/** 8877 * Orders and returns specified node and its child nodes in arrays of supported 8878 * and unsupported nodes. 8879 * @param {*} node The node to extract supported and unsupported nodes from. 8880 * @returns {{supportedNodes: Array, includesUnsupportedNodes: boolean}} Node support object. 8881 */ 8882var extractSupportedNodes = function(node) { 8883 var supportedNodes = []; 8884 var includesUnsupportedNodes = false; 8885 if (isSupportedTextNode(node)) { 8886 supportedNodes.push(node); 8887 if (node.childNodes) { 8888 var childNodes = Array.prototype.slice.call(node.childNodes); 8889 childNodes.forEach(function(childNode) { 8890 var nodes = extractSupportedNodes(childNode); 8891 supportedNodes = supportedNodes.concat(nodes.supportedNodes
8891); 8892 includesUnsupportedNodes = includesUnsupportedNodes || nodes.includesUnsupportedNodes; 8893 }); 8894 } 8895 } else { 8896 includesUnsupportedNodes = true; 8897 } 8898 return { 8899 supportedNodes:supportedNodes, 8900 includesUnsupportedNodes:includesUnsupportedNodes 8901 }; 8902}; 8903 8904/** 8905 * Returns the value of a node attribute. 8906 * @param {*} node The node holding the attribute. 8907 * @param {string} attributeName The name of the attribute. 8908 * @param {string} nodeName Optional node name constraint. 8909 * @returns {string} Attribute value or undefined. 8910 */ 8911var getNodeAttributeValue = function(node, attributeName, nodeName) { 8912 var attributeValue; 8913 if (!nodeName || nodeName === node.nodeName.toUpperCase()) { 8914 attributeValue = node.getAttribute(attributeName); 8915 } 8916 return attributeValue; 8917}; 8918 8919/** 8920 * Extracts a link-name from a given node. This closely mirrors the logic 8921 * used in ActivityMap to determine link-names. 8922 * 8923 * The returned link-name is set to one of the following (in order of priority): 8924 * 8925 * 1. Clicked node innerText 8926 * 2. Clicked node textContent 8927 * 3. Clicked node and its child nodes nodeValue appended together. 8928 * 4. Clicked node alt attribute or node descendant alt attribute. 8929 * Whichever is found first. 8930 * 5. Clicked node text attribute or node descendant text attribute. 8931 * Whichever is found first. 8932 * 6. Clicked node INPUT descendant value attribute. 8933 * Whichever is found first. 8934 * 7. Clicked node IMG descendant src attribute. 8935 * Whichever is found first. 8936 * 8937 * @param {*} node The node to find link text for. 8938 * @returns {string} link-name or an empty string if not link-name is found. 8939 */ 8940module.exports = function(node) { 8941 var nodeText = truncateWhiteSpace(node.innerText || node.textContent); 8942 var nodes = extractSupportedNodes(node);
8943 if (!nodeText || nodes.includesUnsupportedNodes) { 8944 var alt; 8945 var title; 8946 var inputValue; 8947 var imgSrc; 8948 var texts = []; 8949 nodes.supportedNodes.forEach(function(supportedNode) { 8950 if (supportedNode.getAttribute) { 8951 alt = alt || truncateWhiteSpace(supportedNode.getAttribute('alt')); 8952 title = title || truncateWhiteSpace(supportedNode.getAttribute('title')); 8953 inputValue = inputValue || truncateWhiteSpace( 8954 getNodeAttributeValue(supportedNode, 'value', 'INPUT')); 8955 imgSrc = imgSrc || truncateWhiteSpace( 8956 getNodeAttributeValue(supportedNode, 'src', 'IMG')); 8957 } 8958 if (supportedNode.nodeValue) { 8959 texts.push(supportedNode.nodeValue); 8960 } 8961 }); 8962 nodeText = truncateWhiteSpace(texts.join('')); 8963 if (!nodeText) { 8964 nodeText = truncateWhiteSpace(alt || title || inputValue || imgSrc || ''); 8965 } 8966 } 8967 return nodeText; 8968}; 8969 8970 } 8971 8972 } 8973 } 8974 }, 8975 "linkedin": { 8976 "displayName": "LinkedIn Insight Tag", 8977 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP56446adda5514f21aa663f9e3635ddaa/", 8978 "settings": { 8979 "insightTagID": "497961" 8980 }, 8981 "modules": { 8982 "linkedin/src/lib/actions/loadInsightTag.js": { 8983 "name": "load-insight-tag", 8984 "displayName": "Load Insight Tag", 8985 "script": function(module, exports, require, turbine) { 8986'use strict'; 8987 8988/** 8989 * Adobe Launch sends settings object when this action is triggered. 8990 * @params {object} settings 8991 * @property {string} insightTagID 8992 */ 8993module.exports = function() { 8994 // fetch extension configuration settings to read the insightTagID. 8995 var settings = turbine.getExtensionSettings(); 8996 8997 if (settings && settings.insightTagID) { 8998 // Below code is responsible in loading insight tag javascript which is same as asking customers 8999 // to copy paste the presented javascript code in Campaign Manager tool. 9000 // We don't want get this code dynamically by providing a public API because it may slow down our 9001 // customer's website due to 2 network calls one for loading below code and two for loading 9002 // insight.min.js. 9003 window['_linkedin_data_partner_id'] = settings.insightTagID; 9004 var s = document.getElementsByTagName("script")[0]; 9005 var b = document.createElement("script"); 9006 b.type = "text/javascript"; 9007 b.async = true; 9008 b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; 9009 s.parentNode.insertBefore(b, s); 9010 } 9011}; 9012 9013 } 9014 9015 } 9016 } 9017 }, 9018 "sdi-toolkit": { 9019 "displayName": "Further Toolkit", 9020 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP98860ffddec14bee98be1eabc8a311e3/", 9021 "modules": { 9022 "sdi-toolkit/src/lib/actions/cookie_setter.js": { 9023 "name": "cookie-setter", 9024 "displayName": "Cookie Setter", 9025 "script": function(module, exports, require, turbine) { 9026"use strict"; 9027 9028module.exports = function(settings) { 9029 if (settings.cookieKey && settings.cookieValue) { 9030 var cookie = require("@adobe/reactor-cookie"); 9031 var cookieOptions = {}; 9032 if (settings.expirationDays) cookieOptions.expires = settings.expirationDays; 9033 if (settings.domain) cookieOptions.domain = settings.domain; 9034 if (settings.path) cookieOptions.path = settings.path; 9035 try { 9036 turbine.logger.info("Setting Cookie", settings.cookieKey, settings.cookieValue, settings.domain); 9037 cookie.set(settings.cookieKey, settings.cookieValue, cookieOptions); 9038 } catch(e) { 9039 turbine.logger.error("Cookie Setter Error", e); 9040 } 9041 } 9042}; 9043 9044 } 9045 9046 }, 9047 "sdi-toolkit/src/lib/main/extension_main.js": { 9048 "script": function(module, exports, require, turbine) { 9049/************************************************************************* 9050 * FURTHER CONFIDENTIAL 9051 * ___________________ 9052 * 9053 * Copyright 2018 Further 9054 * All Rights Reserved. 9055 *
9056 * NOTICE: All information contained herein is, and remains 9057 * the property of Further and its suppliers, 9058 * if any. The intellectual and technical concepts contained 9059 * herein are proprietary to Further and its 9060 * suppliers and are protected by all applicable intellectual property 9061 * laws, including trade secret and copyright laws. 9062 * Dissemination of this information or reproduction of this material 9063 * is strictly forbidden unless prior written permission is obtained 9064 * from Further. 9065 **************************************************************************/ 9066 9067"use strict"; 9068var win = require("@adobe/reactor-window"); 9069var objectAssign = require("@adobe/reactor-object-assign"); 9070var Promise = require("@adobe/reactor-promise"); 9071var settings = turbine.getExtensionSettings() || {}; 9072 9073turbine.logger.debug("Initializing with settings", settings); 9074 9075if (settings.polyfillObjectAssign) { 9076 //expose @adobe/reactor-object-assign as a polyfill for Object.assign if missing 9077 if (!win.Object.assign) { 9078 win.Object.assign = objectAssign; 9079 turbine.logger.debug( 9080 "Object.assign polyfilled from @adobe/reactor-object-assign." 9081 ); 9082 } else { 9083 turbine.logger.debug("Object.assign exists. No polyfill needed."); 9084 } 9085} 9086 9087if (settings.polyfillObjectPromise) { 9088 //expose @adobe/reactor-promise as a polyfill for Promise if missing 9089 if (!win.Promise) { 9090 win.Promise = Promise; 9091 turbine.logger.debug("Promise polyfilled from @adobe/reactor-promise."); 9092 } else { 9093 turbine.logger.debug("Promise exists. No polyfill needed."); 9094 } 9095} 9096 9097if (settings.utilQueryString) { 9098 //expose @adobe/reactor-query-string for use in Launch custom code 9099 win._sdiToolkit = win._sdiToolkit || {}; 9100 win._sdiToolkit.reactor = win._sdiToolkit.reactor || {}; 9101 if (!win._sdiToolkit.reactor.queryString) { 9102 win._sdiToolkit.reactor.queryString = require("@adobe/reactor-query-string"); 9103 turbine.logger.debug( 9104 "_sdiToolkit.reactor.queryString installed from @adobe/reactor-query-string." 9105 ); 9106 } 9107} 9108 9109if (settings.utilLoadScript) { 9110 //expose@adobe/reactor-load-scriptfor use in Launch custom code 9111 win._sdiToolkit = win._sdiToolkit || {}; 9112 win._sdiToolkit.reactor = win._sdiToolkit.reactor || {}; 9113 if (!win._sdiToolkit.reactor.loadScript) { 9114 win._sdiToolkit.reactor.loadScript = require("@adobe/reactor-load-script"); 9115 turbine.logger.debug( 9116 "_sdiToolkit.reactor.loadScript installed from @adobe/reactor-load-script." 9117 ); 9118 } 9119} 9120 9121 } 9122 9123 } 9124 } 9125 }, 9126 "data-layer-manager-search-discovery": { 9127 "displayName": "Data Layer Manager", 9128 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP39b5bceb23bb43a89f63de574f1f1450/", 9129 "settings": { 9130 "apollo": { 9131 "buildId": "", 9132 "cdnHost": "https://cdn.apolloplatform.com", 9133 "propertyId": "", 9134 "cdnPathPrefix": "app", 9135 "organizationId": "" 9136 }, 9137 "airbrake": { 9138 "id": null, 9139 "key": null 9140 }, 9141 "eventNames": [ 9142 { 9143 "eventName": "pageLoad", 9144 "resetBefore": false, 9145 "schemaProvider": "DLM Config", 9146 "hostedSchemaUrl": "", 9147 "validationSchema": {} 9148 } 9149 ], 9150 "clickEvents": { 9151 "ui": { 9152 "enabled": false, 9153 "htmlAttribute": "data-ea-ui-link" 9154 }, 9155 "cta": { 9156 "enabled": false, 9157 "htmlAttribute": "data-ea-cta-link" 9158 }, 9159 "exit": { 9160 "enabled": false, 9161 "htmlAttribute": "data-ea-exit-link" 9162 }, 9163 "enabled": false, 9164 "download": { 9165 "enabled": false, 9166 "extensions": [ 9167 "doc", 9168 "docx", 9169 "eps", 9170 "jpg", 9171 "png", 9172 "svg", 9173 "xls", 9174 "ppt", 9175 "pptx", 9176 "pdf", 9177 "xlsx", 9178 "tab", 9179 "csv", 9180 "zip", 9181 "txt", 9182 "vsd", 9183 "vxd", 9184 "xml", 9185 "js", 9186 "css", 9187 "rar", 9188 "exe", 9189 "wma", 9190 "mov", 9191 "avi", 9192 "wmv", 9193 "mp3", 9194 "wav", 9195 "m4v" 9196 ],
9197 "htmlAttribute": "data-ea-download-link" 9198 }, 9199 "internal": { 9200 "enabled": false 9201 } 9202 }, 9203 "subscription": null, 9204 "consentManager": { 9205 "cookieName": null, 9206 "delayInitWaitForCookie": false 9207 }, 9208 "payloadValidation": { 9209 "staging": false, 9210 "production": false, 9211 "development": false 9212 }, 9213 "dataLayerObjectName": "appEventData" 9214 }, 9215 "modules": { 9216 "data-layer-manager-search-discovery/src/lib/events/data_layer_push_event.js": { 9217 "name": "data-layer-push-event", 9218 "displayName": "Data Layer Push", 9219 "script": function(module, exports, require, turbine) { 9220"use strict"; 9221 9222module.exports = function(settings, trigger) { 9223 var window = require("@adobe/reactor-window"); 9224 9225 if (settings.eventType) { 9226 var subscribedEvent = ["SDI-DLM", settings.eventType].join(":"); 9227 window.removeEventListener(subscribedEvent, trigger, false); 9228 window.addEventListener(subscribedEvent, trigger, false); 9229 //turbine.logger.debug("Listener added for "+subscribedEvent); 9230 } 9231 9232}; 9233 9234 } 9235 9236 }, 9237 "data-layer-manager-search-discovery/src/lib/shared_settings.js": { 9238 "name": "dlm-settings", 9239 "shared": true, 9240 "script": function(module, exports, require, turbine) { 9241var dlmSettings = turbine.getExtensionSettings() || {}; 9242module.exports = dlmSettings; 9243 9244 } 9245 9246 }, 9247 "data-layer-manager-search-discovery/src/lib/extension_main.js": { 9248 "script": function(module, exports, require, turbine) { 9249/************************************************************************* 9250 * SEARCH DISCOVERY CONFIDENTIAL 9251 * ___________________ 9252 * 9253 * Copyright 2022 Search Discovery Incorporated 9254 * All Rights Reserved. 9255 *
9256 * NOTICE: All information contained herein is, and remains 9257 * the property of Search Discovery Incorporated and its suppliers, 9258 * if any. The intellectual and technical concepts contained 9259 * herein are proprietary to Search Discovery Incorporated and its 9260 * suppliers and are protected by all applicable intellectual property 9261 * laws, including trade secret and copyright laws. 9262 * Dissemination of this information or reproduction of this material 9263 * is strictly forbidden unless prior written permission is obtained 9264 * from Search Discovery Incorporated. 9265 **************************************************************************/ 9266 9267"use strict"; 9268var Core = require("./core"); 9269var window = require("@adobe/reactor-window"); 9270var objectAssign = require("@adobe/reactor-object-assign"); 9271var cookie = require("@adobe/reactor-cookie"); 9272var eventDataManager = new Core(window); 9273var util = require("./util"); 9274var linkClickHandler = require("./click_handler"); 9275var settings = turbine.getExtensionSettings() || {}; 9276 9277function reduceEventsFn(key) { 9278 return function(acc, event) { 9279 var item = {}; 9280 item[event.eventName] = event[key]; 9281 return objectAssign(acc, item); 9282 }; 9283} 9284 9285function reduceEvents(settings, key) { 9286 return (settings.eventNames || []).reduce(reduceEventsFn(key), {}); 9287} 9288 9289function getPayloadValidation(environment, settings) { 9290 if (settings.payloadValidation && settings.payloadValidation[environment]){ 9291 return settings.payloadValidation[environment]; 9292 } else { 9293 return false; 9294 } 9295} 9296 9297function initialize(eventDataManager, turbine) { 9298 turbine.logger.log("Initializing with settings:", settings); 9299 turbine.logger.log("Pro-Tip: Enable 'Verbose' logging to see detailed info from this extension."); 9300 eventDataManager.init({ 9301 dataLayerName: settings.dataLayerObjectName, 9302 validationSchema: reduceEvents(settings, "validationSchema"), 9303 schemaProvider: reduceEvents(settings, "schemaProvider"), 9304 eventResets: reduceEvents(settings, "resetBefore"), 9305 proFeatures: util.isSubscriptionValid(settings), 9306 airbrakeConfig: (settings.airbrake || {}), 9307 apollo: settings.apollo || { 9308 cdnHost : "https://cdn.apolloplatform.com", 9309 cdnPathPrefix : "app", 9310 organizationId: "", 9311 propertyId : "", 9312 buildId : "" 9313 }, 9314 environment: turbine.environment.stage, 9315 payloadValidation: { 9316 development: getPayloadValidation("development", settings), 9317 staging: getPayloadValidation("staging", settings), 9318 production: getPayloadValidation("production", settings), 9319 }, 9320 debug: true 9321 }); 9322 9323 if(util.deepFind(settings, "clickEvents.enabled")) { 9324 window.removeEventListener("click", linkClickHandler, {capture:true}); 9325 window.addEventListener("click", linkClickHandler, {capture:true}); 9326 } 9327} 9328 9329 9330 9331// Polling routine for consent cookie. 9332function initAfterConsentCookie() { 9333 if (cookie.get(settings.consentManager.cookieName) ) { 9334 turbine.logger.log("Found consent cookie: " + settings.consentManager.cookieName); 9335 initialize(eventDataManager, turbine); 9336 } else { 9337 requestAnimationFrame(initAfterConsentCookie); 9338 } 9339} 9340 9341if (settings.consentManager && 9342 settings.consentManager.cookieName && 9343 settings.consentManager.delayInitWaitForCookie) { 9344 //Initiate a polling loop that will wait for the consent cookie to be dropped 9345 turbine.logger.debug("Waiting for consent cookie to be present: "+ settings.consentManager.cookieName); 9346 requestAnimationFrame(initAfterConsentCookie); 9347} else { 9348 //Calling setTimeout here so that the init will happen on the next JS Loop in Turbine's lifecycle 9349 //Calling without setTimeout would make the init happen before Turbine has set up rules. 9350 setTimeout(function() { 9351 initialize(eventDataManager, turbine); 9352 }, 0); 9353} 9354 9355 9356 9357 9358 } 9359 9360 }, 9361 "data-layer-manager-search-discovery/src/lib/core.js": { 9362 "script": function(module, exports, require, turbine) { 9363/************************************************************************* 9364 * SEARCH DISCOVERY CONFIDENTIAL 9365 * ___________________ 9366 * 9367 * Copyright 2022 Search Discovery Incorporated 9368 * All Rights Reserved. 9369 *
9370 * NOTICE: All information contained herein is, and remains 9371 * the property of Search Discovery Incorporated and its suppliers, 9372 * if any. The intellectual and technical concepts contained 9373 * herein are proprietary to Search Discovery Incorporated and its 9374 * suppliers and are protected by all applicable intellectual property 9375 * laws, including trade secret and copyright laws. 9376 * Dissemination of this information or reproduction of this material 9377 * is strictly forbidden unless prior written permission is obtained 9378 * from Search Discovery Incorporated. 9379 **************************************************************************/ 9380var objectAssign = require("@adobe/reactor-object-assign"); 9381var Core = function(window) { 9382 this.document = window.document; 9383 this.window = window; 9384 this.defaultConfig = { 9385 dataLayerName: "appEventData", 9386 validationSchema: {}, 9387 eventResets: {} 9388 }; 9389}; 9390 9391objectAssign(Core.prototype, { 9392 init: function(config) { 9393 var parent = this; 9394 this.logger = turbine.logger; 9395 this.config = objectAssign({}, this.defaultConfig, config || {}); 9396 9397 var Lifecycle = require("./lifecycle"); 9398 this.lifecycle = new Lifecycle(this); 9399 9400 var Validation = require("./validation"); 9401 this.validation = Validation(this.config, this.logger); 9402 parent.window.removeEventListener("SDI-DLM:GLOBAL-POST", this.validation.validateEvent, false); 9403 parent.window.addEventListener("SDI-DLM:GLOBAL-POST", this.validation.validateEvent, false); 9404 9405 var DataLayer = require("./data_layer"); 9406 this.dataLayer = new DataLayer(parent); 9407 }, 9408 9409 trigger: function(evt) { 9410 // Dispatch the event for pre-event rules 9411 this.dispatchCustomEventToWindow("GLOBAL-PRE", evt); 9412 9413 // Dispatch the namespaced event for selective handlers 9414 this.dispatchCustomEventToWindow(evt.event, evt); 9415 9416 // Dispatch the event for post-event rules 9417 this.dispatchCustomEventToWindow("GLOBAL-POST", evt); 9418 }, 9419 9420 dispatchCustomEventToWindow: function(eventType, evt) { 9421 var appEvent = this.document.createEvent("CustomEvent"); 9422 var namespacedEvent = ["SDI-DLM", eventType].join(":"); 9423 appEvent.initCustomEvent(namespacedEvent, true, true, evt); 9424 this.window.dispatchEvent(appEvent); 9425 } 9426 9427}); 9428 9429module.exports = Core; 9430 9431 } 9432 9433 }, 9434 "data-layer-manager-search-discovery/src/lib/util.js": { 9435 "script": function(module, exports, require, turbine) { 9436/************************************************************************* 9437* SEARCH DISCOVERY CONFIDENTIAL 9438* ___________________ 9439* 9440* Copyright 2022 Search Discovery Incorporated 9441* All Rights Reserved. 9442*
9443* NOTICE: All information contained herein is, and remains 9444* the property of Search Discovery Incorporated and its suppliers, 9445* if any. The intellectual and technical concepts contained 9446* herein are proprietary to Search Discovery Incorporated and its 9447* suppliers and are protected by all applicable intellectual property 9448* laws, including trade secret and copyright laws. 9449* Dissemination of this information or reproduction of this material 9450* is strictly forbidden unless prior written permission is obtained 9451* from Search Discovery Incorporated. 9452**************************************************************************/ 9453 9454/*eslint no-console: "off" */ 9455 9456var util = function() {}; 9457util.prototype.argumentsToArray = function(args) { 9458 return (args.length === 1 ? [args[0]] : Array.apply(null, args)); 9459}; 9460 9461 9462util.prototype.copy = function(object) { 9463 var UTILS = require("./css_path"); 9464 var replacer = function(key, value){ 9465 if (!(value instanceof Element)) { 9466 return value; 9467 } 9468 9469 try { 9470 return UTILS.cssPath(value); 9471 } catch (e) { 9472 return "[DOM Element]"; 9473 } 9474 }; 9475 return JSON.parse(JSON.stringify(object, replacer)); 9476}; 9477 9478util.prototype.deepFind = function(obj, path) { 9479 if (!obj) { 9480 return null; 9481 } 9482 var paths = path.split("."); 9483 var current = obj; 9484 9485 for (var i = 0; i < paths.length; ++i) { 9486 if (!!current[paths[i]]) { 9487 current = current[paths[i]]; 9488 } else { 9489 return undefined; 9490 } 9491 } 9492 return current; 9493}; 9494 9495util.prototype.deepSet = function(obj, path, value) { 9496 var paths = path.split("."); 9497 var leadingPaths = paths.slice(0, -1).join("."); 9498 var baseObject = (paths.length === 1) ? obj : this.deepFind(obj, leadingPaths); 9499 var lastPath = paths.slice(-1); 9500 baseObject[lastPath] = value; 9501}; 9502 9503util.prototype.getLatestSubscriptionEndDate = function(extensionSettings, settings) { 9504 var settingsEndDate = this.deepFind(settings, "subscription.endDate"); 9505 var extSettingsEndDate = this.deepFind(extensionSettings, "subscription.endDate"); 9506 if (!extSettingsEndDate && !settingsEndDate) { 9507 return null; 9508 } 9509 return extSettingsEndDate > settingsEndDate ? extSettingsEndDate : settingsEndDate; 9510}; 9511 9512util.prototype.isSubscriptionValid = function(settings, extensionSettings) { 9513 var endDate = this.getLatestSubscriptionEndDate(settings, extensionSettings); 9514 if (!endDate) { 9515 return false; 9516 } 9517 var compareDate = new Date(endDate * 1000); 9518 return Date.now() < compareDate; 9519}; 9520 9521module.exports = new util(); 9522 9523 } 9524 9525 }, 9526 "data-layer-manager-search-discovery/src/lib/click_handler.js": { 9527 "script": function(module, exports, require, turbine) { 9528/************************************************************************* 9529 * SEARCH DISCOVERY CONFIDENTIAL 9530 * ___________________ 9531 * 9532 * Copyright 2022 Search Discovery Incorporated 9533 * All Rights Reserved. 9534 *
9535 * NOTICE: All information contained herein is, and remains 9536 * the property of Search Discovery Incorporated and its suppliers, 9537 * if any. The intellectual and technical concepts contained 9538 * herein are proprietary to Search Discovery Incorporated and its 9539 * suppliers and are protected by all applicable intellectual property 9540 * laws, including trade secret and copyright laws. 9541 * Dissemination of this information or reproduction of this material 9542 * is strictly forbidden unless prior written permission is obtained 9543 * from Search Discovery Incorporated. 9544 **************************************************************************/ 9545 9546"use strict"; 9547var window = require("@adobe/reactor-window"); 9548var util = require("./util"); 9549 9550/** 9551 * Polyfill Element.prototype.closest 9552 * 9553 * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest 9554 */ 9555if (!Element.prototype.matches) { 9556 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 9557} 9558 9559if (!Element.prototype.closest) { 9560 Element.prototype.closest = function(s) { 9561 var el = this; 9562 9563 do { 9564 if (el.matches(s)) return el; 9565 el = el.parentElement || el.parentNode; 9566 } while (el !== null && el.nodeType === 1); 9567 return null; 9568 }; 9569} 9570 9571/** 9572 * Perform a data layer push 9573 * 9574 * @param {string} eventName 9575 * @param {Object} payload 9576 */ 9577function dataLayerPush(eventName, payload) { 9578 var settings = turbine.getExtensionSettings() || {}; 9579 var event = payload; 9580 event.event = eventName; 9581 9582 window[settings.dataLayerObjectName].push(event); 9583 turbine.logger.debug("Detected Click Event:", eventName); 9584} 9585 9586/** 9587 * Look through an element's ancestry for containing elements 9588 * 9589 * @param {Element} element 9590 * @param {string} attribute 9591 * @returns {Object} 9592 */ 9593function getContainingZone(element, attribute){ 9594 var cssSelector = "["+attribute+"]"; 9595 if (element.closest(cssSelector)){ 9596 var closest = element.closest(cssSelector); 9597 return { 9598 "thisElement": closest, 9599 "attributeValue": closest.getAttribute(attribute), 9600 "nextElement": closest.parentElement.closest(cssSelector) 9601 }; 9602 } 9603} 9604 9605/** 9606 * Look through an element's ancestry for containing elements 9607 * 9608 * @param {Element} element 9609 * @returns {string} 9610 */ 9611function getLinkZones(element) { 9612 var nest = []; 9613 var attribute = "data-ea-zone"; 9614 var zone; 9615 while (element && (zone = getContainingZone(element,attribute)) && zone.attributeValue){ 9616 nest.push(zone.attributeValue); 9617 element = zone.nextElement; 9618 } 9619 return nest.reverse().join("|"); 9620} 9621 9622 9623/** 9624 * Get the HTML custom attribute for a link type 9625 * Values are pulled from settings if they exist. Otherwise they follow the default pattern 9626 * 9627 * @param {string} linkType 9628 * @param {Object} settings 9629 * @returns {string} 9630 */ 9631function getLinkTypeCustomAttribute(linkType, settings) { 9632 return util.deepFind(settings, "clickEvents."+linkType+".htmlAttribute")||"data-ea-"+linkType+"-link"; 9633} 9634 9635/** 9636 * Get the HTML custom attribute selector for a link type 9637 * Values are pulled from settings if they exist. Otherwise they follow the default pattern 9638 * 9639 * @param {string} linkType 9640 * @param {Object} settings 9641 * @returns {string} 9642 */ 9643function getLinkTypeCustomAttributeSelector(linkType, settings) { 9644 return "["+ getLinkTypeCustomAttribute(linkType, settings) +"]"; 9645} 9646 9647/** 9648 * Given a link element, return the primary Id 9649 * Use the same logic as Adobe's ActivityMap for compatibilty and data continuity sake 9650 * 9651 * @param {Element} element 9652 * @returns {string} 9653 */ 9654function getLinkText(element) { 9655 var linkTextRaw = 9656 element.getAttribute("data-ea-link-text") || 9657 element.getAttribute("sObjectId") || //from AA ActivityMap logic 9658 element.getAttribute("s-object-id") || //from AA ActivityMap logic 9659 element.getAttribute("sObjectID") || //from AA ActivityMap logic 9660 element.getAttribute("data-s-object-id") || //Intention of AA ActivityMap logic 9661 element.innerText && element.innerText.trim() !== "" && element.innerText || //from AA ActivityMap logic 9662 element.textContent && element.textContent.trim() !== "" && element.textContent || //from AA ActivityMap logic 9663 element.querySelector("[alt]") && element.querySelector("[alt]").getAttribute("alt") || //from AA ActivityMap logic 9664 element.querySelector("[title]") && element.querySelector("[title]").getAttribute("title") || //from AA ActivityMap logic 9665 element.getAttribute("aria-label") || 9666 element.href || //from AA ActivityMap logic 9667 "unknown"; 9668 9669 var linkText = linkTextRaw.trim().replace(/\s+/g," ").substr(0,250); 9670 return linkText; 9671} 9672 9673/** 9674 * Given an element, return a boolean indicating whether the element is a uiElement link 9675 * uiElement links are qualified by the existence of an HTML custom attribute either: 9676 * 1) specified by "settings.clickEvents.uiElement.htmlAttribute" 9677 * 2) defaulted to "data-ea-ui-link" 9678 * 9679 * @param {Element} element 9680 * @param {Object} settings 9681 * @returns {boolean} 9682 */ 9683function isUiLink(element, settings) { 9684 var uiAttribute = getLinkTypeCustomAttribute("ui", settings); 9685 9686 if(element.hasAttribute(uiAttribute)) { 9687 // The element is a UI Element 9688 return true; 9689 } 9690 // UI Element handing is not enabled or the element is not a UI Element link 9691 return false;
9692} 9693 9694/** 9695 * Given an element, return a boolean indicating whether the element is a CTA link 9696 * CTA links are qualified by the existence of an HTML custom attribute either: 9697 * 1) specified by "settings.clickEvents.cta.htmlAttribute" 9698 * 2) defaulted to "data-ea-cta-link" 9699 * 9700 * @param {Element} element 9701 * @param {Object} settings 9702 * @returns {boolean} 9703 */ 9704function isCtaLink(element, settings) { 9705 var ctaAttribute = getLinkTypeCustomAttribute("cta", settings); 9706 9707 if(element.hasAttribute(ctaAttribute)) { 9708 // The element is a CTA link 9709 return true; 9710 } 9711 // CTA handing is not enabled or the element is not a CTA link 9712 return false; 9713} 9714 9715/** 9716 * Given an element, return a boolean indicating whether the element has a relative href attribute 9717 * 9718 * @param {Element} element 9719 * @returns {boolean} 9720 */ 9721function isRelativeHref(element) { 9722 var absoluteUrlRegex = new RegExp("^(?:[a-z]+:)?//", "i"); 9723 var linkHref = element.getAttribute("href"); 9724 if (linkHref && linkHref.match(absoluteUrlRegex)) { 9725 // This href URL is not relative 9726 return false; 9727 } else { 9728 return true; 9729 } 9730} 9731 9732/** 9733 * Given an href, return a boolean indicating whether that URL is an interal destination 9734 * 9735 * @param {string} hostname 9736 * @param {Object} settings 9737 * @returns {boolean} 9738 */ 9739function isExternalLink(hostname, settings) { 9740 var internalDomains = new RegExp( 9741 (util.deepFind(settings, "clickEvents.exit.internalDomains") || turbine.propertySettings.domains) 9742 .join("|").replace(/\./g, "[.]")); 9743 9744 if (hostname && !!hostname.match(internalDomains)) { 9745 // This hostname is interal 9746 return false; 9747 } else { 9748 return true; 9749 } 9750} 9751 9752/** 9753 * Given an element, return a boolean indicating whether the element is a Exit link 9754 * Exit links are qualified by either of the following conditions: 9755 * 1) presence of an attribute specified by "settings.clickEvents.exit.htmlAttribute" or "data-ea-exit-link" 9756 * 2) having a non-relative href with domain that is not in the Launch property's domain list 9757 * 9758 * @param {Element} element 9759 * @param {string} href 9760 * @param {Object} settings 9761 * @returns {boolean} 9762 */ 9763function isExitLink(element, href, settings) { 9764 var exitAttribute = getLinkTypeCustomAttribute("exit", settings); 9765 9766 if( element.hasAttribute(exitAttribute) || (!isRelativeHref(element) && isExternalLink(element.hostname) ) ) { 9767 // The element is an exit link 9768 return true; 9769 } 9770 9771 // Exit link handing is not enabled or the element is not an exit link 9772 return false; 9773} 9774 9775/** 9776 * Given an element, return a boolean indicating whether the element is a download link 9777 * Download links are qualified by any of the following: 9778 * 1) having the HTML5 "download attribute" 9779 * 2) having a file extension within the configurable list of download file extensions 9780 * 3) having the configurable custom attribute specified by "settings.clickEvents.download.htmlAttribute" 9781 * 9782 * @param {Element} element 9783 * @param {string} href 9784 * @param {Object} settings 9785 * @returns {boolean} 9786 */ 9787function isDownloadLink(element, href, settings) { 9788 var downloadAttribute = getLinkTypeCustomAttribute("download", settings); 9789 var downloadExtensionsArray = util.deepFind(settings, "clickEvents.download.extensions") || []; 9790 9791 // Build regex for download extensions from settings array 9792 var downloadExtensions = downloadExtensionsArray.map(function(extension) { 9793 // eslint-disable-next-line no-useless-escape 9794 return "\." + extension + "$"; 9795 }); 9796 var downloadRegex = downloadExtensions.join("|"); 9797 9798 if( element.hasAttribute("download") || href.match(downloadRegex) || element.hasAttribute(downloadAttribute) ) { 9799 // The element is a download link 9800 return true; 9801 } 9802 9803 // Download handing is not enabled or the element is not a download link 9804 return false; 9805} 9806 9807/** 9808 * Given an element, return a boolean indicating whether the element is a navigation link 9809 * Navigation links are qualified if anchor parameter is not undefined 9810 * 9811 * @param {Element} anchor 9812 * @param {Object} settings 9813 * @returns {boolean} 9814 */ 9815function isNavigationLink(anchor) { 9816 if(anchor) { 9817 return true; 9818 } 9819 9820 // Navigation link handing is not enabled or the element is not a navigation link 9821 return false;
9822} 9823 9824/** 9825 * Given a download link element, return the download file name 9826 * 9827 * @param {Element} element 9828 * @param {string} href 9829 * @param {Object} settings 9830 * @returns {boolean} 9831 */ 9832function getDownloadLinkFilename(element, href, settings) { 9833 if(util.deepFind(settings, "clickEvents.download.enabled")) { 9834 var downloadAttribute = getLinkTypeCustomAttribute("download", settings); 9835 return element.getAttribute(downloadAttribute) || element.getAttribute("download") || href.split("/").pop(); 9836 } 9837} 9838 9839 9840/** 9841 * This is the handler function. 9842 * It is exported by this module and is used in extension_main.js 9843 * Whenever a click occurs, check for the type of click and perform a data layer push if approopriate. 9844 * 9845 * @param {Event} event 9846 */ 9847function linkClickHandler(event) { 9848 var settings = turbine.getExtensionSettings() || {}; 9849 var elementClicked = event.target; 9850 var anchor = elementClicked.closest("a"); 9851 var href = anchor ? anchor.href : ""; 9852 9853 // If the clicked item has an anchor or a predefined data attribute in its ancestry, use that element instead of the one clicked 9854 var element = anchor || 9855 elementClicked.closest( getLinkTypeCustomAttributeSelector("exit", settings) ) || 9856 elementClicked.closest( getLinkTypeCustomAttributeSelector("download", settings)) || 9857 elementClicked.closest( getLinkTypeCustomAttributeSelector("cta", settings)) || 9858 elementClicked; 9859 9860 // Configure global linkInfo payload values 9861 var payload = { 9862 "linkInfo" : { 9863 "linkText": getLinkText(element), 9864 "linkRegion": getLinkZones(element) 9865 }, 9866 "__meta": { 9867 "anchorElement" : anchor, 9868 "clickedElement" : elementClicked 9869 } 9870 }; 9871 9872 // Include AEM asset ID if it exists on elementClicked 9873 if (elementClicked.getAttribute && elementClicked.getAttribute("data-aem-asset-id")) { 9874 payload.linkInfo.aemAssetId = elementClicked.getAttribute("data-aem-asset-id"); 9875 } 9876 9877 var linkType = { 9878 "ui": isUiLink(element, settings), 9879 "cta" : isCtaLink(element, settings), 9880 "exit" : isExitLink(element, href, settings), 9881 "download" : isDownloadLink(element, href, settings), 9882 "internal" : isNavigationLink(anchor, settings) 9883 }; 9884 9885 var detectionEnabled = { 9886 "ui": util.deepFind(settings, "clickEvents.ui.enabled") || false, 9887 "cta" : util.deepFind(settings, "clickEvents.cta.enabled") || false, 9888 "exit" : util.deepFind(settings, "clickEvents.exit.enabled") || false, 9889 "download" : util.deepFind(settings, "clickEvents.download.enabled") || false, 9890 "internal" : util.deepFind(settings, "clickEvents.internal.enabled") || false 9891 }; 9892 9893 // UI Element link 9894 if ( linkType.ui && detectionEnabled.ui ) { 9895 var uiAttribute = getLinkTypeCustomAttribute("ui", settings); 9896 payload.linkInfo.uiElement = element.getAttribute(uiAttribute); 9897 dataLayerPush("UI Element Clicked", payload); 9898 return; 9899 } 9900 9901 // CTA link 9902 if ( linkType.cta && detectionEnabled.cta ) { 9903 var ctaAttribute = getLinkTypeCustomAttribute("cta", settings); 9904 payload.linkInfo.linkCtaType = element.getAttribute(ctaAttribute); 9905 dataLayerPush("CTA Link Clicked", payload); 9906 return; 9907 } 9908 9909 // Exit link 9910 if ( linkType.exit && detectionEnabled.exit && !linkType.download) { 9911 var exitAttribute = getLinkTypeCustomAttribute("exit", settings); 9912 payload.linkInfo.linkTarget = element.getAttribute(exitAttribute) || href; 9913 dataLayerPush("Exit Link Clicked", payload); 9914 return; 9915 } 9916 9917 // Download link 9918 if ( linkType.download && detectionEnabled.download && !linkType.exit ) { 9919 payload.linkInfo.fileName = getDownloadLinkFilename(element, href, settings); 9920 dataLayerPush("Download Link Clicked", payload); 9921 return; 9922 } 9923 9924 // Navigation Link Click 9925 if( linkType.internal && detectionEnabled.internal && !linkType.exit && !linkType.download) { 9926 payload.linkInfo.linkTarget = href; 9927 dataLayerPush("Navigation Link Clicked", payload); 9928 return; 9929 } 9930 9931} 9932 9933module.exports = linkClickHandler; 9934 } 9935 9936 }, 9937 "data-layer-manager-search-discovery/src/lib/lifecycle.js": { 9938 "script": function(module, exports, require, turbine) { 9939// Enables the registration of a callback function to be executed when an astp event on the data layer array is processed. 9940// The function passed as func will be executed within the data_layer.js by the processEventCallbacks function. 9941 9942// The 2nd param, eventMatch, <optional>, is a String Literal or RegExp which specifies which event(s) to execute against. 9943// Omission of the 2nd parameter will cause a RexExp of .* to be used meaning that the function 9944// will execute on all events. 9945 9946// The 3rd param, executionOrder, <optional>, is a integer to allow sequencing of multiple callbacks. 9947// Omitting the 3rd parameter will cause an execution order of 9999 to be used. 9948// 9949// registered callbacks are persisted on the _astp.Lifecycle.preValidationCallbacks array 9950 9951var objectAssign = require("@adobe/reactor-object-assign"); 9952 9953var Lifecycle = function(core) { 9954 this.logger = core.logger; 9955 this.preValidationCallbacks = []; 9956}; 9957 9958objectAssign(Lifecycle.prototype, { 9959 isPreValidationCallback: function(thing) { 9960 return !!thing.preValidationCallback && 9961 typeof thing.preValidationCallback === "object" && 9962 !!thing.preValidationCallback.func; 9963 }, 9964 registerPreValidationCallback: function(definition) { 9965 var func = definition.func; 9966 var eventMatch = definition.eventMatch; 9967 var executionOrder = definition.executionOrder; 9968 if (typeof func !== "function") { 9969 this.logger.error("registerPreValidationCallback - Invalid function : func must be a function"); 9970 } else if (eventMatch && (typeof eventMatch !== "string" && eventMatch.constructor !== RegExp)) { 9971 this.logger.error("registerPreValidationCallback - eventMatch must be a String Literal or RegExp."); 9972 } else if (executionOrder && typeof executionOrder !== "number") { 9973 this.logger.error("registerPreValidationCallback - executionOrder must be a number."); 9974 } else { 9975 eventMatch = eventMatch || new RegExp(/.*/); 9976 if (typeof eventMatch === "string") { 9977 eventMatch = new RegExp("^"+eventMatch+"$"); 9978 } 9979 executionOrder = executionOrder || 9999; 9980 this.preValidationCallbacks.push({ 9981 "func": func, 9982 "executionOrder": executionOrder, 9983 "eventMatch": eventMatch 9984 }); 9985 this.logger.debug("registerPreValidationCallback executed with ", func, executionOrder, eventMatch); 9986 } 9987 } 9988}); 9989 9990module.exports = Lifecycle; 9991 9992 } 9993 9994 },
9995 "data-layer-manager-search-discovery/src/lib/validation.js": { 9996 "script": function(module, exports, require, turbine) { 9997/************************************************************************* 9998 * SEARCH DISCOVERY CONFIDENTIAL 9999 * ___________________ 10000 * 10001 * Copyright 2022 Search Discovery Incorporated 10002 * All Rights Reserved. 10003 * 10004 * NOTICE: All information contained herein is, and remains 10005 * the property of Search Discovery Incorporated and its suppliers, 10006 * if any. The intellectual and technical concepts contained 10007 * herein are proprietary to Search Discovery Incorporated and its 10008 * suppliers and are protected by all applicable intellectual property 10009 * laws, including trade secret and copyright laws. 10010 * Dissemination of this information or reproduction of this material 10011 * is strictly forbidden unless prior written permission is obtained 10012 * from Search Discovery Incorporated. 10013 **************************************************************************/ 10014 10015var util = require("./util"); 10016 10017var isAirbrakeConfigured = function(airbrakeConfig) { 10018 return !!(airbrakeConfig.id && airbrakeConfig.id !== "" && airbrakeConfig.key && airbrakeConfig.key !== ""); 10019}; 10020 10021var initAirbrake = function(airbrakeConfig, environment, logger) { 10022 if (isAirbrakeConfigured(airbrakeConfig)) { 10023 var Notifier = turbine.getSharedModule("airbrake-js-notifier-module", "airbrake-notifier-js"); 10024 if ( Notifier ){ 10025 return new Notifier({ 10026 projectId: airbrakeConfig.id, 10027 projectKey: airbrakeConfig.key, 10028 instrumentation: { 10029 console: false 10030 }, 10031 environment: environment + " [Launch]" 10032 }); 10033 } else { 10034 logger.warn("Missing Dependency: Airbrake JS Notifier Launch extension."); 10035 } 10036 } 10037}; 10038 10039var buildResourceUrl = function(host, pathPrefix, organizationId, propertyId, buildId, eventId) { 10040 return encodeURI([host, pathPrefix, organizationId || "organizationId(unspecified)", propertyId || "propertyId(unspecified)", buildId || "buildId(unspecified)", eventId || "eventId(unspecified)"].join("/")+".json"); 10041}; 10042 10043var buildLocalCacheKey = function(propertyId, buildId) { 10044 return ["schemaCache", propertyId || "propertyId(unspecified)", buildId || "buildId(unspecified)"].join("_"); 10045}; 10046 10047var updateCacheExpirations = function(localCacheKey) { 10048 var apolloSchemaCacheRaw = localStorage.getItem("apolloSchemaCache"); 10049 var apolloSchemaCache = apolloSchemaCacheRaw && JSON.parse(apolloSchemaCacheRaw) || {}; 10050 var now = new Date().getTime(); 10051 var expiry = now + (60 * 60 * 1000); // 1 hour expiration 10052 Object.keys(apolloSchemaCache).forEach(function(key){ 10053 if (now > apolloSchemaCache[key]){ 10054 delete apolloSchemaCache[key]; 10055 } 10056 }); 10057 apolloSchemaCache[localCacheKey] = expiry; 10058 localStorage.setItem("apolloSchemaCache", JSON.stringify(apolloSchemaCache)); 10059}; 10060var cacheResponse = function(propertyId, buildId, eventId, responseBody) { 10061 var localCacheKey = buildLocalCacheKey(propertyId, buildId); 10062 var localCacheRaw = localStorage.getItem(localCacheKey); 10063 var localCache = localCacheRaw && JSON.parse(localCacheRaw) || {}; 10064 localCache[eventId] = responseBody; 10065 localStorage.setItem(localCacheKey, JSON.stringify(localCache)); 10066 updateCacheExpirations(localCacheKey); 10067}; 10068 10069 10070var getValidationSchemaFromWebStorage = function(propertyId, buildId, eventId) { 10071 var localCacheKey = buildLocalCacheKey(propertyId, buildId); 10072 var localCacheRaw = localStorage.getItem(localCacheKey); 10073 var localCache = localCacheRaw && JSON.parse(localCacheRaw) || {}; 10074 if (localCache[eventId]) { 10075 return JSON.parse(localCache[eventId]); 10076 } 10077 return; 10078}; 10079 10080var getSchemaFromSettings = function(config, eventId, logger) { 10081 if (config.schemaProvider && 10082 config.schemaProvider[eventId] && 10083 config.schemaProvider[eventId] === "Apollo" 10084 ) { // New Style Configuration ( >= v2.1.0, cloudHosted) 10085 return null; 10086 } else if (config.validationSchema && 10087 config.schemaProvider[eventId] !== "Disabled" && 10088 typeof config.validationSchema[eventId] === "object" 10089 ) { // Old Style Configuration (<= v2.0.9, schema from extensionSettings) 10090 return { 10091 eventName: eventId, 10092 validationSchema : config.validationSchema[eventId] 10093 }; 10094 } 10095 // No validation will be done 10096 return -1; 10097}; 10098 10099var getValidationSchemaAsync = function(config, event, logger) { 10100 return new Promise(function(resolve){ 10101 var schemaFromSettings = getSchemaFromSettings(config, event.event, logger); 10102 var cachedSchema = !schemaFromSettings && getValidationSchemaFromWebStorage(config.apollo.organizationId, config.apollo.propertyId, config.apollo.buildId, event.event); 10103 if (schemaFromSettings) { 10104 event.__meta.validationResult.schemaProvider = "DLM settings"; 10105 resolve({ 10106 "status": 304, 10107 "data": schemaFromSettings 10108 }); 10109 } else if (cachedSchema) { 10110 event.__meta.validationResult.schemaProvider = "localStorage.apolloSchemaCache"; 10111 resolve({ 10112 "status": 304, 10113 "data": cachedSchema 10114 }); 10115 } else {
10116 var resourceUrl = buildResourceUrl(config.apollo.cdnHost, config.apollo.cdnPathPrefix, config.apollo.organizationId, config.apollo.propertyId, config.apollo.buildId, event.event); 10117 event.__meta.validationResult.schemaProvider = resourceUrl; 10118 var fetchPromise = fetch(resourceUrl); 10119 fetchPromise.then(function(response){ 10120 if (response.status && response.status === 200){ 10121 var jsonDataPromise = response.json(); 10122 jsonDataPromise.then(function(jsonData){ 10123 cacheResponse(config.apollo.propertyId, config.apollo.buildId, event.event, JSON.stringify(jsonData)); 10124 event.__meta.validationResult.fetchResponse = response.status; 10125 resolve({ 10126 "status": response.status, 10127 "data": jsonData 10128 }); 10129 }); 10130 } else { 10131 cacheResponse(config.apollo.propertyId, config.apollo.buildId, config.apollo.eventId, JSON.stringify({})); 10132 event.__meta.validationResult.fetchResponse = response.status; 10133 resolve({ 10134 "status": response.status, 10135 "data": {} 10136 }); 10137 } 10138 }); 10139 } 10140 }); 10141}; 10142 10143var buildErrorPayload = function(environment, event, error) { 10144 var eventPayload = util.copy(event); 10145 delete eventPayload.__meta; 10146 var field = error.params.key || error.dataPath.split("/").pop(); 10147 var errorName = event.event + " > " + field + " > " + error.message.replace(/:/g," >"); 10148 var errorParams = { 10149 key: field, 10150 event: event.event, 10151 code: error.code, 10152 dataPath: error.dataPath, 10153 schemaPath: error.schemaPath, 10154 message: error.message, 10155 sender: "Launch > Data Layer Manager", 10156 eventPayload: eventPayload 10157 }; 10158 return { 10159 error: errorName, 10160 params: errorParams, 10161 environment: { 10162 launchEnv: environment, 10163 sender: event.sender 10164 } 10165 }; 10166}; 10167 10168var dispatchValidationError = function(airbrakeClient, environment, event, error) { 10169 event.__meta.validationResult.errors.push(error); 10170 event.__meta.validationResult.valid = false; 10171 console.error("EVENT PAYLOAD VALIDATION FAILED:", error.message, error, event); 10172 10173 if (airbrakeClient) { 10174 airbrakeClient.notify(buildErrorPayload(environment, event, error)); 10175 } 10176}; 10177 10178var validateEventName = function(active, event, logger) { 10179 if (active && !event.event) { 10180 logger.error("EVENT NAME VALIDATION FAILED: Missing event name"); 10181 } 10182}; 10183 10184var validateEventSchema = function(active, event, logger, tv4, config, airbrakeClient, environment) { 10185 if (active && tv4) { 10186 getValidationSchemaAsync(config, event, logger) 10187 .then(function(response){ 10188 if (response && response.data && response.data.validationSchema) { 10189 var validation = tv4.validateMultiple(event, response.data.validationSchema); 10190 event.__meta.validationResult.validated = true; 10191 event.__meta.validationResult.valid = true; 10192 10193 validation.errors.forEach(function(error) { 10194 dispatchValidationError(airbrakeClient, environment, event, error); 10195 }); 10196 validation.missing.forEach(function(missing) { 10197 dispatchValidationError(airbrakeClient, environment, event, missing); 10198 }); 10199 } 10200 }); 10201 } 10202}; 10203 10204var validateEvent = function(active, config, logger, tv4, airbrakeClient, environment) { 10205 return function(event) { 10206 event.detail.__meta = event.detail.__meta || {}; 10207 event.detail.__meta.validationResult = { 10208 active: active, 10209 errors: [], 10210 valid: null, 10211 validated: false 10212 }; 10213 validateEventName(active, event.detail, logger); 10214 validateEventSchema(active, event.detail, logger, tv4, config, airbrakeClient, environment); 10215 }; 10216}; 10217 10218var Validation = function(config, logger) { 10219 var airbrakeConfig = config.airbrakeConfig || {}; 10220 var environment = config.environment; 10221 var active = config.proFeatures && config.payloadValidation[environment]; 10222 var tv4 = active && require("./tv4_commonJS"); 10223 var airbrakeClient = active && initAirbrake(airbrakeConfig, environment, logger); 10224 10225 // Ignore errors non-Launch errors sent to airbrake. 10226 if (airbrakeClient) { 10227 airbrakeClient.addFilter(function(notice) { 10228 if (!notice.params || !notice.params.sender) { 10229 return null; 10230 } 10231 if (notice.params.sender !== "Launch > Data Layer Manager") { 10232 return null; 10233 } 10234 return notice; 10235 }); 10236 } 10237 10238 return { 10239 validateEvent: validateEvent(active, config, logger, tv4, airbrakeClient, environment) 10240 }; 10241}; 10242 10243module.exports = Validation; 10244 10245 } 10246 10247 }, 10248 "data-layer-manager-search-discovery/src/lib/data_layer.js": { 10249 "script": function(module, exports, require, turbine) { 10250/************************************************************************* 10251 * SEARCH DISCOVERY CONFIDENTIAL 10252 * ___________________ 10253 * 10254 * Copyright 2022 Search Discovery Incorporated 10255 * All Rights Reserved. 10256 *
10257 * NOTICE: All information contained herein is, and remains 10258 * the property of Search Discovery Incorporated and its suppliers, 10259 * if any. The intellectual and technical concepts contained 10260 * herein are proprietary to Search Discovery Incorporated and its 10261 * suppliers and are protected by all applicable intellectual property 10262 * laws, including trade secret and copyright laws. 10263 * Dissemination of this information or reproduction of this material 10264 * is strictly forbidden unless prior written permission is obtained 10265 * from Search Discovery Incorporated. 10266 **************************************************************************/ 10267 10268var util = require("./util"); 10269var objectAssign = require("@adobe/reactor-object-assign"); 10270var EventProcessor = require("./event_processor"); 10271 10272var DataLayer = function(core) { 10273 this.logger = core.logger; 10274 this.window = core.window; 10275 this.eventResets = core.config.eventResets; 10276 this.dataLayerName = core.config.dataLayerName; 10277 this.eventProcessor = new EventProcessor(core); 10278 10279 10280 var dataLayerArray = this._initializeDataLayer(); 10281 if (Array.isArray(dataLayerArray)) { 10282 var events = dataLayerArray.slice(0); 10283 this._augmentDataLayer(dataLayerArray); 10284 this.reset(); 10285 dataLayerArray.push.apply(dataLayerArray, events); 10286 this._monitorDataLayerOverwrite(); 10287 } else { 10288 this.logger.error("Data layer must be an Array.", this.dataLayerName); 10289 } 10290}; 10291 10292objectAssign(DataLayer.prototype, { 10293 get: function() { 10294 return util.deepFind(this.window, this.dataLayerName); 10295 }, 10296 10297 set: function(value) { 10298 util.deepSet(this.window, this.dataLayerName, value); 10299 }, 10300 10301 reset: function() { 10302 this.get().length = 0; 10303 }, 10304 10305 _initializeDataLayer: function() { 10306 if (typeof(this.get()) === "undefined") { 10307 this.set([]); 10308 } 10309 return this.get(); 10310 }, 10311 10312 _augmentDataLayer: function(dataLayerArray) { 10313 DataLayer.addComputedState(dataLayerArray); 10314 this._replacePush(dataLayerArray); 10315 this._assignReset(dataLayerArray); 10316 dataLayerArray._managedBy = "https://techdocs.searchdiscovery.com/adobe-solutions/adobe-launch/launch-extensions/data-layer-manager"; 10317 }, 10318 10319 _monitorDataLayerOverwrite: function() { 10320 this.window._dataLayerOverwriteMonitor = this.window.setInterval(function(context) { 10321 var dataLayerArray = context.get(); 10322 if (!(dataLayerArray && dataLayerArray._managedBy)) { 10323 context.logger.error("Management Functionality Severed... Data Layer has been overwritten!"); 10324 context.window.clearInterval(context.window._dataLayerOverwriteMonitor); 10325 } 10326 }, 2500, this); 10327 }, 10328 10329 _assignReset: function(dataLayerArray) { 10330 var parent = this; 10331 dataLayerArray._reset = function() { 10332 parent.reset(); 10333 }; 10334 }, 10335 10336 _replacePush: function(dataLayerArray) { 10337 var oldPush = dataLayerArray.push; 10338 var preProcessEventFn = this.eventProcessor.preProcessEventFn(this); 10339 var processEventFn = this.eventProcessor.processEventFn(this); 10340 10341 var appEventPush = function() { 10342 var args = util.argumentsToArray(arguments); 10343 var newArgs = args.map(preProcessEventFn); 10344 oldPush.apply(dataLayerArray, newArgs); 10345 newArgs.forEach(processEventFn); 10346 }; 10347 10348 dataLayerArray.push = appEventPush; 10349 } 10350}); 10351 10352DataLayer.addComputedState = function(dataLayerArray) { 10353 var computedState = function() { 10354 return function(index) { 10355 index = (typeof index === "undefined") ? dataLayerArray.length - 1 : index; 10356 var merged = dataLayerArray.slice(0, index + 1) 10357 .filter(EventProcessor.isEventObject) //Only reduce on objects with event keys that are strings 10358 .reduce(function(acc, event) { 10359 return objectAssign(acc, event); 10360 }, {}); 10361 delete(merged.event); 10362 delete(merged.__meta); 10363 return util.copy(merged); 10364 }; 10365 }; 10366 10367 if (!dataLayerArray.computedState) { 10368 Object.defineProperty(dataLayerArray, "computedState", { 10369 configurable: false, 10370 enumerable: false, 10371 get: computedState() 10372 }); 10373 } 10374 10375 if (!dataLayerArray._computedStateAtIndex) { 10376 Object.defineProperty(dataLayerArray, "_computedStateAtIndex", { 10377 configurable: false, 10378 enumerable: false, 10379 get: computedState 10380 }); 10381 } 10382 10383 if (!dataLayerArray._computedStateAtEvent) { 10384 Object.defineProperty(dataLayerArray, "_computedStateAtEvent", { 10385 configurable: false, 10386 enumerable: false, 10387 get: function() { 10388 return function(item) { 10389 var index = dataLayerArray.indexOf(item); 10390 return computedState()(index); 10391 }; 10392 } 10393 }); 10394 } 10395}; 10396 10397module.exports = DataLayer; 10398 10399 } 10400 10401 }, 10402 "data-layer-manager-search-discovery/src/lib/tv4_commonJS.js": { 10403 "script": function(module, exports, require, turbine) { 10404/* 10405Author: Geraint Luff and others 10406Year: 2013 10407 10408This code is released into the "public domain" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code. 10409*/ 10410 10411/* 10412 This code has been modified from v1.0.3 to fit a commonJS module format. 10413 Also, the following polyfills were stripped out because it's the 21st century 10414 Object.keys 10415 Object.create 10416 Array.isArray 10417 Array.prototype.indexOf
10418 Object.isFrozen 10419 10420 Finally, in place of the polyfills for IE8 (about 3.5K worth of code), there 10421 is a try/catch around the call to createApi() which will cause tv4 to be exported as undefined. 10422 10423 Stew Schilling @ SDI is (ir)responsible for this. 10424*/ 10425 10426 10427var uriTemplateGlobalModifiers = { 10428 "+": true, 10429 "#": true, 10430 ".": true, 10431 "/": true, 10432 ";": true, 10433 "?": true, 10434 "&": true 10435}; 10436var uriTemplateSuffices = { 10437 "*": true 10438}; 10439 10440function notReallyPercentEncode(string) { 10441 return encodeURI(string).replace(/%25[0-9][0-9]/g, function(doubleEncoded) { 10442 return "%" + doubleEncoded.substring(3); 10443 }); 10444} 10445 10446function uriTemplateSubstitution(spec) { 10447 var modifier = ""; 10448 if (uriTemplateGlobalModifiers[spec.charAt(0)]) { 10449 modifier = spec.charAt(0); 10450 spec = spec.substring(1); 10451 } 10452 var separator = ""; 10453 var prefix = ""; 10454 var shouldEscape = true; 10455 var showVariables = false; 10456 var trimEmptyString = false; 10457 if (modifier === "+") { 10458 shouldEscape = false; 10459 } else if (modifier === ".") { 10460 prefix = "."; 10461 separator = "."; 10462 } else if (modifier === "/") { 10463 prefix = "/"; 10464 separator = "/"; 10465 } else if (modifier === "#") { 10466 prefix = "#"; 10467 shouldEscape = false;
10468 } else if (modifier === ";") { 10469 prefix = ";"; 10470 separator = ";"; 10471 showVariables = true; 10472 trimEmptyString = true; 10473 } else if (modifier === "?") { 10474 prefix = "?"; 10475 separator = "&"; 10476 showVariables = true; 10477 } else if (modifier === "&") { 10478 prefix = "&"; 10479 separator = "&"; 10480 showVariables = true; 10481 } 10482 10483 var varNames = []; 10484 var varList = spec.split(","); 10485 var varSpecs = []; 10486 var varSpecMap = {}; 10487 for (var i = 0; i < varList.length; i++) { 10488 var varName = varList[i]; 10489 var truncate = null; 10490 if (varName.indexOf(":") !== -1) { 10491 var parts = varName.split(":"); 10492 varName = parts[0]; 10493 truncate = parseInt(parts[1], 10); 10494 } 10495 var suffices = {}; 10496 while (uriTemplateSuffices[varName.charAt(varName.length - 1)]) { 10497 suffices[varName.charAt(varName.length - 1)] = true; 10498 varName = varName.substring(0, varName.length - 1); 10499 } 10500 var varSpec = { 10501 truncate: truncate, 10502 name: varName, 10503 suffices: suffices 10504 }; 10505 varSpecs.push(varSpec); 10506 varSpecMap[varName] = varSpec; 10507 varNames.push(varName); 10508 } 10509 var subFunction = function(valueFunction) { 10510 var result = ""; 10511 var startIndex = 0; 10512 for (var i = 0; i < varSpecs.length; i++) { 10513 var varSpec = varSpecs[i]; 10514 var value = valueFunction(varSpec.name); 10515 if (value === null || value === undefined || (Array.isArray(value) && value.length === 0) || (typeof value === "object" && Object.keys(value).length === 0)) { 10516 startIndex++; 10517 continue; 10518 } 10519 if (i === startIndex) { 10520 result += prefix; 10521 } else { 10522 result += (separator || ","); 10523 } 10524 if (Array.isArray(value)) { 10525 if (showVariables) { 10526 result += varSpec.name + "="; 10527 } 10528 for (var j = 0; j < value.length; j++) { 10529 if (j > 0) { 10530 result += varSpec.suffices["*"] ? (separator || ",") : ","; 10531 if (varSpec.suffices["*"] && showVariables) { 10532 result += varSpec.name + "="; 10533 } 10534 } 10535 result += shouldEscape ? encodeURIComponent(value[j]).replace(/!/g, "%21") : notReallyPercentEncode(value[j]); 10536 } 10537 } else if (typeof value === "object") { 10538 if (showVariables && !varSpec.suffices["*"]) { 10539 result += varSpec.name + "="; 10540 } 10541 var first = true; 10542 for (var key in value) { 10543 if (!first) { 10544 result += varSpec.suffices["*"] ? (separator || ",") : ","; 10545 } 10546 first = false; 10547 result += shouldEscape ? encodeURIComponent(key).replace(/!/g, "%21") : notReallyPercentEncode(key); 10548 result += varSpec.suffices["*"] ? "=" : ","; 10549 result += shouldEscape ? encodeURIComponent(value[key]).replace(/!/g, "%21") : notReallyPercentEncode(value[key]); 10550 } 10551 } else { 10552 if (showVariables) { 10553 result += varSpec.name; 10554 if (!trimEmptyString || value !== "") { 10555 result += "="; 10556 } 10557 } 10558 if (varSpec.truncate != null) { 10559 value = value.substring(0, varSpec.truncate); 10560 } 10561 result += shouldEscape ? encodeURIComponent(value).replace(/!/g, "%21") : notReallyPercentEncode(value); 10562 } 10563 } 10564 return result; 10565 }; 10566 subFunction.varNames = varNames; 10567 return { 10568 prefix: prefix, 10569 substitution: subFunction 10570 }; 10571} 10572 10573function UriTemplate(template) { 10574 if (!(this instanceof UriTemplate)) { 10575 return new UriTemplate(template); 10576 } 10577 var parts = template.split("{"); 10578 var textParts = [parts.shift()]; 10579 var prefixes = []; 10580 var substitutions = []; 10581 var varNames = []; 10582 while (parts.length > 0) { 10583 var part = parts.shift(); 10584 var spec = part.split("}")[0]; 10585 var remainder = part.substring(spec.length + 1); 10586 var funcs = uriTemplateSubstitution(spec); 10587 substitutions.push(funcs.substitution); 10588 prefixes.push(funcs.prefix); 10589 textParts.push(remainder); 10590 varNames = varNames.concat(funcs.substitution.varNames); 10591 } 10592 this.fill = function(valueFunction) { 10593 var result = textParts[0]; 10594 for (var i = 0; i < substitutions.length; i++) { 10595 var substitution = substitutions[i]; 10596 result += substitution(valueFunction); 10597 result += textParts[i + 1]; 10598 } 10599 return result; 10600 }; 10601 this.varNames = varNames; 10602 this.template = template; 10603} 10604UriTemplate.prototype = { 10605 toString: function() { 10606 return this.template; 10607 }, 10608 fillFromObject: function(obj) { 10609 return this.fill(function(varName) { 10610 return obj[varName]; 10611 }); 10612 } 10613}; 10614var ValidatorContext = function ValidatorContext(parent, collectMultiple, errorReporter,
10614checkRecursive, trackUnknownProperties) { 10615 this.missing = []; 10616 this.missingMap = {}; 10617 this.formatValidators = parent ? Object.create(parent.formatValidators) : {}; 10618 this.schemas = parent ? Object.create(parent.schemas) : {}; 10619 this.collectMultiple = collectMultiple; 10620 this.errors = []; 10621 this.handleError = collectMultiple ? this.collectError : this.returnError; 10622 if (checkRecursive) { 10623 this.checkRecursive = true; 10624 this.scanned = []; 10625 this.scannedFrozen = []; 10626 this.scannedFrozenSchemas = []; 10627 this.scannedFrozenValidationErrors = []; 10628 this.validatedSchemasKey = "tv4_validation_id"; 10629 this.validationErrorsKey = "tv4_validation_errors_id"; 10630 } 10631 if (trackUnknownProperties) { 10632 this.trackUnknownProperties = true; 10633 this.knownPropertyPaths = {}; 10634 this.unknownPropertyPaths = {}; 10635 } 10636 this.errorReporter = errorReporter || defaultErrorReporter("en"); 10637 if (typeof this.errorReporter === "string") { 10638 throw new Error("debug"); 10639 } 10640 this.definedKeywords = {}; 10641 if (parent) { 10642 for (var key in parent.definedKeywords) { 10643 this.definedKeywords[key] = parent.definedKeywords[key].slice(0); 10644 } 10645 } 10646}; 10647ValidatorContext.prototype.defineKeyword = function(keyword, keywordFunction) { 10648 this.definedKeywords[keyword] = this.definedKeywords[keyword] || []; 10649 this.definedKeywords[keyword].push(keywordFunction); 10650}; 10651ValidatorContext.prototype.createError = function(code, messageParams, dataPath, schemaPath, subErrors, data, schema) { 10652 var error = new ValidationError(code, messageParams, dataPath, schemaPath, subErrors); 10653 error.message = this.errorReporter(error, data, schema); 10654 return error; 10655}; 10656ValidatorContext.prototype.returnError = function(error) { 10657 return error; 10658}; 10659ValidatorContext.prototype.collectError = function(error) { 10660 if (error) { 10661 this.errors.push(error); 10662 } 10663 return null; 10664}; 10665ValidatorContext.prototype.prefixErrors = function(startIndex, dataPath, schemaPath) { 10666 for (var i = startIndex; i < this.errors.length; i++) { 10667 this.errors[i] = this.errors[i].prefixWith(dataPath, schemaPath); 10668 } 10669 return this; 10670}; 10671ValidatorContext.prototype.banUnknownProperties = function(data, schema) { 10672 for (var unknownPath in this.unknownPropertyPaths) { 10673 var error = this.createError(ErrorCodes.UNKNOWN_PROPERTY, { 10674 path: unknownPath 10675 }, unknownPath, "", null, data, schema); 10676 var result = this.handleError(error); 10677 if (result) { 10678 return result; 10679 } 10680 } 10681 return null; 10682}; 10683 10684ValidatorContext.prototype.addFormat = function(format, validator) { 10685 if (typeof format === "object") { 10686 for (var key in format) { 10687 this.addFormat(key, format[key]); 10688 } 10689 return this; 10690 } 10691 this.formatValidators[format] = validator; 10692}; 10693ValidatorContext.prototype.resolveRefs = function(schema, urlHistory) { 10694 if (schema["$ref"] !== undefined) { 10695 urlHistory = urlHistory || {}; 10696 if (urlHistory[schema["$ref"]]) { 10697 return this.createError(ErrorCodes.CIRCULAR_REFERENCE, { 10698 urls: Object.keys(urlHistory).join(", ") 10699 }, "", "", null, undefined, schema); 10700 } 10701 urlHistory[schema["$ref"]] = true; 10702 schema = this.getSchema(schema["$ref"], urlHistory); 10703 } 10704 return schema; 10705}; 10706ValidatorContext.prototype.getSchema = function(url, urlHistory) { 10707 var schema; 10708 if (this.schemas[url] !== undefined) { 10709 schema = this.schemas[url]; 10710 return this.resolveRefs(schema, urlHistory); 10711 } 10712 var baseUrl = url; 10713 var fragment = ""; 10714 if (url.indexOf("#") !== -1) { 10715 fragment = url.substring(url.indexOf("#") + 1); 10716 baseUrl = url.substring(0, url.indexOf("#")); 10717 } 10718 if (typeof this.schemas[baseUrl] === "object") { 10719 schema = this.schemas[baseUrl]; 10720 var pointerPath = decodeURIComponent(fragment); 10721 if (pointerPath === "") { 10722 return this.resolveRefs(schema, urlHistory); 10723 } else if (pointerPath.charAt(0) !== "/") { 10724 return undefined; 10725 } 10726 var parts = pointerPath.split("/").slice(1); 10727 for (var i = 0; i < parts.length; i++) { 10728 var component = parts[i].replace(/~1/g, "/").replace(/~0/g, "~"); 10729 if (schema[component] === undefined) { 10730 schema = undefined; 10731 break; 10732 } 10733 schema = schema[component]; 10734 } 10735 if (schema !== undefined) { 10736 return this.resolveRefs(schema, urlHistory); 10737 } 10738 } 10739 if (this.missing[baseUrl] === undefined) { 10740 this.missing.push(baseUrl); 10741 this.missing[baseUrl] = baseUrl; 10742 this.missingMap[baseUrl] = baseUrl; 10743 } 10744}; 10745ValidatorContext.prototype.searchSchemas = function(schema, url) { 10746 if (Array.isArray(schema)) { 10747 for (var i = 0; i < schema.length; i++) { 10748 this.searchSchemas(schema[i], url); 10749 } 10750 } else if (schema && typeof schema === "object") { 10751 if (typeof schema.id === "string") { 10752 if (isTrustedUrl(url, schema.id)) { 10753 if (this.schemas[schema.id] === undefined) { 10754 this.schemas[schema.id] = schema; 10755 } 10756 } 10757 } 10758 for (var key in schema) { 10759 if (key !== "enum") { 10760 if (typeof schema[key] === "object") { 10761 this.searchSchemas(schema[key], url); 10762 } else if (key === "$ref") { 10763 var uri = getDocumentUri(schema[key]); 10764 if (uri && this.schemas[uri] === undefined && this.missingMap[uri] === undefined) { 10765 this.missingMap[uri] = uri; 10766 } 10767 } 10768 } 10769 } 10770 } 10771}; 10772ValidatorContext.prototype.addSchema = function(url, schema) { 10773 //overload 10774 if (typeof url !== "string" || typeof schema === "undefined") { 10775 if (typeof url === "object" && typeof url.id === "string") { 10776 schema = url; 10777 url = schema.id; 10778 } else { 10779 return; 10780 } 10781 } 10782 if (url === getDocumentUri(url) + "#") { 10783 // Remove empty fragment 10784 url = getDocumentUri(url); 10785 } 10786 this.schemas[url] = schema; 10787 delete this.missingMap[url]; 10788 normSchema(schema, url); 10789 this.searchSchemas(schema, url); 10790}; 10791 10792ValidatorContext.prototype.getSchemaMap = function() { 10793 var map = {}; 10794 for (var key in this.schemas) { 10795 map[key] = this.schemas[key]; 10796 } 10797 return map; 10798}; 10799 10800ValidatorContext.prototype.getSchemaUris = function(filterRegExp) { 10801 var list = []; 10802 for (var key in this.schemas) { 10803 if (!filterRegExp || filterRegExp.test(key)) { 10804 list.push(key); 10805 } 10806 } 10807 return list; 10808}; 10809 10810ValidatorContext.prototype.getMissingUris = function(filterRegExp) { 10811 var list = []; 10812 for (var key in this.missingMap) { 10813 if (!filterRegExp || filterRegExp.test(key)) { 10814 list.push(key); 10815 } 10816 } 10817 return list; 10818}; 10819 10820ValidatorContext.prototype.dropSchemas = function() { 10821 this.schemas = {}; 10822 this.reset(); 10823}; 10824ValidatorContext.prototype.reset = function() { 10825 this.missing = []; 10826 this.missingMap = {}; 10827 this.errors = []; 10828}; 10829 10830ValidatorContext.prototype.validateAll = function(data, schema, dataPathParts, schemaPathParts, dataPointerPath) { 10831 var topLevel; 10832 schema = this.resolveRefs(schema); 10833 if (!schema) { 10834 return null; 10835 } else if (schema instanceof ValidationError) { 10836 this.errors.push(schema); 10837 return schema; 10838 } 10839 10840 var startErrorCount = this.errors.length; 10841 var frozenIndex, scannedFrozenSchemaIndex = null, 10842 scannedSchemasIndex = null; 10843 if (this.checkRecursive && data && typeof data === "object") { 10844 topLevel = !this.scanned.length; 10845 if (data[this.validatedSchemasKey]) { 10846 var schemaIndex = data[this.validatedSchemasKey].indexOf(schema); 10847 if (schemaIndex !== -1) { 10848 this.errors = this.errors.concat(data[this.validationErrorsKey][schemaIndex]); 10849 return null; 10850 } 10851 } 10852 if (Object.isFrozen(data)) { 10853 frozenIndex = this.scannedFrozen.indexOf(data); 10854 if (frozenIndex !== -1) { 10855 var frozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].indexOf(schema); 10856 if (frozenSchemaIndex !== -1) { 10857 this.errors = this.errors.concat(this.scannedFrozenValidationErrors[frozenIndex][frozenSchemaIndex]); 10858 return null; 10859 } 10860 } 10861 } 10862 this.scanned.push(data); 10863 if (Object.isFrozen(data)) { 10864 if (frozenIndex === -1) { 10865 frozenIndex = this.scannedFrozen.length; 10866 this.scannedFrozen.push(data); 10867 this.scannedFrozenSchemas.push([]); 10868 } 10869 scannedFrozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].length; 10870 this.scannedFrozenSchemas[frozenIndex][scannedFrozenSchemaIndex] = schema; 10871 this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = []; 10872 } else { 10873 if (!data[this.validatedSchemasKey]) { 10874 try { 10875 Object.defineProperty(data, this.validatedSchemasKey, { 10876 value: [], 10877 configurable: true 10878 }); 10879 Object.defineProperty(data, this.validationErrorsKey, { 10880 value: [], 10881 configurable: true 10882 }); 10883 } catch (e) { 10884 //IE 7/8 workaround 10885 data[this.validatedSchemasKey] = []; 10886 data[this.validationErrorsKey] = []; 10887 } 10888 } 10889 scannedSchemasIndex = data[this.validatedSchemasKey].length; 10890 data[this.validatedSchemasKey][scannedSchemasIndex] = schema; 10891 data[this.validationErrorsKey][scannedSchemasIndex] = []; 10892 } 10893 } 10894 10895 var errorCount = this.errors.length; 10896 var error = this.validateBasic(data, schema, dataPointerPath) || 10897 this.validateNumeric(data, schema, dataPointerPath) || 10898 this.validateString(data, schema, dataPointerPath) || 10899 this.validateArray(data, schema, dataPointerPath) || 10900 this.validateObject(data, schema, dataPointerPath) || 10901 this.validateCombinations(data, schema, dataPointerPath) || 10902 this.validateHypermedia(data, schema, dataPointerPath) || 10903 this.validateFormat(data, schema, dataPointerPath) || 10904 this.validateDefinedKeywords(data, schema, dataPointerPath) || 10905 null; 10906 10907 if (topLevel) { 10908 while (this.scanned.length) { 10909 var item = this.scanned.pop(); 10910 delete item[this.validatedSchemasKey]; 10911 } 10912 this.scannedFrozen = []; 10913 this.scannedFrozenSchemas = []; 10914 } 10915 10916 if (error || errorCount !== this.errors.length) { 10917 while ((dataPathParts && dataPathParts.length) || (schemaPathParts && schemaPathParts.length)) { 10918 var dataPart = (dataPathParts && dataPathParts.length) ? "" + dataPathParts.pop() : null; 10919 var schemaPart = (schemaPathParts && schemaPathParts.length) ? "" + schemaPathParts.pop() : null; 10920 if (error) { 10921 error = error.prefixWith(dataPart, schemaPart); 10922 } 10923 this.prefixErrors(errorCount, dataPart, schemaPart); 10924 } 10925 } 10926 10927 if (scannedFrozenSchemaIndex !== null) { 10928 this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = this.errors.slice(startErrorCount); 10929 } else if (scannedSchemasIndex !== null) { 10930 data[this.validationErrorsKey][scannedSchemasIndex] = this.errors.slice(startErrorCount); 10931 } 10932 10933 return this.handleError(error); 10934}; 10935ValidatorContext.prototype.validateFormat = function(data, schema) { 10936 if (typeof schema.format !== "string" || !this.formatValidators[schema.format]) { 10937 return null; 10938 } 10939 var errorMessage = this.formatValidators[schema.format].call(null, data, schema); 10940 if (typeof errorMessage === "string" || typeof errorMessage === "number") { 10941 return this.createError(ErrorCodes.FORMAT_CUSTOM, { 10942 message: errorMessage 10943 }, "", "/format", null, data, schema); 10944 } else if (errorMessage && typeof errorMessage === "object") { 10945 return this.createError(ErrorCodes.FORMAT_CUSTOM, { 10946 message: errorMessage.message || "?" 10947 }, errorMessage.dataPath || "", errorMessage.schemaPath || "/format", null, data, schema); 10948 } 10949 return null; 10950}; 10951ValidatorContext.prototype.validateDefinedKeywords = function(data, schema, dataPointerPath) { 10952 for (var key in this.definedKeywords) { 10953 if (typeof schema[key] === "undefined") { 10954 continue; 10955 }
10956 var validationFunctions = this.definedKeywords[key]; 10957 for (var i = 0; i < validationFunctions.length; i++) { 10958 var func = validationFunctions[i]; 10959 var result = func(data, schema[key], schema, dataPointerPath); 10960 if (typeof result === "string" || typeof result === "number") { 10961 return this.createError(ErrorCodes.KEYWORD_CUSTOM, { 10962 key: key, 10963 message: result 10964 }, "", "", null, data, schema).prefixWith(null, key); 10965 } else if (result && typeof result === "object") { 10966 var code = result.code; 10967 if (typeof code === "string") { 10968 if (!ErrorCodes[code]) { 10969 throw new Error("Undefined error code (use defineError): " + code); 10970 } 10971 code = ErrorCodes[code]; 10972 } else if (typeof code !== "number") { 10973 code = ErrorCodes.KEYWORD_CUSTOM; 10974 } 10975 var messageParams = (typeof result.message === "object") ? result.message : { 10976 key: key, 10977 message: result.message || "?" 10978 }; 10979 var schemaPath = result.schemaPath || ("/" + key.replace(/~/g, "~0").replace(/\//g, "~1")); 10980 return this.createError(code, messageParams, result.dataPath || null, schemaPath, null, data, schema); 10981 } 10982 } 10983 } 10984 return null; 10985}; 10986 10987function recursiveCompare(A, B) { 10988 if (A === B) { 10989 return true; 10990 } 10991 if (A && B && typeof A === "object" && typeof B === "object") { 10992 if (Array.isArray(A) !== Array.isArray(B)) { 10993 return false; 10994 } else if (Array.isArray(A)) { 10995 if (A.length !== B.length) { 10996 return false; 10997 } 10998 for (var i = 0; i < A.length; i++) { 10999 if (!recursiveCompare(A[i], B[i])) { 11000 return false; 11001 } 11002 } 11003 } else { 11004 var key; 11005 for (key in A) { 11006 if (B[key] === undefined && A[key] !== undefined) { 11007 return false; 11008 } 11009 } 11010 for (key in B) { 11011 if (A[key] === undefined && B[key] !== undefined) { 11012 return false; 11013 } 11014 } 11015 for (key in A) { 11016 if (!recursiveCompare(A[key], B[key])) { 11017 return false; 11018 } 11019 } 11020 } 11021 return true; 11022 } 11023 return false; 11024} 11025 11026ValidatorContext.prototype.validateBasic = function validateBasic(data, schema, dataPointerPath) { 11027 var error; 11028 if (error = this.validateType(data, schema, dataPointerPath)) { 11029 return error.prefixWith(null, "type"); 11030 } 11031 if (error = this.validateEnum(data, schema, dataPointerPath)) { 11032 return error.prefixWith(null, "type"); 11033 } 11034 return null; 11035}; 11036 11037ValidatorContext.prototype.validateType = function validateType(data, schema) { 11038 if (schema.type === undefined) { 11039 return null; 11040 } 11041 var dataType = typeof data; 11042 if (data === null) { 11043 dataType = "null"; 11044 } else if (Array.isArray(data)) { 11045 dataType = "array"; 11046 } 11047 var allowedTypes = schema.type; 11048 if (!Array.isArray(allowedTypes)) { 11049 allowedTypes = [allowedTypes]; 11050 } 11051 11052 for (var i = 0; i < allowedTypes.length; i++) { 11053 var type = allowedTypes[i]; 11054 if (type === dataType || (type === "integer" && dataType === "number" && (data % 1 === 0))) { 11055 return null; 11056 } 11057 } 11058 return this.createError(ErrorCodes.INVALID_TYPE, { 11059 type: dataType, 11060 expected: allowedTypes.join("/") 11061 }, "", "", null, data, schema); 11062}; 11063 11064ValidatorContext.prototype.validateEnum = function validateEnum(data, schema) { 11065 if (schema["enum"] === undefined) { 11066 return null; 11067 } 11068 for (var i = 0; i < schema["enum"].length; i++) { 11069 var enumVal = schema["enum"][i]; 11070 if (recursiveCompare(data, enumVal)) { 11071 return null; 11072 } 11073 } 11074 return this.createError(ErrorCodes.ENUM_MISMATCH, { 11075 value: (typeof JSON !== "undefined") ? JSON.stringify(data) : data 11076 }, "", "", null, data, schema); 11077}; 11078 11079ValidatorContext.prototype.validateNumeric = function validateNumeric(data, schema, dataPointerPath) { 11080 return this.validateMultipleOf(data, schema, dataPointerPath) || 11081 this.validateMinMax(data, schema, dataPointerPath) || 11082 this.validateNaN(data, schema, dataPointerPath) || 11083 null; 11084}; 11085 11086var CLOSE_ENOUGH_LOW = Math.pow(2, -51); 11087var CLOSE_ENOUGH_HIGH = 1 - CLOSE_ENOUGH_LOW; 11088ValidatorContext.prototype.validateMultipleOf = function validateMultipleOf(data, schema) { 11089 var multipleOf = schema.multipleOf || schema.divisibleBy; 11090 if (multipleOf === undefined) { 11091 return null; 11092 } 11093 if (typeof data === "number") { 11094 var remainder = (data / multipleOf) % 1; 11095 if (remainder >= CLOSE_ENOUGH_LOW && remainder < CLOSE_ENOUGH_HIGH) { 11096 return this.createError(ErrorCodes.NUMBER_MULTIPLE_OF, { 11097 value: data, 11098 multipleOf: multipleOf 11099 }, "", "", null, data, schema); 11100 } 11101 } 11102 return null; 11103}; 11104 11105ValidatorContext.prototype.validateMinMax = function validateMinMax(data, schema) { 11106 if (typeof data !== "number") { 11107 return null; 11108 } 11109 if (schema.minimum !== undefined) { 11110 if (data < schema.minimum) { 11111 return this.createError(ErrorCodes.NUMBER_MINIMUM, { 11112 value: data, 11113 minimum: schema.minimum 11114 }, "", "/minimum", null, data, schema); 11115 } 11116 if (schema.exclusiveMinimum && data === schema.minimum) { 11117 return this.createError(ErrorCodes.NUMBER_MINIMUM_EXCLUSIVE, { 11118 value: data, 11119 minimum: schema.minimum 11120 }, "", "/exclusiveMinimum", null, data, schema); 11121 } 11122 } 11123 if (schema.maximum !== undefined) { 11124 if (data > schema.maximum) { 11125 return this.createError(ErrorCodes.NUMBER_MAXIMUM, { 11126 value: data, 11127 maximum: schema.maximum 11128 }, "", "/maximum", null, data, schema); 11129 } 11130 if (schema.exclusiveMaximum && data === schema.maximum) { 11131 return this.createError(ErrorCodes.NUMBER_MAXIMUM_EXCLUSIVE, { 11132 value: data, 11133 maximum: schema.maximum 11134 }, "", "/exclusiveMaximum", null, data, schema); 11135 } 11136 } 11137 return null; 11138}; 11139 11140ValidatorContext.prototype.validateNaN = function validateNaN(data, schema) { 11141 if (typeof data !== "number") { 11142 return null; 11143 } 11144 if (isNaN(data) === true || data === Infinity || data === -Infinity) { 11145 return this.createError(ErrorCodes.NUMBER_NOT_A_NUMBER, { 11146 value: data 11147 }, "", "/type", null, data, schema); 11148 } 11149 return null; 11150}; 11151 11152ValidatorContext.prototype.validateString = function validateString(data, schema, dataPointerPath) { 11153 return this.validateStringLength(data, schema, dataPointerPath) || 11154 this.validateStringPattern(data, schema, dataPointerPath) || 11155 null; 11156}; 11157 11158ValidatorContext.prototype.validateStringLength = function validateStringLength(data, schema) { 11159 if (typeof data !== "string") { 11160 return null; 11161 } 11162 if (schema.minLength !== undefined) { 11163 if (data.length < schema.minLength) { 11164 return this.createError(ErrorCodes.STRING_LENGTH_SHORT, { 11165 length: data.length, 11166 minimum: schema.minLength 11167 }, "", "/minLength", null, data, schema); 11168 } 11169 } 11170 if (schema.maxLength !== undefined) { 11171 if (data.length > schema.maxLength) { 11172 return this.createError(ErrorCodes.STRING_LENGTH_LONG, { 11173 length: data.length, 11174 maximum: schema.maxLength 11175 }, "", "/maxLength", null, data, schema); 11176 } 11177 } 11178 return null; 11179}; 11180 11181ValidatorContext.prototype.validateStringPattern = function validateStringPattern(data, schema) { 11182 if (typeof data !== "string" || (typeof schema.pattern !== "string" && !(schema.pattern instanceof RegExp))) { 11183 return null; 11184 } 11185 var regexp; 11186 if (schema.pattern instanceof RegExp) { 11187 regexp = schema.pattern; 11188 } else { 11189 var body, flags = ""; 11190 // Check for regular expression literals 11191 // @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5 11192 var literal = schema.pattern.match(/^\/(.+)\/([img]*)$/); 11193 if (literal) { 11194 body = literal[1]; 11195 flags = literal[2]; 11196 } else { 11197 body = schema.pattern; 11198 } 11199 regexp = new RegExp(body, flags); 11200 } 11201 if (!regexp.test(data)) { 11202 return this.createError(ErrorCodes.STRING_PATTERN, { 11203 pattern: schema.pattern 11204 }, "", "/pattern", null, data, schema); 11205 } 11206 return null; 11207}; 11208 11209ValidatorContext.prototype.validateArray = function validateArray(data, schema, dataPointerPath) { 11210 if (!Array.isArray(data)) { 11211 return null; 11212 }
11213 return this.validateArrayLength(data, schema, dataPointerPath) || 11214 this.validateArrayUniqueItems(data, schema, dataPointerPath) || 11215 this.validateArrayItems(data, schema, dataPointerPath) || 11216 null; 11217}; 11218 11219ValidatorContext.prototype.validateArrayLength = function validateArrayLength(data, schema) { 11220 var error; 11221 if (schema.minItems !== undefined) { 11222 if (data.length < schema.minItems) { 11223 error = this.createError(ErrorCodes.ARRAY_LENGTH_SHORT, { 11224 length: data.length, 11225 minimum: schema.minItems 11226 }, "", "/minItems", null, data, schema); 11227 if (this.handleError(error)) { 11228 return error; 11229 } 11230 } 11231 } 11232 if (schema.maxItems !== undefined) { 11233 if (data.length > schema.maxItems) { 11234 error = this.createError(ErrorCodes.ARRAY_LENGTH_LONG, { 11235 length: data.length, 11236 maximum: schema.maxItems 11237 }, "", "/maxItems", null, data, schema); 11238 if (this.handleError(error)) { 11239 return error; 11240 } 11241 } 11242 } 11243 return null; 11244}; 11245 11246ValidatorContext.prototype.validateArrayUniqueItems = function validateArrayUniqueItems(data, schema) { 11247 if (schema.uniqueItems) { 11248 for (var i = 0; i < data.length; i++) { 11249 for (var j = i + 1; j < data.length; j++) { 11250 if (recursiveCompare(data[i], data[j])) { 11251 var error = this.createError(ErrorCodes.ARRAY_UNIQUE, { 11252 match1: i, 11253 match2: j 11254 }, "", "/uniqueItems", null, data, schema); 11255 if (this.handleError(error)) { 11256 return error; 11257 } 11258 } 11259 } 11260 } 11261 } 11262 return null; 11263}; 11264 11265ValidatorContext.prototype.validateArrayItems = function validateArrayItems(data, schema, dataPointerPath) { 11266 if (schema.items === undefined) { 11267 return null; 11268 } 11269 var error, i; 11270 if (Array.isArray(schema.items)) { 11271 for (i = 0; i < data.length; i++) { 11272 if (i < schema.items.length) { 11273 if (error = this.validateAll(data[i], schema.items[i], [i], ["items", i], dataPointerPath + "/" + i)) { 11274 return error; 11275 } 11276 } else if (schema.additionalItems !== undefined) { 11277 if (typeof schema.additionalItems === "boolean") { 11278 if (!schema.additionalItems) { 11279 error = (this.createError(ErrorCodes.ARRAY_ADDITIONAL_ITEMS, {}, "/" + i, "/additionalItems", null, data, schema)); 11280 if (this.handleError(error)) { 11281 return error; 11282 } 11283 } 11284 } else if (error = this.validateAll(data[i], schema.additionalItems, [i], ["additionalItems"], dataPointerPath + "/" + i)) { 11285 return error; 11286 } 11287 } 11288 } 11289 } else { 11290 for (i = 0; i < data.length; i++) { 11291 if (error = this.validateAll(data[i], schema.items, [i], ["items"], dataPointerPath + "/" + i)) { 11292 return error; 11293 } 11294 } 11295 } 11296 return null; 11297}; 11298 11299ValidatorContext.prototype.validateObject = function validateObject(data, schema, dataPointerPath) { 11300 if (typeof data !== "object" || data === null || Array.isArray(data)) { 11301 return null; 11302 } 11303 return this.validateObjectMinMaxProperties(data, schema, dataPointerPath) || 11304 this.validateObjectRequiredProperties(data, schema, dataPointerPath) || 11305 this.validateObjectProperties(data, schema, dataPointerPath) || 11306 this.validateObjectDependencies(data, schema, dataPointerPath) || 11307 null; 11308}; 11309 11310ValidatorContext.prototype.validateObjectMinMaxProperties = function validateObjectMinMaxProperties(data, schema) { 11311 var keys = Object.keys(data); 11312 var error; 11313 if (schema.minProperties !== undefined) { 11314 if (keys.length < schema.minProperties) { 11315 error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, { 11316 propertyCount: keys.length, 11317 minimum: schema.minProperties 11318 }, "", "/minProperties", null, data, schema); 11319 if (this.handleError(error)) { 11320 return error; 11321 } 11322 } 11323 } 11324 if (schema.maxProperties !== undefined) { 11325 if (keys.length > schema.maxProperties) { 11326 error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, { 11327 propertyCount: keys.length, 11328 maximum: schema.maxProperties 11329 }, "", "/maxProperties", null, data, schema); 11330 if (this.handleError(error)) { 11331 return error; 11332 } 11333 } 11334 } 11335 return null; 11336}; 11337 11338ValidatorContext.prototype.validateObjectRequiredProperties = function validateObjectRequiredProperties(data, schema) { 11339 if (schema.required !== undefined) { 11340 for (var i = 0; i < schema.required.length; i++) { 11341 var key = schema.required[i]; 11342 if (data[key] === undefined) { 11343 var error = this.createError(ErrorCodes.OBJECT_REQUIRED, { 11344 key: key 11345 }, "", "/required/" + i, null, data, schema); 11346 if (this.handleError(error)) { 11347 return error; 11348 } 11349 } 11350 } 11351 } 11352 return null; 11353}; 11354 11355ValidatorContext.prototype.validateObjectProperties = function validateObjectProperties(data, schema, dataPointerPath) { 11356 var error; 11357 for (var key in data) { 11358 var keyPointerPath = dataPointerPath + "/" + key.replace(/~/g, "~0").replace(/\//g, "~1"); 11359 var foundMatch = false;
11360 if (schema.properties !== undefined && schema.properties[key] !== undefined) { 11361 foundMatch = true; 11362 if (error = this.validateAll(data[key], schema.properties[key], [key], ["properties", key], keyPointerPath)) { 11363 return error; 11364 } 11365 } 11366 if (schema.patternProperties !== undefined) { 11367 for (var patternKey in schema.patternProperties) { 11368 var regexp = new RegExp(patternKey); 11369 if (regexp.test(key)) { 11370 foundMatch = true; 11371 if (error = this.validateAll(data[key], schema.patternProperties[patternKey], [key], ["patternProperties", patternKey], keyPointerPath)) { 11372 return error; 11373 } 11374 } 11375 } 11376 } 11377 if (!foundMatch) { 11378 if (schema.additionalProperties !== undefined) { 11379 if (this.trackUnknownProperties) { 11380 this.knownPropertyPaths[keyPointerPath] = true; 11381 delete this.unknownPropertyPaths[keyPointerPath]; 11382 } 11383 if (typeof schema.additionalProperties === "boolean") { 11384 if (!schema.additionalProperties) { 11385 error = this.createError(ErrorCodes.OBJECT_ADDITIONAL_PROPERTIES, { 11386 key: key 11387 }, "", "/additionalProperties", null, data, schema).prefixWith(key, null); 11388 if (this.handleError(error)) { 11389 return error; 11390 } 11391 } 11392 } else { 11393 if (error = this.validateAll(data[key], schema.additionalProperties, [key], ["additionalProperties"], keyPointerPath)) { 11394 return error; 11395 } 11396 } 11397 } else if (this.trackUnknownProperties && !this.knownPropertyPaths[keyPointerPath]) { 11398 this.unknownPropertyPaths[keyPointerPath] = true; 11399 } 11400 } else if (this.trackUnknownProperties) { 11401 this.knownPropertyPaths[keyPointerPath] = true; 11402 delete this.unknownPropertyPaths[keyPointerPath]; 11403 } 11404 } 11405 return null; 11406}; 11407 11408ValidatorContext.prototype.validateObjectDependencies = function validateObjectDependencies(data, schema, dataPointerPath) { 11409 var error; 11410 if (schema.dependencies !== undefined) { 11411 for (var depKey in schema.dependencies) { 11412 if (data[depKey] !== undefined) { 11413 var dep = schema.dependencies[depKey]; 11414 if (typeof dep === "string") { 11415 if (data[dep] === undefined) { 11416 error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, { 11417 key: depKey, 11418 missing: dep 11419 }, "", "", null, data, schema).prefixWith(null, depKey).prefixWith(null, "dependencies"); 11420 if (this.handleError(error)) { 11421 return error; 11422 } 11423 } 11424 } else if (Array.isArray(dep)) { 11425 for (var i = 0; i < dep.length; i++) { 11426 var requiredKey = dep[i]; 11427 if (data[requiredKey] === undefined) { 11428 error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, { 11429 key: depKey, 11430 missing: requiredKey 11431 }, "", "/" + i, null, data, schema).prefixWith(null, depKey).prefixWith(null, "dependencies"); 11432 if (this.handleError(error)) { 11433 return error; 11434 } 11435 } 11436 } 11437 } else { 11438 if (error = this.validateAll(data, dep, [], ["dependencies", depKey], dataPointerPath)) { 11439 return error; 11440 } 11441 } 11442 } 11443 } 11444 } 11445 return null; 11446}; 11447 11448ValidatorContext.prototype.validateCombinations = function validateCombinations(data, schema, dataPointerPath) { 11449 return this.validateAllOf(data, schema, dataPointerPath) || 11450 this.validateAnyOf(data, schema, dataPointerPath) || 11451 this.validateOneOf(data, schema, dataPointerPath) || 11452 this.validateNot(data, schema, dataPointerPath) || 11453 null; 11454}; 11455 11456ValidatorContext.prototype.validateAllOf = function validateAllOf(data, schema, dataPointerPath) { 11457 if (schema.allOf === undefined) { 11458 return null; 11459 } 11460 var error; 11461 for (var i = 0; i < schema.allOf.length; i++) { 11462 var subSchema = schema.allOf[i]; 11463 if (error = this.validateAll(data, subSchema, [], ["allOf", i], dataPointerPath)) { 11464 return error; 11465 } 11466 } 11467 return null; 11468}; 11469 11470ValidatorContext.prototype.validateAnyOf = function validateAnyOf(data, schema, dataPointerPath) { 11471 if (schema.anyOf === undefined) { 11472 return null; 11473 } 11474 var errors = []; 11475 var startErrorCount = this.errors.length; 11476 var oldUnknownPropertyPaths, oldKnownPropertyPaths; 11477 if (this.trackUnknownProperties) { 11478 oldUnknownPropertyPaths = this.unknownPropertyPaths; 11479 oldKnownPropertyPaths = this.knownPropertyPaths; 11480 } 11481 var errorAtEnd = true; 11482 for (var i = 0; i < schema.anyOf.length; i++) { 11483 if (this.trackUnknownProperties) { 11484 this.unknownPropertyPaths = {}; 11485 this.knownPropertyPaths = {}; 11486 }
11487 var subSchema = schema.anyOf[i]; 11488 11489 var errorCount = this.errors.length; 11490 var error = this.validateAll(data, subSchema, [], ["anyOf", i], dataPointerPath); 11491 11492 if (error === null && errorCount === this.errors.length) { 11493 this.errors = this.errors.slice(0, startErrorCount); 11494 11495 if (this.trackUnknownProperties) { 11496 for (var knownKey in this.knownPropertyPaths) { 11497 oldKnownPropertyPaths[knownKey] = true; 11498 delete oldUnknownPropertyPaths[knownKey]; 11499 } 11500 for (var unknownKey in this.unknownPropertyPaths) { 11501 if (!oldKnownPropertyPaths[unknownKey]) { 11502 oldUnknownPropertyPaths[unknownKey] = true; 11503 } 11504 } 11505 // We need to continue looping so we catch all the property definitions, but we don't want to return an error 11506 errorAtEnd = false; 11507 continue; 11508 } 11509 11510 return null; 11511 } 11512 if (error) { 11513 errors.push(error.prefixWith(null, "" + i).prefixWith(null, "anyOf")); 11514 } 11515 } 11516 if (this.trackUnknownProperties) { 11517 this.unknownPropertyPaths = oldUnknownPropertyPaths; 11518 this.knownPropertyPaths = oldKnownPropertyPaths; 11519 } 11520 if (errorAtEnd) { 11521 errors = errors.concat(this.errors.slice(startErrorCount)); 11522 this.errors = this.errors.slice(0, startErrorCount); 11523 return this.createError(ErrorCodes.ANY_OF_MISSING, {}, "", "/anyOf", errors, data, schema); 11524 } 11525}; 11526 11527ValidatorContext.prototype.validateOneOf = function validateOneOf(data, schema, dataPointerPath) { 11528 if (schema.oneOf === undefined) { 11529 return null; 11530 }
11531 var validIndex = null; 11532 var errors = []; 11533 var startErrorCount = this.errors.length; 11534 var oldUnknownPropertyPaths, oldKnownPropertyPaths; 11535 if (this.trackUnknownProperties) { 11536 oldUnknownPropertyPaths = this.unknownPropertyPaths; 11537 oldKnownPropertyPaths = this.knownPropertyPaths; 11538 } 11539 for (var i = 0; i < schema.oneOf.length; i++) { 11540 if (this.trackUnknownProperties) { 11541 this.unknownPropertyPaths = {}; 11542 this.knownPropertyPaths = {}; 11543 } 11544 var subSchema = schema.oneOf[i]; 11545 11546 var errorCount = this.errors.length; 11547 var error = this.validateAll(data, subSchema, [], ["oneOf", i], dataPointerPath); 11548 11549 if (error === null && errorCount === this.errors.length) { 11550 if (validIndex === null) { 11551 validIndex = i; 11552 } else { 11553 this.errors = this.errors.slice(0, startErrorCount); 11554 return this.createError(ErrorCodes.ONE_OF_MULTIPLE, { 11555 index1: validIndex, 11556 index2: i 11557 }, "", "/oneOf", null, data, schema); 11558 } 11559 if (this.trackUnknownProperties) { 11560 for (var knownKey in this.knownPropertyPaths) { 11561 oldKnownPropertyPaths[knownKey] = true; 11562 delete oldUnknownPropertyPaths[knownKey]; 11563 } 11564 for (var unknownKey in this.unknownPropertyPaths) { 11565 if (!oldKnownPropertyPaths[unknownKey]) { 11566 oldUnknownPropertyPaths[unknownKey] = true; 11567 } 11568 } 11569 } 11570 } else if (error) { 11571 errors.push(error); 11572 } 11573 } 11574 if (this.trackUnknownProperties) { 11575 this.unknownPropertyPaths = oldUnknownPropertyPaths; 11576 this.knownPropertyPaths = oldKnownPropertyPaths; 11577 } 11578 if (validIndex === null) { 11579 errors = errors.concat(this.errors.slice(startErrorCount)); 11580 this.errors = this.errors.slice(0, startErrorCount); 11581 return this.createError(ErrorCodes.ONE_OF_MISSING, {}, "", "/oneOf", errors, data, schema); 11582 } else { 11583 this.errors = this.errors.slice(0, startErrorCount); 11584 } 11585 return null; 11586}; 11587 11588ValidatorContext.prototype.validateNot = function validateNot(data, schema, dataPointerPath) { 11589 if (schema.not === undefined) { 11590 return null; 11591 } 11592 var oldErrorCount = this.errors.length; 11593 var oldUnknownPropertyPaths, oldKnownPropertyPaths; 11594 if (this.trackUnknownProperties) { 11595 oldUnknownPropertyPaths = this.unknownPropertyPaths; 11596 oldKnownPropertyPaths = this.knownPropertyPaths; 11597 this.unknownPropertyPaths = {}; 11598 this.knownPropertyPaths = {}; 11599 } 11600 var error = this.validateAll(data, schema.not, null, null, dataPointerPath); 11601 var notErrors = this.errors.slice(oldErrorCount); 11602 this.errors = this.errors.slice(0, oldErrorCount); 11603 if (this.trackUnknownProperties) { 11604 this.unknownPropertyPaths = oldUnknownPropertyPaths; 11605 this.knownPropertyPaths = oldKnownPropertyPaths; 11606 } 11607 if (error === null && notErrors.length === 0) { 11608 return this.createError(ErrorCodes.NOT_PASSED, {}, "", "/not", null, data, schema); 11609 } 11610 return null; 11611}; 11612 11613ValidatorContext.prototype.validateHypermedia = function validateCombinations(data, schema, dataPointerPath) { 11614 if (!schema.links) { 11615 return null; 11616 } 11617 var error; 11618 for (var i = 0; i < schema.links.length; i++) { 11619 var ldo = schema.links[i]; 11620 if (ldo.rel === "describedby") { 11621 var template = new UriTemplate(ldo.href); 11622 var allPresent = true; 11623 for (var j = 0; j < template.varNames.length; j++) { 11624 if (!(template.varNames[j] in data)) { 11625 allPresent = false; 11626 break; 11627 } 11628 } 11629 if (allPresent) { 11630 var schemaUrl = template.fillFromObject(data); 11631 var subSchema = { 11632 "$ref": schemaUrl 11633 }; 11634 if (error = this.validateAll(data, subSchema, [], ["links", i], dataPointerPath)) { 11635 return error; 11636 } 11637 } 11638 } 11639 } 11640}; 11641 11642// parseURI() and resolveUrl() are from https://gist.github.com/1088850 11643// - released as public domain by author ("Yaffle") - see comments on gist 11644 11645function parseURI(url) { 11646 var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); 11647 // authority = "//" + user + ":" + pass "@" + hostname + ":" port 11648 return (m ? { 11649 href: m[0] || "", 11650 protocol: m[1] || "", 11651 authority: m[2] || "", 11652 host: m[3] || "", 11653 hostname: m[4] || "", 11654 port: m[5] || "", 11655 pathname: m[6] || "", 11656 search: m[7] || "", 11657 hash: m[8] || "" 11658 } : null); 11659} 11660 11661function resolveUrl(base, href) { // RFC 3986 11662 11663 function removeDotSegments(input) { 11664 var output = []; 11665 input.replace(/^(\.\.?(\/|$))+/, "") 11666 .replace(/\/(\.(\/|$))+/g, "/") 11667 .replace(/\/\.\.$/, "/../") 11668 .replace(/\/?[^\/]*/g, function(p) { 11669 if (p === "/..") { 11670 output.pop(); 11671 } else { 11672 output.push(p); 11673 } 11674 }); 11675 return output.join("").replace(/^\//, input.charAt(0) === "/" ? "/" : ""); 11676 } 11677 11678 href = parseURI(href || ""); 11679 base = parseURI(base || ""); 11680 11681 return !href || !base ? null : (href.protocol || base.protocol) + 11682 (href.protocol || href.authority ? href.authority : base.authority) + 11683 removeDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === "/" ? href.pathname : (href.pathname ? ((base.authority && !base.pathname ? "/" : "") + base.pathname.slice(0, base.pathname.lastIndexOf("/") + 1) + href.pathname) : base.pathname)) + 11684 (href.protocol || href.authority || href.pathname ? href.search : (href.search || base.search)) + 11685 href.hash; 11686} 11687 11688function getDocumentUri(uri) { 11689 return uri.split("#")[0]; 11690} 11691 11692function normSchema(schema, baseUri) { 11693 if (schema && typeof schema === "object") { 11694 if (baseUri === undefined) { 11695 baseUri = schema.id; 11696 } else if (typeof schema.id === "string") { 11697 baseUri = resolveUrl(baseUri, schema.id); 11698 schema.id = baseUri; 11699 } 11700 if (Array.isArray(schema)) { 11701 for (var i = 0; i < schema.length; i++) { 11702 normSchema(schema[i], baseUri); 11703 } 11704 } else { 11705 if (typeof schema["$ref"] === "string") { 11706 schema["$ref"] = resolveUrl(baseUri, schema["$ref"]); 11707 } 11708 for (var key in schema) { 11709 if (key !== "enum") { 11710 normSchema(schema[key], baseUri); 11711 } 11712 } 11713 } 11714 } 11715} 11716 11717function defaultErrorReporter(language) { 11718 language = language || "en"; 11719 11720 var errorMessages = languages[language]; 11721 11722 return function(error) { 11723 var messageTemplate = errorMessages[error.code] || ErrorMessagesDefault[error.code]; 11724 if (typeof messageTemplate !== "string") { 11725 return "Unknown error code " + error.code + ": " + JSON.stringify(error.messageParams); 11726 } 11727 var messageParams = error.params; 11728 // Adapted from Crockford's supplant() 11729 return messageTemplate.replace(/\{([^{}]*)\}/g, function(whole, varName) { 11730 var subValue = messageParams[varName]; 11731 return typeof subValue === "string" || typeof subValue === "number" ? subValue : whole; 11732 }); 11733 }; 11734} 11735 11736var ErrorCodes = { 11737 INVALID_TYPE: 0, 11738 ENUM_MISMATCH: 1, 11739 ANY_OF_MISSING: 10, 11740 ONE_OF_MISSING: 11, 11741 ONE_OF_MULTIPLE: 12, 11742 NOT_PASSED: 13, 11743 // Numeric errors 11744 NUMBER_MULTIPLE_OF: 100, 11745 NUMBER_MINIMUM: 101, 11746 NUMBER_MINIMUM_EXCLUSIVE: 102, 11747 NUMBER_MAXIMUM: 103, 11748 NUMBER_MAXIMUM_EXCLUSIVE: 104, 11749 NUMBER_NOT_A_NUMBER: 105, 11750 // String errors 11751 STRING_LENGTH_SHORT: 200, 11752 STRING_LENGTH_LONG: 201, 11753 STRING_PATTERN: 202, 11754 // Object errors 11755 OBJECT_PROPERTIES_MINIMUM: 300, 11756 OBJECT_PROPERTIES_MAXIMUM: 301, 11757 OBJECT_REQUIRED: 302, 11758 OBJECT_ADDITIONAL_PROPERTIES: 303, 11759 OBJECT_DEPENDENCY_KEY: 304, 11760 // Array errors 11761 ARRAY_LENGTH_SHORT: 400, 11762 ARRAY_LENGTH_LONG: 401, 11763 ARRAY_UNIQUE: 402, 11764 ARRAY_ADDITIONAL_ITEMS: 403, 11765 // Custom/user-defined errors 11766 FORMAT_CUSTOM: 500, 11767 KEYWORD_CUSTOM: 501, 11768 // Schema structure 11769 CIRCULAR_REFERENCE: 600, 11770 // Non-standard validation options 11771 UNKNOWN_PROPERTY: 1000 11772}; 11773var ErrorCodeLookup = {}; 11774for (var key in ErrorCodes) { 11775 ErrorCodeLookup[ErrorCodes[key]] = key; 11776} 11777var ErrorMessagesDefault = { 11778 INVALID_TYPE: "Invalid type: {type} (expected {expected})", 11779 ENUM_MISMATCH: "No enum match for: {value}", 11780 ANY_OF_MISSING: "Data does not match any schemas from \"anyOf\"", 11781 ONE_OF_MISSING: "Data does not match any schemas from \"oneOf\"", 11782 ONE_OF_MULTIPLE: "Data is valid against more than one schema from \"oneOf\": indices {index1} and {index2}", 11783 NOT_PASSED: "Data matches schema from \"not\"", 11784 // Numeric errors 11785 NUMBER_MULTIPLE_OF: "Value {value} is not a multiple of {multipleOf}", 11786 NUMBER_MINIMUM: "Value {value} is less than minimum {minimum}", 11787 NUMBER_MINIMUM_EXCLUSIVE: "Value {value} is equal to exclusive minimum {minimum}", 11788 NUMBER_MAXIMUM: "Value {value} is greater than maximum {maximum}", 11789 NUMBER_MAXIMUM_EXCLUSIVE: "Value {value} is equal to exclusive maximum {maximum}", 11790 NUMBER_NOT_A_NUMBER: "Value {value} is not a valid number", 11791 // String errors 11792 STRING_LENGTH_SHORT: "String is too short ({length} chars), minimum {minimum}", 11793 STRING_LENGTH_LONG: "String is too long ({length} chars), maximum {maximum}", 11794 STRING_PATTERN: "String does not match pattern: {pattern}", 11795 // Object errors 11796 OBJECT_PROPERTIES_MINIMUM: "Too few properties defined ({propertyCount}), minimum {minimum}", 11797 OBJECT_PROPERTIES_MAXIMUM: "Too many properties defined ({propertyCount}), maximum {maximum}", 11798 OBJECT_REQUIRED: "Missing required property: {key}", 11799 OBJECT_ADDITIONAL_PROPERTIES: "Additional properties not allowed",
11800 OBJECT_DEPENDENCY_KEY: "Dependency failed - key must exist: {missing} (due to key: {key})", 11801 // Array errors 11802 ARRAY_LENGTH_SHORT: "Array is too short ({length}), minimum {minimum}", 11803 ARRAY_LENGTH_LONG: "Array is too long ({length}), maximum {maximum}", 11804 ARRAY_UNIQUE: "Array items are not unique (indices {match1} and {match2})", 11805 ARRAY_ADDITIONAL_ITEMS: "Additional items not allowed", 11806 // Format errors 11807 FORMAT_CUSTOM: "Format validation failed ({message})", 11808 KEYWORD_CUSTOM: "Keyword failed: {key} ({message})", 11809 // Schema structure 11810 CIRCULAR_REFERENCE: "Circular $refs: {urls}", 11811 // Non-standard validation options 11812 UNKNOWN_PROPERTY: "Unknown property (not in schema)" 11813}; 11814 11815function ValidationError(code, params, dataPath, schemaPath, subErrors) { 11816 Error.call(this); 11817 if (code === undefined) { 11818 throw new Error("No error code supplied: " + schemaPath); 11819 } 11820 this.message = ""; 11821 this.params = params; 11822 this.code = code; 11823 this.dataPath = dataPath || ""; 11824 this.schemaPath = schemaPath || ""; 11825 this.subErrors = subErrors || null; 11826 11827 var err = new Error(this.message); 11828 this.stack = err.stack || err.stacktrace; 11829 if (!this.stack) { 11830 try { 11831 throw err; 11832 } catch (err) { 11833 this.stack = err.stack || err.stacktrace; 11834 } 11835 } 11836} 11837ValidationError.prototype = Object.create(Error.prototype); 11838ValidationError.prototype.constructor = ValidationError; 11839ValidationError.prototype.name = "ValidationError"; 11840 11841ValidationError.prototype.prefixWith = function(dataPrefix, schemaPrefix) { 11842 if (dataPrefix !== null) { 11843 dataPrefix = dataPrefix.replace(/~/g, "~0").replace(/\//g, "~1"); 11844 this.dataPath = "/" + dataPrefix + this.dataPath; 11845 } 11846 if (schemaPrefix !== null) { 11847 schemaPrefix = schemaPrefix.replace(/~/g, "~0").replace(/\//g, "~1"); 11848 this.schemaPath = "/" + schemaPrefix + this.schemaPath; 11849 } 11850 if (this.subErrors !== null) { 11851 for (var i = 0; i < this.subErrors.length; i++) { 11852 this.subErrors[i].prefixWith(dataPrefix, schemaPrefix); 11853 } 11854 } 11855 return this; 11856}; 11857 11858function isTrustedUrl(baseUrl, testUrl) { 11859 if (testUrl.substring(0, baseUrl.length) === baseUrl) { 11860 var remainder = testUrl.substring(baseUrl.length); 11861 if ((testUrl.length > 0 && testUrl.charAt(baseUrl.length - 1) === "/") || 11862 remainder.charAt(0) === "#" || 11863 remainder.charAt(0) === "?") { 11864 return true; 11865 } 11866 } 11867 return false; 11868} 11869 11870var languages = {}; 11871 11872function createApi(language) { 11873 var globalContext = new ValidatorContext(); 11874 var currentLanguage; 11875 var customErrorReporter; 11876 var api = { 11877 setErrorReporter: function(reporter) { 11878 if (typeof reporter === "string") { 11879 return this.language(reporter); 11880 } 11881 customErrorReporter = reporter; 11882 return true; 11883 }, 11884 addFormat: function() { 11885 globalContext.addFormat.apply(globalContext, arguments); 11886 }, 11887 language: function(code) { 11888 if (!code) { 11889 return currentLanguage; 11890 } 11891 if (!languages[code]) { 11892 code = code.split("-")[0]; // fall back to base language 11893 } 11894 if (languages[code]) { 11895 currentLanguage = code; 11896 return code; // so you can tell if fall-back has happened 11897 } 11898 return false; 11899 }, 11900 addLanguage: function(code, messageMap) { 11901 var key; 11902 for (key in ErrorCodes) { 11903 if (messageMap[key] && !messageMap[ErrorCodes[key]]) { 11904 messageMap[ErrorCodes[key]] = messageMap[key]; 11905 } 11906 } 11907 var rootCode = code.split("-")[0]; 11908 if (!languages[rootCode]) { // use for base language if not yet defined 11909 languages[code] = messageMap; 11910 languages[rootCode] = messageMap; 11911 } else { 11912 languages[code] = Object.create(languages[rootCode]); 11913 for (key in messageMap) { 11914 if (typeof languages[rootCode][key] === "undefined") { 11915 languages[rootCode][key] = messageMap[key]; 11916 } 11917 languages[code][key] = messageMap[key]; 11918 } 11919 } 11920 return this; 11921 }, 11922 freshApi: function(language) { 11923 var result = createApi(); 11924 if (language) { 11925 result.language(language); 11926 } 11927 return result; 11928 }, 11929 validate: function(data, schema, checkRecursive, banUnknownProperties) { 11930 var def = defaultErrorReporter(currentLanguage); 11931 var errorReporter = customErrorReporter ? function(error, data, schema) { 11932 return customErrorReporter(error, data, schema) || def(error, data, schema); 11933 } : def; 11934 var context = new ValidatorContext(globalContext, false, errorReporter,
11934checkRecursive, banUnknownProperties); 11935 if (typeof schema === "string") { 11936 schema = { 11937 "$ref": schema 11938 }; 11939 } 11940 context.addSchema("", schema); 11941 var error = context.validateAll(data, schema, null, null, ""); 11942 if (!error && banUnknownProperties) { 11943 error = context.banUnknownProperties(data, schema); 11944 } 11945 this.error = error; 11946 this.missing = context.missing; 11947 this.valid = (error === null); 11948 return this.valid; 11949 }, 11950 validateResult: function() { 11951 var result = { 11952 toString: function() { 11953 return this.valid ? "valid" : this.error.message; 11954 } 11955 }; 11956 this.validate.apply(result, arguments); 11957 return result; 11958 }, 11959 validateMultiple: function(data, schema, checkRecursive, banUnknownProperties) { 11960 var def = defaultErrorReporter(currentLanguage); 11961 var errorReporter = customErrorReporter ? function(error, data, schema) { 11962 return customErrorReporter(error, data, schema) || def(error, data, schema); 11963 } : def; 11964 var context = new ValidatorContext(globalContext, true, errorReporter, checkRecursive, banUnknownProperties); 11965 if (typeof schema === "string") { 11966 schema = { 11967 "$ref": schema 11968 }; 11969 } 11970 context.addSchema("", schema); 11971 context.validateAll(data, schema, null, null, ""); 11972 if (banUnknownProperties) { 11973 context.banUnknownProperties(data, schema); 11974 } 11975 var result = { 11976 toString: function() { 11977 return this.valid ? "valid" : this.error.message; 11978 } 11979 }; 11980 result.errors = context.errors; 11981 result.missing = context.missing; 11982 result.valid = (result.errors.length === 0); 11983 return result; 11984 }, 11985 addSchema: function() { 11986 return globalContext.addSchema.apply(globalContext, arguments); 11987 }, 11988 getSchema: function() { 11989 return globalContext.getSchema.apply(globalContext, arguments); 11990 }, 11991 getSchemaMap: function() { 11992 return globalContext.getSchemaMap.apply(globalContext, arguments); 11993 }, 11994 getSchemaUris: function() { 11995 return globalContext.getSchemaUris.apply(globalContext, arguments); 11996 }, 11997 getMissingUris: function() { 11998 return globalContext.getMissingUris.apply(globalContext, arguments); 11999 }, 12000 dropSchemas: function() { 12001 globalContext.dropSchemas.apply(globalContext, arguments); 12002 }, 12003 defineKeyword: function() { 12004 globalContext.defineKeyword.apply(globalContext, arguments); 12005 }, 12006 defineError: function(codeName, codeNumber, defaultMessage) { 12007 if (typeof codeName !== "string" || !/^[A-Z]+(_[A-Z]+)*$/.test(codeName)) { 12008 throw new Error("Code name must be a string in UPPER_CASE_WITH_UNDERSCORES"); 12009 } 12010 if (typeof codeNumber !== "number" || codeNumber % 1 !== 0 || codeNumber < 10000) { 12011 throw new Error("Code number must be an integer > 10000"); 12012 } 12013 if (typeof ErrorCodes[codeName] !== "undefined") { 12014 throw new Error("Error already defined: " + codeName + " as " + ErrorCodes[codeName]); 12015 } 12016 if (typeof ErrorCodeLookup[codeNumber] !== "undefined") { 12017 throw new Error("Error code already used: " + ErrorCodeLookup[codeNumber] + " as " + codeNumber); 12018 } 12019 ErrorCodes[codeName] = codeNumber; 12020 ErrorCodeLookup[codeNumber] = codeName; 12021 ErrorMessagesDefault[codeName] = ErrorMessagesDefault[codeNumber] = defaultMessage; 12022 for (var langCode in languages) { 12023 var language = languages[langCode]; 12024 if (language[codeName]) { 12025 language[codeNumber] = language[codeNumber] || language[codeName]; 12026 } 12027 } 12028 }, 12029 reset: function() { 12030 globalContext.reset(); 12031 this.error = null; 12032 this.missing = []; 12033 this.valid = true; 12034 }, 12035 missing: [], 12036 error: null, 12037 valid: true, 12038 normSchema: normSchema, 12039 resolveUrl: resolveUrl, 12040 getDocumentUri: getDocumentUri, 12041 errorCodes: ErrorCodes 12042 }; 12043 api.language(language || "en"); 12044 return api; 12045} 12046 12047var tv4; 12048try { 12049 tv4 = createApi(); 12050 tv4.addLanguage("en-gb", ErrorMessagesDefault); 12051} catch(ie8){ 12052 //do nothing. tv4 will be returned undefined. 12053} 12054 12055 12056module.exports = tv4; 12057 12058 } 12059 12060 }, 12061 "data-layer-manager-search-discovery/src/lib/css_path.js": { 12062 "script": function(module, exports, require, turbine) { 12063/* 12064 * Copyright (C) 2015 Pavel Savshenko 12065 * Copyright (C) 2011 Google Inc. All rights reserved. 12066 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 12067 * Copyright (C) 2008 Matt Lilek <[email protected]> 12068 * Copyright (C) 2009 Joseph Pecoraro 12069 * 12070 * Redistribution and use in source and binary forms, with or without 12071 * modification, are permitted provided that the following conditions 12072 * are met: 12073 * 12074 * 1. Redistributions of source code must retain the above copyright 12075 * notice, this list of conditions and the following disclaimer. 12076 * 2. Redistributions in binary form must reproduce the above copyright 12077 * notice, this list of conditions and the following disclaimer in the 12078 * documentation and/or other materials provided with the distribution. 12079 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 12080 * its contributors may be used to endorse or promote products derived 12081 * from this software without specific prior written permission. 12082 * 12083 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 12084 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 12085 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12086 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 12087 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 12088 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 12089 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 12090 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12091 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 12092 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12093 */ 12094 12095var UTILS = {}; 12096UTILS.cssPath = function(node, optimized) 12097{ 12098 if (node.nodeType !== Node.ELEMENT_NODE) 12099 return ""; 12100 var steps = []; 12101 var contextNode = node; 12102 while (contextNode) { 12103 var step = UTILS._cssPathStep(contextNode, !!optimized, contextNode === node); 12104 if (!step) 12105 break; // Error - bail out early. 12106 steps.push(step); 12107 if (step.optimized) 12108 break; 12109 contextNode = contextNode.parentNode; 12110 } 12111 steps.reverse(); 12112 return steps.join(" > "); 12113}; 12114UTILS._cssPathStep = function(node, optimized, isTargetNode) 12115{ 12116 if (node.nodeType !== Node.ELEMENT_NODE) 12117 return null; 12118 12119 var id = node.getAttribute("id"); 12120 if (optimized) { 12121 if (id) 12122 return new UTILS.DOMNodePathStep(idSelector(id), true); 12123 var nodeNameLower = node.nodeName.toLowerCase(); 12124 if (nodeNameLower === "body" || nodeNameLower === "head" || nodeNameLower === "html") 12125 return new UTILS.DOMNodePathStep(node.nodeName.toLowerCase(), true); 12126 } 12127 var nodeName = node.nodeName.toLowerCase(); 12128 12129 if (id) 12130 return new UTILS.DOMNodePathStep(nodeName.toLowerCase() + idSelector(id), true); 12131 var parent = node.parentNode; 12132 if (!parent || parent.nodeType === Node.DOCUMENT_NODE) 12133 return new UTILS.DOMNodePathStep(nodeName.toLowerCase(), true); 12134 12135 /** 12136 * @param {UTILS.DOMNode} node 12137 * @return {Array.<string>} 12138 */ 12139 function prefixedElementClassNames(node) 12140 {
12141 var classAttribute = node.getAttribute("class"); 12142 if (!classAttribute) 12143 return []; 12144 12145 return classAttribute.split(/\s+/g).filter(Boolean).map(function(name) { 12146 // The prefix is required to store "__proto__" in a object-based map. 12147 return "$" + name; 12148 }); 12149 } 12150 12151 /** 12152 * @param {string} id 12153 * @return {string} 12154 */ 12155 function idSelector(id) 12156 { 12157 return "#" + escapeIdentifierIfNeeded(id); 12158 } 12159 12160 /** 12161 * @param {string} ident 12162 * @return {string} 12163 */ 12164 function escapeIdentifierIfNeeded(ident) 12165 { 12166 if (isCSSIdentifier(ident)) 12167 return ident; 12168 var shouldEscapeFirst = /^(?:[0-9]|-[0-9-]?)/.test(ident); 12169 var lastIndex = ident.length - 1; 12170 return ident.replace(/./g, function(c, i) { 12171 return ((shouldEscapeFirst && i === 0) || !isCSSIdentChar(c)) ? escapeAsciiChar(c, i === lastIndex) : c; 12172 }); 12173 } 12174 12175 /** 12176 * @param {string} c 12177 * @param {boolean} isLast 12178 * @return {string} 12179 */ 12180 function escapeAsciiChar(c, isLast) 12181 { 12182 return "\\" + toHexByte(c) + (isLast ? "" : " "); 12183 } 12184 12185 /** 12186 * @param {string} c 12187 */ 12188 function toHexByte(c) 12189 { 12190 var hexByte = c.charCodeAt(0).toString(16); 12191 if (hexByte.length === 1) 12192 hexByte = "0" + hexByte; 12193 return hexByte; 12194 } 12195 12196 /** 12197 * @param {string} c 12198 * @return {boolean} 12199 */ 12200 function isCSSIdentChar(c) 12201 { 12202 if (/[a-zA-Z0-9_-]/.test(c)) 12203 return true; 12204 return c.charCodeAt(0) >= 0xA0; 12205 } 12206 12207 /** 12208 * @param {string} value 12209 * @return {boolean} 12210 */ 12211 function isCSSIdentifier(value) 12212 { 12213 return /^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(value); 12214 } 12215 12216 var prefixedOwnClassNamesArray = prefixedElementClassNames(node); 12217 var needsClassNames = false; 12218 var needsNthChild = false; 12219 var ownIndex = -1; 12220 var siblings = parent.children; 12221 for (var i = 0; (ownIndex === -1 || !needsNthChild) && i < siblings.length; ++i) { 12222 var sibling = siblings[i]; 12223 if (sibling === node) { 12224 ownIndex = i; 12225 continue; 12226 } 12227 if (needsNthChild) 12228 continue; 12229 if (sibling.nodeName.toLowerCase() !== nodeName.toLowerCase()) 12230 continue; 12231 12232 needsClassNames = true; 12233 var ownClassNames = prefixedOwnClassNamesArray; 12234 var ownClassNameCount = 0; 12235 for (var name in ownClassNames) 12236 ++ownClassNameCount; 12237 if (ownClassNameCount === 0) { 12238 needsNthChild = true; 12239 continue; 12240 } 12241 var siblingClassNamesArray = prefixedElementClassNames(sibling); 12242 for (var j = 0; j < siblingClassNamesArray.length; ++j) { 12243 var siblingClass = siblingClassNamesArray[j]; 12244 if (ownClassNames.indexOf(siblingClass)) 12245 continue; 12246 delete ownClassNames[siblingClass]; 12247 if (!--ownClassNameCount) { 12248 needsNthChild = true; 12249 break; 12250 } 12251 } 12252 } 12253 12254 var result = nodeName.toLowerCase(); 12255 if (isTargetNode && nodeName.toLowerCase() === "input" && node.getAttribute("type") && !node.getAttribute("id") && !node.getAttribute("class")) 12256 result += "[type=\"" + node.getAttribute("type") + "\"]"; 12257 if (needsNthChild) { 12258 result += ":nth-child(" + (ownIndex + 1) + ")"; 12259 } else if (needsClassNames) { 12260 for (var prefixedName in prefixedOwnClassNamesArray) 12261 // for (var prefixedName in prefixedOwnClassNamesArray.keySet()) 12262 result += "." + escapeIdentifierIfNeeded(prefixedOwnClassNamesArray[prefixedName].substr(1)); 12263 } 12264 12265 return new UTILS.DOMNodePathStep(result, false); 12266}; 12267 12268/** 12269 * @constructor 12270 * @param {string} value 12271 * @param {boolean} optimized 12272 */ 12273UTILS.DOMNodePathStep = function(value, optimized) 12274{ 12275 this.value = value; 12276 this.optimized = optimized || false; 12277}; 12278 12279UTILS.DOMNodePathStep.prototype = { 12280 /** 12281 * @return {string} 12282 */ 12283 toString: function() 12284 { 12285 return this.value; 12286 } 12287}; 12288 12289module.exports = UTILS; 12290 } 12291 12292 }, 12293 "data-layer-manager-search-discovery/src/lib/event_processor.js": { 12294 "script": function(module, exports, require, turbine) { 12295/************************************************************************* 12296 * SEARCH DISCOVERY CONFIDENTIAL 12297 * ___________________ 12298 * 12299 * Copyright 2022 Search Discovery Incorporated 12300 * All Rights Reserved. 12301 *
12302 * NOTICE: All information contained herein is, and remains 12303 * the property of Search Discovery Incorporated and its suppliers, 12304 * if any. The intellectual and technical concepts contained 12305 * herein are proprietary to Search Discovery Incorporated and its 12306 * suppliers and are protected by all applicable intellectual property 12307 * laws, including trade secret and copyright laws. 12308 * Dissemination of this information or reproduction of this material 12309 * is strictly forbidden unless prior written permission is obtained 12310 * from Search Discovery Incorporated. 12311 **************************************************************************/ 12312var objectAssign = require("@adobe/reactor-object-assign"); 12313var util = require("./util"); 12314 12315var EventProcessor = function(core) { 12316 this.core = core; 12317 this.logger = core.logger; 12318 this.lifecycle = core.lifecycle; 12319 this.proFeatures = core.config.proFeatures; 12320 this.debug = core.config.debug; 12321}; 12322 12323objectAssign(EventProcessor.prototype, { 12324 preProcessEventFn: function(dataLayer) { 12325 var context = this; 12326 return function(event) { 12327 if (context.lifecycle.isPreValidationCallback(event)) { 12328 context.lifecycle.registerPreValidationCallback(event.preValidationCallback); 12329 } 12330 if (EventProcessor.isEventObject(event) && context.proFeatures) { 12331 // Clear the dataLayer if requested 12332 if (dataLayer.eventResets[event.event]) { 12333 dataLayer.reset(); 12334 } 12335 12336 //Process all callbacks that registered against this event 12337 event = context._processEventCallbacks(context, event); 12338 } 12339 return event; 12340 }; 12341 }, 12342 12343 processEventFn: function(dataLayer) { 12344 var context = this; 12345 return function(event) { 12346 if (EventProcessor.isEventObject(event)) { 12347 EventProcessor.addComputedState(dataLayer.get(), event); 12348 context.core.trigger(event); 12349 } 12350 return event; 12351 }; 12352 }, 12353 12354 _processOneEventCallback: function(context, eventIn, cb) { 12355 var eventBefore = util.copy(eventIn); 12356 delete eventBefore.__meta; 12357 12358 var event = util.copy(eventIn); 12359 try { 12360 event = cb.func(util.copy(eventIn)); 12361 if (typeof event === "undefined") { 12362 context.logger.error("processEventCallbacks - callback function did not return event.", cb); 12363 event = util.copy(eventIn); 12364 } 12365 } catch (error) { 12366 context.logger.error("processEventCallbacks failed. error:", error); 12367 } 12368 12369 var eventAfter = util.copy(event); 12370 delete eventAfter.__meta; 12371 12372 if (context.debug) { 12373 var callbackInfo = { 12374 "callback": { 12375 "functionName": cb.func.name, 12376 "executionOrder": cb.executionOrder, 12377 "eventMatch": cb.eventMatch.toString() 12378 }, 12379 "eventBefore": eventBefore, 12380 "eventAfter": eventAfter 12381 }; 12382 event.__meta.callbackSnapshots.push(callbackInfo); 12383 context.logger.debug("preValidationCallback executed for event: " + event.event, callbackInfo); 12384 } 12385 12386 return event; 12387 }, 12388 12389 _processEventCallbacks: function(context, event) { 12390 if (context.debug) { 12391 event.__meta = event.__meta || {}; 12392 event.__meta.callbackSnapshots = event.__meta.callbackSnapshots || []; 12393 } 12394 12395 //Execute the matching callbacks from low to high executionOrder 12396 var sortedCallbackArray = context.lifecycle.preValidationCallbacks.filter(function(cb) { 12397 return (event.event.match(cb.eventMatch)); 12398 }).sort(function(a, b) { 12399 return (a.executionOrder - b.executionOrder); 12400 }); 12401 12402 event = sortedCallbackArray.reduce(function(event, cb) { 12403 return context._processOneEventCallback(context, event, cb); 12404 }, event); 12405 12406 return event; 12407 } 12408}); 12409 12410EventProcessor.isEventObject = function(thing) { 12411 return !!thing.event && typeof thing.event === "string"; 12412}; 12413 12414EventProcessor.addComputedState = function(dataLayer, event) { 12415 event.__meta = event.__meta || {}; 12416 if (!event.__meta.computedState) { 12417 Object.defineProperty(event.__meta, "computedState", { 12418 configurable: false, 12419 enumerable: false, 12420 get: function() { 12421 return dataLayer._computedStateAtEvent(event); 12422 } 12423 }); 12424 } 12425}; 12426 12427module.exports = EventProcessor; 12428 12429 } 12430 12431 } 12432 } 12433 }, 12434 "core": { 12435 "displayName": "Core", 12436 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP1b7d885611af4410a124781998596ed6/", 12437 "modules": { 12438 "core/src/lib/dataElements/customCode.js": { 12439 "name": "custom-code", 12440 "displayName": "Custom Code", 12441 "script": function(module, exports, require, turbine) { 12442/*************************************************************************************** 12443 * Copyright 2019 Adobe. All rights reserved. 12444 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12445 * you may not use this file except in compliance with the License. You may obtain a copy 12446 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12447 * 12448 * Unless required by applicable law or agreed to in writing, software distributed under 12449 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12450 * OF ANY KIND, either express or implied. See the License for the specific language 12451 * governing permissions and limitations under the License. 12452 ****************************************************************************************/ 12453 12454'use strict'; 12455 12456/** 12457 * The custom data element. 12458 * @param {Object} settings The data element settings object. 12459 * @param {string} settings.source The function that should be called which will return a value. 12460 * @param {string} event The event (if any) that triggered the evaluation of the data element. 12461 * @returns {string} 12462 */ 12463module.exports = function (settings, event) { 12464 return settings.source(event); 12465}; 12466 12467 } 12468 12469 }, 12470 "core/src/lib/dataElements/javascriptVariable.js": { 12471 "name": "javascript-variable", 12472 "displayName": "JavaScript Variable", 12473 "script": function(module, exports, require, turbine) { 12474/*************************************************************************************** 12475 * Copyright 2019 Adobe. All rights reserved. 12476 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 12477 * you may not use this file except in compliance with the License. You may obtain a copy 12478 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12479 * 12480 * Unless required by applicable law or agreed to in writing, software distributed under 12481 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12482 * OF ANY KIND, either express or implied. See the License for the specific language 12483 * governing permissions and limitations under the License. 12484 ****************************************************************************************/ 12485 12486'use strict'; 12487var getObjectProperty = require('../helpers/getObjectProperty.js'); 12488 12489/** 12490 * The variable data element. 12491 * @param {Object} settings The data element settings object. 12492 * @param {string} settings.path The global path to the variable holding the data element value. 12493 * @returns {string} 12494 */ 12495module.exports = function (settings) { 12496 return getObjectProperty(window, settings.path); 12497}; 12498 12499 } 12500 12501 }, 12502 "core/src/lib/dataElements/cookie.js": { 12503 "name": "cookie", 12504 "displayName": "Cookie", 12505 "script": function(module, exports, require, turbine) { 12506/*************************************************************************************** 12507 * Copyright 2019 Adobe. All rights reserved. 12508 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 12509 * you may not use this file except in compliance with the License. You may obtain a copy 12510 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12511 * 12512 * Unless required by applicable law or agreed to in writing, software distributed under 12513 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12514 * OF ANY KIND, either express or implied. See the License for the specific language 12515 * governing permissions and limitations under the License. 12516 ****************************************************************************************/ 12517 12518'use strict'; 12519 12520var cookie = require('@adobe/reactor-cookie'); 12521 12522/** 12523 * The cookie data element. 12524 * @param {Object} settings The data element settings object. 12525 * @param {string} settings.name The name of the cookie for which a value should be retrieved. 12526 * @returns {string} 12527 */ 12528module.exports = function (settings) { 12529 return cookie.get(settings.name); 12530}; 12531 12532 } 12533 12534 }, 12535 "core/src/lib/dataElements/queryStringParameter.js": { 12536 "name": "query-string-parameter", 12537 "displayName": "Query String Parameter", 12538 "script": function(module, exports, require, turbine) { 12539/*************************************************************************************** 12540 * Copyright 2019 Adobe. All rights reserved. 12541 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12542 * you may not use this file except in compliance with the License. You may obtain a copy 12543 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12544 * 12545 * Unless required by applicable law or agreed to in writing, software distributed under 12546 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12547 * OF ANY KIND, either express or implied. See the License for the specific language 12548 * governing permissions and limitations under the License. 12549 ****************************************************************************************/ 12550 12551'use strict'; 12552 12553var window = require('@adobe/reactor-window'); 12554var queryString = require('@adobe/reactor-query-string'); 12555 12556/** 12557 * The query string parameter data element. 12558 * @param {Object} settings The data element settings object. 12559 * @param {string} settings.name The query string parameter name. 12560 * @param {string} [settings.caseInsensitive] Whether casing should be ignored. 12561 * @returns {string} 12562 */ 12563module.exports = function (settings) { 12564 var queryParams = queryString.parse(window.location.search); 12565 12566 if (settings.caseInsensitive) { 12567 var lowerCaseName = settings.name.toLowerCase(); 12568 var keys = Object.keys(queryParams); 12569 for (var i = 0; i < keys.length; i++) { 12570 var key = keys[i]; 12571 if (key.toLowerCase() === lowerCaseName) { 12572 return queryParams[key]; 12573 } 12574 } 12575 } else { 12576 return queryParams[settings.name]; 12577 } 12578}; 12579 12580 } 12581 12582 }, 12583 "core/src/lib/dataElements/conditionalValue.js": { 12584 "name": "conditional-value", 12585 "displayName": "Conditional Value", 12586 "script": function(module, exports, require, turbine) { 12587/* 12588Copyright 2021 Adobe. All rights reserved. 12589This file is licensed to you under the Apache License, Version 2.0 (the "License"); 12590you may not use this file except in compliance with the License. You may obtain a copy 12591of the License at http://www.apache.org/licenses/LICENSE-2.0 12592Unless required by applicable law or agreed to in writing, software distributed under 12593the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12594OF ANY KIND, either express or implied. See the License for the specific language 12595governing permissions and limitations under the License. 12596*/ 12597 12598'use strict'; 12599 12600var valueComparison = require('../conditions/valueComparison'); 12601 12602module.exports = function (settings) { 12603 return valueComparison(settings) 12604 ? settings.conditionalValue 12605 : settings.fallbackValue; 12606}; 12607 12608 } 12609 12610 }, 12611 "core/src/lib/events/click.js": { 12612 "name": "click", 12613 "displayName": "Click", 12614 "script": function(module, exports, require, turbine) { 12615/*************************************************************************************** 12616 * Copyright 2019 Adobe. All rights reserved. 12617 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 12618 * you may not use this file except in compliance with the License. You may obtain a copy 12619 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12620 * 12621 * Unless required by applicable law or agreed to in writing, software distributed under 12622 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12623 * OF ANY KIND, either express or implied. See the License for the specific language 12624 * governing permissions and limitations under the License. 12625 ****************************************************************************************/ 12626 12627'use strict'; 12628 12629var window = require('@adobe/reactor-window'); 12630var bubbly = require('./helpers/createBubbly')(); 12631var WeakMap = require('./helpers/weakMap'); 12632var evaluatedEvents = new WeakMap(); 12633var MIDDLE_MOUSE_BUTTON = 2; 12634var castToNumberIfString = 12635 require('../helpers/stringAndNumberUtils').castToNumberIfString; 12636 12637/** 12638 * Determines whether an element is a link that would navigate the user's current window to a 12639 * different URL. 12640 * @param {MouseEvent} e 12641 * @returns {boolean} 12642 */ 12643var getDelayableLink = function (e) { 12644 // user is modifying click with the keyboard, don't delay the navigation 12645 if (e.ctrlKey || e.metaKey || e.button === MIDDLE_MOUSE_BUTTON) { 12646 return undefined; 12647 } 12648 12649 var node = e.target; 12650 while (node) { 12651 var tagName = node.tagName; 12652 12653 if (tagName && tagName.toLowerCase() === 'a') { 12654 var href = node.getAttribute('href'); 12655 var target = node.getAttribute('target'); 12656 12657 if ( 12658 href && 12659 (!target || 12660 target === '_self' || 12661 (target === '_top' && window.top === window) || 12662 target === window.name) 12663 ) { 12664 return node; 12665 } else { 12666 // Found hyperlink conditions in which we don't want to delay navigation 12667 return undefined; 12668 } 12669 } 12670 12671 node = node.parentNode; 12672 } 12673}; 12674 12675document.addEventListener('click', bubbly.evaluateEvent, true); 12676 12677/** 12678 * The click event. This event occurs when a user has clicked an element. 12679 * @param {Object} settings - The event settings object. 12680 * @param {string} [settings.elementSelector] - The CSS selector the element must match in order for 12681 * the rule to fire. 12682 * @param {Object[]} settings.elementProperties - Property values the element must have in order 12683 * for the rule to fire. 12684 * @param {string} settings.elementProperties[].name - The property name. 12685 * @param {string} settings.elementProperties[].value - The property value. 12686 * @param {number|string} [settings.anchorDelay] - When present and a link is clicked, actual 12687 * navigation will be postponed for a period of time equal with its value. This is typically used to 12688 * allow time for scripts within the rule to execute, beacons to be sent to servers, etc. 12689 * @param {boolean} settings.elementProperties[].valueIsRegex=false - Whether <code>value</code> 12690 * on the object instance is intended to be a regular expression. 12691 * @param {boolean} settings.bubbleFireIfParent=true - Whether the rule should fire if 12692 * the event originated from a descendant element. 12693 * @param {boolean} settings.bubbleFireIfChildFired=true - Whether the rule should fire 12694 * if the same event has already triggered a rule targeting a descendant element. 12695 * @param {boolean} settings.bubbleStop=false - Whether the event should not trigger 12696 * rules on ancestor elements. 12697 * @param {function} trigger - The trigger callback. 12698 */ 12699module.exports = function (settings, trigger) { 12700 bubbly.addListener(settings, function (syntheticEvent) { 12701 var nativeEvent = syntheticEvent.nativeEvent; 12702 12703 // AppMeasurement captures the click events, and tries to detect if the element clicked is an A 12704 // tag that contains an exit link. When that happens, it stops the initial event, sends a 12705 // beacon, clones the initial event and fires it again. 12706 // Reactor detects the click events first, because its listeners are set on the capture phase. 12707 // We need to ignore the cloned event, otherwise the same rule will fire twice. AppMeasurement 12708 // sets `s_fe` attribute on the cloned event, and that is the flag we'll use to ignore these 12709 // fake events. 12710 // https://git.corp.adobe.com/analytics-platform/appmeasurement/blob/master/bin/js/src/AppMeasurement.js#L3196 12711 if (nativeEvent.s_fe) { 12712 return; 12713 } 12714 12715 var anchorDelay = castToNumberIfString(settings.anchorDelay); 12716 if (anchorDelay) { 12717 if (!evaluatedEvents.has(nativeEvent)) { 12718 var delayableLink = getDelayableLink(nativeEvent); 12719 if (delayableLink) { 12720 nativeEvent.preventDefault(); 12721 setTimeout(function () { 12722 window.location = delayableLink.href; 12723 }, anchorDelay); 12724 } 12725 evaluatedEvents.set(nativeEvent, true); 12726 } 12727 } 12728 12729 trigger(syntheticEvent); 12730 }); 12731}; 12732 12733/** 12734 * @private 12735 * Clears all listeners. This should only be used in tests. 12736 */ 12737module.exports.__reset = bubbly.__reset; 12738 12739 } 12740 12741 }, 12742 "core/src/lib/conditions/customCode.js": { 12743 "name": "custom-code", 12744 "displayName": "Custom Code", 12745 "script": function(module, exports, require, turbine) { 12746/*************************************************************************************** 12747 * Copyright 2019 Adobe. All rights reserved. 12748 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12749 * you may not use this file except in compliance with the License. You may obtain a copy 12750 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12751 * 12752 * Unless required by applicable law or agreed to in writing, software distributed under 12753 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12754 * OF ANY KIND, either express or implied. See the License for the specific language 12755 * governing permissions and limitations under the License. 12756 ****************************************************************************************/ 12757 12758'use strict'; 12759 12760/** 12761 * Custom code condition. This executes condition code provided by the user. 12762 * @param {Object} settings Condition settings. 12763 * @param {Function} settings.source The custom script function. 12764 * @param {Object} event The underlying event object that triggered the rule. 12765 * @param {Object} event.element The element that the rule was targeting. 12766 * @param {Object} event.target The element on which the event occurred. 12767 * @returns {boolean} 12768 */ 12769module.exports = function (settings, event) { 12770 // `this` and `target` are provided separately from event for backward-compatibility. 12771 return settings.source.call(event.element, event, event.target); 12772}; 12773 12774 } 12775 12776 }, 12777 "core/src/lib/conditions/valueComparison.js": { 12778 "name": "value-comparison", 12779 "displayName": "Value Comparison", 12780 "script": function(module, exports, require, turbine) { 12781/*************************************************************************************** 12782 * (c) 2018 Adobe. All rights reserved. 12783 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 12784 * you may not use this file except in compliance with the License. You may obtain a copy 12785 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12786 * 12787 * Unless required by applicable law or agreed to in writing, software distributed under 12788 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12789 * OF ANY KIND, either express or implied. See the License for the specific language 12790 * governing permissions and limitations under the License. 12791 ****************************************************************************************/ 12792 12793/*eslint eqeqeq:0*/ 12794'use strict'; 12795 12796var isString = require('../helpers/stringAndNumberUtils').isString; 12797var isNumber = require('../helpers/stringAndNumberUtils').isNumber; 12798var castToStringIfNumber = 12799 require('../helpers/stringAndNumberUtils').castToStringIfNumber; 12800var castToNumberIfString = 12801 require('../helpers/stringAndNumberUtils').castToNumberIfString; 12802 12803var updateCase = function (operand, caseInsensitive) { 12804 return caseInsensitive && isString(operand) ? operand.toLowerCase() : operand; 12805}; 12806 12807var guardStringCompare = function (compare) { 12808 return function (leftOperand, rightOperand, caseInsensitive) { 12809 leftOperand = castToStringIfNumber(leftOperand); 12810 rightOperand = castToStringIfNumber(rightOperand); 12811 12812 return ( 12813 isString(leftOperand) && 12814 isString(rightOperand) && 12815 compare(leftOperand, rightOperand, caseInsensitive) 12816 ); 12817 }; 12818}; 12819 12820var guardNumberCompare = function (compare) { 12821 return function (leftOperand, rightOperand) { 12822 leftOperand = castToNumberIfString(leftOperand); 12823 rightOperand = castToNumberIfString(rightOperand); 12824 12825 return ( 12826 isNumber(leftOperand) && 12827 isNumber(rightOperand) && 12828 compare(leftOperand, rightOperand) 12829 ); 12830 }; 12831}; 12832 12833var guardCaseSensitivity = function (compare) { 12834 return function (leftOperand, rightOperand, caseInsensitive) { 12835 return compare( 12836 updateCase(leftOperand, caseInsensitive), 12837 updateCase(rightOperand, caseInsensitive) 12838 ); 12839 }; 12840}; 12841 12842var conditions = { 12843 equals: guardCaseSensitivity(function (leftOperand, rightOperand) { 12844 return leftOperand == rightOperand; 12845 }), 12846 doesNotEqual: function () { 12847 return !conditions.equals.apply(null, arguments); 12848 }, 12849 contains: guardStringCompare( 12850 guardCaseSensitivity(function (leftOperand, rightOperand) { 12851 return leftOperand.indexOf(rightOperand) !== -1; 12852 }) 12853 ), 12854 doesNotContain: function () { 12855 return !conditions.contains.apply(null, arguments); 12856 }, 12857 startsWith: guardStringCompare( 12858 guardCaseSensitivity(function (leftOperand, rightOperand) { 12859 return leftOperand.indexOf(rightOperand) === 0; 12860 }) 12861 ), 12862 doesNotStartWith: function () { 12863 return !conditions.startsWith.apply(null, arguments); 12864 }, 12865 endsWith: guardStringCompare( 12866 guardCaseSensitivity(function (leftOperand, rightOperand) { 12867 return ( 12868 leftOperand.substring( 12869 leftOperand.length - rightOperand.length, 12870 leftOperand.length 12871 ) === rightOperand 12872 ); 12873 }) 12874 ), 12875 doesNotEndWith: function () { 12876 return !conditions.endsWith.apply(null, arguments); 12877 }, 12878 matchesRegex: guardStringCompare(function ( 12879 leftOperand, 12880 rightOperand, 12881 caseInsensitive 12882 ) { 12883 // Doing something like new RegExp(/ab+c/, 'i') throws an error in some browsers (e.g., IE11),
12884 // so we don't want to instantiate the regex until we know we're working with a string. 12885 return new RegExp(rightOperand, caseInsensitive ? 'i' : '').test( 12886 leftOperand 12887 ); 12888 }), 12889 doesNotMatchRegex: function () { 12890 return !conditions.matchesRegex.apply(null, arguments); 12891 }, 12892 lessThan: guardNumberCompare(function (leftOperand, rightOperand) { 12893 return leftOperand < rightOperand; 12894 }), 12895 lessThanOrEqual: guardNumberCompare(function (leftOperand, rightOperand) { 12896 return leftOperand <= rightOperand; 12897 }), 12898 greaterThan: guardNumberCompare(function (leftOperand, rightOperand) { 12899 return leftOperand > rightOperand; 12900 }), 12901 greaterThanOrEqual: guardNumberCompare(function (leftOperand, rightOperand) { 12902 return leftOperand >= rightOperand; 12903 }), 12904 isTrue: function (leftOperand) { 12905 return leftOperand === true; 12906 }, 12907 isTruthy: function (leftOperand) { 12908 return Boolean(leftOperand); 12909 }, 12910 isFalse: function (leftOperand) { 12911 return leftOperand === false; 12912 }, 12913 isFalsy: function (leftOperand) { 12914 return !leftOperand; 12915 } 12916}; 12917 12918module.exports = function (settings) { 12919 return conditions[settings.comparison.operator]( 12920 settings.leftOperand, 12921 settings.rightOperand, 12922 Boolean(settings.comparison.caseInsensitive) 12923 ); 12924}; 12925 12926 } 12927 12928 }, 12929 "core/src/lib/events/directCall.js": { 12930 "name": "direct-call", 12931 "displayName": "Direct Call", 12932 "script": function(module, exports, require, turbine) { 12933/*************************************************************************************** 12934 * Copyright 2019 Adobe. All rights reserved. 12935 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 12936 * you may not use this file except in compliance with the License. You may obtain a copy 12937 * of the License at http://www.apache.org/licenses/LICENSE-2.0 12938 * 12939 * Unless required by applicable law or agreed to in writing, software distributed under 12940 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 12941 * OF ANY KIND, either express or implied. See the License for the specific language 12942 * governing permissions and limitations under the License. 12943 ****************************************************************************************/ 12944 12945'use strict'; 12946 12947/** 12948 * Object where the key is the call name and the value is an array of all rule trigger functions 12949 * for that call name. 12950 * @type {Object} 12951 */ 12952var triggersByIdentifier = {}; 12953 12954window._satellite = window._satellite || {}; 12955 12956/** 12957 * Public function intended to be called by the user. 12958 * @param {string} identifier The identifier passed to _satellite.track(). 12959 * @param {*} [detail] Any detail that should be passed along to conditions and actions. 12960 */ 12961window._satellite.track = function (identifier, detail) { 12962 identifier = identifier.trim(); 12963 var triggers = triggersByIdentifier[identifier]; 12964 if (triggers) { 12965 var syntheticEvent = { 12966 identifier: identifier, 12967 detail: detail 12968 }; 12969 12970 triggers.forEach(function (trigger) { 12971 trigger(syntheticEvent); 12972 }); 12973 12974 var logMessage = 12975 'Rules using the direct call event type with identifier "' + 12976 identifier + 12977 '" have been triggered' + 12978 (detail ? ' with additional detail:' : '.'); 12979 var logArgs = [logMessage]; 12980 12981 if (detail) { 12982 logArgs.push(detail); 12983 } 12984 12985 turbine.logger.log.apply(turbine.logger, logArgs); 12986 } else { 12987 turbine.logger.log( 12988 '"' + identifier + '" does not match any direct call identifiers.' 12989 ); 12990 } 12991}; 12992 12993/** 12994 * Direct call event. This event occurs as soon as the user calls _satellite.track(). 12995 * @param {Object} settings The event settings object. 12996 * @param {string} settings.identifier The identifier passed to _satellite.track(). 12997 * @param {ruleTrigger} trigger The trigger callback. 12998 */ 12999module.exports = function (settings, trigger) { 13000 var triggers = triggersByIdentifier[settings.identifier]; 13001 13002 if (!triggers) { 13003 triggers = triggersByIdentifier[settings.identifier] = []; 13004 } 13005 13006 triggers.push(trigger); 13007}; 13008 13009 } 13010 13011 }, 13012 "core/src/lib/events/customEvent.js": { 13013 "name": "custom-event", 13014 "displayName": "Custom Event", 13015 "script": function(module, exports, require, turbine) { 13016/*************************************************************************************** 13017 * Copyright 2019 Adobe. All rights reserved. 13018 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13019 * you may not use this file except in compliance with the License. You may obtain a copy 13020 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13021 * 13022 * Unless required by applicable law or agreed to in writing, software distributed under 13023 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13024 * OF ANY KIND, either express or implied. See the License for the specific language 13025 * governing permissions and limitations under the License. 13026 ****************************************************************************************/ 13027 13028'use strict'; 13029var bubbly = require('./helpers/createBubbly')(); 13030 13031var typesWatched = []; 13032 13033/** 13034 * The custom event. When an event is seen with the specified type, the rule will be executed. 13035 * @param {Object} settings The event settings object. 13036 * @param {string} settings.type The custom event type. 13037 * @param {string} [settings.elementSelector] The CSS selector the element must match in order for 13038 * the rule to fire. 13039 * @param {Object[]} [settings.elementProperties] Property values the element must have in order 13040 * for the rule to fire. 13041 * @param {string} settings.elementProperties[].name The property name. 13042 * @param {string} settings.elementProperties[].value The property value. 13043 * @param {boolean} [settings.elementProperties[].valueIsRegex=false] Whether <code>value</code> 13044 * on the object instance is intended to be a regular expression. 13045 * @param {boolean} [settings.bubbleFireIfParent=true] Whether the rule should fire if 13046 * the event originated from a descendant element. 13047 * @param {boolean} [settings.bubbleFireIfChildFired=true] Whether the rule should fire 13048 * if the same event has already triggered a rule targeting a descendant element. 13049 * @param {boolean} [settings.bubbleStop=false] Whether the event should not trigger 13050 * rules on ancestor elements. 13051 * @param {ruleTrigger} trigger The trigger callback. 13052 */ 13053module.exports = function (settings, trigger) { 13054 var type = settings.type; 13055 13056 if (typesWatched.indexOf(type) === -1) { 13057 typesWatched.push(type); 13058 window.addEventListener(type, bubbly.evaluateEvent, true); 13059 } 13060 13061 bubbly.addListener(settings, function (event) { 13062 if (event.nativeEvent.type === type) { 13063 // Copying detail up to the top-level makes it easier for users to consume and 13064 // makes it backward-compatible with DTM. 13065 event.detail = event.nativeEvent.detail; 13066 trigger(event); 13067 } 13068 }); 13069}; 13070 13071 } 13072 13073 }, 13074 "core/src/lib/actions/customCode.js": { 13075 "name": "custom-code", 13076 "displayName": "Custom Code", 13077 "script": function(module, exports, require, turbine) { 13078/*************************************************************************************** 13079 * Copyright 2019 Adobe. All rights reserved. 13080 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13081 * you may not use this file except in compliance with the License. You may obtain a copy 13082 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13083 * 13084 * Unless required by applicable law or agreed to in writing, software distributed under 13085 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13086 * OF ANY KIND, either express or implied. See the License for the specific language 13087 * governing permissions and limitations under the License. 13088 ****************************************************************************************/ 13089 13090'use strict'; 13091 13092var document = require('@adobe/reactor-document'); 13093var Promise = require('@adobe/reactor-promise'); 13094var decorateCode = require('./helpers/decorateCode'); 13095var loadCodeSequentially = require('./helpers/loadCodeSequentially'); 13096var postscribe = require('../../../node_modules/postscribe/dist/postscribe'); 13097var unescapeHTMLEntities = require('./helpers/unescapeHtmlCode'); 13098var getTurbineScript = require('../helpers/findPageScript').getTurbine; 13099 13100var cspNonce; 13101 13102var postscribeWrite = (function () { 13103 var write = function (source) { 13104 postscribe(document.body, source, { 13105 beforeWriteToken: function (token) { 13106 var tagName = token.tagName && token.tagName.toLowerCase(); 13107 13108 if (cspNonce && tagName === 'script') { 13109 token.attrs.nonce = cspNonce; 13110 } 13111 13112 // There is an issue in Postscribe where script and style attributes 13113 // are not unescaped. That causes problems when loading scripts from external 13114 // sources. See https://jira.corp.adobe.com/browse/DTM-15058. 13115 if (tagName === 'script' || tagName === 'style') { 13116 Object.keys(token.attrs || {}
13116).forEach(function (key) { 13117 token.attrs[key] = unescapeHTMLEntities(token.attrs[key]); 13118 }); 13119 13120 if (token.src) { 13121 token.src = unescapeHTMLEntities(token.src); 13122 } 13123 } 13124 13125 return token; 13126 }, 13127 error: function (error) { 13128 turbine.logger.error(error.msg); 13129 } 13130 }); 13131 }; 13132 13133 var queue = []; 13134 13135 // If the Launch library is loaded asynchronously, it may finish loading before document.body 13136 // is available. This means the custom code action may be running before document.body is 13137 // available, in which case can't write the custom code to document.body. We could, in this 13138 // case, write it to document.head since it will for sure be available, but the user's custom 13139 // code may have something like an img tag for sending a beacon (this use case was seen in DTM). 13140 // Adding display elements like an img tag to document.head is against HTML spec, though it 13141 // does seem like an image request is still made. We opted instead to ensure we comply with 13142 // HTML spec and wait until we see that document.body is available before writing. 13143 var flushQueue = function () { 13144 if (document.body) { 13145 while (queue.length) { 13146 write(queue.shift()); 13147 } 13148 } else { 13149 // 20 is an arbitrarily small amount of time but not too aggressive. 13150 setTimeout(flushQueue, 20); 13151 } 13152 }; 13153 13154 return function (source) { 13155 queue.push(source); 13156 flushQueue(); 13157 }; 13158})(); 13159 13160var libraryWasLoadedAsynchronously = (function () { 13161 // document.currentScript is not supported by IE 13162 if (document.currentScript) { 13163 return document.currentScript.async; 13164 } else { 13165 var script = getTurbineScript(); 13166 if (script) { 13167 return script.async; 13168 } 13169 // We couldn't find the Launch script, so we'll assume it was loaded asynchronously. This 13170 // is the safer assumption. 13171 return true; 13172 } 13173})(); 13174 13175/** 13176 * The custom code action. This loads and executes custom JavaScript or HTML provided by the user. 13177 * @param {Object} settings Action settings. 13178 * @params {boolean} settings.isExternal When true, <code>settings.source</code> contains the 13179 * code itself. When false, <code>settings.source</code> contains a relative path to the file 13180 * containing the user's code. 13181 * @param {string} settings.source If <code>settings.external</code> is <code>false</code>, 13182 * this will be the user's code. Otherwise, it will be a relative path to the file containing 13183 * the user's code. 13184 * @param {string} settings.language The language of the user's code. Must be either javascript or 13185 * html. 13186 * @param {Object} event The underlying event object that triggered the rule. 13187 * @param {Object} event.element The element that the rule was targeting. 13188 * @param {Object} event.target The element on which the event occurred. 13189 * <code>javascript</code> or <code>html</code>. 13190 */ 13191module.exports = function (settings, event) { 13192 // ensure the nonce is up-to-date when the function is used 13193 cspNonce = turbine.getExtensionSettings().cspNonce; 13194 13195 var decoratedResult; 13196 13197 var action = { 13198 settings: settings, 13199 event: event 13200 }; 13201 13202 var source = action.settings.source; 13203 if (!source) { 13204 return; 13205 } 13206 13207 if (action.settings.isExternal) { 13208 return loadCodeSequentially(source).then(function (source) { 13209 if (source) { 13210 decoratedResult = decorateCode(action, source); 13211 postscribeWrite(decoratedResult.code); 13212 return decoratedResult.promise; 13213 } 13214 13215 return Promise.resolve(); 13216 }); 13217 } else { 13218 decoratedResult = decorateCode(action, source); 13219 13220 // This area has been modified several times, so here are some helpful details: 13221 // 1. Custom code will be included into the main launch library if it's for a rule that uses the 13222 // Library Loaded or Page Bottom event. isExternal will be false. However, keep in mind that 13223 // the same rule may have other events that are not Library Loaded or Page Bottom. This means 13224 // we could see isExternal = false on the action when the event that fired the rule is 13225 // a click, for example. 13226 // 2. When users load a library synchronously which has a rule using the Library Loaded 13227 // or Page Bottom event with a Custom Code action, they expect the custom code to be written 13228 // to the document in a blocking fashion (prevent the parser from continuing until their 13229 // custom code is executed). In other words, they expect document.write to be used. When 13230 // the library is loaded asynchronously, they do not have this expectation. However, note 13231 // that if the Library Loaded event is used and the website does not call 13232 // _satellite.pageBottom(), page bottom rules will be run when the DOMContentLoaded event 13233 // is fired (at which point we can't use document.write or it will wipe out website content). 13234 // 3. Calls to document.write will be ignored by the browser if the Launch library is loaded 13235 // asynchronously, even if the calls are made before DOMContentLoaded. 13236 // 4. There's a bug in IE 10 where readyState is sometimes set to "interactive" too 13237 // early (before DOMContentLoaded has fired). https://bugs.jquery.com/ticket/12282 13238 // This may cause Postscribe to be used sometimes when document.write() could have been 13239 // used instead, but we have concluded that IE 10 usage is low enough and the risk small 13240 // enough that this behavior is tolerable. 13241 if (!libraryWasLoadedAsynchronously && document.readyState === 'loading') { 13242 // Document object in XML files is different from the ones in HTML files. Documents served 13243 // with the `application/xhtml+xml` MIME type don't have the `document.write` method. 13244 // More info: 13245 // https://www.w3.org/MarkUp/2004/xhtml-faq#docwrite 13246 // https://developer.mozilla.org/en-US/docs/Archive/Web/Writing_JavaScript_for_HTML 13247 // Also, when rule component sequencing is enabled, there is an issue in Edge Legacy 13248 // where the whole page gets erased: https://jira.corp.adobe.com/browse/DTM-13527. 13249 // We decided to not use document.write at all when rule component sequencing is enabled. 13250 if ( 13251 document.write && 13252 turbine.propertySettings.ruleComponentSequencingEnabled === false 13253 ) { 13254 document.write(decoratedResult.code); 13255 } else { 13256 postscribeWrite(decoratedResult.code); 13257 } 13258 } else { 13259 postscribeWrite(decoratedResult.code); 13260 } 13261 13262 return decoratedResult.promise; 13263 } 13264}; 13265 13266 } 13267 13268 }, 13269 "core/src/lib/events/libraryLoaded.js": { 13270 "name": "library-loaded", 13271 "displayName": "Library Loaded (Page Top)", 13272 "script": function(module, exports, require, turbine) { 13273/*************************************************************************************** 13274 * Copyright 2019 Adobe. All rights reserved. 13275 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13276 * you may not use this file except in compliance with the License. You may obtain a copy 13277 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13278 * 13279 * Unless required by applicable law or agreed to in writing, software distributed under 13280 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13281 * OF ANY KIND, either express or implied. See the License for the specific language 13282 * governing permissions and limitations under the License. 13283 ****************************************************************************************/ 13284 13285'use strict'; 13286 13287var pageLifecycleEvents = require('./helpers/pageLifecycleEvents'); 13288 13289/** 13290 * Library loaded event. This event occurs as soon as the runtime library is loaded. 13291 * @param {Object} settings The event settings object. 13292 * @param {ruleTrigger} trigger The trigger callback. 13293 */ 13294module.exports = function (settings, trigger) { 13295 pageLifecycleEvents.registerLibraryLoadedTrigger(trigger); 13296}; 13297 13298 } 13299 13300 }, 13301 "core/src/lib/events/windowLoaded.js": { 13302 "name": "window-loaded", 13303 "displayName": "Window Loaded", 13304 "script": function(module, exports, require, turbine) { 13305/*************************************************************************************** 13306 * Copyright 2019 Adobe. All rights reserved. 13307 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13308 * you may not use this file except in compliance with the License. You may obtain a copy 13309 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13310 * 13311 * Unless required by applicable law or agreed to in writing, software distributed under 13312 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13313 * OF ANY KIND, either express or implied. See the License for the specific language 13314 * governing permissions and limitations under the License. 13315 ****************************************************************************************/ 13316 13317'use strict'; 13318 13319var pageLifecycleEvents = require('./helpers/pageLifecycleEvents'); 13320 13321/** 13322 * Window loaded event. This event occurs at the end of the document loading process. At this point, 13323 * all of the objects in the document are loaded in the DOM, and all images, scripts, links, 13324 * and sub-frames have finished loading. 13325 * @param {Object} settings The event settings object. 13326 * @param {ruleTrigger} trigger The trigger callback. 13327 */ 13328module.exports = function (settings, trigger) { 13329 pageLifecycleEvents.registerWindowLoadedTrigger(trigger); 13330}; 13331 13332 } 13333 13334 }, 13335 "core/src/lib/conditions/pathAndQuerystring.js": { 13336 "name": "path-and-querystring", 13337 "displayName": "Path And Query String", 13338 "script": function(module, exports, require, turbine) { 13339/*************************************************************************************** 13340 * Copyright 2019 Adobe. All rights reserved. 13341 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13342 * you may not use this file except in compliance with the License. You may obtain a copy 13343 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13344 * 13345 * Unless required by applicable law or agreed to in writing, software distributed under 13346 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13347 * OF ANY KIND, either express or implied. See the License for the specific language 13348 * governing permissions and limitations under the License. 13349 ****************************************************************************************/ 13350 13351'use strict'; 13352 13353var document = require('@adobe/reactor-document'); 13354var textMatch = require('../helpers/textMatch'); 13355 13356/** 13357 * Path and query string condition. Provided for legacy reasons. Determines if the actual path + 13358 * query string matches at least one acceptable path + query string. 13359 * @param {Object} settings Condition settings. 13360 * @param {Object[]} settings.paths Acceptable paths. 13361 * @param {string} settings.paths[].value An acceptable path value. 13362 * @param {boolean} [settings.paths[].valueIsRegex=false] Whether <code>value</code> on the object 13363 * instance is intended to be a regular expression. 13364 * @returns {boolean} 13365 */ 13366module.exports = function (settings) { 13367 var path = document.location.pathname + document.location.search; 13368 return settings.paths.some(function (acceptablePath) { 13369 var acceptableValue = acceptablePath.valueIsRegex 13370 ? new RegExp(acceptablePath.value, 'i') 13371 : acceptablePath.value; 13372 return textMatch(path, acceptableValue); 13373 }); 13374}; 13375 13376 } 13377 13378 }, 13379 "core/src/lib/events/mediaPlay.js": { 13380 "name": "media-play", 13381 "displayName": "Media Play", 13382 "script": function(module, exports, require, turbine) { 13383/*************************************************************************************** 13384 * Copyright 2019 Adobe. All rights reserved. 13385 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13386 * you may not use this file except in compliance with the License. You may obtain a copy 13387 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13388 * 13389 * Unless required by applicable law or agreed to in writing, software distributed under 13390 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13391 * OF ANY KIND, either express or implied. See the License for the specific language 13392 * governing permissions and limitations under the License. 13393 ****************************************************************************************/ 13394 13395'use strict'; 13396var bubbly = require('./helpers/createBubbly')(); 13397 13398document.addEventListener('play', bubbly.evaluateEvent, true); 13399 13400/** 13401 * The play event. This event occurs when playback has begun. 13402 * @param {Object} settings The event settings object. 13403 * @param {string} [settings.elementSelector] The CSS selector the element must match in order for 13404 * the rule to fire. 13405 * @param {Object[]} [settings.elementProperties] Property values the element must have in order 13406 * for the rule to fire. 13407 * @param {string} settings.elementProperties[].name The property name. 13408 * @param {string} settings.elementProperties[].value The property value. 13409 * @param {boolean} [settings.elementProperties[].valueIsRegex=false] Whether <code>value</code> 13410 * on the object instance is intended to be a regular expression. 13411 * @param {boolean} [settings.bubbleFireIfParent=true] Whether the rule should fire if 13412 * the event originated from a descendant element. 13413 * @param {boolean} [settings.bubbleFireIfChildFired=true] Whether the rule should fire 13414 * if the same event has already triggered a rule targeting a descendant element. 13415 * @param {boolean} [settings.bubbleStop=false] Whether the event should not trigger 13416 * rules on ancestor elements. 13417 * @param {ruleTrigger} trigger The trigger callback. 13418 */ 13419module.exports = function (settings, trigger) { 13420 bubbly.addListener(settings, trigger); 13421}; 13422 13423 } 13424 13425 }, 13426 "core/src/lib/events/hover.js": { 13427 "name": "hover", 13428 "displayName": "Hover", 13429 "script": function(module, exports, require, turbine) { 13430/*************************************************************************************** 13431 * Copyright 2019 Adobe. All rights reserved. 13432 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13433 * you may not use this file except in compliance with the License. You may obtain a copy 13434 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13435 * 13436 * Unless required by applicable law or agreed to in writing, software distributed under 13437 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13438 * OF ANY KIND, either express or implied. See the License for the specific language 13439 * governing permissions and limitations under the License. 13440 ****************************************************************************************/ 13441 13442'use strict'; 13443 13444var bubbly = require('./helpers/createBubbly')(); 13445var liveQuerySelector = require('./helpers/liveQuerySelector'); 13446var matchesProperties = require('./helpers/matchesProperties'); 13447var WeakMap = require('./helpers/weakMap'); 13448var trackedDelaysByElement = new WeakMap(); 13449var castToNumberIfString = 13450 require('../helpers/stringAndNumberUtils').castToNumberIfString; 13451 13452/** 13453 * After a mouseenter has occurred, waits a given amount of time before declaring that a hover 13454 * has occurred. 13455 * @param {Event} event The mouseenter event. 13456 * @param {number} delay The amount of delay in milliseconds. If delay = 0, the handler will be 13457 * called immediately. 13458 * @param {Function} handler The function that should be called 13459 */ 13460var delayHover = function (event, delay, handler) { 13461 if (delay === 0) { 13462 handler(event); 13463 return; 13464 } 13465 13466 var timeoutId; 13467 var removeMouseLeaveListener; 13468 var handleMouseLeave; 13469 13470 removeMouseLeaveListener = function () { 13471 event.target.removeEventListener('mouseleave', handleMouseLeave); 13472 }; 13473 13474 handleMouseLeave = function () { 13475 clearTimeout(timeoutId); 13476 removeMouseLeaveListener(); 13477 }; 13478 13479 timeoutId = setTimeout(function () { 13480 handler(event); 13481 removeMouseLeaveListener(); 13482 }, delay); 13483 13484 event.target.addEventListener('mouseleave', handleMouseLeave); 13485}; 13486 13487var watchElement = function (element, trackedDelays) { 13488 element.addEventListener('mouseenter', function (event) { 13489 trackedDelays.forEach(function (trackedDelay) { 13490 delayHover(event, trackedDelay, function (event) { 13491 bubbly.evaluateEvent( 13492 { 13493 element: event.target, 13494 target: event.target, 13495 delay: trackedDelay 13496 }, 13497 true 13498 ); 13499 }); 13500 }); 13501 }); 13502}; 13503 13504/** 13505 * The hover event. This event occurs when a user has moved the pointer to be on top of an element. 13506 * @param {Object} settings The event settings object. 13507 * @param {string} settings.elementSelector The CSS selector the element must match in order for 13508 * the rule to fire. 13509 * @param {Object[]} [settings.elementProperties] Property values the element must have in order 13510 * for the rule to fire. 13511 * @param {string} settings.elementProperties[].name The property name. 13512 * @param {string} settings.elementProperties[].value The property value. 13513 * @param {boolean} [settings.elementProperties[].valueIsRegex=false] Whether <code>value</code> 13514 * on the object instance is intended to be a regular expression. 13515 * @param {number|string} [settings.delay] The number of milliseconds the pointer must be on 13516 * top of the element before declaring that a hover has occurred. 13517 * @param {boolean} [settings.bubbleFireIfParent=true] Whether the rule should fire 13518 * if the event originated from a descendant element. 13519 * @param {boolean} [settings.bubbleFireIfChildFired=true] Whether the rule should 13520 * fire if the same event has already triggered a rule targeting a descendant element. 13521 * @param {boolean} [settings.bubbleStop=false] Whether the event should not trigger 13522 * rules on ancestor elements. 13523 * @param {ruleTrigger} trigger The trigger callback. 13524 */ 13525module.exports = function (settings, trigger) { 13526 // if settings.delay can't be parsed, fall back to no delay
13527 var delay = castToNumberIfString(settings.delay) || 0; 13528 13529 bubbly.addListener(settings, function (syntheticEvent) { 13530 // Bubbling for this event is dependent upon the delay configured for rules. 13531 // An event can "bubble up" to other rules with the same delay but not to rules with 13532 // different delays. See the tests for how this plays out. 13533 if (syntheticEvent.delay === delay) { 13534 trigger(syntheticEvent); 13535 } else { 13536 return false; 13537 } 13538 }); 13539 13540 liveQuerySelector(settings.elementSelector, function (element) { 13541 if (!matchesProperties(element, settings.elementProperties)) { 13542 return; 13543 } 13544 13545 var trackedDelays = trackedDelaysByElement.get(element); 13546 13547 if (trackedDelays) { 13548 if (trackedDelays.indexOf(delay) === -1) { 13549 trackedDelays.push(delay); 13550 } 13551 } else { 13552 trackedDelays = [delay]; 13553 trackedDelaysByElement.set(element, trackedDelays); 13554 watchElement(element, trackedDelays); 13555 } 13556 }); 13557}; 13558 13559 } 13560 13561 }, 13562 "core/src/lib/events/customCode.js": { 13563 "name": "custom-code", 13564 "displayName": "Custom Code", 13565 "script": function(module, exports, require, turbine) { 13566/*************************************************************************************** 13567 * Copyright 2019 Adobe. All rights reserved. 13568 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13569 * you may not use this file except in compliance with the License. You may obtain a copy 13570 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13571 * 13572 * Unless required by applicable law or agreed to in writing, software distributed under 13573 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13574 * OF ANY KIND, either express or implied. See the License for the specific language 13575 * governing permissions and limitations under the License. 13576 ****************************************************************************************/ 13577 13578'use strict'; 13579 13580/** 13581 * Custom code event. This executes event code provided by the user. The user's code will call 13582 * <code>trigger</code> when the rule should fire. 13583 * @param {Object} settings The event settings object. 13584 * @param {Function} settings.source The custom script function. 13585 */ 13586module.exports = function (settings, trigger) { 13587 settings.source(trigger); 13588}; 13589 13590 } 13591 13592 }, 13593 "core/src/lib/events/domReady.js": { 13594 "name": "dom-ready", 13595 "displayName": "DOM Ready", 13596 "script": function(module, exports, require, turbine) { 13597/*************************************************************************************** 13598 * Copyright 2019 Adobe. All rights reserved. 13599 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13600 * you may not use this file except in compliance with the License. You may obtain a copy 13601 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13602 * 13603 * Unless required by applicable law or agreed to in writing, software distributed under 13604 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13605 * OF ANY KIND, either express or implied. See the License for the specific language 13606 * governing permissions and limitations under the License. 13607 ****************************************************************************************/ 13608 13609'use strict'; 13610 13611var pageLifecycleEvents = require('./helpers/pageLifecycleEvents'); 13612 13613/** 13614 * DOM ready event. This event occurs as soon as HTML document has been completely loaded and 13615 * parsed, without waiting for stylesheets, images, and subframes to finish loading. 13616 * @param {Object} settings The event settings object. 13617 * @param {ruleTrigger} trigger The trigger callback. 13618 */ 13619module.exports = function (settings, trigger) { 13620 pageLifecycleEvents.registerDomReadyTrigger(trigger); 13621}; 13622 13623 } 13624 13625 }, 13626 "core/src/lib/events/mediaEnded.js": { 13627 "name": "media-ended", 13628 "displayName": "Media Ended", 13629 "script": function(module, exports, require, turbine) { 13630/*************************************************************************************** 13631 * Copyright 2019 Adobe. All rights reserved. 13632 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13633 * you may not use this file except in compliance with the License. You may obtain a copy 13634 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13635 * 13636 * Unless required by applicable law or agreed to in writing, software distributed under 13637 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13638 * OF ANY KIND, either express or implied. See the License for the specific language 13639 * governing permissions and limitations under the License. 13640 ****************************************************************************************/ 13641 13642'use strict'; 13643var bubbly = require('./helpers/createBubbly')(); 13644 13645document.addEventListener('ended', bubbly.evaluateEvent, true); 13646 13647/** 13648 * The ended event. This event occurs when playback has stopped because the end of the media was 13649 * reached. 13650 * @param {Object} settings The event settings object. 13651 * @param {string} [settings.elementSelector] The CSS selector the element must match in order for 13652 * the rule to fire. 13653 * @param {Object[]} [settings.elementProperties] Property values the element must have in order 13654 * for the rule to fire. 13655 * @param {string} settings.elementProperties[].name The property name. 13656 * @param {string} settings.elementProperties[].value The property value. 13657 * @param {boolean} [settings.elementProperties[].valueIsRegex=false] Whether <code>value</code> 13658 * on the object instance is intended to be a regular expression. 13659 * @param {boolean} [settings.bubbleFireIfParent=true] Whether the rule should fire if 13660 * the event originated from a descendant element. 13661 * @param {boolean} [settings.bubbleFireIfChildFired=true] Whether the rule should fire 13662 * if the same event has already triggered a rule targeting a descendant element. 13663 * @param {boolean} [settings.bubbleStop=false] Whether the event should not trigger 13664 * rules on ancestor elements. 13665 * @param {ruleTrigger} trigger The trigger callback. 13666 */ 13667module.exports = function (settings, trigger) { 13668 bubbly.addListener(settings, trigger); 13669}; 13670 13671 } 13672 13673 }, 13674 "core/src/lib/conditions/domain.js": { 13675 "name": "domain", 13676 "displayName": "Domain", 13677 "script": function(module, exports, require, turbine) { 13678/*************************************************************************************** 13679 * Copyright 2019 Adobe. All rights reserved. 13680 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13681 * you may not use this file except in compliance with the License. You may obtain a copy 13682 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13683 * 13684 * Unless required by applicable law or agreed to in writing, software distributed under 13685 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13686 * OF ANY KIND, either express or implied. See the License for the specific language 13687 * governing permissions and limitations under the License. 13688 ****************************************************************************************/ 13689 13690'use strict'; 13691 13692var document = require('@adobe/reactor-document'); 13693var matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g; 13694 13695var escapeForRegex = function (string) { 13696 if (typeof string !== 'string') { 13697 throw new TypeError('Expected a string'); 13698 } 13699 13700 return string.replace(matchOperatorsRegex, '\\$&'); 13701}; 13702 13703/** 13704 * Domain condition. Determines if the actual domain matches at least one acceptable domain. 13705 * @param {Object} settings Condition settings. 13706 * @param {string[]} settings.domains An array of acceptable domains. 13707 * @returns {boolean} 13708 */ 13709module.exports = function (settings) { 13710 var domain = document.location.hostname; 13711 13712 return settings.domains.some(function (acceptableDomain) { 13713 // If document.location.hostname is example.com and the acceptableDomain is ample.com, the 13714 // condition would pass without (^|\.), which is incorrect. We can't only use ^ though because 13715 // if document.location.hostname is niner.example.com and the acceptableDomain is example.com, 13716 // the condition should pass. See the tests for examples of why this pattern is necessary. 13717 return domain.match( 13718 new RegExp('(^|\\.)' + escapeForRegex(acceptableDomain) + '$', 'i') 13719 ); 13720 }); 13721}; 13722 13723 } 13724 13725 }, 13726 "core/src/lib/events/elementExists.js": { 13727 "name": "element-exists", 13728 "displayName": "Element Exists", 13729 "script": function(module, exports, require, turbine) { 13730/*************************************************************************************** 13731 * Copyright 2019 Adobe. All rights reserved. 13732 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13733 * you may not use this file except in compliance with the License. You may obtain a copy 13734 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13735 * 13736 * Unless required by applicable law or agreed to in writing, software distributed under 13737 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13738 * OF ANY KIND, either express or implied. See the License for the specific language 13739 * governing permissions and limitations under the License. 13740 ****************************************************************************************/ 13741 13742'use strict'; 13743 13744var POLL_INTERVAL = 3000; 13745 13746var WeakMap = require('./helpers/weakMap'); 13747var seenElements = new WeakMap(); 13748var matchesProperties = require('./helpers/matchesProperties'); 13749 13750var listenersBySelector = {}; 13751 13752setInterval(function () { 13753 Object.keys(listenersBySelector).forEach(function (selector) { 13754 var listeners = listenersBySelector[selector]; 13755 var elements = document.querySelectorAll(selector); 13756 13757 for (var i = 0; i < elements.length; i++) { 13758 var element = elements[i]; 13759 13760 if (!seenElements.has(element)) { 13761 seenElements.set(element, true); 13762 13763 // We want to try to execute the rules in the order they were in the turbine container. 13764 // This is why we try to loop from 0 to N. We do k-- in order to not mess up looping 13765 // as we splice items from the array. 13766 for (var k = 0; k < listeners.length; k++) { 13767 var listener = listeners[k]; 13768 if (matchesProperties(element, listener.settings.elementProperties)) { 13769 listener.trigger({ 13770 element: element, 13771 target: element 13772 }); 13773 listeners.splice(k, 1); 13774 k--; 13775 } 13776 } 13777 } 13778 13779 // Listeners are removed from the array as their respective rules are fired. 13780 // Once we have no more rules corresponding to the selector there is no need to 13781 // continue scanning elements with the selector. 13782 if (!listeners.length) { 13783 delete listenersBySelector[selector]; 13784 break; 13785 } 13786 } 13787 }); 13788}, POLL_INTERVAL); 13789 13790/** 13791 * Element exists event. This event occurs when an element has been added to the DOM. The rule 13792 * should run no more than once. 13793 * @param {Object} settings The event settings object. 13794 * @param {string} settings.elementSelector The CSS selector the element must match in order for 13795 * the rule to fire. 13796 * @param {Object[]} [settings.elementProperties] Property values the element must have in order 13797 * for the rule to fire. 13798 * @param {string} settings.elementProperties[].name The property name. 13799 * @param {string} settings.elementProperties[].value The property value. 13800 * @param {boolean} [settings.elementProperties[].valueIsRegex=false] Whether <code>value</code> 13801 * on the object instance is intended to be a regular expression. 13802 * @param {ruleTrigger} trigger The trigger callback. 13803 */ 13804module.exports = function (settings, trigger) { 13805 var listeners = listenersBySelector[settings.elementSelector]; 13806 13807 if (!listeners) { 13808 listeners = listenersBySelector[settings.elementSelector] = []; 13809 } 13810 13811 listeners.push({ 13812 settings: settings, 13813 trigger: trigger 13814 }); 13815}; 13816 13817 } 13818 13819 }, 13820 "core/src/lib/helpers/getObjectProperty.js": { 13821 "script": function(module, exports, require, turbine) { 13822/*************************************************************************************** 13823 * Copyright 2019 Adobe. All rights reserved. 13824 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 13825 * you may not use this file except in compliance with the License. You may obtain a copy 13826 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13827 * 13828 * Unless required by applicable law or agreed to in writing, software distributed under 13829 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13830 * OF ANY KIND, either express or implied. See the License for the specific language 13831 * governing permissions and limitations under the License. 13832 ****************************************************************************************/ 13833 13834'use strict'; 13835 13836/** 13837 * Returns the deep property value of an object. 13838 * @param obj The object where the property will be searched. 13839 * @param property The property name to be returned. It can contain dots. (eg. prop.subprop1) 13840 * @returns {*} 13841 */ 13842module.exports = function (obj, property) { 13843 var propertyChain = property.split('.'); 13844 var currentValue = obj; 13845 13846 for (var i = 0, len = propertyChain.length; i < len; i++) { 13847 if (currentValue == null) { 13848 return undefined; 13849 } 13850 13851 currentValue = currentValue[propertyChain[i]]; 13852 } 13853 13854 return currentValue; 13855}; 13856 13857 } 13858 13859 }, 13860 "core/src/lib/helpers/stringAndNumberUtils.js": { 13861 "script": function(module, exports, require, turbine) { 13862'use strict'; 13863 13864var isNumber = function (value) { 13865 return typeof value === 'number' && isFinite(value); // isFinite weeds out NaNs. 13866}; 13867 13868var isString = function (value) { 13869 return typeof value === 'string' || value instanceof String; 13870}; 13871 13872var castToStringIfNumber = function (value) { 13873 return isNumber(value) ? String(value) : value; 13874}; 13875 13876var castToNumberIfString = function (value) { 13877 return isString(value) ? Number(value) : value; 13878}; 13879 13880module.exports = { 13881 isNumber: isNumber, 13882 isString: isString, 13883 castToStringIfNumber: castToStringIfNumber, 13884 castToNumberIfString: castToNumberIfString 13885}; 13886 13887 } 13888 13889 }, 13890 "core/src/lib/events/helpers/createBubbly.js": { 13891 "script": function(module, exports, require, turbine) { 13892/*************************************************************************************** 13893 * Copyright 2019 Adobe. All rights reserved. 13894 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13895 * you may not use this file except in compliance with the License. You may obtain a copy 13896 * of the License at http://www.apache.org/licenses/LICENSE-2.0 13897 * 13898 * Unless required by applicable law or agreed to in writing, software distributed under 13899 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 13900 * OF ANY KIND, either express or implied. See the License for the specific language 13901 * governing permissions and limitations under the License. 13902 ****************************************************************************************/ 13903 13904'use strict'; 13905 13906var WeakMap = require('./weakMap'); 13907var matchesProperties = require('./matchesProperties'); 13908var matchesSelector = require('./matchesSelector'); 13909 13910// Note to developers of other extensions: 13911// This module largely exists to support advanced bubbling options 13912// that were carried over to Launch from DTM. It is highly unlikely 13913// that you need to support these options in your own extension. 13914// As such, please only copy this code if you know why you're doing so 13915// and feel you have a justifiable reason. 13916 13917/** 13918 * Handles logic related to bubbling options provided for many event types. 13919 */ 13920module.exports = function () { 13921 var listeners = []; 13922 13923 // It's important that a new weak map is created for each instance of bubbly in order to store 13924 // whether this particular bubbly instance has processed the event. More than one instance of 13925 // bubbly may process an event. No instance of bubbly should process an event more than once. 13926 var processedEvents = new WeakMap(); 13927 13928 var bubbly = { 13929 /** 13930 * Register a config object that should be evaluated for an event to determine if a rule 13931 * should be executed. If it should be executed, the callback function will be called. 13932 * @param {Object} settings The event config object. 13933 * @param {string} [settings.elementSelector] The CSS selector the element must match in order 13934 * for the rule to fire. 13935 * @param {Object[]} [settings.elementProperties] Property values the element must have in order 13936 * for the rule to fire. 13937 * @param {string} settings.elementProperties[].name The property name. 13938 * @param {string} settings.elementProperties[].value The property value. 13939 * @param {number} [settings.anchorDelay] - When present and a link is clicked, actual 13940 * navigation will be postponed for a period of time equal with its value. This is typically 13941 * used to allow time for scripts within the rule to execute, beacons to be sent to 13942 * servers, etc. 13943 * @param {boolean} [settings.elementProperties[].valueIsRegex=false] Whether <code>value</code> 13944 * on the object instance is intended to be a regular expression. 13945 * @param {boolean} [settings.bubbleFireIfParent=true] Whether the rule should fire if the 13946 * event originated from a descendant element. 13947 * @param {boolean} [settings.bubbleFireIfChildFired=true] Whether the rule should fire if the 13948 * same event has already triggered a rule targeting a descendant element. 13949 * @param {boolean} [settings.bubbleStop=false] Whether the event should not trigger rules on 13950 * ancestor elements. 13951 * @param {Function} callback The function to be called when a matching event is seen. If the 13952 * callback does not end up triggering a rule, the callback should explicitly return false. 13953 */ 13954 addListener: function (settings, callback) { 13955 listeners.push({ 13956 settings: settings, 13957 callback: callback 13958 }); 13959 }, 13960 /** 13961 * Evaluate an event to determine if any rule targeting elements in the event target's DOM 13962 * hierarchy should be executed. Note that event.type is not inspected. This assumes that 13963 * all registered listeners care about this particular event type. 13964 * @param {Event} event The event that has occurred. 13965 * @param {HTMLElement} event.target The HTML element where the event originated. 13966 * @param {boolean} [eventIsSynthetic] Whether the event passed in is synthetic (instead of 13967 * native). 13968 */ 13969 evaluateEvent: function (event, eventIsSynthetic) { 13970 if (!listeners.length) { 13971 return; 13972 } 13973 13974 // When an event is handled it is evaluated a single time but checks out which rules are 13975 // targeting elements starting at the target node and looking all the way up the element 13976 // hierarchy. This should only happen once regardless of how many listeners exist for the 13977 // event. 13978 if (processedEvents.has(event)) { 13979 return; 13980 } 13981 13982 var node = event.target; 13983 var childHasTriggeredRule = false;
13984 13985 // Loop through from the event target up through the hierarchy evaluating each node 13986 // to see if it matches any rules. 13987 while (node) { 13988 var preventEvaluationOnAncestors = false; 13989 13990 var nodeTriggeredRule = false; 13991 13992 // Just because this could be processed a lot, we'll use a for loop instead of forEach. 13993 for (var i = 0; i < listeners.length; i++) { 13994 var listener = listeners[i]; 13995 var elementSelector = listener.settings.elementSelector; 13996 var elementProperties = listener.settings.elementProperties; 13997 13998 // bubbleFireIfChildFired should be considered true by default 13999 if ( 14000 listener.settings.bubbleFireIfChildFired === false && 14001 childHasTriggeredRule 14002 ) { 14003 continue; 14004 } 14005 14006 // bubbleFireIfParent should be considered true by default 14007 if ( 14008 node !== event.target && 14009 listener.settings.bubbleFireIfParent === false 14010 ) { 14011 continue; 14012 } 14013 14014 // If the user didn't specify elementSelector or elementProperties then they want the 14015 // rule to run whenever the event occurs on any element. They don't intend for the 14016 // rule to run for every node in the element hierarchy though. 14017 if ( 14018 node !== event.target && 14019 !elementSelector && 14020 (!elementProperties || !Object.keys(elementProperties).length) 14021 ) { 14022 continue; 14023 } 14024 14025 if (elementSelector && !matchesSelector(node, elementSelector)) { 14026 continue; 14027 } 14028 14029 if ( 14030 elementProperties && 14031 !matchesProperties(node, elementProperties) 14032 ) { 14033 continue; 14034 } 14035 14036 var syntheticEventForCallback = {}; 14037 14038 // We'll attach relevant data depending on whether the passed in event is synthetic 14039 // or native. 14040 if (eventIsSynthetic) { 14041 Object.keys(event).forEach(function (key) { 14042 syntheticEventForCallback[key] = event[key]; 14043 }); 14044 } else { 14045 syntheticEventForCallback.nativeEvent = event; 14046 } 14047 14048 syntheticEventForCallback.element = node; 14049 syntheticEventForCallback.target = event.target; 14050 14051 var callbackResponse = listener.callback(syntheticEventForCallback); 14052 14053 // The callback should return false if it didn't end up triggering a rule. 14054 var ruleTriggered = callbackResponse !== false; 14055 14056 if (ruleTriggered) { 14057 nodeTriggeredRule = true; 14058 14059 if (listener.settings.bubbleStop) { 14060 preventEvaluationOnAncestors = true; 14061 } 14062 } 14063 } 14064 14065 if (preventEvaluationOnAncestors) { 14066 break; 14067 } 14068 14069 if (nodeTriggeredRule) { 14070 childHasTriggeredRule = true; 14071 } 14072 14073 node = node.parentNode; 14074 } 14075 14076 processedEvents.set(event, true); 14077 } 14078 }; 14079 14080 /** 14081 * @private 14082 * Clears all listeners. This should only be used in tests. 14083 */ 14084 bubbly.__reset = function () { 14085 listeners = []; 14086 }; 14087 14088 return bubbly; 14089}; 14090 14091 } 14092 14093 }, 14094 "core/src/lib/events/helpers/weakMap.js": { 14095 "script": function(module, exports, require, turbine) { 14096/** 14097 * @license 14098 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 14099 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 14100 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 14101 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 14102 * Code distributed by Google as part of the polymer project is also 14103 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 14104 */ 14105// This is copied from 14106// https://github.com/webcomponents/webcomponentsjs/blob/7dc6731eb9c9f9c3fea4419c50c6ee3ca0367544/src/WeakMap/WeakMap.js 14107// because there's not an npm package that makes it easy to import only WeakMap. We've also 14108// modified it slightly so that it doesn't ever set window.WeakMap. 14109 14110'use strict'; 14111 14112var window = require('@adobe/reactor-window'); 14113var WeakMap = window.WeakMap; 14114 14115if (typeof WeakMap === 'undefined') { 14116 var defineProperty = Object.defineProperty; 14117 var counter = Date.now() % 1e9; 14118 14119 WeakMap = function () { 14120 this.name = '__st' + ((Math.random() * 1e9) >>> 0) + (counter++ + '__'); 14121 }; 14122 14123 WeakMap.prototype = { 14124 set: function (key, value) { 14125 var entry = key[this.name]; 14126 if (entry && entry[0] === key) entry[1] = value; 14127 else 14128 defineProperty(key, this.name, { value: [key, value], writable: true }); 14129 return this; 14130 }, 14131 get: function (key) { 14132 var entry; 14133 return (entry = key[this.name]) && entry[0] === key 14134 ? entry[1] 14135 : undefined; 14136 }, 14137 delete: function (key) { 14138 var entry = key[this.name]; 14139 if (!entry || entry[0] !== key) return false;
14140 entry[0] = entry[1] = undefined; 14141 return true; 14142 }, 14143 has: function (key) { 14144 var entry = key[this.name]; 14145 if (!entry) return false; 14146 return entry[0] === key; 14147 } 14148 }; 14149} 14150 14151module.exports = WeakMap; 14152 14153 } 14154 14155 }, 14156 "core/src/lib/events/helpers/matchesProperties.js": { 14157 "script": function(module, exports, require, turbine) { 14158/*************************************************************************************** 14159 * Copyright 2019 Adobe. All rights reserved. 14160 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 14161 * you may not use this file except in compliance with the License. You may obtain a copy 14162 * of the License at http://www.apache.org/licenses/LICENSE-2.0 14163 * 14164 * Unless required by applicable law or agreed to in writing, software distributed under 14165 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 14166 * OF ANY KIND, either express or implied. See the License for the specific language 14167 * governing permissions and limitations under the License. 14168 ****************************************************************************************/ 14169 14170'use strict'; 14171 14172var textMatch = require('./../../helpers/textMatch'); 14173 14174var getElementProperty = function (element, property) { 14175 if (property === '@text' || property === 'innerText') { 14176 return element.textContent || element.innerText; 14177 } else if (property in element) { 14178 return element[property]; 14179 } else if (element.getAttribute) { 14180 return element.getAttribute(property); 14181 } 14182}; 14183 14184/** 14185 * Determines whether an element's properties and their values match a set of properties and values. 14186 * If the element doesn't have the property, the element's attribute with the same name will be 14187 * evaluated if it exists. 14188 * @param {HTMLElement} element The element to match against. 14189 * @param {Object[]} properties The criteria of properties to match again. 14190 * @param {string} properties.name The property name. 14191 * @param {string} properties.value The property value. 14192 * @param {boolean} [properties.valueIsRegex=false] Whether <code>value</code> on the 14193 * object instance is intended to be a regular expression. 14194 * @returns {boolean} Whether the element matches the criteria. 14195 */ 14196module.exports = function (element, properties) { 14197 if (properties) { 14198 return properties.every(function (property) { 14199 var actualValue = getElementProperty(element, property.name); 14200 var criterionValue = property.valueIsRegex 14201 ? new RegExp(property.value, 'i') 14202 : property.value; 14203 return textMatch(actualValue, criterionValue); 14204 }); 14205 } 14206 return true; 14207}; 14208 14209 } 14210 14211 }, 14212 "core/src/lib/events/helpers/matchesSelector.js": { 14213 "script": function(module, exports, require, turbine) { 14214/*************************************************************************************** 14215 * Copyright 2019 Adobe. All rights reserved. 14216 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 14217 * you may not use this file except in compliance with the License. You may obtain a copy 14218 * of the License at http://www.apache.org/licenses/LICENSE-2.0 14219 * 14220 * Unless required by applicable law or agreed to in writing, software distributed under 14221 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 14222 * OF ANY KIND, either express or implied. See the License for the specific language 14223 * governing permissions and limitations under the License. 14224 ****************************************************************************************/ 14225 14226'use strict'; 14227 14228/** 14229 * Returns whether an element matches a selector. 14230 * @param {HTMLElement} element The HTML element being tested. 14231 * @param {string} selector The CSS selector. 14232 * @returns {boolean} 14233 */ 14234module.exports = function (element, selector) { 14235 var matches = element.matches || element.msMatchesSelector; 14236 14237 if (matches) { 14238 try { 14239 return matches.call(element, selector); 14240 } catch (error) { 14241 turbine.logger.warn( 14242 'Matching element failed. ' + selector + ' is not a valid selector.' 14243 ); 14244 return false;
14245 } 14246 } 14247 14248 return false; 14249}; 14250 14251 } 14252 14253 }, 14254 "core/src/lib/helpers/textMatch.js": { 14255 "script": function(module, exports, require, turbine) { 14256/*************************************************************************************** 14257 * Copyright 2019 Adobe. All rights reserved. 14258 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 14259 * you may not use this file except in compliance with the License. You may obtain a copy 14260 * of the License at http://www.apache.org/licenses/LICENSE-2.0 14261 * 14262 * Unless required by applicable law or agreed to in writing, software distributed under 14263 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 14264 * OF ANY KIND, either express or implied. See the License for the specific language 14265 * governing permissions and limitations under the License. 14266 ****************************************************************************************/ 14267 14268'use strict'; 14269 14270/** 14271 * Performs a string match based on another string or a regex. 14272 * @param {string} str The string to be evaluate. 14273 * @param {string|RegExp} pattern The pattern to match against. 14274 * @returns {boolean} Whether the string matches the pattern. 14275 */ 14276module.exports = function (str, pattern) { 14277 if (pattern == null) { 14278 throw new Error('Illegal Argument: Pattern is not present'); 14279 } 14280 if (str == null) { 14281 return false; 14282 } 14283 if (typeof pattern === 'string') { 14284 return str === pattern; 14285 } else if (pattern instanceof RegExp) { 14286 return pattern.test(str); 14287 } else { 14288 return false; 14289 } 14290}; 14291 14292 } 14293 14294 }, 14295 "core/src/lib/actions/helpers/decorateCode.js": { 14296 "script": function(module, exports, require, turbine) { 14297/* 14298Copyright 2020 Adobe. All rights reserved. 14299This file is licensed to you under the Apache License, Version 2.0 (the "License"); 14300you may not use this file except in compliance with the License. You may obtain a copy 14301of the License at http://www.apache.org/licenses/LICENSE-2.0 14302Unless required by applicable law or agreed to in writing, software distributed under 14303the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 14304OF ANY KIND, either express or implied. See the License for the specific language 14305governing permissions and limitations under the License. 14306*/ 14307 14308'use strict'; 14309 14310var decorateGlobalJavaScriptCode = require('./decorators/decorateGlobalJavaScriptCode'); 14311var decorateNonGlobalJavaScriptCode = require('./decorators/decorateNonGlobalJavaScriptCode'); 14312var decorateHtmlCode = require('./decorators/decorateHtmlCode'); 14313 14314var decorators = { 14315 javascript: function (action, source) { 14316 return action.settings.global 14317 ? decorateGlobalJavaScriptCode(action, source) 14318 : decorateNonGlobalJavaScriptCode(action, source); 14319 }, 14320 html: decorateHtmlCode 14321}; 14322 14323module.exports = function (action, source) { 14324 return decorators[action.settings.language](action, source); 14325}; 14326 14327 } 14328 14329 }, 14330 "core/src/lib/actions/helpers/loadCodeSequentially.js": { 14331 "script": function(module, exports, require, turbine) { 14332/*************************************************************************************** 14333 * Copyright 2019 Adobe. All rights reserved. 14334 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 14335 * you may not use this file except in compliance with the License. You may obtain a copy 14336 * of the License at http://www.apache.org/licenses/LICENSE-2.0 14337 * 14338 * Unless required by applicable law or agreed to in writing, software distributed under 14339 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 14340 * OF ANY KIND, either express or implied. See the License for the specific language 14341 * governing permissions and limitations under the License. 14342 ****************************************************************************************/ 14343 14344'use strict'; 14345 14346var Promise = require('@adobe/reactor-promise'); 14347var getSourceByUrl = require('./getSourceByUrl'); 14348 14349var previousExecuteCodePromise = Promise.resolve(); 14350 14351module.exports = function (sourceUrl) { 14352 var sequentiallyLoadCodePromise = new Promise(function (resolve) { 14353 var loadCodePromise = getSourceByUrl(sourceUrl); 14354 14355 Promise.all([loadCodePromise, previousExecuteCodePromise]).then(function ( 14356 values 14357 ) { 14358 var source = values[0]; 14359 resolve(source); 14360 }); 14361 }); 14362 14363 previousExecuteCodePromise = sequentiallyLoadCodePromise; 14364 return sequentiallyLoadCodePromise; 14365}; 14366 14367 } 14368 14369 }, 14370 "core/node_modules/postscribe/dist/postscribe.js": { 14371 "script": function(module, exports, require, turbine) { 14372/** 14373 * @file postscribe 14374 * @description Asynchronously write javascript, even with document.write. 14375 * @version v2.0.8 14376 * @see {@link https://krux.github.io/postscribe} 14377 * @license MIT 14378 * @author Derek Brans 14379 * @copyright 2016 Krux Digital, Inc 14380 */ 14381(function webpackUniversalModuleDefinition(root, factory) { 14382 if(typeof exports === 'object' && typeof module === 'object'
vendor: 54,406 bytes, lines 14382-16459
14382) 14383 module.exports = factory(); 14384 else if(typeof define === 'function' && define.amd) 14385 define([], factory); 14386 else if(typeof exports === 'object') 14387 exports["postscribe"] = factory(); 14388 else 14389 root["postscribe"] = factory(); 14390})(this, function() { 14391return /******/ (function(modules) { // webpackBootstrap 14392/******/ // The module cache 14393/******/ var installedModules = {}; 14394/******/ 14395/******/ // The require function 14396/******/ function __webpack_require__(moduleId) { 14397/******/ 14398/******/ // Check if module is in cache 14399/******/ if(installedModules[moduleId]) 14400/******/ return installedModules[moduleId].exports; 14401/******/ 14402/******/ // Create a new module (and put it into the cache) 14403/******/ var module = installedModules[moduleId] = { 14404/******/ exports: {}, 14405/******/ id: moduleId, 14406/******/ loaded: false 14407/******/ }; 14408/******/ 14409/******/ // Execute the module function 14410/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 14411/******/ 14412/******/ // Flag the module as loaded 14413/******/ module.loaded = true; 14414/******/ 14415/******/ // Return the exports of the module 14416/******/ return module.exports; 14417/******/ } 14418/******/ 14419/******/ 14420/******/ // expose the modules object (__webpack_modules__) 14421/******/ __webpack_require__.m = modules; 14422/******/ 14423/******/ // expose the module cache 14424/******/ __webpack_require__.c = installedModules; 14425/******/ 14426/******/ // __webpack_public_path__ 14427/******/ __webpack_require__.p = ""; 14428/******/ 14429/******/ // Load entry module and return exports 14430/******/ return __webpack_require__(0); 14431/******/ }) 14432/************************************************************************/ 14433/******/ ([ 14434/* 0 */ 14435/***/ function(module, exports, __webpack_require__) { 14436 14437 'use strict'; 14438 14439 var _postscribe = __webpack_require__(1); 14440 14441 var _postscribe2 = _interopRequireDefault(_postscribe); 14442 14443 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 14444 14445 module.exports = _postscribe2['default']; 14446 14447/***/ }, 14448/* 1 */ 14449/***/ function(module, exports, __webpack_require__) { 14450 14451 'use strict'; 14452 14453 exports.__esModule = true; 14454 14455 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 14456 14457 exports['default'] = postscribe; 14458 14459 var _writeStream = __webpack_require__(2); 14460 14461 var _writeStream2 = _interopRequireDefault(_writeStream); 14462 14463 var _utils = __webpack_require__(4); 14464 14465 var utils = _interopRequireWildcard(_utils); 14466 14467 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } 14468 14469 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 14470 14471 /** 14472 * A function that intentionally does nothing. 14473 */ 14474 function doNothing() {} 14475 14476 /** 14477 * Available options and defaults. 14478 * 14479 * @type {Object} 14480 */ 14481 var OPTIONS = { 14482 /** 14483 * Called when an async script has loaded. 14484 */ 14485 afterAsync: doNothing, 14486 14487 /** 14488 * Called immediately before removing from the write queue. 14489 */ 14490 afterDequeue: doNothing, 14491 14492 /** 14493 * Called sync after a stream's first thread release. 14494 */ 14495 afterStreamStart: doNothing, 14496 14497 /** 14498 * Called after writing buffered document.write calls. 14499 */ 14500 afterWrite: doNothing, 14501 14502 /** 14503 * Allows disabling the autoFix feature of prescribe 14504 */ 14505 autoFix: true, 14506 14507 /** 14508 * Called immediately before adding to the write queue. 14509 */ 14510 beforeEnqueue: doNothing, 14511 14512 /** 14513 * Called before writing a token. 14514 * 14515 * @param {Object} tok The token 14516 */ 14517 beforeWriteToken: function beforeWriteToken(tok) { 14518 return tok; 14519 }, 14520 14521 /** 14522 * Called before writing buffered document.write calls. 14523 * 14524 * @param {String} str The string 14525 */ 14526 beforeWrite: function beforeWrite(str) { 14527 return str; 14528 }, 14529 14530 /** 14531 * Called when evaluation is finished. 14532 */ 14533 done: doNothing, 14534 14535 /** 14536 * Called when a write results in an error. 14537 * 14538 * @param {Error} e The error 14539 */ 14540 error: function error(e) { 14541 throw new Error(e.msg); 14542 }, 14543 14544 14545 /** 14546 * Whether to let scripts w/ async attribute set fall out of the queue. 14547 */ 14548 releaseAsync: false 14549 }; 14550 14551 var nextId = 0; 14552 var queue = []; 14553 var active = null; 14554 14555 function nextStream() { 14556 var args = queue.shift(); 14557 if (args) { 14558 var options = utils.last(args); 14559 14560 options.afterDequeue(); 14561 args.stream = runStream.apply(undefined, args); 14562 options.afterStreamStart(); 14563 } 14564 } 14565 14566 function runStream(el, html, options) { 14567 active = new _writeStream2['default'](el, options); 14568 14569 // Identify this stream. 14570 active.id = nextId++; 14571 active.name = options.name || active.id; 14572 postscribe.streams[active.name] = active; 14573 14574 // Override document.write. 14575 var doc = el.ownerDocument; 14576 14577 var stash = { 14578 close: doc.close, 14579 open: doc.open, 14580 write: doc.write, 14581 writeln: doc.writeln 14582 }; 14583 14584 function _write(str) { 14585 str = options.beforeWrite(str); 14586 active.write(str); 14587 options.afterWrite(str); 14588 } 14589 14590 _extends(doc, { 14591 close: doNothing, 14592 open: doNothing, 14593 write: function write() { 14594 for (var _len = arguments.length, str = Array(_len), _key = 0; _key < _len; _key++) { 14595 str[_key] = arguments[_key]; 14596 } 14597 14598 return _write(str.join('')); 14599 }, 14600 writeln: function writeln() { 14601 for (var _len2 = arguments.length, str = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 14602 str[_key2] = arguments[_key2]; 14603 } 14604 14605 return _write(str.join('') + '\n'); 14606 } 14607 }); 14608 14609 // Override window.onerror 14610 var oldOnError = active.win.onerror || doNothing; 14611 14612 // This works together with the try/catch around WriteStream::insertScript 14613 // In modern browsers, exceptions in tag scripts go directly to top level 14614 active.win.onerror = function (msg, url, line) { 14615 options.error({ msg: msg + ' - ' + url + ': ' + line }); 14616 oldOnError.apply(active.win, [msg, url, line]); 14617 }; 14618 14619 // Write to the stream 14620 active.write(html, function () { 14621 // restore document.write 14622 _extends(doc, stash); 14623 14624 // restore window.onerror 14625 active.win.onerror = oldOnError; 14626 14627 options.done(); 14628 active = null; 14629 nextStream(); 14630 }); 14631 14632 return active; 14633 } 14634 14635 function postscribe(el, html, options) { 14636 if (utils.isFunction(options)) { 14637 options = { done: options }; 14638 } else if (options === 'clear') { 14639 queue = []; 14640 active = null; 14641 nextId = 0; 14642 return; 14643 } 14644 14645 options = utils.defaults(options, OPTIONS); 14646 14647 // id selector 14648 if (/^#/.test(el)) { 14649 el = window.document.getElementById(el.substr(1)); 14650 } else { 14651 el = el.jquery ? el[0] : el; 14652 } 14653 14654 var args = [el, html, options]; 14655 14656 el.postscribe = { 14657 cancel: function cancel() { 14658 if (args.stream) { 14659 args.stream.abort(); 14660 } else { 14661 args[1] = doNothing; 14662 } 14663 } 14664 }; 14665 14666 options.beforeEnqueue(args); 14667 queue.push(args); 14668 14669 if (!active) { 14670 nextStream(); 14671 } 14672 14673 return el.postscribe; 14674 } 14675 14676 _extends(postscribe, { 14677 // Streams by name. 14678 streams: {}, 14679 // Queue of streams. 14680 queue: queue, 14681 // Expose internal classes. 14682 WriteStream: _writeStream2['default'] 14683 }); 14684 14685/***/ }, 14686/* 2 */ 14687/***/ function(module, exports, __webpack_require__) { 14688 14689 'use strict'; 14690 14691 exports.__esModule = true; 14692 14693 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 14694 14695 var _prescribe = __webpack_require__(3); 14696 14697 var _prescribe2 = _interopRequireDefault(_prescribe); 14698 14699 var _utils = __webpack_require__(4); 14700 14701 var utils = _interopRequireWildcard(_utils); 14702 14703 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } 14704 14705 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 14706 14707 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 14708 14709 /** 14710 * Turn on to debug how each chunk affected the DOM. 14711 * @type {boolean} 14712 */ 14713 var DEBUG_CHUNK = false; 14714 14715 /** 14716 * Prefix for data attributes on DOM elements. 14717 * @type {string} 14718 */ 14719 var BASEATTR = 'data-ps-'; 14720 14721 /** 14722 * ID for the style proxy 14723 * @type {string} 14724 */ 14725 var PROXY_STYLE = 'ps-style'; 14726 14727 /** 14728 * ID for the script proxy 14729 * @type {string} 14730 */ 14731 var PROXY_SCRIPT = 'ps-script'; 14732 14733 /** 14734 * Get data attributes 14735 * 14736 * @param {Object} el The DOM element. 14737 * @param {String} name The attribute name. 14738 * @returns {String} 14739 */ 14740 function getData(el, name) { 14741 var attr = BASEATTR + name; 14742 14743 var val = el.getAttribute(attr); 14744 14745 // IE 8 returns a number if it's a number 14746 return !utils.existy(val) ? val : String(val); 14747 } 14748 14749 /** 14750 * Set data attributes 14751 * 14752 * @param {Object} el The DOM element. 14753 * @param {String} name The attribute name. 14754 * @param {null|*} value The attribute value. 14755 */ 14756 function setData(el, name) { 14757 var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; 14758 14759 var attr = BASEATTR + name; 14760 14761 if (utils.existy(value) && value !== '') { 14762 el.setAttribute(attr, value); 14763 } else { 14764 el.removeAttribute(attr); 14765 } 14766 } 14767 14768 /** 14769 * Stream static html to an element, where "static html" denotes "html 14770 * without scripts". 14771 * 14772 * This class maintains a *history of writes devoid of any attributes* or 14773 * "proxy history". 14774 * 14775 * Injecting the proxy history into a temporary div has no side-effects, 14776 * other than to create proxy elements for previously written elements. 14777 * 14778 * Given the `staticHtml` of a new write, a `tempDiv`'s innerHTML is set to 14779 * `proxy_history + staticHtml`. 14780 * The *structure* of `tempDiv`'s contents, (i.e., the placement of new nodes 14781 * beside or inside of proxy elements), reflects the DOM structure that would 14782 * have resulted if all writes had been squashed into a single write. 14783 * 14784 * For each descendent `node` of `tempDiv` whose parentNode is a *proxy*, 14785 * `node` is appended to the corresponding *real* element within the DOM. 14786 * 14787 * Proxy elements are mapped to *actual* elements in the DOM by injecting a 14788 * `data-id` attribute into each start tag in `staticHtml`. 14789 * 14790 */ 14791 14792 var WriteStream = function () { 14793 /** 14794 * Constructor. 14795 * 14796 * @param {Object} root The root element 14797 * @param {?Object} options The options 14798 */ 14799 function WriteStream(root) { 14800 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 14801 14802 _classCallCheck(this, WriteStream); 14803 14804 this.root = root; 14805 this.options = options; 14806 this.doc = root.ownerDocument; 14807 this.win = this.doc.defaultView || this.doc.parentWindow; 14808 this.parser = new _prescribe2['default']('', { autoFix: options.autoFix }); 14809 14810 // Actual elements by id. 14811 this.actuals = [root]; 14812 14813 // Embodies the "structure" of what's been written so far, 14814 // devoid of attributes. 14815 this.proxyHistory = ''; 14816 14817 // Create a proxy of the root element. 14818 this.proxyRoot = this.doc.createElement(root.nodeName); 14819 14820 this.scriptStack = []; 14821 this.writeQueue = []; 14822 14823 setData(this.proxyRoot, 'proxyof', 0); 14824 } 14825 14826 /** 14827 * Writes the given strings. 14828 * 14829 * @param {...String} str The strings to write 14830 */ 14831 14832 14833 WriteStream.prototype.write = function write() { 14834 var _writeQueue; 14835 14836 (_writeQueue = this.writeQueue).push.apply(_writeQueue, arguments); 14837 14838 // Process writes 14839 // When new script gets pushed or pending this will stop 14840 // because new writeQueue gets pushed 14841 while (!this.deferredRemote && this.writeQueue.length) { 14842 var arg = this.writeQueue.shift(); 14843 14844 if (utils.isFunction(arg)) { 14845 this._callFunction(arg); 14846 } else { 14847 this._writeImpl(arg); 14848 } 14849 } 14850 }; 14851 14852 /** 14853 * Calls the given function. 14854 * 14855 * @param {Function} fn The function to call 14856 * @private 14857 */ 14858 14859 14860 WriteStream.prototype._callFunction = function _callFunction(fn) { 14861 var tok = { type: 'function', value: fn.name || fn.toString() }; 14862 this._onScriptStart(tok); 14863 fn.call(this.win, this.doc); 14864 this._onScriptDone(tok); 14865 }; 14866 14867 /** 14868 * The write implementation 14869 * 14870 * @param {String} html The HTML to write. 14871 * @private 14872 */ 14873 14874 14875 WriteStream.prototype._writeImpl = function _writeImpl(html) { 14876 this.parser.append(html); 14877 14878 var tok = void 0; 14879 var script = void 0; 14880 var style = void 0; 14881 var tokens = []; 14882 14883 // stop if we see a script token 14884 while ((tok = this.parser.readToken()) && !(script = utils.isScript(tok)) && !(style = utils.isStyle(tok))) { 14885 tok = this.options.beforeWriteToken(tok); 14886 14887 if (tok) { 14888 tokens.push(tok); 14889 } 14890 } 14891 14892 if (tokens.length > 0) { 14893 this._writeStaticTokens(tokens); 14894 } 14895 14896 if (script) { 14897 this._handleScriptToken(tok); 14898 } 14899 14900 if (style) { 14901 this._handleStyleToken(tok); 14902 } 14903 }; 14904 14905 /** 14906 * Write contiguous non-script tokens (a chunk) 14907 * 14908 * @param {Array<Object>} tokens The tokens 14909 * @returns {{tokens, raw, actual, proxy}|null} 14910 * @private 14911 */ 14912 14913 14914 WriteStream.prototype._writeStaticTokens = function _writeStaticTokens(tokens) { 14915 var chunk = this._buildChunk(tokens); 14916 14917 if (!chunk.actual) { 14918 // e.g., no tokens, or a noscript that got ignored 14919 return null; 14920 } 14921 14922 chunk.html = this.proxyHistory + chunk.actual; 14923 this.proxyHistory += chunk.proxy; 14924 this.proxyRoot.innerHTML = chunk.html; 14925 14926 if (DEBUG_CHUNK) { 14927 chunk.proxyInnerHTML = this.proxyRoot.innerHTML; 14928 } 14929 14930 this._walkChunk(); 14931 14932 if (DEBUG_CHUNK) { 14933 chunk.actualInnerHTML = this.root.innerHTML; 14934 } 14935 14936 return chunk; 14937 }; 14938 14939 /** 14940 * Build a chunk. 14941 * 14942 * @param {Array<Object>} tokens The tokens to use. 14943 * @returns {{tokens: *, raw: string, actual: string, proxy: string}} 14944 * @private 14945 */ 14946 14947 14948 WriteStream.prototype._buildChunk = function _buildChunk(tokens) { 14949 var nextId = this.actuals.length; 14950 14951 // The raw html of this chunk. 14952 var raw = []; 14953 14954 // The html to create the nodes in the tokens (with id's injected). 14955 var actual = []; 14956 14957 // Html that can later be used to proxy the nodes in the tokens. 14958 var proxy = []; 14959 14960 var len = tokens.length; 14961 for (var i = 0; i < len; i++) { 14962 var tok = tokens[i]; 14963 var tokenRaw = tok.toString(); 14964 14965 raw.push(tokenRaw); 14966 14967 if (tok.attrs) { 14968 // tok.attrs <==> startTag or atomicTag or cursor 14969 // Ignore noscript tags. They are atomic, so we don't have to worry about children. 14970 if (!/^noscript$/i.test(tok.tagName)) { 14971 var id = nextId++; 14972 14973 // Actual: inject id attribute: replace '>' at end of start tag with id attribute + '>' 14974 actual.push(tokenRaw.replace(/(\/?>)/, ' ' + BASEATTR + 'id=' + id + ' $1')); 14975 14976 // Don't proxy scripts: they have no bearing on DOM structure. 14977 if (tok.attrs.id !== PROXY_SCRIPT && tok.attrs.id !== PROXY_STYLE) { 14978 // Proxy: strip all attributes and inject proxyof attribute 14979 proxy.push( 14980 // ignore atomic tags (e.g., style): they have no "structural" effect 14981 tok.type === 'atomicTag' ? '' : '<' + tok.tagName + ' ' + BASEATTR + 'proxyof=' + id + (tok.unary ? ' />' : '>')); 14982 } 14983 } 14984 } else { 14985 // Visit any other type of token 14986 // Actual: append. 14987 actual.push(tokenRaw); 14988 14989 // Proxy: append endTags. Ignore everything else. 14990 proxy.push(tok.type === 'endTag' ? tokenRaw : ''); 14991 } 14992 } 14993 14994 return { 14995 tokens: tokens, 14996 raw: raw.join(''), 14997 actual: actual.join(''), 14998 proxy: proxy.join('') 14999 }; 15000 }; 15001 15002 /** 15003 * Walk the chunks. 15004 * 15005 * @private 15006 */ 15007 15008 15009 WriteStream.prototype._walkChunk = function _walkChunk() { 15010 var node = void 0; 15011 var stack = [this.proxyRoot]; 15012 15013 // use shift/unshift so that children are walked in document order 15014 while (utils.existy(node = stack.shift())) { 15015 var isElement = node.nodeType === 1; 15016 var isProxy = isElement && getData(node, 'proxyof'); 15017 15018 // Ignore proxies 15019 if (!isProxy) { 15020 if (isElement) { 15021 // New actual element: register it and remove the the id attr. 15022 this.actuals[getData(node, 'id')] = node; 15023 setData(node, 'id'); 15024 } 15025 15026 // Is node's parent a proxy? 15027 var parentIsProxyOf = node.parentNode && getData(node.parentNode, 'proxyof'); 15028 if (parentIsProxyOf) { 15029 // Move node under actual parent. 15030 this.actuals[parentIsProxyOf].appendChild(node); 15031 } 15032 } 15033 15034 // prepend childNodes to stack 15035 stack.unshift.apply(stack, utils.toArray(node.childNodes)); 15036 } 15037 }; 15038 15039 /** 15040 * Handles Script tokens 15041 * 15042 * @param {Object} tok The token 15043 */ 15044 15045 15046 WriteStream.prototype._handleScriptToken = function _handleScriptToken(tok) { 15047 var _this = this; 15048 15049 var remainder = this.parser.clear(); 15050 15051 if (remainder) { 15052 // Write remainder immediately behind this script. 15053 this.writeQueue.unshift(remainder); 15054 } 15055 15056 tok.src = tok.attrs.src || tok.attrs.SRC; 15057 15058 tok = this.options.beforeWriteToken(tok); 15059 if (!tok) { 15060 // User has removed this token 15061 return; 15062 } 15063 15064 if (tok.src && this.scriptStack.length) { 15065 // Defer this script until scriptStack is empty. 15066 // Assumption 1: This script will not start executing until 15067 // scriptStack is empty. 15068 this.deferredRemote = tok; 15069 } else { 15070 this._onScriptStart(tok); 15071 } 15072 15073 // Put the script node in the DOM. 15074 this._writeScriptToken(tok, function () { 15075 _this._onScriptDone(tok); 15076 }); 15077 }; 15078 15079 /** 15080 * Handles style tokens 15081 * 15082 * @param {Object} tok The token 15083 */ 15084 15085 15086 WriteStream.prototype._handleStyleToken = function _handleStyleToken(tok) { 15087 var remainder = this.parser.clear(); 15088 15089 if (remainder) { 15090 // Write remainder immediately behind this style. 15091 this.writeQueue.unshift(remainder); 15092 } 15093 15094 tok.type = tok.attrs.type || tok.attrs.TYPE || 'text/css'; 15095 15096 tok = this.options.beforeWriteToken(tok); 15097 15098 if (tok) { 15099 // Put the style node in the DOM. 15100 this._writeStyleToken(tok); 15101 } 15102 15103 if (remainder) { 15104 this.write(); 15105 } 15106 }; 15107 15108 /** 15109 * Build a style and insert it into the DOM. 15110 * 15111 * @param {Object} tok The token 15112 */ 15113 15114 15115 WriteStream.prototype._writeStyleToken = function _writeStyleToken(tok) { 15116 var el = this._buildStyle(tok); 15117 15118 this._insertCursor(el, PROXY_STYLE); 15119 15120 // Set content 15121 if (tok.content) { 15122 if (el.styleSheet && !el.sheet) { 15123 el.styleSheet.cssText = tok.content; 15124 } else { 15125 el.appendChild(this.doc.createTextNode(tok.content)); 15126 } 15127 } 15128 }; 15129 15130 /** 15131 * Build a style element from an atomic style token. 15132 * 15133 * @param {Object} tok The token 15134 * @returns {Element} 15135 */ 15136 15137 15138 WriteStream.prototype._buildStyle = function _buildStyle(tok) { 15139 var el = this.doc.createElement(tok.tagName); 15140 15141 el.setAttribute('type', tok.type); 15142 15143 // Set attributes 15144 utils.eachKey(tok.attrs, function (name, value) { 15145 el.setAttribute(name, value); 15146 }); 15147 15148 return el; 15149 }; 15150 15151 /** 15152 * Append a span to the stream. That span will act as a cursor 15153 * (i.e. insertion point) for the element. 15154 * 15155 * @param {Object} el The element 15156 * @param {string} which The type of proxy element 15157 */ 15158 15159 15160 WriteStream.prototype._insertCursor = function _insertCursor(el, which) { 15161 this._writeImpl('<span id="' + which + '"/>'); 15162 15163 var cursor = this.doc.getElementById(which); 15164 15165 if (cursor) { 15166 cursor.parentNode.replaceChild(el, cursor); 15167 } 15168 }; 15169 15170 /** 15171 * Called when a script is started. 15172 * 15173 * @param {Object} tok The token 15174 * @private 15175 */ 15176 15177 15178 WriteStream.prototype._onScriptStart = function _onScriptStart(tok) { 15179 tok.outerWrites = this.writeQueue; 15180 this.writeQueue = []; 15181 this.scriptStack.unshift(tok); 15182 }; 15183 15184 /** 15185 * Called when a script is done. 15186 * 15187 * @param {Object} tok The token 15188 * @private 15189 */ 15190 15191 15192 WriteStream.prototype._onScriptDone = function _onScriptDone(tok) { 15193 // Pop script and check nesting. 15194 if (tok !== this.scriptStack[0]) { 15195 this.options.error({ msg: 'Bad script nesting or script finished twice' }); 15196 return; 15197 } 15198 15199 this.scriptStack.shift(); 15200 15201 // Append outer writes to queue and process them. 15202 this.write.apply(this, tok.outerWrites); 15203 15204 // Check for pending remote 15205 15206 // Assumption 2: if remote_script1 writes remote_script2 then 15207 // the we notice remote_script1 finishes before remote_script2 starts. 15208 // I think this is equivalent to assumption 1 15209 if (!this.scriptStack.length && this.deferredRemote) { 15210 this._onScriptStart(this.deferredRemote); 15211 this.deferredRemote = null; 15212 } 15213 }; 15214 15215 /** 15216 * Build a script and insert it into the DOM. 15217 * Done is called once script has executed. 15218 * 15219 * @param {Object} tok The token 15220 * @param {Function} done The callback when complete 15221 */ 15222 15223 15224 WriteStream.prototype._writeScriptToken = function _writeScriptToken(tok, done) { 15225 var el = this._buildScript(tok); 15226 var asyncRelease = this._shouldRelease(el); 15227 var afterAsync = this.options.afterAsync; 15228 15229 if (tok.src) { 15230 // Fix for attribute "SRC" (capitalized). IE does not recognize it. 15231 el.src = tok.src; 15232 this._scriptLoadHandler(el, !asyncRelease ? function () { 15233 done(); 15234 afterAsync(); 15235 } : afterAsync); 15236 } 15237 15238 try { 15239 this._insertCursor(el, PROXY_SCRIPT); 15240 if (!el.src || asyncRelease) { 15241 done(); 15242 } 15243 } catch (e) { 15244 this.options.error(e); 15245 done(); 15246 } 15247 }; 15248 15249 /** 15250 * Build a script element from an atomic script token. 15251 * 15252 * @param {Object} tok The token 15253 * @returns {Element} 15254 */ 15255 15256 15257 WriteStream.prototype._buildScript = function _buildScript(tok) { 15258 var el = this.doc.createElement(tok.tagName); 15259 15260 // Set attributes 15261 utils.eachKey(tok.attrs, function (name, value) { 15262 el.setAttribute(name, value); 15263 }); 15264 15265 // Set content 15266 if (tok.content) { 15267 el.text = tok.content; 15268 } 15269 15270 return el; 15271 }; 15272 15273 /** 15274 * Setup the script load handler on an element. 15275 * 15276 * @param {Object} el The element 15277 * @param {Function} done The callback 15278 * @private 15279 */ 15280 15281 15282 WriteStream.prototype._scriptLoadHandler = function _scriptLoadHandler(el, done) { 15283 function cleanup() { 15284 el = el.onload = el.onreadystatechange = el.onerror = null; 15285 } 15286 15287 var error = this.options.error; 15288 15289 function success() { 15290 cleanup(); 15291 if (done != null) { 15292 done(); 15293 } 15294 done = null; 15295 } 15296 15297 function failure(err) { 15298 cleanup(); 15299 error(err); 15300 if (done != null) { 15301 done(); 15302 } 15303 done = null; 15304 } 15305 15306 function reattachEventListener(el, evt) { 15307 var handler = el['on' + evt]; 15308 if (handler != null) { 15309 el['_on' + evt] = handler; 15310 } 15311 } 15312 15313 reattachEventListener(el, 'load'); 15314 reattachEventListener(el, 'error'); 15315 15316 _extends(el, { 15317 onload: function onload() { 15318 if (el._onload) { 15319 try { 15320 el._onload.apply(this, Array.prototype.slice.call(arguments, 0)); 15321 } catch (err) { 15322 failure({ msg: 'onload handler failed ' + err + ' @ ' + el.src }); 15323 } 15324 } 15325 success(); 15326 }, 15327 onerror: function onerror() { 15328 if (el._onerror) { 15329 try { 15330 el._onerror.apply(this, Array.prototype.slice.call(arguments, 0)); 15331 } catch (err) { 15332 failure({ msg: 'onerror handler failed ' + err + ' @ ' + el.src }); 15333 return; 15334 } 15335 } 15336 failure({ msg: 'remote script failed ' + el.src }); 15337 }, 15338 onreadystatechange: function onreadystatechange() { 15339 if (/^(loaded|complete)$/.test(el.readyState)) { 15340 success(); 15341 } 15342 } 15343 }); 15344 }; 15345 15346 /** 15347 * Determines whether to release. 15348 * 15349 * @param {Object} el The element 15350 * @returns {boolean} 15351 * @private 15352 */ 15353 15354 15355 WriteStream.prototype._shouldRelease = function _shouldRelease(el) { 15356 var isScript = /^script$/i.test(el.nodeName); 15357 return !isScript || !!(this.options.releaseAsync && el.src && el.hasAttribute('async')); 15358 }; 15359 15360 return WriteStream; 15361 }(); 15362 15363 exports['default'] = WriteStream; 15364 15365/***/ }, 15366/* 3 */ 15367/***/ function(module, exports, __webpack_require__) { 15368 15369 /** 15370 * @file prescribe 15371 * @description Tiny, forgiving HTML parser 15372 * @version vundefined 15373 * @see {@link https://github.com/krux/prescribe/} 15374 * @license MIT 15375 * @author Derek Brans 15376 * @copyright 2016 Krux Digital, Inc 15377 */ 15378 (function webpackUniversalModuleDefinition(root, factory) { 15379 if(true) 15380 module.exports = factory(); 15381 else if(typeof define === 'function' && define.amd) 15382 define([], factory); 15383 else if(typeof exports === 'object') 15384 exports["Prescribe"] = factory(); 15385 else 15386 root["Prescribe"] = factory(); 15387 })(this, function() { 15388 return /******/ (function(modules) { // webpackBootstrap 15389 /******/ // The module cache 15390 /******/ var installedModules = {}; 15391 15392 /******/ // The require function 15393 /******/ function __webpack_require__(moduleId) { 15394 15395 /******/ // Check if module is in cache 15396 /******/ if(installedModules[moduleId]) 15397 /******/ return installedModules[moduleId].exports; 15398 15399 /******/ // Create a new module (and put it into the cache) 15400 /******/ var module = installedModules[moduleId] = { 15401 /******/ exports: {}, 15402 /******/ id: moduleId, 15403 /******/ loaded: false 15404 /******/ }; 15405 15406 /******/ // Execute the module function 15407 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 15408 15409 /******/ // Flag the module as loaded 15410 /******/ module.loaded = true; 15411 15412 /******/ // Return the exports of the module 15413 /******/ return module.exports; 15414 /******/ } 15415 15416 15417 /******/ // expose the modules object (__webpack_modules__) 15418 /******/ __webpack_require__.m = modules; 15419 15420 /******/ // expose the module cache 15421 /******/ __webpack_require__.c = installedModules; 15422 15423 /******/ // __webpack_public_path__ 15424 /******/ __webpack_require__.p = ""; 15425 15426 /******/ // Load entry module and return exports 15427 /******/ return __webpack_require__(0); 15428 /******/ }) 15429 /************************************************************************/ 15430 /******/ ([ 15431 /* 0 */ 15432 /***/ function(module, exports, __webpack_require__) { 15433 15434 'use strict'; 15435 15436 var _HtmlParser = __webpack_require__(1); 15437 15438 var _HtmlParser2 = _interopRequireDefault(_HtmlParser); 15439 15440 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 15441 15442 module.exports = _HtmlParser2['default']; 15443 15444 /***/ }, 15445 /* 1 */ 15446 /***/ function(module, exports, __webpack_require__) { 15447 15448 'use strict'; 15449 15450 exports.__esModule = true; 15451 15452 var _supports = __webpack_require__(2); 15453 15454 var supports = _interopRequireWildcard(_supports); 15455 15456 var _streamReaders = __webpack_require__(3); 15457 15458 var streamReaders = _interopRequireWildcard(_streamReaders); 15459 15460 var _fixedReadTokenFactory = __webpack_require__(6); 15461 15462 var _fixedReadTokenFactory2 = _interopRequireDefault(_fixedReadTokenFactory); 15463 15464 var _utils = __webpack_require__(5); 15465 15466 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 15467 15468 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } 15469 15470 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15471 15472 /** 15473 * Detection regular expressions. 15474 * 15475 * Order of detection matters: detection of one can only 15476 * succeed if detection of previous didn't 15477 15478 * @type {Object} 15479 */ 15480 var detect = { 15481 comment: /^<!--/, 15482 endTag: /^<\//, 15483 atomicTag: /^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i, 15484 startTag: /^</, 15485 chars: /^[^<]/ 15486 }; 15487 15488 /** 15489 * HtmlParser provides the capability to parse HTML and return tokens 15490 * representing the tags and content. 15491 */ 15492 15493 var HtmlParser = function () { 15494 /** 15495 * Constructor. 15496 * 15497 * @param {string} stream The initial parse stream contents. 15498 * @param {Object} options The options 15499 * @param {boolean} options.autoFix Set to true to automatically fix errors 15500 */ 15501 function HtmlParser() { 15502 var _this = this; 15503 15504 var stream = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; 15505 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 15506 15507 _classCallCheck(this, HtmlParser); 15508 15509 this.stream = stream; 15510 15511 var fix = false; 15512 var fixedTokenOptions = {}; 15513 15514 for (var key in supports) { 15515 if (supports.hasOwnProperty(key)) { 15516 if (options.autoFix) { 15517 fixedTokenOptions[key + 'Fix'] = true; // !supports[key]; 15518 } 15519 fix = fix || fixedTokenOptions[key + 'Fix']; 15520 } 15521 } 15522 15523 if (fix) { 15524 this._readToken = (0, _fixedReadTokenFactory2['default'])(this, fixedTokenOptions, function () { 15525 return _this._readTokenImpl(); 15526 }); 15527 this._peekToken = (0, _fixedReadTokenFactory2['default'])(this, fixedTokenOptions, function () { 15528 return _this._peekTokenImpl(); 15529 }); 15530 } else { 15531 this._readToken = this._readTokenImpl; 15532 this._peekToken = this._peekTokenImpl; 15533 } 15534 } 15535 15536 /** 15537 * Appends the given string to the parse stream. 15538 * 15539 * @param {string} str The string to append 15540 */ 15541 15542 15543 HtmlParser.prototype.append = function append(str) { 15544 this.stream += str; 15545 }; 15546 15547 /** 15548 * Prepends the given string to the parse stream. 15549 * 15550 * @param {string} str The string to prepend 15551 */ 15552 15553 15554 HtmlParser.prototype.prepend = function prepend(str) { 15555 this.stream = str + this.stream; 15556 }; 15557 15558 /** 15559 * The implementation of the token reading. 15560 * 15561 * @private 15562 * @returns {?Token} 15563 */ 15564 15565 15566 HtmlParser.prototype._readTokenImpl = function _readTokenImpl() { 15567 var token = this._peekTokenImpl(); 15568 if (token) { 15569 this.stream = this.stream.slice(token.length); 15570 return token; 15571 } 15572 }; 15573 15574 /** 15575 * The implementation of token peeking. 15576 * 15577 * @returns {?Token} 15578 */ 15579 15580 15581 HtmlParser.prototype._peekTokenImpl = function _peekTokenImpl() { 15582 for (var type in detect) { 15583 if (detect.hasOwnProperty(type)) { 15584 if (detect[type].test(this.stream)) { 15585 var token = streamReaders[type](this.stream); 15586 15587 if (token) { 15588 if (token.type === 'startTag' && /script|style/i.test(token.tagName)) { 15589 return null; 15590 } else { 15591 token.text = this.stream.substr(0, token.length); 15592 return token; 15593 } 15594 } 15595 } 15596 } 15597 } 15598 }; 15599 15600 /** 15601 * The public token peeking interface. Delegates to the basic token peeking 15602 * or a version that performs fixups depending on the `autoFix` setting in 15603 * options. 15604 * 15605 * @returns {object} 15606 */ 15607 15608 15609 HtmlParser.prototype.peekToken = function peekToken() { 15610 return this._peekToken(); 15611 }; 15612 15613 /** 15614 * The public token reading interface. Delegates to the basic token reading 15615 * or a version that performs fixups depending on the `autoFix` setting in 15616 * options. 15617 * 15618 * @returns {object} 15619 */ 15620 15621 15622 HtmlParser.prototype.readToken = function readToken() { 15623 return this._readToken(); 15624 }; 15625 15626 /** 15627 * Read tokens and hand to the given handlers. 15628 * 15629 * @param {Object} handlers The handlers to use for the different tokens. 15630 */ 15631 15632 15633 HtmlParser.prototype.readTokens = function readTokens(handlers) { 15634 var tok = void 0; 15635 while (tok = this.readToken()) { 15636 // continue until we get an explicit "false" return 15637 if (handlers[tok.type] && handlers[tok.type](tok) === false) { 15638 return; 15639 } 15640 } 15641 }; 15642 15643 /** 15644 * Clears the parse stream. 15645 * 15646 * @returns {string} The contents of the parse stream before clearing. 15647 */ 15648 15649 15650 HtmlParser.prototype.clear = function clear() { 15651 var rest = this.stream; 15652 this.stream = ''; 15653 return rest; 15654 }; 15655 15656 /** 15657 * Returns the rest of the parse stream. 15658 * 15659 * @returns {string} The contents of the parse stream. 15660 */ 15661 15662 15663 HtmlParser.prototype.rest = function rest() { 15664 return this.stream; 15665 }; 15666 15667 return HtmlParser; 15668 }(); 15669 15670 exports['default'] = HtmlParser; 15671 15672 15673 HtmlParser.tokenToString = function (tok) { 15674 return tok.toString(); 15675 }; 15676 15677 HtmlParser.escapeAttributes = function (attrs) { 15678 var escapedAttrs = {}; 15679 15680 for (var name in attrs) { 15681 if (attrs.hasOwnProperty(name)) { 15682 escapedAttrs[name] = (0, _utils.escapeQuotes)(attrs[name], null); 15683 } 15684 } 15685 15686 return escapedAttrs; 15687 }; 15688 15689 HtmlParser.supports = supports; 15690 15691 for (var key in supports) { 15692 if (supports.hasOwnProperty(key)) { 15693 HtmlParser.browserHasFlaw = HtmlParser.browserHasFlaw || !supports[key] && key; 15694 } 15695 } 15696 15697 /***/ }, 15698 /* 2 */ 15699 /***/ function(module, exports) { 15700 15701 'use strict'; 15702 15703 exports.__esModule = true; 15704 var tagSoup = false; 15705 var selfClose = false; 15706 15707 var work = window.document.createElement('div'); 15708 15709 try { 15710 var html = '<P><I></P></I>'; 15711 work.innerHTML = html; 15712 exports.tagSoup = tagSoup = work.innerHTML !== html; 15713 } catch (e) { 15714 exports.tagSoup = tagSoup = false; 15715 } 15716 15717 try { 15718 work.innerHTML = '<P><i><P></P></i></P>'; 15719 exports.selfClose = selfClose = work.childNodes.length === 2; 15720 } catch (e) { 15721 exports.selfClose = selfClose = false; 15722 } 15723 15724 work = null; 15725 15726 exports.tagSoup = tagSoup; 15727 exports.selfClose = selfClose; 15728 15729 /***/ }, 15730 /* 3 */ 15731 /***/ function(module, exports, __webpack_require__) { 15732 15733 'use strict'; 15734 15735 exports.__esModule = true; 15736 15737 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 15738 15739 exports.comment = comment; 15740 exports.chars = chars; 15741 exports.startTag = startTag; 15742 exports.atomicTag = atomicTag; 15743 exports.endTag = endTag; 15744 15745 var _tokens = __webpack_require__(4); 15746 15747 /** 15748 * Regular Expressions for parsing tags and attributes 15749 * 15750 * @type {Object} 15751 */ 15752 var REGEXES = { 15753 startTag: /^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, 15754 endTag: /^<\/([\-A-Za-z0-9_]+)[^>]*>/, 15755 attr: /(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g, 15756 fillAttr: /^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i 15757 }; 15758 15759 /** 15760 * Reads a comment token 15761 * 15762 * @param {string} stream The input stream 15763 * @returns {CommentToken} 15764 */ 15765 function comment(stream) { 15766 var index = stream.indexOf('-->'); 15767 if (index >= 0) { 15768 return new _tokens.CommentToken(stream.substr(4, index - 1), index + 3); 15769 } 15770 } 15771 15772 /** 15773 * Reads non-tag characters. 15774 * 15775 * @param {string} stream The input stream 15776 * @returns {CharsToken} 15777 */ 15778 function chars(stream) { 15779 var index = stream.indexOf('<'); 15780 return new _tokens.CharsToken(index >= 0 ? index : stream.length); 15781 } 15782 15783 /** 15784 * Reads start tag token. 15785 * 15786 * @param {string} stream The input stream 15787 * @returns {StartTagToken} 15788 */ 15789 function startTag(stream) { 15790 var endTagIndex = stream.indexOf('>'); 15791 if (endTagIndex !== -1) { 15792 var match = stream.match(REGEXES.startTag); 15793 if (match) { 15794 var _ret = function () { 15795 var attrs = {}; 15796 var booleanAttrs = {}; 15797 var rest = match[2]; 15798 15799 match[2].replace(REGEXES.attr, function (match, name) { 15800 if (!(arguments[2] || arguments[3] || arguments[4] || arguments[5])) { 15801 attrs[name] = ''; 15802 } else if (arguments[5]) { 15803 attrs[arguments[5]] = ''; 15804 booleanAttrs[arguments[5]] = true; 15805 } else { 15806 attrs[name] = arguments[2] || arguments[3] || arguments[4] || REGEXES.fillAttr.test(name) && name || ''; 15807 } 15808 15809 rest = rest.replace(match, ''); 15810 }); 15811 15812 return { 15813 v: new _tokens.StartTagToken(match[1], match[0].length, attrs, booleanAttrs, !!match[3], rest.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '')) 15814 }; 15815 }(); 15816 15817 if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; 15818 } 15819 } 15820 } 15821 15822 /** 15823 * Reads atomic tag token. 15824 * 15825 * @param {string} stream The input stream 15826 * @returns {AtomicTagToken} 15827 */ 15828 function atomicTag(stream) { 15829 var start = startTag(stream); 15830 if (start) { 15831 var rest = stream.slice(start.length); 15832 // for optimization, we check first just for the end tag 15833 if (rest.match(new RegExp('<\/\\s*' + start.tagName + '\\s*>', 'i'))) { 15834 // capturing the content is inefficient, so we do it inside the if 15835 var match = rest.match(new RegExp('([\\s\\S]*?)<\/\\s*' + start.tagName + '\\s*>', 'i')); 15836 if (match) { 15837 return new _tokens.AtomicTagToken(start.tagName, match[0].length + start.length, start.attrs, start.booleanAttrs, match[1]); 15838 } 15839 } 15840 } 15841 } 15842 15843 /** 15844 * Reads an end tag token. 15845 * 15846 * @param {string} stream The input stream 15847 * @returns {EndTagToken} 15848 */ 15849 function endTag(stream) { 15850 var match = stream.match(REGEXES.endTag); 15851 if (match) { 15852 return new _tokens.EndTagToken(match[1], match[0].length); 15853 } 15854 } 15855 15856 /***/ }, 15857 /* 4 */ 15858 /***/ function(module, exports, __webpack_require__) { 15859 15860 'use strict'; 15861 15862 exports.__esModule = true; 15863 exports.EndTagToken = exports.AtomicTagToken = exports.StartTagToken = exports.TagToken = exports.CharsToken = exports.CommentToken = exports.Token = undefined; 15864 15865 var _utils = __webpack_require__(5); 15866 15867 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15868 15869 /** 15870 * Token is a base class for all token types parsed. Note we don't actually 15871 * use intheritance due to IE8's non-existent ES5 support. 15872 */ 15873 var Token = 15874 /** 15875 * Constructor. 15876 * 15877 * @param {string} type The type of the Token. 15878 * @param {Number} length The length of the Token text. 15879 */ 15880 exports.Token = function Token(type, length) { 15881 _classCallCheck(this, Token); 15882 15883 this.type = type; 15884 this.length = length; 15885 this.text = ''; 15886 }; 15887 15888 /** 15889 * CommentToken represents comment tags. 15890 */ 15891 15892 15893 var CommentToken = exports.CommentToken = function () { 15894 /** 15895 * Constructor. 15896 * 15897 * @param {string} content The content of the comment 15898 * @param {Number} length The length of the Token text. 15899 */ 15900 function CommentToken(content, length) { 15901 _classCallCheck(this, CommentToken); 15902 15903 this.type = 'comment'; 15904 this.length = length || (content ? content.length : 0); 15905 this.text = ''; 15906 this.content = content; 15907 } 15908 15909 CommentToken.prototype.toString = function toString() { 15910 return '<!--' + this.content; 15911 }; 15912 15913 return CommentToken; 15914 }(); 15915 15916 /** 15917 * CharsToken represents non-tag characters. 15918 */ 15919 15920 15921 var CharsToken = exports.CharsToken = function () { 15922 /** 15923 * Constructor. 15924 * 15925 * @param {Number} length The length of the Token text. 15926 */ 15927 function CharsToken(length) { 15928 _classCallCheck(this, CharsToken); 15929 15930 this.type = 'chars'; 15931 this.length = length; 15932 this.text = ''; 15933 } 15934 15935 CharsToken.prototype.toString = function toString() { 15936 return this.text; 15937 }; 15938 15939 return CharsToken; 15940 }(); 15941 15942 /** 15943 * TagToken is a base class for all tag-based Tokens. 15944 */ 15945 15946 15947 var TagToken = exports.TagToken = function () { 15948 /** 15949 * Constructor. 15950 * 15951 * @param {string} type The type of the token. 15952 * @param {string} tagName The tag name. 15953 * @param {Number} length The length of the Token text. 15954 * @param {Object} attrs The dictionary of attributes and values 15955 * @param {Object} booleanAttrs If an entry has 'true' then the attribute 15956 * is a boolean attribute 15957 */ 15958 function TagToken(type, tagName, length, attrs, booleanAttrs) { 15959 _classCallCheck(this, TagToken); 15960 15961 this.type = type; 15962 this.length = length; 15963 this.text = ''; 15964 this.tagName = tagName; 15965 this.attrs = attrs; 15966 this.booleanAttrs = booleanAttrs; 15967 this.unary = false; 15968 this.html5Unary = false; 15969 } 15970 15971 /** 15972 * Formats the given token tag. 15973 * 15974 * @param {TagToken} tok The TagToken to format. 15975 * @param {?string} [content=null] The content of the token. 15976 * @returns {string} The formatted tag. 15977 */ 15978 15979 15980 TagToken.formatTag = function formatTag(tok) { 15981 var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; 15982 15983 var str = '<' + tok.tagName; 15984 for (var key in tok.attrs) { 15985 if (tok.attrs.hasOwnProperty(key)) { 15986 str += ' ' + key; 15987 15988 var val = tok.attrs[key]; 15989 if (typeof tok.booleanAttrs === 'undefined' || typeof tok.booleanAttrs[key] === 'undefined') { 15990 str += '="' + (0, _utils.escapeQuotes)(val) + '"'; 15991 } 15992 } 15993 } 15994 15995 if (tok.rest) { 15996 str += ' ' + tok.rest; 15997 } 15998 15999 if (tok.unary && !tok.html5Unary) { 16000 str += '/>'; 16001 } else { 16002 str += '>'; 16003 } 16004 16005 if (content !== undefined && content !== null) { 16006 str += content + '</' + tok.tagName + '>'; 16007 } 16008 16009 return str; 16010 }; 16011 16012 return TagToken; 16013 }(); 16014 16015 /** 16016 * StartTagToken represents a start token. 16017 */ 16018 16019 16020 var StartTagToken = exports.StartTagToken = function () { 16021 /** 16022 * Constructor. 16023 * 16024 * @param {string} tagName The tag name. 16025 * @param {Number} length The length of the Token text 16026 * @param {Object} attrs The dictionary of attributes and values 16027 * @param {Object} booleanAttrs If an entry has 'true' then the attribute 16028 * is a boolean attribute 16029 * @param {boolean} unary True if the tag is a unary tag 16030 * @param {string} rest The rest of the content. 16031 */ 16032 function StartTagToken(tagName, length, attrs, booleanAttrs, unary, rest) { 16033 _classCallCheck(this, StartTagToken); 16034 16035 this.type = 'startTag'; 16036 this.length = length; 16037 this.text = ''; 16038 this.tagName = tagName; 16039 this.attrs = attrs; 16040 this.booleanAttrs = booleanAttrs; 16041 this.html5Unary = false; 16042 this.unary = unary; 16043 this.rest = rest; 16044 } 16045 16046 StartTagToken.prototype.toString = function toString() { 16047 return TagToken.formatTag(this); 16048 }; 16049 16050 return StartTagToken; 16051 }(); 16052 16053 /** 16054 * AtomicTagToken represents an atomic tag. 16055 */ 16056 16057 16058 var AtomicTagToken = exports.AtomicTagToken = function () { 16059 /** 16060 * Constructor. 16061 * 16062 * @param {string} tagName The name of the tag. 16063 * @param {Number} length The length of the tag text. 16064 * @param {Object} attrs The attributes. 16065 * @param {Object} booleanAttrs If an entry has 'true' then the attribute 16066 * is a boolean attribute 16067 * @param {string} content The content of the tag. 16068 */ 16069 function AtomicTagToken(tagName, length, attrs, booleanAttrs, content) { 16070 _classCallCheck(this, AtomicTagToken); 16071 16072 this.type = 'atomicTag'; 16073 this.length = length; 16074 this.text = ''; 16075 this.tagName = tagName; 16076 this.attrs = attrs; 16077 this.booleanAttrs = booleanAttrs; 16078 this.unary = false; 16079 this.html5Unary = false; 16080 this.content = content; 16081 } 16082 16083 AtomicTagToken.prototype.toString = function toString() { 16084 return TagToken.formatTag(this, this.content); 16085 }; 16086 16087 return AtomicTagToken; 16088 }(); 16089 16090 /** 16091 * EndTagToken represents an end tag. 16092 */ 16093 16094 16095 var EndTagToken = exports.EndTagToken = function () { 16096 /** 16097 * Constructor. 16098 * 16099 * @param {string} tagName The name of the tag. 16100 * @param {Number} length The length of the tag text. 16101 */ 16102 function EndTagToken(tagName, length) { 16103 _classCallCheck(this, EndTagToken); 16104 16105 this.type = 'endTag'; 16106 this.length = length; 16107 this.text = ''; 16108 this.tagName = tagName; 16109 } 16110 16111 EndTagToken.prototype.toString = function toString() { 16112 return '</' + this.tagName + '>'; 16113 }; 16114 16115 return EndTagToken; 16116 }(); 16117 16118 /***/ }, 16119 /* 5 */ 16120 /***/ function(module, exports) { 16121 16122 'use strict'; 16123 16124 exports.__esModule = true; 16125 exports.escapeQuotes = escapeQuotes; 16126 16127 /** 16128 * Escape quotes in the given value. 16129 * 16130 * @param {string} value The value to escape. 16131 * @param {string} [defaultValue=''] The default value to return if value is falsy. 16132 * @returns {string} 16133 */ 16134 function escapeQuotes(value) { 16135 var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; 16136 16137 // There's no lookback in JS, so /(^|[^\\])"/ only matches the first of two `"`s. 16138 // Instead, just match anything before a double-quote and escape if it's not already escaped. 16139 return !value ? defaultValue : value.replace(/([^"]*)"/g, function (_, prefix) { 16140 return (/\\/.test(prefix) ? prefix + '"' : prefix + '\\"' 16141 ); 16142 }); 16143 } 16144 16145 /***/ }, 16146 /* 6 */ 16147 /***/ function(module, exports) { 16148 16149 'use strict'; 16150 16151 exports.__esModule = true; 16152 exports['default'] = fixedReadTokenFactory; 16153 /** 16154 * Empty Elements - HTML 4.01 16155 * 16156 * @type {RegExp} 16157 */ 16158 var EMPTY = /^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i; 16159 16160 /** 16161 * Elements that you can intentionally leave open (and which close themselves) 16162 * 16163 * @type {RegExp} 16164 */ 16165 var CLOSESELF = /^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i; 16166 16167 /** 16168 * Corrects a token. 16169 * 16170 * @param {Token} tok The token to correct 16171 * @returns {Token} The corrected token 16172 */ 16173 function correct(tok) { 16174 if (tok && tok.type === 'startTag') { 16175 tok.unary = EMPTY.test(tok.tagName) || tok.unary; 16176 tok.html5Unary = !/\/>$/.test(tok.text); 16177 } 16178 return tok; 16179 } 16180 16181 /** 16182 * Peeks at the next token in the parser. 16183 * 16184 * @param {HtmlParser} parser The parser 16185 * @param {Function} readTokenImpl The underlying readToken implementation 16186 * @returns {Token} The next token 16187 */ 16188 function peekToken(parser, readTokenImpl) { 16189 var tmp = parser.stream; 16190 var tok = correct(readTokenImpl()); 16191 parser.stream = tmp; 16192 return tok; 16193 } 16194 16195 /** 16196 * Closes the last token. 16197 * 16198 * @param {HtmlParser} parser The parser 16199 * @param {Array<Token>} stack The stack 16200 */ 16201 function closeLast(parser, stack) { 16202 var tok = stack.pop(); 16203 16204 // prepend close tag to stream. 16205 parser.prepend('</' + tok.tagName + '>'); 16206 } 16207 16208 /** 16209 * Create a new token stack. 16210 * 16211 * @returns {Array<Token>} 16212 */ 16213 function newStack() { 16214 var stack = []; 16215 16216 stack.last = function () { 16217 return this[this.length - 1]; 16218 }; 16219 16220 stack.lastTagNameEq = function (tagName) { 16221 var last = this.last(); 16222 return last && last.tagName && last.tagName.toUpperCase() === tagName.toUpperCase(); 16223 }; 16224 16225 stack.containsTagName = function (tagName) { 16226 for (var i = 0, tok; tok = this[i]; i++) { 16227 if (tok.tagName === tagName) { 16228 return true; 16229 } 16230 } 16231 return false; 16232 }; 16233 16234 return stack; 16235 } 16236 16237 /** 16238 * Return a readToken implementation that fixes input. 16239 * 16240 * @param {HtmlParser} parser The parser 16241 * @param {Object} options Options for fixing 16242 * @param {boolean} options.tagSoupFix True to fix tag soup scenarios 16243 * @param {boolean} options.selfCloseFix True to fix self-closing tags 16244 * @param {Function} readTokenImpl The underlying readToken implementation 16245 * @returns {Function} 16246 */ 16247 function fixedReadTokenFactory(parser, options, readTokenImpl) { 16248 var stack = newStack(); 16249 16250 var handlers = { 16251 startTag: function startTag(tok) { 16252 var tagName = tok.tagName; 16253 16254 if (tagName.toUpperCase() === 'TR' && stack.lastTagNameEq('TABLE')) { 16255 parser.prepend('<TBODY>'); 16256 prepareNextToken(); 16257 } else if (options.selfCloseFix && CLOSESELF.test(tagName) && stack.containsTagName(tagName)) { 16258 if (stack.lastTagNameEq(tagName)) { 16259 closeLast(parser, stack); 16260 } else { 16261 parser.prepend('</' + tok.tagName + '>'); 16262 prepareNextToken(); 16263 } 16264 } else if (!tok.unary) { 16265 stack.push(tok); 16266 } 16267 }, 16268 endTag: function endTag(tok) { 16269 var last = stack.last(); 16270 if (last) { 16271 if (options.tagSoupFix && !stack.lastTagNameEq(tok.tagName)) { 16272 // cleanup tag soup 16273 closeLast(parser, stack); 16274 } else { 16275 stack.pop(); 16276 } 16277 } else if (options.tagSoupFix) { 16278 // cleanup tag soup part 2: skip this token 16279 readTokenImpl(); 16280 prepareNextToken(); 16281 } 16282 } 16283 }; 16284 16285 function prepareNextToken() { 16286 var tok = peekToken(parser, readTokenImpl); 16287 if (tok && handlers[tok.type]) { 16288 handlers[tok.type](tok); 16289 } 16290 } 16291 16292 return function fixedReadToken() { 16293 prepareNextToken(); 16294 return correct(readTokenImpl()); 16295 }; 16296 } 16297 16298 /***/ } 16299 /******/ ]) 16300 }); 16301 ; 16302 16303/***/ }, 16304/* 4 */ 16305/***/ function(module, exports) { 16306 16307 'use strict'; 16308 16309 exports.__esModule = true; 16310 16311 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 16312 16313 exports.existy = existy; 16314 exports.isFunction = isFunction; 16315 exports.each = each; 16316 exports.eachKey = eachKey; 16317 exports.defaults = defaults; 16318 exports.toArray = toArray; 16319 exports.last = last; 16320 exports.isTag = isTag; 16321 exports.isScript = isScript; 16322 exports.isStyle = isStyle; 16323 /** 16324 * Determine if the thing is not undefined and not null. 16325 * 16326 * @param {*} thing The thing to test 16327 * @returns {boolean} True if the thing is not undefined and not null. 16328 */ 16329 function existy(thing) { 16330 return thing !== void 0 && thing !== null; 16331 } 16332 16333 /** 16334 * Is this a function? 16335 * 16336 * @param {*} x The variable to test 16337 * @returns {boolean} True if the variable is a function 16338 */ 16339 function isFunction(x) { 16340 return 'function' === typeof x; 16341 } 16342 16343 /** 16344 * Loop over each item in an array-like value. 16345 * 16346 * @param {Array<*>} arr The array to loop over 16347 * @param {Function} fn The function to call 16348 * @param {?Object} target The object to bind to the function 16349 */ 16350 function each(arr, fn, target) { 16351 var i = void 0; 16352 var len = arr && arr.length || 0; 16353 for (i = 0; i < len; i++) { 16354 fn.call(target, arr[i], i); 16355 } 16356 } 16357 16358 /** 16359 * Loop over each key/value pair in a hash. 16360 * 16361 * @param {Object} obj The object 16362 * @param {Function} fn The function to call 16363 * @param {?Object} target The object to bind to the function 16364 */ 16365 function eachKey(obj, fn, target) { 16366 for (var key in obj) { 16367 if (obj.hasOwnProperty(key)) { 16368 fn.call(target, key, obj[key]); 16369 } 16370 } 16371 } 16372 16373 /** 16374 * Set default options where some option was not specified. 16375 * 16376 * @param {Object} options The destination 16377 * @param {Object} _defaults The defaults 16378 * @returns {Object} 16379 */ 16380 function defaults(options, _defaults) { 16381 options = options || {}; 16382 eachKey(_defaults, function (key, val) { 16383 if (!existy(options[key])) { 16384 options[key] = val; 16385 } 16386 }); 16387 return options; 16388 } 16389 16390 /** 16391 * Convert value (e.g., a NodeList) to an array. 16392 * 16393 * @param {*} obj The object 16394 * @returns {Array<*>} 16395 */ 16396 function toArray(obj) { 16397 try { 16398 return Array.prototype.slice.call(obj); 16399 } catch (e) { 16400 var _ret = function () { 16401 var ret = []; 16402 each(obj, function (val) { 16403 ret.push(val); 16404 }); 16405 return { 16406 v: ret 16407 }; 16408 }(); 16409 16410 if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; 16411 } 16412 } 16413 16414 /** 16415 * Get the last item in an array 16416 * 16417 * @param {Array<*>} array The array 16418 * @returns {*} The last item in the array 16419 */ 16420 function last(array) { 16421 return array[array.length - 1]; 16422 } 16423 16424 /** 16425 * Test if token is a script tag. 16426 * 16427 * @param {Object} tok The token 16428 * @param {String} tag The tag name 16429 * @returns {boolean} True if the token is a script tag 16430 */ 16431 function isTag(tok, tag) { 16432 return !tok || !(tok.type === 'startTag' || tok.type === 'atomicTag') || !('tagName' in tok) ? !1 : !!~tok.tagName.toLowerCase().indexOf(tag); 16433 } 16434 16435 /** 16436 * Test if token is a script tag. 16437 * 16438 * @param {Object} tok The token 16439 * @returns {boolean} True if the token is a script tag 16440 */ 16441 function isScript(tok) { 16442 return isTag(tok, 'script'); 16443 } 16444 16445 /** 16446 * Test if token is a style tag. 16447 * 16448 * @param {Object} tok The token 16449 * @returns {boolean} True if the token is a style tag 16450 */ 16451 function isStyle(tok) { 16452 return isTag(tok, 'style'); 16453 } 16454 16455/***/ } 16456/******/ ]) 16457}); 16458; 16459//# sourceMappingURL=postscribe.js.map
16460 } 16461 16462 }, 16463 "core/src/lib/actions/helpers/unescapeHtmlCode.js": { 16464 "script": function(module, exports, require, turbine) { 16465/* 16466Copyright 2020 Adobe. All rights reserved. 16467This file is licensed to you under the Apache License, Version 2.0 (the "License"); 16468you may not use this file except in compliance with the License. You may obtain a copy 16469of the License at http://www.apache.org/licenses/LICENSE-2.0 16470Unless required by applicable law or agreed to in writing, software distributed under 16471the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16472OF ANY KIND, either express or implied. See the License for the specific language 16473governing permissions and limitations under the License. 16474*/ 16475 16476'use strict'; 16477 16478var document = require('@adobe/reactor-document'); 16479var el = document.createElement('div'); 16480 16481module.exports = function (html) { 16482 el.innerHTML = html; 16483 16484 // IE and Firefox differ. 16485 return el.textContent || el.innerText || html; 16486}; 16487 16488 } 16489 16490 }, 16491 "core/src/lib/helpers/findPageScript.js": { 16492 "script": function(module, exports, require, turbine) { 16493/*************************************************************************************** 16494 * Copyright 2021 Adobe. All rights reserved. 16495 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 16496 * you may not use this file except in compliance with the License. You may obtain a copy 16497 * of the License at http://www.apache.org/licenses/LICENSE-2.0 16498 * 16499 * Unless required by applicable law or agreed to in writing, software distributed under 16500 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16501 * OF ANY KIND, either express or implied. See the License for the specific language 16502 * governing permissions and limitations under the License. 16503 ****************************************************************************************/ 16504 16505'use strict'; 16506 16507var document = require('@adobe/reactor-document'); 16508 16509var byRegexPattern = function (regexScriptSrcPattern) { 16510 var scripts = document.querySelectorAll('script'); 16511 16512 for (var i = 0; i < scripts.length; i++) { 16513 var script = scripts[i]; 16514 // Find the script that loaded our library. Take into account embed scripts migrated 16515 // from DTM. We'll also consider that they may have added a querystring for cache-busting 16516 // or whatever. 16517 if (regexScriptSrcPattern.test(script.src)) { 16518 return script; 16519 } 16520 } 16521}; 16522 16523var getTurbine = function () { 16524 return byRegexPattern(new RegExp(/(launch|satelliteLib)-[^\/]+.js(\?.*)?$/)); 16525}; 16526 16527module.exports = { 16528 getTurbine: getTurbine, 16529 byRegexPattern: byRegexPattern 16530}; 16531 16532 } 16533 16534 }, 16535 "core/src/lib/actions/helpers/decorators/decorateGlobalJavaScriptCode.js": { 16536 "script": function(module, exports, require, turbine) { 16537/* 16538Copyright 2020 Adobe. All rights reserved. 16539This file is licensed to you under the Apache License, Version 2.0 (the "License"); 16540you may not use this file except in compliance with the License. You may obtain a copy 16541of the License at http://www.apache.org/licenses/LICENSE-2.0 16542Unless required by applicable law or agreed to in writing, software distributed under 16543the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16544OF ANY KIND, either express or implied. See the License for the specific language 16545governing permissions and limitations under the License. 16546*/ 16547'use strict'; 16548 16549var Promise = require('@adobe/reactor-promise'); 16550 16551module.exports = function (_, source) { 16552 // The line break after the source is important in case their last line of code is a comment. 16553 return { 16554 code: '<scr' + 'ipt>\n' + source + '\n</scr' + 'ipt>', 16555 promise: Promise.resolve() 16556 }; 16557}; 16558 16559 } 16560 16561 }, 16562 "core/src/lib/actions/helpers/decorators/decorateNonGlobalJavaScriptCode.js": { 16563 "script": function(module, exports, require, turbine) { 16564/* 16565Copyright 2020 Adobe. All rights reserved. 16566This file is licensed to you under the Apache License, Version 2.0 (the "License"); 16567you may not use this file except in compliance with the License. You may obtain a copy 16568of the License at http://www.apache.org/licenses/LICENSE-2.0 16569Unless required by applicable law or agreed to in writing, softw
16569are distributed under 16570the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16571OF ANY KIND, either express or implied. See the License for the specific language 16572governing permissions and limitations under the License. 16573*/ 16574'use strict'; 16575 16576var Promise = require('@adobe/reactor-promise'); 16577var id = 0; 16578 16579module.exports = function (action, source) { 16580 var runScriptFnName = '_runScript' + ++id; 16581 16582 var promise = new Promise(function (resolve, reject) { 16583 _satellite[runScriptFnName] = function (fn) { 16584 delete _satellite[runScriptFnName]; 16585 16586 // Use Promise constructor instead of Promise.resolve() so we can 16587 // catch errors from custom code. 16588 new Promise(function (_resolve) { 16589 _resolve( 16590 fn.call( 16591 action.event.element, 16592 action.event, 16593 action.event.target, 16594 Promise 16595 ) 16596 ); 16597 }).then(resolve, reject); 16598 }; 16599 }); 16600 16601 // The line break after the source is important in case their last line of code is a comment. 16602 var code = 16603 '<scr' + 16604 'ipt>_satellite["' + 16605 runScriptFnName + 16606 '"](function(event, target, Promise) {\n' + 16607 source + 16608 '\n});</scr' + 16609 'ipt>'; 16610 16611 return { 16612 code: code, 16613 promise: promise 16614 }; 16615}; 16616 16617 } 16618 16619 }, 16620 "core/src/lib/actions/helpers/decorators/decorateHtmlCode.js": { 16621 "script": function(module, exports, require, turbine) { 16622/*************************************************************************************** 16623 * Copyright 2019 Adobe. All rights reserved. 16624 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 16625 * you may not use this file except in compliance with the License. You may obtain a copy 16626 * of the License at http://www.apache.org/licenses/LICENSE-2.0 16627 * 16628 * Unless required by applicable law or agreed to in writing, software distributed under 16629 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16630 * OF ANY KIND, either express or implied. See the License for the specific language 16631 * governing permissions and limitations under the License. 16632 ****************************************************************************************/ 16633 16634'use strict'; 16635 16636var Promise = require('@adobe/reactor-promise'); 16637 16638var callbackId = 0; 16639var htmlCodePromises = {}; 16640 16641window._satellite = window._satellite || {}; 16642 16643/** 16644 * Public function intended to be called by the user. 16645 * @param {number} callbackId The identifier passed to _satellite._onCustomCodeSuccess(). 16646 */ 16647window._satellite._onCustomCodeSuccess = function (callbackId) { 16648 var promiseHandlers = htmlCodePromises[callbackId]; 16649 if (!promiseHandlers) { 16650 return; 16651 } 16652 16653 delete htmlCodePromises[callbackId]; 16654 promiseHandlers.resolve(); 16655}; 16656 16657/** 16658 * Public function intended to be called by the user. 16659 * @param {number} callbackId The identifier passed to _satellite._onCustomCodeSuccess(). 16660 */ 16661window._satellite._onCustomCodeFailure = function (callbackId) { 16662 var promiseHandlers = htmlCodePromises[callbackId]; 16663 if (!promiseHandlers) { 16664 return; 16665 } 16666 16667 delete htmlCodePromises[callbackId]; 16668 promiseHandlers.reject(); 16669}; 16670 16671var reactorCallbackIdShouldBeReplaced = function (source) { 16672 return source.indexOf('${reactorCallbackId}') !== -1; 16673}; 16674 16675var replaceCallbacksIds = function (source, callbackId) { 16676 return source.replace(/\${reactorCallbackId}/g, callbackId); 16677}; 16678 16679var isSourceLoadedFromFile = function (action) { 16680 return action.settings.isExternal; 16681}; 16682 16683module.exports = function (action, source) { 16684 // We need to replace tokens only for sources loaded from external files. The sources from 16685 // inside the container are automatically taken care by Turbine. 16686 if (isSourceLoadedFromFile(action)) { 16687 source = turbine.replaceTokens(source, action.event); 16688 } 16689 16690 var promise; 16691 16692 if (reactorCallbackIdShouldBeReplaced(source)) { 16693 promise = new Promise(function (resolve, reject) { 16694 htmlCodePromises[String(callbackId)] = { 16695 resolve: resolve, 16696 reject: reject 16697 }; 16698 }); 16699 16700 source = replaceCallbacksIds(source, callbackId); 16701 callbackId += 1; 16702 } else { 16703 promise = Promise.resolve(); 16704 } 16705 16706 return { 16707 code: source, 16708 promise: promise 16709 }; 16710}; 16711 16712 } 16713 16714 }, 16715 "core/src/lib/actions/helpers/getSourceByUrl.js": { 16716 "script": function(module, exports, require, turbine) { 16717/*************************************************************************************** 16718 * Copyright 2019 Adobe. All rights reserved. 16719 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16720 * you may not use this file except in compliance with the License. You may obtain a copy 16721 * of the License at http://www.apache.org/licenses/LICENSE-2.0 16722 * 16723 * Unless required by applicable law or agreed to in writing, software distributed under 16724 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16725 * OF ANY KIND, either express or implied. See the License for the specific language 16726 * governing permissions and limitations under the License. 16727 ****************************************************************************************/ 16728 16729'use strict'; 16730var loadScript = require('@adobe/reactor-load-script'); 16731var Promise = require('@adobe/reactor-promise'); 16732var findScriptByRegexPattern = 16733 require('../../helpers/findPageScript').byRegexPattern; 16734 16735var codeBySourceUrl = {}; 16736var scriptStore = {}; 16737 16738var loadScriptOnlyOnce = function (url) { 16739 if (!scriptStore[url]) { 16740 scriptStore[url] = loadScript(url); 16741 } 16742 16743 return scriptStore[url]; 16744}; 16745 16746_satellite.__registerScript = function (scriptGuid, code) { 16747 var scriptUrl; 16748 if (document.currentScript) { 16749 // use getAttribute in case it's a relative url 16750 scriptUrl = document.currentScript.getAttribute('src'); 16751 } else { 16752 var pattern = new RegExp('.*' + scriptGuid + '.*'); 16753 // use getAttribute in case it's a relative url 16754 scriptUrl = findScriptByRegexPattern(pattern).getAttribute('src'); 16755 } 16756 codeBySourceUrl[scriptUrl] = code; 16757}; 16758 16759module.exports = function (sourceUrl) { 16760 if (codeBySourceUrl[sourceUrl]) { 16761 return Promise.resolve(codeBySourceUrl[sourceUrl]); 16762 } else { 16763 return new Promise(function (resolve) { 16764 loadScriptOnlyOnce(sourceUrl).then( 16765 function () { 16766 resolve(codeBySourceUrl[sourceUrl]); 16767 }, 16768 function () { 16769 resolve(); 16770 } 16771 ); 16772 }); 16773 } 16774}; 16775 16776 } 16777 16778 }, 16779 "core/src/lib/events/helpers/pageLifecycleEvents.js": { 16780 "script": function(module, exports, require, turbine) { 16781/*************************************************************************************** 16782 * (c) 2018 Adobe. All rights reserved. 16783 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 16784 * you may not use this file except in compliance with the License. You may obtain a copy 16785 * of the License at http://www.apache.org/licenses/LICENSE-2.0 16786 * 16787 * Unless required by applicable law or agreed to in writing, software distributed under 16788 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16789 * OF ANY KIND, either express or implied. See the License for the specific language 16790 * governing permissions and limitations under the License. 16791 ****************************************************************************************/ 16792 16793'use strict'; 16794 16795// We need to be able to fire the rules in a specific order, no matter if the library is loaded 16796// sync or async. The rules are fired in the following order: 16797// Library loaded rules -> Page bottom rules -> Dom Ready rules -> Window load rules. 16798 16799var window = require('@adobe/reactor-window'); 16800var document = require('@adobe/reactor-document'); 16801 16802var isIE10 = window.navigator.appVersion.indexOf('MSIE 10') !== -1; 16803var WINDOW_LOADED = 'WINDOW_LOADED'; 16804var DOM_READY = 'DOM_READY'; 16805var PAGE_BOTTOM = 'PAGE_BOTTOM'; 16806 16807var lifecycleEventsOrder = [PAGE_BOTTOM, DOM_READY, WINDOW_LOADED]; 16808 16809var createSyntheticEvent = function (element, nativeEvent) { 16810 return { 16811 element: element, 16812 target: element, 16813 nativeEvent: nativeEvent 16814 }; 16815}; 16816 16817var registry = {}; 16818lifecycleEventsOrder.forEach(function (event) { 16819 registry[event] = []; 16820}); 16821 16822var processRegistry = function (lifecycleEvent, nativeEvent) { 16823 lifecycleEventsOrder 16824 .slice(0, getLifecycleEventIndex(lifecycleEvent) + 1) 16825 .forEach(function (lifecycleEvent) { 16826 processTriggers(nativeEvent, lifecycleEvent); 16827 }); 16828}; 16829 16830var detectLifecycleEvent = function () { 16831 if (document.readyState === 'complete') { 16832 return WINDOW_LOADED; 16833 } else if (document.readyState === 'interactive') { 16834 return !isIE10 ? DOM_READY : null; 16835 } 16836}; 16837 16838var getLifecycleEventIndex = function (event) { 16839 return lifecycleEventsOrder.indexOf(event); 16840}; 16841 16842var processTriggers = function (nativeEvent, lifecycleEvent) { 16843 registry[lifecycleEvent].forEach(function (triggerData) { 16844 processTrigger(nativeEvent, triggerData); 16845 }); 16846 registry[lifecycleEvent] = []; 16847}; 16848 16849var processTrigger = function (nativeEvent, triggerData) { 16850 var trigger = triggerData.trigger; 16851 var syntheticEventFn = triggerData.syntheticEventFn; 16852 16853 trigger(syntheticEventFn ? syntheticEventFn(nativeEvent) : null); 16854}; 16855 16856window._satellite = window._satellite || {}; 16857window._satellite.pageBottom = processRegistry.bind(null, PAGE_BOTTOM); 16858 16859document.addEventListener( 16860 'DOMContentLoaded', 16861 processRegistry.bind(null, DOM_READY), 16862 true 16863); 16864window.addEventListener( 16865 'load', 16866 processRegistry.bind(null, WINDOW_LOADED), 16867 true 16868); 16869 16870// Depending on the way the Launch library was loaded, none of the registered listeners that 16871// execute `processRegistry` may fire . We need to execute the `processRegistry` method at 16872// least once. If this timeout fires before any of the registered listeners, we auto-detect the 16873// current lifecycle event and fire all the registered triggers in order. We don't care if the 16874// `processRegistry` is called multiple times for the same lifecycle event. We fire the registered 16875// triggers for a lifecycle event only once. We used a `setTimeout` here to make sure all the rules 16876// using Library Loaded are registered and executed synchronously and before rules using any of the 16877// other lifecycle event types. 16878window.setTimeout(function () { 16879 var lifecycleEvent = detectLifecycleEvent(); 16880 if (lifecycleEvent) { 16881 processRegistry(lifecycleEvent); 16882 } 16883}
16883, 0); 16884 16885module.exports = { 16886 registerLibraryLoadedTrigger: function (trigger) { 16887 trigger(); 16888 }, 16889 registerPageBottomTrigger: function (trigger) { 16890 registry[PAGE_BOTTOM].push({ 16891 trigger: trigger 16892 }); 16893 }, 16894 registerDomReadyTrigger: function (trigger) { 16895 registry[DOM_READY].push({ 16896 trigger: trigger, 16897 syntheticEventFn: createSyntheticEvent.bind(null, document) 16898 }); 16899 }, 16900 registerWindowLoadedTrigger: function (trigger) { 16901 registry[WINDOW_LOADED].push({ 16902 trigger: trigger, 16903 syntheticEventFn: createSyntheticEvent.bind(null, window) 16904 }); 16905 } 16906}; 16907 16908 } 16909 16910 }, 16911 "core/src/lib/events/helpers/liveQuerySelector.js": { 16912 "script": function(module, exports, require, turbine) { 16913/*************************************************************************************** 16914 * Copyright 2019 Adobe. All rights reserved. 16915 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 16916 * you may not use this file except in compliance with the License. You may obtain a copy 16917 * of the License at http://www.apache.org/licenses/LICENSE-2.0 16918 * 16919 * Unless required by applicable law or agreed to in writing, software distributed under 16920 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 16921 * OF ANY KIND, either express or implied. See the License for the specific language 16922 * governing permissions and limitations under the License. 16923 ****************************************************************************************/ 16924 16925'use strict'; 16926var POLL_INTERVAL = 3000; 16927 16928var once = require('./once'); 16929var WeakMap = require('./weakMap'); 16930var calledCallbacksByElement = new WeakMap(); 16931 16932// Create a naked object with no prototype so we can safely use it as a map. 16933var callbacksBySelector = Object.create(null); 16934 16935var findElements = function () { 16936 // Using for loops instead of forEach and functions because this will process a lot and we want 16937 // to be as efficient as possible. 16938 var selectors = Object.keys(callbacksBySelector); 16939 for (var i = 0; i < selectors.length; i++) { 16940 var selector = selectors[i]; 16941 var callbacks = callbacksBySelector[selector]; 16942 var elements = document.querySelectorAll(selector); 16943 16944 for (var j = 0; j < callbacks.length; j++) { 16945 var callback = callbacks[j]; 16946 16947 for (var k = 0; k < elements.length; k++) { 16948 callback(elements[k]); 16949 } 16950 } 16951 } 16952}; 16953 16954var initializePolling = once(function () { 16955 setInterval(findElements, POLL_INTERVAL); 16956}); 16957 16958/** 16959 * Polls for elements added to the DOM matching a given selector. 16960 * @param {String} selector The CSS selector used to find elements. 16961 * @param {Function} callback A function that will be called once and only once for each element 16962 * found. The element will be passed to the callback. 16963 */ 16964module.exports = function (selector, callback) { 16965 var callbacks = callbacksBySelector[selector]; 16966 16967 if (!callbacks) { 16968 callbacks = callbacksBySelector[selector] = []; 16969 } 16970 16971 // This function will be called for every element found matching the selector but we will only 16972 // call the consumer's callback if it has not already been called for the element. 16973 callbacks.push(function (element) { 16974 var calledCallbacks = calledCallbacksByElement.get(element); 16975 16976 if (!calledCallbacks) { 16977 calledCallbacks = new WeakMap(); 16978 calledCallbacksByElement.set(element, calledCallbacks); 16979 } 16980 16981 if (!calledCallbacks.has(callback)) { 16982 calledCallbacks.set(callback, true); 16983 callback(element); 16984 } 16985 }); 16986 16987 initializePolling(); 16988}; 16989 16990/** 16991 * @private 16992 * Clears all listeners. This should only be used in tests. 16993 */ 16994module.exports.__reset = function () { 16995 callbacksBySelector = Object.create(null); 16996 16997 initializePolling = once(function () { 16998 setInterval(findElements, POLL_INTERVAL); 16999 }); 17000}; 17001 17002 } 17003 17004 }, 17005 "core/src/lib/events/helpers/once.js": { 17006 "script": function(module, exports, require, turbine) { 17007/*************************************************************************************** 17008 * Copyright 2019 Adobe. All rights reserved. 17009 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
17010 * you may not use this file except in compliance with the License. You may obtain a copy 17011 * of the License at http://www.apache.org/licenses/LICENSE-2.0 17012 * 17013 * Unless required by applicable law or agreed to in writing, software distributed under 17014 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 17015 * OF ANY KIND, either express or implied. See the License for the specific language 17016 * governing permissions and limitations under the License. 17017 ****************************************************************************************/ 17018'use strict'; 17019 17020/** 17021 * Returns a proxy function that, when call the first time, will call a target function. 17022 * Subsequent calls will not call the target function. 17023 * @param {Function} fn That target function to call a single time. 17024 * @param {Object} [context] The context in which to call the target function. 17025 * @returns {Function} 17026 */ 17027module.exports = function (fn, context) { 17028 var result; 17029 17030 return function () { 17031 if (fn) { 17032 result = fn.apply(context || this, arguments); 17033 fn = null; 17034 } 17035 17036 return result; 17037 }; 17038}; 17039 17040 } 17041 17042 } 17043 } 17044 }, 17045 "adobe-video-analytics": { 17046 "displayName": "Adobe Media Analytics for Audio and Video", 17047 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EPda19e4cc14f2458a8e6fd7f159b67247/", 17048 "settings": { 17049 "ovp": "", 17050 "ssl": true, 17051 "channel": "", 17052 "appVersion": "", 17053 "playerName": "Brightcove Smart Player", 17054 "debugLogging": false, 17055 "trackingServer": "nationalinstruments.hb.omtrdc.net", 17056 "exportNamespace": "AdobeHB" 17057 }, 17058 "modules": { 17059 "adobe-video-analytics/src/lib/sharedModules/getInstance.js": { 17060 "name": "get-instance", 17061 "shared": true, 17062 "script": function(module, exports, require, turbine) { 17063'use strict'; 17064 17065var getInstance = require('../helpers/getInstance'); 17066 17067module.exports = getInstance; 17068 } 17069 17070 }, 17071 "adobe-video-analytics/src/lib/sharedModules/mediaHeartbeat.js": { 17072 "name": "media-heartbeat", 17073 "shared": true, 17074 "script": function(module, exports, require, turbine) { 17075'use strict'; 17076 17077var mediaHeartbeat = require('../helpers/mediaHeartbeat'); 17078var exportGlobal = require('../helpers/exportGlobal'); 17079 17080// Export the APIs to Browser window here. 17081var extensionSettings = turbine.getExtensionSettings(); 17082exportGlobal(extensionSettings); 17083 17084// Export shared module. 17085module.exports = mediaHeartbeat; 17086 17087 17088 } 17089 17090 }, 17091 "adobe-video-analytics/src/lib/helpers/getInstance.js": { 17092 "script": function(module, exports, require, turbine) { 17093'use strict'; 17094 17095var Promise = require('@adobe/reactor-promise'); 17096var ADB = require('../codeLibrary/MediaSDK.min'); 17097 17098var MediaHeartbeat = ADB.va.MediaHeartbeat; 17099var MediaHeartbeatConfig = ADB.va.MediaHeartbeatConfig; 17100var MediaHeartbeatDelegate = ADB.va.MediaHeartbeatDelegate; 17101 17102var extensionSettings = turbine.getExtensionSettings(); 17103var analyticsPromiseFn = turbine.getSharedModule('adobe-analytics', 'get-tracker'); 17104 17105function WrappedMediaHeartbeatDelegate(delegate) { 17106 if (!delegate || typeof delegate !== 'object' || 17107 typeof delegate['getQoSObject'] !== 'function' || 17108 typeof delegate['getCurrentPlaybackTime'] !== 'function') { 17109 throw new Error('Delegate must be a valid object with getQosObject() and getCurrentPlaybackTime() functions.'); 17110 } 17111 this._delegate = delegate; 17112} 17113ADB.core.extend(WrappedMediaHeartbeatDelegate.prototype, MediaHeartbeatDelegate.prototype); 17114 17115WrappedMediaHeartbeatDelegate.prototype.getCurrentPlaybackTime = function() { 17116 return this._delegate.getCurrentPlaybackTime(); 17117}; 17118 17119WrappedMediaHeartbeatDelegate.prototype.getQoSObject = function() { 17120 return this._delegate.getQoSObject(); 17121}; 17122 17123function buildMediaHeartbeatConfig(extensionSettings, config) { 17124 if (!config || typeof config !== 'object') { 17125 config = {}; 17126 } 17127 17128 var mediaConfig = new MediaHeartbeatConfig(); 17129 mediaConfig.trackingServer = extensionSettings.trackingServer; 17130 mediaConfig.debugLogging = extensionSettings.debugLogging; 17131 mediaConfig.appVersion = extensionSettings.appVersion; 17132 mediaConfig.ssl = extensionSettings.ssl; 17133 mediaConfig.channel = (typeof config.channel === 'string') ? config.channel : extensionSettings.channel; 17134 mediaConfig.ovp = (typeof config.ovp === 'string') ? config.ovp : extensionSettings.ovp; 17135 17136 mediaConfig.playerName = (typeof config.playerName === 'string') ? config.playerName : extensionSettings.playerName; 17137 if (typeof mediaConfig.playerName !== 'string' || mediaConfig.playerName === '') { 17138 mediaConfig.playerName = 'unknown'; 17139 } 17140 return mediaConfig; 17141} 17142 17143module.exports = function(delegate, config) { 17144 return Promise.resolve().then(function() { 17145 var mediaDelegate = new WrappedMediaHeartbeatDelegate(delegate); 17146 var mediaConfig = buildMediaHeartbeatConfig(extensionSettings, config); 17147 17148 if (!analyticsPromiseFn) { 17149 var msg = 'Error getting a reference to Analytics shared module. ' + 17150 'Make sure Adobe Analytics Extension is configured properly.';
17151 17152 turbine.logger.error(msg); 17153 throw new Error(msg); 17154 } 17155 return analyticsPromiseFn().then(function(appMeasurement) { 17156 return new MediaHeartbeat(mediaDelegate, mediaConfig, appMeasurement); 17157 }); 17158 }); 17159}; 17160 } 17161 17162 }, 17163 "adobe-video-analytics/src/lib/codeLibrary/MediaSDK.min.js": { 17164 "script": function(module, exports, require, turbine) { 17165/************************************************************************* 17166 * ADOBE CONFIDENTIAL 17167 * ___________________ 17168 * 17169 * Copyright 2019 Adobe 17170 * All Rights Reserved. 17171 * 17172 * NOTICE: All information contained herein is, and remains 17173 * the property of Adobe and its suppliers, if any. The intellectual 17174 * and technical concepts contained herein are proprietary to Adobe 17175 * and its suppliers and are protected by all applicable intellectual 17176 * property laws, including trade secret and copyright laws. 17177 * Dissemination of this information or reproduction of this material 17178 * is strictly forbidden unless prior written permission is obtained 17179 * from Adobe. 17180 **************************************************************************/ 17181/* 17182 * MediaSDK - 2.2.1 - 2019-10-09 17183 * Copyright (c) 2019 Adobe. All Rights Reserved. 17184 * 17185 * Copyright for external libraries used in Media SDK 17186 * JavaScript MD5 1.0.1 17187 * https://github.com/blueimp/JavaScript-MD5 17188 * 17189 * Copyright 2011, Sebastian Tschan 17190 * https://blueimp.net 17191 * 17192 * Licensed under the MIT license: 17193 * http://www.opensource.org/licenses/MIT 17194 * 17195 * Based on 17196 * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message 17197 * Digest Algorithm, as defined in RFC 1321. 17198 * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 17199 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet 17200 * Distributed under the BSD License 17201 * See http://pajhome.org.uk/crypt/md5 for more info. 17202 * 17203 * 17204 * umdjs (commonjsStrict.js) 17205 * Copyright (c) the UMD contributors 17206 * Licensed under the MIT license: 17207 * https://github.com/umdjs/umd/blob/master/LICENSE.md 17208 */ 17209(function (root, factory) { 17210 if (typeof define === 'function' && define.amd) { 17211 define(['exports'], factory); 17212 } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { 17213 factory(exports); 17214 } else { 17215 factory(root.ADB = {}); 17216 } 17217}(typeof self !== 'undefined' ? self : this, function (exports) { 17218 var lib = {}; 17219 (function () { 17220 17221 17222// Heartbeat core 17223!function(a){if(void 0===b)var b={};if(void 0===c)var c={};if(void 0===d)var d={};if(d.radio||(d.radio={}),d.plugin||(d.plugin={}),void 0===e)var e={};e.clock||(e.clock={}),function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b);return(a>>16)+(b>>16)+(c>>16)<<16|65535&c}function c(a,b){return a<<b|a>>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<<c%32,a[14+(c+64>>>9<<4)]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d<a.length;d+=16)i=m,j=n,k=o,l=p,m=e(m,n,o,p,a[d],7,-680876936),p=e(p,m,n,o,a[d+1],12,-389564586),o=e(o,p,m,n,a[d+2],17,606105819),n=e(n,o,p,m,a[d+3],22,-1044525330),m=e(m,n,o,p,a[d+4],7,-176418897),p=e(p,m,n,o,a[d+5],12,1200080426),o=e(o,p,m,n,a[d+6],17,-1473231341),n=e(n,o,p,m,a[d+7],22,-45705983),m=e(m,n,o,p,a[d+8],7,1770035416),p=e(p,m,n,o,a[d+9],12,-1958414417),o=e(o,p,m,n,a[d+10],17,-42063),n=e(n,o,p,m,a[d+11],22,-1990404162),m=e(m,n,o,p,a[d+12],7,1804603682),p=e(p,m,n,o,a[d+13],12,-40341101),o=e(o,p,m,n,a[d+14],17,-1502002290),n=e(n,o,p,m,a[d+15],22,1236535329),m=f(m,n,o,p,a[d+1],5,-165796510),p=f(p,m,n,o,a[d+6],9,-1069501632),o=f(o,p,m,n,a[d+11],14,643717713),n=f(n,o,p,m,a[d],20,-373897302),m=f(m,n,o,p,a[d+5],5,-701558691),p=f(p,m,n,o,a[d+10],9,38016083),o=f(o,p,m,n,a[d+15],14,-660478335),n=f(n,o,p,m,a[d+4],20,-405537848),m=f(m,n,o,p,a[d+9],5,568446438),p=f(p,m,n,o,a[d+14],9,-1019803690),o=f(o,p,m,n,a[d+3],14,-187363961),n=f(n,o,p,m,a[d+8],20,1163531501),m=f(m,n,o,p,a[d+13],5,-1444681467),p=f(p,m,n,o,a[d+2],9,-51403784),o=f(o,p,m,n,a[d+7],14,1735328473),n=f(n,o,p,m,a[d+12],20,-1926607734),m=g(m,n,o,p,a[d+5],4,-378558),p=g(p,m,n,o,a[d+8],11,-2022574463),o=g(o,p,m,n,a[d+11],16,1839030562),n=g(n,o,p,m,a[d+14],23,-35309556),m=g(m,n,o,p,a[d+1],4,-1530992060),p=g(p,m,n,o,a[d+4],11,1272893353),o=g(o,p,m,n,a[d+7],16,-155497632),n=g(n,o,p,m,a[d+10],23,-1094730640),m=g(m,n,o,p,a[d+13],4,681279174),p=g(p,m,n,o,a[d],11,-358537222),o=g(o,p,m,n,a[d+3],16,-722521979),n=g(n,o,p,m,a[d+6],23,76029189),m=g(m,n,o,p,a[d+9],4,-640364487),p=g(p,m,n,o,a[d+12],11,-421815835),o=g(o,p,m,n,a[d+15],16,530742520),n=g(n,o,p,m,a[d+2],23,-995338651),m=h(m,n,o,p,a[d],6,-198630844),p=h(p,m,n,o,a[d+7],10,1126891415),o=h(o,p,m,n,a[d+14],15,-1416354905),n=h(n,o,p,m,a[d+5],21,-57434055),m=h(m,n,o,p,a[d+12],6,1700485571),p=h(p,m,n,o,a[d+3],10,-1894986606),o=h(o,p,m,n,a[d+10],15,-1051523),n=h(n,o,p,m,a[d+1],21,-2054922799),m=h(m,n,o,p,a[d+8],6,1873313359),p=h(p,m,n,o,a[d+15],10,-30611744),o=h(o,p,m,n,a[d+6],15,-1560198380),n=h(n,o,p,m,a[d+13],21,1309151649),m=h(m,n,o,p,a[d+4],6,-145523070),p=h(p,m,n,o,a[d+11],10,-1120210379),o=h(o,p,m,n,a[d+2],15,718787259),n=h(n,o,p,m,a[d+9],21,-343485551),m=b(m,i),n=b(n,j),o=b(o,k),p=b(p,l);return[m,n,o,p]}function j(a){var b,c="";for(b=0;b<32*a.length;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b<c.length;b+=1)c[b]=0;for(b=0;b<8*a.length;b+=8)c[b>>5]|=(255&a.charCodeAt(b/8))<<b%32;return c}function l(a){return j(i(k(a),8*a.length))}function m(a,b){var c,d,e=k(a),f=[],g=[];for(f[15]=g[15]=void 0,e.length>16&&(e=i(e,8*a.length)),c=0;c<16;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c<a.length;
17223c+=1)b=a.charCodeAt(c),e+=d.charAt(b>>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}a.md5=t}(b),function(a){"use strict";var b={};b.startsWith=function(a,b){return 0==a.indexOf(b)},a.StringUtils=b}(b),function(a){"use strict";var b={};b.clone=function(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},b.merge=function(a,c){var d=b.clone(a);for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);return d},b.append=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},a.ObjectUtils=b}(b),function(a){"use strict";function b(a){if(null==a)return!0;for(var b=0;b<a.length;++b)if(isNaN(a[b]))return!1;return!0}function c(a,c){if("string"!=typeof a||"string"!=typeof c)return NaN;var d=a.split("."),e=c.split(".");if(!b(d)||!b(e))return NaN;for(var f=Math.max(d.length,e.length),g=0;g<f;++g){var h=void 0!=d[g]?d[g]:"0",i=void 0!=e[g]?e[g]:"0";if(h=Number(h),i=Number(i),h>i)return 1;if(h<i)return-1}return 0}var d={};d.isGreaterThan=function(a,b){return c(a,b)>0},d.isGreaterThanEqual=function(a,b){return c(a,b)>=0},d.isLessThan=function(a,b){return c(a,b)<0},d.isLessThanEqual=function(a,b){return c(a,b)<=0},d.isSame=function(a,b){return 0===c(a,b)},d.isDifferent=function(a,b){return 0!==c(a,b)},a.VersionUtils=d}(b),function(a){"use strict";function b(a,b,c){this.fn=a,this.ctx=b,this.params=c}b.prototype.run=function(){this.params?this.fn.apply(this.ctx,this.params):this.fn.apply(this.ctx)},a.radio.Command=b}(d),function(a){"use strict";function b(a,b){this._queue=[],this._lastTs=0,this._isSuspended=void 0!==a&&a,this._delay=void 0!==b?b:0}b.prototype.addCommand=function(a){this._queue.push(a),this._drain()},b.prototype.cancelAllCommands=function(){this._queue=[]},b.prototype.isEmpty=function(){return 0===this._queue.length},b.prototype.suspend=function(){this._isSuspended=!0},b.prototype.resume=function(){this._isSuspended=!1,this._drain()},b.prototype.flush=function(){this._isSuspended=!1;for(var a=0;a<this._queue.length;a++){this._queue[a].run()}this._queue=[]},b.prototype._drain=function(){if(!this._isSuspended&&!this._drainInProgress){this._drainInProgress=!0;var a=this;!function b(){var c=a._queue.shift();c?a._runCommand(c,function(){a._isSuspended||b()}):a._drainInProgress=!1}()}},b.prototype._runCommand=function(a,b){function c(){a.run(),null!=b&&b.call(d)}var d=this;if(0==this._lastTs)c();else{var e=(new Date).getTime(),f=e-this._lastTs;this._lastTs=e,f<this._delay?setTimeout(c,this._delay-f):c()}},a.radio.CommandQueue=b}(d),function(a){"use strict";function b(a,b){if(this._name=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._listeners={},this._requests={},this._commands={},this._isShutDown=!1}function c(a,c){if(a===c)return!0;for(var d=(a||"").split(b.SEPARATOR),e=(c||"").split(b.SEPARATOR),f=!0,g=0;g<d.length;g++)f=f&&(d[g]===b.WILDCARD||d[g]===e[g]);return f}b.WILDCARD="*",b.SEPARATOR=":",b.prototype.toString=function(){return"<channel: "+this._name+">"},b.prototype.shutdown=function(){this._isShutDown||(this._logger.debug(d,"#shutdown > Shutting down"),this.off(),this._requests={},this._commands={},this._isShutDown=!0)},b.prototype.on=function(a,b,c){this._isShutDown||(this._listeners[a]||(this._listeners[a]=[]),this._listeners[a].push({fn:b,ctx:c}))},b.prototype.off=function(a,b,c){if(!this._isShutDown){if(b="function"==typeof b?b:null,!a&&null==b&&!c)return void(this._listeners={});if(a)this._removeListener(a,b,c);else for(a in this._listeners)this._listeners.hasOwnProperty(a)&&this._removeListener(a,b,c)}},b.prototype.trigger=function(a){if(!this._isShutDown)for(var b in this._listeners)if(this._listeners.hasOwnProperty(b)&&c(b,a.name))for(var d=this._listeners[b].slice(0),e=0;e<d.length;e++){var f=d[e];f.fn.call(f.ctx,a)}},b.prototype.comply=function(a,b,c){this._isShutDown||(this._commands[a]={cmd:b,ctx:c})},b.prototype.command=function(a,b){if(!this._isShutDown){var c=this._commands[a];if(!c)return void this._logger.warn(d,"#command > No command handler for: "+a);c.cmd.call(c.ctx,b)}},b.prototype.reply=function(a,b,c){this._isShutDown||(this._requests[a]={fn:b,ctx:c})}
17223,b.prototype.request=function(a){if(!this._isShutDown){var b=this._requests[a];return b?b.fn.call(b.ctx):(this._logger.warn(d,"#request > No request handler for: "+a),null)}},b.prototype._removeListener=function(a,b,c){b="function"==typeof b?b:null;var d=this._listeners[a];if(d){if(!d.length||null==b&&!c)return void delete this._listeners[a];for(var e=0;e<d.length;e++){var f=d[e];null!==b&&b!==f.fn||c&&c!==f.ctx||this._listeners[a].splice(e,1)}}};var d="radio::Channel";a.radio.Channel=b}(d),function(a){"use strict";function b(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._channels={}}var c=a.radio.Channel;b.prototype.channel=function(a){return this._channels[a]||(this._channels[a]=new c(a,this._logger)),this._channels[a]},b.prototype.shutdown=function(){for(var a in this._channels)this._channels.hasOwnProperty(a)&&this._channels[a].shutdown()},a.radio.Radio=b}(d),function(a){"use strict";function b(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a}a.extend=b}(d),function(a){"use strict";function b(){}b.prototype.write=function(a){throw new Error("Implementation error: Method must be overridden.")},a.ILogWriter=b}(d),function(a){"use strict";function b(){}b.prototype.write=function(a){window.console&&window.console.log&&window.console.log(a)},a.LogWriter=b}(d),function(a){"use strict";function b(){}b.prototype.setLogWriter=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getLogWriter=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getEnabled=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.enable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.disable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.debug=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.info=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.warn=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.error=function(a,b){throw new Error("Implementation error: Method must be overridden.")},a.ILogger=b}(d),function(a){"use strict";function b(){this._logWriter=new d}function c(a){return a<10?"00"+a:a<100?"0"+a:""+a}var d=a.LogWriter;b.prototype.setLogWriter=function(a){if(!a)throw new Error("Reference to the ILogWriter object cannot be NULL");this._logWriter=a,this._enabled=!1},b.prototype.getLogWriter=function(){return this._logWriter},b.prototype.getEnabled=function(){return this._enabled},b.prototype.enable=function(){this._enabled=!0},b.prototype.disable=function(){this._enabled=!1},b.prototype.debug=function(a,b){this._log(a,f,b)},b.prototype.info=function(a,b){this._log(a,e,b)},b.prototype.warn=function(a,b){this._log(a,g,b)},b.prototype.error=function(a,b){this._log(a,h,b)},b.prototype._log=function(a,b,d){if(b==h||this._enabled){var e="",f=new Date;e+="["+f.toTimeString()+"."+c(f.getMilliseconds())+"] ["+b+"] ",e+="["+a+"] "+d,this._logWriter.write(e)}};var e="INFO",f="DEBUG",g="WARN",h="ERROR";a.Logger=b}(d),function(a){"use strict";function b(a,b){this._pluginName=a,this._eventName=b}var c=a.radio.Channel;b.prototype.getPluginName=function(){return this._pluginName},b.prototype.getEventName=function(){return this._eventName},b.prototype.getName=function(){return this._pluginName+c.SEPARATOR+this._eventName},a.Trigger=b}(d),function(a){"use strict";function b(a,b){this.name=a,this.data=b}b.SUCCESS="success",b.ERROR="error",b.createFromTrigger=function(a){return new b(a.getName())},a.Event=b}(d),function(a){"use strict";function b(){this._events={}}b.prototype.addEventListener=function(a,b,c){a&&b&&(c=c||window,this._events[a]=this._events[a]||[],this._events[a].push({cb:b,ctx:c}))},b.prototype.removeEventListener=function(a,b,c){if(a&&b){c=c||window;var d,e,f=!1;for(e in this._events)if(a===e){f=!0;break}if(f){for(d=this._events[e].length-1;d>=0;d--){var g=this._events[e][d];b===g.cb&&c===g.ctx&&this._events[e].splice(d,1)}this._events[e].length||delete this._events[e]}}}
17223,b.prototype.dispatchEvent=function(a){if(a.name){var b,c;for(b in this._events)if(this._events.hasOwnProperty(b)&&a.name===b){var d=this._events[b],e=d.slice(0),f=e.length;for(c=0;c<f;c++)e[c].cb.call(e[c].ctx,a);break}}},b.prototype.removeAllListeners=function(a){if(a){var b,c;for(c in this._events)if(this._events.hasOwnProperty(c)){for(b=this._events[c].length-1;b>=0;b--){var d=this._events[c][b];d.ctx===a&&this._events[c].splice(b,1)}this._events[c].length||delete this._events[c]}}else this._events={}},a.EventDispatcher=b}(d),function(a){"use strict";function b(){}function c(a,b){this.url=a||null,this.method=b,this._xmlhttp=null}function d(){d.__super__.constructor.call(this),this._connection=null}var e=a.Event,f=a.EventDispatcher;b.GET="GET",d.RESPONSE="response",d.INSTANCE="instance",a.extend(d,f),d.prototype.close=function(){this.removeAllListeners(null)},d.prototype.load=function(a){a&&a.method&&a.url&&(a._xmlhttp=this._createCORSRequest(a),a._xmlhttp?a._xmlhttp.send():this._loadImage(a))},d.prototype._createCORSRequest=function(a){var b=null;if(void 0!==window.XMLHttpRequest){var c=new window.XMLHttpRequest;"withCredentials"in c&&(b=c,b.open(a.method,a.url,!0))}if(null==b&&void 0!==window.XDomainRequest&&(b=new window.XDomainRequest,b.open(a.method,a.url)),b){var f={};f[d.INSTANCE]=this;var g=this;b.onload=function(){if(b.status&&parseInt(b.status,10)>=400)return this.onerror();f[d.RESPONSE]=b.responseText,g.dispatchEvent(new e(e.SUCCESS,f))},b.onerror=function(){g.dispatchEvent(new e(e.ERROR,f))}}return b},d.prototype._loadImage=function(a){this._connection||(this._connection=new Image,this._connection.alt=""),this._connection.src=a.url;var b={};b[d.RESPONSE]="",b[d.INSTANCE]=this,this.dispatchEvent(new e(e.SUCCESS,b))},a.URLRequestMethod=b,a.URLRequest=c,a.URLLoader=d}(d),function(a){"use strict";var b="2.2.1.229",c="1bf77a",d={};d.getVersion=function(){return"js-extn-"+b+"-"+c},d.getMajor=function(){return d.getNumberAtPosition(0)},d.getMinor=function(){return d.getNumberAtPosition(1)},d.getMicro=function(){return d.getNumberAtPosition(2)},d.getPatch=function(){return d.getNumberAtPosition(3)},d.getBuild=function(){return c},d.getApiLevel=function(){return 4},d.getNumberAtPosition=function(a){return b.split(".")[a]},a.Version=d}(c),function(a){"use strict";function b(a,b){this._message=a,this._details=b}b.prototype.getMessage=function(){return this._message},b.prototype.getDetails=function(){return this._details},a.ErrorInfo=b}(c),function(a){"use strict";function b(){this.debugLogging=!1}a.HeartbeatConfig=b}(c),function(a){"use strict";function b(){}b.prototype.onError=function(a){},a.HeartbeatDelegate=b}(c),function(a){"use strict";function b(){}b.prototype.configure=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.bootstrap=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.setup=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.destroy=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.enable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.disable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getName=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.isInitialized=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.resolveData=function(a){throw new Error("Implementation error: Method must be overridden.")},a.plugin.IPlugin=b}(d),function(a){"use strict";function b(a,b,c,d){this.trigger=a,this.action=c,this.plugin=b,this._paramMappings={}
17223,this.mergeParams(d)}var c=a.plugin.ParamMapping;b.prototype.mergeParams=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b];this._paramMappings[c.getKeyName()]=c}},b.prototype.getParams=function(){var a=[];for(var b in this._paramMappings)this._paramMappings.hasOwnProperty(b)&&a.push(this._paramMappings[b]);return a},b.prototype.addParam=function(a){this._paramMappings[a.getKeyName()]=a},b.prototype.removeParam=function(a,b){var d=new c(a,b);this._paramMappings.hasOwnProperty(d.getKeyName())&&delete this._paramMappings[d.getKeyName()]},a.plugin.Behaviour=b}(d),function(a){"use strict";function b(a,b,d){this._pluginName=a,this._key=b,this._paramName=d||a+c.SEPARATOR+b}var c=a.radio.Channel;b.prototype.getPluginName=function(){return this._pluginName},b.prototype.getKey=function(){return this._key},b.prototype.getKeyName=function(){return this._pluginName+c.SEPARATOR+this._key},b.prototype.getParamName=function(){return this._paramName},a.plugin.ParamMapping=b}(d),function(a){"use strict";function b(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._plugins={},this._behaviours={},this._radio=new d(this._logger),this._dataChannel=this._radio.channel(g),this._ctrlChannel=this._radio.channel(h)}var c=a.Event,d=a.radio.Radio,e=a.radio.Channel,f=a.plugin.Behaviour;b.ERROR="error",b.prototype.addPlugin=function(a){var b=a.getName();this._plugins[b]&&this._logger.warn(i,"#addPlugin > Replacing plugin: "+b),this._plugins[b]=a,a.bootstrap(this)},b.prototype.setupPlugins=function(){for(var a in this._plugins)this._plugins.hasOwnProperty(a)&&this._plugins[a].setup()},b.prototype.pluginExists=function(a){return!!this._plugins[a]},b.prototype.isPluginInitialized=function(a){return this._plugins[a]&&this._plugins[a].isInitialized()},b.prototype.on=function(a,b,c,d){this._dataChannel.on(a+e.SEPARATOR+b,c,d)},b.prototype.off=function(a,b,c,d){var f=a&&b?a+e.SEPARATOR+b:null;this._dataChannel.off(f,c,d)},b.prototype.trigger=function(a){var b=a.name,c=this._behaviours[b];if(c){var d,e,f,g,h,i={},j={};for(d=0;d<c.length;d++)if(f=c[d],g=f.getParams())for(e=0;e<g.length;e++)h=g[e],i[h.getPluginName()]=i[h.getPluginName()]||[],h.key in i[h.getPluginName()]||i[h.getPluginName()].push(h.getKey());for(var k in i)i.hasOwnProperty(k)&&(j[k]=this.request(k,i[k]));for(d=0;d<c.length;d++){f=c[d];var l={_behaviour:f,_eventData:a.data||{}};if(g=f.getParams()){for(e=0;e<g.length;e++)h=g[e],l[h.getParamName()]=j[h.getPluginName()]?j[h.getPluginName()][h.getKey()]:null;this.command(f.plugin.getName(),f.action,l)}}}this._dataChannel.trigger(a)},b.prototype.request=function(a,b){var c=this._plugins[a];return c&&b&&0!=b.length?c.resolveData(b):null},b.prototype.raise=function(a){this._errorInfo=a;var d=new c(b.ERROR,a);this._ctrlChannel.trigger(d)},b.prototype.getErrorInfo=function(){return this._errorInfo},b.prototype.destroy=function(){this._radio.shutdown();for(var a in this._plugins)this._plugins.hasOwnProperty(a)&&this._plugins[a].destroy()},b.prototype.comply=function(a,b,c){this._dataChannel.comply(a.getName()+e.SEPARATOR+b,c,a)},b.prototype.command=function(a,b,c){this._dataChannel.command(a+e.SEPARATOR+b,c)},b.prototype.registerBehaviour=function(a,b,c,d){var e=a.getName(),g=new f(a,b,c,d);this._behaviours[e]=this._behaviours[e]||[],this._behaviours[e].push(g)};var g="data_channel",h="ctrl_channel",i="plugin::PluginManager";a.plugin.PluginManager=b}(d),function(a,b){"use strict";function c(a){this._name=a,this._isInitialized=!1,this._isDestroyed=!1,this._isEnabled=!0,this._dataResolver={},this._logTag="plugin::"+this.getName(),this._logger=new d}var d=a.Logger,e=a.Trigger,f=a.Event,g=b.ErrorInfo;c.INITIALIZED="initialized",c.prototype.configure=function(a){},c.prototype.bootstrap=function(a){this._pluginManager=a,this._isDestroyed&&this._pluginManager.raise(new g("Invalid state.","Plugin already destroyed."))},c.prototype.setup=function(){this._trigger(c.INITIALIZED),this._isInitialized=!0},c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._teardown())},c.prototype.enable=function(){this._isEnabled=!0,this._enabled()},c.prototype.disable=function(){this._isEnabled=!1,this._disabled()},c.prototype.getName=function(){return this._name},c.prototype.getLogger=function(){return this._logger},c.prototype.isInitialized=function(){return this._isInitialized}
17223,c.prototype.resolveData=function(a){if(!this._isEnabled||!this._isInitialized)return this._logger.warn(this._logTag,"Unable to retrieve plugin data. Plugin: "+this._name+". Enabled: "+this._isEnabled+". Initialized: "+this._isInitialized+"."),null;if("function"==typeof this._dataResolver)return this._dataResolver.call(this,a);var b=null;if(a)for(var c=0;c<a.length;c++){var d=a[c];this._dataResolver.hasOwnProperty(d)&&(b=b||{},"function"==typeof this._dataResolver[d]?b[d]=this._dataResolver[d].call(this):b[d]=this._dataResolver[d])}return b},c.prototype.toString=function(){return"<plugin: "+this._name+">"},c.prototype._enabled=function(){},c.prototype._disabled=function(){},c.prototype._teardown=function(){},c.prototype._canProcess=function(){return this._isEnabled?!this._isDestroyed||(this._logger.error(this._logTag,"Plugin destroyed."),!1):(this._logger.error(this._logTag,"Plugin disabled."),!1)},c.prototype._trigger=function(a,b){var c=f.createFromTrigger(new e(this.getName(),a));c.data=b,this._pluginManager.trigger(c)},a.plugin.BasePlugin=c}(d,c),function(a){"use strict";function b(a,b,c){this.name=a,this.interval=b,this.isActive=!1,this.repeatCount=void 0!==c?c:e,this._nextTickTimestamp=0,this.reset()}function c(a,b){if(!a)throw new Error("Reference to the ClockService object cannot be NULL");if(this._service=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._isDestroyed=!1,this._timers={};var c=this;this._clock=window.setInterval(function(){c._onTick()},1e3*f)}b.prototype.reset=function(){this.tick=0,this._createdTimestamp=(new Date).getTime(),this._updateNextTickTimestamp()},b.prototype.shouldTick=function(){return(new Date).getTime()>this._nextTickTimestamp-g/2&&(this.tick++,this._updateNextTickTimestamp(),!0)},b.prototype._updateNextTickTimestamp=function(){var a=(new Date).getTime();this._nextTickTimestamp=a+1e3*this.interval-1},c.prototype.createTimer=function(a,c,d){this._timers[a]=new b(a,c,d)},c.prototype.destroyTimer=function(a){delete this._timers[a]},c.prototype.resumeTimer=function(a,b){b=void 0!==b&&b,this._logger.debug(d,"#resumeTimer(name="+a+", reset="+b+")");var c=this._timers[a];c&&(c.isActive=!0,b&&c.reset())},c.prototype.pauseTimer=function(a,b){b=void 0!==b&&b,this._logger.debug(d,"#pauseTimer(name="+a+", reset="+b+")");var c=this._timers[a];c&&(c.isActive=!1,b&&c.reset())},c.prototype.isTimerPaused=function(a){var b=this._timers[a];return!!b&&!b.isActive},c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._timers={},window.clearInterval(this._clock))}
17223,c.prototype._onTick=function(){for(var a in this._timers)if(this._timers.hasOwnProperty(a)){var b=this._timers[a];b.isActive&&b.shouldTick()&&(b.interval>1&&this._logger.debug(d,"#_onTick() > "+b.name+"("+b.tick+" | "+b.repeatCount+")"),0!=b.repeatCount?(this._service.onTick(b.name,b.interval,b.tick),b.repeatCount!=e&&b.repeatCount--):this.destroyTimer(b.name))}};var d="service.clock::TimerManager",e=-1,f=.25,g=1e3*f;a.clock.TimerDescriptor=b,a.clock.TimerManager=c}(e),function(a,b,c){"use strict";function d(a){if(d.__super__.constructor.call(this,h),!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._timerManager=new e(this,this._logger),this._setupDataResolver()}var e=c.clock.TimerManager,f=b.StringUtils,g=a.plugin.BasePlugin;a.extend(d,g),d.prototype.bootstrap=function(a){d.__super__.bootstrap.call(this,a),this._pluginManager.comply(this,i,this._cmdCreate),this._pluginManager.comply(this,k,this._cmdResume),this._pluginManager.comply(this,j,this._cmdPause),this._pluginManager.comply(this,l,this._cmdDestroy)},d.prototype._teardown=function(){this._timerManager.destroy()},d.prototype._cmdCreate=function(a){var b=a[o]||s;this._timerManager.createTimer(a[m],a[n],b)},d.prototype._cmdPause=function(a){this._timerManager.pauseTimer(a[m],!!a[q])},d.prototype._cmdResume=function(a){this._timerManager.resumeTimer(a[m],!!a[q])},d.prototype._cmdDestroy=function(a){this._timerManager.destroyTimer(a[m])},d.prototype.onTick=function(a,b,c){a+=".tick";var d={};d[m]=a,d[n]=b,d[p]=c,this._trigger(a,d)},d.prototype._setupDataResolver=function(){var a={},b=this._timerManager;a[r]=function(a){return b.isTimerPaused(a)},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];if(c=c||{},f.startsWith(e,r)){var g=e.split(r+".");g.length>0&&(c[e]=a[r].call(this,g[1]))}}return c}};var h="service.clock",i="create",j="pause",k="resume",l="destroy",m="name",n="interval",o="repeat_count",p="tick",q="reset",r="is_paused",s=-1;c.clock.ClockService=d}(d,b,e),function(a,b,c){"use strict";function d(a,b){if(this._logger=new e,this._pluginManager=new f(this._logger),this._pluginManager.addPlugin(new g(this._logger)),b)for(var c=0;c<b.length;c++)this._pluginManager.addPlugin(b[c]);this._pluginManager.setupPlugins(),this._isDestroyed=!1}var e=a.Logger,f=a.plugin.PluginManager,g=b.clock.ClockService;d.prototype.configure=function(a){if(!a)throw new Error("Configuration object cannot be NULL.");a.debugLogging?this._logger.enable():this._logger.disable(),this._isDestroyed&&this._logger.error(h,"Instance is destroyed.")},d.prototype.destroy=function(){this._isDestroyed||(this._pluginManager.destroy(),this._isDestroyed=!0)};var h="Heartbeat";c.Heartbeat=d}(d,e,c),a.ADB||(a.ADB={}),a.ADB.core||(a.ADB.core=d),a.ADB.va||(a.ADB.va=c),a.ADB.va.utils||(a.ADB.va.utils=b),a.ADB.va.plugins||(a.ADB.va.plugins={})}(this); 17224 17225// VideoPlayerPlugin 17226!function(a){if(void 0===b)var b={};!function(a){"use strict";var b={};b.ASSET_TYPE_VOD="vod",b.ASSET_TYPE_LIVE="live",b.ASSET_TYPE_LINEAR="linear",a.AssetType=b}(b),function(a){"use strict";function b(){this.playerName=null,this.name=null,this.position=null,this.startTime=null}b.prototype.toString=function(){return"playerName="+this.playerName+", name="+this.name+", position="+this.position+", startTime="+this.startTime},a.AdBreakInfo=b}(b),function(a){"use strict";function b(){this.id=null,this.name=null,this.length=null,this.position=null,this.granularTracking=!0}b.prototype.toString=function(){return"id="+this.id+", name="+this.name+", length="+this.length+", position="+this.position+", granularTracking="+this.granularTracking},a.AdInfo=b}(b),function(a){"use strict";function b(){this.name=null,this.length=null,this.position=null,this.startTime=null}b.prototype.toString=function(){return"name="+this.name+", length="+this.length+", position="+this.position+", startTime="+this.startTime},a.ChapterInfo=b}(b),function(a){"use strict";function b(){this.bitrate=null,this.fps=null,this.droppedFrames=null,this.startupTime=null}b.prototype.toString=function(){return"bitrate="+this.bitrate+", fps="+this.fps+", droppedFrames="+this.droppedFrames+", startupTime="+this.startupTime},a.QoSInfo=b}(b),function(a){"use strict";function b(){this.playerName=null,this.id=null,this.name=null,this.length=null,this.playhead=null,this.mediaType=null,this.streamType=null,this.resumed=!1}b.prototype.toString=function(){return"playerName="+this.playerName+", id="+this.id+", name="+this.name+", length="+this.length+", playhead="+this.playhead+", mediaType="+this.mediaType+", streamType="+this.streamType+", resumed="+this.resumed},a.VideoInfo=b}(b),function(a){"use strict";function b(){this.debugLogging=!1}a.VideoPlayerPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.getVideoInfo=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getAdBreakInfo=function(){return null},b.prototype.getAdInfo=function(){return null},b.prototype.getChapterInfo=function(){return null},b.prototype.getQoSInfo=function(){return null},a.VideoPlayerPluginDelegate=b}(b),function(a,b){"use strict";function c(a){if(c.__super__.constructor.call(this,h),!a)throw new Error("PlayerPlugin delegate cannot be NULL.");this._delegate=a,this._isTrackingSessionActive=!1,this._isTrackingSessionStarted=!1,this._setupDataResolver()}var d=a.plugin.ParamMapping,e=a.Trigger,f=a.plugin.BasePlugin,g=b.VideoPlayerPluginConfig;
17226a.extend(c,f),c.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof g))throw new Error("Expected config data to be instance of VideoPlayerPluginConfig.");a.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure(debugLogging="+a.debugLogging+")")},c.prototype.bootstrap=function(a){c.__super__.bootstrap.call(this,a),this._registerCommands(),this._registerBehaviours()},c.prototype._cmdVideoIdleStart=function(a){this._logger.info(this._logTag,"#_cmdVideoIdleStart()"),this._videoIdle=!0},c.prototype._cmdVideoIdleResume=function(a){this._logger.info(this._logTag,"#_cmdVideoIdleResume()"),this._videoIdle&&(this._trigger(p),this._trigger(q),a.isInAd&&(this._trigger(x),this._isTrackingAdBreak=!0),a.isInAd&&(this._trigger(z),this._isTrackingAd=!0),a.isInChapter&&this._trigger(G),this._trigger(u)),this._videoIdle=!1},c.prototype.trackSessionStart=function(){if(this._logger.info(this._logTag,"#trackSessionStart()"),this._canProcess()){if(!this._isTrackingSessionActive)return void this._logger.warn(this._logTag,"#trackSessionStart() > No active tracking session.");if(this._isTrackingSessionStarted)return void this._logger.info(this._logTag,"#trackSessionStart() > Tracking session already started.");this._trigger(p),this._isTrackingSessionStarted=!0;var a=this._dataResolver(["video.resumed"]);a.hasOwnProperty("video.resumed")&&a["video.resumed"]&&this._trigger(q)}},c.prototype.trackVideoLoad=function(){this._logger.info(this._logTag,"#trackVideoLoad()"),this._canProcess()&&(this._isTrackingAdBreak=!1,this._isTrackingAd=!1,this._contentStarted=!1,this._isPaused=!0,this._isBuffering=!1,this._isSeeking=!1,this._playheadTimer=null,this._previousPlayhead=-1,this._stalledPlayheadCount=0,this._playheadStalled=!1,this._videoIdle=!1,this._trigger(m),this._isTrackingSessionActive=!0,this._isTrackingSessionStarted=!1)},c.prototype.trackVideoUnload=function(){if(this._logger.info(this._logTag,"#trackVideoUnload()"),this._canProcess()){if(!this._isTrackingSessionActive)return void this._logger.warn(this._logTag,"#trackVideoUnload() > No active tracking session.");this._stopPlayheadTimer(),this._trigger(n),this._isTrackingSessionActive=!1,this._isTrackingSessionStarted=!1,this._contentStarted=!1}},c.prototype.beginReporting=function(){this._logger.info(this._logTag,"#beginReporting()"),this._canProcess()&&this._startSessionIfNeeded("beginReporting")&&this._trigger(N)},c.prototype.trackPlay=function(){this._logger.info(this._logTag,"#trackPlay()"),this._canProcess()&&this._startSessionIfNeeded("trackPlay")&&this._allowPlayerStateChange()&&(this._isPaused=!1,this._trigger(u),this._startPlayheadTimer())},c.prototype.trackPause=function(){if(this._logger.info(this._logTag,"#trackPause()"),this._canProcess()&&this._startSessionIfNeeded("trackPause")&&this._allowPlayerStateChange()){this._stopPlayheadTimer();var a={};a[P]=!1,this._isPaused=!0,this._trigger(v,a)}},c.prototype.trackBufferStart=function(){this._logger.info(this._logTag,"#trackBufferStart()"),this._canProcess()&&this._startSessionIfNeeded("trackBufferStart")&&this._allowPlayerStateChange()&&(this._stopPlayheadTimer(),this._isBuffering=!0,this._trigger(C))},c.prototype.trackBufferComplete=function(){this._logger.info(this._logTag,"#trackBufferComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackBufferComplete")&&this._allowPlayerStateChange()&&(this._isBuffering=!1,this._trigger(D),this._startPlayheadTimer())},c.prototype.trackSeekStart=function(){this._logger.info(this._logTag,"#trackSeekStart()"),this._canProcess()&&this._startSessionIfNeeded("trackSeekStart")&&this._allowPlayerStateChange()&&(this._stopPlayheadTimer(),this._isSeeking=!0,this._trigger(E))},c.prototype.trackSeekComplete=function(){this._logger.info(this._logTag,"#trackSeekComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackSeekComplete")&&this._allowPlayerStateChange()&&(this._isSeeking=!1,this._trigger(F),this._startPlayheadTimer())},c.prototype.trackComplete=function(a,b){if(this._logger.info(this._logTag,"#trackComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackComplete")){if(this._stopPlayheadTimer(),this._videoIdle)return this._logger.info(this._logTag,"#trackComplete() > Video session is already in Idle State."),void(a&&a());var c={};c[O]=a,b=void 0===b||!!b,b?this._trigger(r,c):(this._trigger(s),this._trigger(o,c))}},c.prototype.trackTimedMetadata=function(a){this._logger.info(this._logTag,"#trackComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackTimedMetadata")&&this._trigger(t,a)},c.prototype.trackChapterStart=function(){this._logger.info(this._logTag,"#trackChapterStart()"),this._canProcess()&&this._startSessionIfNeeded("#trackChapterStart")&&this._trigger(G)},c.prototype.trackChapterComplete=function(){this._logger.info(this._logTag,"#trackChapterComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackChapterComplete")&&this._trigger(H)},c.prototype.trackChapterSkip=function(){this._logger.info(this._logTag,"#trackChapterSkip()"),this._canProcess()&&this._startSessionIfNeeded("trackChapterSkip")&&this._trigger(I)},c.prototype.trackAdBreakStart=function(){this._logger.info(this._logTag,"#trackAdBreakStart()"),this._canProcess()&&this._startSessionIfNeeded("trackAdBreakStart")&&(this._trigger(x),this._isTrackingAdBreak=!0)},c.prototype.trackAdBreakComplete=function(){this._logger.info(this._logTag,"#trackAdBreakComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackAdBreakComplete")&&(this._trigger(y),this._isTrackingAdBreak=!1)},c.prototype.trackAdStart=function(){this._logger.info(this._logTag,"#trackAdStart()"),this._canProcess()&&this._startSessionIfNeeded("trackAdStart")&&(this._trigger(z),this._isTrackingAd=!0)},c.prototype.trackAdComplete=function(){this._logger.info(this._logTag,"#trackAdComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackAdComplete")&&(this._trigger(A),this._isTrackingAd=!1)},c.prototype.trackAdSkip=function(){this._logger.info(this._logTag,"#trackAdSkip()"),this._canProcess()&&this._startSessionIfNeeded("trackAdSkip")&&(this._trigger(B),this._isTrackingAd=!1)},c.prototype.trackBitrateChange=function(){this._logger.info(this._logTag,"#trackBitrateChange()"),this._canProcess()&&this._startSessionIfNeeded("trackBitrateChange")&&this._trigger(J)}
17226,c.prototype.trackVideoPlayerError=function(a){if(this._logger.info(this._logTag,"#trackVideoPlayerError(errorId="+a+")"),this._startSessionIfNeeded("trackVideoPlayerError")){var b={};b[Q]=l,b[R]=a,this._trigger(K,b)}},c.prototype.trackApplicationError=function(a){if(this._logger.info(this._logTag,"#trackApplicationError(errorId="+a+")"),this._startSessionIfNeeded("trackApplicationError")){var b={};b[Q]=k,b[R]=a,this._trigger(K,b)}},c.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleVideoIdleStart",this._cmdVideoIdleStart),this._pluginManager.comply(this,"handleVideoIdleResume",this._cmdVideoIdleResume)},c.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new e(j,L),this,"handleVideoIdleStart"),this._pluginManager.registerBehaviour(new e(j,M),this,"handleVideoIdleResume",[new d(i,"ad.isInAdBreak","isInAdBreak"),new d(i,"ad.isInAd","isInAd"),new d(i,"chapter.isInChapter","isInChapter")])},c.prototype._setupDataResolver=function(){function a(){return g.video?g.video:(g.video=h._delegate.getVideoInfo(),h._logger.info(h._logTag,"Data from delegate > VideoInfo: "+g.video),g.video)}function b(){return g.ad?g.ad:(g.ad=h._delegate.getAdInfo(),h._logger.info(h._logTag,"Data from delegate > AdInfo: "+g.ad),g.ad)}function c(){return g.pod?g.pod:(g.pod=h._delegate.getAdBreakInfo(),h._logger.info(h._logTag,"Data from delegate > AdBreakInfo: "+g.pod),g.pod)}function d(){return g.chapter?g.chapter:(g.chapter=h._delegate.getChapterInfo(),h._logger.info(h._logTag,"Data from delegate > ChapterInfo: "+g.chapter),g.chapter)}function e(){return g.qos?g.qos:(g.qos=h._delegate.getQoSInfo(),h._logger.info(h._logTag,"Data from delegate > QoSInfo: "+g.qos),g.qos)}var f={},g={},h=this;f["video.id"]=function(){var b=a(),c=b?b.id:null;return h._logger.debug(h._logTag,"Resolving video.id: "+c),c},f["video.name"]=function(){var b=a(),c=b?b.name:null;return h._logger.debug(h._logTag,"Resolving video.name: "+c),c},f["video.length"]=function(){var b=a(),c=b?b.length:NaN;return h._logger.debug(h._logTag,"Resolving video.length: "+c),c},f["video.playerName"]=function(){var b=a(),c=b?b.playerName:null;return h._logger.debug(h._logTag,"Resolving video.playerName: "+c),c},f["video.mediaType"]=function(){var b=a(),c=b?b.mediaType:null;return h._logger.debug(h._logTag,"Resolving video.mediaType: "+c),c},f["video.streamType"]=function(){var b=a(),c=b?b.streamType:null;return h._logger.debug(h._logTag,"Resolving video.streamType: "+c),c},f["video.playhead"]=function(){var b=a(),c=b?b.playhead:NaN;return h._logger.debug(h._logTag,"Resolving video.playhead: "+c),c},f["video.resumed"]=function(){var b=a(),c=!!b&&b.resumed;return h._logger.debug(h._logTag,"Resolving video.resumed: "+c),c},f["video.playheadStalled"]=function(){return this._playheadStalled},f["pod.name"]=function(){var a=c(),b=a?a.name:null;return h._logger.debug(h._logTag,"Resolving pod.name: "+b),b},f["pod.playerName"]=function(){var a=c(),b=a?a.playerName:null;return h._logger.debug(h._logTag,"Resolving pod.playerName: "+b),b},f["pod.position"]=function(){var a=c(),b=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving pod.position: "+b),b},f["pod.startTime"]=function(){var a=c(),b=a?a.startTime:NaN;return h._logger.debug(h._logTag,"Resolving pod.startTime: "+b),b},f["ad.isInAd"]=function(){var a=b(),c=null!=a;return h._logger.debug(h._logTag,"Resolving ad.isInAd: "+c),c},f["ad.isInAdBreak"]=function(){var a=c(),b=null!=a;return h._logger.debug(h._logTag,"Resolving ad.isInAdBreak: "+b),b},f["ad.id"]=function(){var a=b(),c=a?a.id:null;return h._logger.debug(h._logTag,"Resolving ad.id: "+c),c},f["ad.name"]=function(){var a=b(),c=a?a.name:null;return h._logger.debug(h._logTag,"Resolving ad.name: "+c),c},f["ad.length"]=function(){var a=b(),c=a?a.length:NaN;return h._logger.debug(h._logTag,"Resolving ad.length: "+c),c},f["ad.position"]=function(){var a=b(),c=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving ad.position: "+c),c},f["ad.granularTracking"]=function(){var a=b(),c=!!a&&a.granularTracking;return h._logger.debug(h._logTag,"Resolving ad.granularTracking: "+c),c},f["ad.trackingInterval"]=function(){var a=T;return h._logger.debug(h._logTag,"Resolving ad.trackingInterval: "+a),a},f["chapter.isInChapter"]=function(){var a=d(),b=null!=a;return h._logger.debug(h._logTag,"Resolving chapter.isInChapter: "+b),b},f["chapter.name"]=function(){var a=d(),b=a?a.name:null;return h._logger.debug(h._logTag,"Resolving chapter.name: "+b),b},f["chapter.length"]=function(){var a=d(),b=a?a.length:NaN;return h._logger.debug(h._logTag,"Resolving chapter.length: "+b),b},f["chapter.position"]=function(){var a=d(),b=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving chapter.position: "+b),b},f["chapter.startTime"]=function(){var a=d(),b=a?a.startTime:NaN;return h._logger.debug(h._logTag,"Resolving chapter.startTime: "+b),b},f["qos.bitrate"]=function(){var a=e(),b=a?a.bitrate:NaN;return h._logger.debug(h._logTag,"Resolving qos.bitrate: "+b),b},f["qos.fps"]=function(){var a=e(),b=a?a.fps:NaN;return h._logger.debug(h._logTag,"Resolving qos.fps: "+b),b},f["qos.droppedFrames"]=function(){var a=e(),b=a?a.droppedFrames:NaN;return h._logger.debug(h._logTag,"Resolving qos.droppedFrames: "+b),b},f["qos.startupTime"]=function(){var a=e(),b=a?1e3*a.startupTime:NaN;return h._logger.debug(h._logTag,"Resolving qos.startupTime: "+b),b}
17226,this._dataResolver=function(a){if(!a||0==a.length)return null;g={};for(var b=null,c=0;c<a.length;c++){var d=a[c];b=b||{},b[d]=f.hasOwnProperty(d)?f[d].call(this):null}return b}},c.prototype._trackPlayheadStall=function(){this._canProcess()&&(this._playheadStalled||(this._logger.info(this._logTag,"#_trackPlayheadStall()"),this._stalledPlayheadCount=0,this._playheadStalled=!0,this._trigger(v)))},c.prototype._trackExitStall=function(){this._canProcess()&&(this._stalledPlayheadCount=0,!this._playheadStalled||this._isPaused||this._isSeeking||this._isBuffering||(this._logger.info(this._logTag,"#_trackExitStall()"),this._playheadStalled=!1,this._trigger(u)))},c.prototype._startPlayheadTimer=function(){var a=this;this._playheadTimer||this._isPaused||this._isSeeking||this._isBuffering||(this._playheadTimer=setInterval(function(){if(a._canProcess()){var b=a._dataResolver(["ad.isInAd","video.playhead"]);if(a._isTrackingAdBreak)a._playheadStalled&&a._trackExitStall();else{var c=b["video.playhead"];c!=a._previousPlayhead?a._trackExitStall():a._previousPlayhead>=0&&c==a._previousPlayhead&&++a._stalledPlayheadCount==U&&a._trackPlayheadStall(),c!=a._previousPlayhead&&c>0&&!a._contentStarted&&(a._isPaused||a._isBuffering||a._isSeeking||(a._logger.info(a._logTag,"#_playheadTimer playhead progress to: "+c),a._trigger(w),a._contentStarted=!0)),a._previousPlayhead=c}}},S))},c.prototype._stopPlayheadTimer=function(){this._playheadTimer&&(clearInterval(this._playheadTimer),this._playheadTimer=null),this._trackExitStall()},c.prototype._startSessionIfNeeded=function(a){return this._isTrackingSessionActive?(this._isTrackingSessionStarted||(this._logger.info(this._logTag,"#"+a+"() > Tracking session auto-start."),this.trackSessionStart()),!0):(this._logger.warn(this._logTag,"#"+a+"() > No active tracking session."),!1)},c.prototype._allowPlayerStateChange=function(){return!(this._isTrackingAdBreak&&!this._isTrackingAd)||(this._logger.info(this._logTag,"_allowPlayerStateChange Player plugin does not allow player state changes when in Adbreak and not in Ad."),!1)};var h="player",i=h,j="adobe-heartbeat",k="sourceErrorExternal",l="sourceErrorSDK",m="video_load",n="video_unload",o="video_session_end",p="video_start",q="video_resume",r="video_complete",s="video_skip",t="timed_metadata",u="play",v="pause",w="content_start",x="adbreak_start",y="adbreak_complete",z="ad_start",A="ad_complete",B="ad_ski
17226p",C="buffer_start",D="buffer_complete",E="seek_start",F="seek_complete",G="chapter_start",H="chapter_complete",I="chapter_skip",J="bitrate_change",K="track_error",L="video_idle_start",M="video_idle_resume",N="video_begin_reporting",O="callback",P="filter_report",Q="source",R="error_id",S=1001,T=1,U=2;b.VideoPlayerPlugin=c}(a.ADB.core,b),a.ADB.va.plugins.videoplayer||(a.ADB.va.plugins.videoplayer=b)}(this); 17227 17228// AdobeHeartbeatPlugin 17229!function(a){if(void 0===b)var b={};b.clock||(b.clock={}),b.context||(b.context={}),b.filter||(b.filter={}),b.model||(b.model={}),b.network||(b.network={}),function(a,b){"use strict";function c(a,b,c,d,e){if(!b)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=b,!a)throw new Error("Reference to the pluginManager object cannot be NULL");if(this._pluginManager=a,!e)throw new Error("Reference to the logger object cannot be NULL");this._logTag="ah::Timer."+c,this._logger=e,this._isDestroyed=!1,this._createTimer(c,d),this._installHandlers()}var d=a.Event;c.KEY_NAME="name",c.KEY_INTERVAL="interval",c.KEY_RESET="reset",c.prototype.resume=function(a){this._logger.debug(this._logTag,"Starting timer: "+this._name);var b={};b[c.KEY_NAME]=e+"."+this._name,b[c.KEY_RESET]=a,this._pluginManager.command(f,i,b)},c.prototype.pause=function(a){this._logger.debug(this._logTag,"Stopping timer: "+this._name);var b={};b[c.KEY_NAME]=e+"."+this._name,b[c.KEY_RESET]=a,this._pluginManager.command(f,h,b)},c.prototype.destroy=function(){if(!this._isDestroyed){this._isDestroyed=!0,this._uninstallHandlers();var a={};a[c.KEY_NAME]=e+"."+this._name,this._pluginManager.command(f,j,a)}},c.prototype.setInterval=function(a){var b=k+"."+e+"."+this._name,c=this._pluginManager.request(f,[b])[b];this.pause(!0),this._createTimer(this._name,a),c||this.resume(!0)},c.prototype._cmdResume=function(a){var b=!1;null!=a&&a.hasOwnProperty(c.KEY_RESET)&&(b=a[c.KEY_RESET]),this.resume(b)},c.prototype._cmdPause=function(a){var b=!1;null!=a&&a.hasOwnProperty(c.KEY_RESET)&&(b=a[c.KEY_RESET]),this.pause(b)}
17229,c.prototype._onTick=function(a,b){this._channel.trigger(new d("clock:"+this._name+".tick",b))},c.prototype._installHandlers=function(){this._channel.comply("clock:"+this._name+".resume",this._cmdResume,this),this._channel.comply("clock:"+this._name+".pause",this._cmdPause,this),this._pluginManager.on(f,e+"."+this._name+".tick",this._onTick,this)},c.prototype._uninstallHandlers=function(){this._channel.off(null,null,this),this._pluginManager.off(null,null,null,this)},c.prototype._createTimer=function(a,b){this._name=a,this._interval=b;var d={};d[c.KEY_NAME]=e+"."+this._name,d[c.KEY_INTERVAL]=this._interval,this._pluginManager.command(f,g,d)};var e="heartbeat",f="service.clock",g="create",h="pause",i="resume",j="destroy",k="is_paused";b.clock.Timer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,f,h,d)}var d=a.Event,e=b.clock.Timer;a.extend(c,e),c.prototype._onCheckStatusComplete=function(a){var b=a.data[l];if(this._logger.debug(this._logTag,"#_onCheckStatusComplete(interval="+b+")"),b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed.");b>g?(this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Interval value too large: "+b),this.setInterval(g)):(this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval changed to: "+b),this.setInterval(b))}else this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Invalid interval value."),this.setInterval(h)},c.prototype._getSettings=function(a){this._logger.debug(this._logTag,"#_getSettings()"),this._channel.trigger(new d(i))},c.prototype._installHandlers=function(){c.__super__._installHandlers.call(this),this._channel.on(j,this._getSettings,this),this._channel.on(k,this._onCheckStatusComplete,this),this._channel.reply(l,function(){return this._interval},this)};var f="check_status",g=600,h=180,i="clock:check_status.tick",j="clock:check_status.get_settings",k="net:check_status_complete",l="check_status_interval";b.clock.CheckStatusTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d),this._doNotOverrideInterval=!1}var d=b.clock.Timer;a.extend(c,d),c.prototype._onCheckStatusComplete=function(a){var b=a.data[g];if(this._logger.debug(this._logTag,"#_onCheckStatusComplete(interval="+b+")"),this._doNotOverrideInterval)this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed. (doNotOverrideInterval = true)");else if(b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed.");this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval changed to: "+b),this.setInterval(b)}
17229else this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Invalid interval value."),this.setInterval(f)},c.prototype._onUpdateReportingInterval=function(a){var b=a.data[g];if(this._doNotOverrideInterval=!!a.data[h],this._logger.debug(this._logTag,"#_onUpdateReportingInterval(interval="+b+", doNotOverrideInterval="+this._doNotOverrideInterval+")"),b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onUpdateReportingInterval() > Interval value not changed.");this._logger.debug(this._logTag,"#_onUpdateReportingInterval() > Interval changed to: "+b),this.setInterval(b)}else this._logger.warn(this._logTag,"#_onUpdateReportingInterval() > Invalid interval value."),this.setInterval(f)},c.prototype._installHandlers=function(){c.__super__._installHandlers.call(this),this._channel.on(j,this._onCheckStatusComplete,this),this._channel.on(i,this._onUpdateReportingInterval,this),this._channel.reply(g,function(){return this._interval},this)};var e="reporting",f=10,g="reporting_interval",h="do_not_override_interval",i="reporting:update_interval",j="net:check_status_complete";b.clock.ReportingTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d)}var d=b.clock.Timer;a.extend(c,d);var e="idle",f=1800;b.clock.IdleTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d)}var d=b.clock.Timer;a.extend(c,d);var e="flush_filter",f=.25;b.clock.FlushFilterTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,c){if(!a)throw new Error("Reference to the pluginManager object cannot be NULL");if(!b)throw new Error("Reference to the channel object cannot be NULL");if(!c)throw new Error("Reference to the logger object cannot be NULL");this._isDestroyed=!1,this._reportingTimer=new f(a,b,c),this._checkStatusTimer=new d(a,b,c),this._flushFilterTimer=new e(a,b,c),this._idleTimer=new g(a,b,c)}var d=b.clock.CheckStatusTimer,e=b.clock.FlushFilterTimer,f=b.clock.ReportingTimer,g=b.clock.IdleTimer;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._reportingTimer.destroy(),this._checkStatusTimer.destroy(),this._flushFilterTimer.destroy(),this._idleTimer.destroy())},b.clock.Clock=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){this.value=a,this.hint=b}function d(a){this.realm=a,this.data={}}c.HINT_SHORT="short",d.prototype.setField=function(a,b,d){this.data[a]=new c(b,d)},d.prototype._createAccessor=function(a,b,c){var d=this;return function(){return arguments.length&&(d[a]=arguments[0],d.setField(b,arguments[0],c)),d[a]}},b.model.Dao=d,b.model.DaoField=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"asset"),this.adId=this._createAccessor("_adId","ad_id",null),this.sid=this._createAccessor("_sid","ad_sid",null),this.resolver=this._createAccessor("_resolver","resolver",null),this.podId=this._createAccessor("_podId","pod_id",null),this.podPosition=this._createAccessor("_podPosition","pod_position",null),this.podOffset=this._createAccessor("_podOffset","pod_offset",null),this.podName=this._createAccessor("_podName","pod_name",null),this.adLength=this._createAccessor("_adLength","ad_length",null),this.adName=this._createAccessor("_adName","ad_name",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.adId(a.adId()),this.sid(a.sid()),this.resolver(a.resolver()),this.podId(a.podId()),this.podPosition(a.podPosition()),this.podOffset(a.podOffset()),this.podName(a.podName()),this.adLength(a.adLength()),this.adName(a.adName())}else this.adId(""),this.sid(""),this.resolver(""),this.podId(""),this.podPosition(""),this.podOffset(0),this.podName(""),this.adLength(0),this.adName("")}var d=b.model.Dao;a.extend(c,d),b.model.AdDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"sc"),this.reportSuiteId=this._createAccessor("_reportSuiteId","rsid",null),this.trackingServer=this._createAccessor("_trackingServer","tracking_server",null),this.ssl=this._createAccessor("_ssl","ssl",e.HINT_SHORT),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.reportSuiteId(a.reportSuiteId()),this.trackingServer(a.trackingServer()),this.ssl(a.ssl())}else this.reportSuiteId(""),this.trackingServer(""),this.ssl(0)}var d=b.model.Dao,e=b.model.DaoField;a.extend(c,d),b.model.AdobeAnalyticsDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.id=this._createAccessor("_id","chapter_id",null),this.sid=this._createAccessor("_sid","chapter_sid",null),this.name=this._createAccessor("_name","chapter_name",null),this.position=this._createAccessor("_position","chapter_pos",null),this.length=this._createAccessor("_length","chapter_length",null),this.offset=this._createAccessor("_offset","chapter_offset",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.id(a.id()),this.sid(a.sid()),this.name(a.name()),this.position(a.position()),this.length(a.length()),this.offset(a.offset())}else this.id(""),this.sid(""),this.name(""),this.position(0),this.length(0),this.offset(0)}var d=b.model.Dao;a.extend(c,d),b.model.ChapterDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"asset"),this.type=this._createAccessor("_type","type",null),this.videoId=this._createAccessor("_videoId","video_id",null),this.publisher=this._createAccessor("_publisher","publisher",null),this.adData=this._createAccessor("_adData","ad_data",null),this.chapterData=this._createAccessor("_chapterData","chapter_data",null),this.length=this._createAccessor("_length","length",null),this.name=this._createAccessor("_name","name",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type()),this.name(a.name()),this.videoId(a.videoId()),this.publisher(a.publisher()),this.length(a.length());var b=a.adData()?new e(a.adData()):null;this.adData(b);var d=a.chapterData()?new f(a.chapterData()):null;this.chapterData(d)}else this.type(""),this.name(""),this.videoId(""),this.publisher(""),this.length(0),this.adData(null),this.chapterData(null)}var d=b.model.Dao,e=b.model.AdDao,f=b.model.ChapterDao;a.extend(c,d),c.TYPE_AD="ad",c.TYPE_MAIN_CONTENT="main",b.model.AssetDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"event"),this.type=this._createAccessor("_type","type",null),this.duration=this._createAccessor("_duration","duration",null),this.playhead=this._createAccessor("_playhead","playhead",null),this.id=this._createAccessor("_id","id",null),this.source=this._createAccessor("_source","source",null),this.ts=this._createAccessor("_ts","ts",null),this.prevTs=this._createAccessor("_prevTs","prev_ts",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type()),this.duration(a.duration()),this.playhead(a.playhead()),this.id(a.id()),this.source(a.source()),this.ts(a.ts()),this.prevTs(a.prevTs())}else this.type(""),this.duration(0),this.playhead(0),this.id(""),this.source(""),this.ts(0),this.prevTs(-1)}var d=b.model.Dao;a.extend(c,d),c.EVENT_TYPE_AA_START="aa_start",c.EVENT_TYPE_AA_AD_START="aa_ad_start",c.EVENT_TYPE_START="start",c.EVENT_TYPE_RESUME="resume",c.EVENT_TYPE_CHAPTER_START="chapter_start",c.EVENT_TYPE_CHAPTER_COMPLETE="chapter_complete",c.EVENT_TYPE_CHAPTER_SKIP="chapter_skip",c.EVENT_TYPE_PLAY="play",c.EVENT_TYPE_PAUSE="pause",c.EVENT_TYPE_STALL="stall",c.EVENT_TYPE_BUFFER="buffer",c.EVENT_TYPE_BITRATE_CHANGE="bitrate_change",c.EVENT_TYPE_ERROR="error",c.EVENT_TYPE_COMPLETE="complete",c.EVENT_TYPE_SKIP="skip",c.EVENT_TYPE_END="end",b.model.EventDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.bitrate=this._createAccessor("_bitrate","bitrate",null),this.fps=this._createAccessor("_fps","fps",null),this.droppedFrames=this._createAccessor("_droppedFrames","dropped_frames",null),this.startupTime=this._createAccessor("_startup_time","startup_time",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.bitrate(a.bitrate()),this.fps(a.fps()),this.droppedFrames(a.droppedFrames()),this.startupTime(a.startupTime()),this.isStartupTimeOverridden=a.isStartupTimeOverridden}else this.bitrate(0),this.fps(0),this.droppedFrames(0),this.startupTime(0),this.isStartupTimeOverridden=!1}var d=b.model.Dao;a.extend(c,d),b.model.QoSDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"sp"),this.ovp=this._createAccessor("_ovp","ovp",null),this.sdk=this._createAccessor("_sdk","sdk",null),this.channel=this._createAccessor("_channel","channel",null),this.playerName=this._createAccessor("_playerName","player_name",null),this.libVersion=this._createAccessor("_libVersion","hb_version",null),this.apiLevel=this._createAccessor("_apiLevel","hb_api_lvl",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.ovp(a.ovp()),this.sdk(a.sdk()),this.channel(a.channel()),this.playerName(a.playerName()),this.libVersion(a.libVersion()),this.apiLevel(a.apiLevel())}else this.ovp(e),this.sdk(e),this.channel(e),this.playerName(""),this.libVersion(""),this.apiLevel(0)}var d=b.model.Dao;a.extend(c,d);var e="unknown";b.model.ServiceProviderDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"event"),this.sessionId=this._createAccessor("_sessionId","sid",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.sessionId(a.sessionId())}else this.sessionId(null)}var d=b.model.Dao;a.extend(c,d),b.model.SessionDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.type=this._createAccessor("_type","type",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type())}else this.type(null)}var d=b.model.Dao;a.extend(c,d),b.model.StreamDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"user"),this.analyticsVisitorId=this._createAccessor("_analyticsVisitorId","aid",null),this.marketingCloudVisitorId=this._createAccessor("_marketingCloudVisitorId","mid",null),this.visitorId=this._createAccessor("_visitorId","id",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.analyticsVisitorId(a.analyticsVisitorId()),this.marketingCloudVisitorId(a.marketingCloudVisitorId()),this.visitorId(a.visitorId())}else this.analyticsVisitorId(null),this.marketingCloudVisitorId(null),this.visitorId(null)}var d=b.model.Dao;a.extend(c,d),b.model.UserDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"aam"),this.audienceManagerBlob=this._createAccessor("_audienceManagerBlob","blob",null),this.audienceManagerLocationHint=this._createAccessor("_audienceManagerLocationHint","loc_hint",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.audienceManagerBlob(a.audienceManagerBlob()),this.audienceManagerLocationHint(a.audienceManagerLocationHint())}else this.audienceManagerBlob(null),this.audienceManagerLocationHint(null)}var d=b.model.Dao;a.extend(c,d),b.model.AudienceManagerDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,c,i,j){this.eventData=new e,this.eventData.type(b),this.eventData.duration(0),this.eventData.ts((new Date).getTime()),this.eventData.playhead(c),this.assetData=new f(a._assetData),this.streamData=new g(a._streamData),this.qosData=new h(a._qosData),this.cuserData=d.clone(a._cuserData),this.meta=i,this.callback=j,this.filterReport=!0}var d=a.ObjectUtils,e=b.model.EventDao,f=b.model.AssetDao,g=b.model.StreamDao,h=b.model.QoSDao;b.model.TrackItem=c}(a.ADB.va.utils,b),function(a,b){"use strict";function c(a,b,c,i,j,k){this.adobeAnalyticsData=a,this.userData=b,this.aamData=c,this.serviceProviderData=i,this.sessionData=j,this.eventData=new e(k.eventData),this.assetData=new f(k.assetData),this.streamData=new g(k.streamData),this.qosData=new h(k.qosData),this.cuserData=d.clone(k.cuserData),this.meta=d.clone(k.meta),this.callback=k.callback,this.filterReport=k.filterReport}var d=a.ObjectUtils,e=b.model.EventDao,f=b.model.AssetDao,g=b.model.StreamDao,h=b.model.QoSDao;b.model.CUserDao;b.model.Report=c}(a.ADB.va.utils,b),function(a){"use strict";function b(){}b.prototype.serializeReport=function(a){},b.prototype.serializeDao=function(a){},b.prototype.serializeMap=function(a){},b.prototype.serializeNumber=function(a,b,c,d){},b.prototype.serializeString=function(a,b,c,d){}
17229,a.model.ISerializer=b}(b),function(a,b){"use strict";function c(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a}var d=b.model.Dao,e=b.model.DaoField,f=b.model.ISerializer;a.extend(c,f),c.prototype.serializeReport=function(a){var b=[];return b.push(this.serializeDao(a.adobeAnalyticsData)),b.push(this.serializeDao(a.userData)),b.push(this.serializeDao(a.aamData)),b.push(this.serializeMap(a.cuserData,"cuser")),b.push(this.serializeDao(a.serviceProviderData)),b.push(this.serializeDao(a.sessionData)),b.push(this.serializeDao(a.eventData)),b.push(this.serializeDao(a.assetData)),b.push(this.serializeDao(a.streamData)),b.push(this.serializeDao(a.qosData)),b.push(this.serializeMap(a.meta,"meta")),{serializedOutput:b.filter(function(a){return!!a}).join("&"),callback:a.callback}},c.prototype.serializeDao=function(a){return this._processDao(a).filter(function(a){return!!a}).join("&")},c.prototype.serializeMap=function(a,b){var c=[],d=b||"meta";for(var e in a)a.hasOwnProperty(e)&&a[e]&&c.push("s:"+d+":"+e+"="+window.encodeURIComponent(a[e]));return c.join("&")},c.prototype.serializeNumber=function(a,b,c,d){var f=h;return null==b||isNaN(b)?null:(d===e.HINT_SHORT&&(f=i),f+":"+c+":"+a+"="+Math.floor(b))},c.prototype.serializeString=function(a,b,c,d){return b?j+":"+c+":"+a+"="+window.encodeURIComponent(b):null},c.prototype._processDao=function(a){var b=[];for(var c in a.data)if(a.data.hasOwnProperty(c)){var e=a.data[c],f=e.value,h=e.hint,i=null,j=a.realm;if(null==f)continue;"number"==typeof f?i=this.serializeNumber(c,f,j,h):"string"==typeof f?i=this.serializeString(c,f,j,h):f instanceof d?i=this.serializeDao(f):this._logger.warn(g,"#_processDao() > Unable to serialize DAO. Field: "+c+". Value: "+f+"."),i&&b.push(i)}return b};var g="ah::QuerystringSerializer",h="l",i="h",j="s";b.model.QuerystringSerializer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(!a)throw new Error("Reference to the data object cannot be NULL");if(this._data=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b}c.prototype.parse=function(){var a,b,c,j,k,l;if(window.DOMParser){l=(new window.DOMParser).parseFromString(this._data,"text/xml")}else l=new window.ActiveXObject("Microsoft.XMLDOM"),l.async=!1,l.loadXML(this._data);var m;m=parseInt(l.getElementsByTagName("trackingInterval")[0].childNodes[0].nodeValue,10),m&&(a=m),m=parseInt(l.getElementsByTagName("setupCheckInterval")[0].childNodes[0].nodeValue,10),m&&(b=m),m=parseInt(l.getElementsByTagName("trackExternalErrors")[0].childNodes[0].nodeValue,10),m&&(c=1==m),l.getElementsByTagName("trackingDisabled")[0]&&(m=parseInt(l.getElementsByTagName("trackingDisabled")[0].childNodes[0].nodeValue,10),j=1==m),l.getElementsByTagName("nielsenEnabled")[0]?(m=parseInt(l.getElementsByTagName("nielsenEnabled")[0].childNodes[0].nodeValue,10),k=1==m):k=!0;var n={};return n[e]=a,n[f]=b,n[g]=c,n[i]=j,n[h]=k,this._logger.debug(d,"#parse() > Obtained configuration settings."),n};var d="ah::SettingsParser",e="reporting_interval",f="check_status_interval",g="track_external_errors",h="nielsen_enabled",i="tracking_disabled";b.network.SettingsParser=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(this._trackingServer=null,this._checkStatusServer=null,this._publisher=null,this._isConfigured=!1,this._isDestroyed=!1,this._beginReporting=!1,this._sendingRequest=!1,this._requestsQueue=[],this._quietMode=!1,this._prevReportSent=null,!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._serializer=new i(b),this._installEventListeners()}var d=a.Event,e=a.URLRequestMethod,f=a.URLRequest,g=a.URLLoader,h=b.network.SettingsParser,i=b.model.QuerystringSerializer;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(j,"#destroy()"),this._uninstallEventListeners())},c.prototype._onApiConfig=function(a){var b=a.data;this._logger.debug(j,"#_onApiConfig(sb_server="+b[k]+", check_status_server="+b[l]+", publisher="+b[m]+", quiet_mode="+b[n]+", ssl="+b[o]+")"),this._trackingServer=this._updateRequestProtocol(b[k],b[o]),this._checkStatusServer=this._updateRequestProtocol(b[l],b[o]),this._publisher=b[m],this._quietMode=b[n],this._isConfigured=!0},c.prototype._onBeginReporting=function(a){this._logger.debug(j,"#_onBeginReporting()"),this._beginReporting=!0,this._sendNextRequest(),this._onClockCheckStatusTick()},c.prototype._onFilterReportAvailable=function(a){var b=a.data;if(!this._isConfigured)return void this._logger.warn(j,"#_onFilterReportAvailable() > Unable to send request: not configured.");var c=b[p];if(this._prevReportSent&&this._prevReportSent.eventData&&c.eventData&&this._prevReportSent.eventData.playhead==c.eventData.playhead&&this._prevReportSent.eventData.ts==c.eventData.ts&&this._prevReportSent.eventData.prevTs==c.eventData.prevTs&&this._prevReportSent.eventData.type==c.eventData.type)return void this._logger.debug(j,"#_onFilterReportAvailable() > Duplicate heartbeat report not sent for URL:\n"+e);this._prevReportSent=c;var d=this._serializer.serializeReport(c),e=this._trackingServer+"/?"+d.serializedOutput;this._processRequest(e,d.callback)},c.prototype._processRequest=function(a,b){this._requestsQueue.push({url:a,callback:b}),this._sendNextRequest()},c.prototype._sendNextRequest=function(){if(!this._beginReporting)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we have not started reporting.");if(this._sendingRequest)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we are currently sending a request.");var a=this._requestsQueue.shift();if(!a)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we have no requests to send.");this._sendingRequest=!0,this._logger.debug(j,"#_sendNextRequest() > "+a.url);var b=this,c=new g,h=function(){c.close(),a.callback&&a.callback.call(null),b._sendingRequest=!1,b._sendNextRequest()},i=function(a){h()},k=function(a){b._logger.warn(j,"#_onFilterReportAvailable() > Failed to send heartbeat report."),h()};if(!this._quietMode){c.addEventListener(d.SUCCESS,i,this),c.addEventListener(d.ERROR,k,this);var l=new f(a.url,e.GET);c.load(l)}},c.prototype._onClockCheckStatusTick=function(a){function b(a){if(a.data){var b=new h(a.data.response,i._logger),c=b.parse();c?i._channel.trigger(new d(u,c)):i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to parse the config. settings.")}n.close()}function c(a){i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to obtain the config. settings."),n.close()}if(!this._isConfigured)return void this._logger.warn(j,"#_onClockCheckStatusTick() > Unable to send request: not configured.");
17229if(!this._publisher)return void this._logger.warn(j,"#_onClockCheckStatusTick() > Publisher is NULL.");if(!this._beginReporting)return void this._logger.debug(j,"#_onClockCheckStatusTick() > Exiting as we have not started reporting.");var i=this,k=this._publisher.replace(/[^a-zA-Z0-9]+/,"-").toLocaleLowerCase(),l=this._checkStatusServer+k+".xml?r="+(new Date).getTime(),m=new f(l,e.GET),n=new g;n.addEventListener(d.SUCCESS,b,this),n.addEventListener(d.ERROR,c,this),this._logger.debug(j,"#_onClockCheckStatusTick() > Get new settings from: "+l),n.load(m)},c.prototype._updateRequestProtocol=function(a,b){var c=a;return 0===c.indexOf("http://")?c=c.slice(7):0===c.indexOf("https://")&&(c=c.slice(8)),b?"https://"+c:"http://"+c},c.prototype._installEventListeners=function(){this._channel.on(q,this._onApiConfig,this),this._channel.on(r,this._onBeginReporting,this),this._channel.on(s,this._onFilterReportAvailable,this),this._channel.on(t,this._onClockCheckStatusTick,this)},c.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)};var j="ah::Network",k="tracking_server",l="check_status_server",m="publisher",n="quiet_mode",o="ssl",p="report",q="api:config",r="api:video_begin_reporting",s="filter:data_available",t="clock:check_status.tick",u="net:check_status_complete";b.network.Network=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._isDestroyed=!1,this._isBufferingInProgress=!1,this._reportBuffer={},this._tsHistory={},this._workQueue=new i,this._installEventListeners()}function d(a){var b=[];return a&&a.forEach(function(a){a.eventData.type()==k.EVENT_TYPE_PAUSE||a.eventData.type()==k.EVENT_TYPE_STALL||a.eventData.type()==k.EVENT_TYPE_BUFFER?(!a.filterReport||a.eventData.duration()>u)&&b.push(a):b.push(a)}),b}function e(a){var b=-1,c=-1,d=[];return a.forEach(function(a){a.eventData.type()==k.EVENT_TYPE_START?a.assetData.type()==l.TYPE_MAIN_CONTENT?-1==b?b=d.push(a)-1:(a.eventData.prevTs(-1),d[b]=a):-1==c?c=d.push(a)-1:(a.eventData.prevTs(-1),d[c]=a):d.push(a)}),d}function f(a){var b=[];return a.forEach(function(c){if(c.eventData.type()==k.EVENT_TYPE_PLAY){if(c.eventData.duration()>t)b.push(c);else if(0==c.eventData.duration()&&c.assetData.type()==l.TYPE_MAIN_CONTENT){var d=g(a);d.indexOf(c)==d.length-1&&b.push(c)}}else b.push(c)}),b}function g(a){var b=[];return a.forEach(function(a){a.eventData.type()!=k.EVENT_TYPE_PLAY&&a.eventData.type()!=k.EVENT_TYPE_BUFFER&&a.eventData.type()!=k.EVENT_TYPE_START||b.push(a)}),b}var h=a.radio.Command,i=a.radio.CommandQueue,j=a.Event,k=b.model.EventDao,l=b.model.AssetDao;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(w,"#destroy()"),this._uninstallEventListeners(),this.clear())},c.prototype.clear=function(){this._logger.debug(w,"#clear()"),this._workQueue.cancelAllCommands(),this._reportBuffer={},this._tsHistory={},this._isBufferingInProgress=!1},c.prototype.flush=function(){this._workQueue.addCommand(new h(this._flushBufferReport,this))},c.prototype._bufferReport=function(a){if(!this._isDestroyed){var b=a[q];if(b){var c=b.sessionData.sessionId();this._reportBuffer[c]=this._reportBuffer[c]||[],this._reportBuffer[c].push(b)}if(!this._isBufferingInProgress){this._isBufferingInProgress=!0;var d={};d[p]=!0,d[r]=1,this._channel.command(s,d)}}},c.prototype._flushBufferReport=function(){function a(a){if(a)for(var c=0;c<a.length;c++){var d=a[c],e=d.sessionData.sessionId();b._tsHistory[e]=b._tsHistory[e]||{};var f=d.eventData.type()+"."+(d.assetData.type()==l.TYPE_AD?d.assetData.adData().adId():d.assetData.videoId());b._tsHistory[e].hasOwnProperty(f)&&d.eventData.prevTs(b._tsHistory[e][f]),b._tsHistory[e][f]=d.eventData.ts()}}if(!this._isDestroyed){var b=this;for(var c in this._reportBuffer)if(this._reportBuffer.hasOwnProperty(c)){var g=f(e(d(this._reportBuffer[c])));a(g);for(var h=0;h<g.length;h++){var i=g[h],k={};k[q]=i,this._channel.trigger(new j(n,k))}}this._reportBuffer={};var m=this._channel.request(v),o=this._tsHistory[m]||{};this._tsHistory={},this._tsHistory[m]=o,this._isBufferingInProgress=!1}},c.prototype._onContextReportAvailable=function(a){var b=a.data;this._workQueue.addCommand(new h(this._bufferReport,this,[b]))},c.prototype._onClockFlushFilterTick=function(a){this.flush()},c.prototype._installEventListeners=function(){this._channel.on(m,this._onContextReportAvailable,this),this._channel.on(o,this._onClockFlushFilterTick,this)},c.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)};var m="context:report_available",n="filter:data_available",o="clock:flush_filter.tick",p="reset",q="report",r="repeat_count",s="clock:flush_filter.resume",t=250,u=250,v="session_id",w="ah::ReportFilter";b.filter.ReportFilter=c}(a.ADB.core,b),function(a,b){"use strict";
17229function c(a,b){this._onFail={fn:a,ctx:b}}var d=a.ErrorInfo;c.prototype.validateFields=function(a,b){if(!a)return this._fail("Data cannot be null");if(b)for(var c=0;c<b.length;c++){var d=b[c];switch(d){case"videoId":if(!a.hasOwnProperty("videoId"))return this._fail("The ID for the main video must be specified.");if("string"!=typeof a.videoId)return this._fail("The ID for the main video must be a String.");if(""===a.videoId)return this._fail("The ID for the main video cannot be an empty string.");break;case"streamType":if(!a.hasOwnProperty("streamType"))return this._fail("The stream type for the main video must be specified.");if("string"!=typeof a.streamType)return this._fail("The stream type for the main video must be a String.");if(""===a.streamType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"videoLength":if(!a.hasOwnProperty("videoLength"))return this._fail("The length of the main video must be specified.");if("number"!=typeof a.videoLength)return this._fail("The length of the main video must be a Number.");if(isNaN(a.videoLength))return this._fail("The length of the main video cannot be NaN.");break;case"playhead":if(!a.hasOwnProperty("playhead"))return this._fail("The playhead for the main video must be specified.");if("number"!=typeof a.playhead)return this._fail("The playhead for the main video must be a Number.");if(isNaN(a.playhead))return this._fail("The playhead for the main video cannot be NaN.");break;case"playerName":if(!a.hasOwnProperty("playerName"))return this._fail("The player name for the main video must be specified.");if("string"!=typeof a.playerName)return this._fail("The player name for the main video must be a String.");if(""===a.playerName)return this._fail("The player name for the main video cannot be an empty string.");break;case"rsid":if(!a.hasOwnProperty("rsid"))return this._fail("account (rsid) is required and has to be set in the AppMeasurement instance.");if("string"!=typeof a.rsid)return this._fail("account (rsid) of the AppMeasurement instance must be a String.");if(""===a.rsid)return this._fail("account (rsid) of the AppMeasurement instance cannot be an empty string.");break;case"trackingServer":if(!a.hasOwnProperty("trackingServer"))return this._fail("trackingServer is required and has to be set in the AppMeasurement instance.");if("string"!=typeof a.trackingServer)return this._fail("trackingServer of the AppMeasurement instance must be a String.");if(""===a.trackingServer)return this._fail("trackingServer of the AppMeasurement instance cannot be an empty string.");break;case"podPlayerName":if(!a.hasOwnProperty("podPlayerName"))return this._fail("The player name for the ad-break must be specified.");if("string"!=typeof a.podPlayerName)return this._fail("The player name for the ad-break must be a String.");if(""===a.podPlayerName)return this._fail("The player name for the ad-break cannot be an empty string.");break;case"podPosition":if(!a.hasOwnProperty("podPosition"))return this._fail("Position (index) of the ad-break must be specified.");if("number"!=typeof a.podPosition)return this._fail("Position (index) of the ad-break must be a Number.");if(isNaN(a.podPosition))return this._fail("Position (index) of the ad-break cannot be NaN.");break;case"adId":if(!a.hasOwnProperty("adId"))return this._fail("The ad ID must be specified.");if("string"!=typeof a.adId)return this._fail("The ad ID must be a String.");if(""===a.adId)return this._fail("The ad ID cannot be an empty string.");break;case"adPosition":if(!a.hasOwnProperty("adPosition"))return this._fail("Position (index) of the ad must be specified.");if("number"!=typeof a.adPosition)return this._fail("Position (index) of the ad must be a Number.");if(isNaN(a.adPosition))return this._fail("Position (index) of the ad cannot be NaN.");break;case"chapterPosition":if(!a.hasOwnProperty("chapterPosition"))return this._fail("Position (index) of the chapter must be specified.");if("number"!=typeof a.chapterPosition)return this._fail("Position (index) of the chapter must be a Number.");if(isNaN(a.chapterPosition))return this._fail("Position (index) of the chapter cannot be NaN.");break;case"chapterOffset":if(!a.hasOwnProperty("chapterOffset"))return this._fail("Chapter start-time (offset) must be specified.");if("number"!=typeof a.chapterOffset)return this._fail("Chapter start-time (offset) must be a Number.");if(isNaN(a.chapterOffset))return this._fail("Chapter start-time (offset) cannot be NaN.");break;
17229case"chapterLength":if(!a.hasOwnProperty("chapterLength"))return this._fail("The length of the chapter must be specified.");if("number"!=typeof a.chapterLength)return this._fail("The length of the chapter must be a Number.");if(isNaN(a.chapterLength))return this._fail("The length of the chapter cannot be NaN.");break;default:return this._fail("Unable to validate unknown parameter: "+d)}}return!0},c.prototype._fail=function(a){var b=new d("Invalid input data",a);return this._onFail.fn&&this._onFail.fn.call(this._onFail.ctx,b),!1},b.context.InputDataValidator=c}(a.ADB.va,b),function(a,b){"use strict";function c(a,b){if(!b)throw new Error("Reference to the logger object cannot be NULL");if(this._logger=b,!a)throw new Error("Reference to the context object cannot be NULL");this._context=a}var d=b.model.Report;c.prototype.createReportForItem=function(a){return this._logger.debug(e,"Creating report for item: "+a.eventData.type()),new d(this._context._adobeAnalyticsData,this._context._userData,this._context._aamData,this._context._serviceProviderData,this._context._sessionData,a)};var e="ah::ReportFactory";b.context.ReportFactory=c}(a.ADB.core,b),function(a,b,c,d){"use strict";function e(a,b){if(!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._lastInBandItem=null,this._stashedLastInBandItem=null,this._stashedMainMetadata=null,this._autoComputedStartupTime=0,this._reportingInterval=ma,this._assetData=null,this._streamData=null,this._qosData=null,this._sessionData=null,this._cuserData=null,this._adobeAnalyticsData=new j,this._serviceProviderData=new k,this._userData=new l,this._aamData=new m,this._isTrackingSessionActive=!1,this._isVideoComplete=!1,this._isDestroyed=!1,this._doNotOverrideEventDuration=!1,this._reportFactory=new u(this,this._logger),this._inputDataValidator=new v(function(a){this._logger.error(w,a.getMessage()+" | "+a.getDetails()),this._channel.trigger(new h(y,a))},this),this._trackExternalErrors=!0,this._installEventListeners()}var f=c.md5,g=c.ObjectUtils,h=a.Event,i=d.model.SessionDao,j=d.model.AdobeAnalyticsDao,k=d.model.ServiceProviderDao,l=d.model.UserDao,m=d.model.AudienceManagerDao,n=d.model.EventDao,o=d.model.AssetDao,p=d.model.StreamDao,q=d.model.QoSDao,r=d.model.AdDao,s=d.model.ChapterDao,t=d.model.TrackItem,u=d.context.ReportFactory,v=d.context.InputDataValidator;e.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(w,"#destroy()"),this._uninstallEventListeners())},e.prototype._onApiAnalyticsStart=function(a){this._logger.debug(w,"#_onApiAnalyticsStart()");var b=a.data;if(this._checkCall("_onApiAnalyticsStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._userData.visitorId(b.vid),this._userData.analyticsVisitorId(b.aid),this._userData.marketingCloudVisitorId(b.mid),this._aamData.audienceManagerBlob(b.blob),this._aamData.audienceManagerLocationHint(b.loc_hint),b.customerIDs&&(this._cuserData=b.customerIDs),this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_AA_START,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._cuserData=null,this._sendHit(c)}},e.prototype._onApiAnalyticsAdStart=function(a){this._logger.debug(w,"#_onApiAnalyticsAdStart()");var b=a.data;if(this._checkCall("_onApiAnalyticsAdStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_AA_AD_START,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiVideoLoad=function(a){var b=a.data;this._logger.debug(w,"#_onApiVideoLoad(rsid="+b.rsid+", aa_trackingServer="+b.trackingServer+")"),this._resetInternalState(),this._inputDataValidator.validateFields(b,["rsid","trackingServer"])&&(this._sessionData.sessionId(this._generateSessionId()),this._isTrackingSessionActive=!0)},e.prototype._onApiVideoUnload=function(a){if(this._logger.debug(w,"#_onApiVideoUnload()"),!this._isTrackingSessionActive)return void this._logger.debug(w,"#_onApiVideoUnload() > No active tracking session.");this._isTrackingSessionActive=!1},e.prototype._onApiVideoStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiVideoStart(id="+b.videoId+", name="+b.videoName+", length="+b.videoLe
17229ngth+", type="+b.streamType+", playerName="+b.playerName+")"),this._checkCall("_onApiVideoStart")&&this._inputDataValidator.validateFields(b,["videoId","streamType","videoLength","playhead","playerName"])){this._lastInBandItem=null,this._stashedLastInBandItem=null,this._adobeAnalyticsData.reportSuiteId(b.rsid),this._adobeAnalyticsData.trackingServer(b.trackingServer),this._adobeAnalyticsData.ssl(Number(b.useSsl)),this._serviceProviderData.ovp(b.ovp),this._serviceProviderData.sdk(b.sdk),this._serviceProviderData.channel(b.channel),this._serviceProviderData.libVersion(b.version),this._serviceProviderData.apiLevel(b.apiLvl),this._serviceProviderData.playerName(b.playerName),this._assetData.adData(null),this._assetData.chapterData(null),this._assetData.videoId(b.videoId),this._assetData.length(b.videoLength),this._assetData.type(o.TYPE_MAIN_CONTENT),this._assetData.publisher(b.publisher),this._assetData.name(b.videoName),this._streamData.type(b.streamType),this._updateQoSInfo(b);var c=b.metaNielsen?g.merge(b.metaVideo,b.metaNielsen):b.metaVideo,d=new t(this,n.EVENT_TYPE_START,b.playhead,c,b._eventData[E]);this._sendHit(d)}},e.prototype._onApiVideoResume=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiVideoResume(id="+b.videoId+", name="+b.videoName+", length="+b.videoLength+", type="+b.streamType+", playerName="+b.playerName+")"),this._checkCall("_onApiVideoResume")&&this._inputDataValidator.validateFields(b,["videoId","streamType","videoLength","playhead","playerName"])){this._assetData.videoId(b.videoId),this._assetData.length(b.videoLength),this._assetData.type(o.TYPE_MAIN_CONTENT),this._assetData.name(b.videoName),this._streamData.type(b.streamType);var c=new t(this,n.EVENT_TYPE_RESUME,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiVideoSessionEnd=function(a){this._logger.debug(w,"#_onApiVideoSessionEnd()");var b=a.data;if(this._checkCall("_onApiVideoSessionEnd")&&this._inputDataValidator.validateFields(b,["playhead"])){var c=new t(this,n.EVENT_TYPE_END,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c)}},e.prototype._onApiVideoComplete=function(a){this._logger.debug(w,"#_onApiVideoComplete()");var b=a.data;if(this._checkCall("_onApiVideoComplete")){var c=new t(this,n.EVENT_TYPE_COMPLETE,this._assetData.length(),null,b._eventData[E]);this._sendHit(c),this._isVideoComplete=!0}},e.prototype._onApiVideoSkip=function(a){this._logger.debug(w,"#_onApiVideoSkip()");var b=a.data;if(this._checkCall("_onApiVideoSkip")){var c=new t(this,n.EVENT_TYPE_SKIP,b.playhead,null,b._eventData[E]);this._sendHit(c),this._isVideoComplete=!0}},e.prototype._onApiPlay=function(a){this._logger.debug(w,"#_onApiPlay()");var b=a.data;if(this._checkCall("_onApiPlay")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_PLAY,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiPause=function(a){this._logger.debug(w,"#_onApiPause()");var b=a.data;if(this._checkCall("_onApiPause")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=b.playheadStalled?n.EVENT_TYPE_STALL:n.EVENT_TYPE_PAUSE,d=new t(this,c,b.playhead,null,b._eventData[E]);b._eventData.hasOwnProperty(F)&&(d.filterReport=b._eventData[F]),this._sendHit(d)}},e.prototype._onApiBufferStart=function(a){this._logger.debug(w,"#_onApiBufferStart()");var b=a.data;if(this._checkCall("_onApiBufferStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_BUFFER,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiAdBreakStart=function(a){this._logger.debug(w,"#_onApiAdBreakStart()");var b=a.data;this._checkCall("_onApiAdBreakStart")&&this._inputDataValidator.validateFields(b,["playhead"])&&(this._flushLastInbandItem(b),this._updateLastInbandItemToBuffering())},e.prototype._onApiAdBreakComplete=function(a){this._logger.debug(w,"#_onApiAdBreakComplete()");var b=a.data;this._checkCall("_onApiAdBreakComplete")&&this._inputDataValidator.validateFields(b,["playhead"])&&(this._flushLastInbandItem(b),this._restoreLastInbandItem())},e.prototype._onApiAdStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiAdStart(id="+b.adId+", player_name="+b.podPlayerName+", parent_name="+this._assetData.videoId()+", pod_pos="+b.adPosition+")"),this._checkCall("_onApiAdStart")&&this._inputDataValidator.validateFields(b,["playhead","podPosition","podPlayerName","adId","adPosition"])){var c=new r;c.adId(b.adId),c.adName(b.adName),c.adLength(b.adLength),c.resolver(b.podPlayerName),c.podId(f(this._assetData.videoId())+"_"+b.podPosition),c.podPosition(b.adPosition+""),c.podName(b.podName),c.podOffset(b.podSecond),c.sid(this._generateSessionId()),this._assetData.adData(c),this._assetData.type(o.TYPE_AD),this._updateQoSInfo(b);var d=g.merge(b.metaVideo,b.metaAd);d=b.metaNielsen?g.merge(d,b.metaNielsen):d,d=b.metaAdNielsen?g.merge(d,b.metaAdNielsen):d;var e=new t(this,n.EVENT_TYPE_START,b.playhead,d,b._eventData[E]);this._sendHit(e),this._restoreLastInbandItem();if(!!b.adGranularTracking){var h=b.adTrackingInterval?b.adTrackingInterval:this._reportingInterval;this._updateReportingInterval(h,!0)}}},e.prototype._onApiAdComplete=function(a){this._logger.debug(w,"#_onApiAdComplete()");var b=a.data;if(this._checkCall("_onApiAdComplete")&&this._inputDataValidator.validateFields(b,["playhead"])){if(this._assetData.type()!=o.TYPE_AD)return void this._logger.warn(w,"#_onApiAdComplete() > Ignoring the ad complete event, because we are no longer in an ad.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_COMPLETE,b.playhead,null,b._eventData[E]);this._sendHit(c),this._updateLastInbandItemToBuffering(),this._assetData.adData(null),this._assetData.type(o.TYPE_MAIN_CONTENT),this._updateReportingInterval(this._reportingInterval,!1)}},e.prototype._onApiAdSkip=function(a){this._logger.debug(w,"#_onApiAdSkip()");var b=a.data;if(this._checkCall("_onApiAdSkip")&&this._inputDataValidator.validateFields(b,["playhead"])){if(this._assetData.type()!=o.TYPE_AD)return void this._logger.warn(w,"#_onApiAdSkip() >
17229 Ignoring the ad skip event, because we are no longer in an ad.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_SKIP,b.playhead,null,b._eventData[E]);this._sendHit(c),this._updateLastInbandItemToBuffering(),this._assetData.adData(null),this._assetData.type(o.TYPE_MAIN_CONTENT),this._updateReportingInterval(this._reportingInterval,!1)}},e.prototype._onApiChapterStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiChapterStart(name="+b.chapterName+", length="+b.chapterLength+", position="+b.chapterPosition+", chapter_offset="+b.chapterOffset+")"),this._checkCall("_onApiChapterStart")&&this._inputDataValidator.validateFields(b,["playhead","chapterPosition","chapterOffset","chapterLength"])){var c=new s;c.id(f(this._assetData.videoId())+"_"+b.chapterPosition),c.name(b.chapterName),c.length(b.chapterLength),c.position(b.chapterPosition),c.offset(b.chapterOffset),c.sid(this._generateSessionId()),this._assetData.chapterData(c),this._updateQoSInfo(b);var d=g.merge(b.metaVideo,b.metaChapter),e=new t(this,n.EVENT_TYPE_CHAPTER_START,b.playhead,d,b._eventData[E]);e.assetData.adData(null),e.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(e)}},e.prototype._onApiChapterComplete=function(a){this._logger.debug(w,"#_onApiChapterComplete()");var b=a.data;if(this._checkCall("_onApiChapterComplete")&&this._inputDataValidator.validateFields(b,["playhead"])){if(!this._assetData.chapterData())return void this._logger.warn(w,"#_onApiChapterComplete() > Ignoring the chapter complete event, because we are no longer in a chapter.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_CHAPTER_COMPLETE,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c),this._assetData.chapterData(null)}},e.prototype._onApiChapterSkip=function(a){this._logger.debug(w,"#_onApiChapterSkip()");var b=a.data;if(this._checkCall("_onApiChapterSkip")&&this._inputDataValidator.validateFields(b,["playhead"])){if(!this._assetData.chapterData())return void this._logger.warn(w,"#_onApiChapterSkip() > Ignoring the chapter skip event, because we are no longer in a chapter.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_CHAPTER_SKIP,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c),this._assetData.chapterData(null)}},e.prototype._onApiBitrateChange=function(a){this._logger.debug(w,"#_onApiBitrateChange()");var b=a.data;if(this._checkCall("_onApiBitrateChange")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_BITRATE_CHANGE,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiTrackError=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiTrackError(source="+b._eventData.source+", err_id="+b._eventData.error_id+")"),!this._isTrackingSessionActive)return void this._logger.warn(w,"#_onApiTrackError() > No active tracking session.");if(this._trackExternalErrors||b._eventData.source===x){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_ERROR,0,null,b._eventData[E]);c.eventData.id(b._eventData.error_id),c.eventData.source(b._eventData.source),this._sendHit(c)}},e.prototype._onApiTrackInternalError=function(a){var b=a.data;this._logger.debug(w,"#_onApiTrackInternalError(source="+b.source+", err_id="+b.error_id+")"),this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_ERROR,0);c.eventData.id(b.error_id),c.eventData.source(b.source),this._sendHit(c)},e.prototype._onApiQuantumEnd=function(a){this._logger.debug(w,"#_onApiQuantumEnd(interval="+this._channel.request(B)+")");var b=a.data;if(this._checkCall("_onApiQuantumEnd")&&this._inputDataValidator.validateFields(b,["playhead"])){var c=this._lastInBandItem;if(c){this._updateQoSInfo(b);var d=new t(this,c.eventData.type(),b.playhead,c.meta,c.callback);d.filterReport=c.filterReport,this._sendHit(d,!0)}}},e.prototype._onNetworkCheckStatusComplete=function(a){var b=a.data;this._trackExternalErrors=b[I],this._reportingInterval=b[J],this._reportingInterval||(this._reportingInterval=ma),this._logger.debug(w,"#_onNetworkCheckStatusComplete(track_ext_err="+this._trackExternalErrors+")")},e.prototype._onResetSessionId=function(a){var b=this._generateSessionId();this._sessionData=new i,this._sessionData.sessionId(b),this._logger.debug(w,"#_resetSessionId(new sessionId="+b+")")},e.prototype._installEventListeners=function(){this._channel.on(L,this._onApiAnalyticsStart,this),this._channel.on(M,this._onApiAnalyticsAdStart,this),this._channel.on(N,this._onApiVideoLoad,this),this._channel.on(O,this._onApiVideoUnload,this),this._channel.on(P,this._onApiVideoStart,this),this._channel.on(Q,this._onApiVideoComplete,this),this._channel.on(R,this._onApiVideoSkip,this),this._channel.on(S,this._onApiVideoResume,this),this._channel.on(T,this._onApiVideoSessionEnd,this),this._channel.on(U,this._onApiAdBreakStart,this),this._channel.on(V,this._onApiAdBreakComplete,this),this._channel.on(W,this._onApiAdStart,this),this._channel.on(X,this._onApiAdComplete,this),this._channel.on(Y,this._onApiAdSkip,this),this._channel.on(Z,this._onApiPlay,this),this._channel.on($,this._onApiPause,this),this._channel.on(_,this._onApiBufferStart,this),this._channel.on(aa,this._onApiChapterStart,this),this._channel.on(ba,this._onApiChapterComplete,this),this._channel.on(ca,this._onApiChapterSkip,this),this._channel.on(fa,this._onApiBitrateChange,this),this._channel.on(da,this._onApiTrackError,this),this._channel.on(ea,this._onApiTrackInternalError,this),this._channel.on(ga,this._onApiQuantumEnd,this),this._channel.on(ia,this._onNetworkCheckStatusComplete,this),this._channel.on(D,this._onResetSessionId,this),this._channel.reply(C,function(){return this._sessionData&&this._sessionData.sessionId()?this._sessionData.sessionId():null},this)},e.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)},e.prototype._resetInternalState=function(){this._logger.debug(w,"#_resetInternalState()"),this._isTrackingSessionActive=!1,this._isVideoComplete=!1,this._autoComputedStartupTime=0,this._lastInBandItem=null,this._stashedLastInBandItem=null,this._streamData=new p,this._qosData=new q,this._sessionData=new i,this._assetData=new o,this._cuserData=null},e.prototype._generateSessionId=function(){return""+(new Date).getTime()+Math.floor(1e9*Math.random())},e.prototype._updateQoSInfo=function(a){this._qosData.bitrate(a.bitrate||0),this._qosData.fps(a.fps||0),this._qosData.droppedFrames(a.droppedFrames||0),null==a.startupTime||isNaN(a.startupTime)?(this._qosData.startupTime(this._autoComputedStartupTime),this._qosData.isStartupTimeOverridden=!1):(this._qosData.startupTime(a.startupTime),this._qosData.isStartupTimeOverridden=!0)},e.prototype._checkCall=function(a){return this._isTrackingSessionActive?!this._isVideoComplete||"_onApiVideoSessionEnd"===a||(this._logger.warn(w,"#"+a+"() > The video content already completed."),!1):(this._logger.warn(w,"#"+a+"() > No active tracking session."),!1)},e.prototype._updateReportingInterval=function(a,b){var c={};c[K]=!!b,c[J]=a,this._channel.trigger(new h(ja,c))},e.prototype._updateLastInBandItem=function(a){var b=this._lastInBandItem,c=(new Date).getTime(),d=b.assetData.type()===o.TYPE_AD||a.assetData.type()===o.TYPE_AD,e=1e3*Math.abs(a.eventData.playhead()-b.eventData.playhead()),f=Math.abs(c-b.eventData.ts()),g=Math.abs(e-f),h=f;h>ka?(this._logger.warn(w," Resetting duration in lastInBandItem["+b.assetData.type()+":"+b.eventData.type()+"] call to 0 as calculated duration ("+h+")exceeds 10mins"),h=0):b.eventData.type()==n.EVENT_TYPE_PLAY&&!d&&!this._doNotOverrideEventDuration&&g>la&&(h=Math.min(e,f),this._logger.warn(w," Resetting duration in lastInBandItem["+b.assetData.type()+":"+b.eventData.type()+"] call to "+h+" as calculated error delta ("+g+")exceeds 2sec")),this._doNotOverrideEventDuration=!1,b.eventData.duration(h),b.eventData.ts(c),b.eventData.playhead(a.eventData.playhead()),b.qosData.startupTime(a.qosData.startupTime()),b.qosData.isStartupTimeOverridden=a.qosData.isStartupTimeOverridden},e.prototype._updateLastInbandItemToBuffering=function(){this._stashedLastInBandItem=this._lastInBandItem;var a=0;null!=this._lastInBandItem&&(this._lastInBandItem.assetData.type()==o.TYPE_MAIN_CONTENT&&this._lastInBandItem.eventData.type()==n.EVENT_TYPE_START&&(this._stashedMainMetadata=this._lastInBandItem.meta),a=this._lastInBandItem.eventData.playhead());
17229var b=new t(this,n.EVENT_TYPE_BUFFER,a,null,null);b.assetData.adData(null),b.assetData.type(o.TYPE_MAIN_CONTENT),this._lastInBandItem=b},e.prototype._restoreLastInbandItem=function(){if(null!=this._stashedLastInBandItem){var a=null;this._stashedLastInBandItem.eventData.type()==n.EVENT_TYPE_START&&(this._lastInBandItem.assetData.type()==o.TYPE_AD?a=this._lastInBandItem.meta:(a=this._stashedMainMetadata,this._stashedMainMetadata=null));var b=new t(this,this._stashedLastInBandItem.eventData.type(),this._stashedLastInBandItem.eventData.playhead(),a,this._stashedLastInBandItem.callback);b.filterReport=this._stashedLastInBandItem.filterReport,this._lastInBandItem=b,this._stashedLastInBandItem=null}},e.prototype._flushLastInbandItem=function(a){if(this._lastInBandItem){this._updateQoSInfo(a);var b=new t(this,this._lastInBandItem.eventData.type(),a.playhead,this._lastInBandItem.meta,this._lastInBandItem.callback);this._sendHit(b,!0)}},e.prototype._createAndSendReport=function(a){var b=this._reportFactory.createReportForItem(a);b.qosData.isStartupTimeOverridden||b.qosData.startupTime(this._autoComputedStartupTime);var c={};if(c[G]=b,this._channel.trigger(new h(ha,c)),b.eventData.type()==n.EVENT_TYPE_START||b.eventData.type()==n.EVENT_TYPE_PLAY||b.eventData.type()==n.EVENT_TYPE_PAUSE||b.eventData.type()==n.EVENT_TYPE_STALL||b.eventData.type()==n.EVENT_TYPE_BUFFER){var d={};d[H]=!0,this._channel.command(z,d)}},e.prototype._sendHit=function(a,b){switch(a.eventData.type()){case n.EVENT_TYPE_START:case n.EVENT_TYPE_PLAY:case n.EVENT_TYPE_PAUSE:case n.EVENT_TYPE_STALL:case n.EVENT_TYPE_BUFFER:this._lastInBandItem?(this._updateLastInBandItem(a),this._lastInBandItem.eventData.type()==n.EVENT_TYPE_START&&this._lastInBandItem.assetData.type()==o.TYPE_MAIN_CONTENT&&(this._autoComputedStartupTime+=this._lastInBandItem.eventData.duration()),this._createAndSendReport(this._lastInBandItem),b&&this._lastInBandItem.eventData.type()==a.eventData.type()||this._createAndSendReport(a)):this._createAndSendReport(a),this._lastInBandItem=a;break;case n.EVENT_TYPE_COMPLETE:case n.EVENT_TYPE_SKIP:if(this._lastInBandItem&&(this._updateLastInBandItem(a),this._createAndSendReport(this._lastInBandItem)),a.eventData.type()!==n.EVENT_TYPE_SKIP&&this._createAndSendReport(a),a.assetData.type()==o.TYPE_MAIN_CONTENT){this._lastInBandItem=null,this._stashedLastInBandItem=null;var c={};c[H]=!0,this._channel.command(A,c)}else a.assetData.type()==o.TYPE_AD&&(this._lastInBandItem.assetData.adData(null),this._lastInBandItem.assetData.type(o.TYPE_MAIN_CONTENT),this._doNotOverrideEventDuration=!0);break;case n.EVENT_TYPE_CHAPTER_START:case n.EVENT_TYPE_CHAPTER_COMPLETE:case n.EVENT_TYPE_CHAPTER_SKIP:this._lastInBandItem&&(this._updateLastInBandItem(a),this._createAndSendReport(this._lastInBandItem)),a.eventData.type()!==n.EVENT_TYPE_CHAPTER_SKIP&&this._createAndSendReport(a),this._lastInBandItem&&(this._lastInBandItem.assetData.chapterData(a.eventData.type()==n.EVENT_TYPE_CHAPTER_START?new s(a.assetData.chapterData()):null),this._lastInBandItem.eventData.duration(0),this._createAndSendReport(this._lastInBandItem));break;default:this._createAndSendReport(a)}};var w="ah::Context",x="sourceErrorSDK",y="error",z="clock:reporting.resume",A="clock:reporting.pause",B="reporting_interval",C="session_id",D="reset_session_id",E="callback",F="filter_report",G="report",H="reset",I="track_external_errors",J="reporting_interval",K="do_not_override_interval",L="api:aa_start",M="api:aa_ad_start",N="api:video_load",O="api:video_unload",P="api:video_start",Q="api:video_complete",R="api:video_skip",S="api:video_resume",T="api:video_session_end",U="api:adbreak_start",V="api:adbreak_complete",W="api:ad_start",X="api:ad_complete",Y="api:ad_skip",Z="api:play",$="api:pause",_="api:buffer_start",aa="api:chapter_start",ba="api:chapter_complete",ca="api:chapter_skip",da="api:track_error",ea="api:track_internal_error",fa="api:bitrate_change",ga="api:quantum_end",ha="context:report_available",ia="net:check_status_complete",ja="reporting:update_interval",ka=6e5,la=2e3,ma=10;d.context.Context=e}(a.ADB.core,a.ADB.va,a.ADB.va.utils,b),function(a){"use strict";function b(a,b){this.trackingServer=a,this.publisher=b,this.ssl=!1,this.ovp=c,this.sdk=c,this.quietMode=!1,this.debugLogging=!1,this.__isPrimetime=!1,this.__psdkVersion=null}var c="unknown";a.AdobeHeartbeatPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.onError=function(a){},b.prototype.onTrackingDisabled=function(){},a.AdobeHeartbeatPluginDelegate=b}(b),function(a,b,c){"use strict";function d(a){d.__super__.constructor.call(this,q),this._radio=new i(this._logger),this._channel=this._radio.channel(y),this._delegate=a,this._context=new l(this._channel,this._logger),this._filter=new m(this._channel,this._logger),this._network=new n(this._channel,this._logger),this._setupDataResolver()}var e=a.Event,f=a.Trigger,g=a.plugin.BasePlugin,h=a.plugin.ParamMapping,i=a.radio.Radio,j=b.ErrorInfo,k=b.Version,l=c.context.Context,m=c.filter.ReportFilter,n=c.network.Network,o=c.clock.Clock,p=c.AdobeHeartbeatPluginConfig;
17229a.extend(d,g),d.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof p))throw new Error("Expected config data to be instance of AdobeHeartbeatPluginConfig.");this._config=a,this._config.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure({trackingServer="+this._config.trackingServer+", publisher="+this._config.publisher+", quietMode="+this._config.quietMode+", ssl="+this._config.ssl+"})");var b=this._config.trackingServer+"/settings/",c={};c[ja]=this._config.trackingServer,c[ka]=b,c[la]=this._config.publisher,c[ma]=this._config.quietMode,c[na]=this._config.ssl,this._channel.trigger(new e(sa,c)),this._isConfigured=!0},d.prototype.bootstrap=function(a){d.__super__.bootstrap.call(this,a),this._channel.on(z,this._onError,this),this._clock=new o(this._pluginManager,this._channel,this._logger),this._channel.command(Ra),this._channel.trigger(new e(Ya)),this._channel.on(pa,this._onCheckStatusComplete,this),this._registerCommands(),this._registerBehaviours()},d.prototype._teardown=function(){this._logger.debug(this._logTag,"#_teardown()"),this._radio.shutdown(),this._context.destroy(),this._clock.destroy(),this._filter.destroy(),this._network.destroy()},d.prototype._canProcess=function(){return this._isConfigured?this._errorInfo?(this._logger.error(this._logTag,"_canProcess() > Plugin in ERROR state."),!1):d.__super__._canProcess.call(this):(this._logger.error(this._logTag,"_canProcess() > Plugin not configured."),!1)},d.prototype._cmdAnalyticsError=function(a){this._errorInfo||(this._errorInfo=new j("Internal error","AdobeAnalyticsPlugin is in ERROR state."),this._trigger(z,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo))},d.prototype._cmdAnalyticsStart=function(a){this._canProcess()&&this._channel.trigger(new e(qa,a))},d.prototype._cmdAnalyticsAdStart=function(a){this._canProcess()&&this._channel.trigger(new e(ra,a))},d.prototype._cmdVideoLoad=function(a){this._errorInfo=null,this._canProcess()&&(this._isTrackingSessionActive&&this._channel.trigger(new e(ua,a)),this._isTrackingSessionActive=!1,this._isPaused=!0,this._isSeeking=!1,this._isBuffering=!1,this._isVideoIdle=!1,this._filter.clear(),this._channel.trigger(new e(ta,a)),this._isTrackingSessionActive=!0)},d.prototype._cmdVideoUnload=function(a){this._errorInfo=null,this._canProcess()&&(this._channel.trigger(new e(ua,a)),this._filter.flush(),this._runReportingTimer(!1),this._runFlushFilterTimer(!1),this._runIdleTimer(!1),this._isTrackingSessionActive=!1)},d.prototype._cmdBeginReporting=function(a){this._canProcess()&&this._channel.trigger(new e(Pa,{}))},d.prototype._cmdVideoSessionEnd=function(a){this._canProcess()&&this._channel.trigger(new e(za,a))},d.prototype._cmdVideoStart=function(a){this._canProcess()&&(this._channel.trigger(new e(va,a)),this._filter.flush())},d.prototype._cmdVideoComplete=function(a){this._canProcess()&&this._channel.trigger(new e(wa,a))},d.prototype._cmdVideoSkip=function(a){this._canProcess()&&this._channel.trigger(new e(xa,a))},d.prototype._cmdVideoResume=function(a){this._canProcess()&&this._channel.trigger(new e(ya,a))},d.prototype._cmdPlay=function(a){this._canProcess()&&(this._isPaused=!1,this._resumePlaybackIfPossible(a))},d.prototype._cmdPause=function(a){this._canProcess()&&(this._channel.trigger(new e(Ga,a)),this._isPaused=!0,this._runIdleTimer(!0))},d.prototype._cmdAdBreakStart=function(a){this._canProcess()&&this._channel.trigger(new e(Aa,a))},d.prototype._cmdAdBreakComplete=function(a){this._canProcess()&&(this._channel.trigger(new e(Ba,a)),this._resumePlaybackIfPossible(a))},d.prototype._cmdAdStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ca,a)),this._resumePlaybackIfPossible(a))},d.prototype._cmdAdComplete=function(a){this._canProcess()&&this._channel.trigger(new e(Da,a))},d.prototype._cmdAdSkip=function(a){this._canProcess()&&this._channel.trigger(new e(Ea,a))},d.prototype._cmdBufferStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ha,a)),this._isBuffering=!0,this._runIdleTimer(!0))},d.prototype._cmdBufferComplete=function(a){this._canProcess()&&(this._isBuffering=!1,this._isPaused?this._channel.trigger(new e(Ga,a)):this._resumePlaybackIfPossible(a))},d.prototype._cmdSeekStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ga,a)),this._isSeeking=!0,this._runIdleTimer(!0))},d.prototype._cmdSeekComplete=function(a){this._canProcess()&&(this._isSeeking=!1,this._resumePlaybackIfPossible(a))},d.prototype._cmdChapterStart=function(a){this._canProcess()&&this._channel.trigger(new e(Ia,a))},d.prototype._cmdChapterComplete=function(a){this._canProcess()&&this._channel.trigger(new e(Ja,a))},d.prototype._cmdChapterSkip=function(a){this._canProcess()&&this._channel.trigger(new e(Ka,a))},d.prototype._cmdBitrateChange=function(a){this._canProcess()&&this._channel.trigger(new e(Na,a))},d.prototype._cmdTrackError=function(a){this._canProcess()&&this._channel.trigger(new e(La,a))},d.prototype._cmdClockReportingTick=function(a){this._canProcess()&&this._channel.trigger(new e(Oa,a))}
17229,d.prototype._onCheckStatusComplete=function(a){if(this._canProcess()){var b=!1;a&&a.data&&a.data[oa]&&(b=a.data[oa]),this._logger.debug(this._logTag,"#_onCheckStatusComplete(trackingDisabled="+b+")"),b&&this._delegate&&this._delegate.onTrackingDisabled()}},d.prototype._cmdIdleTick=function(a){this._canProcess()&&(this._isVideoIdle=!0,this._trigger(aa),this._channel.trigger(new e(za,a)),this._filter.flush(),this._runReportingTimer(!1),this._runFlushFilterTimer(!1),this._runIdleTimer(!1),this._trigger($))},d.prototype._onError=function(a){this._errorInfo=a.data;var b={};b[ha]=Qa,b[ia]=this._errorInfo.getMessage()+"|"+this._errorInfo.getDetails(),this._channel.trigger(new e(Ma,b)),this._runReportingTimer(!1),this._trigger(z,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo)},d.prototype._runIdleTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Wa,b):this._channel.command(Xa,b)},d.prototype._runFlushFilterTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Ua,b):this._channel.command(Va,b)},d.prototype._runReportingTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Sa,b):this._channel.command(Ta,b)},d.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleAnalyticsError",this._cmdAnalyticsError),this._pluginManager.comply(this,"handleAnalyticsStart",this._cmdAnalyticsStart),this._pluginManager.comply(this,"handleAnalyticsAdStart",this._cmdAnalyticsAdStart),this._pluginManager.comply(this,"handleVideoLoad",this._cmdVideoLoad),this._pluginManager.comply(this,"handleVideoUnload",this._cmdVideoUnload),this._pluginManager.comply(this,"handleBeginReporting",this._cmdBeginReporting),this._pluginManager.comply(this,"handleVideoSessionEnd",this._cmdVideoSessionEnd),this._pluginManager.comply(this,"handleVideoStart",this._cmdVideoStart),this._pluginManager.comply(this,"handleVideoComplete",this._cmdVideoComplete),this._pluginManager.comply(this,"handleVideoSkip",this._cmdVideoSkip),this._pluginManager.comply(this,"handleVideoResume",this._cmdVideoResume),this._pluginManager.comply(this,"handlePlay",this._cmdPlay),this._pluginManager.comply(this,"handlePause",this._cmdPause),this._pluginManager.comply(this,"handleAdBreakStart",this._cmdAdBreakStart),this._pluginManager.comply(this,"handleAdBreakComplete",this._cmdAdBreakComplete),this._pluginManager.comply(this,"handleAdStart",this._cmdAdStart),this._pluginManager.comply(this,"handleAdComplete",this._cmdAdComplete),this._pluginManager.comply(this,"handleAdSkip",this._cmdAdSkip),this._pluginManager.comply(this,"handleBufferStart",this._cmdBufferStart),this._pluginManager.comply(this,"handleBufferComplete",this._cmdBufferComplete),this._pluginManager.comply(this,"handleSeekStart",this._cmdSeekStart),this._pluginManager.comply(this,"handleSeekComplete",this._cmdSeekComplete),this._pluginManager.comply(this,"handleChapterStart",this._cmdChapterStart),this._pluginManager.comply(this,"handleChapterComplete",this._cmdChapterComplete),this._pluginManager.comply(this,"handleChapterSkip",this._cmdChapterSkip),this._pluginManager.comply(this,"handleBitrateChange",this._cmdBitrateChange),this._pluginManager.comply(this,"handleTrackError",this._cmdTrackError),this._pluginManager.comply(this,"handleClockReportingTick",this._cmdClockReportingTick),this._pluginManager.comply(this,"handleIdleTick",this._cmdIdleTick)},d.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new f(t,C),this,"handleVideoLoad",[new h(s,"rsid","rsid"),new h(s,"tracking_server","trackingServer")]),this._pluginManager.registerBehaviour(new f(t,D),this,"handleVideoUnload"),this._pluginManager.registerBehaviour(new f(t,ba),this,"handleBeginReporting"),this._pluginManager.registerBehaviour(new f(t,E),this,"handleVideoSessionEnd",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(t,F),this,"handleVideoStart",[new h(t,"video.id","videoId"),new h(t,"video.name","videoName"),new h(t,"video.length","videoLength"),new h(t,"video.playhead","playhead"),new h(t,"video.playerName","playerName"),new h(t,"video.streamType","streamType"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"rsid","rsid"),new h(s,"tracking_server","trackingServer"),new h(s,"channel","channel"),new h(s,"meta.video.*","metaVideo"),new h(s,"ssl","useSsl"),new h(u,"meta","metaNielsen"),new h(r,"publisher","publisher"),new h(r,"sdk","sdk"),new h(r,"ovp","ovp"),new h(r,"version","version"),new h(r,"api_level","apiLvl")]),this._pluginManager.registerBehaviour(new f(t,H),this,"handleVideoComplete",[new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,I),this,"handleVideoSkip",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,G),this,"handleVideoResume",[new h(t,"video.id","videoId"),new h(t,"video.name","videoName"),new h(t,"video.length","videoLe
17229ngth"),new h(t,"video.playhead","playhead"),new h(t,"video.playerName","playerName"),new h(t,"video.streamType","streamType")]),this._pluginManager.registerBehaviour(new f(t,J),this,"handlePlay",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,K),this,"handlePause",[new h(t,"video.playhead","playhead"),new h(t,"video.playheadStalled","playheadStalled"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,M),this,"handleAdBreakStart",[new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,N),this,"handleAdBreakComplete",[new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,O),this,"handleAdStart",[new h(t,"video.playhead","playhead"),new h(t,"ad.id","adId"),new h(t,"ad.name","adName"),new h(t,"ad.length","adLength"),new h(t,"ad.position","adPosition"),new h(t,"ad.granularTracking","adGranularTracking"),new h(t,"ad.trackingInterval","adTrackingInterval"),new h(t,"pod.name","podName"),new h(t,"pod.playerName","podPlayerName"),new h(t,"pod.position","podPosition"),new h(t,"pod.startTime","podSecond"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"meta.video.*","metaVideo"),new h(s,"meta.ad.*","metaAd"),new h(u,"meta","metaNielsen"),new h(u,"metaAd","metaAdNielsen")]),this._pluginManager.registerBehaviour(new f(t,P),this,"handleAdComplete",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Q),this,"handleAdSkip",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,R),this,"handleBufferStart",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,S),this,"handleBufferComplete",[new h(t,"video.playhead","playhead"),new h(t,"video.playheadStalled","playheadStalled"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,T),this,"handleSeekStart",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(t,U),this,"handleSeekComplete",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAd","isInAd"),new h(t,"ad.id","adId"),new h(t,"ad.position","adPosition"),new h(t,"pod.playerName","podPlayerName"),new h(t,"pod.position","podPosition"),new h(t,"chapter.isInChapter","isInChapter"),new h(t,"chapter.position","chapterPosition"),new h(t,"chapter.name","chapterName"),new h(t,"chapter.length","chapterLength"),new h(t,"chapter.startTime","chapterOffset"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,V),this,"handleChapterStart",[new h(t,"video.playhead","playhead"),new h(t,"chapter.position","chapterPosition"),new h(t,"chapter.name","chapterName"),new h(t,"chapter.length","chapterLength"),new h(t,"chapter.startTime","chapterOffset"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"meta.video.*","metaVideo"),new h(s,"meta.chapter.*","metaChapter"),new h(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new f(t,W),this,"handleChapterComplete",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,X),this,"handleChapterSkip",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Y),this,"handleBitrateChange",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Z),this,"handleTrackError"),this._pluginManager.registerBehaviour(new f(v,da),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,L),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(v,fa),this,"handleIdleTick",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(r,aa),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(s,z),this,"handleAnalyticsError"),this._pluginManager.registerBehaviour(new f(s,A),this,"handleAnalyticsStart",[new h(s,"vid","vid"),new h(s,"aid","aid"),new h(s,"mid","mid"),new h(s,"customerIDs","customerIDs"),new h(s,"blob","blob"),new h(s,"loc_hint","loc_hint"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(s,B),this,"handleAnalyticsAdStart",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")])},d.prototype._setupDataResolver=function(){var a={},b=this;a.version=function(){return k.getVersion()},a.api_level=function(){return k.getApiLevel()},a.tracking_server=function(){return b._config?b._config.trackingServer:null},a.publisher=function(){return b._config?b._config.publisher:null},a.quiet_mode=function(){return!!b._config&&b._config.quietMode},a.ovp=function(){return b._config?b._config.ovp:null},a.sdk=function(){return b._config?b._config.sdk:null},a.is_primetime=function(){return!!b._config&&b._config.__isPrimetime},a.psdk_version=function(){return b._config?b._config.__psdkVersion:null},a.session_id=function(){return b._channel.request(w)},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];c=c||{},c[e]=a.hasOwnProperty(e)?a[e].call(this):null}return c}},d.prototype._resumePlaybackIfPossible=function(a){this._errorInfo||this._isPaused||this._isSeeking||this._isBuffering||(this._isVideoIdle?(this._isVideoIdle=!1,this._resumePlaybackFromIdle()):this._channel.trigger(new e(Fa,a)),this._runIdleTimer(!1))},d.prototype._resumePlaybackFromIdle=function(){this._trigger(aa),this._filter.clear(),this._channel.trigger(new e(x)),this._trigger(_),this._runReportingTimer(!0),this._runFlushFilterTimer(!0)};var q="adobe-heartbeat",r=q,s="adobe-analytics",t="player",u="nielsen",v="service.clock",w="session_id",x="reset_session_id",y="heartbeat-channel",z="error",A="aa_start",B="sc_ad_start",C="video_load",D="video_unload",E="video_session_end",F="video_start",G="video_resume",H="video_complete",I="video_skip",J="play",K="pause",L="content_start",M="adbreak_start",N="adbreak_complete",O="ad_start",P="ad_complete",Q="ad_ski
17229p",R="buffer_start",S="buffer_complete",T="seek_start",U="seek_complete",V="chapter_start",W="chapter_complete",X="chapter_skip",Y="bitrate_change",Z="track_error",$="video_idle_start",_="video_idle_resume",aa="quantum_close",ba="video_begin_reporting",ca="heartbeat.reporting",da=ca+".tick",ea="heartbeat.idle",fa=ea+".tick",ga="reset",ha="source",ia="error_id",ja="tracking_server",ka="check_status_server",la="publisher",ma="quiet_mode",na="ssl",oa="tracking_disabled",pa="net:check_status_complete",qa="api:aa_start",ra="api:aa_ad_start",sa="api:config",ta="api:video_load",ua="api:video_unload",va="api:video_start",wa="api:video_complete",xa="api:video_skip",ya="api:video_resume",za="api:video_session_end",Aa="api:adbreak_start",Ba="api:adbreak_complete",Ca="api:ad_start",Da="api:ad_complete",Ea="api:ad_skip",Fa="api:play",Ga="api:pause",Ha="api:buffer_start",Ia="api:chapter_start",Ja="api:chapter_complete",Ka="api:chapter_skip",La="api:track_error",Ma="api:track_internal_error",Na="api:bitrate_change",Oa="api:quantum_end",Pa="api:video_begin_reporting",Qa="sourceErrorHeartbeat",Ra="clock:check_status.resume",Sa="clock:reporting.resume",Ta="clock:reporting.pause",Ua="clock:flush_filter.resume",Va="clock:flush_filter.pause",Wa="clock:idle.resume",Xa="clock:idle.pause",Ya="clock:check_status.get_settings";c.AdobeHeartbeatPlugin=d}(a.ADB.core,a.ADB.va,b),a.ADB.va.plugins.ah||(a.ADB.va.plugins.ah=b)}(this); 17230 17231// AdobeAnalyticsPlugin 17232!function(a){if(void 0===b)var b={};!function(a,b){"use strict";function c(a,b){this._onFail={fn:a,ctx:b}}var d=a.ErrorInfo;c.prototype.validateFields=function(a,b){if(!a)return this._fail("Data cannot be null");if(b)for(var c=0;c<b.length;c++){var d=b[c];switch(d){case"videoId":if(!a.hasOwnProperty("videoId"))return this._fail("The ID for the main video must be specified.");if("string"!=typeof a.videoId)return this._fail("The ID for the main video must be a String.");if(""===a.videoId)return this._fail("The ID for the main video cannot be an empty string.");break;case"mediaType":if(!a.hasOwnProperty("mediaType"))return this._fail("The media type for the main video must be specified.");if("string"!=typeof a.mediaType)return this._fail("The media type for the main video must be a String.");if(""===a.mediaType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"streamType":if(!a.hasOwnProperty("streamType"))return this._fail("The stream type for the main video must be specified.");if("string"!=typeof a.streamType)return this._fail("The stream type for the main video must be a String.");if(""===a.streamType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"playerName":if(!a.hasOwnProperty("playerName"))return this._fail("The player name for the main video must be specified.");if("string"!=typeof a.playerName)return this._fail("The player name for the main video must be a String.");if(""===a.playerName)return this._fail("The player name for the main video cannot be an empty string.");break;case"videoLength":if(!a.hasOwnProperty("videoLength"))return this._fail("The length of the main video must be specified.");if("number"!=typeof a.videoLength)return this._fail("The length of the main video must be a Number.");if(isNaN(a.videoLength))return this._fail("The length of the main video cannot be NaN.");break;case"podPlayerName":if(!a.hasOwnProperty("podPlayerName"))return this._fail("The player name for the ad-break must be specified.");if("string"!=typeof a.podPlayerName)return this._fail("The player name for the ad-break must be a String.");if(""===a.podPlayerName)return this._fail("The player name for the ad-break cannot be an empty string.");break;case"podPosition":if(!a.hasOwnProperty("podPosition"))return this._fail("Position (index) of the ad-break must be specified.");if("number"!=typeof a.podPosition)return this._fail("Position (index) of the ad-break must be a Number.");if(isNaN(a.podPosition))return this._fail("Position (index) of the ad-break cannot be NaN.");break;case"adId":if(!a.hasOwnProperty("adId"))return this._fail("The ad ID must be specified.");if("string"!=typeof a.adId)return this._fail("The ad ID must be a String.");if(""===a.adId)return this._fail("The ad ID cannot be an empty string.");break;case"adPosition":if(!a.hasOwnProperty("adPosition"))return this._fail("Position (index) of the ad must be specified.");if("number"!=typeof a.adPosition)return this._fail("Position (index) of the ad must be a Number.");if(isNaN(a.adPosition))return this._fail("Position (index) of the ad cannot be NaN.");break;case"adLength":if(!a.hasOwnProperty("adLength"))return this._fail("The length of the ad must be specified.");if("number"!=typeof a.adLength)return this._fail("The length of the ad must be a Number.");if(isNaN(a.adLength))return this._fail("The length of the ad cannot be NaN.");break;default:return this._fail("Unable to validate unknown parameter: "+d)}}return!0},c.prototype._fail=function(a){var b=new d("Invalid input data",a);return this._onFail.fn&&this._onFail.fn.call(this._onFail.ctx,b),!1},b.InputDataValidator=c}(a.ADB.va,b),function(a){"use strict";function b(){this.channel=c,this.debugLogging=!1}var c="";a.AdobeAnalyticsPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.onError=function(a){},a.AdobeAnalyticsPluginDelegate=b}(b),function(a,b,c,d){"use strict";function e(a){this._aaPlugin=a}
17232function f(a,b){if(f.__super__.constructor.call(this,s),!a)throw new Error("The reference to the AppMeasurement object cannot be NULL.");if(a.unsupportedBrowser)throw new Error("AppMeasurement is not supported in current browser.");this._appMeasurement=a,this._appMeasurementBridge=new e(this),this._delegate=b,this._videoMetadata={},this._adMetadata={},this._chapterMetadata={},this._errorInfo=null,this._appMeasurementReady=!1,this._beginReporting=!1,this._workQueue=new l(!0,x),this._inputDataValidator=new r(function(a){this._errorInfo=a,this._logger.error(this._logTag,a.getMessage()+" | "+a.getDetails());var b=this;setTimeout(function(){b._trigger(y,a),b._delegate&&b._delegate.onError(b._errorInfo)},0)},this),this._appMeasurement.isReadyToTrack(),this._setupDataResolver()}var g=a.Trigger,h=a.plugin.BasePlugin,i=a.plugin.ParamMapping,j=a.radio.Channel,k=a.radio.Command,l=a.radio.CommandQueue,m=b.ErrorInfo,n=c.md5,o=c.StringUtils,p=c.ObjectUtils,q=d.AdobeAnalyticsPluginConfig,r=d.InputDataValidator;e.prototype.onAppMeasurementReady=function(){this._aaPlugin&&this._aaPlugin._onAppMeasurementReady()},e.prototype.release=function(){this._aaPlugin=null},a.extend(f,h),f.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof q))throw new Error("Expected config data to be instance of AdobeAnalyticsPluginConfig.");this._config=a,this._config.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure({trackingServer="+this._config.debugLogging+", channel="+this._config.channel+", ssl="+this._appMeasurement.ssl+"})")},f.prototype.bootstrap=function(a){f.__super__.bootstrap.call(this,a),this._registerCommands(),this._registerBehaviours()},f.prototype.setup=function(){this._appMeasurement.isReadyToTrack()?this._onAppMeasurementReady():this._appMeasurement.callbackWhenReadyToTrack(this._appMeasurementBridge,this._appMeasurementBridge.onAppMeasurementReady,[]),f.__super__.setup.call(this)},f.prototype.setVideoMetadata=function(a){this._videoMetadata=p.clone(a)},f.prototype.setAdMetadata=function(a){this._adMetadata=p.clone(a)},f.prototype.setChapterMetadata=function(a){this._chapterMetadata=p.clone(a)},f.prototype._teardown=function(){this._logger.debug(this._logTag,"#_teardown()"),this._appMeasurementBridge.release()},f.prototype._canProcess=function(){return this._errorInfo?(this._logger.error(this._logTag,"#_canProcess() > In ERROR state."),!1):f.__super__._canProcess.call(this)},f.prototype._cmdVideoLoad=function(a){this._errorInfo=null},f.prototype._cmdBeginReporting=function(a){this._logger.debug(this._logTag,"#_cmdBeginReporting()"),this._beginReporting=!0,this._resumeWorkQueue()},f.prototype._cmdVideoStart=function(a){this._logger.debug(this._logTag,"#_cmdVideoStart()"),this._canProcess()&&this._workQueue.addCommand(new k(this._executeOpen,this,[a]))},f.prototype._cmdAdStart=function(a){this._logger.debug(this._logTag,"#_cmdAdStart()"),this._canProcess()&&this._workQueue.addCommand(new k(this._executeOpenAd,this,[a]))},f.prototype._cmdHeartbeatPluginError=function(a){this._errorInfo||(this._errorInfo=new m("Internal error","HeartbeatPlugin is in ERROR state."),this._trigger(y,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo))},f.prototype._track=function(a){try{var b=this._appMeasurement.linkTrackVars;this._appMeasurement.linkTrackVars="",this._appMeasurement.track(a),this._appMeasurement.linkTrackVars=b}catch(a){this._logger.warn(this._logTag,"appMeasurement.track() call threw an exception.")}},f.prototype._executeOpen=function(a){if(this._logger.debug(this._logTag,"#_executeOpen(id="+a.videoId+", videoName="+a.videoName+", mediaType="+a.mediaType+", streamType="+a.streamType+", length="+a.videoLength+", playerName="+a.playerName+", channel="+a.channel+", isPrimetime="+a.isPrimetime+", sessionId="+a.sessionId+")"),this._canProcess()&&this._inputDataValidator.validateFields(a,["videoId","mediaType","streamType","videoLength","playerName"])){var b={};for(var c in a.metaVideo)a.metaVideo.hasOwnProperty(c)&&(b[c]=a.metaVideo[c]);if(a.metaNielsen)for(var c in a.metaNielsen)a.metaNielsen.hasOwnProperty(c)&&(b[c]=a.metaNielsen[c]);b["a.contentType"]=a.streamType,b["a.media.name"]=a.videoId,b["a.media.friendlyName"]=a.videoName||"",b["a.media.length"]=Math.floor(a.videoLength)||"0.0",b["a.media.playerName"]=a.playerName,b["a.media.channel"]=a.channel||"",b["a.media.view"]=!0,b["a.media.vsid"]=a.sessionId;var d={};d.contextData=b,"audio"===a.mediaType?(d.pev3=B,d.ms_a="1"):d.pev3=z,d.pe=a.isPrimetime?E:D,this._track(d);var e=this;setTimeout(function(){e._trigger(H,a)},0)}},f.prototype._executeOpenAd=function(a){var b=n(a.videoId)+"_"+a.podPosition;if(this._logger.debug(this._logTag,"#_executeOpenAd(id="+a.adId+", mediaType="+a.mediaType+", streamType="+
17232a.streamType+", length="+a.adLength+", podPlayerName="+a.podPlayerName+", parentId="+a.videoId+", podId="+b+", parentPodPosition="+a.adPosition+", podSecond="+a.podSecond+")"),this._canProcess()&&this._inputDataValidator.validateFields(a,["videoId","mediaType","streamType","playerName","adId","adLength","podPlayerName","adPosition"])){a.podSecond=null==a.podSecond||isNaN(a.podSecond)?a.playhead:a.podSecond;var c,d={};for(c in a.metaVideo)a.metaVideo.hasOwnProperty(c)&&(d[c]=a.metaVideo[c]);for(c in a.metaAd)a.metaAd.hasOwnProperty(c)&&(d[c]=a.metaAd[c]);if(a.metaNielsen)for(var c in a.metaNielsen)a.metaNielsen.hasOwnProperty(c)&&(d[c]=a.metaNielsen[c]);d["a.contentType"]=a.streamType,d["a.media.name"]=a.videoId,d["a.media.playerName"]=a.playerName,d["a.media.channel"]=a.channel||"",d["a.media.vsid"]=a.sessionId,d["a.media.friendlyName"]=a.videoName||"",d["a.media.length"]=Math.floor(a.videoLength)||"0.0",d["a.media.ad.name"]=a.adId,d["a.media.ad.friendlyName"]=a.adName||"",d["a.media.ad.podFriendlyName"]=a.podName||"",d["a.media.ad.length"]=Math.floor(a.adLength)||"0.0",d["a.media.ad.playerName"]=a.podPlayerName,d["a.media.ad.pod"]=b,d["a.media.ad.podPosition"]=Math.floor(a.adPosition)||"0.0",d["a.media.ad.podSecond"]=Math.floor(a.podSecond)||"0.0",d["a.media.ad.view"]=!0;var e={};e.contextData=d,"audio"===a.mediaType?(e.pev3=C,e.ms_a="1"):e.pev3=A,e.pe=a.isPrimetime?G:F,this._track(e);var f=this;setTimeout(function(){f._trigger(I,a)},0)}},f.prototype._setupDataResolver=function(){var a={},b=this;a.rsid=function(){return b._appMeasurement.account},a.tracking_server=function(){return b._appMeasurement.ssl&&b._appMeasurement.trackingServerSecure?b._appMeasurement.trackingServerSecure:b._appMeasurement.trackingServer},a.ssl=function(){return b._appMeasurement.ssl},a.vid=function(){return b._appMeasurement.visitorID},a.aid=function(){return b._appMeasurement.analyticsVisitorID},a.mid=function(){return b._appMeasurement.marketingCloudVisitorID},a.blob=function(){return b._appMeasurement.audienceManagerBlob},a.loc_hint=function(){return b._appMeasurement.audienceManagerLocationHint?parseInt(b._appMeasurement.audienceManagerLocationHint):""},a.customerIDs=function(){var a={},c=b._appMeasurement.visitor.getCustomerIDs();for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if("object"==typeof e){for(var f in e)e.hasOwnProperty(f)&&("authState"==f?a[d+".as"]=e[f]:a[d+"."+f]=e[f]);a[d+".as"]||(a[d+".as"]="0")}}return a},a.channel=function(){return b._config?b._config.channel:null},a.meta=function(a){var c=a.split(".");if(c.length<2)return null;var d=c.shift();switch(a=c.join("."),d){case"video":return a==j.WILDCARD?b._videoMetadata:b._videoMetadata[a];case"ad":return a==j.WILDCARD?b._adMetadata:b._adMetadata[a];case"chapter":return a==j.WILDCARD?b._chapterMetadata:b._chapterMetadata[a];default:return null}},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];c=c||{},o.startsWith(e,"meta.")?c[e]=a.meta(e.split("meta.")[1]):c[e]=a.hasOwnProperty(e)?a[e].call(this):null}return c}},f.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleVideoLoad",this._cmdVideoLoad),this._pluginManager.comply(this,"handleBeginReporting",this._cmdBeginReporting),this._pluginManager.comply(this,"handleVideoStart",this._cmdVideoStart),this._pluginManager.comply(this,"handleAdStart",this._cmdAdStart),this._pluginManager.comply(this,"handleHeartbeatPluginError",this._cmdHeartbeatPluginError)},f.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new g(v,J),this,"handleVideoLoad"),this._pluginManager.registerBehaviour(new g(v,M),this,"handleBeginReporting"),this._pluginManager.registerBehaviour(new g(v,K),this,"handleVideoStart",[new i(v,"video.id","videoId"),new i(v,"video.mediaType","mediaType"),new i(v,"video.streamType","streamType"),new i(v,"video.name","videoName"),new i(v,"video.length","videoLength"),new i(v,"video.playerName","playerName"),new i(v,"video.streamType","streamType"),new i(w,"is_primetime","
17232isPrimetime"),new i(w,"session_id","sessionId"),new i(t,"channel","channel"),new i(t,"meta.video.*","metaVideo"),new i(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new g(v,L),this,"handleAdStart",[new i(v,"video.id","videoId"),new i(v,"video.mediaType","mediaType"),new i(v,"video.streamType","streamType"),new i(v,"video.playhead","playhead"),new i(v,"video.playerName","playerName"),new i(v,"video.name","videoName"),new i(v,"video.length","videoLength"),new i(v,"ad.id","adId"),new i(v,"ad.length","adLength"),new i(v,"ad.position","adPosition"),new i(v,"ad.name","adName"),new i(v,"pod.name","podName"),new i(v,"pod.position","podPosition"),new i(v,"pod.playerName","podPlayerName"),new i(v,"pod.startTime","podSecond"),new i(w,"is_primetime","isPrimetime"),new i(w,"session_id","sessionId"),new i(t,"channel","channel"),new i(t,"meta.video.*","metaVideo"),new i(t,"meta.ad.*","metaAd"),new i(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new g(w,y),this,"handleHeartbeatPluginError")},f.prototype._onAppMeasurementReady=function(){this._logger.debug(this._logTag,"#_onAppMeasurementReady"),this._appMeasurementReady=!0,this._resumeWorkQueue()},f.prototype._resumeWorkQueue=function(){this._appMeasurementReady&&this._beginReporting&&(this._logger.debug(this._logTag,"#_resumeWorkQueue"),this._workQueue.resume())};var s="adobe-analytics",t=s,u="nielsen",v="player",w="adobe-heartbeat",x=2e3,y="error",z="video",A="videoAd",B="audio",C="audioAd",D="ms_s",E="msp_s",F="msa_s",G="mspa_s",H="aa_start",I="sc_ad_start",J="video_load",K="video_start",L="ad_start",M="video_begin_reporting";d.AdobeAnalyticsPlugin=f}(a.ADB.core,a.ADB.va,a.ADB.va.utils,b),function(a){"use strict";var b={SHOW:"a.media.show",SEASON:"a.media.season",EPISODE:"a.media.episode",ASSET_ID:"a.media.asset",GENRE:"a.media.genre",FIRST_AIR_DATE:"a.media.airDate",FIRST_DIGITAL_DATE:"a.media.digitalDate",RATING:"a.media.rating",ORIGINATOR:"a.media.originator",NETWORK:"a.media.network",SHOW_TYPE:"a.media.type",AD_LOAD:"a.media.adLoad",MVPD:"a.media.pass.mvpd",AUTHORIZED:"a.media.pass.auth",DAY_PART:"a.media.dayPart",FEED:"a.media.feed",STREAM_FORMAT:"a.media.format"},c={ARTIST:"a.media.artist",ALBUM:"a.media.album",LABEL:"a.media.label",AUTHOR:"a.media.author",STATION:"a.media.station",PUBLISHER:"a.media.publisher"},d={ADVERTISER:"a.media.ad.advertiser",CAMPAIGN_ID:"a.media.ad.campaign",CREATIVE_ID:"a.media.ad.creative",PLACEMENT_ID:"a.media.ad.placement",SITE_ID:"a.media.ad.site",CREATIVE_URL:"a.media.ad.creativeURL"};a.VideoMetadataKeys=b,a.AudioMetadataKeys=c,a.AdMetadataKeys=d}(b),a.ADB.va.plugins.aa||(a.ADB.va.plugins.aa=b)}(this); 17233 17234// MediaHeartbeat 17235!function(a){!function(a,b){"use strict";function c(){this._processAction=!0,this._store={}}function d(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._rules=[]}c.prototype.setRuleName=function(a){this._ruleName=a},c.prototype.getRuleName=function(a,b){return this._ruleName},c.prototype.setData=function(a,b){this._store[a]=b},c.prototype.getData=function(a){return this._store[a]},c.prototype.shouldProcessAction=function(){return this._processAction},c.prototype.stopProcessingAction=function(){this._processAction=!1},c.prototype.startProcessingAction=function(){this._processAction=!0},d.createContext=function(){return new c},d.createPredicate=function(a,b,c){return{fn:a,expectedValue:b,msg:c}},d.prototype.registerRule=function(a,b,c,d,e){this._rules.push({name:a,desc:b,preconditions:c,actions:d,scope:e})},d.prototype.registerEnterExitAction=function(a,b){this._enterAction=a,this._exitAction=b},d.prototype._handleFailure=function(a,b){this._logger.error(e,a.desc+" - "+b.msg)},d.prototype._getRule=function(a){for(var b=0;b<this._rules.length;++b)if(this._rules[b].name===a)return this._rules[b];return null},d.prototype.processRule=function(a,b){var c=!0,f=this._getRule(a);if(f){var g=f.scope;b||(b=d.createContext()),b.setRuleName(a);for(var h=!1,i=0;i<f.preconditions.length;++i){var j=f.preconditions[i];if(h=!!j.fn.call(g,b)!==j.expectedValue){this._handleFailure(f,j);break}}if(h)c=!1;else{b.startProcessingAction(),this._enterAction&&this._enterAction.call(g,b);for(var i=0;i<f.actions.length;++i){var k=f.actions[i];if(!b.shouldProcessAction()){this._logger.info(e,"Stopping actions for "+f.de
17235sc);break}k.call(g,b)}this._exitAction&&b.shouldProcessAction()&&this._exitAction.call(g,b)}}else this._logger.warn(e,"No registered event found for ruleName "+a),c=!1;return c};var e="RuleEngine";b._RuleEngine=d}(a.ADB.core,a.ADB.va),function(a,b){"use strict";function c(a,b,c){this.taskFn=a,this.scope=b,this.interval=c,this.remainingInterval=c}function d(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._tasks=[],this._pausedTasks=[]}c.prototype.elapsedTime=function(a){this.remainingInterval-=a},c.prototype.shouldExecute=function(){return this.remainingInterval<=0},c.prototype.execute=function(){this.taskFn.call(this.scope)},d.prototype._getCurrentTimeInMS=function(){return(new Date).getTime()},d.prototype._runTasksForTime=function(a){var b=[],c=a-this._lastTickTime;this._lastTickTime=a;for(var d=0;d<this._tasks.length;){var e=this._tasks[d];e.elapsedTime(c),e.shouldExecute()?(b.push(e),this._tasks.splice(d,1)):++d}this._checkStopTimer();for(var d=0;d<b.length;++d)b[d].execute()}
17235,d.prototype._onTick=function(){var a=this._getCurrentTimeInMS();this._runTasksForTime(a)},d.prototype._startTimer=function(){var a=this;this._timer||(this._logger.info(e,"#startTimer()"),a._lastTickTime=this._getCurrentTimeInMS(),this._timer=window.setInterval(function(){a._onTick()},f))},d.prototype._stopTimer=function(){this._timer&&(this._logger.info(e,"#stopTimer()"),window.clearInterval(this._timer),this._timer=null)},d.prototype._checkStartTimer=function(){this._tasks.length>0&&this._startTimer()},d.prototype._checkStopTimer=function(){0===this._tasks.length&&this._stopTimer()},d.prototype._removeTask=function(a,b){for(var c=0;c<a.length;++c)if(a[c]===b)return a.splice(c,1),!0;return!1},d.prototype.scheduleTask=function(a,b,d){if(this._logger.info(e,"#scheduleTask()"),!a)throw new Error("Reference to the taskFn cannot be NULL");var f=new c(a,b,d);return this._tasks.push(f),this._checkStartTimer(),f},d.prototype.cancelTask=function(a){this._logger.info(e,"#cancelTask()"),this._removeTask(this._tasks,a),this._checkStopTimer()},d.prototype.pauseTask=function(a){this._logger.info(e,"#pauseTask()"),this._removeTask(this._tasks,a)&&this._pausedTasks.push(a),this._checkStopTimer()},d.prototype.resumeTask=function(a){this._logger.info(e,"#resumeTask()"),this._removeTask(this._pausedTasks,a)&&this._tasks.push(a),this._checkStartTimer()},d.prototype.clearTasks=function(){this._stopTimer(),this._tasks=[],this._pausedTasks=[]};var e="TaskScheduler",f=250;b._TaskScheduler=d}(a.ADB.core,a.ADB.va),function(a){"use strict";function b(){this.trackingServer=void 0,this.channel=void 0,this.ovp=void 0,this.appVersion=void 0,this.playerName=void 0,this.ssl=!1,this.debugLogging=!1}a.MediaHeartbeatConfig=b,a.MediaHeartbeatConfig.sharedInstance=new b}(a.ADB.va),function(a){"use strict";function b(){this.data={}}var c=a.plugins.videoplayer.VideoInfo,d=a.plugins.videoplayer.AdBreakInfo,e=a.plugins.videoplayer.AdInfo,f=a.plugins.videoplayer.ChapterInfo,g=a.plugins.videoplayer.QoSInfo;b.MEDIAINFO_KEY_NAME="a.name",b.MEDIAINFO_KEY_VIDEOID="a.videoId",b.MEDIAINFO_KEY_ADID="a.adId",b.MEDIAINFO_KEY_LENGTH="a.length",b.MEDIAINFO_KEY_PLAYHEAD="a.playhead",b.MEDIAINFO_KEY_MEDIATYPE="a.mediaType",b.MEDIAINFO_KEY_STREAMTYPE="a.streamType",b.MEDIAINFO_KEY_POSITION="a.position",b.MEDIAINFO_KEY_STARTTIME="a.startTime",b.MEDIAINFO_KEY_BITRATE="a.bitrate",b.MEDIAINFO_KEY_FPS="a.fps",b.MEDIAINFO_KEY_DROPPEDFRAMES="a.droppedFrames",b.MEDIAINFO_KEY_STARTUPTIME="a.startupTime",b.MEDIAINFO_KEY_TIMEDMETADATA="a.timedMetadata",b.prototype.setValue=function(a,b){this.data[a]=b},b.prototype.getValue=function(a){return this.data.hasOwnProperty(a)?this.data[a]:null},b.prototype.createVideoInfo=function(){var a=new c;return a.id=null!=this.getValue(b.MEDIAINFO_KEY_VIDEOID)?this.getValue(b.MEDIAINFO_KEY_VIDEOID):"",a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.playhead=null!=this.getValue(b.MEDIAINFO_KEY_PLAYHEAD)?this.getValue(b.MEDIAINFO_KEY_PLAYHEAD):0,a.mediaType=null!=this.getValue(b.MEDIAINFO_KEY_MEDIATYPE)?this.getValue(b.MEDIAINFO_KEY_MEDIATYPE):"",a.streamType=null!=this.getValue(b.MEDIAINFO_KEY_STREAMTYPE)?this.getValue(b.MEDIAINFO_KEY_STREAMTYPE):"",a},b.prototype.createAdBreakInfo=function(){var a=new d;return a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a.startTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTTIME)?this.getValue(b.MEDIAINFO_KEY_STARTTIME):0,a},b.prototype.createAdInfo=function(){var a=new e;return a.id=null!=this.getValue(b.MEDIAINFO_KEY_ADID)?this.getValue(b.MEDIAINFO_KEY_ADID):"",a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a},b.prototype.createChapterInfo=function(){var a=new f;return a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.startTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTTIME)?this.getValue(b.MEDIAINFO_KEY_STARTTIME):0,a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a},b.prototype.createQoSInfo=function(){var a=new g;return a.bitrate=null!=this.getValue(b.MEDIAINFO_KEY_BITRATE)?this.getValue(b.MEDIAINFO_KEY_BITRATE):0,a.fps=null!=this.getValue(b.MEDIAINFO_KEY_FPS)?this.getValue(b.MEDIAINFO_KEY_FPS):0,a.droppedFrames=null!=this.getValue(b.MEDIAINFO_KEY_DROPPEDFRAMES)?this.getValue(b.MEDIAINFO_KEY_DROPPEDFRAMES):0,a.startupTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTUPTIME)?this.getValue(b.MEDIAINFO_KEY_STARTUPTIME):0,a}
17235,b.prototype.isEqual=function(a){if(this===a)return!0;if(!a||"object"!=typeof a||"function"!=typeof a.getValue)return!1;for(var c=[b.MEDIAINFO_KEY_NAME,b.MEDIAINFO_KEY_VIDEOID,b.MEDIAINFO_KEY_ADID,b.MEDIAINFO_KEY_LENGTH,b.MEDIAINFO_KEY_PLAYHEAD,b.MEDIAINFO_KEY_STREAMTYPE,b.MEDIAINFO_KEY_MEDIATYPE,b.MEDIAINFO_KEY_POSITION,b.MEDIAINFO_KEY_STARTTIME,b.MEDIAINFO_KEY_BITRATE,b.MEDIAINFO_KEY_FPS,b.MEDIAINFO_KEY_DROPPEDFRAMES,b.MEDIAINFO_KEY_STARTUPTIME,b.MEDIAINFO_KEY_TIMEDMETADATA],d=0;d<c.length;++d){var e=c[d];if(this.getValue(e)!==a.getValue(e))return!1}return!0},a.MediaObject=b}(a.ADB.va),function(a){"use strict";function b(a,c){if(!c)throw new Error("Visitor instance cannot be NULL");this._visitor=c,this._logger=a,this._status=b.OPT_UNKNOWN,this._optInFetchPermissionsCallback=this._optInFetchPermissionsCallback.bind(this)}var c="PrivacyManager";b.prototype.getStatus=function(){return this._status},b.prototype.configure=function(a){this.reset(),this._callback=a,this._optIn=window.adobe&&window.adobe.optIn?window.adobe.optIn:void 0,this._optIn&&this._optIn.doesOptInApply?(this._logger.info(c,"OptIn service enabled"),this._waitingForOptInCallback=!0,this._optInMediaApproved=!1):this._logger.info(c,"OptIn service does not apply"),this._waitingForVisitorCallback=!0,this._visitorOptOut=!1,this._fetchVisitorOptOut(),this._fetchOptIn(),this._updateStatus()},b.prototype.reset=function(){this._unsubscribeOptIn(),this._status=b.OPT_UNKNOWN,this._callback=null},b.prototype._fetchVisitorOptOut=function(){this._logger.info(c,"Fetching Visitor.isOptedOut");try{var a=this;this._visitor.isOptedOut(function(b){a._logger.info(c,"Visitor.isOptedOut : "+b),a._waitingForVisitorCallback=!1,a._visitorOptOut=b,a._updateStatus()},void 0,!0)}catch(a){this._logger.warn(c,"Error fetching Visitor.isOptedOut"),this._waitingForVisitorCallback=!1}},b.prototype._fetchOptIn=function(){try{if(!this._optIn||!this._optIn.doesOptInApply)return;this._logger.info(c,"Fetching permissions from OptIn service"),this._optInListenerRegistered||(this._optIn.fetchPermissions(this._optInFetchPermissionsCallback,!0),this._optInListenerRegistered=!0)}catch(a){this._logger.warn(c,"Error fetching permissions from OptIn service"),this._waitingForOptInCallback=!1}},b.prototype._unsubscribeOptIn=function(){try{this._optIn&&this._optInListenerRegistered&&(this._optIn.off("complete",this._optInFetchPermissionsCallback),this._optInListenerRegistered=!1)}catch(a){this._logger.error(c,"Error unsubscribing from OptIn service")}},b.prototype._optInFetchPermissionsCallback=function(){this._waitingForOptInCallback=!1;var a=this._optIn.isApproved(this._optIn.Categories.ECID),b=this._optIn.isApproved(this._optIn.Categories.ANALYTICS),d=void 0===this._optIn.Categories.MEDIA_ANALYTICS||this._optIn.isApproved(this._optIn.Categories.MEDIA_ANALYTICS);this._optInMediaApproved=a&&b&&d,this._logger.info(c,"OptIn fetchPermissions ECID : "+a+" Analytics : "+b+" Media : "+d),this._updateStatus()},b.prototype._updateStatus=function(){if(!(this._waitingForVisitorCallback||this._optIn&&this._optIn.doesOptInApply&&this._waitingForOptInCallback)){var a=this._visitorOptOut||this._optIn&&this._optIn.doesOptInApply&&!this._optInMediaApproved,d=a?b.OPT_OUT:b.OPT_IN;if(this._status!==d){this._logger.info(c,"Privacy changed from "+this._status+" to "+d),this._status=d;var e=this;setTimeout(function(){try{e._callback&&e._callback(d)}catch(a){}},0)}}},b.OPT_OUT="optout",b.OPT_IN="optin",b.OPT_UNKNOWN="optunknown",a._PrivacyManager=b}(a.ADB.va),function(a,b){"use strict";function c(a){c.__super__.constructor.call(this),this._heartbeat=a}function d(a){d.__super__.constructor.call(this),this._heartbeat=a}function e(a){e.__super__.constructor.call(this),this._heartbeat=a}function f(a){f.__super__.constructor.call(this),this._heartbeat=a}a.extend(c,b.plugins.aa.AdobeAnalyticsPluginDelegate),c.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},a.extend(d,b.plugins.ah.AdobeHeartbeatPluginDelegate),d.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},d.prototype.onTrackingDisabled=function(){this._heartbeat&&this._heartbeat._onDelegateTrackingDisabled()},a.extend(e,b.HeartbeatDelegate),e.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},a.extend(f,b.plugins.videoplayer.VideoPlayerPluginDelegate),f.prototype.getVideoInfo=function(){return this._heartbeat&&this._heartbeat._videoInfo?(this._heartbeat._delegate&&(this._heartbeat._videoInfo.playhead=this._heartbeat._delegate.getCurrentPlaybackTime()),this._heartbeat._videoInfo):null},f.prototype.getAdBreakInfo=function(){return this._heartbeat&&this._heartbeat._adBreakInfo?this._heartbeat._adBreakInfo:null},f.prototype.getAdInfo=function(){return this._heartbeat&&this._heartbeat._adInfo?this._heartbeat._adInfo:null},f.prototype.getChapterInfo=function(){return this._heartbeat&&this._heartbeat._chapterInfo?this._heartbeat._chapterInfo:null},f.prototype.getQoSInfo=function(){if(this._heartbeat&&this._heartbeat._delegate&&this._heartbeat._delegate.getQoSObject()){var a=this._heartbeat._delegate.getQoSObject();if(a&&"object"==typeof a&&a.setValue)return a.createQoSInfo()}return null},b._MediaAnalyticsPluginDelegate=c,b._MediaHeartbeatPluginDelegate=d,b._ADBMediaHeartbeatDelegate=e,b._MediaHeartbeatVideoPlayerPluginDelegate=f}(a.ADB.core,a.ADB.va),function(a,b){"use strict";function c(a,d){c.__super__.constructor.call(this),this._heartbeat=a,this._logger=
17235d,this._validator=new b.plugins.nielsen.MetadataValidator(d)}var d="MediaHeartbeatNielsenPluginDelegate",e={NielsenContentMetadata:"media_nielsen_content_metadata",NielsenChannelMetadata:"media_nielsen_channel_metadata",NielsenAdMetadata:"media_nielsen_ad_metadata"};b.plugins.nielsen&&a.extend(c,b.plugins.nielsen.NielsenPluginDelegate),c.prototype.getMetadataInfo=function(){if(this._heartbeat&&this._heartbeat._currentMediaObject){var a=this._heartbeat._currentMediaObject.getValue(e.NielsenContentMetadata);if(a&&"object"==typeof a)return this._validator.validateContentMetadata(a,"MediaHeartbeat.NielsenContentMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenContentMetadata in MediaObject")}return null},c.prototype.getAdMetadataInfo=function(){if(this._heartbeat&&this._heartbeat._currentAdObject){var a=this._heartbeat._currentAdObject.getValue(e.NielsenAdMetadata);if(a&&"object"==typeof a)return this._validator.validateAdMetadata(a,"MediaHeartbeat.NielsenAdMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenAdMetadata in MediaObject")}return null},c.prototype.getChannelInfo=function(){if(this._heartbeat&&this._heartbeat._currentMediaObject){var a=this._heartbeat._currentMediaObject.getValue(e.NielsenChannelMetadata);if(a&&"object"==typeof a)return this._validator.validateChannelMetadata(a,"MediaHeartbeat.NielsenChannelMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenChannelMetadata in MediaObject")}return null},c.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},b.plugins.nielsen&&(b._NielsenObjectKey=e,b._NielsenPluginDelegate=c)}(a.ADB.core,a.ADB.va),function(b,c){"use strict";function d(){}function e(b,d,e){if(this._appMeasurement=e||a.s,!this._appMeasurement)throw new Error("MediaHeartbeat needs a valid AppMeasurement instance.");if(!this._appMeasurement.visitor||!this._appMeasurement.visitor.marketingCloudOrgID)throw new Error("MediaHeartbeat needs a valid visitor instance with marketingCloudOrgId set.");if(!b)throw new Error("MediaHeartbeat needs a valid delegate object.");if(!d||"object"!=typeof d||!d.trackingServer)throw new Error("MediaHeartbeat needs a valid config object with trackingServer set.");this._config=d,this._delegate=b,this._debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._logger=new f,this._debugLogging?this._logger.enable():this._logger.disable(),this._ruleEngine=new t(this._logger),this._taskScheduler=new u(this._logger),this._privacyManager=new v(this._logger,this._appMeasurement.visitor),this._resetState(),this._setupRules()}var f=b.Logger,g=c.MediaObject,h=c.Heartbeat,i=c.HeartbeatConfig,j=c._ADBMediaHeartbeatDelegate,k=c.plugins.videoplayer.VideoPlayerPlugin,l=c.plugins.videoplayer.VideoPlayerPluginConfig,m=c._MediaHeartbeatVideoPlayerPluginDelegate,n=c.plugins.aa.AdobeAnalyticsPlugin,o=c.plugins.aa.AdobeAnalyticsPluginConfig,p=c._MediaAnalyticsPluginDelegate,q=c.plugins.ah.AdobeHeartbeatPlugin,r=c.plugins.ah.AdobeHeartbeatPluginConfig,s=c._MediaHeartbeatPluginDelegate,t=c._RuleEngine,u=c._TaskScheduler,v=c._PrivacyManager,w=c.utils.ObjectUtils,x=c.utils.VersionUtils;if(d.prototype.getCurrentPlaybackTime=function(){return null},d.prototype.getQoSObject=function(){return null},e.MediaType={Video:"video",Audio:"audio"},e.Event={AdBreakStart:"adBreakStart",AdBreakComplete:"adBreakComplete",AdStart:"adStart",AdComplete:"adComplete",AdSkip:"adSkip",ChapterStart:"chapterStart",ChapterComplete:"chapterComplete",ChapterSkip:"chapterSkip",SeekStart:"seekStart",SeekComplete:"seekComplete",BufferStart:"bufferStart",BufferComplete:"bufferComplete",BitrateChange:"bitrateChange",TimedMetadataUpdate:"timedMetadataUpdate"},e.StreamType={VOD:"vod",LIVE:"live",LINEAR:"linear",PODCAST:"podcast",AUDIOBOOK:"audiobook",AOD:"aod"},e.MediaObjectKey={StandardVideoMetadata:"media_standard_content_metadata",StandardMediaMetadata:"media_standard_content_metadata",StandardAdMetadata:"media_standard_ad_metadata",VideoResumed:"resumed",MediaResumed:"resumed",PrerollTrackingWaitingTime:"preroll_tracking_waiting_time"},e.VideoMetadataKeys=c.plugins.aa.VideoMetadataKeys,e.AudioMetadataKeys=c.plugins.aa.AudioMetadataKeys,e.AdMetadataKeys=c.plugins.aa.AdMetadataKeys,e.createMediaObject=function(a,b,c,d,f){var h=new g;h.setValue(g.MEDIAINFO_KEY_VIDEOID,b),h.setValue(g.MEDIAINFO_KEY_NAME,a),h.setValue(g.MEDIAINFO_KEY_LENGTH,c),h.setValue(g.MEDIAINFO_KEY_PLAYHEAD,0);var i=d||e.StreamType.VOD;return h.setValue(g.MEDIAINFO_KEY_STREAMTYPE,i),("string"!=typeof f||f!=e.MediaType.Video&&f!=e.MediaType.Audio)&&(f=e.MediaType.Video),h.setValue(g.MEDIAINFO_KEY_MEDIATYPE,f),h},e.createAdBreakObject=function(a,b,c){var d=new g;return d.setValue(g.MEDIAINFO_KEY_NAME,a),d.setValue(g.MEDIAINFO_KEY_POSITION,b),d.setValue(g.MEDIAINFO_KEY_STARTTIME,c),d},e.createAdObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_NAME,a),e.setValue(g.MEDIAINFO_KEY_ADID,b),e.setValue(g.MEDIAINFO_KEY_POSITION,c),e.setValue(g.MEDIAINFO_KEY_LENGTH,d),e},e.createChapterObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_NAME,a),e.setValue(g.MEDIAINFO_KEY_POSITION,b),e.setValue(g.MEDIAINFO_KEY_LENGTH,c),e.setValue(g.MEDIAINFO_KEY_STARTTIME,d),e},e.createQoSObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_BITRATE,a),e.setValue(g.MEDIAINFO_KEY_FPS,c),e.setValue(g.MEDIAINFO_KEY_DROPPEDFRAMES,d),e.setValue(g.MEDIAINFO_KEY_STARTUPTIME,b),e},e.createTimedMetadataObject=function(a){var b=new g;return b.setValue(g.MEDIAINFO_KEY_TIMEDMETADATA,a),b},e.version=function(){return c.Version.getVersion()},e.prototype.trackSessionStart=function(a,b){this._logger.info(D,"#::trackSessionStart()");var c=t.createContext();c.setData(E,a),c.setData(J,this._cleanContextData(b)),this._processRule(B.SessionStart,c)},e.prototype.trackPlay=function(){this._logger.info(D,"#::trackPlay()"),this._processRule(B.Play)},e.prototype.trackPause=function(){this._logger.info(D,"#::trackPause()"),this._processRule(B.Pause)},e.prototype.trackComplete=function(){this._logger.info(D,"#::trackComplete()"),this._processRule(B.VideoComplete)},e.prototype.trackSessionEnd=function(){this._logger.info(D,"#::trackSessionEnd()"),this._processRule(B.SessionEnd)},e.prototype.trackError=function(a){this._logger.info(D,"#::trackError()");var b=t.createContext();b.setData(K,a),this._processRule(B.Error,b)},e.prototype.trackEvent=function(a,b,c){this._logger.info(D,"#::trackEvent() - "+a);var d,f=t.createContext();switch(a){case e.Event.AdBreakStart:f.setData(F,b),f.setData(J,this._cleanContextData(c)),d=B.AdBreakStart;break;case e.Event.AdBreakComplete:d=B.AdBreakComplete;break;case e.Event.AdStart:f.setData(G,b),f.setData(J,this._cleanContextData(c)),d=B.AdStart;break;case e.Event.AdComplete:d=B.AdComplete;break;case e.Event.AdSkip:d=B.AdSkip;break;case e.Event.SeekStart:d=B.SeekStart;break;case e.Event.SeekComplete:d=B.SeekComplete;break;case e.Event.ChapterStart:f.setData(H,b),f.setData(J,this._cleanContextData(c)),d=B.ChapterStart;break;case e.Event.ChapterComplete:d=B.ChapterComplete;break;case e.Event.ChapterSkip:d=B.ChapterSkip;break;case e.Event.BufferStart:d=B.BufferStart;break;case e.Event.BufferComplete:d=B.BufferComplete;break;case e.Event.BitrateChange:d=B.BitrateChange;break;case e.Event.TimedMetadataUpdate:d=B.TimedMetadataUpdate,f.setData(I,b);break;default:return void this._logger.error(D,"Incorrect event name.")}this._processRule(d,f)},c.plugins.nielsen){var y=c.MediaHeartbeatConfig;y.prototype.nielsenConfigKey=void 0,y.prototype.nielsenAppInfo=void 0;var z=c._NielsenObjectKey;e.MediaObjectKey.NielsenContentMetadata=z.NielsenContentMetadata,e.MediaObjectKey.NielsenAdMetadata=z.NielsenAdMetadata,e.MediaObjectKey.NielsenChannelMetadata=z.NielsenChannelMetadata,e.NielsenContentMetadataKeys=c.plugins.nielsen.ContentMetadataKeys,e.NielsenChannelMetadataKeys=c.plugins.nielsen.ChannelMetadataKeys,e.NielsenAdMetadataKeys=c.plugins.nielsen.AdMetadataKeys,e.prototype.nielsenLoadMetadata=function(a){this._nielsenPlugin&&this._nielsenPlugin.loadMetadata(a)}}e.prototype._setState=function(a,b){this._mediaState[a]=b},e.prototype._isInState=function(a){return this._mediaState[a]},e.prototype._isTrackingDisabled=function(a){return this._mediaHeartbeatDisabled},e.prototype._isInSession=function(a){return this._isInState(A.Session)},e.prototype._isInMedia=function(a){return this._isInState(A.Media)},e.prototype._isInAd=function(a){return this._isInState(A.Ad)},e.prototype._isInAdBreak=function(a){return this._isInState(A.AdBreak)}
17235,e.prototype._isInChapter=function(a){return this._isInState(A.Chapter)},e.prototype._isInPlay=function(a){return this._isInState(A.PlayPause)},e.prototype._isInPause=function(a){return!this._isInState(A.PlayPause)},e.prototype._isInBuffer=function(a){return this._isInState(A.Buffer)},e.prototype._isInSeek=function(a){return this._isInState(A.Seek)},e.prototype._isPlatformTrackingSupported=function(a){return!this._appMeasurement.unsupportedBrowser},e.prototype._isAudioTrackingSupported=function(a){return a.getData(E).getValue(g.MEDIAINFO_KEY_MEDIATYPE)!==e.MediaType.Audio||x.isGreaterThanEqual(this._appMeasurement.version,"2.11.0")},e.prototype._isValidMediaObject=function(a){var b=a.getData(E);if(b&&b instanceof g){var c=b.getValue(e.MediaObjectKey.MediaResumed);null!=c&&"boolean"!=typeof c&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.MediaResumed in MediaObject as we expect a boolean value");var d=b.getValue(e.MediaObjectKey.PrerollTrackingWaitingTime);if(null!=d){("string"==typeof d||"number"==typeof d)&&!isNaN(d)||this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.PrerollTrackingWaitingTime in MediaObject as we expect a valid duration as number in milliseconds.")}var f=b.getValue(e.MediaObjectKey.StandardMediaMetadata);return null!=f&&"object"!=typeof f&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.StandardMediaMetadata in MediaObject as we expect a valid object with kv pairs."),!0}return!1},e.prototype._isValidAdBreakObject=function(a){var b=a.getData(F);return b&&b instanceof g},e.prototype._isDifferentAdBreakObject=function(a){var b=a.getData(F);return!(this._currentAdBreakObject&&this._currentAdBreakObject.isEqual(b))},e.prototype._isValidAdObject=function(a){var b=a.getData(G);if(b&&b instanceof g){var c=b.getValue(N);null!=c&&"boolean"!=typeof c&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.GranularAdTracking in AdObject as we expect a boolean value.");var d=b.getValue(e.MediaObjectKey.StandardAdMetadata);return null!=d&&"object"!=typeof d&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.StandardAdMetadata in AdObject as we expect a valid object with kv pairs."),!0}return!1},e.prototype._isDifferentAdObject=function(a){var b=a.getData(G);return!(this._currentAdObject&&this._currentAdObject.isEqual(b))},e.prototype._isValidChapterObject=function(a){var b=a.getData(H);return b&&b instanceof g},e.prototype._isDifferentChapterObject=function(a){var b=a.getData(H);return!(this._currentChapterObject&&this._currentChapterObject.isEqual(b))},e.prototype._isValidTimedMetadataObject=function(a){var b=a.getData(I);if(b&&b instanceof g){var c=b.getValue(g.MEDIAINFO_KEY_TIMEDMETADATA);return c&&"string"==typeof c}return!1},e.prototype._shouldAllowPlayerStateChange=function(a){return!(this._isInState(A.AdBreak)&&!this._isInState(A.Ad))},e.prototype._didBeginReporting=function(a){return this._isInState(A.Reporting)},e.prototype._deferredTrackPlay=function(){this._prerollWaitEnabled&&(this._logger.info(D,"Executing deferred API:trackPlay."),this._prerollWaitEnabled=!1,this._playTaskHandle=null,this._processRule(B.Play))},e.prototype._cmdEnterAction=function(a){var b=a.getRuleName();if(this._prerollWaitEnabled)if(this._playReceived)switch(b){case B.SeekStart:case B.BufferStart:this._logger.info(D,"Cancelling scheduled API:trackPlay because of SeekStart/BufferStart event"),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null;break;case B.SeekComplete:case B.BufferComplete:this._logger.info(D,"Rescheduled API:trackPlay after SeekComplete/BufferComplete event"),this._playTaskHandle=this._taskScheduler.scheduleTask(this._deferredTrackPlay,this,this._prerollWaitTime);break;case B.Play:this._logger.info(D,"Dropping API:trackPlay as we already have a API:trackPlay scheduled."),a.stopProcessingAction();break;case B.Pause:this._logger.info(D,"Cancelling scheduled API:trackPlay because of API:trackPause call."),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null,this._prerollWaitEnabled=!1;break;case B.AdBreakStart:this._logger.info(D,"Received API:trackEvent(AdBreakStart) within "+this._prerollWaitTime+" ms after API:trackPlay. We will track this as preroll AdBreak."),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null,this._prerollWaitEnabled=!1,this._playAfterAdStart=!0}else switch(b){case B.Play:this._logger.info(D,"Deferring API:trackPlay for "+this._prerollWaitTime+" ms."),this._playReceived=!0,this._playUnhandledFromPrerollWaitTime=!0,this._playTaskHandle=this._taskScheduler.scheduleTask(this._deferredTrackPlay,this,this._prerollWaitTime),a.stopProcessingAction();break;case B.Pause:this._logger.info(D,"Received trackPause before first trackPlay."),this._prerollWaitEnabled=!1;break;case B.AdBreakStart:this._logger.info(D,"Received trackEvent(AdBreakStart) before first trackPlay."),this._prerollWaitEnabled=!1}},e.prototype._cmdExitAction=function(a){var b=a.getRuleName();this._playAfterAdStart&&(b===B.AdStart?(this._cmdPlay(a),this._playAfterAdStart=!1):b===B.AdBreakComplete&&(this._playAfterAdStart=!1)),b!==B.AdStart||this._isInState(A.FPlayPause)||this._cmdPlay(a),this._prerollWaitEnabled||!this._playUnhandledFromPrerollWaitTime||b!==B.BufferComplete&&b!==B.SeekComplete&&b!==B.AdBreakComplete||this._isInState(A.FPlayPause)||this._isInState(A.Buffer)||this._isInState(A.Seek)||(this._logger.info(D,"Executing pending API:trackPlay. This case most likely happens tracking Preroll AdBreak without any Ads."),this._cmdPlay(a))},e.prototype._cmdConfigure=function(a){this._configureAdobeAnalyticsPlugin(),this._configureAdobeHearbeatPlugin(),this._configureVideoPlayerPlugin(),this._configureOtherPlugins(),this._configureHeartbeat(),this._privacyManager.configure(this._onPrivacyChange.bind(this))},e.prototype._cmdBeginReporting=function(a){this._playerPlugin&&this._playerPlugin.beginReporting(),this._setState(A.Reporting,!0)},e.prototype._cmdSessionStart=function(a){var b=a.getData(E),c=a.getData(J);this._currentMediaObject=b,this._videoInfo=b.createVideoInfo(),this._videoInfo.playerName=this._config.playerName?this._config.playerName:"";var d=b.getValue(e.MediaObjectKey.StandardMediaMetadata);d&&"object"==typeof d||(d=null);var f=b.getValue(e.MediaObjectKey.MediaResumed);"boolean"==typeof f&&(this._videoInfo.resumed=f);var g=b.getValue(e.MediaObjectKey.PrerollTrackingWaitingTime);"string"!=typeof g&&"number"!=typeof g||isNaN(g)||(this._prerollWaitTime=Number(g),this._prerollWaitTime<=0&&(this._prerollWaitEnabled=!1));var h=this._prepareMetadata(d,c);h[L]=this._videoInfo.mediaType,this._aaPlugin.setVideoMetadata(h),this._playerPlugin.trackVideoLoad(),this._playerPlugin.trackSe
17235ssionStart(),this._setState(A.Session,!0),this._setState(A.Media,!0)},e.prototype._destroyHeartbeat=function(a,b){a&&a.trackVideoUnload(),b&&b.destroy()},e.prototype._cmdVideoEnd=function(a){var b=a.getRuleName()===B.VideoComplete;if(this._isInState(A.Reporting)){var c=this,d=this._heartbeat,e=this._playerPlugin;this._playerPlugin.trackComplete(function(){c._destroyHeartbeat(e,d)},b)}else this._destroyHeartbeat(this._playerPlugin,this._heartbeat);this._setState(A.Media,!1)},e.prototype._cmdHandleMediaComplete=function(a){this._isInMedia(a)||(this._logger.info(D,"API:trackComplete has already cleaned up Heartbeat instance."),this._cmdSessionEnd(a),a.stopProcessingAction())},e.prototype._cmdSessionEnd=function(a){this._setState(A.Session,!1),this._resetState()},e.prototype._cmdDisableTracking=function(a){this._logger.info(D,"#_cmdDisableTracking: ADBMediaHeartbeat Tracking Disabled Remotely."),this._mediaHeartbeatDisabled=!0},e.prototype._cmdBufferStart=function(a){this._playerPlugin.trackBufferStart(),this._setState(A.Buffer,!0)},e.prototype._cmdBufferComplete=function(a){this._isInState(A.Buffer)&&this._playerPlugin.trackBufferComplete(),this._setState(A.Buffer,!1)},e.prototype._cmdSeekStart=function(a){this._playerPlugin.trackSeekStart(),this._setState(A.Seek,!0)},e.prototype._cmdSeekComplete=function(a){this._isInState(A.Seek)&&this._playerPlugin.trackSeekComplete(),this._setState(A.Seek,!1)},e.prototype._cmdPlay=function(a){this._playerPlugin.trackPlay(),this._setState(A.PlayPause,!0),this._setState(A.FPlayPause,!0),this._playUnhandledFromPrerollWaitTime=!1},e.prototype._cmdPause=function(a){this._playerPlugin.trackPause(),this._setState(A.PlayPause,!1),this._setState(A.FPlayPause,!0)},e.prototype._cmdAdBreakStart=function(a){var b=a.getData(F);this._currentAdBreakObject=b,this._adBreakInfo=b.createAdBreakInfo(),this._adBreakInfo.playerName=this._config.playerName?this._config.playerName:"",this._playerPlugin.trackAdBreakStart(),this._setState(A.AdBreak,!0)},e.prototype._cmdAdBreakComplete=function(a){this._currentAdBreakObject=null,this._adBreakInfo=null,this._isInState(A.AdBreak)&&this._playerPlugin.trackAdBreakComplete(),this._setState(A.AdBreak,!1)},e.prototype._cmdAdStart=function(a){var b=a.getData(G),c=a.getData(J);this._currentAdObject=b,this._adInfo=b.createAdInfo();var d=b.getValue(N);"boolean"==typeof d&&(this._adInfo.granularTracking=d);var f=b.getValue(e.MediaObjectKey.StandardAdMetadata);f&&"object"==typeof f||(f=null);var g=this._prepareMetadata(f,c);this._aaPlugin.setAdMetadata(g),this._playerPlugin.trackAdStart(),this._setState(A.Ad,!0)},e.prototype._cmdAdComplete=function(a){this._currentAdObject=null,this._adInfo=null,this._isInState(A.Ad)&&this._playerPlugin.trackAdComplete(),this._setState(A.Ad,!1)},e.prototype._cmdAdSkip=function(a){this._currentAdObject=null,this._adInfo=null,this._isInState(A.Ad)&&this._playerPlugin.trackAdSkip(),this._setState(A.Ad,!1)},e.prototype._cmdChapterStart=function(a){var b=a.getData(H),c=a.getData(J);this._currentChapterObject=b,this._chapterInfo=b.createChapterInfo();var d=this._prepareMetadata(null,c);this._aaPlugin.setChapterMetadata(d),this._playerPlugin.trackChapterStart(),this._setState(A.Chapter,!0)},e.prototype._cmdChapterComplete=function(a){this._currentChapterObject=null,this._chapterInfo=null,this._isInState(A.Chapter)&&this._playerPlugin.trackChapterComplete(),this._setState(A.Chapter,!1)},e.prototype._cmdChapterSkip=function(a){this._currentChapterObject=null,this._chapterInfo=null,this._isInState(A.Chapter)&&this._playerPlugin.trackChapterSkip(),this._setState(A.Chapter,!1)},e.prototype._cmdError=function(a){var b=a.getData(K);b||(b="unknown_error_id"),this._playerPlugin.trackVideoPlayerError(b)},e.prototype._cmdBitrate=function(a){this._playerPlugin.trackBitrateChange()},e.prototype._cmdTimedMetadataUpdate=function(a){var b=a.getData(I),c=b.getValue(g.MEDIAINFO_KEY_TIMEDMETADATA);this._playerPlugin.trackTimedMetadata(c)},e.prototype._processRule=function(a,b){return this._ruleEngine.processRule(a,b)},e.prototype._setupRules=function(){this._ruleEngine.registerEnterExitAction(this._cmdEnterAction,this._cmdExitAction),this._ruleEngine.registerRule(B.SessionStart,"API:trackSessionStart",[t.createPredicate(this._isPlatformTrackingSupported,!0,C.ErrUnSupportedPlatform),t.createPredicate(this._isTrackingDisabled,!1,C.ErrTrackingDisabled),t.createPredicate(this._isInSession,!1,C.ErrInSession),t.createPredicate(this._isValidMediaObject,!0,C.ErrInvalidMediaObject),t.createPredicate(this._isAudioTrackingSupported,!0,C.ErrAudioTrackingNotSupported)],[this._cmdConfigure,this._cmdSessionStart],this),this._ruleEngine.registerRule(B.SessionEnd,"API:trackSessionEnd",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession)],[this._cmdHandleMediaComplete,this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdChapterSkip,this._cmdVideoEnd,this._cmdSessionEnd],this),this._ruleEngine.registerRule(B.VideoComplete,"API:trackComplete",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdChapterSkip,this._cmdVideoEnd],this),this._ruleEngine.registerRule(B.Error,"API:trackError",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdError],this),this._ruleEngine.registerRule(B.Play,"API:trackPlay",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState)],[this._cmdSeekComplete,this._cmdBufferComplete,this._cmdPlay],this),this._ruleEngine.registerRule(B.Pause,"API:trackPause",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer),t.createPredicate(this._isInSeek,!1,C.ErrInSeek)],[this._cmdPause],this),this._ruleEngine.registerRule(B.BufferStart,"API:trackEvent(BufferStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer),t.createPredicate(this._isInSeek,!1,C.ErrInSeek)],[this._cmdBufferStart],this),this._ruleEngine.registerRule(B.BufferComplete,"API:trackEvent(BufferComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!0,C.ErrNotInBuffer)],[this._cmdBufferComplete],this),this._ruleEngine.registerRule(B.SeekStart,"API:trackEvent(SeekStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInSeek,!1,C.ErrInSeek),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer)],[this._cmdSeekStart],this),this._ruleEngine.registerRule(B.SeekComplete,"API:trackEvent(SeekComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInSeek,!0,C.ErrNotInSeek)],[this._cmdSeekComplete],this),this._ruleEngine.registerRule(B.AdBreakStart,"API:trackEvent(AdBreakStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidAdBreakObject,!0,C.ErrInvalidAdBreakObject),t.createPredicate(this._isDifferentAdBreakObject,!0,C.ErrDuplicateAdBreakObject)],[this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdAdBreakStart],this),this._ruleEngine.registerRule(B.AdBreakComplete,"API:trackEvent(AdBreakComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak)],[this._cmdAdSkip,this._cmdAdBreakComplete],this),this._ruleEngine.registerRule(B.AdStart,"API:trackEvent(AdStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isValidAdObject,!0,C.ErrInvalidAdObject),t.createPredicate(this._isDifferentAdObject,!0,C.ErrDuplicateAdObject)],[this._cmdAdSkip,this._cmdAdStart],this),this._ruleEngine.registerRule(B.AdComplete,"API:trackEvent(AdComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isInAd,!0,C.ErrNotInAd)],[this._cmdAdComplete],this),this._ruleEngine.registerRule(B.AdSkip,"API:trackEvent(AdSkip)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isInAd,!0,C.ErrNotInAd)],[this._cmdAdSkip],this),this._ruleEngine.registerRule(B.ChapterStart,"API:trackEvent(ChapterStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidChapterObject,!0,C.ErrInvalidChapterObject),t.createPredicate(this._isDifferentChapterObject,!0,C.ErrDuplicateChapterObject)],[this._cmdChapterSkip,this._cmdChapterStart],this),this._ruleEngine.registerRule(B.ChapterComplete,"API:trackEvent(ChapterComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInChapter,!0,C.ErrNotInChapter)],[this._cmdChapterComplete],this),this._ruleEngine.registerRule(B.ChapterSkip,"API:trackEvent(ChapterSkip)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInChapter,!0,C.ErrNotInChapter)],[this._cmdChapterSkip],this),this._ruleEngine.registerRule(B.BitrateChange,"API:trackEvent(BitrateChange)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdBitrate],this),this._ruleEngine.registerRule(B.TimedMetadataUpdate,"API:trackEvent(TimedMetadataUpdate)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidTimedMetadataObject,!0,C.ErrInvalidTimedMetadataObject)],[this._cmdTimedMetadataUpdate],this),this._ruleEngine.registerRule(B.DisableTracking,"Internal::DisableTracking",[t.createPredicate(this._isTrackingDisabled,!1,C.ErrTrackingDisabled)],[this._cmdDisableTracking],this),this._ruleEngine.registerRule(B.BeginReporting,"Internal::BeginReporting",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._didBeginReporting,!1,C.ErrBeginReporting)],[this._cmdBeginReporting],this)},e.prototype._configureAdobeAnalyticsPlugin=function(){this._aaPlugin=new n(this._appMeasurement,new p(this));var a=new o;a.channel=this._config.channel?this._config.channel:"",a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._aaPlugin.configure(a),this._plugins.push(this._aaPlugin)},e.prototype._configureAdobeHearbeatPlugin=function(){var a=this._appMeasurement.visitor?this._appMeasurement.visitor.marketingCloudOrgID:"";this._ahPlugin=new q(new s(this));var b=new r(this._config.trackingServer,a);b.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,b.ovp=this._config.ovp?this._config.ovp:"",b.ssl=this._config.ssl,b.sdk=this._config.appVersion?this._config.appVersion:"";var d=this._primetimeTVSDKVersion();d&&d.length>0&&(b.__primetime=!0,b.__psdkVersion=d),this._ahPlugin.configure(b),this._plugins.push(this._ahPlugin)},e.prototype._configureVideoPlayerPlugin=function(){this._playerPlugin=new k(new m(this));var a=new l;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._playerPlugin.configure(a),this._plugins.push(this._playerPlugin)},e.prototype._configureOtherPlugins=function(){if(c.plugins.nielsen&&this._config.nielsenConfigKey&&this._config.nielsenAppInfo){this._nielsenPlugin=new c.plugins.nielsen.NielsenPlugin(new c._NielsenPluginDelegate(this,this._logger));var a=new c.plugins.nielsen.NielsenPluginConfig;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,a.appInfo=this._config.nielsenAppInfo,a.configKey=this._config.nielsenConfigKey,this._nielsenPlugin.configure(a),this._plugins.push(this._nielsenPlugin)}},e.prototype._configureHeartbeat=function(){var a=new i;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._heartbeat=new h(new j(this),this._plugins),this._heartbeat.configure(a)},e.prototype._resetState=function(){this._taskScheduler.clearTasks(),this._privacyManager.reset(),this._mediaState={},this._plugins=[],this._playerPlugin=null,this._aaPlugin=null,this._ahPlugin=null,this._nielsenPlugin=null,this._heartbeat=null,this._currentMediaObject=null,this._currentAdBreakObject=null,this._currentAdObject=null,this._currentChapterObject=null,this._videoInfo=null,this._adBreakInfo=null,this._adInfo=null,this._chapterInfo=null,this._prerollWaitEnabled=!0,this._prerollWaitTime=O,this._playReceived=!1,this._playUnhandledFromPrerollWaitTime=!1,this._playTaskHandle=null,this._playAfterAdStart=!1},e.prototype._primetimeTVSDKVersion=function(){return this._currentMediaObject?this._currentMediaObject.getValue(M):null}
17235,e.prototype._cleanContextData=function(a){if(null==a||"object"!=typeof a)return null;var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];"number"!=typeof d&&"string"!=typeof d&&"boolean"!=typeof d||(b[c]=d)}return b},e.prototype._prepareMetadata=function(a,b){var c={};if(b&&w.append(c,b),a){var d=this._cleanContextData(a);w.append(c,d)}return delete c[L],c},e.prototype._onDelegateError=function(a){this._logger.error(D,a.getMessage()+" | "+a.getDetails())},e.prototype._onDelegateTrackingDisabled=function(){this._processRule(B.SessionEnd),this._processRule(B.DisableTracking)},e.prototype._onPrivacyChange=function(a){this._logger.info(D,"#_onPrivacyChange: Privacy Status: "+a),a===v.OPT_IN?this._processRule(B.BeginReporting):a===v.OPT_OUT&&this._processRule(B.SessionEnd)};var A={Session:0,Media:1,AdBreak:2,Ad:3,Chapter:4,PlayPause:5,Buffer:6,Seek:7,FPlayPause:8,Reporting:9},B={SessionStart:0,SessionEnd:1,VideoComplete:2,Play:3,Pause:4,Error:5,AdBreakStart:6,AdBreakComplete:7,AdStart:8,AdComplete:9,AdSkip:10,ChapterStart:11,ChapterComplete:12,ChapterSkip:13,SeekStart:14,SeekComplete:15,BufferStart:16,BufferComplete:17,BitrateChange:18,TimedMetadataUpdate:19,DisableTracking:20,BeginReporting:21},C={ErrUnSupportedPlatform:"MediaHeartbeat does not support tracking due to AppMeasurement or VisitorAPI not supporting the browser.",ErrNotInSession:'MediaHeartbeat is not in active tracking session, call "API:trackSessionStart" to begin a new tracking session.',ErrInSession:'MediaHeartbeat is in active tracking session, call "API:trackSessionEnd" to end current tracking session.',ErrNotInMedia:'MediaHeartbeat has completed tracking session, call "API:trackSessionEnd" first to end current session and then begin a new tracking session.',ErrInBuffer:'MediaHeartbeat is tracking buffer events, call "API:trackEvent(BufferComplete)" first to stop tracking buffer events.',ErrNotInBuffer:'MediaHeartbeat is not tracking buffer events, call "API:trackEvent(BufferStart)" before "API:trackEvent(BufferComplete)".',ErrInSeek:'MediaHeartbeat is tracking seek events, call "API:trackEvent(SeekComplete)" first to stop tracking seek events.',ErrNotInSeek:'MediaHeartbeat is not tracking seek events, call "API:trackEvent(SeekStart)" before "API:trackEvent(SeekComplete)".',ErrNotInAdBreak:'MediaHeartbeat is not tracking any AdBreak, call "API:trackEvent(AdBreakStart)" to begin tracking AdBreak',ErrNotInAd:'MediaHeartbeat is not tracking any Ad, call "API:trackEvent(AdStart)" to begin tracking Ad',ErrNotInChapter:'MediaHeartbeat is not tracking any Chapter, call "API:trackEvent(ChapterStart)" to begin tracking Chapter',ErrInvalidMediaObject:'MediaInfo passed into "API:trackSessionStart" is invalid.',ErrInvalidAdBreakObject:'AdBreakInfo passed into "API:trackEvent(AdBreakStart)" is invalid.',ErrDuplicateAdBreakObject:'MediaHeartbeat is currently tracking the AdBreak passed into "API:trackEvent(AdBreakStart)".',ErrInvalidAdObject:'AdInfo passed into "API:trackEvent(AdStart)" is invalid.',ErrDuplicateAdObject:'MediaHeartbeat is currently tracking the Ad passed into "API:trackEvent(AdStart)".',ErrInvalidChapterObject:'ChapterInfo passed into "API:trackEvent(ChapterStart)" is invalid.',ErrDuplicateChapterObject:'MediaHeartbeat is currently tracking the Chapter passed into "API:trackEvent(ChapterStart)".',ErrInvalidTimedMetadataObject:'TimedMetadata passed into "API:trackEvent(TimedMetadataUpdate)" is invalid.',ErrInvalidPlayerState:"MediaHeartbeat is tracking an AdBreak but not tracking any Ad and will drop any calls to track player state (Play, Pause, Buffer or Seek) in this state.",ErrAudioTrackingNotSupported:"Upgrade your AppMeasurement library to version >
17235= '2.11.0' to support tracking audio content.",ErrTrackingDisabled:"MediaHeartbeat tracking is disabled for this publisher. Please contact Adobe Representative to enable tracking.",ErrBeginReporting:"MediaHeartbeat has already started reporting."},D="MediaHeartbeat",E="key_media_object",F="key_adbreak_object",G="key_ad_object",H="key_chapter_object",I="key_timed_metadata_object",J="key_custom_metadata",K="key_error_id",L="a.media.streamType",M="a.__pttvsdkVersion",N="granular_ad_tracking",O=250;c._MediaHeartbeatRule=B,c._MediaHeartbeatErrorMessage=C,c.MediaHeartbeatDelegate=d,c.MediaHeartbeat=e,c.MediaHeartbeat._debugLogging=!1}(a.ADB.core,a.ADB.va),a.ADB||(a.ADB={}),a.ADB.core||(a.ADB.core=core),a.ADB.va||(a.ADB.va=va),a.ADB.va.plugins||(a.ADB.va.plugins={})}(this); 17236 17237 }).call(lib); 17238 exports.va = lib.ADB.va; 17239 exports.core = lib.ADB.core; 17240})); 17241 17242 } 17243 17244 }, 17245 "adobe-video-analytics/src/lib/helpers/mediaHeartbeat.js": { 17246 "script": function(module, exports, require, turbine) { 17247'use strict'; 17248 17249var ADB = require('../codeLibrary/MediaSDK.min'); 17250var deepFreeze = require('./deepFreeze'); 17251 17252var MediaHeartbeat = ADB.va.MediaHeartbeat; 17253var MediaHeartbeatDelegate = ADB.va.MediaHeartbeatDelegate; 17254 17255var API = { 17256 Event : MediaHeartbeat.Event, 17257 MediaType : MediaHeartbeat.MediaType, 17258 StreamType : MediaHeartbeat.StreamType, 17259 MediaObjectKey : MediaHeartbeat.MediaObjectKey, 17260 VideoMetadataKeys : MediaHeartbeat.VideoMetadataKeys, 17261 AudioMetadataKeys : MediaHeartbeat.AudioMetadataKeys, 17262 AdMetadataKeys : MediaHeartbeat.AdMetadataKeys, 17263 version : MediaHeartbeat.version, 17264 createMediaObject : MediaHeartbeat.createMediaObject, 17265 createAdBreakObject : MediaHeartbeat.createAdBreakObject, 17266 createAdObject : MediaHeartbeat.createAdObject, 17267 createChapterObject : MediaHeartbeat.createChapterObject, 17268 createQoSObject : MediaHeartbeat.createQoSObject 17269}; 17270 17271module.exports = deepFreeze(API); 17272 17273 } 17274 17275 }, 17276 "adobe-video-analytics/src/lib/helpers/exportGlobal.js": { 17277 "script": function(module, exports, require, turbine) { 17278'use strict'; 17279 17280var window = require('@adobe/reactor-window'); 17281var objectAssign = require('@adobe/reactor-object-assign'); 17282var deepFreeze = require('./deepFreeze'); 17283var ADB = require('../codeLibrary/MediaSDK.min'); 17284var getInstance = require('./getInstance'); 17285var MediaHeartbeat = require('./mediaHeartbeat'); 17286 17287var MediaHeartbeatDelegate = ADB.va.MediaHeartbeatDelegate; 17288 17289module.exports = function(extensionSettings) { 17290 try { 17291 var namespace = extensionSettings && extensionSettings.exportNamespace; 17292 if (namespace) { 17293 var exportObj = { 17294 MediaHeartbeat : objectAssign({getInstance : getInstance}, MediaHeartbeat), 17295 MediaHeartbeatDelegate : MediaHeartbeatDelegate 17296 }; 17297 17298 if (typeof window[namespace] === 'undefined' || (typeof window[namespace] === 'object' && !window[namespace])) { 17299 window[namespace] = deepFreeze(exportObj); 17300 } else { 17301 var msg = 'Exporting APIs to Browser window["' + namespace + 17302 '"] failed as it is not null/undefined.'; 17303 turbine.logger.error(msg); 17304 } 17305 17306 } 17307 } catch (ex) { 17308 var msg = 'Exporting APIs to Browser window["' + namespace + 17309 '"] failed with reason' + ex.message + '.'; 17310 turbine.logger.error(msg); 17311 } 17312}; 17313 17314 } 17315 17316 }, 17317 "adobe-video-analytics/src/lib/helpers/deepFreeze.js": { 17318 "script": function(module, exports, require, turbine) { 17319'use strict'; 17320 17321function deepFreeze(obj) { 17322 var propNames = Object.getOwnPropertyNames(obj); 17323 propNames.forEach(function(name) { 17324 var prop = obj[name]; 17325 if (typeof prop === 'object' && prop !== null) { 17326 deepFreeze(prop); 17327 } 17328 }); 17329 return Object.freeze(obj); 17330}; 17331 17332module.exports = deepFreeze; 17333 } 17334 17335 } 17336 } 17337 }, 17338 "promise-polyfill": { 17339 "displayName": "Promise Polyfill", 17340 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EP25323084165d470d89410de73d1e4267/", 17341 "modules": { 17342 "promise-polyfill/src/lib/promise-polyfill.js": { 17343 "script": function(module, exports, require, turbine) { 17344var P = require('@adobe/reactor-promise'); 17345 17346if (typeof Promise === 'undefined') { 17347 window.Promise = P; 17348} 17349 } 17350 17351 } 17352 } 17353 }, 17354 "adobe-target-v2": { 17355 "displayName": "Adobe Target v2", 17356 "hostedLibFilesBaseUrl": "//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/hostedLibFiles/EPcf49e0a994c4470ebb623d93b334e377/", 17357 "settings": { 17358 "targetSettings": { 17359 "enabled": true, 17360 "timeout": "3000", 17361 "version": "2.10.2", 17362 "endpoint": "/rest/v1/delivery", 17363 "imsOrgId": "B3902DB45388D9620A490D4C@AdobeOrg", 17364 "clientCode": "ni", 17365 "secureOnly": false, 17366 "serverState": {}, 17367 "optinEnabled": false, 17368 "serverDomain": "target.ni.com", 17369 "urlSizeLimit": 2048, 17370 "viewsEnabled": true, 17371 "optoutEnabled": false, 17372 "globalMboxName": "target-global-mbox", 17373 "bodyHiddenStyle": "body {opacity: 0}", 17374 "pageLoadEnabled": true, 17375 "analyticsLogging": "server_side", 17376 "deviceIdLifetime": 63244800000, 17377 "bodyHidingEnabled": true, 17378 "decisioningMethod": "server-side", 17379 "sessionIdLifetime": 1860000, 17380 "visitorApiTimeout": 2000, 17381 "authoringScriptUrl": "//cdn.tt.omtrdc.net/cdn/target-vec.js", 17382 "overrideMboxEdgeServer": false, 17383 "selectorsPollingTimeout": 5000, 17384 "defaultContentHiddenStyle": "visibility: hidden;", 17385 "defaultContentVisibleStyle": "visibility: visible;", 17386 "overrideMboxEdgeServerTimeout": 1860000, 17387 "supplementalDataIdParamTimeout": 30 17388 } 17389 }, 17390 "modules": { 17391 "adobe-target-v2/lib/firePageLoad.js": { 17392 "name": "fire-page-load", 17393 "displayName": "Fire Page Load Request", 17394 "script": function(module, exports, require, turbine) { 17395"use strict"; 17396 17397/* eslint-disable import/no-extraneous-dependencies */ 17398var win = require("@adobe/reactor-window"); 17399 17400var _require = require("./modules/libs/at-launch"),
17401 initConfig = _require.initConfig, 17402 initDelivery = _require.initDelivery; 17403 17404var initPageLoadSettings = require("./modules/page-load"); 17405var messages = require("./messages"); 17406 17407function isLibraryPresent() { 17408 return win.adobe && win.adobe.target && win.adobe.target.VERSION; 17409} 17410 17411module.exports = function (settings) { 17412 var targetSettings = initPageLoadSettings(settings); 17413 17414 if (!isLibraryPresent()) { 17415 if (win.console) { 17416 turbine.logger.warn(messages.NO_REQUEST); 17417 } 17418 17419 return; 17420 } 17421 17422 initConfig(targetSettings); 17423 initDelivery(); 17424}; 17425 } 17426 17427 }, 17428 "adobe-target-v2/lib/addPageLoadParams.js": { 17429 "name": "add-page-load-params", 17430 "displayName": "Add Params to Page Load Request", 17431 "script": function(module, exports, require, turbine) { 17432"use strict"; 17433 17434var _require = require("./modules/params-store"), 17435 mergePageLoadParams = _require.mergePageLoadParams; 17436 17437module.exports = function (settings) { 17438 mergePageLoadParams(settings.params); 17439}; 17440 } 17441 17442 }, 17443 "adobe-target-v2/lib/loadTarget.js": { 17444 "name": "load-target", 17445 "displayName": "Load Target", 17446 "script": function(module, exports, require, turbine) { 17447"use strict"; 17448 17449/* eslint-disable import/no-extraneous-dependencies */ 17450var win = require("@adobe/reactor-window"); 17451var doc = require("@adobe/reactor-document"); 17452 17453var _require = require("./modules/load-target"), 17454 initLibrarySettings = _require.initLibrarySettings, 17455 overridePublicApi = _require.overridePublicApi; 17456 17457var _require2 = require("./modules/optin"), 17458 shouldUseOptIn = _require2.shouldUseOptIn, 17459 isTargetApproved = _require2.isTargetApproved; 17460 17461var handleRequest = require("./analyticsIntegration"); 17462 17463module.exports = function () { 17464 var targetSettings = initLibrarySettings(); 17465 17466 if (!targetSettings || !targetSettings.enabled) { 17467 overridePublicApi(win); 17468 return; 17469 } 17470 17471 var _require3 = require("./modules/libs/at-launch"), 17472 init = _require3.init; //eslint-disable-line 17473 17474 init(win, doc, targetSettings); 17475 17476 if (!shouldUseOptIn() || isTargetApproved()) { 17477 handleRequest(); 17478 } 17479}; 17480 } 17481 17482 }, 17483 "adobe-target-v2/lib/modules/libs/at-launch.js": { 17484 "script": function(module, exports, require, turbine) { 17485/** 17486 * @license 17487 * at.js 2.11.9 | (c) Adobe Systems Incorporated | All rights reserved 17488 * zepto.js | (c) 2010-2016 Thomas Fuchs | zeptojs.com/license 17489 */ 17490"use strict"; 17491 17492var define; 17493 17494var assign = require("@adobe/reactor-object-assign"); 17495var cookie = require("@adobe/reactor-cookie"); 17496var queryString = require("@adobe/reactor-query-string"); 17497var Promise$1 = require("@adobe/reactor-promise"); 17498var loadScript = require("@adobe/reactor-load-script"); 17499 17500function _interopDefaultLegacy(e) { 17501 return e && typeof e === "object" && "default" in e ? e : { default: e }; 17502} 17503 17504var assign__default = /*#__PURE__*/ _interopDefaultLegacy(assign); 17505var cookie__default = /*#__PURE__*/ _interopDefaultLegacy(cookie); 17506var queryString__default = /*#__PURE__*/ _interopDefaultLegacy(queryString); 17507var Promise__default = /*#__PURE__*/ _interopDefaultLegacy(Promise$1); 17508var loadScript__default = /*#__PURE__*/ _interopDefaultLegacy(loadScript); 17509 17510function _typeof(obj) { 17511 "@babel/helpers - typeof"; 17512 17513 return ( 17514 (_typeof = 17515 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 17516 ? function(obj) { 17517 return typeof obj; 17518 } 17519 : function(obj) { 17520 return obj && 17521 "function" == typeof Symbol && 17522 obj.constructor === Symbol && 17523 obj !== Symbol.prototype 17524 ? "symbol" 17525 : typeof obj; 17526 }), 17527 _typeof(obj) 17528 ); 17529} 17530 17531function _defineProperty(obj, key, value) { 17532 if (key in obj) { 17533 Object.defineProperty(obj, key, { 17534 value: value, 17535 enumerable: true, 17536 configurable: true, 17537 writable: true 17538 }); 17539 } else { 17540 obj[key] = value; 17541 } 17542 17543 return obj; 17544} 17545 17546function _slicedToArray(arr, i) { 17547 return ( 17548 _arrayWithHoles(arr) || 17549 _iterableToArrayLimit(arr, i) || 17550 _unsupportedIterableToArray(arr, i) || 17551 _nonIterableRest() 17552 ); 17553} 17554 17555function _toConsumableArray(arr) { 17556 return ( 17557 _arrayWithoutHoles(arr) || 17558 _iterableToArray(arr) || 17559 _unsupportedIterableToArray(arr) || 17560 _nonIterableSpread() 17561 ); 17562} 17563 17564function _arrayWithoutHoles(arr) { 17565 if (Array.isArray(arr)) return _arrayLikeToArray(arr); 17566} 17567 17568function _arrayWithHoles(arr) { 17569 if (Array.isArray(arr)) return arr; 17570} 17571 17572function _iterableToArray(iter) { 17573 if ( 17574 (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null) || 17575 iter["@@iterator"] != null 17576 ) 17577 return Array.from(iter); 17578} 17579 17580function _iterableToArrayLimit(arr, i) { 17581 var _i = 17582 arr == null 17583 ? null 17584 : (typeof Symbol !== "undefined" && arr[Symbol.iterator]) || 17585 arr["@@iterator"]; 17586 17587 if (_i == null) return; 17588 var _arr = []; 17589 var _n = true; 17590 var _d = false;
17591 17592 var _s, _e; 17593 17594 try { 17595 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { 17596 _arr.push(_s.value); 17597 17598 if (i && _arr.length === i) break; 17599 } 17600 } catch (err) { 17601 _d = true; 17602 _e = err; 17603 } finally { 17604 try { 17605 if (!_n && _i["return"] != null) _i["return"](); 17606 } finally { 17607 if (_d) throw _e; 17608 } 17609 } 17610 17611 return _arr; 17612} 17613 17614function _unsupportedIterableToArray(o, minLen) { 17615 if (!o) return; 17616 if (typeof o === "string") return _arrayLikeToArray(o, minLen); 17617 var n = Object.prototype.toString.call(o).slice(8, -1); 17618 if (n === "Object" && o.constructor) n = o.constructor.name; 17619 if (n === "Map" || n === "Set") return Array.from(o); 17620 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) 17621 return _arrayLikeToArray(o, minLen); 17622} 17623 17624function _arrayLikeToArray(arr, len) { 17625 if (len == null || len > arr.length) len = arr.length; 17626 17627 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; 17628 17629 return arr2; 17630} 17631 17632function _nonIterableSpread() { 17633 throw new TypeError( 17634 "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." 17635 ); 17636} 17637 17638function _nonIterableRest() { 17639 throw new TypeError( 17640 "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." 17641 ); 17642} 17643 17644function isNil(value) { 17645 return value == null; 17646} 17647var isArray = Array.isArray; 17648var objectProto = Object.prototype; 17649var nativeObjectToString = objectProto.toString; 17650function objectToString(value) { 17651 return nativeObjectToString.call(value); 17652} 17653function baseGetTag(value) { 17654 return objectToString(value); 17655} 17656function isObject(value) { 17657 var type = _typeof(value); 17658 var notNull = value != null; 17659 return notNull && (type === "object" || type === "function"); 17660} 17661var funcTag = "[object Function]"; 17662function isFunction(value) { 17663 if (!isObject(value)) { 17664 return false; 17665 } 17666 return baseGetTag(value) === funcTag; 17667} 17668function identity(value) { 17669 return value; 17670} 17671function castFunction(value) { 17672 return isFunction(value) ? value : identity; 17673} 17674function keys(object) { 17675 if (isNil(object)) { 17676 return []; 17677 } 17678 return Object.keys(object); 17679} 17680var arrayEach = function arrayEach(iteratee, collection) { 17681 return collection.forEach(iteratee); 17682}; 17683var baseEach = function baseEach(iteratee, collection) { 17684 arrayEach(function(key) { 17685 return iteratee(collection[key], key); 17686 }, keys(collection)); 17687}; 17688var arrayFilter = function arrayFilter(predicate, collection) { 17689 return collection.filter(predicate); 17690}; 17691var baseFilter = function baseFilter(predicate, collection) { 17692 var result = {}; 17693 baseEach(function(value, key) { 17694 if (predicate(value, key)) { 17695 result[key] = value; 17696 } 17697 }, collection); 17698 return result; 17699}; 17700function filter(predicate, collection) { 17701 if (isNil(collection)) { 17702 return []; 17703 } 17704 var func = isArray(collection) ? arrayFilter : baseFilter; 17705 return func(castFunction(predicate), collection); 17706} 17707function first(array) { 17708 return array && array.length ? array[0] : undefined; 17709} 17710function flatten(array) { 17711 if (isNil(array)) { 17712 return []; 17713 } 17714 return [].concat.apply([], array); 17715} 17716function flow(funcs) { 17717 var _this = this; 17718 var length = funcs ? funcs.length : 0; 17719 var index = length; 17720 while ((index -= 1)) { 17721 if (!isFunction(funcs[index])) { 17722 throw new TypeError("Expected a function"); 17723 } 17724 } 17725 return function() { 17726 var i = 0; 17727 for ( 17728 var _len = arguments.length, args = new Array(_len), _key = 0; 17729 _key < _len; 17730 _key++ 17731 ) { 17732 args[_key] = arguments[_key]; 17733 } 17734 var result = length ? funcs[i].apply(_this, args) : args[0]; 17735 while ((i += 1) < length) { 17736 result = funcs[i].call(_this, result); 17737 } 17738 return result; 17739 }; 17740} 17741function forEach(iteratee, collection) { 17742 if (isNil(collection)) { 17743 return; 17744 } 17745 var func = isArray(collection) ? arrayEach : baseEach; 17746 func(castFunction(iteratee), collection); 17747} 17748function isObjectLike(value) { 17749 var notNull = value != null; 17750 return notNull && _typeof(value) === "object"; 17751} 17752var stringTag = "[object String]"; 17753function isString(value) { 17754 return ( 17755 typeof value === "string" || 17756 (!isArray(value) && isObjectLike(value) && baseGetTag(value) === stringTag) 17757 ); 17758} 17759function hash(string) { 17760 if (!isString(string)) { 17761 return -1; 17762 } 17763 var result = 0; 17764 var length = string.length; 17765 for (var i = 0; i < length; i += 1) { 17766 result = ((result << 5) - result + string.charCodeAt(i)) & 0xffffffff; 17767 } 17768 return result; 17769} 17770var MAX_SAFE_INTEGER = 9007199254740991; 17771function isLength(value) { 17772 return ( 17773 typeof value === "number" && 17774 value > -1 && 17775 value % 1 === 0 && 17776 value <= MAX_SAFE_INTEGER 17777 ); 17778} 17779function isArrayLike(value) { 17780 return value != null && isLength(value.length) && !isFunction(value); 17781} 17782var arrayMap = function arrayMap(iteratee, collection) { 17783 return collection.map(iteratee); 17784}; 17785function baseValues(props, object) { 17786 return arrayMap(function(key) { 17787 return object[key]; 17788 }, props); 17789} 17790function copyArray(source) { 17791 var index = 0; 17792 var length = source.length; 17793 var array = Array(length); 17794 while (index < length) { 17795 array[index] = source[index]; 17796 index += 1; 17797 } 17798 return array; 17799} 17800function stringToArray(str) { 17801 return str.split(""); 17802} 17803function toArray(value) { 17804 if (isNil(value)) { 17805 return []; 17806 } 17807 if (isArrayLike(value)) { 17808 return isString(value) ? stringToArray(value) : copyArray(value); 17809 } 17810 return baseValues(keys(value), value); 17811} 17812var objectProto$1 = Object.prototype; 17813var hasOwnProperty = objectProto$1.hasOwnProperty; 17814function isEmpty(value) { 17815 if (value == null) { 17816 return true; 17817 } 17818 if ( 17819 isArrayLike(value) && 17820 (isArray(value) || isString(value) || isFunction(value.splice)) 17821 ) { 17822 return !value.length; 17823 } 17824 for (var key in value) { 17825 if (hasOwnProperty.call(value, key)) { 17826 return false;
17827 } 17828 } 17829 return true; 17830} 17831var stringProto = String.prototype; 17832var nativeStringTrim = stringProto.trim; 17833function trim(string) { 17834 return isNil(string) ? "" : nativeStringTrim.call(string); 17835} 17836function isBlank(value) { 17837 return isString(value) ? !trim(value) : isEmpty(value); 17838} 17839var isNotBlank = function isNotBlank(value) { 17840 return !isBlank(value); 17841}; 17842var numberTag = "[object Number]"; 17843function isNumber(value) { 17844 return ( 17845 typeof value === "number" || 17846 (isObjectLike(value) && baseGetTag(value) === numberTag) 17847 ); 17848} 17849var objectTag = "[object Object]"; 17850var funcProto = Function.prototype; 17851var objectProto$2 = Object.prototype; 17852var funcToString = funcProto.toString; 17853var hasOwnProperty$1 = objectProto$2.hasOwnProperty; 17854var objectCtorString = funcToString.call(Object); 17855function getPrototype(value) { 17856 return Object.getPrototypeOf(Object(value)); 17857} 17858function isPlainObject(value) { 17859 if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { 17860 return false; 17861 } 17862 var proto = getPrototype(value); 17863 if (proto === null) { 17864 return true; 17865 } 17866 var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor; 17867 return ( 17868 typeof Ctor === "function" && 17869 Ctor instanceof Ctor && 17870 funcToString.call(Ctor) === objectCtorString 17871 ); 17872} 17873function join(joiner, collection) { 17874 if (!isArray(collection)) { 17875 return ""; 17876 } 17877 return collection.join(joiner || ""); 17878} 17879var baseMap = function baseMap(iteratee, collection) { 17880 var result = {}; 17881 baseEach(function(value, key) { 17882 result[key] = iteratee(value, key); 17883 }, collection); 17884 return result; 17885}; 17886function map(iteratee, collection) { 17887 if (isNil(collection)) { 17888 return []; 17889 } 17890 var func = isArray(collection) ? arrayMap : baseMap; 17891 return func(castFunction(iteratee), collection); 17892} 17893function now() { 17894 return new Date().getTime(); 17895} 17896var arrayReduce = function arrayReduce(iteratee, accumulator, collection) { 17897 return collection.reduce(iteratee, accumulator); 17898}; 17899var baseReduce = function baseReduce(iteratee, accumulator, collection) { 17900 var localAcc = accumulator; 17901 baseEach(function(value, key) { 17902 localAcc = iteratee(localAcc, value, key); 17903 }, collection); 17904 return localAcc; 17905}; 17906function reduce(iteratee, accumulator, collection) { 17907 if (isNil(collection)) { 17908 return accumulator; 17909 } 17910 var func = isArray(collection) ? arrayReduce : baseReduce; 17911 return func(castFunction(iteratee), accumulator, collection); 17912} 17913var arrayProto = Array.prototype; 17914var nativeReverse = arrayProto.reverse; 17915function reverse(array) { 17916 return array == null ? array : nativeReverse.call(array); 17917} 17918function split(separator, string) { 17919 if (isBlank(string)) { 17920 return []; 17921 } 17922 return string.split(separator || ""); 17923} 17924function delay(func) { 17925 var wait = 17926 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; 17927 return setTimeout(func, Number(wait) || 0); 17928} 17929function cancelDelay(id) { 17930 clearTimeout(id); 17931} 17932var DECISIONING_METHOD = { 17933 ON_DEVICE: "on-device", 17934 SERVER_SIDE: "server-side", 17935 HYBRID: "hybrid" 17936}; 17937var EXECUTION_MODE = { 17938 EDGE: "edge", 17939 LOCAL: "local" 17940}; 17941function isUndefined(value) { 17942 return typeof value === "undefined"; 17943} 17944function isDefined(value) { 17945 return !isUndefined(value); 17946} 17947var noop = function noop() { 17948 return undefined; 17949}; 17950var noopPromise = function noopPromise(value) { 17951 return Promise.resolve(value); 17952}; 17953function isExecutePageLoad(request) { 17954 return !!request.execute && !!request.execute.pageLoad; 17955} 17956function executeMboxCount(request) { 17957 return ( 17958 (!!request.execute && 17959 !!request.execute.mboxes && 17960 request.execute.mboxes.length) || 17961 0 17962 ); 17963} 17964function isPrefetchPageLoad(request) { 17965 return !!request.prefetch && !!request.prefetch.pageLoad; 17966} 17967function prefetchMboxCount(request) { 17968 return ( 17969 (!!request.prefetch && 17970 !!request.prefetch.mboxes && 17971 request.prefetch.mboxes.length) || 17972 0 17973 ); 17974} 17975function prefetchViewCount(request) { 17976 return ( 17977 (!!request.prefetch && 17978 !!request.prefetch.views && 17979 request.prefetch.views.length) || 17980 0 17981 ); 17982} 17983function formatDecimal(value) { 17984 var digits = 17985 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; 17986 if (!value || !isNumber(value)) { 17987 return undefined; 17988 } 17989 return +value.toFixed(digits); 17990} 17991function InMemoryTelemetryStore() { 17992 var telemetryEntries = []; 17993 function addEntry(entry) { 17994 telemetryEntries.push(entry); 17995 } 17996 function getAndClearEntries() { 17997 var allEntries = telemetryEntries; 17998 telemetryEntries = []; 17999 return allEntries; 18000 } 18001 function hasEntries() { 18002 return telemetryEntries.length > 0; 18003 } 18004 return { 18005 addEntry: addEntry, 18006 getAndClearEntries: getAndClearEntries, 18007 hasEntries: hasEntries 18008 }; 18009} 18010function TelemetryProvider() { 18011 var telemetryEnabled = 18012 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; 18013 var method = 18014 arguments.length > 1 && arguments[1] !== undefined 18015 ? arguments[1] 18016 : DECISIONING_METHOD.SERVER_SIDE; 18017 var telemetryStore = 18018 arguments.length > 2 && arguments[2] !== undefined 18019 ? arguments[2] 18020 : InMemoryTelemetryStore(); 18021 function getMode(response) { 18022 return response.edgeHost ? EXECUTION_MODE.EDGE : EXECUTION_MODE.LOCAL; 18023 } 18024 function getFeatures(request) { 18025 var features = {}; 18026 var executePageLoad = isExecutePageLoad(request); 18027 var executeMbox = executeMboxCount(request); 18028 var prefetchPageLoad = isPrefetchPageLoad(request); 18029 var prefetchMbox = prefetchMboxCount(request); 18030 var prefetchView = prefetchViewCount(request); 18031 if (executePageLoad) { 18032 features.executePageLoad = executePageLoad; 18033 } 18034 if (executeMbox) { 18035 features.executeMboxCount = executeMbox; 18036 } 18037 if (prefetchPageLoad) { 18038 features.prefetchPageLoad = prefetchPageLoad; 18039 } 18040 if (prefetchMbox) { 18041 features.prefetchMboxCount = prefetchMbox; 18042 } 18043 if (prefetchView) { 18044 features.prefetchViewCount = prefetchView; 18045 } 18046 return features; 18047 } 18048 function normalizeEntryRequest(entryRequest) { 18049 var normalized = {}; 18050 if (entryRequest.dns) { 18051 normalized.dns = formatDecimal(entryRequest.dns); 18052 } 18053 if (entryRequest.tls) { 18054 normalized.tls = formatDecimal(entryRequest.tls); 18055 } 18056 if (entryRequest.timeToFirstByte) { 18057 normalized.timeToFirstByte = formatDecimal(entryRequest.timeToFirstByte); 18058 } 18059 if (entryRequest.download) { 18060 normalized.download = formatDecimal(entryRequest.download); 18061 } 18062 if (entryRequest.responseSize) { 18063 normalized.responseSize = formatDecimal(entryRequest.responseSize); 18064 } 18065 return normalized; 18066 } 18067 function normalizeEntry(entry) { 18068 var normalized = {}; 18069 if (entry.execution) { 18070 normalized.execution = formatDecimal(entry.execution); 18071 } 18072 if (entry.parsing) { 18073 normalized.parsing = formatDecimal(entry.parsing); 18074 } 18075 if (entry.request) { 18076 normalized.request = normalizeEntryRequest(entry.request); 18077 } 18078 return assign__default["default"](entry, normalized); 18079 } 18080 function normalizeAndAddEntry(entry) { 18081 telemetryStore.addEntry(normalizeEntry(entry)); 18082 } 18083 function addServerStateEntry(request) { 18084 if (!telemetryEnabled) { 18085 return; 18086 } 18087 normalizeAndAddEntry({ 18088 requestId: request.requestId, 18089 timestamp: now() 18090 }); 18091 } 18092 function addRenderEntry(renderId, execution) { 18093 if (!telemetryEnabled) { 18094 return; 18095 } 18096 normalizeAndAddEntry({ 18097 requestId: renderId, 18098 timestamp: now(), 18099 execution: execution 18100 }); 18101 } 18102 function addRequestEntry(requestId, entry) { 18103 var requestEntry = assign__default["default"](entry, { 18104 requestId: requestId, 18105 timestamp: now() 18106 }); 18107 normalizeAndAddEntry(requestEntry); 18108 } 18109 function addArtifactRequestEntry(requestId, entry) { 18110 if (!telemetryEnabled || !entry) { 18111 return; 18112 } 18113 addRequestEntry(requestId, entry); 18114 } 18115 function addDeliveryRequestEntry(request, entry, response) { 18116 var decisioningMethod = 18117 arguments.length > 3 && arguments[3] !== undefined 18118 ? arguments[3] 18119 : method; 18120 if (!telemetryEnabled || !entry) { 18121 return; 18122 } 18123 var requestId = request.requestId; 18124 var features = assign__default["default"](getFeatures(request), { 18125 decisioningMethod: decisioningMethod 18126 }); 18127 var baseEntry = { 18128 mode: getMode(response), 18129 features: features 18130 }; 18131 var deliveryRequestEntry = assign__default["default"](entry, baseEntry); 18132 addRequestEntry(requestId, deliveryRequestEntry); 18133 } 18134 function getAndClearEntries() { 18135 return telemetryStore.getAndClearEntries(); 18136 } 18137 function hasEntries() { 18138 return telemetryStore.hasEntries(); 18139 } 18140 function addTelemetryToDeliveryRequest(deliveryRequest) { 18141 if (hasEntries()) { 18142 return assign__default["default"](deliveryRequest, { 18143 telemetry: {
18144 entries: getAndClearEntries() 18145 } 18146 }); 18147 } 18148 return deliveryRequest; 18149 } 18150 return { 18151 addDeliveryRequestEntry: addDeliveryRequestEntry, 18152 addArtifactRequestEntry: addArtifactRequestEntry, 18153 addRenderEntry: addRenderEntry, 18154 addServerStateEntry: addServerStateEntry, 18155 getAndClearEntries: getAndClearEntries, 18156 hasEntries: hasEntries, 18157 addTelemetryToDeliveryRequest: addTelemetryToDeliveryRequest 18158 }; 18159} 18160var commonjsGlobal = 18161 typeof globalThis !== "undefined" 18162 ? globalThis 18163 : typeof window !== "undefined" 18164 ? window 18165 : typeof global !== "undefined" 18166 ? global 18167 : typeof self !== "undefined" 18168 ? self 18169 : {}; 18170function createCommonjsModule(fn, module) { 18171 return ( 18172 (module = { 18173 exports: {} 18174 }), 18175 fn(module, module.exports), 18176 module.exports 18177 ); 18178} 18179var performanceNow = createCommonjsModule(function(module) { 18180 (function() { 18181 var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; 18182 if ( 18183 typeof performance !== "undefined" && 18184 performance !== null && 18185 performance.now 18186 ) { 18187 module.exports = function() { 18188 return performance.now(); 18189 }; 18190 } else if ( 18191 typeof process !== "undefined" && 18192 process !== null && 18193 process.hrtime 18194 ) { 18195 module.exports = function() { 18196 return (getNanoSeconds() - nodeLoadTime) / 1e6; 18197 }; 18198 hrtime = process.hrtime; 18199 getNanoSeconds = function getNanoSeconds() { 18200 var hr; 18201 hr = hrtime(); 18202 return hr[0] * 1e9 + hr[1]; 18203 }; 18204 moduleLoadTime = getNanoSeconds(); 18205 upTime = process.uptime() * 1e9; 18206 nodeLoadTime = moduleLoadTime - upTime; 18207 } else if (Date.now) { 18208 module.exports = function() { 18209 return Date.now() - loadTime; 18210 }; 18211 loadTime = Date.now(); 18212 } else { 18213 module.exports = function() { 18214 return new Date().getTime() - loadTime; 18215 }; 18216 loadTime = new Date().getTime(); 18217 } 18218 }.call(commonjsGlobal)); 18219}); 18220function createPerfToolInstance() { 18221 var timingIds = {}; 18222 var startTimes = {}; 18223 var timings = {}; 18224 function getUniqueTimingId(id) { 18225 var count = (isDefined(timingIds[id]) ? timingIds[id] : 0) + 1; 18226 timingIds[id] = count; 18227 return "" + id + count; 18228 } 18229 function timeStart(id) { 18230 var incrementTimer = 18231 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 18232 var timingId = incrementTimer ? getUniqueTimingId(id) : id; 18233 if (isUndefined(startTimes[timingId])) { 18234 startTimes[timingId] = performanceNow(); 18235 } 18236 return timingId; 18237 } 18238 function timeEnd(id) { 18239 var offset = 18240 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; 18241 if (isUndefined(startTimes[id])) { 18242 return -1; 18243 } 18244 var timing = performanceNow() - startTimes[id] - offset; 18245 timings[id] = timing; 18246 return timing; 18247 } 18248 function clearTiming(id) { 18249 delete timingIds[id]; 18250 delete startTimes[id]; 18251 delete timings[id]; 18252 } 18253 function reset() { 18254 timingIds = {}; 18255 startTimes = {}; 18256 timings = {}; 18257 } 18258 return { 18259 timeStart: timeStart, 18260 timeEnd: timeEnd, 18261 getTimings: function getTimings() { 18262 return timings; 18263 }, 18264 getTiming: function getTiming(key) { 18265 return timings[key]; 18266 }, 18267 clearTiming: clearTiming, 18268 reset: reset 18269 }; 18270} 18271var perfTool = createPerfToolInstance(); 18272var src = function src(str) { 18273 var opts = 18274 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 18275 if (!str) return undefined; 18276 var o = { 18277 key: [ 18278 "source", 18279 "protocol", 18280 "authority", 18281 "userInfo", 18282 "user", 18283 "password", 18284 "host", 18285 "port", 18286 "relative", 18287 "path", 18288 "directory", 18289 "file", 18290 "query", 18291 "anchor" 18292 ], 18293 q: { 18294 name: "queryKey", 18295 parser: /(?:^|&)([^&=]*)=?([^&]*)/g 18296 }, 18297 parser: { 18298 strict: /^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, 18299 loose: /^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/ 18300 } 18301 }; 18302 var m = o.parser[opts.strictMode ? "strict" : "loose"].exec(str); 18303 var uri = {}; 18304 var i = 14; 18305 while (i--) { 18306 uri[o.key[i]] = m[i] || ""; 18307 } 18308 uri[o.q.name] = {}; 18309 uri[o.key[12]].replace(o.q.parser, function($0, $1, $2) { 18310 if ($1) uri[o.q.name][$1] = $2; 18311 }); 18312 return uri; 18313}; 18314function getRandomValues() { 18315 var crypto = window.crypto || window.msCrypto; 18316 return ( 18317 !isNil(crypto) && 18318 crypto.getRandomValues && 18319 isFunction(crypto.getRandomValues) && 18320 crypto.getRandomValues.bind(crypto) 18321 ); 18322} 18323var BUFFER = new Uint8Array(256); 18324var GET_RANDOM_VALUES = getRandomValues(); 18325function rng() { 18326 return GET_RANDOM_VALUES(BUFFER); 18327} 18328function createByteToHex() { 18329 var result = []; 18330 for (var i = 0; i < 256; i += 1) { 18331 result.push((i + 0x100).toString(16).substr(1)); 18332 } 18333 return result; 18334} 18335var BYTE_TO_HEX = createByteToHex(); 18336function stringify$1(arr) { 18337 var result = []; 18338 for (var i = 0; i < 16; i += 1) { 18339 result.push(BYTE_TO_HEX[arr[i]]); 18340 } 18341 return join("", result).toLowerCase(); 18342} 18343function v4(rng) { 18344 var buffer = rng(); 18345 buffer[6] = (buffer[6] & 0x0f) | 0x40; 18346 buffer[8] = (buffer[8] & 0x3f) | 0x80; 18347 return stringify$1(buffer); 18348} 18349function uuid() { 18350 return v4(rng); 18351} 18352 18353var TYPE = "type"; 18354var CONTENT = "content"; 18355var HEIGHT = "height"; 18356var WIDTH = "width"; 18357var LEFT = "left"; 18358var TOP = "top"; 18359var FROM = "from"; 18360var TO = "to"; 18361var PRIORITY = "priority"; 18362var SELECTOR = "selector"; 18363var CSS_SELECTOR = "cssSelector";
18364var SET_HTML = "setHtml"; 18365var SET_CONTENT = "setContent"; 18366var SET_TEXT = "setText"; 18367var SET_JSON = "setJson"; 18368var SET_ATTRIBUTE = "setAttribute"; 18369var SET_IMAGE_SOURCE = "setImageSource"; 18370var SET_STYLE = "setStyle"; 18371var REARRANGE = "rearrange"; 18372var RESIZE = "resize"; 18373var MOVE = "move"; 18374var REMOVE = "remove"; 18375var CUSTOM_CODE = "customCode"; 18376var REDIRECT = "redirect"; 18377var TRACK_CLICK = "trackClick"; 18378var SIGNAL_CLICK = "signalClick"; 18379var INSERT_BEFORE = "insertBefore"; 18380var INSERT_AFTER = "insertAfter"; 18381var APPEND_HTML = "appendHtml"; 18382var APPEND_CONTENT = "appendContent"; 18383var PREPEND_HTML = "prependHtml"; 18384var PREPEND_CONTENT = "prependContent"; 18385var REPLACE_HTML = "replaceHtml"; 18386var REPLACE_CONTENT = "replaceContent"; 18387var DEBUG = "mboxDebug"; 18388var DISABLE = "mboxDisable"; 18389var AUTHORING = "mboxEdit"; 18390var CHECK = "at_check"; 18391var TRUE = "true"; 18392var MBOX_LENGTH = 250; 18393var DATA_SRC = "data-at-src"; 18394var JSON$1 = "json"; 18395var HTML = "html"; 18396var DYNAMIC = "dynamic"; 18397var SCRIPT = "script"; 18398var SRC = "src"; 18399var ID = "id"; 18400var CLASS = "class"; 18401var CLICK = "click"; 18402var HEAD_TAG = "head"; 18403var SCRIPT_TAG = "script"; 18404var STYLE_TAG = "style"; 18405var LINK_TAG = "link"; 18406var IMAGE_TAG = "img"; 18407var DIV_TAG = "div"; 18408var DELIVERY_DISABLED = 18409 'Adobe Target content delivery is disabled. Ensure that you can save cookies to your current domain, there is no "mboxDisable" cookie and there is no "mboxDisable" parameter in query string.'; 18410var ALREADY_INITIALIZED = "Adobe Target has already been initialized."; 18411var OPTIONS_REQUIRED = "options argument is required"; 18412var REQUEST_REQUIRED = "request option is required"; 18413var RESPONE_REQUIRED = "response option is required"; 18414var EXECUTE_OR_PREFETCH_REQUIRED = "execute or prefetch is required"; 18415var EXECUTE_OR_PREFETCH_NOT_ALLOWED = "execute or prefetch is not allowed"; 18416var NOTIFICATIONS_REQUIRED = "notifications are required"; 18417var MBOX_REQUIRED = "mbox option is required"; 18418var MBOX_TOO_LONG = "mbox option is too long"; 18419var SUCCESS_REQUIRED = "success option is required"; 18420var ERROR_REQUIRED = "error option is required"; 18421var OFFER_REQUIRED = "offer option is required"; 18422var UNEXPECTED_ERROR = "Unexpected error"; 18423var REQUEST_FAILED$1 = "request failed"; 18424var REQUEST_SUCCEEDED$1 = "request succeeded"; 18425var ACTION_RENDERED = "Action rendered successfully"; 18426var ACTION_RENDERING = "Rendering action"; 18427var EMPTY_CONTENT = "Action has no content"; 18428var EMPTY_ATTRIBUTE = "Action has no attributes"; 18429var EMPTY_PROPERTY = "Action has no CSS properties"; 18430var EMPTY_SIZES = "Action has no height or width"; 18431var EMPTY_COORDINATES = "Action has no left, top or position"; 18432var EMPTY_REARRANGE = "Action has no from or to"; 18433var EMPTY_URL = "Action has no url"; 18434var EMPTY_IMAGE_URL = "Action has no image url"; 18435var REARRANGE_MISSING = "Rearrange elements are missing"; 18436var REARRANGE_INCORRECT_INDEXES = 18437 'Rearrange has incorrect "from" and "to" indexes'; 18438var LOADING_IMAGE = "Loading image"; 18439var TRACK_EVENT_SUCCESS = "Track event request succeeded"; 18440var TRACK_EVENT_ERROR = "Track event request failed"; 18441var NO_ACTIONS = "No actions to be rendered"; 18442var REDIRECT_ACTION = "Redirect action"; 18443var REMOTE_SCRIPT = "Script load"; 18444var ERROR = "error"; 18445var WARNING = "warning"; 18446var UNKNOWN = "unknown"; 18447var VALID = "valid"; 18448var SUCCESS = "success"; 18449var RENDER = "render"; 18450var METRIC = "metric"; 18451var MBOX = "mbox"; 18452var OFFER = "offer"; 18453var NAME = "name"; 18454var STATUS = "status"; 18455var PARAMS = "params"; 18456var ACTIONS = "actions"; 18457var RESPONSE_TOKENS = "responseTokens"; 18458var DATA$1 = "data"; 18459var RESPONSE = "response"; 18460var REQUEST = "request"; 18461var PROVIDER = "provider"; 18462var PAGE_LOAD$1 = "pageLoad"; 18463var FLICKER_CONTROL_CLASS = "at-flicker-control"; 18464var MARKER_CSS_CLASS = "at-element-marker"; 18465var CLICK_TRACKING_CSS_CLASS = "at-element-click-tracking"; 18466var ENABLED = "enabled"; 18467var CLIENT_CODE = "clientCode"; 18468var IMS_ORG_ID = "imsOrgId"; 18469var SERVER_DOMAIN = "serverDomain"; 18470var CROSS_DOMAIN = "crossDomain"; 18471var TIMEOUT$1 = "timeout"; 18472var GLOBAL_MBOX_NAME = "globalMboxName"; 18473var GLOBAL_MBOX_AUTO_CREATE = "globalMboxAutoCreate"; 18474var VERSION = "version"; 18475var DEFAULT_CONTENT_HIDDEN_STYLE = "defaultContentHiddenStyle"; 18476var DEFAULT_CONTENT_VISIBLE_STYLE = "defaultContentVisibleStyle"; 18477var BODY_HIDDEN_STYLE = "bodyHiddenStyle"; 18478var BODY_HIDING_ENABLED = "bodyHidingEnabled"; 18479var DEVICE_ID_LIFETIME = "deviceIdLifetime"; 18480var SESSION_ID_LIFETIME = "sessionIdLifetime"; 18481var SELECTORS_POLLING_TIMEOUT = "selectorsPollingTimeout"; 18482var VISITOR_API_TIMEOUT = "visitorApiTimeout"; 18483var OVERRIDE_MBOX_EDGE_SERVER = "overrideMboxEdgeServer"; 18484var OVERRIDE_MBOX_EDGE_SERVER_TIMEOUT = "overrideMboxEdgeServerTimeout"; 18485var OPTOUT_ENABLED = "optoutEnabled"; 18486var SECURE_ONLY = "secureOnly"; 18487var SUPPLEMENTAL_DATA_ID_PARAM_TIMEOUT = "supplementalDataIdParamTimeout"; 18488var AUTHORING_SCRIPT_URL = "authoringScriptUrl"; 18489var SCHEME = "scheme"; 18490var COOKIE_DOMAIN = "cookieDomain"; 18491var MBOX_PARAMS = "mboxParams"; 18492var GLOBAL_MBOX_PARAMS = "globalMboxParams"; 18493var URL_SIZE_LIMIT = "urlSizeLimit"; 18494var DEVICE_DETECTION_ENABLED = "deviceDetectionEnabled"; 18495var SESSION_ID_PARAM = "mboxSession"; 18496var DEVICE_ID_COOKIE = "PC"; 18497var EDGE_CLUSTER_COOKIE = "mboxEdgeCluster"; 18498var SESSION_ID_COOKIE = "session"; 18499var TRACES_SUFFIX = "Traces"; 18500var SETTINGS = "settings"; 18501var CLIENT_TRACES = "client" + TRACES_SUFFIX; 18502var SERVER_TRACES = "server" + TRACES_SUFFIX; 18503var TRACES = "___target_traces"; 18504var GLOBAL_SETTINGS = "targetGlobalSettings"; 18505var DATA_PROVIDER = "dataProvider"; 18506var DATA_PROVIDERS = DATA_PROVIDER + "s"; 18507var ENDPOINT = "endpoint"; 18508var VIEWS_ENABLED = "viewsEnabled"; 18509var PAGE_LOAD_ENABLED = "pageLoadEnabled"; 18510var AUTH_STATE = "authState"; 18511var AUTHENTICATED_STATE = "authenticatedState"; 18512var INTEGRATION_CODE = "integrationCode"; 18513var PRIMARY = "primary"; 18514var PAGE = "page"; 18515var VIEW = "view"; 18516var VIEWS = "views"; 18517var OPTIONS = "options"; 18518var METRICS = "metrics"; 18519var EVENT_TOKEN = "eventToken"; 18520var VIEW_NAME = "viewName"; 18521var DISPLAY_EVENT = "display"; 18522var CONTENT_TYPE = "Content-Type"; 18523var TEXT_PLAIN = "text/plain"; 18524var RENDERING_VIEW_FAILED = "View rendering failed"; 18525var VIEW_DELIVERY_ERROR = "View delivery error"; 18526var VIEW_NAME_ERROR = "View name should be a non-empty string"; 18527var VIEWS_DISABLED = "Views are not enabled"; 18528var PAGE_LOAD_DISABLED = "Page load disabled"; 18529var USING_SERVER_STATE = "Using server state"; 18530var ADOBE = "adobe"; 18531var OPTIN = "optIn"; 18532var IS_APPROVED = "isApproved";
18533var FETCH_PERMISSIONS = "fetchPermissions"; 18534var CATEGORIES = "Categories"; 18535var TARGET = "TARGET"; 18536var ANALYTICS = "ANALYTICS"; 18537var OPTIN_ENABLED = "optinEnabled"; 18538var ERROR_TARGET_NOT_OPTED_IN = "Adobe Target is not opted in"; 18539var ANALYTICS_LOGGING = "analyticsLogging"; 18540var SERVER_STATE = "serverState"; 18541var CSP_SCRIPT_NONCE = "cspScriptNonce"; 18542var CSP_STYLE_NONCE = "cspStyleNonce"; 18543var CACHE_UPDATED_EVENT = "cache-updated-event"; 18544var NO_OFFERS_EVENT = "no-offers-event"; 18545var REDIRECT_OFFER_EVENT = "redirect-offer-event"; 18546var SAMESITE_NONE = "None"; 18547var DECISIONING_METHOD_SETTING = "decisioningMethod"; 18548var POLLING_INTERVAL_SETTING = "pollingInterval"; 18549var ARTIFACT_LOCATION_SETTING = "artifactLocation"; 18550var ARTIFACT_FORMAT_SETTING = "artifactFormat"; 18551var ARTIFACT_PAYLOAD_SETTING = "artifactPayload"; 18552var TARGET_ENVIRONMENT_SETTING = "environment"; 18553var CDN_ENVIRONMENT_SETTING = "cdnEnvironment"; 18554var TELEMETRY_ENABLED_SETTING = "telemetryEnabled"; 18555var CDN_BASEPATH_SETTING = "cdnBasePath"; 18556var WEB_CHANNEL = "web"; 18557var CLIENT_HINTS = "clientHints"; 18558var ALLOW_HIGH_ENTROPY_CLIENT_HINTS = "allowHighEntropyClientHints"; 18559var AEP_SANDBOX_ID = "aepSandboxId"; 18560var AEP_SANDBOX_NAME = "aepSandboxName"; 18561 18562var document$1 = document; 18563 18564var window$1 = window; 18565 18566var FILE_PROTOCOL = "file:"; 18567var IP_V4_REGEX = /^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$/; 18568var STANDARD_DOMAIN_REGEX = /^(com|edu|gov|net|mil|org|nom|co|name|info|biz)$/i; 18569var config = {}; 18570var OVERRIDABLE_SETTINGS = [ 18571 ENABLED, 18572 CLIENT_CODE, 18573 IMS_ORG_ID, 18574 SERVER_DOMAIN, 18575 CROSS_DOMAIN, 18576 COOKIE_DOMAIN, 18577 TIMEOUT$1, 18578 MBOX_PARAMS, 18579 GLOBAL_MBOX_PARAMS, 18580 DEFAULT_CONTENT_HIDDEN_STYLE, 18581 DEFAULT_CONTENT_VISIBLE_STYLE, 18582 DEVICE_ID_LIFETIME, 18583 BODY_HIDDEN_STYLE, 18584 BODY_HIDING_ENABLED, 18585 SELECTORS_POLLING_TIMEOUT, 18586 VISITOR_API_TIMEOUT, 18587 OVERRIDE_MBOX_EDGE_SERVER, 18588 OVERRIDE_MBOX_EDGE_SERVER_TIMEOUT, 18589 OPTOUT_ENABLED, 18590 OPTIN_ENABLED, 18591 SECURE_ONLY, 18592 SUPPLEMENTAL_DATA_ID_PARAM_TIMEOUT, 18593 AUTHORING_SCRIPT_URL, 18594 URL_SIZE_LIMIT, 18595 ENDPOINT, 18596 PAGE_LOAD_ENABLED, 18597 VIEWS_ENABLED, 18598 ANALYTICS_LOGGING, 18599 SERVER_STATE, 18600 DECISIONING_METHOD_SETTING, 18601 POLLING_INTERVAL_SETTING, 18602 ARTIFACT_LOCATION_SETTING, 18603 ARTIFACT_FORMAT_SETTING, 18604 ARTIFACT_PAYLOAD_SETTING, 18605 TARGET_ENVIRONMENT_SETTING, 18606 CDN_ENVIRONMENT_SETTING, 18607 TELEMETRY_ENABLED_SETTING, 18608 CDN_BASEPATH_SETTING, 18609 CSP_SCRIPT_NONCE, 18610 CSP_STYLE_NONCE, 18611 GLOBAL_MBOX_NAME, 18612 ALLOW_HIGH_ENTROPY_CLIENT_HINTS, 18613 AEP_SANDBOX_ID, 18614 AEP_SANDBOX_NAME, 18615 DEVICE_DETECTION_ENABLED 18616]; 18617function overrideSettingsIfRequired(settings, globalSettings) { 18618 if (!settings[ENABLED]) { 18619 return; 18620 } 18621 if (!isNil(globalSettings[GLOBAL_MBOX_AUTO_CREATE])) { 18622 settings[PAGE_LOAD_ENABLED] = globalSettings[GLOBAL_MBOX_AUTO_CREATE]; 18623 } 18624 forEach(function(field) { 18625 if (!isNil(globalSettings[field])) { 18626 settings[field] = globalSettings[field]; 18627 } 18628 }, OVERRIDABLE_SETTINGS); 18629} 18630function isIE10OrModernBrowser(doc) { 18631 var documentMode = doc.documentMode; 18632 return documentMode ? documentMode >= 10 : true; 18633} 18634function isStandardMode(doc) { 18635 var compatMode = doc.compatMode; 18636 return compatMode && compatMode === "CSS1Compat"; 18637} 18638function isIPv4(domain) { 18639 return IP_V4_REGEX.test(domain); 18640} 18641function getCookieDomain(domain) { 18642 if (isIPv4(domain)) { 18643 return domain; 18644 } 18645 var parts = reverse(split(".", domain)); 18646 var len = parts.length; 18647 if (len >= 3) { 18648 if (STANDARD_DOMAIN_REGEX.test(parts[1])) { 18649 return parts[2] + "." + parts[1] + "." + parts[0]; 18650 } 18651 } 18652 if (len === 1) { 18653 return parts[0]; 18654 } 18655 return parts[1] + "." + parts[0]; 18656} 18657function overrideFromGlobalSettings(win, doc, settings) { 18658 var fileProtocol = win.location.protocol === FILE_PROTOCOL; 18659 var cookieDomain = ""; 18660 if (!fileProtocol) { 18661 cookieDomain = getCookieDomain(win.location.hostname); 18662 } 18663 settings[COOKIE_DOMAIN] = cookieDomain; 18664 settings[ENABLED] = isStandardMode(doc) && isIE10OrModernBrowser(doc); 18665 overrideSettingsIfRequired(settings, win[GLOBAL_SETTINGS] || {}); 18666} 18667function initConfig(settings) { 18668 overrideFromGlobalSettings(window$1, document$1, settings); 18669 var fileProtocol = window$1.location.protocol === FILE_PROTOCOL; 18670 config = assign__default["default"]({}, settings); 18671 config[DEVICE_ID_LIFETIME] = settings[DEVICE_ID_LIFETIME] / 1000; 18672 config[SESSION_ID_LIFETIME] = settings[SESSION_ID_LIFETIME] / 1000; 18673 config[SCHEME] = config[SECURE_ONLY] || fileProtocol ? "https:" : ""; 18674} 18675function getConfig() { 18676 return config; 18677} 18678 18679var parse = queryString__default["default"].parse, 18680 stringify = queryString__default["default"].stringify; 18681var ANCHOR = document$1.createElement("a"); 18682var CACHE$1 = {}; 18683function parseQueryString(value) { 18684 try { 18685 if (window.URLSearchParams) { 18686 return _toConsumableArray( 18687 new URLSearchParams(decodeURIComponent(value)).entries() 18688 ).reduce(function(res, _ref) { 18689 var _ref2 = _slicedToArray(_ref, 2), 18690 k = _ref2[0], 18691 v = _ref2[1]; 18692 res[k] = v; 18693 return res; 18694 }, {}); 18695 } 18696 return parse(value); 18697 } catch (e) { 18698 return {}; 18699 } 18700} 18701function stringifyQueryString(value) { 18702 try { 18703 return stringify(value); 18704 } catch (e) { 18705 return ""; 18706 } 18707} 18708function decode(value) { 18709 try { 18710 return decodeURIComponent(value); 18711 } catch (e) { 18712 return value; 18713 } 18714} 18715function encode(value) { 18716 try { 18717 return encodeURIComponent(value); 18718 } catch (e) { 18719 return value; 18720 } 18721} 18722function parseUri(url) { 18723 if (CACHE$1[url]) { 18724 return CACHE$1[url]; 18725 } 18726 ANCHOR.href = url; 18727 var parsedUri = src(ANCHOR.href); 18728 parsedUri.queryKey = parseQueryString(parsedUri.query); 18729 CACHE$1[url] = parsedUri; 18730 return CACHE$1[url]; 18731} 18732 18733var _getCookie = cookie__default["default"].get, 18734 _setCookie = cookie__default["default"].set, 18735 _removeCookie = cookie__default["default"].remove; 18736var MBOX_COOKIE = "mbox"; 18737function createCookie(name, value, expires) { 18738 return { 18739 name: name, 18740 value: value, 18741 expires: expires 18742 }; 18743}
18744var cookieCache = {}; 18745function setCookie(name, serializedValue, attributes) { 18746 _setCookie(name, serializedValue, attributes); 18747 cookieCache[name] = serializedValue.toString(); 18748} 18749function getCookie(name) { 18750 if (cookieCache[name] !== undefined) { 18751 return cookieCache[name]; 18752 } 18753 cookieCache[name] = _getCookie(name); 18754 return cookieCache[name]; 18755} 18756function removeCookie(name) { 18757 _removeCookie(name); 18758 delete cookieCache[name]; 18759} 18760function deserialize(str) { 18761 var parts = split("#", str); 18762 if (isEmpty(parts) || parts.length < 3) { 18763 return null; 18764 } 18765 if (isNaN(parseInt(parts[2], 10))) { 18766 return null; 18767 } 18768 return createCookie(decode(parts[0]), decode(parts[1]), Number(parts[2])); 18769} 18770function getInternalCookies(cookieValue) { 18771 if (isBlank(cookieValue)) { 18772 return []; 18773 } 18774 return split("|", cookieValue); 18775} 18776var cookieObjectCache = {}; 18777var rawCookieCache; 18778function readCookies() { 18779 var rawCookie = getCookie(MBOX_COOKIE); 18780 if (rawCookieCache === rawCookie) { 18781 return cookieObjectCache; 18782 } 18783 rawCookieCache = rawCookie; 18784 var cookies = map(deserialize, getInternalCookies(rawCookie)); 18785 var nowInSeconds = Math.ceil(now() / 1000); 18786 var isExpired = function isExpired(val) { 18787 return isObject(val) && nowInSeconds <= val.expires; 18788 }; 18789 cookieObjectCache = reduce( 18790 function(acc, val) { 18791 acc[val.name] = val; 18792 return acc; 18793 }, 18794 {}, 18795 filter(isExpired, cookies) 18796 ); 18797 return cookieObjectCache; 18798} 18799 18800var cookiesMap = {}; 18801function getTargetCookie(name) { 18802 cookiesMap = readCookies(); 18803 var cookie = cookiesMap[name]; 18804 return isObject(cookie) ? cookie.value : ""; 18805} 18806function serialize(cookie) { 18807 return join("#", [encode(cookie.name), encode(cookie.value), cookie.expires]); 18808} 18809function getExpires(cookie) { 18810 return cookie.expires; 18811} 18812function getMaxExpires(cookies) { 18813 var expires = map(getExpires, cookies); 18814 return Math.max.apply(null, expires); 18815} 18816function saveCookies(newCookiesMap, domain, secure) { 18817 cookiesMap = newCookiesMap; 18818 var cookies = toArray(cookiesMap); 18819 var maxExpires = Math.abs(getMaxExpires(cookies) * 1000 - now()); 18820 var serializedCookies = join("|", map(serialize, cookies)); 18821 var expires = new Date(now() + maxExpires); 18822 var attrs = assign__default["default"]( 18823 { 18824 domain: domain, 18825 expires: expires, 18826 secure: secure 18827 }, 18828 secure 18829 ? { 18830 sameSite: SAMESITE_NONE 18831 } 18832 : {} 18833 ); 18834 setCookie(MBOX_COOKIE, serializedCookies, attrs); 18835} 18836function setTargetCookie(options) { 18837 var name = options.name, 18838 value = options.value, 18839 expires = options.expires, 18840 domain = options.domain, 18841 secure = options.secure; 18842 if (!cookiesMap) { 18843 cookiesMap = readCookies(); 18844 } 18845 cookiesMap[name] = createCookie( 18846 name, 18847 value.toString(), 18848 Math.ceil(expires + now() / 1000) 18849 ); 18850 saveCookies(cookiesMap, domain, secure); 18851} 18852 18853function isCookiePresent(name) { 18854 return isNotBlank(getCookie(name)); 18855} 18856function isParamPresent(win, name) { 18857 var location = win.location; 18858 var search = location.search; 18859 var params = parseQueryString(search); 18860 return isNotBlank(params[name]); 18861} 18862function isRefParamPresent(doc, name) { 18863 var referrer = doc.referrer; 18864 if (window.URL) { 18865 return new URL(referrer, window.location).searchParams.has(name); 18866 } 18867 var parsedUri = parseUri(referrer); 18868 var refParams = parsedUri.queryKey; 18869 return isNil(refParams) ? false : isNotBlank(refParams[name]); 18870} 18871function exists$2(win, doc, name) { 18872 return ( 18873 isCookiePresent(name) || 18874 isParamPresent(win, name) || 18875 isRefParamPresent(doc, name) 18876 ); 18877} 18878 18879function isCookieEnabled() { 18880 var config = getConfig(); 18881 var cookieDomain = config[COOKIE_DOMAIN]; 18882 var secure = config[SECURE_ONLY]; 18883 var attrs = assign__default["default"]( 18884 { 18885 domain: cookieDomain, 18886 secure: secure 18887 }, 18888 secure 18889 ? { 18890 sameSite: SAMESITE_NONE 18891 } 18892 : {} 18893 ); 18894 setCookie(CHECK, TRUE, attrs); 18895 var result = getCookie(CHECK) === TRUE; 18896 removeCookie(CHECK); 18897 return result; 18898} 18899function isDeliveryDisabled() { 18900 return exists$2(window$1, document$1, DISABLE); 18901} 18902function isDeliveryEnabled() { 18903 var config = getConfig(); 18904 var enabled = config[ENABLED]; 18905 return enabled && isCookieEnabled() && !isDeliveryDisabled(); 18906} 18907function isDebugEnabled() { 18908 return exists$2(window$1, document$1, DEBUG); 18909} 18910function isAuthoringEnabled() { 18911 return exists$2(window$1, document$1, AUTHORING); 18912} 18913 18914var ADOBE_TARGET_PREFIX = "AT:"; 18915function exists$1(win, method) { 18916 var console = win.console; 18917 return !isNil(console) && isFunction(console[method]); 18918} 18919function warn(win, args) { 18920 var console = win.console; 18921 if (!exists$1(win, "warn")) { 18922 return; 18923 } 18924 console.warn.apply(console, [ADOBE_TARGET_PREFIX].concat(args)); 18925} 18926function debug(win, args) { 18927 var console = win.console; 18928 if (!exists$1(win, "debug")) { 18929 return; 18930 } 18931 if (isDebugEnabled()) { 18932 console.debug.apply(console, [ADOBE_TARGET_PREFIX].concat(args)); 18933 } 18934} 18935 18936function logWarn() { 18937 for ( 18938 var _len = arguments.length, args = new Array(_len), _key = 0; 18939 _key < _len; 18940 _key++ 18941 ) { 18942 args[_key] = arguments[_key]; 18943 } 18944 warn(window$1, args); 18945} 18946function logDebug() { 18947 for ( 18948 var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; 18949 _key2 < _len2; 18950 _key2++ 18951 ) { 18952 args[_key2] = arguments[_key2]; 18953 } 18954 debug(window$1, args); 18955} 18956 18957var TRACES_FORMAT_VERSION = "1"; 18958function getSettings(config) { 18959 return reduce( 18960 function(acc, key) { 18961 acc[key] = config[key]; 18962 return acc; 18963 }, 18964 {}, 18965 OVERRIDABLE_SETTINGS 18966 ); 18967}
18968function initialize(win, config, debugEnabled) { 18969 var result = win[TRACES] || []; 18970 win[TRACES] = result; 18971 if (!debugEnabled) { 18972 return; 18973 } 18974 var oldPush = result.push; 18975 result[VERSION] = TRACES_FORMAT_VERSION; 18976 result[SETTINGS] = getSettings(config); 18977 result[CLIENT_TRACES] = []; 18978 result[SERVER_TRACES] = []; 18979 result.push = function push(trace) { 18980 result[SERVER_TRACES].push( 18981 assign__default["default"]( 18982 { 18983 timestamp: now() 18984 }, 18985 trace 18986 ) 18987 ); 18988 oldPush.call(this, trace); 18989 }; 18990} 18991function saveTrace(win, namespace, trace, debugEnabled) { 18992 if (namespace === SERVER_TRACES) { 18993 win[TRACES].push(trace); 18994 } 18995 if (!debugEnabled) { 18996 return; 18997 } 18998 if (namespace !== SERVER_TRACES) { 18999 win[TRACES][namespace].push( 19000 assign__default["default"]( 19001 { 19002 timestamp: now() 19003 }, 19004 trace 19005 ) 19006 ); 19007 } 19008} 19009 19010function initTraces() { 19011 initialize(window$1, getConfig(), isDebugEnabled()); 19012} 19013function addServerTrace(trace) { 19014 saveTrace(window$1, SERVER_TRACES, trace, isDebugEnabled()); 19015} 19016function addClientTrace(trace) { 19017 saveTrace(window$1, CLIENT_TRACES, trace, isDebugEnabled()); 19018} 19019 19020var $ = (function(window) { 19021 var Zepto = (function() { 19022 var undefined$1, 19023 key, 19024 $, 19025 classList, 19026 emptyArray = [], 19027 _concat = emptyArray.concat, 19028 _filter = emptyArray.filter, 19029 _slice = emptyArray.slice, 19030 document = window.document, 19031 elementDisplay = {}, 19032 classCache = {}, 19033 cssNumber = { 19034 "column-count": 1, 19035 columns: 1, 19036 "font-weight": 1, 19037 "line-height": 1, 19038 opacity: 1, 19039 "z-index": 1, 19040 zoom: 1 19041 }, 19042 fragmentRE = /^\s*<(\w+|!)[^>]*>/, 19043 singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, 19044 tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, 19045 rootNodeRE = /^(?:body|html)$/i, 19046 capitalRE = /([A-Z])/g, 19047 methodAttributes = [ 19048 "val", 19049 "css", 19050 "html", 19051 "text", 19052 "data", 19053 "width", 19054 "height", 19055 "offset" 19056 ], 19057 adjacencyOperators = ["after", "prepend", "before", "append"], 19058 table = document.createElement("table"), 19059 tableRow = document.createElement("tr"), 19060 containers = { 19061 tr: document.createElement("tbody"), 19062 tbody: table, 19063 thead: table, 19064 tfoot: table, 19065 td: tableRow, 19066 th: tableRow, 19067 "*": document.createElement("div") 19068 }, 19069 readyRE = /complete|loaded|interactive/, 19070 simpleSelectorRE = /^[\w-]*$/, 19071 class2type = {}, 19072 toString = class2type.toString, 19073 zepto = {}, 19074 camelize, 19075 uniq, 19076 tempParent = document.createElement("div"), 19077 propMap = { 19078 tabindex: "tabIndex", 19079 readonly: "readOnly", 19080 for: "htmlFor", 19081 class: "className", 19082 maxlength: "maxLength", 19083 cellspacing: "cellSpacing", 19084 cellpadding: "cellPadding", 19085 rowspan: "rowSpan", 19086 colspan: "colSpan", 19087 usemap: "useMap", 19088 frameborder: "frameBorder", 19089 contenteditable: "contentEditable" 19090 }, 19091 isArray = 19092 Array.isArray || 19093 function(object) { 19094 return object instanceof Array; 19095 }; 19096 zepto.matches = function(element, selector) { 19097 if (!selector || !element || element.nodeType !== 1) return false; 19098 var matchesSelector = 19099 element.matches || 19100 element.webkitMatchesSelector || 19101 element.mozMatchesSelector || 19102 element.oMatchesSelector || 19103 element.matchesSelector; 19104 if (matchesSelector) return matchesSelector.call(element, selector); 19105 var match, 19106 parent = element.parentNode, 19107 temp = !parent; 19108 if (temp) (parent = tempParent).appendChild(element); 19109 match = ~zepto.qsa(parent, selector).indexOf(element); 19110 temp && tempParent.removeChild(element); 19111 return match; 19112 }; 19113 function type(obj) { 19114 return obj == null 19115 ? String(obj) 19116 : class2type[toString.call(obj)] || "object"; 19117 } 19118 function isFunction(value) { 19119 return type(value) == "function"; 19120 } 19121 function isWindow(obj) { 19122 return obj != null && obj == obj.window; 19123 } 19124 function isDocument(obj) { 19125 return obj != null && obj.nodeType == obj.DOCUMENT_NODE; 19126 } 19127 function isObject(obj) { 19128 return type(obj) == "object"; 19129 } 19130 function isPlainObject(obj) { 19131 return ( 19132 isObject(obj) && 19133 !isWindow(obj) && 19134 Object.getPrototypeOf(obj) == Object.prototype 19135 ); 19136 } 19137 function likeArray(obj) { 19138 var length = !!obj && "length" in obj && obj.length, 19139 type = $.type(obj); 19140 return ( 19141 "function" != type && 19142 !isWindow(obj) && 19143 ("array" == type || 19144 length === 0 || 19145 (typeof length == "number" && length > 0 && length - 1 in obj)) 19146 ); 19147 } 19148 function compact(array) { 19149 return _filter.call(array, function(item) { 19150 return item != null; 19151 }); 19152 } 19153 function flatten(array) { 19154 return array.length > 0 ? $.fn.concat.apply([], array) : array; 19155 } 19156 camelize = function camelize(str) { 19157 return str.replace(/-+(.)?/g, function(match, chr) { 19158 return chr ? chr.toUpperCase() : ""; 19159 }); 19160 }; 19161 function dasherize(str) { 19162 return str 19163 .replace(/::/g, "/") 19164 .replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2") 19165 .replace(/([a-z\d])([A-Z])/g, "$1_$2") 19166 .replace(/_/g, "-") 19167 .toLowerCase(); 19168 } 19169 uniq = function uniq(array) { 19170 return _filter.call(array, function(item, idx) { 19171 return array.indexOf(item) == idx; 19172 }); 19173 }; 19174 function classRE(name) { 19175 return name in classCache 19176 ? classCache[name] 19177 : (classCache[name] = new RegExp("(^|\\s)" + name + "(\\s|$)")); 19178 } 19179 function maybeAddPx(name, value) { 19180 return typeof value == "number" && !cssNumber[dasherize(name)] 19181 ? value + "px" 19182 : value; 19183 } 19184 function defaultDisplay(nodeName) { 19185 var element, display; 19186 if (!elementDisplay[nodeName]) { 19187 element = document.createElement(nodeName); 19188 document.body.appendChild(element); 19189 display = getComputedStyle(element, "").getPropertyValue("display"); 19190 element.parentNode.removeChild(element); 19191 display == "none" && (display = "block"); 19192 elementDisplay[nodeName] = display; 19193 } 19194 return elementDisplay[nodeName]; 19195 } 19196 function _children(element) { 19197 return "children" in element 19198 ? _slice.call(element.children) 19199 : $.map(element.childNodes, function(node) { 19200 if (node.nodeType == 1) return node; 19201 }); 19202 } 19203 function Z(dom, selector) { 19204 var i, 19205 len = dom ? dom.length : 0; 19206 for (i = 0; i < len; i++) { 19207 this[i] = dom[i]; 19208 } 19209 this.length = len; 19210 this.selector = selector || ""; 19211 } 19212 zepto.fragment = function(html, name, properties) { 19213 var dom, nodes, container; 19214 if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1)); 19215 if (!dom) { 19216 if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>"); 19217 if (name === undefined$1) name = fragmentRE.test(html) && RegExp.$1;
19218 if (!(name in containers)) name = "*"; 19219 container = containers[name]; 19220 container.innerHTML = "" + html; 19221 dom = $.each(_slice.call(container.childNodes), function() { 19222 container.removeChild(this); 19223 }); 19224 } 19225 if (isPlainObject(properties)) { 19226 nodes = $(dom); 19227 $.each(properties, function(key, value) { 19228 if (methodAttributes.indexOf(key) > -1) nodes[key](value); 19229 else nodes.attr(key, value); 19230 }); 19231 } 19232 return dom; 19233 }; 19234 zepto.Z = function(dom, selector) { 19235 return new Z(dom, selector); 19236 }; 19237 zepto.isZ = function(object) { 19238 return object instanceof zepto.Z; 19239 }; 19240 zepto.init = function(selector, context) { 19241 var dom; 19242 if (!selector) return zepto.Z(); 19243 else if (typeof selector == "string") { 19244 selector = selector.trim(); 19245 if (selector[0] == "<" && fragmentRE.test(selector)) 19246 (dom = zepto.fragment(selector, RegExp.$1, context)), 19247 (selector = null); 19248 else if (context !== undefined$1) return $(context).find(selector); 19249 else dom = zepto.qsa(document, selector); 19250 } else if (isFunction(selector)) return $(document).ready(selector); 19251 else if (zepto.isZ(selector)) return selector; 19252 else { 19253 if (isArray(selector)) dom = compact(selector); 19254 else if (isObject(selector)) (dom = [selector]), (selector = null); 19255 else if (fragmentRE.test(selector)) 19256 (dom = zepto.fragment(selector.trim(), RegExp.$1, context)), 19257 (selector = null); 19258 else if (context !== undefined$1) return $(context).find(selector); 19259 else dom = zepto.qsa(document, selector); 19260 } 19261 return zepto.Z(dom, selector); 19262 }; 19263 $ = function $(selector, context) { 19264 return zepto.init(selector, context); 19265 }; 19266 function extend(target, source, deep) { 19267 for (key in source) { 19268 if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { 19269 if (isPlainObject(source[key]) && !isPlainObject(target[key])) 19270 target[key] = {}; 19271 if (isArray(source[key]) && !isArray(target[key])) target[key] = []; 19272 extend(target[key], source[key], deep); 19273 } else if (source[key] !== undefined$1) target[key] = source[key]; 19274 } 19275 } 19276 $.extend = function(target) { 19277 var deep, 19278 args = _slice.call(arguments, 1); 19279 if (typeof target == "boolean") { 19280 deep = target; 19281 target = args.shift(); 19282 } 19283 args.forEach(function(arg) { 19284 extend(target, arg, deep); 19285 }); 19286 return target; 19287 }; 19288 zepto.qsa = function(element, selector) { 19289 var found, 19290 maybeID = selector[0] == "#", 19291 maybeClass = !maybeID && selector[0] == ".", 19292 nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, 19293 isSimple = simpleSelectorRE.test(nameOnly); 19294 return element.getElementById && isSimple && maybeID 19295 ? (found = element.getElementById(nameOnly)) 19296 ? [found] 19297 : [] 19298 : element.nodeType !== 1 && 19299 element.nodeType !== 9 && 19300 element.nodeType !== 11 19301 ? [] 19302 : _slice.call( 19303 isSimple && !maybeID && element.getElementsByClassName 19304 ? maybeClass 19305 ? element.getElementsByClassName(nameOnly) 19306 : element.getElementsByTagName(selector) 19307 : element.querySelectorAll(selector) 19308 ); 19309 }; 19310 function filtered(nodes, selector) { 19311 return selector == null ? $(nodes) : $(nodes).filter(selector); 19312 } 19313 $.contains = document.documentElement.contains 19314 ? function(parent, node) { 19315 return parent !== node && parent.contains(node); 19316 } 19317 : function(parent, node) { 19318 while (node && (node = node.parentNode)) { 19319 if (node === parent) return true; 19320 } 19321 return false; 19322 }; 19323 function funcArg(context, arg, idx, payload) { 19324 return isFunction(arg) ? arg.call(context, idx, payload) : arg; 19325 } 19326 function setAttribute(node, name, value) { 19327 value == null 19328 ? node.removeAttribute(name) 19329 : node.setAttribute(name, value); 19330 } 19331 function className(node, value) { 19332 var klass = node.className || "", 19333 svg = klass && klass.baseVal !== undefined$1; 19334 if (value === undefined$1) return svg ? klass.baseVal : klass; 19335 svg ? (klass.baseVal = value) : (node.className = value); 19336 } 19337 function deserializeValue(value) {
vendor: 21,904 bytes, lines 19338-20029
19338 try { 19339 return value 19340 ? value == "true" || 19341 (value == "false" 19342 ? false 19343 : value == "null" 19344 ? null 19345 : +value + "" == value 19346 ? +value 19347 : /^[\[\{]/.test(value) 19348 ? $.parseJSON(value) 19349 : value) 19350 : value; 19351 } catch (e) { 19352 return value; 19353 } 19354 } 19355 $.type = type; 19356 $.isFunction = isFunction; 19357 $.isWindow = isWindow; 19358 $.isArray = isArray; 19359 $.isPlainObject = isPlainObject; 19360 $.isEmptyObject = function(obj) { 19361 var name; 19362 for (name in obj) { 19363 return false; 19364 } 19365 return true; 19366 }; 19367 $.isNumeric = function(val) { 19368 var num = Number(val), 19369 type = _typeof(val); 19370 return ( 19371 (val != null && 19372 type != "boolean" && 19373 (type != "string" || val.length) && 19374 !isNaN(num) && 19375 isFinite(num)) || 19376 false 19377 ); 19378 }; 19379 $.inArray = function(elem, array, i) { 19380 return emptyArray.indexOf.call(array, elem, i); 19381 }; 19382 $.camelCase = camelize; 19383 $.trim = function(str) { 19384 return str == null ? "" : String.prototype.trim.call(str); 19385 }; 19386 $.uuid = 0; 19387 $.support = {}; 19388 $.expr = {}; 19389 $.noop = function() {}; 19390 $.map = function(elements, callback) { 19391 var value, 19392 values = [], 19393 i, 19394 key; 19395 if (likeArray(elements)) 19396 for (i = 0; i < elements.length; i++) { 19397 value = callback(elements[i], i); 19398 if (value != null) values.push(value); 19399 } 19400 else 19401 for (key in elements) { 19402 value = callback(elements[key], key); 19403 if (value != null) values.push(value); 19404 } 19405 return flatten(values); 19406 }; 19407 $.each = function(elements, callback) { 19408 var i, key; 19409 if (likeArray(elements)) { 19410 for (i = 0; i < elements.length; i++) { 19411 if (callback.call(elements[i], i, elements[i]) === false) 19412 return elements; 19413 } 19414 } else { 19415 for (key in elements) { 19416 if (callback.call(elements[key], key, elements[key]) === false) 19417 return elements; 19418 } 19419 } 19420 return elements; 19421 }; 19422 $.grep = function(elements, callback) { 19423 return _filter.call(elements, callback); 19424 }; 19425 if (window.JSON) $.parseJSON = JSON.parse; 19426 $.each( 19427 "Boolean Number String Function Array Date RegExp Object Error".split( 19428 " " 19429 ), 19430 function(i, name) { 19431 class2type["[object " + name + "]"] = name.toLowerCase(); 19432 } 19433 ); 19434 $.fn = { 19435 constructor: zepto.Z, 19436 length: 0, 19437 forEach: emptyArray.forEach, 19438 reduce: emptyArray.reduce, 19439 push: emptyArray.push, 19440 sort: emptyArray.sort, 19441 splice: emptyArray.splice, 19442 indexOf: emptyArray.indexOf, 19443 concat: function concat() { 19444 var i, 19445 value, 19446 args = []; 19447 for (i = 0; i < arguments.length; i++) { 19448 value = arguments[i]; 19449 args[i] = zepto.isZ(value) ? value.toArray() : value; 19450 } 19451 return _concat.apply(zepto.isZ(this) ? this.toArray() : this, args); 19452 }, 19453 map: function map(fn) { 19454 return $( 19455 $.map(this, function(el, i) { 19456 return fn.call(el, i, el); 19457 }) 19458 ); 19459 }, 19460 slice: function slice() { 19461 return $(_slice.apply(this, arguments)); 19462 }, 19463 ready: function ready(callback) { 19464 if (readyRE.test(document.readyState) && document.body) callback($); 19465 else 19466 document.addEventListener( 19467 "DOMContentLoaded", 19468 function() { 19469 callback($); 19470 }, 19471 false 19472 ); 19473 return this; 19474 }, 19475 get: function get(idx) { 19476 return idx === undefined$1 19477 ? _slice.call(this) 19478 : this[idx >= 0 ? idx : idx + this.length]; 19479 }, 19480 toArray: function toArray() { 19481 return this.get(); 19482 }, 19483 size: function size() { 19484 return this.length; 19485 }, 19486 remove: function remove() { 19487 return this.each(function() { 19488 if (this.parentNode != null) this.parentNode.removeChild(this); 19489 }); 19490 }, 19491 each: function each(callback) { 19492 var len = this.length, 19493 idx = 0, 19494 el; 19495 while (idx < len) { 19496 el = this[idx]; 19497 if (callback.call(el, idx, el) === false) { 19498 break; 19499 } 19500 idx++; 19501 } 19502 return this; 19503 }, 19504 filter: function filter(selector) { 19505 if (isFunction(selector)) return this.not(this.not(selector)); 19506 return $( 19507 _filter.call(this, function(element) { 19508 return zepto.matches(element, selector); 19509 }) 19510 ); 19511 }, 19512 add: function add(selector, context) { 19513 return $(uniq(this.concat($(selector, context)))); 19514 }, 19515 is: function is(selector) { 19516 return this.length > 0 && zepto.matches(this[0], selector); 19517 }, 19518 not: function not(selector) { 19519 var nodes = []; 19520 if (isFunction(selector) && selector.call !== undefined$1) 19521 this.each(function(idx) { 19522 if (!selector.call(this, idx)) nodes.push(this); 19523 }); 19524 else { 19525 var excludes = 19526 typeof selector == "string" 19527 ? this.filter(selector) 19528 : likeArray(selector) && isFunction(selector.item) 19529 ? _slice.call(selector) 19530 : $(selector); 19531 this.forEach(function(el) { 19532 if (excludes.indexOf(el) < 0) nodes.push(el); 19533 }); 19534 } 19535 return $(nodes); 19536 }, 19537 has: function has(selector) { 19538 return this.filter(function() { 19539 return isObject(selector) 19540 ? $.contains(this, selector) 19541 : $(this) 19542 .find(selector) 19543 .size(); 19544 }); 19545 }, 19546 eq: function eq(idx) { 19547 return idx === -1 ? this.slice(idx) : this.slice(idx, +idx + 1); 19548 }, 19549 first: function first() { 19550 var el = this[0]; 19551 return el && !isObject(el) ? el : $(el); 19552 }, 19553 last: function last() { 19554 var el = this[this.length - 1]; 19555 return el && !isObject(el) ? el : $(el); 19556 }, 19557 find: function find(selector) { 19558 var result, 19559 $this = this; 19560 if (!selector) result = $(); 19561 else if (_typeof(selector) == "object") 19562 result = $(selector).filter(function() { 19563 var node = this; 19564 return emptyArray.some.call($this, function(parent) { 19565 return $.contains(parent, node); 19566 }); 19567 }); 19568 else if (this.length == 1) result = $(zepto.qsa(this[0], selector)); 19569 else 19570 result = this.map(function() { 19571 return zepto.qsa(this, selector); 19572 }); 19573 return result; 19574 }, 19575 closest: function closest(selector, context) { 19576 var nodes = [], 19577 collection = _typeof(selector) == "object" && $(selector); 19578 this.each(function(_, node) { 19579 while ( 19580 node && 19581 !(collection 19582 ? collection.indexOf(node) >= 0 19583 : zepto.matches(node, selector)) 19584 ) { 19585 node = node !== context && !isDocument(node) && node.parentNode; 19586 } 19587 if (node && nodes.indexOf(node) < 0) nodes.push(node); 19588 }); 19589 return $(nodes); 19590 }, 19591 parents: function parents(selector) { 19592 var ancestors = [], 19593 nodes = this; 19594 while (nodes.length > 0) { 19595 nodes = $.map(nodes, function(node) { 19596 if ( 19597 (node = node.parentNode) && 19598 !isDocument(node) && 19599 ancestors.indexOf(node) < 0 19600 ) { 19601 ancestors.push(node); 19602 return node; 19603 } 19604 }); 19605 } 19606 return filtered(ancestors, selector); 19607 }, 19608 parent: function parent(selector) { 19609 return filtered(uniq(this.pluck("parentNode")), selector); 19610 }, 19611 children: function children(selector) { 19612 return filtered( 19613 this.map(function() { 19614 return _children(this); 19615 }), 19616 selector 19617 ); 19618 }, 19619 contents: function contents() { 19620 return this.map(function() { 19621 return this.contentDocument || _slice.call(this.childNodes); 19622 }); 19623 }, 19624 siblings: function siblings(selector) { 19625 return filtered( 19626 this.map(function(i, el) { 19627 return _filter.call(_children(el.parentNode), function(child) { 19628 return child !== el; 19629 }); 19630 }), 19631 selector 19632 ); 19633 }, 19634 empty: function empty() { 19635 return this.each(function() { 19636 this.innerHTML = ""; 19637 }); 19638 }, 19639 pluck: function pluck(property) { 19640 return $.map(this, function(el) { 19641 return el[property]; 19642 }); 19643 }, 19644 show: function show() { 19645 return this.each(function() { 19646 this.style.display == "none" && (this.style.display = ""); 19647 if (getComputedStyle(this, "").getPropertyValue("display") == "none") 19648 this.style.display = defaultDisplay(this.nodeName); 19649 }); 19650 }, 19651 replaceWith: function replaceWith(newContent) { 19652 return this.before(newContent).remove(); 19653 }, 19654 wrap: function wrap(structure) { 19655 var func = isFunction(structure); 19656 if (this[0] && !func) 19657 var dom = $(structure).get(0), 19658 clone = dom.parentNode || this.length > 1; 19659 return this.each(function(index) { 19660 $(this).wrapAll( 19661 func 19662 ? structure.call(this, index) 19663 : clone 19664 ? dom.cloneNode(true) 19665 : dom 19666 ); 19667 }); 19668 }, 19669 wrapAll: function wrapAll(structure) { 19670 if (this[0]) { 19671 $(this[0]).before((structure = $(structure))); 19672 var children; 19673 while ((children = structure.children()).length) { 19674 structure = children.first(); 19675 } 19676 $(structure).append(this); 19677 } 19678 return this; 19679 }, 19680 wrapInner: function wrapInner(structure) { 19681 var func = isFunction(structure); 19682 return this.each(function(index) { 19683 var self = $(this), 19684 contents = self.contents(), 19685 dom = func ? structure.call(this, index) : structure; 19686 contents.length ? contents.wrapAll(dom) : self.append(dom); 19687 }); 19688 }, 19689 unwrap: function unwrap() { 19690 this.parent().each(function() { 19691 $(this).replaceWith($(this).children()); 19692 }); 19693 return this; 19694 }, 19695 clone: function clone() { 19696 return this.map(function() { 19697 return this.cloneNode(true); 19698 }); 19699 }, 19700 hide: function hide() { 19701 return this.css("display", "none"); 19702 }, 19703 toggle: function toggle(setting) { 19704 return this.each(function() { 19705 var el = $(this); 19706 (setting === undefined$1 19707 ? el.css("display") == "none" 19708 : setting) 19709 ? el.show() 19710 : el.hide(); 19711 }); 19712 }, 19713 prev: function prev(selector) { 19714 return $(this.pluck("previousElementSibling")).filter(selector || "*"); 19715 }, 19716 next: function next(selector) { 19717 return $(this.pluck("nextElementSibling")).filter(selector || "*"); 19718 }, 19719 html: function html(_html) { 19720 return 0 in arguments 19721 ? this.each(function(idx) { 19722 var originHtml = this.innerHTML; 19723 $(this) 19724 .empty() 19725 .append(funcArg(this, _html, idx, originHtml)); 19726 }) 19727 : 0 in this 19728 ? this[0].innerHTML 19729 : null; 19730 }, 19731 text: function text(_text) { 19732 return 0 in arguments 19733 ? this.each(function(idx) { 19734 var newText = funcArg(this, _text, idx, this.textContent); 19735 this.textContent = newText == null ? "" : "" + newText; 19736 }) 19737 : 0 in this 19738 ? this.pluck("textContent").join("") 19739 : null; 19740 }, 19741 attr: function attr(name, value) { 19742 var result; 19743 return typeof name == "string" && !(1 in arguments) 19744 ? 0 in this && 19745 this[0].nodeType == 1 && 19746 (result = this[0].getAttribute(name)) != null 19747 ? result 19748 : undefined$1 19749 : this.each(function(idx) { 19750 if (this.nodeType !== 1) return; 19751 if (isObject(name)) 19752 for (key in name) { 19753 setAttribute(this, key, name[key]); 19754 } 19755 else 19756 setAttribute( 19757 this, 19758 name, 19759 funcArg(this, value, idx, this.getAttribute(name)) 19760 ); 19761 }); 19762 }, 19763 removeAttr: function removeAttr(name) { 19764 return this.each(function() { 19765 this.nodeType === 1 && 19766 name.split(" ").forEach(function(attribute) { 19767 setAttribute(this, attribute); 19768 }, this); 19769 }); 19770 }, 19771 prop: function prop(name, value) { 19772 name = propMap[name] || name; 19773 return 1 in arguments 19774 ? this.each(function(idx) { 19775 this[name] = funcArg(this, value, idx, this[name]); 19776 }) 19777 : this[0] && this[0][name]; 19778 }, 19779 removeProp: function removeProp(name) { 19780 name = propMap[name] || name; 19781 return this.each(function() { 19782 delete this[name]; 19783 }); 19784 }, 19785 data: function data(name, value) { 19786 var attrName = "data-" + name.replace(capitalRE, "-$1").toLowerCase(); 19787 var data = 19788 1 in arguments ? this.attr(attrName, value) : this.attr(attrName); 19789 return data !== null ? deserializeValue(data) : undefined$1; 19790 }, 19791 val: function val(value) { 19792 if (0 in arguments) { 19793 if (value == null) value = ""; 19794 return this.each(function(idx) { 19795 this.value = funcArg(this, value, idx, this.value); 19796 }); 19797 } else { 19798 return ( 19799 this[0] && 19800 (this[0].multiple 19801 ? $(this[0]) 19802 .find("option") 19803 .filter(function() { 19804 return this.selected; 19805 }) 19806 .pluck("value") 19807 : this[0].value) 19808 ); 19809 } 19810 }, 19811 offset: function offset(coordinates) { 19812 if (coordinates) 19813 return this.each(function(index) { 19814 var $this = $(this), 19815 coords = funcArg(this, coordinates, index, $this.offset()), 19816 parentOffset = $this.offsetParent().offset(), 19817 props = { 19818 top: coords.top - parentOffset.top, 19819 left: coords.left - parentOffset.left 19820 }; 19821 if ($this.css("position") == "static") 19822 props["position"] = "relative"; 19823 $this.css(props); 19824 }); 19825 if (!this.length) return null; 19826 if ( 19827 document.documentElement !== this[0] && 19828 !$.contains(document.documentElement, this[0]) 19829 ) 19830 return { 19831 top: 0, 19832 left: 0 19833 }; 19834 var obj = this[0].getBoundingClientRect(); 19835 return { 19836 left: obj.left + window.pageXOffset, 19837 top: obj.top + window.pageYOffset, 19838 width: Math.round(obj.width), 19839 height: Math.round(obj.height) 19840 }; 19841 }, 19842 css: function css(property, value) { 19843 if (arguments.length < 2) { 19844 var element = this[0]; 19845 if (typeof property == "string") { 19846 if (!element) return; 19847 return ( 19848 element.style[camelize(property)] || 19849 getComputedStyle(element, "").getPropertyValue(property) 19850 ); 19851 } else if (isArray(property)) { 19852 if (!element) return; 19853 var props = {}; 19854 var computedStyle = getComputedStyle(element, ""); 19855 $.each(property, function(_, prop) { 19856 props[prop] = 19857 element.style[camelize(prop)] || 19858 computedStyle.getPropertyValue(prop); 19859 }); 19860 return props; 19861 } 19862 } 19863 var css = ""; 19864 if (type(property) == "string") { 19865 if (!value && value !== 0) 19866 this.each(function() { 19867 this.style.removeProperty(dasherize(property)); 19868 }); 19869 else css = dasherize(property) + ":" + maybeAddPx(property, value); 19870 } else { 19871 for (key in property) { 19872 if (!property[key] && property[key] !== 0) 19873 this.each(function() { 19874 this.style.removeProperty(dasherize(key)); 19875 }); 19876 else 19877 css += 19878 dasherize(key) + ":" + maybeAddPx(key, property[key]) + ";"; 19879 } 19880 } 19881 return this.each(function() { 19882 this.style.cssText += ";" + css; 19883 }); 19884 }, 19885 index: function index(element) { 19886 return element 19887 ? this.indexOf($(element)[0]) 19888 : this.parent() 19889 .children() 19890 .indexOf(this[0]); 19891 }, 19892 hasClass: function hasClass(name) { 19893 if (!name) return false; 19894 return emptyArray.some.call( 19895 this, 19896 function(el) { 19897 return this.test(className(el)); 19898 }, 19899 classRE(name) 19900 ); 19901 }, 19902 addClass: function addClass(name) { 19903 if (!name) return this; 19904 return this.each(function(idx) { 19905 if (!("className" in this)) return; 19906 classList = []; 19907 var cls = className(this), 19908 newName = funcArg(this, name, idx, cls); 19909 newName.split(/\s+/g).forEach(function(klass) { 19910 if (!$(this).hasClass(klass)) classList.push(klass); 19911 }, this); 19912 classList.length && 19913 className(this, cls + (cls ? " " : "") + classList.join(" ")); 19914 }); 19915 }, 19916 removeClass: function removeClass(name) { 19917 return this.each(function(idx) { 19918 if (!("className" in this)) return; 19919 if (name === undefined$1) return className(this, ""); 19920 classList = className(this); 19921 funcArg(this, name, idx, classList) 19922 .split(/\s+/g) 19923 .forEach(function(klass) { 19924 classList = classList.replace(classRE(klass), " "); 19925 }); 19926 className(this, classList.trim()); 19927 }); 19928 }, 19929 toggleClass: function toggleClass(name, when) { 19930 if (!name) return this; 19931 return this.each(function(idx) { 19932 var $this = $(this), 19933 names = funcArg(this, name, idx, className(this)); 19934 names.split(/\s+/g).forEach(function(klass) { 19935 (when === undefined$1 19936 ? !$this.hasClass(klass) 19937 : when) 19938 ? $this.addClass(klass) 19939 : $this.removeClass(klass); 19940 }); 19941 }); 19942 }, 19943 scrollTop: function scrollTop(value) { 19944 if (!this.length) return; 19945 var hasScrollTop = "scrollTop" in this[0]; 19946 if (value === undefined$1) 19947 return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset; 19948 return this.each( 19949 hasScrollTop 19950 ? function() { 19951 this.scrollTop = value; 19952 } 19953 : function() { 19954 this.scrollTo(this.scrollX, value); 19955 } 19956 ); 19957 }, 19958 scrollLeft: function scrollLeft(value) { 19959 if (!this.length) return; 19960 var hasScrollLeft = "scrollLeft" in this[0]; 19961 if (value === undefined$1) 19962 return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset; 19963 return this.each( 19964 hasScrollLeft 19965 ? function() { 19966 this.scrollLeft = value; 19967 } 19968 : function() { 19969 this.scrollTo(value, this.scrollY); 19970 } 19971 ); 19972 }, 19973 position: function position() { 19974 if (!this.length) return; 19975 var elem = this[0], 19976 offsetParent = this.offsetParent(), 19977 offset = this.offset(), 19978 parentOffset = rootNodeRE.test(offsetParent[0].nodeName) 19979 ? { 19980 top: 0, 19981 left: 0 19982 } 19983 : offsetParent.offset(); 19984 offset.top -= parseFloat($(elem).css("margin-top")) || 0; 19985 offset.left -= parseFloat($(elem).css("margin-left")) || 0; 19986 parentOffset.top += 19987 parseFloat($(offsetParent[0]).css("border-top-width")) || 0; 19988 parentOffset.left += 19989 parseFloat($(offsetParent[0]).css("border-left-width")) || 0; 19990 return { 19991 top: offset.top - parentOffset.top, 19992 left: offset.left - parentOffset.left 19993 }; 19994 }, 19995 offsetParent: function offsetParent() { 19996 return this.map(function() { 19997 var parent = this.offsetParent || document.body; 19998 while ( 19999 parent && 20000 !rootNodeRE.test(parent.nodeName) && 20001 $(parent).css("position") == "static" 20002 ) { 20003 parent = parent.offsetParent; 20004 } 20005 return parent; 20006 }); 20007 } 20008 }; 20009 $.fn.detach = $.fn.remove; 20010 ["width", "height"].forEach(function(dimension) { 20011 var dimensionProperty = dimension.replace(/./, function(m) { 20012 return m[0].toUpperCase(); 20013 }); 20014 $.fn[dimension] = function(value) { 20015 var offset, 20016 el = this[0]; 20017 if (value === undefined$1) 20018 return isWindow(el) 20019 ? el["inner" + dimensionProperty] 20020 : isDocument(el) 20021 ? el.documentElement["scroll" + dimensionProperty] 20022 : (offset = this.offset()) && offset[dimension]; 20023 else 20024 return this.each(function(idx) { 20025 el = $(this); 20026 el.css(dimension, funcArg(this, value, idx, el[dimension]())); 20027 }); 20028 }; 20029 });
20030 function traverseNode(node, fun) { 20031 fun(node); 20032 for (var i = 0, len = node.childNodes.length; i < len; i++) { 20033 traverseNode(node.childNodes[i], fun); 20034 } 20035 } 20036 function executeScript(doc, content, nonce) { 20037 var nearestNode = doc.getElementsByTagName("script")[0]; 20038 if (!nearestNode) { 20039 return; 20040 } 20041 var parentNode = nearestNode.parentNode; 20042 if (!parentNode) { 20043 return; 20044 } 20045 var script = doc.createElement("script"); 20046 script.innerHTML = content; 20047 if (isNotBlank(nonce)) { 20048 script.setAttribute("nonce", nonce); 20049 } 20050 parentNode.appendChild(script); 20051 parentNode.removeChild(script); 20052 } 20053 adjacencyOperators.forEach(function(operator, operatorIndex) { 20054 var inside = operatorIndex % 2; 20055 $.fn[operator] = function() { 20056 var argType, 20057 nodes = $.map(arguments, function(arg) { 20058 var arr = []; 20059 argType = type(arg); 20060 if (argType == "array") { 20061 arg.forEach(function(el) { 20062 if (el.nodeType !== undefined$1) return arr.push(el); 20063 else if ($.zepto.isZ(el)) return (arr = arr.concat(el.get())); 20064 arr = arr.concat(zepto.fragment(el)); 20065 }); 20066 return arr; 20067 } 20068 return argType == "object" || arg == null 20069 ? arg 20070 : zepto.fragment(arg); 20071 }), 20072 parent, 20073 copyByClone = this.length > 1; 20074 if (nodes.length < 1) return this; 20075 return this.each(function(_, target) { 20076 parent = inside ? target : target.parentNode; 20077 target = 20078 operatorIndex == 0 20079 ? target.nextSibling 20080 : operatorIndex == 1 20081 ? target.firstChild 20082 : operatorIndex == 2 20083 ? target 20084 : null; 20085 var parentInDocument = $.contains(document.documentElement, parent); 20086 var SCRIPT_TYPES = /^(text|application)\/(javascript|ecmascript)$/; 20087 var config = getConfig(); 20088 var scriptNonce = config[CSP_SCRIPT_NONCE]; 20089 var styleNonce = config[CSP_STYLE_NONCE]; 20090 nodes.forEach(function(node) { 20091 if (copyByClone) node = node.cloneNode(true); 20092 else if (!parent) return $(node).remove(); 20093 if (isNotBlank(scriptNonce) && node.tagName === "SCRIPT") { 20094 node.setAttribute("nonce", scriptNonce); 20095 } 20096 if (isNotBlank(styleNonce) && node.tagName === "STYLE") { 20097 node.setAttribute("nonce", styleNonce); 20098 } 20099 parent.insertBefore(node, target); 20100 if (parentInDocument) 20101 traverseNode(node, function(el) { 20102 if ( 20103 el.nodeName != null && 20104 el.nodeName.toUpperCase() === "SCRIPT" && 20105 (!el.type || SCRIPT_TYPES.test(el.type.toLowerCase())) && 20106 !el.src 20107 ) { 20108 executeScript(document, el.innerHTML, el.nonce); 20109 } 20110 }); 20111 }); 20112 }); 20113 }; 20114 $.fn[ 20115 inside 20116 ? operator + "To" 20117 : "insert" + (operatorIndex ? "Before" : "After") 20118 ] = function(html) { 20119 $(html)[operator](this); 20120 return this; 20121 }; 20122 }); 20123 zepto.Z.prototype = Z.prototype = $.fn; 20124 zepto.uniq = uniq; 20125 zepto.deserializeValue = deserializeValue; 20126 $.zepto = zepto; 20127 return $; 20128 })(); 20129 (function($) { 20130 var _zid = 1, 20131 undefined$1, 20132 slice = Array.prototype.slice, 20133 isFunction = $.isFunction, 20134 isString = function isString(obj) { 20135 return typeof obj == "string"; 20136 }, 20137 handlers = {}, 20138 specialEvents = {}, 20139 focusinSupported = "onfocusin" in window, 20140 focus = { 20141 focus: "focusin", 20142 blur: "focusout" 20143 }, 20144 hover = { 20145 mouseenter: "mouseover", 20146 mouseleave: "mouseout" 20147 }; 20148 specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 20149 "MouseEvents"; 20150 function zid(element) { 20151 return element._zid || (element._zid = _zid++); 20152 } 20153 function findHandlers(element, event, fn, selector) { 20154 event = parse(event); 20155 if (event.ns) var matcher = matcherFor(event.ns); 20156 return (handlers[zid(element)] || []).filter(function(handler) { 20157 return ( 20158 handler && 20159 (!event.e || handler.e == event.e) && 20160 (!event.ns || matcher.test(handler.ns)) && 20161 (!fn || zid(handler.fn) === zid(fn)) && 20162 (!selector || handler.sel == selector) 20163 ); 20164 }); 20165 } 20166 function parse(event) { 20167 var parts = ("" + event).split("."); 20168 return { 20169 e: parts[0], 20170 ns: parts 20171 .slice(1) 20172 .sort() 20173 .join(" ") 20174 }; 20175 } 20176 function matcherFor(ns) { 20177 return new RegExp("(?:^| )" + ns.replace(" ", " .* ?") + "(?: |$)"); 20178 } 20179 function eventCapture(handler, captureSetting) { 20180 return ( 20181 (handler.del && !focusinSupported && handler.e in focus) || 20182 !!captureSetting 20183 ); 20184 } 20185 function realEvent(type) { 20186 return hover[type] || (focusinSupported && focus[type]) || type; 20187 } 20188 function add(element, events, fn, data, selector, delegator, capture) { 20189 var id = zid(element), 20190 set = handlers[id] || (handlers[id] = []);
20191 events.split(/\s/).forEach(function(event) { 20192 if (event == "ready") return $(document).ready(fn); 20193 var handler = parse(event); 20194 handler.fn = fn; 20195 handler.sel = selector; 20196 if (handler.e in hover) 20197 fn = function fn(e) { 20198 var related = e.relatedTarget; 20199 if (!related || (related !== this && !$.contains(this, related))) 20200 return handler.fn.apply(this, arguments); 20201 }; 20202 handler.del = delegator; 20203 var callback = delegator || fn; 20204 handler.proxy = function(e) { 20205 e = compatible(e); 20206 if (e.isImmediatePropagationStopped()) return; 20207 e.data = data; 20208 var result = callback.apply( 20209 element, 20210 e._args == undefined$1 ? [e] : [e].concat(e._args) 20211 ); 20212 if (result === false) e.preventDefault(), e.stopPropagation(); 20213 return result; 20214 }; 20215 handler.i = set.length; 20216 set.push(handler); 20217 if ("addEventListener" in element) 20218 element.addEventListener( 20219 realEvent(handler.e), 20220 handler.proxy, 20221 eventCapture(handler, capture) 20222 ); 20223 }); 20224 } 20225 function remove(element, events, fn, selector, capture) { 20226 var id = zid(element); 20227 (events || "").split(/\s/).forEach(function(event) { 20228 findHandlers(element, event, fn, selector).forEach(function(handler) { 20229 delete handlers[id][handler.i]; 20230 if ("removeEventListener" in element) 20231 element.removeEventListener( 20232 realEvent(handler.e), 20233 handler.proxy, 20234 eventCapture(handler, capture) 20235 ); 20236 }); 20237 }); 20238 } 20239 $.event = { 20240 add: add, 20241 remove: remove 20242 }; 20243 $.proxy = function(fn, context) { 20244 var args = 2 in arguments && slice.call(arguments, 2); 20245 if (isFunction(fn)) { 20246 var proxyFn = function proxyFn() { 20247 return fn.apply( 20248 context, 20249 args ? args.concat(slice.call(arguments)) : arguments 20250 ); 20251 }; 20252 proxyFn._zid = zid(fn); 20253 return proxyFn; 20254 } else if (isString(context)) { 20255 if (args) { 20256 args.unshift(fn[context], fn); 20257 return $.proxy.apply(null, args); 20258 } else { 20259 return $.proxy(fn[context], fn); 20260 } 20261 } else { 20262 throw new TypeError("expected function"); 20263 } 20264 }; 20265 $.fn.bind = function(event, data, callback) { 20266 return this.on(event, data, callback); 20267 }; 20268 $.fn.unbind = function(event, callback) { 20269 return this.off(event, callback); 20270 }; 20271 $.fn.one = function(event, selector, data, callback) { 20272 return this.on(event, selector, data, callback, 1); 20273 }; 20274 var returnTrue = function returnTrue() { 20275 return true; 20276 }, 20277 returnFalse = function returnFalse() { 20278 return false; 20279 }, 20280 ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/, 20281 eventMethods = { 20282 preventDefault: "isDefaultPrevented", 20283 stopImmediatePropagation: "isImmediatePropagationStopped", 20284 stopPropagation: "isPropagationStopped" 20285 }; 20286 function compatible(event, source) { 20287 if (source || !event.isDefaultPrevented) { 20288 source || (source = event); 20289 $.each(eventMethods, function(name, predicate) { 20290 var sourceMethod = source[name]; 20291 event[name] = function() { 20292 this[predicate] = returnTrue; 20293 return sourceMethod && sourceMethod.apply(source, arguments); 20294 }; 20295 event[predicate] = returnFalse; 20296 }); 20297 try { 20298 event.timeStamp || (event.timeStamp = new Date().getTime()); 20299 } catch (ignored) {} 20300 if ( 20301 source.defaultPrevented !== undefined$1 20302 ? source.defaultPrevented 20303 : "returnValue" in source 20304 ? source.returnValue === false 20305 : source.getPreventDefault && source.getPreventDefault() 20306 ) 20307 event.isDefaultPrevented = returnTrue; 20308 } 20309 return event; 20310 } 20311 function createProxy(event) { 20312 var key, 20313 proxy = { 20314 originalEvent: event 20315 }; 20316 for (key in event) { 20317 if (!ignoreProperties.test(key) && event[key] !== undefined$1) 20318 proxy[key] = event[key]; 20319 } 20320 return compatible(proxy, event); 20321 } 20322 $.fn.delegate = function(selector, event, callback) { 20323 return this.on(event, selector, callback); 20324 }; 20325 $.fn.undelegate = function(selector, event, callback) { 20326 return this.off(event, selector, callback); 20327 }; 20328 $.fn.live = function(event, callback) { 20329 $(document.body).delegate(this.selector, event, callback); 20330 return this; 20331 }; 20332 $.fn.die = function(event, callback) { 20333 $(document.body).undelegate(this.selector, event, callback); 20334 return this; 20335 }; 20336 $.fn.on = function(event, selector, data, callback, one) { 20337 var autoRemove, 20338 delegator, 20339 $this = this; 20340 if (event && !isString(event)) {
20341 $.each(event, function(type, fn) { 20342 $this.on(type, selector, data, fn, one); 20343 }); 20344 return $this; 20345 } 20346 if (!isString(selector) && !isFunction(callback) && callback !== false) 20347 (callback = data), (data = selector), (selector = undefined$1); 20348 if (callback === undefined$1 || data === false) 20349 (callback = data), (data = undefined$1); 20350 if (callback === false) callback = returnFalse; 20351 return $this.each(function(_, element) { 20352 if (one) 20353 autoRemove = function autoRemove(e) { 20354 remove(element, e.type, callback); 20355 return callback.apply(this, arguments); 20356 }; 20357 if (selector) 20358 delegator = function delegator(e) { 20359 var evt, 20360 match = $(e.target) 20361 .closest(selector, element) 20362 .get(0); 20363 if (match && match !== element) { 20364 evt = $.extend(createProxy(e), { 20365 currentTarget: match, 20366 liveFired: element 20367 }); 20368 return (autoRemove || callback).apply( 20369 match, 20370 [evt].concat(slice.call(arguments, 1)) 20371 ); 20372 } 20373 }; 20374 add(element, event, callback, data, selector, delegator || autoRemove); 20375 }); 20376 }; 20377 $.fn.off = function(event, selector, callback) { 20378 var $this = this; 20379 if (event && !isString(event)) { 20380 $.each(event, function(type, fn) { 20381 $this.off(type, selector, fn); 20382 }); 20383 return $this; 20384 } 20385 if (!isString(selector) && !isFunction(callback) && callback !== false) 20386 (callback = selector), (selector = undefined$1); 20387 if (callback === false) callback = returnFalse; 20388 return $this.each(function() { 20389 remove(this, event, callback, selector); 20390 }); 20391 }; 20392 $.fn.trigger = function(event, args) { 20393 event = 20394 isString(event) || $.isPlainObject(event) 20395 ? $.Event(event) 20396 : compatible(event); 20397 event._args = args; 20398 return this.each(function() { 20399 if (event.type in focus && typeof this[event.type] == "function") 20400 this[event.type](); 20401 else if ("dispatchEvent" in this) this.dispatchEvent(event); 20402 else $(this).triggerHandler(event, args); 20403 }); 20404 }; 20405 $.fn.triggerHandler = function(event, args) { 20406 var e, result; 20407 this.each(function(i, element) { 20408 e = createProxy(isString(event) ? $.Event(event) : event); 20409 e._args = args; 20410 e.target = element; 20411 $.each(findHandlers(element, event.type || event), function( 20412 i, 20413 handler 20414 ) { 20415 result = handler.proxy(e); 20416 if (e.isImmediatePropagationStopped()) return false; 20417 }); 20418 }); 20419 return result; 20420 }; 20421 ( 20422 "focusin focusout focus blur load resize scroll unload click dblclick " + 20423 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 20424 "change select keydown keypress keyup error" 20425 ) 20426 .split(" ") 20427 .forEach(function(event) { 20428 $.fn[event] = function(callback) { 20429 return 0 in arguments 20430 ? this.bind(event, callback) 20431 : this.trigger(event); 20432 }; 20433 }); 20434 $.Event = function(type, props) { 20435 if (!isString(type)) (props = type), (type = props.type); 20436 var event = document.createEvent(specialEvents[type] || "Events"), 20437 bubbles = true; 20438 if (props) 20439 for (var name in props) { 20440 name == "bubbles" 20441 ? (bubbles = !!props[name]) 20442 : (event[name] = props[name]); 20443 } 20444 event.initEvent(type, bubbles, true); 20445 return compatible(event); 20446 }; 20447 })(Zepto); 20448 (function() { 20449 try { 20450 getComputedStyle(undefined); 20451 } catch (e) { 20452 var nativeGetComputedStyle = getComputedStyle; 20453 window.getComputedStyle = function(element, pseudoElement) { 20454 try { 20455 return nativeGetComputedStyle(element, pseudoElement); 20456 } catch (e) { 20457 return null; 20458 } 20459 }; 20460 } 20461 })(); 20462 (function($) { 20463 var zepto = $.zepto, 20464 oldQsa = zepto.qsa, 20465 childRe = /^\s*>/, 20466 shadowDomSeparator = ":shadow", 20467 classTag = "Zepto" + +new Date(); 20468 var LWC_SELECTOR_REGEX = /\b[cC]-[a-zA-Z0-9-]+\b|\blightning-[a-z0-9-]+\b/i; 20469 function isLWCElement(element) { 20470 if (!element || !element.tagName) return false;
20471 return LWC_SELECTOR_REGEX.test(element.tagName); 20472 } 20473 function simplifyShadowSelector(selectorStr) { 20474 if (!selectorStr || typeof selectorStr !== "string") return selectorStr; 20475 var simplified = selectorStr.replace(/\s*>\s*slot\s*>?/gi, " "); 20476 simplified = simplified.replace(/\s*>\s*/g, " "); 20477 return simplified.replace(/\s+/g, " ").trim(); 20478 } 20479 var qsa = function qsa(node, selector) { 20480 var sel = selector, 20481 nodes, 20482 taggedParent; 20483 try { 20484 if (!sel) sel = "*"; 20485 else if (childRe.test(sel)) 20486 (taggedParent = $(node).addClass(classTag)), 20487 (sel = "." + classTag + " " + sel); 20488 nodes = oldQsa(node, sel); 20489 } catch (e) { 20490 throw e; 20491 } finally { 20492 if (taggedParent) taggedParent.removeClass(classTag); 20493 } 20494 return nodes; 20495 }; 20496 function traverseDOM(node, selector) { 20497 var parts = selector.split(shadowDomSeparator); 20498 if (parts.length < 2) { 20499 return qsa(node, selector); 20500 } 20501 var parent = node; 20502 var lastElement = null; 20503 for (var i = 0; i < parts.length; i++) { 20504 var part = parts[i].trim(); 20505 if (part === "") { 20506 parent = parent.shadowRoot; 20507 continue; 20508 } 20509 var subselIdx = part.indexOf(">"); 20510 if (subselIdx === 0) { 20511 if (lastElement && isLWCElement(lastElement)) { 20512 part = part.replace(/^\s*>\s*/, ""); 20513 } else { 20514 var prefix = ":host "; 20515 if (parent instanceof Element || parent instanceof HTMLDocument) { 20516 prefix = ":scope "; 20517 } 20518 part = prefix + part; 20519 } 20520 } 20521 var partNode = qsa(parent, part); 20522 if (partNode.length === 0 || !partNode[0] || !partNode[0].shadowRoot) { 20523 return partNode; 20524 } 20525 lastElement = partNode[0]; 20526 parent = partNode[0].shadowRoot; 20527 } 20528 return []; 20529 } 20530 zepto.qsa = function(node, selector) { 20531 var result = traverseDOM(node, selector); 20532 if ( 20533 (!result || result.length === 0) && 20534 selector.indexOf(shadowDomSeparator) !== -1 20535 ) { 20536 var simplified = simplifyShadowSelector(selector); 20537 if (simplified !== selector) { 20538 result = traverseDOM(node, simplified); 20539 } 20540 } 20541 return result; 20542 }; 20543 })(Zepto); 20544 return Zepto; 20545})(window); 20546 20547var MO_OBJECT = window$1.MutationObserver || window$1.WebkitMutationObserver; 20548function canUseMutationObserver() { 20549 return isFunction(MO_OBJECT); 20550} 20551function getMutationObserver(callback) { 20552 return new MO_OBJECT(callback); 20553} 20554 20555var ARRAY_EXPECTED = "Expected an array of promises"; 20556function getMoImmediateFn() { 20557 var textnode = document$1.createTextNode(""); 20558 var twiddleNode = function twiddleNode() { 20559 textnode.textContent = textnode.textContent.length > 0 ? "" : "a"; 20560 }; 20561 var callbacks = []; 20562 var mo = getMutationObserver(function() { 20563 var len = callbacks.length; 20564 for (var i = 0; i < len; i += 1) { 20565 callbacks[i](); 20566 } 20567 callbacks.splice(0, len); 20568 }); 20569 mo.observe(textnode, { 20570 characterData: true 20571 }); 20572 return function(fn) { 20573 callbacks.push(fn); 20574 twiddleNode(); 20575 }; 20576} 20577function getOnReadyStateChangeImmediateFn() { 20578 return function(fn) { 20579 var scriptEl = $("<script>"); 20580 scriptEl.on("readystatechange", function() { 20581 scriptEl.on("readystatechange", null); 20582 scriptEl.remove(); 20583 scriptEl = null; 20584 fn(); 20585 }); 20586 $(document$1.documentElement).append(scriptEl); 20587 }; 20588} 20589function setupPromiseImmediateFn() { 20590 if (canUseMutationObserver()) { 20591 Promise__default["default"]._setImmediateFn(getMoImmediateFn()); 20592 return; 20593 } 20594 if (window$1.navigator.userAgent.indexOf("MSIE 10") !== -1) { 20595 Promise__default["default"]._setImmediateFn( 20596 getOnReadyStateChangeImmediateFn() 20597 ); 20598 } 20599} 20600if (Promise__default["default"]._setImmediateFn) { 20601 setupPromiseImmediateFn(); 20602} 20603function create$1(func) { 20604 return new Promise__default["default"](func); 20605} 20606function resolve(value) { 20607 return Promise__default["default"].resolve(value); 20608} 20609function reject(value) { 20610 return Promise__default["default"].reject(value); 20611} 20612function race(arr) { 20613 if (!isArray(arr)) { 20614 return reject(new TypeError(ARRAY_EXPECTED)); 20615 } 20616 return Promise__default["default"].race(arr); 20617} 20618function all(arr) { 20619 if (!isArray(arr)) { 20620 return reject(new TypeError(ARRAY_EXPECTED)); 20621 } 20622 return Promise__default["default"].all(arr); 20623} 20624function timeout(promise, time, message) { 20625 var id = -1; 20626 var delayedPromise = create$1(function(_, rej) { 20627 id = delay(function() { 20628 return rej(new Error(message)); 20629 }, time); 20630 }); 20631 return race([promise, delayedPromise]).then( 20632 function(val) { 20633 cancelDelay(id); 20634 return val; 20635 }, 20636 function(err) { 20637 cancelDelay(id); 20638 throw err; 20639 } 20640 ); 20641} 20642 20643function isOptinAvailable(win) { 20644 if (isNil(win[ADOBE])) { 20645 return false;
20646 } 20647 var adobe = win[ADOBE]; 20648 if (isNil(adobe[OPTIN])) { 20649 return false; 20650 } 20651 var optin = adobe[OPTIN]; 20652 return isFunction(optin[FETCH_PERMISSIONS]) && isFunction(optin[IS_APPROVED]); 20653} 20654function isOptinEnabled(win, optinEnabled) { 20655 if (!optinEnabled) { 20656 return false; 20657 } 20658 return isOptinAvailable(win); 20659} 20660function isCategoryApproved(win, key) { 20661 if (!isOptinAvailable(win)) { 20662 return true; 20663 } 20664 var optIn = win[ADOBE][OPTIN]; 20665 var categories = win[ADOBE][OPTIN][CATEGORIES] || {}; 20666 var category = categories[key]; 20667 return optIn[IS_APPROVED](category); 20668} 20669function fetchPermissions(win, key) { 20670 if (!isOptinAvailable(win)) { 20671 return resolve(true); 20672 } 20673 var optIn = win[ADOBE][OPTIN]; 20674 var categories = win[ADOBE][OPTIN][CATEGORIES] || {}; 20675 var category = categories[key]; 20676 return create$1(function(res, rej) { 20677 optIn[FETCH_PERMISSIONS](function() { 20678 if (optIn[IS_APPROVED](category)) { 20679 res(true); 20680 } else { 20681 rej(ERROR_TARGET_NOT_OPTED_IN); 20682 } 20683 }, true); 20684 }); 20685} 20686 20687function shouldUseOptin() { 20688 var config = getConfig(); 20689 var optinEnabled = config[OPTIN_ENABLED]; 20690 return isOptinEnabled(window$1, optinEnabled); 20691} 20692function isTargetApproved() { 20693 return isCategoryApproved(window$1, TARGET); 20694} 20695function isAnalyticsApproved() { 20696 return isCategoryApproved(window$1, ANALYTICS); 20697} 20698function fetchOptinPermissions() { 20699 return fetchPermissions(window$1, TARGET); 20700} 20701 20702var SESSION_ID = uuid(); 20703function getSessionIdFromQuery() { 20704 var location = window$1.location; 20705 var search = location.search; 20706 var params = parseQueryString(search); 20707 return params[SESSION_ID_PARAM]; 20708} 20709function saveSessionId(value, config) { 20710 setTargetCookie({ 20711 name: SESSION_ID_COOKIE, 20712 value: value, 20713 expires: config[SESSION_ID_LIFETIME], 20714 domain: config[COOKIE_DOMAIN], 20715 secure: config[SECURE_ONLY] 20716 }); 20717} 20718function throttle(func, timeFrame) { 20719 var lastTime = 0; 20720 return function() { 20721 var now = Date.now(); 20722 if (now - lastTime >= timeFrame) { 20723 func.apply(void 0, arguments); 20724 lastTime = now; 20725 } 20726 }; 20727} 20728function setSessionId(value) { 20729 var config = getConfig(); 20730 saveSessionId(value, config); 20731} 20732var throttledSetSessionId = throttle(function(sessionId) { 20733 return setSessionId(sessionId); 20734}, 300); 20735function getSessionId() { 20736 if (shouldUseOptin() && !isTargetApproved()) { 20737 return SESSION_ID; 20738 } 20739 var sessionIdQuery = getSessionIdFromQuery(); 20740 if (isNotBlank(sessionIdQuery)) { 20741 setSessionId(sessionIdQuery); 20742 return getTargetCookie(SESSION_ID_COOKIE); 20743 } 20744 var sessionId = getTargetCookie(SESSION_ID_COOKIE); 20745 if (isBlank(sessionId)) { 20746 setSessionId(SESSION_ID); 20747 } else { 20748 throttledSetSessionId(sessionId); 20749 } 20750 return getTargetCookie(SESSION_ID_COOKIE); 20751} 20752 20753function setDeviceId(value) { 20754 var config = getConfig(); 20755 setTargetCookie({ 20756 name: DEVICE_ID_COOKIE, 20757 value: value, 20758 expires: config[DEVICE_ID_LIFETIME], 20759 domain: config[COOKIE_DOMAIN], 20760 secure: config[SECURE_ONLY] 20761 }); 20762} 20763function getDeviceId() { 20764 return getTargetCookie(DEVICE_ID_COOKIE); 20765} 20766 20767var CLUSTER_ID_REGEX = /.*\.(\d+)_\d+/; 20768function extractCluster(id) { 20769 if (isBlank(id)) { 20770 return ""; 20771 } 20772 var result = CLUSTER_ID_REGEX.exec(id); 20773 if (isEmpty(result) || result.length !== 2) { 20774 return ""; 20775 } 20776 return result[1]; 20777} 20778function getEdgeCluster() { 20779 var config = getConfig(); 20780 if (!config[OVERRIDE_MBOX_EDGE_SERVER]) { 20781 return ""; 20782 } 20783 var result = getCookie(EDGE_CLUSTER_COOKIE); 20784 return isBlank(result) ? "" : result; 20785} 20786function setEdgeCluster(id) { 20787 var config = getConfig(); 20788 if (!config[OVERRIDE_MBOX_EDGE_SERVER]) { 20789 return; 20790 } 20791 var domain = config[COOKIE_DOMAIN]; 20792 var expires = new Date(now() + config[OVERRIDE_MBOX_EDGE_SERVER_TIMEOUT]); 20793 var secure = config[SECURE_ONLY]; 20794 var savedCluster = getCookie(EDGE_CLUSTER_COOKIE); 20795 var attrs = assign__default["default"]( 20796 { 20797 domain: domain, 20798 expires: expires, 20799 secure: secure 20800 }, 20801 secure 20802 ? { 20803 sameSite: SAMESITE_NONE 20804 } 20805 : {} 20806 ); 20807 if (isNotBlank(savedCluster)) { 20808 setCookie(EDGE_CLUSTER_COOKIE, savedCluster, attrs); 20809 return; 20810 } 20811 var cluster = extractCluster(id); 20812 if (isBlank(cluster)) { 20813 return; 20814 } 20815 setCookie(EDGE_CLUSTER_COOKIE, cluster, attrs); 20816} 20817 20818function bootstrapNotify(win, doc) { 20819 if (isFunction(win.CustomEvent)) { 20820 return; 20821 } 20822 function CustomEvent(event, params) { 20823 var evt = doc.createEvent("CustomEvent"); 20824 params = params || { 20825 bubbles: false, 20826 cancelable: false, 20827 detail: undefined 20828 }; 20829 evt.initCustomEvent( 20830 event, 20831 params.bubbles, 20832 params.cancelable, 20833 params.detail 20834 ); 20835 return evt; 20836 } 20837 CustomEvent.prototype = win.Event.prototype; 20838 win.CustomEvent = CustomEvent; 20839} 20840function createTracking(getSessionId, getDeviceId) { 20841 var sessionId = getSessionId(); 20842 var deviceId = getDeviceId(); 20843 var result = {}; 20844 result.sessionId = sessionId; 20845 if (isNotBlank(deviceId)) { 20846 result.deviceId = deviceId; 20847 return result; 20848 } 20849 return result; 20850} 20851function notify(win, doc, eventName, detail) { 20852 var event = new win.CustomEvent(eventName, { 20853 detail: detail 20854 }); 20855 doc.dispatchEvent(event); 20856} 20857 20858bootstrapNotify(window$1, document$1); 20859var LIBRARY_LOADED = "at-library-loaded"; 20860var REQUEST_START = "at-request-start"; 20861var REQUEST_SUCCEEDED = "at-request-succeeded"; 20862var REQUEST_FAILED = "at-request-failed"; 20863var CONTENT_RENDERING_START = "at-content-rendering-start"; 20864var CONTENT_RENDERING_SUCCEEDED = "at-content-rendering-succeeded"; 20865var CONTENT_RENDERING_FAILED = "at-content-rendering-failed"; 20866var CONTENT_RENDERING_NO_OFFERS = "at-content-rendering-no-offers"; 20867var CONTENT_RENDERING_REDIRECT = "at-content-rendering-redirect"; 20868function buildPayload(type, _detail) { 20869 var detail; 20870 try { 20871 detail = JSON.parse(JSON.stringify(_detail)); 20872 } catch (err) { 20873 detail = _detail; 20874 } 20875 var _detail2 = detail, 20876 mbox = _detail2.mbox, 20877 error = _detail2.error, 20878 url = _detail2.url, 20879 analyticsDetails = _detail2.analyticsDetails, 20880 responseTokens = _detail2.responseTokens, 20881 execution = _detail2.execution; 20882 var tracking = createTracking(getSessionId, getDeviceId); 20883 var payload = { 20884 type: type, 20885 tracking: tracking 20886 }; 20887 if (!isNil(mbox)) { 20888 payload.mbox = mbox; 20889 } 20890 if (!isNil(error)) { 20891 payload.error = error; 20892 } 20893 if (!isNil(url)) { 20894 payload.url = url; 20895 } 20896 if (!isEmpty(analyticsDetails)) {
20897 payload.analyticsDetails = analyticsDetails; 20898 } 20899 if (!isEmpty(responseTokens)) { 20900 payload.responseTokens = responseTokens; 20901 } 20902 if (!isEmpty(execution)) { 20903 payload.execution = execution; 20904 } 20905 return payload; 20906} 20907function notifyLibraryLoaded() { 20908 var payload = buildPayload(LIBRARY_LOADED, {}); 20909 notify(window$1, document$1, LIBRARY_LOADED, payload); 20910} 20911function notifyRequestStart(detail) { 20912 var payload = buildPayload(REQUEST_START, detail); 20913 notify(window$1, document$1, REQUEST_START, payload); 20914} 20915function notifyRequestSucceeded(detail, redirect) { 20916 var payload = buildPayload(REQUEST_SUCCEEDED, detail); 20917 payload.redirect = redirect; 20918 notify(window$1, document$1, REQUEST_SUCCEEDED, payload); 20919} 20920function notifyRequestFailed(detail) { 20921 var payload = buildPayload(REQUEST_FAILED, detail); 20922 notify(window$1, document$1, REQUEST_FAILED, payload); 20923} 20924function notifyRenderingStart(detail) { 20925 var payload = buildPayload(CONTENT_RENDERING_START, detail); 20926 notify(window$1, document$1, CONTENT_RENDERING_START, payload); 20927} 20928function notifyRenderingSucceeded(detail) { 20929 var payload = buildPayload(CONTENT_RENDERING_SUCCEEDED, detail); 20930 notify(window$1, document$1, CONTENT_RENDERING_SUCCEEDED, payload); 20931} 20932function notifyRenderingFailed(detail) { 20933 var payload = buildPayload(CONTENT_RENDERING_FAILED, detail); 20934 notify(window$1, document$1, CONTENT_RENDERING_FAILED, payload); 20935} 20936function notifyRenderingNoOffers(detail) { 20937 var payload = buildPayload(CONTENT_RENDERING_NO_OFFERS, detail); 20938 notify(window$1, document$1, CONTENT_RENDERING_NO_OFFERS, payload); 20939} 20940function notifyRenderingRedirect(detail) { 20941 var payload = buildPayload(CONTENT_RENDERING_REDIRECT, detail); 20942 notify(window$1, document$1, CONTENT_RENDERING_REDIRECT, payload); 20943} 20944 20945function isElement(value) { 20946 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); 20947} 20948 20949var EQ_START = ":eq("; 20950var EQ_END = ")"; 20951var EQ_LENGTH = EQ_START.length; 20952var DIGIT_IN_SELECTOR_PATTERN = /((\.|#)(-)?\d{1})/g; 20953function createPair$1(match) { 20954 var first = match.charAt(0); 20955 var second = match.charAt(1); 20956 var third = match.charAt(2); 20957 var result = { 20958 key: match 20959 }; 20960 if (second === "-") { 20961 result.val = "" + first + second + "\\3" + third + " "; 20962 } else { 20963 result.val = first + "\\3" + second + " "; 20964 } 20965 return result; 20966} 20967function escapeDigitsInSelector(selector) { 20968 var matches = selector.match(DIGIT_IN_SELECTOR_PATTERN); 20969 if (isEmpty(matches)) { 20970 return selector; 20971 } 20972 var pairs = map(createPair$1, matches); 20973 return reduce( 20974 function(acc, pair) { 20975 return acc.replace(pair.key, pair.val); 20976 }, 20977 selector, 20978 pairs 20979 ); 20980} 20981function parseSelector(selector) { 20982 var result = []; 20983 var sel = trim(selector); 20984 var currentIndex = sel.indexOf(EQ_START); 20985 var head; 20986 var tail; 20987 var eq; 20988 var index; 20989 while (currentIndex !== -1) { 20990 head = trim(sel.substring(0, currentIndex)); 20991 tail = trim(sel.substring(currentIndex)); 20992 index = tail.indexOf(EQ_END); 20993 eq = trim(tail.substring(EQ_LENGTH, index)); 20994 sel = trim(tail.substring(index + 1)); 20995 currentIndex = sel.indexOf(EQ_START); 20996 if (head && eq) { 20997 result.push({ 20998 sel: head, 20999 eq: Number(eq) 21000 }); 21001 } 21002 } 21003 if (sel) { 21004 result.push({ 21005 sel: sel 21006 }); 21007 } 21008 return result; 21009} 21010function select(selector) { 21011 if (isElement(selector)) { 21012 return $(selector); 21013 } 21014 if (!isString(selector)) { 21015 return $(selector); 21016 } 21017 var selectorAsString = escapeDigitsInSelector(selector); 21018 if (selectorAsString.indexOf(EQ_START) === -1) { 21019 return $(selectorAsString); 21020 } 21021 var parts = parseSelector(selectorAsString); 21022 return reduce( 21023 function(acc, part) { 21024 var sel = part.sel, 21025 eq = part.eq; 21026 acc = acc.find(sel); 21027 if (isNumber(eq)) { 21028 acc = acc.eq(eq); 21029 } 21030 return acc; 21031 }, 21032 $(document$1), 21033 parts 21034 ); 21035} 21036function exists(selector) { 21037 return select(selector).length > 0; 21038} 21039function fragment(content) { 21040 return $("<" + DIV_TAG + "/>").append(content); 21041} 21042function wrap(content) { 21043 return $(content); 21044} 21045function prev(selector) { 21046 return select(selector).prev(); 21047} 21048function next(selector) { 21049 return select(selector).next(); 21050} 21051function parent(selector) { 21052 return select(selector).parent(); 21053} 21054function is(query, selector) { 21055 return select(selector).is(query); 21056} 21057function find(query, selector) { 21058 return select(selector).find(query); 21059} 21060function children(selector) { 21061 return select(selector).children(); 21062} 21063 21064var LOAD_ERROR = "Unable to load target-vec.js"; 21065var LOAD_AUTHORING = "Loading target-vec.js"; 21066var NAMESPACE = "_AT"; 21067var EDITOR = "clickHandlerForExperienceEditor"; 21068var CURRENT_VIEW = "currentView"; 21069function initNamespace() { 21070 window$1[NAMESPACE] = window$1[NAMESPACE] || {}; 21071 window$1[NAMESPACE].querySelectorAll = select; 21072} 21073function handleAuthoringTriggeredView(options) { 21074 var viewName = options[VIEW_NAME]; 21075 window$1[NAMESPACE][CURRENT_VIEW] = viewName; 21076} 21077function setupClickHandler() { 21078 document$1.addEventListener( 21079 CLICK, 21080 function(event) { 21081 if (isFunction(window$1[NAMESPACE][EDITOR])) { 21082 window$1[NAMESPACE][EDITOR](event); 21083 } 21084 }, 21085 true 21086 ); 21087} 21088function initAuthoringCode() { 21089 if (!isAuthoringEnabled()) { 21090 return; 21091 } 21092 initNamespace(); 21093 var config = getConfig(); 21094 var authoringScriptUrl = config[AUTHORING_SCRIPT_URL]; 21095 var success = function success() { 21096 return setupClickHandler(); 21097 }; 21098 var error = function error() { 21099 return logWarn(LOAD_ERROR); 21100 }; 21101 logDebug(LOAD_AUTHORING); 21102 loadScript__default["default"](authoringScriptUrl) 21103 .then(success) 21104 ["catch"](error); 21105} 21106 21107var QA_MODE_COOKIE = "at_qa_mode"; 21108var PREVIEW_TOKEN = "at_preview_token"; 21109var PREVIEW_INDEX = "at_preview_index"; 21110var ACTIVITIES_ONLY = "at_preview_listed_activities_only"; 21111var TRUE_AUDIENCE_IDS = "at_preview_evaluate_as_true_audience_ids"; 21112var FALSE_AUDIENCE_IDS = "at_preview_evaluate_as_false_audience_ids"; 21113var UNDERSCORE = "_"; 21114var notNull$1 = function notNull(v) { 21115 return !isNil(v); 21116}; 21117function toNumber(value) { 21118 return parseInt(value, 10); 21119} 21120function getIndex(value) { 21121 var result = toNumber(value); 21122 return isNaN(result) ? null : result; 21123} 21124function extractAudienceIds(value) { 21125 return split(UNDERSCORE, value); 21126} 21127function parsePreviewIndex(value) { 21128 var pair = split(UNDERSCORE, value); 21129 var activityIndex = getIndex(pair[0]); 21130 if (isNil(activityIndex)) { 21131 return null; 21132 } 21133 var result = {}; 21134 result.activityIndex = activityIndex; 21135 var experienceIndex = getIndex(pair[1]); 21136 if (!isNil(experienceIndex)) { 21137 result.experienceIndex = experienceIndex; 21138 } 21139 return result; 21140} 21141function parsePreviewIndexes(values) { 21142 return filter(notNull$1, map(parsePreviewIndex, values)); 21143} 21144function extractPreviewIndexes(value) { 21145 if (isArray(value)) { 21146 return parsePreviewIndexes(value); 21147 } 21148 return parsePreviewIndexes([value]); 21149} 21150function extractQaMode(queryString) { 21151 var query = parseQueryString(queryString); 21152 var token = query[PREVIEW_TOKEN]; 21153 if (isBlank(token)) { 21154 return null; 21155 } 21156 var result = {}; 21157 result.token = token; 21158 var listedActivitiesOnly = query[ACTIVITIES_ONLY]; 21159 if (isNotBlank(listedActivitiesOnly) && listedActivitiesOnly === TRUE) { 21160 result.listedActivitiesOnly = true; 21161 } 21162 var trueAudiences = query[TRUE_AUDIENCE_IDS]; 21163 if (isNotBlank(trueAudiences)) { 21164 result.evaluateAsTrueAudienceIds = extractAudienceIds(trueAudiences); 21165 } 21166 var falseAudiences = query[FALSE_AUDIENCE_IDS]; 21167 if (isNotBlank(falseAudiences)) { 21168 result.evaluateAsFalseAudienceIds = extractAudienceIds(falseAudiences); 21169 } 21170 var previewIndexes = query[PREVIEW_INDEX]; 21171 if (isEmpty(previewIndexes)) { 21172 return result; 21173 } 21174 result.previewIndexes = extractPreviewIndexes(previewIndexes); 21175 return result; 21176} 21177function initQaMode(win) { 21178 var setCookie$1 = 21179 arguments.length > 1 && arguments[1] !== undefined 21180 ? arguments[1] 21181 : setCookie; 21182 var result = extractQaMode(win.location.search); 21183 if (isNil(result)) { 21184 return; 21185 } 21186 var expires = new Date(now() + 1.86e6); 21187 var config = getConfig(); 21188 var secure = config[SECURE_ONLY]; 21189 var domain = config[COOKIE_DOMAIN]; 21190 var attrs = assign__default["default"]( 21191 { 21192 expires: expires, 21193 secure: secure, 21194 domain: domain 21195 }, 21196 secure 21197 ? { 21198 sameSite: SAMESITE_NONE 21199 } 21200 : {} 21201 ); 21202 setCookie$1(QA_MODE_COOKIE, JSON.stringify(result), attrs); 21203} 21204function getQaMode() { 21205 var getCookie$1 = 21206 arguments.length > 0 && arguments[0] !== undefined 21207 ? arguments[0] 21208 : getCookie; 21209 var result = getCookie$1(QA_MODE_COOKIE); 21210 if (isBlank(result)) { 21211 return {}; 21212 } 21213 try { 21214 return JSON.parse(result); 21215 } catch (e) { 21216 return {}; 21217 } 21218} 21219 21220var PREVIEW_MODE_COOKIE = "at_preview_mode"; 21221var PREVIEW_MODE_TOKEN = "at_preview"; 21222function extractPreviewMode(queryString) { 21223 var query = parseQueryString(queryString); 21224 var token = query[PREVIEW_MODE_TOKEN]; 21225 if (isBlank(token)) { 21226 return null; 21227 } 21228 return { 21229 token: token 21230 }; 21231} 21232function initPreviewMode(win) { 21233 var result = extractPreviewMode(win.location.search); 21234 if (isNil(result)) { 21235 return; 21236 } 21237 var expires = new Date(now() + 1.86e6); 21238 var config = getConfig(); 21239 var secure = config[SECURE_ONLY]; 21240 var attrs = assign__default["default"]( 21241 { 21242 expires: expires, 21243 secure: secure 21244 }, 21245 secure 21246 ? { 21247 sameSite: SAMESITE_NONE 21248 } 21249 : {} 21250 ); 21251 setCookie(PREVIEW_MODE_COOKIE, JSON.stringify(result), attrs); 21252} 21253function getPreview() { 21254 var result = getCookie(PREVIEW_MODE_COOKIE); 21255 if (isBlank(result)) { 21256 return {}; 21257 } 21258 try { 21259 return JSON.parse(result); 21260 } catch (e) { 21261 return {}; 21262 } 21263} 21264 21265function remove$4(selector) { 21266 return select(selector) 21267 .empty() 21268 .remove(); 21269} 21270function after(content, selector) { 21271 return select(selector).after(content); 21272} 21273function before(content, selector) { 21274 return select(selector).before(content); 21275} 21276function append(content, selector) { 21277 return select(selector).append(content); 21278} 21279function prepend(content, selector) { 21280 return select(selector).prepend(content); 21281} 21282function setHtml$3(content, selector) { 21283 return select(selector).html(content); 21284} 21285function getHtml(selector) { 21286 return select(selector).html(); 21287} 21288function setText$4(content, selector) { 21289 return select(selector).text(content); 21290} 21291 21292var STYLE_PREFIX = "at-"; 21293var BODY_STYLE_ID = "at-body-style"; 21294var BODY_STYLE_ID_SELECTOR = "#" + BODY_STYLE_ID; 21295var ALL_VIEWS_STYLE_ID = STYLE_PREFIX + "views"; 21296function createStyleMarkup(id, content) { 21297 return ( 21298 "<" + 21299 STYLE_TAG + 21300 " " + 21301 ID + 21302 '="' + 21303 id + 21304 '" ' + 21305 CLASS + 21306 '="' + 21307 FLICKER_CONTROL_CLASS + 21308 '">' + 21309 content + 21310 "</" + 21311 STYLE_TAG + 21312 ">" 21313 ); 21314} 21315function createActionStyle(styleDef, selector) { 21316 var id = STYLE_PREFIX + hash(selector); 21317 var style = selector + " {" + styleDef + "}"; 21318 return createStyleMarkup(id, style); 21319} 21320function createAllViewsStyle(styleDef, aggregateSelector) { 21321 var style = aggregateSelector + " {" + styleDef + "}"; 21322 return createStyleMarkup(ALL_VIEWS_STYLE_ID, style); 21323} 21324function addHidingSnippet(config) { 21325 var bodyHidingEnabled = config[BODY_HIDING_ENABLED]; 21326 if (bodyHidingEnabled !== true) { 21327 return; 21328 } 21329 if (exists(BODY_STYLE_ID_SELECTOR)) { 21330 return; 21331 } 21332 var bodyHiddenStyle = config[BODY_HIDDEN_STYLE]; 21333 append(createStyleMarkup(BODY_STYLE_ID, bodyHiddenStyle), HEAD_TAG); 21334} 21335function removeHidingSnippet(config) { 21336 var bodyHidingEnabled = config[BODY_HIDING_ENABLED]; 21337 if (bodyHidingEnabled !== true) { 21338 return; 21339 } 21340 if (!exists(BODY_STYLE_ID_SELECTOR)) { 21341 return; 21342 } 21343 remove$4(BODY_STYLE_ID_SELECTOR); 21344} 21345function addActionHidings(config, selectors) { 21346 if (isEmpty(selectors)) { 21347 return; 21348 } 21349 var alreadyHidden = function alreadyHidden(selector) { 21350 return !exists("#" + (STYLE_PREFIX + hash(selector))); 21351 }; 21352 var selectorsToHide = filter(alreadyHidden, selectors); 21353 if (isEmpty(selectorsToHide)) { 21354 return; 21355 } 21356 var styleDef = config[DEFAULT_CONTENT_HIDDEN_STYLE]; 21357 var buildStyle = function buildStyle(selector) { 21358 return createActionStyle(styleDef, selector); 21359 }; 21360 var content = join("\n", map(buildStyle, selectorsToHide)); 21361 append(content, HEAD_TAG); 21362} 21363function addAllViewsHidings(config, selectors) { 21364 if (isEmpty(selectors) || exists("#" + ALL_VIEWS_STYLE_ID)) { 21365 return; 21366 } 21367 var styleDef = config[DEFAULT_CONTENT_HIDDEN_STYLE]; 21368 var aggregateSelector = join(", ", selectors); 21369 var content = createAllViewsStyle(styleDef, aggregateSelector); 21370 append(content, HEAD_TAG); 21371} 21372 21373function injectHidingSnippetStyle() { 21374 addHidingSnippet(getConfig()); 21375} 21376function removeHidingSnippetStyle() { 21377 removeHidingSnippet(getConfig()); 21378} 21379function injectActionHidingStyles(selectors) { 21380 addActionHidings(getConfig(), selectors); 21381} 21382function injectAllViewsHidingStyle(selectors) { 21383 addAllViewsHidings(getConfig(), selectors); 21384} 21385function removeActionHidingStyle(selector) { 21386 var id = STYLE_PREFIX + hash(selector); 21387 remove$4("#" + id); 21388} 21389function removeAllViewsHidingStyle() { 21390 var hidingStyleSelector = "#" + ALL_VIEWS_STYLE_ID; 21391 if (exists(hidingStyleSelector)) { 21392 remove$4(hidingStyleSelector); 21393 } 21394} 21395 21396var OPTOUT_MESSAGE = "Disabled due to optout"; 21397var MCAAMB = "MCAAMB"; 21398var MCAAMLH = "MCAAMLH"; 21399var MCMID = "MCMID"; 21400var MCOPTOUT = "MCOPTOUT"; 21401var SDID_METHOD = "getSupplementalDataID"; 21402var CIDS_METHOD = "getCustomerIDs"; 21403var SUPPORTS_NS = true; 21404var NAMESPACE_TYPE = "NS"; 21405var DATASOURCE_TYPE = "DS"; 21406var TRACK_SERVER_PROP = "trackingServer"; 21407var TRACK_SERVER_SECURE_PROP = TRACK_SERVER_PROP + "Secure"; 21408function hasId(value) { 21409 return !isNil(value[ID]); 21410} 21411function hasAuthState(value) { 21412 return !isNil(value[AUTH_STATE]); 21413} 21414function getAuthenticatedState(value) { 21415 switch (value) { 21416 case 0: 21417 return "unknown"; 21418 case 1: 21419 return "authenticated"; 21420 case 2: 21421 return "logged_out"; 21422 default: 21423 return "unknown"; 21424 } 21425} 21426function isPrimary(value) { 21427 return value[PRIMARY]; 21428} 21429function isCustomerId(value) { 21430 return hasId(value) || hasAuthState(value); 21431} 21432function normalizeCustomerIds(customerIds, customerIdType) { 21433 return reduce( 21434 function(acc, value, key) { 21435 var item = {}; 21436 item[INTEGRATION_CODE] = key; 21437 if (hasId(value)) { 21438 item[ID] = value[ID]; 21439 } 21440 if (hasAuthState(value)) { 21441 item[AUTHENTICATED_STATE] = getAuthenticatedState(value[AUTH_STATE]); 21442 } 21443 item[TYPE] = customerIdType; 21444 if (isPrimary(value)) { 21445 item[PRIMARY] = true; 21446 } 21447 acc.push(item); 21448 return acc; 21449 }, 21450 [], 21451 filter(isCustomerId, customerIds) 21452 ); 21453} 21454function buildDeliveryCustomerIds(customerIds) {
21455 if (!customerIds.nameSpaces && !customerIds.dataSources) { 21456 return normalizeCustomerIds(customerIds, DATASOURCE_TYPE); 21457 } 21458 var normalizedCustomerIds = []; 21459 if (customerIds.nameSpaces) { 21460 normalizedCustomerIds.push.apply( 21461 normalizedCustomerIds, 21462 normalizeCustomerIds(customerIds.nameSpaces, NAMESPACE_TYPE) 21463 ); 21464 } 21465 if (customerIds.dataSources) { 21466 normalizedCustomerIds.push.apply( 21467 normalizedCustomerIds, 21468 normalizeCustomerIds(customerIds.dataSources, DATASOURCE_TYPE) 21469 ); 21470 } 21471 return normalizedCustomerIds; 21472} 21473function getCustomerIds(visitor) { 21474 if (isNil(visitor)) { 21475 return []; 21476 } 21477 if (!isFunction(visitor[CIDS_METHOD])) { 21478 return []; 21479 } 21480 var customerIds = visitor[CIDS_METHOD](SUPPORTS_NS); 21481 if (!isObject(customerIds)) { 21482 return []; 21483 } 21484 return buildDeliveryCustomerIds(customerIds); 21485} 21486function getSdid(visitor, consumerId) { 21487 if (isNil(visitor)) { 21488 return null; 21489 } 21490 if (!isFunction(visitor[SDID_METHOD])) { 21491 return null; 21492 } 21493 return visitor[SDID_METHOD](consumerId); 21494} 21495function getInstanceProperty(visitor, property) { 21496 if (isNil(visitor)) { 21497 return null; 21498 } 21499 var result = visitor[property]; 21500 if (isNil(result)) { 21501 return null; 21502 } 21503 return result; 21504} 21505 21506var VISITOR = "Visitor"; 21507var GET_INSTANCE_METHOD = "getInstance"; 21508var IS_ALLOWED_METHOD = "isAllowed"; 21509function getInstance(win, imsOrgId, sdidParamExpiry) { 21510 if (isBlank(imsOrgId)) { 21511 return null; 21512 } 21513 if (isNil(win[VISITOR])) { 21514 return null; 21515 } 21516 if (!isFunction(win[VISITOR][GET_INSTANCE_METHOD])) { 21517 return null; 21518 } 21519 var visitor = win[VISITOR][GET_INSTANCE_METHOD](imsOrgId, { 21520 sdidParamExpiry: sdidParamExpiry 21521 }); 21522 if ( 21523 isObject(visitor) && 21524 isFunction(visitor[IS_ALLOWED_METHOD]) && 21525 visitor[IS_ALLOWED_METHOD]() 21526 ) { 21527 return visitor; 21528 } 21529 return null; 21530} 21531 21532var TIMEOUT_MESSAGE = "Visitor API requests timed out"; 21533var ERROR_MESSAGE = "Visitor API requests error"; 21534function getVisitorValuesAsync(visitor, optoutEnabled) { 21535 if (!isFunction(visitor.getVisitorValues)) { 21536 return resolve({}); 21537 } 21538 var fields = [MCMID, MCAAMB, MCAAMLH]; 21539 if (optoutEnabled) { 21540 fields.push(MCOPTOUT); 21541 } 21542 return create$1(function(res) { 21543 visitor.getVisitorValues(function(values) { 21544 return res(values); 21545 }, fields); 21546 }); 21547} 21548function handleError$1(error) { 21549 logDebug(ERROR_MESSAGE, error); 21550 return {}; 21551} 21552function getAsyncValues(visitor, visitorApiTimeout, optoutEnabled) { 21553 if (isNil(visitor)) { 21554 return resolve({}); 21555 } 21556 var requests = getVisitorValuesAsync(visitor, optoutEnabled); 21557 return timeout(requests, visitorApiTimeout, TIMEOUT_MESSAGE)["catch"]( 21558 handleError$1 21559 ); 21560} 21561 21562function getVisitorValues(visitor, optoutEnabled) { 21563 if (!isFunction(visitor.getVisitorValues)) { 21564 return {}; 21565 } 21566 var fields = [MCMID, MCAAMB, MCAAMLH]; 21567 if (optoutEnabled) { 21568 fields.push(MCOPTOUT); 21569 } 21570 var result = {}; 21571 visitor.getVisitorValues(function(values) { 21572 return assign__default["default"](result, values); 21573 }, fields); 21574 return result; 21575} 21576function getSyncValues(visitor, optoutEnabled) { 21577 if (isNil(visitor)) { 21578 return {}; 21579 } 21580 return getVisitorValues(visitor, optoutEnabled); 21581} 21582 21583function getVisitorInstance() { 21584 var config = getConfig(); 21585 var imsOrgId = config[IMS_ORG_ID]; 21586 var sdidParamExpiry = config[SUPPLEMENTAL_DATA_ID_PARAM_TIMEOUT]; 21587 return getInstance(window$1, imsOrgId, sdidParamExpiry); 21588} 21589function getAsyncVisitorValues() { 21590 var visitor = getVisitorInstance(); 21591 var config = getConfig(); 21592 var visitorApiTimeout = config[VISITOR_API_TIMEOUT]; 21593 var optoutEnabled = config[OPTOUT_ENABLED]; 21594 return getAsyncValues(visitor, visitorApiTimeout, optoutEnabled); 21595} 21596function getSyncVisitorValues() { 21597 var visitor = getVisitorInstance(); 21598 var config = getConfig(); 21599 var optoutEnabled = config[OPTOUT_ENABLED]; 21600 return getSyncValues(visitor, optoutEnabled); 21601} 21602function getCustomerIdsVisitorValues() { 21603 return getCustomerIds(getVisitorInstance()); 21604} 21605function getSdidVisitorValue(consumerId) { 21606 return getSdid(getVisitorInstance(), consumerId); 21607} 21608function getVisitorProperty(property) { 21609 return getInstanceProperty(getVisitorInstance(), property); 21610} 21611 21612var storage = {}; 21613function setItem(key, value) { 21614 storage[key] = value; 21615} 21616function getItem(key) { 21617 return storage[key]; 21618} 21619 21620var LOG_PREFIX = "Data provider"; 21621var TIMED_OUT = "timed out"; 21622var MAX_TIMEOUT = 2000; 21623function areDataProvidersPresent(win) { 21624 var globalSettings = win[GLOBAL_SETTINGS]; 21625 if (isNil(globalSettings)) { 21626 return false;
21627 } 21628 var dataProviders = globalSettings[DATA_PROVIDERS]; 21629 if (!isArray(dataProviders) || isEmpty(dataProviders)) { 21630 return false; 21631 } 21632 return true; 21633} 21634function isValidDataProvider(dataProvider) { 21635 var name = dataProvider[NAME]; 21636 if (!isString(name) || isEmpty(name)) { 21637 return false; 21638 } 21639 var version = dataProvider[VERSION]; 21640 if (!isString(version) || isEmpty(version)) { 21641 return false; 21642 } 21643 var wait = dataProvider[TIMEOUT$1]; 21644 if (!isNil(wait) && !isNumber(wait)) { 21645 return false; 21646 } 21647 var provider = dataProvider[PROVIDER]; 21648 if (!isFunction(provider)) { 21649 return false; 21650 } 21651 return true; 21652} 21653function createPromise(provider) { 21654 return create$1(function(success, error) { 21655 provider(function(err, params) { 21656 if (!isNil(err)) { 21657 error(err); 21658 return; 21659 } 21660 success(params); 21661 }); 21662 }); 21663} 21664function createTrace$1(nameKey, name, versionKey, version, resKey, res) { 21665 var dataProviderTrace = {}; 21666 dataProviderTrace[nameKey] = name; 21667 dataProviderTrace[versionKey] = version; 21668 dataProviderTrace[resKey] = res; 21669 var result = {}; 21670 result[DATA_PROVIDER] = dataProviderTrace; 21671 return result; 21672} 21673function convertToPromise(dataProvider) { 21674 var name = dataProvider[NAME]; 21675 var version = dataProvider[VERSION]; 21676 var wait = dataProvider[TIMEOUT$1] || MAX_TIMEOUT; 21677 var provider = dataProvider[PROVIDER]; 21678 var promise = createPromise(provider); 21679 return timeout(promise, wait, TIMED_OUT) 21680 .then(function(params) { 21681 var trace = createTrace$1(NAME, name, VERSION, version, PARAMS, params); 21682 logDebug(LOG_PREFIX, SUCCESS, trace); 21683 addClientTrace(trace); 21684 return params; 21685 }) 21686 ["catch"](function(error) { 21687 var trace = createTrace$1(NAME, name, VERSION, version, ERROR, error); 21688 logDebug(LOG_PREFIX, ERROR, trace); 21689 addClientTrace(trace); 21690 return {}; 21691 }); 21692} 21693function collectParams(arr) { 21694 var result = reduce( 21695 function(acc, value) { 21696 return assign__default["default"](acc, value); 21697 }, 21698 {}, 21699 arr 21700 ); 21701 setItem(DATA_PROVIDERS, result); 21702 return result; 21703} 21704function executeAsyncDataProviders(win) { 21705 if (!areDataProvidersPresent(win)) { 21706 return resolve({}); 21707 } 21708 var dataProviders = win[GLOBAL_SETTINGS][DATA_PROVIDERS]; 21709 var validProviders = filter(isValidDataProvider, dataProviders); 21710 return all(map(convertToPromise, validProviders)).then(collectParams); 21711} 21712function executeSyncDataProviders() { 21713 var result = getItem(DATA_PROVIDERS); 21714 if (isNil(result)) { 21715 return {}; 21716 } 21717 return result; 21718} 21719 21720function getAsyncDataProvidersParameters() { 21721 return executeAsyncDataProviders(window$1); 21722} 21723function getSyncDataProvidersParameters() { 21724 return executeSyncDataProviders(); 21725} 21726 21727var TOKEN_PARAM = "authorization"; 21728var TOKEN_COOKIE = "mboxDebugTools"; 21729function getTokenFromQueryString(win) { 21730 var location = win.location; 21731 var search = location.search; 21732 var params = parseQueryString(search); 21733 var result = params[TOKEN_PARAM]; 21734 if (isBlank(result)) { 21735 return null; 21736 } 21737 return result; 21738} 21739function getTokenFromCookie() { 21740 var result = getCookie(TOKEN_COOKIE); 21741 if (isBlank(result)) { 21742 return null; 21743 } 21744 return result; 21745} 21746function getTraceToken() { 21747 var param = getTokenFromQueryString(window$1); 21748 var cookie = getTokenFromCookie(); 21749 return param || cookie; 21750} 21751 21752function isPair(pair) { 21753 return !isEmpty(pair) && pair.length === 2 && isNotBlank(pair[0]); 21754} 21755function createPair(param) { 21756 var index = param.indexOf("="); 21757 if (index === -1) { 21758 return []; 21759 } 21760 return [param.substr(0, index), param.substr(index + 1)]; 21761} 21762function objectToParamsInternal(obj, ks, result, keyFunc) { 21763 forEach(function(value, key) { 21764 if (isObject(value)) { 21765 ks.push(key); 21766 objectToParamsInternal(value, ks, result, keyFunc); 21767 ks.pop(); 21768 } else if (isEmpty(ks)) { 21769 result[keyFunc(key)] = value; 21770 } else { 21771 result[keyFunc(join(".", ks.concat(key)))] = value; 21772 } 21773 }, obj); 21774} 21775function queryStringToParams(queryString) { 21776 return filter(function(value, key) { 21777 return isNotBlank(key); 21778 }, parseQueryString(queryString)); 21779} 21780function arrayToParams(array) { 21781 var pairs = reduce( 21782 function(acc, param) { 21783 acc.push(createPair(param)); 21784 return acc; 21785 }, 21786 [], 21787 filter(isNotBlank, array) 21788 ); 21789 return reduce( 21790 function(acc, pair) {
21791 acc[decode(trim(pair[0]))] = decode(trim(pair[1])); 21792 return acc; 21793 }, 21794 {}, 21795 filter(isPair, pairs) 21796 ); 21797} 21798function objectToParams(object, keyFunc) { 21799 var result = {}; 21800 if (isNil(keyFunc)) { 21801 objectToParamsInternal(object, [], result, identity); 21802 } else { 21803 objectToParamsInternal(object, [], result, keyFunc); 21804 } 21805 return result; 21806} 21807function functionToParams(func) { 21808 if (!isFunction(func)) { 21809 return {}; 21810 } 21811 var params = null; 21812 try { 21813 params = func(); 21814 } catch (_ignore) { 21815 return {}; 21816 } 21817 if (isNil(params)) { 21818 return {}; 21819 } 21820 if (isArray(params)) { 21821 return arrayToParams(params); 21822 } 21823 if (isString(params) && isNotBlank(params)) { 21824 return queryStringToParams(params); 21825 } 21826 if (isObject(params)) { 21827 return objectToParams(params); 21828 } 21829 return {}; 21830} 21831function getUserAgentData() { 21832 var userAgentData = window.navigator.userAgentData; 21833 return userAgentData; 21834} 21835 21836function getParamsAll(mboxParams) { 21837 return assign__default["default"]( 21838 {}, 21839 mboxParams, 21840 functionToParams(window$1.targetPageParamsAll) 21841 ); 21842} 21843function getParams$1(globalMboxParams) { 21844 return assign__default["default"]( 21845 {}, 21846 globalMboxParams, 21847 functionToParams(window$1.targetPageParams) 21848 ); 21849} 21850function getTargetPageParams(mbox) { 21851 var config = getConfig(); 21852 var globalMbox = config[GLOBAL_MBOX_NAME]; 21853 var mboxParams = config[MBOX_PARAMS]; 21854 var globalMboxParams = config[GLOBAL_MBOX_PARAMS]; 21855 if (globalMbox !== mbox) { 21856 return getParamsAll(mboxParams || {}); 21857 } 21858 return assign__default["default"]( 21859 getParamsAll(mboxParams || {}), 21860 getParams$1(globalMboxParams || {}) 21861 ); 21862} 21863 21864var CLIENT_HINTS_HIGH_ENTROPY = [ 21865 "architecture", 21866 "bitness", 21867 "model", 21868 "platformVersion", 21869 "fullVersionList" 21870]; 21871function getWebGLRendererInternal() { 21872 var canvas = document$1.createElement("canvas"); 21873 var gl = 21874 canvas.getContext("webgl") || canvas.getContext("experimental-webgl"); 21875 if (isNil(gl)) { 21876 return null; 21877 } 21878 var glInfo = gl.getExtension("WEBGL_debug_renderer_info"); 21879 if (isNil(glInfo)) { 21880 return null; 21881 } 21882 var result = gl.getParameter(glInfo.UNMASKED_RENDERER_WEBGL); 21883 if (isNil(result)) { 21884 return null; 21885 } 21886 return result; 21887} 21888function getPixelRatio() { 21889 var ratio = window$1.devicePixelRatio; 21890 if (!isNil(ratio)) { 21891 return ratio; 21892 } 21893 ratio = 1; 21894 var screen = window$1.screen; 21895 var systemXDPI = screen.systemXDPI, 21896 logicalXDPI = screen.logicalXDPI; 21897 if (!isNil(systemXDPI) && !isNil(logicalXDPI) && systemXDPI > logicalXDPI) { 21898 ratio = systemXDPI / logicalXDPI; 21899 } 21900 return ratio; 21901} 21902function toBrowserUAString(brands) { 21903 if (!isArray(brands) || brands.length === 0) { 21904 return ""; 21905 } 21906 var result = ""; 21907 brands.forEach(function(brandItem, idx) { 21908 var brand = brandItem.brand, 21909 version = brandItem.version; 21910 var delimiter = idx < brands.length - 1 ? ", " : ""; 21911 result += '"' + brand + '";v="' + version + '"' + delimiter; 21912 }); 21913 return result; 21914} 21915function getLowEntropyClientHints(userAgentData) { 21916 var mobile = userAgentData.mobile, 21917 platform = userAgentData.platform, 21918 brands = userAgentData.brands; 21919 return { 21920 mobile: mobile, 21921 platform: platform, 21922 browserUAWithMajorVersion: toBrowserUAString(brands) 21923 }; 21924} 21925function getHighEntropyClientHints(userAgentData) { 21926 var lowEntropyValues = 21927 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 21928 try { 21929 return userAgentData 21930 .getHighEntropyValues(CLIENT_HINTS_HIGH_ENTROPY) 21931 .then(function(highEntropyValues) { 21932 var platformVersion = highEntropyValues.platformVersion, 21933 architecture = highEntropyValues.architecture, 21934 bitness = highEntropyValues.bitness, 21935 model = highEntropyValues.model, 21936 fullVersionList = highEntropyValues.fullVersionList; 21937 return assign__default["default"]({}, lowEntropyValues, { 21938 model: model, 21939 platformVersion: platformVersion, 21940 browserUAWithFullVersion: toBrowserUAString(fullVersionList), 21941 architecture: architecture, 21942 bitness: bitness 21943 }); 21944 }); 21945 } catch (err) { 21946 return resolve(lowEntropyValues); 21947 } 21948} 21949function cacheClientHints(clientHints) { 21950 setItem(CLIENT_HINTS, clientHints); 21951 return clientHints; 21952}
21953function resolveClientHints(clientHints) { 21954 return resolve(clientHints).then(cacheClientHints); 21955} 21956function getClientHints(userAgentData) { 21957 var includeHighEntropy = 21958 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 21959 var cachedClientHints = getItem(CLIENT_HINTS); 21960 if (isDefined(cachedClientHints)) { 21961 return resolveClientHints(cachedClientHints); 21962 } 21963 if (isUndefined(userAgentData)) { 21964 return resolveClientHints({}); 21965 } 21966 var lowEntropyValues = getLowEntropyClientHints(userAgentData); 21967 if (!includeHighEntropy) { 21968 return resolveClientHints(lowEntropyValues); 21969 } 21970 return resolveClientHints( 21971 getHighEntropyClientHints(userAgentData, lowEntropyValues) 21972 ); 21973} 21974function getScreenOrientation() { 21975 var screen = window$1.screen; 21976 var orientation = screen.orientation, 21977 width = screen.width, 21978 height = screen.height; 21979 if (isNil(orientation)) { 21980 return width > height ? "landscape" : "portrait"; 21981 } 21982 if (isNil(orientation.type)) { 21983 return null; 21984 } 21985 var parts = split("-", orientation.type); 21986 if (isEmpty(parts)) { 21987 return null; 21988 } 21989 var result = parts[0]; 21990 if (!isNil(result)) { 21991 return result; 21992 } 21993 return null; 21994} 21995function getWebGLRenderer() { 21996 return getWebGLRendererInternal(); 21997} 21998 21999var PROFILE_PREFIX = "profile."; 22000var THIRD_PARTY_ID = "mbox3rdPartyId"; 22001var PROPERTY_TOKEN = "at_property"; 22002var ORDER_ID = "orderId"; 22003var ORDER_TOTAL = "orderTotal"; 22004var PRODUCT_PURCHASED_ID = "productPurchasedId"; 22005var PRODUCT_ID = "productId"; 22006var CATEGORY_ID = "categoryId"; 22007function isThirdPartyId(param) { 22008 return param === THIRD_PARTY_ID; 22009} 22010function isProfileParam(param) { 22011 return param.indexOf(PROFILE_PREFIX) !== -1; 22012} 22013function isPropertyToken(param) { 22014 return param === PROPERTY_TOKEN; 22015} 22016function isOrderId(param) { 22017 return param === ORDER_ID; 22018} 22019function isOrderTotal(param) { 22020 return param === ORDER_TOTAL; 22021} 22022function isProductPurchasedId(param) { 22023 return param === PRODUCT_PURCHASED_ID; 22024} 22025function isProductId(param) { 22026 return param === PRODUCT_ID; 22027} 22028function isCategoryId(param) { 22029 return param === CATEGORY_ID; 22030} 22031function isSpecialParam(param) { 22032 return ( 22033 isProfileParam(param) || 22034 isThirdPartyId(param) || 22035 isPropertyToken(param) || 22036 isOrderId(param) || 22037 isOrderTotal(param) || 22038 isProductPurchasedId(param) || 22039 isProductId(param) || 22040 isCategoryId(param) 22041 ); 22042} 22043function extractProfileParam(param) { 22044 return param.substring(PROFILE_PREFIX.length); 22045} 22046function getThirdPartyId(parameters) { 22047 return parameters[THIRD_PARTY_ID]; 22048} 22049function getPropertyToken(params) { 22050 return params[PROPERTY_TOKEN]; 22051} 22052function getOrderId(params) { 22053 return params[ORDER_ID]; 22054} 22055function getOrderTotal(params) { 22056 return params[ORDER_TOTAL]; 22057} 22058function getPurchasedProductIds(params) { 22059 var value = params[PRODUCT_PURCHASED_ID]; 22060 var result = map(trim, split(",", value)); 22061 return filter(isNotBlank, result); 22062} 22063function getProductId(params) { 22064 return params[PRODUCT_ID]; 22065} 22066function getCategoryId(params) { 22067 return params[CATEGORY_ID]; 22068} 22069function getParams() { 22070 var params = 22071 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 22072 return reduce( 22073 function(acc, value, key) { 22074 if (isSpecialParam(key)) { 22075 return acc; 22076 } 22077 acc[key] = isNil(value) ? "" : value; 22078 return acc; 22079 }, 22080 {}, 22081 params 22082 ); 22083} 22084function getProfileParams() { 22085 var params = 22086 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 22087 var prefixedKeys = 22088 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 22089 return reduce( 22090 function(acc, value, key) { 22091 var profileKey = prefixedKeys ? extractProfileParam(key) : key; 22092 if (prefixedKeys && !isProfileParam(key)) { 22093 return acc; 22094 } 22095 if (isBlank(profileKey)) { 22096 return acc; 22097 } 22098 acc[profileKey] = isNil(value) ? "" : value; 22099 return acc; 22100 }, 22101 {}, 22102 params 22103 ); 22104} 22105 22106var POST$1 = "POST"; 22107var NETWORK_ERROR$1 = "Network request failed"; 22108var REQUEST_TIMEOUT$1 = "Request timed out"; 22109var MALFORMED_RESPONSE = "Malformed response JSON"; 22110function addOnload$1(xhr, resolve, reject) { 22111 xhr.onload = function() { 22112 var status = xhr.status === 1223 ? 204 : xhr.status; 22113 if (status < 100 || status > 599) {
22114 reject(new Error(NETWORK_ERROR$1)); 22115 return; 22116 } 22117 var response; 22118 try { 22119 var startTime = performanceNow(); 22120 response = JSON.parse(xhr.responseText); 22121 response.parsingTime = performanceNow() - startTime; 22122 response.responseSize = new Blob([xhr.responseText]).size; 22123 } catch (e) { 22124 reject(new Error(MALFORMED_RESPONSE)); 22125 return; 22126 } 22127 var headers = xhr.getAllResponseHeaders(); 22128 resolve({ 22129 status: status, 22130 headers: headers, 22131 response: response 22132 }); 22133 }; 22134 return xhr; 22135} 22136function addOnerror$1(xhr, reject) { 22137 xhr.onerror = function() { 22138 reject(new Error(NETWORK_ERROR$1)); 22139 }; 22140 return xhr; 22141} 22142function addOntimeout$1(xhr, timeout, reject) { 22143 xhr.timeout = timeout; 22144 xhr.ontimeout = function() { 22145 reject(new Error(REQUEST_TIMEOUT$1)); 22146 }; 22147 return xhr; 22148} 22149function addHeaders$1(xhr) { 22150 var headers = 22151 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 22152 forEach(function(values, key) { 22153 if (!isArray(values)) { 22154 return; 22155 } 22156 forEach(function(value) { 22157 xhr.setRequestHeader(key, value); 22158 }, values); 22159 }, headers); 22160 return xhr; 22161} 22162function executeXhr(_ref) { 22163 var url = _ref.url, 22164 headers = _ref.headers, 22165 body = _ref.body, 22166 timeout = _ref.timeout, 22167 async = _ref.async; 22168 return create$1(function(resolve, reject) { 22169 var xhr = new window.XMLHttpRequest(); 22170 xhr = addOnload$1(xhr, resolve, reject); 22171 xhr = addOnerror$1(xhr, reject); 22172 xhr.open(POST$1, url, async); 22173 xhr.withCredentials = true; 22174 xhr = addHeaders$1(xhr, headers); 22175 if (async) { 22176 xhr = addOntimeout$1(xhr, timeout, reject); 22177 } 22178 xhr.send(JSON.stringify(body)); 22179 }).then(function(xhrResponse) { 22180 var response = xhrResponse.response; 22181 var status = response.status, 22182 message = response.message; 22183 if (!isNil(status) && !isNil(message)) { 22184 throw new Error(message); 22185 } 22186 return response; 22187 }); 22188} 22189 22190var EDGE_SERVER_PREFIX = "mboxedge"; 22191var EDGE_SERVER_DOMAIN = ".tt.omtrdc.net"; 22192function getRequestTimings(url, response) { 22193 if (!performance) { 22194 return null; 22195 } 22196 var resources = performance.getEntriesByType("resource"); 22197 var timings = resources.find(function(resource) { 22198 return resource.name.endsWith(url); 22199 }); 22200 if (!timings) { 22201 return null; 22202 } 22203 var requestTimings = {}; 22204 if (timings.domainLookupEnd && timings.domainLookupStart) { 22205 requestTimings.dns = timings.domainLookupEnd - timings.domainLookupStart; 22206 } 22207 if (timings.secureConnectionStart && timings.connectEnd) { 22208 requestTimings.tls = timings.connectEnd - timings.secureConnectionStart; 22209 } 22210 if (timings.responseStart) { 22211 requestTimings.timeToFirstByte = 22212 timings.responseStart - timings.requestStart; 22213 } 22214 if (timings.responseEnd && timings.responseStart) { 22215 requestTimings.download = timings.responseEnd - timings.responseStart; 22216 } 22217 if (timings.encodedBodySize) { 22218 requestTimings.responseSize = timings.encodedBodySize; 22219 } else if (response.responseSize) { 22220 requestTimings.responseSize = response.responseSize; 22221 delete response.responseSize; 22222 } 22223 return requestTimings; 22224} 22225function getTimeout(config, timeout) { 22226 if (!isNumber(timeout)) { 22227 return config[TIMEOUT$1]; 22228 } 22229 if (timeout < 0) { 22230 return config[TIMEOUT$1]; 22231 } 22232 return timeout; 22233} 22234function getServerDomain(config) { 22235 var serverDomain = config[SERVER_DOMAIN]; 22236 var overrideMboxEdgeServer = config[OVERRIDE_MBOX_EDGE_SERVER]; 22237 if (!overrideMboxEdgeServer) { 22238 return serverDomain; 22239 } 22240 var cluster = getEdgeCluster(); 22241 if (isBlank(cluster)) { 22242 return serverDomain; 22243 } 22244 return "" + EDGE_SERVER_PREFIX + cluster + EDGE_SERVER_DOMAIN; 22245} 22246function createRequestUrl(config) { 22247 var scheme = config[SCHEME]; 22248 var host = getServerDomain(config); 22249 var path = config[ENDPOINT]; 22250 var client = config[CLIENT_CODE]; 22251 var sessionId = getSessionId(); 22252 var version = config[VERSION]; 22253 var queryString = stringifyQueryString({ 22254 client: client, 22255 sessionId: sessionId, 22256 version: version 22257 });
22258 return scheme + "//" + host + path + "?" + queryString; 22259} 22260function executeDeliveryRequest( 22261 request, 22262 requestTimeout, 22263 telemetryDecisioningMethod 22264) { 22265 var config = getConfig(); 22266 var url = createRequestUrl(config); 22267 var headers = _defineProperty({}, CONTENT_TYPE, [TEXT_PLAIN]); 22268 var timeout = getTimeout(config, requestTimeout); 22269 var async = true; 22270 var options = { 22271 url: url, 22272 headers: headers, 22273 body: request, 22274 timeout: timeout, 22275 async: async 22276 }; 22277 perfTool.timeStart(request.requestId); 22278 return executeXhr(options).then(function(response) { 22279 var executionTime = perfTool.timeEnd(request.requestId); 22280 var telemetryEntry = { 22281 execution: executionTime, 22282 parsing: response.parsingTime 22283 }; 22284 delete response.parsingTime; 22285 var timings = getRequestTimings(url, response); 22286 if (timings) { 22287 telemetryEntry.request = timings; 22288 } 22289 if (response.telemetryServerToken) { 22290 telemetryEntry.telemetryServerToken = response.telemetryServerToken; 22291 } 22292 window.__target_telemetry.addDeliveryRequestEntry( 22293 request, 22294 telemetryEntry, 22295 response, 22296 telemetryDecisioningMethod 22297 ); 22298 return assign__default["default"](response, { 22299 decisioningMethod: DECISIONING_METHOD.SERVER_SIDE 22300 }); 22301 }); 22302} 22303 22304var notEmpty = function notEmpty(val) { 22305 return !isEmpty(val); 22306}; 22307var cachedImpressionId; 22308function throwIfOptout(values) { 22309 var optout = values[MCOPTOUT]; 22310 if (optout) { 22311 throw new Error(OPTOUT_MESSAGE); 22312 } 22313 return values; 22314} 22315function getAsyncThirdPartyData() { 22316 var visitorValues = getAsyncVisitorValues(); 22317 var dataProvidersParams = getAsyncDataProvidersParameters(); 22318 return all([visitorValues.then(throwIfOptout), dataProvidersParams]); 22319} 22320function getSyncThirdPartyData() { 22321 var visitorValues = getSyncVisitorValues(); 22322 var dataProvidersParams = getSyncDataProvidersParameters(); 22323 return [visitorValues, dataProvidersParams]; 22324} 22325function getAllParams(providersParams) { 22326 var config = getConfig(); 22327 var globalMbox = config[GLOBAL_MBOX_NAME]; 22328 return assign__default["default"]( 22329 {}, 22330 providersParams, 22331 getTargetPageParams(globalMbox) 22332 ); 22333} 22334function getTimeOffset() { 22335 return -new Date().getTimezoneOffset(); 22336} 22337function createScreen() { 22338 var screen = window$1.screen; 22339 return { 22340 width: screen.width, 22341 height: screen.height, 22342 orientation: getScreenOrientation(), 22343 colorDepth: screen.colorDepth, 22344 pixelRatio: getPixelRatio() 22345 }; 22346} 22347function createWindow() { 22348 var documentElement = document$1.documentElement; 22349 return { 22350 width: documentElement.clientWidth, 22351 height: documentElement.clientHeight 22352 }; 22353} 22354function createBrowser(config) { 22355 var location = window$1.location; 22356 if (!config[DEVICE_DETECTION_ENABLED]) { 22357 return { 22358 host: location.hostname 22359 }; 22360 } 22361 return { 22362 host: location.hostname, 22363 webGLRenderer: getWebGLRenderer() 22364 }; 22365} 22366function createAddress() { 22367 var location = window$1.location; 22368 return { 22369 url: location.href, 22370 referringUrl: document$1.referrer 22371 }; 22372} 22373function createContext(context) { 22374 if (!isNil(context) && context.channel === WEB_CHANNEL) { 22375 return context; 22376 } 22377 var config = getConfig(); 22378 var clientHints = getItem(CLIENT_HINTS) || {}; 22379 var validContext = context || {}; 22380 var beacon = validContext.beacon; 22381 return { 22382 userAgent: window$1.navigator.userAgent, 22383 clientHints: clientHints, 22384 timeOffsetInMinutes: getTimeOffset(), 22385 channel: WEB_CHANNEL, 22386 screen: createScreen(), 22387 window: createWindow(), 22388 browser: createBrowser(config), 22389 address: createAddress(), 22390 geo: context && context.geo, 22391 crossDomain: config[CROSS_DOMAIN], 22392 beacon: beacon 22393 }; 22394} 22395function createAudienceManager(audienceManager, visitorValues) { 22396 if (!isNil(audienceManager)) { 22397 return audienceManager; 22398 } 22399 var result = {}; 22400 if (isEmpty(visitorValues)) { 22401 return result; 22402 } 22403 var locationHint = visitorValues[MCAAMLH]; 22404 var locationHintNumber = parseInt(locationHint, 10); 22405 if (!isNaN(locationHintNumber)) { 22406 result.locationHint = locationHintNumber; 22407 } 22408 var blob = visitorValues[MCAAMB]; 22409 if (isNotBlank(blob)) { 22410 result.blob = blob; 22411 } 22412 return result; 22413} 22414function createCustomerId(data) { 22415 var id = data.id, 22416 integrationCode = data.integrationCode, 22417 authenticatedState = data.authenticatedState, 22418 type = data.type, 22419 primary = data.primary; 22420 var result = {}; 22421 if (isNotBlank(id)) { 22422 result.id = id; 22423 } 22424 if (isNotBlank(integrationCode)) { 22425 result.integrationCode = integrationCode; 22426 } 22427 if (isNotBlank(authenticatedState)) { 22428 result.authenticatedState = authenticatedState; 22429 } 22430 if (isNotBlank(type)) { 22431 result.type = type; 22432 } 22433 if (primary) { 22434 result.primary = primary; 22435 } 22436 return result; 22437} 22438function createCustomerIds(customerIdsValues) { 22439 return map(createCustomerId, customerIdsValues); 22440} 22441function createVisitorId( 22442 id, 22443 deviceId, 22444 thirdPartyId, 22445 visitorValues, 22446 customerIdsValues 22447) { 22448 var result = {}; 22449 if (isNotBlank(deviceId)) { 22450 result.tntId = deviceId; 22451 } 22452 if (isNotBlank(thirdPartyId)) { 22453 result.thirdPartyId = thirdPartyId; 22454 } 22455 if (isNotBlank(id.thirdPartyId)) { 22456 result.thirdPartyId = id.thirdPartyId; 22457 } 22458 var mid = visitorValues[MCMID];
22459 if (isNotBlank(mid)) { 22460 result.marketingCloudVisitorId = mid; 22461 } 22462 if (isNotBlank(id.marketingCloudVisitorId)) { 22463 result.marketingCloudVisitorId = id.marketingCloudVisitorId; 22464 } 22465 if (!isEmpty(id.customerIds)) { 22466 result.customerIds = id.customerIds; 22467 return result; 22468 } 22469 if (!isEmpty(customerIdsValues)) { 22470 result.customerIds = createCustomerIds(customerIdsValues); 22471 } 22472 return result; 22473} 22474function createExperienceCloud(experienceCloud, visitorValues) { 22475 var result = {}; 22476 var audienceManager = createAudienceManager( 22477 experienceCloud.audienceManager, 22478 visitorValues 22479 ); 22480 if (!isEmpty(audienceManager)) { 22481 result.audienceManager = audienceManager; 22482 } 22483 if (!isEmpty(experienceCloud.analytics)) { 22484 result.analytics = experienceCloud.analytics; 22485 } 22486 if (!isEmpty(experienceCloud.platform)) { 22487 result.platform = experienceCloud.platform; 22488 } 22489 return result; 22490} 22491function createProperty(property, allParams) { 22492 if (!isNil(property) && isNotBlank(property.token)) { 22493 return property; 22494 } 22495 var result = {}; 22496 var token = getPropertyToken(allParams); 22497 if (isNotBlank(token)) { 22498 result.token = token; 22499 } 22500 return result; 22501} 22502function createTrace(trace) { 22503 if (!isNil(trace) && isNotBlank(trace.authorizationToken)) { 22504 return trace; 22505 } 22506 var result = {}; 22507 var authorizationToken = getTraceToken(); 22508 if (isNotBlank(authorizationToken)) { 22509 result.authorizationToken = authorizationToken; 22510 } 22511 return result; 22512} 22513function createPreview(preview) { 22514 if (!isNil(preview)) { 22515 return preview; 22516 } 22517 return getPreview(); 22518} 22519function createQaMode(qaMode) { 22520 if (!isNil(qaMode)) { 22521 return qaMode; 22522 } 22523 return getQaMode(); 22524} 22525function createOrder(params) { 22526 var result = {}; 22527 var orderId = getOrderId(params); 22528 if (!isNil(orderId)) { 22529 result.id = orderId; 22530 } 22531 var orderTotal = getOrderTotal(params); 22532 var orderTotalNumber = parseFloat(orderTotal); 22533 if (!isNaN(orderTotalNumber)) { 22534 result.total = orderTotalNumber; 22535 } 22536 var purchasedProductIds = getPurchasedProductIds(params); 22537 if (!isEmpty(purchasedProductIds)) { 22538 result.purchasedProductIds = purchasedProductIds; 22539 } 22540 return result; 22541} 22542function createProduct(params) { 22543 var result = {}; 22544 var productId = getProductId(params); 22545 if (!isNil(productId)) { 22546 result.id = productId; 22547 } 22548 var categoryId = getCategoryId(params); 22549 if (!isNil(categoryId)) { 22550 result.categoryId = categoryId; 22551 } 22552 return result; 22553} 22554function createRequestDetails(item, allParams) { 22555 var result = {}; 22556 var params = assign__default["default"]( 22557 {}, 22558 getParams(allParams), 22559 getParams(item.parameters || {}) 22560 ); 22561 var profileParams = assign__default["default"]( 22562 {}, 22563 getProfileParams(allParams), 22564 getProfileParams(item.profileParameters || {}, false) 22565 ); 22566 var order = assign__default["default"]( 22567 {}, 22568 createOrder(allParams), 22569 item.order || {} 22570 ); 22571 var product = assign__default["default"]( 22572 {}, 22573 createProduct(allParams), 22574 item.product || {} 22575 ); 22576 if (!isEmpty(params)) { 22577 result.parameters = params; 22578 } 22579 if (!isEmpty(profileParams)) { 22580 result.profileParameters = profileParams; 22581 } 22582 if (!isEmpty(order)) { 22583 result.order = order; 22584 } 22585 if (!isEmpty(product)) { 22586 result.product = product; 22587 } 22588 return result; 22589} 22590function createMboxRequestDetails(item, allParams) { 22591 var providersParams = 22592 arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 22593 var config = getConfig(); 22594 var globalMbox = config[GLOBAL_MBOX_NAME]; 22595 var index = item.index, 22596 name = item.name, 22597 address = item.address; 22598 var params = assign__default["default"]( 22599 {}, 22600 name === globalMbox ? allParams : providersParams, 22601 getTargetPageParams(name) 22602 ); 22603 var result = createRequestDetails(item, params); 22604 if (!isNil(index)) { 22605 result.index = index; 22606 } 22607 if (isNotBlank(name)) { 22608 result.name = name; 22609 } 22610 if (!isEmpty(address)) { 22611 result.address = address; 22612 } 22613 return result; 22614} 22615function createViewRequestDetails(item, allParams) { 22616 var name = item.name, 22617 address = item.address;
22618 var result = createRequestDetails(item, allParams); 22619 if (isNotBlank(name)) { 22620 result.name = name; 22621 } 22622 if (!isEmpty(address)) { 22623 result.address = address; 22624 } 22625 return result; 22626} 22627function createExecute(request, allParams, providersParams) { 22628 var _request$execute = request.execute, 22629 execute = _request$execute === void 0 ? {} : _request$execute; 22630 var result = {}; 22631 if (isEmpty(execute)) { 22632 return result; 22633 } 22634 var pageLoad = execute.pageLoad; 22635 if (!isNil(pageLoad)) { 22636 result.pageLoad = createRequestDetails(pageLoad, allParams); 22637 } 22638 var mboxes = execute.mboxes; 22639 if (!isNil(mboxes) && isArray(mboxes) && !isEmpty(mboxes)) { 22640 var temp = filter( 22641 notEmpty, 22642 map(function(e) { 22643 return createMboxRequestDetails(e, allParams, providersParams); 22644 }, mboxes) 22645 ); 22646 if (!isEmpty(temp)) { 22647 result.mboxes = temp; 22648 } 22649 } 22650 return result; 22651} 22652function createPrefetch(request, allParams, providersParams) { 22653 var _request$prefetch = request.prefetch, 22654 prefetch = _request$prefetch === void 0 ? {} : _request$prefetch; 22655 var result = {}; 22656 if (isEmpty(prefetch)) { 22657 return result; 22658 } 22659 var mboxes = prefetch.mboxes; 22660 if (!isNil(mboxes) && isArray(mboxes) && !isEmpty(mboxes)) { 22661 result.mboxes = map(function(e) { 22662 return createMboxRequestDetails(e, allParams, providersParams); 22663 }, mboxes); 22664 } 22665 var views = prefetch.views; 22666 if (!isNil(views) && isArray(views) && !isEmpty(views)) { 22667 result.views = map(function(e) { 22668 return createViewRequestDetails(e, allParams); 22669 }, views); 22670 } 22671 return result; 22672} 22673function createAnalytics(consumerId, request) { 22674 if (shouldUseOptin() && !isAnalyticsApproved()) { 22675 return null; 22676 } 22677 var config = getConfig(); 22678 var sdid = getSdidVisitorValue(consumerId); 22679 var server = getVisitorProperty(TRACK_SERVER_PROP); 22680 var serverSecure = getVisitorProperty(TRACK_SERVER_SECURE_PROP); 22681 var _request$experienceCl = request.experienceCloud, 22682 experienceCloud = 22683 _request$experienceCl === void 0 ? {} : _request$experienceCl; 22684 var _experienceCloud$anal = experienceCloud.analytics, 22685 analytics = _experienceCloud$anal === void 0 ? {} : _experienceCloud$anal; 22686 var logging = analytics.logging, 22687 supplementalDataId = analytics.supplementalDataId, 22688 trackingServer = analytics.trackingServer, 22689 trackingServerSecure = analytics.trackingServerSecure; 22690 var result = {}; 22691 if (!isNil(logging)) { 22692 result.logging = logging; 22693 } else { 22694 result.logging = config[ANALYTICS_LOGGING]; 22695 } 22696 if (!isNil(supplementalDataId)) { 22697 result.supplementalDataId = supplementalDataId; 22698 } 22699 if (isNotBlank(sdid)) { 22700 result.supplementalDataId = sdid; 22701 } 22702 if (!isNil(trackingServer)) { 22703 result.trackingServer = trackingServer; 22704 } 22705 if (isNotBlank(server)) { 22706 result.trackingServer = server; 22707 } 22708 if (!isNil(trackingServerSecure)) { 22709 result.trackingServerSecure = trackingServerSecure; 22710 } 22711 if (isNotBlank(serverSecure)) { 22712 result.trackingServerSecure = serverSecure; 22713 } 22714 if (isEmpty(result)) { 22715 return null; 22716 } 22717 return result; 22718} 22719function createDeliveryRequest(request, visitorValues, providersParams) { 22720 var allParams = getAllParams(providersParams); 22721 var deviceId = getDeviceId(); 22722 var thirdPartyId = getThirdPartyId(allParams); 22723 var customerIdsValues = getCustomerIdsVisitorValues(); 22724 var visitorId = createVisitorId( 22725 request.id || {}, 22726 deviceId, 22727 thirdPartyId, 22728 visitorValues, 22729 customerIdsValues 22730 ); 22731 var property = createProperty(request.property, allParams); 22732 var experienceCloud = createExperienceCloud( 22733 request.experienceCloud || {}, 22734 visitorValues 22735 ); 22736 var trace = createTrace(request.trace); 22737 var preview = createPreview(request.preview); 22738 var qaMode = createQaMode(request.qaMode); 22739 var execute = createExecute(request, allParams, providersParams); 22740 var prefetch = createPrefetch(request, allParams, providersParams); 22741 var notifications = request.notifications; 22742 var result = {}; 22743 result.requestId = uuid(); 22744 result.context = createContext(request.context); 22745 if (!isEmpty(visitorId)) { 22746 result.id = visitorId; 22747 } 22748 if (!isEmpty(property)) { 22749 result.property = property; 22750 } 22751 if (!isEmpty(trace)) { 22752 result.trace = trace; 22753 } 22754 if (!isEmpty(experienceCloud)) { 22755 result.experienceCloud = experienceCloud; 22756 } 22757 if (!isEmpty(preview)) { 22758 result.preview = preview; 22759 } 22760 if (!isEmpty(qaMode)) { 22761 result.qaMode = qaMode; 22762 } 22763 if (!isEmpty(execute)) { 22764 result.execute = execute; 22765 } 22766 if (!isEmpty(prefetch)) { 22767 result.prefetch = prefetch; 22768 } 22769 if (!isEmpty(notifications)) { 22770 result.notifications = notifications; 22771 } 22772 result = window$1.__target_telemetry.addTelemetryToDeliveryRequest(result); 22773 return result; 22774} 22775function buildRequest(request, params, data) { 22776 var visitorValues = data[0]; 22777 var providersValues = data[1]; 22778 var providersParams = assign__default["default"]({}, providersValues, params); 22779 return createDeliveryRequest(request, visitorValues, providersParams); 22780} 22781function createAsyncDeliveryRequest(request, params) { 22782 var config = getConfig();
22783 return all([ 22784 getAsyncThirdPartyData(), 22785 getClientHints(getUserAgentData(), config[ALLOW_HIGH_ENTROPY_CLIENT_HINTS]) 22786 ]).then(function(_ref) { 22787 var _ref2 = _slicedToArray(_ref, 1), 22788 thirdPartyData = _ref2[0]; 22789 return buildRequest(request, params, thirdPartyData); 22790 }); 22791} 22792function createSyncDeliveryRequest(request, params) { 22793 var data = getSyncThirdPartyData(); 22794 return buildRequest(request, params, data); 22795} 22796function executeRequest(request, requestTimeout) { 22797 logDebug(REQUEST, request); 22798 addClientTrace({ 22799 request: request 22800 }); 22801 return executeDeliveryRequest( 22802 request, 22803 requestTimeout, 22804 DECISIONING_METHOD.SERVER_SIDE 22805 ).then(function(response) { 22806 logDebug(RESPONSE, response); 22807 addClientTrace({ 22808 response: response 22809 }); 22810 return { 22811 request: request, 22812 response: response 22813 }; 22814 }); 22815} 22816function getImpressionId(page) { 22817 if (!page && cachedImpressionId) { 22818 return cachedImpressionId; 22819 } 22820 cachedImpressionId = uuid(); 22821 return cachedImpressionId; 22822} 22823 22824var prop = function prop(key) { 22825 return function(obj) { 22826 return obj[key]; 22827 }; 22828}; 22829var not = function not(pred) { 22830 return function(val) { 22831 return !pred(val); 22832 }; 22833}; 22834var notNil = not(isNil); 22835var notBlank = not(isBlank); 22836var filterBy = function filterBy(pred) { 22837 return function(coll) { 22838 return filter(pred, coll); 22839 }; 22840}; 22841var isError = function isError(val) { 22842 return val.status === ERROR; 22843}; 22844var isActions = function isActions(val) { 22845 return val.type === ACTIONS; 22846}; 22847var isRedirect = function isRedirect(val) { 22848 return val.type === REDIRECT; 22849}; 22850var filterNotNil = filterBy(notNil); 22851var filterNotBlank = filterBy(notBlank); 22852var selectOptions = prop(OPTIONS); 22853var selectContent$1 = prop(CONTENT); 22854var selectEventToken = prop(EVENT_TOKEN); 22855var selectResponseTokens = prop(RESPONSE_TOKENS); 22856var hasName = function hasName(val) { 22857 return isNotBlank(val.name); 22858}; 22859var hasIndex = function hasIndex(val) { 22860 return !isNil(val.index); 22861}; 22862var isValidMbox = function isValidMbox(val) { 22863 return isObject(val) && hasName(val); 22864}; 22865var isValidPrefetchMbox = function isValidPrefetchMbox(val) { 22866 return isObject(val) && hasName(val) && hasIndex(val); 22867}; 22868var isValidView = function isValidView(val) { 22869 return isObject(val) && hasName(val); 22870}; 22871var hasSelector$1 = function hasSelector(val) { 22872 return isNotBlank(val.selector); 22873}; 22874var selectData = prop(DATA$1); 22875var hasData = flow([selectData, notNil]); 22876function createSuccess(type, data) { 22877 return { 22878 status: SUCCESS, 22879 type: type, 22880 data: data 22881 }; 22882} 22883function createError$1(type, data) { 22884 return { 22885 status: ERROR, 22886 type: type, 22887 data: data 22888 }; 22889} 22890function isValidOption$1(option) { 22891 return isObject(option); 22892} 22893function isValidOptionEventToken(option) { 22894 if (!isValidOption$1(option)) { 22895 return false; 22896 } 22897 return isNotBlank(option.eventToken); 22898} 22899function isValidMetric(metric) { 22900 if (isEmpty(metric) || isBlank(metric.type)) { 22901 return false; 22902 } 22903 return isNotBlank(metric.eventToken); 22904} 22905function isValidSelectorMetric(metric) { 22906 if (!isValidMetric(metric)) { 22907 return false; 22908 } 22909 return isNotBlank(metric.selector); 22910} 22911 22912function hasDeviceId(res) { 22913 var id = res.id; 22914 return isObject(id) && isNotBlank(id.tntId); 22915} 22916function handleDeviceId(context) { 22917 var response = context.response; 22918 if (hasDeviceId(response)) { 22919 setDeviceId(response.id.tntId); 22920 } 22921 return context; 22922} 22923 22924function handleEdgeCluster(context) { 22925 var response = context.response; 22926 if (hasDeviceId(response)) { 22927 var id = response.id; 22928 var tntId = id.tntId; 22929 setEdgeCluster(tntId); 22930 } 22931 setEdgeCluster(null); 22932 return context; 22933} 22934 22935function addTraceIfExists() { 22936 var item = 22937 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 22938 var trace = item.trace; 22939 if (!isEmpty(trace)) { 22940 addServerTrace(trace); 22941 } 22942} 22943function handleTraces(httpContext) { 22944 var response = httpContext.response; 22945 var _response$execute = response.execute, 22946 execute = _response$execute === void 0 ? {} : _response$execute, 22947 _response$prefetch = response.prefetch, 22948 prefetch = _response$prefetch === void 0 ? {}
22948 : _response$prefetch, 22949 _response$notificatio = response.notifications, 22950 notifications = 22951 _response$notificatio === void 0 ? {} : _response$notificatio; 22952 var _execute$pageLoad = execute.pageLoad, 22953 pageLoad = _execute$pageLoad === void 0 ? {} : _execute$pageLoad, 22954 _execute$mboxes = execute.mboxes, 22955 mboxes = _execute$mboxes === void 0 ? [] : _execute$mboxes; 22956 var _prefetch$mboxes = prefetch.mboxes, 22957 prefetchMboxes = _prefetch$mboxes === void 0 ? [] : _prefetch$mboxes, 22958 _prefetch$views = prefetch.views, 22959 views = _prefetch$views === void 0 ? [] : _prefetch$views; 22960 addTraceIfExists(pageLoad); 22961 forEach(addTraceIfExists, mboxes); 22962 forEach(addTraceIfExists, prefetchMboxes); 22963 forEach(addTraceIfExists, views); 22964 forEach(addTraceIfExists, notifications); 22965 return httpContext; 22966} 22967 22968var SDID_PARAM = "adobe_mc_sdid"; 22969function getRedirectUriParams(uri) { 22970 if (window.URL) { 22971 var _param = uri.searchParams.get(SDID_PARAM); 22972 if (!isString(_param) || isBlank(_param)) { 22973 return uri.search; 22974 } 22975 var _nowInSeconds = Math.round(now() / 1000); 22976 uri.searchParams.set( 22977 SDID_PARAM, 22978 _param.replace(/\|TS=\d+/, "|TS=" + _nowInSeconds) 22979 ); 22980 return uri.search; 22981 } 22982 var result = uri.queryKey; 22983 var param = result[SDID_PARAM]; 22984 if (!isString(param)) { 22985 return result; 22986 } 22987 if (isBlank(param)) { 22988 return result; 22989 } 22990 var nowInSeconds = Math.round(now() / 1000); 22991 result[SDID_PARAM] = param.replace(/\|TS=\d+/, "|TS=" + nowInSeconds); 22992 return result; 22993} 22994function getUriParams(uri) { 22995 if (window.URL) { 22996 return uri.search; 22997 } 22998 return uri.queryKey; 22999} 23000function createUrlInternal(url, params, uriParamsFunc) { 23001 if (window.URL) { 23002 var _parsedUri = new URL(url, window.location); 23003 _parsedUri.search = uriParamsFunc(_parsedUri);
23004 Object.entries(params).forEach(function(_ref) { 23005 var _ref2 = _slicedToArray(_ref, 2), 23006 k = _ref2[0], 23007 v = _ref2[1]; 23008 _parsedUri.searchParams.set(k, v); 23009 }); 23010 return _parsedUri.href; 23011 } 23012 var parsedUri = parseUri(url); 23013 var protocol = parsedUri.protocol; 23014 var host = parsedUri.host; 23015 var path = parsedUri.path; 23016 var port = parsedUri.port === "" ? "" : ":" + parsedUri.port; 23017 var anchor = isBlank(parsedUri.anchor) ? "" : "#" + parsedUri.anchor; 23018 var uriParams = uriParamsFunc(parsedUri); 23019 var queryString = stringifyQueryString( 23020 assign__default["default"]({}, uriParams, params) 23021 ); 23022 var query = isBlank(queryString) ? "" : "?" + queryString; 23023 return protocol + "://" + host + port + path + query + anchor; 23024} 23025function createRedirectUrl(url, params) { 23026 return createUrlInternal(url, params, getRedirectUriParams); 23027} 23028function createUrl(url, params) { 23029 return createUrlInternal(url, params, getUriParams); 23030} 23031 23032function createRedirectOption(option) { 23033 var url = option.content; 23034 if (isBlank(url)) { 23035 logDebug(EMPTY_URL, option); 23036 return null; 23037 } 23038 var result = assign__default["default"]({}, option); 23039 result.content = createRedirectUrl(url, {}); 23040 return result; 23041} 23042 23043var NETWORK_ERROR = "Network request failed"; 23044var REQUEST_TIMEOUT = "Request timed out"; 23045var URL_REQUIRED = "URL is required"; 23046var GET = "GET"; 23047var POST = "POST"; 23048var METHOD = "method"; 23049var URL$1 = "url"; 23050var HEADERS = "headers"; 23051var DATA = "data"; 23052var CREDENTIALS = "credentials"; 23053var TIMEOUT = "timeout"; 23054var ASYNC = "async"; 23055function throwError(message) { 23056 throw new Error(message); 23057} 23058function processOptions$2(options) { 23059 var method = options[METHOD] || GET; 23060 var url = options[URL$1] || throwError(URL_REQUIRED); 23061 var headers = options[HEADERS] || {}; 23062 var data = options[DATA] || null; 23063 var credentials = options[CREDENTIALS] || false; 23064 var timeout = options[TIMEOUT] || 3000; 23065 var async = isNil(options[ASYNC]) ? true : options[ASYNC] === true; 23066 var result = {}; 23067 result[METHOD] = method; 23068 result[URL$1] = url; 23069 result[HEADERS] = headers; 23070 result[DATA] = data; 23071 result[CREDENTIALS] = credentials; 23072 result[TIMEOUT] = timeout; 23073 result[ASYNC] = async; 23074 return result; 23075} 23076function addOnload(xhr, resolve, reject) { 23077 xhr.onload = function() { 23078 var status = xhr.status === 1223 ? 204 : xhr.status; 23079 if (status < 100 || status > 599) { 23080 reject(new Error(NETWORK_ERROR)); 23081 return; 23082 } 23083 var response = xhr.responseText; 23084 var headers = xhr.getAllResponseHeaders(); 23085 var result = { 23086 status: status, 23087 headers: headers, 23088 response: response 23089 }; 23090 resolve(result); 23091 }; 23092 return xhr; 23093} 23094function addOnerror(xhr, reject) { 23095 xhr.onerror = function() { 23096 reject(new Error(NETWORK_ERROR)); 23097 }; 23098 return xhr; 23099} 23100function addOntimeout(xhr, timeout, reject) { 23101 xhr.timeout = timeout; 23102 xhr.ontimeout = function() { 23103 reject(new Error(REQUEST_TIMEOUT)); 23104 }; 23105 return xhr; 23106} 23107function addCredentials(xhr, credentials) { 23108 if (credentials === true) { 23109 xhr.withCredentials = credentials; 23110 } 23111 return xhr; 23112} 23113function addHeaders(xhr, headers) { 23114 forEach(function(value, key) { 23115 forEach(function(v) { 23116 return xhr.setRequestHeader(key, v); 23117 }, value); 23118 }, headers); 23119 return xhr; 23120} 23121function createXhrPromise(win, opts) { 23122 var options = processOptions$2(opts); 23123 var method = options[METHOD]; 23124 var url = options[URL$1]; 23125 var headers = options[HEADERS]; 23126 var data = options[DATA]; 23127 var credentials = options[CREDENTIALS]; 23128 var timeout = options[TIMEOUT]; 23129 var async = options[ASYNC]; 23130 return create$1(function(resolve, reject) { 23131 var xhr = new win.XMLHttpRequest(); 23132 xhr = addOnload(xhr, resolve, reject); 23133 xhr = addOnerror(xhr, reject); 23134 xhr.open(method, url, async); 23135 xhr = addCredentials(xhr, credentials); 23136 xhr = addHeaders(xhr, headers); 23137 if (async) { 23138 xhr = addOntimeout(xhr, timeout, reject); 23139 } 23140 xhr.send(data); 23141 }); 23142} 23143 23144function xhr(options) { 23145 return createXhrPromise(window$1, options); 23146} 23147 23148function createOptions(url, params, timeout) { 23149 var result = {}; 23150 result[METHOD] = GET; 23151 result[URL$1] = createUrl(url, params); 23152 result[TIMEOUT] = timeout; 23153 return result; 23154} 23155function isSuccess(status) { 23156 return (status >= 200 && status < 300) || status === 304; 23157} 23158function createOption(res) { 23159 var status = res.status; 23160 if (!isSuccess(status)) { 23161 return null; 23162 } 23163 var content = res.response; 23164 if (isBlank(content)) { 23165 return null; 23166 } 23167 var result = {}; 23168 result.type = HTML; 23169 result.content = content; 23170 return result; 23171} 23172function createHtmlOption(option) { 23173 var content = option.content; 23174 var config = getConfig(); 23175 var timeout = config[TIMEOUT]; 23176 return xhr(createOptions(content, {}, timeout)) 23177 .then(createOption) 23178 ["catch"](function() { 23179 return null; 23180 }); 23181} 23182 23183var CLICK_TRACK_PATTERN = /CLKTRK#(\S+)/; 23184var CLICK_TRACK_REPLACE_PATTERN = /CLKTRK#(\S+)\s/; 23185function getClickTrackNodeId(action) { 23186 var selector = action[SELECTOR]; 23187 if (isBlank(selector)) { 23188 return ""; 23189 } 23190 var result = CLICK_TRACK_PATTERN.exec(selector); 23191 if (isEmpty(result) || result.length !== 2) { 23192 return ""; 23193 } 23194 return result[1]; 23195} 23196function getContent(id, content) { 23197 var div = document.createElement(DIV_TAG); 23198 div.innerHTML = content; 23199 var firstElement = div.firstElementChild; 23200 if (isNil(firstElement)) { 23201 return content; 23202 } 23203 firstElement.id = id; 23204 return firstElement.outerHTML; 23205} 23206function processClickTrackId(action) { 23207 var content = action[CONTENT]; 23208 var nodeId = getClickTrackNodeId(action); 23209 if (isBlank(nodeId) || isBlank(content)) { 23210 return action; 23211 } 23212 var selector = action[SELECTOR]; 23213 action[SELECTOR] = selector.replace(CLICK_TRACK_REPLACE_PATTERN, ""); 23214 action[CONTENT] = getContent(nodeId, content); 23215 return action; 23216} 23217 23218var notNull = function notNull(val) { 23219 return !isNil(val); 23220}; 23221function hasSelector(action) { 23222 var selector = action.selector; 23223 return !isNil(selector); 23224} 23225function setHtml$2(action) { 23226 if (!hasSelector(action)) { 23227 return null; 23228 } 23229 var result = processClickTrackId(action); 23230 var content = result[CONTENT]; 23231 if (!isString(content)) { 23232 logDebug(EMPTY_CONTENT, result); 23233 return null; 23234 } 23235 return result; 23236} 23237function setText$3(action) { 23238 if (!hasSelector(action)) { 23239 return null; 23240 } 23241 var result = processClickTrackId(action); 23242 var content = result[CONTENT]; 23243 if (!isString(content)) { 23244 logDebug(EMPTY_CONTENT, result); 23245 return null; 23246 } 23247 return result; 23248} 23249function appendHtml$2(action) { 23250 if (!hasSelector(action)) { 23251 return null; 23252 } 23253 var result = processClickTrackId(action); 23254 var content = result[CONTENT]; 23255 if (!isString(content)) { 23256 logDebug(EMPTY_CONTENT, result); 23257 return null; 23258 } 23259 return result; 23260} 23261function prependHtml$2(action) { 23262 if (!hasSelector(action)) { 23263 return null; 23264 } 23265 var result = processClickTrackId(action); 23266 var content = result[CONTENT]; 23267 if (!isString(content)) { 23268 logDebug(EMPTY_CONTENT, result); 23269 return null; 23270 } 23271 return result; 23272} 23273function replaceHtml$2(action) { 23274 if (!hasSelector(action)) { 23275 return null; 23276 } 23277 var result = processClickTrackId(action); 23278 var content = result[CONTENT]; 23279 if (!isString(content)) { 23280 logDebug(EMPTY_CONTENT, result); 23281 return null; 23282 } 23283 return result; 23284} 23285function insertBefore$3(action) { 23286 if (!hasSelector(action)) { 23287 return null; 23288 } 23289 var result = processClickTrackId(action); 23290 var content = result[CONTENT]; 23291 if (!isString(content)) { 23292 logDebug(EMPTY_CONTENT, result); 23293 return null; 23294 } 23295 return result; 23296} 23297function insertAfter$3(action) { 23298 if (!hasSelector(action)) { 23299 return null; 23300 } 23301 var result = processClickTrackId(action); 23302 var content = result[CONTENT]; 23303 if (!isString(content)) { 23304 logDebug(EMPTY_CONTENT, result); 23305 return null; 23306 } 23307 return result; 23308} 23309function customCode$3(action) { 23310 if (!hasSelector(action)) { 23311 return null; 23312 } 23313 var content = action[CONTENT]; 23314 if (!isString(content)) { 23315 logDebug(EMPTY_CONTENT, action); 23316 return null; 23317 } 23318 return action; 23319} 23320function setAttribute$3(action) { 23321 if (!hasSelector(action)) { 23322 return null; 23323 } 23324 var content = action[CONTENT]; 23325 if (!isObject(content)) { 23326 logDebug(EMPTY_ATTRIBUTE, action); 23327 return null; 23328 } 23329 return action; 23330} 23331function setImageSource$2(action) { 23332 if (!hasSelector(action)) { 23333 return null; 23334 } 23335 var content = action[CONTENT]; 23336 if (!isString(content)) { 23337 logDebug(EMPTY_IMAGE_URL, action); 23338 return null; 23339 } 23340 return action; 23341} 23342function setStyle$3(action) { 23343 if (!hasSelector(action)) { 23344 return null; 23345 } 23346 var content = action[CONTENT]; 23347 if (!isObject(content)) { 23348 logDebug(EMPTY_PROPERTY, action); 23349 return null; 23350 } 23351 return action; 23352} 23353function resize$2(action) { 23354 if (!hasSelector(action)) { 23355 return null; 23356 } 23357 var content = action[CONTENT]; 23358 if (!isObject(content)) { 23359 logDebug(EMPTY_SIZES, action); 23360 return null; 23361 } 23362 return action; 23363} 23364function move$2(action) { 23365 if (!hasSelector(action)) { 23366 return null; 23367 } 23368 var content = action[CONTENT]; 23369 if (!isObject(content)) { 23370 logDebug(EMPTY_COORDINATES, action); 23371 return null; 23372 } 23373 return action; 23374} 23375function remove$3(action) { 23376 if (!hasSelector(action)) { 23377 return null; 23378 } 23379 return action; 23380} 23381function rearrange$3(action) { 23382 if (!hasSelector(action)) { 23383 return null; 23384 } 23385 var content = action[CONTENT]; 23386 if (!isObject(content)) { 23387 logDebug(EMPTY_REARRANGE, action); 23388 return null; 23389 } 23390 return action; 23391} 23392function redirect$2(action) { 23393 var content = action.content; 23394 if (isBlank(content)) { 23395 logDebug(EMPTY_URL, action); 23396 return null; 23397 } 23398 action.content = createRedirectUrl(content, {}); 23399 return action; 23400} 23401function processAction(action) { 23402 var type = action[TYPE]; 23403 if (isBlank(type)) { 23404 return null; 23405 } 23406 switch (type) { 23407 case SET_HTML: 23408 return setHtml$2(action); 23409 case SET_TEXT: 23410 return setText$3(action); 23411 case APPEND_HTML: 23412 return appendHtml$2(action); 23413 case PREPEND_HTML: 23414 return prependHtml$2(action); 23415 case REPLACE_HTML: 23416 return replaceHtml$2(action); 23417 case INSERT_BEFORE: 23418 return insertBefore$3(action); 23419 case INSERT_AFTER: 23420 return insertAfter$3(action); 23421 case CUSTOM_CODE: 23422 return customCode$3(action); 23423 case SET_ATTRIBUTE: 23424 return setAttribute$3(action); 23425 case SET_IMAGE_SOURCE: 23426 return setImageSource$2(action); 23427 case SET_STYLE: 23428 return setStyle$3(action); 23429 case RESIZE: 23430 return resize$2(action); 23431 case MOVE: 23432 return move$2(action); 23433 case REMOVE: 23434 return remove$3(action); 23435 case REARRANGE: 23436 return rearrange$3(action); 23437 case REDIRECT: 23438 return redirect$2(action); 23439 default: 23440 return null; 23441 } 23442} 23443function createActionsOption(option) { 23444 var actions = option[CONTENT]; 23445 if (!isArray(actions)) { 23446 return null; 23447 } 23448 if (isEmpty(actions)) { 23449 return null; 23450 } 23451 var processedActions = filter(notNull, map(processAction, actions)); 23452 if (isEmpty(processedActions)) { 23453 return null; 23454 } 23455 var result = assign__default["default"]({}, option); 23456 result.content = processedActions; 23457 return result; 23458} 23459 23460function getTokens() { 23461 var value = 23462 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 23463 var options = value.options; 23464 if (!isArray(options)) { 23465 return []; 23466 } 23467 if (isEmpty(options)) { 23468 return []; 23469 } 23470 return filterNotNil(map(selectResponseTokens, options)); 23471} 23472function getResponseTokens() { 23473 var response = 23474 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 23475 var _response$execute = response.execute, 23476 execute = _response$execute === void 0 ? {}
23476 : _response$execute, 23477 _response$prefetch = response.prefetch, 23478 prefetch = _response$prefetch === void 0 ? {} : _response$prefetch; 23479 var _execute$pageLoad = execute.pageLoad, 23480 pageLoad = _execute$pageLoad === void 0 ? {} : _execute$pageLoad, 23481 _execute$mboxes = execute.mboxes, 23482 mboxes = _execute$mboxes === void 0 ? [] : _execute$mboxes; 23483 var _prefetch$mboxes = prefetch.mboxes, 23484 prefetchMboxes = _prefetch$mboxes === void 0 ? [] : _prefetch$mboxes, 23485 _prefetch$views = prefetch.views, 23486 views = _prefetch$views === void 0 ? [] : _prefetch$views; 23487 var pageLoadTokens = getTokens(pageLoad); 23488 var mboxesTokens = flatten(map(getTokens, mboxes)); 23489 var prefetchMboxesTokens = flatten(map(getTokens, prefetchMboxes)); 23490 var viewsTokens = flatten(map(getTokens, views)); 23491 return flatten([ 23492 pageLoadTokens, 23493 mboxesTokens, 23494 prefetchMboxesTokens, 23495 viewsTokens 23496 ]); 23497} 23498 23499function getRedirect() { 23500 var response = 23501 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 23502 var _response$execute = response.execute, 23503 execute = _response$execute === void 0 ? {} : _response$execute; 23504 var _execute$pageLoad = execute.pageLoad, 23505 pageLoad = _execute$pageLoad === void 0 ? {} : _execute$pageLoad, 23506 _execute$mboxes = execute.mboxes, 23507 mboxes = _execute$mboxes === void 0 ? [] : _execute$mboxes; 23508 var pageLoadOpts = selectOptions(pageLoad) || []; 23509 var mboxesOpts = flatten(filterNotNil(map(selectOptions, mboxes))); 23510 var options = flatten([pageLoadOpts, mboxesOpts]); 23511 var actions = flatten(map(selectContent$1, filter(isActions, options))); 23512 var redirectOptions = filter(isRedirect, options); 23513 var redirectActions = filter(isRedirect, actions); 23514 var redirects = redirectOptions.concat(redirectActions); 23515 var result = {}; 23516 if (isEmpty(redirects)) { 23517 return result; 23518 } 23519 var redirect = redirects[0]; 23520 var url = redirect.content; 23521 if (isBlank(url)) { 23522 return result; 23523 } 23524 result.url = url; 23525 return result; 23526} 23527 23528function getAnalytics() { 23529 var item = 23530 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 23531 var analytics = item.analytics; 23532 return isEmpty(analytics) ? [] : [analytics]; 23533} 23534function getAnalyticsDetails() { 23535 var response = 23536 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 23537 var _response$execute = response.execute, 23538 execute = _response$execute === void 0 ? {} : _response$execute, 23539 _response$prefetch = response.prefetch, 23540 prefetch = _response$prefetch === void 0 ? {} : _response$prefetch; 23541 var _execute$pageLoad = execute.pageLoad, 23542 pageLoad = _execute$pageLoad === void 0 ? {} : _execute$pageLoad, 23543 _execute$mboxes = execute.mboxes, 23544 mboxes = _execute$mboxes === void 0 ? [] : _execute$mboxes; 23545 var _prefetch$mboxes = prefetch.mboxes, 23546 prefetchMboxes = _prefetch$mboxes === void 0 ? [] : _prefetch$mboxes, 23547 _prefetch$views = prefetch.views, 23548 views = _prefetch$views === void 0 ? [] : _prefetch$views, 23549 _prefetch$metrics = prefetch.metrics, 23550 metrics = _prefetch$metrics === void 0 ? [] : _prefetch$metrics; 23551 var pageLoadDetails = getAnalytics(pageLoad); 23552 var mboxesDetails = flatten(map(getAnalytics, mboxes)); 23553 var prefetchMboxesDetails = flatten(map(getAnalytics, prefetchMboxes)); 23554 var viewsDetails = flatten(map(getAnalytics, views)); 23555 var prefetchMetrics = flatten(map(getAnalytics, metrics)); 23556 return flatten([ 23557 pageLoadDetails, 23558 mboxesDetails, 23559 prefetchMboxesDetails, 23560 viewsDetails, 23561 prefetchMetrics 23562 ]); 23563} 23564 23565function addContextDetails(to, from) { 23566 to.parameters = from.parameters; 23567 to.profileParameters = from.profileParameters; 23568 to.order = from.order; 23569 to.product = from.product; 23570} 23571function addOptionsAndMetrics(result, arr) { 23572 var options = arr[0]; 23573 var metrics = arr[1]; 23574 var hasOptions = !isEmpty(options); 23575 var hasMetrics = !isEmpty(metrics); 23576 if (!hasOptions && !hasMetrics) { 23577 return result; 23578 } 23579 if (hasOptions) { 23580 result.options = options; 23581 } 23582 if (hasMetrics) { 23583 result.metrics = metrics; 23584 } 23585 return result; 23586} 23587function processOption(option) { 23588 var type = option.type; 23589 switch (type) { 23590 case REDIRECT: 23591 return resolve(createRedirectOption(option)); 23592 case DYNAMIC: 23593 return createHtmlOption(option); 23594 case ACTIONS: 23595 return resolve(createActionsOption(option)); 23596 default: 23597 return resolve(option); 23598 } 23599} 23600function processOptions$1(options, predicate) { 23601 if (!isArray(options)) { 23602 return resolve([]); 23603 } 23604 if (isEmpty(options)) { 23605 return resolve([]); 23606 }
23607 var validOptions = filter(predicate, options); 23608 if (isEmpty(validOptions)) { 23609 return resolve([]); 23610 } 23611 var optionsPromises = map(function(opt) { 23612 return processOption(opt); 23613 }, validOptions); 23614 return all(optionsPromises).then(filterNotNil); 23615} 23616function processMetrics$2(metrics, predicate) { 23617 if (!isArray(metrics)) { 23618 return resolve([]); 23619 } 23620 if (isEmpty(metrics)) { 23621 return resolve([]); 23622 } 23623 return resolve(filter(predicate, metrics)); 23624} 23625function processPageLoad(httpContext) { 23626 var response = httpContext.response; 23627 var execute = response.execute; 23628 if (!isObject(execute)) { 23629 return resolve(null); 23630 } 23631 var pageLoad = execute.pageLoad; 23632 if (!isObject(pageLoad)) { 23633 return resolve(null); 23634 } 23635 var analytics = pageLoad.analytics, 23636 options = pageLoad.options, 23637 metrics = pageLoad.metrics; 23638 var result = !isEmpty(analytics) 23639 ? { 23640 analytics: analytics 23641 } 23642 : {}; 23643 return all([ 23644 processOptions$1(options, isValidOption$1), 23645 processMetrics$2(metrics, isValidSelectorMetric) 23646 ]).then(function(arr) { 23647 return addOptionsAndMetrics(result, arr); 23648 }); 23649} 23650function processExecuteMbox(item) { 23651 var name = item.name, 23652 analytics = item.analytics, 23653 options = item.options, 23654 metrics = item.metrics; 23655 var result = { 23656 name: name, 23657 analytics: analytics 23658 }; 23659 return all([ 23660 processOptions$1(options, isValidOption$1), 23661 processMetrics$2(metrics, isValidMetric) 23662 ]).then(function(arr) { 23663 return addOptionsAndMetrics(result, arr); 23664 }); 23665} 23666function processExecuteMboxes(httpContext) { 23667 var response = httpContext.response; 23668 var execute = response.execute; 23669 if (!isObject(execute)) { 23670 return resolve([]); 23671 } 23672 var mboxes = execute.mboxes; 23673 if (!isArray(mboxes) || isEmpty(mboxes)) { 23674 return resolve([]); 23675 }
23676 var validMboxes = filter(isValidMbox, mboxes); 23677 return all(map(processExecuteMbox, validMboxes)).then(filterNotNil); 23678} 23679function sameMbox(mbox, index, name) { 23680 return mbox.index === index && mbox.name === name; 23681} 23682function getRequestMbox(request, index, name) { 23683 var _request$prefetch = request.prefetch, 23684 prefetch = _request$prefetch === void 0 ? {} : _request$prefetch; 23685 var _prefetch$mboxes = prefetch.mboxes, 23686 mboxes = _prefetch$mboxes === void 0 ? [] : _prefetch$mboxes; 23687 if (isEmpty(mboxes)) { 23688 return null; 23689 } 23690 return first( 23691 filter(function(item) { 23692 return sameMbox(item, index, name); 23693 }, mboxes) 23694 ); 23695} 23696function processPrefetchMbox(request, item) { 23697 var index = item.index, 23698 name = item.name, 23699 state = item.state, 23700 analytics = item.analytics, 23701 options = item.options, 23702 metrics = item.metrics; 23703 var requestMbox = getRequestMbox(request, index, name); 23704 var result = { 23705 name: name, 23706 state: state, 23707 analytics: analytics 23708 }; 23709 if (!isNil(requestMbox)) { 23710 addContextDetails(result, requestMbox); 23711 } 23712 return all([ 23713 processOptions$1(options, isValidOptionEventToken), 23714 processMetrics$2(metrics, isValidMetric) 23715 ]).then(function(arr) { 23716 return addOptionsAndMetrics(result, arr); 23717 }); 23718} 23719function processPrefetchMboxes(httpContext) { 23720 var request = httpContext.request, 23721 response = httpContext.response; 23722 var prefetch = response.prefetch; 23723 if (!isObject(prefetch)) { 23724 return resolve([]); 23725 } 23726 var mboxes = prefetch.mboxes; 23727 if (!isArray(mboxes) || isEmpty(mboxes)) { 23728 return resolve([]); 23729 }
23730 var validMboxes = filter(isValidPrefetchMbox, mboxes); 23731 var process = function process(item) { 23732 return processPrefetchMbox(request, item); 23733 }; 23734 return all(map(process, validMboxes)).then(filterNotNil); 23735} 23736function getRequestView(request) { 23737 var _request$prefetch2 = request.prefetch, 23738 prefetch = _request$prefetch2 === void 0 ? {} : _request$prefetch2; 23739 var _prefetch$views = prefetch.views, 23740 views = _prefetch$views === void 0 ? [] : _prefetch$views; 23741 if (isEmpty(views)) { 23742 return null; 23743 } 23744 return views[0]; 23745} 23746function processView(request, view) { 23747 var name = view.name, 23748 state = view.state, 23749 analytics = view.analytics, 23750 options = view.options, 23751 metrics = view.metrics; 23752 var requestView = getRequestView(request); 23753 var result = { 23754 name: name.toLowerCase(), 23755 state: state, 23756 analytics: analytics 23757 }; 23758 if (!isNil(requestView)) { 23759 addContextDetails(result, requestView); 23760 } 23761 return all([ 23762 processOptions$1(options, isValidOptionEventToken), 23763 processMetrics$2(metrics, isValidSelectorMetric) 23764 ]).then(function(arr) { 23765 return addOptionsAndMetrics(result, arr); 23766 }); 23767} 23768function processPrefetchViews(httpContext) { 23769 var request = httpContext.request, 23770 response = httpContext.response; 23771 var prefetch = response.prefetch; 23772 if (!isObject(prefetch)) { 23773 return resolve([]); 23774 } 23775 var views = prefetch.views; 23776 if (!isArray(views) || isEmpty(views)) { 23777 return resolve([]); 23778 }
23779 var validViews = filter(isValidView, views); 23780 var process = function process(view) { 23781 return processView(request, view); 23782 }; 23783 return all(map(process, validViews)).then(filterNotNil); 23784} 23785function processPrefetchMetrics(httpContext) { 23786 var response = httpContext.response; 23787 var prefetch = response.prefetch; 23788 if (!isObject(prefetch)) { 23789 return resolve([]); 23790 } 23791 var metrics = prefetch.metrics; 23792 return processMetrics$2(metrics, isValidSelectorMetric); 23793} 23794function processMeta(httpContext) { 23795 var response = httpContext.response; 23796 var remoteMboxes = response.remoteMboxes, 23797 remoteViews = response.remoteViews, 23798 decisioningMethod = response.decisioningMethod; 23799 var meta = {}; 23800 if (isObject(remoteMboxes)) { 23801 meta.remoteMboxes = remoteMboxes; 23802 } 23803 if (isObject(remoteViews)) { 23804 meta.remoteViews = remoteViews; 23805 } 23806 if (isString(decisioningMethod)) { 23807 meta.decisioningMethod = decisioningMethod; 23808 } 23809 return resolve(meta); 23810} 23811function processNotification(notification) { 23812 if (isNil(notification) || isBlank(notification.id)) { 23813 return resolve(null); 23814 } 23815 var id = notification.id; 23816 return resolve({ 23817 id: id 23818 }); 23819} 23820function processNotifications(httpContext) { 23821 var response = httpContext.response; 23822 var notifications = response.notifications; 23823 if (!isArray(notifications)) { 23824 return resolve([]); 23825 } 23826 return all(map(processNotification, notifications)).then(filterNotNil); 23827} 23828function createResponseContext(arr) { 23829 var pageLoad = arr[0]; 23830 var mboxes = arr[1]; 23831 var prefetchMboxes = arr[2]; 23832 var views = arr[3]; 23833 var prefetchMetrics = arr[4]; 23834 var meta = arr[5]; 23835 var notifications = arr[6]; 23836 var result = {}; 23837 var execute = {}; 23838 if (isObject(pageLoad)) { 23839 execute.pageLoad = pageLoad; 23840 } 23841 if (!isEmpty(mboxes)) { 23842 execute.mboxes = mboxes; 23843 } 23844 var prefetch = {}; 23845 if (!isEmpty(prefetchMboxes)) { 23846 prefetch.mboxes = prefetchMboxes; 23847 } 23848 if (!isEmpty(views)) { 23849 prefetch.views = views; 23850 } 23851 if (!isEmpty(prefetchMetrics)) { 23852 prefetch.metrics = prefetchMetrics; 23853 } 23854 if (!isEmpty(execute)) { 23855 result.execute = execute; 23856 } 23857 if (!isEmpty(prefetch)) { 23858 result.prefetch = prefetch; 23859 } 23860 if (!isEmpty(meta)) { 23861 result.meta = meta; 23862 } 23863 if (!isEmpty(notifications)) { 23864 result.notifications = notifications; 23865 } 23866 return result; 23867} 23868function processResponse(httpContext) { 23869 var handlers = [handleTraces, handleDeviceId, handleEdgeCluster]; 23870 var context = flow(handlers)(httpContext); 23871 var pageLoad = processPageLoad(context); 23872 var mboxes = processExecuteMboxes(context); 23873 var prefetchMboxes = processPrefetchMboxes(context); 23874 var views = processPrefetchViews(context); 23875 var prefetchMetrics = processPrefetchMetrics(context); 23876 var meta = processMeta(context); 23877 var notifications = processNotifications(context); 23878 var promises = [ 23879 pageLoad, 23880 mboxes, 23881 prefetchMboxes, 23882 views, 23883 prefetchMetrics, 23884 meta, 23885 notifications 23886 ]; 23887 return all(promises).then(createResponseContext); 23888} 23889 23890function hasRedirect(response) { 23891 var redirect = getRedirect(response); 23892 return !isEmpty(redirect); 23893} 23894function createEventPayload(response) { 23895 var responseTokens = getResponseTokens(response); 23896 var payload = {}; 23897 if (!isEmpty(responseTokens)) { 23898 payload.responseTokens = responseTokens; 23899 } 23900 return payload; 23901} 23902 23903function createPlatform(config) { 23904 var sandboxId = config[AEP_SANDBOX_ID]; 23905 var sandboxName = config[AEP_SANDBOX_NAME]; 23906 var platform = {}; 23907 if (!isEmpty(sandboxId)) { 23908 platform.sandboxId = sandboxId; 23909 } 23910 if (!isEmpty(sandboxName)) { 23911 platform.sandboxName = sandboxName; 23912 } 23913 return platform; 23914} 23915 23916function handleRequestSuccess$1(response) { 23917 var payload = createEventPayload(response); 23918 var analyticsDetails = getAnalyticsDetails(response); 23919 if (!isEmpty(analyticsDetails)) {
23920 payload.analyticsDetails = analyticsDetails; 23921 } 23922 logDebug(REQUEST_SUCCEEDED$1, response); 23923 notifyRequestSucceeded(payload, hasRedirect(response)); 23924 return resolve(response); 23925} 23926function handleMboxRequestSuccess(mbox, response) { 23927 var payload = createEventPayload(response); 23928 payload.mbox = mbox; 23929 var analyticsDetails = getAnalyticsDetails(response); 23930 if (!isEmpty(analyticsDetails)) { 23931 payload.analyticsDetails = analyticsDetails; 23932 } 23933 logDebug(REQUEST_SUCCEEDED$1, response); 23934 notifyRequestSucceeded(payload, hasRedirect(response)); 23935 return resolve(response); 23936} 23937function handleRequestError$1(error) { 23938 logWarn(REQUEST_FAILED$1, error); 23939 notifyRequestFailed({ 23940 error: error 23941 }); 23942 return reject(error); 23943} 23944function handleMboxRequestError(mbox, error) { 23945 logWarn(REQUEST_FAILED$1, error); 23946 notifyRequestFailed({ 23947 mbox: mbox, 23948 error: error 23949 }); 23950 return reject(error); 23951} 23952function createGetOfferRequestPayload(config, options) { 23953 var globalMbox = config[GLOBAL_MBOX_NAME]; 23954 var mbox = options.mbox; 23955 var payload = {}; 23956 var execute = {}; 23957 var experienceCloud = {}; 23958 if (mbox === globalMbox) { 23959 execute.pageLoad = {}; 23960 } else { 23961 execute.mboxes = [ 23962 { 23963 index: 0, 23964 name: mbox 23965 } 23966 ]; 23967 } 23968 payload.execute = execute; 23969 var analytics = createAnalytics(mbox, payload); 23970 if (!isEmpty(analytics)) { 23971 experienceCloud.analytics = analytics; 23972 } 23973 var platform = createPlatform(config); 23974 if (!isEmpty(platform)) { 23975 experienceCloud.platform = platform; 23976 } 23977 if (!isEmpty(experienceCloud)) { 23978 payload.experienceCloud = experienceCloud; 23979 } 23980 return payload; 23981} 23982function executeGetOffer(options) { 23983 var config = getConfig(); 23984 var mbox = options.mbox, 23985 timeout = options.timeout; 23986 var params = isObject(options.params) ? options.params : {}; 23987 var successFunc = function successFunc(response) { 23988 return handleMboxRequestSuccess(mbox, response); 23989 }; 23990 var errorFunc = function errorFunc(error) { 23991 return handleMboxRequestError(mbox, error); 23992 }; 23993 var payload = createGetOfferRequestPayload(config, options); 23994 notifyRequestStart({ 23995 mbox: mbox 23996 }); 23997 return createAsyncDeliveryRequest(payload, params) 23998 .then(function(request) { 23999 return executeRequest(request, timeout); 24000 }) 24001 .then(processResponse) 24002 .then(successFunc) 24003 ["catch"](errorFunc); 24004} 24005function createGetOffersRequestPayload(config, options) { 24006 var globalMbox = config[GLOBAL_MBOX_NAME]; 24007 var _options$consumerId = options.consumerId, 24008 consumerId = 24009 _options$consumerId === void 0 ? globalMbox : _options$consumerId, 24010 request = options.request, 24011 _options$page = options.page, 24012 page = _options$page === void 0 ? true : _options$page; 24013 var analytics = createAnalytics(consumerId, request); 24014 request.impressionId = request.impressionId || getImpressionId(page); 24015 var experienceCloud = request.experienceCloud || {}; 24016 if (!isEmpty(analytics)) { 24017 experienceCloud.analytics = analytics; 24018 } 24019 var platform = createPlatform(config); 24020 if (!isEmpty(platform)) { 24021 experienceCloud.platform = platform; 24022 } 24023 if (!isEmpty(experienceCloud)) { 24024 request.experienceCloud = experienceCloud; 24025 } 24026 return request; 24027} 24028function executeGetOffers(options) { 24029 var config = getConfig(); 24030 var timeout = options.timeout; 24031 var successFunc = function successFunc(response) { 24032 return handleRequestSuccess$1(response); 24033 }; 24034 var errorFunc = function errorFunc(error) { 24035 return handleRequestError$1(error); 24036 }; 24037 var request = createGetOffersRequestPayload(config, options); 24038 notifyRequestStart({}); 24039 return createAsyncDeliveryRequest(request, {}) 24040 .then(function(deliveryRequest) { 24041 return executeRequest(deliveryRequest, timeout); 24042 }) 24043 .then(processResponse) 24044 .then(successFunc) 24045 ["catch"](errorFunc); 24046} 24047 24048function addClass(cssClass, selector) { 24049 return select(selector).addClass(cssClass); 24050} 24051function setCss(style, selector) { 24052 return select(selector).css(style); 24053} 24054 24055function getAttr(name, selector) { 24056 return select(selector).attr(name); 24057} 24058function setAttr(name, value, selector) { 24059 return select(selector).attr(name, value); 24060} 24061function removeAttr(name, selector) { 24062 return select(selector).removeAttr(name); 24063} 24064function copyAttr(from, to, selector) { 24065 var value = getAttr(from, selector); 24066 if (isNotBlank(value)) { 24067 removeAttr(from, selector); 24068 setAttr(to, value, selector); 24069 } 24070} 24071function hasAttr(name, selector) { 24072 return isNotBlank(getAttr(name, selector)); 24073} 24074 24075var VISIBILITY_STATE = "visibilityState"; 24076var VISIBLE = "visible"; 24077var DELAY = 100; 24078function createError(selector) { 24079 return new Error("Could not find: " + selector); 24080} 24081function awaitUsingMutationObserver(selector, timeout, queryFunc) { 24082 return create$1(function(res, rej) { 24083 var mo = getMutationObserver(function() { 24084 var elems = queryFunc(selector); 24085 if (!isEmpty(elems)) { 24086 mo.disconnect(); 24087 res(elems); 24088 } 24089 }); 24090 delay(function() { 24091 mo.disconnect(); 24092 rej(createError(selector)); 24093 }, timeout); 24094 mo.observe(document$1, { 24095 childList: true, 24096 subtree: true 24097 }); 24098 }); 24099} 24100function canUseRequestAnimation() { 24101 return document$1[VISIBILITY_STATE] === VISIBLE; 24102} 24103function awaitUsingRequestAnimation(selector, timeout, queryFunc) { 24104 return create$1(function(res, rej) { 24105 function execute() { 24106 var elems = queryFunc(selector); 24107 if (!isEmpty(elems)) { 24108 res(elems); 24109 return; 24110 } 24111 window$1.requestAnimationFrame(execute); 24112 } 24113 execute(); 24114 delay(function() { 24115 rej(createError(selector)); 24116 }, timeout); 24117 }); 24118} 24119function awaitUsingTimer(selector, timeout, queryFunc) { 24120 return create$1(function(res, rej) { 24121 function execute() { 24122 var elems = queryFunc(selector); 24123 if (!isEmpty(elems)) { 24124 res(elems); 24125 return; 24126 } 24127 delay(execute, DELAY); 24128 } 24129 execute(); 24130 delay(function() { 24131 rej(createError(selector)); 24132 }, timeout); 24133 }); 24134} 24135function awaitSelector(selector) { 24136 var timeout = 24137 arguments.length > 1 && arguments[1] !== undefined 24138 ? arguments[1] 24139 : getConfig()[SELECTORS_POLLING_TIMEOUT]; 24140 var queryFunc = 24141 arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : select; 24142 var elems = queryFunc(selector); 24143 if (!isEmpty(elems)) { 24144 return resolve(elems); 24145 } 24146 if (canUseMutationObserver()) { 24147 return awaitUsingMutationObserver(selector, timeout, queryFunc); 24148 } 24149 if (canUseRequestAnimation()) { 24150 return awaitUsingRequestAnimation(selector, timeout, queryFunc); 24151 } 24152 return awaitUsingTimer(selector, timeout, queryFunc); 24153} 24154 24155function getDataSrc(item) { 24156 return getAttr(DATA_SRC, item); 24157} 24158function hasDataSrc(item) { 24159 return hasAttr(DATA_SRC, item); 24160} 24161function disableImages(html) { 24162 forEach(function(item) { 24163 return copyAttr(SRC, DATA_SRC, item); 24164 }, toArray(find(IMAGE_TAG, html))); 24165 return html; 24166} 24167function enableImages(html) { 24168 forEach(function(item) { 24169 return copyAttr(DATA_SRC, SRC, item); 24170 }, toArray(find(IMAGE_TAG, html))); 24171 return html; 24172} 24173function loadImage(src) { 24174 logDebug(LOADING_IMAGE, src); 24175 return getAttr(SRC, setAttr(SRC, src, wrap("<" + IMAGE_TAG + "/>"))); 24176} 24177function loadImages(html) { 24178 var elements = filter(hasDataSrc, toArray(find(IMAGE_TAG, html))); 24179 if (isEmpty(elements)) { 24180 return html; 24181 } 24182 forEach(loadImage, map(getDataSrc, elements)); 24183 return html; 24184} 24185function renderImages(html) { 24186 return flow([disableImages, loadImages, enableImages])(html); 24187} 24188 24189function getUrl(item) { 24190 var src = getAttr(SRC, item); 24191 return isNotBlank(src) ? src : null; 24192} 24193function getScriptsUrls(html) { 24194 return filter(isNotBlank, map(getUrl, toArray(find(SCRIPT, html)))); 24195} 24196function loadScripts(urls) { 24197 return reduce( 24198 function(acc, url) { 24199 return acc.then(function() { 24200 logDebug(REMOTE_SCRIPT, url); 24201 addClientTrace({ 24202 remoteScript: url 24203 }); 24204 return loadScript__default["default"](url); 24205 }); 24206 }, 24207 resolve(), 24208 urls 24209 ); 24210} 24211 24212function handleRenderingSuccess$1(action) { 24213 return action; 24214} 24215function handleRenderingError$1(action, error) { 24216 logWarn(UNEXPECTED_ERROR, error); 24217 addClientTrace({ 24218 action: action, 24219 error: error 24220 }); 24221 return action; 24222} 24223function renderHtml(renderFunc, action) { 24224 var container = select(action[SELECTOR]);
24225 var html = renderImages(fragment(action[CONTENT])); 24226 var urls = getScriptsUrls(html); 24227 var result; 24228 try { 24229 result = resolve(renderFunc(container, html)); 24230 } catch (err) { 24231 return reject(handleRenderingError$1(action, err)); 24232 } 24233 if (isEmpty(urls)) { 24234 return result 24235 .then(function() { 24236 return handleRenderingSuccess$1(action); 24237 }) 24238 ["catch"](function(error) { 24239 return handleRenderingError$1(action, error); 24240 }); 24241 } 24242 return result 24243 .then(function() { 24244 return loadScripts(urls); 24245 }) 24246 .then(function() { 24247 return handleRenderingSuccess$1(action); 24248 }) 24249 ["catch"](function(error) { 24250 return handleRenderingError$1(action, error); 24251 }); 24252} 24253 24254var HEAD_TAGS_SELECTOR = SCRIPT_TAG + "," + LINK_TAG + "," + STYLE_TAG; 24255function getHeadContent(content) { 24256 var container = fragment(content); 24257 var result = reduce( 24258 function(acc, elem) { 24259 acc.push(getHtml(fragment(elem))); 24260 return acc; 24261 }, 24262 [], 24263 toArray(find(HEAD_TAGS_SELECTOR, container)) 24264 ); 24265 return join("", result); 24266} 24267function preprocessAction(action) { 24268 var result = assign__default["default"]({}, action); 24269 var content = result[CONTENT]; 24270 if (isBlank(content)) { 24271 return result; 24272 } 24273 var container = select(result[SELECTOR]); 24274 if (!is(HEAD_TAG, container)) { 24275 return result; 24276 } 24277 result[TYPE] = APPEND_HTML; 24278 result[CONTENT] = getHeadContent(content); 24279 return result; 24280} 24281function addPxIfRequired(value) { 24282 var hasPx = value.length > 2 && value.lastIndexOf("px") !== -1; 24283 return hasPx ? value : value + "px"; 24284} 24285function setHtmlRenderFunc(container, html) { 24286 return setHtml$3(getHtml(html), container); 24287} 24288function setHtml$1(action) { 24289 logDebug(ACTION_RENDERING, action); 24290 return renderHtml(setHtmlRenderFunc, action); 24291} 24292function setText$2(action) { 24293 var container = select(action[SELECTOR]); 24294 var content = action[CONTENT]; 24295 logDebug(ACTION_RENDERING, action); 24296 addClientTrace({ 24297 action: action 24298 }); 24299 setText$4(content, container); 24300 return resolve(action); 24301} 24302function appendHtmlRenderFunc(container, html) { 24303 return append(getHtml(html), container); 24304} 24305function appendHtml$1(action) { 24306 logDebug(ACTION_RENDERING, action); 24307 return renderHtml(appendHtmlRenderFunc, action); 24308} 24309function prependHtmlRenderFunc(container, html) { 24310 return prepend(getHtml(html), container); 24311} 24312function prependHtml$1(action) { 24313 logDebug(ACTION_RENDERING, action); 24314 return renderHtml(prependHtmlRenderFunc, action); 24315} 24316function replaceHtmlRenderFunc(container, html) { 24317 var parentContainer = parent(container); 24318 remove$4(before(getHtml(html), container)); 24319 return parentContainer; 24320} 24321function replaceHtml$1(action) { 24322 logDebug(ACTION_RENDERING, action); 24323 return renderHtml(replaceHtmlRenderFunc, action); 24324} 24325function insertBeforeRenderFunc(container, html) { 24326 return prev(before(getHtml(html), container)); 24327} 24328function insertBefore$2(action) { 24329 logDebug(ACTION_RENDERING, action); 24330 return renderHtml(insertBeforeRenderFunc, action); 24331} 24332function insertAfterRenderFunc(container, html) { 24333 return next(after(getHtml(html), container)); 24334} 24335function insertAfter$2(action) { 24336 logDebug(ACTION_RENDERING, action); 24337 return renderHtml(insertAfterRenderFunc, action); 24338} 24339function customCodeRenderFunc(container, html) { 24340 return parent(before(getHtml(html), container)); 24341} 24342function customCode$2(action) { 24343 logDebug(ACTION_RENDERING, action); 24344 return renderHtml(customCodeRenderFunc, action); 24345} 24346function setImageSource$1(action) { 24347 var content = action[CONTENT]; 24348 var container = select(action[SELECTOR]); 24349 logDebug(ACTION_RENDERING, action); 24350 addClientTrace({ 24351 action: action 24352 }); 24353 removeAttr(SRC, container); 24354 setAttr(SRC, loadImage(content), container); 24355 return resolve(action); 24356} 24357function setAttribute$2(action) { 24358 var content = action[CONTENT]; 24359 var container = select(action[SELECTOR]); 24360 logDebug(ACTION_RENDERING, action); 24361 addClientTrace({ 24362 action: action 24363 }); 24364 forEach(function(value, key) { 24365 return setAttr(key, value, container); 24366 }, content); 24367 return resolve(action); 24368} 24369function setCssWithPriority(container, style, priority) { 24370 forEach(function(elem) {
24371 forEach(function(value, key) { 24372 return elem.style.setProperty(key, value, priority); 24373 }, style); 24374 }, toArray(container)); 24375} 24376function setStyle$2(action) { 24377 var container = select(action[SELECTOR]); 24378 var content = action[CONTENT]; 24379 var priority = content[PRIORITY]; 24380 logDebug(ACTION_RENDERING, action); 24381 addClientTrace({ 24382 action: action 24383 }); 24384 if (isBlank(priority)) { 24385 setCss(content, container); 24386 } else { 24387 setCssWithPriority(container, content, priority); 24388 } 24389 return resolve(action); 24390} 24391function resize$1(action) { 24392 var container = select(action[SELECTOR]); 24393 var content = action[CONTENT]; 24394 content[WIDTH] = addPxIfRequired(content[WIDTH]); 24395 content[HEIGHT] = addPxIfRequired(content[HEIGHT]); 24396 logDebug(ACTION_RENDERING, action); 24397 addClientTrace({ 24398 action: action 24399 }); 24400 setCss(content, container); 24401 return resolve(action); 24402} 24403function move$1(action) { 24404 var container = select(action[SELECTOR]); 24405 var content = action[CONTENT]; 24406 content[LEFT] = addPxIfRequired(content[LEFT]); 24407 content[TOP] = addPxIfRequired(content[TOP]); 24408 logDebug(ACTION_RENDERING, action); 24409 addClientTrace({ 24410 action: action 24411 }); 24412 setCss(content, container); 24413 return resolve(action); 24414} 24415function remove$2(action) { 24416 var container = select(action[SELECTOR]); 24417 logDebug(ACTION_RENDERING, action); 24418 addClientTrace({ 24419 action: action 24420 }); 24421 remove$4(container); 24422 return resolve(action); 24423} 24424function rearrange$2(action) { 24425 var container = select(action[SELECTOR]); 24426 var content = action[CONTENT]; 24427 var from = Number(content[FROM]); 24428 var to = Number(content[TO]); 24429 if (isNaN(from) && isNaN(to)) { 24430 logDebug(REARRANGE_INCORRECT_INDEXES, action); 24431 return reject(action); 24432 } 24433 var elements = toArray(children(container)); 24434 var elemFrom = elements[from]; 24435 var elemTo = elements[to]; 24436 if (!exists(elemFrom) || !exists(elemTo)) { 24437 logDebug(REARRANGE_MISSING, action); 24438 return reject(action); 24439 } 24440 logDebug(ACTION_RENDERING, action); 24441 addClientTrace({ 24442 action: action 24443 }); 24444 if (from < to) { 24445 after(elemFrom, elemTo); 24446 } else { 24447 before(elemFrom, elemTo); 24448 } 24449 return resolve(action); 24450} 24451function executeRenderAction(action) { 24452 var processedAction = preprocessAction(action); 24453 var type = processedAction[TYPE]; 24454 switch (type) { 24455 case SET_HTML: 24456 return setHtml$1(processedAction); 24457 case SET_TEXT: 24458 return setText$2(processedAction); 24459 case APPEND_HTML: 24460 return appendHtml$1(processedAction); 24461 case PREPEND_HTML: 24462 return prependHtml$1(processedAction); 24463 case REPLACE_HTML: 24464 return replaceHtml$1(processedAction); 24465 case INSERT_BEFORE: 24466 return insertBefore$2(processedAction); 24467 case INSERT_AFTER: 24468 return insertAfter$2(processedAction); 24469 case CUSTOM_CODE: 24470 return customCode$2(processedAction); 24471 case SET_ATTRIBUTE: 24472 return setAttribute$2(processedAction); 24473 case SET_IMAGE_SOURCE: 24474 return setImageSource$1(processedAction); 24475 case SET_STYLE: 24476 return setStyle$2(processedAction); 24477 case RESIZE: 24478 return resize$1(processedAction); 24479 case MOVE: 24480 return move$1(processedAction); 24481 case REMOVE: 24482 return remove$2(processedAction); 24483 case REARRANGE: 24484 return rearrange$2(processedAction); 24485 default: 24486 return resolve(processedAction); 24487 } 24488} 24489 24490var ACTION_KEY_ATTR = "at-action-key"; 24491function isClickTracking(action) { 24492 return action[TYPE] === TRACK_CLICK || action[TYPE] === SIGNAL_CLICK; 24493} 24494function hasValidSelector(action) { 24495 var selector = action[SELECTOR]; 24496 return isNotBlank(selector) || isElement(selector); 24497} 24498function markAsRendered(action) { 24499 var key = action.key; 24500 if (isBlank(key)) { 24501 return; 24502 } 24503 if (!hasValidSelector(action)) { 24504 return; 24505 } 24506 var selector = action[SELECTOR]; 24507 setAttr(ACTION_KEY_ATTR, key, selector); 24508} 24509function removeActionCssHiding(action) { 24510 var cssSelector = action[CSS_SELECTOR]; 24511 if (isBlank(cssSelector)) { 24512 return; 24513 } 24514 removeActionHidingStyle(cssSelector); 24515} 24516function displayAction(action) { 24517 if (!hasValidSelector(action)) { 24518 removeActionCssHiding(action); 24519 return; 24520 } 24521 var selector = action[SELECTOR]; 24522 if (isClickTracking(action)) { 24523 addClass(CLICK_TRACKING_CSS_CLASS, selector); 24524 return; 24525 } 24526 addClass(MARKER_CSS_CLASS, selector); 24527 removeActionCssHiding(action); 24528} 24529function displayActions(actions) { 24530 forEach(displayAction, actions); 24531} 24532function shouldRender(action) { 24533 var key = action.key; 24534 if (isBlank(key)) { 24535 return true; 24536 } 24537 var type = action[TYPE]; 24538 if (type === CUSTOM_CODE) { 24539 return action[PAGE]; 24540 } 24541 var selector = action[SELECTOR]; 24542 var currentKey = getAttr(ACTION_KEY_ATTR, selector); 24543 if (currentKey !== key) { 24544 return true; 24545 } 24546 if (currentKey === key) { 24547 return !action[PAGE]; 24548 } 24549 return false;
24550} 24551function renderAwaitedAction(action) { 24552 if (!shouldRender(action)) { 24553 displayAction(action); 24554 return action; 24555 } 24556 return executeRenderAction(action) 24557 .then(function() { 24558 logDebug(ACTION_RENDERED, action); 24559 addClientTrace({ 24560 action: action 24561 }); 24562 markAsRendered(action); 24563 displayAction(action); 24564 return action; 24565 }) 24566 ["catch"](function(error) { 24567 logWarn(UNEXPECTED_ERROR, error); 24568 addClientTrace({ 24569 action: action, 24570 error: error 24571 }); 24572 displayAction(action); 24573 var result = assign__default["default"]({}, action); 24574 result[ERROR] = true; 24575 return result; 24576 }); 24577} 24578function postProcess(actions) { 24579 var errorActions = filter(function(e) { 24580 return e[ERROR] === true; 24581 }, actions); 24582 if (isEmpty(errorActions)) { 24583 return resolve(); 24584 } 24585 displayActions(errorActions); 24586 return reject(actions); 24587} 24588function awaitAction(action) { 24589 var selector = action[SELECTOR]; 24590 return awaitSelector(selector) 24591 .then(function() { 24592 return action; 24593 }) 24594 ["catch"](function() { 24595 var result = assign__default["default"]({}, action); 24596 result[ERROR] = true; 24597 return result; 24598 }); 24599} 24600function awaitAndRenderAction(action) { 24601 return awaitAction(action).then(renderAwaitedAction); 24602} 24603function executeRenderActions(actions) { 24604 var promises = map(awaitAndRenderAction, actions); 24605 return all(promises).then(postProcess); 24606} 24607 24608function addEventListener(type, func, selector) { 24609 return select(selector).on(type, func); 24610} 24611function removeEventListener(type, func, selector) { 24612 return select(selector).off(type, func); 24613} 24614 24615var METRIC_ELEMENT_NOT_FOUND = "metric element not found"; 24616function executeMetric(metric) { 24617 var selector = metric[SELECTOR]; 24618 return awaitSelector(selector) 24619 .then(function() { 24620 addClientTrace({ 24621 metric: metric 24622 }); 24623 var foundMetric = assign__default["default"]( 24624 { 24625 found: true 24626 }, 24627 metric 24628 ); 24629 return foundMetric; 24630 }) 24631 ["catch"](function() { 24632 logWarn(METRIC_ELEMENT_NOT_FOUND, metric); 24633 addClientTrace({ 24634 metric: metric, 24635 message: METRIC_ELEMENT_NOT_FOUND 24636 }); 24637 return metric; 24638 }); 24639} 24640 24641function saveView(view) { 24642 var key = view.name; 24643 var views = getItem(VIEWS) || {}; 24644 views[key] = view; 24645 setItem(VIEWS, views); 24646} 24647function findView(key) { 24648 var options = 24649 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 24650 var _options$page = options.page, 24651 page = _options$page === void 0 ? true : _options$page; 24652 var views = getItem(VIEWS) || {}; 24653 var result = views[key]; 24654 if (isNil(result)) { 24655 return result; 24656 } 24657 var impressionId = options.impressionId; 24658 if (isNil(impressionId)) { 24659 return result; 24660 } 24661 return assign__default["default"]( 24662 { 24663 page: page, 24664 impressionId: impressionId 24665 }, 24666 result 24667 ); 24668} 24669function persistViews(views) { 24670 forEach(saveView, views); 24671} 24672 24673var NAVIGATOR = "navigator"; 24674var SEND_BEACON = "sendBeacon"; 24675function executeSendBeacon(win, url, data) { 24676 return win[NAVIGATOR][SEND_BEACON](url, data); 24677} 24678function executeSyncXhr(http, url, data) { 24679 var headers = {}; 24680 headers[CONTENT_TYPE] = [TEXT_PLAIN]; 24681 var options = {}; 24682 options[METHOD] = POST; 24683 options[URL$1] = url; 24684 options[DATA] = data; 24685 options[CREDENTIALS] = true; 24686 options[ASYNC] = false; 24687 options[HEADERS] = headers; 24688 try { 24689 http(options); 24690 } catch (error) { 24691 return false; 24692 } 24693 return true; 24694} 24695function isBeaconSupported(win) { 24696 return NAVIGATOR in win && SEND_BEACON in win[NAVIGATOR]; 24697} 24698function sendBeacon(url, data) { 24699 if (isBeaconSupported(window$1)) { 24700 return executeSendBeacon(window$1, url, data); 24701 } 24702 return executeSyncXhr(xhr, url, data); 24703} 24704 24705var SEND_BEACON_SUCCESS = "Beacon data sent"; 24706var SEND_BEACON_ERROR = "Beacon data sent failed"; 24707var VIEW_TRIGGERED = "View triggered notification"; 24708var VIEW_RENDERED = "View rendered notification"; 24709var MBOXES_RENDERED = "Mboxes rendered notification"; 24710var EVENT_HANDLER = "Event handler notification"; 24711var MBOX_EVENT_HANDLER = "Mbox event handler notification"; 24712var VIEW_EVENT_HANDLER = "View event handler notification"; 24713var PREFETCH_MBOXES = "prefetchMboxes"; 24714var RENDERED = "rendered"; 24715var TRIGGERED = "triggered"; 24716function createRequest(consumerId) { 24717 var analytics = createAnalytics(consumerId, {}); 24718 var request = { 24719 context: { 24720 beacon: true 24721 } 24722 }; 24723 if (!isEmpty(analytics)) { 24724 var experienceCloud = {}; 24725 experienceCloud.analytics = analytics; 24726 request.experienceCloud = experienceCloud; 24727 } 24728 return request; 24729} 24730function createSyncNotificationRequest(consumerId, params, notifications) { 24731 var request = createRequest(consumerId); 24732 var result = createSyncDeliveryRequest(request, params); 24733 result.notifications = notifications; 24734 return result; 24735} 24736function createAsyncNotificationRequest(consumerId, params, notifications) { 24737 var request = createRequest(consumerId); 24738 return createAsyncDeliveryRequest(request, params).then(function(result) { 24739 result.notifications = notifications; 24740 return result; 24741 }); 24742} 24743function createNotification(item, type, tokens) { 24744 var id = uuid(); 24745 var timestamp = now(); 24746 var parameters = item.parameters, 24747 profileParameters = item.profileParameters, 24748 order = item.order, 24749 product = item.product; 24750 var result = { 24751 id: id, 24752 type: type, 24753 timestamp: timestamp, 24754 parameters: parameters, 24755 profileParameters: profileParameters, 24756 order: order, 24757 product: product 24758 }; 24759 if (isEmpty(tokens)) { 24760 return result; 24761 } 24762 result.tokens = tokens; 24763 return result; 24764} 24765function createMboxNotification(mbox, type, tokens) { 24766 var name = mbox.name, 24767 state = mbox.state; 24768 var notification = createNotification(mbox, type, tokens); 24769 notification.mbox = { 24770 name: name, 24771 state: state 24772 }; 24773 return notification; 24774} 24775function createViewNotification(view, type, tokens) { 24776 var name = view.name, 24777 state = view.state; 24778 var notification = createNotification(view, type, tokens); 24779 notification.view = { 24780 name: name, 24781 state: state 24782 }; 24783 return notification; 24784} 24785function executeBeaconNotification(request) { 24786 return new Promise(function(resolve, reject) { 24787 var config = getConfig(); 24788 var url = createRequestUrl(config); 24789 var data = JSON.stringify(request); 24790 if (sendBeacon(url, data)) { 24791 logDebug(SEND_BEACON_SUCCESS, url, request); 24792 resolve(); 24793 return; 24794 } 24795 logWarn(SEND_BEACON_ERROR, url, request); 24796 reject(); 24797 }); 24798} 24799function sendEventNotification(source, type, token) { 24800 var config = getConfig(); 24801 var globalMbox = config[GLOBAL_MBOX_NAME]; 24802 var params = getTargetPageParams(globalMbox); 24803 var requestDetails = createRequestDetails({}, params); 24804 var notification = createNotification(requestDetails, type, [token]); 24805 var request = createSyncNotificationRequest(uuid(), params, [notification]); 24806 logDebug(EVENT_HANDLER, source, notification); 24807 addClientTrace({ 24808 source: source, 24809 event: type, 24810 request: request 24811 }); 24812 executeBeaconNotification(request); 24813} 24814function sendMboxEventNotification(name, type, token) { 24815 var params = getTargetPageParams(name); 24816 var requestDetails = createRequestDetails({}, params); 24817 var notification = createNotification(requestDetails, type, [token]); 24818 notification.mbox = { 24819 name: name 24820 }; 24821 var request = createSyncNotificationRequest(uuid(), params, [notification]); 24822 logDebug(MBOX_EVENT_HANDLER, name, notification); 24823 addClientTrace({ 24824 mbox: name, 24825 event: type, 24826 request: request 24827 }); 24828 executeBeaconNotification(request); 24829} 24830function sendMboxesRenderedNotifications(items) { 24831 var config = getConfig(); 24832 var globalMbox = config[GLOBAL_MBOX_NAME]; 24833 var notifications = []; 24834 var type = DISPLAY_EVENT; 24835 forEach(function(item) { 24836 var mbox = item.mbox, 24837 data = item.data; 24838 if (isNil(data)) { 24839 return; 24840 } 24841 var _data$eventTokens = data.eventTokens, 24842 eventTokens = _data$eventTokens === void 0 ? [] : _data$eventTokens; 24843 if (isEmpty(eventTokens)) { 24844 return; 24845 } 24846 notifications.push(createMboxNotification(mbox, type, eventTokens)); 24847 }, items); 24848 if (isEmpty(notifications)) { 24849 return; 24850 } 24851 var request = createSyncNotificationRequest(globalMbox, {}, notifications); 24852 logDebug(MBOXES_RENDERED, notifications); 24853 addClientTrace({ 24854 source: PREFETCH_MBOXES, 24855 event: RENDERED, 24856 request: request 24857 }); 24858 executeBeaconNotification(request); 24859} 24860function sendViewEventNotification(name, type, token) { 24861 var config = getConfig(); 24862 var globalMbox = config[GLOBAL_MBOX_NAME]; 24863 var params = getTargetPageParams(globalMbox); 24864 var requestDetails = createRequestDetails({}, params); 24865 var notification = createNotification(requestDetails, type, [token]); 24866 notification.view = { 24867 name: name 24868 }; 24869 var request = createSyncNotificationRequest(uuid(), params, [notification]); 24870 logDebug(VIEW_EVENT_HANDLER, name, notification); 24871 addClientTrace({ 24872 view: name, 24873 event: type, 24874 request: request 24875 }); 24876 executeBeaconNotification(request); 24877} 24878function sendViewTriggeredNotifications(options) { 24879 var name = options.viewName, 24880 impressionId = options.impressionId; 24881 var config = getConfig(); 24882 var globalMbox = config[GLOBAL_MBOX_NAME]; 24883 var params = getTargetPageParams(globalMbox); 24884 var requestDetails = createRequestDetails({}, params); 24885 var notification = createNotification(requestDetails, DISPLAY_EVENT, []); 24886 notification.view = { 24887 name: name 24888 }; 24889 logDebug(VIEW_TRIGGERED, name); 24890 createAsyncNotificationRequest(name, params, [notification]).then(function( 24891 request 24892 ) { 24893 request.impressionId = impressionId; 24894 addClientTrace({ 24895 view: name, 24896 event: TRIGGERED, 24897 request: request 24898 }); 24899 executeBeaconNotification(request); 24900 }); 24901}
24902function sendViewRenderedNotifications(item) { 24903 if (isNil(item)) { 24904 return; 24905 } 24906 var view = item.view, 24907 _item$data = item.data, 24908 data = _item$data === void 0 ? {} : _item$data; 24909 var _data$eventTokens2 = data.eventTokens, 24910 eventTokens = _data$eventTokens2 === void 0 ? [] : _data$eventTokens2; 24911 var name = view.name, 24912 impressionId = view.impressionId; 24913 var persistedView = findView(name); 24914 if (isNil(persistedView)) { 24915 return; 24916 } 24917 var notification = createViewNotification( 24918 persistedView, 24919 DISPLAY_EVENT, 24920 eventTokens 24921 ); 24922 var request = createSyncNotificationRequest(name, {}, [notification]); 24923 request.impressionId = impressionId; 24924 logDebug(VIEW_RENDERED, name, eventTokens); 24925 addClientTrace({ 24926 view: name, 24927 event: RENDERED, 24928 request: request 24929 }); 24930 executeBeaconNotification(request); 24931} 24932 24933var CACHE = {}; 24934var PAGE_LOAD = "pageLoadMetrics"; 24935var PREFETCH = "prefetchMetrics"; 24936var selectMetrics = prop(METRICS); 24937var createMetricSuccess = function createMetricSuccess() { 24938 return createSuccess(METRIC); 24939}; 24940var createMetricError = function createMetricError(error) { 24941 return createError$1(METRIC, error); 24942}; 24943function decorateElementIfRequired(type, selector) { 24944 if (type !== CLICK) { 24945 return; 24946 } 24947 addClass(CLICK_TRACKING_CSS_CLASS, selector); 24948} 24949function isHandlerCached(name, key) { 24950 return !isNil(CACHE[name]) && !isNil(CACHE[name][key]); 24951} 24952function removePreviousHandlersFromCache(currentViewName, type, selector) { 24953 if (!isNil(CACHE[currentViewName])) { 24954 return; 24955 } 24956 var viewNames = keys(CACHE); 24957 if (isEmpty(viewNames)) { 24958 return; 24959 } 24960 forEach(function(viewName) { 24961 var handlerNames = keys(CACHE[viewName]); 24962 forEach(function(handlerName) { 24963 var func = CACHE[viewName][handlerName]; 24964 removeEventListener(type, func, selector); 24965 }, handlerNames); 24966 delete CACHE[viewName]; 24967 }, viewNames); 24968} 24969function addHandlerToCache(name, key, handler) { 24970 CACHE[name] = CACHE[name] || {}; 24971 CACHE[name][key] = handler; 24972} 24973function attachEventHandler(name, fromView, metric, notifyFunc) { 24974 var type = metric.type, 24975 selector = metric.selector, 24976 eventToken = metric.eventToken; 24977 var key = hash(type + ":" + selector + ":" + eventToken); 24978 var handler = function handler() { 24979 return notifyFunc(name, type, eventToken); 24980 }; 24981 decorateElementIfRequired(type, selector); 24982 if (!fromView) { 24983 addEventListener(type, handler, selector); 24984 return; 24985 } 24986 if (isHandlerCached(name, key)) { 24987 return; 24988 } 24989 removePreviousHandlersFromCache(name, type, selector); 24990 addHandlerToCache(name, key, handler); 24991 addEventListener(type, handler, selector); 24992} 24993function processMetric(name, fromView, metric, notifyFunc) { 24994 return executeMetric(metric).then(function(element) { 24995 if (element.found) { 24996 attachEventHandler(name, fromView, element, notifyFunc); 24997 } 24998 }); 24999} 25000function attachMetricEventHandlers(name, fromView, metrics, notifyFunc) { 25001 return all( 25002 map(function(metric) { 25003 return processMetric(name, fromView, metric, notifyFunc); 25004 }, metrics) 25005 ) 25006 .then(createMetricSuccess) 25007 ["catch"](createMetricError); 25008} 25009function executeMboxMetrics(mbox) { 25010 var name = mbox.name; 25011 return attachMetricEventHandlers( 25012 name, 25013 false, 25014 selectMetrics(mbox), 25015 sendMboxEventNotification 25016 ); 25017} 25018function executeViewMetrics(view) { 25019 var name = view.name; 25020 return attachMetricEventHandlers( 25021 name, 25022 true, 25023 selectMetrics(view), 25024 sendViewEventNotification 25025 ); 25026} 25027function executePageLoadMetrics(pageLoad) { 25028 return attachMetricEventHandlers( 25029 PAGE_LOAD, 25030 false, 25031 selectMetrics(pageLoad), 25032 sendEventNotification 25033 ); 25034} 25035function executePrefetchMetrics(prefetch) { 25036 return attachMetricEventHandlers( 25037 PREFETCH, 25038 false, 25039 selectMetrics(prefetch), 25040 sendEventNotification 25041 ); 25042} 25043 25044var selectContent = prop(CONTENT); 25045var selectCssSelector = prop(CSS_SELECTOR); 25046var createRenderSuccess = function createRenderSuccess(data) { 25047 return createSuccess(RENDER, data); 25048}; 25049var createRenderError = function createRenderError(errors, data) { 25050 var _errors = isArray(errors) 25051 ? { 25052 errors: errors 25053 } 25054 : { 25055 errors: [errors] 25056 }; 25057 return createError$1(RENDER, assign__default["default"](_errors, data)); 25058}; 25059var hasNonErrorData = function hasNonErrorData(val) { 25060 return not(isError)(val) && hasData(val); 25061}; 25062function hideActions(actions) { 25063 var items = map(selectCssSelector, actions); 25064 injectActionHidingStyles(filterNotBlank(items)); 25065} 25066function hideAllViewsActions(actions) { 25067 var items = map(selectCssSelector, actions); 25068 injectAllViewsHidingStyle(filterNotNil(items)); 25069} 25070function extractActions(item) { 25071 var options = filter(isActions, selectOptions(item)); 25072 return flatten(map(selectContent, options)); 25073} 25074function isValidAction(action) { 25075 return isObject(action) && action.type !== SET_JSON; 25076} 25077function decorateActions(actions, key, page) { 25078 return map(function(e) { 25079 return assign__default["default"]( 25080 { 25081 key: key, 25082 page: page 25083 }, 25084 e 25085 ); 25086 }, filter(isValidAction, actions)); 25087}
25088function executeRendering(option, key, page) { 25089 var eventToken = option.eventToken, 25090 responseTokens = option.responseTokens, 25091 content = option.content; 25092 var actions = decorateActions(content, key, page); 25093 return executeRenderActions(actions) 25094 .then(function() { 25095 return createRenderSuccess({ 25096 eventToken: eventToken, 25097 responseTokens: responseTokens 25098 }); 25099 }) 25100 ["catch"](function(errors) { 25101 return createRenderError(errors, { 25102 eventToken: eventToken, 25103 responseTokens: responseTokens 25104 }); 25105 }); 25106} 25107function isValidOption(option) { 25108 return isObject(option) && option.type !== JSON$1; 25109} 25110function renderOptions(func, item) { 25111 return map(func, filter(isValidOption, selectOptions(item))); 25112} 25113function postExecuteRendering(key, item, values) { 25114 var result = _defineProperty( 25115 { 25116 status: SUCCESS 25117 }, 25118 key, 25119 item 25120 ); 25121 var errors = map(selectData, filter(isError, values)); 25122 var data = {}; 25123 if (!isEmpty(errors)) { 25124 result.status = ERROR; 25125 data.errors = errors; 25126 } 25127 if (!isEmpty(data)) { 25128 result.data = data; 25129 } 25130 return result; 25131} 25132function postPrefetchRendering(key, item, values) { 25133 var result = _defineProperty( 25134 { 25135 status: SUCCESS 25136 }, 25137 key, 25138 item 25139 ); 25140 var errors = map(selectData, filter(isError, values)); 25141 var renderData = map(selectData, filter(hasNonErrorData, values)); 25142 var eventTokens = filterNotNil(map(selectEventToken, renderData)); 25143 var responseTokens = filterNotNil(map(selectResponseTokens, renderData)); 25144 var data = {}; 25145 if (!isEmpty(errors)) { 25146 result.status = ERROR; 25147 data.errors = errors; 25148 } 25149 if (!isEmpty(eventTokens)) { 25150 data.eventTokens = eventTokens; 25151 } 25152 if (!isEmpty(responseTokens)) { 25153 data.responseTokens = responseTokens; 25154 } 25155 if (!isEmpty(data)) { 25156 result.data = data; 25157 } 25158 return result; 25159} 25160function renderExecuteItem(item, postRenderingFunc, metricsFunc) { 25161 var render = function render(opt) { 25162 return executeRendering(opt, true); 25163 }; 25164 var options = renderOptions(render, item); 25165 return all(options) 25166 .then(postRenderingFunc) 25167 .then(function(result) { 25168 metricsFunc(item); 25169 return result; 25170 }); 25171} 25172function renderPrefetchItem(key, item, page, metricsFunc) { 25173 var name = item.name; 25174 var render = function render(opt) { 25175 return executeRendering(opt, name, page); 25176 }; 25177 var options = renderOptions(render, item); 25178 return all(options) 25179 .then(function(arr) { 25180 return postPrefetchRendering(key, item, arr); 25181 }) 25182 .then(function(result) { 25183 metricsFunc(item); 25184 return result; 25185 }); 25186} 25187function renderMbox(mbox) { 25188 var postRenderingFunc = function postRenderingFunc(arr) { 25189 return postExecuteRendering(MBOX, mbox, arr); 25190 }; 25191 return renderExecuteItem(mbox, postRenderingFunc, executeMboxMetrics); 25192} 25193function renderPrefetchMbox(mbox) { 25194 return renderPrefetchItem(MBOX, mbox, true, executeMboxMetrics); 25195} 25196function hideOptions(item) { 25197 var actions = extractActions(item); 25198 hideActions(actions); 25199} 25200function hidePageLoadOptions(context) { 25201 var skipPrehiding = 25202 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 25203 if (skipPrehiding) { 25204 return; 25205 } 25206 var _context$execute = context.execute, 25207 execute = _context$execute === void 0 ? {} : _context$execute; 25208 var _execute$pageLoad = execute.pageLoad, 25209 pageLoad = _execute$pageLoad === void 0 ? {} : _execute$pageLoad; 25210 if (!isEmpty(pageLoad)) { 25211 hideOptions(pageLoad); 25212 } 25213} 25214function hideAllViews(context) { 25215 var _context$prefetch = context.prefetch, 25216 prefetch = _context$prefetch === void 0 ? {} : _context$prefetch; 25217 var _prefetch$views = prefetch.views, 25218 views = _prefetch$views === void 0 ? [] : _prefetch$views; 25219 if (isEmpty(views)) { 25220 return; 25221 } 25222 var actions = flatten(map(extractActions, views)); 25223 hideAllViewsActions(actions); 25224} 25225function hideViewOptions(view) { 25226 var actions = extractActions(view); 25227 hideActions(actions); 25228 removeAllViewsHidingStyle(); 25229} 25230function renderPageLoad(pageLoad) { 25231 var postRenderingFunc = function postRenderingFunc(arr) {
25232 return postExecuteRendering(PAGE_LOAD$1, pageLoad, arr); 25233 }; 25234 return renderExecuteItem(pageLoad, postRenderingFunc, executePageLoadMetrics); 25235} 25236function renderMboxes(mboxes) { 25237 return all(map(renderMbox, mboxes)); 25238} 25239function renderPrefetchMboxes(mboxes) { 25240 return all(map(renderPrefetchMbox, mboxes)); 25241} 25242function renderPrefetchMetrics(prefetch) { 25243 var metrics = [executePrefetchMetrics(prefetch)]; 25244 return all(metrics).then(postExecuteRendering); 25245} 25246function renderView(view) { 25247 var page = view.page; 25248 return renderPrefetchItem(VIEW, view, page, executeViewMetrics); 25249} 25250 25251var tinyEmitter = { exports: {} }; 25252 25253function E() {} 25254E.prototype = { 25255 on: function on(name, callback, ctx) { 25256 var e = this.e || (this.e = {}); 25257 (e[name] || (e[name] = [])).push({ 25258 fn: callback, 25259 ctx: ctx 25260 }); 25261 return this; 25262 }, 25263 once: function once(name, callback, ctx) { 25264 var self = this; 25265 function listener() { 25266 self.off(name, listener); 25267 callback.apply(ctx, arguments); 25268 } 25269 listener._ = callback; 25270 return this.on(name, listener, ctx); 25271 }, 25272 emit: function emit(name) { 25273 var data = [].slice.call(arguments, 1); 25274 var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); 25275 var i = 0; 25276 var len = evtArr.length; 25277 for (i; i < len; i++) { 25278 evtArr[i].fn.apply(evtArr[i].ctx, data); 25279 } 25280 return this; 25281 }, 25282 off: function off(name, callback) { 25283 var e = this.e || (this.e = {}); 25284 var evts = e[name]; 25285 var liveEvents = []; 25286 if (evts && callback) { 25287 for (var i = 0, len = evts.length; i < len; i++) { 25288 if (evts[i].fn !== callback && evts[i].fn._ !== callback) 25289 liveEvents.push(evts[i]); 25290 } 25291 } 25292 liveEvents.length ? (e[name] = liveEvents) : delete e[name]; 25293 return this; 25294 } 25295}; 25296tinyEmitter.exports = E; 25297tinyEmitter.exports.TinyEmitter = E; 25298var EventEmitter = tinyEmitter.exports; 25299 25300function create() { 25301 return new EventEmitter(); 25302} 25303function publishOn(eventBus, name, args) { 25304 eventBus.emit(name, args); 25305} 25306function subscribeTo(eventBus, name, func) { 25307 eventBus.on(name, func); 25308} 25309 25310var EVENT_BUS = create(); 25311function publish(name, args) { 25312 publishOn(EVENT_BUS, name, args); 25313} 25314function subscribe(name, func) { 25315 subscribeTo(EVENT_BUS, name, func); 25316} 25317 25318function redirect$1(option) { 25319 return { 25320 type: REDIRECT, 25321 content: option.url 25322 }; 25323} 25324function setContent(action) { 25325 var result = {}; 25326 result.type = SET_HTML; 25327 result.content = action.content; 25328 result.selector = action.selector; 25329 result.cssSelector = action.cssSelector; 25330 return result; 25331} 25332function setText$1(action) { 25333 var result = {}; 25334 result.type = SET_TEXT; 25335 result.content = action.content; 25336 result.selector = action.selector; 25337 result.cssSelector = action.cssSelector; 25338 return result; 25339} 25340function appendContent(action) { 25341 var result = {}; 25342 result.type = APPEND_HTML; 25343 result.content = action.content; 25344 result.selector = action.selector; 25345 result.cssSelector = action.cssSelector; 25346 return result; 25347} 25348function prependContent(action) { 25349 var result = {}; 25350 result.type = PREPEND_HTML; 25351 result.content = action.content; 25352 result.selector = action.selector; 25353 result.cssSelector = action.cssSelector; 25354 return result; 25355} 25356function replaceContent(action) { 25357 var result = {}; 25358 result.type = REPLACE_HTML; 25359 result.content = action.content; 25360 result.selector = action.selector; 25361 result.cssSelector = action.cssSelector; 25362 return result; 25363} 25364function insertBefore$1(action) { 25365 var result = {}; 25366 result.type = INSERT_BEFORE; 25367 result.content = action.content; 25368 result.selector = action.selector; 25369 result.cssSelector = action.cssSelector; 25370 return result; 25371} 25372function insertAfter$1(action) { 25373 var result = {}; 25374 result.type = INSERT_AFTER; 25375 result.content = action.content; 25376 result.selector = action.selector; 25377 result.cssSelector = action.cssSelector; 25378 return result; 25379} 25380function customCode$1(action) { 25381 var result = {}; 25382 result.type = CUSTOM_CODE; 25383 result.content = action.content; 25384 result.selector = action.selector; 25385 result.cssSelector = action.cssSelector; 25386 return result; 25387} 25388function setAttribute$1(action) { 25389 var result = {}; 25390 result.selector = action.selector; 25391 result.cssSelector = action.cssSelector; 25392 if (action.attribute === SRC) { 25393 result.type = SET_IMAGE_SOURCE; 25394 result.content = action.value; 25395 return result; 25396 } 25397 result.type = SET_ATTRIBUTE; 25398 var content = {}; 25399 content[action.attribute] = action.value; 25400 result.content = content; 25401 return result; 25402} 25403function setStyle$1(action) { 25404 var _action$style = action.style, 25405 style = _action$style === void 0 ? {}
25405 : _action$style; 25406 var result = {}; 25407 result.selector = action.selector; 25408 result.cssSelector = action.cssSelector; 25409 if (!isNil(style.left) && !isNil(style.top)) { 25410 result.type = MOVE; 25411 result.content = style; 25412 return result; 25413 } 25414 if (!isNil(style.width) && !isNil(style.height)) { 25415 result.type = RESIZE; 25416 result.content = style; 25417 return result; 25418 } 25419 result.type = SET_STYLE; 25420 result.content = style; 25421 return result; 25422} 25423function remove$1(action) { 25424 var result = {}; 25425 result.type = REMOVE; 25426 result.selector = action.selector; 25427 result.cssSelector = action.cssSelector; 25428 return result; 25429} 25430function rearrange$1(action) { 25431 var content = {}; 25432 content.from = action.from; 25433 content.to = action.to; 25434 var result = {}; 25435 result.type = REARRANGE; 25436 result.selector = action.selector; 25437 result.cssSelector = action.cssSelector; 25438 result.content = content; 25439 return result; 25440} 25441function hasSelectors(action) { 25442 return isNotBlank(action.selector) && isNotBlank(action.cssSelector); 25443} 25444function createPageLoad(items) { 25445 var result = {}; 25446 if (isEmpty(items)) { 25447 return result; 25448 } 25449 var options = []; 25450 var metrics = []; 25451 var actions = []; 25452 forEach(function(item) { 25453 var type = item.action; 25454 switch (type) { 25455 case SET_CONTENT: 25456 if (hasSelectors(item)) { 25457 actions.push(setContent(item)); 25458 } else { 25459 options.push({ 25460 type: HTML, 25461 content: item.content 25462 }); 25463 } 25464 break; 25465 case SET_JSON: 25466 if (!isEmpty(item.content)) { 25467 forEach(function(e) { 25468 return options.push({ 25469 type: JSON$1, 25470 content: e 25471 }); 25472 }, item.content); 25473 } 25474 break; 25475 case SET_TEXT: 25476 actions.push(setText$1(item)); 25477 break; 25478 case APPEND_CONTENT: 25479 actions.push(appendContent(item)); 25480 break; 25481 case PREPEND_CONTENT: 25482 actions.push(prependContent(item)); 25483 break; 25484 case REPLACE_CONTENT: 25485 actions.push(replaceContent(item)); 25486 break; 25487 case INSERT_BEFORE: 25488 actions.push(insertBefore$1(item)); 25489 break; 25490 case INSERT_AFTER: 25491 actions.push(insertAfter$1(item)); 25492 break; 25493 case CUSTOM_CODE: 25494 actions.push(customCode$1(item)); 25495 break; 25496 case SET_ATTRIBUTE: 25497 actions.push(setAttribute$1(item)); 25498 break; 25499 case SET_STYLE: 25500 actions.push(setStyle$1(item)); 25501 break; 25502 case REMOVE: 25503 actions.push(remove$1(item)); 25504 break; 25505 case REARRANGE: 25506 actions.push(rearrange$1(item)); 25507 break; 25508 case REDIRECT: 25509 options.push(redirect$1(item)); 25510 break; 25511 case TRACK_CLICK: 25512 metrics.push({ 25513 type: CLICK, 25514 selector: item.selector, 25515 eventToken: item.clickTrackId 25516 }); 25517 break; 25518 } 25519 }, items); 25520 var pageLoad = {}; 25521 var hasActions = !isEmpty(actions); 25522 if (hasActions) { 25523 options.push({ 25524 type: ACTIONS, 25525 content: actions 25526 }); 25527 } 25528 var hasOptions = !isEmpty(options); 25529 if (hasOptions) { 25530 pageLoad.options = options; 25531 } 25532 var hasMetrics = !isEmpty(metrics); 25533 if (hasMetrics) { 25534 pageLoad.metrics = metrics; 25535 } 25536 if (isEmpty(pageLoad)) { 25537 return result; 25538 } 25539 var execute = {}; 25540 execute.pageLoad = pageLoad; 25541 result.execute = execute; 25542 return result; 25543} 25544function createMboxes(name, items) { 25545 var result = {}; 25546 if (isEmpty(items)) { 25547 return result; 25548 } 25549 var options = []; 25550 var metrics = []; 25551 forEach(function(item) { 25552 var type = item.action; 25553 switch (type) { 25554 case SET_CONTENT: 25555 options.push({ 25556 type: HTML, 25557 content: item.content 25558 }); 25559 break; 25560 case SET_JSON: 25561 if (!isEmpty(item.content)) { 25562 forEach(function(e) { 25563 return options.push({ 25564 type: JSON$1, 25565 content: e 25566 }); 25567 }, item.content); 25568 } 25569 break; 25570 case REDIRECT: 25571 options.push(redirect$1(item)); 25572 break; 25573 case SIGNAL_CLICK: 25574 metrics.push({ 25575 type: CLICK, 25576 eventToken: item.clickTrackId 25577 }); 25578 break; 25579 } 25580 }, items); 25581 var mbox = { 25582 name: name 25583 }; 25584 var hasOptions = !isEmpty(options); 25585 if (hasOptions) { 25586 mbox.options = options; 25587 } 25588 var hasMetrics = !isEmpty(metrics); 25589 if (hasMetrics) { 25590 mbox.metrics = metrics; 25591 } 25592 if (isEmpty(mbox)) { 25593 return result; 25594 } 25595 var execute = {}; 25596 var mboxes = [mbox]; 25597 execute.mboxes = mboxes; 25598 result.execute = execute; 25599 return result; 25600} 25601function convertToContext(mbox, items, pageLoadEnabled) { 25602 if (pageLoadEnabled) { 25603 return createPageLoad(items); 25604 } 25605 return createMboxes(mbox, items); 25606} 25607 25608var PAGE_LOAD_RENDERING_FAILED = "Page load rendering failed"; 25609var MBOXES_RENDERING_FAILED = "Mboxes rendering failed"; 25610var VIEW_RENDERING_FAILED = "View rendering failed"; 25611var PREFETCH_RENDERING_FAILED = "Prefetch rendering failed"; 25612var hasErrors = function hasErrors(items) { 25613 return !isEmpty(filter(isError, items)); 25614}; 25615function getPageLoadData(pageLoad) { 25616 var status = pageLoad.status, 25617 data = pageLoad.data; 25618 var result = { 25619 status: status, 25620 pageLoad: true 25621 }; 25622 if (!isNil(data)) { 25623 result.data = data; 25624 } 25625 return result; 25626} 25627function getMboxData(item) { 25628 var status = item.status, 25629 mbox = item.mbox, 25630 data = item.data; 25631 var name = mbox.name; 25632 var result = { 25633 status: status, 25634 mbox: name 25635 }; 25636 if (!isNil(data)) { 25637 result.data = data; 25638 } 25639 return result; 25640} 25641function getViewData(item) { 25642 var status = item.status, 25643 view = item.view, 25644 data = item.data; 25645 var name = view.name; 25646 var result = { 25647 status: status, 25648 view: name 25649 }; 25650 if (!isNil(data)) { 25651 result.data = data; 25652 } 25653 return result; 25654} 25655function getPrefetchMetricsData(prefetchMetrics) { 25656 var status = prefetchMetrics.status, 25657 data = prefetchMetrics.data; 25658 var result = { 25659 status: status, 25660 prefetchMetrics: true 25661 }; 25662 if (!isNil(data)) { 25663 result.data = data; 25664 } 25665 return result; 25666} 25667function handlePageLoad(pageLoad) {
25668 if (isNil(pageLoad)) { 25669 return [null]; 25670 } 25671 var result = map(getPageLoadData, [pageLoad]); 25672 if (hasErrors(result)) { 25673 logWarn(PAGE_LOAD_RENDERING_FAILED, pageLoad); 25674 } 25675 return result; 25676} 25677function handleMboxes(mboxes) { 25678 if (isNil(mboxes)) { 25679 return [null]; 25680 } 25681 var result = map(getMboxData, mboxes); 25682 if (hasErrors(result)) { 25683 logWarn(MBOXES_RENDERING_FAILED, mboxes); 25684 } 25685 return result; 25686} 25687function handlePrefetchMboxes(mboxes) { 25688 var func = 25689 arguments.length > 1 && arguments[1] !== undefined 25690 ? arguments[1] 25691 : sendMboxesRenderedNotifications; 25692 if (isNil(mboxes)) { 25693 return [null]; 25694 } 25695 var result = map(getMboxData, mboxes); 25696 if (hasErrors(result)) { 25697 logWarn(MBOXES_RENDERING_FAILED, mboxes); 25698 } 25699 func(mboxes); 25700 return result; 25701} 25702function handleView(item) { 25703 var func = 25704 arguments.length > 1 && arguments[1] !== undefined 25705 ? arguments[1] 25706 : sendViewRenderedNotifications; 25707 if (isNil(item)) { 25708 return [null]; 25709 } 25710 var result = map(getViewData, [item]); 25711 if (hasErrors(result)) { 25712 logWarn(VIEW_RENDERING_FAILED, item); 25713 } 25714 var view = item.view; 25715 if (!view.page) { 25716 return result; 25717 } 25718 func(item); 25719 return result; 25720} 25721function handlePrefetchMetrics(prefetchMetrics) { 25722 if (isNil(prefetchMetrics)) { 25723 return [null]; 25724 } 25725 var result = map(getPrefetchMetricsData, [prefetchMetrics]); 25726 if (hasErrors(result)) { 25727 logWarn(PREFETCH_RENDERING_FAILED, prefetchMetrics); 25728 } 25729 return result; 25730} 25731function handleRenderingSuccess(values) { 25732 var results = flatten([ 25733 handlePageLoad(values[0]), 25734 handleMboxes(values[1]), 25735 handlePrefetchMboxes(values[2]), 25736 handlePrefetchMetrics(values[3]) 25737 ]); 25738 var nonNull = filter(notNil, results); 25739 var errors = filter(isError, nonNull); 25740 if (!isEmpty(errors)) { 25741 return reject(errors); 25742 } 25743 return resolve(nonNull); 25744} 25745function handleRenderingError(err) { 25746 return reject(err); 25747} 25748 25749function processOptions(selector, item) { 25750 if (isEmpty(item)) { 25751 return; 25752 } 25753 var options = item.options; 25754 if (isEmpty(options)) { 25755 return; 25756 } 25757 forEach(function(option) { 25758 if (option.type !== HTML) { 25759 return; 25760 } 25761 var type = SET_HTML; 25762 var content = option.content; 25763 option.type = ACTIONS; 25764 option.content = [ 25765 { 25766 type: type, 25767 selector: selector, 25768 content: content 25769 } 25770 ]; 25771 }, options); 25772} 25773function processMetrics$1(selector, item) { 25774 var metrics = item.metrics; 25775 if (isEmpty(metrics)) { 25776 return; 25777 } 25778 var name = item.name; 25779 forEach(function(metric) { 25780 metric.name = name; 25781 metric.selector = metric.selector || selector; 25782 }, metrics); 25783} 25784function createRenderingContext(selector, context) { 25785 var result = assign__default["default"]({}, context); 25786 var _result$execute = result.execute, 25787 execute = _result$execute === void 0 ? {} : _result$execute, 25788 _result$prefetch = result.prefetch, 25789 prefetch = _result$prefetch === void 0 ? {} : _result$prefetch; 25790 var _execute$pageLoad = execute.pageLoad, 25791 pageLoad = _execute$pageLoad === void 0 ? {} : _execute$pageLoad, 25792 _execute$mboxes = execute.mboxes, 25793 mboxes = _execute$mboxes === void 0 ? [] : _execute$mboxes; 25794 var _prefetch$mboxes = prefetch.mboxes, 25795 prefetchMboxes = _prefetch$mboxes === void 0 ? [] : _prefetch$mboxes; 25796 processOptions(selector, pageLoad); 25797 forEach(function(elem) { 25798 return processOptions(selector, elem); 25799 }, mboxes); 25800 forEach(function(elem) { 25801 return processMetrics$1(selector, elem); 25802 }, mboxes); 25803 forEach(function(elem) { 25804 return processOptions(selector, elem); 25805 }, prefetchMboxes); 25806 forEach(function(elem) { 25807 return processMetrics$1(selector, elem); 25808 }, prefetchMboxes); 25809 return result; 25810} 25811function persistViewsIfPresent(context) { 25812 var _context$prefetch = context.prefetch, 25813 prefetch = _context$prefetch === void 0 ? {} : _context$prefetch; 25814 var _prefetch$views = prefetch.views, 25815 views = _prefetch$views === void 0 ? [] : _prefetch$views; 25816 if (isEmpty(views)) { 25817 return; 25818 } 25819 persistViews(views); 25820} 25821function renderContext(context) { 25822 var promises = []; 25823 var _context$execute = context.execute, 25824 execute = _context$execute === void 0 ? {}
25824 : _context$execute; 25825 var _execute$pageLoad2 = execute.pageLoad, 25826 pageLoad = _execute$pageLoad2 === void 0 ? {} : _execute$pageLoad2, 25827 _execute$mboxes2 = execute.mboxes, 25828 mboxes = _execute$mboxes2 === void 0 ? [] : _execute$mboxes2; 25829 if (!isEmpty(pageLoad)) { 25830 promises.push(renderPageLoad(pageLoad)); 25831 } else { 25832 promises.push(resolve(null)); 25833 } 25834 if (!isEmpty(mboxes)) { 25835 promises.push(renderMboxes(mboxes)); 25836 } else { 25837 promises.push(resolve(null)); 25838 } 25839 var _context$prefetch2 = context.prefetch, 25840 prefetch = _context$prefetch2 === void 0 ? {} : _context$prefetch2; 25841 var _prefetch$mboxes2 = prefetch.mboxes, 25842 prefetchMboxes = _prefetch$mboxes2 === void 0 ? [] : _prefetch$mboxes2, 25843 _prefetch$metrics = prefetch.metrics, 25844 metrics = _prefetch$metrics === void 0 ? [] : _prefetch$metrics; 25845 if (!isEmpty(prefetchMboxes)) { 25846 promises.push(renderPrefetchMboxes(prefetchMboxes)); 25847 } else { 25848 promises.push(resolve(null)); 25849 } 25850 if (isArray(metrics) && !isEmpty(metrics)) { 25851 promises.push(renderPrefetchMetrics(prefetch)); 25852 } else { 25853 promises.push(resolve(null)); 25854 } 25855 removeHidingSnippetStyle(); 25856 return all(promises) 25857 .then(handleRenderingSuccess) 25858 ["catch"](handleRenderingError); 25859} 25860function executeRedirect(win, url) { 25861 delay(function() { 25862 return win.location.replace(url); 25863 }); 25864} 25865function retrieveSelector(selector) { 25866 if (isNotBlank(selector)) { 25867 return selector; 25868 } 25869 if (isElement(selector)) { 25870 return selector; 25871 } 25872 return HEAD_TAG; 25873} 25874function showElement(selector) { 25875 addClass(MARKER_CSS_CLASS, selector); 25876} 25877function executeApplyOffer(options) { 25878 var mbox = options.mbox, 25879 selector = options.selector, 25880 actions = options.offer; 25881 var config = getConfig(); 25882 var pageLoadEnabled = mbox === config[GLOBAL_MBOX_NAME]; 25883 if (isEmpty(actions)) { 25884 logDebug(NO_ACTIONS); 25885 showElement(selector); 25886 removeHidingSnippetStyle(); 25887 notifyRenderingNoOffers({ 25888 mbox: mbox 25889 }); 25890 return; 25891 } 25892 var context = convertToContext(mbox, actions, pageLoadEnabled); 25893 var renderingContext = createRenderingContext(selector, context); 25894 var redirect = getRedirect(renderingContext); 25895 if (!isEmpty(redirect)) { 25896 var url = redirect.url; 25897 logDebug(REDIRECT_ACTION, redirect); 25898 notifyRenderingRedirect({ 25899 url: url 25900 }); 25901 executeRedirect(window$1, url); 25902 return; 25903 } 25904 notifyRenderingStart({ 25905 mbox: mbox 25906 }); 25907 hidePageLoadOptions(renderingContext); 25908 renderContext(renderingContext) 25909 .then(function(execution) { 25910 if (isEmpty(execution)) { 25911 return; 25912 } 25913 notifyRenderingSucceeded({ 25914 mbox: mbox, 25915 execution: execution 25916 }); 25917 }) 25918 ["catch"](function(error) { 25919 return notifyRenderingFailed({ 25920 error: error 25921 }); 25922 }); 25923} 25924function isEmptyResponse() { 25925 var response = 25926 arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 25927 var _response$prefetch = response.prefetch, 25928 prefetch = _response$prefetch === void 0 ? {} : _response$prefetch; 25929 var _response$execute = response.execute, 25930 execute = _response$execute === void 0 ? {} : _response$execute; 25931 var _execute$pageLoad3 = execute.pageLoad, 25932 executePageLoad = _execute$pageLoad3 === void 0 ? {} : _execute$pageLoad3; 25933 var _execute$mboxes3 = execute.mboxes, 25934 executeMboxes = _execute$mboxes3 === void 0 ? [] : _execute$mboxes3; 25935 var _prefetch$pageLoad = prefetch.pageLoad, 25936 prefetchPageLoad = _prefetch$pageLoad === void 0 ? {} : _prefetch$pageLoad; 25937 var _prefetch$views2 = prefetch.views, 25938 views = _prefetch$views2 === void 0 ? [] : _prefetch$views2; 25939 var _prefetch$mboxes3 = prefetch.mboxes, 25940 prefetchMboxes = _prefetch$mboxes3 === void 0 ? [] : _prefetch$mboxes3; 25941 return ( 25942 isEmpty(executePageLoad) && 25943 isEmpty(executeMboxes) && 25944 isEmpty(prefetchPageLoad) && 25945 isEmpty(views) && 25946 isEmpty(prefetchMboxes) 25947 ); 25948} 25949function executeApplyOffers(options) { 25950 var skipPrehiding = 25951 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 25952 var selector = options.selector, 25953 response = options.response; 25954 if (isEmptyResponse(response)) { 25955 logDebug(NO_ACTIONS); 25956 showElement(selector); 25957 removeHidingSnippetStyle(); 25958 notifyRenderingNoOffers({}); 25959 publish(NO_OFFERS_EVENT); 25960 return resolve(); 25961 } 25962 var renderingContext = createRenderingContext(selector, response); 25963 var redirect = getRedirect(renderingContext); 25964 if (!isEmpty(redirect)) { 25965 var url = redirect.url; 25966 logDebug(REDIRECT_ACTION, redirect); 25967 notifyRenderingRedirect({ 25968 url: url 25969 }); 25970 publish(REDIRECT_OFFER_EVENT); 25971 executeRedirect(window$1, url); 25972 return resolve(); 25973 } 25974 notifyRenderingStart({}); 25975 persistViewsIfPresent(renderingContext); 25976 publish(CACHE_UPDATED_EVENT); 25977 hidePageLoadOptions(renderingContext, skipPrehiding); 25978 return renderContext(renderingContext) 25979 .then(function(execution) { 25980 if (isEmpty(execution)) { 25981 return; 25982 } 25983 notifyRenderingSucceeded({ 25984 execution: execution 25985 }); 25986 }) 25987 ["catch"](function(error) { 25988 return notifyRenderingFailed({ 25989 error: error 25990 }); 25991 }); 25992} 25993 25994function hasServerState(config) { 25995 var serverState = config[SERVER_STATE]; 25996 if (isEmpty(serverState)) { 25997 return false;
25998 } 25999 var request = serverState.request, 26000 response = serverState.response; 26001 if (isEmpty(request)) { 26002 return false; 26003 } 26004 if (isEmpty(response)) { 26005 return false; 26006 } 26007 return true; 26008} 26009function getServerState(config) { 26010 return config[SERVER_STATE]; 26011} 26012function recordServerStateTelemetry(request) { 26013 window.__target_telemetry.addServerStateEntry(request); 26014} 26015 26016var INIT = "[page-init]"; 26017function handleError(error) { 26018 logWarn(INIT, VIEW_DELIVERY_ERROR, error); 26019 publish(NO_OFFERS_EVENT); 26020 addClientTrace({ 26021 source: INIT, 26022 error: error 26023 }); 26024 removeHidingSnippetStyle(); 26025} 26026function handleSuccess(response) { 26027 var skipPrehiding = 26028 arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 26029 var options = { 26030 selector: HEAD_TAG, 26031 response: response 26032 }; 26033 logDebug(INIT, RESPONSE, response); 26034 addClientTrace({ 26035 source: INIT, 26036 response: response 26037 }); 26038 executeApplyOffers(options, skipPrehiding)["catch"](handleError); 26039} 26040function scrubServerStateResponse(config, response) { 26041 var result = assign__default["default"]({}, response); 26042 var execute = result.execute, 26043 prefetch = result.prefetch; 26044 var pageLoadEnabled = config[PAGE_LOAD_ENABLED]; 26045 var viewsEnabled = config[VIEWS_ENABLED]; 26046 if (execute) { 26047 result.execute.mboxes = undefined; 26048 } 26049 if (execute && !pageLoadEnabled) { 26050 result.execute.pageLoad = undefined; 26051 } 26052 if (prefetch) { 26053 result.prefetch.mboxes = undefined; 26054 } 26055 if (prefetch && !viewsEnabled) { 26056 result.prefetch.views = undefined; 26057 } 26058 return result; 26059} 26060function processServerState(config) { 26061 var serverState = getServerState(config); 26062 var request = serverState.request, 26063 response = serverState.response; 26064 var skipPrehiding = true; 26065 logDebug(INIT, USING_SERVER_STATE); 26066 addClientTrace({ 26067 source: INIT, 26068 serverState: serverState 26069 }); 26070 var scrubbedResponse = scrubServerStateResponse(config, response); 26071 hidePageLoadOptions(scrubbedResponse); 26072 hideAllViews(scrubbedResponse); 26073 recordServerStateTelemetry(request); 26074 processResponse({ 26075 request: request, 26076 response: scrubbedResponse 26077 }) 26078 .then(function(res) { 26079 return handleSuccess(res, skipPrehiding); 26080 }) 26081 ["catch"](handleError); 26082} 26083function initDelivery() { 26084 if (!isDeliveryEnabled()) { 26085 logWarn(INIT, DELIVERY_DISABLED); 26086 addClientTrace({ 26087 source: INIT, 26088 error: DELIVERY_DISABLED 26089 }); 26090 return; 26091 } 26092 var config = getConfig(); 26093 if (hasServerState(config)) { 26094 processServerState(config); 26095 return; 26096 } 26097 var pageLoadEnabled = config[PAGE_LOAD_ENABLED]; 26098 var viewsEnabled = config[VIEWS_ENABLED]; 26099 if (!pageLoadEnabled && !viewsEnabled) { 26100 logDebug(INIT, PAGE_LOAD_DISABLED); 26101 addClientTrace({ 26102 source: INIT, 26103 error: PAGE_LOAD_DISABLED 26104 }); 26105 return; 26106 } 26107 injectHidingSnippetStyle(); 26108 var request = {}; 26109 if (pageLoadEnabled) { 26110 var execute = {}; 26111 execute.pageLoad = {}; 26112 request.execute = execute; 26113 } 26114 if (viewsEnabled) { 26115 var prefetch = {}; 26116 prefetch.views = [{}]; 26117 request.prefetch = prefetch; 26118 } 26119 var timeout = config[TIMEOUT$1]; 26120 logDebug(INIT, REQUEST, request); 26121 addClientTrace({ 26122 source: INIT, 26123 request: request 26124 }); 26125 var options = { 26126 request: request, 26127 timeout: timeout 26128 }; 26129 if (!shouldUseOptin() || isTargetApproved()) { 26130 executeGetOffers(options) 26131 .then(handleSuccess) 26132 ["catch"](handleError); 26133 return; 26134 } 26135 fetchOptinPermissions() 26136 .then(function() { 26137 executeGetOffers(options) 26138 .then(handleSuccess) 26139 ["catch"](handleError); 26140 }) 26141 ["catch"](handleError); 26142} 26143 26144function createValid() { 26145 var result = {}; 26146 result[VALID] = true; 26147 return result; 26148} 26149function createInvalid(error) { 26150 var result = {}; 26151 result[VALID] = false; 26152 result[ERROR] = error; 26153 return result; 26154} 26155function validateMbox(mbox) { 26156 if (isBlank(mbox)) { 26157 return createInvalid(MBOX_REQUIRED); 26158 } 26159 if (mbox.length > MBOX_LENGTH) { 26160 return createInvalid(MBOX_TOO_LONG); 26161 } 26162 return createValid(); 26163} 26164function validateGetOfferOptions(options) { 26165 if (!isObject(options)) { 26166 return createInvalid(OPTIONS_REQUIRED); 26167 } 26168 var mbox = options[MBOX]; 26169 var mboxValidation = validateMbox(mbox); 26170 if (!mboxValidation[VALID]) { 26171 return mboxValidation; 26172 } 26173 if (!isFunction(options[SUCCESS])) { 26174 return createInvalid(SUCCESS_REQUIRED); 26175 }
26176 if (!isFunction(options[ERROR])) { 26177 return createInvalid(ERROR_REQUIRED); 26178 } 26179 return createValid(); 26180} 26181function validateGetOffersOptions(options) { 26182 if (!isObject(options)) { 26183 return createInvalid(OPTIONS_REQUIRED); 26184 } 26185 var request = options.request; 26186 if (!isObject(request)) { 26187 return createInvalid(REQUEST_REQUIRED); 26188 } 26189 var execute = request.execute, 26190 prefetch = request.prefetch; 26191 if (!isObject(execute) && !isObject(prefetch)) { 26192 return createInvalid(EXECUTE_OR_PREFETCH_REQUIRED); 26193 } 26194 return createValid(); 26195} 26196function validateSendNotificationsOptions(options) { 26197 if (!isObject(options)) { 26198 return createInvalid(OPTIONS_REQUIRED); 26199 } 26200 var request = options.request; 26201 if (!isObject(request)) { 26202 return createInvalid(REQUEST_REQUIRED); 26203 } 26204 var execute = request.execute, 26205 prefetch = request.prefetch, 26206 notifications = request.notifications; 26207 if (isObject(execute) || isObject(prefetch)) { 26208 return createInvalid(EXECUTE_OR_PREFETCH_NOT_ALLOWED); 26209 } 26210 if (!isArray(notifications)) { 26211 return createInvalid(NOTIFICATIONS_REQUIRED); 26212 } 26213 return createValid(); 26214} 26215function validateApplyOfferOptions(options) { 26216 if (!isObject(options)) { 26217 return createInvalid(OPTIONS_REQUIRED); 26218 } 26219 var mbox = options[MBOX]; 26220 var mboxValidation = validateMbox(mbox); 26221 if (!mboxValidation[VALID]) { 26222 return mboxValidation; 26223 } 26224 var offer = options[OFFER]; 26225 if (!isArray(offer)) { 26226 return createInvalid(OFFER_REQUIRED); 26227 } 26228 return createValid(); 26229} 26230function validateApplyOffersOptions(options) { 26231 if (!isObject(options)) { 26232 return createInvalid(OPTIONS_REQUIRED); 26233 } 26234 var response = options.response; 26235 if (!isObject(response)) { 26236 return createInvalid(RESPONE_REQUIRED); 26237 } 26238 return createValid(); 26239} 26240function validateTrackEventOptions(options) { 26241 if (!isObject(options)) { 26242 return createInvalid(OPTIONS_REQUIRED); 26243 } 26244 var mbox = options[MBOX]; 26245 var mboxValidation = validateMbox(mbox); 26246 if (!mboxValidation[VALID]) { 26247 return mboxValidation; 26248 } 26249 return createValid(); 26250} 26251 26252function redirect(option) { 26253 return { 26254 action: REDIRECT, 26255 url: option.content 26256 }; 26257} 26258function setHtml(action) { 26259 var result = {}; 26260 result.action = SET_CONTENT; 26261 result.content = action.content; 26262 result.selector = action.selector; 26263 result.cssSelector = action.cssSelector; 26264 return result; 26265} 26266function setText(action) { 26267 var result = {}; 26268 result.action = SET_TEXT; 26269 result.content = action.content; 26270 result.selector = action.selector; 26271 result.cssSelector = action.cssSelector; 26272 return result; 26273} 26274function appendHtml(action) { 26275 var result = {}; 26276 result.action = APPEND_CONTENT; 26277 result.content = action.content; 26278 result.selector = action.selector; 26279 result.cssSelector = action.cssSelector; 26280 return result; 26281} 26282function prependHtml(action) { 26283 var result = {}; 26284 result.action = PREPEND_CONTENT; 26285 result.content = action.content; 26286 result.selector = action.selector; 26287 result.cssSelector = action.cssSelector; 26288 return result; 26289} 26290function replaceHtml(action) { 26291 var result = {}; 26292 result.action = REPLACE_CONTENT; 26293 result.content = action.content; 26294 result.selector = action.selector; 26295 result.cssSelector = action.cssSelector; 26296 return result; 26297} 26298function insertBefore(action) { 26299 var result = {}; 26300 result.action = INSERT_BEFORE; 26301 result.content = action.content; 26302 result.selector = action.selector; 26303 result.cssSelector = action.cssSelector; 26304 return result; 26305} 26306function insertAfter(action) { 26307 var result = {}; 26308 result.action = INSERT_AFTER; 26309 result.content = action.content; 26310 result.selector = action.selector; 26311 result.cssSelector = action.cssSelector; 26312 return result; 26313} 26314function customCode(action) { 26315 var result = {}; 26316 result.action = CUSTOM_CODE; 26317 result.content = action.content; 26318 result.selector = action.selector; 26319 result.cssSelector = action.cssSelector; 26320 return result; 26321} 26322function setAttribute(action) { 26323 var attribute = keys(action.content)[0]; 26324 var result = {}; 26325 result.action = SET_ATTRIBUTE; 26326 result.attribute = attribute; 26327 result.value = action.content[attribute]; 26328 result.selector = action.selector; 26329 result.cssSelector = action.cssSelector; 26330 return result; 26331} 26332function setImageSource(action) { 26333 var result = {}; 26334 result.action = SET_ATTRIBUTE; 26335 result.attribute = SRC; 26336 result.value = action.content; 26337 result.selector = action.selector; 26338 result.cssSelector = action.cssSelector; 26339 return result; 26340} 26341function setStyle(action) { 26342 var result = {}; 26343 result.action = SET_STYLE; 26344 result.style = action.content; 26345 result.selector = action.selector; 26346 result.cssSelector = action.cssSelector; 26347 return result; 26348} 26349function resize(action) { 26350 var result = {}; 26351 result.action = SET_STYLE; 26352 result.style = action.content; 26353 result.selector = action.selector; 26354 result.cssSelector = action.cssSelector; 26355 return result; 26356} 26357function move(action) { 26358 var result = {}; 26359 result.action = SET_STYLE; 26360 result.style = action.content; 26361 result.selector = action.selector; 26362 result.cssSelector = action.cssSelector; 26363 return result; 26364} 26365function remove(action) { 26366 var result = {}; 26367 result.action = REMOVE; 26368 result.selector = action.selector; 26369 result.cssSelector = action.cssSelector; 26370 return result; 26371} 26372function rearrange(action) { 26373 var result = {}; 26374 result.action = REARRANGE; 26375 result.from = action.content.from; 26376 result.to = action.content.to; 26377 result.selector = action.selector; 26378 result.cssSelector = action.cssSelector; 26379 return result; 26380} 26381function processActions(actions) { 26382 var result = []; 26383 forEach(function(action) { 26384 var type = action.type; 26385 switch (type) { 26386 case SET_HTML: 26387 result.push(setHtml(action)); 26388 break; 26389 case SET_TEXT: 26390 result.push(setText(action)); 26391 break; 26392 case APPEND_HTML: 26393 result.push(appendHtml(action)); 26394 break; 26395 case PREPEND_HTML: 26396 result.push(prependHtml(action)); 26397 break; 26398 case REPLACE_HTML: 26399 result.push(replaceHtml(action)); 26400 break; 26401 case INSERT_BEFORE: 26402 result.push(insertBefore(action)); 26403 break; 26404 case INSERT_AFTER: 26405 result.push(insertAfter(action)); 26406 break; 26407 case CUSTOM_CODE: 26408 result.push(customCode(action)); 26409 break; 26410 case SET_ATTRIBUTE: 26411 result.push(setAttribute(action)); 26412 break; 26413 case SET_IMAGE_SOURCE: 26414 result.push(setImageSource(action)); 26415 break; 26416 case SET_STYLE: 26417 result.push(setStyle(action)); 26418 break; 26419 case RESIZE: 26420 result.push(resize(action)); 26421 break; 26422 case MOVE: 26423 result.push(move(action)); 26424 break; 26425 case REMOVE: 26426 result.push(remove(action)); 26427 break; 26428 case REARRANGE: 26429 result.push(rearrange(action)); 26430 break; 26431 case REDIRECT: 26432 result.push(redirect(action)); 26433 break; 26434 } 26435 }, actions); 26436 return result; 26437} 26438function processMetrics(metrics) { 26439 if (isEmpty(metrics)) { 26440 return []; 26441 } 26442 var result = []; 26443 forEach(function(m) { 26444 if (m.type !== CLICK) { 26445 return; 26446 } 26447 if (hasSelector$1(m)) { 26448 result.push({ 26449 action: TRACK_CLICK,
26450 selector: m.selector, 26451 clickTrackId: m.eventToken 26452 }); 26453 } else { 26454 result.push({ 26455 action: SIGNAL_CLICK, 26456 clickTrackId: m.eventToken 26457 }); 26458 } 26459 }, metrics); 26460 return result; 26461} 26462function processItem(item) { 26463 if (isEmpty(item)) { 26464 return []; 26465 } 26466 var htmls = []; 26467 var jsons = []; 26468 var actions = []; 26469 var _item$options = item.options, 26470 options = _item$options === void 0 ? [] : _item$options, 26471 _item$metrics = item.metrics, 26472 metrics = _item$metrics === void 0 ? [] : _item$metrics; 26473 forEach(function(option) { 26474 var type = option.type; 26475 switch (type) { 26476 case HTML: 26477 htmls.push(option.content); 26478 break; 26479 case JSON$1: 26480 jsons.push(option.content); 26481 break; 26482 case REDIRECT: 26483 actions.push(redirect(option)); 26484 break; 26485 case ACTIONS: 26486 actions.push.apply(actions, processActions(option.content)); 26487 break; 26488 } 26489 }, options); 26490 if (!isEmpty(htmls)) { 26491 actions.push({ 26492 action: SET_CONTENT, 26493 content: htmls.join("") 26494 }); 26495 } 26496 if (!isEmpty(jsons)) { 26497 actions.push({ 26498 action: SET_JSON, 26499 content: jsons 26500 }); 26501 } 26502 var clickActions = processMetrics(metrics); 26503 if (!isEmpty(clickActions)) { 26504 actions.push.apply(actions, clickActions); 26505 } 26506 return actions; 26507} 26508function convertToActions(response) { 26509 var _response$execute = response.execute, 26510 execute = _response$execute === void 0 ? {} : _response$execute; 26511 var _execute$pageLoad = execute.pageLoad, 26512 pageLoad = _execute$pageLoad === void 0 ? {} : _execute$pageLoad; 26513 var _execute$mboxes = execute.mboxes, 26514 mboxes = _execute$mboxes === void 0 ? [] : _execute$mboxes; 26515 var result = []; 26516 result.push.apply(result, processItem(pageLoad)); 26517 result.push.apply(result, flatten(map(processItem, mboxes))); 26518 return result; 26519} 26520 26521var GET_OFFER = "[getOffer()]"; 26522function handleRequestSuccess(options, response) { 26523 var actions = convertToActions(response); 26524 options[SUCCESS](actions); 26525} 26526function handleRequestError(options, error) { 26527 var status = error[STATUS] || UNKNOWN; 26528 options[ERROR](status, error); 26529} 26530function getOffer(options) { 26531 var validationResult = validateGetOfferOptions(options); 26532 var error = validationResult[ERROR]; 26533 if (!validationResult[VALID]) { 26534 logWarn(GET_OFFER, error); 26535 addClientTrace({ 26536 source: GET_OFFER, 26537 options: options, 26538 error: error 26539 }); 26540 return; 26541 } 26542 if (!isDeliveryEnabled()) { 26543 delay(options[ERROR](WARNING, DELIVERY_DISABLED)); 26544 logWarn(GET_OFFER, DELIVERY_DISABLED); 26545 addClientTrace({ 26546 source: GET_OFFER, 26547 options: options, 26548 error: DELIVERY_DISABLED 26549 }); 26550 return; 26551 } 26552 var successFunc = function successFunc(response) { 26553 return handleRequestSuccess(options, response); 26554 }; 26555 var errorFunc = function errorFunc(err) { 26556 return handleRequestError(options, err); 26557 }; 26558 logDebug(GET_OFFER, options); 26559 addClientTrace({ 26560 source: GET_OFFER, 26561 options: options 26562 }); 26563 if (!shouldUseOptin() || isTargetApproved()) { 26564 executeGetOffer(options) 26565 .then(successFunc) 26566 ["catch"](errorFunc); 26567 return; 26568 } 26569 fetchOptinPermissions().then(function() { 26570 executeGetOffer(options) 26571 .then(successFunc) 26572 ["catch"](errorFunc); 26573 }); 26574} 26575 26576var GET_OFFERS = "[getOffers()]"; 26577function getOffers(options) { 26578 var validationResult = validateGetOffersOptions(options); 26579 var error = validationResult[ERROR]; 26580 if (!validationResult[VALID]) { 26581 logWarn(GET_OFFERS, error); 26582 addClientTrace({ 26583 source: GET_OFFERS, 26584 options: options, 26585 error: error 26586 }); 26587 return reject(validationResult); 26588 } 26589 if (!isDeliveryEnabled()) { 26590 logWarn(GET_OFFERS, DELIVERY_DISABLED); 26591 addClientTrace({ 26592 source: GET_OFFERS, 26593 options: options, 26594 error: DELIVERY_DISABLED 26595 }); 26596 return reject(new Error(DELIVERY_DISABLED)); 26597 } 26598 logDebug(GET_OFFERS, options); 26599 addClientTrace({ 26600 source: GET_OFFERS, 26601 options: options 26602 }); 26603 if (!shouldUseOptin() || isTargetApproved()) { 26604 return executeGetOffers(options); 26605 } 26606 return fetchOptinPermissions().then(function() { 26607 return executeGetOffers(options); 26608 }); 26609} 26610 26611var APPLY_OFFER = "[applyOffer()]"; 26612function applyOffer(options) { 26613 var selector = retrieveSelector(options.selector); 26614 var entryId = hash(selector); 26615 perfTool.timeStart(entryId);
26616 var validationResult = validateApplyOfferOptions(options); 26617 var error = validationResult[ERROR]; 26618 if (!validationResult[VALID]) { 26619 logWarn(APPLY_OFFER, options, error); 26620 addClientTrace({ 26621 source: APPLY_OFFER, 26622 options: options, 26623 error: error 26624 }); 26625 showElement(selector); 26626 return; 26627 } 26628 if (!isDeliveryEnabled()) { 26629 logWarn(APPLY_OFFER, DELIVERY_DISABLED); 26630 addClientTrace({ 26631 source: APPLY_OFFER, 26632 options: options, 26633 error: DELIVERY_DISABLED 26634 }); 26635 showElement(selector); 26636 return; 26637 } 26638 options.selector = selector; 26639 logDebug(APPLY_OFFER, options); 26640 addClientTrace({ 26641 source: APPLY_OFFER, 26642 options: options 26643 }); 26644 executeApplyOffer(options); 26645 var executionTime = perfTool.timeEnd(entryId); 26646 perfTool.clearTiming(entryId); 26647 window.__target_telemetry.addRenderEntry(entryId, executionTime); 26648} 26649 26650var APPLY_OFFERS = "[applyOffers()]"; 26651function applyOffers(options) { 26652 var selector = retrieveSelector(options.selector); 26653 var entryId = hash(selector); 26654 perfTool.timeStart(entryId); 26655 var validationResult = validateApplyOffersOptions(options); 26656 var error = validationResult[ERROR]; 26657 if (!validationResult[VALID]) { 26658 logWarn(APPLY_OFFERS, options, error); 26659 addClientTrace({ 26660 source: APPLY_OFFERS, 26661 options: options, 26662 error: error 26663 }); 26664 showElement(selector); 26665 return reject(validationResult); 26666 } 26667 if (!isDeliveryEnabled()) { 26668 logWarn(APPLY_OFFERS, DELIVERY_DISABLED); 26669 addClientTrace({ 26670 source: APPLY_OFFERS, 26671 options: options, 26672 error: DELIVERY_DISABLED 26673 }); 26674 showElement(selector); 26675 return reject(new Error(DELIVERY_DISABLED)); 26676 } 26677 options.selector = selector; 26678 logDebug(APPLY_OFFERS, options); 26679 addClientTrace({ 26680 source: APPLY_OFFERS, 26681 options: options 26682 }); 26683 return executeApplyOffers(options).then(function() { 26684 var executionTime = perfTool.timeEnd(entryId); 26685 perfTool.clearTiming(entryId); 26686 window.__target_telemetry.addRenderEntry(entryId, executionTime); 26687 }); 26688} 26689 26690var SEND_NOTIFICATIONS = "[sendNotifications()]"; 26691function sendNotifications(options) { 26692 var config = getConfig(); 26693 var globalMbox = config[GLOBAL_MBOX_NAME]; 26694 var _options$consumerId = options.consumerId, 26695 consumerId = 26696 _options$consumerId === void 0 ? globalMbox : _options$consumerId, 26697 request = options.request; 26698 var validationResult = validateSendNotificationsOptions(options); 26699 var error = validationResult[ERROR]; 26700 if (!validationResult[VALID]) { 26701 logWarn(SEND_NOTIFICATIONS, error); 26702 addClientTrace({ 26703 source: SEND_NOTIFICATIONS, 26704 options: options, 26705 error: error 26706 }); 26707 return; 26708 } 26709 if (!isDeliveryEnabled()) { 26710 logWarn(SEND_NOTIFICATIONS, DELIVERY_DISABLED); 26711 addClientTrace({ 26712 source: SEND_NOTIFICATIONS, 26713 options: options, 26714 error: DELIVERY_DISABLED 26715 }); 26716 return; 26717 } 26718 logDebug(SEND_NOTIFICATIONS, options); 26719 addClientTrace({ 26720 source: SEND_NOTIFICATIONS, 26721 options: options 26722 }); 26723 var notifications = request.notifications; 26724 var notificationsRequest = createSyncNotificationRequest( 26725 consumerId, 26726 {}, 26727 notifications 26728 ); 26729 if (shouldUseOptin() && !isTargetApproved()) { 26730 logWarn(SEND_NOTIFICATIONS, ERROR_TARGET_NOT_OPTED_IN); 26731 return; 26732 } 26733 executeBeaconNotification(notificationsRequest); 26734} 26735 26736var TRACK_EVENT = "[trackEvent()]"; 26737function normalizeOptions(config, options) { 26738 var mbox = options[MBOX]; 26739 var result = assign__default["default"]({}, options); 26740 var optsParams = isObject(options.params) ? options.params : {}; 26741 result[PARAMS] = assign__default["default"]( 26742 {}, 26743 getTargetPageParams(mbox), 26744 optsParams 26745 ); 26746 result[TIMEOUT$1] = getTimeout(config, options[TIMEOUT$1]); 26747 result[SUCCESS] = isFunction(options[SUCCESS]) ? options[SUCCESS] : noop; 26748 result[ERROR] = isFunction(options[ERROR]) ? options[ERROR] : noop; 26749 return result; 26750} 26751function shouldTrackBySelector(options) { 26752 var type = options[TYPE]; 26753 var selector = options[SELECTOR]; 26754 return isNotBlank(type) && (isNotBlank(selector) || isElement(selector)); 26755} 26756function trackImmediateInternal(options) { 26757 var mbox = options.mbox, 26758 _options$type = options.type, 26759 type = _options$type === void 0 ? DISPLAY_EVENT : _options$type; 26760 var optsParams = isObject(options.params) ? options.params : {}; 26761 var params = assign__default["default"]( 26762 {}, 26763 getTargetPageParams(mbox), 26764 optsParams 26765 ); 26766 var requestDetails = createRequestDetails({}, params); 26767 var notification = createNotification(requestDetails, type, []); 26768 notification.mbox = { 26769 name: mbox 26770 }; 26771 var request = createSyncNotificationRequest(mbox, params, [notification]); 26772 executeBeaconNotification(request) 26773 .then(function() {
26774 logDebug(TRACK_EVENT_SUCCESS, options); 26775 options[SUCCESS](); 26776 }) 26777 ["catch"](function() { 26778 logWarn(TRACK_EVENT_ERROR, options); 26779 options[ERROR](UNKNOWN, TRACK_EVENT_ERROR); 26780 }); 26781} 26782function trackImmediate(options) { 26783 if (shouldUseOptin() && !isTargetApproved()) { 26784 logWarn(TRACK_EVENT_ERROR, ERROR_TARGET_NOT_OPTED_IN); 26785 options[ERROR](ERROR, ERROR_TARGET_NOT_OPTED_IN); 26786 return; 26787 } 26788 trackImmediateInternal(options); 26789} 26790function handleEvent(options) { 26791 trackImmediate(options); 26792 return !options.preventDefault; 26793} 26794function trackBySelector(options) { 26795 var selector = options[SELECTOR]; 26796 var type = options[TYPE]; 26797 var elements = toArray(select(selector)); 26798 var onEvent = function onEvent() { 26799 return handleEvent(options); 26800 }; 26801 forEach(function(element) { 26802 return addEventListener(type, onEvent, element); 26803 }, elements); 26804} 26805function trackEvent(opts) { 26806 var validationResult = validateTrackEventOptions(opts); 26807 var error = validationResult[ERROR]; 26808 if (!validationResult[VALID]) { 26809 logWarn(TRACK_EVENT, error); 26810 addClientTrace({ 26811 source: TRACK_EVENT, 26812 options: opts, 26813 error: error 26814 }); 26815 return; 26816 } 26817 var config = getConfig(); 26818 var options = normalizeOptions(config, opts); 26819 if (!isDeliveryEnabled()) { 26820 logWarn(TRACK_EVENT, DELIVERY_DISABLED); 26821 delay(options[ERROR](WARNING, DELIVERY_DISABLED)); 26822 addClientTrace({ 26823 source: TRACK_EVENT, 26824 options: opts, 26825 error: DELIVERY_DISABLED 26826 }); 26827 return; 26828 } 26829 logDebug(TRACK_EVENT, options); 26830 addClientTrace({ 26831 source: TRACK_EVENT, 26832 options: options 26833 }); 26834 if (shouldTrackBySelector(options)) { 26835 trackBySelector(options); 26836 return; 26837 } 26838 trackImmediate(options); 26839} 26840 26841var TRIGGER_VIEW = "[triggerView()]"; 26842var TASKS = []; 26843var LOADING = 0; 26844var LOADED = 1; 26845var STATE = LOADING; 26846function executeApplyOffersForView(view) { 26847 hideViewOptions(view); 26848 return renderView(view) 26849 .then(handleView) 26850 .then(function(execution) { 26851 if (isEmpty(execution)) { 26852 return; 26853 } 26854 notifyRenderingSucceeded({ 26855 execution: execution 26856 }); 26857 }) 26858 ["catch"](function(error) { 26859 logWarn(RENDERING_VIEW_FAILED, error); 26860 notifyRenderingFailed({ 26861 error: error 26862 }); 26863 }); 26864} 26865function processTriggeredViews() { 26866 while (TASKS.length > 0) { 26867 var options = TASKS.pop(); 26868 var viewName = options.viewName, 26869 page = options.page; 26870 var persistedView = findView(viewName, options); 26871 if (!isNil(persistedView)) { 26872 executeApplyOffersForView(persistedView); 26873 continue; 26874 } 26875 if (page) { 26876 sendViewTriggeredNotifications(options); 26877 } 26878 } 26879} 26880function processResponseEvents() { 26881 STATE = LOADED; 26882 processTriggeredViews(); 26883} 26884function setupListeners() { 26885 subscribe(CACHE_UPDATED_EVENT, processResponseEvents); 26886 subscribe(NO_OFFERS_EVENT, processResponseEvents); 26887 subscribe(REDIRECT_OFFER_EVENT, processResponseEvents); 26888} 26889function getTriggerViewOptions(viewName, opts) { 26890 var result = {}; 26891 result.viewName = viewName; 26892 result.impressionId = uuid(); 26893 result.page = true; 26894 if (!isEmpty(opts)) { 26895 result.page = !!opts.page; 26896 } 26897 return result; 26898} 26899function handleTriggeredView(options) { 26900 TASKS.push(options); 26901 if (STATE === LOADING) { 26902 return; 26903 } 26904 processTriggeredViews(); 26905} 26906function triggerView(value, opts) { 26907 var viewsEnabled = getConfig()[VIEWS_ENABLED]; 26908 if (!viewsEnabled) { 26909 logWarn(TRIGGER_VIEW, VIEWS_DISABLED); 26910 return; 26911 } 26912 if (!isString(value) || isBlank(value)) { 26913 logWarn(TRIGGER_VIEW, VIEW_NAME_ERROR, value); 26914 addClientTrace({ 26915 source: TRIGGER_VIEW, 26916 view: value, 26917 error: VIEW_NAME_ERROR 26918 }); 26919 return; 26920 } 26921 var viewName = value.toLowerCase(); 26922 var options = getTriggerViewOptions(viewName, opts); 26923 logDebug(TRIGGER_VIEW, viewName, options); 26924 if (isAuthoringEnabled()) { 26925 handleAuthoringTriggeredView(options); 26926 return; 26927 } 26928 addClientTrace({ 26929 source: TRIGGER_VIEW, 26930 view: viewName, 26931 options: options 26932 }); 26933 handleTriggeredView(options); 26934} 26935setupListeners(); 26936 26937var COMMON_MBOX_WARN = 26938 "function has been deprecated. Please use getOffer() and applyOffer() functions instead."; 26939var REGISTER_EXTENSION_WARN = 26940 "adobe.target.registerExtension() function has been deprecated. Please review the documentation for alternatives."; 26941var MBOX_CREATE_WARN = "mboxCreate() " + COMMON_MBOX_WARN; 26942var MBOX_DEFINE_WARN = "mboxDefine() " + COMMON_MBOX_WARN; 26943var MBOX_UPDATE_WARN = "mboxUpdate() " + COMMON_MBOX_WARN; 26944function registerExtension() { 26945 logWarn(REGISTER_EXTENSION_WARN, arguments); 26946} 26947function mboxCreate() { 26948 logWarn(MBOX_CREATE_WARN, arguments); 26949} 26950function mboxDefine() { 26951 logWarn(MBOX_DEFINE_WARN, arguments); 26952} 26953function mboxUpdate() { 26954 logWarn(MBOX_UPDATE_WARN, arguments); 26955} 26956 26957var TARGET_STORAGE_PREFIX = "tgt"; 26958var REGEX_TARGET_LOCAL_STORAGE_KEY = /^tgt:.+/i; 26959var isTargetLocalStorageKey = function isTargetLocalStorageKey(key) { 26960 return REGEX_TARGET_LOCAL_STORAGE_KEY.test(key); 26961}; 26962function localStorageAvailable() { 26963 try { 26964 var storage = window["localStorage"]; 26965 var x = "__storage_test__"; 26966 storage.setItem(x, x); 26967 storage.removeItem(x); 26968 return true; 26969 } catch (e) { 26970 return false;
26971 } 26972} 26973function clearTargetLocalStorage() { 26974 Object.keys(localStorage) 26975 .filter(isTargetLocalStorageKey) 26976 .forEach(function(key) { 26977 return localStorage.removeItem(key); 26978 }); 26979} 26980function storeJsonInLocalStorage(key, jsonValue) { 26981 try { 26982 localStorage.setItem(key, JSON.stringify(jsonValue)); 26983 } catch (err) { 26984 clearTargetLocalStorage(); 26985 } 26986} 26987 26988var INDEX_START_VALUE = -1; 26989var BASE_10 = 10; 26990var TELEMETRY_TOKEN = "tlm"; 26991var TELEMETRY_STORAGE_PREFIX = TARGET_STORAGE_PREFIX + ":" + TELEMETRY_TOKEN; 26992var LOWER_BOUND_INDEX_KEY = TELEMETRY_STORAGE_PREFIX + ":lower"; 26993var UPPER_BOUND_INDEX_KEY = TELEMETRY_STORAGE_PREFIX + ":upper"; 26994function LocalStorageTelemetryStore() { 26995 function getTelemetryCacheKey(index) { 26996 return TELEMETRY_STORAGE_PREFIX + ":" + index; 26997 } 26998 function getIndex(key) { 26999 var indexStr = localStorage.getItem(key); 27000 var index = parseInt(indexStr, BASE_10); 27001 if (Number.isNaN(index)) { 27002 index = INDEX_START_VALUE; 27003 } 27004 return index; 27005 } 27006 function setIndex(key, index) { 27007 localStorage.setItem(key, index); 27008 } 27009 function incrementIndex() { 27010 var index = getIndex(UPPER_BOUND_INDEX_KEY) + 1; 27011 setIndex(UPPER_BOUND_INDEX_KEY, index); 27012 return index; 27013 } 27014 function setTelemetryEntry(index, entry) { 27015 storeJsonInLocalStorage(getTelemetryCacheKey(index), entry); 27016 } 27017 function popTelemetryEntry(index) { 27018 var key = getTelemetryCacheKey(index); 27019 var item = localStorage.getItem(key); 27020 localStorage.removeItem(key); 27021 return item; 27022 } 27023 function getAndClearAllTelemetryEntries() { 27024 var entries = []; 27025 var lowerBoundIndex = getIndex(LOWER_BOUND_INDEX_KEY) || INDEX_START_VALUE; 27026 var upperBoundIndex = getIndex(UPPER_BOUND_INDEX_KEY) || INDEX_START_VALUE; 27027 for (var i = upperBoundIndex; i > lowerBoundIndex; i -= 1) { 27028 var entry = popTelemetryEntry(i); 27029 if (entry) { 27030 entries.push(JSON.parse(entry)); 27031 } 27032 } 27033 setIndex(LOWER_BOUND_INDEX_KEY, upperBoundIndex); 27034 return entries; 27035 } 27036 function addEntry(entry) { 27037 var index = incrementIndex(); 27038 setTelemetryEntry(index, entry); 27039 } 27040 function getAndClearEntries() { 27041 return getAndClearAllTelemetryEntries(); 27042 } 27043 function hasEntries() { 27044 var mostRecentKey = getTelemetryCacheKey(getIndex(UPPER_BOUND_INDEX_KEY)); 27045 return !!localStorage.getItem(mostRecentKey); 27046 } 27047 return { 27048 addEntry: addEntry, 27049 getAndClearEntries: getAndClearEntries, 27050 hasEntries: hasEntries 27051 }; 27052} 27053 27054function overridePublicApi(win) { 27055 win.adobe = win.adobe || {}; 27056 win.adobe.target = { 27057 VERSION: "", 27058 event: {}, 27059 getOffer: noop, 27060 getOffers: noopPromise, 27061 applyOffer: noop, 27062 applyOffers: noopPromise, 27063 sendNotifications: noop, 27064 trackEvent: noop, 27065 triggerView: noop, 27066 registerExtension: noop, 27067 init: noop 27068 }; 27069 win.mboxCreate = noop; 27070 win.mboxDefine = noop; 27071 win.mboxUpdate = noop; 27072} 27073function init(win, doc, settings) { 27074 if ( 27075 win.adobe && 27076 win.adobe.target && 27077 typeof win.adobe.target.getOffer !== "undefined" 27078 ) { 27079 logWarn(ALREADY_INITIALIZED); 27080 return; 27081 } 27082 initConfig(settings); 27083 var config = getConfig(); 27084 var version = config[VERSION]; 27085 win.adobe = win.adobe || {}; 27086 win.adobe.target = win.adobe.target || {}; 27087 win.adobe.target.VERSION = version; 27088 win.adobe.target.event = { 27089 LIBRARY_LOADED: LIBRARY_LOADED, 27090 REQUEST_START: REQUEST_START, 27091 REQUEST_SUCCEEDED: REQUEST_SUCCEEDED, 27092 REQUEST_FAILED: REQUEST_FAILED, 27093 CONTENT_RENDERING_START: CONTENT_RENDERING_START, 27094 CONTENT_RENDERING_SUCCEEDED: CONTENT_RENDERING_SUCCEEDED, 27095 CONTENT_RENDERING_FAILED: CONTENT_RENDERING_FAILED, 27096 CONTENT_RENDERING_NO_OFFERS: CONTENT_RENDERING_NO_OFFERS, 27097 CONTENT_RENDERING_REDIRECT: CONTENT_RENDERING_REDIRECT 27098 }; 27099 if (!config[ENABLED]) { 27100 overridePublicApi(win); 27101 logWarn(DELIVERY_DISABLED); 27102 return; 27103 } 27104 win.__target_telemetry = TelemetryProvider( 27105 config[TELEMETRY_ENABLED_SETTING], 27106 config[DECISIONING_METHOD_SETTING], 27107 localStorageAvailable() ? LocalStorageTelemetryStore() : undefined 27108 ); 27109 initTraces(); 27110 initAuthoringCode(); 27111 initQaMode(win); 27112 initPreviewMode(win); 27113 win.adobe.target.getOffer = getOffer; 27114 win.adobe.target.getOffers = getOffers; 27115 win.adobe.target.applyOffer = applyOffer; 27116 win.adobe.target.applyOffers = applyOffers; 27117 win.adobe.target.sendNotifications = sendNotifications; 27118 win.adobe.target.trackEvent = trackEvent; 27119 win.adobe.target.triggerView = triggerView; 27120 win.adobe.target.registerExtension = registerExtension; 27121 win.mboxCreate = mboxCreate; 27122 win.mboxDefine = mboxDefine; 27123 win.mboxUpdate = mboxUpdate; 27124 notifyLibraryLoaded(); 27125} 27126var bootstrapLaunch = { 27127 init: init, 27128 initConfig: initConfig, 27129 initDelivery: initDelivery 27130}; 27131 27132module.exports = bootstrapLaunch; 27133 27134 } 27135 27136 }, 27137 "adobe-target-v2/lib/modules/page-load.js": { 27138 "script": function(module, exports, require, turbine) { 27139"use strict"; 27140 27141var _librarySettings = require("../librarySettings"); 27142 27143var win = require("@adobe/reactor-window"); /* eslint-disable import/no-extraneous-dependencies */ 27144 27145var overrideProps = require("./object-override"); 27146 27147var _require = require("./params-store"), 27148 getParams = _require.getParams, 27149 getPageLoadParams = _require.getPageLoadParams; 27150 27151var _require2 = require("../targetSettings"), 27152 targetSettings = _require2.targetSettings; 27153 27154module.exports = function (settings) { 27155 targetSettings.mboxParams = getParams(); 27156 targetSettings.globalMboxParams = getPageLoadParams(); 27157 27158 overrideProps(targetSettings, settings, ["bodyHidingEnabled", "bodyHiddenStyle"]); 27159 27160 overrideProps(targetSettings, win.targetGlobalSettings || {}, ["enabled", "bodyHidingEnabled", "bodyHiddenStyle"]); 27161 overrideProps(targetSettings, _librarySettings.TARGET_DEFAULT_SETTINGS || {}, ["version"]); 27162 27163 return targetSettings; 27164}; 27165 } 27166 27167 }, 27168 "adobe-target-v2/lib/messages.js": { 27169 "script": function(module, exports, require, turbine) { 27170"use strict"; 27171 27172module.exports = { 27173 ALREADY_INITIALIZED: "AT: Adobe Target has already been initialized.", 27174 DELIVERY_DISABLED: "AT: Adobe Target content delivery is disabled. Update your DOCTYPE to support Standards mode.", 27175 NO_REQUEST: "AT: Target library is either not loaded or disabled, no request will be executed" 27176}; 27177 } 27178 27179 }, 27180 "adobe-target-v2/lib/librarySettings.js": { 27181 "script": function(module, exports, require, turbine) { 27182"use strict"; 27183 27184var TARGET_DEFAULT_SETTINGS = { 27185 version: "2.11.9" 27186}; 27187 27188module.exports = { 27189 TARGET_DEFAULT_SETTINGS: TARGET_DEFAULT_SETTINGS 27190}; 27191 } 27192 27193 }, 27194 "adobe-target-v2/lib/modules/object-override.js": { 27195 "script": function(module, exports, require, turbine) { 27196"use strict"; 27197 27198function overrideProp(overriden, overriding, field, undef) { 27199 if (overriding[field] !== undef) { 27200 overriden[field] = overriding[field]; //eslint-disable-line 27201 } 27202} 27203 27204function subsetFilter(key) { 27205 if (Array.isArray(this.subset)) { 27206 return this.subset.indexOf(key) !== -1; 27207 } 27208 return true; 27209} 27210 27211module.exports = function (overriden, overriding, subset) { 27212 Object.keys(overriding).filter(subsetFilter, { subset: subset }
27212).forEach(function (key) { 27213 overrideProp(overriden, overriding, key); 27214 }); 27215}; 27216 } 27217 27218 }, 27219 "adobe-target-v2/lib/modules/params-store.js": { 27220 "script": function(module, exports, require, turbine) { 27221"use strict"; 27222 27223var overrideProps = require("./object-override"); 27224 27225var params = {}; 27226var pageLoadParams = {}; 27227 27228function isComplexParam(param) { 27229 if (typeof param === "undefined" || param == null) return false; 27230 return Object.prototype.hasOwnProperty.call(param, "value") && param.checked != null; 27231} 27232 27233function processParams(items) { 27234 var result = {}; 27235 var keys = Object.keys(items); 27236 27237 keys.forEach(function (key) { 27238 var param = items[key]; 27239 27240 if (!isComplexParam(param)) { 27241 result[key] = param; 27242 return; 27243 } 27244 27245 var checked = param.checked, 27246 value = param.value; 27247 27248 27249 if (checked && value === "") { 27250 return; 27251 } 27252 27253 result[key] = value; 27254 }); 27255 27256 return result; 27257} 27258 27259function mergeParams(items) { 27260 var processedParams = processParams(items); 27261 overrideProps(params, processedParams); 27262} 27263 27264function mergePageLoadParams(items) { 27265 var processedParams = processParams(items); 27266 overrideProps(pageLoadParams, processedParams); 27267} 27268 27269function getParams() { 27270 return params; 27271} 27272 27273function getPageLoadParams() { 27274 return pageLoadParams; 27275} 27276 27277module.exports = {
27278 mergeParams: mergeParams, 27279 mergePageLoadParams: mergePageLoadParams, 27280 getParams: getParams, 27281 getPageLoadParams: getPageLoadParams 27282}; 27283 } 27284 27285 }, 27286 "adobe-target-v2/lib/targetSettings.js": { 27287 "script": function(module, exports, require, turbine) { 27288"use strict"; 27289 27290var extensionSettings = turbine.getExtensionSettings(); 27291var targetSettings = extensionSettings.targetSettings || {}; 27292 27293module.exports = { 27294 extensionSettings: extensionSettings, 27295 targetSettings: targetSettings 27296}; 27297 } 27298 27299 }, 27300 "adobe-target-v2/lib/modules/load-target.js": { 27301 "script": function(module, exports, require, turbine) { 27302"use strict"; 27303 27304/* eslint-disable import/no-extraneous-dependencies */ 27305var win = require("@adobe/reactor-window"); 27306var doc = require("@adobe/reactor-document"); 27307var Promise = require("@adobe/reactor-promise"); 27308var messages = require("../messages"); 27309 27310var _require = require("./params-store"), 27311 getParams = _require.getParams, 27312 getPageLoadParams = _require.getPageLoadParams; 27313 27314var _require2 = require("../targetSettings"), 27315 targetSettings = _require2.targetSettings; 27316 27317var overrideProps = require("./object-override"); 27318 27319var _require3 = require("../librarySettings"), 27320 TARGET_DEFAULT_SETTINGS = _require3.TARGET_DEFAULT_SETTINGS; 27321 27322var _require4 = require("./validation"), 27323 validTimeout = _require4.validTimeout; 27324 27325var OVERRIDABLE_SETTINGS = ["enabled", "clientCode", "imsOrgId", "serverDomain", "cookieDomain", "timeout", "defaultContentHiddenStyle", "defaultContentVisibleStyle", "bodyHiddenStyle", "bodyHidingEnabled", "selectorsPollingTimeout", "visitorApiTimeout", "overrideMboxEdgeServer", "overrideMboxEdgeServerTimeout", "optoutEnabled", "optinEnabled", "secureOnly", "supplementalDataIdParamTimeout", "authoringScriptUrl", "urlSizeLimit", "endpoint", "pageLoadEnabled", "viewsEnabled", "analyticsLogging", "serverState", "globalMboxName", "decisioningMethod"]; 27326 27327function isStandardMode(document) { 27328 var compatMode = document.compatMode, 27329 documentMode = document.documentMode; 27330 27331 var standardMode = compatMode && compatMode === "CSS1Compat"; 27332 var ie9OrModernBrowser = documentMode ? documentMode >= 9 : true; 27333 27334 return standardMode && ie9OrModernBrowser; 27335} 27336 27337function overridePublicApi(window) { 27338 /* eslint-disable no-param-reassign */ 27339 var noop = function noop() {}; 27340 var noopPromise = function noopPromise() { 27341 return Promise.resolve(); 27342 }; 27343 window.adobe = window.adobe || {}; 27344 window.adobe.target = { 27345 VERSION: "", 27346 event: {}, 27347 getOffer: noop, 27348 getOffers: noopPromise, 27349 applyOffer: noop, 27350 applyOffers: noopPromise, 27351 sendNotifications: noop, 27352 trackEvent: noop, 27353 triggerView: noop, 27354 registerExtension: noop, 27355 init: noop 27356 }; 27357 window.mboxCreate = noop; 27358 window.mboxDefine = noop; 27359 window.mboxUpdate = noop; 27360 /* eslint-disable no-param-reassign */ 27361} 27362 27363function isLibraryPresent() { 27364 return win.adobe && win.adobe.target && typeof win.adobe.target.getOffer !== "undefined"; 27365} 27366 27367function initLibrarySettings() { 27368 if (isLibraryPresent()) { 27369 turbine.logger.warn(messages.ALREADY_INITIALIZED); 27370 return null; 27371 } 27372 27373 targetSettings.mboxParams = getParams(); 27374 targetSettings.globalMboxParams = getPageLoadParams(); 27375 27376 overrideProps(targetSettings, win.targetGlobalSettings || {}, OVERRIDABLE_SETTINGS); 27377 overrideProps(targetSettings, TARGET_DEFAULT_SETTINGS || {}, ["version"]); 27378 27379 if (!isStandardMode(doc)) { 27380 targetSettings.enabled = false; 27381 27382 turbine.logger.warn(messages.DELIVERY_DISABLED); 27383 } 27384 27385 targetSettings.timeout = validTimeout(targetSettings.timeout); 27386 27387 return targetSettings; 27388} 27389 27390module.exports = { 27391 initLibrarySettings: initLibrarySettings, 27392 overridePublicApi: overridePublicApi 27393}; 27394 } 27395 27396 }, 27397 "adobe-target-v2/lib/modules/optin.js": { 27398 "script": function(module, exports, require, turbine) { 27399"use strict"; 27400 27401var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 27402 27403/* eslint-disable import/no-extraneous-dependencies */ 27404var win = require("@adobe/reactor-window"); 27405 27406var ADOBE = win.adobe; 27407var IS_APPROVED = "isApproved"; 27408var OPTIN_ENABLED = "optinEnabled"; 27409var OPT_IN = "optIn";
27410var FETCH_PERMISSIONS = "fetchPermissions"; 27411var CATEGORIES = "Categories"; 27412var TARGET = "TARGET"; 27413 27414var _require = require("../targetSettings"), 27415 targetSettings = _require.targetSettings; 27416 27417function isNil(value) { 27418 var type = typeof value === "undefined" ? "undefined" : _typeof(value); 27419 return type === "undefined" || value === null; 27420} 27421function isFunction(value) { 27422 var type = typeof value === "undefined" ? "undefined" : _typeof(value); 27423 return value !== null && (type === "object" || type === "function"); 27424} 27425 27426function isOptInAPIAvailable(optIn) { 27427 return isFunction(optIn[FETCH_PERMISSIONS]) && isFunction(optIn[IS_APPROVED]); 27428} 27429 27430function optInEnabled(adobe, optedInEnabled) { 27431 if (!optedInEnabled) { 27432 return false; 27433 } 27434 if (isNil(adobe)) { 27435 return false; 27436 } 27437 if (isNil(adobe[OPT_IN])) { 27438 return false; 27439 } 27440 return isOptInAPIAvailable(adobe[OPT_IN]); 27441} 27442 27443function isCategoryOptedIn(optInApi, category) { 27444 return optInApi[IS_APPROVED](category); 27445} 27446 27447function isTargetApproved() { 27448 var optInApi = ADOBE[OPT_IN]; 27449 var targetCategory = optInApi[CATEGORIES][TARGET]; 27450 return isCategoryOptedIn(optInApi, targetCategory); 27451} 27452 27453function shouldUseOptIn() { 27454 var optedInEnabled = targetSettings[OPTIN_ENABLED]; 27455 return optInEnabled(ADOBE, optedInEnabled); 27456} 27457 27458module.exports = { 27459 shouldUseOptIn: shouldUseOptIn, 27460 isTargetApproved: isTargetApproved 27461}; 27462 } 27463 27464 }, 27465 "adobe-target-v2/lib/analyticsIntegration.js": { 27466 "script": function(module, exports, require, turbine) { 27467"use strict"; 27468 27469/* eslint-disable import/no-extraneous-dependencies */ 27470var doc = require("@adobe/reactor-document"); 27471var Promise = require("@adobe/reactor-promise"); 27472 27473var _require = require("./modules/event-util"), 27474 addEventListener = _require.addEventListener, 27475 removeEventListener = _require.removeEventListener; 27476 27477var _require2 = require("./targetSettings"), 27478 extensionSettings = _require2.extensionSettings; 27479 27480var augmentTracker = turbine.getSharedModule("adobe-analytics", "augment-tracker"); 27481var REQUEST_SUCCEEDED = "at-request-succeeded"; 27482var REQUEST_FAILED = "at-request-failed"; 27483 27484function handleTracker(tracker, promise) { 27485 return new Promise(function (resolve) { 27486 if (!tracker) { 27487 resolve(); 27488 return; 27489 } 27490 27491 promise.then(function (abortPromise) { 27492 if (abortPromise) { 27493 tracker.abort = true; 27494 } 27495 resolve(); 27496 }); 27497 }); 27498} 27499 27500function requestHandler(func) { 27501 if (!func) { 27502 return; 27503 } 27504 27505 var promise = new Promise(function (resolve) { 27506 var timerId = setTimeout(function () { 27507 resolve(false); 27508 }, extensionSettings.targetSettings.timeout); 27509 27510 var requestSuccess = function requestSuccess(e) { 27511 if (e.detail && e.detail.redirect === true) { 27512 resolve(true); 27513 } else { 27514 resolve(false); 27515 } 27516 27517 clearTimeout(timerId); 27518 removeEventListener(doc, e, requestSuccess); 27519 }; 27520 var requestFail = function requestFail(e) { 27521 resolve(false); 27522 clearTimeout(timerId); 27523 removeEventListener(doc, e, requestFail); 27524 }; 27525 27526 addEventListener(doc, REQUEST_SUCCEEDED, requestSuccess); 27527 addEventListener(doc, REQUEST_FAILED, requestFail); 27528 }); 27529 27530 func(function (tracker) { 27531 return handleTracker(tracker, promise); 27532 }); 27533} 27534 27535module.exports = function () { 27536 requestHandler(augmentTracker); 27537}; 27538 } 27539 27540 }, 27541 "adobe-target-v2/lib/modules/validation.js": { 27542 "script": function(module, exports, require, turbine) { 27543"use strict"; 27544 27545var DEFAULT_TIMEOUT = 3000; 27546var MAXIMUM_TIMEOUT_VALUE = 99999; 27547var MINIMUM_TIMEOUT_VALUE = 0; 27548 27549function validTimeout(userInputTimeoutString) { 27550 var timeoutNumber = Number(userInputTimeoutString); 27551 27552 /* The timeout value (as entered on the extension config page) is a string. 27553 This is to allow it to be set to a data element template string. 27554 But since strings are allowed, a user could enter an invalid string like "abc" 27555 which is not a data element, nor a valid parsable number. In that case we return the default timeout value. 27556 */ 27557 return Number.isNaN(timeoutNumber) ? DEFAULT_TIMEOUT : Math.min(MAXIMUM_TIMEOUT_VALUE, Math.max(MINIMUM_TIMEOUT_VALUE, timeoutNumber)); 27558} 27559 27560module.exports = { 27561 validTimeout: validTimeout 27562}; 27563 } 27564 27565 }, 27566 "adobe-target-v2/lib/modules/event-util.js": { 27567 "script": function(module, exports, require, turbine) { 27568"use strict"; 27569 27570function addEventListener(elem, type, handler) { 27571 elem.addEventListener(type, handler); 27572} 27573 27574function removeEventListener(elem, type, handler) { 27575 elem.removeEventListener(type, handler); 27576} 27577 27578module.exports = { 27579 addEventListener: addEventListener, 27580 removeEventListener: removeEventListener 27581}; 27582 } 27583 27584 } 27585 } 27586 } 27587 }, 27588 "company": { 27589 "orgId": "B3902DB45388D9620A490D4C@AdobeOrg", 27590 "dynamicCdnEnabled": false 27591 }, 27592 "property": { 27593 "name": "ni.com (AWS self-hosted)", 27594 "settings": { 27595 "domains": [ 27596 "ni.com" 27597 ], 27598 "undefinedVarsReturnEmpty": false, 27599 "ruleComponentSequencingEnabled": false 27600 }, 27601 "id": "PR4b42d3c13e7248b8adde9132443ecec6" 27602 }, 27603 "rules": [ 27604 { 27605 "id": "RL02a64041e874403988a5970e6fb6f8af", 27606 "name": "EventPaginationClick:EBR", 27607 "events": [ 27608 { 27609 "modulePath": "core/src/lib/events/click.js", 27610 "settings": { 27611 "elementSelector": ".nicrc--pagination-nav__list", 27612 "bubbleFireIfParent": true, 27613 "bubbleFireIfChildFired": true 27614 }, 27615 "ruleOrder": 50.0 27616 } 27617 ], 27618 "conditions": [ 27619 { 27620 "modulePath": "core/src/lib/conditions/customCode.js", 27621 "settings": { 27622 "source": function(event, target) { 27623 return /^\/[a-z]{2}(?:-[a-z]{2})?\/events\.html$/i.test(window.location.pathname); 27624} 27625 } 27626 } 27627 ], 27628 "actions": [ 27629 { 27630 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 27631 "settings": { 27632 "customSetup": { 27633 "source": function(event, s) { 27634 const tooltip = event.target.closest('.nicrc--popover-container')?.querySelector('.nicrc--tooltip-content'); 27635const activePage = document.querySelector('.nicrc--pagination-nav__list a.nicrc--pagination-nav__page.nicrc--pagination-nav__page--active')?.getAttribute('data-page'); 27636const pageLink = event.target.closest('.nicrc--pagination-nav__page'); 27637let selectedPage = null; 27638if (pageLink) { 27639 selectedPage = pageLink.dataset.page; 27640} else { 27641 const container = event.target.closest('.nicrc--popover-container'); 27642 if (container){ 27643 const label = container.querySelector('.nicrc--tooltip-content')?.textContent?.trim(); 27644 if (label === 'Previous') { 27645 selectedPage = 'left arrow'; 27646 } else if (label === 'Next'){ 27647 selectedPage = 'right arrow'; 27648 } 27649 } 27650} 27651NIAnalytics.setAndTrack(["eVar33", "prop23"], "Events:"+activePage+":"+selectedPage); 27652} 27653 }, 27654 "trackerProperties": { 27655 "eVars": [ 27656 { 27657 "name": "eVar1", 27658 "type": "value", 27659 "value": "%PAGE_NAME%" 27660 }, 27661 { 27662 "name": "eVar21", 27663 "type": "value", 27664 "value": "%PAGE_URL%" 27665 }, 27666 { 27667 "name": "eVar56", 27668 "type": "value",
27669 "value": "%DETAILED_PAGENAME%" 27670 } 27671 ], 27672 "props": [ 27673 { 27674 "name": "prop2", 27675 "type": "value", 27676 "value": "%CONTENTTYPE:METATAG%" 27677 }, 27678 { 27679 "name": "prop33", 27680 "type": "alias", 27681 "value": "eVar21" 27682 } 27683 ], 27684 "events": [ 27685 { 27686 "name": "event30" 27687 } 27688 ] 27689 } 27690 } 27691 }, 27692 { 27693 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 27694 "settings": { 27695 "type": "link", 27696 "linkName": "Event pagination click", 27697 "linkType": "o" 27698 } 27699 }, 27700 { 27701 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 27702 "settings": {} 27703 } 27704 ] 27705 }, 27706 { 27707 "id": "RL0457d94f810245238783bf2020c92b97", 27708 "name": "Capture_Multimedia:DCR", 27709 "events": [ 27710 { 27711 "modulePath": "core/src/lib/events/directCall.js", 27712 "settings": { 27713 "identifier": "captureMultimedia" 27714 }, 27715 "ruleOrder": 50.0 27716 } 27717 ], 27718 "conditions": [ 27719 { 27720 "modulePath": "core/src/lib/conditions/valueComparison.js", 27721 "settings": { 27722 "comparison": { 27723 "operator": "doesNotEqual", 27724 "caseInsensitive": true 27725 }, 27726 "leftOperand": "%DisableAnalyticsCookie%", 27727 "rightOperand": "true" 27728 } 27729 }, 27730 { 27731 "modulePath": "core/src/lib/conditions/valueComparison.js", 27732 "settings": { 27733 "comparison": { 27734 "operator": "doesNotEqual", 27735 "caseInsensitive": true 27736 }, 27737 "leftOperand": "%TRAFFICTYPE_META%", 27738 "rightOperand": "bot" 27739 } 27740 } 27741 ], 27742 "actions": [ 27743 { 27744 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 27745 "settings": { 27746 "customSetup": { 27747 "source": function(event, s) { 27748 var gbroot; 27749if (event && event.detail && event.detail.gbroot) gbroot = event.detail.gbroot.replace(/^\s+|\s+$/gm,'').replace(/GB_/g,''); 27750 27751if(gbroot){ 27752 if(gbroot.slice(0,3) !== "GB_"){ 27753 if(gbroot.toLowerCase().slice(0,3) === "gb_"){ 27754 gbroot = "GB_"+gbroot.slice(3,gbroot.length); 27755 }else{ 27756 gbroot = "GB_"+gbroot; 27757 } 27758 } 27759 27760 NIAnalytics.setAndTrack("eVar79", gbroot); 27761} 27762 27763if(event.detail.eventLabel){ 27764 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.detail.eventName+":"+event.detail.eventLabel); 27765} else { 27766 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.detail.eventName+":"+digitalData.media); 27767} 27768 27769if(event.detail.eventAction){ 27770 if(event.detail.eventLabel){ 27771 NIAnalytics.setAndTrack(["eVar30", "prop22"], event.detail.eventLabel); 27772 } else { 27773 NIAnalytics.setAndTrack(["eVar30", "prop22"], digitalData.media); 27774 } 27775 27776 switch(event.detail.eventAction){ 27777 case "start": 27778 NIAnalytics.setAndTrack("eVar12", NIAnalytics.getDataElement("PROFILE_ID:COOKIE")); 27779 NIAnalytics.setAndTrack(["eVar27", "prop2"], NIAnalytics.getDataElement("CONTENTTYPE:METATAG")); 27780 NIAnalytics.setAndTrack(["event15", "event30"], ""); 27781 NIAnalytics.setAndTrack(["eVar21", "prop33"], NIAnalytics.getDataElement("PAGE_URL")); 27782 _satellite.track("merkleVideo", {"action": event.detail.eventAction}); 27783 break; 27784 case "complete": 27785 NIAnalytics.setAndTrack("event16", ""); 27786 _satellite.track("merkleVideo", {"action": event.detail.eventAction}); 27787 break; 27788 } 27789} 27790 27791} 27792 }, 27793 "trackerProperties": { 27794 "eVars": [ 27795 { 27796 "name": "eVar1", 27797 "type": "value", 27798 "value": "%PAGE_NAME%" 27799 }, 27800 { 27801 "name": "eVar56", 27802 "type": "value", 27803 "value": "%DETAILED_PAGENAME%" 27804 }, 27805 { 27806 "name": "eVar101", 27807 "type": "value", 27808 "value": "%HASHED_EMAIL:USER:DL%" 27809 } 27810 ], 27811 "props": [ 27812 { 27813 "name": "prop50", 27814 "type": "alias", 27815 "value": "eVar56" 27816 } 27817 ] 27818 } 27819 } 27820 }, 27821 { 27822 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 27823 "settings": { 27824 "type": "link", 27825 "linkType": "o" 27826 } 27827 }, 27828 { 27829 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 27830 "settings": {} 27831 } 27832 ] 27833 }, 27834 { 27835 "id": "RL0807e7382de946d2bad8a515f91009e8", 27836 "name": "FreeTrial-Download:DCR", 27837 "events": [ 27838 { 27839 "modulePath": "core/src/lib/events/customEvent.js", 27840 "settings": { 27841 "type": "aa-free-trial-download", 27842 "bubbleFireIfParent": true, 27843 "bubbleFireIfChildFired": true 27844 }, 27845 "ruleOrder": 50.0 27846 } 27847 ], 27848 "conditions": [], 27849 "actions": [ 27850 { 27851 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 27852 "settings": { 27853 "trackerProperties": { 27854 "eVars": [ 27855 { 27856 "name": "eVar1", 27857 "type": "value", 27858 "value": "%PAGE_NAME%" 27859 }, 27860 { 27861 "name": "eVar12", 27862 "type": "value", 27863 "value": "%PROFILE_ID:COOKIE%" 27864 }, 27865 { 27866 "name": "eVar21", 27867 "type": "value", 27868 "value": "%PAGE_URL%" 27869 }, 27870 { 27871 "name": "eVar27", 27872 "type": "value", 27873 "value": "%CONTENTTYPE:METATAG%" 27874 }, 27875 { 27876 "name": "eVar33", 27877 "type": "value", 27878 "value": "FreeTrial: Download" 27879 } 27880 ], 27881 "props": [ 27882 { 27883 "name": "prop2", 27884 "type": "alias", 27885 "value": "eVar27" 27886 }, 27887 { 27888 "name": "prop23", 27889 "type": "alias", 27890 "value": "eVar33" 27891 }, 27892 { 27893 "name": "prop33", 27894 "type": "alias", 27895 "value": "eVar21" 27896 } 27897 ], 27898 "events": [ 27899 { 27900 "name": "event30" 27901 } 27902 ] 27903 } 27904 } 27905 }, 27906 { 27907 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 27908 "settings": { 27909 "type": "link", 27910 "linkName": "FreeTrial Download", 27911 "linkType": "o" 27912 } 27913 }, 27914 { 27915 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 27916 "settings": {} 27917 } 27918 ] 27919 }, 27920 { 27921 "id": "RL0d70c70716264e99b050e3f08561c1e0", 27922 "name": "Create_Account_Link:DCR", 27923 "events": [ 27924 { 27925 "modulePath": "core/src/lib/events/click.js", 27926 "settings": { 27927 "elementSelector": ".analytics-header-createaccount-link", 27928 "bubbleFireIfParent": true, 27929 "bubbleFireIfChildFired": true 27930 }, 27931 "ruleOrder": 50.0 27932 }, 27933 { 27934 "modulePath": "core/src/lib/events/click.js", 27935 "settings": { 27936 "elementSelector": ".ni-primary-link", 27937 "elementProperties": [ 27938 { 27939 "name": "id", 27940 "value": "LoginForm:createLink" 27941 } 27942 ], 27943 "bubbleFireIfParent": true, 27944 "bubbleFireIfChildFired": true 27945 }, 27946 "ruleOrder": 50.0 27947 }, 27948 { 27949 "modulePath": "core/src/lib/events/click.js", 27950 "settings": { 27951 "elementSelector": ".ni-btn-tertiary", 27952 "elementProperties": [ 27953 { 27954 "name": "id", 27955 "value": "CreateForm:continue" 27956 } 27957 ], 27958 "bubbleFireIfParent": true, 27959 "bubbleFireIfChildFired": true 27960 }, 27961 "ruleOrder": 50.0 27962 } 27963 ], 27964 "conditions": [ 27965 { 27966 "modulePath": "core/src/lib/conditions/valueComparison.js", 27967 "settings": { 27968 "comparison": { 27969 "operator": "doesNotEqual", 27970 "caseInsensitive": true 27971 }, 27972 "leftOperand": "%DisableAnalyticsCookie%", 27973 "rightOperand": "true" 27974 } 27975 }, 27976 { 27977 "modulePath": "core/src/lib/conditions/valueComparison.js", 27978 "settings": { 27979 "comparison": { 27980 "operator": "doesNotEqual", 27981 "caseInsensitive": true 27982 }, 27983 "leftOperand": "%TRAFFICTYPE_META%", 27984 "rightOperand": "bot" 27985 } 27986 } 27987 ], 27988 "actions": [ 27989 { 27990 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 27991 "settings": { 27992 "trackerProperties": { 27993 "eVars": [ 27994 { 27995 "name": "eVar1", 27996 "type": "value", 27997 "value": "%PAGE_NAME%" 27998 }, 27999 { 28000 "name": "eVar27", 28001 "type": "value", 28002 "value": "%CONTENTTYPE:METATAG%" 28003 }, 28004 { 28005 "name": "eVar28", 28006 "type": "value", 28007 "value": "user account creation" 28008 }, 28009 { 28010 "name": "eVar56", 28011 "type": "value",
28012 "value": "%DETAILED_PAGENAME%" 28013 }, 28014 { 28015 "name": "eVar79", 28016 "type": "value", 28017 "value": "%GUESTBOOK_CODE%" 28018 } 28019 ], 28020 "props": [ 28021 { 28022 "name": "prop2", 28023 "type": "alias", 28024 "value": "eVar27" 28025 }, 28026 { 28027 "name": "prop23", 28028 "type": "alias", 28029 "value": "eVar1" 28030 }, 28031 { 28032 "name": "prop50", 28033 "type": "alias", 28034 "value": "eVar56" 28035 } 28036 ], 28037 "events": [ 28038 { 28039 "name": "event51" 28040 } 28041 ], 28042 "pageName": "%PAGE_NAME%" 28043 } 28044 } 28045 }, 28046 { 28047 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 28048 "settings": { 28049 "type": "link", 28050 "linkType": "o" 28051 } 28052 }, 28053 { 28054 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 28055 "settings": {} 28056 } 28057 ] 28058 }, 28059 { 28060 "id": "RL0e0eb3d21f4547eaba4feb89140dae90", 28061 "name": "Get_Email:PLR", 28062 "events": [ 28063 { 28064 "modulePath": "core/src/lib/events/libraryLoaded.js", 28065 "settings": {}, 28066 "ruleOrder": 50.0 28067 } 28068 ], 28069 "conditions": [ 28070 { 28071 "modulePath": "core/src/lib/conditions/valueComparison.js", 28072 "settings": { 28073 "comparison": { 28074 "operator": "doesNotEqual", 28075 "caseInsensitive": true 28076 }, 28077 "leftOperand": "%DisableAnalyticsCookie%", 28078 "rightOperand": "true" 28079 } 28080 }, 28081 { 28082 "modulePath": "core/src/lib/conditions/valueComparison.js", 28083 "settings": { 28084 "comparison": { 28085 "operator": "equals" 28086 }, 28087 "leftOperand": "%NICOM_PAGE%", 28088 "rightOperand": "true" 28089 } 28090 } 28091 ], 28092 "actions": [ 28093 { 28094 "modulePath": "core/src/lib/actions/customCode.js", 28095 "settings": { 28096 "source": "if (typeof digitalData === \"undefined\") {\n digitalData = { };\n}\nif (typeof NIUA !== \"undefined\") {\n var myNIUA = NIUA.getNIUA({\"minutesBeforeExpire\": 2, \"apikey\":\"cd9a922c-dc20-436d-a09a-c7143406edfc\"});\n myNIUA.ready().then(function(){\n myNIUA.getEmail().then(function(data){\n if(data.response.success) {\n digitalData.valueToHash = data.response.email;\n NIAnalytics.createNestedObject( digitalData, [\"user\", \"hashedEmail\"], _satellite.getVar(\"MD5_HASH\"));\n }\n }, function(error){\n console.log(\"Error while processing email.\");\n });\n });\n}", 28097 "language": "javascript" 28098 } 28099 } 28100 ] 28101 }, 28102 { 28103 "id": "RL0fc09df00e4345d4b6781897babfd4cc", 28104 "name": "Search_Has_Keyword:PLR", 28105 "events": [ 28106 { 28107 "modulePath": "core/src/lib/events/windowLoaded.js", 28108 "settings": {}, 28109 "ruleOrder": 50.0 28110 }, 28111 { 28112 "modulePath": "core/src/lib/events/directCall.js", 28113 "settings": { 28114 "identifier": "captureVirtualPageLoad" 28115 }, 28116 "ruleOrder": 50.0 28117 } 28118 ], 28119 "conditions": [ 28120 { 28121 "modulePath": "core/src/lib/conditions/valueComparison.js", 28122 "settings": { 28123 "comparison": { 28124 "operator": "matchesRegex", 28125 "caseInsensitive": true 28126 }, 28127 "leftOperand": "%ONSITESEARCHTERM:OSI:OS:DL%", 28128 "rightOperand": "^(?!blank search term$).*$" 28129 } 28130 }, 28131 { 28132 "modulePath": "core/src/lib/conditions/valueComparison.js", 28133 "settings": { 28134 "comparison": { 28135 "operator": "equals" 28136 }, 28137 "leftOperand": "%NICOM_PAGE%", 28138 "rightOperand": "true" 28139 } 28140 }, 28141 { 28142 "modulePath": "core/src/lib/conditions/valueComparison.js", 28143 "settings": { 28144 "comparison": { 28145 "operator": "equals" 28146 }, 28147 "leftOperand": "%TEMPLATE:PI:PA:DL%", 28148 "rightOperand": "searchResults" 28149 } 28150 }, 28151 { 28152 "modulePath": "core/src/lib/conditions/valueComparison.js", 28153 "settings": { 28154 "comparison": { 28155 "operator": "doesNotEqual", 28156 "caseInsensitive": true 28157 }, 28158 "leftOperand": "%DisableAnalyticsCookie%", 28159 "rightOperand": "true" 28160 } 28161 }, 28162 { 28163 "modulePath": "core/src/lib/conditions/valueComparison.js", 28164 "settings": { 28165 "comparison": { 28166 "operator": "doesNotEqual", 28167 "caseInsensitive": true 28168 }, 28169 "leftOperand": "%TRAFFICTYPE_META%", 28170 "rightOperand": "bot" 28171 } 28172 } 28173 ], 28174 "actions": [ 28175 { 28176 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 28177 "settings": { 28178 "trackerProperties": { 28179 "events": [ 28180 { 28181 "name": "event1" 28182 } 28183 ] 28184 } 28185 } 28186 } 28187 ] 28188 }, 28189 { 28190 "id": "RL101016c5ece34e01b4df2ca3d7940567", 28191 "name": "Baidu_OpenLab_Conversion_Code:PLR", 28192 "events": [ 28193 { 28194 "modulePath": "core/src/lib/events/windowLoaded.js", 28195 "settings": {}, 28196 "ruleOrder": 50.0 28197 } 28198 ], 28199 "conditions": [ 28200 { 28201 "modulePath": "core/src/lib/conditions/valueComparison.js", 28202 "settings": { 28203 "comparison": { 28204 "operator": "isTrue" 28205 }, 28206 "leftOperand": "%OneTrust_Targeting_Consent%" 28207 } 28208 }, 28209 { 28210 "modulePath": "core/src/lib/conditions/valueComparison.js", 28211 "settings": { 28212 "comparison": { 28213 "operator": "doesNotEqual", 28214 "caseInsensitive": true 28215 }, 28216 "leftOperand": "%DisableAnalyticsCookie%", 28217 "rightOperand": "true" 28218 } 28219 }, 28220 { 28221 "modulePath": "core/src/lib/conditions/valueComparison.js", 28222 "settings": { 28223 "comparison": { 28224 "operator": "contains", 28225 "caseInsensitive": true 28226 }, 28227 "leftOperand": "%PAGE_URL%", 28228 "rightOperand": "campaigns.ni.com/e/f2" 28229 } 28230 }, 28231 { 28232 "modulePath": "core/src/lib/conditions/valueComparison.js", 28233 "settings": { 28234 "comparison": { 28235 "operator": "equals", 28236 "caseInsensitive": true 28237 }, 28238 "leftOperand": "%COUNTRY_METATAG%", 28239 "rightOperand": "CN" 28240 } 28241 } 28242 ], 28243 "actions": [ 28244 { 28245 "modulePath": "core/src/lib/actions/customCode.js", 28246 "settings": { 28247 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC15967cd405364690b36f686cec793730-source.js', 28248 "language": "javascript", 28249 "isExternal": true 28250 } 28251 }, 28252 { 28253 "modulePath": "core/src/lib/actions/customCode.js", 28254 "settings": { 28255 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC98cd97ff33a44b22a31a13e5ad9fc49b-source.js', 28256 "language": "javascript", 28257 "isExternal": true 28258 } 28259 } 28260 ] 28261 }, 28262 { 28263 "id": "RL12504b4187e84d9cb8bfe08caaa7dfed", 28264 "name": "FreeTrial-LearnAbout:DCR", 28265 "events": [ 28266 { 28267 "modulePath": "core/src/lib/events/customEvent.js", 28268 "settings": { 28269 "type": "aa-free-trial-trial_learn-about", 28270 "bubbleFireIfParent": true, 28271 "bubbleFireIfChildFired": true 28272 }, 28273 "ruleOrder": 50.0 28274 } 28275 ], 28276 "conditions": [], 28277 "actions": [ 28278 { 28279 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 28280 "settings": { 28281 "trackerProperties": { 28282 "eVars": [ 28283 { 28284 "name": "eVar1", 28285 "type": "value", 28286 "value": "%PAGE_NAME%" 28287 }, 28288 { 28289 "name": "eVar12", 28290 "type": "value", 28291 "value": "%PROFILE_ID:COOKIE%" 28292 }, 28293 { 28294 "name": "eVar21", 28295 "type": "value", 28296 "value": "%PAGE_URL%" 28297 }, 28298 { 28299 "name": "eVar27", 28300 "type": "value", 28301 "value": "%CONTENTTYPE:METATAG%" 28302 }, 28303 { 28304 "name": "eVar33", 28305 "type": "value", 28306 "value": "FreeTrial: Learn about" 28307 } 28308 ], 28309 "props": [ 28310 { 28311 "name": "prop2", 28312 "type": "alias", 28313 "value": "eVar27" 28314 }, 28315 { 28316 "name": "prop23", 28317 "type": "alias", 28318 "value": "eVar33" 28319 }, 28320 { 28321 "name": "prop33", 28322 "type": "alias", 28323 "value": "eVar21" 28324 } 28325 ], 28326 "events": [ 28327 { 28328 "name": "event30" 28329 } 28330 ] 28331 } 28332 } 28333 }, 28334 { 28335 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 28336 "settings": { 28337 "type": "link", 28338 "linkName": "FreeTrial Learn about", 28339 "linkType": "o" 28340 } 28341 }, 28342 { 28343 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 28344 "settings": {} 28345 } 28346 ] 28347 }, 28348 { 28349 "id": "RL12d0756d1ccf4db8aecc6c0a20aa6cf3", 28350 "name": "Renew SSP Add Click:DCR", 28351 "events": [ 28352 { 28353 "modulePath": "core/src/lib/events/customEvent.js", 28354 "settings": { 28355 "type": "aa-ssp-renewal-add-click", 28356 "bubbleFireIfParent": true, 28357 "bubbleFireIfChildFired": true 28358 }, 28359 "ruleOrder": 50.0 28360 } 28361 ], 28362 "conditions": [], 28363 "actions": [ 28364 { 28365 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 28366 "settings": { 28367 "customSetup": { 28368 "source": function(event, s) { 28369 NIAnalytics.setAndTrack(["eVar33","prop23"], "Renewal SSP_step2:add_product:"+event.detail.title); 28370} 28371 }, 28372 "trackerProperties": { 28373 "eVars": [ 28374 { 28375 "name": "eVar1", 28376 "type": "value", 28377 "value": "%PAGE_NAME%" 28378 }, 28379 { 28380 "name": "eVar12", 28381 "type": "value", 28382 "value": "%PROFILE_ID:COOKIE%" 28383 }, 28384 { 28385 "name": "eVar21", 28386 "type": "value", 28387 "value": "%PAGE_URL%" 28388 }, 28389 { 28390 "name": "eVar27", 28391 "type": "value", 28392 "value": "%CONTENTTYPE:METATAG%" 28393 } 28394 ], 28395 "props": [ 28396 { 28397 "name": "prop2", 28398 "type": "alias", 28399 "value": "eVar27" 28400 }, 28401 { 28402 "name": "prop33", 28403 "type": "alias", 28404 "value": "eVar21" 28405 } 28406 ], 28407 "events": [ 28408 { 28409 "name": "event30" 28410 } 28411 ] 28412 } 28413 } 28414 }, 28415 { 28416 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 28417 "settings": { 28418 "type": "link", 28419 "linkName": "Renew SSP Add Click", 28420 "linkType": "o" 28421 } 28422 }, 28423 { 28424 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 28425 "settings": {} 28426 } 28427 ] 28428 }, 28429 { 28430 "id": "RL12dd25586b33447c8279bb30a7a10fd9", 28431 "name": "SWPLP_POP_Click:EBR", 28432 "events": [ 28433 { 28434 "modulePath": "core/src/lib/events/click.js", 28435 "settings": { 28436 "bubbleStop": true, 28437 "elementSelector": ".aa-swplp-pop-link *", 28438 "bubbleFireIfParent": false, 28439 "bubbleFireIfChildFired": false 28440 }, 28441 "ruleOrder": 50.0 28442 } 28443 ], 28444 "conditions": [ 28445 { 28446 "modulePath": "core/src/lib/conditions/valueComparison.js", 28447 "settings": { 28448 "comparison": { 28449 "operator": "doesNotEqual", 28450 "caseInsensitive": true 28451 }, 28452 "leftOperand": "%DisableAnalyticsCookie%", 28453 "rightOperand": "true" 28454 } 28455 }, 28456 { 28457 "modulePath": "core/src/lib/conditions/valueComparison.js", 28458 "settings": { 28459 "comparison": { 28460 "operator": "doesNotEqual", 28461 "caseInsensitive": true 28462 }, 28463 "leftOperand": "%TRAFFICTYPE_META%", 28464 "rightOperand": "bot" 28465 } 28466 } 28467 ], 28468 "actions": [ 28469 { 28470 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 28471 "settings": { 28472 "customSetup": { 28473 "source": function(event, s) { 28474 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PLP:"+event.target.innerText); 28475} 28476 }, 28477 "trackerProperties": { 28478 "eVars": [ 28479 { 28480 "name": "eVar1", 28481 "type": "value", 28482 "value": "%PAGE_NAME%" 28483 }, 28484 { 28485 "name": "eVar12", 28486 "type": "value", 28487 "value": "%PROFILE_ID:COOKIE%" 28488 }, 28489 { 28490 "name": "eVar21", 28491 "type": "value", 28492 "value": "%PAGE_URL%" 28493 }, 28494 { 28495 "name": "eVar27", 28496 "type": "value", 28497 "value": "%CONTENTTYPE:METATAG%" 28498 } 28499 ], 28500 "props": [ 28501 { 28502 "name": "prop2", 28503 "type": "alias", 28504 "value": "eVar27" 28505 }, 28506 { 28507 "name": "prop33", 28508 "type": "alias", 28509 "value": "eVar21" 28510 } 28511 ], 28512 "events": [ 28513 { 28514 "name": "event30" 28515 } 28516 ] 28517 } 28518 } 28519 }, 28520 { 28521 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 28522 "settings": { 28523 "type": "link", 28524 "linkName": "SW PLP", 28525 "linkType": "o" 28526 } 28527 }, 28528 { 28529 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 28530 "settings": {} 28531 } 28532 ] 28533 }, 28534 { 28535 "id": "RL13d8b61eee1a4de4ae308fd2f70969bd", 28536 "name": "MerkleVideo:DCR", 28537 "events": [ 28538 { 28539 "modulePath": "core/src/lib/events/directCall.js", 28540 "settings": { 28541 "identifier": "merkleVideo" 28542 }, 28543 "ruleOrder": 50.0 28544 } 28545 ], 28546 "conditions": [ 28547 { 28548 "modulePath": "core/src/lib/conditions/valueComparison.js", 28549 "settings": { 28550 "comparison": { 28551 "operator": "isTrue" 28552 }, 28553 "leftOperand": "%OneTrust_Targeting_Consent%" 28554 } 28555 }, 28556 { 28557 "modulePath": "core/src/lib/conditions/valueComparison.js", 28558 "settings": { 28559 "comparison": { 28560 "operator": "doesNotEqual", 28561 "caseInsensitive": true 28562 }, 28563 "leftOperand": "%DisableAnalyticsCookie%", 28564 "rightOperand": "true" 28565 } 28566 } 28567 ], 28568 "actions": [ 28569 { 28570 "modulePath": "core/src/lib/actions/customCode.js", 28571 "settings": { 28572 "source": '//www.ni.com/70533feea
28572ce8/484b70bb80b7/0d0fc74c1602/RC085d051fca074002a7e521451624dd66-source.js', 28573 "language": "javascript", 28574 "isExternal": true 28575 } 28576 } 28577 ] 28578 }, 28579 { 28580 "id": "RL15753495dc584f3396c53fe54ded6001", 28581 "name": "Merkle:PLR", 28582 "events": [ 28583 { 28584 "modulePath": "core/src/lib/events/windowLoaded.js", 28585 "settings": {}, 28586 "ruleOrder": 50.0 28587 }, 28588 { 28589 "modulePath": "core/src/lib/events/directCall.js", 28590 "settings": { 28591 "identifier": "captureVirtualPageLoad" 28592 }, 28593 "ruleOrder": 50.0 28594 } 28595 ], 28596 "conditions": [ 28597 { 28598 "modulePath": "core/src/lib/conditions/valueComparison.js", 28599 "settings": { 28600 "comparison": { 28601 "operator": "isTrue" 28602 }, 28603 "leftOperand": "%OneTrust_Targeting_Consent%" 28604 } 28605 }, 28606 { 28607 "modulePath": "core/src/lib/conditions/valueComparison.js", 28608 "settings": { 28609 "comparison": { 28610 "operator": "doesNotEqual", 28611 "caseInsensitive": true 28612 }, 28613 "leftOperand": "%DisableAnalyticsCookie%", 28614 "rightOperand": "true" 28615 } 28616 } 28617 ], 28618 "actions": [ 28619 { 28620 "modulePath": "core/src/lib/actions/customCode.js", 28621 "settings": { 28622 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC99b4a8643bf54573ad2a01410c78068d-source.js', 28623 "language": "html", 28624 "isExternal": true 28625 } 28626 }, 28627 { 28628 "modulePath": "core/src/lib/actions/customCode.js", 28629 "settings": { 28630 "global": true, 28631 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCdd9dab594b5544d7817ef9370e4a9ada-source.js', 28632 "language": "javascript", 28633 "isExternal": true 28634 } 28635 }, 28636 { 28637 "modulePath": "core/src/lib/actions/customCode.js", 28638 "settings": { 28639 "global": true, 28640 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCa7a728778249457493addbb769c41977-source.js', 28641 "language": "javascript", 28642 "isExternal": true 28643 } 28644 }, 28645 { 28646 "modulePath": "core/src/lib/actions/customCode.js", 28647 "settings": { 28648 "global": true, 28649 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC15ec4e4dd4d14b68a1ea55f1846053f7-source.js', 28650 "language": "javascript", 28651 "isExternal": true 28652 } 28653 }, 28654 { 28655 "modulePath": "core/src/lib/actions/customCode.js", 28656 "settings": { 28657 "global": true, 28658 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC553077167084441080830cd23d72cdba-source.js', 28659 "language": "javascript", 28660 "isExternal": true 28661 } 28662 }, 28663 { 28664 "modulePath": "core/src/lib/actions/customCode.js", 28665 "settings": { 28666 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC11a6baaa976f497e9812799bb3d8f66a-source.js', 28667 "language": "html", 28668 "isExternal": true 28669 } 28670 }, 28671 { 28672 "modulePath": "core/src/lib/actions/customCode.js", 28673 "settings": { 28674 "global": true, 28675 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC18ada7d9fe1f4d60b8dad0a0b61a1a2d-source.js', 28676 "language": "javascript", 28677 "isExternal": true 28678 } 28679 } 28680 ] 28681 }, 28682 { 28683 "id": "RL15e8efaab3ce4a088a5c2b0c5f2b24a4", 28684 "name": "Software Upgrade Selection Click:EBR", 28685 "events": [ 28686 { 28687 "modulePath": "core/src/lib/events/customEvent.js", 28688 "settings": { 28689 "type": "aa-software-upgrade", 28690 "bubbleFireIfParent": true, 28691 "bubbleFireIfChildFired": true 28692 }, 28693 "ruleOrder": 50.0 28694 } 28695 ], 28696 "conditions": [], 28697 "actions": [ 28698 { 28699 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 28700 "settings": { 28701 "customSetup": { 28702 "source": function(event, s) { 28703 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Upgrade:"+event.detail.currentEdition+":"+event.detail.selectedEdition+":"+event.detail.label); 28704} 28705 }, 28706 "trackerProperties": { 28707 "eVars": [ 28708 { 28709 "name": "eVar1", 28710 "type": "value", 28711 "value": "%PAGE_NAME%" 28712 }, 28713 { 28714 "name": "eVar12", 28715 "type": "value", 28716 "value": "%PROFILE_ID:COOKIE%" 28717 }, 28718 { 28719 "name": "eVar21", 28720 "type": "value", 28721 "value": "%PAGE_URL%" 28722 }, 28723 { 28724 "name": "eVar27", 28725 "type": "value", 28726 "value": "%CONTENTTYPE:METATAG%" 28727 } 28728 ], 28729 "props": [ 28730 { 28731 "name": "prop2", 28732 "type": "alias", 28733 "value": "eVar27" 28734 }, 28735 { 28736 "name": "prop33", 28737 "type": "alias", 28738 "value": "eVar21" 28739 } 28740 ], 28741 "events": [ 28742 { 28743 "name": "event30" 28744 } 28745 ] 28746 } 28747 } 28748 }, 28749 { 28750 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 28751 "settings": { 28752 "type": "link", 28753 "linkName": "Software Upgrade Selection Click", 28754 "linkType": "o" 28755 } 28756 }, 28757 { 28758 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 28759 "settings": {} 28760 } 28761 ] 28762 }, 28763 { 28764 "id": "RL16355bd4d8a641f9ac0a2816226fbb0d", 28765 "name": "Capture_Outcome_Start:DCR", 28766 "events": [ 28767 { 28768 "modulePath": "core/src/lib/events/directCall.js", 28769 "settings": { 28770 "identifier": "captureOutcomeStart" 28771 }, 28772 "ruleOrder": 50.0 28773 } 28774 ], 28775 "conditions": [ 28776 { 28777 "modulePath": "core/src/lib/conditions/valueComparison.js", 28778 "settings": { 28779 "comparison": { 28780 "operator": "doesNotEqual", 28781 "caseInsensitive": true 28782 }, 28783 "leftOperand": "%DisableAnalyticsCookie%", 28784 "rightOperand": "true" 28785 } 28786 }, 28787 { 28788 "modulePath": "core/src/lib/conditions/valueComparison.js", 28789 "settings": { 28790 "comparison": { 28791 "operator": "doesNotEqual", 28792 "caseInsensitive": true 28793 }, 28794 "leftOperand": "%TRAFFICTYPE_META%", 28795 "rightOperand": "bot" 28796 } 28797 } 28798 ], 28799 "actions": [ 28800 { 28801 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 28802 "settings": { 28803 "customSetup": { 28804 "source": function(event, s) { 28805 s.linkTrackEvents += ",event42,event51"; 28806var eventName = event.detail.eventName; 28807if (eventName === "assessment") { 28808 s.events += ",event42"; 28809} else if (eventName === "event registration") { 28810 s.events += ",event51"; 28811 s.eVar96 = _satellite.getVar("DOCUMENTID:METATAG"); 28812 s.linkTrackVars += ",eVar96"; 28813} else if(eventName === "contact sales"){ 28814 s.events += ",event69"; 28815 s.linkTrackEvents +=",event69"; 28816} else if(eventName === "chat"){ 28817 s.events += ",event44"; 28818 s.linkTrackEvents +=",event44"; 28819} 28820NIAnalytics.setAndTrack("eVar147", event.detail.datetime); 28821} 28822 }, 28823 "trackerProperties": { 28824 "eVars": [ 28825 { 28826 "name": "eVar1", 28827 "type": "value", 28828 "value": "%PAGE_NAME%" 28829 }, 28830 { 28831 "name": "eVar28", 28832 "type": "value", 28833 "value": "%event.detail.eventName%" 28834 }, 28835 { 28836 "name": "eVar29", 28837 "type": "value", 28838 "value": "%event.detail.eventName% %event.detail.eventAction%" 28839 }, 28840 { 28841 "name": "eVar56", 28842 "type": "value",
28843 "value": "%DETAILED_PAGENAME%" 28844 }, 28845 { 28846 "name": "eVar71", 28847 "type": "value", 28848 "value": "%ASSESSMENT_LABEL:EV:DL%" 28849 } 28850 ], 28851 "props": [ 28852 { 28853 "name": "prop23", 28854 "type": "alias", 28855 "value": "eVar1" 28856 }, 28857 { 28858 "name": "prop25", 28859 "type": "value", 28860 "value": "%ASSESSMENT_LABEL:EV:DL%" 28861 }, 28862 { 28863 "name": "prop50", 28864 "type": "alias", 28865 "value": "eVar56" 28866 } 28867 ], 28868 "events": [ 28869 { 28870 "name": "event27" 28871 } 28872 ], 28873 "pageName": "%PAGE_NAME%" 28874 } 28875 } 28876 }, 28877 { 28878 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 28879 "settings": { 28880 "type": "link", 28881 "linkName": "", 28882 "linkType": "o" 28883 } 28884 }, 28885 { 28886 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 28887 "settings": {} 28888 } 28889 ] 28890 }, 28891 { 28892 "id": "RL1791611abd594beb8645b3f8fd12b816", 28893 "name": "My_Profile_Replace_Payment_Method_Click:EBR", 28894 "events": [ 28895 { 28896 "modulePath": "core/src/lib/events/click.js", 28897 "settings": { 28898 "elementSelector": ".payment-modal__card-actions-replace-btn", 28899 "bubbleFireIfParent": true, 28900 "bubbleFireIfChildFired": true 28901 }, 28902 "ruleOrder": 50.0 28903 } 28904 ], 28905 "conditions": [ 28906 { 28907 "modulePath": "core/src/lib/conditions/valueComparison.js", 28908 "settings": { 28909 "comparison": { 28910 "operator": "doesNotEqual", 28911 "caseInsensitive": true 28912 }, 28913 "leftOperand": "%DisableAnalyticsCookie%", 28914 "rightOperand": "true" 28915 } 28916 }, 28917 { 28918 "modulePath": "core/src/lib/conditions/valueComparison.js", 28919 "settings": { 28920 "comparison": { 28921 "operator": "doesNotEqual", 28922 "caseInsensitive": true 28923 }, 28924 "leftOperand": "%TRAFFICTYPE_META%", 28925 "rightOperand": "bot" 28926 } 28927 } 28928 ], 28929 "actions": [ 28930 { 28931 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 28932 "settings": { 28933 "trackerProperties": { 28934 "eVars": [ 28935 { 28936 "name": "eVar1", 28937 "type": "value", 28938 "value": "MyProfile/Saved payment methods" 28939 }, 28940 { 28941 "name": "eVar12", 28942 "type": "value", 28943 "value": "%PROFILE_ID:COOKIE%" 28944 }, 28945 { 28946 "name": "eVar21", 28947 "type": "value", 28948 "value": "%PAGE_URL%" 28949 }, 28950 { 28951 "name": "eVar27", 28952 "type": "value", 28953 "value": "%CONTENTTYPE:METATAG%" 28954 }, 28955 { 28956 "name": "eVar33", 28957 "type": "value", 28958 "value": "Replace" 28959 }, 28960 { 28961 "name": "eVar56", 28962 "type": "alias", 28963 "value": "eVar1" 28964 } 28965 ], 28966 "props": [ 28967 { 28968 "name": "prop2", 28969 "type": "alias", 28970 "value": "eVar27" 28971 }, 28972 { 28973 "name": "prop23", 28974 "type": "alias", 28975 "value": "eVar33" 28976 }, 28977 { 28978 "name": "prop33", 28979 "type": "alias", 28980 "value": "eVar21" 28981 } 28982 ], 28983 "events": [ 28984 { 28985 "name": "event30" 28986 } 28987 ] 28988 } 28989 } 28990 }, 28991 { 28992 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 28993 "settings": { 28994 "type": "link", 28995 "linkType": "o" 28996 } 28997 }, 28998 { 28999 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 29000 "settings": {} 29001 } 29002 ] 29003 }, 29004 { 29005 "id": "RL195b16d401424a888b07ad6d4676cd6e", 29006 "name": "Capture_Cart_Add:DCR", 29007 "events": [ 29008 { 29009 "modulePath": "core/src/lib/events/directCall.js", 29010 "settings": { 29011 "identifier": "captureCartAdd" 29012 }, 29013 "ruleOrder": 50.0 29014 } 29015 ], 29016 "conditions": [ 29017 { 29018 "modulePath": "core/src/lib/conditions/valueComparison.js", 29019 "settings": { 29020 "comparison": { 29021 "operator": "doesNotEqual", 29022 "caseInsensitive": true 29023 }, 29024 "leftOperand": "%DisableAnalyticsCookie%", 29025 "rightOperand": "true" 29026 } 29027 }, 29028 { 29029 "modulePath": "core/src/lib/conditions/valueComparison.js", 29030 "settings": { 29031 "comparison": { 29032 "operator": "doesNotEqual", 29033 "caseInsensitive": true 29034 }, 29035 "leftOperand": "%TRAFFICTYPE_META%", 29036 "rightOperand": "bot" 29037 } 29038 } 29039 ], 29040 "actions": [ 29041 { 29042 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29043 "settings": { 29044 "customSetup": { 29045 "source": function(event, s) { 29046 function gtag_report_conversion(url) { 29047 var callback = function () { 29048 if (typeof(url) != 'undefined') { 29049 window.location = url; 29050 } 29051 }; 29052 gtag('event', 'conversion', { 29053 'send_to': 'AW-1070178489/t92nCKikgq8YELnBpv4D', 29054 'event_callback': callback 29055 }); 29056 return false;
29057} 29058 29059function uet_report_conversion() { window.uetq = window.uetq || []; window.uetq.push('event', 'begin_checkout', {}); } 29060 29061s.linkTrackVars += ",events"; 29062 29063if(typeof event.detail.startFlag !== "undefined" && event.detail.startFlag.toLowerCase() === "yes"){ 29064 s.eVar28 = "cart"; 29065 s.eVar29 = "cart start"; 29066 29067 s.events += ",scOpen,event27"; 29068 s.linkTrackEvents += ",scOpen,event27"; 29069 s.linkTrackVars += ",eVar28,eVar29"; 29070 29071 if (typeof gtag != 'undefined') { 29072 gtag_report_conversion(); 29073 } 29074 29075 if (typeof window.uetq != 'undefined') { 29076 uet_report_conversion(); 29077 } 29078 29079} 29080 29081if (event.detail.items) { 29082 var items; 29083 if(Array.isArray(event.detail.items)){ 29084 items=event.detail.items.toString(); 29085 } else{ 29086 items=event.detail.items; 29087 } 29088 s.products = ";" + items.replace(/,/g, ",;") 29089 s.linkTrackVars += ",products"; 29090 29091 s.events += ",scAdd"; 29092 s.linkTrackEvents += ",scAdd"; 29093} 29094 29095if(event.detail.revenue !== undefined && event.detail.revenue !== null){ 29096 s.currencyCode = (event.detail.currency !== undefined) ? event.detail.currency : "USD"; 29097 29098 s.events += ",event17="+event.detail.revenue; 29099 s.linkTrackEvents += ",event17"; 29100} 29101 29102if(event.detail.source !== undefined && event.detail.source !== null){ 29103 s.eVar129 = event.detail.source; 29104 s.linkTrackVars += ",eVar129"; 29105} 29106 29107if(event.detail.timestamp !== undefined){ 29108 s.eVar147 = event.detail.timestamp; 29109 s.linkTrackVars += ",eVar147"; 29110} 29111 29112if(event.detail.licenseTerm !== undefined){ 29113 s.eVar148 = event.detail.licenseTerm; 29114 s.linkTrackVars += ",eVar148"; 29115} 29116 29117if(event.detail.serviceProgram !== undefined){ 29118 s.eVar149 = event.detail.serviceProgram; 29119 s.linkTrackVars += ",eVar149"; 29120} 29121} 29122 }, 29123 "trackerProperties": { 29124 "eVars": [ 29125 { 29126 "name": "eVar1", 29127 "type": "value", 29128 "value": "%PAGE_NAME%" 29129 }, 29130 { 29131 "name": "eVar22", 29132 "type": "value", 29133 "value": "%event.detail.eventDetail%" 29134 }, 29135 { 29136 "name": "eVar56", 29137 "type": "value", 29138 "value": "%DETAILED_PAGENAME%" 29139 }, 29140 { 29141 "name": "eVar101", 29142 "type": "value", 29143 "value": "%HASHED_EMAIL:USER:DL%" 29144 }, 29145 { 29146 "name": "eVar152", 29147 "type": "value", 29148 "value": "%OneTrust_STATUS%" 29149 } 29150 ] 29151 } 29152 } 29153 }, 29154 { 29155 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 29156 "settings": { 29157 "type": "link", 29158 "linkType": "o" 29159 } 29160 }, 29161 { 29162 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 29163 "settings": {} 29164 } 29165 ] 29166 }, 29167 { 29168 "id": "RL1a35112772154ed89768dd553cf3275f", 29169 "name": "Survey_Yes_Clicked:EBR", 29170 "events": [ 29171 { 29172 "modulePath": "core/src/lib/events/click.js", 29173 "settings": { 29174 "elementSelector": "span.analytics-survey-yes", 29175 "bubbleFireIfChildFired": false 29176 }, 29177 "ruleOrder": 50.0 29178 } 29179 ], 29180 "conditions": [ 29181 { 29182 "modulePath": "core/src/lib/conditions/pathAndQuerystring.js", 29183 "settings": { 29184 "paths": [ 29185 { 29186 "value": "voc=nowyoudont", 29187 "valueIsRegex": true 29188 } 29189 ] 29190 }, 29191 "negate": true 29192 }, 29193 { 29194 "modulePath": "core/src/lib/conditions/valueComparison.js", 29195 "settings": { 29196 "comparison": { 29197 "operator": "doesNotEqual", 29198 "caseInsensitive": true 29199 }, 29200 "leftOperand": "%DisableAnalyticsCookie%", 29201 "rightOperand": "true" 29202 } 29203 }, 29204 { 29205 "modulePath": "core/src/lib/conditions/valueComparison.js", 29206 "settings": { 29207 "comparison": { 29208 "operator": "doesNotEqual", 29209 "caseInsensitive": true 29210 }, 29211 "leftOperand": "%TRAFFICTYPE_META%", 29212 "rightOperand": "bot" 29213 } 29214 } 29215 ], 29216 "actions": [ 29217 { 29218 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29219 "settings": { 29220 "trackerProperties": { 29221 "eVars": [ 29222 { 29223 "name": "eVar1", 29224 "type": "value", 29225 "value": "%PAGE_NAME%" 29226 }, 29227 { 29228 "name": "eVar27", 29229 "type": "value", 29230 "value": "%CONTENTTYPE:METATAG%" 29231 }, 29232 { 29233 "name": "eVar40", 29234 "type": "value", 29235 "value": "Yes" 29236 } 29237 ] 29238 } 29239 } 29240 }, 29241 { 29242 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 29243 "settings": { 29244 "type": "link", 29245 "linkName": "", 29246 "linkType": "o" 29247 } 29248 }, 29249 { 29250 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 29251 "settings": {} 29252 } 29253 ] 29254 }, 29255 { 29256 "id": "RL1ca760f537bc4e7bb0304fc22866e234", 29257 "name": "Capture_Rating:DCR", 29258 "events": [ 29259 { 29260 "modulePath": "core/src/lib/events/directCall.js", 29261 "settings": { 29262 "identifier": "captureRating" 29263 }, 29264 "ruleOrder": 50.0 29265 } 29266 ], 29267 "conditions": [ 29268 { 29269 "modulePath": "core/src/lib/conditions/valueComparison.js", 29270 "settings": { 29271 "comparison": { 29272 "operator": "doesNotEqual", 29273 "caseInsensitive": true 29274 }, 29275 "leftOperand": "%DisableAnalyticsCookie%", 29276 "rightOperand": "true" 29277 } 29278 }, 29279 { 29280 "modulePath": "core/src/lib/conditions/valueComparison.js", 29281 "settings": { 29282 "comparison": { 29283 "operator": "doesNotEqual", 29284 "caseInsensitive": true 29285 }, 29286 "leftOperand": "%TRAFFICTYPE_META%", 29287 "rightOperand": "bot" 29288 } 29289 } 29290 ], 29291 "actions": [ 29292 { 29293 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29294 "settings": { 29295 "trackerProperties": { 29296 "eVars": [ 29297 { 29298 "name": "eVar1", 29299 "type": "value", 29300 "value": "%PAGE_NAME%" 29301 }, 29302 { 29303 "name": "eVar10", 29304 "type": "value", 29305 "value": "%LANGUAGE:METATAG%" 29306 }, 29307 { 29308 "name": "eVar27", 29309 "type": "value", 29310 "value": "%CONTENTTYPE:METATAG%" 29311 }, 29312 { 29313 "name": "eVar56", 29314 "type": "value",
29315 "value": "%DETAILED_PAGENAME%" 29316 }, 29317 { 29318 "name": "eVar63", 29319 "type": "value", 29320 "value": "%DOCUMENTID:METATAG%" 29321 }, 29322 { 29323 "name": "eVar94", 29324 "type": "value", 29325 "value": "%event.detail.eventName%:%event.detail.eventLabel%" 29326 } 29327 ], 29328 "props": [ 29329 { 29330 "name": "prop50", 29331 "type": "alias", 29332 "value": "eVar56" 29333 } 29334 ], 29335 "events": [ 29336 { 29337 "name": "event46" 29338 } 29339 ], 29340 "pageName": "%PAGE_NAME%" 29341 } 29342 } 29343 }, 29344 { 29345 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 29346 "settings": { 29347 "type": "link", 29348 "linkName": "", 29349 "linkType": "o" 29350 } 29351 }, 29352 { 29353 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 29354 "settings": {} 29355 } 29356 ] 29357 }, 29358 { 29359 "id": "RL1d4eda4afd7748b98bede5a7b51e9c31", 29360 "name": "DL_Part_Number:PLR", 29361 "events": [ 29362 { 29363 "modulePath": "core/src/lib/events/windowLoaded.js", 29364 "settings": {}, 29365 "ruleOrder": 50.0 29366 }, 29367 { 29368 "modulePath": "core/src/lib/events/directCall.js", 29369 "settings": { 29370 "identifier": "captureVirtualPageLoad" 29371 }, 29372 "ruleOrder": 50.0 29373 } 29374 ], 29375 "conditions": [ 29376 { 29377 "modulePath": "core/src/lib/conditions/valueComparison.js", 29378 "settings": { 29379 "comparison": { 29380 "operator": "doesNotEqual", 29381 "caseInsensitive": true 29382 }, 29383 "leftOperand": "%DisableAnalyticsCookie%", 29384 "rightOperand": "true" 29385 } 29386 }, 29387 { 29388 "modulePath": "core/src/lib/conditions/customCode.js", 29389 "settings": { 29390 "source": function(event, target) { 29391 var product = _satellite.getVar("PRODUCT:DL"); 29392if (typeof product != "undefined" && 29393 typeof product[0] != "undefined" && 29394 typeof product[0].productInfo != "undefined" && 29395 typeof product[0].productInfo.partNumber != "undefined" && 29396 !(product[0].category != undefined && 29397 product[0].category.categoryID != undefined)) { 29398 return true; 29399} else { 29400 return false; 29401} 29402} 29403 } 29404 }, 29405 { 29406 "modulePath": "core/src/lib/conditions/valueComparison.js", 29407 "settings": { 29408 "comparison": { 29409 "operator": "equals" 29410 }, 29411 "leftOperand": "%NICOM_PAGE%", 29412 "rightOperand": "true" 29413 } 29414 } 29415 ], 29416 "actions": [ 29417 { 29418 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29419 "settings": { 29420 "customSetup": { 29421 "source": function(event, s) { 29422 var partNumbers = _satellite.getVar("PRODUCT:DL")[0].productInfo.partNumber; 29423if (partNumbers[0].indexOf(",") > -1) { 29424 s.products = ";" + partNumbers[0].replace(/,/g, ",;") 29425} else { 29426 s.products = ""; 29427 for (var i = 0; i < partNumbers.length; i++) { 29428 s.products += ";" + partNumbers[i] + ","; 29429 } 29430 s.products = s.products.substring(0, s.products.length - 1); 29431} 29432} 29433 }, 29434 "trackerProperties": { 29435 "events": [ 29436 { 29437 "name": "event3" 29438 }, 29439 { 29440 "name": "prodView" 29441 } 29442 ] 29443 } 29444 } 29445 } 29446 ] 29447 }, 29448 { 29449 "id": "RL1d674c6004f646d4b69859b6470a6943", 29450 "name": "Leadspace_Link_Click:EBR", 29451 "events": [ 29452 { 29453 "modulePath": "core/src/lib/events/click.js", 29454 "settings": { 29455 "elementSelector": "[class*=\"Leadspace_linkContainer\"] a, [class*=\"Leadspace_linkContainer\"] button", 29456 "bubbleFireIfParent": true, 29457 "bubbleFireIfChildFired": false 29458 }, 29459 "ruleOrder": 50.0 29460 } 29461 ], 29462 "conditions": [ 29463 { 29464 "modulePath": "core/src/lib/conditions/valueComparison.js", 29465 "settings": { 29466 "comparison": { 29467 "operator": "doesNotEqual", 29468 "caseInsensitive": true 29469 }, 29470 "leftOperand": "%DisableAnalyticsCookie%", 29471 "rightOperand": "true" 29472 } 29473 }, 29474 { 29475 "modulePath": "core/src/lib/conditions/valueComparison.js", 29476 "settings": { 29477 "comparison": { 29478 "operator": "doesNotEqual", 29479 "caseInsensitive": true 29480 }, 29481 "leftOperand": "%TRAFFICTYPE_META%", 29482 "rightOperand": "bot" 29483 } 29484 } 29485 ], 29486 "actions": [ 29487 { 29488 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29489 "settings": { 29490 "customSetup": { 29491 "source": function(event, s) { 29492 let ctaLabel = event.target.attributes.hasOwnProperty("data-an-cta-label") ? event.target.getAttribute('data-an-cta-label') : event.target.innerText; 29493NIAnalytics.setAndTrack(["eVar33", "prop23"], "Intro:" + ctaLabel); 29494} 29495 }, 29496 "trackerProperties": { 29497 "eVars": [ 29498 { 29499 "name": "eVar1", 29500 "type": "value", 29501 "value": "%PAGE_NAME%" 29502 }, 29503 { 29504 "name": "eVar12", 29505 "type": "value", 29506 "value": "%PROFILE_ID:COOKIE%" 29507 }, 29508 { 29509 "name": "eVar21", 29510 "type": "value", 29511 "value": "%PAGE_URL%" 29512 }, 29513 { 29514 "name": "eVar27", 29515 "type": "value", 29516 "value": "%CONTENTTYPE:METATAG%" 29517 } 29518 ], 29519 "props": [ 29520 { 29521 "name": "prop2", 29522 "type": "alias", 29523 "value": "eVar27" 29524 }, 29525 { 29526 "name": "prop33", 29527 "type": "alias", 29528 "value": "eVar21" 29529 } 29530 ], 29531 "events": [ 29532 { 29533 "name": "event30" 29534 } 29535 ] 29536 } 29537 } 29538 }, 29539 { 29540 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 29541 "settings": { 29542 "type": "link", 29543 "linkName": "aa-react-link", 29544 "linkType": "o" 29545 } 29546 }, 29547 { 29548 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 29549 "settings": {} 29550 } 29551 ] 29552 }, 29553 { 29554 "id": "RL1de823d979404e5b8652e9b1cc9dbb4a", 29555 "name": "CTA_Resources_Click:EBR", 29556 "events": [ 29557 { 29558 "modulePath": "core/src/lib/events/customEvent.js", 29559 "settings": { 29560 "type": "aa-resources-click", 29561 "bubbleFireIfParent": true, 29562 "bubbleFireIfChildFired": false 29563 }, 29564 "ruleOrder": 50.0 29565 } 29566 ], 29567 "conditions": [ 29568 { 29569 "modulePath": "core/src/lib/conditions/valueComparison.js", 29570 "settings": { 29571 "comparison": { 29572 "operator": "doesNotEqual", 29573 "caseInsensitive": true 29574 }, 29575 "leftOperand": "%DisableAnalyticsCookie%", 29576 "rightOperand": "true" 29577 } 29578 }, 29579 { 29580 "modulePath": "core/src/lib/conditions/valueComparison.js", 29581 "settings": { 29582 "comparison": { 29583 "operator": "doesNotEqual", 29584 "caseInsensitive": true 29585 }, 29586 "leftOperand": "%TRAFFICTYPE_META%", 29587 "rightOperand": "bot" 29588 } 29589 } 29590 ], 29591 "actions": [ 29592 { 29593 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29594 "settings": { 29595 "customSetup": { 29596 "source": function(event, s) { 29597 NIAnalytics.setAndTrack(['eVar33', 'prop23'], event.detail.linkLabel); 29598} 29599 }, 29600 "trackerProperties": { 29601 "eVars": [ 29602 { 29603 "name": "eVar1", 29604 "type": "value", 29605 "value": "%PAGE_NAME%" 29606 }, 29607 { 29608 "name": "eVar12", 29609 "type": "value", 29610 "value": "%PROFILE_ID:COOKIE%" 29611 }, 29612 { 29613 "name": "eVar21", 29614 "type": "value", 29615 "value": "%PAGE_URL%" 29616 }, 29617 { 29618 "name": "eVar27", 29619 "type": "value", 29620 "value": "%CONTENTTYPE:METATAG%" 29621 } 29622 ], 29623 "props": [ 29624 { 29625 "name": "prop2", 29626 "type": "alias", 29627 "value": "eVar27" 29628 }, 29629 { 29630 "name": "prop33", 29631 "type": "alias", 29632 "value": "eVar21" 29633 } 29634 ], 29635 "events": [ 29636 { 29637 "name": "event30" 29638 } 29639 ] 29640 } 29641 } 29642 }, 29643 { 29644 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 29645 "settings": { 29646 "type": "link", 29647 "linkName": "aa-react-link", 29648 "linkType": "o" 29649 } 29650 }, 29651 { 29652 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 29653 "settings": {} 29654 } 29655 ] 29656 }, 29657 { 29658 "id": "RL1e08880e60094644903b8e9da737b1f5", 29659 "name": "Cart&Checkout_Review_Page:PLR", 29660 "events": [ 29661 { 29662 "modulePath": "core/src/lib/events/windowLoaded.js", 29663 "settings": {}, 29664 "ruleOrder": 50.0 29665 }, 29666 { 29667 "modulePath": "core/src/lib/events/directCall.js", 29668 "settings": { 29669 "identifier": "captureVirtualPageLoad" 29670 }, 29671 "ruleOrder": 1.0 29672 } 29673 ], 29674 "conditions": [ 29675 { 29676 "modulePath": "core/src/lib/conditions/valueComparison.js", 29677 "settings": { 29678 "comparison": { 29679 "operator": "doesNotEqual", 29680 "caseInsensitive": true 29681 }, 29682 "leftOperand": "%DisableAnalyticsCookie%", 29683 "rightOperand": "true" 29684 } 29685 }, 29686 { 29687 "modulePath": "core/src/lib/conditions/valueComparison.js", 29688 "settings": { 29689 "comparison": { 29690 "operator": "equals" 29691 }, 29692 "leftOperand": "%TEMPLATE:PI:PA:DL%", 29693 "rightOperand": "checkout" 29694 } 29695 }, 29696 { 29697 "modulePath": "core/src/lib/conditions/valueComparison.js", 29698 "settings": { 29699 "comparison": { 29700 "operator": "equals" 29701 }, 29702 "leftOperand": "%SUBTEMPLATE:PI:PA:DL%", 29703 "rightOperand": "review" 29704 } 29705 } 29706 ], 29707 "actions": [ 29708 { 29709 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29710 "settings": { 29711 "customSetup": { 29712 "source": function(event, s) { 29713 var items = ""; 29714 if(Array.isArray(digitalData.cart.items)){ 29715 items=digitalData.cart.items.toString(); 29716 } else{ 29717 items=digitalData.cart.items; 29718 } 29719s.products = ";" + items.replace(/,/g, ",;") 29720s.linkTrackVars += ",products"; 29721} 29722 }, 29723 "trackerProperties": { 29724 "eVars": [ 29725 { 29726 "name": "eVar6", 29727 "type": "value", 29728 "value": "%PAYMENT_METHOD:DL%" 29729 }, 29730 { 29731 "name": "eVar8", 29732 "type": "value", 29733 "value": "%PROMOTION_CODE:DL%" 29734 }, 29735 { 29736 "name": "eVar22", 29737 "type": "value", 29738 "value": "%CARTID:DL%" 29739 } 29740 ], 29741 "events": [ 29742 { 29743 "name": "event11" 29744 } 29745 ] 29746 } 29747 } 29748 } 29749 ] 29750 }, 29751 { 29752 "id": "RL1e8b7469146743f1bd514fa0060784cf", 29753 "name": "Software Renewal CTA Click:EBR", 29754 "events": [ 29755 { 29756 "modulePath": "core/src/lib/events/click.js", 29757 "settings": { 29758 "elementSelector": ".aa-sw-renewal-cta, .aa-sw-renewal-cta *", 29759 "bubbleFireIfParent": true, 29760 "bubbleFireIfChildFired": false 29761 }, 29762 "ruleOrder": 50.0 29763 } 29764 ], 29765 "conditions": [], 29766 "actions": [ 29767 { 29768 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29769 "settings": { 29770 "customSetup": { 29771 "source": function(event, s) { 29772 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Renewal:"+event.target.innerText); 29773} 29774 }, 29775 "trackerProperties": { 29776 "eVars": [ 29777 { 29778 "name": "eVar1", 29779 "type": "value", 29780 "value": "%PAGE_NAME%" 29781 }, 29782 { 29783 "name": "eVar12", 29784 "type": "value", 29785 "value": "%PROFILE_ID:COOKIE%" 29786 }, 29787 { 29788 "name": "eVar21", 29789 "type": "value", 29790 "value": "%PAGE_URL%" 29791 }, 29792 { 29793 "name": "eVar27", 29794 "type": "value", 29795 "value": "%CONTENTTYPE:METATAG%" 29796 } 29797 ], 29798 "props": [ 29799 { 29800 "name": "prop2", 29801 "type": "alias", 29802 "value": "eVar27" 29803 }, 29804 { 29805 "name": "prop33", 29806 "type": "alias", 29807 "value": "eVar21" 29808 } 29809 ], 29810 "events": [ 29811 { 29812 "name": "event30" 29813 } 29814 ] 29815 } 29816 } 29817 }, 29818 { 29819 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 29820 "settings": { 29821 "type": "link", 29822 "linkName": "Renewal CTA Click", 29823 "linkType": "o" 29824 } 29825 }, 29826 { 29827 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 29828 "settings": {} 29829 } 29830 ] 29831 }, 29832 { 29833 "id": "RL1ebe7795e5724636a042e534b6c4eae6", 29834 "name": "Cart&Checkout_Payment_Page:PLR", 29835 "events": [ 29836 { 29837 "modulePath": "core/src/lib/events/windowLoaded.js", 29838 "settings": {}, 29839 "ruleOrder": 50.0 29840 }, 29841 { 29842 "modulePath": "core/src/lib/events/directCall.js", 29843 "settings": { 29844 "identifier": "captureVirtualPageLoad" 29845 }, 29846 "ruleOrder": 1.0 29847 } 29848 ], 29849 "conditions": [ 29850 { 29851 "modulePath": "core/src/lib/conditions/valueComparison.js", 29852 "settings": { 29853 "comparison": { 29854 "operator": "doesNotEqual", 29855 "caseInsensitive": true 29856 }, 29857 "leftOperand": "%DisableAnalyticsCookie%", 29858 "rightOperand": "true" 29859 } 29860 }, 29861 { 29862 "modulePath": "core/src/lib/conditions/valueComparison.js", 29863 "settings": { 29864 "comparison": { 29865 "operator": "equals" 29866 }, 29867 "leftOperand": "%TEMPLATE:PI:PA:DL%", 29868 "rightOperand": "checkout" 29869 } 29870 }, 29871 { 29872 "modulePath": "core/src/lib/conditions/valueComparison.js", 29873 "settings": { 29874 "comparison": { 29875 "operator": "equals" 29876 }, 29877 "leftOperand": "%SUBTEMPLATE:PI:PA:DL%", 29878 "rightOperand": "billing" 29879 } 29880 } 29881 ], 29882 "actions": [ 29883 { 29884 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29885 "settings": { 29886 "customSetup": { 29887 "source": function(event, s) { 29888 var items = ""; 29889 if(Array.isArray(digitalData.cart.items)){ 29890 items=digitalData.cart.items.toString(); 29891 } else{ 29892 items=digitalData.cart.item
29892s; 29893 } 29894s.products = ";" + items.replace(/,/g, ",;") 29895s.linkTrackVars += ",products"; 29896} 29897 }, 29898 "trackerProperties": { 29899 "eVars": [ 29900 { 29901 "name": "eVar6", 29902 "type": "value", 29903 "value": "%PAYMENT_METHOD:DL%" 29904 }, 29905 { 29906 "name": "eVar8", 29907 "type": "value", 29908 "value": "%PROMOTION_CODE:DL%" 29909 }, 29910 { 29911 "name": "eVar22", 29912 "type": "value", 29913 "value": "%CARTID:DL%" 29914 } 29915 ], 29916 "events": [ 29917 { 29918 "name": "event10" 29919 } 29920 ] 29921 } 29922 } 29923 } 29924 ] 29925 }, 29926 { 29927 "id": "RL1eda7598e9014d0387613eae02588e80", 29928 "name": "EducationService_Top-CTA_Click:EBR", 29929 "events": [ 29930 { 29931 "modulePath": "core/src/lib/events/click.js", 29932 "settings": { 29933 "elementSelector": ".aa-edusrv-topcta", 29934 "bubbleFireIfParent": true, 29935 "bubbleFireIfChildFired": false 29936 }, 29937 "ruleOrder": 50.0 29938 } 29939 ], 29940 "conditions": [ 29941 { 29942 "modulePath": "core/src/lib/conditions/valueComparison.js", 29943 "settings": { 29944 "comparison": { 29945 "operator": "doesNotEqual", 29946 "caseInsensitive": true 29947 }, 29948 "leftOperand": "%DisableAnalyticsCookie%", 29949 "rightOperand": "true" 29950 } 29951 }, 29952 { 29953 "modulePath": "core/src/lib/conditions/valueComparison.js", 29954 "settings": { 29955 "comparison": { 29956 "operator": "doesNotEqual", 29957 "caseInsensitive": true 29958 }, 29959 "leftOperand": "%TRAFFICTYPE_META%", 29960 "rightOperand": "bot" 29961 } 29962 } 29963 ], 29964 "actions": [ 29965 { 29966 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 29967 "settings": { 29968 "customSetup": { 29969 "source": function(event, s) { 29970 NIAnalytics.setAndTrack(["eVar33", "prop23"], event?.target?.innerText); 29971} 29972 }, 29973 "trackerProperties": { 29974 "eVars": [ 29975 { 29976 "name": "eVar1", 29977 "type": "value", 29978 "value": "%PAGE_NAME%" 29979 }, 29980 { 29981 "name": "eVar12", 29982 "type": "value", 29983 "value": "%PROFILE_ID:COOKIE%" 29984 }, 29985 { 29986 "name": "eVar21", 29987 "type": "value", 29988 "value": "%PAGE_URL%" 29989 }, 29990 { 29991 "name": "eVar27", 29992 "type": "value", 29993 "value": "%CONTENTTYPE:METATAG%" 29994 } 29995 ], 29996 "props": [ 29997 { 29998 "name": "prop2", 29999 "type": "alias", 30000 "value": "eVar27" 30001 }, 30002 { 30003 "name": "prop33", 30004 "type": "alias", 30005 "value": "eVar21" 30006 } 30007 ], 30008 "events": [ 30009 { 30010 "name": "event30" 30011 } 30012 ] 30013 } 30014 } 30015 }, 30016 { 30017 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30018 "settings": { 30019 "type": "link", 30020 "linkName": "EducationService Top CTA", 30021 "linkType": "o" 30022 } 30023 }, 30024 { 30025 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30026 "settings": {} 30027 } 30028 ] 30029 }, 30030 { 30031 "id": "RL1f90cd84b02446ce98b0541df23e4742", 30032 "name": "Baidu_Conversion_Code_zh-cn:PLR", 30033 "events": [ 30034 { 30035 "modulePath": "core/src/lib/events/windowLoaded.js", 30036 "settings": {}, 30037 "ruleOrder": 50.0 30038 } 30039 ], 30040 "conditions": [ 30041 { 30042 "modulePath": "core/src/lib/conditions/valueComparison.js", 30043 "settings": { 30044 "comparison": { 30045 "operator": "isTrue" 30046 }, 30047 "leftOperand": "%OneTrust_Targeting_Consent%" 30048 } 30049 }, 30050 { 30051 "modulePath": "core/src/lib/conditions/valueComparison.js", 30052 "settings": { 30053 "comparison": { 30054 "operator": "doesNotEqual", 30055 "caseInsensitive": true 30056 }, 30057 "leftOperand": "%DisableAnalyticsCookie%", 30058 "rightOperand": "true" 30059 } 30060 }, 30061 { 30062 "modulePath": "core/src/lib/conditions/customCode.js", 30063 "settings": { 30064 "source": function(event, target) { 30065 var filter = ["products", "innovations","events", "landing", "company", "solutions", "perspectives"]; 30066 30067if(_satellite.getVar("TEMPLATE:PI:PA:DL") === "blog" || _satellite.getVar("GUESTBOOK_CODE") !== "" || _satellite.getVar("PAGE_NAME") === "homepage" || _satellite.getVar("CONTENTTYPE:METATAG") === "contactni" || _satellite.getVar('TEMPLATE:PI:PA:DL') === "swDownloadConfirm" ){ 30068 return true; 30069} 30070 30071return filter.indexOf(_satellite.getVar("SECTION:METATAG")) > -1; 30072} 30073 } 30074 }, 30075 { 30076 "modulePath": "core/src/lib/conditions/valueComparison.js", 30077 "settings": { 30078 "comparison": { 30079 "operator": "equals" 30080 }, 30081 "leftOperand": "%NICOM_PAGE%", 30082 "rightOperand": "true" 30083 } 30084 }, 30085 { 30086 "modulePath": "core/src/lib/conditions/valueComparison.js", 30087 "settings": { 30088 "comparison": { 30089 "operator": "equals", 30090 "caseInsensitive": true 30091 }, 30092 "leftOperand": "%COUNTRY_METATAG%", 30093 "rightOperand": "CN" 30094 } 30095 } 30096 ], 30097 "actions": [ 30098 { 30099 "modulePath": "core/src/lib/actions/customCode.js", 30100 "settings": { 30101 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCc7cfdfb8b1a944be8de6b523d049f25f-source.js', 30102 "language": "javascript", 30103 "isExternal": true 30104 } 30105 }, 30106 { 30107 "modulePath": "core/src/lib/actions/customCode.js", 30108 "settings": { 30109 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC17bf00560cc641eca564c193ee86a947-source.js', 30110 "language": "javascript", 30111 "isExternal": true 30112 } 30113 } 30114 ] 30115 }, 30116 { 30117 "id": "RL2190815437404e0fa6b16e929036ad57", 30118 "name": "SWPDP_Included_Software_Click:EBR", 30119 "events": [ 30120 { 30121 "modulePath": "core/src/lib/events/click.js", 30122 "settings": { 30123 "elementSelector": ".aa-swpdp-included", 30124 "bubbleFireIfParent": true, 30125 "bubbleFireIfChildFired": false 30126 }, 30127 "ruleOrder": 50.0 30128 } 30129 ], 30130 "conditions": [ 30131 { 30132 "modulePath": "core/src/lib/conditions/valueComparison.js", 30133 "settings": { 30134 "comparison": { 30135 "operator": "doesNotEqual", 30136 "caseInsensitive": true 30137 }, 30138 "leftOperand": "%DisableAnalyticsCookie%", 30139 "rightOperand": "true" 30140 } 30141 }, 30142 { 30143 "modulePath": "core/src/lib/conditions/valueComparison.js", 30144 "settings": { 30145 "comparison": { 30146 "operator": "doesNotEqual", 30147 "caseInsensitive": true 30148 }, 30149 "leftOperand": "%TRAFFICTYPE_META%", 30150 "rightOperand": "bot" 30151 } 30152 } 30153 ], 30154 "actions": [ 30155 { 30156 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30157 "settings": { 30158 "customSetup": { 30159 "source": function(event, s) { 30160 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:"+event.target.innerText); 30161} 30162 }, 30163 "trackerProperties": { 30164 "eVars": [ 30165 { 30166 "name": "eVar1", 30167 "type": "value", 30168 "value": "%PAGE_NAME%" 30169 }, 30170 { 30171 "name": "eVar12", 30172 "type": "value", 30173 "value": "%PROFILE_ID:COOKIE%" 30174 }, 30175 { 30176 "name": "eVar21", 30177 "type": "value", 30178 "value": "%PAGE_URL%" 30179 }, 30180 { 30181 "name": "eVar27", 30182 "type": "value", 30183 "value": "%CONTENTTYPE:METATAG%" 30184 } 30185 ], 30186 "props": [ 30187 { 30188 "name": "prop2", 30189 "type": "alias", 30190 "value": "eVar27" 30191 }, 30192 { 30193 "name": "prop33", 30194 "type": "alias", 30195 "value": "eVar21" 30196 } 30197 ], 30198 "events": [ 30199 { 30200 "name": "event30" 30201 } 30202 ] 30203 } 30204 } 30205 }, 30206 { 30207 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30208 "settings": { 30209 "type": "link", 30210 "linkName": "SW PLP", 30211 "linkType": "o" 30212 } 30213 }, 30214 { 30215 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30216 "settings": {} 30217 } 30218 ] 30219 }, 30220 { 30221 "id": "RL21acf9a236b548adbbdfad6ce176eee1", 30222 "name": "FreeTrial-Continue:DCR", 30223 "events": [ 30224 { 30225 "modulePath": "core/src/lib/events/customEvent.js", 30226 "settings": { 30227 "type": "aa-free-trial-continue", 30228 "bubbleFireIfParent": true, 30229 "bubbleFireIfChildFired": true 30230 }, 30231 "ruleOrder": 50.0 30232 } 30233 ], 30234 "conditions": [], 30235 "actions": [ 30236 { 30237 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30238 "settings": { 30239 "customSetup": { 30240 "source": function(event, s) { 30241 NIAnalytics.setAndTrack(["eVar33", "prop23"], "FreeTrial:Type:"+event.detail.type); 30242} 30243 }, 30244 "trackerProperties": { 30245 "eVars": [ 30246 { 30247 "name": "eVar1", 30248 "type": "value", 30249 "value": "%PAGE_NAME%" 30250 }, 30251 { 30252 "name": "eVar12", 30253 "type": "value", 30254 "value": "%PROFILE_ID:COOKIE%" 30255 }, 30256 { 30257 "name": "eVar21", 30258 "type": "value", 30259 "value": "%PAGE_URL%" 30260 }, 30261 { 30262 "name": "eVar27", 30263 "type": "value", 30264 "value": "%CONTENTTYPE:METATAG%" 30265 } 30266 ], 30267 "props": [ 30268 { 30269 "name": "prop2", 30270 "type": "alias", 30271 "value": "eVar27" 30272 }, 30273 { 30274 "name": "prop33", 30275 "type": "alias", 30276 "value": "eVar21" 30277 } 30278 ], 30279 "events": [ 30280 { 30281 "name": "event30" 30282 } 30283 ] 30284 } 30285 } 30286 }, 30287 { 30288 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30289 "settings": { 30290 "type": "link", 30291 "linkName": "FreeTrial Continue", 30292 "linkType": "o" 30293 } 30294 }, 30295 { 30296 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30297 "settings": {} 30298 } 30299 ] 30300 }, 30301 { 30302 "id": "RL2477c754a6214c109c3730b189cdfb98", 30303 "name": "Google_Adwords_Advisors:PLR", 30304 "events": [ 30305 { 30306 "modulePath": "core/src/lib/events/windowLoaded.js", 30307 "settings": {}, 30308 "ruleOrder": 50.0 30309 } 30310 ], 30311 "conditions": [ 30312 { 30313 "modulePath": "core/src/lib/conditions/valueComparison.js", 30314 "settings": { 30315 "comparison": { 30316 "operator": "isTrue" 30317 }, 30318 "leftOperand": "%OneTrust_Targeting_Consent%" 30319 } 30320 }, 30321 { 30322 "modulePath": "core/src/lib/conditions/valueComparison.js", 30323 "settings": { 30324 "comparison": { 30325 "operator": "doesNotEqual", 30326 "caseInsensitive": true 30327 }, 30328 "leftOperand": "%DisableAnalyticsCookie%", 30329 "rightOperand": "true" 30330 } 30331 }, 30332 { 30333 "modulePath": "core/src/lib/conditions/customCode.js", 30334 "settings": { 30335 "source": function(event, target) { 30336 var filter = [ 30337 "ohm.ni.com/advisors/pxi/pages/common/intro.xhtml", 30338 "ohm.ni.com/advisors/compactdaq/pages/common/intro.xhtml", 30339 "ohm.ni.com/advisors/crio/pages/common/intro.xhtml" 30340]; 30341return filter.indexOf(_satellite.getVar("PAGE_NAME")) > -1; 30342 30343} 30344 } 30345 } 30346 ], 30347 "actions": [ 30348 { 30349 "modulePath": "core/src/lib/actions/customCode.js", 30350 "settings": { 30351 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC5f037157a6d6479a86b3e5c28806a3f9-source.js', 30352 "language": "javascript", 30353 "isExternal": true 30354 } 30355 }, 30356 { 30357 "modulePath": "core/src/lib/actions/customCode.js", 30358 "settings": { 30359 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC638ea51db1aa4503a6fc9379ae93ec0f-source.js', 30360 "language": "javascript", 30361 "isExternal": true 30362 } 30363 } 30364 ] 30365 }, 30366 { 30367 "id": "RL25770d622fb34904a5debeecbca876c2", 30368 "name": "Survey_No_Clicked:EBR", 30369 "events": [ 30370 { 30371 "modulePath": "core/src/lib/events/click.js", 30372 "settings": { 30373 "elementSelector": "span.analytics-survey-no", 30374 "bubbleFireIfChildFired": false 30375 }, 30376 "ruleOrder": 50.0 30377 } 30378 ], 30379 "conditions": [ 30380 { 30381 "modulePath": "core/src/lib/conditions/pathAndQuerystring.js", 30382 "settings": { 30383 "paths": [ 30384 { 30385 "value": "voc=nowyoudont", 30386 "valueIsRegex": true 30387 } 30388 ] 30389 }, 30390 "negate": true 30391 }, 30392 { 30393 "modulePath": "core/src/lib/conditions/valueComparison.js", 30394 "settings": { 30395 "comparison": { 30396 "operator": "doesNotEqual", 30397 "caseInsensitive": true 30398 }, 30399 "leftOperand": "%DisableAnalyticsCookie%", 30400 "rightOperand": "true" 30401 } 30402 }, 30403 { 30404 "modulePath": "core/src/lib/conditions/valueComparison.js", 30405 "settings": { 30406 "comparison": { 30407 "operator": "doesNotEqual", 30408 "caseInsensitive": true 30409 }, 30410 "leftOperand": "%TRAFFICTYPE_META%", 30411 "rightOperand": "bot" 30412 } 30413 } 30414 ], 30415 "actions": [ 30416 { 30417 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30418 "settings": { 30419 "trackerProperties": { 30420 "eVars": [ 30421 { 30422 "name": "eVar1", 30423 "type": "value", 30424 "value": "%PAGE_NAME%" 30425 }, 30426 { 30427 "name": "eVar27", 30428 "type": "value", 30429 "value": "%CONTENTTYPE:METATAG%" 30430 }, 30431 { 30432 "name": "eVar40", 30433 "type": "value", 30434 "value": "No" 30435 } 30436 ] 30437 } 30438 } 30439 }, 30440 { 30441 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30442 "settings": { 30443 "type": "link", 30444 "linkName": "", 30445 "linkType": "o" 30446 } 30447 }, 30448 { 30449 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30450 "settings": {} 30451 } 30452 ] 30453 }, 30454 { 30455 "id": "RL2784dd1b5ca54349933549ee4b1059a6", 30456 "name": "SWPLP_OrderByPartNumber_Click:EBR", 30457 "events": [ 30458 { 30459 "modulePath": "core/src/lib/events/click.js", 30460 "settings": { 30461 "elementSelec
30461tor": ".aa-swplp-obpn", 30462 "bubbleFireIfParent": false, 30463 "bubbleFireIfChildFired": true 30464 }, 30465 "ruleOrder": 50.0 30466 } 30467 ], 30468 "conditions": [ 30469 { 30470 "modulePath": "core/src/lib/conditions/valueComparison.js", 30471 "settings": { 30472 "comparison": { 30473 "operator": "doesNotEqual", 30474 "caseInsensitive": true 30475 }, 30476 "leftOperand": "%DisableAnalyticsCookie%", 30477 "rightOperand": "true" 30478 } 30479 }, 30480 { 30481 "modulePath": "core/src/lib/conditions/valueComparison.js", 30482 "settings": { 30483 "comparison": { 30484 "operator": "doesNotEqual", 30485 "caseInsensitive": true 30486 }, 30487 "leftOperand": "%TRAFFICTYPE_META%", 30488 "rightOperand": "bot" 30489 } 30490 } 30491 ], 30492 "actions": [ 30493 { 30494 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30495 "settings": { 30496 "trackerProperties": { 30497 "eVars": [ 30498 { 30499 "name": "eVar1", 30500 "type": "value", 30501 "value": "%PAGE_NAME%" 30502 }, 30503 { 30504 "name": "eVar12", 30505 "type": "value", 30506 "value": "%PROFILE_ID:COOKIE%" 30507 }, 30508 { 30509 "name": "eVar21", 30510 "type": "value", 30511 "value": "%PAGE_URL%" 30512 }, 30513 { 30514 "name": "eVar27", 30515 "type": "value", 30516 "value": "%CONTENTTYPE:METATAG%" 30517 }, 30518 { 30519 "name": "eVar33", 30520 "type": "value", 30521 "value": "SW PLP: Add to Cart by Part Number" 30522 } 30523 ], 30524 "props": [ 30525 { 30526 "name": "prop2", 30527 "type": "alias", 30528 "value": "eVar27" 30529 }, 30530 { 30531 "name": "prop23", 30532 "type": "alias", 30533 "value": "eVar33" 30534 }, 30535 { 30536 "name": "prop33", 30537 "type": "alias", 30538 "value": "eVar21" 30539 } 30540 ], 30541 "events": [ 30542 { 30543 "name": "event30" 30544 } 30545 ] 30546 } 30547 } 30548 }, 30549 { 30550 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30551 "settings": { 30552 "type": "link", 30553 "linkName": "SW PLP: Add to Cart by Part Number", 30554 "linkType": "o" 30555 } 30556 }, 30557 { 30558 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30559 "settings": {} 30560 } 30561 ] 30562 }, 30563 { 30564 "id": "RL27a3079223624707a79b7244d38a8749", 30565 "name": "Anchor_Link_NoDelay:Click:EBR", 30566 "events": [ 30567 { 30568 "modulePath": "core/src/lib/events/click.js", 30569 "settings": { 30570 "elementSelector": ".analytics-anchor-link-no-delay", 30571 "bubbleFireIfParent": true, 30572 "bubbleFireIfChildFired": false 30573 }, 30574 "ruleOrder": 50.0 30575 } 30576 ], 30577 "conditions": [ 30578 { 30579 "modulePath": "core/src/lib/conditions/valueComparison.js", 30580 "settings": { 30581 "comparison": { 30582 "operator": "doesNotEqual", 30583 "caseInsensitive": true 30584 }, 30585 "leftOperand": "%DisableAnalyticsCookie%", 30586 "rightOperand": "true" 30587 } 30588 }, 30589 { 30590 "modulePath": "core/src/lib/conditions/valueComparison.js", 30591 "settings": { 30592 "comparison": { 30593 "operator": "doesNotEqual", 30594 "caseInsensitive": true 30595 }, 30596 "leftOperand": "%TRAFFICTYPE_META%", 30597 "rightOperand": "bot" 30598 } 30599 } 30600 ], 30601 "actions": [ 30602 { 30603 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30604 "settings": { 30605 "customSetup": { 30606 "source": function(event, s) { 30607 s.eVar33 = s.prop23 = "anchor:" + _satellite.getVar("DETAILED_PAGENAME").replace(/:/g, "_") + ":" + this.href.substring(this.href.indexOf("#")+1); 30608s.linkTrackVars+=",eVar33,prop23"; 30609 30610//ContentSquare dynamic tracking 30611window._uxa = window._uxa || []; 30612window._uxa.push(["trackDynamicVariable", {key: 'Site Clicks', value: s.eVar33} ]); 30613} 30614 }, 30615 "trackerProperties": { 30616 "eVars": [ 30617 { 30618 "name": "eVar1", 30619 "type": "value", 30620 "value": "%PAGE_NAME%" 30621 }, 30622 { 30623 "name": "eVar12", 30624 "type": "value", 30625 "value": "%PROFILE_ID:COOKIE%" 30626 }, 30627 { 30628 "name": "eVar21", 30629 "type": "value", 30630 "value": "%PAGE_URL%" 30631 }, 30632 { 30633 "name": "eVar27", 30634 "type": "value", 30635 "value": "%CONTENTTYPE:METATAG%" 30636 }, 30637 { 30638 "name": "eVar56", 30639 "type": "value",
30640 "value": "%DETAILED_PAGENAME%" 30641 } 30642 ], 30643 "props": [ 30644 { 30645 "name": "prop2", 30646 "type": "alias", 30647 "value": "eVar27" 30648 }, 30649 { 30650 "name": "prop33", 30651 "type": "alias", 30652 "value": "eVar21" 30653 }, 30654 { 30655 "name": "prop50", 30656 "type": "value", 30657 "value": "%DETAILED_PAGENAME%" 30658 } 30659 ], 30660 "events": [ 30661 { 30662 "name": "event30" 30663 } 30664 ] 30665 } 30666 } 30667 }, 30668 { 30669 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30670 "settings": { 30671 "type": "link", 30672 "linkType": "o" 30673 } 30674 }, 30675 { 30676 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30677 "settings": {} 30678 } 30679 ] 30680 }, 30681 { 30682 "id": "RL28f83cd3842c4c40b36367a8076a1ff9", 30683 "name": "Cart&Checkout_Cart:PLR", 30684 "events": [ 30685 { 30686 "modulePath": "core/src/lib/events/windowLoaded.js", 30687 "settings": {}, 30688 "ruleOrder": 2.0 30689 }, 30690 { 30691 "modulePath": "core/src/lib/events/directCall.js", 30692 "settings": { 30693 "identifier": "captureVirtualPageLoad" 30694 }, 30695 "ruleOrder": 50.0 30696 } 30697 ], 30698 "conditions": [ 30699 { 30700 "modulePath": "core/src/lib/conditions/valueComparison.js", 30701 "settings": { 30702 "comparison": { 30703 "operator": "equals" 30704 }, 30705 "leftOperand": "%TEMPLATE:PI:PA:DL%", 30706 "rightOperand": "cart" 30707 } 30708 }, 30709 { 30710 "modulePath": "core/src/lib/conditions/valueComparison.js", 30711 "settings": { 30712 "comparison": { 30713 "operator": "doesNotEqual", 30714 "caseInsensitive": true 30715 }, 30716 "leftOperand": "%DisableAnalyticsCookie%", 30717 "rightOperand": "true" 30718 } 30719 } 30720 ], 30721 "actions": [ 30722 { 30723 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30724 "settings": { 30725 "customSetup": { 30726 "source": function(event, s) { 30727 var items = ""; 30728 if(Array.isArray(digitalData.cart.items)){ 30729 items=digitalData.cart.items.toString(); 30730 } else{ 30731 items=digitalData.cart.items; 30732 } 30733s.products = ";" + items.replace(/,/g, ",;") 30734s.linkTrackVars += ",products"; 30735} 30736 }, 30737 "trackerProperties": { 30738 "eVars": [ 30739 { 30740 "name": "eVar22", 30741 "type": "value", 30742 "value": "%CARTID:DL%" 30743 } 30744 ], 30745 "events": [ 30746 { 30747 "name": "scView" 30748 } 30749 ] 30750 } 30751 } 30752 } 30753 ] 30754 }, 30755 { 30756 "id": "RL2af20ce07ef54e02b2fd1789eaa437b8", 30757 "name": "Bing_Script:PLR", 30758 "events": [ 30759 { 30760 "modulePath": "core/src/lib/events/windowLoaded.js", 30761 "settings": {}, 30762 "ruleOrder": 50.0 30763 } 30764 ], 30765 "conditions": [ 30766 { 30767 "modulePath": "core/src/lib/conditions/valueComparison.js", 30768 "settings": { 30769 "comparison": { 30770 "operator": "isTrue" 30771 }, 30772 "leftOperand": "%OneTrust_Targeting_Consent%" 30773 } 30774 }, 30775 { 30776 "modulePath": "core/src/lib/conditions/valueComparison.js", 30777 "settings": { 30778 "comparison": { 30779 "operator": "doesNotEqual", 30780 "caseInsensitive": true 30781 }, 30782 "leftOperand": "%DisableAnalyticsCookie%", 30783 "rightOperand": "true" 30784 } 30785 } 30786 ], 30787 "actions": [ 30788 { 30789 "modulePath": "bing-ads-extension/src/lib/actions/baseTag.js", 30790 "settings": {} 30791 }, 30792 { 30793 "modulePath": "core/src/lib/actions/customCode.js", 30794 "settings": { 30795 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC4f2f14eb977f4a17b53da177409a21c2-source.js', 30796 "language": "javascript", 30797 "isExternal": true 30798 } 30799 } 30800 ] 30801 }, 30802 { 30803 "id": "RL2d70ec25041c418e9c77cfaa6a967795", 30804 "name": "My_Profile_Remove_Payment_Method_Click:EBR", 30805 "events": [ 30806 { 30807 "modulePath": "core/src/lib/events/click.js", 30808 "settings": { 30809 "elementSelector": ".payment-modal__card-actions > .nicrc--btn--danger--tertiary", 30810 "bubbleFireIfParent": true, 30811 "bubbleFireIfChildFired": true 30812 }, 30813 "ruleOrder": 50.0 30814 } 30815 ], 30816 "conditions": [ 30817 { 30818 "modulePath": "core/src/lib/conditions/valueComparison.js", 30819 "settings": { 30820 "comparison": { 30821 "operator": "doesNotEqual", 30822 "caseInsensitive": true 30823 }, 30824 "leftOperand": "%DisableAnalyticsCookie%", 30825 "rightOperand": "true" 30826 } 30827 }, 30828 { 30829 "modulePath": "core/src/lib/conditions/valueComparison.js", 30830 "settings": { 30831 "comparison": { 30832 "operator": "doesNotEqual", 30833 "caseInsensitive": true 30834 }, 30835 "leftOperand": "%TRAFFICTYPE_META%", 30836 "rightOperand": "bot" 30837 } 30838 } 30839 ], 30840 "actions": [ 30841 { 30842 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30843 "settings": { 30844 "trackerProperties": { 30845 "eVars": [ 30846 { 30847 "name": "eVar1", 30848 "type": "value", 30849 "value": "MyProfile/Saved payment methods" 30850 }, 30851 { 30852 "name": "eVar12", 30853 "type": "value", 30854 "value": "%PROFILE_ID:COOKIE%" 30855 }, 30856 { 30857 "name": "eVar21", 30858 "type": "value", 30859 "value": "%PAGE_URL%" 30860 }, 30861 { 30862 "name": "eVar27", 30863 "type": "value", 30864 "value": "%CONTENTTYPE:METATAG%" 30865 }, 30866 { 30867 "name": "eVar33", 30868 "type": "value", 30869 "value": "Remove" 30870 }, 30871 { 30872 "name": "eVar56", 30873 "type": "alias", 30874 "value": "eVar1" 30875 } 30876 ], 30877 "props": [ 30878 { 30879 "name": "prop2", 30880 "type": "alias", 30881 "value": "eVar27" 30882 }, 30883 { 30884 "name": "prop23", 30885 "type": "alias", 30886 "value": "eVar33" 30887 }, 30888 { 30889 "name": "prop33", 30890 "type": "alias", 30891 "value": "eVar21" 30892 } 30893 ], 30894 "events": [ 30895 { 30896 "name": "event30" 30897 } 30898 ] 30899 } 30900 } 30901 }, 30902 { 30903 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30904 "settings": { 30905 "type": "link", 30906 "linkType": "o" 30907 } 30908 }, 30909 { 30910 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30911 "settings": {} 30912 } 30913 ] 30914 }, 30915 { 30916 "id": "RL2dce5bbed5034878bc1bd10c06437db0", 30917 "name": "Capture_Perspective_Result_Click:DCR", 30918 "events": [ 30919 { 30920 "modulePath": "core/src/lib/events/directCall.js", 30921 "settings": { 30922 "identifier": "capturePerspectiveResultClick" 30923 }, 30924 "ruleOrder": 50.0 30925 } 30926 ], 30927 "conditions": [ 30928 { 30929 "modulePath": "core/src/lib/conditions/valueComparison.js", 30930 "settings": { 30931 "comparison": { 30932 "operator": "doesNotEqual", 30933 "caseInsensitive": true 30934 }, 30935 "leftOperand": "%DisableAnalyticsCookie%", 30936 "rightOperand": "true" 30937 } 30938 }, 30939 { 30940 "modulePath": "core/src/lib/conditions/valueComparison.js", 30941 "settings": { 30942 "comparison": { 30943 "operator": "doesNotEqual", 30944 "caseInsensitive": true 30945 }, 30946 "leftOperand": "%TRAFFICTYPE_META%", 30947 "rightOperand": "bot" 30948 } 30949 } 30950 ], 30951 "actions": [ 30952 { 30953 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 30954 "settings": { 30955 "customSetup": { 30956 "source": function(event, s) { 30957 if (event && event.detail && event.detail.template && event.detail.filterPair){ 30958 if(typeof event.detail.filterPair === "string"){ 30959 NIAnalytics.setAndTrack("list3", event.detail.template+":"+event.detail.filterPair); 30960 } else if(typeof event.detail.filterPair === "object"){ 30961 NIAnalytics.setAndTrack("list3", event.detail.template+":"+event.detail.filterPair.join(","+event.detail.template+":")); 30962 } 30963} 30964} 30965 }, 30966 "trackerProperties": { 30967 "eVars": [ 30968 { 30969 "name": "eVar1", 30970 "type": "value", 30971 "value": "%PAGE_NAME%" 30972 }, 30973 { 30974 "name": "eVar27", 30975 "type": "value", 30976 "value": "%CONTENTTYPE:METATAG%" 30977 } 30978 ], 30979 "events": [ 30980 { 30981 "name": "event57" 30982 } 30983 ] 30984 } 30985 } 30986 }, 30987 { 30988 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 30989 "settings": { 30990 "type": "link", 30991 "linkType": "o" 30992 } 30993 }, 30994 { 30995 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 30996 "settings": {} 30997 } 30998 ] 30999 }, 31000 { 31001 "id": "RL2e87f812e85347f78812e33dde9d303c", 31002 "name": "CarouselNavigation_Click:EBR", 31003 "events": [ 31004 { 31005 "modulePath": "core/src/lib/events/click.js", 31006 "settings": { 31007 "elementSelector": ".carousel_container .arrow button", 31008 "bubbleFireIfParent": true, 31009 "bubbleFireIfChildFired": false 31010 }, 31011 "ruleOrder": 50.0 31012 } 31013 ], 31014 "conditions": [ 31015 { 31016 "modulePath": "core/src/lib/conditions/valueComparison.js", 31017 "settings": { 31018 "comparison": { 31019 "operator": "doesNotEqual", 31020 "caseInsensitive": true 31021 }, 31022 "leftOperand": "%DisableAnalyticsCookie%", 31023 "rightOperand": "true" 31024 } 31025 }, 31026 { 31027 "modulePath": "core/src/lib/conditions/valueComparison.js", 31028 "settings": { 31029 "comparison": { 31030 "operator": "doesNotEqual", 31031 "caseInsensitive": true 31032 }, 31033 "leftOperand": "%TRAFFICTYPE_META%", 31034 "rightOperand": "bot" 31035 } 31036 } 31037 ], 31038 "actions": [ 31039 { 31040 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 31041 "settings": { 31042 "customSetup": { 31043 "source": function(event, s) { 31044 let h2 = event.target.closest(".content_section")?.querySelector("h2").innerText || ""; 31045const label = event.target.getAttribute("data-an-button-label")?.toLowerCase(); 31046const direction = label === "next" ? "right" : 31047 label === "previous" ? "left" : 31048 undefined; 31049 31050NIAnalytics.setAndTrack(["eVar33", "prop23"], "Carousel:" + h2 + ":" + direction); 31051} 31052 }, 31053 "trackerProperties": { 31054 "eVars": [ 31055 { 31056 "name": "eVar1", 31057 "type": "value", 31058 "value": "%PAGE_NAME%" 31059 }, 31060 { 31061 "name": "eVar12", 31062 "type": "value", 31063 "value": "%PROFILE_ID:COOKIE%" 31064 }, 31065 { 31066 "name": "eVar21", 31067 "type": "value", 31068 "value": "%PAGE_URL%" 31069 }, 31070 { 31071 "name": "eVar27", 31072 "type": "value", 31073 "value": "%CONTENTTYPE:METATAG%" 31074 } 31075 ], 31076 "props": [ 31077 { 31078 "name": "prop2", 31079 "type": "alias", 31080 "value": "eVar27" 31081 }, 31082 { 31083 "name": "prop33", 31084 "type": "alias", 31085 "value": "eVar21" 31086 } 31087 ], 31088 "events": [ 31089 { 31090 "name": "event30" 31091 } 31092 ] 31093 } 31094 } 31095 }, 31096 { 31097 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 31098 "settings": { 31099 "type": "link", 31100 "linkName": "aa-react-link", 31101 "linkType": "o" 31102 } 31103 }, 31104 { 31105 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 31106 "settings": {} 31107 } 31108 ] 31109 }, 31110 { 31111 "id": "RL304c051c0c934fa8928e1baeb48c276f", 31112 "name": "Pardot:PLR", 31113 "events": [ 31114 { 31115 "modulePath": "core/src/lib/events/libraryLoaded.js", 31116 "settings": {}, 31117 "ruleOrder": 50.0 31118 } 31119 ], 31120 "conditions": [ 31121 { 31122 "modulePath": "core/src/lib/conditions/valueComparison.js", 31123 "settings": { 31124 "comparison": { 31125 "operator": "isTrue" 31126 }, 31127 "leftOperand": "%OneTrust_Functional_Consent%" 31128 } 31129 }, 31130 { 31131 "modulePath": "core/src/lib/conditions/customCode.js", 31132 "settings": { 31133 "source": function(event, target) { 31134 var siteSection = _satellite.getVar("SECTION:METATAG"); 31135var acceptedSections = ["products", "innovations", "events", "landing", "company", "perspectives", "solutions"]; 31136
31137var contentType = _satellite.getVar("CONTENTTYPE:METATAG"); 31138var acceptedContentTypes = ["profile", "contactni", "search", "downloadconfirm", "courseware"]; 31139 31140var pageName = _satellite.getVar("PAGE_NAME"); 31141 31142var excluded = [ 31143 "products:checkout:shipping", 31144 "products:checkout:billing", 31145 "products:checkout:review" 31146 ]; 31147 31148var excludedDomains = ["campaigns.ni.com", "landing.ni.com"]; 31149 31150if(excluded.indexOf(_satellite.getVar("DETAILED_PAGENAME")) > -1 || excludedDomains.indexOf(_satellite.getVar("DOMAIN")) > -1) return false; 31151 31152if(acceptedSections.indexOf(siteSection) > -1 || acceptedContentTypes.indexOf(contentType) > -1){ 31153 return true; 31154} 31155 31156return false; 31157} 31158 } 31159 }, 31160 { 31161 "modulePath": "core/src/lib/conditions/valueComparison.js", 31162 "settings": { 31163 "comparison": { 31164 "operator": "doesNotEqual", 31165 "caseInsensitive": true 31166 }, 31167 "leftOperand": "%DisableAnalyticsCookie%", 31168 "rightOperand": "true" 31169 } 31170 } 31171 ], 31172 "actions": [ 31173 { 31174 "modulePath": "core/src/lib/actions/customCode.js", 31175 "settings": { 31176 "source": "<script type=\"text/javascript\">\n piAId = '919843';\n piCId = '';\n piHostname = 'landing.ni.com';\n\n (function () {\n function async_load() {\n var s = document.createElement('script');\n s.type = 'text/javascript';\n s.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + piHostname + '/pd.js';\n var c = document.getElementsByTagName('script')[0];\n c.parentNode.insertBefore(s, c);\n }\n if (window.attachEvent) {\n window.attachEvent('onload', async_load);\n } else {\n window.addEventListener('load', async_load, false);\n }\n })();\n</script>\n", 31177 "language": "html" 31178 } 31179 }, 31180 { 31181 "modulePath": "core/src/lib/actions/customCode.js", 31182 "settings": { 31183 "source": "if(sessionStorage.getItem(\"Analytics3rdPartyDebug\") !== null || document.cookie.indexOf('Analytics3rdPartyDebug') > -1){\n NIAnalytics.ruleLogger(\"Pardot:PLR\");\n}", 31184 "language": "javascript" 31185 } 31186 } 31187 ] 31188 }, 31189 { 31190 "id": "RL321c7879e368462e8844822c2aee4e9d", 31191 "name": "Distributor_API_Error:DCR", 31192 "events": [ 31193 { 31194 "modulePath": "core/src/lib/events/customEvent.js", 31195 "settings": { 31196 "type": "aa-error-shown", 31197 "bubbleFireIfParent": true, 31198 "bubbleFireIfChildFired": true 31199 }, 31200 "ruleOrder": 50.0 31201 } 31202 ], 31203 "conditions": [ 31204 { 31205 "modulePath": "core/src/lib/conditions/valueComparison.js", 31206 "settings": { 31207 "comparison": { 31208 "operator": "doesNotEqual", 31209 "caseInsensitive": true 31210 }, 31211 "leftOperand": "%DisableAnalyticsCookie%", 31212 "rightOperand": "true" 31213 } 31214 }, 31215 { 31216 "modulePath": "core/src/lib/conditions/valueComparison.js", 31217 "settings": { 31218 "comparison": { 31219 "operator": "doesNotEqual", 31220 "caseInsensitive": true 31221 }, 31222 "leftOperand": "%TRAFFICTYPE_META%", 31223 "rightOperand": "bot" 31224 } 31225 } 31226 ], 31227 "actions": [ 31228 { 31229 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 31230 "settings": { 31231 "customSetup": { 31232 "source": function(event, s) { 31233 NIAnalytics.setAndTrack(["eVar42", "prop14"], event.detail.errorCode); 31234NIAnalytics.setAndTrack("eVar43", event.detail.errorMessage); 31235} 31236 }, 31237 "trackerProperties": { 31238 "eVars": [ 31239 { 31240 "name": "eVar1", 31241 "type": "value", 31242 "value": "%PAGE_NAME%" 31243 }, 31244 { 31245 "name": "eVar3", 31246 "type": "value", 31247 "value": "%ICID:URL_PARAM%" 31248 }, 31249 { 31250 "name": "eVar9", 31251 "type": "value", 31252 "value": "%LOGGED_IN%" 31253 }, 31254 { 31255 "name": "eVar10", 31256 "type": "value", 31257 "value": "%LANGUAGE:METATAG%" 31258 }, 31259 { 31260 "name": "eVar11", 31261 "type": "value", 31262 "value": "%LOCALE:COOKIE%" 31263 }, 31264 { 31265 "name": "eVar12", 31266 "type": "value", 31267 "value": "%PROFILE_ID:COOKIE%" 31268 }, 31269 { 31270 "name": "eVar13", 31271 "type": "value", 31272 "value": "%ESPUID:URL_PARAM%" 31273 }, 31274 { 31275 "name": "eVar21", 31276 "type": "value", 31277 "value": "%PAGE_URL%" 31278 }, 31279 { 31280 "name": "eVar27", 31281 "type": "value", 31282 "value": "%CONTENTTYPE:METATAG%" 31283 }, 31284 { 31285 "name": "eVar31", 31286 "type": "value", 31287 "value": "%PRODREF%" 31288 }, 31289 { 31290 "name": "eVar36", 31291 "type": "value",
31292 "value": "%DOMAIN%" 31293 }, 31294 { 31295 "name": "eVar59", 31296 "type": "value", 31297 "value": "%PAGE_NAME%" 31298 }, 31299 { 31300 "name": "eVar64", 31301 "type": "value", 31302 "value": "%DOCUMENTCOREID:METATAG%" 31303 }, 31304 { 31305 "name": "eVar67", 31306 "type": "value", 31307 "value": "%WORD_COUNT%" 31308 }, 31309 { 31310 "name": "eVar68", 31311 "type": "value", 31312 "value": "%LINK_COUNT%" 31313 }, 31314 { 31315 "name": "eVar69", 31316 "type": "value", 31317 "value": "%KEYWORDS_PART1:METATAG%" 31318 }, 31319 { 31320 "name": "eVar70", 31321 "type": "value", 31322 "value": "%KEYWORDS_PART2:METATAG%" 31323 }, 31324 { 31325 "name": "eVar73", 31326 "type": "value", 31327 "value": "%ASSESSMENT_PERSONA%" 31328 }, 31329 { 31330 "name": "eVar74", 31331 "type": "value", 31332 "value": "%HTML_TITLE%" 31333 }, 31334 { 31335 "name": "eVar88", 31336 "type": "value", 31337 "value": "%6SENSE_SICCODE%" 31338 }, 31339 { 31340 "name": "eVar102", 31341 "type": "value", 31342 "value": "%KEYWORDS_COUNT%" 31343 }, 31344 { 31345 "name": "eVar103", 31346 "type": "value", 31347 "value": "%TITLE_LENGTH%" 31348 }, 31349 { 31350 "name": "eVar109", 31351 "type": "value", 31352 "value": "%PRODUCT_MANUFACTURER:DL%" 31353 }, 31354 { 31355 "name": "eVar110", 31356 "type": "value", 31357 "value": "%PCID%" 31358 }, 31359 { 31360 "name": "eVar122", 31361 "type": "value", 31362 "value": "%LETTER_COUNT%" 31363 }, 31364 { 31365 "name": "eVar124", 31366 "type": "value", 31367 "value": "%WRAPPER:METATAG%|%WRAPPERID:METATAG%" 31368 }, 31369 { 31370 "name": "eVar125", 31371 "type": "value", 31372 "value": "%TEMPLATE:PI:PA:DL%" 31373 }, 31374 { 31375 "name": "eVar130", 31376 "type": "value", 31377 "value": "%EXPERIENCE_CLOUD_ID%" 31378 }, 31379 { 31380 "name": "eVar137", 31381 "type": "value", 31382 "value": "%SEO_H1_VALUES%" 31383 }, 31384 { 31385 "name": "eVar138", 31386 "type": "value", 31387 "value": "%SEO_H2_VALUES%" 31388 }, 31389 { 31390 "name": "eVar139", 31391 "type": "value", 31392 "value": "%SEO_H3_VALUES%" 31393 }, 31394 { 31395 "name": "eVar140", 31396 "type": "value", 31397 "value": "%DESCRIPTION:METATAG%" 31398 }, 31399 { 31400 "name": "eVar143", 31401 "type": "value", 31402 "value": "6Sense" 31403 }, 31404 { 31405 "name": "eVar152", 31406 "type": "value", 31407 "value": "%OneTrust_STATUS%" 31408 } 31409 ], 31410 "props": [ 31411 { 31412 "name": "prop1", 31413 "type": "value", 31414 "value": "error page" 31415 }, 31416 { 31417 "name": "prop2", 31418 "type": "alias", 31419 "value": "eVar27" 31420 }, 31421 { 31422 "name": "prop4", 31423 "type": "alias", 31424 "value": "eVar2" 31425 }, 31426 { 31427 "name": "prop6", 31428 "type": "value", 31429 "value": "%PREV_PAGE_NAME%" 31430 }, 31431 { 31432 "name": "prop12", 31433 "type": "alias", 31434 "value": "eVar74" 31435 }, 31436 { 31437 "name": "prop13", 31438 "type": "alias", 31439 "value": "eVar124" 31440 }, 31441 { 31442 "name": "prop21", 31443 "type": "value", 31444 "value": "%INDUSTRY:AT:PA:DL%" 31445 }, 31446 { 31447 "name": "prop23", 31448 "type": "alias", 31449 "value": "eVar1" 31450 }, 31451 { 31452 "name": "prop27", 31453 "type": "alias", 31454 "value": "eVar59" 31455 }, 31456 { 31457 "name": "prop28", 31458 "type": "value", 31459 "value": "%NAVIGATION_SECTION%" 31460 }, 31461 { 31462 "name": "prop29", 31463 "type": "value", 31464 "value": "%SHORT_PAGENAME%" 31465 }, 31466 { 31467 "name": "prop30", 31468 "type": "value", 31469 "value": "%GENERIC_PAGENAME%" 31470 }, 31471 { 31472 "name": "prop31", 31473 "type": "alias", 31474 "value": "eVar36" 31475 }, 31476 { 31477 "name": "prop33", 31478 "type": "alias", 31479 "value": "eVar21" 31480 }, 31481 { 31482 "name": "prop38", 31483 "type": "alias", 31484 "value": "eVar88" 31485 }, 31486 { 31487 "name": "prop50", 31488 "type": "alias", 31489 "value": "eVar56" 31490 }, 31491 { 31492 "name": "prop75", 31493 "type": "value", 31494 "value": "client" 31495 } 31496 ], 31497 "events": [ 31498 { 31499 "name": "event29" 31500 } 31501 ] 31502 } 31503 } 31504 }, 31505 { 31506 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 31507 "settings": { 31508 "type": "link", 31509 "linkType": "o" 31510 } 31511 }, 31512 { 31513 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 31514 "settings": {} 31515 } 31516 ] 31517 }, 31518 { 31519 "id": "RL32828ce87f244b5ead8cc6d41be7ad92", 31520 "name": "EventFilterClick:EBR", 31521 "events": [ 31522 { 31523 "modulePath": "core/src/lib/events/click.js", 31524 "settings": { 31525 "elementSelector": ".nicrc--checkbox, .nicrc--radio-button", 31526 "bubbleFireIfParent": true, 31527 "bubbleFireIfChildFired": true 31528 }, 31529 "ruleOrder": 50.0 31530 } 31531 ], 31532 "conditions": [ 31533 { 31534 "modulePath": "core/src/lib/conditions/customCode.js", 31535 "settings": { 31536 "source": function(event, target) { 31537 return /^\/[a-z]{2}(?:-[a-z]{2})?\/events\.html$/i.test(window.location.pathname); 31538} 31539 } 31540 } 31541 ], 31542 "actions": [ 31543 { 31544 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 31545 "settings": { 31546 "customSetup": { 31547 "source": function(event, s) { 31548 _satellite.logger.log(event); 31549const input = event.target; 31550 31551const fieldset = input.closest('fieldset'); 31552const category = fieldset?.querySelector('legend')?.textContent?.trim(); 31553 31554const label = document.querySelector(`label[for="${input.id}"]`); 31555const item = label?.textContent?.trim(); 31556NIAnalytics.setAndTrack(["eVar33", "prop23"], "Events:"+category); 31557NIAnalytics.setAndTrack("eVar35", "Events:"+category+":"+item); 31558} 31559 }, 31560 "trackerProperties": { 31561 "eVars": [ 31562 { 31563 "name": "eVar1", 31564 "type": "value", 31565 "value": "%PAGE_NAME%" 31566 }, 31567 { 31568 "name": "eVar21", 31569 "type": "value", 31570 "value": "%PAGE_URL%" 31571 }, 31572 { 31573 "name": "eVar56", 31574 "type": "value",
31575 "value": "%DETAILED_PAGENAME%" 31576 } 31577 ], 31578 "props": [ 31579 { 31580 "name": "prop2", 31581 "type": "value", 31582 "value": "%CONTENTTYPE:METATAG%" 31583 }, 31584 { 31585 "name": "prop33", 31586 "type": "alias", 31587 "value": "eVar21" 31588 } 31589 ], 31590 "events": [ 31591 { 31592 "name": "event30" 31593 } 31594 ] 31595 } 31596 } 31597 }, 31598 { 31599 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 31600 "settings": { 31601 "type": "link", 31602 "linkName": "Event filter click", 31603 "linkType": "o" 31604 } 31605 }, 31606 { 31607 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 31608 "settings": {} 31609 } 31610 ] 31611 }, 31612 { 31613 "id": "RL32cd15fe2dbc444f8027cafa928bd50d", 31614 "name": "CTA_Image_Click:EBR", 31615 "events": [ 31616 { 31617 "modulePath": "core/src/lib/events/click.js", 31618 "settings": { 31619 "elementSelector": ".hw-pdp__grid-column .image-zoom-container, .hw-pdp__grid-column .carousel-thumbnail-wrapper", 31620 "bubbleFireIfParent": true, 31621 "bubbleFireIfChildFired": false 31622 }, 31623 "ruleOrder": 50.0 31624 } 31625 ], 31626 "conditions": [ 31627 { 31628 "modulePath": "core/src/lib/conditions/valueComparison.js", 31629 "settings": { 31630 "comparison": { 31631 "operator": "doesNotEqual", 31632 "caseInsensitive": true 31633 }, 31634 "leftOperand": "%DisableAnalyticsCookie%", 31635 "rightOperand": "true" 31636 } 31637 }, 31638 { 31639 "modulePath": "core/src/lib/conditions/valueComparison.js", 31640 "settings": { 31641 "comparison": { 31642 "operator": "doesNotEqual", 31643 "caseInsensitive": true 31644 }, 31645 "leftOperand": "%TRAFFICTYPE_META%", 31646 "rightOperand": "bot" 31647 } 31648 } 31649 ], 31650 "actions": [ 31651 { 31652 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 31653 "settings": { 31654 "customSetup": { 31655 "source": function(event, s) { 31656 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Image:" + event?.element?.querySelector('img')?.alt || event?.element?.querySelector('img')?.src); 31657} 31658 }, 31659 "trackerProperties": { 31660 "eVars": [ 31661 { 31662 "name": "eVar1", 31663 "type": "value", 31664 "value": "%PAGE_NAME%" 31665 }, 31666 { 31667 "name": "eVar12", 31668 "type": "value", 31669 "value": "%PROFILE_ID:COOKIE%" 31670 }, 31671 { 31672 "name": "eVar21", 31673 "type": "value", 31674 "value": "%PAGE_URL%" 31675 }, 31676 { 31677 "name": "eVar27", 31678 "type": "value", 31679 "value": "%CONTENTTYPE:METATAG%" 31680 } 31681 ], 31682 "props": [ 31683 { 31684 "name": "prop2", 31685 "type": "alias", 31686 "value": "eVar27" 31687 }, 31688 { 31689 "name": "prop33", 31690 "type": "alias", 31691 "value": "eVar21" 31692 } 31693 ], 31694 "events": [ 31695 { 31696 "name": "event30" 31697 } 31698 ], 31699 "pageURL": "%PAGE_URL%" 31700 } 31701 } 31702 }, 31703 { 31704 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 31705 "settings": { 31706 "type": "link", 31707 "linkName": "aa-react-link", 31708 "linkType": "o" 31709 } 31710 }, 31711 { 31712 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 31713 "settings": {} 31714 } 31715 ] 31716 }, 31717 { 31718 "id": "RL32e301e8d9ab4fba8e2bc01daa6fb085", 31719 "name": "Accordion_Click:EBR", 31720 "events": [ 31721 { 31722 "modulePath": "core/src/lib/events/click.js", 31723 "settings": {
31724 "elementSelector": ".accordion_item", 31725 "bubbleFireIfParent": true, 31726 "bubbleFireIfChildFired": true 31727 }, 31728 "ruleOrder": 50.0 31729 } 31730 ], 31731 "conditions": [ 31732 { 31733 "modulePath": "core/src/lib/conditions/valueComparison.js", 31734 "settings": { 31735 "comparison": { 31736 "operator": "doesNotEqual", 31737 "caseInsensitive": true 31738 }, 31739 "leftOperand": "%DisableAnalyticsCookie%", 31740 "rightOperand": "true" 31741 } 31742 }, 31743 { 31744 "modulePath": "core/src/lib/conditions/valueComparison.js", 31745 "settings": { 31746 "comparison": { 31747 "operator": "doesNotEqual", 31748 "caseInsensitive": true 31749 }, 31750 "leftOperand": "%TRAFFICTYPE_META%", 31751 "rightOperand": "bot" 31752 } 31753 } 31754 ], 31755 "actions": [ 31756 { 31757 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 31758 "settings": { 31759 "customSetup": { 31760 "source": function(event, s) { 31761 let accLabel = event.target?.innerText || ""; 31762NIAnalytics.setAndTrack(["eVar33", "prop23"], "Accordion link:"+ accLabel); 31763} 31764 }, 31765 "trackerProperties": { 31766 "eVars": [ 31767 { 31768 "name": "eVar1", 31769 "type": "value", 31770 "value": "%PAGE_NAME%" 31771 }, 31772 { 31773 "name": "eVar12", 31774 "type": "value", 31775 "value": "%PROFILE_ID:COOKIE%" 31776 }, 31777 { 31778 "name": "eVar21", 31779 "type": "value", 31780 "value": "%PAGE_URL%" 31781 }, 31782 { 31783 "name": "eVar27", 31784 "type": "value", 31785 "value": "%CONTENTTYPE:METATAG%" 31786 } 31787 ], 31788 "props": [ 31789 { 31790 "name": "prop2", 31791 "type": "alias", 31792 "value": "eVar27" 31793 }, 31794 { 31795 "name": "prop33", 31796 "type": "alias", 31797 "value": "eVar21" 31798 } 31799 ], 31800 "events": [ 31801 { 31802 "name": "event30" 31803 } 31804 ], 31805 "pageURL": "%PAGE_URL%" 31806 } 31807 } 31808 }, 31809 { 31810 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 31811 "settings": { 31812 "type": "link", 31813 "linkName": "aa-react-link", 31814 "linkType": "o" 31815 } 31816 }, 31817 { 31818 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 31819 "settings": {} 31820 } 31821 ] 31822 }, 31823 { 31824 "id": "RL338b7fb50dc54b39bae87dd568f5ba52", 31825 "name": "Cart_Checkout_Login:EBR", 31826 "events": [ 31827 { 31828 "modulePath": "core/src/lib/events/click.js", 31829 "settings": { 31830 "elementSelector": ".checkout-button > button", 31831 "bubbleFireIfParent": true, 31832 "bubbleFireIfChildFired": false 31833 }, 31834 "ruleOrder": 50.0 31835 } 31836 ], 31837 "conditions": [ 31838 { 31839 "modulePath": "core/src/lib/conditions/valueComparison.js", 31840 "settings": { 31841 "comparison": { 31842 "operator": "doesNotEqual", 31843 "caseInsensitive": true 31844 }, 31845 "leftOperand": "%DisableAnalyticsCookie%", 31846 "rightOperand": "true" 31847 } 31848 }, 31849 { 31850 "modulePath": "core/src/lib/conditions/valueComparison.js", 31851 "settings": { 31852 "comparison": { 31853 "operator": "equals", 31854 "caseInsensitive": true 31855 }, 31856 "leftOperand": "%LOGGED_IN%", 31857 "rightOperand": "not logged in" 31858 } 31859 } 31860 ], 31861 "actions": [ 31862 { 31863 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 31864 "settings": { 31865 "trackerProperties": { 31866 "events": [ 31867 { 31868 "name": "event8" 31869 } 31870 ] 31871 } 31872 } 31873 }, 31874 { 31875 "modulePath": "sdi-toolkit/src/lib/actions/cookie_setter.js", 31876 "settings": { 31877 "path": "/", 31878 "domain": ".ni.com", 31879 "cookieKey": "s_cart_login", 31880 "cookieValue": "1", 31881 "expirationDays": 1 31882 } 31883 } 31884 ] 31885 }, 31886 {
31887 "id": "RL344315a8403044c1b97104ceae1e8d1c", 31888 "name": "PartNumberClick:EBR", 31889 "events": [ 31890 { 31891 "modulePath": "core/src/lib/events/customEvent.js", 31892 "settings": { 31893 "type": "aa-partnumber-click", 31894 "bubbleFireIfParent": true, 31895 "bubbleFireIfChildFired": true 31896 }, 31897 "ruleOrder": 50.0 31898 } 31899 ], 31900 "conditions": [ 31901 { 31902 "modulePath": "core/src/lib/conditions/valueComparison.js", 31903 "settings": { 31904 "comparison": { 31905 "operator": "doesNotEqual", 31906 "caseInsensitive": true 31907 }, 31908 "leftOperand": "%DisableAnalyticsCookie%", 31909 "rightOperand": "true" 31910 } 31911 }, 31912 { 31913 "modulePath": "core/src/lib/conditions/valueComparison.js", 31914 "settings": { 31915 "comparison": { 31916 "operator": "doesNotEqual", 31917 "caseInsensitive": true 31918 }, 31919 "leftOperand": "%TRAFFICTYPE_META%", 31920 "rightOperand": "bot" 31921 } 31922 } 31923 ], 31924 "actions": [ 31925 { 31926 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 31927 "settings": { 31928 "customSetup": { 31929 "source": function(event, s) { 31930 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.detail.partNumber); 31931} 31932 }, 31933 "trackerProperties": { 31934 "eVars": [ 31935 { 31936 "name": "eVar1", 31937 "type": "value", 31938 "value": "%PAGE_NAME%" 31939 }, 31940 { 31941 "name": "eVar12", 31942 "type": "value", 31943 "value": "%PROFILE_ID:COOKIE%" 31944 }, 31945 { 31946 "name": "eVar21", 31947 "type": "value", 31948 "value": "%PAGE_URL%" 31949 }, 31950 { 31951 "name": "eVar27", 31952 "type": "value", 31953 "value": "%CONTENTTYPE:METATAG%" 31954 } 31955 ], 31956 "props": [ 31957 { 31958 "name": "prop2", 31959 "type": "alias", 31960 "value": "eVar27" 31961 }, 31962 { 31963 "name": "prop33", 31964 "type": "alias", 31965 "value": "eVar21" 31966 } 31967 ], 31968 "events": [ 31969 { 31970 "name": "event30" 31971 } 31972 ] 31973 } 31974 } 31975 }, 31976 { 31977 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 31978 "settings": { 31979 "type": "link", 31980 "linkType": "o" 31981 } 31982 }, 31983 { 31984 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 31985 "settings": {} 31986 } 31987 ] 31988 }, 31989 { 31990 "id": "RL34e16e09206f422f859c91840c21313a", 31991 "name": "Google_Adwords:PLR", 31992 "events": [ 31993 { 31994 "modulePath": "core/src/lib/events/windowLoaded.js", 31995 "settings": {}, 31996 "ruleOrder": 50.0 31997 } 31998 ], 31999 "conditions": [ 32000 { 32001 "modulePath": "core/src/lib/conditions/valueComparison.js", 32002 "settings": { 32003 "comparison": { 32004 "operator": "isTrue" 32005 }, 32006 "leftOperand": "%OneTrust_Targeting_Consent%" 32007 } 32008 }, 32009 { 32010 "modulePath": "core/src/lib/conditions/customCode.js", 32011 "settings": { 32012 "source": function(event, target) { 32013 if (_satellite.getVar("CONTENTTYPE:METATAG") == "downloadconfirm" 32014 && _satellite.getVar("GENERIC_PAGENAME").indexOf("support:downloads:software:lv-nxg") > -1 32015 && _satellite.getVar("COUNTRY_METATAG").indexOf("CN") === -1) return true; 32016 32017return _satellite.getVar("PAGE_NAME").indexOf("www.ni.com/gate/gb/") > -1; 32018} 32019 } 32020 }, 32021 { 32022 "modulePath": "core/src/lib/conditions/valueComparison.js", 32023 "settings": { 32024 "comparison": { 32025 "operator": "equals" 32026 }, 32027 "leftOperand": "%NICOM_PAGE%", 32028 "rightOperand": "true" 32029 } 32030 }, 32031 { 32032 "modulePath": "core/src/lib/conditions/valueComparison.js", 32033 "settings": { 32034 "comparison": { 32035 "operator": "doesNotEqual", 32036 "caseInsensitive": true 32037 }, 32038 "leftOperand": "%DisableAnalyticsCookie%", 32039 "rightOperand": "true" 32040 } 32041 } 32042 ], 32043 "actions": [ 32044 { 32045 "modulePath": "core/src/lib/actions/customCode.js", 32046 "settings": { 32047 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCa9a1a653a69f4b93b6a08ed8ba814949-source.js', 32048 "language": "javascript", 32049 "isExternal": true 32050 } 32051 }, 32052 { 32053 "modulePath": "core/src/lib/actions/customCode.js", 32054 "settings": { 32055 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC64602e5d4fa2404c89b7a96fedb30ef6-source.js', 32056 "language": "javascript", 32057 "isExternal": true 32058 } 32059 } 32060 ] 32061 }, 32062 { 32063 "id": "RL362cce67ec0a4e16a988c9b87252c926", 32064 "name": "Error_Message_Send:DCR", 32065 "events": [ 32066 { 32067 "modulePath": "core/src/lib/events/directCall.js", 32068 "settings": { 32069 "identifier": "errorMessageSend" 32070 }, 32071 "ruleOrder": 50.0 32072 } 32073 ], 32074 "conditions": [ 32075 { 32076 "modulePath": "core/src/lib/conditions/valueComparison.js", 32077 "settings": { 32078 "comparison": { 32079 "operator": "doesNotEqual", 32080 "caseInsensitive": true 32081 }, 32082 "leftOperand": "%DisableAnalyticsCookie%", 32083 "rightOperand": "true" 32084 } 32085 }, 32086 { 32087 "modulePath": "core/src/lib/conditions/valueComparison.js", 32088 "settings": { 32089 "comparison": { 32090 "operator": "doesNotEqual", 32091 "caseInsensitive": true 32092 }, 32093 "leftOperand": "%TRAFFICTYPE_META%", 32094 "rightOperand": "bot" 32095 } 32096 } 32097 ], 32098 "actions": [ 32099 { 32100 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32101 "settings": { 32102 "customSetup": { 32103 "source": function(event, s) { 32104 if ((event && event.detail && event.detail.analyticsErrorMessage) || analyticsErrorMessage){ 32105 if(event && event.detail && event.detail.analyticsErrorMessage) { 32106 NIAnalytics.setAndTrack("eVar43", event.detail.analyticsErrorMessage); 32107 } else { 32108 NIAnalytics.setAndTrack("eVar43", analyticsErrorMessage); 32109 } 32110} 32111} 32112 }, 32113 "trackerProperties": { 32114 "eVars": [ 32115 { 32116 "name": "eVar56", 32117 "type": "value",
32118 "value": "%DETAILED_PAGENAME%" 32119 } 32120 ], 32121 "events": [ 32122 { 32123 "name": "event29" 32124 } 32125 ] 32126 } 32127 } 32128 }, 32129 { 32130 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 32131 "settings": { 32132 "type": "link", 32133 "linkName": "error", 32134 "linkType": "o" 32135 } 32136 }, 32137 { 32138 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 32139 "settings": {} 32140 } 32141 ] 32142 }, 32143 { 32144 "id": "RL3906ec03c52a470daf7659a085e457e4", 32145 "name": "CaptureSiteError:DCR", 32146 "events": [ 32147 { 32148 "modulePath": "core/src/lib/events/directCall.js", 32149 "settings": { 32150 "identifier": "captureSiteError" 32151 }, 32152 "ruleOrder": 50.0 32153 } 32154 ], 32155 "conditions": [ 32156 { 32157 "modulePath": "core/src/lib/conditions/valueComparison.js", 32158 "settings": { 32159 "comparison": { 32160 "operator": "doesNotEqual", 32161 "caseInsensitive": true 32162 }, 32163 "leftOperand": "%DisableAnalyticsCookie%", 32164 "rightOperand": "true" 32165 } 32166 }, 32167 { 32168 "modulePath": "core/src/lib/conditions/valueComparison.js", 32169 "settings": { 32170 "comparison": { 32171 "operator": "doesNotEqual", 32172 "caseInsensitive": true 32173 }, 32174 "leftOperand": "%TRAFFICTYPE_META%", 32175 "rightOperand": "bot" 32176 } 32177 } 32178 ], 32179 "actions": [ 32180 { 32181 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32182 "settings": { 32183 "trackerProperties": { 32184 "eVars": [ 32185 { 32186 "name": "eVar1", 32187 "type": "value", 32188 "value": "%PAGE_NAME%" 32189 }, 32190 { 32191 "name": "eVar22", 32192 "type": "value", 32193 "value": "%event.detail.eventDetail%" 32194 }, 32195 { 32196 "name": "eVar43", 32197 "type": "value", 32198 "value": "%event.detail.errorMessage%" 32199 }, 32200 { 32201 "name": "eVar56", 32202 "type": "value", 32203 "value": "%DETAILED_PAGENAME%" 32204 }, 32205 { 32206 "name": "eVar101", 32207 "type": "value", 32208 "value": "%HASHED_EMAIL:USER:DL%" 32209 }, 32210 { 32211 "name": "eVar129", 32212 "type": "value", 32213 "value": "%event.detail.source%" 32214 }, 32215 { 32216 "name": "eVar154", 32217 "type": "value", 32218 "value": "%event.detail.errorName%" 32219 } 32220 ], 32221 "events": [ 32222 { 32223 "name": "event29" 32224 } 32225 ] 32226 } 32227 } 32228 }, 32229 { 32230 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 32231 "settings": { 32232 "type": "link", 32233 "linkType": "o" 32234 } 32235 }, 32236 { 32237 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 32238 "settings": {} 32239 } 32240 ] 32241 }, 32242 { 32243 "id": "RL3a9be3508f2a492ab0e7e76cd58e1f64", 32244 "name": "CoursePDP_CourseFormatSelection_Click:EBR", 32245 "events": [ 32246 { 32247 "modulePath": "core/src/lib/events/click.js", 32248 "settings": { 32249 "elementSelector": ".aa-cpdp-training-format", 32250 "bubbleFireIfParent": true, 32251 "bubbleFireIfChildFired": false 32252 }, 32253 "ruleOrder": 50.0 32254 } 32255 ], 32256 "conditions": [ 32257 { 32258 "modulePath": "core/src/lib/conditions/valueComparison.js", 32259 "settings": { 32260 "comparison": { 32261 "operator": "doesNotEqual", 32262 "caseInsensitive": true 32263 }, 32264 "leftOperand": "%DisableAnalyticsCookie%", 32265 "rightOperand": "true" 32266 } 32267 }, 32268 { 32269 "modulePath": "core/src/lib/conditions/valueComparison.js", 32270 "settings": { 32271 "comparison": { 32272 "operator": "doesNotEqual", 32273 "caseInsensitive": true 32274 }, 32275 "leftOperand": "%TRAFFICTYPE_META%", 32276 "rightOperand": "bot" 32277 } 32278 } 32279 ], 32280 "actions": [ 32281 { 32282 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32283 "settings": { 32284 "customSetup": { 32285 "source": function(event, s) { 32286 let cardTitle = event.target.closest('.course-pdp__format-card').querySelector('.course-pdp__format-title').innerText; 32287NIAnalytics.setAndTrack(["eVar33", "prop23"], cardTitle+":"+event?.target?.innerText); 32288} 32289 }, 32290 "trackerProperties": { 32291 "eVars": [ 32292 { 32293 "name": "eVar1", 32294 "type": "value", 32295 "value": "%PAGE_NAME%" 32296 }, 32297 { 32298 "name": "eVar12", 32299 "type": "value", 32300 "value": "%PROFILE_ID:COOKIE%" 32301 }, 32302 { 32303 "name": "eVar21", 32304 "type": "value", 32305 "value": "%PAGE_URL%" 32306 }, 32307 { 32308 "name": "eVar27", 32309 "type": "value", 32310 "value": "%CONTENTTYPE:METATAG%" 32311 } 32312 ], 32313 "props": [ 32314 { 32315 "name": "prop2", 32316 "type": "alias", 32317 "value": "eVar27" 32318 }, 32319 { 32320 "name": "prop33", 32321 "type": "alias", 32322 "value": "eVar21" 32323 } 32324 ], 32325 "events": [ 32326 { 32327 "name": "event30" 32328 } 32329 ] 32330 } 32331 } 32332 }, 32333 { 32334 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 32335 "settings": { 32336 "type": "link", 32337 "linkName": "Course PDP Course format selection", 32338 "linkType": "o" 32339 } 32340 }, 32341 { 32342 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 32343 "settings": {} 32344 } 32345 ] 32346 }, 32347 { 32348 "id": "RL3d854f2912124d29b68e94e2db4cc1a0", 32349 "name": "FreeCoursePDP_Accordion_Click:EBR", 32350 "events": [ 32351 { 32352 "modulePath": "core/src/lib/events/click.js", 32353 "settings": {
32354 "elementSelector": ".aa-accordion_item:not([data-aa-opened-question=true]) *", 32355 "bubbleFireIfParent": true, 32356 "bubbleFireIfChildFired": false 32357 }, 32358 "ruleOrder": 50.0 32359 } 32360 ], 32361 "conditions": [ 32362 { 32363 "modulePath": "core/src/lib/conditions/valueComparison.js", 32364 "settings": { 32365 "comparison": { 32366 "operator": "doesNotEqual", 32367 "caseInsensitive": true 32368 }, 32369 "leftOperand": "%DisableAnalyticsCookie%", 32370 "rightOperand": "true" 32371 } 32372 }, 32373 { 32374 "modulePath": "core/src/lib/conditions/valueComparison.js", 32375 "settings": { 32376 "comparison": { 32377 "operator": "doesNotEqual", 32378 "caseInsensitive": true 32379 }, 32380 "leftOperand": "%TRAFFICTYPE_META%", 32381 "rightOperand": "bot" 32382 } 32383 } 32384 ], 32385 "actions": [ 32386 { 32387 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32388 "settings": { 32389 "customSetup": { 32390 "source": function(event, s) { 32391 // Making sure that only the 1st click triggers the call 32392//_satellite.logger.log(event); 32393let accordionItem = event.element.closest(".aa-accordion_item"); 32394accordionItem.setAttribute("data-aa-opened-question", true); 32395NIAnalytics.setAndTrack(["eVar33", "prop23"], "Accordion link:"+ accordionItem.querySelector(".nicrc--accordion__title").innerText); 32396} 32397 }, 32398 "trackerProperties": { 32399 "eVars": [ 32400 { 32401 "name": "eVar1", 32402 "type": "value", 32403 "value": "%PAGE_NAME%" 32404 }, 32405 { 32406 "name": "eVar12", 32407 "type": "value", 32408 "value": "%PROFILE_ID:COOKIE%" 32409 }, 32410 { 32411 "name": "eVar21", 32412 "type": "value", 32413 "value": "%PAGE_URL%" 32414 }, 32415 { 32416 "name": "eVar27", 32417 "type": "value", 32418 "value": "%CONTENTTYPE:METATAG%" 32419 } 32420 ], 32421 "props": [ 32422 { 32423 "name": "prop2", 32424 "type": "alias", 32425 "value": "eVar27" 32426 }, 32427 { 32428 "name": "prop33", 32429 "type": "alias", 32430 "value": "eVar21" 32431 } 32432 ], 32433 "events": [ 32434 { 32435 "name": "event30" 32436 } 32437 ] 32438 } 32439 } 32440 }, 32441 { 32442 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 32443 "settings": { 32444 "type": "link", 32445 "linkName": "Free Course PDP Accordion", 32446 "linkType": "o" 32447 } 32448 }, 32449 { 32450 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 32451 "settings": {} 32452 } 32453 ] 32454 }, 32455 { 32456 "id": "RL3dd3e89189c04503ba9220e3e604e338", 32457 "name": "NI_DFA_Page_Views:PLR", 32458 "events": [ 32459 { 32460 "modulePath": "core/src/lib/events/windowLoaded.js", 32461 "settings": {}, 32462 "ruleOrder": 50.0 32463 } 32464 ], 32465 "conditions": [ 32466 { 32467 "modulePath": "core/src/lib/conditions/valueComparison.js", 32468 "settings": { 32469 "comparison": { 32470 "operator": "isTrue" 32471 }, 32472 "leftOperand": "%OneTrust_Targeting_Consent%" 32473 } 32474 }, 32475 { 32476 "modulePath": "core/src/lib/conditions/valueComparison.js", 32477 "settings": { 32478 "comparison": { 32479 "operator": "matchesRegex", 32480 "caseInsensitive": true 32481 }, 32482 "leftOperand": "%DOMAIN%", 32483 "rightOperand": "campaigns.ni.com|landing.ni.com" 32484 } 32485 }, 32486 { 32487 "modulePath": "core/src/lib/conditions/customCode.js", 32488 "settings": { 32489 "source": function(event, target) { 32490 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 32491} 32492 } 32493 }, 32494 { 32495 "modulePath": "core/src/lib/conditions/valueComparison.js", 32496 "settings": { 32497 "comparison": { 32498 "operator": "doesNotEqual", 32499 "caseInsensitive": true 32500 }, 32501 "leftOperand": "%DisableAnalyticsCookie%", 32502 "rightOperand": "true" 32503 } 32504 } 32505 ], 32506 "actions": [ 32507 { 32508 "modulePath": "core/src/lib/actions/customCode.js", 32509 "settings": { 32510 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC22673bc63d6743c6b1952a1511eeca16-source.js', 32511 "language": "html", 32512 "isExternal": true 32513 } 32514 }, 32515 { 32516 "modulePath": "core/src/lib/actions/customCode.js", 32517 "settings": { 32518 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCc2b7b3458fce454a97dd45fc0700cd4d-source.js', 32519 "language": "javascript", 32520 "isExternal": true 32521 } 32522 } 32523 ] 32524 }, 32525 { 32526 "id": "RL40657914a68a478e87b688070b0c92a3", 32527 "name": "Google_Shopping_Script:PLR", 32528 "events": [ 32529 { 32530 "modulePath": "core/src/lib/events/windowLoaded.js", 32531 "settings": {}, 32532 "ruleOrder": 50.0 32533 } 32534 ], 32535 "conditions": [ 32536 { 32537 "modulePath": "core/src/lib/conditions/valueComparison.js", 32538 "settings": { 32539 "comparison": { 32540 "operator": "isTrue" 32541 }, 32542 "leftOperand": "%OneTrust_Targeting_Consent%" 32543 } 32544 }, 32545 { 32546 "modulePath": "core/src/lib/conditions/valueComparison.js", 32547 "settings": { 32548 "comparison": { 32549 "operator": "doesNotEqual", 32550 "caseInsensitive": true 32551 }, 32552 "leftOperand": "%DisableAnalyticsCookie%", 32553 "rightOperand": "true" 32554 } 32555 }, 32556 { 32557 "modulePath": "core/src/lib/conditions/valueComparison.js", 32558 "settings": { 32559 "comparison": { 32560 "operator": "equals" 32561 }, 32562 "leftOperand": "%NICOM_PAGE%", 32563 "rightOperand": "true" 32564 } 32565 }, 32566 { 32567 "modulePath": "core/src/lib/conditions/valueComparison.js", 32568 "settings": { 32569 "comparison": { 32570 "operator": "equals" 32571 }, 32572 "leftOperand": "%GOOGLE_SHOPPING_FILTER%", 32573 "rightOperand": "true" 32574 } 32575 } 32576 ], 32577 "actions": [ 32578 { 32579 "modulePath": "core/src/lib/actions/customCode.js", 32580 "settings": { 32581 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC412a6890ec1749cfaf01629853dabf52-source.js', 32582 "language": "javascript", 32583 "isExternal": true 32584 } 32585 }, 32586 { 32587 "modulePath": "core/src/lib/actions/customCode.js", 32588 "settings": { 32589 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCe72d61edfb5347359c65c2df773e8597-source.js', 32590 "language": "javascript", 32591 "isExternal": true 32592 } 32593 } 32594 ] 32595 }, 32596 { 32597 "id": "RL40907486fd7649c2b44cf71c8db77592", 32598 "name": "MediaStart:EBR", 32599 "events": [ 32600 { 32601 "modulePath": "core/src/lib/events/mediaPlay.js", 32602 "settings": { 32603 "bubbleFireIfParent": true, 32604 "bubbleFireIfChildFired": true 32605 }, 32606 "ruleOrder": 50.0 32607 } 32608 ], 32609 "conditions": [ 32610 { 32611 "modulePath": "core/src/lib/conditions/valueComparison.js", 32612 "settings": { 32613 "comparison": { 32614 "operator": "doesNotEqual", 32615 "caseInsensitive": true 32616 }, 32617 "leftOperand": "%DisableAnalyticsCookie%", 32618 "rightOperand": "true" 32619 } 32620 }, 32621 { 32622 "modulePath": "core/src/lib/conditions/valueComparison.js", 32623 "settings": { 32624 "comparison": { 32625 "operator": "doesNotEqual", 32626 "caseInsensitive": true 32627 }, 32628 "leftOperand": "%TRAFFICTYPE_META%", 32629 "rightOperand": "bot" 32630 } 32631 } 32632 ], 32633 "actions": [ 32634 { 32635 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32636 "settings": { 32637 "customSetup": { 32638 "source": function(event, s) { 32639 NIAnalytics.setAndTrack(["eVar30", "prop22"], videojs.getPlayers()[event.element.playerId].mediainfo.name); 32640} 32641 }, 32642 "trackerProperties": { 32643 "eVars": [ 32644 { 32645 "name": "eVar1", 32646 "type": "value", 32647 "value": "%PAGE_NAME%" 32648 }, 32649 { 32650 "name": "eVar21", 32651 "type": "value", 32652 "value": "%PAGE_URL%" 32653 }, 32654 { 32655 "name": "eVar147", 32656 "type": "value", 32657 "value": "%CURRENT_ISO_DATE_STRING%" 32658 } 32659 ], 32660 "props": [ 32661 { 32662 "name": "prop33", 32663 "type": "alias", 32664 "value": "eVar21" 32665 } 32666 ], 32667 "events": [ 32668 { 32669 "name": "event15" 32670 } 32671 ] 32672 } 32673 } 32674 }, 32675 { 32676 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 32677 "settings": { 32678 "type": "link", 32679 "linkType": "o" 32680 } 32681 }, 32682 { 32683 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 32684 "settings": {} 32685 } 32686 ] 32687 }, 32688 { 32689 "id": "RL40f6419c01504b5c9451b40c4f908120", 32690 "name": "TabContent_CTA_Click:EBR", 32691 "events": [ 32692 { 32693 "modulePath": "core/src/lib/events/click.js", 32694 "settings": { 32695 "elementSelector": "[class*=\"Tabs_verticalTabs\"] .nicrc--tab-content a.link, [class*=\"Tabs_verticalTabs\"] .nicrc--tab-content button", 32696 "bubbleFireIfParent": true, 32697 "bubbleFireIfChildFired": true 32698 }, 32699 "ruleOrder": 50.0 32700 } 32701 ], 32702 "conditions": [ 32703 { 32704 "modulePath": "core/src/lib/conditions/valueComparison.js", 32705 "settings": { 32706 "comparison": { 32707 "operator": "doesNotEqual", 32708 "caseInsensitive": true 32709 }, 32710 "leftOperand": "%DisableAnalyticsCookie%", 32711 "rightOperand": "true" 32712 } 32713 }, 32714 { 32715 "modulePath": "core/src/lib/conditions/valueComparison.js", 32716 "settings": { 32717 "comparison": { 32718 "operator": "doesNotEqual", 32719 "caseInsensitive": true 32720 }, 32721 "leftOperand": "%TRAFFICTYPE_META%", 32722 "rightOperand": "bot" 32723 } 32724 } 32725 ], 32726 "actions": [ 32727 { 32728 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32729 "settings": { 32730 "customSetup": { 32731 "source": function(event, s) {
32732 let cardTitleName = event.target.closest(".nicrc--tab-content").querySelector(".headline").innerText; 32733let ctaLabel = event.target.attributes.hasOwnProperty("data-an-cta-label") ? event.target.attributes['data-an-cta-label'].value : event.target.innerText; 32734NIAnalytics.setAndTrack(["eVar33", "prop23"], "Side tab:" + cardTitleName + ":" + ctaLabel || ''); 32735} 32736 }, 32737 "trackerProperties": { 32738 "eVars": [ 32739 { 32740 "name": "eVar1", 32741 "type": "value", 32742 "value": "%PAGE_NAME%" 32743 }, 32744 { 32745 "name": "eVar12", 32746 "type": "value", 32747 "value": "%PROFILE_ID:COOKIE%" 32748 }, 32749 { 32750 "name": "eVar21", 32751 "type": "value", 32752 "value": "%PAGE_URL%" 32753 }, 32754 { 32755 "name": "eVar27", 32756 "type": "value", 32757 "value": "%CONTENTTYPE:METATAG%" 32758 } 32759 ], 32760 "props": [ 32761 { 32762 "name": "prop2", 32763 "type": "alias", 32764 "value": "eVar27" 32765 }, 32766 { 32767 "name": "prop33", 32768 "type": "alias", 32769 "value": "eVar21" 32770 } 32771 ], 32772 "events": [ 32773 { 32774 "name": "event30" 32775 } 32776 ], 32777 "pageURL": "%PAGE_URL%" 32778 } 32779 } 32780 }, 32781 { 32782 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 32783 "settings": { 32784 "type": "link", 32785 "linkName": "aa-react-link", 32786 "linkType": "o" 32787 } 32788 }, 32789 { 32790 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 32791 "settings": {} 32792 } 32793 ] 32794 }, 32795 { 32796 "id": "RL42e299b6717c40d9999ec133d6318027", 32797 "name": "Capture_Assessment:DCR", 32798 "events": [ 32799 { 32800 "modulePath": "core/src/lib/events/directCall.js", 32801 "settings": { 32802 "identifier": "captureAssessment" 32803 }, 32804 "ruleOrder": 50.0 32805 } 32806 ], 32807 "conditions": [ 32808 { 32809 "modulePath": "core/src/lib/conditions/valueComparison.js", 32810 "settings": { 32811 "comparison": { 32812 "operator": "doesNotEqual", 32813 "caseInsensitive": true 32814 }, 32815 "leftOperand": "%DisableAnalyticsCookie%", 32816 "rightOperand": "true" 32817 } 32818 }, 32819 { 32820 "modulePath": "core/src/lib/conditions/valueComparison.js", 32821 "settings": { 32822 "comparison": { 32823 "operator": "doesNotEqual", 32824 "caseInsensitive": true 32825 }, 32826 "leftOperand": "%TRAFFICTYPE_META%", 32827 "rightOperand": "bot" 32828 } 32829 } 32830 ], 32831 "actions": [ 32832 { 32833 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32834 "settings": { 32835 "customSetup": { 32836 "source": function(event, s) { 32837 NIAnalytics.createNestedObject(digitalData, ["valueToHash"], ""); 32838var email = event.detail.email; 32839digitalData.valueToHash = email; 32840s.eVar101 = email !== "" ? _satellite.getVar('MD5_HASH') : ""; 32841s.linkTrackVars+=",eVar101"; 32842 32843switch(event.detail.eventName) { 32844 case "start": 32845 s.events += s.events === "" ? "event42" : ",event42"; 32846 s.linkTrackEvents +=",event42"; 32847 NIAnalytics.setAndTrack(["eVar33", "prop23"], "assessment:start"); 32848 break; 32849 32850 case "answer": 32851 if((typeof event.detail.questionNr !== "undefined") && (typeof event.detail.response !== "undefined")) { 32852 NIAnalytics.setAndTrack("eVar72", "q" + event.detail.questionNr + ":" + event.detail.response); 32853 } 32854 NIAnalytics.setAndTrack(["eVar33", "prop23"], "assessment:answer"); 32855 break; 32856 32857 case "complete": 32858 s.events += s.events === "" ? "event43" : ",event43"; 32859 s.linkTrackEvents +=",event43"; 32860 NIAnalytics.setAndTrack(["eVar33", "prop23"], "assessment:complete"); 32861 break; 32862 32863 default: 32864 break; 32865} 32866 32867switch(typeof event.detail.optIn){ 32868 case "string": 32869 if(event.detail.optIn.toLowerCase() === "true"){ 32870 _satellite.track("merkleOptin"); 32871 NIAnalytics.setAndTrack(["eVar151"], "true"); 32872 } 32873 break; 32874 32875 case "boolean": 32876 if(event.detail.optIn){ 32877 _satellite.track("merkleOptin"); 32878 NIAnalytics.setAndTrack(["eVar151"], "true"); 32879 } 32880 break; 32881 32882 default: 32883 break; 32884} 32885 32886} 32887 }, 32888 "trackerProperties": { 32889 "eVars": [ 32890 { 32891 "name": "eVar1", 32892 "type": "value", 32893 "value": "%PAGE_NAME%" 32894 }, 32895 { 32896 "name": "eVar12", 32897 "type": "value", 32898 "value": "%PROFILE_ID:COOKIE%" 32899 }, 32900 { 32901 "name": "eVar21", 32902 "type": "value", 32903 "value": "%PAGE_URL%" 32904 }, 32905 { 32906 "name": "eVar56", 32907 "type": "value",
32908 "value": "%DETAILED_PAGENAME%" 32909 }, 32910 { 32911 "name": "eVar71", 32912 "type": "value", 32913 "value": "7vt" 32914 }, 32915 { 32916 "name": "eVar152", 32917 "type": "value", 32918 "value": "%OneTrust_STATUS%" 32919 } 32920 ], 32921 "props": [ 32922 { 32923 "name": "prop2", 32924 "type": "alias", 32925 "value": "eVar27" 32926 }, 32927 { 32928 "name": "prop33", 32929 "type": "alias", 32930 "value": "eVar21" 32931 }, 32932 { 32933 "name": "prop50", 32934 "type": "alias", 32935 "value": "eVar56" 32936 } 32937 ], 32938 "events": [ 32939 { 32940 "name": "event30" 32941 } 32942 ], 32943 "pageName": "%PAGE_NAME%" 32944 } 32945 } 32946 }, 32947 { 32948 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 32949 "settings": { 32950 "type": "link", 32951 "linkType": "o" 32952 } 32953 }, 32954 { 32955 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 32956 "settings": {} 32957 } 32958 ] 32959 }, 32960 { 32961 "id": "RL444553a96ddb492ea24d2f20bc521fd5", 32962 "name": "EventLeadspaceCTAClick:EBR", 32963 "events": [ 32964 { 32965 "modulePath": "core/src/lib/events/click.js", 32966 "settings": { 32967 "elementSelector": ".deap-events-leadspace-cta", 32968 "bubbleFireIfParent": true, 32969 "bubbleFireIfChildFired": true 32970 }, 32971 "ruleOrder": 50.0 32972 } 32973 ], 32974 "conditions": [], 32975 "actions": [ 32976 { 32977 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 32978 "settings": { 32979 "customSetup": { 32980 "source": function(event, s) { 32981 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Events:hero:"+ event.target.innerText); 32982} 32983 }, 32984 "trackerProperties": { 32985 "eVars": [ 32986 { 32987 "name": "eVar1", 32988 "type": "value", 32989 "value": "%PAGE_NAME%" 32990 }, 32991 { 32992 "name": "eVar12", 32993 "type": "value", 32994 "value": "%PROFILE_ID:COOKIE%" 32995 }, 32996 { 32997 "name": "eVar21", 32998 "type": "value", 32999 "value": "%PAGE_URL%" 33000 }, 33001 { 33002 "name": "eVar27", 33003 "type": "value", 33004 "value": "%CONTENTTYPE:METATAG%" 33005 } 33006 ], 33007 "props": [ 33008 { 33009 "name": "prop2", 33010 "type": "alias", 33011 "value": "eVar27" 33012 }, 33013 { 33014 "name": "prop33", 33015 "type": "alias", 33016 "value": "eVar21" 33017 } 33018 ], 33019 "events": [ 33020 { 33021 "name": "event30" 33022 } 33023 ] 33024 } 33025 } 33026 }, 33027 { 33028 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33029 "settings": { 33030 "type": "link", 33031 "linkName": "Event leadspace CTA click", 33032 "linkType": "o" 33033 } 33034 }, 33035 { 33036 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33037 "settings": {} 33038 } 33039 ] 33040 }, 33041 { 33042 "id": "RL44ab1e17b1324dd9bc332a6811c1053a", 33043 "name": "EndOfPage_Banner_CTA_Click:EBR", 33044 "events": [ 33045 { 33046 "modulePath": "core/src/lib/events/click.js", 33047 "settings": { 33048 "elementSelector": "[class*=\"Banner_end-of-page-banner\"] a", 33049 "bubbleFireIfParent": true, 33050 "bubbleFireIfChildFired": false 33051 }, 33052 "ruleOrder": 50.0 33053 } 33054 ], 33055 "conditions": [ 33056 { 33057 "modulePath": "core/src/lib/conditions/valueComparison.js", 33058 "settings": { 33059 "comparison": { 33060 "operator": "doesNotEqual", 33061 "caseInsensitive": true 33062 }, 33063 "leftOperand": "%DisableAnalyticsCookie%", 33064 "rightOperand": "true" 33065 } 33066 }, 33067 { 33068 "modulePath": "core/src/lib/conditions/valueComparison.js", 33069 "settings": { 33070 "comparison": { 33071 "operator": "doesNotEqual", 33072 "caseInsensitive": true 33073 }, 33074 "leftOperand": "%TRAFFICTYPE_META%", 33075 "rightOperand": "bot" 33076 } 33077 } 33078 ], 33079 "actions": [ 33080 { 33081 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33082 "settings": { 33083 "customSetup": { 33084 "source": function(event, s) { 33085 let ctaLabel = event.target.attributes.hasOwnProperty("data-an-cta-label") ? event.target.getAttribute('data-an-cta-label') : event.target.innerText; 33086NIAnalytics.setAndTrack(["eVar33", "prop23"], "Bottom section: "+ ctaLabel); 33087} 33088 }, 33089 "trackerProperties": { 33090 "eVars": [ 33091 { 33092 "name": "eVar1", 33093 "type": "value", 33094 "value": "%PAGE_NAME%" 33095 }, 33096 { 33097 "name": "eVar12", 33098 "type": "value", 33099 "value": "%PROFILE_ID:COOKIE%" 33100 }, 33101 { 33102 "name": "eVar21", 33103 "type": "value", 33104 "value": "%PAGE_URL%" 33105 }, 33106 { 33107 "name": "eVar27", 33108 "type": "value", 33109 "value": "%CONTENTTYPE:METATAG%" 33110 } 33111 ], 33112 "props": [ 33113 { 33114 "name": "prop2", 33115 "type": "alias", 33116 "value": "eVar27" 33117 }, 33118 { 33119 "name": "prop33", 33120 "type": "alias", 33121 "value": "eVar21" 33122 } 33123 ], 33124 "events": [ 33125 { 33126 "name": "event30" 33127 } 33128 ] 33129 } 33130 } 33131 }, 33132 { 33133 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33134 "settings": { 33135 "type": "link", 33136 "linkName": "aa-react-link", 33137 "linkType": "o" 33138 } 33139 }, 33140 { 33141 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33142 "settings": {} 33143 } 33144 ] 33145 }, 33146 { 33147 "id": "RL47d9b94352fc4f10bd422aee1702e172", 33148 "name": "KITPDP_Included_Items_Click:EBR", 33149 "events": [ 33150 { 33151 "modulePath": "core/src/lib/events/click.js", 33152 "settings": { 33153 "elementSelector": ".aa-kitpdp-included", 33154 "bubbleFireIfParent": true, 33155 "bubbleFireIfChildFired": false 33156 }, 33157 "ruleOrder": 50.0 33158 } 33159 ], 33160 "conditions": [ 33161 { 33162 "modulePath": "core/src/lib/conditions/valueComparison.js", 33163 "settings": { 33164 "comparison": { 33165 "operator": "doesNotEqual", 33166 "caseInsensitive": true 33167 }, 33168 "leftOperand": "%DisableAnalyticsCookie%", 33169 "rightOperand": "true" 33170 } 33171 }, 33172 { 33173 "modulePath": "core/src/lib/conditions/valueComparison.js", 33174 "settings": { 33175 "comparison": { 33176 "operator": "doesNotEqual", 33177 "caseInsensitive": true 33178 }, 33179 "leftOperand": "%TRAFFICTYPE_META%", 33180 "rightOperand": "bot" 33181 } 33182 } 33183 ], 33184 "actions": [ 33185 { 33186 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33187 "settings": { 33188 "customSetup": { 33189 "source": function(event, s) { 33190 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Kit PDP:"+event.target.innerText); 33191} 33192 }, 33193 "trackerProperties": { 33194 "eVars": [ 33195 { 33196 "name": "eVar1", 33197 "type": "value", 33198 "value": "%PAGE_NAME%" 33199 }, 33200 { 33201 "name": "eVar12", 33202 "type": "value", 33203 "value": "%PROFILE_ID:COOKIE%" 33204 }, 33205 { 33206 "name": "eVar21", 33207 "type": "value", 33208 "value": "%PAGE_URL%" 33209 }, 33210 { 33211 "name": "eVar27", 33212 "type": "value", 33213 "value": "%CONTENTTYPE:METATAG%" 33214 } 33215 ], 33216 "props": [ 33217 { 33218 "name": "prop2", 33219 "type": "alias", 33220 "value": "eVar27" 33221 }, 33222 { 33223 "name": "prop33", 33224 "type": "alias", 33225 "value": "eVar21" 33226 } 33227 ], 33228 "events": [ 33229 { 33230 "name": "event30" 33231 } 33232 ] 33233 } 33234 } 33235 }, 33236 { 33237 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33238 "settings": { 33239 "type": "link", 33240 "linkName": "SW PLP", 33241 "linkType": "o" 33242 } 33243 }, 33244 { 33245 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33246 "settings": {} 33247 } 33248 ] 33249 }, 33250 { 33251 "id": "RL4881c78337e944469635fc3b480300e8", 33252 "name": "Cart&Checkout_CustEd_Reg:PLR", 33253 "events": [ 33254 { 33255 "modulePath": "core/src/lib/events/windowLoaded.js", 33256 "settings": {}, 33257 "ruleOrder": 50.0 33258 }, 33259 { 33260 "modulePath": "core/src/lib/events/directCall.js", 33261 "settings": { 33262 "identifier": "captureVirtualPageLoad" 33263 }, 33264 "ruleOrder": 1.0 33265 } 33266 ], 33267 "conditions": [ 33268 { 33269 "modulePath": "core/src/lib/conditions/valueComparison.js", 33270 "settings": { 33271 "comparison": { 33272 "operator": "doesNotEqual", 33273 "caseInsensitive": true 33274 }, 33275 "leftOperand": "%DisableAnalyticsCookie%", 33276 "rightOperand": "true" 33277 } 33278 }, 33279 { 33280 "modulePath": "core/src/lib/conditions/valueComparison.js", 33281 "settings": { 33282 "comparison": { 33283 "operator": "equals" 33284 }, 33285 "leftOperand": "%TEMPLATE:PI:PA:DL%", 33286 "rightOperand": "checkout" 33287 } 33288 }, 33289 { 33290 "modulePath": "core/src/lib/conditions/valueComparison.js", 33291 "settings": { 33292 "comparison": { 33293 "operator": "equals" 33294 }, 33295 "leftOperand": "%SUBTEMPLATE:PI:PA:DL%", 33296 "rightOperand": "custEdRegistration" 33297 } 33298 } 33299 ], 33300 "actions": [ 33301 { 33302 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33303 "settings": { 33304 "customSetup": { 33305 "source": function(event, s) { 33306 if (digitalData.cart && digitalData.cart.items && digitalData.cart.items[0]) { 33307 s.products = ";" + digitalData.cart.items[0].replace(/,/g, ",;") 33308 s.linkTrackVars += ",products"; 33309} 33310} 33311 }, 33312 "trackerProperties": { 33313 "eVars": [ 33314 { 33315 "name": "eVar22", 33316 "type": "value", 33317 "value": "%CARTID:DL%" 33318 } 33319 ], 33320 "events": [ 33321 { 33322 "name": "event53" 33323 } 33324 ] 33325 } 33326 } 33327 } 33328 ] 33329 }, 33330 {
33331 "id": "RL4b242a1c3f88417683613f6175c28d73", 33332 "name": "Renew SSP Upgrade Options:DCR", 33333 "events": [ 33334 { 33335 "modulePath": "core/src/lib/events/customEvent.js", 33336 "settings": { 33337 "type": "aa-ssp-renew-subscription-selection", 33338 "bubbleFireIfParent": true, 33339 "bubbleFireIfChildFired": true 33340 }, 33341 "ruleOrder": 50.0 33342 } 33343 ], 33344 "conditions": [], 33345 "actions": [ 33346 { 33347 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33348 "settings": { 33349 "customSetup": { 33350 "source": function(event, s) { 33351 NIAnalytics.setAndTrack(["eVar33","prop23"], "Renewal SSP:"+event.detail.currentEdition+":"+event.detail.selectedEdition+":"+event.detail.label); 33352} 33353 }, 33354 "trackerProperties": { 33355 "eVars": [ 33356 { 33357 "name": "eVar1", 33358 "type": "value", 33359 "value": "%PAGE_NAME%" 33360 }, 33361 { 33362 "name": "eVar12", 33363 "type": "value", 33364 "value": "%PROFILE_ID:COOKIE%" 33365 }, 33366 { 33367 "name": "eVar21", 33368 "type": "value", 33369 "value": "%PAGE_URL%" 33370 }, 33371 { 33372 "name": "eVar27", 33373 "type": "value", 33374 "value": "%CONTENTTYPE:METATAG%" 33375 } 33376 ], 33377 "props": [ 33378 { 33379 "name": "prop2", 33380 "type": "alias", 33381 "value": "eVar27" 33382 }, 33383 { 33384 "name": "prop33", 33385 "type": "alias", 33386 "value": "eVar21" 33387 } 33388 ], 33389 "events": [ 33390 { 33391 "name": "event30" 33392 } 33393 ] 33394 } 33395 } 33396 }, 33397 { 33398 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33399 "settings": { 33400 "type": "link", 33401 "linkName": "Renew SSP Upgrade Options", 33402 "linkType": "o" 33403 } 33404 }, 33405 { 33406 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33407 "settings": {} 33408 } 33409 ] 33410 }, 33411 { 33412 "id": "RL4dd82398165a40d9878a2a331e3654d6", 33413 "name": "Social_Pixel_Scripts:PLR", 33414 "events": [ 33415 { 33416 "modulePath": "core/src/lib/events/windowLoaded.js", 33417 "settings": {}, 33418 "ruleOrder": 50.0 33419 } 33420 ], 33421 "conditions": [ 33422 { 33423 "modulePath": "core/src/lib/conditions/valueComparison.js", 33424 "settings": { 33425 "comparison": { 33426 "operator": "isTrue" 33427 }, 33428 "leftOperand": "%OneTrust_Targeting_Consent%" 33429 } 33430 }, 33431 { 33432 "modulePath": "core/src/lib/conditions/valueComparison.js", 33433 "settings": { 33434 "comparison": { 33435 "operator": "equals" 33436 }, 33437 "leftOperand": "%NICOM_PAGE%", 33438 "rightOperand": "true" 33439 } 33440 }, 33441 { 33442 "modulePath": "core/src/lib/conditions/valueComparison.js", 33443 "settings": { 33444 "comparison": { 33445 "operator": "equals" 33446 }, 33447 "leftOperand": "%SOCIAL_PIXEL_FILTER%", 33448 "rightOperand": "true" 33449 } 33450 }, 33451 { 33452 "modulePath": "core/src/lib/conditions/customCode.js", 33453 "settings": { 33454 "source": function(event, target) { 33455 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 33456} 33457 } 33458 }, 33459 { 33460 "modulePath": "core/src/lib/conditions/valueComparison.js", 33461 "settings": { 33462 "comparison": { 33463 "operator": "doesNotEqual", 33464 "caseInsensitive": true 33465 }, 33466 "leftOperand": "%DisableAnalyticsCookie%", 33467 "rightOperand": "true" 33468 } 33469 } 33470 ], 33471 "actions": [ 33472 { 33473 "modulePath": "linkedin/src/lib/actions/loadInsightTag.js", 33474 "settings": {} 33475 }, 33476 { 33477 "modulePath": "core/src/lib/actions/customCode.js", 33478 "settings": { 33479 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC61d6fa34c64e4f2bb3945897bffda1df-source.js', 33480 "language": "javascript", 33481 "isExternal": true 33482 } 33483 }, 33484 { 33485 "modulePath": "core/src/lib/actions/customCode.js", 33486 "settings": { 33487 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC3590719981ff4c69bcd7fc280329ca62-source.js', 33488 "language": "javascript", 33489 "isExternal": true 33490 } 33491 }, 33492 { 33493 "modulePath": "core/src/lib/actions/customCode.js", 33494 "settings": { 33495 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC67d60261784a41a68608b2228b7d3969-source.js', 33496 "language": "javascript", 33497 "isExternal": true 33498 } 33499 } 33500 ] 33501 }, 33502 { 33503 "id": "RL50911719305c4f92b25473a7b949e354", 33504 "name": "Capture_Product_Filter:DCR", 33505 "events": [ 33506 { 33507 "modulePath": "core/src/lib/events/directCall.js", 33508 "settings": { 33509 "identifier": "captureProductFilter" 33510 }, 33511 "ruleOrder": 50.0 33512 } 33513 ], 33514 "conditions": [ 33515 { 33516 "modulePath": "core/src/lib/conditions/valueComparison.js", 33517 "settings": { 33518 "comparison": { 33519 "operator": "doesNotEqual", 33520 "caseInsensitive": true 33521 }, 33522 "leftOperand": "%DisableAnalyticsCookie%", 33523 "rightOperand": "true" 33524 } 33525 }, 33526 { 33527 "modulePath": "core/src/lib/conditions/valueComparison.js", 33528 "settings": { 33529 "comparison": { 33530 "operator": "doesNotEqual", 33531 "caseInsensitive": true 33532 }, 33533 "leftOperand": "%TRAFFICTYPE_META%", 33534 "rightOperand": "bot" 33535 } 33536 } 33537 ], 33538 "actions": [ 33539 { 33540 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33541 "settings": { 33542 "trackerProperties": { 33543 "eVars": [ 33544 { 33545 "name": "eVar35", 33546 "type": "value", 33547 "value": "%PRODUCT_FILTERING_OPTIONS%" 33548 }, 33549 { 33550 "name": "eVar56", 33551 "type": "value",
33552 "value": "%DETAILED_PAGENAME%" 33553 } 33554 ] 33555 } 33556 } 33557 }, 33558 { 33559 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33560 "settings": { 33561 "type": "link", 33562 "linkName": "product filter", 33563 "linkType": "o" 33564 } 33565 }, 33566 { 33567 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33568 "settings": {} 33569 } 33570 ] 33571 }, 33572 { 33573 "id": "RL5153a1aa3f6b41c0864e0fa4b3b64f49", 33574 "name": "Software Upgrade Additional Product Click:DCR", 33575 "events": [ 33576 { 33577 "modulePath": "core/src/lib/events/customEvent.js", 33578 "settings": { 33579 "type": "aa-software-upgrade-add", 33580 "bubbleFireIfParent": true, 33581 "bubbleFireIfChildFired": true 33582 }, 33583 "ruleOrder": 50.0 33584 } 33585 ], 33586 "conditions": [], 33587 "actions": [ 33588 { 33589 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33590 "settings": { 33591 "customSetup": { 33592 "source": function(event, s) { 33593 NIAnalytics.setAndTrack(["eVar33","prop23"], "Upgrade_step2:add_product:"+event.detail.title); 33594} 33595 }, 33596 "trackerProperties": { 33597 "eVars": [ 33598 { 33599 "name": "eVar1", 33600 "type": "value", 33601 "value": "%PAGE_NAME%" 33602 }, 33603 { 33604 "name": "eVar12", 33605 "type": "value", 33606 "value": "%PROFILE_ID:COOKIE%" 33607 }, 33608 { 33609 "name": "eVar21", 33610 "type": "value", 33611 "value": "%PAGE_URL%" 33612 }, 33613 { 33614 "name": "eVar27", 33615 "type": "value", 33616 "value": "%CONTENTTYPE:METATAG%" 33617 } 33618 ], 33619 "props": [ 33620 { 33621 "name": "prop2", 33622 "type": "alias", 33623 "value": "eVar27" 33624 }, 33625 { 33626 "name": "prop33", 33627 "type": "alias", 33628 "value": "eVar21" 33629 } 33630 ], 33631 "events": [ 33632 { 33633 "name": "event30" 33634 } 33635 ] 33636 } 33637 } 33638 }, 33639 { 33640 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33641 "settings": { 33642 "type": "link", 33643 "linkName": "Software Upgrade Additional Product Click", 33644 "linkType": "o" 33645 } 33646 }, 33647 { 33648 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33649 "settings": {} 33650 } 33651 ] 33652 }, 33653 { 33654 "id": "RL51c504aa18f340e895f23b4905b8eedd", 33655 "name": "Renew SSP CTA Click:EBR", 33656 "events": [ 33657 { 33658 "modulePath": "core/src/lib/events/click.js", 33659 "settings": { 33660 "bubbleStop": true, 33661 "elementSelector": ".aa-ssp-renewal-cta, .aa-ssp-renewal-cta *", 33662 "bubbleFireIfParent": false, 33663 "bubbleFireIfChildFired": false 33664 }, 33665 "ruleOrder": 50.0 33666 } 33667 ], 33668 "conditions": [], 33669 "actions": [ 33670 { 33671 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33672 "settings": { 33673 "customSetup": { 33674 "source": function(event, s) { 33675 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Renew SSP:"+event.target.innerText); 33676} 33677 }, 33678 "trackerProperties": { 33679 "eVars": [ 33680 { 33681 "name": "eVar1", 33682 "type": "value", 33683 "value": "%PAGE_NAME%" 33684 }, 33685 { 33686 "name": "eVar12", 33687 "type": "value", 33688 "value": "%PROFILE_ID:COOKIE%" 33689 }, 33690 { 33691 "name": "eVar21", 33692 "type": "value", 33693 "value": "%PAGE_URL%" 33694 }, 33695 { 33696 "name": "eVar27", 33697 "type": "value", 33698 "value": "%CONTENTTYPE:METATAG%" 33699 } 33700 ], 33701 "props": [ 33702 { 33703 "name": "prop2", 33704 "type": "alias", 33705 "value": "eVar27" 33706 }, 33707 { 33708 "name": "prop33", 33709 "type": "alias", 33710 "value": "eVar21" 33711 } 33712 ], 33713 "events": [ 33714 { 33715 "name": "event30" 33716 } 33717 ] 33718 } 33719 } 33720 }, 33721 { 33722 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33723 "settings": { 33724 "type": "link", 33725 "linkName": "Renew SSP CTA Click", 33726 "linkType": "o" 33727 } 33728 }, 33729 { 33730 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33731 "settings": {} 33732 } 33733 ] 33734 }, 33735 { 33736 "id": "RL52e7904d035b41ac82f5dd1d4961f1f9", 33737 "name": "SWPDP_Tooltip_Hover:EBR", 33738 "events": [ 33739 { 33740 "modulePath": "core/src/lib/events/hover.js", 33741 "settings": { 33742 "bubbleStop": true, 33743 "elementSelector": ".nicrc--tooltip-trigger__wrapper svg:not(.nicrc--modal-header svg, .nicrc--btn--ghost svg)", 33744 "bubbleFireIfParent": true, 33745 "bubbleFireIfChildFired": false 33746 }, 33747 "ruleOrder": 50.0 33748 }, 33749 { 33750 "modulePath": "core/src/lib/events/click.js", 33751 "settings": { 33752 "elementSelector": ".nicrc--tooltip-trigger__wrapper svg:not(.nicrc--modal-header svg)", 33753 "bubbleFireIfParent": true, 33754 "bubbleFireIfChildFired": true 33755 }, 33756 "ruleOrder": 50.0 33757 } 33758 ], 33759 "conditions": [ 33760 { 33761 "modulePath": "core/src/lib/conditions/valueComparison.js", 33762 "settings": { 33763 "comparison": { 33764 "operator": "doesNotEqual", 33765 "caseInsensitive": true 33766 }, 33767 "leftOperand": "%DisableAnalyticsCookie%", 33768 "rightOperand": "true" 33769 } 33770 }, 33771 { 33772 "modulePath": "core/src/lib/conditions/valueComparison.js", 33773 "settings": { 33774 "comparison": { 33775 "operator": "doesNotEqual", 33776 "caseInsensitive": true 33777 }, 33778 "leftOperand": "%TRAFFICTYPE_META%", 33779 "rightOperand": "bot" 33780 } 33781 }, 33782 { 33783 "modulePath": "core/src/lib/conditions/customCode.js", 33784 "settings": { 33785 "source": function(event, target) { 33786 return !/^\/[a-z]{2}(?:-[a-z]{2})?\/events\.html$/i.test(window.location.pathname); 33787} 33788 } 33789 } 33790 ], 33791 "actions": [ 33792 { 33793 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33794 "settings": { 33795 "customSetup": { 33796 "source": function(event, s) { 33797 function getPageTypeFromUrl(inputUrl = window.location.href) { 33798 const pathname = new URL(inputUrl, window.location.origin).pathname; 33799 33800 const patterns = [ 33801 { 33802 regex: /^\/[a-z]{2}(?:-[a-z]{2})?\/shop\/courses\/.+/, 33803 label: 'Course PDP' 33804 }, 33805 { 33806 regex: /^\/[a-z]{2}(?:-[a-z]{2})?\/shop\/product\/.+/, 33807 label: 'SW PDP' 33808 }, 33809 { 33810 regex: /^\/[a-z]{2}(?:-[a-z]{2})?\/support\/downloads\/software-products\/.+/, 33811 label: 'SW DDP' 33812 } 33813 ]; 33814 33815 for (const { regex, label } of patterns) { 33816 if (regex.test(pathname)) { 33817 return label; 33818 } 33819 } 33820 33821 return null; 33822} 33823 33824let tooltip = (event.element.closest(".downloadOptions__tooltipButton") == null) ? event.element.closest(".
33824nicrc--popover-container").querySelector(".nicrc--tooltip-content").innerText : document.querySelector("#"+event.element.closest(".downloadOptions__tooltipButton").getAttribute('aria-labelledby') + " .nicrc--popover-content.nicrc--tooltip-content").innerText; 33825NIAnalytics.setAndTrack(["eVar33", "prop23"], getPageTypeFromUrl()+":description:"+tooltip); 33826} 33827 }, 33828 "trackerProperties": { 33829 "eVars": [ 33830 { 33831 "name": "eVar1", 33832 "type": "value", 33833 "value": "%PAGE_NAME%" 33834 }, 33835 { 33836 "name": "eVar12", 33837 "type": "value", 33838 "value": "%PROFILE_ID:COOKIE%" 33839 }, 33840 { 33841 "name": "eVar21", 33842 "type": "value", 33843 "value": "%PAGE_URL%" 33844 }, 33845 { 33846 "name": "eVar27", 33847 "type": "value", 33848 "value": "%CONTENTTYPE:METATAG%" 33849 } 33850 ], 33851 "props": [ 33852 { 33853 "name": "prop2", 33854 "type": "alias", 33855 "value": "eVar27" 33856 }, 33857 { 33858 "name": "prop33", 33859 "type": "alias", 33860 "value": "eVar21" 33861 } 33862 ], 33863 "events": [ 33864 { 33865 "name": "event30" 33866 } 33867 ] 33868 } 33869 } 33870 }, 33871 { 33872 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33873 "settings": { 33874 "type": "link", 33875 "linkName": "SW PLP", 33876 "linkType": "o" 33877 } 33878 }, 33879 { 33880 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33881 "settings": {} 33882 } 33883 ] 33884 }, 33885 { 33886 "id": "RL530bfbca25b0483fb308fe0e4db3e775", 33887 "name": "EventKeywordSearch:EBR", 33888 "events": [ 33889 { 33890 "modulePath": "core/src/lib/events/customCode.js", 33891 "settings": { 33892 "source": function(trigger) { 33893 document.addEventListener('keydown', function (e) { 33894 if ( 33895 e.key === 'Enter' && 33896 e.target.matches('.nicrc--search-input[type="search"]') 33897 ) { 33898 trigger({ 33899 searchTerm: e.target.value, 33900 key: e.key 33901 }); 33902 } 33903}); 33904} 33905 }, 33906 "ruleOrder": 50.0 33907 } 33908 ], 33909 "conditions": [ 33910 { 33911 "modulePath": "core/src/lib/conditions/customCode.js", 33912 "settings": { 33913 "source": function(event, target) { 33914 return /^\/[a-z]{2}(?:-[a-z]{2})?\/events\.html$/i.test(window.location.pathname); 33915} 33916 } 33917 } 33918 ], 33919 "actions": [ 33920 { 33921 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 33922 "settings": { 33923 "customSetup": { 33924 "source": function(event, s) { 33925 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Events:keyword search:"+event.searchTerm); 33926} 33927 }, 33928 "trackerProperties": { 33929 "eVars": [ 33930 { 33931 "name": "eVar1", 33932 "type": "value", 33933 "value": "%PAGE_NAME%" 33934 }, 33935 { 33936 "name": "eVar12", 33937 "type": "value", 33938 "value": "%PROFILE_ID:COOKIE%" 33939 }, 33940 { 33941 "name": "eVar21", 33942 "type": "value", 33943 "value": "%PAGE_URL%" 33944 }, 33945 { 33946 "name": "eVar27", 33947 "type": "value", 33948 "value": "%CONTENTTYPE:METATAG%" 33949 } 33950 ], 33951 "props": [ 33952 { 33953 "name": "prop2", 33954 "type": "alias", 33955 "value": "eVar27" 33956 }, 33957 { 33958 "name": "prop33", 33959 "type": "alias", 33960 "value": "eVar21" 33961 } 33962 ], 33963 "events": [ 33964 { 33965 "name": "event30" 33966 } 33967 ] 33968 } 33969 } 33970 }, 33971 { 33972 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 33973 "settings": { 33974 "type": "link", 33975 "linkName": "Event keyword search", 33976 "linkType": "o" 33977 } 33978 }, 33979 { 33980 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 33981 "settings": {} 33982 } 33983 ] 33984 }, 33985 { 33986 "id": "RL53df6d65051748cd808c2dd304b8b4ac", 33987 "name": "Target_v2_Autohide_Disabled:PLR", 33988 "events": [ 33989 { 33990 "modulePath": "core/src/lib/events/libraryLoaded.js", 33991 "settings": {}, 33992 "ruleOrder": 50.0 33993 } 33994 ], 33995 "conditions": [ 33996 { 33997 "modulePath": "core/src/lib/conditions/valueComparison.js", 33998 "settings": { 33999 "comparison": { 34000 "operator": "isTrue" 34001 }, 34002 "leftOperand": "%TARGET_ENABLED%" 34003 } 34004 }, 34005 { 34006 "modulePath": "core/src/lib/conditions/customCode.js", 34007 "settings": { 34008 "source": function(event, target) { 34009 if (typeof NIAnalytics === "undefined") { 34010 function NIAnalytics() {} 34011} 34012 34013if (typeof NIAnalytics.getMetaTag === "undefined"){ 34014 NIAnalytics.getMetaTag = function (name) { 34015 var metaTagArray = document.getElementsByTagName("meta"); 34016 for (var i = 0; i < metaTagArray.length; i++) { 34017 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 34018 return metaTagArray[i].content; 34019 } 34020 } 34021 return ""; 34022 } 34023} 34024 34025return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 34026} 34027 } 34028 }, 34029 { 34030 "modulePath": "core/src/lib/conditions/valueComparison.js", 34031 "settings": { 34032 "comparison": { 34033 "operator": "doesNotEqual", 34034 "caseInsensitive": true 34035 }, 34036 "leftOperand": "%DisableAnalyticsCookie%", 34037 "rightOperand": "true" 34038 } 34039 }, 34040 { 34041 "modulePath": "core/src/lib/conditions/customCode.js", 34042 "settings": { 34043 "source": function(event, target) { 34044 if(sessionStorage.getItem("blockedLaunchRules") === null) { 34045 return true; 34046}else{ 34047 var r = JSON.parse(sessionStorage.getItem("blockedLaunchRules")); 34048 return !r.includes("Target"); 34049} 34050} 34051 } 34052 }, 34053 { 34054 "modulePath": "core/src/lib/conditions/valueComparison.js", 34055 "settings": { 34056 "comparison": { 34057 "operator": "isFalse" 34058 }, 34059 "leftOperand": "%TargetAutohideEnabled%" 34060 } 34061 } 34062 ], 34063 "actions": [ 34064 { 34065 "modulePath": "adobe-target-v2/lib/loadTarget.js", 34066 "settings": {} 34067 }, 34068 { 34069 "modulePath": "adobe-target-v2/lib/addPageLoadParams.js", 34070 "settings": { 34071 "params": { 34072 "pgCID": { 34073 "value": "%CID:URL_PARAM%", 34074 "checked": true 34075 }, 34076 "loggedIn": { 34077 "value": "%LOGGED_IN%", 34078 "checked": true 34079 }, 34080 "pgDomain": {
34081 "value": "%DOMAIN%", 34082 "checked": true 34083 }, 34084 "pgSection": { 34085 "value": "%SECTION:METATAG%", 34086 "checked": true 34087 }, 34088 "pgIndustry": { 34089 "value": "%INDUSTRY_S:METATAG%", 34090 "checked": true 34091 }, 34092 "pgLanguage": { 34093 "value": "%LANGUAGE:METATAG%", 34094 "checked": true 34095 }, 34096 "pgPageName": { 34097 "value": "%DETAILED_PAGENAME%", 34098 "checked": true 34099 }, 34100 "pgPageType": { 34101 "value": "%PAGETYPE:METATAG%", 34102 "checked": true 34103 }, 34104 "pgReferrer": { 34105 "value": "%REFERRER%", 34106 "checked": true 34107 }, 34108 "pgTemplate": { 34109 "value": "%TEMPLATE:PI:PA:DL%", 34110 "checked": true 34111 }, 34112 "pgSicNumber": { 34113 "value": "%6SENSE_SICCODE%", 34114 "checked": true 34115 }, 34116 "pgWrapperId": { 34117 "value": "%WRAPPERID:METATAG%", 34118 "checked": true 34119 }, 34120 "pgPageNameV1": { 34121 "value": "%PAGENAME_FOR_TARGET_PART1%", 34122 "checked": true 34123 }, 34124 "pgPageNameV2": { 34125 "value": "%PAGENAME_FOR_TARGET_PART2%", 34126 "checked": true 34127 }, 34128 "pgPageNameV3": { 34129 "value": "%PAGENAME_FOR_TARGET_PART3%", 34130 "checked": true 34131 }, 34132 "pgPageNameV4": { 34133 "value": "%PAGENAME_FOR_TARGET_PART4%", 34134 "checked": true 34135 }, 34136 "pgPageNameV5": { 34137 "value": "%PAGENAME_FOR_TARGET_PART5%", 34138 "checked": true 34139 }, 34140 "pgPageNameV6": { 34141 "value": "%PAGENAME_FOR_TARGET_PART6%", 34142 "checked": true 34143 }, 34144 "pgPageNameV7": { 34145 "value": "%PAGENAME_FOR_TARGET_PART7%", 34146 "checked": true 34147 }, 34148 "pgSearchTerm": { 34149 "value": "%ONSITESEARCHTERM:OSI:OS:DL%", 34150 "checked": true 34151 }, 34152 "pgTemplate_s": { 34153 "value": "%TEMPLATE_S:METATAG%", 34154 "checked": true 34155 }, 34156 "pgUserLocale": { 34157 "value": "%LOCALE:COOKIE%", 34158 "checked": true 34159 }, 34160 "pgCFSearchBot": { 34161 "value": "%CF_SEARCH_BOT:METATAG%", 34162 "checked": true 34163 }, 34164 "pgContentType": { 34165 "value": "%CONTENTTYPE:METATAG%", 34166 "checked": true 34167 }, 34168 "pgCountryMeta": { 34169 "value": "%COUNTRY_METATAG%", 34170 "checked": true 34171 }, 34172 "pgDeliveredBy": { 34173 "value": "%DELIVEREDBY:METATAG%", 34174 "checked": true 34175 }, 34176 "pgScreenWidth": { 34177 "value": "%SCREEN_WIDTH%", 34178 "checked": true 34179 }, 34180 "pgSubTemplate": { 34181 "value": "%SUBTEMPLATE:PI:PA:DL%", 34182 "checked": true 34183 }, 34184 "mbox3rdPartyId": { 34185 "value": "%HASHED_EMAIL%", 34186 "checked": true 34187 }, 34188 "pgUserProfileId": { 34189 "value": "%PROFILE_ID:COOKIE%", 34190 "checked": true 34191 }, 34192 "pgB2BCookieExists": { 34193 "value": "%B2BCookieExists%", 34194 "checked": true 34195 }, 34196 "pgContentTypeHierarchy": { 34197 "value": "%CONTENTTYPE_HIERARCHY%", 34198 "checked": true 34199 }, 34200 "pgPageNameForBreakdowns": { 34201 "value": "%PAGE_NAME%", 34202 "checked": true 34203 } 34204 } 34205 } 34206 }, 34207 { 34208 "modulePath": "core/src/lib/actions/customCode.js", 34209 "settings": { 34210 "source": "/*\n *Name: Adobe Target CS Integration\n *Version: 1.0\n */\nfunction isEmpty(val) {\n return val === undefined || val == null || val.length <= 0 ? true : false;\n}\n\nfunction key(obj) {\n return Object.keys(obj)\n .map(function (k) {\n return k + \"\" + obj[k];\n })\n .join(\"\");\n}\n\nfunction distinct(arr) {\n var result = arr.reduce(function (acc, e) {\n acc[key(e)] = e;\n return acc;\n }, {});\n return Object.keys(result).map(function (k) {\n return result[k];\n });\n}\n\ndocument.addEventListener(adobe.target.event.REQUEST_SUCCEEDED, function (e) {\n window.ttMETA = typeof window.ttMETA != \"undefined\" ? window.ttMETA : [];\n var tokens = e.detail.responseTokens;\n if (isEmpty(tokens)) {\n return;\n }\n var uniqueTokens = distinct(tokens);\n uniqueTokens.forEach(function (token) {\n if (window.ttMETA.filter(function(e) { return e.CampaignId === token[\"activity.id\"]; }).length == 0) {\n window.ttMETA.push({\n CampaignName: token[\"activity.name\"],\n CampaignId: token[\"activity.id\"],\n RecipeName: token[\"experience.name\"],\n RecipeId: token[\"experience.id\"],\n OfferId: token[\"option.id\"],\n OfferName: token[\"option.name\"],\n });\n }\n });\n});\n//Adobe Target CS Integration End\n\n\nfunction getPageName() {\n var myPath = location.pathname;\n var myHost = location.hostname;\n var pathRegex = new RegExp(\"/((?:lang/)?(?:d|esa|f|i|ja|ko|zhs|zht|en|de|es|fr|it|pt|nl|pl|ru|cs|sv|fi|da|no|hu|ro|sr|sl|hr)(?:/|$))\");\n var cleanUpRegex = /(?:\\/(rating|lang\\/invalid|lang|diff|clone|edit|delete))|(?:\\.(?:html|htm))/g;\n var myPageName = \"\";\n\n if (myPath.match(/\\/[a-z]{2}\\-[a-z]{2}\\/.*/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}\\-[a-z]{2}(\\/.*)/, \"$1\");\n } else if (myPath.match(/\\/[a-z]{2}\\-[a-z]{2}\\.html/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}\\-[a-z]{2}\\.html/, \"/\");\n } else if (myPath.match(/\\/[a-z]{2}\\/.*/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}(\\/.*)/, \"$1\");\n } else if (myPath.match(/\\/[a-z]{2}\\.html/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}\\.html/, \"/\");\n } else {\n myPageName = myHost + myPath.replace(pathRegex, \"/\");\n }\n\n myPageName = myPageName.replace(cleanUpRegex, \"\");\n return myPageName;\n}\n\nvar softwarePortfolioPages = [\"www.ni.com/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-teststand\", \"www.ni.com/shop/data-acquisition-and-control/application-software-for-data-acquisition-and-control-category/what-is-diadem\", \"www.ni.com/shop/data-acquisition-and-control/flexlogger\", \"www.ni.com/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-multisim\", \"www.ni.com/shop/data-acquisition-and-control/application-software-for-data-acquisition-and-control-category/what-is-veristand\", \"www.ni.com/shop/wireless-design-test/application-software-for-wireless-design-test-category/what-is-rfmx\"];\nvar acceptedSoftwarePortfolioLocales = [\"en\", \"de\", \"fr\", \"es\", \"ja\", \"ko\", \"zh\"];\n\ntargetPageParamsAll = function () {\n var locale = window.location.pathname.substring(window.location.pathname.indexOf(\"/\")+1,3).toLowerCase();\n if(window.location.href.indexOf(\"/perspectives/\") > -1){\n return {\n \"entity\": {\n \"categoryId\": \"perspectives\",\n \"id\": \"perspectives_\"+window.location.pathname.substring(window.location.pathname.lastIndexOf(\"/\")+1).replace(\".html\", \"\")\n },\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n } else if(softwarePortfolioPages.indexOf(getPageName()) > -1){\n return {\n \"entity\": {\n \"categoryId\": \"software_portfolio\",\n \"id\": \"software_portfolio_\"+window.location.pathname.substring(window.location.pathname.lastIndexOf(\"/\")+1).replace(\".html\", \"\") + \"_\" + (acceptedSoftwarePortfolioLocales.indexOf(locale) > -1 ? locale : \"en\")\n },\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n }else if(window.location.pathname.indexOf(\"/shop/hardware/products/pxi-\") > -1){\n return {\n \"entity\": {\n \"categoryId\": \"pxi_modules\",\n \"id\": \"pxi_modules_\"+window.location.pathname.substring(window.location.pathname.lastIndexOf(\"/\")+1).replace(\".html\", \"\") + \"_\" + (acceptedSoftwarePortfolioLocales.indexOf(locale) > -1 ? locale : \"en\")\n },\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n }else {\n return {\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n }\n};\n", 34211 "language": "javascript" 34212 } 34213 }, 34214 { 34215 "modulePath": "target-to-analytics/src/lib/actions/addTargetListener.js", 34216 "settings": { 34217 "pageLoadEvent": "empty", 34218 "postPageLoadEvent": "empty"
34219 } 34220 }, 34221 { 34222 "modulePath": "adobe-target-v2/lib/firePageLoad.js", 34223 "settings": { 34224 "bodyHiddenStyle": "body {opacity: 0}", 34225 "bodyHidingEnabled": false 34226 } 34227 }, 34228 { 34229 "modulePath": "core/src/lib/actions/customCode.js", 34230 "settings": { 34231 "source": "document.dispatchEvent(new Event('ni-target-ready'));", 34232 "language": "javascript" 34233 } 34234 } 34235 ] 34236 }, 34237 { 34238 "id": "RL5457dd19dc6240fdaadc5f9b1d6065df", 34239 "name": "Megamenu_Click:EBR", 34240 "events": [ 34241 { 34242 "modulePath": "core/src/lib/events/click.js", 34243 "settings": { 34244 "bubbleStop": false, 34245 "anchorDelay": 500, 34246 "elementSelector": ".analytics-mmsolutions-link", 34247 "bubbleFireIfParent": true, 34248 "bubbleFireIfChildFired": true 34249 }, 34250 "ruleOrder": 50.0 34251 }, 34252 { 34253 "modulePath": "core/src/lib/events/click.js", 34254 "settings": { 34255 "anchorDelay": 500, 34256 "elementSelector": ".analytics-mmproducts-link", 34257 "bubbleFireIfParent": true, 34258 "bubbleFireIfChildFired": true 34259 }, 34260 "ruleOrder": 50.0 34261 }, 34262 { 34263 "modulePath": "core/src/lib/events/click.js", 34264 "settings": { 34265 "anchorDelay": 500, 34266 "elementSelector": ".analytics-mmperspectives-link", 34267 "bubbleFireIfParent": true, 34268 "bubbleFireIfChildFired": true 34269 }, 34270 "ruleOrder": 50.0 34271 }, 34272 { 34273 "modulePath": "core/src/lib/events/click.js", 34274 "settings": { 34275 "anchorDelay": 500, 34276 "elementSelector": ".analytics-mmsupport-link", 34277 "bubbleFireIfParent": true, 34278 "bubbleFireIfChildFired": true 34279 }, 34280 "ruleOrder": 50.0 34281 }, 34282 { 34283 "modulePath": "core/src/lib/events/click.js", 34284 "settings": { 34285 "anchorDelay": 500, 34286 "elementSelector": ".analytics-mmcommunity-link", 34287 "bubbleFireIfParent": true, 34288 "bubbleFireIfChildFired": true 34289 }, 34290 "ruleOrder": 50.0 34291 }, 34292 { 34293 "modulePath": "core/src/lib/events/click.js", 34294 "settings": { 34295 "anchorDelay": 500, 34296 "elementSelector": ".analytics-mmsolutions-button", 34297 "bubbleFireIfParent": true, 34298 "bubbleFireIfChildFired": true 34299 }, 34300 "ruleOrder": 50.0 34301 }, 34302 { 34303 "modulePath": "core/src/lib/events/click.js", 34304 "settings": { 34305 "anchorDelay": 500, 34306 "elementSelector": ".analytics-mmproducts-button", 34307 "bubbleFireIfParent": true, 34308 "bubbleFireIfChildFired": true 34309 }, 34310 "ruleOrder": 50.0 34311 }, 34312 { 34313 "modulePath": "core/src/lib/events/click.js", 34314 "settings": { 34315 "anchorDelay": 500, 34316 "elementSelector": ".analytics-mmperspectives-button", 34317 "bubbleFireIfParent": true, 34318 "bubbleFireIfChildFired": true 34319 }, 34320 "ruleOrder": 50.0 34321 }, 34322 { 34323 "modulePath": "core/src/lib/events/click.js", 34324 "settings": { 34325 "anchorDelay": 500, 34326 "elementSelector": ".analytics-mmsupport-button", 34327 "bubbleFireIfParent": true, 34328 "bubbleFireIfChildFired": true 34329 }, 34330 "ruleOrder": 50.0 34331 }, 34332 { 34333 "modulePath": "core/src/lib/events/click.js", 34334 "settings": { 34335 "anchorDelay": 500, 34336 "elementSelector": ".analytics-mmcommunity-button", 34337 "bubbleFireIfParent": true, 34338 "bubbleFireIfChildFired": true 34339 }, 34340 "ruleOrder": 50.0 34341 }, 34342 { 34343 "modulePath": "core/src/lib/events/click.js", 34344 "settings": { 34345 "anchorDelay": 500, 34346 "elementSelector": ".analytics-mmsolutions-image", 34347 "bubbleFireIfParent": true, 34348 "bubbleFireIfChildFired": true 34349 }, 34350 "ruleOrder": 50.0 34351 }, 34352 { 34353 "modulePath": "core/src/lib/events/click.js", 34354 "settings": { 34355 "anchorDelay": 500, 34356 "elementSelector": ".analytics-mmproducts-image", 34357 "bubbleFireIfParent": true, 34358 "bubbleFireIfChildFired": true 34359 }, 34360 "ruleOrder": 50.0 34361 }, 34362 { 34363 "modulePath": "core/src/lib/events/click.js", 34364 "settings": { 34365 "anchorDelay": 500, 34366 "elementSelector": ".analytics-mmperspectives-image", 34367 "bubbleFireIfParent": true, 34368 "bubbleFireIfChildFired": true 34369 }, 34370 "ruleOrder": 50.0 34371 }, 34372 { 34373 "modulePath": "core/src/lib/events/click.js", 34374 "settings": { 34375 "anchorDelay": 500, 34376 "elementSelector": ".analytics-mmsupport-image", 34377 "bubbleFireIfParent": true, 34378 "bubbleFireIfChildFired": true 34379 }, 34380 "ruleOrder": 50.0 34381 }, 34382 { 34383 "modulePath": "core/src/lib/events/click.js", 34384 "settings": { 34385 "anchorDelay": 500,
34386 "elementSelector": ".analytics-mmcommunity-image", 34387 "bubbleFireIfParent": true, 34388 "bubbleFireIfChildFired": true 34389 }, 34390 "ruleOrder": 50.0 34391 }, 34392 { 34393 "modulePath": "core/src/lib/events/click.js", 34394 "settings": { 34395 "anchorDelay": 500, 34396 "elementSelector": ".view-all-link-perspectives", 34397 "bubbleFireIfParent": true, 34398 "bubbleFireIfChildFired": true 34399 }, 34400 "ruleOrder": 50.0 34401 }, 34402 { 34403 "modulePath": "core/src/lib/events/click.js", 34404 "settings": { 34405 "anchorDelay": 500, 34406 "elementSelector": ".view-all-link-products", 34407 "bubbleFireIfParent": true, 34408 "bubbleFireIfChildFired": true 34409 }, 34410 "ruleOrder": 50.0 34411 }, 34412 { 34413 "modulePath": "core/src/lib/events/click.js", 34414 "settings": { 34415 "anchorDelay": 500, 34416 "elementSelector": ".view-all-link-support", 34417 "bubbleFireIfParent": true, 34418 "bubbleFireIfChildFired": true 34419 }, 34420 "ruleOrder": 50.0 34421 } 34422 ], 34423 "conditions": [ 34424 { 34425 "modulePath": "core/src/lib/conditions/valueComparison.js", 34426 "settings": { 34427 "comparison": { 34428 "operator": "doesNotEqual", 34429 "caseInsensitive": true 34430 }, 34431 "leftOperand": "%DisableAnalyticsCookie%", 34432 "rightOperand": "true" 34433 } 34434 }, 34435 { 34436 "modulePath": "core/src/lib/conditions/valueComparison.js", 34437 "settings": { 34438 "comparison": { 34439 "operator": "doesNotEqual", 34440 "caseInsensitive": true 34441 }, 34442 "leftOperand": "%TRAFFICTYPE_META%", 34443 "rightOperand": "bot" 34444 } 34445 } 34446 ], 34447 "actions": [ 34448 { 34449 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 34450 "settings": { 34451 "customSetup": { 34452 "source": function(event, s) { 34453 if (!Element.prototype.closest) { 34454 if (!Element.prototype.matches) { 34455 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 34456 } 34457 Element.prototype.closest = function(s) { 34458 var el = this; 34459 var ancestor = this; 34460 if (!document.documentElement.contains(el)) return null; 34461 do { 34462 if (ancestor.matches(s)) { 34463 return ancestor; 34464 } 34465 34466 if (typeof ancestor.parentElement !== "undefined") { 34467 ancestor = ancestor.parentElement; 34468 } else { 34469 ancestor = ancestor.parentNode; 34470 } 34471 } while (ancestor !== null && ancestor !== undefined); 34472 return null; 34473 }; 34474} 34475 34476function urlCleaner(url){ 34477 var targetUrl = document.createElement("a"); 34478 targetUrl.href = url; 34479 34480 var myPath = targetUrl.pathname; 34481 var myHost = targetUrl.hostname; 34482 var pathRegex = new RegExp("/((?:lang/)?(?:d|esa|f|i|ja|ko|zhs|zht|en|de|es|fr|it|pt|nl|pl|ru|cs|sv|fi|da|no|hu|ro|sr|sl|hr)(?:/|$))"); 34483 var myPageName = ""; 34484 34485 if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\/.*/)) { 34486 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}(\/.*)/, "$1"); 34487 } else if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\.html/)) { 34488 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}\.html/, "/"); 34489 } else if (myPath.match(/\/[a-z]{2}\/.*/)) { 34490 myPageName = myHost + myPath.replace(/\/[a-z]{2}(\/.*)/, "$1"); 34491 } else if (myPath.match(/\/[a-z]{2}\.html/)) { 34492 myPageName = myHost + myPath.replace(/\/[a-z]{2}\.html/, "/"); 34493 } else { 34494 myPageName = myHost + myPath.replace(pathRegex, "/"); 34495 } 34496 34497 return myPageName; 34498} 34499 34500var target = event.target.closest("a"); 34501var targetURL = urlCleaner(target.href); 34502var analyticsData = ""; 34503 34504if(target.classList.contains('analytics-mmsolutions-link')){ 34505 analyticsData = "mm:solutions:link:"; 34506} else if(target.classList.contains('analytics-mmproducts-link')){ 34507 analyticsData = "mm:products:link:"; 34508} else if(target.classList.contains('analytics-mmperspectives-link')){ 34509 analyticsData = "mm:perspectives:link"; 34510} else if(target.classList.contains('analytics-mmsupport-link')){ 34511 analyticsData = "mm:support:link:"; 34512}
34512 else if(target.classList.contains('analytics-mmcommunity-link')){ 34513 analyticsData = "mm:community:link:"; 34514} else if(target.classList.contains('analytics-mmsolutions-button')){ 34515 analyticsData = "mm:solutions:button:"; 34516} else if(target.classList.contains('analytics-mmproducts-button')){ 34517 analyticsData = "mm:products:button:"; 34518} else if(target.classList.contains('analytics-mmperspectives-button')){ 34519 analyticsData = "mm:perspectives:button:"; 34520} else if(target.classList.contains('analytics-mmsupport-button')){ 34521 analyticsData = "mm:support:button:"; 34522} else if(target.classList.contains('analytics-mmcommunity-button')){ 34523 analyticsData = "mm:community:button:"; 34524} else if(target.classList.contains('analytics-mmsolutions-image')){ 34525 analyticsData = "mm:solutions:image:"; 34526} else if(target.classList.contains('analytics-mmproducts-image')){ 34527 analyticsData = "mm:products:image:"; 34528} else if(target.classList.contains('analytics-mmperspectives-image')){ 34529 analyticsData = "mm:perspectives:image:"; 34530} else if(target.classList.contains('analytics-mmsupport-image')){ 34531 analyticsData = "mm:support:image:"; 34532} else if(target.classList.contains('analytics-mmcommunity-image')){ 34533 analyticsData = "mm:community:image:"; 34534} else if(target.classList.contains('view-all-link-perspectives')){ 34535 analyticsData = "mm:perspectives:viewallbutton"; 34536} else if(target.classList.contains('view-all-link-products')){ 34537 analyticsData = "mm:products:viewalllink:"; 34538} else if(target.classList.contains('view-all-link-support')){ 34539 analyticsData = "mm:support:viewalllink:"; 34540} 34541 34542if(target.classList.contains("analytics-mmperspectives-image")){ 34543 analyticsData = analyticsData + "featuredarticle"; 34544} else if(target.classList.contains('view-all-link-perspectives')){ 34545 analyticsData = analyticsData; 34546} else { 34547 analyticsData = analyticsData + targetURL; 34548} 34549 34550NIAnalytics.setAndTrack(["eVar33", "prop23"], analyticsData); 34551 34552//ContentSquare dynamic tracking 34553window._uxa = window._uxa || []; 34554window._uxa.push(["trackDynamicVariable", {key: 'Site Clicks', value: analyticsData} ]); 34555} 34556 }, 34557 "trackerProperties": { 34558 "eVars": [ 34559 { 34560 "name": "eVar1", 34561 "type": "value", 34562 "value": "%PAGE_NAME%" 34563 }, 34564 { 34565 "name": "eVar12", 34566 "type": "value", 34567 "value": "%PROFILE_ID:COOKIE%" 34568 }, 34569 { 34570 "name": "eVar21", 34571 "type": "value", 34572 "value": "%PAGE_URL%" 34573 }, 34574 { 34575 "name": "eVar27", 34576 "type": "value", 34577 "value": "%CONTENTTYPE:METATAG%" 34578 } 34579 ], 34580 "props": [ 34581 { 34582 "name": "prop2", 34583 "type": "alias", 34584 "value": "eVar27" 34585 }, 34586 { 34587 "name": "prop33", 34588 "type": "alias", 34589 "value": "eVar21" 34590 } 34591 ], 34592 "events": [ 34593 { 34594 "name": "event30" 34595 } 34596 ] 34597 } 34598 } 34599 }, 34600 { 34601 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 34602 "settings": { 34603 "type": "link", 34604 "linkType": "o" 34605 } 34606 }, 34607 { 34608 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 34609 "settings": {} 34610 } 34611 ] 34612 }, 34613 { 34614 "id": "RL5468efccf1f5424893172dd6f33234cb", 34615 "name": "Software Re-download CTA Click:EBR", 34616 "events": [ 34617 { 34618 "modulePath": "core/src/lib/events/customEvent.js", 34619 "settings": { 34620 "type": "aa-software-re-download", 34621 "bubbleFireIfParent": true, 34622 "bubbleFireIfChildFired": true 34623 }, 34624 "ruleOrder": 50.0 34625 } 34626 ], 34627 "conditions": [ 34628 { 34629 "modulePath": "core/src/lib/conditions/valueComparison.js", 34630 "settings": { 34631 "comparison": { 34632 "operator": "doesNotEqual", 34633 "caseInsensitive": true 34634 }, 34635 "leftOperand": "%DisableAnalyticsCookie%", 34636 "rightOperand": "true" 34637 } 34638 }, 34639 { 34640 "modulePath": "core/src/lib/conditions/valueComparison.js", 34641 "settings": { 34642 "comparison": { 34643 "operator": "doesNotEqual", 34644 "caseInsensitive": true 34645 }, 34646 "leftOperand": "%TRAFFICTYPE_META%", 34647 "rightOperand": "bot" 34648 } 34649 } 34650 ], 34651 "actions": [ 34652 { 34653 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 34654 "settings": { 34655 "customSetup": { 34656 "source": function(event, s) { 34657 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.detail.label); 34658NIAnalytics.setAndTrack("eVar75", event.detail.meta); 34659NIAnalytics.setAndTrack("eVar108", event.detail.id); 34660NIAnalytics.setAndTrack("eVar113", event.detail.gating); 34661NIAnalytics.setAndTrack("eVar114", event.detail.prodName); 34662} 34663 }, 34664 "trackerProperties": { 34665 "eVars": [ 34666 { 34667 "name": "eVar1", 34668 "type": "value", 34669 "value": "%PAGE_NAME%" 34670 }, 34671 { 34672 "name": "eVar12", 34673 "type": "value", 34674 "value": "%PROFILE_ID:COOKIE%" 34675 }, 34676 { 34677 "name": "eVar21", 34678 "type": "value", 34679 "value": "%PAGE_URL%" 34680 }, 34681 { 34682 "name": "eVar27", 34683 "type": "value", 34684 "value": "%CONTENTTYPE:METATAG%" 34685 }, 34686 { 34687 "name": "eVar56", 34688 "type": "value",
34689 "value": "%DETAILED_PAGENAME%" 34690 } 34691 ], 34692 "props": [ 34693 { 34694 "name": "prop2", 34695 "type": "alias", 34696 "value": "eVar27" 34697 }, 34698 { 34699 "name": "prop6", 34700 "type": "value", 34701 "value": "%PREV_PAGE_NAME%" 34702 }, 34703 { 34704 "name": "prop33", 34705 "type": "alias", 34706 "value": "eVar21" 34707 }, 34708 { 34709 "name": "prop50", 34710 "type": "alias", 34711 "value": "eVar56" 34712 } 34713 ], 34714 "events": [ 34715 { 34716 "name": "event30" 34717 }, 34718 { 34719 "name": "event36" 34720 } 34721 ] 34722 } 34723 } 34724 }, 34725 { 34726 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 34727 "settings": { 34728 "type": "link", 34729 "linkName": "Software Re-Download CTA Click", 34730 "linkType": "o" 34731 } 34732 }, 34733 { 34734 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 34735 "settings": {} 34736 } 34737 ] 34738 }, 34739 { 34740 "id": "RL5485541162d44369976406427f1ef033", 34741 "name": "Anchor_Link:Click:EBR", 34742 "events": [ 34743 { 34744 "modulePath": "core/src/lib/events/click.js", 34745 "settings": { 34746 "anchorDelay": 250, 34747 "elementSelector": ".analytics-anchor-link", 34748 "bubbleFireIfParent": true, 34749 "bubbleFireIfChildFired": false 34750 }, 34751 "ruleOrder": 50.0 34752 } 34753 ], 34754 "conditions": [ 34755 { 34756 "modulePath": "core/src/lib/conditions/valueComparison.js", 34757 "settings": { 34758 "comparison": { 34759 "operator": "doesNotEqual", 34760 "caseInsensitive": true 34761 }, 34762 "leftOperand": "%DisableAnalyticsCookie%", 34763 "rightOperand": "true" 34764 } 34765 }, 34766 { 34767 "modulePath": "core/src/lib/conditions/valueComparison.js", 34768 "settings": { 34769 "comparison": { 34770 "operator": "doesNotEqual", 34771 "caseInsensitive": true 34772 }, 34773 "leftOperand": "%TRAFFICTYPE_META%", 34774 "rightOperand": "bot" 34775 } 34776 } 34777 ], 34778 "actions": [ 34779 { 34780 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 34781 "settings": { 34782 "customSetup": { 34783 "source": function(event, s) { 34784 s.eVar33 = s.prop23 = "anchor:" + _satellite.getVar("DETAILED_PAGENAME").replace(/:/g, "_") + ":" + this.href.substring(this.href.indexOf("#")+1); 34785s.linkTrackVars+=",eVar33,prop23"; 34786 34787//ContentSquare dynamic tracking 34788window._uxa = window._uxa || []; 34789window._uxa.push(["trackDynamicVariable", {key: 'Site Clicks', value: s.eVar33} ]); 34790} 34791 }, 34792 "trackerProperties": { 34793 "eVars": [ 34794 { 34795 "name": "eVar1", 34796 "type": "value", 34797 "value": "%PAGE_NAME%" 34798 }, 34799 { 34800 "name": "eVar12", 34801 "type": "value", 34802 "value": "%PROFILE_ID:COOKIE%" 34803 }, 34804 { 34805 "name": "eVar21", 34806 "type": "value", 34807 "value": "%PAGE_URL%" 34808 }, 34809 { 34810 "name": "eVar27", 34811 "type": "value", 34812 "value": "%CONTENTTYPE:METATAG%" 34813 }, 34814 { 34815 "name": "eVar56", 34816 "type": "value", 34817 "value": "%DETAILED_PAGENAME%" 34818 } 34819 ], 34820 "props": [ 34821 { 34822 "name": "prop2", 34823 "type": "alias", 34824 "value": "eVar27" 34825 }, 34826 { 34827 "name": "prop33", 34828 "type": "alias", 34829 "value": "eVar21" 34830 }, 34831 { 34832 "name": "prop50", 34833 "type": "value",
34834 "value": "%DETAILED_PAGENAME%" 34835 } 34836 ], 34837 "events": [ 34838 { 34839 "name": "event30" 34840 } 34841 ] 34842 } 34843 } 34844 }, 34845 { 34846 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 34847 "settings": { 34848 "type": "link", 34849 "linkName": "anchor", 34850 "linkType": "o" 34851 } 34852 }, 34853 { 34854 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 34855 "settings": {} 34856 } 34857 ] 34858 }, 34859 { 34860 "id": "RL5a3cbbdebb3a49aa8c9e3f0130bc9b1f", 34861 "name": "Global (no refdata):PLR", 34862 "events": [ 34863 { 34864 "modulePath": "core/src/lib/events/directCall.js", 34865 "settings": { 34866 "identifier": "captureVirtualPageLoad" 34867 }, 34868 "ruleOrder": 500.0 34869 }, 34870 { 34871 "modulePath": "core/src/lib/events/domReady.js", 34872 "settings": {}, 34873 "ruleOrder": 250.0 34874 }, 34875 { 34876 "modulePath": "data-layer-manager-search-discovery/src/lib/events/data_layer_push_event.js", 34877 "settings": { 34878 "eventType": "pageLoad", 34879 "subscription": null 34880 }, 34881 "ruleOrder": 50.0 34882 }, 34883 { 34884 "modulePath": "core/src/lib/events/customEvent.js", 34885 "settings": { 34886 "type": "aa-category-results-loaded", 34887 "bubbleFireIfParent": false, 34888 "bubbleFireIfChildFired": false 34889 }, 34890 "ruleOrder": 50.0 34891 } 34892 ], 34893 "conditions": [ 34894 { 34895 "modulePath": "core/src/lib/conditions/valueComparison.js", 34896 "settings": { 34897 "comparison": { 34898 "operator": "doesNotEqual", 34899 "caseInsensitive": true 34900 }, 34901 "leftOperand": "%DisableAnalyticsCookie%", 34902 "rightOperand": "true" 34903 } 34904 }, 34905 { 34906 "modulePath": "core/src/lib/conditions/valueComparison.js", 34907 "settings": { 34908 "comparison": { 34909 "operator": "isFalse" 34910 }, 34911 "leftOperand": "%IS_SEARCH_SPA%" 34912 } 34913 }, 34914 { 34915 "modulePath": "core/src/lib/conditions/valueComparison.js", 34916 "settings": { 34917 "comparison": { 34918 "operator": "matchesRegex", 34919 "caseInsensitive": true 34920 }, 34921 "leftOperand": "%NICOM_PAGE%", 34922 "rightOperand": "true" 34923 } 34924 }, 34925 { 34926 "modulePath": "core/src/lib/conditions/valueComparison.js", 34927 "settings": { 34928 "comparison": { 34929 "operator": "equals", 34930 "caseInsensitive": true 34931 }, 34932 "leftOperand": "%REFDATA_PAGE%", 34933 "rightOperand": "false" 34934 } 34935 }, 34936 { 34937 "modulePath": "core/src/lib/conditions/customCode.js", 34938 "settings": { 34939 "source": function(event, target) { 34940 var urls = ["ni.com/my-support/s/service-requests", "ni.com/my-support/s/technical-support", "ni.com/my-support/s/calibrate", "ni.com/my-support/s/rma", "ni.com/my-support/s/report-bug", "ni.com/my-support/s/activate", "dev2-natinst.cs124.force.com/support/s/service-requests", "dev2-natinst.cs124.force.com/support/s/calibrate", "dev2-natinst.cs124.force.com/support/s/technical-support", "dev2-natinst.cs124.force.com/support/s/report-bug", "dev2-natinst.cs124.force.com/support/s/rma", "dev2-natinst.cs124.force.com/support/s/activate"]; 34941 34942for(var i=0; i<urls.length; i++){ 34943 if(_satellite.getVar("PAGE_URL").indexOf(urls[i]) > -1 ) return false; 34944} 34945return true; 34946} 34947 } 34948 }, 34949 { 34950 "modulePath": "core/src/lib/conditions/customCode.js", 34951 "settings": { 34952 "source": function(event, target) { 34953 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 34954} 34955 } 34956 }, 34957 { 34958 "modulePath": "core/src/lib/conditions/customCode.js", 34959 "settings": { 34960 "source": function(event, target) { 34961 if(window.location.pathname.indexOf("/docs/") === 0){ 34962 return ((typeof event !== "undefined") && (typeof event.detail !== "undefined") && (typeof event.detail.forceSend !== "undefined") && ((event.detail.forceSend === true) || event.detail.forceSend.toLowerCase() === "true")); 34963}else{ 34964 return true; 34965} 34966} 34967 } 34968 }, 34969 { 34970 "modulePath": "core/src/lib/conditions/valueComparison.js", 34971 "settings": { 34972 "comparison": { 34973 "operator": "doesNotEqual", 34974 "caseInsensitive": true 34975 }, 34976 "leftOperand": "%HTML_TITLE%", 34977 "rightOperand": "Cart Redirect" 34978 } 34979 }, 34980 { 34981 "modulePath": "core/src/lib/conditions/valueComparison.js", 34982 "settings": { 34983 "comparison": { 34984 "operator": "doesNotEqual", 34985 "caseInsensitive": true 34986 }, 34987 "leftOperand": "%HTML_TITLE%", 34988 "rightOperand": "Cart Load" 34989 } 34990 }, 34991 { 34992 "modulePath": "core/src/lib/conditions/customCode.js", 34993 "settings": { 34994 "source": function(event, target) { 34995 var excludedURLPattern = new RegExp(/ni\.com\/shop\/s\/(guest-)?cart/gi); 34996var excludedHTMLTitles = ["Shop - NI", "Cart", "Cart Redirect", "Cart Loading", "Guest Cart Detail"]; 34997var htmlTitle = NIAnalytics.getDataElement("HTML_TITLE").toLowerCase(); 34998 34999if(excludedURLPattern.test(document.location.href) && ((htmlTitle === "shop - ni") || (htmlTitle === "cart") || (htmlTitle === "cart redirect") || (htmlTitle === "cart loading") || (htmlTitle === "guest cart detail")) ){ 35000 return false;
35001} else { 35002 return true; 35003} 35004} 35005 } 35006 }, 35007 { 35008 "modulePath": "core/src/lib/conditions/customCode.js", 35009 "settings": { 35010 "source": function(event, target) { 35011 return (window.location.host.indexOf(".kbmax.com") < 0); 35012} 35013 } 35014 }, 35015 { 35016 "modulePath": "core/src/lib/conditions/customCode.js", 35017 "settings": { 35018 "source": function(event, target) { 35019 return (window.location.pathname.indexOf('/my/s/orders') < 0); 35020} 35021 } 35022 }, 35023 { 35024 "modulePath": "core/src/lib/conditions/valueComparison.js", 35025 "settings": { 35026 "comparison": { 35027 "operator": "isFalse" 35028 }, 35029 "leftOperand": "%IS_CART_OR_CHECKOUT_PAGE%" 35030 } 35031 }, 35032 { 35033 "modulePath": "core/src/lib/conditions/valueComparison.js", 35034 "settings": { 35035 "comparison": { 35036 "operator": "doesNotEqual", 35037 "caseInsensitive": true 35038 }, 35039 "leftOperand": "%TRAFFICTYPE_META%", 35040 "rightOperand": "bot" 35041 } 35042 } 35043 ], 35044 "actions": [ 35045 { 35046 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 35047 "settings": { 35048 "customSetup": { 35049 "source": function(event, s) { 35050 function setCookieValue(name, value) { 35051 document.cookie = `${name}=${encodeURIComponent(value)}; path=/; domain=.ni.com`; 35052} 35053 35054var template = _satellite.getVar('TEMPLATE:PI:PA:DL'); 35055 35056NIAnalytics.setAndTrack(["eVar56", "prop50"], _satellite.getVar("DETAILED_PAGENAME")); 35057s.eVar125 = template.length === 0 ? 'none' : template; 35058 35059s.prop6 = _satellite.getVar("PREV_PAGE_NAME"); 35060s.prop18 = _satellite.getVar("PREV_PAGE_VIEWED_PERCENTAGE"); 35061s.prop41 = _satellite.getVar("PREV_DETAILED_PAGENAME"); 35062s.prop42 = _satellite.getVar("PREV_DOCUMENTID"); 35063 35064var useCaseId = _satellite.getVar("USECASEID:URL_PARAM"); 35065var exp = _satellite.getVar("EXP:URL_PARAM"); 35066var at_preview_token = _satellite.getVar("AT_PREVIEW_TOKEN:URL_PARAM"); 35067 35068var tmpV49 = useCaseId+"|"+exp+"|"+at_preview_token; 35069tmpV49 = tmpV49.replace("||","|"); 35070tmpV49 = tmpV49[0] === "|" ? tmpV49.slice(1,tmpV49.length) : tmpV49; 35071tmpV49 = (tmpV49.length > 0 && tmpV49[tmpV49.length-1] === "|") ? tmpV49.substr(0, tmpV49.lastIndexOf("|")) : tmpV49; 35072NIAnalytics.setAndTrack("eVar49", tmpV49); 35073 35074//6Sense 35075if(JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 35076 NIAnalytics.setAndTrack("eVar143", "6Sense"); 35077} 35078 35079var visitStart = _satellite.getVar("VISITSTART:COOKIE"); 35080if(s.c_r("icidAnalytics") === 1){ 35081 var t = new Date(); 35082 t.setTime(t.getTime()+1800000); 35083 if(!s.c_w("icidAnalytics",0,t)){s.c_w("icidAnalytics",0,0)} 35084 s.eVar41 = "Internal Campaign"; 35085} else if (visitStart === "1") { 35086 s.eVar41 = "Browse"; 35087} 35088 35089if (visitStart === "1") { 35090 s.firstPage = 'firstpage'; 35091} 35092 35093if (window.sessionStorage.getItem("ni-analytics.redirecting-page") === document.referrer) { 35094 var ref = window.sessionStorage.getItem("ni-analytics.original-referrer"); 35095 s.referrer = (ref != "")?ref:" "; 35096} else { 35097 window.sessionStorage.setItem("ni-analytics.original-referrer", null); 35098 window.sessionStorage.setItem("ni-analytics.redirecting-page", null); 35099} 35100 35101if ((typeof(event) !== "undefined") && (typeof(event.detail) !== "undefined") && (typeof(event.detail.source) !== "undefined")){ 35102 if(event.detail.source === "captureModelRecommendation"){ 35103 if(s.events){ 35104 s.events +=",prodView"; 35105 } else { 35106 s.events = "prodView"; 35107 } 35108 s.products = ";" + event.detail.products.replace(/,/g, ",;") 35109 } 35110 35111 if(event.detail.pageTab){ 35112 NIAnalytics.setAndTrack(["eVar56", "prop50"], _satellite.getVar("DETAILED_PAGENAME")+":"+event.detail.pageTab.toLowerCase()); 35113 } 35114} 35115 35116/* If Login, then event7 - Start */ 35117var prevValue = _satellite.getVar('PREV_LOGGED_IN'); 35118var currValue = _satellite.getVar('LOGGED_IN'); 35119 35120if ((typeof(prevValue) === undefined || ["", "anon", "no value", "not logged in"].indexOf(prevValue) > -1) && (currValue === "logged in")) { 35121 s.events = s.apl(s.events, 'event7', ',', 2); 35122} 35123/* If Login, then event7 - End */ 35124 35125var pageName = _satellite.getVar("PAGE_NAME"); 35126if (_satellite.getVar("S_CART_LOGIN") == 1 && pageName.toLowerCase().includes("identity") && pageName.toLowerCase().includes("ni.com/u/login/identifier")){ 35127 s.events = s.apl(s.events, 'event8', ',', 2); 35128 setCookieValue("s_cart_login", 0) 35129} 35130 35131/* Previous prop4 to prop19 - Start */ 35132// Do not put this into the UI section 35133s.prop19 = _satellite.getVar('PREV_SEARCH_TERM'); 35134/* Previous prop4 to prop19 - End */ 35135 35136var docID = _satellite.getVar("DOCUMENTID:METATAG"); 35137if(window.document.domain.toLowerCase() === "events.ni.com" || window.document.domain.toLowerCase() === "event.on24.com"){ 35138 s.eVar96 = docID; 35139} else { 35140 s.eVar63 = docID; 35141} 35142 35143/* Visit start - End */ 35144 35145_satellite.getVisitorId().setCustomerIDs({ 35146 "email_key":{ 35147 "id": s.eVar101, 35148 "authState": Visitor.AuthState.UNKNOWN 35149 }, 35150 "experience_cloud_id":{ 35151 "id": s.eVar130, 35152 "authState": Visitor.AuthState.UNKNOWN 35153 } 35154}); 35155 35156s.linkTrackVars="None" 35157s.linkTrackEvents="None" 35158 35159//ContentSquare dynamic tracking 35160window._uxa = window._uxa || [];
35161window._uxa.push(["trackDynamicVariable", {key: 'Internal Campaign', value: _satellite.getVar('ICID:URL_PARAM')} ]); 35162 35163//Target 35164if(typeof ttMETA === "object"){ 35165 for(const targetActivity of ttMETA){ 35166 window._uxa.push(["trackDynamicVariable", {key: 'AB_AT_'+targetActivity.CampaignName, value: targetActivity.RecipeName} ]); 35167 } 35168} 35169 35170if(event.nativeEvent.type == "aa-category-results-loaded"){ 35171 NIAnalytics.setAndTrack("eVar158", event.detail.filter1+"|"+event.detail.filter2+"|"+event.detail.filter3); 35172} 35173 35174} 35175 }, 35176 "trackerProperties": { 35177 "eVars": [ 35178 { 35179 "name": "eVar1", 35180 "type": "value", 35181 "value": "%PAGE_NAME%" 35182 }, 35183 { 35184 "name": "eVar3", 35185 "type": "value", 35186 "value": "%ICID:URL_PARAM%" 35187 }, 35188 { 35189 "name": "eVar9", 35190 "type": "value", 35191 "value": "%LOGGED_IN%" 35192 }, 35193 { 35194 "name": "eVar10", 35195 "type": "value", 35196 "value": "%LANGUAGE:METATAG%" 35197 }, 35198 { 35199 "name": "eVar11", 35200 "type": "value", 35201 "value": "%LOCALE:COOKIE%" 35202 }, 35203 { 35204 "name": "eVar12", 35205 "type": "value", 35206 "value": "%PROFILE_ID:COOKIE%" 35207 }, 35208 { 35209 "name": "eVar13", 35210 "type": "value", 35211 "value": "%ESPUID:URL_PARAM%" 35212 }, 35213 { 35214 "name": "eVar21", 35215 "type": "value", 35216 "value": "%PAGE_URL%" 35217 }, 35218 { 35219 "name": "eVar27", 35220 "type": "value", 35221 "value": "%CONTENTTYPE:METATAG%" 35222 }, 35223 { 35224 "name": "eVar31", 35225 "type": "value", 35226 "value": "%PRODREF%" 35227 }, 35228 { 35229 "name": "eVar36", 35230 "type": "value", 35231 "value": "%DOMAIN%" 35232 }, 35233 { 35234 "name": "eVar59", 35235 "type": "value", 35236 "value": "%PAGE_NAME%" 35237 }, 35238 { 35239 "name": "eVar64", 35240 "type": "value", 35241 "value": "%DOCUMENTCOREID:METATAG%" 35242 }, 35243 { 35244 "name": "eVar67", 35245 "type": "value", 35246 "value": "%WORD_COUNT%" 35247 }, 35248 { 35249 "name": "eVar68", 35250 "type": "value", 35251 "value": "%LINK_COUNT%" 35252 }, 35253 { 35254 "name": "eVar69", 35255 "type": "value", 35256 "value": "%KEYWORDS_PART1:METATAG%" 35257 }, 35258 { 35259 "name": "eVar70", 35260 "type": "value", 35261 "value": "%KEYWORDS_PART2:METATAG%" 35262 }, 35263 { 35264 "name": "eVar73", 35265 "type": "value", 35266 "value": "%ASSESSMENT_PERSONA%" 35267 }, 35268 { 35269 "name": "eVar74", 35270 "type": "value", 35271 "value": "%HTML_TITLE%" 35272 }, 35273 { 35274 "name": "eVar79", 35275 "type": "value", 35276 "value": "%GUESTBOOK_CODE%" 35277 }, 35278 { 35279 "name": "eVar80", 35280 "type": "value", 35281 "value": "%DOCSTATUS:METATAG%" 35282 }, 35283 { 35284 "name": "eVar82", 35285 "type": "value", 35286 "value": "%DNB_DUNS%" 35287 }, 35288 { 35289 "name": "eVar83", 35290 "type": "value", 35291 "value": "%6SENSE_COMPANYNAME%" 35292 }, 35293 { 35294 "name": "eVar86", 35295 "type": "value",
35296 "value": "%DNB_STATUS%" 35297 }, 35298 { 35299 "name": "eVar87", 35300 "type": "value", 35301 "value": "%6SENSE_INDUSTRY%" 35302 }, 35303 { 35304 "name": "eVar88", 35305 "type": "value", 35306 "value": "%6SENSE_SICCODE%" 35307 }, 35308 { 35309 "name": "eVar89", 35310 "type": "value", 35311 "value": "%6SENSE_COMPANY_GEO%" 35312 }, 35313 { 35314 "name": "eVar90", 35315 "type": "value", 35316 "value": "%DNB_MARKETING%" 35317 }, 35318 { 35319 "name": "eVar91", 35320 "type": "value", 35321 "value": "%DNB_JOB%" 35322 }, 35323 { 35324 "name": "eVar92", 35325 "type": "value", 35326 "value": "%DNB_PRESCREENING%" 35327 }, 35328 { 35329 "name": "eVar95", 35330 "type": "value", 35331 "value": "%DNB_DUNS_ALONE%" 35332 }, 35333 { 35334 "name": "eVar98", 35335 "type": "value", 35336 "value": "%6SENSE_FIRMOGRAPHIC%" 35337 }, 35338 { 35339 "name": "eVar101", 35340 "type": "value", 35341 "value": "%HASHED_EMAIL:USER:DL%" 35342 }, 35343 { 35344 "name": "eVar102", 35345 "type": "value", 35346 "value": "%KEYWORDS_COUNT%" 35347 }, 35348 { 35349 "name": "eVar103", 35350 "type": "value", 35351 "value": "%TITLE_LENGTH%" 35352 }, 35353 { 35354 "name": "eVar109", 35355 "type": "value", 35356 "value": "%PRODUCT_MANUFACTURER:DL%" 35357 }, 35358 { 35359 "name": "eVar110", 35360 "type": "value", 35361 "value": "%PCID%" 35362 }, 35363 { 35364 "name": "eVar122", 35365 "type": "value", 35366 "value": "%LETTER_COUNT%" 35367 }, 35368 { 35369 "name": "eVar123", 35370 "type": "value", 35371 "value": "%NISRC:URL_PARAM%" 35372 }, 35373 { 35374 "name": "eVar124", 35375 "type": "value", 35376 "value": "%WRAPPER:METATAG%|%WRAPPERID:METATAG%" 35377 }, 35378 { 35379 "name": "eVar130", 35380 "type": "value", 35381 "value": "%EXPERIENCE_CLOUD_ID%" 35382 }, 35383 { 35384 "name": "eVar133", 35385 "type": "value", 35386 "value": "%CAT_ID:METATAG%" 35387 }, 35388 { 35389 "name": "eVar134", 35390 "type": "value", 35391 "value": "%SUB_CAT_ID:METATAG%" 35392 }, 35393 { 35394 "name": "eVar135", 35395 "type": "value", 35396 "value": "%NODE_ID:METATAG%" 35397 }, 35398 { 35399 "name": "eVar137", 35400 "type": "value", 35401 "value": "%SEO_H1_VALUES%" 35402 }, 35403 { 35404 "name": "eVar138", 35405 "type": "value", 35406 "value": "%SEO_H2_VALUES%" 35407 }, 35408 { 35409 "name": "eVar139", 35410 "type": "value", 35411 "value": "%SEO_H3_VALUES%" 35412 }, 35413 { 35414 "name": "eVar140", 35415 "type": "value", 35416 "value": "%DESCRIPTION:METATAG%" 35417 }, 35418 { 35419 "name": "eVar152", 35420 "type": "value", 35421 "value": "%OneTrust_STATUS%" 35422 }, 35423 { 35424 "name": "eVar155", 35425 "type": "value", 35426 "value": "%PRODNOTIFY%" 35427 } 35428 ], 35429 "props": [ 35430 { 35431 "name": "prop1", 35432 "type": "value", 35433 "value": "%PAGETYPE:METATAG%" 35434 }, 35435 { 35436 "name": "prop2", 35437 "type": "alias", 35438 "value": "eVar27" 35439 }, 35440 { 35441 "name": "prop12", 35442 "type": "alias", 35443 "value": "eVar74" 35444 }, 35445 { 35446 "name": "prop13", 35447 "type": "alias", 35448 "value": "eVar124" 35449 }, 35450 { 35451 "name": "prop20", 35452 "type": "value",
35453 "value": "%DELIVEREDBY:METATAG%" 35454 }, 35455 { 35456 "name": "prop21", 35457 "type": "value", 35458 "value": "%INDUSTRY:AT:PA:DL%" 35459 }, 35460 { 35461 "name": "prop23", 35462 "type": "alias", 35463 "value": "eVar1" 35464 }, 35465 { 35466 "name": "prop27", 35467 "type": "alias", 35468 "value": "eVar59" 35469 }, 35470 { 35471 "name": "prop28", 35472 "type": "value", 35473 "value": "%NAVIGATION_SECTION%" 35474 }, 35475 { 35476 "name": "prop29", 35477 "type": "value", 35478 "value": "%SHORT_PAGENAME%" 35479 }, 35480 { 35481 "name": "prop30", 35482 "type": "value", 35483 "value": "%GENERIC_PAGENAME%" 35484 }, 35485 { 35486 "name": "prop31", 35487 "type": "alias", 35488 "value": "eVar36" 35489 }, 35490 { 35491 "name": "prop33", 35492 "type": "alias", 35493 "value": "eVar21" 35494 }, 35495 { 35496 "name": "prop38", 35497 "type": "alias", 35498 "value": "eVar88" 35499 }, 35500 { 35501 "name": "prop40", 35502 "type": "value", 35503 "value": "%APPLICATIONAREA_S:METATAG%" 35504 }, 35505 { 35506 "name": "prop44", 35507 "type": "value", 35508 "value": "%6SENSE_SCORES%" 35509 }, 35510 { 35511 "name": "prop70", 35512 "type": "value", 35513 "value": "%DOCUMENT_DATE:METATAG%" 35514 }, 35515 { 35516 "name": "prop71", 35517 "type": "value", 35518 "value": "%NIBOOSTS_UPDATE_DATE:METATAG%" 35519 }, 35520 { 35521 "name": "prop72", 35522 "type": "value", 35523 "value": "%NIBOOSTS_RATING_VALUE:METATAG%" 35524 }, 35525 { 35526 "name": "prop73", 35527 "type": "value", 35528 "value": "%NIBOOSTS_RATING_NUMBER:METATAG%" 35529 }, 35530 { 35531 "name": "prop75", 35532 "type": "value", 35533 "value": "client" 35534 } 35535 ], 35536 "channel": "%SECTION:METATAG%", 35537 "campaign": { 35538 "type": "value", 35539 "value": "%LAST_CID_URL_PARAM%" 35540 }, 35541 "pageName": "%PAGE_NAME%" 35542 } 35543 } 35544 }, 35545 { 35546 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 35547 "settings": { 35548 "type": "page" 35549 } 35550 }, 35551 { 35552 "modulePath": "core/src/lib/actions/customCode.js", 35553 "settings": { 35554 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC0a96bf332bbe408ea06f37dca68bf988-source.js', 35555 "language": "javascript", 35556 "isExternal": true 35557 } 35558 }, 35559 { 35560 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 35561 "settings": {} 35562 }, 35563 { 35564 "modulePath": "core/src/lib/actions/customCode.js", 35565 "settings": { 35566 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC63ec93b59e0443d294498eaf84f84ec8-source.js', 35567 "language": "javascript", 35568 "isExternal": true 35569 } 35570 }, 35571 { 35572 "modulePath": "core/src/lib/actions/customCode.js", 35573 "settings": { 35574 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC4f864145839e47de910a8c6f0dd10a83-source.js', 35575 "language": "javascript", 35576 "isExternal": true 35577 } 35578 } 35579 ] 35580 }, 35581 { 35582 "id": "RL5a869aa664644663bb131f673a338336", 35583 "name": "CoursePDP_LearningPathSelection_Click:EBR", 35584 "events": [ 35585 { 35586 "modulePath": "core/src/lib/events/click.js", 35587 "settings": { 35588 "elementSelector": ".aa-cpdp-cont-learn", 35589 "bubbleFireIfParent": true, 35590 "bubbleFireIfChildFired": false 35591 }, 35592 "ruleOrder": 50.0 35593 } 35594 ], 35595 "conditions": [ 35596 { 35597 "modulePath": "core/src/lib/conditions/valueComparison.js", 35598 "settings": { 35599 "comparison": { 35600 "operator": "doesNotEqual", 35601 "caseInsensitive": true 35602 }, 35603 "leftOperand": "%DisableAnalyticsCookie%", 35604 "rightOperand": "true" 35605 } 35606 }, 35607 { 35608 "modulePath": "core/src/lib/conditions/valueComparison.js", 35609 "settings": { 35610 "comparison": { 35611 "operator": "doesNotEqual", 35612 "caseInsensitive": true 35613 }, 35614 "leftOperand": "%TRAFFICTYPE_META%", 35615 "rightOperand": "bot" 35616 } 35617 } 35618 ], 35619 "actions": [ 35620 { 35621 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 35622 "settings": { 35623 "customSetup": { 35624 "source": function(event, s) { 35625 let cardTitle = event.target.closest('.course-pdp__learning-path__card').querySelector('.course-pdp__learning-path__card-title').innerText; 35626NIAnalytics.setAndTrack(["eVar33", "prop23"], cardTitle+":Learn More"); 35627} 35628 }, 35629 "trackerProperties": { 35630 "eVars": [ 35631 { 35632 "name": "eVar1", 35633 "type": "value", 35634 "value": "%PAGE_NAME%" 35635 }, 35636 { 35637 "name": "eVar12", 35638 "type": "value", 35639 "value": "%PROFILE_ID:COOKIE%" 35640 }, 35641 { 35642 "name": "eVar21", 35643 "type": "value", 35644 "value": "%PAGE_URL%" 35645 }, 35646 { 35647 "name": "eVar27", 35648 "type": "value", 35649 "value": "%CONTENTTYPE:METATAG%" 35650 } 35651 ], 35652 "props": [ 35653 { 35654 "name": "prop2", 35655 "type": "alias", 35656 "value": "eVar27" 35657 }, 35658 { 35659 "name": "prop33", 35660 "type": "alias", 35661 "value": "eVar21" 35662 } 35663 ], 35664 "events": [ 35665 { 35666 "name": "event30" 35667 } 35668 ] 35669 } 35670 } 35671 }, 35672 { 35673 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 35674 "settings": { 35675 "type": "link",
35676 "linkName": "Course PDP Learning Path selection", 35677 "linkType": "o" 35678 } 35679 }, 35680 { 35681 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 35682 "settings": {} 35683 } 35684 ] 35685 }, 35686 { 35687 "id": "RL5be1265080ce4ef5806848ca30c59837", 35688 "name": "CoursePLP_ProductLink_Click:EBR", 35689 "events": [ 35690 { 35691 "modulePath": "core/src/lib/events/click.js", 35692 "settings": { 35693 "elementSelector": ".aa-cplp-prodlink", 35694 "bubbleFireIfParent": true, 35695 "bubbleFireIfChildFired": false 35696 }, 35697 "ruleOrder": 50.0 35698 } 35699 ], 35700 "conditions": [ 35701 { 35702 "modulePath": "core/src/lib/conditions/valueComparison.js", 35703 "settings": { 35704 "comparison": { 35705 "operator": "doesNotEqual", 35706 "caseInsensitive": true 35707 }, 35708 "leftOperand": "%DisableAnalyticsCookie%", 35709 "rightOperand": "true" 35710 } 35711 }, 35712 { 35713 "modulePath": "core/src/lib/conditions/valueComparison.js", 35714 "settings": { 35715 "comparison": { 35716 "operator": "doesNotEqual", 35717 "caseInsensitive": true 35718 }, 35719 "leftOperand": "%TRAFFICTYPE_META%", 35720 "rightOperand": "bot" 35721 } 35722 } 35723 ], 35724 "actions": [ 35725 { 35726 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 35727 "settings": { 35728 "customSetup": { 35729 "source": function(event, s) { 35730 let ctaLabel = event.target.attributes.hasOwnProperty("data-an-cta-label") ? event.target.getAttribute('data-an-cta-label') : event.target.innerText; 35731NIAnalytics.setAndTrack(["eVar33", "prop23"], ctaLabel); 35732} 35733 }, 35734 "trackerProperties": { 35735 "eVars": [ 35736 { 35737 "name": "eVar1", 35738 "type": "value", 35739 "value": "%PAGE_NAME%" 35740 }, 35741 { 35742 "name": "eVar12", 35743 "type": "value", 35744 "value": "%PROFILE_ID:COOKIE%" 35745 }, 35746 { 35747 "name": "eVar21", 35748 "type": "value", 35749 "value": "%PAGE_URL%" 35750 }, 35751 { 35752 "name": "eVar27", 35753 "type": "value", 35754 "value": "%CONTENTTYPE:METATAG%" 35755 } 35756 ], 35757 "props": [ 35758 { 35759 "name": "prop2", 35760 "type": "alias", 35761 "value": "eVar27" 35762 }, 35763 { 35764 "name": "prop33", 35765 "type": "alias", 35766 "value": "eVar21" 35767 } 35768 ], 35769 "events": [ 35770 { 35771 "name": "event30" 35772 } 35773 ] 35774 } 35775 } 35776 }, 35777 { 35778 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 35779 "settings": { 35780 "type": "link", 35781 "linkName": "Course PLP ProductLink CTA", 35782 "linkType": "o" 35783 } 35784 }, 35785 { 35786 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 35787 "settings": {} 35788 } 35789 ] 35790 }, 35791 { 35792 "id": "RL5d5ec1d3cb9943c5b0105a66e6b288f0", 35793 "name": "SWPLP_Buy_Click:EBR", 35794 "events": [ 35795 { 35796 "modulePath": "core/src/lib/events/click.js", 35797 "settings": { 35798 "elementSelector": ".aa-swplp-buy", 35799 "bubbleFireIfParent": false, 35800 "bubbleFireIfChildFired": true 35801 }, 35802 "ruleOrder": 50.0 35803 } 35804 ], 35805 "conditions": [ 35806 { 35807 "modulePath": "core/src/lib/conditions/valueComparison.js", 35808 "settings": { 35809 "comparison": { 35810 "operator": "doesNotEqual", 35811 "caseInsensitive": true 35812 }, 35813 "leftOperand": "%DisableAnalyticsCookie%", 35814 "rightOperand": "true" 35815 } 35816 }, 35817 { 35818 "modulePath": "core/src/lib/conditions/valueComparison.js", 35819 "settings": { 35820 "comparison": { 35821 "operator": "doesNotEqual", 35822 "caseInsensitive": true 35823 }, 35824 "leftOperand": "%TRAFFICTYPE_META%", 35825 "rightOperand": "bot" 35826 } 35827 } 35828 ], 35829 "actions": [ 35830 { 35831 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 35832 "settings": { 35833 "customSetup": { 35834 "source": function(event, s) { 35835 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PLP:Buy"); 35836} 35837 }, 35838 "trackerProperties": { 35839 "eVars": [ 35840 { 35841 "name": "eVar1", 35842 "type": "value", 35843 "value": "%PAGE_NAME%" 35844 }, 35845 { 35846 "name": "eVar12", 35847 "type": "value", 35848 "value": "%PROFILE_ID:COOKIE%" 35849 }, 35850 { 35851 "name": "eVar21", 35852 "type": "value", 35853 "value": "%PAGE_URL%" 35854 }, 35855 { 35856 "name": "eVar27", 35857 "type": "value", 35858 "value": "%CONTENTTYPE:METATAG%" 35859 } 35860 ], 35861 "props": [ 35862 { 35863 "name": "prop2", 35864 "type": "alias", 35865 "value": "eVar27" 35866 }, 35867 { 35868 "name": "prop33", 35869 "type": "alias", 35870 "value": "eVar21" 35871 } 35872 ], 35873 "events": [ 35874 { 35875 "name": "event30" 35876 } 35877 ] 35878 } 35879 } 35880 }, 35881 { 35882 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 35883 "settings": { 35884 "type": "link", 35885 "linkName": "SW PLP Buy", 35886 "linkType": "o" 35887 } 35888 }, 35889 { 35890 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 35891 "settings": {} 35892 } 35893 ] 35894 }, 35895 { 35896 "id": "RL5faaf35860aa43358ed9aa7e62b286fc", 35897 "name": "Safari:Click:EBR", 35898 "events": [ 35899 { 35900 "modulePath": "core/src/lib/events/customCode.js", 35901 "settings": { 35902 "source": function(trigger) { 35903 if (!Element.prototype.closest) { 35904 if (!Element.prototype.matches) { 35905 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 35906 } 35907 Element.prototype.closest = function(s) { 35908 var el = this; 35909 var ancestor = this; 35910 if (!document.documentElement.contains(el)) return null; 35911 do { 35912 if (ancestor.matches(s)) { 35913 return ancestor; 35914 } 35915 35916 if (typeof ancestor.parentElement !== "undefined") { 35917 ancestor = ancestor.parentElement; 35918 } else { 35919 ancestor = ancestor.parentNode; 35920 } 35921 } while (ancestor !== null && ancestor !== undefined); 35922 return null; 35923 }; 35924} 35925/* 35926document.addEventListener("click", function(e){ 35927 e.preventDefault(); 35928 var target = e.target.closest("a"); 35929 35930 if(target && target.classList && target.classList.contains("deuHomepageLink")){ 35931 var link = target.href; 35932 if (((window.navigator.platform.toLowerCase().indexOf("mac") === -1) && window.event.ctrlKey) || 35933 ((window.navigator.platform.toLowerCase().indexOf("mac") > -1) && window.event.metaKey)) { 35934 trigger(e); 35935 window.open(link, '_blank'); 35936 window.focus(); 35937 } else { 35938 trigger(e); 35939 setTimeout(function() { 35940 window.location.href = link; 35941 }, 500); 35942 } 35943 } 35944}); 35945*/ 35946} 35947 }, 35948 "ruleOrder": 50.0 35949 }, 35950 { 35951 "modulePath": "core/src/lib/events/directCall.js", 35952 "settings": { 35953 "identifier": "captureWrapperClick" 35954 }, 35955 "ruleOrder": 50.0 35956 } 35957 ], 35958 "conditions": [ 35959 { 35960 "modulePath": "core/src/lib/conditions/valueComparison.js", 35961 "settings": { 35962 "comparison": { 35963 "operator": "doesNotEqual", 35964 "caseInsensitive": true 35965 }, 35966 "leftOperand": "%DisableAnalyticsCookie%", 35967 "rightOperand": "true" 35968 } 35969 } 35970 ], 35971 "actions": [ 35972 { 35973 "modulePath": "core/src/lib/actions/customCode.js", 35974 "settings": { 35975 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC86c1296dd3844257958afdfd5b5a35f2-source.js', 35976 "language": "javascript", 35977 "isExternal": true 35978 } 35979 } 35980 ] 35981 }, 35982 { 35983 "id": "RL5fe323b00a8145f291b6e21d9d0acaac", 35984 "name": "Capture_Category_Result_Click:DCR", 35985 "events": [ 35986 { 35987 "modulePath": "core/src/lib/events/directCall.js", 35988 "settings": { 35989 "identifier": "captureCategoryResultClick" 35990 }, 35991 "ruleOrder": 50.0 35992 } 35993 ], 35994 "conditions": [ 35995 { 35996 "modulePath": "core/src/lib/conditions/valueComparison.js", 35997 "settings": { 35998 "comparison": { 35999 "operator": "doesNotEqual", 36000 "caseInsensitive": true 36001 }, 36002 "leftOperand": "%DisableAnalyticsCookie%", 36003 "rightOperand": "true" 36004 } 36005 }, 36006 { 36007 "modulePath": "core/src/lib/conditions/valueComparison.js", 36008 "settings": { 36009 "comparison": { 36010 "operator": "doesNotEqual", 36011 "caseInsensitive": true 36012 }, 36013 "leftOperand": "%TRAFFICTYPE_META%", 36014 "rightOperand": "bot" 36015 } 36016 } 36017 ], 36018 "actions": [ 36019 { 36020 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36021 "settings": { 36022 "customSetup": { 36023 "source": function(event, s) { 36024 if (event && event.detail && event.detail.template && event.detail.filterPair){ 36025 if(typeof event.detail.filterPair === "string"){ 36026 NIAnalytics.setAndTrack("list3", event.detail.template+":"+event.detail.filterPair); 36027 } else if(typeof event.detail.filterPair === "object"){ 36028 NIAnalytics.setAndTrack("list3", event.detail.template+":"+event.detail.filterPair.join(","+event.detail.template+":")); 36029 } 36030} 36031 36032if (event && event.detail && event.detail.pmdmIds){ 36033 NIAnalytics.setAndTrack("prodView", event.detail.pmdmIds); 36034} 36035} 36036 }, 36037 "trackerProperties": { 36038 "eVars": [ 36039 { 36040 "name": "eVar1", 36041 "type": "value", 36042 "value": "%PAGE_NAME%" 36043 }, 36044 { 36045 "name": "eVar27", 36046 "type": "value", 36047 "value": "%CONTENTTYPE:METATAG%" 36048 } 36049 ], 36050 "events": [ 36051 { 36052 "name": "event3" 36053 } 36054 ] 36055 } 36056 } 36057 }, 36058 { 36059 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36060 "settings": { 36061 "type": "link", 36062 "linkType": "o" 36063 } 36064 }, 36065 { 36066 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36067 "settings": {} 36068 } 36069 ] 36070 }, 36071 { 36072 "id": "RL6043678383824560be18e98433905b26", 36073 "name": "Capture_Cmty_Interaction:DCR", 36074 "events": [ 36075 { 36076 "modulePath": "core/src/lib/events/directCall.js", 36077 "settings": { 36078 "identifier": "captureCmtyInteraction" 36079 }, 36080 "ruleOrder": 50.0 36081 } 36082 ], 36083 "conditions": [ 36084 { 36085 "modulePath": "core/src/lib/conditions/valueComparison.js", 36086 "settings": { 36087 "comparison": { 36088 "operator": "doesNotEqual", 36089 "caseInsensitive": true 36090 }, 36091 "leftOperand": "%DisableAnalyticsCookie%", 36092 "rightOperand": "true" 36093 } 36094 }, 36095 { 36096 "modulePath": "core/src/lib/conditions/valueComparison.js", 36097 "settings": { 36098 "comparison": { 36099 "operator": "doesNotEqual", 36100 "caseInsensitive": true 36101 }, 36102 "leftOperand": "%TRAFFICTYPE_META%", 36103 "rightOperand": "bot" 36104 } 36105 } 36106 ], 36107 "actions": [ 36108 { 36109 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36110 "settings": { 36111 "customSetup": { 36112 "source": function(event, s) { 36113 s.linkTrackVars += ",eVar136,prop43"; 36114s.eVar136 = s.prop43 = event.detail.eventName + ":" + event.detail.eventLabel; 36115} 36116 }, 36117 "trackerProperties": { 36118 "eVars": [ 36119 { 36120 "name": "eVar1", 36121 "type": "value", 36122 "value": "%PAGE_NAME%" 36123 }, 36124 { 36125 "name": "eVar27", 36126 "type": "value", 36127 "value": "%CONTENTTYPE:METATAG%" 36128 }, 36129 { 36130 "name": "eVar56", 36131 "type": "value",
36132 "value": "%DETAILED_PAGENAME%" 36133 }, 36134 { 36135 "name": "eVar63", 36136 "type": "value", 36137 "value": "%DOCUMENTID:METATAG%" 36138 }, 36139 { 36140 "name": "eVar133", 36141 "type": "value", 36142 "value": "%CAT_ID:METATAG%" 36143 }, 36144 { 36145 "name": "eVar134", 36146 "type": "value", 36147 "value": "%SUB_CAT_ID:METATAG%" 36148 }, 36149 { 36150 "name": "eVar135", 36151 "type": "value", 36152 "value": "%NODE_ID:METATAG%" 36153 } 36154 ], 36155 "props": [ 36156 { 36157 "name": "prop50", 36158 "type": "alias", 36159 "value": "eVar56" 36160 } 36161 ], 36162 "events": [ 36163 { 36164 "name": "event68" 36165 } 36166 ] 36167 } 36168 } 36169 }, 36170 { 36171 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36172 "settings": { 36173 "type": "link", 36174 "linkType": "o" 36175 } 36176 }, 36177 { 36178 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36179 "settings": {} 36180 } 36181 ] 36182 }, 36183 { 36184 "id": "RL612c68fd97854919b13423972dd02f25", 36185 "name": "Capture_Outcome_Complete:DCR", 36186 "events": [ 36187 { 36188 "modulePath": "core/src/lib/events/directCall.js", 36189 "settings": { 36190 "identifier": "captureOutcomeComplete" 36191 }, 36192 "ruleOrder": 50.0 36193 } 36194 ], 36195 "conditions": [ 36196 { 36197 "modulePath": "core/src/lib/conditions/valueComparison.js", 36198 "settings": { 36199 "comparison": { 36200 "operator": "doesNotEqual", 36201 "caseInsensitive": true 36202 }, 36203 "leftOperand": "%DisableAnalyticsCookie%", 36204 "rightOperand": "true" 36205 } 36206 }, 36207 { 36208 "modulePath": "core/src/lib/conditions/valueComparison.js", 36209 "settings": { 36210 "comparison": { 36211 "operator": "doesNotEqual", 36212 "caseInsensitive": true 36213 }, 36214 "leftOperand": "%TRAFFICTYPE_META%", 36215 "rightOperand": "bot" 36216 } 36217 } 36218 ], 36219 "actions": [ 36220 { 36221 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36222 "settings": { 36223 "customSetup": { 36224 "source": function(event, s) { 36225 s.linkTrackVars += ",events,eVar96"; 36226s.linkTrackEvents += ",event43,event52"; 36227var eventName = event.detail.eventName; 36228var email = event.detail.email; 36229if (eventName === "assessment") { 36230 s.events += s.events === "" ? "event43" : ",event43"; 36231} else if (eventName === "event registration") { 36232 s.events += s.events === "" ? "event52" : ",event52"; 36233 s.eVar96 = _satellite.getVar("DOCUMENTID:METATAG"); 36234} 36235 36236if (eventName === "chat"){ 36237 s.events += ",event45"; 36238 s.linkTrackEvents +=",event45"; 36239 digitalData.valueToHash = email; 36240 s.eVar101 = email !== "" ? _satellite.getVar('MD5_HASH') : ""; 36241 s.linkTrackVars += ",eVar101"; 36242 36243 //Restoring the original user email address 36244 var storageValue = sessionStorage.getItem('NIUA_email_addr'); 36245 if (storageValue !== null) { 36246 var storageJSON = JSON.parse(storageValue); 36247 digitalData.valueToHash = storageJSON.response.email; 36248 } 36249} 36250 36251if (eventName === "contact sales"){ 36252 s.events += ",event70"; 36253 s.linkTrackEvents +=",event70"; 36254 digitalData.valueToHash = email; 36255 s.eVar101 = email !== "" ? _satellite.getVar('MD5_HASH') : ""; 36256 s.transactionID = s.eVar101; 36257 s.linkTrackVars += ",eVar101,transactionID"; 36258} 36259 36260NIAnalytics.setAndTrack("eVar147", event.detail.datetime); 36261} 36262 }, 36263 "trackerProperties": { 36264 "eVars": [ 36265 { 36266 "name": "eVar1", 36267 "type": "value", 36268 "value": "%PAGE_NAME%" 36269 }, 36270 { 36271 "name": "eVar28", 36272 "type": "value", 36273 "value": "%event.detail.eventName%" 36274 }, 36275 { 36276 "name": "eVar29", 36277 "type": "value", 36278 "value": "%event.detail.eventName% %event.detail.eventAction%" 36279 }, 36280 { 36281 "name": "eVar56", 36282 "type": "value",
36283 "value": "%DETAILED_PAGENAME%" 36284 }, 36285 { 36286 "name": "eVar71", 36287 "type": "value", 36288 "value": "%ASSESSMENT_LABEL:EV:DL%" 36289 }, 36290 { 36291 "name": "eVar72", 36292 "type": "value", 36293 "value": "%ASSESSMENT_QUESTIONID:EV:DL%" 36294 }, 36295 { 36296 "name": "eVar73", 36297 "type": "value", 36298 "value": "%ASSESSMENT_OUTCOME_LABEL:EV:DL%" 36299 } 36300 ], 36301 "props": [ 36302 { 36303 "name": "prop23", 36304 "type": "alias", 36305 "value": "eVar1" 36306 }, 36307 { 36308 "name": "prop25", 36309 "type": "value", 36310 "value": "%ASSESSMENT_LABEL:EV:DL%" 36311 }, 36312 { 36313 "name": "prop50", 36314 "type": "alias", 36315 "value": "eVar56" 36316 } 36317 ], 36318 "events": [ 36319 { 36320 "name": "event28" 36321 } 36322 ], 36323 "pageName": "%PAGE_NAME%" 36324 } 36325 } 36326 }, 36327 { 36328 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36329 "settings": { 36330 "type": "link", 36331 "linkName": "", 36332 "linkType": "o" 36333 } 36334 }, 36335 { 36336 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36337 "settings": {} 36338 } 36339 ] 36340 }, 36341 { 36342 "id": "RL6264d645ddb74cee88d046d23c0bdeeb", 36343 "name": "CTA_Click:EBR", 36344 "events": [ 36345 { 36346 "modulePath": "core/src/lib/events/click.js", 36347 "settings": { 36348 "elementSelector": ".aa-react-link:not(.buyquote-button), .hw-pdp__grid-column .overview__button", 36349 "bubbleFireIfParent": true, 36350 "bubbleFireIfChildFired": false 36351 }, 36352 "ruleOrder": 50.0 36353 }, 36354 { 36355 "modulePath": "core/src/lib/events/click.js", 36356 "settings": { 36357 "bubbleStop": true, 36358 "elementSelector": "a.link:not(:is([data-an-do-not-track=\"true\"], [class*=\"Banner_in-table-banner-content\"] *, [class*=\"Banner_end-of-page-banner\"] *, [class*=\"starting-at-price__pricing-table-view\"] *, [class*=\"CardContainerItem\"] *, [class*=\"Tabs_verticalTabs\"] .nicrc--tab-content a.link, [class*=\"Tabs_verticalTabs\"] .nicrc--tab-content button, [class*=\"Leadspace_linkContainer\"] a, [class*=\"Leadspace_linkContainer\"] button, .hub-navigation a, .hub-navigation button, .sw-hub-dropdown-li a:not([data-analytics-cta-type]) )), a.nicrc--link:not(:is([class*=\"Banner_in-table-banner-content\"] *, [class*=\"Banner_end-of-page-banner\"] *, [class*=\"starting-at-price__pricing-table-view\"] *, [class*=\"CardContainerItem\"] *, [class*=\"Tabs_verticalTabs\"] .nicrc--tab-content a.link, [class*=\"Tabs_verticalTabs\"] .nicrc--tab-content button, [class*=\"Leadspace_linkContainer\"] a, [class*=\"Leadspace_linkContainer\"] button, .hub-navigation a, .hub-navigation button, .sw-hub-dropdown-li a:not([data-analytics-cta-type]), [class*=\"analytics-mp-\"], [class*=\"analytics-update-payment-method\"], [class*=\"product-list-table__part-number-link\"], [class*=\"aa-react-link\"], [class*=\"aa-swpdp-included\"], [class*=\"aa-cpdp-training-format\"], [class*=\"aa-cplp-prodlink\"], [class*=\"aa-co-term-cta\"], [class*=\"aa-software-upgrade-cta\"], [class*=\"step-modal-steps__skip-link\"], [class*=\"aa-swplp-download\"], [class*=\"aa-cpdp-topcta\"], [class*=\"aa-software-upgrade-step2-cta\"], [class*=\"aa-sw-renewal-cta\"], [class*=\"cross-sell-card__learn-more\"], .product-list-table__cell-content--sticky.price .nicrc--link, [class*=\"deap-events-leadspace-cta\"] ))", 36359 "bubbleFireIfParent": true, 36360 "bubbleFireIfChildFired": false 36361 }, 36362 "ruleOrder": 50.0 36363 } 36364 ], 36365 "conditions": [ 36366 { 36367 "modulePath": "core/src/lib/conditions/valueComparison.js", 36368 "settings": { 36369 "comparison": { 36370 "operator": "doesNotEqual", 36371 "caseInsensitive": true 36372 }, 36373 "leftOperand": "%DisableAnalyticsCookie%", 36374 "rightOperand": "true" 36375 } 36376 }, 36377 { 36378 "modulePath": "core/src/lib/conditions/valueComparison.js", 36379 "settings": { 36380 "comparison": { 36381 "operator": "doesNotEqual", 36382 "caseInsensitive": true 36383 }, 36384 "leftOperand": "%TRAFFICTYPE_META%", 36385 "rightOperand": "bot" 36386 } 36387 }, 36388 { 36389 "modulePath": "core/src/lib/conditions/customCode.js", 36390 "settings": { 36391 "source": function(event, target) { 36392 let aElement = event.target.closest('a'); 36393let buttonElement = event.target.closest('button'); 36394 36395if(aElement && (aElement.matches('.nicrc--breadcrumb-item a.nicrc--link') || aElement.matches('.distributor-modal__table-section-table a.nicrc--link') || aElement.matches('.nicrc--tile.resources-section a.nicrc--link') )){ 36396 return false;
36397} 36398 36399if(buttonElement && (buttonElement.matches('.buyquote-button') || buttonElement.matches('.step-modal-steps__skip-link') || buttonElement.matches('.nicrc--modal .step-modal-steps__buttons .nicrc--btn')) ){ 36400 return false; 36401} 36402 36403return true; 36404} 36405 } 36406 } 36407 ], 36408 "actions": [ 36409 { 36410 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36411 "settings": { 36412 "customSetup": { 36413 "source": function(event, s) { 36414 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.target.attributes.hasOwnProperty("data-an-cta-label") ? event.target.attributes['data-an-cta-label'].value : event.target.innerText); 36415} 36416 }, 36417 "trackerProperties": { 36418 "eVars": [ 36419 { 36420 "name": "eVar1", 36421 "type": "value", 36422 "value": "%PAGE_NAME%" 36423 }, 36424 { 36425 "name": "eVar12", 36426 "type": "value", 36427 "value": "%PROFILE_ID:COOKIE%" 36428 }, 36429 { 36430 "name": "eVar21", 36431 "type": "value", 36432 "value": "%PAGE_URL%" 36433 }, 36434 { 36435 "name": "eVar27", 36436 "type": "value", 36437 "value": "%CONTENTTYPE:METATAG%" 36438 } 36439 ], 36440 "props": [ 36441 { 36442 "name": "prop2", 36443 "type": "alias", 36444 "value": "eVar27" 36445 }, 36446 { 36447 "name": "prop33", 36448 "type": "alias", 36449 "value": "eVar21" 36450 } 36451 ], 36452 "events": [ 36453 { 36454 "name": "event30" 36455 } 36456 ] 36457 } 36458 } 36459 }, 36460 { 36461 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36462 "settings": { 36463 "type": "link", 36464 "linkName": "aa-react-link", 36465 "linkType": "o" 36466 } 36467 }, 36468 { 36469 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36470 "settings": {} 36471 } 36472 ] 36473 }, 36474 { 36475 "id": "RL62a226df0dcb4243973d0ab75b91796f", 36476 "name": "EventCardClick:EBR", 36477 "events": [ 36478 { 36479 "modulePath": "core/src/lib/events/click.js", 36480 "settings": { 36481 "elementSelector": ".event-card", 36482 "bubbleFireIfParent": true, 36483 "bubbleFireIfChildFired": true 36484 }, 36485 "ruleOrder": 50.0 36486 } 36487 ], 36488 "conditions": [], 36489 "actions": [ 36490 { 36491 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36492 "settings": { 36493 "customSetup": { 36494 "source": function(event, s) { 36495 let eventLabel = event.target.querySelector(".event-card--header .heading-04")?.innerText; 36496NIAnalytics.setAndTrack(["eVar33", "prop23"], "Events:event card:"+ eventLabel); 36497} 36498 }, 36499 "trackerProperties": { 36500 "eVars": [ 36501 { 36502 "name": "eVar1", 36503 "type": "value", 36504 "value": "%PAGE_NAME%" 36505 }, 36506 { 36507 "name": "eVar12", 36508 "type": "value", 36509 "value": "%PROFILE_ID:COOKIE%" 36510 }, 36511 { 36512 "name": "eVar21", 36513 "type": "value", 36514 "value": "%PAGE_URL%" 36515 }, 36516 { 36517 "name": "eVar27", 36518 "type": "value", 36519 "value": "%CONTENTTYPE:METATAG%" 36520 } 36521 ], 36522 "props": [ 36523 { 36524 "name": "prop2", 36525 "type": "alias", 36526 "value": "eVar27" 36527 }, 36528 { 36529 "name": "prop33", 36530 "type": "alias", 36531 "value": "eVar21" 36532 } 36533 ], 36534 "events": [ 36535 { 36536 "name": "event30" 36537 } 36538 ] 36539 } 36540 } 36541 }, 36542 { 36543 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36544 "settings": { 36545 "type": "link", 36546 "linkName": "Event card click", 36547 "linkType": "o" 36548 } 36549 }, 36550 { 36551 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36552 "settings": {} 36553 } 36554 ] 36555 }, 36556 { 36557 "id": "RL66c7678899d14f7f8eafef0ebacc0dc3", 36558 "name": "Capture_Result_Click:DCR", 36559 "events": [ 36560 { 36561 "modulePath": "core/src/lib/events/directCall.js", 36562 "settings": { 36563 "identifier": "captureResultClick" 36564 }, 36565 "ruleOrder": 50.0 36566 } 36567 ], 36568 "conditions": [ 36569 { 36570 "modulePath": "core/src/lib/conditions/valueComparison.js", 36571 "settings": { 36572 "comparison": { 36573 "operator": "doesNotEqual", 36574 "caseInsensitive": true 36575 }, 36576 "leftOperand": "%DisableAnalyticsCookie%", 36577 "rightOperand": "true" 36578 } 36579 }, 36580 { 36581 "modulePath": "core/src/lib/conditions/valueComparison.js", 36582 "settings": { 36583 "comparison": { 36584 "operator": "doesNotEqual", 36585 "caseInsensitive": true 36586 }, 36587 "leftOperand": "%TRAFFICTYPE_META%", 36588 "rightOperand": "bot" 36589 } 36590 } 36591 ], 36592 "actions": [ 36593 { 36594 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36595 "settings": { 36596 "customSetup": { 36597 "source": function(event, s) { 36598 s.getPreviousValue(s.eVar2, 'gpv_ps', ''); 36599/*s.eVar127 = _satellite.getVar('CLICKTITLEURL:OSI:OS:DL'); 36600s.linkTrackVars += ",eVar127";*/ 36601} 36602 }, 36603 "trackerProperties": { 36604 "eVars": [ 36605 { 36606 "name": "eVar1", 36607 "type": "value", 36608 "value": "%PAGE_NAME%" 36609 }, 36610 { 36611 "name": "eVar2", 36612 "type": "value", 36613 "value": "%ONSITESEARCHTERM:OSI:OS:DL%" 36614 }, 36615 { 36616 "name": "eVar27", 36617 "type": "value", 36618 "value": "%CONTENTTYPE:METATAG%" 36619 }, 36620 { 36621 "name": "eVar46", 36622 "type": "value", 36623 "value": "%event.detail.onsiteSearchClickedRank%" 36624 }, 36625 { 36626 "name": "eVar47", 36627 "type": "value", 36628 "value": "%event.detail.onsiteSearchClickTitle%" 36629 }, 36630 { 36631 "name": "eVar127", 36632 "type": "value", 36633 "value": "%CLICKTITLEURL:OSI:OS:DL%" 36634 } 36635 ], 36636 "props": [ 36637 { 36638 "name": "prop4", 36639 "type": "alias", 36640 "value": "eVar2" 36641 }, 36642 { 36643 "name": "prop23", 36644 "type": "value", 36645 "value": "%PAGE_NAME%" 36646 } 36647 ], 36648 "events": [ 36649 { 36650 "name": "event38" 36651 } 36652 ] 36653 } 36654 } 36655 }, 36656 { 36657 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36658 "settings": { 36659 "type": "link", 36660 "linkName": "%ONSITESEARCHCLICKTITLE:OSI:OS:DL%", 36661 "linkType": "o" 36662 } 36663 }, 36664 { 36665 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36666 "settings": {} 36667 } 36668 ] 36669 }, 36670 { 36671 "id": "RL677d5d082f864bd89c7f3bd4a4428641", 36672 "name": "OneTrustTag:PLR", 36673 "events": [ 36674 { 36675 "modulePath": "core/src/lib/events/windowLoaded.js", 36676 "settings": {}, 36677 "ruleOrder": 50.0 36678 } 36679 ], 36680 "conditions": [ 36681 { 36682 "modulePath": "core/src/lib/conditions/customCode.js", 36683 "settings": { 36684 "source": function(event, target) { 36685 return sessionStorage.getItem("AAOneTrust") !== null; 36686} 36687 } 36688 }, 36689 { 36690 "modulePath": "core/src/lib/conditions/valueComparison.js", 36691 "settings": { 36692 "comparison": { 36693 "operator": "doesNotEqual", 36694 "caseInsensitive": true 36695 }, 36696 "leftOperand": "%DisableAnalyticsCookie%", 36697 "rightOperand": "true" 36698 } 36699 } 36700 ], 36701 "actions": [ 36702 { 36703 "modulePath": "core/src/lib/actions/customCode.js", 36704 "settings": { 36705 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC66b5146ef8394fc3ab817291f0a9b1e9-source.js', 36706 "language": "html", 36707 "isExternal": true 36708 } 36709 } 36710 ] 36711 }, 36712 { 36713 "id": "RL6996d1ef200b4f559b6913c8be62ca10", 36714 "name": "SWPLP_Search_Navigation:DCR", 36715 "events": [ 36716 { 36717 "modulePath": "core/src/lib/events/customEvent.js", 36718 "settings": { 36719 "type": "aa-swplp-search-navigation", 36720 "bubbleFireIfParent": true, 36721 "bubbleFireIfChildFired": true 36722 }, 36723 "ruleOrder": 50.0 36724 } 36725 ], 36726 "conditions": [ 36727 { 36728 "modulePath": "core/src/lib/conditions/valueComparison.js", 36729 "settings": { 36730 "comparison": { 36731 "operator": "doesNotEqual", 36732 "caseInsensitive": true 36733 }, 36734 "leftOperand": "%DisableAnalyticsCookie%", 36735 "rightOperand": "true" 36736 } 36737 }, 36738 { 36739 "modulePath": "core/src/lib/conditions/valueComparison.js", 36740 "settings": { 36741 "comparison": { 36742 "operator": "doesNotEqual", 36743 "caseInsensitive": true 36744 }, 36745 "leftOperand": "%TRAFFICTYPE_META%", 36746 "rightOperand": "bot" 36747 } 36748 } 36749 ], 36750 "actions": [ 36751 { 36752 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36753 "settings": { 36754 "customSetup": { 36755 "source": function(event, s) { 36756 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PLP:"+event.detail.pageNumber); 36757} 36758 }, 36759 "trackerProperties": { 36760 "eVars": [ 36761 { 36762 "name": "eVar1", 36763 "type": "value", 36764 "value": "%PAGE_NAME%" 36765 }, 36766 { 36767 "name": "eVar12", 36768 "type": "value", 36769 "value": "%PROFILE_ID:COOKIE%" 36770 }, 36771 { 36772 "name": "eVar21", 36773 "type": "value", 36774 "value": "%PAGE_URL%" 36775 }, 36776 { 36777 "name": "eVar27", 36778 "type": "value", 36779 "value": "%CONTENTTYPE:METATAG%" 36780 }, 36781 { 36782 "name": "eVar41", 36783 "type": "value", 36784 "value": "SW Page Catalog Search" 36785 }, 36786 { 36787 "name": "eVar56", 36788 "type": "value", 36789 "value": "SW page Catalog search results" 36790 }, 36791 { 36792 "name": "eVar59", 36793 "type": "value", 36794 "value": "SW page Catalog search results" 36795 } 36796 ], 36797 "props": [ 36798 { 36799 "name": "prop2", 36800 "type": "alias", 36801 "value": "eVar27" 36802 }, 36803 { 36804 "name": "prop23", 36805 "type": "alias", 36806 "value": "eVar33" 36807 }, 36808 { 36809 "name": "prop33", 36810 "type": "alias", 36811 "value": "eVar21" 36812 } 36813 ], 36814 "events": [ 36815 { 36816 "name": "event30" 36817 }, 36818 { 36819 "name": "event78" 36820 } 36821 ] 36822 } 36823 } 36824 }, 36825 { 36826 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36827 "settings": { 36828 "type": "link", 36829 "linkName": "SW PLP", 36830 "linkType": "o" 36831 } 36832 }, 36833 { 36834 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36835 "settings": {} 36836 } 36837 ] 36838 }, 36839 { 36840 "id": "RL6c0c983c2a524bd79373759aeb0b8e5b", 36841 "name": "EventCitySearch:EBR", 36842 "events": [ 36843 { 36844 "modulePath": "core/src/lib/events/customEvent.js", 36845 "settings": { 36846 "type": "filteredbylocation", 36847 "bubbleFireIfParent": true, 36848 "bubbleFireIfChildFired": true 36849 }, 36850 "ruleOrder": 50.0 36851 } 36852 ], 36853 "conditions": [ 36854 { 36855 "modulePath": "core/src/lib/conditions/customCode.js", 36856 "settings": { 36857 "source": function(event, target) { 36858 return /^\/[a-z]{2}(?:-[a-z]{2})?\/events\.html$/i.test(window.location.pathname); 36859} 36860 } 36861 } 36862 ], 36863 "actions": [ 36864 { 36865 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36866 "settings": { 36867 "customSetup": { 36868 "source": function(event, s) { 36869 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Events:city search:"+event?.detail?.value); 36870} 36871 }, 36872 "trackerProperties": { 36873 "eVars": [ 36874 { 36875 "name": "eVar1", 36876 "type": "value", 36877 "value": "%PAGE_NAME%" 36878 }, 36879 { 36880 "name": "eVar12", 36881 "type": "value", 36882 "value": "%PROFILE_ID:COOKIE%" 36883 }, 36884 { 36885 "name": "eVar21", 36886 "type": "value", 36887 "value": "%PAGE_URL%" 36888 }, 36889 { 36890 "name": "eVar27", 36891 "type": "value", 36892 "value": "%CONTENTTYPE:METATAG%" 36893 } 36894 ], 36895 "props": [ 36896 { 36897 "name": "prop2", 36898 "type": "alias", 36899 "value": "eVar27" 36900 }, 36901 { 36902 "name": "prop33", 36903 "type": "alias", 36904 "value": "eVar21" 36905 } 36906 ], 36907 "events": [ 36908 { 36909 "name": "event30" 36910 } 36911 ] 36912 } 36913 } 36914 }, 36915 { 36916 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 36917 "settings": { 36918 "type": "link", 36919 "linkName": "Event city search", 36920 "linkType": "o" 36921 } 36922 }, 36923 { 36924 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 36925 "settings": {} 36926 } 36927 ] 36928 }, 36929 {
36930 "id": "RL6d990fcdb2de4a6794bb009d132c1cbc", 36931 "name": "My_Profile_ErrorEvents:EBR", 36932 "events": [ 36933 { 36934 "modulePath": "core/src/lib/events/customEvent.js", 36935 "settings": { 36936 "type": "AnalyticsCardLimitReached", 36937 "bubbleFireIfParent": true, 36938 "bubbleFireIfChildFired": true 36939 }, 36940 "ruleOrder": 50.0 36941 }, 36942 { 36943 "modulePath": "core/src/lib/events/customEvent.js", 36944 "settings": { 36945 "type": "AnalyticsNotSupportedPayment", 36946 "bubbleFireIfParent": true, 36947 "bubbleFireIfChildFired": true 36948 }, 36949 "ruleOrder": 50.0 36950 } 36951 ], 36952 "conditions": [ 36953 { 36954 "modulePath": "core/src/lib/conditions/valueComparison.js", 36955 "settings": { 36956 "comparison": { 36957 "operator": "doesNotEqual", 36958 "caseInsensitive": true 36959 }, 36960 "leftOperand": "%DisableAnalyticsCookie%", 36961 "rightOperand": "true" 36962 } 36963 }, 36964 { 36965 "modulePath": "core/src/lib/conditions/valueComparison.js", 36966 "settings": { 36967 "comparison": { 36968 "operator": "doesNotEqual", 36969 "caseInsensitive": true 36970 }, 36971 "leftOperand": "%TRAFFICTYPE_META%", 36972 "rightOperand": "bot" 36973 } 36974 } 36975 ], 36976 "actions": [ 36977 { 36978 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 36979 "settings": { 36980 "customSetup": { 36981 "source": function(event, s) { 36982 NIAnalytics.setAndTrack("eVar43", event.detail.message); 36983if(event.nativeEvent.type == "AnalyticsCardLimitReached"){ 36984 NIAnalytics.setAndTrack("event75", ""); 36985} else if(event.nativeEvent.type == "AnalyticsNotSupportedPayment"){ 36986 NIAnalytics.setAndTrack("event76", ""); 36987} 36988} 36989 }, 36990 "trackerProperties": { 36991 "eVars": [ 36992 { 36993 "name": "eVar1", 36994 "type": "value", 36995 "value": "MyProfile/Saved payment methods" 36996 }, 36997 { 36998 "name": "eVar21", 36999 "type": "value", 37000 "value": "%PAGE_URL%" 37001 }, 37002 { 37003 "name": "eVar56", 37004 "type": "value", 37005 "value": "myprofile:main" 37006 }, 37007 { 37008 "name": "eVar74", 37009 "type": "value", 37010 "value": "Error - Payment method" 37011 } 37012 ], 37013 "props": [ 37014 { 37015 "name": "prop33", 37016 "type": "alias", 37017 "value": "eVar21" 37018 } 37019 ], 37020 "events": [ 37021 { 37022 "name": "event29" 37023 } 37024 ] 37025 } 37026 } 37027 }, 37028 { 37029 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 37030 "settings": { 37031 "type": "link", 37032 "linkType": "o" 37033 } 37034 }, 37035 { 37036 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 37037 "settings": {} 37038 } 37039 ] 37040 }, 37041 { 37042 "id": "RL712ab0f203db4425a5d632003ac0b1e7", 37043 "name": "Software Upgrade Additional Products CTA Click:EBR", 37044 "events": [ 37045 { 37046 "modulePath": "core/src/lib/events/click.js", 37047 "settings": { 37048 "elementSelector": ".aa-software-upgrade-step2-cta", 37049 "bubbleFireIfParent": true, 37050 "bubbleFireIfChildFired": false 37051 }, 37052 "ruleOrder": 50.0 37053 } 37054 ], 37055 "conditions": [], 37056 "actions": [ 37057 { 37058 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 37059 "settings": { 37060 "customSetup": { 37061 "source": function(event, s) { 37062 function findNearestParentH3(element) { 37063 let current = element.parentElement; 37064 37065 while (current) { 37066 const h3 = current.querySelector('h3'); 37067 37068 if (h3) { 37069 return h3.textContent.trim(); 37070 } 37071 37072 current = current.parentElement; 37073 } 37074 37075 return null; 37076} 37077NIAnalytics.setAndTrack(["eVar33", "prop23"], "Upgrade_step2:"+findNearestParentH3(event.element)+":"+event.target.innerText); 37078} 37079 }, 37080 "trackerProperties": { 37081 "eVars": [ 37082 { 37083 "name": "eVar1", 37084 "type": "value", 37085 "value": "%PAGE_NAME%" 37086 }, 37087 { 37088 "name": "eVar12", 37089 "type": "value", 37090 "value": "%PROFILE_ID:COOKIE%" 37091 }, 37092 { 37093 "name": "eVar21", 37094 "type": "value", 37095 "value": "%PAGE_URL%" 37096 }, 37097 { 37098 "name": "eVar27", 37099 "type": "value", 37100 "value": "%CONTENTTYPE:METATAG%" 37101 } 37102 ], 37103 "props": [ 37104 { 37105 "name": "prop2", 37106 "type": "alias", 37107 "value": "eVar27" 37108 }, 37109 { 37110 "name": "prop33", 37111 "type": "alias", 37112 "value": "eVar21" 37113 } 37114 ], 37115 "events": [ 37116 { 37117 "name": "event30" 37118 } 37119 ] 37120 } 37121 } 37122 }, 37123 { 37124 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 37125 "settings": { 37126 "type": "link", 37127 "linkName": "Software Upgrade Additional Products CTA Click", 37128 "linkType": "o" 37129 } 37130 }, 37131 { 37132 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 37133 "settings": {} 37134 } 37135 ] 37136 }, 37137 { 37138 "id": "RL734fd2ba29cb414298ecf14ccbb972ac", 37139 "name": "Software Upgrade CTA Click:EBR", 37140 "events": [ 37141 { 37142 "modulePath": "core/src/lib/events/click.js", 37143 "settings": { 37144 "elementSelector": ".aa-software-upgrade-cta", 37145 "bubbleFireIfParent": true, 37146 "bubbleFireIfChildFired": false 37147 }, 37148 "ruleOrder": 50.0 37149 } 37150 ], 37151 "conditions": [], 37152 "actions": [ 37153 { 37154 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 37155 "settings": { 37156 "customSetup": { 37157 "source": function(event, s) { 37158 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Upgrade:"+event.target.innerText); 37159} 37160 }, 37161 "trackerProperties": { 37162 "eVars": [ 37163 { 37164 "name": "eVar1", 37165 "type": "value", 37166 "value": "%PAGE_NAME%" 37167 }, 37168 { 37169 "name": "eVar12", 37170 "type": "value", 37171 "value": "%PROFILE_ID:COOKIE%" 37172 }, 37173 { 37174 "name": "eVar21", 37175 "type": "value", 37176 "value": "%PAGE_URL%" 37177 }, 37178 { 37179 "name": "eVar27", 37180 "type": "value", 37181 "value": "%CONTENTTYPE:METATAG%" 37182 } 37183 ], 37184 "props": [ 37185 { 37186 "name": "prop2", 37187 "type": "alias", 37188 "value": "eVar27" 37189 }, 37190 { 37191 "name": "prop33", 37192 "type": "alias", 37193 "value": "eVar21" 37194 } 37195 ], 37196 "events": [ 37197 { 37198 "name": "event30" 37199 } 37200 ] 37201 } 37202 } 37203 }, 37204 { 37205 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 37206 "settings": { 37207 "type": "link", 37208 "linkName": "Software Upgrade CTA Click", 37209 "linkType": "o" 37210 } 37211 }, 37212 { 37213 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 37214 "settings": {} 37215 } 37216 ] 37217 }, 37218 { 37219 "id": "RL73643a6169b14893aa6dd36ee47db88d", 37220 "name": "Target_Remove_Body_Hiding", 37221 "events": [ 37222 { 37223 "modulePath": "core/src/lib/events/libraryLoaded.js", 37224 "settings": {}, 37225 "ruleOrder": 50.0 37226 } 37227 ], 37228 "conditions": [ 37229 { 37230 "modulePath": "core/src/lib/conditions/customCode.js", 37231 "settings": { 37232 "source": function(event, target) { 37233 return _satellite.getVar("TARGET_ENABLED") === false; 37234} 37235 } 37236 } 37237 ], 37238 "actions": [ 37239 { 37240 "modulePath": "core/src/lib/actions/customCode.js", 37241 "settings": { 37242 "global": false, 37243 "source": "var STYLE_ID = 'at-body-style';\n\nfunction getParent() {\n return document.getElementsByTagName('head')[0];\n}\n\nfunction removeStyle(parent, id) {\n if (!parent) { \n return;\n }\n var style = document.getElementById(id);\n if (!style) {\n return;\n }\n parent.removeChild(style);\n}\n\nremoveStyle(getParent(), STYLE_ID);", 37244 "language": "javascript" 37245 } 37246 } 37247 ] 37248 }, 37249 { 37250 "id": "RL74415d40073e48d08479ab96399a9d01", 37251 "name": "Certain_Events:PLR", 37252 "events": [ 37253 { 37254 "modulePath": "core/src/lib/events/customCode.js", 37255 "settings": { 37256 "source": function(trigger) { 37257 document.addEventListener('RefdataLoaded', function (e) { 37258 trigger(); 37259}, false); 37260} 37261 }, 37262 "ruleOrder": 50.0 37263 }, 37264 { 37265 "modulePath": "core/src/lib/events/directCall.js", 37266 "settings": { 37267 "identifier": "captureVirtualPageLoad" 37268 }, 37269 "ruleOrder": 50.0 37270 }, 37271 { 37272 "modulePath": "core/src/lib/events/windowLoaded.js", 37273 "settings": {}, 37274 "ruleOrder": 50.0 37275 } 37276 ], 37277 "conditions": [ 37278 { 37279 "modulePath": "core/src/lib/conditions/valueComparison.js", 37280 "settings": { 37281 "comparison": { 37282 "operator": "doesNotEqual", 37283 "caseInsensitive": true 37284 }, 37285 "leftOperand": "%DisableAnalyticsCookie%", 37286 "rightOperand": "true" 37287 } 37288 }, 37289 { 37290 "modulePath": "core/src/lib/conditions/valueComparison.js", 37291 "settings": { 37292 "comparison": { 37293 "operator": "equals" 37294 }, 37295 "leftOperand": "%TEMPLATE:PI:PA:DL%", 37296 "rightOperand": "eventConfirm" 37297 } 37298 } 37299 ], 37300 "actions": [ 37301 { 37302 "modulePath": "core/src/lib/actions/customCode.js", 37303 "settings": { 37304 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC80dd9752c7854af88d685084575bbe15-source.js', 37305 "language": "javascript", 37306 "isExternal": true 37307 } 37308 } 37309 ] 37310 }, 37311 { 37312 "id": "RL74c40f30036b414a8fc7f63b54a515f1", 37313 "name": "FAQ_Question_Click:EBR", 37314 "events": [ 37315 { 37316 "modulePath": "core/src/lib/events/click.js", 37317 "settings": { 37318 "elementSelector": ".nicrc--accordion__item[data-an-faq-question-id]:not([data-aa-opened-question=true])", 37319 "bubbleFireIfParent": true, 37320 "bubbleFireIfChildFired": true 37321 }, 37322 "ruleOrder": 50.0 37323 } 37324 ], 37325 "conditions": [ 37326 { 37327 "modulePath": "core/src/lib/conditions/valueComparison.js", 37328 "settings": { 37329 "comparison": { 37330 "operator": "doesNotEqual", 37331 "caseInsensitive": true 37332 }, 37333 "leftOperand": "%DisableAnalyticsCookie%", 37334 "rightOperand": "true" 37335 } 37336 }, 37337 { 37338 "modulePath": "core/src/lib/conditions/valueComparison.js", 37339 "settings": { 37340 "comparison": { 37341 "operator": "doesNotEqual", 37342 "caseInsensitive": true 37343 }, 37344 "leftOperand": "%TRAFFICTYPE_META%", 37345 "rightOperand": "bot" 37346 } 37347 } 37348 ], 37349 "actions": [ 37350 { 37351 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 37352 "settings": { 37353 "customSetup": { 37354 "source": function(event, s) { 37355 // Making sure that only the 1st click triggers the call 37356event.element.setAttribute("data-aa-opened-question", true); 37357 37358let questionId = event.element.getAttribute("data-an-faq-question-id"); 37359NIAnalytics.setAndTrack("eVar159", questionId); 37360} 37361 }, 37362 "trackerProperties": { 37363 "eVars": [ 37364 { 37365 "name": "eVar1", 37366 "type": "value", 37367 "value": "%PAGE_NAME%" 37368 }, 37369 { 37370 "name": "eVar21", 37371 "type": "value", 37372 "value": "%PAGE_URL%" 37373 }, 37374 { 37375 "name": "eVar27", 37376 "type": "value", 37377 "value": "%CONTENTTYPE:METATAG%" 37378 } 37379 ], 37380 "props": [ 37381 { 37382 "name": "prop33", 37383 "type": "alias", 37384 "value": "eVar21" 37385 } 37386 ], 37387 "events": [ 37388 { 37389 "name": "event77" 37390 } 37391 ], 37392 "pageURL": "%PAGE_URL%" 37393 } 37394 } 37395 }, 37396 { 37397 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 37398 "settings": { 37399 "type": "link", 37400 "linkName": "aa-react-link", 37401 "linkType": "o" 37402 } 37403 }, 37404 { 37405 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 37406 "settings": {} 37407 } 37408 ] 37409 }, 37410 { 37411 "id": "RL74dc0922803341d4afab455aeb0c03be", 37412 "name": "Capture_Search_Filter:DCR", 37413 "events": [ 37414 { 37415 "modulePath": "core/src/lib/events/directCall.js", 37416 "settings": { 37417 "identifier": "captureSearchFilter" 37418 }, 37419 "ruleOrder": 50.0 37420 } 37421 ], 37422 "conditions": [ 37423 { 37424 "modulePath": "core/src/lib/conditions/valueComparison.js", 37425 "settings": { 37426 "comparison": { 37427 "operator": "doesNotEqual", 37428 "caseInsensitive": true 37429 }, 37430 "leftOperand": "%DisableAnalyticsCookie%", 37431 "rightOperand": "true" 37432 } 37433 }, 37434 { 37435 "modulePath": "core/src/lib/conditions/valueComparison.js", 37436 "settings": { 37437 "comparison": { 37438 "operator": "doesNotEqual", 37439 "caseInsensitive": true 37440 }, 37441 "leftOperand": "%TRAFFICTYPE_META%", 37442 "rightOperand": "bot" 37443 } 37444 } 37445 ], 37446 "actions": [ 37447 { 37448 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 37449 "settings": { 37450 "customSetup": { 37451 "source": function(event, s) { 37452 if (NIAnalytics.captureSearchFilterParam === "onsiteSearchScenario") { 37453 s.eVar65 = _satellite.getVar("ONSITESEARCHSCENARIO:OSI:OS:DL"); 37454 s.linkTrackVars+=",eVar65"; 37455} else { 37456 var searchFilter = _satellite.getVar("ONSITESEARCHSECONDARYFILTER:OSI:OS:DL"); 37457 if (searchFilter.indexOf("searchfilter:") === 0) { 37458 s.list3 = searchFilter; 37459 s.linkTrackVars+=",list3"; 37460 } else { 37461 s.eVar66 = searchFilter; 37462 s.linkTrackVars+=",eVar66"; 37463 } 37464} 37465 37466} 37467 }, 37468 "trackerProperties": { 37469 "eVars": [ 37470 { 37471 "name": "eVar1", 37472 "type": "value", 37473 "value": "%PAGE_NAME%" 37474 } 37475 ], 37476 "props": [ 37477 { 37478 "name": "prop23", 37479 "type": "value", 37480 "value": "%PAGE_NAME%" 37481 } 37482 ], 37483 "events": [ 37484 { 37485 "name": "event41" 37486 } 37487 ] 37488 } 37489 } 37490 }, 37491 { 37492 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 37493 "settings": { 37494 "type": "link", 37495 "linkName": "%ONSITESEARCHSECONDARYFILTERORSCENARIO%",
37496 "linkType": "o" 37497 } 37498 }, 37499 { 37500 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 37501 "settings": {} 37502 } 37503 ] 37504 }, 37505 { 37506 "id": "RL77c6ff54bacc4ed9b2d82fc635728623", 37507 "name": "Baidu_Conversion_Code:PLR", 37508 "events": [ 37509 { 37510 "modulePath": "core/src/lib/events/windowLoaded.js", 37511 "settings": {}, 37512 "ruleOrder": 50.0 37513 } 37514 ], 37515 "conditions": [ 37516 { 37517 "modulePath": "core/src/lib/conditions/valueComparison.js", 37518 "settings": { 37519 "comparison": { 37520 "operator": "isTrue" 37521 }, 37522 "leftOperand": "%OneTrust_Targeting_Consent%" 37523 } 37524 }, 37525 { 37526 "modulePath": "core/src/lib/conditions/valueComparison.js", 37527 "settings": { 37528 "comparison": { 37529 "operator": "doesNotEqual", 37530 "caseInsensitive": true 37531 }, 37532 "leftOperand": "%DisableAnalyticsCookie%", 37533 "rightOperand": "true" 37534 } 37535 }, 37536 { 37537 "modulePath": "core/src/lib/conditions/customCode.js", 37538 "settings": { 37539 "source": function(event, target) { 37540 var filter = [ 37541 "ohm.ni.com/advisors/pxi/pages/common/intro.xhtml", 37542 "ohm.ni.com/advisors/compactdaq/pages/common/intro.xhtml", 37543 "ohm.ni.com/advisors/crio/pages/common/intro.xhtml" 37544]; 37545 37546return ( (_satellite.getVar("CONTENTTYPE:METATAG") == "downloadconfirm" && _satellite.getVar("GENERIC_PAGENAME").indexOf("support:downloads:software:lv-nxg") > -1) || 37547 _satellite.getVar("CONTENTTYPE:METATAG") === "quote" || 37548 filter.indexOf(_satellite.getVar("PAGE_NAME")) > -1) || 37549 (_satellite.getVar("GUESTBOOK_CODE") !== "") || 37550 (_satellite.getVar("GOOGLE_SHOPPING_FILTER") == "true"); 37551} 37552 } 37553 }, 37554 { 37555 "modulePath": "core/src/lib/conditions/valueComparison.js", 37556 "settings": { 37557 "comparison": { 37558 "operator": "equals" 37559 }, 37560 "leftOperand": "%NICOM_PAGE%", 37561 "rightOperand": "true" 37562 } 37563 }, 37564 { 37565 "modulePath": "core/src/lib/conditions/valueComparison.js", 37566 "settings": { 37567 "comparison": { 37568 "operator": "doesNotEqual", 37569 "caseInsensitive": true 37570 }, 37571 "leftOperand": "%COUNTRY_METATAG%", 37572 "rightOperand": "CN" 37573 } 37574 } 37575 ], 37576 "actions": [ 37577 { 37578 "modulePath": "core/src/lib/actions/customCode.js", 37579 "settings": { 37580 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC762f921ff8f1492e9f0a1dd179f69f65-source.js', 37581 "language": "javascript", 37582 "isExternal": true 37583 } 37584 }, 37585 { 37586 "modulePath": "core/src/lib/actions/customCode.js", 37587 "settings": { 37588 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC4307289a74e442d6a551419f6be21510-source.js', 37589 "language": "javascript", 37590 "isExternal": true 37591 } 37592 } 37593 ] 37594 }, 37595 { 37596 "id": "RL783224f9377943d6be7f29b3ea0b9ccb", 37597 "name": "Merkle_OnDemandWebinar:EBR", 37598 "events": [ 37599 { 37600 "modulePath": "core/src/lib/events/customCode.js", 37601 "settings": { 37602 "source": function(trigger) { 37603 if (!Element.prototype.closest) { 37604 if (!Element.prototype.matches) { 37605 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 37606 } 37607 Element.prototype.closest = function (s) { 37608 var el = this; 37609 var ancestor = this; 37610 if (!document.documentElement.contains(el)) return null; 37611 do { 37612 if (ancestor.matches(s)) { 37613 return ancestor; 37614 } 37615 37616 if (typeof ancestor.parentElement !== "undefined") { 37617 ancestor = ancestor.parentElement; 37618 } else { 37619 ancestor = ancestor.parentNode; 37620 } 37621 } while (ancestor !== null && ancestor !== undefined); 37622 return null; 37623 }; 37624} 37625 37626 37627document.addEventListener("click", function (e) { 37628 37629 var targetUrl = ""; 37630 37631 if (e.target.tagName.toLowerCase() === "a" && e.target.hasAttribute("href")) { 37632 targetUrl = document.createElement("a"); 37633 targetUrl.href = e.target.href; 37634 } else { 37635 targetUrl = e.target.closest("a"); 37636 } 37637 37638 37639 if( targetUrl !== null) { 37640 var regex = new RegExp(/event.on24.com/gi); 37641 var result = regex.test(targetUrl.href); 37642 37643 if(result){ 37644 trigger(); 37645 } 37646 37647 if(targetUrl.href === "#" || targetUrl.href.slice(-1) === "#" ){ 37648 return false;
37649 } 37650 } 37651 37652}); 37653} 37654 }, 37655 "ruleOrder": 75.0 37656 } 37657 ], 37658 "conditions": [ 37659 { 37660 "modulePath": "core/src/lib/conditions/valueComparison.js", 37661 "settings": { 37662 "comparison": { 37663 "operator": "isTrue" 37664 }, 37665 "leftOperand": "%OneTrust_Targeting_Consent%" 37666 } 37667 }, 37668 { 37669 "modulePath": "core/src/lib/conditions/valueComparison.js", 37670 "settings": { 37671 "comparison": { 37672 "operator": "doesNotEqual", 37673 "caseInsensitive": true 37674 }, 37675 "leftOperand": "%DisableAnalyticsCookie%", 37676 "rightOperand": "true" 37677 } 37678 } 37679 ], 37680 "actions": [ 37681 { 37682 "modulePath": "core/src/lib/actions/customCode.js", 37683 "settings": { 37684 "global": false, 37685 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCa00d4938249c482e86bdd593298c9b33-source.js', 37686 "language": "javascript", 37687 "isExternal": true 37688 } 37689 }, 37690 { 37691 "modulePath": "core/src/lib/actions/customCode.js", 37692 "settings": { 37693 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC73d7f26a7f964e2d8ade5b905700bf74-source.js', 37694 "language": "javascript", 37695 "isExternal": true 37696 } 37697 } 37698 ] 37699 }, 37700 { 37701 "id": "RL795d099ff909457280f13a748158ce19", 37702 "name": "ProductConfigModalOpen:DCR", 37703 "events": [ 37704 { 37705 "modulePath": "core/src/lib/events/customEvent.js", 37706 "settings": { 37707 "type": "aa-product-configuration-modal", 37708 "bubbleFireIfParent": true, 37709 "bubbleFireIfChildFired": true 37710 }, 37711 "ruleOrder": 50.0 37712 } 37713 ], 37714 "conditions": [ 37715 { 37716 "modulePath": "core/src/lib/conditions/valueComparison.js", 37717 "settings": { 37718 "comparison": { 37719 "operator": "doesNotEqual", 37720 "caseInsensitive": true 37721 }, 37722 "leftOperand": "%DisableAnalyticsCookie%", 37723 "rightOperand": "true" 37724 } 37725 }, 37726 { 37727 "modulePath": "core/src/lib/conditions/valueComparison.js", 37728 "settings": { 37729 "comparison": { 37730 "operator": "doesNotEqual", 37731 "caseInsensitive": true 37732 }, 37733 "leftOperand": "%TRAFFICTYPE_META%", 37734 "rightOperand": "bot" 37735 } 37736 } 37737 ], 37738 "actions": [ 37739 { 37740 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 37741 "settings": { 37742 "customSetup": { 37743 "source": function(event, s) { 37744 NIAnalytics.setAndTrack(["eVar33", "prop23"], NIAnalytics.getDataElement("CONTENTTYPE:METATAG")+":Product Config Modal"); 37745} 37746 }, 37747 "trackerProperties": { 37748 "eVars": [ 37749 { 37750 "name": "eVar1", 37751 "type": "value", 37752 "value": "%PAGE_NAME%" 37753 }, 37754 { 37755 "name": "eVar12", 37756 "type": "value", 37757 "value": "%PROFILE_ID:COOKIE%" 37758 }, 37759 { 37760 "name": "eVar21", 37761 "type": "value", 37762 "value": "%PAGE_URL%" 37763 }, 37764 { 37765 "name": "eVar27", 37766 "type": "value", 37767 "value": "%CONTENTTYPE:METATAG%" 37768 } 37769 ], 37770 "props": [ 37771 { 37772 "name": "prop2", 37773 "type": "alias", 37774 "value": "eVar27" 37775 }, 37776 { 37777 "name": "prop33", 37778 "type": "alias", 37779 "value": "eVar21" 37780 } 37781 ], 37782 "events": [ 37783 { 37784 "name": "event30" 37785 } 37786 ] 37787 } 37788 } 37789 }, 37790 { 37791 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 37792 "settings": { 37793 "type": "link", 37794 "linkName": "Product Configuration Modal", 37795 "linkType": "o" 37796 } 37797 }, 37798 { 37799 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 37800 "settings": {} 37801 } 37802 ] 37803 }, 37804 { 37805 "id": "RL797378ad0a944dd38fc84b93e3a51a97", 37806 "name": "Baidu_Eloqua_landing:PLR", 37807 "events": [ 37808 { 37809 "modulePath": "core/src/lib/events/windowLoaded.js", 37810 "settings": {}, 37811 "ruleOrder": 50.0 37812 } 37813 ], 37814 "conditions": [ 37815 { 37816 "modulePath": "core/src/lib/conditions/valueComparison.js", 37817 "settings": { 37818 "comparison": { 37819 "operator": "isTrue" 37820 }, 37821 "leftOperand": "%OneTrust_Targeting_Consent%" 37822 } 37823 }, 37824 { 37825 "modulePath": "core/src/lib/conditions/valueComparison.js", 37826 "settings": { 37827 "comparison": { 37828 "operator": "doesNotEqual", 37829 "caseInsensitive": true 37830 }, 37831 "leftOperand": "%DisableAnalyticsCookie%", 37832 "rightOperand": "true" 37833 } 37834 }, 37835 { 37836 "modulePath": "core/src/lib/conditions/valueComparison.js", 37837 "settings": { 37838 "comparison": { 37839 "operator": "equals" 37840 }, 37841 "leftOperand": "%NICOM_PAGE%", 37842 "rightOperand": "true" 37843 } 37844 }, 37845 { 37846 "modulePath": "core/src/lib/conditions/valueComparison.js", 37847 "settings": { 37848 "comparison": { 37849 "operator": "matchesRegex", 37850 "caseInsensitive": true 37851 }, 37852 "leftOperand": "%DOMAIN%", 37853 "rightOperand": "campaigns.ni.com|landing.ni.com" 37854 } 37855 }, 37856 { 37857 "modulePath": "core/src/lib/conditions/customCode.js", 37858 "settings": { 37859 "source": function(event, target) { 37860 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 37861} 37862 } 37863 } 37864 ], 37865 "actions": [ 37866 { 37867 "modulePath": "core/src/lib/actions/customCode.js", 37868 "settings": { 37869 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCb4f57929fffd45aba1c265828db98e89-source.js', 37870 "language": "javascript", 37871 "isExternal": true 37872 } 37873 }, 37874 { 37875 "modulePath": "core/src/lib/actions/customCode.js", 37876 "settings": { 37877 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCb12d7bc932674fde9a925bd625f2c9ad-source.js', 37878 "language": "javascript", 37879 "isExternal": true 37880 } 37881 } 37882 ] 37883 }, 37884 { 37885 "id": "RL7a5f7c53bd9a4ce8b475890b6cc24d8d", 37886 "name": "Search_No_Result:PLR", 37887 "events": [ 37888 { 37889 "modulePath": "core/src/lib/events/windowLoaded.js", 37890 "settings": {}, 37891 "ruleOrder": 50.0 37892 }, 37893 { 37894 "modulePath": "core/src/lib/events/directCall.js", 37895 "settings": { 37896 "identifier": "captureVirtualPageLoad" 37897 }, 37898 "ruleOrder": 50.0 37899 } 37900 ], 37901 "conditions": [ 37902 { 37903 "modulePath": "core/src/lib/conditions/valueComparison.js", 37904 "settings": { 37905 "comparison": { 37906 "operator": "equals" 37907 }, 37908 "leftOperand": "%NI_SEARCHRESULTSCOUNT:METATAG%", 37909 "rightOperand": "0" 37910 } 37911 }, 37912 { 37913 "modulePath": "core/src/lib/conditions/valueComparison.js", 37914 "settings": { 37915 "comparison": { 37916 "operator": "equals" 37917 }, 37918 "leftOperand": "%NICOM_PAGE%", 37919 "rightOperand": "true" 37920 } 37921 }, 37922 { 37923 "modulePath": "core/src/lib/conditions/valueComparison.js", 37924 "settings": { 37925 "comparison": { 37926 "operator": "equals" 37927 }, 37928 "leftOperand": "%TEMPLATE:PI:PA:DL%", 37929 "rightOperand": "searchResults" 37930 } 37931 }, 37932 { 37933 "modulePath": "core/src/lib/conditions/valueComparison.js", 37934 "settings": { 37935 "comparison": { 37936 "operator": "doesNotEqual", 37937 "caseInsensitive": true 37938 }, 37939 "leftOperand": "%DisableAnalyticsCookie%", 37940 "rightOperand": "true" 37941 } 37942 } 37943 ], 37944 "actions": [ 37945 { 37946 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 37947 "settings": { 37948 "trackerProperties": { 37949 "events": [ 37950 { 37951 "name": "event2" 37952 } 37953 ] 37954 } 37955 } 37956 } 37957 ] 37958 }, 37959 { 37960 "id": "RL7b30cc5c9c1a461191c6796f8eaeee0a", 37961 "name": "Google_Search_tag:PLR", 37962 "events": [ 37963 { 37964 "modulePath": "core/src/lib/events/libraryLoaded.js", 37965 "settings": {}, 37966 "ruleOrder": 50.0 37967 } 37968 ], 37969 "conditions": [ 37970 { 37971 "modulePath": "core/src/lib/conditions/valueComparison.js", 37972 "settings": { 37973 "comparison": { 37974 "operator": "equals", 37975 "caseInsensitive": true 37976 }, 37977 "leftOperand": "%PAGE_NAME%", 37978 "rightOperand": "homepage" 37979 } 37980 }, 37981 { 37982 "modulePath": "core/src/lib/conditions/valueComparison.js", 37983 "settings": { 37984 "comparison": { 37985 "operator": "equals", 37986 "caseInsensitive": true 37987 }, 37988 "leftOperand": "%CONTENTTYPE:METATAG%", 37989 "rightOperand": "homepage" 37990 } 37991 }, 37992 { 37993 "modulePath": "core/src/lib/conditions/valueComparison.js", 37994 "settings": { 37995 "comparison": { 37996 "operator": "equals", 37997 "caseInsensitive": true 37998 }, 37999 "leftOperand": "%SECTION:METATAG%", 38000 "rightOperand": "homepage" 38001 } 38002 }, 38003 { 38004 "modulePath": "core/src/lib/conditions/valueComparison.js", 38005 "settings": { 38006 "comparison": { 38007 "operator": "doesNotEqual", 38008 "caseInsensitive": true 38009 }, 38010 "leftOperand": "%DisableAnalyticsCookie%", 38011 "rightOperand": "true" 38012 } 38013 } 38014 ], 38015 "actions": [ 38016 { 38017 "modulePath": "core/src/lib/actions/customCode.js", 38018 "settings": { 38019 "source": "var script = document.createElement(\"script\");\nscript.type=\"application/ld+json\";\nscript.innerHTML = `{\n \"@context\": \"https://schema.org\",\n \"@type\": \"WebSite\",\n \"url\": \"https://www.ni.com/\",\n \"potentialAction\": {\n \"@type\": \"SearchAction\",\n \"target\": {\n \"@type\": \"EntryPoint\",\n \"urlTemplate\": \" https://www.ni.com/en/search.html?q={search_term_string}\"\n },\n \"query-input\": \"required name=search_term_string\"\n }\n}`;
38019\n\ndocument.head.appendChild(script);", 38020 "language": "javascript" 38021 } 38022 } 38023 ] 38024 }, 38025 { 38026 "id": "RL7b3519d7eef948fb82dc17d934276af8", 38027 "name": "Edit_Quote_CTA_Click:EBR", 38028 "events": [ 38029 { 38030 "modulePath": "core/src/lib/events/click.js", 38031 "settings": { 38032 "bubbleFireIfParent": true, 38033 "bubbleFireIfChildFired": false 38034 }, 38035 "ruleOrder": 50.0 38036 } 38037 ], 38038 "conditions": [ 38039 { 38040 "modulePath": "core/src/lib/conditions/valueComparison.js", 38041 "settings": { 38042 "comparison": { 38043 "operator": "doesNotEqual", 38044 "caseInsensitive": true 38045 }, 38046 "leftOperand": "%DisableAnalyticsCookie%", 38047 "rightOperand": "true" 38048 } 38049 }, 38050 { 38051 "modulePath": "core/src/lib/conditions/valueComparison.js", 38052 "settings": { 38053 "comparison": { 38054 "operator": "doesNotEqual", 38055 "caseInsensitive": true 38056 }, 38057 "leftOperand": "%TRAFFICTYPE_META%", 38058 "rightOperand": "bot" 38059 } 38060 }, 38061 { 38062 "modulePath": "core/src/lib/conditions/customCode.js", 38063 "settings": { 38064 "source": function(event, target) { 38065 _satellite.logger.log(event); 38066return false /*event.parentElement.classList.contains( 'quote_search_action_buttons' ) && (event.target.classList.contains("qs_cancel_button") || event.target.classList.contains("qs_search_button"))*/; 38067} 38068 } 38069 } 38070 ], 38071 "actions": [ 38072 { 38073 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 38074 "settings": { 38075 "customSetup": { 38076 "source": function(event, s) { 38077 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.target.attributes.hasOwnProperty("data-an-cta-label") ? "edit quote confirmation:"+event.target.attributes['data-an-cta-label'].value : "edit quote confirmation:"+event.target.innerText); 38078} 38079 }, 38080 "trackerProperties": { 38081 "eVars": [ 38082 { 38083 "name": "eVar1", 38084 "type": "value", 38085 "value": "%PAGE_NAME%" 38086 }, 38087 { 38088 "name": "eVar12", 38089 "type": "value", 38090 "value": "%PROFILE_ID:COOKIE%" 38091 }, 38092 { 38093 "name": "eVar21", 38094 "type": "value", 38095 "value": "%PAGE_URL%" 38096 }, 38097 { 38098 "name": "eVar27", 38099 "type": "value", 38100 "value": "%CONTENTTYPE:METATAG%" 38101 } 38102 ], 38103 "props": [ 38104 { 38105 "name": "prop2", 38106 "type": "alias", 38107 "value": "eVar27" 38108 }, 38109 { 38110 "name": "prop33", 38111 "type": "alias", 38112 "value": "eVar21" 38113 } 38114 ], 38115 "events": [ 38116 { 38117 "name": "event30" 38118 } 38119 ] 38120 } 38121 } 38122 }, 38123 { 38124 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 38125 "settings": { 38126 "type": "link", 38127 "linkName": "aa-react-link", 38128 "linkType": "o" 38129 } 38130 }, 38131 { 38132 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 38133 "settings": {} 38134 } 38135 ] 38136 }, 38137 { 38138 "id": "RL7c34db9f6005409786a301ccf30de11e", 38139 "name": "FontAwesome:PLR", 38140 "events": [ 38141 { 38142 "modulePath": "core/src/lib/events/windowLoaded.js", 38143 "settings": {}, 38144 "ruleOrder": 50.0 38145 } 38146 ], 38147 "conditions": [ 38148 { 38149 "modulePath": "core/src/lib/conditions/customCode.js", 38150 "settings": { 38151 "source": function(event, target) { 38152 function hasFontAwesome() { 38153 // Check for Font Awesome CSS in <link> tags 38154 const linkFound = Array.from(document.querySelectorAll('link[rel="stylesheet"]')) 38155 .some(link => /fontawesome|font-awesome/i.test(link.href)); 38156 38157 // Check for Font Awesome JS in <script> tags 38158 const scriptFound = Array.from(document.querySelectorAll('script')) 38159 .some(script => /fontawesome|font-awesome/i.test(script.src)); 38160 38161 return linkFound || scriptFound; 38162} 38163 38164return hasFontAwesome(); 38165} 38166 } 38167 } 38168 ], 38169 "actions": [ 38170 { 38171 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 38172 "settings": { 38173 "customSetup": { 38174 "source": function(event, s) { 38175 38176/** 38177 * Returns the first Font Awesome reference URL found on the page (CSS or JS). 38178 * Checks <link>, <script>, and CSS @import rules. Returns null if none found. 38179 */ 38180function getFirstFontAwesomeReference() { 38181 const patterns = [ 38182 /fontawesome|font-awesome/i, // generic match 38183 /use\.fontawesome\.com/i, // kit URLs 38184 /kit\.fontawesome\.com/i, // kit script URLs 38185 /pro\.fontawesome\.com/i, // Pro CDN 38186 /cdnjs.*font[-]?awesome/i, // cdnjs 38187 /cdn\.jsdelivr\.net.*font[-]?awesome/i, // jsDelivr 38188 /unpkg\.com.*@fortawesome/i, // unpkg/npm 38189 /githubusercontent\.com.*font[-]?awesome/i, // raw GitHub CDN 38190 ]; 38191 38192 const matchesFA = (url) => { 38193 if (!url) return false;
38194 try { 38195 const resolved = new URL(url, document.baseURI).href; // resolve relative 38196 return patterns.some((re) => re.test(resolved)); 38197 } catch { 38198 return patterns.some((re) => re.test(String(url))); 38199 } 38200 }; 38201 38202 // 1) Check <link rel="stylesheet"> 38203 for (const link of document.querySelectorAll('link[rel~="stylesheet"]')) { 38204 if (matchesFA(link.href)) return link.href; 38205 } 38206 38207 // 2) Check <script src> 38208 for (const script of document.querySelectorAll('script[src]')) { 38209 if (matchesFA(script.src)) return script.src; 38210 } 38211 38212 // 3) Check CSS @import rules via CSSOM 38213 for (const sheet of Array.from(document.styleSheets)) { 38214 let rules; 38215 try { 38216 rules = sheet.cssRules; 38217 } catch { 38218 // Cross-origin stylesheet without CORS; skip 38219 continue; 38220 } 38221 if (!rules) continue; 38222 38223 for (const rule of Array.from(rules)) { 38224 // CSSImportRule 38225 if (rule.href && matchesFA(rule.href)) return rule.href; 38226 38227 // Inline @import parsing fallback 38228 if (rule.cssText) { 38229 const m = rule.cssText.match(/@import\s+url\(['"]?([^'")]+)['"]?\)/i); 38230 if (m && matchesFA(m[1])) return m[1]; 38231 } 38232 } 38233 } 38234 38235 return null; 38236} 38237 38238const firstFA = getFirstFontAwesomeReference(); 38239NIAnalytics.setAndTrack("eVar156", firstFA); 38240 38241} 38242 }, 38243 "trackerProperties": { 38244 "eVars": [ 38245 { 38246 "name": "eVar1", 38247 "type": "value", 38248 "value": "%PAGE_NAME%" 38249 }, 38250 { 38251 "name": "eVar21", 38252 "type": "value", 38253 "value": "%PAGE_URL%" 38254 } 38255 ], 38256 "props": [ 38257 { 38258 "name": "prop33", 38259 "type": "alias", 38260 "value": "eVar21" 38261 } 38262 ] 38263 } 38264 } 38265 }, 38266 { 38267 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 38268 "settings": { 38269 "type": "link", 38270 "linkName": "FA Reference", 38271 "linkType": "o" 38272 } 38273 }, 38274 { 38275 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 38276 "settings": {} 38277 } 38278 ] 38279 }, 38280 { 38281 "id": "RL7e4ffb086d2d4eae9a06753297a62e88", 38282 "name": "SWPDP_Image_Click:EBR", 38283 "events": [ 38284 { 38285 "modulePath": "core/src/lib/events/click.js", 38286 "settings": { 38287 "elementSelector": ".aa-swpdp-image *", 38288 "bubbleFireIfParent": true, 38289 "bubbleFireIfChildFired": false 38290 }, 38291 "ruleOrder": 50.0 38292 } 38293 ], 38294 "conditions": [ 38295 { 38296 "modulePath": "core/src/lib/conditions/valueComparison.js", 38297 "settings": { 38298 "comparison": { 38299 "operator": "doesNotEqual", 38300 "caseInsensitive": true 38301 }, 38302 "leftOperand": "%DisableAnalyticsCookie%", 38303 "rightOperand": "true" 38304 } 38305 }, 38306 { 38307 "modulePath": "core/src/lib/conditions/valueComparison.js", 38308 "settings": { 38309 "comparison": { 38310 "operator": "doesNotEqual", 38311 "caseInsensitive": true 38312 }, 38313 "leftOperand": "%TRAFFICTYPE_META%", 38314 "rightOperand": "bot" 38315 } 38316 } 38317 ], 38318 "actions": [ 38319 { 38320 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 38321 "settings": { 38322 "customSetup": { 38323 "source": function(event, s) { 38324 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:Image "+window?.location?.hash?.replace("#","")); 38325} 38326 }, 38327 "trackerProperties": { 38328 "eVars": [ 38329 { 38330 "name": "eVar1", 38331 "type": "value", 38332 "value": "%PAGE_NAME%" 38333 }, 38334 { 38335 "name": "eVar12", 38336 "type": "value", 38337 "value": "%PROFILE_ID:COOKIE%" 38338 }, 38339 { 38340 "name": "eVar21", 38341 "type": "value", 38342 "value": "%PAGE_URL%" 38343 }, 38344 { 38345 "name": "eVar27", 38346 "type": "value", 38347 "value": "%CONTENTTYPE:METATAG%" 38348 } 38349 ], 38350 "props": [ 38351 { 38352 "name": "prop2", 38353 "type": "alias", 38354 "value": "eVar27" 38355 }, 38356 { 38357 "name": "prop33", 38358 "type": "alias", 38359 "value": "eVar21" 38360 } 38361 ], 38362 "events": [ 38363 { 38364 "name": "event30" 38365 } 38366 ] 38367 } 38368 } 38369 }, 38370 { 38371 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 38372 "settings": { 38373 "type": "link", 38374 "linkName": "SW PLP", 38375 "linkType": "o" 38376 } 38377 }, 38378 { 38379 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 38380 "settings": {} 38381 } 38382 ] 38383 }, 38384 { 38385 "id": "RL8102d1c0bdfc4e89b714b9ab15f24c6d", 38386 "name": "DRIFT:PLR", 38387 "events": [ 38388 { 38389 "modulePath": "core/src/lib/events/libraryLoaded.js", 38390 "settings": {}, 38391 "ruleOrder": 50.0 38392 }, 38393 { 38394 "modulePath": "core/src/lib/events/customEvent.js", 38395 "settings": { 38396 "type": "next-navigation", 38397 "bubbleFireIfParent": true, 38398 "bubbleFireIfChildFired": true 38399 }, 38400 "ruleOrder": 50.0 38401 } 38402 ], 38403 "conditions": [ 38404 { 38405 "modulePath": "core/src/lib/conditions/customCode.js", 38406 "settings": { 38407 "source": function(event, target) { 38408 if(sessionStorage.getItem("blockedLaunchRules") === null) { 38409 return true; 38410}else{ 38411 var r = JSON.parse(sessionStorage.getItem("blockedLaunchRules")); 38412 return !r.includes("Drift"); 38413} 38414} 38415 } 38416 }, 38417 { 38418 "modulePath": "core/src/lib/conditions/customCode.js", 38419 "settings": { 38420 "source": function(event, target) { 38421 const regex = /^https:\/\/((www|www-(dev2?|test2?))\.ni\.com\/(myni\/.*|my\/s\/.*|[a-z]{2}(-[a-z]{2})?\/myni\/[^\/]+\.html)|identity(-(dev2?|test2?))?\.ni\.com\/myni\/profile(\/.*)?)$/; 38422return regex.test(window.location.href); 38423} 38424 } 38425 } 38426 ], 38427 "actions": [ 38428 { 38429 "modulePath": "core/src/lib/actions/customCode.js", 38430 "settings": { 38431 "source": "<!-- Start of Async Drift Code -->\n\n<script>\n \"use strict\";
38431 \n !function() {\n var t = window.driftt = window.drift = window.driftt || [];\n if (!t.init) {\n if (t.invoked) return void (window.console && console.error && console.error(\"Drift snippet included twice.\"));\n t.invoked = !0, t.methods = [ \"identify\", \"config\", \"track\", \"reset\", \"debug\", \"show\", \"ping\", \"page\", \"hide\", \"off\", \"on\" ],\n t.factory = function(e) {\n return function() {\n var n = Array.prototype.slice.call(arguments);\n return n.unshift(e), t.push(n), t;\n };\n }, t.methods.forEach(function(e) {\n t[e] = t.factory(e);\n }), t.load = function(t) {\n var e = 3e5, n = Math.ceil(new Date() / e) * e, o = document.createElement(\"script\");\n o.type = \"text/javascript\", o.async = !0, o.crossorigin = \"anonymous\", o.src = \"https://js.driftt.com/include/\" + n + \"/\" + t + \".js\";\n var i = document.getElementsByTagName(\"script\")[0];\n i.parentNode.insertBefore(o, i);\n };\n }\n }();\n drift.SNIPPET_VERSION = '0.3.1';\n \n function getDriftLocale(){\n var originalAnalyticsLocaleCookie = NIAnalytics.getDataElement(\"LOCALE:COOKIE\");\n var twoLetterLocale = originalAnalyticsLocaleCookie.split(\"-\")[0];\n var driftLocale = \"en\";\n\n switch (twoLetterLocale.toLowerCase()) {\n case \"de\":\n case \"es\":\n case \"fr\":\n case \"ko\":\n case \"zh\":\n driftLocale = twoLetterLocale.toLowerCase();\n break;\n case \"ja\":\n driftLocale = \"ja-JP\";\n break;\n default:\n driftLocale = \"en\";\n }\n return driftLocale;\n }\n\n drift.config({\n locale: getDriftLocale()\n });\n \n drift.load('fm4fbdf7nvk9');\n </script>\n <!-- End of Async Drift Code -->\n\n<!-- Custom Drift code -->\n<script src=\"https://www.ni.com/javascript/drift_analytics_events.js\"></script>\n", 38432 "language": "html" 38433 } 38434 }, 38435 { 38436 "modulePath": "core/src/lib/actions/customCode.js", 38437 "settings": { 38438 "source": "if(sessionStorage.getItem(\"Analytics3rdPartyDebug\") !== null || document.cookie.indexOf('Analytics3rdPartyDebug') > -1){\n NIAnalytics.ruleLogger(\"DRIFT:PLR\");\n}", 38439 "language": "javascript" 38440 } 38441 } 38442 ] 38443 }, 38444 { 38445 "id": "RL82074fce2adf4482a89d20be79a45ba6", 38446 "name": "Merkle_ContentShare:EBR", 38447 "events": [ 38448 { 38449 "modulePath": "core/src/lib/events/customCode.js", 38450 "settings": { 38451 "source": function(trigger) { 38452 if (!Element.prototype.closest) { 38453 if (!Element.prototype.matches) { 38454 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 38455 } 38456 Element.prototype.closest = function (s) { 38457 var el = this; 38458 var ancestor = this; 38459 if (!document.documentElement.contains(el)) return null; 38460 do { 38461 if (ancestor.matches(s)) { 38462 return ancestor; 38463 } 38464 38465 if (typeof ancestor.parentElement !== "undefined") { 38466 ancestor = ancestor.parentElement; 38467 } else { 38468 ancestor = ancestor.parentNode; 38469 } 38470 } while (ancestor !== null && ancestor !== undefined); 38471 return null; 38472 }; 38473} 38474 38475 38476 38477 38478 38479document.addEventListener("click", function (e) { 38480 38481 var targetUrl = ""; 38482 38483 if (e.target.tagName.toLowerCase() === "a" && e.target.hasAttribute("href")) { 38484 targetUrl = document.createElement("a"); 38485 targetUrl.href = e.target.href; 38486 } else { 38487 targetUrl = e.target.closest("a"); 38488 } 38489 38490 if( targetUrl !== null) { 38491 var regex = new RegExp(/https:\/\/www\.facebook\.com\/sharer\/sharer\.php|https:\/\/www\.linkedin\.com\/sharing\/share-offsite\/|https:\/\/twitter\.com\/intent\/tweet|mailto:/gi); 38492 var result = regex.test(targetUrl.href); 38493 38494 if(result){ 38495 trigger(); 38496 } 38497 38498 if(targetUrl.href === "#" || targetUrl.href.slice(-1) === "#" ){ 38499 return false;
38500 } 38501 } 38502 38503}); 38504 38505} 38506 }, 38507 "ruleOrder": 50.0 38508 } 38509 ], 38510 "conditions": [ 38511 { 38512 "modulePath": "core/src/lib/conditions/valueComparison.js", 38513 "settings": { 38514 "comparison": { 38515 "operator": "isTrue" 38516 }, 38517 "leftOperand": "%OneTrust_Targeting_Consent%" 38518 } 38519 }, 38520 { 38521 "modulePath": "core/src/lib/conditions/valueComparison.js", 38522 "settings": { 38523 "comparison": { 38524 "operator": "doesNotEqual", 38525 "caseInsensitive": true 38526 }, 38527 "leftOperand": "%DisableAnalyticsCookie%", 38528 "rightOperand": "true" 38529 } 38530 } 38531 ], 38532 "actions": [ 38533 { 38534 "modulePath": "core/src/lib/actions/customCode.js", 38535 "settings": { 38536 "global": false, 38537 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCf8d3ccf259984408855800e287deb497-source.js', 38538 "language": "javascript", 38539 "isExternal": true 38540 } 38541 }, 38542 { 38543 "modulePath": "core/src/lib/actions/customCode.js", 38544 "settings": { 38545 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC77005fca5b7041e48e10ac076d7cb7c5-source.js', 38546 "language": "javascript", 38547 "isExternal": true 38548 } 38549 } 38550 ] 38551 }, 38552 { 38553 "id": "RL8333dd42d4e24a49a4a5ebd73c691332", 38554 "name": "Cart&Checkout_Continue_Shopping:PLR", 38555 "events": [ 38556 { 38557 "modulePath": "core/src/lib/events/windowLoaded.js", 38558 "settings": {}, 38559 "ruleOrder": 50.0 38560 }, 38561 { 38562 "modulePath": "core/src/lib/events/directCall.js", 38563 "settings": { 38564 "identifier": "captureVirtualPageLoad" 38565 }, 38566 "ruleOrder": 1.0 38567 } 38568 ], 38569 "conditions": [ 38570 { 38571 "modulePath": "core/src/lib/conditions/valueComparison.js", 38572 "settings": { 38573 "comparison": { 38574 "operator": "equals", 38575 "caseInsensitive": true 38576 }, 38577 "leftOperand": "%TEMPLATE:PI:PA:DL%", 38578 "rightOperand": "continueshopping" 38579 } 38580 }, 38581 { 38582 "modulePath": "core/src/lib/conditions/valueComparison.js", 38583 "settings": { 38584 "comparison": { 38585 "operator": "doesNotEqual", 38586 "caseInsensitive": true 38587 }, 38588 "leftOperand": "%DisableAnalyticsCookie%", 38589 "rightOperand": "true" 38590 } 38591 } 38592 ], 38593 "actions": [ 38594 { 38595 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 38596 "settings": { 38597 "customSetup": { 38598 "source": function(event, s) { 38599 s.list1=_satellite.getVar("PRODUCTCATEGORIES:METATAG"); 38600} 38601 }, 38602 "trackerProperties": { 38603 "eVars": [ 38604 { 38605 "name": "eVar1", 38606 "type": "value", 38607 "value": "%PAGE_NAME%" 38608 }, 38609 { 38610 "name": "eVar56", 38611 "type": "value", 38612 "value": "%DETAILED_PAGENAME%" 38613 }, 38614 { 38615 "name": "eVar101", 38616 "type": "value", 38617 "value": "%HASHED_EMAIL:USER:DL%" 38618 } 38619 ], 38620 "events": [ 38621 { 38622 "name": "event56" 38623 } 38624 ] 38625 } 38626 } 38627 } 38628 ] 38629 }, 38630 { 38631 "id": "RL83599703395642d398bda4fc975dc936", 38632 "name": "Wrapper_Header_v3:Click:EBR", 38633 "events": [ 38634 { 38635 "modulePath": "core/src/lib/events/click.js", 38636 "settings": { 38637 "elementSelector": ".aa-mm-top-level", 38638 "bubbleFireIfParent": true, 38639 "bubbleFireIfChildFired": true 38640 }, 38641 "ruleOrder": 50.0 38642 }, 38643 { 38644 "modulePath": "core/src/lib/events/click.js", 38645 "settings": { 38646 "elementSelector": ".aa-mm-level1", 38647 "bubbleFireIfParent": true, 38648 "bubbleFireIfChildFired": true 38649 }, 38650 "ruleOrder": 50.0 38651 }, 38652 { 38653 "modulePath": "core/src/lib/events/click.js", 38654 "settings": { 38655 "elementSelector": ".aa-mm-level2", 38656 "bubbleFireIfParent": true, 38657 "bubbleFireIfChildFired": true 38658 }, 38659 "ruleOrder": 50.0 38660 } 38661 ], 38662 "conditions": [ 38663 { 38664 "modulePath": "core/src/lib/conditions/valueComparison.js", 38665 "settings": { 38666 "comparison": { 38667 "operator": "doesNotEqual", 38668 "caseInsensitive": true 38669 }, 38670 "leftOperand": "%DisableAnalyticsCookie%", 38671 "rightOperand": "true" 38672 } 38673 }, 38674 { 38675 "modulePath": "core/src/lib/conditions/valueComparison.js", 38676 "settings": { 38677 "comparison": { 38678 "operator": "doesNotEqual", 38679 "caseInsensitive": true 38680 }, 38681 "leftOperand": "%TRAFFICTYPE_META%", 38682 "rightOperand": "bot" 38683 } 38684 } 38685 ], 38686 "actions": [ 38687 { 38688 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 38689 "settings": { 38690 "customSetup": { 38691 "source": function(event, s) { 38692 if(event.target.classList.contains("aa-mm-level1") || event.target.classList.contains("aa-mm-level2")){ 38693 NIAnalytics.setAndTrack(["eVar33", "prop23"], "header:"+document.querySelector(".ni-wrapper-mega-dropdown-open>a").innerText+":"+event.target.href); 38694} else{ 38695 NIAnalytics.setAndTrack(["eVar33", "prop23"], "header:"+event.target.innerText); 38696} 38697} 38698 }, 38699 "trackerProperties": { 38700 "eVars": [ 38701 { 38702 "name": "eVar1", 38703 "type": "value", 38704 "value": "%PAGE_NAME%" 38705 }, 38706 { 38707 "name": "eVar12", 38708 "type": "value", 38709 "value": "%PROFILE_ID:COOKIE%" 38710 }, 38711 { 38712 "name": "eVar21", 38713 "type": "value", 38714 "value": "%PAGE_URL%" 38715 }, 38716 { 38717 "name": "eVar27", 38718 "type": "value", 38719 "value": "%CONTENTTYPE:METATAG%" 38720 } 38721 ], 38722 "props": [ 38723 { 38724 "name": "prop2", 38725 "type": "alias", 38726 "value": "eVar27" 38727 }, 38728 { 38729 "name": "prop33", 38730 "type": "alias", 38731 "value": "eVar21" 38732 } 38733 ], 38734 "events": [ 38735 { 38736 "name": "event30" 38737 } 38738 ] 38739 } 38740 } 38741 }, 38742 { 38743 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 38744 "settings": { 38745 "type": "link", 38746 "linkName": "Mega Menu Clicks", 38747 "linkType": "o" 38748 } 38749 }, 38750 { 38751 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 38752 "settings": {} 38753 } 38754 ] 38755 }, 38756 { 38757 "id": "RL8520cb2bb71448e39879948cf3093f01", 38758 "name": "Target_GB_MBOX:EBR", 38759 "events": [ 38760 { 38761 "modulePath": "core/src/lib/events/click.js", 38762 "settings": { 38763 "anchorDelay": 500, 38764 "elementSelector": "a.ni-btn:not(.analytics-disabled)", 38765 "bubbleFireIfParent": true, 38766 "bubbleFireIfChildFired": true 38767 }, 38768 "ruleOrder": 50.0 38769 }, 38770 { 38771 "modulePath": "core/src/lib/events/click.js", 38772 "settings": { 38773 "anchorDelay": 500, 38774 "elementSelector": "a.ni-content-center:not(.analytics-disabled)", 38775 "bubbleFireIfParent": true, 38776 "bubbleFireIfChildFired": true 38777 }, 38778 "ruleOrder": 50.0 38779 } 38780 ], 38781 "conditions": [ 38782 { 38783 "modulePath": "core/src/lib/conditions/customCode.js", 38784 "settings": { 38785 "source": function(event, target) { 38786 var regexp = new RegExp("http?(s)://lumen?(.+)\.ni\.com\/nicif\/?(.+)", 'i'); 38787var gbCodes = ["GB_EVALLVUSER", "GB_EVALLVNXG"]; 38788var appcodeField = document.querySelector("input[type=hidden][name=recovery_appcode]"); 38789 38790if(regexp.test(window.location.href)){ 38791 return (appcodeField && gbCodes.indexOf(appcodeField.value) > -1 && document.querySelector(".guestbook-questions select") !== null && document.querySelector(".guestbook-questions select").selectedIndex > 0); 38792} 38793return false;
38794} 38795 } 38796 }, 38797 { 38798 "modulePath": "core/src/lib/conditions/valueComparison.js", 38799 "settings": { 38800 "comparison": { 38801 "operator": "doesNotEqual", 38802 "caseInsensitive": true 38803 }, 38804 "leftOperand": "%DisableAnalyticsCookie%", 38805 "rightOperand": "true" 38806 } 38807 } 38808 ], 38809 "actions": [ 38810 { 38811 "modulePath": "core/src/lib/actions/customCode.js", 38812 "settings": { 38813 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCd31a4e7ced4544038568e1cb95e497a2-source.js', 38814 "language": "javascript", 38815 "isExternal": true 38816 } 38817 } 38818 ] 38819 }, 38820 { 38821 "id": "RL883207debfb84b23a98abba9fd456386", 38822 "name": "SWPDP_Bill_Type_Click:EBR", 38823 "events": [ 38824 { 38825 "modulePath": "core/src/lib/events/click.js", 38826 "settings": { 38827 "elementSelector": ".subscription-billing-cycle button", 38828 "bubbleFireIfParent": true, 38829 "bubbleFireIfChildFired": false 38830 }, 38831 "ruleOrder": 50.0 38832 } 38833 ], 38834 "conditions": [ 38835 { 38836 "modulePath": "core/src/lib/conditions/valueComparison.js", 38837 "settings": { 38838 "comparison": { 38839 "operator": "doesNotEqual", 38840 "caseInsensitive": true 38841 }, 38842 "leftOperand": "%DisableAnalyticsCookie%", 38843 "rightOperand": "true" 38844 } 38845 }, 38846 { 38847 "modulePath": "core/src/lib/conditions/valueComparison.js", 38848 "settings": { 38849 "comparison": { 38850 "operator": "doesNotEqual", 38851 "caseInsensitive": true 38852 }, 38853 "leftOperand": "%TRAFFICTYPE_META%", 38854 "rightOperand": "bot" 38855 } 38856 } 38857 ], 38858 "actions": [ 38859 { 38860 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 38861 "settings": { 38862 "customSetup": { 38863 "source": function(event, s) { 38864 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:"+event.target.innerText); 38865} 38866 }, 38867 "trackerProperties": { 38868 "eVars": [ 38869 { 38870 "name": "eVar1", 38871 "type": "value", 38872 "value": "%PAGE_NAME%" 38873 }, 38874 { 38875 "name": "eVar12", 38876 "type": "value", 38877 "value": "%PROFILE_ID:COOKIE%" 38878 }, 38879 { 38880 "name": "eVar21", 38881 "type": "value", 38882 "value": "%PAGE_URL%" 38883 }, 38884 { 38885 "name": "eVar27", 38886 "type": "value", 38887 "value": "%CONTENTTYPE:METATAG%" 38888 } 38889 ], 38890 "props": [ 38891 { 38892 "name": "prop2", 38893 "type": "alias", 38894 "value": "eVar27" 38895 }, 38896 { 38897 "name": "prop33", 38898 "type": "alias", 38899 "value": "eVar21" 38900 } 38901 ], 38902 "events": [ 38903 { 38904 "name": "event30" 38905 } 38906 ] 38907 } 38908 } 38909 }, 38910 { 38911 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 38912 "settings": { 38913 "type": "link", 38914 "linkName": "SW PLP", 38915 "linkType": "o" 38916 } 38917 }, 38918 { 38919 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 38920 "settings": {} 38921 } 38922 ] 38923 }, 38924 { 38925 "id": "RL88a3a1a150504bbaab240dee8efca132", 38926 "name": "SWPDP_Recommended_Courses-Details_Click:EBR", 38927 "events": [ 38928 { 38929 "modulePath": "core/src/lib/events/click.js", 38930 "settings": { 38931 "elementSelector": ".aa-swpdp-course-learn", 38932 "bubbleFireIfParent": true, 38933 "bubbleFireIfChildFired": false 38934 }, 38935 "ruleOrder": 50.0 38936 } 38937 ], 38938 "conditions": [ 38939 { 38940 "modulePath": "core/src/lib/conditions/valueComparison.js", 38941 "settings": { 38942 "comparison": { 38943 "operator": "doesNotEqual", 38944 "caseInsensitive": true 38945 }, 38946 "leftOperand": "%DisableAnalyticsCookie%", 38947 "rightOperand": "true" 38948 } 38949 }, 38950 { 38951 "modulePath": "core/src/lib/conditions/valueComparison.js", 38952 "settings": { 38953 "comparison": { 38954 "operator": "doesNotEqual", 38955 "caseInsensitive": true 38956 }, 38957 "leftOperand": "%TRAFFICTYPE_META%", 38958 "rightOperand": "bot" 38959 } 38960 } 38961 ], 38962 "actions": [ 38963 { 38964 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 38965 "settings": { 38966 "customSetup": { 38967 "source": function(event, s) { 38968 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:course details "+event.target.innerText); 38969} 38970 }, 38971 "trackerProperties": { 38972 "eVars": [ 38973 { 38974 "name": "eVar1", 38975 "type": "value", 38976 "value": "%PAGE_NAME%" 38977 }, 38978 { 38979 "name": "eVar12", 38980 "type": "value", 38981 "value": "%PROFILE_ID:COOKIE%" 38982 }, 38983 { 38984 "name": "eVar21", 38985 "type": "value", 38986 "value": "%PAGE_URL%" 38987 }, 38988 { 38989 "name": "eVar27", 38990 "type": "value", 38991 "value": "%CONTENTTYPE:METATAG%" 38992 } 38993 ], 38994 "props": [ 38995 { 38996 "name": "prop2", 38997 "type": "alias", 38998 "value": "eVar27" 38999 }, 39000 { 39001 "name": "prop33", 39002 "type": "alias", 39003 "value": "eVar21" 39004 } 39005 ], 39006 "events": [ 39007 { 39008 "name": "event30" 39009 } 39010 ] 39011 } 39012 } 39013 }, 39014 { 39015 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 39016 "settings": { 39017 "type": "link", 39018 "linkName": "SW PLP", 39019 "linkType": "o" 39020 } 39021 }, 39022 { 39023 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 39024 "settings": {} 39025 } 39026 ] 39027 }, 39028 { 39029 "id": "RL8afd791a92ae4c89ba0598416b6ada4e", 39030 "name": "HW_Breadcrumb_Click:EBR", 39031 "events": [ 39032 { 39033 "modulePath": "core/src/lib/events/click.js", 39034 "settings": { 39035 "elementSelector": ".nicrc--breadcrumb-item a", 39036 "bubbleFireIfParent": true, 39037 "bubbleFireIfChildFired": false 39038 }, 39039 "ruleOrder": 50.0 39040 } 39041 ], 39042 "conditions": [ 39043 { 39044 "modulePath": "core/src/lib/conditions/valueComparison.js", 39045 "settings": { 39046 "comparison": { 39047 "operator": "doesNotEqual", 39048 "caseInsensitive": true 39049 }, 39050 "leftOperand": "%DisableAnalyticsCookie%", 39051 "rightOperand": "true" 39052 } 39053 }, 39054 { 39055 "modulePath": "core/src/lib/conditions/valueComparison.js", 39056 "settings": { 39057 "comparison": { 39058 "operator": "doesNotEqual", 39059 "caseInsensitive": true 39060 }, 39061 "leftOperand": "%TRAFFICTYPE_META%", 39062 "rightOperand": "bot" 39063 } 39064 } 39065 ], 39066 "actions": [ 39067 { 39068 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 39069 "settings": { 39070 "customSetup": { 39071 "source": function(event, s) { 39072 NIAnalytics.setAndTrack(['eVar33', 'prop23'], 'MM:'+ event.target.innerText); 39073} 39074 }, 39075 "trackerProperties": { 39076 "eVars": [ 39077 { 39078 "name": "eVar1", 39079 "type": "value", 39080 "value": "%PAGE_NAME%" 39081 }, 39082 { 39083 "name": "eVar12", 39084 "type": "value", 39085 "value": "%PROFILE_ID:COOKIE%" 39086 }, 39087 { 39088 "name": "eVar21", 39089 "type": "value", 39090 "value": "%PAGE_URL%" 39091 }, 39092 { 39093 "name": "eVar27", 39094 "type": "value", 39095 "value": "%CONTENTTYPE:METATAG%" 39096 } 39097 ], 39098 "props": [ 39099 { 39100 "name": "prop2", 39101 "type": "alias", 39102 "value": "eVar27" 39103 }, 39104 { 39105 "name": "prop33", 39106 "type": "alias", 39107 "value": "eVar21" 39108 } 39109 ], 39110 "events": [ 39111 { 39112 "name": "event30" 39113 } 39114 ] 39115 } 39116 } 39117 }, 39118 { 39119 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 39120 "settings": { 39121 "type": "link", 39122 "linkName": "aa-react-link", 39123 "linkType": "o" 39124 } 39125 }, 39126 { 39127 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 39128 "settings": {} 39129 } 39130 ] 39131 }, 39132 { 39133 "id": "RL8e257dd0f60c44a29cebfb4b3b15c8f6", 39134 "name": "My_Profile_CTA_Click:EBR", 39135 "events": [ 39136 { 39137 "modulePath": "core/src/lib/events/click.js", 39138 "settings": { 39139 "elementSelector": ".analytics-mp-update-pi, .analytics-mp-update-email, .analytics-mp-email-preferences, .analytics-mp-change-password, .analytics-mp-update-account-type, .analytics-mp-update-org, .analytics-update-payment-method", 39140 "bubbleFireIfParent": true, 39141 "bubbleFireIfChildFired": true 39142 }, 39143 "ruleOrder": 50.0 39144 } 39145 ], 39146 "conditions": [ 39147 { 39148 "modulePath": "core/src/lib/conditions/valueComparison.js", 39149 "settings": { 39150 "comparison": { 39151 "operator": "doesNotEqual", 39152 "caseInsensitive": true 39153 }, 39154 "leftOperand": "%DisableAnalyticsCookie%", 39155 "rightOperand": "true" 39156 } 39157 }, 39158 { 39159 "modulePath": "core/src/lib/conditions/valueComparison.js", 39160 "settings": { 39161 "comparison": { 39162 "operator": "doesNotEqual", 39163 "caseInsensitive": true 39164 }, 39165 "leftOperand": "%TRAFFICTYPE_META%", 39166 "rightOperand": "bot" 39167 } 39168 } 39169 ], 39170 "actions": [ 39171 { 39172 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 39173 "settings": { 39174 "customSetup": { 39175 "source": function(event, s) { 39176 var target = event.target.closest("a"); 39177 39178var mapping = {
39179 'analytics-mp-update-pi': 'Update personal information', 39180 'analytics-mp-update-email': 'Update email address', 39181 'analytics-mp-email-preferences': 'Update my email communication preferences', 39182 'analytics-mp-change-password': 'Change password', 39183 'analytics-mp-update-account-type': 'Update your account type', 39184 'analytics-mp-update-org': 'Update your organization', 39185 'analytics-update-payment-method': 'Update saved payment methods' 39186}; 39187 39188var analyticsData = Object.keys(mapping) 39189 .find(cls => target.classList.contains(cls)); 39190 39191analyticsData = analyticsData ? mapping[analyticsData] : ""; 39192 39193NIAnalytics.setAndTrack(["eVar33", "prop23"], analyticsData); 39194 39195} 39196 }, 39197 "trackerProperties": { 39198 "eVars": [ 39199 { 39200 "name": "eVar1", 39201 "type": "value", 39202 "value": "%PAGE_NAME%" 39203 }, 39204 { 39205 "name": "eVar12", 39206 "type": "value", 39207 "value": "%PROFILE_ID:COOKIE%" 39208 }, 39209 { 39210 "name": "eVar21", 39211 "type": "value", 39212 "value": "%PAGE_URL%" 39213 }, 39214 { 39215 "name": "eVar27", 39216 "type": "value", 39217 "value": "%CONTENTTYPE:METATAG%" 39218 } 39219 ], 39220 "props": [ 39221 { 39222 "name": "prop2", 39223 "type": "alias", 39224 "value": "eVar27" 39225 }, 39226 { 39227 "name": "prop33", 39228 "type": "alias", 39229 "value": "eVar21" 39230 } 39231 ], 39232 "events": [ 39233 { 39234 "name": "event30" 39235 } 39236 ] 39237 } 39238 } 39239 }, 39240 { 39241 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 39242 "settings": { 39243 "type": "link", 39244 "linkType": "o" 39245 } 39246 }, 39247 { 39248 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 39249 "settings": {} 39250 } 39251 ] 39252 }, 39253 { 39254 "id": "RL8e6809e7a7d3460b95130595b7be50ac", 39255 "name": "Capture_Outcome_Fall_Off:DCR", 39256 "events": [ 39257 { 39258 "modulePath": "core/src/lib/events/directCall.js", 39259 "settings": { 39260 "identifier": "captureOutcomeFallOff" 39261 }, 39262 "ruleOrder": 50.0 39263 } 39264 ], 39265 "conditions": [ 39266 { 39267 "modulePath": "core/src/lib/conditions/valueComparison.js", 39268 "settings": { 39269 "comparison": { 39270 "operator": "doesNotEqual", 39271 "caseInsensitive": true 39272 }, 39273 "leftOperand": "%DisableAnalyticsCookie%", 39274 "rightOperand": "true" 39275 } 39276 }, 39277 { 39278 "modulePath": "core/src/lib/conditions/valueComparison.js", 39279 "settings": { 39280 "comparison": { 39281 "operator": "doesNotEqual", 39282 "caseInsensitive": true 39283 }, 39284 "leftOperand": "%TRAFFICTYPE_META%", 39285 "rightOperand": "bot" 39286 } 39287 } 39288 ], 39289 "actions": [ 39290 { 39291 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 39292 "settings": { 39293 "trackerProperties": { 39294 "eVars": [ 39295 { 39296 "name": "eVar1", 39297 "type": "value", 39298 "value": "%PAGE_NAME%" 39299 }, 39300 { 39301 "name": "eVar56", 39302 "type": "value", 39303 "value": "%DETAILED_PAGENAME%" 39304 }, 39305 { 39306 "name": "eVar71", 39307 "type": "value", 39308 "value": "%ASSESSMENT_LABEL:EV:DL%" 39309 }, 39310 { 39311 "name": "eVar72", 39312 "type": "value", 39313 "value": "%ASSESSMENT_QUESTIONID:EV:DL%" 39314 } 39315 ], 39316 "props": [ 39317 { 39318 "name": "prop23", 39319 "type": "alias", 39320 "value": "eVar1" 39321 }, 39322 { 39323 "name": "prop25", 39324 "type": "alias", 39325 "value": "eVar71" 39326 }, 39327 { 39328 "name": "prop50", 39329 "type": "alias", 39330 "value": "eVar56" 39331 } 39332 ], 39333 "pageName": "%PAGE_NAME%" 39334 } 39335 } 39336 }, 39337 { 39338 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 39339 "settings": { 39340 "type": "link", 39341 "linkName": "", 39342 "linkType": "o" 39343 } 39344 }, 39345 { 39346 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 39347 "settings": {} 39348 } 39349 ] 39350 }, 39351 { 39352 "id": "RL915e2cb4a3cf4347b82ba3865bb4baa2", 39353 "name": "Global (search):PLR", 39354 "events": [ 39355 { 39356 "modulePath": "core/src/lib/events/directCall.js", 39357 "settings": { 39358 "identifier": "captureVirtualPageLoad" 39359 }, 39360 "ruleOrder": 500.0 39361 } 39362 ], 39363 "conditions": [ 39364 { 39365 "modulePath": "core/src/lib/conditions/valueComparison.js", 39366 "settings": { 39367 "comparison": { 39368 "operator": "doesNotEqual", 39369 "caseInsensitive": true 39370 }, 39371 "leftOperand": "%DisableAnalyticsCookie%", 39372 "rightOperand": "true" 39373 } 39374 }, 39375 { 39376 "modulePath": "core/src/lib/conditions/valueComparison.js", 39377 "settings": { 39378 "comparison": { 39379 "operator": "isTrue" 39380 }, 39381 "leftOperand": "%IS_SEARCH_SPA%" 39382 } 39383 }, 39384 { 39385 "modulePath": "core/src/lib/conditions/valueComparison.js", 39386 "settings": { 39387 "comparison": { 39388 "operator": "matchesRegex", 39389 "caseInsensitive": true 39390 }, 39391 "leftOperand": "%NICOM_PAGE%", 39392 "rightOperand": "true" 39393 } 39394 }, 39395 { 39396 "modulePath": "core/src/lib/conditions/valueComparison.js", 39397 "settings": { 39398 "comparison": { 39399 "operator": "equals", 39400 "caseInsensitive": true 39401 }, 39402 "leftOperand": "%REFDATA_PAGE%", 39403 "rightOperand": "false" 39404 } 39405 }, 39406 { 39407 "modulePath": "core/src/lib/conditions/customCode.js", 39408 "settings": { 39409 "source": function(event, target) { 39410 var urls = ["ni.com/my-support/s/service-requests", "ni.com/my-support/s/technical-support", "ni.com/my-support/s/calibrate", "ni.com/my-support/s/rma", "ni.com/my-support/s/report-bug", "ni.com/my-support/s/activate", "dev2-natinst.cs124.force.com/support/s/service-requests", "dev2-natinst.cs124.force.com/support/s/calibrate", "dev2-natinst.cs124.force.com/support/s/technical-support", "dev2-natinst.cs124.force.com/support/s/report-bug", "dev2-natinst.cs124.force.com/support/s/rma", "dev2-natinst.cs124.force.com/support/s/activate"]; 39411 39412for(var i=0; i<urls.length; i++){ 39413 if(_satellite.getVar("PAGE_URL").indexOf(urls[i]) > -1 ) return false;
39414} 39415return true; 39416} 39417 } 39418 }, 39419 { 39420 "modulePath": "core/src/lib/conditions/customCode.js", 39421 "settings": { 39422 "source": function(event, target) { 39423 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 39424} 39425 } 39426 }, 39427 { 39428 "modulePath": "core/src/lib/conditions/customCode.js", 39429 "settings": { 39430 "source": function(event, target) { 39431 if(window.location.pathname.indexOf("/docs/") === 0){ 39432 return ((typeof event !== "undefined") && (typeof event.detail !== "undefined") && (typeof event.detail.forceSend !== "undefined") && ((event.detail.forceSend === true) || event.detail.forceSend.toLowerCase() === "true")); 39433}else{ 39434 return true; 39435} 39436} 39437 } 39438 }, 39439 { 39440 "modulePath": "core/src/lib/conditions/valueComparison.js", 39441 "settings": { 39442 "comparison": { 39443 "operator": "doesNotEqual", 39444 "caseInsensitive": true 39445 }, 39446 "leftOperand": "%HTML_TITLE%", 39447 "rightOperand": "Cart Load" 39448 } 39449 }, 39450 { 39451 "modulePath": "core/src/lib/conditions/valueComparison.js", 39452 "settings": { 39453 "comparison": { 39454 "operator": "doesNotEqual", 39455 "caseInsensitive": true 39456 }, 39457 "leftOperand": "%HTML_TITLE%", 39458 "rightOperand": "Cart Redirect" 39459 } 39460 }, 39461 { 39462 "modulePath": "core/src/lib/conditions/valueComparison.js", 39463 "settings": { 39464 "comparison": { 39465 "operator": "isFalse" 39466 }, 39467 "leftOperand": "%IS_CART_OR_CHECKOUT_PAGE%" 39468 } 39469 }, 39470 { 39471 "modulePath": "core/src/lib/conditions/valueComparison.js", 39472 "settings": { 39473 "comparison": { 39474 "operator": "doesNotEqual", 39475 "caseInsensitive": true 39476 }, 39477 "leftOperand": "%TRAFFICTYPE_META%", 39478 "rightOperand": "bot" 39479 } 39480 } 39481 ], 39482 "actions": [ 39483 { 39484 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 39485 "settings": { 39486 "customSetup": { 39487 "source": function(event, s) { 39488 var template = _satellite.getVar('TEMPLATE:PI:PA:DL'); 39489 39490NIAnalytics.setAndTrack(["eVar56", "prop50"], _satellite.getVar("DETAILED_PAGENAME")); 39491s.eVar125 = template.length === 0 ? 'none' : template; 39492 39493s.prop6 = _satellite.getVar("PREV_PAGE_NAME"); 39494s.prop18 = _satellite.getVar("PREV_PAGE_VIEWED_PERCENTAGE"); 39495s.prop41 = _satellite.getVar("PREV_DETAILED_PAGENAME"); 39496s.prop42 = _satellite.getVar("PREV_DOCUMENTID"); 39497 39498var useCaseId = _satellite.getVar("USECASEID:URL_PARAM"); 39499var exp = _satellite.getVar("EXP:URL_PARAM"); 39500var at_preview_token = _satellite.getVar("AT_PREVIEW_TOKEN:URL_PARAM"); 39501 39502var tmpV49 = useCaseId+"|"+exp+"|"+at_preview_token; 39503tmpV49 = tmpV49.replace("||","|"); 39504tmpV49 = tmpV49[0] === "|" ? tmpV49.slice(1,tmpV49.length) : tmpV49; 39505tmpV49 = (tmpV49.length > 0 && tmpV49[tmpV49.length-1] === "|") ? tmpV49.substr(0, tmpV49.lastIndexOf("|")) : tmpV49; 39506NIAnalytics.setAndTrack("eVar49", tmpV49); 39507 39508//6Sense 39509if(JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 39510 NIAnalytics.setAndTrack("eVar143", "6Sense"); 39511} 39512 39513var searchFilter = _satellite.getVar("ONSITESEARCHSECONDARYFILTER:OSI:OS:DL"); 39514if (searchFilter.indexOf("searchfilter:") === 0) { 39515 NIAnalytics.setAndTrack("list3", searchFilter); 39516} else { 39517 NIAnalytics.setAndTrack("eVar66", searchFilter); 39518} 39519 39520var visitStart = _satellite.getVar("VISITSTART:COOKIE"); 39521if(s.c_r("icidAnalytics") === 1){ 39522 var t = new Date(); 39523 t.setTime(t.getTime()+1800000); 39524 if(!s.c_w("icidAnalytics",0,t)){s.c_w("icidAnalytics",0,0)} 39525 s.eVar41 = "Internal Campaign"; 39526} else if (visitStart === "1") { 39527 s.eVar41 = "Browse"; 39528} 39529 39530if (visitStart === "1") { 39531 s.firstPage = 'firstpage'; 39532} 39533 39534if (window.sessionStorage.getItem("ni-analytics.redirecting-page") === document.referrer) { 39535 var ref = window.sessionStorage.getItem("ni-analytics.original-referrer"); 39536 s.referrer = (ref != "")?ref:" "; 39537} else { 39538 window.sessionStorage.setItem("ni-analytics.original-referrer", null); 39539 window.sessionStorage.setItem("ni-analytics.redirecting-page", null); 39540} 39541 39542if ((typeof(event) !== "undefined") && (typeof(event.detail) !== "undefined") && (typeof(event.detail.source) !== "undefined")){ 39543 if(event.detail.source === "captureModelRecommendation"){ 39544 if(s.events){ 39545 s.events +=",prodView"; 39546 } else { 39547 s.events = "prodView"; 39548 } 39549 s.products = ";" + event.detail.products.replace(/,/g, ",;") 39550 } 39551 39552 if(event.detail.pageTab){ 39553 NIAnalytics.setAndTrack(["eVar56", "prop50"], _satellite.getVar("DETAILED_PAGENAME")+":"+event.detail.pageTab.toLowerCase()); 39554 } 39555} 39556 39557/* If Login, then event7 - Start */ 39558var prevValue = _satellite.getVar('PREV_LOGGED_IN'); 39559var currValue = _satellite.getVar('LOGGED_IN'); 39560 39561if ((typeof(prevValue) === undefined || ["", "anon", "no value", "not logged in"].indexOf(prevValue) > -1) && (currValue === "logged in")) { 39562 s.events = s.apl(s.events, 'event7', ',', 2); 39563} 39564/* If Login, then event7 - End */ 39565 39566/* Previous prop4 to prop19 - Start */ 39567// Do not put this into the UI section 39568s.prop19 = _satellite.getVar('PREV_SEARCH_TERM'); 39569/* Previous prop4 to prop19 - End */ 39570 39571var docID = _satellite.getVar("DOCUMENTID:METATAG"); 39572if(window.document.domain.toLowerCase() === "events.ni.com" || window.document.domain.toLowerCase() === "event.on24.com"){ 39573 s.eVar96 = docID; 39574} else { 39575 s.eVar63 = docID; 39576} 39577 39578/* Visit start - End */ 39579 39580_satellite.getVisitorId().setCustomerIDs({ 39581 "email_key":{ 39582 "id": s.eVar101, 39583 "authState": Visitor.AuthState.UNKNOWN 39584 }, 39585 "experience_cloud_id":{ 39586 "id": s.eVar130, 39587 "authState": Visitor.AuthState.UNKNOWN 39588 } 39589}); 39590 39591s.linkTrackVars="None" 39592s.linkTrackEvents="None" 39593 39594//ContentSquare dynamic tracking 39595window._uxa = window._uxa || [];
39596window._uxa.push(["trackDynamicVariable", {key: 'Internal Campaign', value: _satellite.getVar('ICID:URL_PARAM')} ]); 39597 39598//Target 39599if(typeof ttMETA === "object"){ 39600 for(const targetActivity of ttMETA){ 39601 window._uxa.push(["trackDynamicVariable", {key: 'AB_AT_'+targetActivity.CampaignName, value: targetActivity.RecipeName} ]); 39602 } 39603} 39604} 39605 }, 39606 "trackerProperties": { 39607 "eVars": [ 39608 { 39609 "name": "eVar1", 39610 "type": "value", 39611 "value": "%PAGE_NAME%" 39612 }, 39613 { 39614 "name": "eVar3", 39615 "type": "value", 39616 "value": "%ICID:URL_PARAM%" 39617 }, 39618 { 39619 "name": "eVar9", 39620 "type": "value", 39621 "value": "%LOGGED_IN%" 39622 }, 39623 { 39624 "name": "eVar10", 39625 "type": "value", 39626 "value": "%LANGUAGE:METATAG%" 39627 }, 39628 { 39629 "name": "eVar11", 39630 "type": "value", 39631 "value": "%LOCALE:COOKIE%" 39632 }, 39633 { 39634 "name": "eVar12", 39635 "type": "value", 39636 "value": "%PROFILE_ID:COOKIE%" 39637 }, 39638 { 39639 "name": "eVar13", 39640 "type": "value", 39641 "value": "%ESPUID:URL_PARAM%" 39642 }, 39643 { 39644 "name": "eVar21", 39645 "type": "value", 39646 "value": "%PAGE_URL%" 39647 }, 39648 { 39649 "name": "eVar27", 39650 "type": "value", 39651 "value": "%CONTENTTYPE:METATAG%" 39652 }, 39653 { 39654 "name": "eVar31", 39655 "type": "value", 39656 "value": "%PRODREF%" 39657 }, 39658 { 39659 "name": "eVar36", 39660 "type": "value", 39661 "value": "%DOMAIN%" 39662 }, 39663 { 39664 "name": "eVar59", 39665 "type": "value", 39666 "value": "%PAGE_NAME%" 39667 }, 39668 { 39669 "name": "eVar64", 39670 "type": "value", 39671 "value": "%DOCUMENTCOREID:METATAG%" 39672 }, 39673 { 39674 "name": "eVar67", 39675 "type": "value", 39676 "value": "%WORD_COUNT%" 39677 }, 39678 { 39679 "name": "eVar68", 39680 "type": "value", 39681 "value": "%LINK_COUNT%" 39682 }, 39683 { 39684 "name": "eVar69", 39685 "type": "value", 39686 "value": "%KEYWORDS_PART1:METATAG%" 39687 }, 39688 { 39689 "name": "eVar70", 39690 "type": "value", 39691 "value": "%KEYWORDS_PART2:METATAG%" 39692 }, 39693 { 39694 "name": "eVar73", 39695 "type": "value", 39696 "value": "%ASSESSMENT_PERSONA%" 39697 }, 39698 { 39699 "name": "eVar74", 39700 "type": "value", 39701 "value": "%HTML_TITLE%" 39702 }, 39703 { 39704 "name": "eVar79", 39705 "type": "value", 39706 "value": "%GUESTBOOK_CODE%" 39707 }, 39708 { 39709 "name": "eVar80", 39710 "type": "value", 39711 "value": "%DOCSTATUS:METATAG%" 39712 }, 39713 { 39714 "name": "eVar82", 39715 "type": "value", 39716 "value": "%DNB_DUNS%" 39717 }, 39718 { 39719 "name": "eVar83", 39720 "type": "value", 39721 "value": "%6SENSE_COMPANYNAME%" 39722 }, 39723 { 39724 "name": "eVar86", 39725 "type": "value", 39726 "value": "%DNB_STATUS%" 39727 }, 39728 { 39729 "name": "eVar87", 39730 "type": "value", 39731 "value": "%6SENSE_INDUSTRY%" 39732 }, 39733 { 39734 "name": "eVar88", 39735 "type": "value", 39736 "value": "%6SENSE_SICCODE%" 39737 }, 39738 { 39739 "name": "eVar89", 39740 "type": "value", 39741 "value": "%6SENSE_COMPANY_GEO%" 39742 }, 39743 { 39744 "name": "eVar90", 39745 "type": "value",
39746 "value": "%DNB_MARKETING%" 39747 }, 39748 { 39749 "name": "eVar91", 39750 "type": "value", 39751 "value": "%DNB_JOB%" 39752 }, 39753 { 39754 "name": "eVar92", 39755 "type": "value", 39756 "value": "%DNB_PRESCREENING%" 39757 }, 39758 { 39759 "name": "eVar95", 39760 "type": "value", 39761 "value": "%DNB_DUNS_ALONE%" 39762 }, 39763 { 39764 "name": "eVar98", 39765 "type": "value", 39766 "value": "%6SENSE_FIRMOGRAPHIC%" 39767 }, 39768 { 39769 "name": "eVar101", 39770 "type": "value", 39771 "value": "%HASHED_EMAIL:USER:DL%" 39772 }, 39773 { 39774 "name": "eVar102", 39775 "type": "value", 39776 "value": "%KEYWORDS_COUNT%" 39777 }, 39778 { 39779 "name": "eVar103", 39780 "type": "value", 39781 "value": "%TITLE_LENGTH%" 39782 }, 39783 { 39784 "name": "eVar109", 39785 "type": "value", 39786 "value": "%PRODUCT_MANUFACTURER:DL%" 39787 }, 39788 { 39789 "name": "eVar110", 39790 "type": "value", 39791 "value": "%PCID%" 39792 }, 39793 { 39794 "name": "eVar122", 39795 "type": "value", 39796 "value": "%LETTER_COUNT%" 39797 }, 39798 { 39799 "name": "eVar123", 39800 "type": "value", 39801 "value": "%NISRC:URL_PARAM%" 39802 }, 39803 { 39804 "name": "eVar124", 39805 "type": "value", 39806 "value": "%WRAPPER:METATAG%|%WRAPPERID:METATAG%" 39807 }, 39808 { 39809 "name": "eVar130", 39810 "type": "value", 39811 "value": "%EXPERIENCE_CLOUD_ID%" 39812 }, 39813 { 39814 "name": "eVar133", 39815 "type": "value", 39816 "value": "%CAT_ID:METATAG%" 39817 }, 39818 { 39819 "name": "eVar134", 39820 "type": "value", 39821 "value": "%SUB_CAT_ID:METATAG%" 39822 }, 39823 { 39824 "name": "eVar135", 39825 "type": "value", 39826 "value": "%NODE_ID:METATAG%" 39827 }, 39828 { 39829 "name": "eVar137", 39830 "type": "value", 39831 "value": "%SEO_H1_VALUES%" 39832 }, 39833 { 39834 "name": "eVar138", 39835 "type": "value", 39836 "value": "%SEO_H2_VALUES%" 39837 }, 39838 { 39839 "name": "eVar139", 39840 "type": "value", 39841 "value": "%SEO_H3_VALUES%" 39842 }, 39843 { 39844 "name": "eVar140", 39845 "type": "value", 39846 "value": "%DESCRIPTION:METATAG%" 39847 }, 39848 { 39849 "name": "eVar152", 39850 "type": "value", 39851 "value": "%OneTrust_STATUS%" 39852 }, 39853 { 39854 "name": "eVar155", 39855 "type": "value", 39856 "value": "%PRODNOTIFY%" 39857 } 39858 ], 39859 "props": [ 39860 { 39861 "name": "prop1", 39862 "type": "value", 39863 "value": "%PAGETYPE:METATAG%" 39864 }, 39865 { 39866 "name": "prop2", 39867 "type": "alias", 39868 "value": "eVar27" 39869 }, 39870 { 39871 "name": "prop12", 39872 "type": "alias", 39873 "value": "eVar74" 39874 }, 39875 { 39876 "name": "prop13", 39877 "type": "alias", 39878 "value": "eVar124" 39879 }, 39880 { 39881 "name": "prop20", 39882 "type": "value",
39883 "value": "%DELIVEREDBY:METATAG%" 39884 }, 39885 { 39886 "name": "prop21", 39887 "type": "value", 39888 "value": "%INDUSTRY:AT:PA:DL%" 39889 }, 39890 { 39891 "name": "prop23", 39892 "type": "alias", 39893 "value": "eVar1" 39894 }, 39895 { 39896 "name": "prop27", 39897 "type": "alias", 39898 "value": "eVar59" 39899 }, 39900 { 39901 "name": "prop28", 39902 "type": "value", 39903 "value": "%NAVIGATION_SECTION%" 39904 }, 39905 { 39906 "name": "prop29", 39907 "type": "value", 39908 "value": "%SHORT_PAGENAME%" 39909 }, 39910 { 39911 "name": "prop30", 39912 "type": "value", 39913 "value": "%GENERIC_PAGENAME%" 39914 }, 39915 { 39916 "name": "prop31", 39917 "type": "alias", 39918 "value": "eVar36" 39919 }, 39920 { 39921 "name": "prop33", 39922 "type": "alias", 39923 "value": "eVar21" 39924 }, 39925 { 39926 "name": "prop38", 39927 "type": "alias", 39928 "value": "eVar88" 39929 }, 39930 { 39931 "name": "prop40", 39932 "type": "value", 39933 "value": "%APPLICATIONAREA_S:METATAG%" 39934 }, 39935 { 39936 "name": "prop44", 39937 "type": "value", 39938 "value": "%6SENSE_SCORES%" 39939 }, 39940 { 39941 "name": "prop70", 39942 "type": "value", 39943 "value": "%DOCUMENT_DATE:METATAG%" 39944 }, 39945 { 39946 "name": "prop71", 39947 "type": "value", 39948 "value": "%NIBOOSTS_UPDATE_DATE:METATAG%" 39949 }, 39950 { 39951 "name": "prop72", 39952 "type": "value", 39953 "value": "%NIBOOSTS_RATING_VALUE:METATAG%" 39954 }, 39955 { 39956 "name": "prop73", 39957 "type": "value", 39958 "value": "%NIBOOSTS_RATING_NUMBER:METATAG%" 39959 }, 39960 { 39961 "name": "prop75", 39962 "type": "value", 39963 "value": "client" 39964 } 39965 ], 39966 "channel": "%SECTION:METATAG%", 39967 "campaign": { 39968 "type": "value", 39969 "value": "%LAST_CID_URL_PARAM%" 39970 }, 39971 "pageName": "%PAGE_NAME%" 39972 } 39973 } 39974 }, 39975 { 39976 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 39977 "settings": { 39978 "type": "page" 39979 } 39980 }, 39981 { 39982 "modulePath": "core/src/lib/actions/customCode.js", 39983 "settings": { 39984 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCf9d9a942ed55476a92333aeea44a056a-source.js', 39985 "language": "javascript", 39986 "isExternal": true 39987 } 39988 }, 39989 { 39990 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 39991 "settings": {} 39992 }, 39993 { 39994 "modulePath": "core/src/lib/actions/customCode.js", 39995 "settings": { 39996 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC68ef89971e324c469243c161a2e11d4e-source.js', 39997 "language": "javascript", 39998 "isExternal": true 39999 } 40000 }, 40001 { 40002 "modulePath": "core/src/lib/actions/customCode.js", 40003 "settings": { 40004 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCc40c15c85e4f44eb98dc663191136e6f-source.js', 40005 "language": "javascript", 40006 "isExternal": true 40007 } 40008 } 40009 ] 40010 }, 40011 { 40012 "id": "RL927cb854b9e24b1ca21803667305dd3e", 40013 "name": "Cart&Checkout_Checkout:PLR", 40014 "events": [ 40015 { 40016 "modulePath": "core/src/lib/events/windowLoaded.js", 40017 "settings": {}, 40018 "ruleOrder": 50.0 40019 }, 40020 { 40021 "modulePath": "core/src/lib/events/directCall.js", 40022 "settings": { 40023 "identifier": "captureVirtualPageLoad" 40024 }, 40025 "ruleOrder": 1.0 40026 } 40027 ], 40028 "conditions": [ 40029 { 40030 "modulePath": "core/src/lib/conditions/valueComparison.js", 40031 "settings": { 40032 "comparison": { 40033 "operator": "equals" 40034 }, 40035 "leftOperand": "%TEMPLATE:PI:PA:DL%", 40036 "rightOperand": "checkout" 40037 } 40038 }, 40039 { 40040 "modulePath": "core/src/lib/conditions/valueComparison.js", 40041 "settings": { 40042 "comparison": { 40043 "operator": "equals" 40044 }, 40045 "leftOperand": "%SUBTEMPLATE:PI:PA:DL%", 40046 "rightOperand": "shipping" 40047 } 40048 }, 40049 { 40050 "modulePath": "core/src/lib/conditions/valueComparison.js", 40051 "settings": { 40052 "comparison": { 40053 "operator": "doesNotEqual", 40054 "caseInsensitive": true 40055 }, 40056 "leftOperand": "%DisableAnalyticsCookie%", 40057 "rightOperand": "true" 40058 } 40059 } 40060 ], 40061 "actions": [ 40062 { 40063 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40064 "settings": { 40065 "customSetup": { 40066 "source": function(event, s) { 40067 var items = ""; 40068 if(Array.isArray(digitalData.cart.items)){ 40069 items=digitalData.cart.items.toString(); 40070 } else{ 40071 items=digitalData.cart.items; 40072 } 40073s.products = ";" + items.replace(/,/g, ",;") 40074s.linkTrackVars += ",products"; 40075} 40076 }, 40077 "trackerProperties": { 40078 "eVars": [ 40079 { 40080 "name": "eVar22", 40081 "type": "value", 40082 "value": "%CARTID:DL%" 40083 } 40084 ], 40085 "events": [ 40086 { 40087 "name": "event9" 40088 } 40089 ] 40090 } 40091 } 40092 } 40093 ] 40094 }, 40095 { 40096 "id": "RL92a27e4057be44229240023509222ca2", 40097 "name": "SoftwareRenewalUpdateQuantity:DCR", 40098 "events": [ 40099 { 40100 "modulePath": "core/src/lib/events/customEvent.js", 40101 "settings": { 40102 "type": "aa-renewal-update-quantity", 40103 "bubbleFireIfParent": true, 40104 "bubbleFireIfChildFired": true 40105 }, 40106 "ruleOrder": 50.0 40107 } 40108 ], 40109 "conditions": [], 40110 "actions": [ 40111 { 40112 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40113 "settings": { 40114 "customSetup": { 40115 "source": function(event, s) { 40116 NIAnalytics.setAndTrack(["eVar33","prop23"], "Renewal_step2:Update Selection:"+event.detail.quantity); 40117} 40118 }, 40119 "trackerProperties": { 40120 "eVars": [ 40121 { 40122 "name": "eVar1", 40123 "type": "value", 40124 "value": "%PAGE_NAME%" 40125 }, 40126 { 40127 "name": "eVar12", 40128 "type": "value", 40129 "value": "%PROFILE_ID:COOKIE%" 40130 }, 40131 { 40132 "name": "eVar21", 40133 "type": "value", 40134 "value": "%PAGE_URL%" 40135 }, 40136 { 40137 "name": "eVar27", 40138 "type": "value", 40139 "value": "%CONTENTTYPE:METATAG%" 40140 } 40141 ], 40142 "props": [ 40143 { 40144 "name": "prop2", 40145 "type": "alias", 40146 "value": "eVar27" 40147 }, 40148 { 40149 "name": "prop33", 40150 "type": "alias", 40151 "value": "eVar21" 40152 } 40153 ], 40154 "events": [ 40155 { 40156 "name": "event30" 40157 } 40158 ] 40159 } 40160 } 40161 }, 40162 { 40163 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40164 "settings": { 40165 "type": "link", 40166 "linkName": "SoftwareRenewalUpdateQuantity", 40167 "linkType": "o" 40168 } 40169 }, 40170 { 40171 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40172 "settings": {} 40173 } 40174 ] 40175 }, 40176 { 40177 "id": "RL949e611d6e3f47bfa59879d6de3128dd", 40178 "name": "SWPLP_Filter_Click:DCR", 40179 "events": [ 40180 { 40181 "modulePath": "core/src/lib/events/customEvent.js", 40182 "settings": { 40183 "type": "aa-swplp-filter-click", 40184 "bubbleFireIfParent": true, 40185 "bubbleFireIfChildFired": true 40186 }, 40187 "ruleOrder": 50.0 40188 } 40189 ], 40190 "conditions": [ 40191 { 40192 "modulePath": "core/src/lib/conditions/valueComparison.js", 40193 "settings": { 40194 "comparison": { 40195 "operator": "doesNotEqual", 40196 "caseInsensitive": true 40197 }, 40198 "leftOperand": "%DisableAnalyticsCookie%", 40199 "rightOperand": "true" 40200 } 40201 }, 40202 { 40203 "modulePath": "core/src/lib/conditions/valueComparison.js", 40204 "settings": { 40205 "comparison": { 40206 "operator": "doesNotEqual", 40207 "caseInsensitive": true 40208 }, 40209 "leftOperand": "%TRAFFICTYPE_META%", 40210 "rightOperand": "bot" 40211 } 40212 } 40213 ], 40214 "actions": [ 40215 { 40216 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40217 "settings": { 40218 "customSetup": { 40219 "source": function(event, s) { 40220 NIAnalytics.setAndTrack("eVar35", "SW PLP:"+event.detail.title+":"+event.detail.item); 40221} 40222 }, 40223 "trackerProperties": { 40224 "eVars": [ 40225 { 40226 "name": "eVar1", 40227 "type": "value", 40228 "value": "%PAGE_NAME%" 40229 }, 40230 { 40231 "name": "eVar12", 40232 "type": "value", 40233 "value": "%PROFILE_ID:COOKIE%" 40234 }, 40235 { 40236 "name": "eVar21", 40237 "type": "value", 40238 "value": "%PAGE_URL%" 40239 }, 40240 { 40241 "name": "eVar27", 40242 "type": "value", 40243 "value": "%CONTENTTYPE:METATAG%" 40244 }, 40245 { 40246 "name": "eVar33", 40247 "type": "value", 40248 "value": "SW PLP Filters" 40249 }, 40250 { 40251 "name": "eVar56", 40252 "type": "value",
40253 "value": "%DETAILED_PAGENAME%" 40254 } 40255 ], 40256 "props": [ 40257 { 40258 "name": "prop2", 40259 "type": "alias", 40260 "value": "eVar27" 40261 }, 40262 { 40263 "name": "prop23", 40264 "type": "alias", 40265 "value": "eVar33" 40266 }, 40267 { 40268 "name": "prop33", 40269 "type": "alias", 40270 "value": "eVar21" 40271 } 40272 ], 40273 "events": [ 40274 { 40275 "name": "event30" 40276 } 40277 ] 40278 } 40279 } 40280 }, 40281 { 40282 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40283 "settings": { 40284 "type": "link", 40285 "linkName": "SW PLP", 40286 "linkType": "o" 40287 } 40288 }, 40289 { 40290 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40291 "settings": {} 40292 } 40293 ] 40294 }, 40295 { 40296 "id": "RL959abf6ba45140abb7f72bed10c5674e", 40297 "name": "FreeTrial-ContinueToTrial:DCR", 40298 "events": [ 40299 { 40300 "modulePath": "core/src/lib/events/customEvent.js", 40301 "settings": { 40302 "type": "aa-free-trial-continue-to-trial", 40303 "bubbleFireIfParent": true, 40304 "bubbleFireIfChildFired": true 40305 }, 40306 "ruleOrder": 50.0 40307 } 40308 ], 40309 "conditions": [], 40310 "actions": [ 40311 { 40312 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40313 "settings": { 40314 "trackerProperties": { 40315 "eVars": [ 40316 { 40317 "name": "eVar1", 40318 "type": "value", 40319 "value": "%PAGE_NAME%" 40320 }, 40321 { 40322 "name": "eVar12", 40323 "type": "value", 40324 "value": "%PROFILE_ID:COOKIE%" 40325 }, 40326 { 40327 "name": "eVar21", 40328 "type": "value", 40329 "value": "%PAGE_URL%" 40330 }, 40331 { 40332 "name": "eVar27", 40333 "type": "value", 40334 "value": "%CONTENTTYPE:METATAG%" 40335 }, 40336 { 40337 "name": "eVar33", 40338 "type": "value", 40339 "value": "FreeTrial: Continue to trial" 40340 } 40341 ], 40342 "props": [ 40343 { 40344 "name": "prop2", 40345 "type": "alias", 40346 "value": "eVar27" 40347 }, 40348 { 40349 "name": "prop23", 40350 "type": "alias", 40351 "value": "eVar33" 40352 }, 40353 { 40354 "name": "prop33", 40355 "type": "alias", 40356 "value": "eVar21" 40357 } 40358 ], 40359 "events": [ 40360 { 40361 "name": "event30" 40362 } 40363 ] 40364 } 40365 } 40366 }, 40367 { 40368 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40369 "settings": { 40370 "type": "link", 40371 "linkName": "FreeTrial Continue to trial", 40372 "linkType": "o" 40373 } 40374 }, 40375 { 40376 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40377 "settings": {} 40378 } 40379 ] 40380 }, 40381 { 40382 "id": "RL96e739c8ccb948a8915c99bc0f79d6a5", 40383 "name": "SoftwareRenewalAddClick:DCR", 40384 "events": [ 40385 { 40386 "modulePath": "core/src/lib/events/customEvent.js", 40387 "settings": { 40388 "type": "aa-renewal-add-click", 40389 "bubbleFireIfParent": true, 40390 "bubbleFireIfChildFired": true 40391 }, 40392 "ruleOrder": 50.0 40393 } 40394 ], 40395 "conditions": [], 40396 "actions": [ 40397 { 40398 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40399 "settings": { 40400 "customSetup": { 40401 "source": function(event, s) { 40402 NIAnalytics.setAndTrack(["eVar33","prop23"], "Renewal_step2:add_product:"+event.detail.title); 40403} 40404 }, 40405 "trackerProperties": { 40406 "eVars": [ 40407 { 40408 "name": "eVar1", 40409 "type": "value", 40410 "value": "%PAGE_NAME%" 40411 }, 40412 { 40413 "name": "eVar12", 40414 "type": "value", 40415 "value": "%PROFILE_ID:COOKIE%" 40416 }, 40417 { 40418 "name": "eVar21", 40419 "type": "value", 40420 "value": "%PAGE_URL%" 40421 }, 40422 { 40423 "name": "eVar27", 40424 "type": "value", 40425 "value": "%CONTENTTYPE:METATAG%" 40426 } 40427 ], 40428 "props": [ 40429 { 40430 "name": "prop2", 40431 "type": "alias", 40432 "value": "eVar27" 40433 }, 40434 { 40435 "name": "prop33", 40436 "type": "alias", 40437 "value": "eVar21" 40438 } 40439 ], 40440 "events": [ 40441 { 40442 "name": "event30" 40443 } 40444 ] 40445 } 40446 } 40447 }, 40448 { 40449 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40450 "settings": { 40451 "type": "link", 40452 "linkName": "SoftwareRenewalAddClick", 40453 "linkType": "o" 40454 } 40455 }, 40456 { 40457 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40458 "settings": {} 40459 } 40460 ] 40461 }, 40462 { 40463 "id": "RL99d3af14b102437b9aceca7861522a34", 40464 "name": "BannerInTableContent_Click:EBR", 40465 "events": [ 40466 { 40467 "modulePath": "core/src/lib/events/click.js", 40468 "settings": { 40469 "elementSelector": "[class*=\"Banner_in-table-banner-content\"] a", 40470 "bubbleFireIfParent": true, 40471 "bubbleFireIfChildFired": false 40472 }, 40473 "ruleOrder": 50.0 40474 } 40475 ], 40476 "conditions": [ 40477 { 40478 "modulePath": "core/src/lib/conditions/valueComparison.js", 40479 "settings": { 40480 "comparison": { 40481 "operator": "doesNotEqual", 40482 "caseInsensitive": true 40483 }, 40484 "leftOperand": "%DisableAnalyticsCookie%", 40485 "rightOperand": "true" 40486 } 40487 }, 40488 { 40489 "modulePath": "core/src/lib/conditions/valueComparison.js", 40490 "settings": { 40491 "comparison": { 40492 "operator": "doesNotEqual", 40493 "caseInsensitive": true 40494 }, 40495 "leftOperand": "%TRAFFICTYPE_META%", 40496 "rightOperand": "bot" 40497 } 40498 } 40499 ], 40500 "actions": [ 40501 { 40502 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40503 "settings": { 40504 "customSetup": { 40505 "source": function(event, s) { 40506 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Banner:" + event.target.innerText); 40507} 40508 }, 40509 "trackerProperties": { 40510 "eVars": [ 40511 { 40512 "name": "eVar1", 40513 "type": "value", 40514 "value": "%PAGE_NAME%" 40515 }, 40516 { 40517 "name": "eVar12", 40518 "type": "value", 40519 "value": "%PROFILE_ID:COOKIE%" 40520 }, 40521 { 40522 "name": "eVar21", 40523 "type": "value", 40524 "value": "%PAGE_URL%" 40525 }, 40526 { 40527 "name": "eVar27", 40528 "type": "value", 40529 "value": "%CONTENTTYPE:METATAG%" 40530 } 40531 ], 40532 "props": [ 40533 { 40534 "name": "prop2", 40535 "type": "alias", 40536 "value": "eVar27" 40537 }, 40538 { 40539 "name": "prop33", 40540 "type": "alias", 40541 "value": "eVar21" 40542 } 40543 ], 40544 "events": [ 40545 { 40546 "name": "event30" 40547 } 40548 ] 40549 } 40550 } 40551 }, 40552 { 40553 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40554 "settings": { 40555 "type": "link", 40556 "linkName": "aa-react-link", 40557 "linkType": "o" 40558 } 40559 }, 40560 { 40561 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40562 "settings": {} 40563 } 40564 ] 40565 }, 40566 { 40567 "id": "RL9a3ae657d97c4b53b4eebbfbea5d27b6", 40568 "name": "SWPLP_Download_Click:EBR", 40569 "events": [ 40570 { 40571 "modulePath": "core/src/lib/events/click.js", 40572 "settings": { 40573 "elementSelector": ".aa-swplp-download", 40574 "bubbleFireIfParent": false, 40575 "bubbleFireIfChildFired": true 40576 }, 40577 "ruleOrder": 50.0 40578 } 40579 ], 40580 "conditions": [ 40581 { 40582 "modulePath": "core/src/lib/conditions/valueComparison.js", 40583 "settings": { 40584 "comparison": { 40585 "operator": "doesNotEqual", 40586 "caseInsensitive": true 40587 }, 40588 "leftOperand": "%DisableAnalyticsCookie%", 40589 "rightOperand": "true" 40590 } 40591 }, 40592 { 40593 "modulePath": "core/src/lib/conditions/valueComparison.js", 40594 "settings": { 40595 "comparison": { 40596 "operator": "doesNotEqual", 40597 "caseInsensitive": true 40598 }, 40599 "leftOperand": "%TRAFFICTYPE_META%", 40600 "rightOperand": "bot" 40601 } 40602 } 40603 ], 40604 "actions": [ 40605 { 40606 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40607 "settings": { 40608 "customSetup": { 40609 "source": function(event, s) { 40610 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PLP:"+event.target.innerText); 40611} 40612 }, 40613 "trackerProperties": { 40614 "eVars": [ 40615 { 40616 "name": "eVar1", 40617 "type": "value", 40618 "value": "%PAGE_NAME%" 40619 }, 40620 { 40621 "name": "eVar12", 40622 "type": "value", 40623 "value": "%PROFILE_ID:COOKIE%" 40624 }, 40625 { 40626 "name": "eVar21", 40627 "type": "value", 40628 "value": "%PAGE_URL%" 40629 }, 40630 { 40631 "name": "eVar27", 40632 "type": "value", 40633 "value": "%CONTENTTYPE:METATAG%" 40634 } 40635 ], 40636 "props": [ 40637 { 40638 "name": "prop2", 40639 "type": "alias", 40640 "value": "eVar27" 40641 }, 40642 { 40643 "name": "prop33", 40644 "type": "alias", 40645 "value": "eVar21" 40646 } 40647 ], 40648 "events": [ 40649 { 40650 "name": "event30" 40651 } 40652 ] 40653 } 40654 } 40655 }, 40656 { 40657 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40658 "settings": { 40659 "type": "link", 40660 "linkName": "SW PLP", 40661 "linkType": "o" 40662 } 40663 }, 40664 { 40665 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40666 "settings": {} 40667 } 40668 ] 40669 }, 40670 { 40671 "id": "RL9ab6cbc5d22a4ae9af4e71dcf72fcceb", 40672 "name": "FreeCoursePDP_Top-CTA_Click:EBR", 40673 "events": [ 40674 { 40675 "modulePath": "core/src/lib/events/click.js", 40676 "settings": { 40677 "elementSelector": ".aa-freec-topcta", 40678 "bubbleFireIfParent": true, 40679 "bubbleFireIfChildFired": false 40680 }, 40681 "ruleOrder": 50.0 40682 } 40683 ], 40684 "conditions": [ 40685 { 40686 "modulePath": "core/src/lib/conditions/valueComparison.js", 40687 "settings": { 40688 "comparison": { 40689 "operator": "doesNotEqual", 40690 "caseInsensitive": true 40691 }, 40692 "leftOperand": "%DisableAnalyticsCookie%", 40693 "rightOperand": "true" 40694 } 40695 }, 40696 { 40697 "modulePath": "core/src/lib/conditions/valueComparison.js", 40698 "settings": { 40699 "comparison": { 40700 "operator": "doesNotEqual", 40701 "caseInsensitive": true 40702 }, 40703 "leftOperand": "%TRAFFICTYPE_META%", 40704 "rightOperand": "bot" 40705 } 40706 } 40707 ], 40708 "actions": [ 40709 { 40710 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40711 "settings": { 40712 "customSetup": { 40713 "source": function(event, s) { 40714 NIAnalytics.setAndTrack(["eVar33", "prop23"], event?.target?.innerText); 40715} 40716 }, 40717 "trackerProperties": { 40718 "eVars": [ 40719 { 40720 "name": "eVar1", 40721 "type": "value", 40722 "value": "%PAGE_NAME%" 40723 }, 40724 { 40725 "name": "eVar12", 40726 "type": "value", 40727 "value": "%PROFILE_ID:COOKIE%" 40728 }, 40729 { 40730 "name": "eVar21", 40731 "type": "value", 40732 "value": "%PAGE_URL%" 40733 }, 40734 { 40735 "name": "eVar27", 40736 "type": "value", 40737 "value": "%CONTENTTYPE:METATAG%" 40738 } 40739 ], 40740 "props": [ 40741 { 40742 "name": "prop2", 40743 "type": "alias", 40744 "value": "eVar27" 40745 }, 40746 { 40747 "name": "prop33", 40748 "type": "alias", 40749 "value": "eVar21" 40750 } 40751 ], 40752 "events": [ 40753 { 40754 "name": "event30" 40755 } 40756 ] 40757 } 40758 } 40759 }, 40760 { 40761 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40762 "settings": { 40763 "type": "link", 40764 "linkName": "Free Course PDP Top CTA", 40765 "linkType": "o" 40766 } 40767 }, 40768 { 40769 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40770 "settings": {} 40771 } 40772 ] 40773 }, 40774 { 40775 "id": "RL9b021c9e57e147e9a4f823c7467f6bd6", 40776 "name": "Course PLP Filter Click:EBR", 40777 "events": [ 40778 { 40779 "modulePath": "core/src/lib/events/customEvent.js", 40780 "settings": { 40781 "type": "aa-courseplp-filter", 40782 "bubbleFireIfParent": true, 40783 "bubbleFireIfChildFired": true 40784 }, 40785 "ruleOrder": 50.0 40786 } 40787 ], 40788 "conditions": [], 40789 "actions": [ 40790 { 40791 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40792 "settings": { 40793 "trackerProperties": { 40794 "eVars": [ 40795 { 40796 "name": "eVar1", 40797 "type": "value", 40798 "value": "%PAGE_NAME%" 40799 }, 40800 { 40801 "name": "eVar12", 40802 "type": "value", 40803 "value": "%PROFILE_ID:COOKIE%" 40804 }, 40805 { 40806 "name": "eVar21", 40807 "type": "value", 40808 "value": "%PAGE_URL%" 40809 }, 40810 { 40811 "name": "eVar27", 40812 "type": "value", 40813 "value": "%CONTENTTYPE:METATAG%" 40814 }, 40815 { 40816 "name": "eVar33", 40817 "type": "value", 40818 "value": "Course PLP filters" 40819 }, 40820 { 40821 "name": "eVar35", 40822 "type": "value", 40823 "value": "%event.detail.title%:%event.detail.filter%" 40824 }, 40825 { 40826 "name": "eVar56", 40827 "type": "value",
40828 "value": "%DETAILED_PAGENAME%" 40829 } 40830 ], 40831 "props": [ 40832 { 40833 "name": "prop2", 40834 "type": "alias", 40835 "value": "eVar27" 40836 }, 40837 { 40838 "name": "prop23", 40839 "type": "alias", 40840 "value": "eVar33" 40841 }, 40842 { 40843 "name": "prop33", 40844 "type": "alias", 40845 "value": "eVar21" 40846 } 40847 ], 40848 "events": [ 40849 { 40850 "name": "event30" 40851 } 40852 ] 40853 } 40854 } 40855 }, 40856 { 40857 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 40858 "settings": { 40859 "type": "link", 40860 "linkName": "Course PLP Filter", 40861 "linkType": "o" 40862 } 40863 }, 40864 { 40865 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 40866 "settings": {} 40867 } 40868 ] 40869 }, 40870 { 40871 "id": "RL9e20ab182b1e415bae1cc87bd03b7ff0", 40872 "name": "List1:PLR", 40873 "events": [ 40874 { 40875 "modulePath": "core/src/lib/events/windowLoaded.js", 40876 "settings": {}, 40877 "ruleOrder": 50.0 40878 }, 40879 { 40880 "modulePath": "core/src/lib/events/directCall.js", 40881 "settings": { 40882 "identifier": "captureVirtualPageLoad" 40883 }, 40884 "ruleOrder": 1.0 40885 } 40886 ], 40887 "conditions": [ 40888 { 40889 "modulePath": "core/src/lib/conditions/valueComparison.js", 40890 "settings": { 40891 "comparison": { 40892 "operator": "equals" 40893 }, 40894 "leftOperand": "%NICOM_PAGE%", 40895 "rightOperand": "true" 40896 } 40897 }, 40898 { 40899 "modulePath": "core/src/lib/conditions/customCode.js", 40900 "settings": { 40901 "source": function(event, target) { 40902 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 40903} 40904 } 40905 }, 40906 { 40907 "modulePath": "core/src/lib/conditions/valueComparison.js", 40908 "settings": { 40909 "comparison": { 40910 "operator": "doesNotEqual", 40911 "caseInsensitive": true 40912 }, 40913 "leftOperand": "%DisableAnalyticsCookie%", 40914 "rightOperand": "true" 40915 } 40916 } 40917 ], 40918 "actions": [ 40919 { 40920 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 40921 "settings": { 40922 "customSetup": { 40923 "source": function(event, s) { 40924 function getParameterByName(name, url = window.location.href) { 40925 name = name.replace(/[\[\]]/g, '\\$&'); 40926 var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), 40927 results = regex.exec(url); 40928 if (!results) return null; 40929 if (!results[2]) return ''; 40930 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 40931} 40932 40933var product = _satellite.getVar("PRODUCT:DL"); 40934s.list1 = ""; 40935if (typeof product[0] != "undefined"){ 40936 if (typeof product[0].productInfo != "undefined") { 40937 var modelName = product[0].productInfo.modelName; 40938 var productName = product[0].productInfo.productName; 40939 var versionId = product[0].productInfo.versionID; 40940 if (typeof versionId !== "undefined" && versionId !== ""){ 40941 s.list1 = versionId; 40942 } else if (typeof modelName !== "undefined" && modelName !== "") { 40943 s.list1 = modelName; 40944 } else if (typeof productName !== "undefined" && productName !== "") { 40945 s.list1 = productName; 40946 } 40947 } else if (typeof product[0].category !== "undefined") { 40948 var hardwareForm = product[0].category.hardwareForm; 40949 var categoryID = product[0].category.categoryID; 40950 var platformModule = product[0].category.platformModule; 40951 var category = product[0].category.category; 40952 var platformCategory = product[0].category.platformCategory; 40953 if (typeof hardwareForm !== "undefined" && hardwareForm !== "") { 40954 s.list1 = hardwareForm; 40955 } else if (typeof categoryID !== "undefined" && categoryID !== "") { 40956 s.list1 = categoryID; 40957 } else if (typeof platformModule !== "undefined" && platformModule !== "") { 40958 s.list1 = platformModule; 40959 } else if (typeof category !== "undefined" && category !== "") { 40960 s.list1 = category; 40961 } else if (typeof platformCategory !== "undefined" && platformCategory !== "") { 40962 s.list1 = platformCategory; 40963 } 40964 } 40965} 40966var productMetatag = _satellite.getVar("PRODUCTCATEGORIES:METATAG"); 40967if (s.list1 === "" || isNaN(s.list1)) { 40968 if (productMetatag !== "") { 40969 s.list1 = productMetatag; 40970 } 40971} 40972 40973var template = _satellite.getVar("TEMPLATE:PI:PA:DL"); 40974if(template === "compare"){ 40975 s.list1 = getParameterByName("productcode"); 40976} 40977} 40978 }, 40979 "trackerProperties": {} 40980 } 40981 } 40982 ] 40983 }, 40984 { 40985 "id": "RL9e383e2ee181466c94fb0bf398f65594", 40986 "name": "Capture_User_Interaction:DCR", 40987 "events": [ 40988 { 40989 "modulePath": "core/src/lib/events/directCall.js", 40990 "settings": { 40991 "identifier": "captureUserInteraction" 40992 }, 40993 "ruleOrder": 50.0 40994 } 40995 ], 40996 "conditions": [ 40997 { 40998 "modulePath": "core/src/lib/conditions/valueComparison.js", 40999 "settings": { 41000 "comparison": { 41001 "operator": "doesNotEqual", 41002 "caseInsensitive": true 41003 }, 41004 "leftOperand": "%DisableAnalyticsCookie%", 41005 "rightOperand": "true" 41006 } 41007 }, 41008 { 41009 "modulePath": "core/src/lib/conditions/valueComparison.js", 41010 "settings": { 41011 "comparison": { 41012 "operator": "doesNotEqual", 41013 "caseInsensitive": true 41014 }, 41015 "leftOperand": "%TRAFFICTYPE_META%", 41016 "rightOperand": "bot" 41017 } 41018 } 41019 ], 41020 "actions": [ 41021 { 41022 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 41023 "settings": { 41024 "customSetup": { 41025 "source": function(event, s) { 41026 var eventName = event.detail.eventName; 41027var eventLabel = event.detail.eventLabel; 41028var eventDetail = event.detail.eventDetail; 41029var template = _satellite.getVar('TEMPLATE:PI:PA:DL'); 41030 41031NIAnalytics.setAndTrack("eVar125", template.length === 0 ? 'none' : template); 41032 41033NIAnalytics.setAndTrack(["eVar33", "prop23"], NIAnalytics.getCaptureNavigationLinkClickDetail
41033s(eventName, eventLabel, event.detail.eventDetail)); 41034 41035NIAnalytics.createNestedObject(digitalData, ["valueToHash"], ""); 41036 41037s.list1 = event.detail.relatedProductID; 41038var email = event.detail.email; 41039digitalData.valueToHash = email; 41040s.eVar101 = email !== "" ? _satellite.getVar('MD5_HASH') : ""; 41041 41042if(s.eVar101 === ""){ 41043 s.eVar101 = (typeof digitalData.user !== "undefined" && typeof digitalData.user.hashedEmail !== "undefined") ? digitalData.user.hashedEmail : ""; 41044} 41045 41046if (_satellite.getVar("INTERNALCAMPAIGN:AT:PA:DL") != "") { 41047 s.eVar41 = "Internal Campaign"; 41048 s.linkTrackVars += ",eVar41"; 41049} 41050 41051//chat eventDetails where we should enable v101 41052var eventDetailList = ["quote", "sales", "order", "subscribe", "contact other"]; 41053if(eventName === "chat" && eventDetailList.indexOf(eventDetail) < 0){ 41054 s.eVar101 = ""; 41055} 41056 41057if (s.eVar101 !== "") { 41058 _satellite.getVisitorId().setCustomerIDs({ 41059 "email_key":{ 41060 "id": s.eVar101, 41061 "authState": Visitor.AuthState.UNKNOWN 41062 } 41063 }); 41064} 41065 41066if(typeof digitalData !== "undefined" && digitalData.hasOwnProperty("page") && digitalData.page.hasOwnProperty("attributes") && digitalData.page.attributes.hasOwnProperty("tntParam") && typeof digitalData.page.attributes.tntParam !== "undefined"){ 41067 s.linkTrackVars += ",prop60"; 41068 s.prop60 = digitalData.page.attributes.tntParam; 41069} 41070 41071if (event.detail.items) { 41072 s.products = ";" + event.detail.items.replace(/,/g, ",;") 41073 s.linkTrackVars += ",products"; 41074} 41075s.linkTrackVars+=",eVar101,list1"; 41076 41077if(["innovations automotive","eloqua form"].indexOf(eventName) > -1){ 41078 NIAnalytics.setAndTrack("eVar79", eventLabel); 41079} 41080 41081if(eventName === "continueshopupsell"){ 41082 NIAnalytics.setAndTrack("eVar41", "continueshopping"); 41083} 41084 41085if(event.detail.optin){ 41086 NIAnalytics.setAndTrack("eVar151", event.detail.optin); 41087} 41088} 41089 }, 41090 "trackerProperties": { 41091 "eVars": [ 41092 { 41093 "name": "eVar1", 41094 "type": "value", 41095 "value": "%PAGE_NAME%" 41096 }, 41097 { 41098 "name": "eVar3", 41099 "type": "value", 41100 "value": "%event.detail.internalCampaign%" 41101 }, 41102 { 41103 "name": "eVar21", 41104 "type": "value", 41105 "value": "%PAGE_URL%" 41106 }, 41107 { 41108 "name": "eVar27", 41109 "type": "value", 41110 "value": "%CONTENTTYPE:METATAG%" 41111 }, 41112 { 41113 "name": "eVar56", 41114 "type": "value", 41115 "value": "%DETAILED_PAGENAME%" 41116 } 41117 ], 41118 "props": [ 41119 { 41120 "name": "prop2", 41121 "type": "alias", 41122 "value": "eVar27" 41123 }, 41124 { 41125 "name": "prop33", 41126 "type": "alias", 41127 "value": "eVar21" 41128 }, 41129 { 41130 "name": "prop40", 41131 "type": "value", 41132 "value": "%APPLICATIONAREA_S:METATAG%" 41133 }, 41134 { 41135 "name": "prop50", 41136 "type": "value", 41137 "value": "%DETAILED_PAGENAME%" 41138 } 41139 ], 41140 "events": [ 41141 { 41142 "name": "event30" 41143 } 41144 ], 41145 "pageName": "%PAGE_NAME%" 41146 } 41147 } 41148 }, 41149 { 41150 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 41151 "settings": { 41152 "type": "link", 41153 "linkName": "user interaction", 41154 "linkType": "o" 41155 } 41156 }, 41157 { 41158 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 41159 "settings": {} 41160 } 41161 ] 41162 }, 41163 { 41164 "id": "RL9fb9cabb3e4e443b98685adf4078a06d", 41165 "name": "Capture_Navigation:DCR", 41166 "events": [ 41167 { 41168 "modulePath": "core/src/lib/events/directCall.js", 41169 "settings": { 41170 "identifier": "captureNavigation" 41171 }, 41172 "ruleOrder": 50.0 41173 } 41174 ], 41175 "conditions": [ 41176 { 41177 "modulePath": "core/src/lib/conditions/valueComparison.js", 41178 "settings": { 41179 "comparison": { 41180 "operator": "doesNotEqual", 41181 "caseInsensitive": true 41182 }, 41183 "leftOperand": "%DisableAnalyticsCookie%", 41184 "rightOperand": "true" 41185 } 41186 }, 41187 { 41188 "modulePath": "core/src/lib/conditions/valueComparison.js", 41189 "settings": { 41190 "comparison": { 41191 "operator": "doesNotEqual", 41192 "caseInsensitive": true 41193 }, 41194 "leftOperand": "%TRAFFICTYPE_META%", 41195 "rightOperand": "bot" 41196 } 41197 } 41198 ], 41199 "actions": [ 41200 { 41201 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 41202 "settings": { 41203 "customSetup": { 41204 "source": function(event, s) { 41205 var eventName = event.detail.eventName; 41206var eventLabel = event.detail.eventLabel; 41207var eventDetail = event.detail.eventDetail; 41208 41209NIAnalytics.setAndTrack(["eVar33", "prop23"], NIAnalytics.getCaptureNavigationLinkClickDetail
41209s(eventName, eventLabel, event.detail.eventDetail)); 41210 41211NIAnalytics.createNestedObject(digitalData, ["valueToHash"], ""); 41212 41213s.list1 = event.detail.relatedProductID; 41214var email = event.detail.email; 41215digitalData.valueToHash = email; 41216s.eVar101 = email !== "" ? _satellite.getVar('MD5_HASH') : ""; 41217 41218if(s.eVar101 === ""){ 41219 s.eVar101 = (typeof digitalData.user !== "undefined" && typeof digitalData.user.hashedEmail !== "undefined") ? digitalData.user.hashedEmail : ""; 41220} 41221 41222if (_satellite.getVar("INTERNALCAMPAIGN:AT:PA:DL") != "") { 41223 s.eVar41 = "Internal Campaign"; 41224 s.linkTrackVars += ",eVar41"; 41225} 41226 41227//chat eventDetails where we should enable v101 41228var eventDetailList = ["quote", "sales", "order", "subscribe", "contact other"]; 41229if(eventName === "chat" && eventDetailList.indexOf(eventDetail) < 0){ 41230 s.eVar101 = ""; 41231} 41232 41233if (s.eVar101 !== "") { 41234 _satellite.getVisitorId().setCustomerIDs({ 41235 "email_key":{ 41236 "id": s.eVar101, 41237 "authState": Visitor.AuthState.UNKNOWN 41238 } 41239 }); 41240} 41241 41242if(typeof digitalData !== "undefined" && digitalData.hasOwnProperty("page") && digitalData.page.hasOwnProperty("attributes") && digitalData.page.attributes.hasOwnProperty("tntParam") && typeof digitalData.page.attributes.tntParam !== "undefined"){ 41243 s.linkTrackVars += ",prop60"; 41244 s.prop60 = digitalData.page.attributes.tntParam; 41245} 41246 41247if (event.detail.items) { 41248 s.products = ";" + event.detail.items.replace(/,/g, ",;") 41249 s.linkTrackVars += ",products"; 41250} 41251s.linkTrackVars+=",eVar101,list1"; 41252 41253if(["innovations automotive","eloqua form"].indexOf(eventName) > -1){ 41254 NIAnalytics.setAndTrack("eVar79", eventLabel); 41255} 41256 41257if(eventName === "continueshopupsell"){ 41258 NIAnalytics.setAndTrack("eVar41", "continueshopping"); 41259} 41260 41261if(event.detail.optin){ 41262 NIAnalytics.setAndTrack("eVar151", event.detail.optin); 41263} 41264} 41265 }, 41266 "trackerProperties": { 41267 "eVars": [ 41268 { 41269 "name": "eVar1", 41270 "type": "value", 41271 "value": "%PAGE_NAME%" 41272 }, 41273 { 41274 "name": "eVar3", 41275 "type": "value", 41276 "value": "%event.detail.internalCampaign%" 41277 }, 41278 { 41279 "name": "eVar12", 41280 "type": "value", 41281 "value": "%PROFILE_ID:COOKIE%" 41282 }, 41283 { 41284 "name": "eVar21", 41285 "type": "value", 41286 "value": "%PAGE_URL%" 41287 }, 41288 { 41289 "name": "eVar27", 41290 "type": "value", 41291 "value": "%CONTENTTYPE:METATAG%" 41292 }, 41293 { 41294 "name": "eVar56", 41295 "type": "value", 41296 "value": "%DETAILED_PAGENAME%" 41297 } 41298 ], 41299 "props": [ 41300 { 41301 "name": "prop2", 41302 "type": "alias", 41303 "value": "eVar27" 41304 }, 41305 { 41306 "name": "prop33", 41307 "type": "alias", 41308 "value": "eVar21" 41309 }, 41310 { 41311 "name": "prop50", 41312 "type": "value", 41313 "value": "%DETAILED_PAGENAME%" 41314 } 41315 ], 41316 "events": [ 41317 { 41318 "name": "event30" 41319 } 41320 ], 41321 "pageName": "%PAGE_NAME%" 41322 } 41323 } 41324 }, 41325 { 41326 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 41327 "settings": { 41328 "type": "link", 41329 "linkName": "navigation", 41330 "linkType": "o" 41331 } 41332 }, 41333 { 41334 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 41335 "settings": {} 41336 } 41337 ] 41338 }, 41339 { 41340 "id": "RLa122b07a520a4e8ea2909fe8a6fc5fe6", 41341 "name": "SearchPageNumberClick:EBR", 41342 "events": [ 41343 { 41344 "modulePath": "core/src/lib/events/customEvent.js", 41345 "settings": { 41346 "type": "aa-search-navigation", 41347 "bubbleFireIfParent": true, 41348 "bubbleFireIfChildFired": true 41349 }, 41350 "ruleOrder": 50.0 41351 } 41352 ], 41353 "conditions": [ 41354 { 41355 "modulePath": "core/src/lib/conditions/valueComparison.js", 41356 "settings": { 41357 "comparison": { 41358 "operator": "doesNotEqual", 41359 "caseInsensitive": true 41360 }, 41361 "leftOperand": "%DisableAnalyticsCookie%", 41362 "rightOperand": "true" 41363 } 41364 }, 41365 { 41366 "modulePath": "core/src/lib/conditions/valueComparison.js", 41367 "settings": { 41368 "comparison": { 41369 "operator": "doesNotEqual", 41370 "caseInsensitive": true 41371 }, 41372 "leftOperand": "%TRAFFICTYPE_META%", 41373 "rightOperand": "bot" 41374 } 41375 } 41376 ], 41377 "actions": [ 41378 { 41379 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 41380 "settings": { 41381 "customSetup": { 41382 "source": function(event, s) { 41383 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.detail.pageNumber); 41384} 41385 }, 41386 "trackerProperties": { 41387 "eVars": [ 41388 { 41389 "name": "eVar1", 41390 "type": "value", 41391 "value": "search-navigation" 41392 }, 41393 { 41394 "name": "eVar3", 41395 "type": "value", 41396 "value": "%ICID:URL_PARAM%" 41397 }, 41398 { 41399 "name": "eVar9", 41400 "type": "value", 41401 "value": "%LOGGED_IN%" 41402 }, 41403 { 41404 "name": "eVar10", 41405 "type": "value", 41406 "value": "%LANGUAGE:METATAG%" 41407 }, 41408 { 41409 "name": "eVar11", 41410 "type": "value", 41411 "value": "%LOCALE:COOKIE%" 41412 }, 41413 { 41414 "name": "eVar12", 41415 "type": "value", 41416 "value": "%PROFILE_ID:COOKIE%" 41417 }, 41418 { 41419 "name": "eVar13", 41420 "type": "value", 41421 "value": "%ESPUID:URL_PARAM%" 41422 }, 41423 { 41424 "name": "eVar21", 41425 "type": "value", 41426 "value": "%PAGE_URL%" 41427 }, 41428 { 41429 "name": "eVar27", 41430 "type": "value", 41431 "value": "%CONTENTTYPE:METATAG%" 41432 }, 41433 { 41434 "name": "eVar31", 41435 "type": "value", 41436 "value": "%PRODREF%" 41437 }, 41438 { 41439 "name": "eVar36", 41440 "type": "value",
41441 "value": "%DOMAIN%" 41442 }, 41443 { 41444 "name": "eVar41", 41445 "type": "value", 41446 "value": "Internal Search" 41447 }, 41448 { 41449 "name": "eVar56", 41450 "type": "value", 41451 "value": "sitewide:results" 41452 }, 41453 { 41454 "name": "eVar59", 41455 "type": "value", 41456 "value": "search-navigation" 41457 }, 41458 { 41459 "name": "eVar64", 41460 "type": "value", 41461 "value": "%DOCUMENTCOREID:METATAG%" 41462 }, 41463 { 41464 "name": "eVar67", 41465 "type": "value", 41466 "value": "%WORD_COUNT%" 41467 }, 41468 { 41469 "name": "eVar68", 41470 "type": "value", 41471 "value": "%LINK_COUNT%" 41472 }, 41473 { 41474 "name": "eVar69", 41475 "type": "value", 41476 "value": "%KEYWORDS_PART1:METATAG%" 41477 }, 41478 { 41479 "name": "eVar70", 41480 "type": "value", 41481 "value": "%KEYWORDS_PART2:METATAG%" 41482 }, 41483 { 41484 "name": "eVar73", 41485 "type": "value", 41486 "value": "%ASSESSMENT_PERSONA%" 41487 }, 41488 { 41489 "name": "eVar74", 41490 "type": "value", 41491 "value": "%HTML_TITLE%" 41492 }, 41493 { 41494 "name": "eVar88", 41495 "type": "value", 41496 "value": "%6SENSE_SICCODE%" 41497 }, 41498 { 41499 "name": "eVar102", 41500 "type": "value", 41501 "value": "%KEYWORDS_COUNT%" 41502 }, 41503 { 41504 "name": "eVar103", 41505 "type": "value", 41506 "value": "%TITLE_LENGTH%" 41507 }, 41508 { 41509 "name": "eVar109", 41510 "type": "value", 41511 "value": "%PRODUCT_MANUFACTURER:DL%" 41512 }, 41513 { 41514 "name": "eVar110", 41515 "type": "value", 41516 "value": "%PCID%" 41517 }, 41518 { 41519 "name": "eVar122", 41520 "type": "value", 41521 "value": "%LETTER_COUNT%" 41522 }, 41523 { 41524 "name": "eVar124", 41525 "type": "value", 41526 "value": "%WRAPPER:METATAG%|%WRAPPERID:METATAG%" 41527 }, 41528 { 41529 "name": "eVar125", 41530 "type": "value", 41531 "value": "searchResults" 41532 }, 41533 { 41534 "name": "eVar130", 41535 "type": "value", 41536 "value": "%EXPERIENCE_CLOUD_ID%" 41537 }, 41538 { 41539 "name": "eVar137", 41540 "type": "value", 41541 "value": "%SEO_H1_VALUES%" 41542 }, 41543 { 41544 "name": "eVar138", 41545 "type": "value", 41546 "value": "%SEO_H2_VALUES%" 41547 }, 41548 { 41549 "name": "eVar139", 41550 "type": "value", 41551 "value": "%SEO_H3_VALUES%" 41552 }, 41553 { 41554 "name": "eVar140", 41555 "type": "value", 41556 "value": "%DESCRIPTION:METATAG%" 41557 }, 41558 { 41559 "name": "eVar143", 41560 "type": "value", 41561 "value": "6Sense" 41562 }, 41563 { 41564 "name": "eVar152", 41565 "type": "value", 41566 "value": "%OneTrust_STATUS%" 41567 } 41568 ], 41569 "props": [ 41570 { 41571 "name": "prop1", 41572 "type": "value", 41573 "value": "navigation" 41574 }, 41575 { 41576 "name": "prop2", 41577 "type": "alias", 41578 "value": "eVar27" 41579 }, 41580 { 41581 "name": "prop4", 41582 "type": "alias", 41583 "value": "eVar2" 41584 }, 41585 { 41586 "name": "prop12", 41587 "type": "alias", 41588 "value": "eVar74" 41589 }, 41590 { 41591 "name": "prop13", 41592 "type": "alias", 41593 "value": "eVar124" 41594 }, 41595 { 41596 "name": "prop20", 41597 "type": "value", 41598 "value": "Search app" 41599 }, 41600 { 41601 "name": "prop21", 41602 "type": "value", 41603 "value": "%INDUSTRY:AT:PA:DL%" 41604 }, 41605 { 41606 "name": "prop23", 41607 "type": "alias", 41608 "value": "eVar1" 41609 }, 41610 { 41611 "name": "prop27", 41612 "type": "alias", 41613 "value": "eVar59" 41614 }, 41615 { 41616 "name": "prop28", 41617 "type": "value", 41618 "value": "sitewide" 41619 }, 41620 { 41621 "name": "prop29", 41622 "type": "value", 41623 "value": "sitewide:results" 41624 }, 41625 { 41626 "name": "prop30", 41627 "type": "value", 41628 "value": "sitewide:results" 41629 }, 41630 { 41631 "name": "prop31", 41632 "type": "alias", 41633 "value": "eVar36" 41634 }, 41635 { 41636 "name": "prop33", 41637 "type": "alias", 41638 "value": "eVar21" 41639 }, 41640 { 41641 "name": "prop38", 41642 "type": "alias", 41643 "value": "eVar88" 41644 }, 41645 { 41646 "name": "prop50", 41647 "type": "alias", 41648 "value": "eVar56" 41649 }, 41650 { 41651 "name": "prop75", 41652 "type": "value", 41653 "value": "client" 41654 } 41655 ], 41656 "events": [ 41657 { 41658 "name": "event78" 41659 } 41660 ] 41661 } 41662 } 41663 }, 41664 { 41665 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 41666 "settings": { 41667 "type": "link", 41668 "linkType": "o" 41669 } 41670 }, 41671 { 41672 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 41673 "settings": {} 41674 } 41675 ] 41676 }, 41677 { 41678 "id": "RLa1c9ba82511546d2bca66dc3e39a4e33", 41679 "name": "Google_Adwords_Quote:PLR", 41680 "events": [ 41681 { 41682 "modulePath": "core/src/lib/events/windowLoaded.js", 41683 "settings": {}, 41684 "ruleOrder": 50.0 41685 } 41686 ], 41687 "conditions": [ 41688 { 41689 "modulePath": "core/src/lib/conditions/valueComparison.js", 41690 "settings": { 41691 "comparison": { 41692 "operator": "isTrue" 41693 }, 41694 "leftOperand": "%OneTrust_Targeting_Consent%" 41695 } 41696 }, 41697 { 41698 "modulePath": "core/src/lib/conditions/valueComparison.js", 41699 "settings": { 41700 "comparison": { 41701 "operator": "doesNotEqual", 41702 "caseInsensitive": true 41703 }, 41704 "leftOperand": "%DisableAnalyticsCookie%", 41705 "rightOperand": "true" 41706 } 41707 }, 41708 { 41709 "modulePath": "core/src/lib/conditions/customCode.js", 41710 "settings": { 41711 "source": function(event, target) { 41712 var filter = [ 41713 "sine.ni.com/apps/utf8/niwq.request_instant_quote", 41714 "sine.ni.com/apps/utf8/niwq.rq2", 41715 "sine.ni.com/apps/utf8/niwq.auto_create_quote" 41716]; 41717return filter.indexOf(_satellite.getVar("PAGE_NAME")) > -1; 41718} 41719 } 41720 } 41721 ], 41722 "actions": [ 41723 { 41724 "modulePath": "core/src/lib/actions/customCode.js", 41725 "settings": { 41726 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC23f012b665d140a4af329e74609bcf6c-source.js', 41727 "language": "javascript", 41728 "isExternal": true 41729 } 41730 }, 41731 { 41732 "modulePath": "core/src/lib/actions/customCode.js", 41733 "settings": { 41734 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCbe75a44dd50a4c93a4eda4ba3e5a495e-source.js', 41735 "language": "javascript", 41736 "isExternal": true 41737 } 41738 } 41739 ] 41740 }, 41741 { 41742 "id": "RLa2f1bc5efaff48ecb9131e0cd8da9417", 41743 "name": "Renew SSP Additional Products CTA Click:EBR", 41744 "events": [ 41745 { 41746 "modulePath": "core/src/lib/events/customEvent.js", 41747 "settings": { 41748 "type": "aa-ssp-renewal-add-cta-click", 41749 "bubbleFireIfParent": true, 41750 "bubbleFireIfChildFired": true 41751 }, 41752 "ruleOrder": 50.0 41753 } 41754 ], 41755 "conditions": [], 41756 "actions": [ 41757 { 41758 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 41759 "settings": { 41760 "customSetup": { 41761 "source": function(event, s) { 41762 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Renewal SSP_step2:"+event.detail.title+":"+event.detail.label); 41763} 41764 }, 41765 "trackerProperties": { 41766 "eVars": [ 41767 { 41768 "name": "eVar1", 41769 "type": "value", 41770 "value": "%PAGE_NAME%" 41771 }, 41772 { 41773 "name": "eVar12", 41774 "type": "value", 41775 "value": "%PROFILE_ID:COOKIE%" 41776 }, 41777 { 41778 "name": "eVar21", 41779 "type": "value", 41780 "value": "%PAGE_URL%" 41781 }, 41782 { 41783 "name": "eVar27", 41784 "type": "value", 41785 "value": "%CONTENTTYPE:METATAG%" 41786 } 41787 ], 41788 "props": [ 41789 { 41790 "name": "prop2", 41791 "type": "alias", 41792 "value": "eVar27" 41793 }, 41794 { 41795 "name": "prop33", 41796 "type": "alias", 41797 "value": "eVar21" 41798 } 41799 ], 41800 "events": [ 41801 { 41802 "name": "event30" 41803 } 41804 ] 41805 } 41806 } 41807 }, 41808 { 41809 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 41810 "settings": { 41811 "type": "link", 41812 "linkName": "Renew SSP Additional Products CTA Click", 41813 "linkType": "o" 41814 } 41815 }, 41816 { 41817 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 41818 "settings": {} 41819 } 41820 ] 41821 }, 41822 { 41823 "id": "RLa4fa4ada848c45d2a5be66ee873422bc", 41824 "name": "DCR_POC:DCR", 41825 "events": [ 41826 { 41827 "modulePath": "core/src/lib/events/directCall.js", 41828 "settings": { 41829 "identifier": "dcr_poc" 41830 }, 41831 "ruleOrder": 50.0 41832 } 41833 ], 41834 "conditions": [], 41835 "actions": [ 41836 { 41837 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 41838 "settings": { 41839 "trackerProperties": { 41840 "eVars": [ 41841 { 41842 "name": "eVar101", 41843 "type": "value", 41844 "value": "%event.detail.email%" 41845 }, 41846 { 41847 "name": "eVar124", 41848 "type": "value", 41849 "value": "%event.detail.wrapper%" 41850 }, 41851 { 41852 "name": "eVar67", 41853 "type": "value", 41854 "value": "%event.detail.wordCount%" 41855 } 41856 ] 41857 } 41858 } 41859 }, 41860 { 41861 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 41862 "settings": { 41863 "type": "page" 41864 } 41865 }, 41866 { 41867 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 41868 "settings": {} 41869 } 41870 ] 41871 }, 41872 { 41873 "id": "RLa51e6f1d939d4125a7bc44897544b63f", 41874 "name": "Capture_User_Account_Creation:DCR", 41875 "events": [ 41876 { 41877 "modulePath": "core/src/lib/events/directCall.js", 41878 "settings": { 41879 "identifier": "captureUserAccountCreation" 41880 }, 41881 "ruleOrder": 50.0 41882 } 41883 ], 41884 "conditions": [ 41885 { 41886 "modulePath": "core/src/lib/conditions/valueComparison.js", 41887 "settings": { 41888 "comparison": { 41889 "operator": "doesNotEqual", 41890 "caseInsensitive": true 41891 }, 41892 "leftOperand": "%DisableAnalyticsCookie%", 41893 "rightOperand": "true" 41894 } 41895 }, 41896 { 41897 "modulePath": "core/src/lib/conditions/valueComparison.js", 41898 "settings": { 41899 "comparison": { 41900 "operator": "doesNotEqual", 41901 "caseInsensitive": true 41902 }, 41903 "leftOperand": "%TRAFFICTYPE_META%", 41904 "rightOperand": "bot" 41905 } 41906 } 41907 ], 41908 "actions": [ 41909 { 41910 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 41911 "settings": { 41912 "customSetup": { 41913 "source": function(event, s) { 41914 switch(event.detail.eventName) { 41915 case "start": 41916 s.events += s.events === "" ? "event25,event27" : ",event25,event27"; 41917 s.linkTrackEvents +=",event25,event27"; 41918 NIAnalytics.setAndTrack("eVar29", "User Account Start"); 41919 break; 41920 41921 case "complete": 41922 s.events += s.events === "" ? "event26,event28" : ",event26,event28"; 41923 s.linkTrackEvents +=",event26,event28"; 41924 NIAnalytics.setAndTrack("eVar29", "User Account Complete"); 41925 break; 41926 41927 default: 41928 break; 41929} 41930NIAnalytics.setAndTrack("eVar147", event.detail.datetime); 41931} 41932 }, 41933 "trackerProperties": { 41934 "eVars": [ 41935 { 41936 "name": "eVar1", 41937 "type": "value", 41938 "value": "%PAGE_NAME%" 41939 }, 41940 { 41941 "name": "eVar28", 41942 "type": "value", 41943 "value": "User Account" 41944 }, 41945 { 41946 "name": "eVar56", 41947 "type": "value",
41948 "value": "%DETAILED_PAGENAME%" 41949 } 41950 ], 41951 "props": [ 41952 { 41953 "name": "prop23", 41954 "type": "alias", 41955 "value": "eVar1" 41956 }, 41957 { 41958 "name": "prop50", 41959 "type": "alias", 41960 "value": "eVar56" 41961 } 41962 ], 41963 "pageName": "%PAGE_NAME%" 41964 } 41965 } 41966 }, 41967 { 41968 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 41969 "settings": { 41970 "type": "link", 41971 "linkType": "o" 41972 } 41973 }, 41974 { 41975 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 41976 "settings": {} 41977 } 41978 ] 41979 }, 41980 { 41981 "id": "RLa51fe15c1508448c90aa9b13f3c04957", 41982 "name": "Error_Page:PLR", 41983 "events": [ 41984 { 41985 "modulePath": "core/src/lib/events/windowLoaded.js", 41986 "settings": {}, 41987 "ruleOrder": 50.0 41988 }, 41989 { 41990 "modulePath": "core/src/lib/events/directCall.js", 41991 "settings": { 41992 "identifier": "captureVirtualPageLoad" 41993 }, 41994 "ruleOrder": 50.0 41995 } 41996 ], 41997 "conditions": [ 41998 { 41999 "modulePath": "core/src/lib/conditions/valueComparison.js", 42000 "settings": { 42001 "comparison": { 42002 "operator": "doesNotEqual", 42003 "caseInsensitive": true 42004 }, 42005 "leftOperand": "%DisableAnalyticsCookie%", 42006 "rightOperand": "true" 42007 } 42008 }, 42009 { 42010 "modulePath": "core/src/lib/conditions/valueComparison.js", 42011 "settings": { 42012 "comparison": { 42013 "operator": "equals" 42014 }, 42015 "leftOperand": "%PAGETYPE:METATAG%", 42016 "rightOperand": "errorPage" 42017 } 42018 }, 42019 { 42020 "modulePath": "core/src/lib/conditions/valueComparison.js", 42021 "settings": { 42022 "comparison": { 42023 "operator": "equals" 42024 }, 42025 "leftOperand": "%NICOM_PAGE%", 42026 "rightOperand": "true" 42027 } 42028 } 42029 ], 42030 "actions": [ 42031 { 42032 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42033 "settings": { 42034 "customSetup": { 42035 "source": function(event, s) { 42036 s.pageType = "errorPage"; 42037 42038} 42039 } 42040 } 42041 } 42042 ] 42043 }, 42044 { 42045 "id": "RLa74d321d23d3401fbeaca689dcedcb8d", 42046 "name": "Survey_X_Clicked:EBR", 42047 "events": [ 42048 { 42049 "modulePath": "core/src/lib/events/click.js", 42050 "settings": { 42051 "elementSelector": "svg#close,svg#analytics-close-modal", 42052 "bubbleFireIfChildFired": false 42053 }, 42054 "ruleOrder": 50.0 42055 } 42056 ], 42057 "conditions": [ 42058 { 42059 "modulePath": "core/src/lib/conditions/pathAndQuerystring.js", 42060 "settings": { 42061 "paths": [ 42062 { 42063 "value": "voc=nowyoudont", 42064 "valueIsRegex": true 42065 } 42066 ] 42067 }, 42068 "negate": true 42069 }, 42070 { 42071 "modulePath": "core/src/lib/conditions/valueComparison.js", 42072 "settings": { 42073 "comparison": { 42074 "operator": "doesNotEqual", 42075 "caseInsensitive": true 42076 }, 42077 "leftOperand": "%DisableAnalyticsCookie%", 42078 "rightOperand": "true" 42079 } 42080 }, 42081 { 42082 "modulePath": "core/src/lib/conditions/valueComparison.js", 42083 "settings": { 42084 "comparison": { 42085 "operator": "doesNotEqual", 42086 "caseInsensitive": true 42087 }, 42088 "leftOperand": "%TRAFFICTYPE_META%", 42089 "rightOperand": "bot" 42090 } 42091 } 42092 ], 42093 "actions": [ 42094 { 42095 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42096 "settings": { 42097 "trackerProperties": { 42098 "eVars": [ 42099 { 42100 "name": "eVar1", 42101 "type": "value", 42102 "value": "%PAGE_NAME%" 42103 }, 42104 { 42105 "name": "eVar27", 42106 "type": "value", 42107 "value": "%CONTENTTYPE:METATAG%" 42108 }, 42109 { 42110 "name": "eVar40", 42111 "type": "value", 42112 "value": "X" 42113 } 42114 ] 42115 } 42116 } 42117 }, 42118 { 42119 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 42120 "settings": { 42121 "type": "link", 42122 "linkName": "", 42123 "linkType": "o" 42124 } 42125 }, 42126 { 42127 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 42128 "settings": {} 42129 } 42130 ] 42131 }, 42132 { 42133 "id": "RLaa9158f7f6dc46f18854e30492f27c9a", 42134 "name": "Secondary_Nav_Button_Click:EBR", 42135 "events": [ 42136 { 42137 "modulePath": "core/src/lib/events/click.js", 42138 "settings": { 42139 "elementSelector": ".hub-navigation a[data-analytics-cta-type], .hub-navigation button[data-analytics-cta-type], .sw-hub-dropdown-li a[data-analytics-cta-type]", 42140 "bubbleFireIfParent": true, 42141 "bubbleFireIfChildFired": false 42142 }, 42143 "ruleOrder": 50.0 42144 } 42145 ], 42146 "conditions": [ 42147 { 42148 "modulePath": "core/src/lib/conditions/valueComparison.js", 42149 "settings": { 42150 "comparison": { 42151 "operator": "doesNotEqual", 42152 "caseInsensitive": true 42153 }, 42154 "leftOperand": "%DisableAnalyticsCookie%", 42155 "rightOperand": "true" 42156 } 42157 }, 42158 { 42159 "modulePath": "core/src/lib/conditions/valueComparison.js", 42160 "settings": { 42161 "comparison": { 42162 "operator": "doesNotEqual", 42163 "caseInsensitive": true 42164 }, 42165 "leftOperand": "%TRAFFICTYPE_META%", 42166 "rightOperand": "bot" 42167 } 42168 } 42169 ], 42170 "actions": [ 42171 { 42172 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42173 "settings": { 42174 "customSetup": { 42175 "source": function(event, s) { 42176 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SecondaryNav:" + event.target.innerText); 42177} 42178 }, 42179 "trackerProperties": { 42180 "eVars": [ 42181 { 42182 "name": "eVar1", 42183 "type": "value", 42184 "value": "%PAGE_NAME%" 42185 }, 42186 { 42187 "name": "eVar12", 42188 "type": "value", 42189 "value": "%PROFILE_ID:COOKIE%" 42190 }, 42191 { 42192 "name": "eVar21", 42193 "type": "value", 42194 "value": "%PAGE_URL%" 42195 }, 42196 { 42197 "name": "eVar27", 42198 "type": "value", 42199 "value": "%CONTENTTYPE:METATAG%" 42200 }, 42201 { 42202 "name": "eVar56", 42203 "type": "value",
42204 "value": "%DETAILED_PAGENAME%" 42205 } 42206 ], 42207 "props": [ 42208 { 42209 "name": "prop2", 42210 "type": "alias", 42211 "value": "eVar27" 42212 }, 42213 { 42214 "name": "prop33", 42215 "type": "alias", 42216 "value": "eVar21" 42217 } 42218 ], 42219 "events": [ 42220 { 42221 "name": "event30" 42222 } 42223 ] 42224 } 42225 } 42226 }, 42227 { 42228 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 42229 "settings": { 42230 "type": "link", 42231 "linkName": "aa-react-link", 42232 "linkType": "o" 42233 } 42234 }, 42235 { 42236 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 42237 "settings": {} 42238 } 42239 ] 42240 }, 42241 { 42242 "id": "RLaba68903339d40a8bce6662b3dd3f19a", 42243 "name": "ProductConfigModalClick:DCR", 42244 "events": [ 42245 { 42246 "modulePath": "core/src/lib/events/customEvent.js", 42247 "settings": { 42248 "type": "aa-product-configuration-button", 42249 "bubbleFireIfParent": true, 42250 "bubbleFireIfChildFired": true 42251 }, 42252 "ruleOrder": 50.0 42253 } 42254 ], 42255 "conditions": [ 42256 { 42257 "modulePath": "core/src/lib/conditions/valueComparison.js", 42258 "settings": { 42259 "comparison": { 42260 "operator": "doesNotEqual", 42261 "caseInsensitive": true 42262 }, 42263 "leftOperand": "%DisableAnalyticsCookie%", 42264 "rightOperand": "true" 42265 } 42266 }, 42267 { 42268 "modulePath": "core/src/lib/conditions/valueComparison.js", 42269 "settings": { 42270 "comparison": { 42271 "operator": "doesNotEqual", 42272 "caseInsensitive": true 42273 }, 42274 "leftOperand": "%TRAFFICTYPE_META%", 42275 "rightOperand": "bot" 42276 } 42277 } 42278 ], 42279 "actions": [ 42280 { 42281 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42282 "settings": { 42283 "customSetup": { 42284 "source": function(event, s) { 42285 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Product Config Modal:"+ event.detail.tabName+":"+event.detail.buttonName); 42286 42287} 42288 }, 42289 "trackerProperties": { 42290 "eVars": [ 42291 { 42292 "name": "eVar1", 42293 "type": "value", 42294 "value": "%PAGE_NAME%" 42295 }, 42296 { 42297 "name": "eVar12", 42298 "type": "value", 42299 "value": "%PROFILE_ID:COOKIE%" 42300 }, 42301 { 42302 "name": "eVar21", 42303 "type": "value", 42304 "value": "%PAGE_URL%" 42305 }, 42306 { 42307 "name": "eVar27", 42308 "type": "value", 42309 "value": "%CONTENTTYPE:METATAG%" 42310 } 42311 ], 42312 "props": [ 42313 { 42314 "name": "prop2", 42315 "type": "alias", 42316 "value": "eVar27" 42317 }, 42318 { 42319 "name": "prop33", 42320 "type": "alias", 42321 "value": "eVar21" 42322 } 42323 ], 42324 "events": [ 42325 { 42326 "name": "event30" 42327 } 42328 ] 42329 } 42330 } 42331 }, 42332 { 42333 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 42334 "settings": { 42335 "type": "link", 42336 "linkName": "Product Configuration Modal", 42337 "linkType": "o" 42338 } 42339 }, 42340 { 42341 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 42342 "settings": {} 42343 } 42344 ] 42345 }, 42346 { 42347 "id": "RLad7b0c745c094fc28ca075e8c0caed68", 42348 "name": "Capture_Popular_Download:DCR", 42349 "events": [ 42350 { 42351 "modulePath": "core/src/lib/events/directCall.js", 42352 "settings": { 42353 "identifier": "capturePopularDownload" 42354 }, 42355 "ruleOrder": 50.0 42356 } 42357 ], 42358 "conditions": [ 42359 { 42360 "modulePath": "core/src/lib/conditions/valueComparison.js", 42361 "settings": { 42362 "comparison": { 42363 "operator": "doesNotEqual", 42364 "caseInsensitive": true 42365 }, 42366 "leftOperand": "%DisableAnalyticsCookie%", 42367 "rightOperand": "true" 42368 } 42369 }, 42370 { 42371 "modulePath": "core/src/lib/conditions/valueComparison.js", 42372 "settings": { 42373 "comparison": { 42374 "operator": "doesNotEqual", 42375 "caseInsensitive": true 42376 }, 42377 "leftOperand": "%TRAFFICTYPE_META%", 42378 "rightOperand": "bot" 42379 } 42380 } 42381 ], 42382 "actions": [ 42383 { 42384 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42385 "settings": { 42386 "customSetup": { 42387 "source": function(event, s) { 42388 s.getPreviousValue(s.eVar2, 'gpv_ps', ''); 42389//s.eVar127 = _satellite.getVar('CLICKTITLEURL:OSI:OS:DL'); 42390 42391s.pagename = _satellite.getVar("PAGE_NAME"); 42392//s.linkTrackVars = "eVar127"; 42393 42394if (s.eVar101){ 42395 _satellite.getVisitorId().setCustomerIDs({ 42396 "email_key":{ 42397 "id": s.eVar101, 42398 "authState": Visitor.AuthState.UNKNOWN 42399 } 42400 }); 42401} 42402 42403if (_satellite.getVar("INTERNALCAMPAIGN:AT:PA:DL") != "") {
42404 s.eVar41 = "Internal Campaign"; 42405 s.linkTrackVars += ",eVar41"; 42406} 42407 42408 42409//ContentSquare dynamic tracking 42410window._uxa = window._uxa || []; 42411window._uxa.push(["trackDynamicVariable", {key: 'Internal Campaign', value: _satellite.getVar('INTERNALCAMPAIGN:AT:PA:DL')} ]); 42412} 42413 }, 42414 "trackerProperties": { 42415 "eVars": [ 42416 { 42417 "name": "eVar1", 42418 "type": "value", 42419 "value": "%PAGE_NAME%" 42420 }, 42421 { 42422 "name": "eVar2", 42423 "type": "value", 42424 "value": "%ONSITESEARCHTERM:OSI:OS:DL%" 42425 }, 42426 { 42427 "name": "eVar3", 42428 "type": "value", 42429 "value": "%INTERNALCAMPAIGN:AT:PA:DL%" 42430 }, 42431 { 42432 "name": "eVar21", 42433 "type": "value", 42434 "value": "%PAGE_URL%" 42435 }, 42436 { 42437 "name": "eVar33", 42438 "type": "value", 42439 "value": "%CAPTURENAVIGATION_LINK_CLICK_DETAILS%" 42440 }, 42441 { 42442 "name": "eVar46", 42443 "type": "value", 42444 "value": "%ONSITESEARCHCLICKEDRANK:OSI:OS:DL%" 42445 }, 42446 { 42447 "name": "eVar47", 42448 "type": "value", 42449 "value": "%ONSITESEARCHCLICKTITLE:OSI:OS:DL%" 42450 }, 42451 { 42452 "name": "eVar48", 42453 "type": "value", 42454 "value": "%ONSITESEARCHTYPEDORSUGGESTED:OSI:OS:DL%" 42455 }, 42456 { 42457 "name": "eVar53", 42458 "type": "value", 42459 "value": "%ONSITESEARCHAUTOCOMPLETERANK:OSI:OS:DL%" 42460 }, 42461 { 42462 "name": "eVar56", 42463 "type": "value", 42464 "value": "%DETAILED_PAGENAME%" 42465 }, 42466 { 42467 "name": "eVar65", 42468 "type": "value", 42469 "value": "%ONSITESEARCHSCENARIO:OSI:OS:DL%" 42470 }, 42471 { 42472 "name": "eVar78", 42473 "type": "value", 42474 "value": "%ONSITESEARCHAUTOCOMPLETELOV:OSI:OS:DL%" 42475 }, 42476 { 42477 "name": "eVar101", 42478 "type": "value", 42479 "value": "%HASHED_EMAIL:USER:DL%" 42480 }, 42481 { 42482 "name": "eVar127", 42483 "type": "value", 42484 "value": "%CLICKTITLEURL:OSI:OS:DL%" 42485 }, 42486 { 42487 "name": "eVar152", 42488 "type": "value", 42489 "value": "%OneTrust_STATUS%" 42490 } 42491 ], 42492 "props": [ 42493 { 42494 "name": "prop4", 42495 "type": "alias", 42496 "value": "eVar2" 42497 }, 42498 { 42499 "name": "prop23", 42500 "type": "alias", 42501 "value": "eVar33" 42502 }, 42503 { 42504 "name": "prop33", 42505 "type": "alias", 42506 "value": "eVar21" 42507 }, 42508 { 42509 "name": "prop50", 42510 "type": "alias", 42511 "value": "eVar56" 42512 } 42513 ], 42514 "events": [ 42515 { 42516 "name": "event30" 42517 }, 42518 { 42519 "name": "event41" 42520 }, 42521 { 42522 "name": "event38" 42523 } 42524 ] 42525 } 42526 } 42527 }, 42528 { 42529 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 42530 "settings": { 42531 "type": "link", 42532 "linkName": "", 42533 "linkType": "o" 42534 } 42535 }, 42536 { 42537 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 42538 "settings": {} 42539 } 42540 ] 42541 }, 42542 { 42543 "id": "RLaeac1fa6f2c24900b69eb557a7254980", 42544 "name": "My_Profile_Payment_Methods:EBR", 42545 "events": [ 42546 { 42547 "modulePath": "core/src/lib/events/customEvent.js", 42548 "settings": { 42549 "type": "paymentMethodModalOpened", 42550 "bubbleFireIfParent": true, 42551 "bubbleFireIfChildFired": true 42552 }, 42553 "ruleOrder": 50.0 42554 } 42555 ], 42556 "conditions": [ 42557 { 42558 "modulePath": "core/src/lib/conditions/valueComparison.js", 42559 "settings": { 42560 "comparison": { 42561 "operator": "doesNotEqual", 42562 "caseInsensitive": true 42563 }, 42564 "leftOperand": "%DisableAnalyticsCookie%", 42565 "rightOperand": "true" 42566 } 42567 }, 42568 { 42569 "modulePath": "core/src/lib/conditions/valueComparison.js", 42570 "settings": { 42571 "comparison": { 42572 "operator": "doesNotEqual", 42573 "caseInsensitive": true 42574 }, 42575 "leftOperand": "%TRAFFICTYPE_META%", 42576 "rightOperand": "bot" 42577 } 42578 } 42579 ], 42580 "actions": [ 42581 { 42582 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42583 "settings": { 42584 "customSetup": { 42585 "source": function(event, s) { 42586 NIAnalytics.setAndTrack("eVar157", document.querySelectorAll(".analytics-mp-payment-card").length); 42587} 42588 }, 42589 "trackerProperties": { 42590 "eVars": [ 42591 { 42592 "name": "eVar1", 42593 "type": "value", 42594 "value": "%PAGE_NAME%" 42595 }, 42596 { 42597 "name": "eVar12", 42598 "type": "value", 42599 "value": "%PROFILE_ID:COOKIE%" 42600 }, 42601 { 42602 "name": "eVar21", 42603 "type": "value", 42604 "value": "%PAGE_URL%" 42605 }, 42606 { 42607 "name": "eVar27", 42608 "type": "value", 42609 "value": "%CONTENTTYPE:METATAG%" 42610 } 42611 ], 42612 "props": [ 42613 { 42614 "name": "prop2", 42615 "type": "alias", 42616 "value": "eVar27" 42617 }, 42618 { 42619 "name": "prop33", 42620 "type": "alias", 42621 "value": "eVar21" 42622 } 42623 ], 42624 "events": [ 42625 { 42626 "name": "event30" 42627 } 42628 ] 42629 } 42630 } 42631 }, 42632 { 42633 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 42634 "settings": { 42635 "type": "link", 42636 "linkType": "o" 42637 } 42638 }, 42639 { 42640 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 42641 "settings": {} 42642 } 42643 ] 42644 }, 42645 { 42646 "id": "RLafca8b97d7bf47ebb80d43da37a42e5a", 42647 "name": "StickyNavigation_Click:EBR", 42648 "events": [ 42649 { 42650 "modulePath": "core/src/lib/events/click.js", 42651 "settings": { 42652 "elementSelector": "[class*=\"StickyNavigation_nav\"]", 42653 "bubbleFireIfParent": true, 42654 "bubbleFireIfChildFired": false 42655 }, 42656 "ruleOrder": 50.0 42657 } 42658 ], 42659 "conditions": [ 42660 { 42661 "modulePath": "core/src/lib/conditions/valueComparison.js", 42662 "settings": { 42663 "comparison": { 42664 "operator": "doesNotEqual", 42665 "caseInsensitive": true 42666 }, 42667 "leftOperand": "%DisableAnalyticsCookie%", 42668 "rightOperand": "true" 42669 } 42670 }, 42671 { 42672 "modulePath": "core/src/lib/conditions/valueComparison.js", 42673 "settings": { 42674 "comparison": { 42675 "operator": "doesNotEqual", 42676 "caseInsensitive": true 42677 }, 42678 "leftOperand": "%TRAFFICTYPE_META%", 42679 "rightOperand": "bot" 42680 } 42681 } 42682 ], 42683 "actions": [ 42684 { 42685 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42686 "settings": { 42687 "customSetup": { 42688 "source": function(event, s) { 42689 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Anchor:" + event.target.innerText); 42690} 42691 }, 42692 "trackerProperties": { 42693 "eVars": [ 42694 { 42695 "name": "eVar1", 42696 "type": "value", 42697 "value": "%PAGE_NAME%" 42698 }, 42699 { 42700 "name": "eVar12", 42701 "type": "value", 42702 "value": "%PROFILE_ID:COOKIE%" 42703 }, 42704 { 42705 "name": "eVar21", 42706 "type": "value", 42707 "value": "%PAGE_URL%" 42708 }, 42709 { 42710 "name": "eVar27", 42711 "type": "value", 42712 "value": "%CONTENTTYPE:METATAG%" 42713 } 42714 ], 42715 "props": [ 42716 { 42717 "name": "prop2", 42718 "type": "alias", 42719 "value": "eVar27" 42720 }, 42721 { 42722 "name": "prop33", 42723 "type": "alias", 42724 "value": "eVar21" 42725 } 42726 ], 42727 "events": [ 42728 { 42729 "name": "event30" 42730 } 42731 ] 42732 } 42733 } 42734 }, 42735 { 42736 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 42737 "settings": { 42738 "type": "link", 42739 "linkName": "aa-react-link", 42740 "linkType": "o" 42741 } 42742 }, 42743 { 42744 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 42745 "settings": {} 42746 } 42747 ] 42748 }, 42749 { 42750 "id": "RLb1533f1bf0604fb3ab5ec7804ffb132d", 42751 "name": "API", 42752 "events": [ 42753 { 42754 "modulePath": "core/src/lib/events/libraryLoaded.js", 42755 "settings": {}, 42756 "ruleOrder": 1.0 42757 } 42758 ], 42759 "conditions": [ 42760 { 42761 "modulePath": "core/src/lib/conditions/valueComparison.js", 42762 "settings": { 42763 "comparison": { 42764 "operator": "equals" 42765 }, 42766 "leftOperand": "%NICOM_PAGE%", 42767 "rightOperand": "true" 42768 } 42769 } 42770 ], 42771 "actions": [ 42772 { 42773 "modulePath": "core/src/lib/actions/customCode.js", 42774 "settings": { 42775 "global": true, 42776 "source": "/* OneTrust Global callback */\nfunction OptanonWrapper() {\n window.oneTrustReady = true;\n\n /* If there was any consent */\n if (OptanonActiveGroups && OptanonActiveGroups.length > 0) {\n document.dispatchEvent(new Event(\"OneTrustConsentGiven\"));\n }\n}\n\n\nwindow.appEventData = window.appEventData || [];\n\nif (typeof digitalData === \"undefined\") {\n digitalData = {};\n}\n\nif (typeof digitalData.event === \"undefined\") {\n digitalData.event = [];\n}\n\nif (typeof NIAnalytics === \"undefined\") {\n function NIAnalytics() {}\n}\n\nNIAnalytics.ruleLogger = function (ruleName) {\n var isFirstRule = false;\n if (!document.getElementById(\"analytics-rulelogging-box\")) {\n var htmlElement = document.createElement(\"div\");\n htmlElement.classList.add('noindex');\n htmlElement.classList.add('nofollow');\n htmlElement.style.display = 'none';\n htmlElement.id = \"analytics-rulelogging-box\";\n document.body.append(htmlElement);\n isFirstRule = true;\n }\n\n var ruleBox = document.getElementById(\"analytics-rulelogging-box\");
42776\n ruleBox.innerHTML += isFirstRule ? ruleName : '|' + ruleName;\n};\n\nNIAnalytics.getMetaTag = function (name) {\n var metaTagArray = document.getElementsByTagName(\"meta\");\n for (var i = 0; i < metaTagArray.length; i++) {\n if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) {\n return metaTagArray[i].content;\n }\n }\n return \"\";\n}\n\nNIAnalytics.getMetaFromDataLayer = function(name) {\n return (typeof digitalData !== \"undefined\" && typeof digitalData.page !== \"undefined\" && typeof digitalData.page.pageInfo !== \"undefined\" && typeof digitalData.page.pageInfo[name] !== \"undefined\") ? digitalData.page.pageInfo[name] : \"\";\n}\n\nNIAnalytics.getDataElement = function (dataElement) {\n if ((typeof dataElement).toLowerCase() !== \"string\") {\n console.error(\"The typeof 'dataElement' parameter must be string!\");\n return;\n }\n\n var result = _satellite.getVar(dataElement);\n if (typeof result === \"undefined\" || result == undefined) {\n console.error(\"Unknown DataElement: \" + dataElement);\n return;\n } else {\n return result;\n }\n};\n\nNIAnalytics.setAndTrack = function (variableName, value) {\n if (window.s) {\n var acceptedVariableNamePrefixes = [\"eVar\", \"prop\", \"event\"];\n var acceptedVariableNames = [\"transactionID\", \"purchaseID\", \"state\", \"zip\", \"list1\", \"list2\", \"list3\", \"channel\", \"pageName\", \"currencyCode\", \"products\"];\n var builtInEvents = [\"purchase\", \"prodView\", \"scOpen\", \"scAdd\", \"scRemove\", \"scView\", \"scCheckout\"];\n\n if (['string', 'number'].indexOf((typeof value).toLowerCase()) < 0) {\n console.error(\"The typeof 'value' parameter must be string or number!\");\n return;\n }\n\n switch (typeof variableName) {\n case \"object\":\n\n variableName = variableName.sort();\n\n for (var i = 0; i < variableName.length; i++) {\n if (!/^eVar(?:[1-9][0-9]{0,1}|1[0-9]{0,2}|2[0-4]?[0-9]|250)$/.test(variableName[i]) && !/^prop(?:[1-9]{1}|[1-6]{1}[0-9]{1}|7[0-5]{1})$/.test(variableName[i]) && !/event(?:[1-9]{1}[0-9]{0,2}|1000)$/.test(variableName[i]) && acceptedVariableNames.indexOf(variableName[i]) === -1 && builtInEvents.indexOf(variableName[i]) === -1) {\n console.error(\"Unknown parameter: \" + variableName[i] + \"\\nAccepted param prefixes: \" + acceptedVariableNamePrefixes.join(\", \") + \"\\nAccepted params: \" + acceptedVariableNames.join(\", \") + \"\\nBuilt in events: \" + builtInEvents.join(\", \") + \"\\nVariable ranges:\\neVar: 1-250\\nprop: 1-75\\nevent: 1-1000\");\n return;\n }\n }\n\n var analyticsName = variableName[0].toLowerCase().replace(\"evar\", \"v\").replace(\"prop\", \"c\");\n for (var i = 0; i < variableName.length; i++) {\n\n if (i === 0 && (/^eVar/.test(variableName[i]) || /^prop/.test(variableName[i]))) {\n s[variableName[i]] = value;\n } else if (/^eVar/.test(variableName[i]) || /^prop/.test(variableName[i])) {\n s[variableName[i]] = \"D=\" + analyticsName;\n } else if (/^event/.test(variableName[i]) || builtInEvents.indexOf(variableName[i]) > -1) {\n if(value === \"\" || value === undefined) {\n s.events = s.events === \"None\" || s.events === undefined ? variableName[i] : s.events + \",\" + variableName[i];\n } else {\n s.events = s.events === \"None\" || s.events === undefined ? variableName[i]+\"=\"+value : s.events + \",\" + variableName[i]+\"=\"+value;\n }\n s.linkTrackEvents = s.linkTrackEvents === \"None\" ? variableName[i] : (s.linkTrackEvents + \",\" + variableName[i]).split(\",\").sort().filter(function (elem, index, self) {\n return index === self.indexOf(elem);\n }).join(\",\");\n } else {\n s[variableName[i]] = value;\n }\n\n if (/^eVar/.test(variableName[i]) || /^prop/.test(variableName[i]) || acceptedVariableNames.indexOf(variableName[i]) === -1) {\n s.linkTrackVars = s.linkTrackVars === \"None\" ? variableName[i] : (s.linkTrackVars + \",\" + variableName[i]).split(\",\").sort().filter(function (elem, index, self) {\n return index === self.indexOf(elem);\n }).join(\",\");\n }\n }\n\n\n break;\n\n case \"string\":\n default:\n if (!/^eVar(?:[1-9][0-9]{0,1}|1[0-9]{0,2}|2[0-4]?[0-9]|250)$/.test(variableName) && !/^prop(?:[1-9]{1}|[1-6]{1}[0-9]{1}|7[0-5]{1})$/.test(variableName) && !/event(?:[1-9]{1}[0-9]{0,2}|1000)$/.test(variableName) && acceptedVariableNames.indexOf(variableName) === -1 && builtInEvents.indexOf(variableName) === -1) {\n console.error(\"Unknown parameter: \" + variableName + \"\\nAccepted param prefixes: \" + acceptedVariableNamePrefixes.join(\", \") + \"\\nAccepted params: \" + acceptedVariableNames.join(\", \") + \"\\nBuilt in events: \" + builtInEvents.join(\", \") + \"\\nVariable ranges:\\neVar: 1-250\\nprop: 1-75\\nevent: 1-1000\");\n return;\n }\n\n if (/^event/.test(variableName) || builtInEvents.indexOf(variableName) > -1) {\n if(value === \"\" || value === undefined){\n s.events = s.events === \"None\" || s.events === undefined ? variableName : s.events + \",\" + variableName;\n } else {\n s.events = s.events === \"None\" || s.events === undefined ? variableName+\"=\"+value : s.events + \",\" + variableName+\"=\"+value;\n }\n s.linkTrackEvents = s.linkTrackEvents === \"None\" ? variableName : (s.linkTrackEvents + \",\" + variableName).split(\",\").sort().filter(function (elem, index, self) {\n return index === self.indexOf(elem);\n }).join(\",\");\n } else {\n s[variableName] = value;\n s.linkTrackVars = s.linkTrackVars === \"None\" ? variableName : (s.linkTrackVars + \",\" + variableName).split(\",\").sort().filter(function (elem, index, self) {\n return index === self.indexOf(elem);\n }).join(\",\");\n }\n break;\n\n }\n } else {\n console.error(\"Analytics object(s) has not been initialized!\");\n }\n};\n\nNIAnalytics.sendBeacon = function (json) {\n var acceptedProps = [\"asPageView\", \"linkType\", \"linkName\"];\n var acceptedLinkTypes = {\n \"o\": \"custom link\",\n \"d\": \"download link\",\n \"e\": \"exit link\"\n };\n\n var acceptedVariableNames = [\"transactionID\", \"purchaseID\", \"state\", \"zip\", \"list1\", \"list2\", \"list3\", \"channel\", \"pageName\"];\n var builtInEvents = [\"purchase\", \"prodView\", \"scOpen\", \"scAdd\", \"scRemove\", \"scView\", \"scCheckout\"];\n\n if (typeof (json) === \"undefined\") {\n console.error(\"Missing analytics parameter! Accepted params: \" + acceptedProps.join(\", \"));\n return;\n }\n \n if (NIAnalytics.getMetaTag(\"trafficType\").toLowerCase() == \"bot\"){\n return;\n }\n\n if (window.s) {\n for (var prop in json) {\n if (acceptedProps.indexOf(prop) === -1) {\n console.error(\"Unknown analytics parameter: \" + prop + \" Accepted params: \" + acceptedProps.join(\", \"));\n return;\n }\n\n if (json.hasOwnProperty(\"linkType\")) {\n switch (json.linkType) {\n case \"o\":\n case \"d\":\n case \"e\":\n break;\n\n default:\n var linkTypesMsg = \"\\nAccepted link types: \";\n for (var key in acceptedLinkTypes) {\n linkTypesMsg += \"\\n\" + key + \": \" + acceptedLinkTypes[key];\n }\n console.error(\"Unknown linkType: \" + json.linkType + linkTypesMsg);\n return;\n }\n }\n }\n\n //Logging\n var logProperties = {};\n var logEvents = [];
42776\n Object.values(s.linkTrackVars.split(',')).forEach(function (variableName) {\n if ((/^eVar(?:[1-9][0-9]{0,1}|1[0-9]{0,2}|2[0-4]?[0-9]|250)$/.test(variableName) || /^prop(?:[1-9]{1}|[1-6]{1}[0-9]{1}|7[0-5]{1})$/.test(variableName) || acceptedVariableNames.indexOf(variableName) > -1) ) {\n logProperties[variableName] = s[variableName];\n }\n });\n\n Object.values(s.linkTrackEvents.split(',')).forEach(function (variableName) {\n if (/event(?:[1-9]{1}[0-9]{0,2}|1000)$/.test(variableName) || builtInEvents.indexOf(variableName) > -1) {\n logEvents.push(variableName);\n }\n });\n\n if (Object.keys(logProperties).length > 0) {\n _satellite.logger.log('Applying the following properties on tracker: \"' + JSON.stringify(logProperties) + '\".');\n }\n\n if (logEvents.length > 0) {\n _satellite.logger.log('Applying the following events on tracker: \"' + logEvents.join(', ') + '\".');\n }\n\n\n if (!json.hasOwnProperty(\"asPageView\") || (json.hasOwnProperty(\"asPageView\") && json.asPageView === \"true\" || json.asPageView === true)) {\n s.t();\n } else {\n if (json.hasOwnProperty(\"linkType\")) {\n if (json.hasOwnProperty(\"linkName\")) {\n s.tl(true, json.linkType, json.linkName);\n } else {\n s.tl(true, json.linkType, \"link clicked\");\n }\n } else {\n s.tl(true);\n }\n\n }\n s.clearVars();\n s.linkTrackVars = \"None\";\n s.linkTrackEvents = \"None\";\n \n } else {\n console.error(\"Analytics object(s) has not been initialized!\");\n }\n\n};\nNIAnalytics.clearVariables = function () {\n if (window.s) {\n s.clearVars();\n s.linkTrackVars = \"None\";\n s.linkTrackEvents = \"None\";\n } else {\n console.error(\"Analytics object(s) has not been initialized!\");\n }\n};\n\nNIAnalytics.getCaptureNavigationLinkClickDetails = function (eventName, eventLabel, eventDetail) {\n eventName = eventName || \"\";\n eventLabel = eventLabel || \"\";\n eventDetail = eventDetail || \"\";\n var detailedPagename = _satellite.getVar(\"DETAILED_PAGENAME\");\n\n var eventsWithoutDetailedPagename = _satellite.getVar(\"CAPTURENAVIGATION_LINK_CLICK_DETAILS_WITHOUT_DETAILED_PAGENAME\");\n var eventsWithDetailedPagename = _satellite.getVar(\"CAPTURENAVIGATION_LINK_CLICK_DETAILS_WITH_DETAILED_PAGENAME\");\n var eventsWithEventDetail = _satellite.getVar(\"CAPTURENAVIGATION_LINK_CLICK_DETAILS_WITH_EVENT_DETAIL\");\n var regexWithDetailedPagename = new RegExp(eventsWithDetailedPagename.join(\"|\"));\n var regexWithEventDetail = new RegExp(eventsWithEventDetail.join(\"|\"));\n\n if (eventLabel === \"\") {\n return \"\";\n } else if (regexWithEventDetail.test(eventName) && eventDetail !== \"\") {\n return eventName + \":\" + eventDetail + \":\" + eventLabel;\n } else if (regexWithDetailedPagename.test(eventName)) {\n return eventName + \":\" + detailedPagename.split(\":\").join(\"_\") + \":\" + eventLabel;\n } else if (eventsWithoutDetailedPagename.indexOf(eventName) > -1) {\n return eventName + \":\" + eventLabel;\n } else {\n return eventLabel;\n }\n\n};\n\nNIAnalytics.generateDcrParams = function (acceptedProps, json) {\n var dcrParams = {};\n for (var prop in json) {\n if (acceptedProps.indexOf(prop) > -1) {\n dcrParams[prop] = json[prop];\n } else {\n console.warn(\"Unknown analytics parameter: \" + prop + \" Accepted params: \" + acceptedProps.join(\", \"));\n }\n }\n return dcrParams;\n};\n\nNIAnalytics.createNestedObject = function (base, names, value) {\n var lastName = arguments.length === 3 ? names.pop() : false;\n for (var i = 0; i < names.length; i++) {\n base = base[names[i]] = base[names[i]] || {};\n }\n if (lastName) base = base[lastName] = value;\n return base;\n};\n\nNIAnalytics.checkNestedObject = function (testObj, keyPath) {\n var obj;\n\n keyPath = keyPath.split('.')\n var cKey = keyPath.shift();\n\n function get(pObj, pKey) {\n var bracketStart, bracketEnd, o;\n bracketStart = pKey.indexOf(\"[\");\n if (bracketStart > -1) { //check for nested arrays\n bracketEnd = pKey.indexOf(\"]\");\n var arrIndex = pKey.substr(bracketStart + 1, bracketEnd - bracketStart - 1);\n pKey = pKey.substr(0, bracketStart);\n var n = pObj[pKey];\n o = n ? n[arrIndex] : undefined;\n\n } else {\n o = pObj[pKey];\n }\n return o;\n }\n\n obj = get(testObj, cKey);\n while (obj && keyPath.length) {\n obj = get(obj, keyPath.shift());\n }\n return typeof (obj) !== 'undefined';\n};\n\nNIAnalytics.setCookie = function (cname, cvalue, sPath, domain) {\n var d = new Date();\n d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = encodeURIComponent(cname) + \"=\" + encodeURIComponent(cvalue) + \"; \" + expires + (domain ? \"; domain=\" + domain : \"\") + (sPath ? \"; path=\" + sPath : \"\");\n}\n\nNIAnalytics.getCookie = function (cName) {\n var name = cName + \"=\";\n var cDecoded = decodeURIComponent(document.cookie);\n var cArr = cDecoded.split('; ');\n var res;\n return cArr.forEach(function (val) {\n val.indexOf(name) === 0 && (res = val.substring(name.length));\n }), res;\n};\n\nNIAnalytics.getQueryValue = function (variable, query) {\n var vars = query.split('&');\n for (var i = 0; i < vars.length;
42776 i++) {\n var pair = vars[i].split('=');\n if (decodeURIComponent(pair[0]) == variable) {\n return decodeURIComponent(pair[1]);\n }\n }\n}\n\nNIAnalytics.getMappedValue = function (map, key) {\n if (typeof key === \"undefined\" || key === \"\") return \"\";\n if (isNaN(Number(key))) return key.toLowerCase();\n\n var cat;\n var mapPieces = map.split(\".\");\n var tmp = window;\n for (var i = 0; i < mapPieces.length; i++) {\n if (tmp[mapPieces[i]] !== undefined && tmp[mapPieces[i]] !== null) {\n tmp = tmp[mapPieces[i]];\n if (i === mapPieces.length - 1) {\n cat = tmp[key];\n }\n } else break;\n }\n\n var manualCat;\n var manualMapPieces = \"refdata.hrid.manual-entry\".split(\".\");\n var manualTmp = window;\n for (var i = 0; i < manualMapPieces.length; i++) {\n if (manualTmp[manualMapPieces[i]] !== undefined && manualTmp[manualMapPieces[i]] !== null) {\n manualTmp = manualTmp[manualMapPieces[i]];\n if (i === manualMapPieces.length - 1) {\n manualCat = manualTmp[key];\n }\n } else if (cat === undefined) return key;\n }\n\n return ((cat !== undefined) ? cat : ((manualCat !== undefined) ? manualCat : key));\n}\n\nNIAnalytics.getMappedValueFromDataLayer = function (map, keyString) {\n if (typeof keyString === \"undefined\" || keyString === \"\") return \"\";\n if ((keyString.indexOf(\"digitalData.product\") > -1) && !digitalData.hasOwnProperty(\"product\")) return \"\";\n var key;\n var levels = keyString.split(\".\");\n if (levels[0] === \"digitalData\") {\n levels.splice(0, 1);\n\n function dig(inWhat, levels) {\n if (levels.length == 1) {\n if (levels[0].indexOf(\"[\") === -1) {\n var deepest = inWhat[levels[0]];\n if (typeof deepest !== \"undefined\") {\n return deepest;\n }\n } else {\n var deepestWithArray = inWhat[levels[0].split(\"[\")[0]][levels[0].split(\"[\")[1].split(\"]\")[0]];\n if (typeof deepestWithArray !== \"undefined\") {\n return deepestWithArray;\n }\n }\n } else {\n if (levels[0].indexOf(\"[\") === -1) {\n var deep = inWhat[levels[0]];\n if (typeof deep !== \"undefined\") {\n return dig(deep, levels.splice(1, levels.length - 1));\n }\n } else {\n if (!digitalData.hasOwnProperty(levels[0].split(\"[\")[0])) {\n return \"\";\n }\n var deepWithArray = inWhat[levels[0].split(\"[\")[0]][levels[0].split(\"[\")[1].split(\"]\")[0]];\n if (typeof deepWithArray !== \"undefined\") {\n return dig(deepWithArray, levels.splice(1, levels.length - 1));\n }\n }\n }\n }\n key = dig(digitalData, levels);\n } else return \"\";\n\n var cat;\n var mapPieces = map.split(\".\");\n var tmp = window;\n for (var i = 0; i < mapPieces.length; i++) {\n if (tmp[mapPieces[i]] !== undefined && tmp[mapPieces[i]] !== null) {\n tmp = tmp[mapPieces[i]];\n if (i === mapPieces.length - 1) {\n cat = tmp[key];\n }\n } else break;\n }\n\n var manualCat;\n var manualMapPieces = \"refdata.hrid.manual-entry\".split(\".\");\n var manualTmp = window;\n for (var i = 0; i < manualMapPieces.length; i++) {\n if (manualTmp[manualMapPieces[i]] !== undefined && manualTmp[manualMapPieces[i]] !== null) {\n manualTmp = manualTmp[manualMapPieces[i]];\n if (i === manualMapPieces.length - 1) {\n manualCat = manualTmp[key];\n }\n } else if (cat === undefined) return key;\n }\n\n return ((cat !== undefined) ? cat : ((manualCat !== undefined) ? manualCat : key));\n}\n\nNIAnalytics.getEventByName = function (name) {\n var eventArray = _satellite.getVar(\"EVENT:DL\");\n for (var i = 0; i < eventArray.length; i++) {\n if (eventArray[i].eventInfo.eventName == name) return eventArray[i].eventInfo;\n }\n return undefined;\n}\n\nNIAnalytics.getLastEventByName = function (name) {\n var eventArray = _satellite.getVar(\"EVENT:DL\");\n for (var i = Math.max(0, eventArray.length - 1); i >= 0; i--) {\n if (eventArray[i].eventInfo.eventName == name) return eventArray[i].eventInfo;\n }\n return undefined;\n}\n\nNIAnalytics.deleteFromDataLayer = function (toDeleteString) {\n var levels = toDeleteString.split(\".\");\n if (levels[0] === \"digitalData\") {\n levels.splice(0, 1);\n\n function dig(inWhat, levels) {\n if (levels.length == 1) {\n if (typeof inWhat[levels[0]] !== \"undefined\") inWhat[levels[0]] = \"\";\n } else {\n if (typeof inWhat[levels[0]] !== \"undefined\") {\n dig(inWhat[levels[0]], levels.splice(1, levels.length - 1));\n }\n }\n }\n dig(digitalData, levels);\n }\n}\n\nNIAnalytics.captureNavigation = function (json) {\n var acceptedProps = [\"eventName\", \"eventLabel\", \"eventDetail\", \"relatedProductID\", \"email\", \"items\", \"internalCampaign\", \"tntParam\", \"optin\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"internalCampaign\")) {\n var t = new Date();\n t.setTime(t.getTime() + 1800000);\n if (!s.c_w(\"icidAnalytics\", 1, t)) {\n s.c_w(\"icidAnalytics\", 1, 0)\n }\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"attributes\", \"internalCampaign\"], json[\"internalCampaign\"]);\n }\n\n if (json.hasOwnProperty(\"tntParam\")) {\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"attributes\", \"tntParam\"], json[\"tntParam\"]);\n }\n\n if (typeof digitalData.event === \"undefined\") {\n digitalData.event = [];\n }\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureNavigation\", dcrParams);\n}\n\n\nNIAnalytics.createNestedObject(digitalData, [\"page\", \"globalLoaded\"], false);\nNIAnalytics.createNestedObject(digitalData, [\"page\", \"VPLTry\"], 0);
42776\nNIAnalytics.captureVirtualPageLoad = function (json) {\n if (digitalData.page.globalLoaded || (NIAnalytics.checkNestedObject(json, \"forceSend\"))) {\n s.clearVars();\n\n var acceptedProps = [\"pageTabContent\", \"category\", \"partNumber\", \"forceSend\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"VPLTry\"], 0);\n\n for (var prop in json) {\n switch (prop) {\n case \"pageTabContent\":\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"pageInfo\", \"pageTabContent\"], json[\"pageTabContent\"]);\n break;\n case \"category\":\n NIAnalytics.createNestedObject(digitalData, [\"product[0]\", \"category\", \"category\"], json[\"category\"]);\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"pageInfo\", \"pageTabContent\"], NIAnalytics.getMappedValue(\"refdata.hrid.pmdm_categories\", json[\"category\"]));\n break;\n case \"partNumber\":\n NIAnalytics.createNestedObject(digitalData, [\"product[0]\", \"productInfo\", \"partNumber\"], json[\"partNumber\"]);\n break;\n case \"forceSend\":\n break;\n default:\n console.error(\"Unknown analytics parameter: \" + prop);\n }\n }\n _satellite.track(\"captureVirtualPageLoad\", dcrParams);\n } else {\n if (digitalData.page.VPLTry < 3) {\n digitalData.page.VPLTry++;\n setTimeout(function () {\n NIAnalytics.captureVirtualPageLoad(json);\n }, 3000);\n }\n }\n}\n\nNIAnalytics.captureSearchSubmit = function (json) {\n var acceptedProps = [\"onsiteSearchTypedOrSuggested\", \"onsiteSearchAutocompleteRank\", \"onsiteSearchAutocompleteLOV\", \"eventLabel\", \"onsiteSearchKeyword\"];\n \n if(json.hasOwnProperty(\"onsiteSearchKeyword\")){\n json.onsiteSearchKeyword = json.onsiteSearchKeyword.toLowerCase();\n } \n \n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json); \n\n if (json.hasOwnProperty(\"onsiteSearchTypedOrSuggested\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchTypedOrSuggested\"], json[\"onsiteSearchTypedOrSuggested\"]);\n }\n\n if (json.hasOwnProperty(\"onsiteSearchAutocompleteRank\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchAutocompleteRank\"], json[\"onsiteSearchAutocompleteRank\"]);\n }\n\n if (json.hasOwnProperty(\"onsiteSearchAutocompleteLOV\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchAutocompleteLOV\"], json[\"onsiteSearchAutocompleteLOV\"]);\n }\n\n if (json.hasOwnProperty(\"eventLabel\")) {\n var hasSearchType = false;\n for (var i in digitalData.event) {\n if (digitalData.event[i].eventInfo.eventName === \"searchType\") {\n digitalData.event[i].eventInfo.eventLabel = json[\"eventLabel\"];\n hasSearchType = true;\n break;\n }\n }\n if (!hasSearchType) {\n var tmp = {\n \"eventInfo\": {\n \"eventName\": \"searchType\",\n \"eventLabel\": json[\"eventLabel\"]\n }\n }\n digitalData.event.push(tmp);\n }\n }\n\n _satellite.track(\"captureSearchSubmit\", dcrParams);\n}\n\nNIAnalytics.captureSearchInstead = function (json) {\n var acceptedProps = [\"onsiteSearchSearchInsteadFor\", \"onsiteSearchDym\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"onsiteSearchSearchInsteadFor\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchSearchInsteadFor\"], json[\"onsiteSearchSearchInsteadFor\"]);\n }\n\n if (json.hasOwnProperty(\"onsiteSearchDym\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchDym\"], json[\"onsiteSearchDym\"]);\n }\n\n _satellite.track(\"captureSearchInstead\", dcrParams);\n}\n\nNIAnalytics.captureSearchFilter = function (json) {\n var acceptedProps = [\"onsiteSearchScenario\", \"onsiteSearchSecondaryFilter\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"onsiteSearchScenario\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchScenario\"], json[\"onsiteSearchScenario\"]);\n NIAnalytics.captureSearchFilterParam = \"onsiteSearchScenario\";\n }\n\n if (json.hasOwnProperty(\"onsiteSearchSecondaryFilter\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchSecondaryFilter\"], json[\"onsiteSearchSecondaryFilter\"]);\n NIAnalytics.captureSearchFilterParam = \"onsiteSearchSecondaryFilter\";\n }\n\n _satellite.track(\"captureSearchFilter\", dcrParams);\n}\n\n\n// Product Detail Pages\nNIAnalytics.captureProductFilter = function (json) {\n var acceptedProps = [\"filterNav\", \"filterFacet\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"filterNav\")) {\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"attributes\", \"filterNav\"], json[\"filterNav\"]);\n }\n\n if (json.hasOwnProperty(\"filterFacet\")) {\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"attributes\", \"filterFacet\"], json[\"filterFacet\"]);\n }\n\n _satellite.track(\"captureProductFilter\", dcrParams);\n}\n\n// Product Detail Pages\nNIAnalytics.captureProductDetail = function (json) {\n var acceptedProps = [\"partNumber\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"partNumber\")) {\n digitalData.product[0].productInfo.partNumber = json[\"partNumber\"];\n }\n\n s.clearVars();\n\n _satellite.track(\"captureProductDetail\", dcrParams);\n}\n\n/* Assessment */\nif (window.addEventListener) {\n window.addEventListener(\"beforeunload\", function () {\n if (_s
42776atellite.getVar(\"ASSESSMENT_QUESTIONID:EV:DL\") != \"\") {\n _satellite.track(\"captureOutcomeFallOff\");\n }\n });\n} else {\n window.attachEvent(\"beforeunload\", function () {\n if (_satellite.getVar(\"ASSESSMENT_QUESTIONID:EV:DL\") != \"\") {\n _satellite.track(\"captureOutcomeFallOff\");\n }\n });\n}\n\nNIAnalytics.captureOutcome = function (json) {\n var acceptedProps = [\"eventName\", \"eventAction\", \"start\", \"assessmentLabel\", \"outcomeLabel\", \"eventLabel\", \"email\", \"datetime\"];\n var ISO_8601_FULL = /^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$/i\n json[\"datetime\"] = (json.hasOwnProperty(\"datetime\") && ISO_8601_FULL.test(json[\"datetime\"])) ? json[\"datetime\"] : new Date().toISOString();\n\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"eventAction\")) {\n if (json[\"eventAction\"] === \"start\") {\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureOutcomeStart\", dcrParams);\n }\n\n if (json[\"eventAction\"] === \"complete\") {\n var event = NIAnalytics.getEventByName(json[\"eventName\"]);\n if (event) {\n event.eventAction = json[\"eventAction\"];\n if (json[\"outcomeLabel\"]) {\n event.outcomeLabel = json[\"outcomeLabel\"];\n }\n if (json.hasOwnProperty(\"email\")) {\n event.email = json.email;\n }\n if (json.hasOwnProperty(\"datetime\")) {\n event.datetime = json.datetime;\n }\n } else {\n var tmp = {\n \"eventInfo\": \"\"\n };\n tmp.eventInfo = event = json;\n digitalData.event.push(tmp);\n }\n NIAnalytics.eventName = event.eventName;\n _satellite.track(\"captureOutcomeComplete\", event);\n if (event.eventName === \"assessment\") event[\"questionID\"] = \"\";\n }\n }\n}\n\nNIAnalytics.captureAssessmentQuestion = function (questionID) {\n var assess = NIAnalytics.getEventByName(\"assessment\");\n if (assess.questionID !== undefined) assess.questionID = assess.questionID + \",\" + questionID;\n else assess.questionID = questionID;\n if (questionID === undefined) {\n console.error(\"The parameter: questionID is undefined!\");\n }\n}\n\nNIAnalytics.captureAssessment = function (json) {\n var acceptedProps = [\"eventName\", \"questionNr\", \"response\", \"email\", \"optIn\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n _satellite.track(\"captureAssessment\", dcrParams);\n}\n\nNIAnalytics.capturePardotForm = function(json) {\n var acceptedProps = [\"eventName\", \"formName\", \"email\", \"optIn\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n _satellite.track(\"capturePardotForm\", dcrParams);\n}\n\nNIAnalytics.captureResultClick = function (json) {\n var acceptedProps = [\"onsiteSearchClickedRank\", \"onsiteSearchClickTitle\", \"clickTitleUrl\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"onsiteSearchClickedRank\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchClickedRank\"], json[\"onsiteSearchClickedRank\"]);\n }\n\n if (json.hasOwnProperty(\"onsiteSearchClickTitle\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchClickTitle\"], json[\"onsiteSearchClickTitle\"]);\n }\n\n if (json.hasOwnProperty(\"clickTitleUrl\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"clickTitleUrl\"], json[\"clickTitleUrl\"]);\n }\n\n new Promise(_satellite.track(\"captureResultClick\", dcrParams));\n}\n\nNIAnalytics.captureRating = function (json) {\n var acceptedProps = [\"eventName\", \"eventLabel\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureRating\", dcrParams);\n}\n\nNIAnalytics.captureFilter = function (json) {\n var acceptedProps = [\"filterPair\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"filterPair\")) {\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"attributes\", \"filterPair\"], json[\"filterPair\"]);\n }\n\n _satellite.track(\"captureFilter\", dcrParams);\n}\n\nNIAnalytics.captureDownload = function (json) {\n var acceptedProps = [\"eventLabel\", \"gbRoot\", \"email\", \"downloadProduct\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n dcrParams[\"eventName\"] = \"downloadgb\";\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureDownload\", dcrParams);\n\n function checkVariable() {\n if (NIAnalytics.transactionID == undefined) {\n window.setTimeout(function () {\n checkVariable();\n }, 100);\n }\n }\n checkVariable();\n return NIAnalytics.transactionID;\n}\n\nNIAnalytics.captureMedia = function (json) {\n\n var MediaHeartbeat = window[\"AdobeHB\"].MediaHeartbeat;\n if (!window._mediaHeartbeat) window._mediaHeartbeat = {};\n\n var mediaDelegate = new AdobeHB.MediaHeartbeatDelegate();\n mediaDelegate.getCurrentPlaybackTime = function () {\n return 0;\n };\n mediaDelegate.getQoSObject = function () {\n return MediaHeartbeat.createQoSObject(0, 0, 0, 0);\n }\n\n var config = {\n playerName: \"Custom Player\",\n ovp: \"Custom OVP\",\n channel: \"Custom Channel\"\n };\n\n (function () {\n MediaHeartbeat.getInstance(mediaDelegate, config)\n .then(function (instance) {\n if (!window._mediaHeartbeat[json[\"mediaName\"]]) window._mediaHeartbeat[json[\"mediaName\"]] = instance;\n })\n .then(function () {\n\n\n\n var e = {\n \"eventInfo\": {}\n };\n for (var prop in json) {\n switch (prop) {\n case \"eventName\":\n case \"eventAction\":\n e.eventInfo[prop] = json[prop];\n break;\n case \"mediaName\":\n case \"mediaLength\":\n case \"mediaPlayerName\":\n if (!e.eventInfo.attributes) e.eventInfo.attributes = {};\n e.eventInfo.attributes[prop] = json[prop] || \"\";\n break;\n default:\n console.error(\"Unknown analytics parameter: \" + prop);\n }\n }\n e.eventInfo.eventAction = e.eventInfo.eventAction || e.eventInfo.eventName;\n e.eventInfo.attributes.mediaPlayerName = e.eventInfo.attributes.mediaPlayerName || \"Brightcove Smart Player\";\n\n digitalData.event.push(e);\n var mediaName = e.eventInfo.attributes.mediaName;\n NIAnalytics.createNestedObject(digitalData, [\"media\", \"mediaName\"], mediaName);\n\n var mediaObject;\n var contextData = {};\n\n var mediaID = \"Media ID N/A\";\n var mediaLength = e.eventInfo.attributes.mediaLength;\n var mediaPlayerName = \"Brightcove Smart Player\";\n\n\n\n if (e.eventInfo.eventAction === \"start\") {\n\n mediaObject = MediaHeartbeat.createMediaObject(mediaName, mediaID, mediaLength, MediaHeartbeat.StreamType.VOD, MediaHeartbeat.MediaType.Video);\n\n window._mediaHeartbeat[json[\"mediaName\"]].trackSe
42776ssionStart(mediaObject);\n window._mediaHeartbeat[json[\"mediaName\"]].trackPlay();\n\n s.events = null;\n s.pageName = _satellite.getVar(\"PAGE_NAME\") + \":\" + e.eventInfo.attributes.mediaName;\n contextData.complete = \"\";\n contextData.start = e.eventInfo.eventName;\n\n } else if (e.eventInfo.eventAction == \"complete\") {\n s.events = \"event16\";\n s.pageName = _satellite.getVar(\"PAGE_NAME\") + \":\" + e.eventInfo.attributes.mediaName;\n contextData.start = \"\";\n contextData.complete = e.eventInfo.eventName;\n window._mediaHeartbeat[json[\"mediaName\"]].trackComplete();\n window._mediaHeartbeat[json[\"mediaName\"]].trackSessionEnd();\n }\n\n })\n .catch(function (err) {\n console.log(\"Getting MediaHeartbeat instance failed.\");\n });\n })();\n}\n\nNIAnalytics.captureCheckout = function (json) {\n var acceptedProps = [\"eventName\", \"eventDetail\", \"items\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureCheckout\", dcrParams);\n}\n\nNIAnalytics.capturePopularDownload = function (json) {\n var acceptedProps = [\"onsiteSearchTypedOrSuggested\", \"onsiteSearchScenario\", \"onsiteSearchClickTitle\", \"eventName\", \"eventLabel\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"onsiteSearchTypedOrSuggested\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchTypedOrSuggested\"], json[\"onsiteSearchTypedOrSuggested\"]);\n }\n\n if (json.hasOwnProperty(\"onsiteSearchScenario\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchScenario\"], json[\"onsiteSearchScenario\"]);\n NIAnalytics.captureSearchFilterParam = \"onsiteSearchScenario\";\n }\n\n if (json.hasOwnProperty(\"onsiteSearchClickTitle\")) {\n NIAnalytics.createNestedObject(digitalData, [\"onsiteSearch\", \"onsiteSearchInfo\", \"onsiteSearchClickTitle\"], json[\"onsiteSearchClickTitle\"]);\n }\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"capturePopularDownload\", dcrParams);\n}\n\nNIAnalytics.captureCartRemove = function (json) {\n var acceptedProps = [\"eventName\", \"eventDetail\", \"items\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureCartRemove\", dcrParams);\n}\n\nNIAnalytics.captureCmtyInteraction = function (json) {\n var acceptedProps = [\"eventName\", \"eventLabel\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureCmtyInteraction\", dcrParams);\n}\n\nNIAnalytics.captureCartAdd = function (json) {\n var acceptedProps = [\"eventName\", \"items\", \"currency\", \"revenue\", \"startFlag\", \"source\", \"eventDetail\", \"timestamp\", \"licenseTerm\", \"serviceProgram\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"eventDetail\")) {\n if (typeof digitalData.cart === \"undefined\") {\n digitalData.cart = {};\n }\n if (typeof digitalData.cart.cartID === \"undefined\") {\n digitalData.cart.cartID = \"\";\n }\n if (digitalData.cart.cartID === \"\") {\n digitalData.cart.cartID = json[\"eventDetail\"];\n }\n }\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureCartAdd\", dcrParams);\n}\n\nNIAnalytics.captureMultimedia = function (json) {\n var acceptedProps = [\"eventName\", \"eventLabel\", \"gbroot\", \"eventAction\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureMultimedia\", dcrParams);\n}\n\nNIAnalytics.capturePerspectiveResultClick = function (json) {\n var acceptedProps = [\"template\", \"filterPair\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"capturePerspectiveResultClick\", dcrParams);\n}\n\nNIAnalytics.captureCategoryResultClick = function (json) {\n var acceptedProps = [\"template\", \"filterPair\", \"pmdmIds\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureCategoryResultClick\", dcrParams);\n}\n\nNIAnalytics.errorMessageSend = function (json) {\n var acceptedProps = [\"analyticsErrorMessage\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"errorMessageSend\", dcrParams);\n}\n\nNIAnalytics.captureModelRecommendation = function(json) {\n var acceptedProps = [\"products\", \"pageTab\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n dcrParams[\"source\"] = \"captureModelRecommendation\";\n\n _satellite.track(\"captureVirtualPageLoad\", dcrParams);\n}\n\nNIAnalytics.captureUserAccountCreation = function(json) {\n var acceptedProps = [\"eventName\", \"datetime\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n var ISO_8601_FULL = /^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$/i;\n json[\"datetime\"] = (json.hasOwnProperty(\"datetime\") && ISO_8601_FULL.test(json[\"datetime\"])) ? json[\"datetime\"] : new Date().toISOString();\n\n if(json.hasOwnProperty(\"eventName\")){\n switch(json[\"eventName\"]){\n case \"start\":\n case \"complete\":\n if (json.hasOwnProperty(\"datetime\")) {\n dcrParams.datetime = json.datetime;\n }\n\n _satellite.track(\"captureUserAccountCreation\", dcrParams);\n break;\n\n default:\n console.error(\"Invalid eventName\");\n break;\n }\n }\n}\n\nNIAnalytics.captureUserInteraction = function(json){\n var acceptedProps = [\"eventName\", \"eventLabel\", \"eventDetail\", \"relatedProductID\", \"email\", \"items\", \"internalCampaign\", \"tntParam\", \"optin\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n if (json.hasOwnProperty(\"internalCampaign\")) {\n var t = new Date();\n t.setTime(t.getTime() + 1800000);\n if (!s.c_w(\"icidAnalytics\", 1, t)) {\n s.c_w(\"icidAnalytics\", 1, 0)\n }\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"attributes\", \"internalCampaign\"], json[\"internalCampaign\"]);\n }\n\n if (json.hasOwnProperty(\"tntParam\")) {\n NIAnalytics.createNestedObject(digitalData, [\"page\", \"attributes\", \"tntParam\"], json[\"tntParam\"]);\n }\n\n if (typeof digitalData.event === \"undefined\") {\n digitalData.event = [];\n }\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureUserInteraction\", dcrParams);\n}\n\nNIAnalytics.captureContentsquareEcomm = function(){\n _satellite.track(\"captureContentsquareEcomm\");\n}\n\nNIAnalytics.captureSiteError = function(json){\n var acceptedProps = [\"errorName\", \"errorMessage\", \"source\", \"eventDetail\"];\n var dcrParams = NIAnalytics.generateDcrParams(acceptedProps, json);\n\n digitalData.event.push({\n \"eventInfo\": dcrParams\n });\n _satellite.track(\"captureSiteError\", dcrParams); \n}
42776\n\nNIAnalytics.getTier = function() {\n const {hostname} = location;\n\n if (/-dev2/.test(hostname)) {\n return '-dev2';\n } else if (/-dev/.test(hostname)) {\n return /certain|courseware-dev|cvent|partners|saas-dev/.test(hostname) ? '' : '-dev';\n } else if (/-test2/.test(hostname)) {\n return '-test2';\n } else if (/-test/.test(hostname)) {\n return /events-test/.test(hostname) ? '' : '-test';\n } else if (/stage/.test(hostname)) {\n return '-test';\n } else {\n return '';\n }\n}\n\nNIAnalytics.getCookie = function(name) {\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) return parts.pop().split(';').shift();\n}\n\nNIAnalytics.getProfileId = function() {\n let upid = _satellite.getVar('AUTH0_HINT:COOKIE');\n if (!sessionStorage.hasOwnProperty(\"profileId\") && upid != \"anon\") {\n let tier = NIAnalytics.getTier();\n \n fetch(`https://www${tier}.ni.com/auth/userinfo`, { method: \"GET\", credentials: 'include' })\n .then(response => {\n if (!response.ok) {\n throw new Error(\"Network response was not ok\");\n }\n return response.json();\n })\n .then(data => {\n if(data && data.profileId){\n const cookieValue = NIAnalytics.getCookie(\"ni_auth_login_hint\");\n const profileData = sessionStorage.getItem(\"profileId\") ? JSON.parse(sessionStorage.getItem(\"profileId\")) : {};\n profileData[cookieValue] = data.profileId;\n sessionStorage.setItem(\"profileId\", JSON.stringify(profileData));\n }\n })\n .catch(e => {\n console.warn(`User info call failed with error ${e}, assuming logged out user`);\n });\n }\n}\nNIAnalytics.getProfileId();\n\nconst container = document.querySelector(\".course-catalog-filters .sw-catalog-filter__filters-container\");\nif(container){\n container.addEventListener(\"change\", (event) => {\n const checkbox = event.target.closest('input[type=\"checkbox\"]');\n if (!checkbox) return;\n\n const wrapper = checkbox.closest(\".nicrc--checkbox-wrapper\");\n\n const fieldset = wrapper.closest(\"fieldset\");\n const legend = fieldset?.querySelector(\"legend\")?.innerText.trim();\n\n const label = wrapper\n .querySelector(\".nicrc--checkbox-label-text\")\n ?.innerText.trim();\n\n if (legend && label) {\n let dcrParams = {\n \"legend\": legend,\n \"label\": label\n };\n _satellite.track(\"captureCoursePLPFilterClick\", dcrParams); \n }\n });\n}\n\n\n\n", 42777 "language": "javascript" 42778 } 42779 }, 42780 { 42781 "modulePath": "core/src/lib/actions/customCode.js", 42782 "settings": { 42783 "global": true, 42784 "source": "if(NIAnalytics.getDataElement(\"ContentSquareEnabled\")){\n window._uxa = window._uxa || [];\n window._uxa.push(['excludeURLforReplay', '/^(http(s):\\/\\/)www(.*)?\\.ni\\.com\\/shop\\/s\\/.*/gmi']);\n if(_satellite.getVar('DETAILED_PAGENAME') === 'myni:orders:detail:order status'){\n window._uxa.push(['setPIISelectors', {\n PIISelectors: [\n '.ni__h4.ni__hero-dual-column-account-headline, .ni__button-text.ni__hero-dual-column-account-subheadline, .ni__body-text--5.ni__hero-dual-column-account-bodycopy, #LoginForm, input[name=\"LoginForm:email\"], input[type=\"password\"], input[name=\"passwordReset:email\"], input[name=\"myInfoForm:primaryContact.name.firstName\"], input[name=\"myInfoForm:primaryContact.name.lastName\"], input[name=\"emailForm:primaryContact.email\"], input[type=\"email\"], input[name=\"entirePageForm:emailAddress\"], #emailAddressLabel, input[name=\"entirePageForm:firstName\"], input[name=\"entirePageForm:lastName\"], input[name=\"entirePageForm:communityAlias\"], .ni-address-container, .ni-address-line, input[name=\"profilePhone\"], input[name=\"profileEmail\"], .ni-contact-address, input[name=\"firstName\"], input[name=\"lastName\"], input[name=\"email1\"], input[name=\"c-cn\"], input[name=\"c-chn\"], select[name=\"c-exmth\"], select[name=\"c-exyr\"], input[name=\"c-cvv\"], input[name=\"p_secondary_data\"], .pnx-table.quote-id, .pnx-block-2x .productTable, .lia-link-navigation.view-profile-link.lia-component-users-action-view-user-profile, input[name=\"profilename_first\"], input[name=\"profilename_last\"], #profilebiography, .lia-form-ip-addresses-display.lia-form-readonly-display, .pnx-table.pnx-block-2x, .ni-shipping-address, .ni-checkout-section'\n ]\n }]); \n } else {\n window._uxa.push(['setPIISelectors', {\n PIISelectors: [\n '.ni__h4.ni__hero-dual-column-account-headline, .ni__button-text.ni__hero-dual-column-account-subheadline, .ni__body-text--5.ni__hero-dual-column-account-bodycopy, #LoginForm, input[name=\"LoginForm:email\"], input[type=\"password\"], input[name=\"passwordReset:email\"], input[name=\"myInfoForm:primaryContact.name.firstName\"], input[name=\"myInfoForm:primaryContact.name.lastName\"], input[name=\"emailForm:primaryContact.email\"], input[type=\"email\"], input[name=\"entirePageForm:emailAddress\"], #emailAddressLabel, input[name=\"entirePageForm:firstName\"], input[name=\"entirePageForm:lastName\"], input[name=\"entirePageForm:communityAlias\"], .ni-address-container, .ni-address-line, input[name=\"profilePhone\"], input[name=\"profileEmail\"], .ni-contact-address, input[name=\"firstName\"], input[name=\"lastName\"], input[name=\"email1\"], input[name=\"c-cn\"], input[name=\"c-chn\"], select[name=\"c-exmth\"], select[name=\"c-exyr\"], input[name=\"c-cvv\"], input[name=\"p_secondary_data\"], .pnx-table.quote-id, .pnx-block-2x .productTable, .lia-link-navigation.view-profile-link.lia-component-users-action-view-user-profile, input[name=\"profilename_first\"], input[name=\"profilename_last\"], #profilebiography, .lia-form-ip-addresses-display.lia-form-readonly-display, .ni-shipping-address, .ni-checkout-section'\n ]\n }]);\n }\n}", 42785 "language": "javascript" 42786 } 42787 }, 42788 { 42789 "modulePath": "custom-debug-logger/src/lib/actions/satelliteLogger.js", 42790 "settings": { 42791 "logInput": "Fired", 42792 "logLevel": "log", 42793 "ruleName": true 42794 } 42795 } 42796 ] 42797 }, 42798 { 42799 "id": "RLb2c6cc056c1646fa83b47a6a3c53cbc8", 42800 "name": "Cart&Checkout_Confirmation_Page:PLR", 42801 "events": [ 42802 { 42803 "modulePath": "core/src/lib/events/windowLoaded.js", 42804 "settings": {}, 42805 "ruleOrder": 50.0 42806 }, 42807 { 42808 "modulePath": "core/src/lib/events/directCall.js", 42809 "settings": { 42810 "identifier": "captureVirtualPageLoad" 42811 }, 42812 "ruleOrder": 1.0 42813 } 42814 ], 42815 "conditions": [ 42816 { 42817 "modulePath": "core/src/lib/conditions/valueComparison.js", 42818 "settings": { 42819 "comparison": { 42820 "operator": "doesNotEqual", 42821 "caseInsensitive": true 42822 }, 42823 "leftOperand": "%DisableAnalyticsCookie%", 42824 "rightOperand": "true" 42825 } 42826 }, 42827 { 42828 "modulePath": "core/src/lib/conditions/valueComparison.js", 42829 "settings": { 42830 "comparison": { 42831 "operator": "equals" 42832 }, 42833 "leftOperand": "%TEMPLATE:PI:PA:DL%", 42834 "rightOperand": "checkout" 42835 } 42836 }, 42837 { 42838 "modulePath": "core/src/lib/conditions/valueComparison.js", 42839 "settings": { 42840 "comparison": { 42841 "operator": "equals" 42842 }, 42843 "leftOperand": "%SUBTEMPLATE:PI:PA:DL%", 42844 "rightOperand": "confirmation" 42845 } 42846 } 42847 ], 42848 "actions": [ 42849 { 42850 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 42851 "settings": { 42852 "customSetup": { 42853 "source": function(event, s) { 42854 s.purchaseID = _satellite.getVar("CARTID:DL"); 42855s.events = "event28,purchase"; 42856s.linkTrackEvents += ",event28,purchase"; 42857s.currencyCode = digitalData.transaction.total.currency; 42858 42859var prods = ""; 42860var items = digitalData.transaction.item; 42861 42862if (typeof items !== "undefined") { 42863 for (var i = 0; i < items.length; i++) { 42864 if (typeof items[i].productInfo != "undefined") { 42865 if (typeof items[i].productInfo.partNumber === "undefined") items[i].productInfo.partNumber = ""; 42866 if (typeof items[i].productInfo.quantity === "undefined") items[i].productInfo.quantity = ""; 42867 if (typeof items[i].productInfo.revenue === "undefined") items[i].productInfo.revenue = ""; 42868 prods += ";" + items[i].productInfo.partNumber + ";" + items[i].productInfo.quantity + ";" + items[i].productInfo.revenue+";;"; 42869 prods += (i + 1) === items.length ? "" : ","; 42870 } 42871 } 42872} 42873s.products = prods; 42874s.linkTrackVars += ",products,purchaseID"; 42875} 42876 }, 42877 "trackerProperties": { 42878 "zip": "%SHIPPING_POSTAL_CODE:DL%", 42879 "eVars": [ 42880 { 42881 "name": "eVar6", 42882 "type": "value", 42883 "value": "%PAYMENT_METHOD:DL%" 42884 }, 42885 { 42886 "name": "eVar7", 42887 "type": "value", 42888 "value": "%SHIPPING_METHOD:DL%" 42889 }, 42890 { 42891 "name": "eVar8", 42892 "type": "value", 42893 "value": "%PROMOTION_CODE:DL%" 42894 }, 42895 { 42896 "name": "eVar14", 42897 "type": "value", 42898 "value": "%TAX_EXEMPT:DL%" 42899 }, 42900 { 42901 "name": "eVar22", 42902 "type": "value", 42903 "value": "%CARTID:DL%" 42904 }, 42905 { 42906 "name": "eVar28", 42907 "type": "value", 42908 "value": "cart" 42909 }, 42910 { 42911 "name": "eVar29", 42912 "type": "value", 42913 "value": "cart complete" 42914 }, 42915 { 42916 "name": "eVar34", 42917 "type": "value", 42918 "value": "%SHIPPING_COUNTRY:DL%" 42919 } 42920 ], 42921 "state": "%SHIPPING_STATE:DL%", 42922 "transactionID": "%CARTID:DL%" 42923 } 42924 } 42925 } 42926 ] 42927 }, 42928 { 42929 "id": "RLb2f27d9025b748f8ba54ffda7a4534c1", 42930 "name": "Global (with refdata):PLR", 42931 "events": [ 42932 { 42933 "modulePath": "core/src/lib/events/customCode.js", 42934 "settings": { 42935 "source": function(trigger) { 42936 // Preventing the global PLR firing twice 42937var refdataPLRTriggered = refdataPLRTriggered || false; 42938document.addEventListener('RefdataLoaded', function (e) { 42939 if(!refdataPLRTriggered){ 42940 refdataPLRTriggered = true; 42941 trigger(); 42942 } 42943}, false); 42944} 42945 }, 42946 "ruleOrder": 250.0 42947 }, 42948 { 42949 "modulePath": "core/src/lib/events/directCall.js", 42950 "settings": { 42951 "identifier": "captureVirtualPageLoad" 42952 }, 42953 "ruleOrder": 50.0 42954 } 42955 ], 42956 "conditions": [ 42957 { 42958 "modulePath": "core/src/lib/conditions/valueComparison.js", 42959 "settings": { 42960 "comparison": { 42961 "operator": "doesNotEqual", 42962 "caseInsensitive": true 42963 }, 42964 "leftOperand": "%DisableAnalyticsCookie%", 42965 "rightOperand": "true" 42966 } 42967 }, 42968 { 42969 "modulePath": "core/src/lib/conditions/valueComparison.js", 42970 "settings": { 42971 "comparison": { 42972 "operator": "matchesRegex", 42973 "caseInsensitive": true 42974 }, 42975 "leftOperand": "%NICOM_PAGE%", 42976 "rightOperand": "true" 42977 } 42978 }, 42979 { 42980 "modulePath": "core/src/lib/conditions/valueComparison.js", 42981 "settings": { 42982 "comparison": { 42983 "operator": "equals", 42984 "caseInsensitive": true 42985 }, 42986 "leftOperand": "%REFDATA_PAGE%", 42987 "rightOperand": "true" 42988 } 42989 }, 42990 { 42991 "modulePath": "core/src/lib/conditions/customCode.js", 42992 "settings": { 42993 "source": function(event, target) { 42994 var urls = ["ni.com/my-support/s/service-requests", "ni.com/my-support/s/technical-support", "ni.com/my-support/s/calibrate", "ni.com/my-support/s/rma", "ni.com/my-support/s/report-bug", "ni.com/my-support/s/activate", "dev2-natinst.cs124.force.com/support/s/service-requests", "dev2-natinst.cs124.force.com/support/s/calibrate", "dev2-natinst.cs124.force.com/support/s/technical-support", "dev2-natinst.cs124.force.com/support/s/report-bug", "dev2-natinst.cs124.force.com/support/s/rma", "dev2-natinst.cs124.force.com/support/s/activate"]; 42995 42996for(var i=0; i<urls.length; i++){ 42997 if(_satellite.getVar("PAGE_URL").indexOf(urls[i]) > -1 ) return false;
42998} 42999return true; 43000} 43001 } 43002 }, 43003 { 43004 "modulePath": "core/src/lib/conditions/customCode.js", 43005 "settings": { 43006 "source": function(event, target) { 43007 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 43008} 43009 } 43010 }, 43011 { 43012 "modulePath": "core/src/lib/conditions/customCode.js", 43013 "settings": { 43014 "source": function(event, target) { 43015 if(window.location.pathname.indexOf("/docs/") === 0){ 43016 return ((typeof event !== "undefined") && (typeof event.detail !== "undefined") && (typeof event.detail.forceSend !== "undefined") && ((event.detail.forceSend === true) || event.detail.forceSend.toLowerCase() === "true")); 43017}else{ 43018 return true; 43019} 43020} 43021 } 43022 }, 43023 { 43024 "modulePath": "core/src/lib/conditions/customCode.js", 43025 "settings": { 43026 "source": function(event, target) { 43027 return (window.location.pathname.indexOf('/my/s/orders') < 0); 43028} 43029 } 43030 }, 43031 { 43032 "modulePath": "core/src/lib/conditions/valueComparison.js", 43033 "settings": { 43034 "comparison": { 43035 "operator": "isFalse" 43036 }, 43037 "leftOperand": "%IS_CART_OR_CHECKOUT_PAGE%" 43038 } 43039 }, 43040 { 43041 "modulePath": "core/src/lib/conditions/valueComparison.js", 43042 "settings": { 43043 "comparison": { 43044 "operator": "doesNotEqual", 43045 "caseInsensitive": true 43046 }, 43047 "leftOperand": "%TRAFFICTYPE_META%", 43048 "rightOperand": "bot" 43049 } 43050 } 43051 ], 43052 "actions": [ 43053 { 43054 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 43055 "settings": { 43056 "customSetup": { 43057 "source": function(event, s) { 43058 var template = _satellite.getVar('TEMPLATE:PI:PA:DL'); 43059var productCategoriesMeta = _satellite.getVar('PRODUCTCATEGORIES:METATAG'); 43060 43061NIAnalytics.setAndTrack(["eVar56", "prop50"], _satellite.getVar("DETAILED_PAGENAME")); 43062s.eVar125 = template.length === 0 ? 'none' : template; 43063 43064s.prop6 = _satellite.getVar("PREV_PAGE_NAME"); 43065s.prop18 = _satellite.getVar("PREV_PAGE_VIEWED_PERCENTAGE"); 43066s.prop41 = _satellite.getVar("PREV_DETAILED_PAGENAME"); 43067s.prop42 = _satellite.getVar("PREV_DOCUMENTID"); 43068 43069var useCaseId = _satellite.getVar("USECASEID:URL_PARAM"); 43070var exp = _satellite.getVar("EXP:URL_PARAM"); 43071var at_preview_token = _satellite.getVar("AT_PREVIEW_TOKEN:URL_PARAM"); 43072 43073var tmpV49 = useCaseId+"|"+exp+"|"+at_preview_token; 43074tmpV49 = tmpV49.replace("||","|"); 43075tmpV49 = tmpV49[0] === "|" ? tmpV49.slice(1,tmpV49.length) : tmpV49; 43076tmpV49 = (tmpV49.length > 0 && tmpV49[tmpV49.length-1] === "|") ? tmpV49.substr(0, tmpV49.lastIndexOf("|")) : tmpV49; 43077NIAnalytics.setAndTrack("eVar49", tmpV49); 43078 43079//6Sense 43080if(JSON.parse(localStorage.getItem("_6senseCompanyDetails"))?.company?.company_match == "Match"){ 43081 NIAnalytics.setAndTrack("eVar143", "6Sense"); 43082} 43083 43084if(productCategoriesMeta.length > 0){ 43085 s.products = ";" + productCategoriesMeta.replace(/,/g, ",;"); 43086} 43087 43088var visitStart = _satellite.getVar("VISITSTART:COOKIE"); 43089if(s.c_r("icidAnalytics") === 1){ 43090 var t = new Date(); 43091 t.setTime(t.getTime()+1800000); 43092 if(!s.c_w("icidAnalytics",0,t)){s.c_w("icidAnalytics",0,0)} 43093 s.eVar41 = "Internal Campaign"; 43094} else if (visitStart === "1") { 43095 s.eVar41 = "Browse"; 43096} 43097 43098if (visitStart === "1") { 43099 s.firstPage = 'firstpage'; 43100} 43101 43102if (window.sessionStorage.getItem("ni-analytics.redirecting-page") === document.referrer) { 43103 var ref = window.sessionStorage.getItem("ni-analytics.original-referrer"); 43104 s.referrer = (ref != "")?ref:" "; 43105} else { 43106 window.sessionStorage.setItem("ni-analytics.original-referrer", null); 43107 window.sessionStorage.setItem("ni-analytics.redirecting-page", null); 43108} 43109 43110if ((typeof(event) !== "undefined") && (typeof(event.detail) !== "undefined") && (typeof(event.detail.source) !== "undefined")){ 43111 if(event.detail.source === "captureModelRecommendation"){ 43112 if(s.events){ 43113 s.events +=",prodView"; 43114 } else { 43115 s.events = "prodView"; 43116 } 43117 s.products = ";" + event.detail.products.replace(/,/g, ",;") 43118 } 43119 43120 if(event.detail.pageTab){ 43121 NIAnalytics.setAndTrack(["eVar56", "prop50"], _satellite.getVar("DETAILED_PAGENAME")+":"+event.detail.pageTab.toLowerCase()); 43122 } 43123} 43124 43125/* If Login, then event7 - Start */ 43126var prevValue = _satellite.getVar('PREV_LOGGED_IN'); 43127var currValue = _satellite.getVar('LOGGED_IN'); 43128 43129if ((typeof(prevValue) === undefined || ["", "anon", "no value", "not logged in"].indexOf(prevValue) > -1) && (currValue === "logged in")) { 43130 s.events = s.apl(s.events, 'event7', ',', 2); 43131} 43132/* If Login, then event7 - End */ 43133 43134/* Previous prop4 to prop19 - Start */ 43135// Do not put this into the UI section 43136s.prop19 = _satellite.getVar('PREV_SEARCH_TERM'); 43137/* Previous prop4 to prop19 - End */ 43138 43139var docID = _satellite.getVar("DOCUMENTID:METATAG"); 43140if(window.document.domain.toLowerCase() === "events.ni.com" || window.document.domain.toLowerCase() === "event.on24.com"){
43141 NIAnalytics.setAndTrack("eVar96", docID); 43142} else { 43143 NIAnalytics.setAndTrack("eVar63", docID); 43144} 43145 43146/* Visit start - End */ 43147 43148_satellite.getVisitorId().setCustomerIDs({ 43149 "email_key":{ 43150 "id": s.eVar101, 43151 "authState": Visitor.AuthState.UNKNOWN 43152 }, 43153 "experience_cloud_id":{ 43154 "id": s.eVar130, 43155 "authState": Visitor.AuthState.UNKNOWN 43156 } 43157}); 43158 43159s.linkTrackVars="None" 43160s.linkTrackEvents="None" 43161 43162//ContentSquare dynamic tracking 43163window._uxa = window._uxa || []; 43164window._uxa.push(["trackDynamicVariable", {key: 'Internal Campaign', value: _satellite.getVar('ICID:URL_PARAM')} ]); 43165 43166//Target 43167if(typeof ttMETA === "object"){ 43168 for(const targetActivity of ttMETA){ 43169 window._uxa.push(["trackDynamicVariable", {key: 'AB_AT_'+targetActivity.CampaignName, value: targetActivity.RecipeName} ]); 43170 } 43171} 43172 43173} 43174 }, 43175 "trackerProperties": { 43176 "eVars": [ 43177 { 43178 "name": "eVar1", 43179 "type": "value", 43180 "value": "%PAGE_NAME%" 43181 }, 43182 { 43183 "name": "eVar3", 43184 "type": "value", 43185 "value": "%ICID:URL_PARAM%" 43186 }, 43187 { 43188 "name": "eVar9", 43189 "type": "value", 43190 "value": "%LOGGED_IN%" 43191 }, 43192 { 43193 "name": "eVar10", 43194 "type": "value", 43195 "value": "%LANGUAGE:METATAG%" 43196 }, 43197 { 43198 "name": "eVar11", 43199 "type": "value", 43200 "value": "%LOCALE:COOKIE%" 43201 }, 43202 { 43203 "name": "eVar12", 43204 "type": "value", 43205 "value": "%PROFILE_ID:COOKIE%" 43206 }, 43207 { 43208 "name": "eVar13", 43209 "type": "value", 43210 "value": "%ESPUID:URL_PARAM%" 43211 }, 43212 { 43213 "name": "eVar21", 43214 "type": "value", 43215 "value": "%PAGE_URL%" 43216 }, 43217 { 43218 "name": "eVar27", 43219 "type": "value", 43220 "value": "%CONTENTTYPE:METATAG%" 43221 }, 43222 { 43223 "name": "eVar31", 43224 "type": "value", 43225 "value": "%PRODREF%" 43226 }, 43227 { 43228 "name": "eVar36", 43229 "type": "value", 43230 "value": "%DOMAIN%" 43231 }, 43232 { 43233 "name": "eVar59", 43234 "type": "value", 43235 "value": "%PAGE_NAME%" 43236 }, 43237 { 43238 "name": "eVar64", 43239 "type": "value", 43240 "value": "%DOCUMENTCOREID:METATAG%" 43241 }, 43242 { 43243 "name": "eVar67", 43244 "type": "value", 43245 "value": "%WORD_COUNT%" 43246 }, 43247 { 43248 "name": "eVar68", 43249 "type": "value", 43250 "value": "%LINK_COUNT%" 43251 }, 43252 { 43253 "name": "eVar69", 43254 "type": "value", 43255 "value": "%KEYWORDS_PART1:METATAG%" 43256 }, 43257 { 43258 "name": "eVar70", 43259 "type": "value", 43260 "value": "%KEYWORDS_PART2:METATAG%" 43261 }, 43262 { 43263 "name": "eVar73", 43264 "type": "value", 43265 "value": "%ASSESSMENT_PERSONA%" 43266 }, 43267 { 43268 "name": "eVar74", 43269 "type": "value", 43270 "value": "%HTML_TITLE%" 43271 }, 43272 { 43273 "name": "eVar79", 43274 "type": "value", 43275 "value": "%GUESTBOOK_CODE%" 43276 }, 43277 { 43278 "name": "eVar80", 43279 "type": "value", 43280 "value": "%DOCSTATUS:METATAG%" 43281 }, 43282 { 43283 "name": "eVar82", 43284 "type": "value",
43285 "value": "%DNB_DUNS%" 43286 }, 43287 { 43288 "name": "eVar83", 43289 "type": "value", 43290 "value": "%6SENSE_COMPANYNAME%" 43291 }, 43292 { 43293 "name": "eVar86", 43294 "type": "value", 43295 "value": "%DNB_STATUS%" 43296 }, 43297 { 43298 "name": "eVar87", 43299 "type": "value", 43300 "value": "%6SENSE_INDUSTRY%" 43301 }, 43302 { 43303 "name": "eVar88", 43304 "type": "value", 43305 "value": "%6SENSE_SICCODE%" 43306 }, 43307 { 43308 "name": "eVar89", 43309 "type": "value", 43310 "value": "%6SENSE_COMPANY_GEO%" 43311 }, 43312 { 43313 "name": "eVar90", 43314 "type": "value", 43315 "value": "%DNB_MARKETING%" 43316 }, 43317 { 43318 "name": "eVar91", 43319 "type": "value", 43320 "value": "%DNB_JOB%" 43321 }, 43322 { 43323 "name": "eVar92", 43324 "type": "value", 43325 "value": "%DNB_PRESCREENING%" 43326 }, 43327 { 43328 "name": "eVar95", 43329 "type": "value", 43330 "value": "%DNB_DUNS_ALONE%" 43331 }, 43332 { 43333 "name": "eVar98", 43334 "type": "value", 43335 "value": "%6SENSE_FIRMOGRAPHIC%" 43336 }, 43337 { 43338 "name": "eVar101", 43339 "type": "value", 43340 "value": "%HASHED_EMAIL:USER:DL%" 43341 }, 43342 { 43343 "name": "eVar102", 43344 "type": "value", 43345 "value": "%KEYWORDS_COUNT%" 43346 }, 43347 { 43348 "name": "eVar103", 43349 "type": "value", 43350 "value": "%TITLE_LENGTH%" 43351 }, 43352 { 43353 "name": "eVar109", 43354 "type": "value", 43355 "value": "%PRODUCT_MANUFACTURER:DL%" 43356 }, 43357 { 43358 "name": "eVar110", 43359 "type": "value", 43360 "value": "%PCID%" 43361 }, 43362 { 43363 "name": "eVar122", 43364 "type": "value", 43365 "value": "%LETTER_COUNT%" 43366 }, 43367 { 43368 "name": "eVar123", 43369 "type": "value", 43370 "value": "%NISRC:URL_PARAM%" 43371 }, 43372 { 43373 "name": "eVar124", 43374 "type": "value", 43375 "value": "%WRAPPER:METATAG%|%WRAPPERID:METATAG%" 43376 }, 43377 { 43378 "name": "eVar130", 43379 "type": "value", 43380 "value": "%EXPERIENCE_CLOUD_ID%" 43381 }, 43382 { 43383 "name": "eVar133", 43384 "type": "value", 43385 "value": "%CAT_ID:METATAG%" 43386 }, 43387 { 43388 "name": "eVar134", 43389 "type": "value", 43390 "value": "%SUB_CAT_ID:METATAG%" 43391 }, 43392 { 43393 "name": "eVar135", 43394 "type": "value", 43395 "value": "%NODE_ID:METATAG%" 43396 }, 43397 { 43398 "name": "eVar137", 43399 "type": "value", 43400 "value": "%SEO_H1_VALUES%" 43401 }, 43402 { 43403 "name": "eVar138", 43404 "type": "value", 43405 "value": "%SEO_H2_VALUES%" 43406 }, 43407 { 43408 "name": "eVar139", 43409 "type": "value", 43410 "value": "%SEO_H3_VALUES%" 43411 }, 43412 { 43413 "name": "eVar140", 43414 "type": "value", 43415 "value": "%DESCRIPTION:METATAG%" 43416 }, 43417 { 43418 "name": "eVar152", 43419 "type": "value", 43420 "value": "%OneTrust_STATUS%" 43421 }, 43422 { 43423 "name": "eVar155", 43424 "type": "value", 43425 "value": "%PRODNOTIFY%" 43426 } 43427 ], 43428 "props": [ 43429 { 43430 "name": "prop1", 43431 "type": "value", 43432 "value": "%PAGETYPE:METATAG%" 43433 }, 43434 { 43435 "name": "prop2", 43436 "type": "alias", 43437 "value": "eVar27" 43438 }, 43439 { 43440 "name": "prop12", 43441 "type": "alias", 43442 "value": "eVar74" 43443 }, 43444 { 43445 "name": "prop13", 43446 "type": "alias", 43447 "value": "eVar124" 43448 }, 43449 { 43450 "name": "prop20", 43451 "type": "value",
43452 "value": "%DELIVEREDBY:METATAG%" 43453 }, 43454 { 43455 "name": "prop21", 43456 "type": "value", 43457 "value": "%INDUSTRY:AT:PA:DL%" 43458 }, 43459 { 43460 "name": "prop23", 43461 "type": "alias", 43462 "value": "eVar1" 43463 }, 43464 { 43465 "name": "prop27", 43466 "type": "alias", 43467 "value": "eVar59" 43468 }, 43469 { 43470 "name": "prop28", 43471 "type": "value", 43472 "value": "%NAVIGATION_SECTION%" 43473 }, 43474 { 43475 "name": "prop29", 43476 "type": "value", 43477 "value": "%SHORT_PAGENAME%" 43478 }, 43479 { 43480 "name": "prop30", 43481 "type": "value", 43482 "value": "%GENERIC_PAGENAME%" 43483 }, 43484 { 43485 "name": "prop31", 43486 "type": "alias", 43487 "value": "eVar36" 43488 }, 43489 { 43490 "name": "prop33", 43491 "type": "alias", 43492 "value": "eVar21" 43493 }, 43494 { 43495 "name": "prop38", 43496 "type": "alias", 43497 "value": "eVar88" 43498 }, 43499 { 43500 "name": "prop40", 43501 "type": "value", 43502 "value": "%APPLICATIONAREA_S:METATAG%" 43503 }, 43504 { 43505 "name": "prop44", 43506 "type": "value", 43507 "value": "%6SENSE_SCORES%" 43508 }, 43509 { 43510 "name": "prop70", 43511 "type": "value", 43512 "value": "%DOCUMENT_DATE:METATAG%" 43513 }, 43514 { 43515 "name": "prop71", 43516 "type": "value", 43517 "value": "%NIBOOSTS_UPDATE_DATE:METATAG%" 43518 }, 43519 { 43520 "name": "prop72", 43521 "type": "value", 43522 "value": "%NIBOOSTS_RATING_VALUE:METATAG%" 43523 }, 43524 { 43525 "name": "prop73", 43526 "type": "value", 43527 "value": "%NIBOOSTS_RATING_NUMBER:METATAG%" 43528 }, 43529 { 43530 "name": "prop75", 43531 "type": "value", 43532 "value": "client" 43533 } 43534 ], 43535 "events": [ 43536 { 43537 "name": "prodView", 43538 "value": "%PRODUCTCATEGORIES:METATAG%" 43539 }, 43540 { 43541 "name": "event3" 43542 } 43543 ], 43544 "channel": "%SECTION:METATAG%", 43545 "campaign": { 43546 "type": "value", 43547 "value": "%LAST_CID_URL_PARAM%" 43548 }, 43549 "pageName": "%PAGE_NAME%" 43550 } 43551 } 43552 }, 43553 { 43554 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 43555 "settings": { 43556 "type": "page" 43557 } 43558 }, 43559 { 43560 "modulePath": "core/src/lib/actions/customCode.js", 43561 "settings": { 43562 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCdf724bb59ee94621a8dca7376a57184a-source.js', 43563 "language": "javascript", 43564 "isExternal": true 43565 } 43566 }, 43567 { 43568 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 43569 "settings": {} 43570 }, 43571 { 43572 "modulePath": "core/src/lib/actions/customCode.js", 43573 "settings": { 43574 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCfab0e9ff71e34c82aa0df0ea79ff33e7-source.js', 43575 "language": "javascript", 43576 "isExternal": true 43577 } 43578 }, 43579 { 43580 "modulePath": "core/src/lib/actions/customCode.js", 43581 "settings": { 43582 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCda8a20477c614383a7e03e9cc4417dc3-source.js', 43583 "language": "javascript", 43584 "isExternal": true 43585 } 43586 } 43587 ] 43588 }, 43589 { 43590 "id": "RLb3283112e3d84e63852a1e80efcf64a0", 43591 "name": "Training_Top-CTA_Click:EBR", 43592 "events": [ 43593 { 43594 "modulePath": "core/src/lib/events/click.js", 43595 "settings": { 43596 "elementSelector": ".aa-training-topcta", 43597 "bubbleFireIfParent": true, 43598 "bubbleFireIfChildFired": false 43599 }, 43600 "ruleOrder": 50.0 43601 } 43602 ], 43603 "conditions": [ 43604 { 43605 "modulePath": "core/src/lib/conditions/valueComparison.js", 43606 "settings": { 43607 "comparison": { 43608 "operator": "doesNotEqual", 43609 "caseInsensitive": true 43610 }, 43611 "leftOperand": "%DisableAnalyticsCookie%", 43612 "rightOperand": "true" 43613 } 43614 }, 43615 { 43616 "modulePath": "core/src/lib/conditions/valueComparison.js", 43617 "settings": { 43618 "comparison": { 43619 "operator": "doesNotEqual", 43620 "caseInsensitive": true 43621 }, 43622 "leftOperand": "%TRAFFICTYPE_META%", 43623 "rightOperand": "bot" 43624 } 43625 } 43626 ], 43627 "actions": [ 43628 { 43629 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 43630 "settings": { 43631 "customSetup": { 43632 "source": function(event, s) { 43633 NIAnalytics.setAndTrack(["eVar33", "prop23"], event?.target?.innerText); 43634} 43635 }, 43636 "trackerProperties": { 43637 "eVars": [ 43638 { 43639 "name": "eVar1", 43640 "type": "value", 43641 "value": "%PAGE_NAME%" 43642 }, 43643 { 43644 "name": "eVar12", 43645 "type": "value", 43646 "value": "%PROFILE_ID:COOKIE%" 43647 }, 43648 { 43649 "name": "eVar21", 43650 "type": "value", 43651 "value": "%PAGE_URL%" 43652 }, 43653 { 43654 "name": "eVar27", 43655 "type": "value", 43656 "value": "%CONTENTTYPE:METATAG%" 43657 } 43658 ], 43659 "props": [ 43660 { 43661 "name": "prop2", 43662 "type": "alias", 43663 "value": "eVar27" 43664 }, 43665 { 43666 "name": "prop33", 43667 "type": "alias", 43668 "value": "eVar21" 43669 } 43670 ], 43671 "events": [ 43672 { 43673 "name": "event30" 43674 } 43675 ] 43676 } 43677 } 43678 }, 43679 { 43680 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 43681 "settings": { 43682 "type": "link", 43683 "linkName": "Training Top CTA", 43684 "linkType": "o" 43685 } 43686 }, 43687 { 43688 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 43689 "settings": {} 43690 } 43691 ] 43692 }, 43693 {
43694 "id": "RLb38015ee8ffc4286a5475840f1fc3b3e", 43695 "name": "6Sense:PLR", 43696 "events": [ 43697 { 43698 "modulePath": "core/src/lib/events/windowLoaded.js", 43699 "settings": {}, 43700 "ruleOrder": 50.0 43701 } 43702 ], 43703 "conditions": [ 43704 { 43705 "modulePath": "core/src/lib/conditions/valueComparison.js", 43706 "settings": { 43707 "comparison": { 43708 "operator": "isTrue" 43709 }, 43710 "leftOperand": "%OneTrust_Targeting_Consent%" 43711 } 43712 }, 43713 { 43714 "modulePath": "core/src/lib/conditions/valueComparison.js", 43715 "settings": { 43716 "comparison": { 43717 "operator": "doesNotEqual", 43718 "caseInsensitive": true 43719 }, 43720 "leftOperand": "%DisableAnalyticsCookie%", 43721 "rightOperand": "true" 43722 } 43723 }, 43724 { 43725 "modulePath": "core/src/lib/conditions/customCode.js", 43726 "settings": { 43727 "source": function(event, target) { 43728 var siteSection = _satellite.getVar("SECTION:METATAG"); 43729var acceptedSections = ["products", "innovations", "events", "landing", "company", "perspectives", "solutions"]; 43730 43731var contentType = _satellite.getVar("CONTENTTYPE:METATAG"); 43732var acceptedContentTypes = ["profile", "contactni", "search", "downloadconfirm", "courseware"]; 43733 43734var pageName = _satellite.getVar("PAGE_NAME"); 43735 43736var excluded = [ 43737 "products:checkout:shipping", 43738 "products:checkout:billing", 43739 "products:checkout:review" 43740 ]; 43741 43742if(excluded.indexOf(_satellite.getVar("DETAILED_PAGENAME")) > -1) return false; 43743 43744if(acceptedSections.indexOf(siteSection) > -1 || acceptedContentTypes.indexOf(contentType) > -1 || pageName === "homepage" || pageName.indexOf("ni.com/gate/gb") > -1 || pageName.indexOf("forums.ni.com/t5/NI-Blog/") === 0){ 43745 return true; 43746} 43747 43748return false; 43749} 43750 } 43751 }, 43752 { 43753 "modulePath": "core/src/lib/conditions/customCode.js", 43754 "settings": { 43755 "source": function(event, target) { 43756 return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 43757} 43758 } 43759 }, 43760 { 43761 "modulePath": "core/src/lib/conditions/customCode.js", 43762 "settings": { 43763 "source": function(event, target) { 43764 if(sessionStorage.getItem("blockedLaunchRules") === null) { 43765 return true; 43766}else{ 43767 var r = JSON.parse(sessionStorage.getItem("blockedLaunchRules")); 43768 return !r.includes("6SenseScript"); 43769} 43770} 43771 } 43772 } 43773 ], 43774 "actions": [ 43775 { 43776 "modulePath": "core/src/lib/actions/customCode.js", 43777 "settings": { 43778 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC78d98d5078bf405b8a198d99f32ab710-source.js', 43779 "language": "javascript", 43780 "isExternal": true 43781 } 43782 }, 43783 { 43784 "modulePath": "core/src/lib/actions/customCode.js", 43785 "settings": { 43786 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC00e9eb8e17fd449998f253e96b85749d-source.js', 43787 "language": "javascript", 43788 "isExternal": true 43789 } 43790 } 43791 ] 43792 }, 43793 { 43794 "id": "RLb4a62cb8c0e7486ebde73a4ca37a9c4a", 43795 "name": "CoursePDP_Top-CTA_Click:EBR", 43796 "events": [ 43797 { 43798 "modulePath": "core/src/lib/events/click.js", 43799 "settings": { 43800 "elementSelector": ".aa-cpdp-topcta", 43801 "bubbleFireIfParent": true, 43802 "bubbleFireIfChildFired": false 43803 }, 43804 "ruleOrder": 50.0 43805 } 43806 ], 43807 "conditions": [ 43808 { 43809 "modulePath": "core/src/lib/conditions/valueComparison.js", 43810 "settings": { 43811 "comparison": { 43812 "operator": "doesNotEqual", 43813 "caseInsensitive": true 43814 }, 43815 "leftOperand": "%DisableAnalyticsCookie%", 43816 "rightOperand": "true" 43817 } 43818 }, 43819 { 43820 "modulePath": "core/src/lib/conditions/valueComparison.js", 43821 "settings": { 43822 "comparison": { 43823 "operator": "doesNotEqual", 43824 "caseInsensitive": true 43825 }, 43826 "leftOperand": "%TRAFFICTYPE_META%", 43827 "rightOperand": "bot" 43828 } 43829 } 43830 ], 43831 "actions": [ 43832 { 43833 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 43834 "settings": { 43835 "customSetup": { 43836 "source": function(event, s) { 43837 NIAnalytics.setAndTrack(["eVar33", "prop23"], event?.target?.innerText); 43838} 43839 }, 43840 "trackerProperties": { 43841 "eVars": [ 43842 { 43843 "name": "eVar1", 43844 "type": "value", 43845 "value": "%PAGE_NAME%" 43846 }, 43847 { 43848 "name": "eVar12", 43849 "type": "value", 43850 "value": "%PROFILE_ID:COOKIE%" 43851 }, 43852 { 43853 "name": "eVar21", 43854 "type": "value", 43855 "value": "%PAGE_URL%" 43856 }, 43857 { 43858 "name": "eVar27", 43859 "type": "value", 43860 "value": "%CONTENTTYPE:METATAG%" 43861 } 43862 ], 43863 "props": [ 43864 { 43865 "name": "prop2", 43866 "type": "alias", 43867 "value": "eVar27" 43868 }, 43869 { 43870 "name": "prop33", 43871 "type": "alias", 43872 "value": "eVar21" 43873 } 43874 ], 43875 "events": [ 43876 { 43877 "name": "event30" 43878 } 43879 ] 43880 } 43881 } 43882 }, 43883 { 43884 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 43885 "settings": { 43886 "type": "link", 43887 "linkName": "Course PDP Top CTA", 43888 "linkType": "o" 43889 } 43890 }, 43891 { 43892 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 43893 "settings": {} 43894 } 43895 ] 43896 }, 43897 { 43898 "id": "RLb660d989efb242298e4c27e4dc8cc905", 43899 "name": "Merkle_OptIn:DCR", 43900 "events": [ 43901 { 43902 "modulePath": "core/src/lib/events/directCall.js", 43903 "settings": { 43904 "identifier": "merkleOptin" 43905 }, 43906 "ruleOrder": 50.0 43907 } 43908 ], 43909 "conditions": [ 43910 { 43911 "modulePath": "core/src/lib/conditions/valueComparison.js", 43912 "settings": { 43913 "comparison": { 43914 "operator": "isTrue" 43915 }, 43916 "leftOperand": "%OneTrust_Targeting_Consent%" 43917 } 43918 }, 43919 { 43920 "modulePath": "core/src/lib/conditions/valueComparison.js", 43921 "settings": { 43922 "comparison": { 43923 "operator": "doesNotEqual", 43924 "caseInsensitive": true 43925 }, 43926 "leftOperand": "%DisableAnalyticsCookie%", 43927 "rightOperand": "true" 43928 } 43929 } 43930 ], 43931 "actions": [ 43932 { 43933 "modulePath": "core/src/lib/actions/customCode.js", 43934 "settings": { 43935 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCe714f99b9be2403a973041e7225e575a-source.js', 43936 "language": "javascript", 43937 "isExternal": true 43938 } 43939 }, 43940 { 43941 "modulePath": "core/src/lib/actions/customCode.js", 43942 "settings": { 43943 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC7ca29f30a0074b0f9bf192c6fbde0639-source.js', 43944 "language": "javascript", 43945 "isExternal": true 43946 } 43947 } 43948 ] 43949 }, 43950 { 43951 "id": "RLb6c8f78fe8c8413b84a0b5b6f561a5c0", 43952 "name": "CoursePLP_Pagination_Click:EBR", 43953 "events": [ 43954 { 43955 "modulePath": "core/src/lib/events/click.js", 43956 "settings": { 43957 "elementSelector": ".course-catalog-table__footer-wrapper a.nicrc--pagination-nav__page", 43958 "bubbleFireIfParent": true, 43959 "bubbleFireIfChildFired": false 43960 }, 43961 "ruleOrder": 50.0 43962 } 43963 ], 43964 "conditions": [ 43965 { 43966 "modulePath": "core/src/lib/conditions/valueComparison.js", 43967 "settings": { 43968 "comparison": { 43969 "operator": "doesNotEqual", 43970 "caseInsensitive": true 43971 }, 43972 "leftOperand": "%DisableAnalyticsCookie%", 43973 "rightOperand": "true" 43974 } 43975 }, 43976 { 43977 "modulePath": "core/src/lib/conditions/valueComparison.js", 43978 "settings": { 43979 "comparison": { 43980 "operator": "doesNotEqual", 43981 "caseInsensitive": true 43982 }, 43983 "leftOperand": "%TRAFFICTYPE_META%", 43984 "rightOperand": "bot" 43985 } 43986 } 43987 ], 43988 "actions": [ 43989 { 43990 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 43991 "settings": { 43992 "customSetup": { 43993 "source": function(event, s) { 43994 _satellite.logger.log(event); 43995let ctaLabel = event.target.hasAttribute("data-page") ? event.target.getAttribute("data-page") : event.target.innerText; 43996NIAnalytics.setAndTrack(["eVar33", "prop23"], "Course:"+ctaLabel); 43997} 43998 }, 43999 "trackerProperties": { 44000 "eVars": [ 44001 { 44002 "name": "eVar1", 44003 "type": "value", 44004 "value": "%PAGE_NAME%" 44005 }, 44006 { 44007 "name": "eVar21", 44008 "type": "value", 44009 "value": "%PAGE_URL%" 44010 }, 44011 { 44012 "name": "eVar27", 44013 "type": "value", 44014 "value": "%CONTENTTYPE:METATAG%" 44015 } 44016 ], 44017 "props": [ 44018 { 44019 "name": "prop33", 44020 "type": "alias", 44021 "value": "eVar21" 44022 } 44023 ], 44024 "events": [ 44025 { 44026 "name": "event78" 44027 } 44028 ] 44029 } 44030 } 44031 }, 44032 { 44033 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44034 "settings": { 44035 "type": "link", 44036 "linkName": "Course PLP Pagination", 44037 "linkType": "o" 44038 } 44039 }, 44040 { 44041 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44042 "settings": {} 44043 } 44044 ] 44045 }, 44046 { 44047 "id": "RLb75d1927425b4dd4b864d335502e8ae9", 44048 "name": "CardContainer_CTA_Click:EBR", 44049 "events": [ 44050 { 44051 "modulePath": "core/src/lib/events/click.js", 44052 "settings": { 44053 "elementSelector": "[class*=\"CardContainerItem\"] a", 44054 "bubbleFireIfParent": true, 44055 "bubbleFireIfChildFired": false 44056 }, 44057 "ruleOrder": 50.0 44058 } 44059 ], 44060 "conditions": [ 44061 { 44062 "modulePath": "core/src/lib/conditions/valueComparison.js", 44063 "settings": { 44064 "comparison": { 44065 "operator": "doesNotEqual", 44066 "caseInsensitive": true 44067 }, 44068 "leftOperand": "%DisableAnalyticsCookie%", 44069 "rightOperand": "true" 44070 } 44071 }, 44072 { 44073 "modulePath": "core/src/lib/conditions/valueComparison.js", 44074 "settings": { 44075 "comparison": { 44076 "operator": "doesNotEqual", 44077 "caseInsensitive": true 44078 }, 44079 "leftOperand": "%TRAFFICTYPE_META%", 44080 "rightOperand": "bot" 44081 } 44082 } 44083 ], 44084 "actions": [ 44085 { 44086 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44087 "settings": { 44088 "customSetup": { 44089 "source": function(event, s) { 44090 //_satellite.logger.log(event); 44091let cardLabel = event.element.querySelector(".headline").innerText; 44092NIAnalytics.setAndTrack(["eVar33", "prop23"], cardLabel); 44093} 44094 }, 44095 "trackerProperties": { 44096 "eVars": [ 44097 { 44098 "name": "eVar1", 44099 "type": "value", 44100 "value": "%PAGE_NAME%" 44101 }, 44102 { 44103 "name": "eVar12", 44104 "type": "value", 44105 "value": "%PROFILE_ID:COOKIE%" 44106 }, 44107 { 44108 "name": "eVar21", 44109 "type": "value", 44110 "value": "%PAGE_URL%" 44111 }, 44112 { 44113 "name": "eVar27", 44114 "type": "value", 44115 "value": "%CONTENTTYPE:METATAG%" 44116 } 44117 ], 44118 "props": [ 44119 { 44120 "name": "prop2", 44121 "type": "alias", 44122 "value": "eVar27" 44123 }, 44124 { 44125 "name": "prop33", 44126 "type": "alias", 44127 "value": "eVar21" 44128 } 44129 ], 44130 "events": [ 44131 { 44132 "name": "event30" 44133 } 44134 ] 44135 } 44136 } 44137 }, 44138 { 44139 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44140 "settings": { 44141 "type": "link", 44142 "linkName": "aa-react-link", 44143 "linkType": "o" 44144 } 44145 }, 44146 { 44147 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44148 "settings": {} 44149 } 44150 ] 44151 }, 44152 { 44153 "id": "RLb7b2d72fcafa4de4b2d3c52dbeca138c", 44154 "name": "Capture_Search_Submit:DCR", 44155 "events": [ 44156 { 44157 "modulePath": "core/src/lib/events/directCall.js", 44158 "settings": { 44159 "identifier": "captureSearchSubmit" 44160 }, 44161 "ruleOrder": 50.0 44162 } 44163 ], 44164 "conditions": [ 44165 { 44166 "modulePath": "core/src/lib/conditions/valueComparison.js", 44167 "settings": { 44168 "comparison": { 44169 "operator": "doesNotEqual", 44170 "caseInsensitive": true 44171 }, 44172 "leftOperand": "%DisableAnalyticsCookie%", 44173 "rightOperand": "true" 44174 } 44175 }, 44176 { 44177 "modulePath": "core/src/lib/conditions/valueComparison.js", 44178 "settings": { 44179 "comparison": { 44180 "operator": "doesNotEqual", 44181 "caseInsensitive": true 44182 }, 44183 "leftOperand": "%TRAFFICTYPE_META%", 44184 "rightOperand": "bot" 44185 } 44186 } 44187 ], 44188 "actions": [ 44189 { 44190 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44191 "settings": { 44192 "customSetup": { 44193 "source": function(event, s) { 44194 var searchKeyword = event.detail.onsiteSearchKeyword; 44195 44196if(searchKeyword != undefined && searchKeyword.trim().length > 0){ 44197 NIAnalytics.setAndTrack("eVar2", searchKeyword); 44198} else { 44199 NIAnalytics.setAndTrack("eVar2", _satellite.getVar("ONSITESEARCHTERM:OSI:OS:DL")); 44200} 44201} 44202 }, 44203 "trackerProperties": { 44204 "eVars": [ 44205 { 44206 "name": "eVar1", 44207 "type": "value", 44208 "value": "%PAGE_NAME%" 44209 }, 44210 { 44211 "name": "eVar12", 44212 "type": "value", 44213 "value": "%PROFILE_ID:COOKIE%" 44214 }, 44215 { 44216 "name": "eVar21", 44217 "type": "value", 44218 "value": "%PAGE_URL%" 44219 }, 44220 { 44221 "name": "eVar33", 44222 "type": "value", 44223 "value": "%CAPTURESEARCHSUBMIT_EVENT:DL%" 44224 }, 44225 { 44226 "name": "eVar48", 44227 "type": "value", 44228 "value": "%event.detail.onsiteSearchTypedOrSuggested%" 44229 }, 44230 { 44231 "name": "eVar53", 44232 "type": "value", 44233 "value": "%event.detail.onsiteSearchAutocompleteRank%" 44234 }, 44235 { 44236 "name": "eVar56", 44237 "type": "value",
44238 "value": "%DETAILED_PAGENAME%" 44239 }, 44240 { 44241 "name": "eVar78", 44242 "type": "value", 44243 "value": "%event.detail.onsiteSearchAutocompleteLOV%" 44244 } 44245 ], 44246 "props": [ 44247 { 44248 "name": "prop2", 44249 "type": "alias", 44250 "value": "eVar27" 44251 }, 44252 { 44253 "name": "prop23", 44254 "type": "value", 44255 "value": "%CAPTURESEARCHSUBMIT_EVENT:DL%" 44256 }, 44257 { 44258 "name": "prop33", 44259 "type": "alias", 44260 "value": "eVar21" 44261 } 44262 ], 44263 "events": [ 44264 { 44265 "name": "event30" 44266 }, 44267 { 44268 "name": "event72" 44269 } 44270 ] 44271 } 44272 } 44273 }, 44274 { 44275 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44276 "settings": { 44277 "type": "link", 44278 "linkName": "", 44279 "linkType": "o" 44280 } 44281 }, 44282 { 44283 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44284 "settings": {} 44285 } 44286 ] 44287 }, 44288 { 44289 "id": "RLb9f0d5b34e9f4b21bec839f18e44b36f", 44290 "name": "SubscriptionSelection:DCR", 44291 "events": [ 44292 { 44293 "modulePath": "core/src/lib/events/customEvent.js", 44294 "settings": { 44295 "type": "aa-subscription-selection", 44296 "bubbleFireIfParent": true, 44297 "bubbleFireIfChildFired": true 44298 }, 44299 "ruleOrder": 50.0 44300 } 44301 ], 44302 "conditions": [], 44303 "actions": [ 44304 { 44305 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44306 "settings": { 44307 "customSetup": { 44308 "source": function(event, s) { 44309 NIAnalytics.setAndTrack(["eVar33","prop23"], "Subscription:"+event.detail.duration+":"+event.detail.currentEdition+":"+event.detail.selectedEdition+":"+event.detail.label); 44310} 44311 }, 44312 "trackerProperties": { 44313 "eVars": [ 44314 { 44315 "name": "eVar1", 44316 "type": "value", 44317 "value": "%PAGE_NAME%" 44318 }, 44319 { 44320 "name": "eVar12", 44321 "type": "value", 44322 "value": "%PROFILE_ID:COOKIE%" 44323 }, 44324 { 44325 "name": "eVar21", 44326 "type": "value", 44327 "value": "%PAGE_URL%" 44328 }, 44329 { 44330 "name": "eVar27", 44331 "type": "value", 44332 "value": "%CONTENTTYPE:METATAG%" 44333 } 44334 ], 44335 "props": [ 44336 { 44337 "name": "prop2", 44338 "type": "alias", 44339 "value": "eVar27" 44340 }, 44341 { 44342 "name": "prop33", 44343 "type": "alias", 44344 "value": "eVar21" 44345 } 44346 ], 44347 "events": [ 44348 { 44349 "name": "event30" 44350 } 44351 ] 44352 } 44353 } 44354 }, 44355 { 44356 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44357 "settings": { 44358 "type": "link", 44359 "linkName": "FreeTrial Try again", 44360 "linkType": "o" 44361 } 44362 }, 44363 { 44364 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44365 "settings": {} 44366 } 44367 ] 44368 }, 44369 { 44370 "id": "RLbb8ab0fc48aa4745ab582432ef8a96a6", 44371 "name": "CTA_Distributor_Click:EBR", 44372 "events": [ 44373 { 44374 "modulePath": "core/src/lib/events/customEvent.js", 44375 "settings": { 44376 "type": "aa-distributor-click", 44377 "bubbleFireIfParent": true, 44378 "bubbleFireIfChildFired": true 44379 }, 44380 "ruleOrder": 50.0 44381 } 44382 ], 44383 "conditions": [ 44384 { 44385 "modulePath": "core/src/lib/conditions/valueComparison.js", 44386 "settings": { 44387 "comparison": { 44388 "operator": "doesNotEqual", 44389 "caseInsensitive": true 44390 }, 44391 "leftOperand": "%DisableAnalyticsCookie%", 44392 "rightOperand": "true" 44393 } 44394 }, 44395 { 44396 "modulePath": "core/src/lib/conditions/valueComparison.js", 44397 "settings": { 44398 "comparison": { 44399 "operator": "doesNotEqual", 44400 "caseInsensitive": true 44401 }, 44402 "leftOperand": "%TRAFFICTYPE_META%", 44403 "rightOperand": "bot" 44404 } 44405 } 44406 ], 44407 "actions": [ 44408 { 44409 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44410 "settings": { 44411 "customSetup": { 44412 "source": function(event, s) { 44413 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.detail?.linkLabel || event.target?.innerText || ''); 44414s.products = ";" + event.detail?.partNumber.replace(/,/g, ",;"); 44415s.linkTrackVars += ",products"; 44416} 44417 }, 44418 "trackerProperties": { 44419 "eVars": [ 44420 { 44421 "name": "eVar1", 44422 "type": "value", 44423 "value": "%PAGE_NAME%" 44424 }, 44425 { 44426 "name": "eVar12", 44427 "type": "value", 44428 "value": "%PROFILE_ID:COOKIE%" 44429 }, 44430 { 44431 "name": "eVar21", 44432 "type": "value", 44433 "value": "%PAGE_URL%" 44434 }, 44435 { 44436 "name": "eVar27", 44437 "type": "value", 44438 "value": "%CONTENTTYPE:METATAG%" 44439 } 44440 ], 44441 "props": [ 44442 { 44443 "name": "prop2", 44444 "type": "alias", 44445 "value": "eVar27" 44446 }, 44447 { 44448 "name": "prop33", 44449 "type": "alias", 44450 "value": "eVar21" 44451 } 44452 ], 44453 "events": [ 44454 { 44455 "name": "event30" 44456 } 44457 ], 44458 "pageURL": "%PAGE_URL%" 44459 } 44460 } 44461 }, 44462 { 44463 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44464 "settings": { 44465 "type": "link", 44466 "linkName": "aa-react-link", 44467 "linkType": "o" 44468 } 44469 }, 44470 { 44471 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44472 "settings": {} 44473 } 44474 ] 44475 }, 44476 { 44477 "id": "RLbc48c3f42175460484ed0dba3be28162", 44478 "name": "SWDDP_Top-CTA_Click:EBR", 44479 "events": [ 44480 { 44481 "modulePath": "core/src/lib/events/click.js", 44482 "settings": { 44483 "elementSelector": ".aa-swddp-cta:not(.downloadOptions__buttonSection_restartLink)", 44484 "bubbleFireIfParent": true, 44485 "bubbleFireIfChildFired": false 44486 }, 44487 "ruleOrder": 50.0 44488 } 44489 ], 44490 "conditions": [ 44491 { 44492 "modulePath": "core/src/lib/conditions/valueComparison.js", 44493 "settings": { 44494 "comparison": { 44495 "operator": "doesNotEqual", 44496 "caseInsensitive": true 44497 }, 44498 "leftOperand": "%DisableAnalyticsCookie%", 44499 "rightOperand": "true" 44500 } 44501 }, 44502 { 44503 "modulePath": "core/src/lib/conditions/valueComparison.js", 44504 "settings": { 44505 "comparison": { 44506 "operator": "doesNotEqual", 44507 "caseInsensitive": true 44508 }, 44509 "leftOperand": "%TRAFFICTYPE_META%", 44510 "rightOperand": "bot" 44511 } 44512 } 44513 ], 44514 "actions": [ 44515 { 44516 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44517 "settings": { 44518 "customSetup": { 44519 "source": function(event, s) { 44520 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW DDP:"+event?.target?.innerText); 44521} 44522 }, 44523 "trackerProperties": { 44524 "eVars": [ 44525 { 44526 "name": "eVar1", 44527 "type": "value", 44528 "value": "%PAGE_NAME%" 44529 }, 44530 { 44531 "name": "eVar12", 44532 "type": "value", 44533 "value": "%PROFILE_ID:COOKIE%" 44534 }, 44535 { 44536 "name": "eVar21", 44537 "type": "value", 44538 "value": "%PAGE_URL%" 44539 }, 44540 { 44541 "name": "eVar27", 44542 "type": "value", 44543 "value": "%CONTENTTYPE:METATAG%" 44544 } 44545 ], 44546 "props": [ 44547 { 44548 "name": "prop2", 44549 "type": "alias", 44550 "value": "eVar27" 44551 }, 44552 { 44553 "name": "prop33", 44554 "type": "alias", 44555 "value": "eVar21" 44556 } 44557 ], 44558 "events": [ 44559 { 44560 "name": "event30" 44561 } 44562 ] 44563 } 44564 } 44565 }, 44566 { 44567 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44568 "settings": { 44569 "type": "link", 44570 "linkName": "SWDDP Top CTA", 44571 "linkType": "o" 44572 } 44573 }, 44574 { 44575 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44576 "settings": {} 44577 } 44578 ] 44579 }, 44580 { 44581 "id": "RLbd15b7f3db61440cb0bfac1a1cb0baa6", 44582 "name": "FreeTrial-TryAgain:DCR", 44583 "events": [ 44584 { 44585 "modulePath": "core/src/lib/events/customEvent.js", 44586 "settings": { 44587 "type": "aa-free-trial-try-again", 44588 "bubbleFireIfParent": true, 44589 "bubbleFireIfChildFired": true 44590 }, 44591 "ruleOrder": 50.0 44592 } 44593 ], 44594 "conditions": [], 44595 "actions": [ 44596 { 44597 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44598 "settings": { 44599 "trackerProperties": { 44600 "eVars": [ 44601 { 44602 "name": "eVar1", 44603 "type": "value", 44604 "value": "%PAGE_NAME%" 44605 }, 44606 { 44607 "name": "eVar12", 44608 "type": "value", 44609 "value": "%PROFILE_ID:COOKIE%" 44610 }, 44611 { 44612 "name": "eVar21", 44613 "type": "value", 44614 "value": "%PAGE_URL%" 44615 }, 44616 { 44617 "name": "eVar27", 44618 "type": "value", 44619 "value": "%CONTENTTYPE:METATAG%" 44620 }, 44621 { 44622 "name": "eVar33", 44623 "type": "value", 44624 "value": "FreeTrial: Try again" 44625 } 44626 ], 44627 "props": [ 44628 { 44629 "name": "prop2", 44630 "type": "alias", 44631 "value": "eVar27" 44632 }, 44633 { 44634 "name": "prop23", 44635 "type": "alias", 44636 "value": "eVar33" 44637 }, 44638 { 44639 "name": "prop33", 44640 "type": "alias", 44641 "value": "eVar21" 44642 } 44643 ], 44644 "events": [ 44645 { 44646 "name": "event30" 44647 } 44648 ] 44649 } 44650 } 44651 }, 44652 { 44653 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44654 "settings": { 44655 "type": "link", 44656 "linkName": "FreeTrial Try again", 44657 "linkType": "o" 44658 } 44659 }, 44660 { 44661 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44662 "settings": {} 44663 } 44664 ] 44665 }, 44666 { 44667 "id": "RLbe8f96163ebc41ed900f19f717e4428c", 44668 "name": "Capture_Checkout:DCR", 44669 "events": [ 44670 { 44671 "modulePath": "core/src/lib/events/directCall.js", 44672 "settings": { 44673 "identifier": "captureCheckout" 44674 }, 44675 "ruleOrder": 50.0 44676 } 44677 ], 44678 "conditions": [ 44679 { 44680 "modulePath": "core/src/lib/conditions/valueComparison.js", 44681 "settings": { 44682 "comparison": { 44683 "operator": "doesNotEqual", 44684 "caseInsensitive": true 44685 }, 44686 "leftOperand": "%DisableAnalyticsCookie%", 44687 "rightOperand": "true" 44688 } 44689 }, 44690 { 44691 "modulePath": "core/src/lib/conditions/valueComparison.js", 44692 "settings": { 44693 "comparison": { 44694 "operator": "doesNotEqual", 44695 "caseInsensitive": true 44696 }, 44697 "leftOperand": "%TRAFFICTYPE_META%", 44698 "rightOperand": "bot" 44699 } 44700 } 44701 ], 44702 "actions": [ 44703 { 44704 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44705 "settings": { 44706 "customSetup": { 44707 "source": function(event, s) { 44708 if (event.detail.items) { 44709 s.products = ";" + event.detail.items.replace(/,/g, ",;") 44710 s.linkTrackVars += ",products"; 44711} 44712} 44713 }, 44714 "trackerProperties": { 44715 "eVars": [ 44716 { 44717 "name": "eVar22", 44718 "type": "value", 44719 "value": "%event.detail.eventDetail%" 44720 }, 44721 { 44722 "name": "eVar101", 44723 "type": "value", 44724 "value": "%HASHED_EMAIL:USER:DL%" 44725 } 44726 ], 44727 "events": [ 44728 { 44729 "name": "scCheckout" 44730 } 44731 ] 44732 } 44733 } 44734 }, 44735 { 44736 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 44737 "settings": { 44738 "type": "link", 44739 "linkName": "", 44740 "linkType": "o" 44741 } 44742 }, 44743 { 44744 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 44745 "settings": {} 44746 } 44747 ] 44748 }, 44749 { 44750 "id": "RLbff5aa7b8ae14a9b9c46289e502d7cef", 44751 "name": "Wrapper_Header_v2:Click:EBR", 44752 "events": [ 44753 { 44754 "modulePath": "core/src/lib/events/click.js", 44755 "settings": { 44756 "elementSelector": ".analytics-headersolutions-link", 44757 "bubbleFireIfParent": true, 44758 "bubbleFireIfChildFired": true 44759 }, 44760 "ruleOrder": 50.0 44761 }, 44762 { 44763 "modulePath": "core/src/lib/events/click.js", 44764 "settings": { 44765 "elementSelector": ".analytics-headerproducts-link", 44766 "bubbleFireIfParent": true, 44767 "bubbleFireIfChildFired": true 44768 }, 44769 "ruleOrder": 50.0 44770 }, 44771 { 44772 "modulePath": "core/src/lib/events/click.js", 44773 "settings": { 44774 "elementSelector": ".analytics-headersupport-link", 44775 "bubbleFireIfParent": true, 44776 "bubbleFireIfChildFired": true 44777 }, 44778 "ruleOrder": 50.0 44779 }, 44780 { 44781 "modulePath": "core/src/lib/events/click.js", 44782 "settings": { 44783 "elementSelector": ".analytics-headeraccount-link", 44784 "bubbleFireIfParent": true, 44785 "bubbleFireIfChildFired": true 44786 }, 44787 "ruleOrder": 50.0 44788 }, 44789 { 44790 "modulePath": "core/src/lib/events/click.js", 44791 "settings": { 44792 "elementSelector": ".analytics-headerlogo-link", 44793 "bubbleFireIfParent": true, 44794 "bubbleFireIfChildFired": true 44795 }, 44796 "ruleOrder": 50.0 44797 }, 44798 { 44799 "modulePath": "core/src/lib/events/click.js", 44800 "settings": { 44801 "elementSelector": ".analytics-header-link", 44802 "bubbleFireIfParent": true, 44803 "bubbleFireIfChildFired": true 44804 }, 44805 "ruleOrder": 50.0 44806 }, 44807 { 44808 "modulePath": "core/src/lib/events/click.js", 44809 "settings": { 44810 "eleme
44810ntSelector": ".analytics-headercart-link", 44811 "bubbleFireIfParent": true, 44812 "bubbleFireIfChildFired": true 44813 }, 44814 "ruleOrder": 50.0 44815 }, 44816 { 44817 "modulePath": "core/src/lib/events/click.js", 44818 "settings": { 44819 "elementSelector": ".analytics-headerperspectives-link", 44820 "bubbleFireIfParent": true, 44821 "bubbleFireIfChildFired": true 44822 }, 44823 "ruleOrder": 50.0 44824 }, 44825 { 44826 "modulePath": "core/src/lib/events/click.js", 44827 "settings": { 44828 "elementSelector": ".analytics-headercommunity-link", 44829 "bubbleFireIfParent": true, 44830 "bubbleFireIfChildFired": true 44831 }, 44832 "ruleOrder": 50.0 44833 }, 44834 { 44835 "modulePath": "core/src/lib/events/click.js", 44836 "settings": { 44837 "elementSelector": ".analytics-headerlogout-link", 44838 "bubbleFireIfParent": true, 44839 "bubbleFireIfChildFired": true 44840 }, 44841 "ruleOrder": 50.0 44842 }, 44843 { 44844 "modulePath": "core/src/lib/events/click.js", 44845 "settings": { 44846 "elementSelector": ".analytics-headerlogin-link", 44847 "bubbleFireIfParent": true, 44848 "bubbleFireIfChildFired": true 44849 }, 44850 "ruleOrder": 50.0 44851 }, 44852 { 44853 "modulePath": "core/src/lib/events/click.js", 44854 "settings": { 44855 "elementSelector": ".analytics-headerorders-link", 44856 "bubbleFireIfParent": true, 44857 "bubbleFireIfChildFired": true 44858 }, 44859 "ruleOrder": 50.0 44860 }, 44861 { 44862 "modulePath": "core/src/lib/events/click.js", 44863 "settings": { 44864 "elementSelector": ".analytics-headerquotes-link", 44865 "bubbleFireIfParent": true, 44866 "bubbleFireIfChildFired": true 44867 }, 44868 "ruleOrder": 50.0 44869 }, 44870 { 44871 "modulePath": "core/src/lib/events/click.js", 44872 "settings": { 44873 "elementSelector": ".analytics-headermyproducts-link", 44874 "bubbleFireIfParent": true, 44875 "bubbleFireIfChildFired": true 44876 }, 44877 "ruleOrder": 50.0 44878 }, 44879 { 44880 "modulePath": "core/src/lib/events/click.js", 44881 "settings": { 44882 "elementSelector": ".analytics-headerlearnerdashboard-link", 44883 "bubbleFireIfParent": true, 44884 "bubbleFireIfChildFired": true 44885 }, 44886 "ruleOrder": 50.0 44887 }, 44888 { 44889 "modulePath": "core/src/lib/events/click.js", 44890 "settings": { 44891 "elementSelector": ".analytics-headerservice-link", 44892 "bubbleFireIfParent": true, 44893 "bubbleFireIfChildFired": true 44894 }, 44895 "ruleOrder": 50.0 44896 }, 44897 { 44898 "modulePath": "core/src/lib/events/click.js", 44899 "settings": { 44900 "elementSelector": ".analytics-headermysubscriptions-link", 44901 "bubbleFireIfParent": true, 44902 "bubbleFireIfChildFired": true 44903 }, 44904 "ruleOrder": 50.0 44905 }, 44906 { 44907 "modulePath": "core/src/lib/events/click.js", 44908 "settings": { 44909 "elementSelector": ".analytics-headerpartners-link", 44910 "bubbleFireIfParent": true, 44911 "bubbleFireIfChildFired": true 44912 }, 44913 "ruleOrder": 50.0 44914 } 44915 ], 44916 "conditions": [ 44917 { 44918 "modulePath": "core/src/lib/conditions/valueComparison.js", 44919 "settings": { 44920 "comparison": { 44921 "operator": "doesNotEqual", 44922 "caseInsensitive": true 44923 }, 44924 "leftOperand": "%DisableAnalyticsCookie%", 44925 "rightOperand": "true" 44926 } 44927 }, 44928 { 44929 "modulePath": "core/src/lib/conditions/valueComparison.js", 44930 "settings": { 44931 "comparison": { 44932 "operator": "doesNotEqual", 44933 "caseInsensitive": true 44934 }, 44935 "leftOperand": "%TRAFFICTYPE_META%", 44936 "rightOperand": "bot" 44937 } 44938 } 44939 ], 44940 "actions": [ 44941 { 44942 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 44943 "settings": { 44944 "customSetup": { 44945 "source": function(event, s) { 44946 if (!Element.prototype.closest) { 44947 if (!Element.prototype.matches) { 44948 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 44949 } 44950 Element.prototype.closest = function(s) { 44951 var el = this; 44952 var ancestor = this; 44953 if (!document.documentElement.contains(el)) return null; 44954 do { 44955 if (ancestor.matches(s)) { 44956 return ancestor; 44957 } 44958 44959 if (typeof ancestor.parentElement !== "undefined") { 44960 ancestor = ancestor.parentElement; 44961 } else { 44962 ancestor = ancestor.parentNode; 44963 } 44964 } while (ancestor !== null && ancestor !== undefined); 44965 return null; 44966 }; 44967} 44968 44969function urlCleaner(url){ 44970 var targetUrl = document.createElement("a"); 44971 targetUrl.href = url; 44972 44973 var myPath = targetUrl.pathname; 44974 var myHost = targetUrl.hostname; 44975 var pathRegex = new RegExp("/((?:lang/)?(?:d|esa|f|i|ja|ko|zhs|zht|en|de|es|fr|it|pt|nl|pl|ru|cs|sv|fi|da|no|hu|ro|sr|sl|hr)(?:/|$))"); 44976 var myPageName = ""; 44977 44978 if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\/.*/)) { 44979 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}(\/.*)/, "$1"); 44980 } else if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\.html/)) { 44981 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}\.html/, "/"); 44982 } else if (myPath.match(/\/[a-z]{2}\/.*/)) { 44983 myPageName = myHost + myPath.replace(/\/[a-z]{2}(\/.*)/, "$1"); 44984 } else if (myPath.match(/\/[a-z]{2}\.html/)) { 44985 myPageName = myHost + myPath.replace(/\/[a-z]{2}\.html/, "/"); 44986 } else { 44987 myPageName = myHost + myPath.replace(pathRegex, "/"); 44988 } 44989 44990 return myPageName; 44991} 44992 44993var target = event.target.closest("a"); 44994var targetURL = urlCleaner(target.href); 44995var analyticsData = ""; 44996 44997if(target.classList.contains('analytics-headerlogo-link')){ 44998 analyticsData = "header:nilogo"; 44999} else if(target.classList.contains('analytics-header-link')){ 45000 analyticsData = "header:" + targetURL; 45001} else if(target.classList.contains('analytics-headercart-link')){ 45002 analyticsData = "header:cart"; 45003} else if(target.classList.contains('analytics-headersolutions-link')){ 45004 analyticsData = "header:solutions"; 45005} else if(target.classList.contains('analytics-headerproducts-link')){ 45006 analyticsData = "header:products"; 45007} else if(target.classList.contains('analytics-headerperspectives-link')){ 45008 analyticsData = "header:perspectives"; 45009} else if(target.classList.contains('analytics-headersupport-link')){ 45010 analyticsData = "header:support"; 45011} else if(target.classList.contains('analytics-headercommunity-link')){ 45012 analyticsData = "header:community"; 45013} else if(target.classList.contains('analytics-headeraccount-link')){ 45014 analyticsData = "header:myni"; 45015} else if(target.classList.contains('analytics-headerlogout-link')){ 45016 analyticsData = "header:logout"; 45017} else if(target.classList.contains('analytics-headerlogin-link')){ 45018 analyticsData = "header:login"; 45019} else if(target.classList.contains('analytics-headerorders-link')){ 45020 analyticsData = "header:orders"; 45021} else if(target.classList.contains('analytics-headerquotes-link')){ 45022 analyticsData = "header:quotes"; 45023} else if(target.classList.contains('analytics-headermyproducts-link')){ 45024 analyticsData = "header:myproducts"; 45025} else if(target.classList.contains('analytics-headerlearnerdashboard-link')){ 45026 analyticsData = "header:learnerdashboard"; 45027} else if(target.classList.contains('analytics-headerservice-link')){ 45028 analyticsData = "header:service request"; 45029} else if(target.classList.contains('analytics-headermysubscriptions-link')){ 45030 analyticsData = "header:my subscriptions"; 45031} else if(target.classList.contains('analytics-headerpartners-link')){ 45032 analyticsData = "header:partners"; 45033} 45034 45035NIAnalytics.setAndTrack(["eVar33", "prop23"], analyticsData); 45036 45037//ContentSquare dynamic tracking 45038window._uxa = window._uxa || []; 45039window._uxa.push(["trackDynamicVariable", {key: 'Site Clicks', value: analyticsData} ]); 45040} 45041 }, 45042 "trackerProperties": { 45043 "eVars": [ 45044 { 45045 "name": "eVar1", 45046 "type": "value", 45047 "value": "%PAGE_NAME%" 45048 }, 45049 { 45050 "name": "eVar12", 45051 "type": "value", 45052 "value": "%PROFILE_ID:COOKIE%" 45053 }, 45054 { 45055 "name": "eVar21", 45056 "type": "value", 45057 "value": "%PAGE_URL%" 45058 }, 45059 { 45060 "name": "eVar27", 45061 "type": "value", 45062 "value": "%CONTENTTYPE:METATAG%" 45063 }, 45064 { 45065 "name": "eVar56", 45066 "type": "value",
45067 "value": "%DETAILED_PAGENAME%" 45068 } 45069 ], 45070 "props": [ 45071 { 45072 "name": "prop2", 45073 "type": "alias", 45074 "value": "eVar27" 45075 }, 45076 { 45077 "name": "prop33", 45078 "type": "alias", 45079 "value": "eVar21" 45080 }, 45081 { 45082 "name": "prop50", 45083 "type": "alias", 45084 "value": "eVar56" 45085 } 45086 ], 45087 "events": [ 45088 { 45089 "name": "event30" 45090 } 45091 ] 45092 } 45093 } 45094 }, 45095 { 45096 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 45097 "settings": { 45098 "type": "link", 45099 "linkType": "o" 45100 } 45101 }, 45102 { 45103 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 45104 "settings": {} 45105 } 45106 ] 45107 }, 45108 { 45109 "id": "RLc17389c14b9545c4ab5c515f42bd0e54", 45110 "name": "SWPDP_Compare_Editions_Click:EBR", 45111 "events": [ 45112 { 45113 "modulePath": "core/src/lib/events/click.js", 45114 "settings": { 45115 "elementSelector": ".aa-swpdp-compare", 45116 "bubbleFireIfParent": true, 45117 "bubbleFireIfChildFired": false 45118 }, 45119 "ruleOrder": 50.0 45120 } 45121 ], 45122 "conditions": [ 45123 { 45124 "modulePath": "core/src/lib/conditions/valueComparison.js", 45125 "settings": { 45126 "comparison": { 45127 "operator": "doesNotEqual", 45128 "caseInsensitive": true 45129 }, 45130 "leftOperand": "%DisableAnalyticsCookie%", 45131 "rightOperand": "true" 45132 } 45133 }, 45134 { 45135 "modulePath": "core/src/lib/conditions/valueComparison.js", 45136 "settings": { 45137 "comparison": { 45138 "operator": "doesNotEqual", 45139 "caseInsensitive": true 45140 }, 45141 "leftOperand": "%TRAFFICTYPE_META%", 45142 "rightOperand": "bot" 45143 } 45144 } 45145 ], 45146 "actions": [ 45147 { 45148 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 45149 "settings": { 45150 "customSetup": { 45151 "source": function(event, s) { 45152 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:"+event.target.innerText); 45153} 45154 }, 45155 "trackerProperties": { 45156 "eVars": [ 45157 { 45158 "name": "eVar1", 45159 "type": "value", 45160 "value": "%PAGE_NAME%" 45161 }, 45162 { 45163 "name": "eVar12", 45164 "type": "value", 45165 "value": "%PROFILE_ID:COOKIE%" 45166 }, 45167 { 45168 "name": "eVar21", 45169 "type": "value", 45170 "value": "%PAGE_URL%" 45171 }, 45172 { 45173 "name": "eVar27", 45174 "type": "value", 45175 "value": "%CONTENTTYPE:METATAG%" 45176 } 45177 ], 45178 "props": [ 45179 { 45180 "name": "prop2", 45181 "type": "alias", 45182 "value": "eVar27" 45183 }, 45184 { 45185 "name": "prop33", 45186 "type": "alias", 45187 "value": "eVar21" 45188 } 45189 ], 45190 "events": [ 45191 { 45192 "name": "event30" 45193 } 45194 ] 45195 } 45196 } 45197 }, 45198 { 45199 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 45200 "settings": { 45201 "type": "link", 45202 "linkName": "SW PDP Compare Editions", 45203 "linkType": "o" 45204 } 45205 }, 45206 { 45207 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 45208 "settings": {} 45209 } 45210 ] 45211 }, 45212 { 45213 "id": "RLc2d397040d834e34b681f26932ac7dee", 45214 "name": "Target SSR Click:EBR", 45215 "events": [ 45216 { 45217 "modulePath": "core/src/lib/events/click.js", 45218 "settings": { 45219 "elementSelector": ".link[data-an-evar112]", 45220 "bubbleFireIfParent": true, 45221 "bubbleFireIfChildFired": true 45222 }, 45223 "ruleOrder": 50.0 45224 } 45225 ], 45226 "conditions": [], 45227 "actions": [ 45228 { 45229 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 45230 "settings": { 45231 "customSetup": { 45232 "source": function(event, s) { 45233 NIAnalytics.setAndTrack("eVar112", event.target.closest('a').getAttribute('data-an-evar112')); 45234} 45235 }, 45236 "trackerProperties": {} 45237 } 45238 }, 45239 { 45240 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 45241 "settings": { 45242 "type": "link", 45243 "linkName": "Target SSR Click", 45244 "linkType": "o" 45245 } 45246 }, 45247 { 45248 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 45249 "settings": {} 45250 } 45251 ] 45252 }, 45253 { 45254 "id": "RLc457ce3fc283423f8fd430141e3389f0", 45255 "name": "Target_v2_SPA:PLR copy", 45256 "events": [ 45257 { 45258 "modulePath": "core/src/lib/events/directCall.js", 45259 "settings": { 45260 "identifier": "triggerTarget" 45261 }, 45262 "ruleOrder": 50.0 45263 }, 45264 { 45265 "modulePath": "spa-view-change-event/src/lib/events/spaViewChange.js", 45266 "settings": { 45267 "isEnableOnPageLoad": false 45268 }, 45269 "ruleOrder": 50.0 45270 } 45271 ], 45272 "conditions": [ 45273 { 45274 "modulePath": "core/src/lib/conditions/valueComparison.js", 45275 "settings": { 45276 "comparison": { 45277 "operator": "isTrue" 45278 }, 45279 "leftOperand": "%TARGET_ENABLED%" 45280 } 45281 }, 45282 { 45283 "modulePath": "core/src/lib/conditions/customCode.js", 45284 "settings": { 45285 "source": function(event, target) { 45286 if (typeof NIAnalytics === "undefined") { 45287 function NIAnalytics() {} 45288} 45289 45290if (typeof NIAnalytics.getMetaTag === "undefined"){ 45291 NIAnalytics.getMetaTag = function (name) { 45292 var metaTagArray = document.getElementsByTagName("meta"); 45293 for (var i = 0; i < metaTagArray.length; i++) { 45294 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 45295 return metaTagArray[i].content; 45296 } 45297 } 45298 return ""; 45299 } 45300} 45301 45302return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 45303} 45304 } 45305 }, 45306 { 45307 "modulePath": "core/src/lib/conditions/valueComparison.js", 45308 "settings": { 45309 "comparison": { 45310 "operator": "doesNotEqual", 45311 "caseInsensitive": true 45312 }, 45313 "leftOperand": "%DisableAnalyticsCookie%", 45314 "rightOperand": "true" 45315 } 45316 }, 45317 { 45318 "modulePath": "core/src/lib/conditions/customCode.js", 45319 "settings": { 45320 "source": function(event, target) { 45321 if(sessionStorage.getItem("blockedLaunchRules") === null) { 45322 return true; 45323}else{ 45324 var r = JSON.parse(sessionStorage.getItem("blockedLaunchRules")); 45325 return !r.includes("Target"); 45326} 45327} 45328 } 45329 } 45330 ], 45331 "actions": [ 45332 { 45333 "modulePath": "adobe-target-v2/lib/addPageLoadParams.js", 45334 "settings": { 45335 "params": { 45336 "pgCID": { 45337 "value": "%CID:URL_PARAM%", 45338 "checked": true 45339 }, 45340 "loggedIn": { 45341 "value": "%LOGGED_IN%", 45342 "checked": true 45343 }, 45344 "pgDomain": {
45345 "value": "%DOMAIN%", 45346 "checked": true 45347 }, 45348 "pgSection": { 45349 "value": "%SECTION:METATAG%", 45350 "checked": true 45351 }, 45352 "pgIndustry": { 45353 "value": "%INDUSTRY_S:METATAG%", 45354 "checked": true 45355 }, 45356 "pgLanguage": { 45357 "value": "%LANGUAGE:METATAG%", 45358 "checked": true 45359 }, 45360 "pgPageName": { 45361 "value": "%DETAILED_PAGENAME%", 45362 "checked": true 45363 }, 45364 "pgPageType": { 45365 "value": "%PAGETYPE:METATAG%", 45366 "checked": true 45367 }, 45368 "pgReferrer": { 45369 "value": "%REFERRER%", 45370 "checked": true 45371 }, 45372 "pgTemplate": { 45373 "value": "%TEMPLATE:PI:PA:DL%", 45374 "checked": true 45375 }, 45376 "pgSicNumber": { 45377 "value": "%6SENSE_SICCODE%", 45378 "checked": true 45379 }, 45380 "pgWrapperId": { 45381 "value": "%WRAPPERID:METATAG%", 45382 "checked": true 45383 }, 45384 "pgPageNameV1": { 45385 "value": "%PAGENAME_FOR_TARGET_PART1%", 45386 "checked": true 45387 }, 45388 "pgPageNameV2": { 45389 "value": "%PAGENAME_FOR_TARGET_PART2%", 45390 "checked": true 45391 }, 45392 "pgPageNameV3": { 45393 "value": "%PAGENAME_FOR_TARGET_PART3%", 45394 "checked": true 45395 }, 45396 "pgPageNameV4": { 45397 "value": "%PAGENAME_FOR_TARGET_PART4%", 45398 "checked": true 45399 }, 45400 "pgPageNameV5": { 45401 "value": "%PAGENAME_FOR_TARGET_PART5%", 45402 "checked": true 45403 }, 45404 "pgPageNameV6": { 45405 "value": "%PAGENAME_FOR_TARGET_PART6%", 45406 "checked": true 45407 }, 45408 "pgPageNameV7": { 45409 "value": "%PAGENAME_FOR_TARGET_PART7%", 45410 "checked": true 45411 }, 45412 "pgSearchTerm": { 45413 "value": "%ONSITESEARCHTERM:OSI:OS:DL%", 45414 "checked": true 45415 }, 45416 "pgTemplate_s": { 45417 "value": "%TEMPLATE_S:METATAG%", 45418 "checked": true 45419 }, 45420 "pgUserLocale": { 45421 "value": "%LOCALE:COOKIE%", 45422 "checked": true 45423 }, 45424 "pgCFSearchBot": { 45425 "value": "%CF_SEARCH_BOT:METATAG%", 45426 "checked": true 45427 }, 45428 "pgContentType": { 45429 "value": "%CONTENTTYPE:METATAG%", 45430 "checked": true 45431 }, 45432 "pgCountryMeta": { 45433 "value": "%COUNTRY_METATAG%", 45434 "checked": true 45435 }, 45436 "pgDeliveredBy": { 45437 "value": "%DELIVEREDBY:METATAG%", 45438 "checked": true 45439 }, 45440 "pgScreenWidth": { 45441 "value": "%SCREEN_WIDTH%", 45442 "checked": true 45443 }, 45444 "pgSubTemplate": { 45445 "value": "%SUBTEMPLATE:PI:PA:DL%", 45446 "checked": true 45447 }, 45448 "mbox3rdPartyId": { 45449 "value": "%HASHED_EMAIL%", 45450 "checked": true 45451 }, 45452 "pgUserProfileId": { 45453 "value": "%PROFILE_ID:COOKIE%", 45454 "checked": true 45455 }, 45456 "pgB2BCookieExists": { 45457 "value": "%B2BCookieExists%", 45458 "checked": true 45459 }, 45460 "pgContentTypeHierarchy": { 45461 "value": "%CONTENTTYPE_HIERARCHY%", 45462 "checked": true 45463 }, 45464 "pgPageNameForBreakdowns": { 45465 "value": "%PAGE_NAME%", 45466 "checked": true 45467 } 45468 } 45469 } 45470 }, 45471 { 45472 "modulePath": "core/src/lib/actions/customCode.js", 45473 "settings": { 45474 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC17374727e9bc40fbae3a89a331479934-source.js', 45475 "language": "javascript", 45476 "isExternal": true 45477 } 45478 }, 45479 { 45480 "modulePath": "target-to-analytics/src/lib/actions/addTargetListener.js", 45481 "settings": { 45482 "pageLoadEvent": "empty", 45483 "postPageLoadEvent": "empty"
45484 } 45485 }, 45486 { 45487 "modulePath": "adobe-target-v2/lib/firePageLoad.js", 45488 "settings": { 45489 "bodyHiddenStyle": "body {opacity: 0 !important}", 45490 "bodyHidingEnabled": false 45491 } 45492 }, 45493 { 45494 "modulePath": "core/src/lib/actions/customCode.js", 45495 "settings": { 45496 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC0fc807da49f64933b0b4bbed3442a13e-source.js', 45497 "language": "javascript", 45498 "isExternal": true 45499 } 45500 } 45501 ] 45502 }, 45503 { 45504 "id": "RLc63748e7e8214e30b47dc2258e50634d", 45505 "name": "Target_v2:PLR", 45506 "events": [ 45507 { 45508 "modulePath": "core/src/lib/events/libraryLoaded.js", 45509 "settings": {}, 45510 "ruleOrder": 50.0 45511 } 45512 ], 45513 "conditions": [ 45514 { 45515 "modulePath": "core/src/lib/conditions/valueComparison.js", 45516 "settings": { 45517 "comparison": { 45518 "operator": "isTrue" 45519 }, 45520 "leftOperand": "%TARGET_ENABLED%" 45521 } 45522 }, 45523 { 45524 "modulePath": "core/src/lib/conditions/customCode.js", 45525 "settings": { 45526 "source": function(event, target) { 45527 if (typeof NIAnalytics === "undefined") { 45528 function NIAnalytics() {} 45529} 45530 45531if (typeof NIAnalytics.getMetaTag === "undefined"){ 45532 NIAnalytics.getMetaTag = function (name) { 45533 var metaTagArray = document.getElementsByTagName("meta"); 45534 for (var i = 0; i < metaTagArray.length; i++) { 45535 if (metaTagArray[i].name.toLowerCase() == name.toLowerCase()) { 45536 return metaTagArray[i].content; 45537 } 45538 } 45539 return ""; 45540 } 45541} 45542 45543return NIAnalytics.getMetaTag('pardotiframe').toLowerCase() !== "yes"; 45544} 45545 } 45546 }, 45547 { 45548 "modulePath": "core/src/lib/conditions/valueComparison.js", 45549 "settings": { 45550 "comparison": { 45551 "operator": "doesNotEqual", 45552 "caseInsensitive": true 45553 }, 45554 "leftOperand": "%DisableAnalyticsCookie%", 45555 "rightOperand": "true" 45556 } 45557 }, 45558 { 45559 "modulePath": "core/src/lib/conditions/customCode.js", 45560 "settings": { 45561 "source": function(event, target) { 45562 if(sessionStorage.getItem("blockedLaunchRules") === null) { 45563 return true; 45564}else{ 45565 var r = JSON.parse(sessionStorage.getItem("blockedLaunchRules")); 45566 return !r.includes("Target"); 45567} 45568} 45569 } 45570 }, 45571 { 45572 "modulePath": "core/src/lib/conditions/valueComparison.js", 45573 "settings": { 45574 "comparison": { 45575 "operator": "isTrue" 45576 }, 45577 "leftOperand": "%TargetAutohideEnabled%" 45578 } 45579 } 45580 ], 45581 "actions": [ 45582 { 45583 "modulePath": "adobe-target-v2/lib/loadTarget.js", 45584 "settings": {} 45585 }, 45586 { 45587 "modulePath": "adobe-target-v2/lib/addPageLoadParams.js", 45588 "settings": { 45589 "params": { 45590 "pgCID": { 45591 "value": "%CID:URL_PARAM%", 45592 "checked": true 45593 }, 45594 "loggedIn": { 45595 "value": "%LOGGED_IN%", 45596 "checked": true 45597 }, 45598 "pgDomain": { 45599 "value": "%DOMAIN%", 45600 "checked": true 45601 }, 45602 "pgSection": { 45603 "value": "%SECTION:METATAG%", 45604 "checked": true 45605 }, 45606 "pgIndustry": { 45607 "value": "%INDUSTRY_S:METATAG%", 45608 "checked": true 45609 }, 45610 "pgLanguage": { 45611 "value": "%LANGUAGE:METATAG%", 45612 "checked": true 45613 }, 45614 "pgPageName": { 45615 "value": "%DETAILED_PAGENAME%", 45616 "checked": true 45617 }, 45618 "pgPageType": { 45619 "value": "%PAGETYPE:METATAG%", 45620 "checked": true 45621 }, 45622 "pgReferrer": { 45623 "value": "%REFERRER%", 45624 "checked": true 45625 }, 45626 "pgTemplate": { 45627 "value": "%TEMPLATE:PI:PA:DL%", 45628 "checked": true 45629 }, 45630 "pgSicNumber": { 45631 "value": "%6SENSE_SICCODE%", 45632 "checked": true 45633 }, 45634 "pgWrapperId": { 45635 "value": "%WRAPPERID:METATAG%", 45636 "checked": true 45637 }, 45638 "pgPageNameV1": { 45639 "value": "%PAGENAME_FOR_TARGET_PART1%", 45640 "checked": true 45641 }, 45642 "pgPageNameV2": { 45643 "value": "%PAGENAME_FOR_TARGET_PART2%", 45644 "checked": true 45645 }, 45646 "pgPageNameV3": { 45647 "value": "%PAGENAME_FOR_TARGET_PART3%", 45648 "checked": true 45649 }, 45650 "pgPageNameV4": { 45651 "value": "%PAGENAME_FOR_TARGET_PART4%", 45652 "checked": true 45653 }, 45654 "pgPageNameV5": { 45655 "value": "%PAGENAME_FOR_TARGET_PART5%", 45656 "checked": true 45657 }, 45658 "pgPageNameV6": { 45659 "value": "%PAGENAME_FOR_TARGET_PART6%", 45660 "checked": true 45661 }, 45662 "pgPageNameV7": { 45663 "value": "%PAGENAME_FOR_TARGET_PART7%", 45664 "checked": true 45665 }, 45666 "pgSearchTerm": { 45667 "value": "%ONSITESEARCHTERM:OSI:OS:DL%", 45668 "checked": true 45669 }, 45670 "pgTemplate_s": { 45671 "value": "%TEMPLATE_S:METATAG%", 45672 "checked": true 45673 }, 45674 "pgUserLocale": { 45675 "value": "%LOCALE:COOKIE%", 45676 "checked": true 45677 }, 45678 "pgCFSearchBot": { 45679 "value": "%CF_SEARCH_BOT:METATAG%", 45680 "checked": true 45681 }, 45682 "pgContentType": { 45683 "value": "%CONTENTTYPE:METATAG%", 45684 "checked": true 45685 }, 45686 "pgCountryMeta": { 45687 "value": "%COUNTRY_METATAG%", 45688 "checked": true 45689 }, 45690 "pgDeliveredBy": {
45691 "value": "%DELIVEREDBY:METATAG%", 45692 "checked": true 45693 }, 45694 "pgScreenWidth": { 45695 "value": "%SCREEN_WIDTH%", 45696 "checked": true 45697 }, 45698 "pgSubTemplate": { 45699 "value": "%SUBTEMPLATE:PI:PA:DL%", 45700 "checked": true 45701 }, 45702 "mbox3rdPartyId": { 45703 "value": "%HASHED_EMAIL%", 45704 "checked": true 45705 }, 45706 "pgUserProfileId": { 45707 "value": "%PROFILE_ID:COOKIE%", 45708 "checked": true 45709 }, 45710 "pgB2BCookieExists": { 45711 "value": "%B2BCookieExists%", 45712 "checked": true 45713 }, 45714 "pgContentTypeHierarchy": { 45715 "value": "%CONTENTTYPE_HIERARCHY%", 45716 "checked": true 45717 }, 45718 "pgPageNameForBreakdowns": { 45719 "value": "%PAGE_NAME%", 45720 "checked": true 45721 } 45722 } 45723 } 45724 }, 45725 { 45726 "modulePath": "core/src/lib/actions/customCode.js", 45727 "settings": { 45728 "source": "/*\n *Name: Adobe Target CS Integration\n *Version: 1.0\n */\nfunction isEmpty(val) {\n return val === undefined || val == null || val.length <= 0 ? true : false;\n}\n\nfunction key(obj) {\n return Object.keys(obj)\n .map(function (k) {\n return k + \"\" + obj[k];\n })\n .join(\"\");\n}\n\nfunction distinct(arr) {\n var result = arr.reduce(function (acc, e) {\n acc[key(e)] = e;\n return acc;\n }, {});\n return Object.keys(result).map(function (k) {\n return result[k];\n });\n}\n\ndocument.addEventListener(adobe.target.event.REQUEST_SUCCEEDED, function (e) {\n window.ttMETA = typeof window.ttMETA != \"undefined\" ? window.ttMETA : [];\n var tokens = e.detail.responseTokens;\n if (isEmpty(tokens)) {\n return;\n }\n var uniqueTokens = distinct(tokens);\n uniqueTokens.forEach(function (token) {\n if (window.ttMETA.filter(function(e) { return e.CampaignId === token[\"activity.id\"]; }).length == 0) {\n window.ttMETA.push({\n CampaignName: token[\"activity.name\"],\n CampaignId: token[\"activity.id\"],\n RecipeName: token[\"experience.name\"],\n RecipeId: token[\"experience.id\"],\n OfferId: token[\"option.id\"],\n OfferName: token[\"option.name\"],\n });\n }\n });\n});\n//Adobe Target CS Integration End\n\n\nfunction getPageName() {\n var myPath = location.pathname;\n var myHost = location.hostname;\n var pathRegex = new RegExp(\"/((?:lang/)?(?:d|esa|f|i|ja|ko|zhs|zht|en|de|es|fr|it|pt|nl|pl|ru|cs|sv|fi|da|no|hu|ro|sr|sl|hr)(?:/|$))\");\n var cleanUpRegex = /(?:\\/(rating|lang\\/invalid|lang|diff|clone|edit|delete))|(?:\\.(?:html|htm))/g;\n var myPageName = \"\";\n\n if (myPath.match(/\\/[a-z]{2}\\-[a-z]{2}\\/.*/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}\\-[a-z]{2}(\\/.*)/, \"$1\");\n } else if (myPath.match(/\\/[a-z]{2}\\-[a-z]{2}\\.html/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}\\-[a-z]{2}\\.html/, \"/\");\n } else if (myPath.match(/\\/[a-z]{2}\\/.*/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}(\\/.*)/, \"$1\");\n } else if (myPath.match(/\\/[a-z]{2}\\.html/)) {\n myPageName = myHost + myPath.replace(/\\/[a-z]{2}\\.html/, \"/\");\n } else {\n myPageName = myHost + myPath.replace(pathRegex, \"/\");\n }\n\n myPageName = myPageName.replace(cleanUpRegex, \"\");\n return myPageName;\n}\n\nvar softwarePortfolioPages = [\"www.ni.com/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-teststand\", \"www.ni.com/shop/data-acquisition-and-control/application-software-for-data-acquisition-and-control-category/what-is-diadem\", \"www.ni.com/shop/data-acquisition-and-control/flexlogger\", \"www.ni.com/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-multisim\", \"www.ni.com/shop/data-acquisition-and-control/application-software-for-data-acquisition-and-control-category/what-is-veristand\", \"www.ni.com/shop/wireless-design-test/application-software-for-wireless-design-test-category/what-is-rfmx\"];\nvar acceptedSoftwarePortfolioLocales = [\"en\", \"de\", \"fr\", \"es\", \"ja\", \"ko\", \"zh\"];\n\ntargetPageParamsAll = function () {\n var locale = window.location.pathname.substring(window.location.pathname.indexOf(\"/\")+1,3).toLowerCase();\n if(window.location.href.indexOf(\"/perspectives/\") > -1){\n return {\n \"entity\": {\n \"categoryId\": \"perspectives\",\n \"id\": \"perspectives_\"+window.location.pathname.substring(window.location.pathname.lastIndexOf(\"/\")+1).replace(\".html\", \"\")\n },\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n } else if(softwarePortfolioPages.indexOf(getPageName()) > -1){\n return {\n \"entity\": {\n \"categoryId\": \"software_portfolio\",\n \"id\": \"software_portfolio_\"+window.location.pathname.substring(window.location.pathname.lastIndexOf(\"/\")+1).replace(\".html\", \"\") + \"_\" + (acceptedSoftwarePortfolioLocales.indexOf(locale) > -1 ? locale : \"en\")\n },\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n }else if(window.location.pathname.indexOf(\"/shop/hardware/products/pxi-\") > -1){\n return {\n \"entity\": {\n \"categoryId\": \"pxi_modules\",\n \"id\": \"pxi_modules_\"+window.location.pathname.substring(window.location.pathname.lastIndexOf(\"/\")+1).replace(\".html\", \"\") + \"_\" + (acceptedSoftwarePortfolioLocales.indexOf(locale) > -1 ? locale : \"en\")\n },\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n }else {\n return {\n \"mbox3rdPartyId\": _satellite.getVar('HASHED_EMAIL'),\n \"profile\": {\n \"mboxThirdPartyId\": _satellite.getVar('HASHED_EMAIL')\n }\n };\n }\n};\n", 45729 "language": "javascript" 45730 } 45731 }, 45732 { 45733 "modulePath": "target-to-analytics/src/lib/actions/addTargetListener.js", 45734 "settings": { 45735 "pageLoadEvent": "empty", 45736 "postPageLoadEvent": "empty"
45737 } 45738 }, 45739 { 45740 "modulePath": "adobe-target-v2/lib/firePageLoad.js", 45741 "settings": { 45742 "bodyHiddenStyle": "body {opacity: 0}", 45743 "bodyHidingEnabled": true 45744 } 45745 }, 45746 { 45747 "modulePath": "core/src/lib/actions/customCode.js", 45748 "settings": { 45749 "source": "document.dispatchEvent(new Event('ni-target-ready'));", 45750 "language": "javascript" 45751 } 45752 } 45753 ] 45754 }, 45755 { 45756 "id": "RLccc8dff582654030aad0bdce284cb957", 45757 "name": "PromotionBannerView:DCR", 45758 "events": [ 45759 { 45760 "modulePath": "core/src/lib/events/customEvent.js", 45761 "settings": { 45762 "type": "aa-promo-banner-view", 45763 "bubbleFireIfParent": true, 45764 "bubbleFireIfChildFired": true 45765 }, 45766 "ruleOrder": 50.0 45767 } 45768 ], 45769 "conditions": [ 45770 { 45771 "modulePath": "core/src/lib/conditions/valueComparison.js", 45772 "settings": { 45773 "comparison": { 45774 "operator": "doesNotEqual", 45775 "caseInsensitive": true 45776 }, 45777 "leftOperand": "%DisableAnalyticsCookie%", 45778 "rightOperand": "true" 45779 } 45780 }, 45781 { 45782 "modulePath": "core/src/lib/conditions/valueComparison.js", 45783 "settings": { 45784 "comparison": { 45785 "operator": "doesNotEqual", 45786 "caseInsensitive": true 45787 }, 45788 "leftOperand": "%TRAFFICTYPE_META%", 45789 "rightOperand": "bot" 45790 } 45791 } 45792 ], 45793 "actions": [ 45794 { 45795 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 45796 "settings": { 45797 "customSetup": { 45798 "source": function(event, s) { 45799 NIAnalytics.setAndTrack("eVar160",event.detail.id); 45800 45801} 45802 }, 45803 "trackerProperties": { 45804 "eVars": [ 45805 { 45806 "name": "eVar1", 45807 "type": "value", 45808 "value": "%PAGE_NAME%" 45809 }, 45810 { 45811 "name": "eVar21", 45812 "type": "value", 45813 "value": "%PAGE_URL%" 45814 }, 45815 { 45816 "name": "eVar27", 45817 "type": "value", 45818 "value": "%CONTENTTYPE:METATAG%" 45819 } 45820 ], 45821 "props": [ 45822 { 45823 "name": "prop2", 45824 "type": "alias", 45825 "value": "eVar27" 45826 }, 45827 { 45828 "name": "prop33", 45829 "type": "alias", 45830 "value": "eVar21" 45831 } 45832 ], 45833 "events": [ 45834 { 45835 "name": "event80" 45836 } 45837 ] 45838 } 45839 } 45840 }, 45841 { 45842 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 45843 "settings": { 45844 "type": "link", 45845 "linkName": "Promotion Banner View", 45846 "linkType": "o" 45847 } 45848 }, 45849 { 45850 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 45851 "settings": {} 45852 } 45853 ] 45854 }, 45855 { 45856 "id": "RLceac866bcf134460a19d96e8ab09179d", 45857 "name": "MediaComplete:EBR", 45858 "events": [ 45859 { 45860 "modulePath": "core/src/lib/events/mediaEnded.js", 45861 "settings": { 45862 "bubbleFireIfParent": true, 45863 "bubbleFireIfChildFired": true 45864 }, 45865 "ruleOrder": 50.0 45866 } 45867 ], 45868 "conditions": [ 45869 { 45870 "modulePath": "core/src/lib/conditions/valueComparison.js", 45871 "settings": { 45872 "comparison": { 45873 "operator": "doesNotEqual", 45874 "caseInsensitive": true 45875 }, 45876 "leftOperand": "%DisableAnalyticsCookie%", 45877 "rightOperand": "true" 45878 } 45879 }, 45880 { 45881 "modulePath": "core/src/lib/conditions/valueComparison.js", 45882 "settings": { 45883 "comparison": { 45884 "operator": "doesNotEqual", 45885 "caseInsensitive": true 45886 }, 45887 "leftOperand": "%TRAFFICTYPE_META%", 45888 "rightOperand": "bot" 45889 } 45890 } 45891 ], 45892 "actions": [ 45893 { 45894 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 45895 "settings": { 45896 "customSetup": { 45897 "source": function(event, s) { 45898 NIAnalytics.setAndTrack(["eVar30", "prop22"], videojs.getPlayers()[event.element.playerId].mediainfo.name); 45899} 45900 }, 45901 "trackerProperties": { 45902 "eVars": [ 45903 { 45904 "name": "eVar1", 45905 "type": "value", 45906 "value": "%PAGE_NAME%" 45907 }, 45908 { 45909 "name": "eVar21", 45910 "type": "value", 45911 "value": "%PAGE_URL%" 45912 }, 45913 { 45914 "name": "eVar147", 45915 "type": "value", 45916 "value": "%CURRENT_ISO_DATE_STRING%" 45917 } 45918 ], 45919 "props": [ 45920 { 45921 "name": "prop33", 45922 "type": "alias", 45923 "value": "eVar21" 45924 } 45925 ], 45926 "events": [ 45927 { 45928 "name": "event16" 45929 } 45930 ] 45931 } 45932 } 45933 }, 45934 { 45935 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 45936 "settings": { 45937 "type": "link", 45938 "linkType": "o" 45939 } 45940 }, 45941 { 45942 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 45943 "settings": {} 45944 } 45945 ] 45946 }, 45947 { 45948 "id": "RLcf20f84db2294c43b916f5b7a4b153a5", 45949 "name": "Secondary_Nav_Click:EBR", 45950 "events": [ 45951 { 45952 "modulePath": "core/src/lib/events/click.js", 45953 "settings": { 45954 "elementSelector": ".hub-navigation a:not([data-analytics-cta-type]), .sw-hub-dropdown-li a:not([data-analytics-cta-type])", 45955 "bubbleFireIfParent": true, 45956 "bubbleFireIfChildFired": false 45957 }, 45958 "ruleOrder": 50.0 45959 } 45960 ], 45961 "conditions": [ 45962 { 45963 "modulePath": "core/src/lib/conditions/valueComparison.js", 45964 "settings": { 45965 "comparison": { 45966 "operator": "doesNotEqual", 45967 "caseInsensitive": true 45968 }, 45969 "leftOperand": "%DisableAnalyticsCookie%", 45970 "rightOperand": "true" 45971 } 45972 }, 45973 { 45974 "modulePath": "core/src/lib/conditions/valueComparison.js", 45975 "settings": { 45976 "comparison": { 45977 "operator": "doesNotEqual", 45978 "caseInsensitive": true 45979 }, 45980 "leftOperand": "%TRAFFICTYPE_META%", 45981 "rightOperand": "bot" 45982 } 45983 } 45984 ], 45985 "actions": [ 45986 { 45987 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 45988 "settings": { 45989 "customSetup": { 45990 "source": function(event, s) { 45991 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SecondaryNav:" + event.target.innerText); 45992} 45993 }, 45994 "trackerProperties": { 45995 "eVars": [ 45996 { 45997 "name": "eVar1", 45998 "type": "value", 45999 "value": "%PAGE_NAME%" 46000 }, 46001 { 46002 "name": "eVar12", 46003 "type": "value", 46004 "value": "%PROFILE_ID:COOKIE%" 46005 }, 46006 { 46007 "name": "eVar21", 46008 "type": "value", 46009 "value": "%PAGE_URL%" 46010 }, 46011 { 46012 "name": "eVar27", 46013 "type": "value", 46014 "value": "%CONTENTTYPE:METATAG%" 46015 } 46016 ], 46017 "props": [ 46018 { 46019 "name": "prop2", 46020 "type": "alias", 46021 "value": "eVar27" 46022 }, 46023 { 46024 "name": "prop33", 46025 "type": "alias", 46026 "value": "eVar21" 46027 } 46028 ], 46029 "events": [ 46030 { 46031 "name": "event30" 46032 } 46033 ] 46034 } 46035 } 46036 }, 46037 { 46038 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 46039 "settings": { 46040 "type": "link", 46041 "linkName": "aa-react-link", 46042 "linkType": "o" 46043 } 46044 }, 46045 { 46046 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 46047 "settings": {} 46048 } 46049 ] 46050 }, 46051 { 46052 "id": "RLd1583ae05a58450da5893698ea55fe6a", 46053 "name": "Search_Results_Page_Tracking:PLR", 46054 "events": [ 46055 { 46056 "modulePath": "core/src/lib/events/windowLoaded.js", 46057 "settings": {}, 46058 "ruleOrder": 50.0 46059 }, 46060 { 46061 "modulePath": "core/src/lib/events/directCall.js", 46062 "settings": { 46063 "identifier": "captureVirtualPageLoad" 46064 }, 46065 "ruleOrder": 50.0 46066 } 46067 ], 46068 "conditions": [ 46069 { 46070 "modulePath": "core/src/lib/conditions/valueComparison.js", 46071 "settings": { 46072 "comparison": { 46073 "operator": "equals" 46074 }, 46075 "leftOperand": "%NICOM_PAGE%", 46076 "rightOperand": "true" 46077 } 46078 }, 46079 { 46080 "modulePath": "core/src/lib/conditions/valueComparison.js", 46081 "settings": { 46082 "comparison": { 46083 "operator": "equals" 46084 }, 46085 "leftOperand": "%TEMPLATE:PI:PA:DL%", 46086 "rightOperand": "searchResults" 46087 } 46088 }, 46089 { 46090 "modulePath": "core/src/lib/conditions/valueComparison.js", 46091 "settings": { 46092 "comparison": { 46093 "operator": "doesNotEqual", 46094 "caseInsensitive": true 46095 }, 46096 "leftOperand": "%DisableAnalyticsCookie%", 46097 "rightOperand": "true" 46098 } 46099 } 46100 ], 46101 "actions": [ 46102 { 46103 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46104 "settings": { 46105 "trackerProperties": { 46106 "eVars": [ 46107 { 46108 "name": "eVar65", 46109 "type": "value", 46110 "value": "%ONSITESEARCHSCENARIO:OSI:OS:DL%" 46111 }, 46112 { 46113 "name": "eVar52", 46114 "type": "value", 46115 "value": "%ONSITESEARCHDYM:OSI:OS:DL%" 46116 }, 46117 { 46118 "name": "eVar2", 46119 "type": "value", 46120 "value": "%ONSITESEARCHTERM:OSI:OS:DL%" 46121 }, 46122 { 46123 "name": "eVar41", 46124 "type": "value", 46125 "value": "Internal Search" 46126 } 46127 ], 46128 "props": [ 46129 { 46130 "name": "prop4", 46131 "type": "alias", 46132 "value": "eVar2" 46133 }, 46134 { 46135 "name": "prop5", 46136 "type": "value", 46137 "value": "%NI_SEARCHRESULTSCOUNT:METATAG%" 46138 } 46139 ] 46140 } 46141 } 46142 } 46143 ] 46144 }, 46145 { 46146 "id": "RLd401ce5078a04b8f901c4531b9fc15ca", 46147 "name": "Co-Term CTA Click:EBR", 46148 "events": [ 46149 { 46150 "modulePath": "core/src/lib/events/click.js", 46151 "settings": { 46152 "elementSelector": ".aa-co-term-cta", 46153 "bubbleFireIfParent": true, 46154 "bubbleFireIfChildFired": false 46155 }, 46156 "ruleOrder": 50.0 46157 } 46158 ], 46159 "conditions": [], 46160 "actions": [ 46161 { 46162 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46163 "settings": { 46164 "customSetup": { 46165 "source": function(event, s) { 46166 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Co-Term:"+event.target.innerText); 46167} 46168 }, 46169 "trackerProperties": { 46170 "eVars": [ 46171 { 46172 "name": "eVar1", 46173 "type": "value", 46174 "value": "%PAGE_NAME%" 46175 }, 46176 { 46177 "name": "eVar12", 46178 "type": "value", 46179 "value": "%PROFILE_ID:COOKIE%" 46180 }, 46181 { 46182 "name": "eVar21", 46183 "type": "value", 46184 "value": "%PAGE_URL%" 46185 }, 46186 { 46187 "name": "eVar27", 46188 "type": "value", 46189 "value": "%CONTENTTYPE:METATAG%" 46190 } 46191 ], 46192 "props": [ 46193 { 46194 "name": "prop2", 46195 "type": "alias", 46196 "value": "eVar27" 46197 }, 46198 { 46199 "name": "prop33", 46200 "type": "alias", 46201 "value": "eVar21" 46202 } 46203 ], 46204 "events": [ 46205 { 46206 "name": "event30" 46207 } 46208 ] 46209 } 46210 } 46211 }, 46212 { 46213 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 46214 "settings": { 46215 "type": "link", 46216 "linkName": "Co-Term CTA Click", 46217 "linkType": "o" 46218 } 46219 }, 46220 { 46221 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 46222 "settings": {} 46223 } 46224 ] 46225 }, 46226 { 46227 "id": "RLd53a569e9e4a4d51b4b15fc9a77f2ea8", 46228 "name": "Baidu_OpenLab_Code:PLR", 46229 "events": [ 46230 { 46231 "modulePath": "core/src/lib/events/windowLoaded.js", 46232 "settings": {}, 46233 "ruleOrder": 50.0 46234 } 46235 ], 46236 "conditions": [ 46237 { 46238 "modulePath": "core/src/lib/conditions/valueComparison.js", 46239 "settings": { 46240 "comparison": { 46241 "operator": "isTrue" 46242 }, 46243 "leftOperand": "%OneTrust_Targeting_Consent%" 46244 } 46245 }, 46246 { 46247 "modulePath": "core/src/lib/conditions/valueComparison.js", 46248 "settings": { 46249 "comparison": { 46250 "operator": "doesNotEqual", 46251 "caseInsensitive": true 46252 }, 46253 "leftOperand": "%DisableAnalyticsCookie%", 46254 "rightOperand": "true" 46255 } 46256 }, 46257 { 46258 "modulePath": "core/src/lib/conditions/customCode.js", 46259 "settings": { 46260 "source": function(event, target) { 46261 var urls = ["campaigns.ni.com/china-openlab", "campaigns.ni.com/china-openlab-request"]; 46262 46263for(var i=0; i<urls.length; i++){ 46264 if(_satellite.getVar("PAGE_URL").indexOf(urls[i]) > -1 ) return true; 46265} 46266return false;
46267} 46268 } 46269 }, 46270 { 46271 "modulePath": "core/src/lib/conditions/valueComparison.js", 46272 "settings": { 46273 "comparison": { 46274 "operator": "equals", 46275 "caseInsensitive": true 46276 }, 46277 "leftOperand": "%COUNTRY_METATAG%", 46278 "rightOperand": "CN" 46279 } 46280 } 46281 ], 46282 "actions": [ 46283 { 46284 "modulePath": "core/src/lib/actions/customCode.js", 46285 "settings": { 46286 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC5bb791c78ddc40a58db7abc49c6cba8b-source.js', 46287 "language": "javascript", 46288 "isExternal": true 46289 } 46290 }, 46291 { 46292 "modulePath": "core/src/lib/actions/customCode.js", 46293 "settings": { 46294 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC7f78af719ee24b1c91fc48588551aa8f-source.js', 46295 "language": "javascript", 46296 "isExternal": true 46297 } 46298 } 46299 ] 46300 }, 46301 { 46302 "id": "RLd8b2866b861444eba2ae4e6ab490350c", 46303 "name": "SoftwareRenewalAdditionalProductClick:DCR", 46304 "events": [ 46305 { 46306 "modulePath": "core/src/lib/events/customEvent.js", 46307 "settings": { 46308 "type": "aa-renewal-additional-software-cta-click", 46309 "bubbleFireIfParent": true, 46310 "bubbleFireIfChildFired": true 46311 }, 46312 "ruleOrder": 50.0 46313 } 46314 ], 46315 "conditions": [], 46316 "actions": [ 46317 { 46318 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46319 "settings": { 46320 "customSetup": { 46321 "source": function(event, s) { 46322 NIAnalytics.setAndTrack(["eVar33","prop23"], "Renewal_step2:"+event.detail.title+":"+event.detail.link); 46323} 46324 }, 46325 "trackerProperties": { 46326 "eVars": [ 46327 { 46328 "name": "eVar1", 46329 "type": "value", 46330 "value": "%PAGE_NAME%" 46331 }, 46332 { 46333 "name": "eVar12", 46334 "type": "value", 46335 "value": "%PROFILE_ID:COOKIE%" 46336 }, 46337 { 46338 "name": "eVar21", 46339 "type": "value", 46340 "value": "%PAGE_URL%" 46341 }, 46342 { 46343 "name": "eVar27", 46344 "type": "value", 46345 "value": "%CONTENTTYPE:METATAG%" 46346 } 46347 ], 46348 "props": [ 46349 { 46350 "name": "prop2", 46351 "type": "alias", 46352 "value": "eVar27" 46353 }, 46354 { 46355 "name": "prop33", 46356 "type": "alias", 46357 "value": "eVar21" 46358 } 46359 ], 46360 "events": [ 46361 { 46362 "name": "event30" 46363 } 46364 ] 46365 } 46366 } 46367 }, 46368 { 46369 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 46370 "settings": { 46371 "type": "link", 46372 "linkName": "SoftwareRenewalAdditionalProductClick", 46373 "linkType": "o" 46374 } 46375 }, 46376 { 46377 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 46378 "settings": {} 46379 } 46380 ] 46381 }, 46382 { 46383 "id": "RLd8b2e52406324987a9f829951b7b5b24", 46384 "name": "SWPDP_Upsell_banner_Click:EBR", 46385 "events": [ 46386 { 46387 "modulePath": "core/src/lib/events/click.js", 46388 "settings": { 46389 "elementSelector": ".aa-swpdp-upsell-banner", 46390 "bubbleFireIfParent": true, 46391 "bubbleFireIfChildFired": false 46392 }, 46393 "ruleOrder": 50.0 46394 } 46395 ], 46396 "conditions": [ 46397 { 46398 "modulePath": "core/src/lib/conditions/valueComparison.js", 46399 "settings": { 46400 "comparison": { 46401 "operator": "doesNotEqual", 46402 "caseInsensitive": true 46403 }, 46404 "leftOperand": "%DisableAnalyticsCookie%", 46405 "rightOperand": "true" 46406 } 46407 }, 46408 { 46409 "modulePath": "core/src/lib/conditions/valueComparison.js", 46410 "settings": { 46411 "comparison": { 46412 "operator": "doesNotEqual", 46413 "caseInsensitive": true 46414 }, 46415 "leftOperand": "%TRAFFICTYPE_META%", 46416 "rightOperand": "bot" 46417 } 46418 } 46419 ], 46420 "actions": [ 46421 { 46422 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46423 "settings": { 46424 "customSetup": { 46425 "source": function(event, s) { 46426 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:Suite banner "+event.target.innerText); 46427} 46428 }, 46429 "trackerProperties": { 46430 "eVars": [ 46431 { 46432 "name": "eVar1", 46433 "type": "value", 46434 "value": "%PAGE_NAME%" 46435 }, 46436 { 46437 "name": "eVar12", 46438 "type": "value", 46439 "value": "%PROFILE_ID:COOKIE%" 46440 }, 46441 { 46442 "name": "eVar21", 46443 "type": "value", 46444 "value": "%PAGE_URL%" 46445 }, 46446 { 46447 "name": "eVar27", 46448 "type": "value", 46449 "value": "%CONTENTTYPE:METATAG%" 46450 } 46451 ], 46452 "props": [ 46453 { 46454 "name": "prop2", 46455 "type": "alias", 46456 "value": "eVar27" 46457 }, 46458 { 46459 "name": "prop33", 46460 "type": "alias", 46461 "value": "eVar21" 46462 } 46463 ], 46464 "events": [ 46465 { 46466 "name": "event30" 46467 } 46468 ] 46469 } 46470 } 46471 }, 46472 { 46473 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 46474 "settings": { 46475 "type": "link", 46476 "linkName": "SW PLP", 46477 "linkType": "o" 46478 } 46479 }, 46480 { 46481 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 46482 "settings": {} 46483 } 46484 ] 46485 }, 46486 { 46487 "id": "RLdaf7c0d3c8f344f99693341b799195ba", 46488 "name": "Capture_Download:DCR", 46489 "events": [ 46490 { 46491 "modulePath": "core/src/lib/events/directCall.js", 46492 "settings": { 46493 "identifier": "captureDownload" 46494 }, 46495 "ruleOrder": 50.0 46496 } 46497 ], 46498 "conditions": [ 46499 { 46500 "modulePath": "core/src/lib/conditions/valueComparison.js", 46501 "settings": { 46502 "comparison": { 46503 "operator": "doesNotEqual", 46504 "caseInsensitive": true 46505 }, 46506 "leftOperand": "%DisableAnalyticsCookie%", 46507 "rightOperand": "true" 46508 } 46509 }, 46510 { 46511 "modulePath": "core/src/lib/conditions/valueComparison.js", 46512 "settings": { 46513 "comparison": { 46514 "operator": "doesNotEqual", 46515 "caseInsensitive": true 46516 }, 46517 "leftOperand": "%TRAFFICTYPE_META%", 46518 "rightOperand": "bot" 46519 } 46520 } 46521 ], 46522 "actions": [ 46523 { 46524 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46525 "settings": { 46526 "customSetup": { 46527 "source": function(event, s) { 46528 s.pagename = _satellite.getVar("PAGE_NAME"); 46529if(event.detail.eventLabel){ 46530 if((event.detail.eventLabel).substr(0,5) !== 'nipkg'){ 46531 var tmp = (event.detail.eventLabel).substr(7); 46532 var firstToken = tmp.substr(0,tmp.lastIndexOf("/")); 46533 var tmpToken = tmp.substr(tmp.lastIndexOf("/")+1); 46534 var secondToken = tmpToken.substr(0,tmpToken.lastIndexOf(".")); 46535 var thirdToken = tmpToken.substr(tmpToken.lastIndexOf(".")+1); 46536 s.eVar75 = firstToken + ":" + secondToken + ":" + thirdToken; 46537 }else{ 46538 s.eVar75 = event.detail.eventLabel; 46539 } 46540} 46541if(event.detail.gbRoot != undefined) { 46542 s.eVar79 = event.detail.gbRoot; 46543 s.linkTrackVars += ",eVar79" 46544} 46545if(event.detail.eventDetail != undefined) { 46546 digitalData.valueToHash = event.detail.eventDetail; 46547} 46548 46549if(s.eVar101){ 46550 _satellite.getVisitorId().setCustomerIDs({ 46551 "email_key":{ 46552 "id": s.eVar101, 46553 "authState": Visitor.AuthState.UNKNOWN 46554 } 46555 }); 46556} 46557s.eVar108 = event.detail.downloadProduct; 46558s.linkTrackVars += ",eVar75,eVar101,eVar108"; 46559 46560 46561//ContentSquare dynamic tracking 46562window._uxa = window._uxa || []; 46563window._uxa.push(["trackDynamicVariable", {key: 'Download Metadata', value: s.eVar75} ]); 46564window._uxa.push(["trackDynamicVariable", {key: 'Download Product', value: s.eVar108} ]); 46565} 46566 }, 46567 "trackerProperties": { 46568 "eVars": [ 46569 { 46570 "name": "eVar1", 46571 "type": "value", 46572 "value": "%PAGE_NAME%" 46573 }, 46574 { 46575 "name": "eVar10", 46576 "type": "value", 46577 "value": "%LANGUAGE:METATAG%" 46578 }, 46579 { 46580 "name": "eVar21", 46581 "type": "value", 46582 "value": "%PAGE_URL%" 46583 }, 46584 { 46585 "name": "eVar27", 46586 "type": "value", 46587 "value": "%CONTENTTYPE:METATAG%" 46588 }, 46589 { 46590 "name": "eVar56", 46591 "type": "value",
46592 "value": "%DETAILED_PAGENAME%" 46593 }, 46594 { 46595 "name": "eVar63", 46596 "type": "value", 46597 "value": "%DOCUMENTID:METATAG%" 46598 }, 46599 { 46600 "name": "eVar101", 46601 "type": "value", 46602 "value": "%HASHED_EMAIL:USER:DL%" 46603 }, 46604 { 46605 "name": "eVar152", 46606 "type": "value", 46607 "value": "%OneTrust_STATUS%" 46608 } 46609 ], 46610 "props": [ 46611 { 46612 "name": "prop33", 46613 "type": "alias", 46614 "value": "eVar21" 46615 }, 46616 { 46617 "name": "prop50", 46618 "type": "alias", 46619 "value": "eVar56" 46620 } 46621 ], 46622 "events": [ 46623 { 46624 "name": "event36" 46625 } 46626 ], 46627 "pageURL": "PAGE_NAME", 46628 "transactionID": "%TRANSACTION_ID%" 46629 } 46630 } 46631 }, 46632 { 46633 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 46634 "settings": { 46635 "type": "link", 46636 "linkName": "", 46637 "linkType": "o" 46638 } 46639 }, 46640 { 46641 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 46642 "settings": {} 46643 } 46644 ] 46645 }, 46646 { 46647 "id": "RLdb8d4c938d264d6fa0903ebcb4ffbf4d", 46648 "name": "Capture_Product_Detail:DCR", 46649 "events": [ 46650 { 46651 "modulePath": "core/src/lib/events/directCall.js", 46652 "settings": { 46653 "identifier": "captureProductDetail" 46654 }, 46655 "ruleOrder": 50.0 46656 } 46657 ], 46658 "conditions": [ 46659 { 46660 "modulePath": "core/src/lib/conditions/valueComparison.js", 46661 "settings": { 46662 "comparison": { 46663 "operator": "doesNotEqual", 46664 "caseInsensitive": true 46665 }, 46666 "leftOperand": "%DisableAnalyticsCookie%", 46667 "rightOperand": "true" 46668 } 46669 }, 46670 { 46671 "modulePath": "core/src/lib/conditions/valueComparison.js", 46672 "settings": { 46673 "comparison": { 46674 "operator": "doesNotEqual", 46675 "caseInsensitive": true 46676 }, 46677 "leftOperand": "%TRAFFICTYPE_META%", 46678 "rightOperand": "bot" 46679 } 46680 } 46681 ], 46682 "actions": [ 46683 { 46684 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46685 "settings": { 46686 "customSetup": { 46687 "source": function(event, s) { 46688 s.products = ";"+_satellite.getVar('PRODUCT:DL')[0].productInfo.partNumber[0]+";;"; 46689s.linkTrackVars += ",products"; 46690} 46691 }, 46692 "trackerProperties": { 46693 "eVars": [ 46694 { 46695 "name": "eVar56", 46696 "type": "value", 46697 "value": "%DETAILED_PAGENAME%" 46698 } 46699 ], 46700 "events": [ 46701 { 46702 "name": "prodView" 46703 }, 46704 { 46705 "name": "event3" 46706 } 46707 ] 46708 } 46709 } 46710 }, 46711 { 46712 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 46713 "settings": { 46714 "type": "link", 46715 "linkName": "hardware product view", 46716 "linkType": "o" 46717 } 46718 }, 46719 { 46720 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 46721 "settings": {} 46722 } 46723 ] 46724 }, 46725 { 46726 "id": "RLdbdcfe1024f244ada4113443e3cb0c52", 46727 "name": "ELQ_Contact_Sales_Confirmation:PLR", 46728 "events": [ 46729 { 46730 "modulePath": "core/src/lib/events/windowLoaded.js", 46731 "settings": {}, 46732 "ruleOrder": 50.0 46733 } 46734 ], 46735 "conditions": [ 46736 { 46737 "modulePath": "core/src/lib/conditions/valueComparison.js", 46738 "settings": { 46739 "comparison": { 46740 "operator": "doesNotEqual", 46741 "caseInsensitive": true 46742 }, 46743 "leftOperand": "%DisableAnalyticsCookie%", 46744 "rightOperand": "true" 46745 } 46746 }, 46747 { 46748 "modulePath": "core/src/lib/conditions/valueComparison.js", 46749 "settings": { 46750 "comparison": { 46751 "operator": "isTrue" 46752 }, 46753 "leftOperand": "%OneTrust_Targeting_Consent%" 46754 } 46755 }, 46756 { 46757 "modulePath": "core/src/lib/conditions/valueComparison.js", 46758 "settings": { 46759 "comparison": { 46760 "operator": "equals", 46761 "caseInsensitive": true 46762 }, 46763 "leftOperand": "%PAGE_NAME%", 46764 "rightOperand": "campaigns.ni.com/contact-confirmation" 46765 } 46766 } 46767 ], 46768 "actions": [ 46769 { 46770 "modulePath": "core/src/lib/actions/customCode.js", 46771 "settings": { 46772 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC84b2a97c9be04ebe93b2321ba14153e6-source.js', 46773 "language": "html", 46774 "isExternal": true 46775 } 46776 }, 46777 { 46778 "modulePath": "core/src/lib/actions/customCode.js", 46779 "settings": { 46780 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC2f89d0e8fb7b47898274cca8f6e46345-source.js', 46781 "language": "javascript", 46782 "isExternal": true 46783 } 46784 } 46785 ] 46786 }, 46787 { 46788 "id": "RLde4454af6d9e4d49a7e48aeaf2e27af3", 46789 "name": "CTA_Add_to_Cart_by_PartNumber_Click:EBR", 46790 "events": [ 46791 { 46792 "modulePath": "core/src/lib/events/click.js", 46793 "settings": { 46794 "elementSelector": ".product-list .product-list-header-button", 46795 "bubbleFireIfParent": true, 46796 "bubbleFireIfChildFired": false 46797 }, 46798 "ruleOrder": 50.0 46799 } 46800 ], 46801 "conditions": [ 46802 { 46803 "modulePath": "core/src/lib/conditions/valueComparison.js", 46804 "settings": { 46805 "comparison": { 46806 "operator": "doesNotEqual", 46807 "caseInsensitive": true 46808 }, 46809 "leftOperand": "%DisableAnalyticsCookie%", 46810 "rightOperand": "true" 46811 } 46812 }, 46813 { 46814 "modulePath": "core/src/lib/conditions/valueComparison.js", 46815 "settings": { 46816 "comparison": { 46817 "operator": "doesNotEqual", 46818 "caseInsensitive": true 46819 }, 46820 "leftOperand": "%TRAFFICTYPE_META%", 46821 "rightOperand": "bot" 46822 } 46823 } 46824 ], 46825 "actions": [ 46826 { 46827 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46828 "settings": { 46829 "trackerProperties": { 46830 "eVars": [ 46831 { 46832 "name": "eVar1", 46833 "type": "value", 46834 "value": "%PAGE_NAME%" 46835 }, 46836 { 46837 "name": "eVar12", 46838 "type": "value", 46839 "value": "%PROFILE_ID:COOKIE%" 46840 }, 46841 { 46842 "name": "eVar21", 46843 "type": "value", 46844 "value": "%PAGE_URL%" 46845 }, 46846 { 46847 "name": "eVar27", 46848 "type": "value", 46849 "value": "%CONTENTTYPE:METATAG%" 46850 }, 46851 { 46852 "name": "eVar33", 46853 "type": "value", 46854 "value": "Add to Cart by Part Number" 46855 } 46856 ], 46857 "props": [ 46858 { 46859 "name": "prop2", 46860 "type": "alias", 46861 "value": "eVar27" 46862 }, 46863 { 46864 "name": "prop23", 46865 "type": "alias", 46866 "value": "eVar33" 46867 }, 46868 { 46869 "name": "prop33", 46870 "type": "alias", 46871 "value": "eVar21" 46872 } 46873 ], 46874 "events": [ 46875 { 46876 "name": "event30" 46877 } 46878 ], 46879 "pageURL": "%PAGE_URL%" 46880 } 46881 } 46882 }, 46883 { 46884 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 46885 "settings": { 46886 "type": "link", 46887 "linkName": "aa-react-link", 46888 "linkType": "o" 46889 } 46890 }, 46891 { 46892 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 46893 "settings": {} 46894 } 46895 ] 46896 }, 46897 { 46898 "id": "RLe03d43cf26f548c2ba30d6feedd0f8fc", 46899 "name": "Capture_Search_Instead:DCR", 46900 "events": [ 46901 { 46902 "modulePath": "core/src/lib/events/directCall.js", 46903 "settings": { 46904 "identifier": "captureSearchInstead" 46905 }, 46906 "ruleOrder": 50.0 46907 } 46908 ], 46909 "conditions": [ 46910 { 46911 "modulePath": "core/src/lib/conditions/valueComparison.js", 46912 "settings": { 46913 "comparison": { 46914 "operator": "doesNotEqual", 46915 "caseInsensitive": true 46916 }, 46917 "leftOperand": "%DisableAnalyticsCookie%", 46918 "rightOperand": "true" 46919 } 46920 }, 46921 { 46922 "modulePath": "core/src/lib/conditions/valueComparison.js", 46923 "settings": { 46924 "comparison": { 46925 "operator": "doesNotEqual", 46926 "caseInsensitive": true 46927 }, 46928 "leftOperand": "%TRAFFICTYPE_META%", 46929 "rightOperand": "bot" 46930 } 46931 } 46932 ], 46933 "actions": [ 46934 { 46935 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 46936 "settings": { 46937 "customSetup": { 46938 "source": function(event, s) { 46939 if (event.detail.hasOwnProperty("onsiteSearchSearchInsteadFor")){ 46940 NIAnalytics.setAndTrack(["eVar2", "prop4"], event.detail.onsiteSearchSearchInsteadFor.toLowerCase()); 46941} 46942 46943} 46944 }, 46945 "trackerProperties": { 46946 "eVars": [ 46947 { 46948 "name": "eVar1", 46949 "type": "value", 46950 "value": "%PAGE_NAME%" 46951 }, 46952 { 46953 "name": "eVar2", 46954 "type": "value", 46955 "value": "%event.detail.onsiteSearchSearchInsteadFor%" 46956 }, 46957 { 46958 "name": "eVar12", 46959 "type": "value", 46960 "value": "%PROFILE_ID:COOKIE%" 46961 }, 46962 { 46963 "name": "eVar21", 46964 "type": "value", 46965 "value": "%PAGE_URL%" 46966 }, 46967 { 46968 "name": "eVar33", 46969 "type": "value", 46970 "value": "Search Term Suggestion Override:%ONSITESEARCHSEARCHINSTEADFOR:OSI:OS:DL%" 46971 }, 46972 { 46973 "name": "eVar52", 46974 "type": "value", 46975 "value": "%ONSITESEARCHDYM:OSI:OS:DL%" 46976 } 46977 ], 46978 "props": [ 46979 { 46980 "name": "prop2", 46981 "type": "alias", 46982 "value": "eVar27" 46983 }, 46984 { 46985 "name": "prop23", 46986 "type": "value", 46987 "value": "%PAGE_NAME%" 46988 }, 46989 { 46990 "name": "prop33", 46991 "type": "alias", 46992 "value": "eVar21" 46993 } 46994 ], 46995 "events": [ 46996 { 46997 "name": "event30" 46998 } 46999 ] 47000 } 47001 } 47002 }, 47003 { 47004 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47005 "settings": { 47006 "type": "link", 47007 "linkName": "%ONSITESEARCHSEARCHINSTEADFOR:OSI:OS:DL%", 47008 "linkType": "o" 47009 } 47010 }, 47011 { 47012 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47013 "settings": {} 47014 } 47015 ] 47016 }, 47017 { 47018 "id": "RLe3c3014520ca49069c9d0061f8051ede", 47019 "name": "OrderConfirm_Mbox:PLR", 47020 "events": [ 47021 { 47022 "modulePath": "core/src/lib/events/windowLoaded.js", 47023 "settings": {}, 47024 "ruleOrder": 50.0 47025 } 47026 ], 47027 "conditions": [ 47028 { 47029 "modulePath": "core/src/lib/conditions/domain.js", 47030 "settings": { 47031 "domains": [ 47032 "ni.com" 47033 ] 47034 } 47035 }, 47036 { 47037 "modulePath": "core/src/lib/conditions/customCode.js", 47038 "settings": { 47039 "source": function(event, target) { 47040 var patternForOldCartPages = new RegExp("^/apps/utf8/nios.realex_acs_return$|^/apps/utf8/nios.checkout$"); 47041 47042return ((patternForOldCartPages.test(window.location.pathname) && document.getElementsByClassName("checkout-progress").length == 0) || (_satellite.getVar("TEMPLATE:PI:PA:DL") === "checkout" && _satellite.getVar("SUBTEMPLATE:PI:PA:DL") === "confirmation")); 47043} 47044 } 47045 }, 47046 { 47047 "modulePath": "core/src/lib/conditions/valueComparison.js", 47048 "settings": { 47049 "comparison": { 47050 "operator": "doesNotEqual", 47051 "caseInsensitive": true 47052 }, 47053 "leftOperand": "%DisableAnalyticsCookie%", 47054 "rightOperand": "true" 47055 } 47056 } 47057 ], 47058 "actions": [ 47059 { 47060 "modulePath": "core/src/lib/actions/customCode.js", 47061 "settings": { 47062 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC5f2319054f40452d9cd5005ae629bb23-source.js', 47063 "language": "javascript", 47064 "isExternal": true 47065 } 47066 } 47067 ] 47068 }, 47069 { 47070 "id": "RLe966cc0fcc0c4a80afb0959440c83de1", 47071 "name": "Capture_Filter:DCR", 47072 "events": [ 47073 { 47074 "modulePath": "core/src/lib/events/directCall.js", 47075 "settings": { 47076 "identifier": "captureFilter" 47077 }, 47078 "ruleOrder": 50.0 47079 } 47080 ], 47081 "conditions": [ 47082 { 47083 "modulePath": "core/src/lib/conditions/valueComparison.js", 47084 "settings": { 47085 "comparison": { 47086 "operator": "doesNotEqual", 47087 "caseInsensitive": true 47088 }, 47089 "leftOperand": "%TRAFFICTYPE_META%", 47090 "rightOperand": "bot" 47091 } 47092 } 47093 ], 47094 "actions": [ 47095 { 47096 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47097 "settings": { 47098 "customSetup": { 47099 "source": function(event, s) { 47100 var template = _satellite.getVar("TEMPLATE:PI:PA:DL"); 47101var filterPairs = _satellite.getVar("FILTERPAIR:AT:PA:DL").split(","); 47102for (var i in filterPairs) { 47103 filterPairs[i] = template + ":" + filterPairs[i]; 47104} 47105s.list3 = filterPairs.join(","); 47106s.linkTrackVars+=",list3"; 47107 47108} 47109 }, 47110 "trackerProperties": {} 47111 } 47112 }, 47113 { 47114 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47115 "settings": { 47116 "type": "link", 47117 "linkName": "", 47118 "linkType": "o" 47119 } 47120 }, 47121 { 47122 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47123 "settings": {} 47124 } 47125 ] 47126 }, 47127 { 47128 "id": "RLe9d4c7748bb24174a1902a178dd5e520", 47129 "name": "Survey_Displayed:EBR", 47130 "events": [ 47131 { 47132 "modulePath": "core/src/lib/events/elementExists.js", 47133 "settings": { 47134 "elementSelector": "div.QSIPopOver" 47135 }, 47136 "ruleOrder": 50.0 47137 } 47138 ], 47139 "conditions": [ 47140 { 47141 "modulePath": "core/src/lib/conditions/pathAndQuerystring.js", 47142 "settings": { 47143 "paths": [ 47144 { 47145 "value": "voc=nowyoudont", 47146 "valueIsRegex": true 47147 } 47148 ] 47149 }, 47150 "negate": true 47151 }, 47152 { 47153 "modulePath": "core/src/lib/conditions/valueComparison.js", 47154 "settings": { 47155 "comparison": { 47156 "operator": "doesNotEqual", 47157 "caseInsensitive": true 47158 }, 47159
47159 "leftOperand": "%DisableAnalyticsCookie%", 47160 "rightOperand": "true" 47161 } 47162 }, 47163 { 47164 "modulePath": "core/src/lib/conditions/valueComparison.js", 47165 "settings": { 47166 "comparison": { 47167 "operator": "doesNotEqual", 47168 "caseInsensitive": true 47169 }, 47170 "leftOperand": "%TRAFFICTYPE_META%", 47171 "rightOperand": "bot" 47172 } 47173 } 47174 ], 47175 "actions": [ 47176 { 47177 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47178 "settings": { 47179 "trackerProperties": { 47180 "eVars": [ 47181 { 47182 "name": "eVar1", 47183 "type": "value", 47184 "value": "%PAGE_NAME%" 47185 } 47186 ], 47187 "events": [ 47188 { 47189 "name": "event37" 47190 } 47191 ] 47192 } 47193 } 47194 }, 47195 { 47196 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47197 "settings": { 47198 "type": "link", 47199 "linkName": "VOC_Survey_Displayed", 47200 "linkType": "o" 47201 } 47202 }, 47203 { 47204 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47205 "settings": {} 47206 } 47207 ] 47208 }, 47209 { 47210 "id": "RLeac3a8e1a04044049482a1d2b4269def", 47211 "name": "Google_Analytics:PLR", 47212 "events": [ 47213 { 47214 "modulePath": "core/src/lib/events/windowLoaded.js", 47215 "settings": {}, 47216 "ruleOrder": 50.0 47217 } 47218 ], 47219 "conditions": [ 47220 { 47221 "modulePath": "core/src/lib/conditions/valueComparison.js", 47222 "settings": { 47223 "comparison": { 47224 "operator": "isTrue" 47225 }, 47226 "leftOperand": "%OneTrust_Targeting_Consent%" 47227 } 47228 }, 47229 { 47230 "modulePath": "core/src/lib/conditions/valueComparison.js", 47231 "settings": { 47232 "comparison": { 47233 "operator": "doesNotEqual", 47234 "caseInsensitive": true 47235 }, 47236 "leftOperand": "%DisableAnalyticsCookie%", 47237 "rightOperand": "true" 47238 } 47239 }, 47240 { 47241 "modulePath": "core/src/lib/conditions/valueComparison.js", 47242 "settings": { 47243 "comparison": { 47244 "operator": "isTrue" 47245 }, 47246 "leftOperand": "%IS_PRODUCTION_TIER%" 47247 } 47248 } 47249 ], 47250 "actions": [ 47251 { 47252 "modulePath": "acronym-gtag.js/src/lib/actions/pageview.js", 47253 "settings": { 47254 "accounts": { 47255 "1669969140614": { 47256 "enabled": true, 47257 "options": [] 47258 } 47259 } 47260 } 47261 } 47262 ] 47263 }, 47264 { 47265 "id": "RLeac9af69d3a948b2bb73ef7b85dfd940", 47266 "name": "SWPDP_Recommended_Addons-Details_Click:EBR", 47267 "events": [ 47268 { 47269 "modulePath": "core/src/lib/events/click.js", 47270 "settings": { 47271 "elementSelector": ".aa-swpdp-addon", 47272 "bubbleFireIfParent": true, 47273 "bubbleFireIfChildFired": false 47274 }, 47275 "ruleOrder": 50.0 47276 } 47277 ], 47278 "conditions": [ 47279 { 47280 "modulePath": "core/src/lib/conditions/valueComparison.js", 47281 "settings": { 47282 "comparison": { 47283 "operator": "doesNotEqual", 47284 "caseInsensitive": true 47285 }, 47286 "leftOperand": "%DisableAnalyticsCookie%", 47287 "rightOperand": "true" 47288 } 47289 }, 47290 { 47291 "modulePath": "core/src/lib/conditions/valueComparison.js", 47292 "settings": { 47293 "comparison": { 47294 "operator": "doesNotEqual", 47295 "caseInsensitive": true 47296 }, 47297 "leftOperand": "%TRAFFICTYPE_META%", 47298 "rightOperand": "bot" 47299 } 47300 } 47301 ], 47302 "actions": [ 47303 { 47304 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47305 "settings": { 47306 "customSetup": { 47307 "source": function(event, s) { 47308 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:Add on details "+event.target.innerText); 47309} 47310 }, 47311 "trackerProperties": { 47312 "eVars": [ 47313 { 47314 "name": "eVar1", 47315 "type": "value", 47316 "value": "%PAGE_NAME%" 47317 }, 47318 { 47319 "name": "eVar12", 47320 "type": "value", 47321 "value": "%PROFILE_ID:COOKIE%" 47322 }, 47323 { 47324 "name": "eVar21", 47325 "type": "value", 47326 "value": "%PAGE_URL%" 47327 }, 47328 { 47329 "name": "eVar27", 47330 "type": "value", 47331 "value": "%CONTENTTYPE:METATAG%" 47332 } 47333 ], 47334 "props": [ 47335 { 47336 "name": "prop2", 47337 "type": "alias", 47338 "value": "eVar27" 47339 }, 47340 { 47341 "name": "prop33", 47342 "type": "alias", 47343 "value": "eVar21" 47344 } 47345 ], 47346 "events": [ 47347 { 47348 "name": "event30" 47349 } 47350 ] 47351 } 47352 } 47353 }, 47354 { 47355 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47356 "settings": { 47357 "type": "link", 47358 "linkName": "SW PLP", 47359 "linkType": "o" 47360 } 47361 }, 47362 { 47363 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47364 "settings": {} 47365 } 47366 ] 47367 }, 47368 { 47369 "id": "RLeae2b0c2ef1343659385c70986ce5226", 47370 "name": "SWPLP_ContactUs_Click:EBR", 47371 "events": [ 47372 { 47373 "modulePath": "core/src/lib/events/click.js", 47374 "settings": { 47375 "elementSelector": ".aa-swplp-contact-us", 47376 "bubbleFireIfParent": false, 47377 "bubbleFireIfChildFired": true 47378 }, 47379 "ruleOrder": 50.0 47380 } 47381 ], 47382 "conditions": [ 47383 { 47384 "modulePath": "core/src/lib/conditions/valueComparison.js", 47385 "settings": { 47386 "comparison": { 47387 "operator": "doesNotEqual", 47388 "caseInsensitive": true 47389 }, 47390 "leftOperand": "%DisableAnalyticsCookie%", 47391 "rightOperand": "true" 47392 } 47393 }, 47394 { 47395 "modulePath": "core/src/lib/conditions/valueComparison.js", 47396 "settings": { 47397 "comparison": { 47398 "operator": "doesNotEqual", 47399 "caseInsensitive": true 47400 }, 47401 "leftOperand": "%TRAFFICTYPE_META%", 47402 "rightOperand": "bot" 47403 } 47404 } 47405 ], 47406 "actions": [ 47407 { 47408 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47409 "settings": { 47410 "trackerProperties": { 47411 "eVars": [ 47412 { 47413 "name": "eVar1", 47414 "type": "value", 47415 "value": "%PAGE_NAME%" 47416 }, 47417 { 47418 "name": "eVar12", 47419 "type": "value", 47420 "value": "%PROFILE_ID:COOKIE%" 47421 }, 47422 { 47423 "name": "eVar21", 47424 "type": "value", 47425 "value": "%PAGE_URL%" 47426 }, 47427 { 47428 "name": "eVar27", 47429 "type": "value", 47430 "value": "%CONTENTTYPE:METATAG%" 47431 }, 47432 { 47433 "name": "eVar33", 47434 "type": "value", 47435 "value": "SW PLP:Contact Us" 47436 } 47437 ], 47438 "props": [ 47439 { 47440 "name": "prop2", 47441 "type": "alias", 47442 "value": "eVar27" 47443 }, 47444 { 47445 "name": "prop23", 47446 "type": "alias", 47447 "value": "eVar33" 47448 }, 47449 { 47450 "name": "prop33", 47451 "type": "alias", 47452 "value": "eVar21" 47453 } 47454 ], 47455 "events": [ 47456 { 47457 "name": "event30" 47458 } 47459 ] 47460 } 47461 } 47462 }, 47463 { 47464 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47465 "settings": { 47466 "type": "link", 47467 "linkName": "SW PLP", 47468 "linkType": "o" 47469 } 47470 }, 47471 { 47472 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47473 "settings": {} 47474 } 47475 ] 47476 }, 47477 { 47478 "id": "RLec3345cb7c4346629a3a52d91b069466", 47479 "name": "Renew SSP Update Quantity:DCR", 47480 "events": [ 47481 { 47482 "modulePath": "core/src/lib/events/customEvent.js", 47483 "settings": { 47484 "type": "aa-ssp-renewal-update-quantity", 47485 "bubbleFireIfParent": true, 47486 "bubbleFireIfChildFired": true 47487 }, 47488 "ruleOrder": 50.0 47489 } 47490 ], 47491 "conditions": [], 47492 "actions": [ 47493 { 47494 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47495 "settings": { 47496 "customSetup": { 47497 "source": function(event, s) { 47498 NIAnalytics.setAndTrack(["eVar33","prop23"], "Renewal SSP_step2:Update Selection:"+event.detail.quantity); 47499} 47500 }, 47501 "trackerProperties": { 47502 "eVars": [ 47503 { 47504 "name": "eVar1", 47505 "type": "value", 47506 "value": "%PAGE_NAME%" 47507 }, 47508 { 47509 "name": "eVar12", 47510 "type": "value", 47511 "value": "%PROFILE_ID:COOKIE%" 47512 }, 47513 { 47514 "name": "eVar21", 47515 "type": "value", 47516 "value": "%PAGE_URL%" 47517 }, 47518 { 47519 "name": "eVar27", 47520 "type": "value", 47521 "value": "%CONTENTTYPE:METATAG%" 47522 } 47523 ], 47524 "props": [ 47525 { 47526 "name": "prop2", 47527 "type": "alias", 47528 "value": "eVar27" 47529 }, 47530 { 47531 "name": "prop33", 47532 "type": "alias", 47533 "value": "eVar21" 47534 } 47535 ], 47536 "events": [ 47537 { 47538 "name": "event30" 47539 } 47540 ] 47541 } 47542 } 47543 }, 47544 { 47545 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47546 "settings": { 47547 "type": "link", 47548 "linkName": "Renew SSP Update Quantity", 47549 "linkType": "o" 47550 } 47551 }, 47552 { 47553 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47554 "settings": {} 47555 } 47556 ] 47557 }, 47558 { 47559 "id": "RLef23a39e18224bc0ae571ae3d7ccdc9d", 47560 "name": "Reference_Data_Mapping:PLR", 47561 "events": [ 47562 { 47563 "modulePath": "core/src/lib/events/windowLoaded.js", 47564 "settings": {}, 47565 "ruleOrder": 1.0 47566 } 47567 ], 47568 "conditions": [ 47569 { 47570 "modulePath": "core/src/lib/conditions/valueComparison.js", 47571 "settings": { 47572 "comparison": { 47573 "operator": "equals" 47574 }, 47575 "leftOperand": "%NICOM_PAGE%", 47576 "rightOperand": "true" 47577 } 47578 }, 47579 { 47580 "modulePath": "core/src/lib/conditions/valueComparison.js", 47581 "settings": { 47582 "comparison": { 47583 "operator": "equals", 47584 "caseInsensitive": true 47585 }, 47586 "leftOperand": "%REFDATA_PAGE%", 47587 "rightOperand": "true" 47588 } 47589 }, 47590 { 47591 "modulePath": "core/src/lib/conditions/valueComparison.js", 47592 "settings": { 47593 "comparison": { 47594 "operator": "doesNotEqual", 47595 "caseInsensitive": true 47596 }, 47597 "leftOperand": "%DisableAnalyticsCookie%", 47598 "rightOperand": "true" 47599 } 47600 } 47601 ], 47602 "actions": [ 47603 { 47604 "modulePath": "core/src/lib/actions/customCode.js", 47605 "settings": { 47606 "global": true, 47607 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCfbc8cf91094c43eb8058da805b502d94-source.js', 47608 "language": "javascript", 47609 "isExternal": true 47610 } 47611 } 47612 ] 47613 }, 47614 { 47615 "id": "RLef280fc22f6547ffb39660d2d3cb4eac", 47616 "name": "SWDDP_Download_Click:EBR", 47617 "events": [ 47618 { 47619 "modulePath": "core/src/lib/events/customEvent.js", 47620 "settings": { 47621 "type": "aa-swddp-download-click", 47622 "bubbleFireIfParent": true, 47623 "bubbleFireIfChildFired": true 47624 }, 47625 "ruleOrder": 50.0 47626 } 47627 ], 47628 "conditions": [ 47629 { 47630 "modulePath": "core/src/lib/conditions/valueComparison.js", 47631 "settings": { 47632 "comparison": { 47633 "operator": "doesNotEqual", 47634 "caseInsensitive": true 47635 }, 47636 "leftOperand": "%DisableAnalyticsCookie%", 47637 "rightOperand": "true" 47638 } 47639 }, 47640 { 47641 "modulePath": "core/src/lib/conditions/valueComparison.js", 47642 "settings": { 47643 "comparison": { 47644 "operator": "doesNotEqual", 47645 "caseInsensitive": true 47646 }, 47647 "leftOperand": "%TRAFFICTYPE_META%", 47648 "rightOperand": "bot" 47649 } 47650 } 47651 ], 47652 "actions": [ 47653 { 47654 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47655 "settings": { 47656 "customSetup": { 47657 "source": function(event, s) { 47658 NIAnalytics.setAndTrack("eVar108", event?.detail?.downloadId); 47659NIAnalytics.setAndTrack("eVar113", event?.detail?.gatingLogic); 47660NIAnalytics.setAndTrack("eVar114", event?.detail?.productName); 47661let ctaLabel = document.querySelector(".downloadOptions__buttonSection_button.nicrc--btn--primary").innerText 47662if(document.querySelector(".downloadOptions__buttonSection_button.nicrc--btn--primary").attributes.hasOwnProperty("data-an-cta-label")){ 47663 ctaLabel = document.querySelector(".downloadOptions__buttonSection_button.nicrc--btn--primary").getAttribute("data-an-cta-label"); 47664} 47665NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW DDP:"+ctaLabel); 47666 47667} 47668 }, 47669 "trackerProperties": { 47670 "eVars": [ 47671 { 47672 "name": "eVar1", 47673 "type": "value", 47674 "value": "%PAGE_NAME%" 47675 }, 47676 { 47677 "name": "eVar12", 47678 "type": "value", 47679 "value": "%PROFILE_ID:COOKIE%" 47680 }, 47681 { 47682 "name": "eVar21", 47683 "type": "value", 47684 "value": "%PAGE_URL%" 47685 }, 47686 { 47687 "name": "eVar27", 47688 "type": "value", 47689 "value": "%CONTENTTYPE:METATAG%" 47690 }, 47691 { 47692 "name": "eVar56", 47693 "type": "value",
47694 "value": "%DETAILED_PAGENAME%" 47695 } 47696 ], 47697 "props": [ 47698 { 47699 "name": "prop2", 47700 "type": "alias", 47701 "value": "eVar27" 47702 }, 47703 { 47704 "name": "prop33", 47705 "type": "alias", 47706 "value": "eVar21" 47707 }, 47708 { 47709 "name": "prop50", 47710 "type": "alias", 47711 "value": "eVar56" 47712 } 47713 ], 47714 "events": [ 47715 { 47716 "name": "event30" 47717 } 47718 ] 47719 } 47720 } 47721 }, 47722 { 47723 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47724 "settings": { 47725 "type": "link", 47726 "linkType": "d" 47727 } 47728 }, 47729 { 47730 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47731 "settings": {} 47732 } 47733 ] 47734 }, 47735 { 47736 "id": "RLef72fa6824974a579aeb7443c5f2d6df", 47737 "name": "My_Profile_Payment_Method_CTA_Click:EBR", 47738 "events": [ 47739 { 47740 "modulePath": "core/src/lib/events/click.js", 47741 "settings": { 47742 "elementSelector": ".save-payment-method__action-button", 47743 "bubbleFireIfParent": true, 47744 "bubbleFireIfChildFired": true 47745 }, 47746 "ruleOrder": 50.0 47747 } 47748 ], 47749 "conditions": [ 47750 { 47751 "modulePath": "core/src/lib/conditions/valueComparison.js", 47752 "settings": { 47753 "comparison": { 47754 "operator": "doesNotEqual", 47755 "caseInsensitive": true 47756 }, 47757 "leftOperand": "%DisableAnalyticsCookie%", 47758 "rightOperand": "true" 47759 } 47760 }, 47761 { 47762 "modulePath": "core/src/lib/conditions/valueComparison.js", 47763 "settings": { 47764 "comparison": { 47765 "operator": "doesNotEqual", 47766 "caseInsensitive": true 47767 }, 47768 "leftOperand": "%TRAFFICTYPE_META%", 47769 "rightOperand": "bot" 47770 } 47771 } 47772 ], 47773 "actions": [ 47774 { 47775 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47776 "settings": { 47777 "customSetup": { 47778 "source": function(event, s) { 47779 _satellite.logger.log(event); 47780var target = event.target.closest("button"); 47781 47782var mapping = { 47783 'nicrc--btn--ghost': 'Cancel', 47784 'nicrc--btn--primary': 'Save payment' 47785}; 47786 47787var analyticsData = Object.keys(mapping) 47788 .find(cls => target.classList.contains(cls)); 47789 47790analyticsData = analyticsData ? mapping[analyticsData] : ""; 47791 47792NIAnalytics.setAndTrack(["eVar33", "prop23"], analyticsData); 47793} 47794 }, 47795 "trackerProperties": { 47796 "eVars": [ 47797 { 47798 "name": "eVar1", 47799 "type": "value", 47800 "value": "MyProfile/Add payment method" 47801 }, 47802 { 47803 "name": "eVar12", 47804 "type": "value", 47805 "value": "%PROFILE_ID:COOKIE%" 47806 }, 47807 { 47808 "name": "eVar21", 47809 "type": "value", 47810 "value": "%PAGE_URL%" 47811 }, 47812 { 47813 "name": "eVar27", 47814 "type": "value", 47815 "value": "%CONTENTTYPE:METATAG%" 47816 } 47817 ], 47818 "props": [ 47819 { 47820 "name": "prop2", 47821 "type": "alias", 47822 "value": "eVar27" 47823 }, 47824 { 47825 "name": "prop23", 47826 "type": "alias", 47827 "value": "eVar33" 47828 }, 47829 { 47830 "name": "prop33", 47831 "type": "alias", 47832 "value": "eVar21" 47833 } 47834 ], 47835 "events": [ 47836 { 47837 "name": "event30" 47838 } 47839 ] 47840 } 47841 } 47842 }, 47843 { 47844 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47845 "settings": { 47846 "type": "link", 47847 "linkType": "o" 47848 } 47849 }, 47850 { 47851 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47852 "settings": {} 47853 } 47854 ] 47855 }, 47856 { 47857 "id": "RLf01d81d11a1f45f3b46376b3959f7381", 47858 "name": "CoursePDP_UpgradeMembership_Click:EBR", 47859 "events": [ 47860 { 47861 "modulePath": "core/src/lib/events/click.js", 47862 "settings": { 47863 "elementSelector": ".aa-cpdp-see-pricing", 47864 "bubbleFireIfParent": true, 47865 "bubbleFireIfChildFired": false 47866 }, 47867 "ruleOrder": 50.0 47868 } 47869 ], 47870 "conditions": [ 47871 { 47872 "modulePath": "core/src/lib/conditions/valueComparison.js", 47873 "settings": { 47874 "comparison": { 47875 "operator": "doesNotEqual", 47876 "caseInsensitive": true 47877 }, 47878 "leftOperand": "%DisableAnalyticsCookie%", 47879 "rightOperand": "true" 47880 } 47881 }, 47882 { 47883 "modulePath": "core/src/lib/conditions/valueComparison.js", 47884 "settings": { 47885 "comparison": { 47886 "operator": "doesNotEqual", 47887 "caseInsensitive": true 47888 }, 47889 "leftOperand": "%TRAFFICTYPE_META%", 47890 "rightOperand": "bot" 47891 } 47892 } 47893 ], 47894 "actions": [ 47895 { 47896 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 47897 "settings": { 47898 "customSetup": { 47899 "source": function(event, s) { 47900 let cardTitle = event.target.closest('.course-pdp__membership-banner__content').querySelector('.course-pdp__membership-banner__title').innerText; 47901NIAnalytics.setAndTrack(["eVar33", "prop23"], cardTitle+":"+event?.target?.innerText); 47902} 47903 }, 47904 "trackerProperties": { 47905 "eVars": [ 47906 { 47907 "name": "eVar1", 47908 "type": "value", 47909 "value": "%PAGE_NAME%" 47910 }, 47911 { 47912 "name": "eVar12", 47913 "type": "value", 47914 "value": "%PROFILE_ID:COOKIE%" 47915 }, 47916 { 47917 "name": "eVar21", 47918 "type": "value", 47919 "value": "%PAGE_URL%" 47920 }, 47921 { 47922 "name": "eVar27", 47923 "type": "value", 47924 "value": "%CONTENTTYPE:METATAG%" 47925 } 47926 ], 47927 "props": [ 47928 { 47929 "name": "prop2", 47930 "type": "alias", 47931 "value": "eVar27" 47932 }, 47933 { 47934 "name": "prop33", 47935 "type": "alias", 47936 "value": "eVar21" 47937 } 47938 ], 47939 "events": [ 47940 { 47941 "name": "event30" 47942 } 47943 ] 47944 } 47945 } 47946 }, 47947 { 47948 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 47949 "settings": { 47950 "type": "link", 47951 "linkName": "Course PDP Upgrade Membership CTA", 47952 "linkType": "o" 47953 } 47954 }, 47955 { 47956 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 47957 "settings": {} 47958 } 47959 ] 47960 }, 47961 { 47962 "id": "RLf596ed59632d42c093565f2ebfb32323", 47963 "name": "CoursePLP_ProductDetails_Click:EBR", 47964 "events": [ 47965 { 47966 "modulePath": "core/src/lib/events/click.js", 47967 "settings": {
47968 "elementSelector": ".aa-cplp-details", 47969 "bubbleFireIfParent": true, 47970 "bubbleFireIfChildFired": false 47971 }, 47972 "ruleOrder": 50.0 47973 } 47974 ], 47975 "conditions": [ 47976 { 47977 "modulePath": "core/src/lib/conditions/valueComparison.js", 47978 "settings": { 47979 "comparison": { 47980 "operator": "doesNotEqual", 47981 "caseInsensitive": true 47982 }, 47983 "leftOperand": "%DisableAnalyticsCookie%", 47984 "rightOperand": "true" 47985 } 47986 }, 47987 { 47988 "modulePath": "core/src/lib/conditions/valueComparison.js", 47989 "settings": { 47990 "comparison": { 47991 "operator": "doesNotEqual", 47992 "caseInsensitive": true 47993 }, 47994 "leftOperand": "%TRAFFICTYPE_META%", 47995 "rightOperand": "bot" 47996 } 47997 } 47998 ], 47999 "actions": [ 48000 { 48001 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48002 "settings": { 48003 "customSetup": { 48004 "source": function(event, s) { 48005 let ctaLabel = event.target.closest("tr").querySelector(".aa-cplp-prodlink").hasOwnProperty("data-an-cta-label") ? event.target.closest("tr").querySelector(".aa-cplp-prodlink").hasOwnProperty("data-an-cta-label") : event.target.closest("tr").querySelector(".aa-cplp-prodlink").innerText; 48006NIAnalytics.setAndTrack(["eVar33", "prop23"], ctaLabel); 48007} 48008 }, 48009 "trackerProperties": { 48010 "eVars": [ 48011 { 48012 "name": "eVar1", 48013 "type": "value", 48014 "value": "%PAGE_NAME%" 48015 }, 48016 { 48017 "name": "eVar12", 48018 "type": "value", 48019 "value": "%PROFILE_ID:COOKIE%" 48020 }, 48021 { 48022 "name": "eVar21", 48023 "type": "value", 48024 "value": "%PAGE_URL%" 48025 }, 48026 { 48027 "name": "eVar27", 48028 "type": "value", 48029 "value": "%CONTENTTYPE:METATAG%" 48030 } 48031 ], 48032 "props": [ 48033 { 48034 "name": "prop2", 48035 "type": "alias", 48036 "value": "eVar27" 48037 }, 48038 { 48039 "name": "prop33", 48040 "type": "alias", 48041 "value": "eVar21" 48042 } 48043 ], 48044 "events": [ 48045 { 48046 "name": "event30" 48047 } 48048 ] 48049 } 48050 } 48051 }, 48052 { 48053 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 48054 "settings": { 48055 "type": "link", 48056 "linkName": "Course PLP ProductDetails CTA", 48057 "linkType": "o" 48058 } 48059 }, 48060 { 48061 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 48062 "settings": {} 48063 } 48064 ] 48065 }, 48066 { 48067 "id": "RLf64ff74eff8f40ed9a93bfd5e49e696e", 48068 "name": "ShowHideCol_Click:EBR", 48069 "events": [ 48070 { 48071 "modulePath": "core/src/lib/events/click.js", 48072 "settings": { 48073 "elementSelector": ".show-hide-columns__apply-button", 48074 "bubbleFireIfParent": true, 48075 "bubbleFireIfChildFired": true 48076 }, 48077 "ruleOrder": 50.0 48078 } 48079 ], 48080 "conditions": [ 48081 { 48082 "modulePath": "core/src/lib/conditions/valueComparison.js", 48083 "settings": { 48084 "comparison": { 48085 "operator": "doesNotEqual", 48086 "caseInsensitive": true 48087 }, 48088 "leftOperand": "%DisableAnalyticsCookie%", 48089 "rightOperand": "true" 48090 } 48091 }, 48092 { 48093 "modulePath": "core/src/lib/conditions/valueComparison.js", 48094 "settings": { 48095 "comparison": { 48096 "operator": "doesNotEqual", 48097 "caseInsensitive": true 48098 }, 48099 "leftOperand": "%TRAFFICTYPE_META%", 48100 "rightOperand": "bot" 48101 } 48102 } 48103 ], 48104 "actions": [ 48105 { 48106 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48107 "settings": { 48108 "customSetup": { 48109 "source": function(event, s) {
48110 let nodeList = event.target.closest(".show-hide-columns__dropdown").querySelectorAll(".show-hide-columns__toggle-button--visible"); 48111 48112const visibleCols = [...nodeList] 48113 .map(n => n.innerText.trim()) 48114 .join(' | '); 48115 48116NIAnalytics.setAndTrack(["eVar33", "prop22"], "show/hide columns"); 48117NIAnalytics.setAndTrack("eVar35", visibleCols); 48118} 48119 }, 48120 "trackerProperties": { 48121 "eVars": [ 48122 { 48123 "name": "eVar1", 48124 "type": "value", 48125 "value": "%PAGE_NAME%" 48126 }, 48127 { 48128 "name": "eVar12", 48129 "type": "value", 48130 "value": "%PROFILE_ID:COOKIE%" 48131 }, 48132 { 48133 "name": "eVar21", 48134 "type": "value", 48135 "value": "%PAGE_URL%" 48136 }, 48137 { 48138 "name": "eVar27", 48139 "type": "value", 48140 "value": "%CONTENTTYPE:METATAG%" 48141 } 48142 ], 48143 "props": [ 48144 { 48145 "name": "prop2", 48146 "type": "alias", 48147 "value": "eVar27" 48148 }, 48149 { 48150 "name": "prop33", 48151 "type": "alias", 48152 "value": "eVar21" 48153 } 48154 ], 48155 "events": [ 48156 { 48157 "name": "event30" 48158 } 48159 ] 48160 } 48161 } 48162 }, 48163 { 48164 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 48165 "settings": { 48166 "type": "link", 48167 "linkType": "o" 48168 } 48169 }, 48170 { 48171 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 48172 "settings": {} 48173 } 48174 ] 48175 }, 48176 { 48177 "id": "RLf6d69dcb148e4d5a904626a2ec7e8f7d", 48178 "name": "StartingAtPrice_Click:EBR", 48179 "events": [ 48180 { 48181 "modulePath": "core/src/lib/events/click.js", 48182 "settings": { 48183 "elementSelector": ".starting-at-price__pricing-table-view a", 48184 "bubbleFireIfParent": true, 48185 "bubbleFireIfChildFired": false 48186 }, 48187 "ruleOrder": 50.0 48188 } 48189 ], 48190 "conditions": [ 48191 { 48192 "modulePath": "core/src/lib/conditions/valueComparison.js", 48193 "settings": { 48194 "comparison": { 48195 "operator": "doesNotEqual", 48196 "caseInsensitive": true 48197 }, 48198 "leftOperand": "%DisableAnalyticsCookie%", 48199 "rightOperand": "true" 48200 } 48201 }, 48202 { 48203 "modulePath": "core/src/lib/conditions/valueComparison.js", 48204 "settings": { 48205 "comparison": { 48206 "operator": "doesNotEqual", 48207 "caseInsensitive": true 48208 }, 48209 "leftOperand": "%TRAFFICTYPE_META%", 48210 "rightOperand": "bot" 48211 } 48212 } 48213 ], 48214 "actions": [ 48215 { 48216 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48217 "settings": { 48218 "customSetup": { 48219 "source": function(event, s) { 48220 let billingToggle = ""; 48221let cardHeader = event.target.closest('.starting_at_price') == null ? event.target.closest('.nicrc--table-header-label').querySelector(".heading-03").innerText : event.target.closest('.starting_at_price').querySelector(".heading-03").innerText; 48222NIAnalytics.setAndTrack(["eVar33", "prop23"], billingToggle + ":" + cardHeader + ":" + event.target.innerText); 48223} 48224 }, 48225 "trackerProperties": { 48226 "eVars": [ 48227 { 48228 "name": "eVar1", 48229 "type": "value", 48230 "value": "%PAGE_NAME%" 48231 }, 48232 { 48233 "name": "eVar12", 48234 "type": "value", 48235 "value": "%PROFILE_ID:COOKIE%" 48236 }, 48237 { 48238 "name": "eVar21", 48239 "type": "value", 48240 "value": "%PAGE_URL%" 48241 }, 48242 { 48243 "name": "eVar27", 48244 "type": "value", 48245 "value": "%CONTENTTYPE:METATAG%" 48246 } 48247 ], 48248 "props": [ 48249 { 48250 "name": "prop2", 48251 "type": "alias", 48252 "value": "eVar27" 48253 }, 48254 { 48255 "name": "prop33", 48256 "type": "alias", 48257 "value": "eVar21" 48258 } 48259 ], 48260 "events": [ 48261 { 48262 "name": "event30" 48263 } 48264 ] 48265 } 48266 } 48267 }, 48268 { 48269 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 48270 "settings": { 48271 "type": "link", 48272 "linkName": "aa-react-link", 48273 "linkType": "o" 48274 } 48275 }, 48276 { 48277 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 48278 "settings": {} 48279 } 48280 ] 48281 }, 48282 { 48283 "id": "RLf87459a4d3b648d1921a5ac9f4aed6bf", 48284 "name": "Download:EBR", 48285 "events": [ 48286 { 48287 "modulePath": "core/src/lib/events/customCode.js", 48288 "settings": { 48289 "source": function(trigger) { 48290 if (!Element.prototype.closest) { 48291 if (!Element.prototype.matches) { 48292 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 48293 } 48294 Element.prototype.closest = function (s) { 48295 var el = this; 48296 var ancestor = this; 48297 if (!document.documentElement.contains(el)) return null; 48298 do { 48299 if (ancestor.matches(s)) { 48300 return ancestor; 48301 } 48302 48303 if (typeof ancestor.parentElement !== "undefined") { 48304 ancestor = ancestor.parentElement; 48305 } else { 48306 ancestor = ancestor.parentNode; 48307 } 48308 } while (ancestor !== null && ancestor !== undefined); 48309 return null; 48310 }; 48311} 48312 48313document.addEventListener("click", function (e) { 48314 _satellite.logger.log("Analytics -> e.target.tagName: " + e.target.tagName); 48315 _satellite.logger.log("Analytics -> e.target.hasAttribute(href): " + e.target.hasAttribute("href")); 48316 48317 var fileTypes = s.linkDownloadFileTypes.split(","); 48318 var splitHref; 48319 var targetUrl = ""; 48320 48321 if (e.target.tagName.toLowerCase() === "a" && e.target.hasAttribute("href")) { 48322 targetUrl = document.createElement("a"); 48323 targetUrl.href = e.target.href; 48324 } else { 48325 targetUrl = e.target.closest("a"); 48326 } 48327 48328 48329 if(targetUrl !== null){ 48330 splitHref = targetUrl.href.split("."); 48331 48332 if(targetUrl.href === "#" || targetUrl.href.slice(-1) === "#" ){ 48333 return false;
48334 } 48335 48336 /*_satellite.logger.log("Analytics -> targetUrl.href: " + targetUrl.href);*/ 48337 var linkExtension = splitHref[splitHref.length - 1].toLowerCase(); 48338 if (linkExtension.indexOf("?") > -1) { 48339 linkExtension = linkExtension.substring(0, linkExtension.indexOf("?")); 48340 } 48341 /*_satellite.logger.log("Analytics -> linkExtension: " + linkExtension);*/ 48342 for (i = 0; i < fileTypes.length; i++) { 48343 if (fileTypes[i] == linkExtension) { 48344 48345 if (targetUrl.href.indexOf("//lumen.ni.com/nicif/") > -1) { 48346 var regex = new RegExp('[\\?&]' + 'du' + '=([^&#]*)'); 48347 var results = regex.exec(targetUrl.href); 48348 targetUrl.href = results[1]; 48349 } 48350 48351 NIAnalytics.v75 = targetUrl.hostname + ((targetUrl.pathname.charAt(0) === "/") ? targetUrl.pathname : "/" + targetUrl.pathname).replace(/\.([^\.]*)$/, ":" + "$1").replace(/\/([^\/]*)$/, ":" + "$1"); 48352 48353 trigger(); 48354 } 48355 } 48356 } 48357 48358}); 48359} 48360 }, 48361 "ruleOrder": 75.0 48362 } 48363 ], 48364 "conditions": [ 48365 { 48366 "modulePath": "core/src/lib/conditions/valueComparison.js", 48367 "settings": { 48368 "comparison": { 48369 "operator": "doesNotEqual", 48370 "caseInsensitive": true 48371 }, 48372 "leftOperand": "%DisableAnalyticsCookie%", 48373 "rightOperand": "true" 48374 } 48375 }, 48376 { 48377 "modulePath": "core/src/lib/conditions/valueComparison.js", 48378 "settings": { 48379 "comparison": { 48380 "operator": "doesNotEqual", 48381 "caseInsensitive": true 48382 }, 48383 "leftOperand": "%TRAFFICTYPE_META%", 48384 "rightOperand": "bot" 48385 } 48386 } 48387 ], 48388 "actions": [ 48389 { 48390 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48391 "settings": { 48392 "customSetup": { 48393 "source": function(event, s) { 48394 if(NIAnalytics.v75){ 48395 NIAnalytics.setAndTrack("eVar75", NIAnalytics.v75); 48396 NIAnalytics.v75 = null; 48397 48398 //ContentSquare dynamic tracking 48399 window._uxa = window._uxa || []; 48400 window._uxa.push(["trackDynamicVariable", {key: 'Download Metadata', value: s.eVar75} ]); 48401 window._uxa.push(["trackDynamicVariable", {key: 'Download Product', value: _satellite.getVar('LIST1')} ]); 48402} 48403} 48404 }, 48405 "trackerProperties": { 48406 "eVars": [ 48407 { 48408 "name": "eVar1", 48409 "type": "value", 48410 "value": "%PAGE_NAME%" 48411 }, 48412 { 48413 "name": "eVar10", 48414 "type": "value", 48415 "value": "%LANGUAGE:METATAG%" 48416 }, 48417 { 48418 "name": "eVar21", 48419 "type": "value", 48420 "value": "%PAGE_URL%" 48421 }, 48422 { 48423 "name": "eVar27", 48424 "type": "value", 48425 "value": "%CONTENTTYPE:METATAG%" 48426 }, 48427 { 48428 "name": "eVar56", 48429 "type": "value", 48430 "value": "%DETAILED_PAGENAME%" 48431 }, 48432 { 48433 "name": "eVar63", 48434 "type": "value", 48435 "value": "%DOCUMENTID:METATAG%" 48436 }, 48437 { 48438 "name": "eVar79", 48439 "type": "value", 48440 "value": "%GUESTBOOK_CODE%" 48441 }, 48442 { 48443 "name": "eVar108", 48444 "type": "value", 48445 "value": "%LIST1%" 48446 }, 48447 { 48448 "name": "eVar152", 48449 "type": "value", 48450 "value": "%OneTrust_STATUS%" 48451 } 48452 ], 48453 "props": [ 48454 { 48455 "name": "prop33", 48456 "type": "alias", 48457 "value": "eVar21" 48458 } 48459 ], 48460 "events": [ 48461 { 48462 "name": "event36" 48463 } 48464 ] 48465 } 48466 } 48467 }, 48468 { 48469 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 48470 "settings": { 48471 "type": "link", 48472 "linkName": "download", 48473 "linkType": "o" 48474 } 48475 }, 48476 { 48477 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 48478 "settings": {} 48479 }, 48480 { 48481 "modulePath": "core/src/lib/actions/customCode.js", 48482 "settings": { 48483 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC4e33b0a768654d1ba435700336b65e1c-source.js', 48484 "language": "javascript", 48485 "isExternal": true 48486 } 48487 }, 48488 { 48489 "modulePath": "core/src/lib/actions/customCode.js", 48490 "settings": { 48491 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC20dc7febc43841afaeb53e2df9fb7330-source.js', 48492 "language": "html", 48493 "isExternal": true 48494 } 48495 }, 48496 { 48497 "modulePath": "core/src/lib/actions/customCode.js", 48498 "settings": { 48499 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC8c20f0d92ced4969b3346aa0d6296630-source.js', 48500 "language": "html", 48501 "isExternal": true 48502 } 48503 } 48504 ] 48505 }, 48506 { 48507 "id": "RLf9f84767d95c464ebb06bba1e7af0048", 48508 "name": "Marketing Cloud ID Customer IDs", 48509 "events": [ 48510 { 48511 "modulePath": "core/src/lib/events/windowLoaded.js", 48512 "settings": {}, 48513 "ruleOrder": 50.0 48514 } 48515 ], 48516 "conditions": [], 48517 "actions": [ 48518 { 48519 "modulePath": "adobe-mcid/src/lib/actions/setCustomerIds.js", 48520 "settings": { 48521 "customerIds": [ 48522 { 48523 "value": "%PROFILE_ID:COOKIE%", 48524 "authState": 1, 48525 "integrationCode": "zweb_profile_id" 48526 }, 48527 { 48528 "value": "%ESPUID:URL_PARAM%", 48529 "authState": 0, 48530 "integrationCode": "elq_contactid" 48531 } 48532 ] 48533 } 48534 } 48535 ] 48536 }, 48537 { 48538 "id": "RLfa8f1670e55940b797c760e174516819", 48539 "name": "VerticalTab_Click:EBR", 48540 "events": [ 48541 { 48542 "modulePath": "core/src/lib/events/click.js", 48543 "settings": { 48544 "elementSelector": "[class*=\"Tabs_verticalTabs\"] .nicrc--tab--list > button", 48545 "bubbleFireIfParent": true, 48546 "bubbleFireIfChildFired": true 48547 }, 48548 "ruleOrder": 50.0 48549 } 48550 ], 48551 "conditions": [ 48552 { 48553 "modulePath": "core/src/lib/conditions/valueComparison.js", 48554 "settings": { 48555 "comparison": { 48556 "operator": "doesNotEqual", 48557 "caseInsensitive": true 48558 }, 48559 "leftOperand": "%DisableAnalyticsCookie%", 48560 "rightOperand": "true" 48561 } 48562 }, 48563 { 48564 "modulePath": "core/src/lib/conditions/valueComparison.js", 48565 "settings": { 48566 "comparison": { 48567 "operator": "doesNotEqual", 48568 "caseInsensitive": true 48569 }, 48570 "leftOperand": "%TRAFFICTYPE_META%", 48571 "rightOperand": "bot" 48572 } 48573 } 48574 ], 48575 "actions": [ 48576 { 48577 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48578 "settings": { 48579 "customSetup": { 48580 "source": function(event, s) { 48581 NIAnalytics.setAndTrack(["eVar33", "prop23"], "Side tab:" + event.target?.innerText || ''); 48582} 48583 }, 48584 "trackerProperties": { 48585 "eVars": [ 48586 { 48587 "name": "eVar1", 48588 "type": "value", 48589 "value": "%PAGE_NAME%" 48590 }, 48591 { 48592 "name": "eVar12", 48593 "type": "value", 48594 "value": "%PROFILE_ID:COOKIE%" 48595 }, 48596 { 48597 "name": "eVar21", 48598 "type": "value", 48599 "value": "%PAGE_URL%" 48600 }, 48601 { 48602 "name": "eVar27", 48603 "type": "value", 48604 "value": "%CONTENTTYPE:METATAG%" 48605 } 48606 ], 48607 "props": [ 48608 { 48609 "name": "prop2", 48610 "type": "alias", 48611 "value": "eVar27" 48612 }, 48613 { 48614 "name": "prop33", 48615 "type": "alias", 48616 "value": "eVar21" 48617 } 48618 ], 48619 "events": [ 48620 { 48621 "name": "event30" 48622 } 48623 ], 48624 "pageURL": "%PAGE_URL%" 48625 } 48626 } 48627 }, 48628 { 48629 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 48630 "settings": { 48631 "type": "link", 48632 "linkName": "aa-react-link", 48633 "linkType": "o" 48634 } 48635 }, 48636 { 48637 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 48638 "settings": {} 48639 } 48640 ] 48641 }, 48642 { 48643 "id": "RLfabcb033dd37416895e6a3f0900c8df0", 48644 "name": "SWPDP_Recommended_Addons-Courses_Click:EBR", 48645 "events": [ 48646 { 48647 "modulePath": "core/src/lib/events/click.js", 48648 "settings": { 48649 "elementSelector": ".aa-swpdp-see-all-addon, .aa-swpdp-see-all-courses", 48650 "bubbleFireIfParent": true, 48651 "bubbleFireIfChildFired": false 48652 }, 48653 "ruleOrder": 50.0 48654 } 48655 ], 48656 "conditions": [ 48657 { 48658 "modulePath": "core/src/lib/conditions/valueComparison.js", 48659 "settings": { 48660 "comparison": { 48661 "operator": "doesNotEqual", 48662 "caseInsensitive": true 48663 }, 48664 "leftOperand": "%DisableAnalyticsCookie%", 48665 "rightOperand": "true" 48666 } 48667 }, 48668 { 48669 "modulePath": "core/src/lib/conditions/valueComparison.js", 48670 "settings": { 48671 "comparison": { 48672 "operator": "doesNotEqual", 48673 "caseInsensitive": true 48674 }, 48675 "leftOperand": "%TRAFFICTYPE_META%", 48676 "rightOperand": "bot" 48677 } 48678 } 48679 ], 48680 "actions": [ 48681 { 48682 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48683 "settings": { 48684 "customSetup": { 48685 "source": function(event, s) { 48686 NIAnalytics.setAndTrack(["eVar33", "prop23"], "SW PDP:"+event.target.innerText); 48687} 48688 }, 48689 "trackerProperties": { 48690 "eVars": [ 48691 { 48692 "name": "eVar1", 48693 "type": "value", 48694 "value": "%PAGE_NAME%" 48695 }, 48696 { 48697 "name": "eVar12", 48698 "type": "value", 48699 "value": "%PROFILE_ID:COOKIE%" 48700 }, 48701 { 48702 "name": "eVar21", 48703 "type": "value", 48704 "value": "%PAGE_URL%" 48705 }, 48706 { 48707 "name": "eVar27", 48708 "type": "value", 48709 "value": "%CONTENTTYPE:METATAG%" 48710 } 48711 ], 48712 "props": [ 48713 { 48714 "name": "prop2", 48715 "type": "alias", 48716 "value": "eVar27" 48717 }, 48718 { 48719 "name": "prop33", 48720 "type": "alias", 48721 "value": "eVar21" 48722 } 48723 ], 48724 "events": [ 48725 { 48726 "name": "event30" 48727 } 48728 ] 48729 } 48730 } 48731 }, 48732 { 48733 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 48734 "settings": { 48735 "type": "link", 48736 "linkName": "SW PLP", 48737 "linkType": "o" 48738 } 48739 }, 48740 { 48741 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 48742 "settings": {} 48743 } 48744 ] 48745 }, 48746 { 48747 "id": "RLfb8908edf2cb4300811316ce959ae0f0", 48748 "name": "Capture_Cart_Remove:DCR", 48749 "events": [ 48750 { 48751 "modulePath": "core/src/lib/events/directCall.js", 48752 "settings": { 48753 "identifier": "captureCartRemove" 48754 }, 48755 "ruleOrder": 50.0 48756 } 48757 ], 48758 "conditions": [ 48759 { 48760 "modulePath": "core/src/lib/conditions/valueComparison.js", 48761 "settings": { 48762 "comparison": { 48763 "operator": "doesNotEqual", 48764 "caseInsensitive": true 48765 }, 48766 "leftOperand": "%DisableAnalyticsCookie%", 48767 "rightOperand": "true" 48768 } 48769 }, 48770 { 48771 "modulePath": "core/src/lib/conditions/valueComparison.js", 48772 "settings": { 48773 "comparison": { 48774 "operator": "doesNotEqual", 48775 "caseInsensitive": true 48776 }, 48777 "leftOperand": "%TRAFFICTYPE_META%", 48778 "rightOperand": "bot" 48779 } 48780 } 48781 ], 48782 "actions": [ 48783 { 48784 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48785 "settings": { 48786 "customSetup": { 48787 "source": function(event, s) { 48788 if (event.detail.items) { 48789 s.products = ";" + event.detail.items.replace(/,/g, ",;") 48790 s.linkTrackVars += ",products"; 48791} 48792} 48793 }, 48794 "trackerProperties": { 48795 "eVars": [ 48796 { 48797 "name": "eVar22", 48798 "type": "value", 48799 "value": "%event.detail.eventDetail%" 48800 }, 48801 { 48802 "name": "eVar101", 48803 "type": "value", 48804 "value": "%HASHED_EMAIL:USER:DL%" 48805 } 48806 ], 48807 "events": [ 48808 { 48809 "name": "scRemove" 48810 } 48811 ] 48812 } 48813 } 48814 }, 48815 { 48816 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 48817 "settings": { 48818 "type": "link", 48819 "linkType": "o" 48820 } 48821 }, 48822 { 48823 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 48824 "settings": {} 48825 } 48826 ] 48827 }, 48828 { 48829 "id": "RLfcded28fe3804bdb84395a9e54172952", 48830 "name": "Wrapper_Footer_v2:Click:EBR", 48831 "events": [ 48832 { 48833 "modulePath": "core/src/lib/events/click.js", 48834 "settings": {
48835 "elementSelector": ".analytics-footersupport-link", 48836 "bubbleFireIfParent": true, 48837 "bubbleFireIfChildFired": true 48838 }, 48839 "ruleOrder": 50.0 48840 }, 48841 { 48842 "modulePath": "core/src/lib/events/click.js", 48843 "settings": { 48844 "elementSelector": ".analytics-footersupport-feedback", 48845 "bubbleFireIfParent": true, 48846 "bubbleFireIfChildFired": true 48847 }, 48848 "ruleOrder": 50.0 48849 }, 48850 { 48851 "modulePath": "core/src/lib/events/click.js", 48852 "settings": { 48853 "elementSelector": ".analytics-footer-link", 48854 "bubbleFireIfParent": true, 48855 "bubbleFireIfChildFired": true 48856 }, 48857 "ruleOrder": 50.0 48858 }, 48859 { 48860 "modulePath": "core/src/lib/events/click.js", 48861 "settings": { 48862 "elementSelector": ".analytics-footersolutions-link", 48863 "bubbleFireIfParent": true, 48864 "bubbleFireIfChildFired": true 48865 }, 48866 "ruleOrder": 50.0 48867 }, 48868 { 48869 "modulePath": "core/src/lib/events/click.js", 48870 "settings": { 48871 "elementSelector": ".analytics-footerorders-link", 48872 "bubbleFireIfParent": true, 48873 "bubbleFireIfChildFired": true 48874 }, 48875 "ruleOrder": 50.0 48876 }, 48877 { 48878 "modulePath": "core/src/lib/events/click.js", 48879 "settings": { 48880 "elementSelector": ".analytics-footercompany-link", 48881 "bubbleFireIfParent": true, 48882 "bubbleFireIfChildFired": true 48883 }, 48884 "ruleOrder": 50.0 48885 } 48886 ], 48887 "conditions": [ 48888 { 48889 "modulePath": "core/src/lib/conditions/valueComparison.js", 48890 "settings": { 48891 "comparison": { 48892 "operator": "doesNotEqual", 48893 "caseInsensitive": true 48894 }, 48895 "leftOperand": "%DisableAnalyticsCookie%", 48896 "rightOperand": "true" 48897 } 48898 }, 48899 { 48900 "modulePath": "core/src/lib/conditions/valueComparison.js", 48901 "settings": { 48902 "comparison": { 48903 "operator": "doesNotEqual", 48904 "caseInsensitive": true 48905 }, 48906 "leftOperand": "%TRAFFICTYPE_META%", 48907 "rightOperand": "bot" 48908 } 48909 } 48910 ], 48911 "actions": [ 48912 { 48913 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 48914 "settings": { 48915 "customSetup": { 48916 "source": function(event, s) { 48917 if (!Element.prototype.closest) { 48918 if (!Element.prototype.matches) { 48919 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 48920 } 48921 Element.prototype.closest = function(s) { 48922 var el = this; 48923 var ancestor = this; 48924 if (!document.documentElement.contains(el)) return null; 48925 do { 48926 if (ancestor.matches(s)) { 48927 return ancestor; 48928 } 48929 48930 if (typeof ancestor.parentElement !== "undefined") { 48931 ancestor = ancestor.parentElement; 48932 } else { 48933 ancestor = ancestor.parentNode; 48934 } 48935 } while (ancestor !== null && ancestor !== undefined); 48936 return null; 48937 }; 48938} 48939 48940function urlCleaner(url) { 48941 var targetUrl = document.createElement("a"); 48942 targetUrl.href = url; 48943 48944 var myPath = targetUrl.pathname; 48945 var myHost = targetUrl.hostname; 48946 var pathRegex = new RegExp("/((?:lang/)?(?:d|esa|f|i|ja|ko|zhs|zht|en|de|es|fr|it|pt|nl|pl|ru|cs|sv|fi|da|no|hu|ro|sr|sl|hr)(?:/|$))"); 48947 var myPageName = ""; 48948 48949 if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\/.*/)) { 48950 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}(\/.*)/, "$1"); 48951 } else if (myPath.match(/\/[a-z]{2}\-[a-z]{2}\.html/)) { 48952 myPageName = myHost + myPath.replace(/\/[a-z]{2}\-[a-z]{2}\.html/, "/"); 48953 } else if (myPath.match(/\/[a-z]{2}\/.*/)) { 48954 myPageName = myHost + myPath.replace(/\/[a-z]{2}(\/.*)/, "$1"); 48955 } else if (myPath.match(/\/[a-z]{2}\.html/)) { 48956 myPageName = myHost + myPath.replace(/\/[a-z]{2}\.html/, "/"); 48957 } else { 48958 myPageName = myHost + myPath.replace(pathRegex, "/"); 48959 } 48960 48961 return myPageName; 48962} 48963 48964var target = event.target.closest("a"); 48965var parent = target.parentElement; 48966var targetURL = urlCleaner(target.href); 48967var analyticsData = ""; 48968 48969if(target.classList.contains('analytics-footerlogo-link')){
48970 analyticsData = "footer:nilogo"; 48971} else if(target.classList.contains('analytics-footer-link')){ 48972 analyticsData = "footer:" + targetURL; 48973} else if(target.classList.contains('analytics-footersolutions-link')){ 48974 analyticsData = "footer:solutions:" + targetURL; 48975} else if(target.classList.contains('analytics-footerorders-link')){ 48976 analyticsData = "footer:orders:" + targetURL; 48977} else if(target.classList.contains('analytics-footercompany-link')){ 48978 analyticsData = "footer:company:" + targetURL; 48979} else if(target.classList.contains('analytics-footersupport-link')){ 48980 analyticsData = "footer:support:" + targetURL; 48981} else if(parent.classList.contains('analytics-footersupport-link') || parent.classList.contains('analytics-footersupport-feedback')){ 48982 analyticsData = "footer:support:site feedback"; 48983} 48984 48985 48986NIAnalytics.setAndTrack(["eVar33", "prop23"], analyticsData); 48987 48988//ContentSquare dynamic tracking 48989window._uxa = window._uxa || []; 48990window._uxa.push(["trackDynamicVariable", {key: 'Site Clicks', value: analyticsData} ]); 48991} 48992 }, 48993 "trackerProperties": { 48994 "eVars": [ 48995 { 48996 "name": "eVar1", 48997 "type": "value", 48998 "value": "%PAGE_NAME%" 48999 }, 49000 { 49001 "name": "eVar12", 49002 "type": "value", 49003 "value": "%PROFILE_ID:COOKIE%" 49004 }, 49005 { 49006 "name": "eVar21", 49007 "type": "value", 49008 "value": "%PAGE_URL%" 49009 }, 49010 { 49011 "name": "eVar27", 49012 "type": "value", 49013 "value": "%CONTENTTYPE:METATAG%" 49014 } 49015 ], 49016 "props": [ 49017 { 49018 "name": "prop2", 49019 "type": "alias", 49020 "value": "eVar27" 49021 }, 49022 { 49023 "name": "prop33", 49024 "type": "alias", 49025 "value": "eVar21" 49026 } 49027 ], 49028 "events": [ 49029 { 49030 "name": "event30" 49031 } 49032 ] 49033 } 49034 } 49035 }, 49036 { 49037 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 49038 "settings": { 49039 "type": "link", 49040 "linkType": "o" 49041 } 49042 }, 49043 { 49044 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 49045 "settings": {} 49046 } 49047 ] 49048 }, 49049 { 49050 "id": "RLfcf5970fb4734cb0a559cf6885e50ad2", 49051 "name": "FreeCoursePDP_Learn-more_Click:EBR", 49052 "events": [ 49053 { 49054 "modulePath": "core/src/lib/events/click.js", 49055 "settings": { 49056 "elementSelector": ".aa-freec-cont-learn", 49057 "bubbleFireIfParent": true, 49058 "bubbleFireIfChildFired": false 49059 }, 49060 "ruleOrder": 50.0 49061 } 49062 ], 49063 "conditions": [ 49064 { 49065 "modulePath": "core/src/lib/conditions/valueComparison.js", 49066 "settings": { 49067 "comparison": { 49068 "operator": "doesNotEqual", 49069 "caseInsensitive": true 49070 }, 49071 "leftOperand": "%DisableAnalyticsCookie%", 49072 "rightOperand": "true" 49073 } 49074 }, 49075 { 49076 "modulePath": "core/src/lib/conditions/valueComparison.js", 49077 "settings": { 49078 "comparison": { 49079 "operator": "doesNotEqual", 49080 "caseInsensitive": true 49081 }, 49082 "leftOperand": "%TRAFFICTYPE_META%", 49083 "rightOperand": "bot" 49084 } 49085 } 49086 ], 49087 "actions": [ 49088 { 49089 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 49090 "settings": { 49091 "customSetup": { 49092 "source": function(event, s) { 49093 NIAnalytics.setAndTrack(["eVar33", "prop23"], event.element?.closest(".
49093nicrc--stack-vertical")?.querySelector("h3")?.innerText+":Learn More"); 49094} 49095 }, 49096 "trackerProperties": { 49097 "eVars": [ 49098 { 49099 "name": "eVar1", 49100 "type": "value", 49101 "value": "%PAGE_NAME%" 49102 }, 49103 { 49104 "name": "eVar12", 49105 "type": "value", 49106 "value": "%PROFILE_ID:COOKIE%" 49107 }, 49108 { 49109 "name": "eVar21", 49110 "type": "value", 49111 "value": "%PAGE_URL%" 49112 }, 49113 { 49114 "name": "eVar27", 49115 "type": "value", 49116 "value": "%CONTENTTYPE:METATAG%" 49117 } 49118 ], 49119 "props": [ 49120 { 49121 "name": "prop2", 49122 "type": "alias", 49123 "value": "eVar27" 49124 }, 49125 { 49126 "name": "prop33", 49127 "type": "alias", 49128 "value": "eVar21" 49129 } 49130 ], 49131 "events": [ 49132 { 49133 "name": "event30" 49134 } 49135 ] 49136 } 49137 } 49138 }, 49139 { 49140 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 49141 "settings": { 49142 "type": "link", 49143 "linkName": "Free Course PDP Learn more", 49144 "linkType": "o" 49145 } 49146 }, 49147 { 49148 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 49149 "settings": {} 49150 } 49151 ] 49152 }, 49153 { 49154 "id": "RLfdeb47f094964ea3afcf65f6a5fba05f", 49155 "name": "6Sense_APIv2:PLR", 49156 "events": [ 49157 { 49158 "modulePath": "core/src/lib/events/libraryLoaded.js", 49159 "settings": {}, 49160 "ruleOrder": 50.0 49161 } 49162 ], 49163 "conditions": [ 49164 { 49165 "modulePath": "core/src/lib/conditions/valueComparison.js", 49166 "settings": { 49167 "comparison": { 49168 "operator": "isTrue" 49169 }, 49170 "leftOperand": "%OneTrust_Targeting_Consent%" 49171 } 49172 }, 49173 { 49174 "modulePath": "core/src/lib/conditions/valueComparison.js", 49175 "settings": { 49176 "comparison": { 49177 "operator": "doesNotEqual", 49178 "caseInsensitive": true 49179 }, 49180 "leftOperand": "%DisableAnalyticsCookie%", 49181 "rightOperand": "true" 49182 } 49183 }, 49184 { 49185 "modulePath": "core/src/lib/conditions/customCode.js", 49186 "settings": { 49187 "source": function(event, target) { 49188 return sessionStorage.getItem("_6senseCompanyDetails") === null; 49189} 49190 } 49191 }, 49192 { 49193 "modulePath": "core/src/lib/conditions/customCode.js", 49194 "settings": { 49195 "source": function(event, target) { 49196 var siteSection = _satellite.getVar("SECTION:METATAG"); 49197var acceptedSections = ["products", "innovations", "events", "landing", "company", "perspectives", "solutions"]; 49198 49199var contentType = _satellite.getVar("CONTENTTYPE:METATAG"); 49200var acceptedContentTypes = ["profile", "contactni", "downloadconfirm"]; 49201 49202var pageName = _satellite.getVar("PAGE_NAME"); 49203 49204var excluded = [ 49205 "products:checkout:shipping", 49206 "products:checkout:billing", 49207 "products:checkout:review" 49208 ]; 49209 49210if(excluded.indexOf(_satellite.getVar("DETAILED_PAGENAME")) > -1) return false; 49211 49212if(acceptedSections.indexOf(siteSection) > -1 || acceptedContentTypes.indexOf(contentType) > -1 || pageName === "homepage" || pageName.indexOf("ni.com/gate/gb") > -1 || pageName.indexOf("forums.ni.com/t5/NI-Blog/") === 0){ 49213 return true; 49214} 49215 49216return false; 49217} 49218 } 49219 }, 49220 { 49221 "modulePath": "core/src/lib/conditions/customCode.js", 49222 "settings": { 49223 "source": function(event, target) { 49224 if(sessionStorage.getItem("blockedLaunchRules") === null) { 49225 return true; 49226}else{ 49227 var r = JSON.parse(sessionStorage.getItem("blockedLaunchRules")); 49228 return !r.includes("6SenseAPI"); 49229} 49230} 49231 } 49232 } 49233 ], 49234 "actions": [ 49235 { 49236 "modulePath": "core/src/lib/actions/customCode.js", 49237 "settings": { 49238 "source": "<script id=\"6senseWebTag\" src=\"https://j.6sc.co/j/42e10c43-d647-4a99-a58a-b156f6040424.js\"></script>", 49239 "language": "html" 49240 } 49241 }, 49242 { 49243 "modulePath": "core/src/lib/actions/customCode.js", 49244 "settings": { 49245 "source": "if(sessionStorage.getItem(\"Analytics3rdPartyDebug\") !== null || document.cookie.indexOf('Analytics3rdPartyDebug') > -1){\n NIAnalytics.ruleLogger(\"6Sense_API:PLR\");\n}", 49246 "language": "javascript" 49247 } 49248 } 49249 ] 49250 }, 49251 { 49252 "id": "RLff4729e9d76b4f218b89823cacddf395", 49253 "name": "My_Profile_Add_Payment_Method_Click:EBR", 49254 "events": [ 49255 { 49256 "modulePath": "core/src/lib/events/click.js", 49257 "settings": { 49258 "elementSelector": ".analytics-mp-payment-add", 49259 "bubbleFireIfParent": true, 49260 "bubbleFireIfChildFired": true 49261 }, 49262 "ruleOrder": 50.0 49263 } 49264 ], 49265 "conditions": [ 49266 { 49267 "modulePath": "core/src/lib/conditions/valueComparison.js", 49268 "settings": { 49269 "comparison": { 49270 "operator": "doesNotEqual", 49271 "caseInsensitive": true 49272 }, 49273 "leftOperand": "%DisableAnalyticsCookie%", 49274 "rightOperand": "true" 49275 } 49276 }, 49277 { 49278 "modulePath": "core/src/lib/conditions/valueComparison.js", 49279 "settings": { 49280 "comparison": { 49281 "operator": "doesNotEqual", 49282 "caseInsensitive": true 49283 }, 49284 "leftOperand": "%TRAFFICTYPE_META%", 49285 "rightOperand": "bot" 49286 } 49287 } 49288 ], 49289 "actions": [ 49290 { 49291 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 49292 "settings": { 49293 "trackerProperties": { 49294 "eVars": [ 49295 { 49296 "name": "eVar1", 49297 "type": "value", 49298 "value": "MyProfile/Saved payment methods" 49299 }, 49300 { 49301 "name": "eVar12", 49302 "type": "value", 49303 "value": "%PROFILE_ID:COOKIE%" 49304 }, 49305 { 49306 "name": "eVar21", 49307 "type": "value", 49308 "value": "%PAGE_URL%" 49309 }, 49310 { 49311 "name": "eVar27", 49312 "type": "value", 49313 "value": "%CONTENTTYPE:METATAG%" 49314 }, 49315 { 49316 "name": "eVar33", 49317 "type": "value", 49318 "value": "Add a Card" 49319 }, 49320 { 49321 "name": "eVar56", 49322 "type": "alias", 49323 "value": "eVar1" 49324 } 49325 ], 49326 "props": [ 49327 { 49328 "name": "prop2", 49329 "type": "alias", 49330 "value": "eVar27" 49331 }, 49332 { 49333 "name": "prop23", 49334 "type": "alias", 49335 "value": "eVar33" 49336 }, 49337 { 49338 "name": "prop33", 49339 "type": "alias", 49340 "value": "eVar21" 49341 } 49342 ], 49343 "events": [ 49344 { 49345 "name": "event30" 49346 } 49347 ] 49348 } 49349 } 49350 }, 49351 { 49352 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 49353 "settings": { 49354 "type": "link", 49355 "linkType": "o" 49356 } 49357 }, 49358 { 49359 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 49360 "settings": {} 49361 } 49362 ] 49363 }, 49364 { 49365 "id": "RLff558f4868a04f8b87d5dd0f25f1f207", 49366 "name": " Capture_PardotForm:DCR", 49367 "events": [ 49368 { 49369 "modulePath": "core/src/lib/events/directCall.js", 49370 "settings": { 49371 "identifier": "capturePardotForm" 49372 }, 49373 "ruleOrder": 50.0 49374 } 49375 ], 49376 "conditions": [ 49377 { 49378 "modulePath": "core/src/lib/conditions/valueComparison.js", 49379 "settings": { 49380 "comparison": { 49381 "operator": "doesNotEqual", 49382 "caseInsensitive": true 49383 }, 49384 "leftOperand": "%DisableAnalyticsCookie%", 49385 "rightOperand": "true" 49386 } 49387 }, 49388 { 49389 "modulePath": "core/src/lib/conditions/valueComparison.js", 49390 "settings": { 49391 "comparison": { 49392 "operator": "doesNotEqual" 49393 }, 49394 "leftOperand": "%TRAFFICTYPE_META%", 49395 "rightOperand": "bot" 49396 } 49397 } 49398 ], 49399 "actions": [ 49400 { 49401 "modulePath": "core/src/lib/actions/customCode.js", 49402 "settings": { 49403 "global": true, 49404 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCf15d39c7fc604a0b9108b0dffa17cc80-source.js', 49405 "language": "javascript", 49406 "isExternal": true 49407 } 49408 }, 49409 { 49410 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 49411 "settings": { 49412 "customSetup": { 49413 "source": function(event, s) { 49414 NIAnalytics.createNestedObject(digitalData, ["valueToHash"], ""); 49415var email = event.detail.email; 49416 49417digitalData.valueToHash = email; 49418s.eVar101 = email !== "" ? _satellite.getVar('MD5_HASH') : ""; 49419s.linkTrackVars+=",eVar101"; 49420 49421switch(event.detail.eventName) { 49422 case "start": 49423 s.events += s.events === "" ? "event42" : ",event42"; 49424 s.linkTrackEvents +=",event42"; 49425 NIAnalytics.setAndTrack(["eVar33", "prop23"], "form:start"); 49426 break; 49427 49428 case "complete": 49429 s.events += s.events === "" ? "event43" : ",event43"; 49430 s.linkTrackEvents +=",event43"; 49431 NIAnalytics.setAndTrack(["eVar33", "prop23"], "form:complete"); 49432 49433 var lab = document.createElement('script'); 49434 lab.type = 'text/javascript'; 49435 lab.async = true; 49436 lab.src = ('https:' == document.location.protocol ? 'https://app' : 'http://app') + '.leadsrx.com/visitor.js'; 49437 lab.onload = function () { 49438 var _lrx_profile = { 49439 "email": event.detail.email 49440 }; 49441 _lrx_sendEvent('conversion', 15951, null, JSON.stringify(_lrx_profile)); 49442 } 49443 var script = document.getElementsByTagName('script')[0]; 49444 script.parentNode.insertBefore(lab, script); 49445 49446 break; 49447 49448 default: 49449 break; 49450} 49451 49452switch(typeof event.detail.optIn){ 49453 case "string": 49454 if(event.detail.optIn.toLowerCase() === "true"){ 49455 NIAnalytics.setAndTrack(["eVar151"], "true"); 49456 } 49457 break; 49458 49459 case "boolean": 49460 if(event.detail.optIn){ 49461 NIAnalytics.setAndTrack(["eVar151"], "true"); 49462 } 49463 break; 49464 49465 default: 49466 break; 49467} 49468 49469} 49470 }, 49471 "trackerProperties": { 49472 "eVars": [ 49473 { 49474 "name": "eVar1", 49475 "type": "value", 49476 "value": "%PAGE_NAME%" 49477 }, 49478 { 49479 "name": "eVar12", 49480 "type": "value", 49481 "value": "%PROFILE_ID:COOKIE%" 49482 }, 49483 { 49484 "name": "eVar21", 49485 "type": "value", 49486 "value": "%PAGE_URL%" 49487 }, 49488 { 49489 "name": "eVar27", 49490 "type": "value", 49491 "value": "%CONTENTTYPE:METATAG%" 49492 }, 49493 { 49494 "name": "eVar56", 49495 "type": "value",
49496 "value": "%DETAILED_PAGENAME%" 49497 }, 49498 { 49499 "name": "eVar71", 49500 "type": "value", 49501 "value": "Demand Response Pardot" 49502 }, 49503 { 49504 "name": "eVar125", 49505 "type": "value", 49506 "value": "%TEMPLATE:PI:PA:DL%" 49507 }, 49508 { 49509 "name": "eVar152", 49510 "type": "value", 49511 "value": "%OneTrust_STATUS%" 49512 } 49513 ], 49514 "props": [ 49515 { 49516 "name": "prop2", 49517 "type": "alias", 49518 "value": "eVar27" 49519 }, 49520 { 49521 "name": "prop33", 49522 "type": "alias", 49523 "value": "eVar21" 49524 }, 49525 { 49526 "name": "prop50", 49527 "type": "alias", 49528 "value": "eVar56" 49529 } 49530 ], 49531 "events": [ 49532 { 49533 "name": "event30" 49534 } 49535 ], 49536 "pageName": "%PAGE_NAME%" 49537 } 49538 } 49539 }, 49540 { 49541 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 49542 "settings": { 49543 "type": "link", 49544 "linkType": "o" 49545 } 49546 }, 49547 { 49548 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 49549 "settings": {} 49550 }, 49551 { 49552 "modulePath": "core/src/lib/actions/customCode.js", 49553 "settings": { 49554 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RC0a2c4daaa8304301a514dfc1e5b593d0-source.js', 49555 "language": "html", 49556 "isExternal": true 49557 } 49558 }, 49559 { 49560 "modulePath": "core/src/lib/actions/customCode.js", 49561 "settings": { 49562 "source": '//www.ni.com/70533feeace8/484b70bb80b7/0d0fc74c1602/RCcb810a96258343ac8ecdb2589c212117-source.js', 49563 "language": "html", 49564 "isExternal": true 49565 } 49566 } 49567 ] 49568 }, 49569 { 49570 "id": "RLffa440139ddf4cdcafa2786163c53b9f", 49571 "name": "My_Profile_Update_PI_CTA_Clicks:EBR", 49572 "events": [ 49573 { 49574 "modulePath": "core/src/lib/events/customCode.js", 49575 "settings": { 49576 "source": function(trigger) { 49577 document.addEventListener('click', (e) => { 49578 if (e.target.closest('.analytics-mp-update-pi-cancel, .analytics-mp-update-pi-save')) { 49579 trigger(e); 49580 } 49581}, false); 49582 49583} 49584 }, 49585 "ruleOrder": 50.0 49586 } 49587 ], 49588 "conditions": [ 49589 { 49590 "modulePath": "core/src/lib/conditions/valueComparison.js", 49591 "settings": { 49592 "comparison": { 49593 "operator": "doesNotEqual", 49594 "caseInsensitive": true 49595 }, 49596 "leftOperand": "%DisableAnalyticsCookie%", 49597 "rightOperand": "true" 49598 } 49599 }, 49600 { 49601 "modulePath": "core/src/lib/conditions/valueComparison.js", 49602 "settings": { 49603 "comparison": { 49604 "operator": "doesNotEqual", 49605 "caseInsensitive": true 49606 }, 49607 "leftOperand": "%TRAFFICTYPE_META%", 49608 "rightOperand": "bot" 49609 } 49610 } 49611 ], 49612 "actions": [ 49613 { 49614 "modulePath": "adobe-analytics/src/lib/actions/setVariables.js", 49615 "settings": { 49616 "customSetup": { 49617 "source": function(event, s) { 49618 _satellite.logger.log(event); 49619var target = event.target.closest("button"); 49620 49621var mapping = { 49622 'analytics-mp-update-pi-cancel': 'Cancel', 49623 'analytics-mp-update-pi-save': 'Update personal information' 49624}; 49625 49626var analyticsData = Object.keys(mapping) 49627 .find(cls => target.classList.contains(cls)); 49628 49629analyticsData = analyticsData ? mapping[analyticsData] : ""; 49630 49631NIAnalytics.setAndTrack(["eVar33", "prop23"], analyticsData); 49632} 49633 }, 49634 "trackerProperties": { 49635 "eVars": [ 49636 { 49637 "name": "eVar1", 49638 "type": "value", 49639 "value": "Myprofile:Update personal information" 49640 }, 49641 { 49642 "name": "eVar12", 49643 "type": "value", 49644 "value": "%PROFILE_ID:COOKIE%" 49645 }, 49646 { 49647 "name": "eVar21", 49648 "type": "value", 49649 "value": "%PAGE_URL%" 49650 }, 49651 { 49652 "name": "eVar27", 49653 "type": "value", 49654 "value": "%CONTENTTYPE:METATAG%" 49655 }, 49656 { 49657 "name": "eVar56", 49658 "type": "value", 49659 "value": "Myprofile:Update personal information" 49660 } 49661 ], 49662 "props": [ 49663 { 49664 "name": "prop2", 49665 "type": "alias", 49666 "value": "eVar27" 49667 }, 49668 { 49669 "name": "prop33", 49670 "type": "alias", 49671 "value": "eVar21" 49672 } 49673 ], 49674 "events": [ 49675 { 49676 "name": "event30" 49677 } 49678 ] 49679 } 49680 } 49681 }, 49682 { 49683 "modulePath": "adobe-analytics/src/lib/actions/sendBeacon.js", 49684 "settings": { 49685 "type": "link", 49686 "linkType": "o" 49687 } 49688 }, 49689 { 49690 "modulePath": "adobe-analytics/src/lib/actions/clearVariables.js", 49691 "settings": {} 49692 } 49693 ] 49694 } 49695 ] 49696} 49697})(); 49698 49699var _satellite = (function () { 49700 'use strict'; 49701 49702 if (!window.atob) { console.warn('Adobe Launch is unsupported in IE 9 and below.'); return; } 49703 49704 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; 49705 49706 function getDefaultExportFromCjs (x) { 49707 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; 49708 } 49709 49710 var src = {exports: {}}; 49711 49712 /*************************************************************************************** 49713 * (c) 2025 Adobe. All rights reserved. 49714 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
49715 * you may not use this file except in compliance with the License. You may obtain a copy 49716 * of the License at http://www.apache.org/licenses/LICENSE-2.0 49717 * 49718 * Unless required by applicable law or agreed to in writing, software distributed under 49719 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 49720 * OF ANY KIND, either express or implied. See the License for the specific language 49721 * governing permissions and limitations under the License. 49722 ****************************************************************************************/ 49723 49724 var validateInjectedParams; 49725 var hasRequiredValidateInjectedParams; 49726 49727 function requireValidateInjectedParams () { 49728 if (hasRequiredValidateInjectedParams) return validateInjectedParams; 49729 hasRequiredValidateInjectedParams = 1; 49730 // reads the function signature and sees if a caller doesn't pass enough parameters 49731 validateInjectedParams = function validateInjectedParams(fn) { 49732 { 49733 // in production builds we have run all our tests and trust that the files 49734 // whose default export functions use an inject pattern contain the appropriate 49735 // production-ready require statements to make the module run. 49736 return fn; 49737 } 49738 }; 49739 return validateInjectedParams; 49740 } 49741 49742 /*************************************************************************************** 49743 * (c) 2017 Adobe. All rights reserved. 49744 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 49745 * you may not use this file except in compliance with the License. You may obtain a copy 49746 * of the License at http://www.apache.org/licenses/LICENSE-2.0 49747 * 49748 * Unless required by applicable law or agreed to in writing, software distributed under 49749 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 49750 * OF ANY KIND, either express or implied. See the License for the specific language 49751 * governing permissions and limitations under the License. 49752 ****************************************************************************************/ 49753 49754 var logger; 49755 var hasRequiredLogger; 49756 49757 function requireLogger () { 49758 if (hasRequiredLogger) return logger; 49759 hasRequiredLogger = 1; 49760 /** 49761 * Log levels. 49762 * @readonly 49763 * @enum {string} 49764 * @private 49765 */ 49766 var levels = { 49767 LOG: 'log', 49768 INFO: 'info', 49769 DEBUG: 'debug', 49770 WARN: 'warn', 49771 ERROR: 'error' 49772 }; 49773 49774 /** 49775 * Rocket unicode surrogate pair. 49776 * @type {string} 49777 */ 49778 var ROCKET = '\uD83D\uDE80'; 49779 49780 /** 49781 * The user's internet explorer version. If they're not running internet explorer, then it should 49782 * be NaN. 49783 * @type {Number} 49784 */ 49785 var ieVersion = parseInt( 49786 (/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1] 49787 ); 49788 49789 /** 49790 * Prefix to use on all messages. The rocket unicode doesn't work on IE 10. 49791 * @type {string} 49792 */ 49793 var launchPrefix = ieVersion === 10 ? '[Launch]' : ROCKET; 49794 49795 /** 49796 * Whether logged messages should be output to the console. 49797 * @type {boolean} 49798 */ 49799 var outputEnabled = false; 49800 49801 /** 49802 * Maximum number of deduplicated deprecation messages to hold when outputEnabled is false. 49803 * This bounds memory usage. 49804 * @type {number} 49805 */ 49806 var MAX_DEPRECATION_CACHE_SIZE = 100; 49807 49808 /** 49809 * Set to track deduplicated deprecation messages when outputEnabled is false. 49810 * @type {Set<string>} 49811 */ 49812 var dedupDeprecationMessages = new Set(); 49813 49814 /** 49815 * Processes a log message. 49816 * @param {string} level The level of message to log. 49817 * @param {...*} arg Any argument to be logged. 49818 * @private 49819 */ 49820 var process = function (level) { 49821 if (outputEnabled && window.console) { 49822 var logArguments = Array.prototype.slice.call(arguments, 1); 49823 logArguments.unshift(launchPrefix); 49824 // window.debug is unsupported in IE 10 49825 if (level === levels.DEBUG && !window.console[level]) { 49826 level = levels.INFO; 49827 } 49828 window.console[level].apply(window.console, logArguments); 49829 } 49830 }; 49831 49832 /** 49833 * Outputs a message to the web console. 49834 * @param {...*} arg Any argument to be logged. 49835 */ 49836 var log = process.bind(null, levels.LOG); 49837 49838 /** 49839 * Outputs informational message to the web console. 49840 * @param {...*} arg Any argument to be logged. 49841 */ 49842 var info = process.bind(null, levels.INFO); 49843 49844 /** 49845 * Outputs debug message to the web console. 49846 * In browsers that do not support console.debug, console.info is used instead. 49847 * @param {...*} arg Any argument to be logged. 49848 */ 49849 var debug = process.bind(null, levels.DEBUG); 49850 49851 /** 49852 * Outputs a warning message to the web console. 49853 * @param {...*} arg Any argument to be logged. 49854 */ 49855 var warn = process.bind(null, levels.WARN); 49856 49857 /** 49858 * Outputs an error message to the web console. 49859 * @param {...*} arg Any argument to be logged. 49860 */ 49861 var error = process.bind(null, levels.ERROR); 49862 49863 /** 49864 * Outputs a deprecation warning to the web console. 49865 * Deduplicates messages when output is disabled.
49866 * Passes all through when output is enabled. 49867 * @param {string} message The deprecation message. 49868 * @param {...*} additionalArgs Additional optional args. 49869 */ 49870 var logDeprecation = function () { 49871 var message = arguments[0]; 49872 49873 if (typeof message !== 'string') { 49874 message = String(message); 49875 } 49876 49877 // Always log when output is enabled 49878 if (outputEnabled) { 49879 process.apply( 49880 null, 49881 [levels.WARN].concat(Array.prototype.slice.call(arguments)) 49882 ); 49883 return; 49884 } 49885 49886 // When output is disabled: only log first time per unique message 49887 if (!dedupDeprecationMessages.has(message)) { 49888 dedupDeprecationMessages.add(message); 49889 49890 // Maintain bounded size 49891 if (dedupDeprecationMessages.size > MAX_DEPRECATION_CACHE_SIZE) { 49892 var first = dedupDeprecationMessages.values().next().value; 49893 dedupDeprecationMessages.delete(first); 49894 } 49895 49896 // Log even though outputEnabled is false (just once per unique message) 49897 var wasEnabled = outputEnabled; 49898 outputEnabled = true; 49899 process.apply( 49900 null, 49901 [levels.WARN].concat(Array.prototype.slice.call(arguments)) 49902 ); 49903 outputEnabled = wasEnabled; 49904 } 49905 49906 // Already logged → suppress 49907 }; 49908 49909 // Build the module exports object 49910 var loggerExports = { 49911 log: log, 49912 info: info, 49913 debug: debug, 49914 warn: warn, 49915 error: error, 49916 deprecation: logDeprecation, 49917 49918 /** 49919 * Creates a logging utility that only exposes logging functionality and prefixes all messages 49920 * with an identifier. 49921 */ 49922 createPrefixedLogger: function (identifier) { 49923 var loggerSpecificPrefix = '[' + identifier + ']'; 49924 49925 return { 49926 log: log.bind(null, loggerSpecificPrefix), 49927 info: info.bind(null, loggerSpecificPrefix), 49928 debug: debug.bind(null, loggerSpecificPrefix), 49929 warn: warn.bind(null, loggerSpecificPrefix), 49930 error: error.bind(null, loggerSpecificPrefix) 49931 }; 49932 } 49933 }; 49934 49935 // Define outputEnabled getter/setter with deduplication flush behavior 49936 Object.defineProperty(loggerExports, 'outputEnabled', { 49937 get: function () { 49938 return outputEnabled; 49939 }, 49940 set: function (value) { 49941 if (outputEnabled === false && value === true) { 49942 // Flush deduplication set on enable 49943 dedupDeprecationMessages.clear(); 49944 } 49945 outputEnabled = value; 49946 }, 49947 enumerable: true, 49948 configurable: true 49949 }); 49950 49951 logger = loggerExports; 49952 return logger; 49953 } 49954 49955 var reactorDocument; 49956 var hasRequiredReactorDocument; 49957 49958 function requireReactorDocument () { 49959 if (hasRequiredReactorDocument) return reactorDocument; 49960 hasRequiredReactorDocument = 1; 49961 49962 reactorDocument = document; 49963 return reactorDocument; 49964 } 49965 49966 /*************************************************************************************** 49967 * (c) 2017 Adobe. All rights reserved. 49968 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 49969 * you may not use this file except in compliance with the License. You may obtain a copy 49970 * of the License at http://www.apache.org/licenses/LICENSE-2.0 49971 * 49972 * Unless required by applicable law or agreed to in writing, software distributed under 49973 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 49974 * OF ANY KIND, either express or implied. See the License for the specific language 49975 * governing permissions and limitations under the License. 49976 ****************************************************************************************/ 49977 49978 var reactorObjectAssign; 49979 var hasRequiredReactorObjectAssign; 49980 49981 function requireReactorObjectAssign () { 49982 if (hasRequiredReactorObjectAssign) return reactorObjectAssign; 49983 hasRequiredReactorObjectAssign = 1; 49984 49985 reactorObjectAssign = Object.assign; 49986 return reactorObjectAssign; 49987 } 49988 49989 var reactorWindow; 49990 var hasRequiredReactorWindow; 49991 49992 function requireReactorWindow () { 49993 if (hasRequiredReactorWindow) return reactorWindow; 49994 hasRequiredReactorWindow = 1; 49995 49996 reactorWindow = window; 49997 return reactorWindow; 49998 } 49999 50000 /*************************************************************************************** 50001 * (c) 2021 Adobe. All rights reserved. 50002 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
50003 * you may not use this file except in compliance with the License. You may obtain a copy 50004 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50005 * 50006 * Unless required by applicable law or agreed to in writing, software distributed under 50007 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50008 * OF ANY KIND, either express or implied. See the License for the specific language 50009 * governing permissions and limitations under the License. 50010 ****************************************************************************************/ 50011 50012 var createDynamicHostResolver; 50013 var hasRequiredCreateDynamicHostResolver; 50014 50015 function requireCreateDynamicHostResolver () { 50016 if (hasRequiredCreateDynamicHostResolver) return createDynamicHostResolver; 50017 hasRequiredCreateDynamicHostResolver = 1; 50018 var validateInjectedParams = requireValidateInjectedParams(); 50019 50020 function injectCreateDynamicHostResolver({ window }) { 50021 return function createDynamicHostResolver( 50022 turbineEmbedCode, 50023 dynamicCdnEnabled, 50024 cdnAllowList, 50025 debugController 50026 ) { 50027 // A missing list means that we are not trying to dynamic replace (archives, 50028 // sftp, no premium CDN option enabled on the company). 50029 // even an empty list is flagging to us that we're trying to enforce dynamic 50030 var isDynamicEnforced = Boolean( 50031 dynamicCdnEnabled && Array.isArray(cdnAllowList) 50032 ); 50033 var shouldAugment = Boolean(isDynamicEnforced && turbineEmbedCode); 50034 50035 // using document.createElement('a') because IE10/11 doesn't support new URL() 50036 var turbineUrl = document.createElement('a'); 50037 if (isDynamicEnforced) { 50038 var throwUnavailableEmbedCode = function () { 50039 var missingEmbedCodeError = new Error( 50040 'Unable to find the Library Embed Code for Dynamic Host Resolution.' 50041 ); 50042 missingEmbedCodeError.code = 'dynamic_host_resolver_constructor_error'; 50043 throw missingEmbedCodeError; 50044 }; 50045 if (turbineEmbedCode) { 50046 if (!/^((https?:)?\/\/).+/.test(turbineEmbedCode)) { 50047 throwUnavailableEmbedCode(); 50048 } 50049 if (/^\/\/.+/.test(turbineEmbedCode)) { 50050 // for IE 10, you must throw on the protocol 50051 turbineUrl.href = window.location.protocol + turbineEmbedCode; 50052 } else { 50053 turbineUrl.href = turbineEmbedCode; 50054 } 50055 } 50056 50057 // check URL construction 50058 if (!turbineUrl.hostname) { 50059 throwUnavailableEmbedCode(); 50060 } 50061 // is this within the allowed list of hosts? 50062 if (cdnAllowList.indexOf(turbineUrl.hostname) === -1) { 50063 var dynamicDeniedError = new Error( 50064 'This library is not authorized for this domain. ' + 50065 'Please contact your CSM for more information.' 50066 ); 50067 dynamicDeniedError.code = 'dynamic_host_not_allowed'; 50068 throw dynamicDeniedError; 50069 } 50070 } 50071 50072 /** 50073 * Returns the host of the Turbine embed code, or an empty string if Dynamic Host 50074 * is not enabled. 50075 * @returns {string} 50076 */ 50077 var memoizedHostResult; 50078 var getTurbineHost = function () { 50079 if (memoizedHostResult != null) { 50080 return memoizedHostResult; 50081 } 50082 50083 if (shouldAugment) { 50084 // be sure we always force https to Adobe managed domains. 50085 // IE 10/11 returns the :443 protocol when modern browsers don't, so this replacement 50086 // is bringing every browser in line with the same return value 50087 var sanitizedHost = turbineUrl.host; 50088 if (/:80$/.test(sanitizedHost)) { 50089 sanitizedHost = sanitizedHost.replace(':80', ''); 50090 } else if (/:80\/$/.test(sanitizedHost)) { 50091 sanitizedHost = sanitizedHost.replace(':80/', ''); 50092 } else if (/:443$/.test(sanitizedHost)) { 50093 sanitizedHost = sanitizedHost.replace(':443', ''); 50094 } else if (/:443\/$/.test(sanitizedHost)) { 50095 sanitizedHost = sanitizedHost.replace(':443/', ''); 50096 } 50097 50098 memoizedHostResult = turbineUrl.protocol + '//' + sanitizedHost; 50099 } else { 50100 memoizedHostResult = ''; 50101 } 50102 50103 return memoizedHostResult; 50104 }; 50105 50106 /** 50107 * Returns a url decorated with the host of the Turbine embed code. If Dynamic host 50108 * is disabled, the original sourceUrl is returned unmodified. 50109 * @param sourceUrl 50110 * @returns {string|*} 50111 */ 50112 var decorateWithDynamicHost = function (sourceUrl) { 50113 if (shouldAugment && typeof sourceUrl === 'string') { 50114 var urlParts = [ 50115 getTurbineHost(), 50116 sourceUrl.charAt(0) === '/' ? sourceUrl.slice(1) : sourceUrl 50117 ]; 50118 50119 return urlParts.join('/'); 50120 } 50121 50122 return sourceUrl; 50123 }; 50124 50125 var dynamicHostResolver = { 50126 getTurbineHost: getTurbineHost, 50127 decorateWithDynamicHost: decorateWithDynamicHost, 50128 get isDynamicEnforced() { 50129 return isDynamicEnforced; 50130 } 50131 }; 50132 50133 // when we're in debug mode, this will expose the dynamicHostResolver to 50134 // the window for debugging. 50135 if (window) { 50136 function decideToExposeDynamicHostResolver(isDebugEnabled) { 50137 if (isDebugEnabled) { 50138 window.dynamicHostResolver = dynamicHostResolver; 50139 } else { 50140 delete window.dynamicHostResolver; 50141 } 50142 } 50143 debugController.onDebugChanged(decideToExposeDynamicHostResolver); 50144 // if debug is already enabled when the page is loaded, we won't get a 50145 // debugChanged callback, so check it right on page-load. 50146 decideToExposeDynamicHostResolver(debugController.getDebugEnabled()); 50147 } 50148 50149 return dynamicHostResolver; 50150 }; 50151 } 50152 50153 const validateInjection = validateInjectedParams( 50154 injectCreateDynamicHostResolver 50155 ); 50156 50157 createDynamicHostResolver = validateInjection({ 50158 window: requireReactorWindow() 50159 }); 50160 return createDynamicHostResolver; 50161 } 50162 50163 /*************************************************************************************** 50164 * (c) 2017 Adobe. All rights reserved. 50165 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
50166 * you may not use this file except in compliance with the License. You may obtain a copy 50167 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50168 * 50169 * Unless required by applicable law or agreed to in writing, software distributed under 50170 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50171 * OF ANY KIND, either express or implied. See the License for the specific language 50172 * governing permissions and limitations under the License. 50173 ****************************************************************************************/ 50174 50175 var buildRuleExecutionOrder; 50176 var hasRequiredBuildRuleExecutionOrder; 50177 50178 function requireBuildRuleExecutionOrder () { 50179 if (hasRequiredBuildRuleExecutionOrder) return buildRuleExecutionOrder; 50180 hasRequiredBuildRuleExecutionOrder = 1; 50181 /** 50182 * Rules can be ordered by users at the event type level. For example, assume both Rule A and Rule B 50183 * use the Library Loaded and Window Loaded event types. Rule A can be ordered to come before Rule B 50184 * on Library Loaded but after Rule B on Window Loaded. 50185 * 50186 * Order values are integers and act more as a priority. In other words, multiple rules can have the 50187 * same order value. If they have the same order value, their order of execution should be 50188 * considered nondetermistic. 50189 * 50190 * @param {Array} rules 50191 * @returns {Array} An ordered array of rule-event pair objects. 50192 */ 50193 buildRuleExecutionOrder = function (rules) { 50194 var ruleEventPairs = []; 50195
50196 rules.forEach(function (rule) { 50197 if (rule.events) { 50198 rule.events.forEach(function (event) { 50199 ruleEventPairs.push({ 50200 rule: rule, 50201 event: event 50202 }); 50203 }); 50204 } 50205 }); 50206 50207 return ruleEventPairs.sort(function (ruleEventPairA, ruleEventPairB) { 50208 return ruleEventPairA.event.ruleOrder - ruleEventPairB.event.ruleOrder; 50209 }); 50210 }; 50211 return buildRuleExecutionOrder; 50212 } 50213 50214 /* 50215 Copyright 2020 Adobe. All rights reserved. 50216 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50217 you may not use this file except in compliance with the License. You may obtain a copy 50218 of the License at http://www.apache.org/licenses/LICENSE-2.0 50219 50220 Unless required by applicable law or agreed to in writing, software distributed under 50221 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50222 OF ANY KIND, either express or implied. See the License for the specific language 50223 governing permissions and limitations under the License. 50224 */ 50225 50226 var createDebugController; 50227 var hasRequiredCreateDebugController; 50228 50229 function requireCreateDebugController () { 50230 if (hasRequiredCreateDebugController) return createDebugController; 50231 hasRequiredCreateDebugController = 1; 50232 var DEBUG_LOCAL_STORAGE_NAME = 'debug'; 50233 50234 createDebugController = function (localStorage, logger) { 50235 var getPersistedDebugEnabled = function () { 50236 return localStorage.getItem(DEBUG_LOCAL_STORAGE_NAME) === 'true'; 50237 }; 50238 50239 var setPersistedDebugEnabled = function (enabled) { 50240 localStorage.setItem(DEBUG_LOCAL_STORAGE_NAME, enabled); 50241 }; 50242 50243 var debugChangedCallbacks = []; 50244 var onDebugChanged = function (callback) { 50245 debugChangedCallbacks.push(callback); 50246 }; 50247 50248 logger.outputEnabled = getPersistedDebugEnabled(); 50249 50250 return { 50251 onDebugChanged: onDebugChanged, 50252 getDebugEnabled: getPersistedDebugEnabled, 50253 setDebugEnabled: function (enabled) { 50254 if (getPersistedDebugEnabled() !== enabled) { 50255 setPersistedDebugEnabled(enabled); 50256 logger.outputEnabled = enabled; 50257 debugChangedCallbacks.forEach(function (callback) { 50258 callback(enabled); 50259 }); 50260 } 50261 } 50262 }; 50263 }; 50264 return createDebugController; 50265 } 50266 50267 /*************************************************************************************** 50268 * (c) 2018 Adobe. All rights reserved. 50269 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50270 * you may not use this file except in compliance with the License. You may obtain a copy 50271 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50272 * 50273 * Unless required by applicable law or agreed to in writing, software distributed under 50274 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50275 * OF ANY KIND, either express or implied. See the License for the specific language 50276 * governing permissions and limitations under the License. 50277 ****************************************************************************************/ 50278 50279 var createExecuteDelegateModule; 50280 var hasRequiredCreateExecuteDelegateModule; 50281 50282 function requireCreateExecuteDelegateModule () { 50283 if (hasRequiredCreateExecuteDelegateModule) return createExecuteDelegateModule; 50284 hasRequiredCreateExecuteDelegateModule = 1; 50285 var MODULE_NOT_FUNCTION_ERROR = 'Module did not export a function.'; 50286 50287 createExecuteDelegateModule = function ( 50288 moduleProvider, 50289 replaceTokens, 50290 settingsFileTransformer 50291 ) { 50292 return function (moduleDescriptor, syntheticEvent, moduleCallParameters) { 50293 moduleCallParameters = moduleCallParameters || []; 50294 var moduleExports = moduleProvider.getModuleExports( 50295 moduleDescriptor.modulePath 50296 ); 50297 50298 if (typeof moduleExports !== 'function') { 50299 throw new Error(MODULE_NOT_FUNCTION_ERROR); 50300 } 50301 50302 // dynamically replace the host on the module settings 50303 var moduleDefinition = moduleProvider.getModuleDefinition( 50304 moduleDescriptor.modulePath 50305 ); 50306 50307 // We're transforming URLs in-place to ensure that the developer's settings object reference 50308 // is the same object reference as moduleDescriptor.settings. Therefore, we must only transform 50309 // the settings one time and save a reference saying that we've done that. We're saving this in 50310 // the module descriptor of each event, condition, and action so that we aren't modifying the 50311 // settings object. 50312 var moduleSettings = moduleDescriptor.settings || {}; 50313 if ( 50314 !moduleDescriptor.hasTransformedFilePaths && 50315 moduleDefinition.filePaths 50316 ) { 50317 settingsFileTransformer( 50318 moduleSettings, 50319 moduleDefinition.filePaths, 50320 moduleDescriptor.modulePath 50321 ); 50322 moduleDescriptor.hasTransformedFilePaths = true; 50323 } 50324 50325 // replace tokens 50326 var moduleDescriptorSettings = replaceTokens( 50327 moduleSettings, 50328 syntheticEvent 50329 ); 50330 return moduleExports 50331 .bind(null, moduleDescriptorSettings) 50332 .apply(null, moduleCallParameters); 50333 }; 50334 }; 50335 return createExecuteDelegateModule; 50336 } 50337 50338 /*************************************************************************************** 50339 * (c) 2017 Adobe. All rights reserved. 50340 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
50341 * you may not use this file except in compliance with the License. You may obtain a copy 50342 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50343 * 50344 * Unless required by applicable law or agreed to in writing, software distributed under 50345 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50346 * OF ANY KIND, either express or implied. See the License for the specific language 50347 * governing permissions and limitations under the License. 50348 ****************************************************************************************/ 50349 50350 var cleanText; 50351 var hasRequiredCleanText; 50352 50353 function requireCleanText () { 50354 if (hasRequiredCleanText) return cleanText; 50355 hasRequiredCleanText = 1; 50356 /** 50357 * "Cleans" text by trimming the string and removing spaces and newlines. 50358 * @param {string} str The string to clean. 50359 * @returns {string} 50360 */ 50361 cleanText = function (str) { 50362 return typeof str === 'string' ? str.replace(/\s+/g, ' ').trim() : str; 50363 }; 50364 return cleanText; 50365 } 50366 50367 /*************************************************************************************** 50368 * (c) 2017 Adobe. All rights reserved. 50369 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50370 * you may not use this file except in compliance with the License. You may obtain a copy 50371 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50372 * 50373 * Unless required by applicable law or agreed to in writing, software distributed under 50374 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50375 * OF ANY KIND, either express or implied. See the License for the specific language 50376 * governing permissions and limitations under the License. 50377 ****************************************************************************************/ 50378 50379 var getNamespacedStorage; 50380 var hasRequiredGetNamespacedStorage; 50381 50382 function requireGetNamespacedStorage () { 50383 if (hasRequiredGetNamespacedStorage) return getNamespacedStorage; 50384 hasRequiredGetNamespacedStorage = 1; 50385 var validateInjectedParams = requireValidateInjectedParams(); 50386 50387 function injectGetNamespacedStorage({ window }) { 50388 var NAMESPACE = 'com.adobe.reactor.'; // Default namespace. 50389 return function getNamespacedStorage(storageType, additionalNamespace) { 50390 var finalNamespace = NAMESPACE + (additionalNamespace || ''); 50391 50392 // When storage is disabled on Safari, the mere act of referencing window.localStorage 50393 // or window.sessionStorage throws an error. For this reason, we wrap in a try-catch. 50394 return { 50395 /** 50396 * Reads a value from storage. 50397 * @param {string} name The name of the item to be read. 50398 * @returns {string} 50399 */ 50400 getItem: function (name) { 50401 try { 50402 return window[storageType].getItem(finalNamespace + name); 50403 // eslint-disable-next-line no-unused-vars 50404 } catch (e) { 50405 return null; 50406 } 50407 }, 50408 /** 50409 * Saves a value to storage. 50410 * @param {string} name The name of the item to be saved. 50411 * @param {string} value The value of the item to be saved. 50412 * @returns {boolean} Whether the item was successfully saved to storage. 50413 */ 50414 setItem: function (name, value) { 50415 try { 50416 window[storageType].setItem(finalNamespace + name, value); 50417 return true; 50418 // eslint-disable-next-line no-unused-vars 50419 } catch (e) { 50420 return false; 50421 } 50422 } 50423 }; 50424 }; 50425 } 50426 50427 const validateInjection = validateInjectedParams(injectGetNamespacedStorage); 50428 50429 getNamespacedStorage = validateInjection({ 50430 window: requireReactorWindow() 50431 }); 50432 return getNamespacedStorage; 50433 } 50434 50435 /*************************************************************************************** 50436 * (c) 2017 Adobe. All rights reserved. 50437 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50438 * you may not use this file except in compliance with the License. You may obtain a copy 50439 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50440 * 50441 * Unless required by applicable law or agreed to in writing, softw
50441are distributed under 50442 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50443 * OF ANY KIND, either express or implied. See the License for the specific language 50444 * governing permissions and limitations under the License. 50445 ****************************************************************************************/ 50446 50447 var dataElementSafe; 50448 var hasRequiredDataElementSafe; 50449 50450 function requireDataElementSafe () { 50451 if (hasRequiredDataElementSafe) return dataElementSafe; 50452 hasRequiredDataElementSafe = 1; 50453 var getNamespacedStorage = requireGetNamespacedStorage(); 50454 50455 var DATA_ELEMENTS_NAMESPACE = 'dataElements.'; 50456 50457 var dataElementSessionStorage = getNamespacedStorage( 50458 'sessionStorage', 50459 DATA_ELEMENTS_NAMESPACE 50460 ); 50461 var dataElementLocalStorage = getNamespacedStorage( 50462 'localStorage', 50463 DATA_ELEMENTS_NAMESPACE 50464 ); 50465 50466 var storageDurations = { 50467 PAGEVIEW: 'pageview', 50468 SESSION: 'session', 50469 VISITOR: 'visitor' 50470 }; 50471 50472 var pageviewCache = {}; 50473 50474 var serialize = function (value) { 50475 var serialized; 50476 50477 try { 50478 // On some browsers, with some objects, errors will be thrown during serialization. For example, 50479 // in Chrome with the window object, it will throw "TypeError: Converting circular structure 50480 // to JSON" 50481 serialized = JSON.stringify(value); 50482 // eslint-disable-next-line no-empty, no-unused-vars 50483 } catch (e) {} 50484 50485 return serialized; 50486 }; 50487 50488 var setValue = function (key, storageDuration, value) { 50489 var serializedValue; 50490 50491 switch (storageDuration) { 50492 case storageDurations.PAGEVIEW: 50493 pageviewCache[key] = value; 50494 return; 50495 case storageDurations.SESSION: 50496 serializedValue = serialize(value); 50497 if (serializedValue) { 50498 dataElementSessionStorage.setItem(key, serializedValue); 50499 } 50500 return; 50501 case storageDurations.VISITOR: 50502 serializedValue = serialize(value); 50503 if (serializedValue) { 50504 dataElementLocalStorage.setItem(key, serializedValue); 50505 } 50506 return; 50507 } 50508 }; 50509 50510 var getValue = function (key, storageDuration) { 50511 var value; 50512 50513 // It should consistently return the same value if no stored item was found. We chose null, 50514 // though undefined could be a reasonable value as well. 50515 switch (storageDuration) { 50516 case storageDurations.PAGEVIEW: 50517 return pageviewCache.hasOwnProperty(key) ? pageviewCache[key] : null; 50518 case storageDurations.SESSION: 50519 value = dataElementSessionStorage.getItem(key); 50520 return value === null ? value : JSON.parse(value); 50521 case storageDurations.VISITOR: 50522 value = dataElementLocalStorage.getItem(key); 50523 return value === null ? value : JSON.parse(value); 50524 } 50525 }; 50526 50527 dataElementSafe = { 50528 setValue: setValue, 50529 getValue: getValue 50530 }; 50531 return dataElementSafe; 50532 } 50533 50534 /*************************************************************************************** 50535 * (c) 2017 Adobe. All rights reserved. 50536 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50537 * you may not use this file except in compliance with the License. You may obtain a copy 50538 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50539 * 50540 * Unless required by applicable law or agreed to in writing, software distributed under 50541 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50542 * OF ANY KIND, either express or implied. See the License for the specific language 50543 * governing permissions and limitations under the License. 50544 ****************************************************************************************/ 50545 50546 var createGetDataElementValue; 50547 var hasRequiredCreateGetDataElementValue; 50548 50549 function requireCreateGetDataElementValue () { 50550 if (hasRequiredCreateGetDataElementValue) return createGetDataElementValue; 50551 hasRequiredCreateGetDataElementValue = 1; 50552 var validateInjectedParams = requireValidateInjectedParams(); 50553 50554 var getErrorMessage = function ( 50555 dataDef, 50556 dataElementName, 50557 errorMessage, 50558 errorStack 50559 ) { 50560 return ( 50561 'Failed to execute data element module ' + 50562 dataDef.modulePath + 50563 ' for data element ' + 50564 dataElementName + 50565 '. ' + 50566 errorMessage + 50567 (errorStack ? '\n' + errorStack : '') 50568 ); 50569 }; 50570 50571 function injectCreateGetDataElementValue({ 50572 cleanText, 50573 dataElementSafe, 50574 logger 50575 }) { 50576 return function createGetDataElementValue( 50577 moduleProvider, 50578 getDataElementDefinition, 50579 replaceTokens, 50580 undefinedVarsReturnEmpty, 50581 settingsFileTransformer 50582 ) { 50583 return function (name, syntheticEvent) { 50584 var dataDef = getDataElementDefinition(name); 50585 50586 if (!dataDef) { 50587 return undefinedVarsReturnEmpty ? '' : undefined; 50588 } 50589 50590 var storageDuration = dataDef.storageDuration; 50591 var moduleExports; 50592 var moduleDefinition; 50593 50594 try { 50595 moduleExports = moduleProvider.getModuleExports(dataDef.modulePath); 50596 moduleDefinition = moduleProvider.getModuleDefinition( 50597 dataDef.modulePath 50598 ); 50599 } catch (e) { 50600 logger.error(getErrorMessage(dataDef, name, e.message, e.stack)); 50601 return; 50602 } 50603 50604 if (typeof moduleExports !== 'function') { 50605 logger.error(
50606 getErrorMessage(dataDef, name, 'Module did not export a function.') 50607 ); 50608 return; 50609 } 50610 50611 var value; 50612 50613 var dataElementSettings = dataDef.settings || {}; 50614 if (!dataDef.hasTransformedFilePaths && moduleDefinition.filePaths) { 50615 settingsFileTransformer( 50616 dataElementSettings, 50617 moduleDefinition.filePaths, 50618 dataDef.modulePath 50619 ); 50620 dataDef.hasTransformedFilePaths = true; 50621 } 50622 50623 try { 50624 value = moduleExports( 50625 replaceTokens(dataElementSettings, syntheticEvent), 50626 syntheticEvent 50627 ); 50628 } catch (e) { 50629 logger.error(getErrorMessage(dataDef, name, e.message, e.stack)); 50630 return; 50631 } 50632 50633 if (storageDuration) { 50634 if (value != null) { 50635 dataElementSafe.setValue(name, storageDuration, value); 50636 } else { 50637 value = dataElementSafe.getValue(name, storageDuration); 50638 } 50639 } 50640 50641 if (value == null && dataDef.defaultValue != null) { 50642 value = dataDef.defaultValue; 50643 } 50644 50645 if (typeof value === 'string') { 50646 if (dataDef.cleanText) { 50647 value = cleanText(value); 50648 } 50649 50650 if (dataDef.forceLowerCase) { 50651 value = value.toLowerCase(); 50652 } 50653 } 50654 50655 return value; 50656 }; 50657 }; 50658 } 50659 50660 const validateInjection = validateInjectedParams( 50661 injectCreateGetDataElementValue 50662 ); 50663 50664 createGetDataElementValue = validateInjection({ 50665 cleanText: requireCleanText(), 50666 logger: requireLogger(), 50667 dataElementSafe: requireDataElementSafe() 50668 }); 50669 return createGetDataElementValue; 50670 } 50671 50672 /*************************************************************************************** 50673 * (c) 2017 Adobe. All rights reserved. 50674 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50675 * you may not use this file except in compliance with the License. You may obtain a copy 50676 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50677 * 50678 * Unless required by applicable law or agreed to in writing, software distributed under 50679 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50680 * OF ANY KIND, either express or implied. See the License for the specific language 50681 * governing permissions and limitations under the License. 50682 ****************************************************************************************/ 50683 50684 var createGetVar; 50685 var hasRequiredCreateGetVar; 50686 50687 function requireCreateGetVar () { 50688 if (hasRequiredCreateGetVar) return createGetVar; 50689 hasRequiredCreateGetVar = 1; 50690 var cleanText = requireCleanText(); 50691 50692 var specialPropertyAccessors = { 50693 text: function (obj) { 50694 return obj.textContent; 50695 }, 50696 cleanText: function (obj) { 50697 return cleanText(obj.textContent); 50698 } 50699 }; 50700 50701 /** 50702 * This returns the value of a property at a given path. For example, a <code>path<code> of 50703 * <code>foo.bar</code> will return the value of <code>obj.foo.bar</code>. 50704 * 50705 * In addition, if <code>path</code> is <code>foo.bar.getAttribute(unicorn)</code> and 50706 * <code>obj.foo.bar</code> has a method named <code>getAttribute</code>, the method will be 50707 * called with a value of <code>"unicorn"</code> and the value will be returned. 50708 * 50709 * Also, if <code>path</code> is <code>foo.bar.@text</code> or other supported properties 50710 * beginning with <code>@</code>, a special accessor will be used. 50711 * 50712 * @param host 50713 * @param path 50714 * @param supportSpecial 50715 * @returns {*} 50716 */ 50717 var getObjectProperty = function (host, propChain, supportSpecial) { 50718 var value = host; 50719 var attrMatch; 50720 for (var i = 0, len = propChain.length; i < len; i++) { 50721 if (value == null) { 50722 return undefined; 50723 } 50724 var prop = propChain[i]; 50725 if (supportSpecial && prop.charAt(0) === '@') { 50726 var specialProp = prop.slice(1); 50727 value = specialPropertyAccessors[specialProp](value); 50728 continue; 50729 } 50730 if ( 50731 value.getAttribute && 50732 (attrMatch = prop.match(/^getAttribute\((.+)\)$/)) 50733 ) { 50734 var attr = attrMatch[1]; 50735 value = value.getAttribute(attr); 50736 continue; 50737 } 50738 value = value[prop]; 50739 } 50740 return value; 50741 }; 50742 50743 /** 50744 * Returns the value of a variable. 50745 * @param {string} variable 50746 * @param {Object} [syntheticEvent] A synthetic event. Only required when using %event... %this... 50747 * or %target... 50748 * @returns {*} 50749 */ 50750 createGetVar = function ( 50751 customVars, 50752 getDataElementDefinition, 50753 getDataElementValue 50754 ) { 50755 return function (variable, syntheticEvent) { 50756 var value; 50757 50758 if (getDataElementDefinition(variable)) { 50759 // Accessing nested properties of a data element using dot-notation is unsupported because 50760 // users can currently create data elements with periods in the name. 50761 value = getDataElementValue(variable, syntheticEvent); 50762 } else { 50763 var propChain = variable.split('.'); 50764 var variableHostName = propChain.shift(); 50765 50766 if (variableHostName === 'this') { 50767 if (syntheticEvent) {
50768 // I don't know why this is the only one that supports special properties, but that's the 50769 // way it was in Satellite. 50770 value = getObjectProperty(syntheticEvent.element, propChain, true); 50771 } 50772 } else if (variableHostName === 'event') { 50773 if (syntheticEvent) { 50774 value = getObjectProperty(syntheticEvent, propChain); 50775 } 50776 } else if (variableHostName === 'target') { 50777 if (syntheticEvent) { 50778 value = getObjectProperty(syntheticEvent.target, propChain); 50779 } 50780 } else { 50781 value = getObjectProperty(customVars[variableHostName], propChain); 50782 } 50783 } 50784 50785 return value; 50786 }; 50787 }; 50788 return createGetVar; 50789 } 50790 50791 /*************************************************************************************** 50792 * (c) 2017 Adobe. All rights reserved. 50793 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50794 * you may not use this file except in compliance with the License. You may obtain a copy 50795 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50796 * 50797 * Unless required by applicable law or agreed to in writing, software distributed under 50798 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50799 * OF ANY KIND, either express or implied. See the License for the specific language 50800 * governing permissions and limitations under the License. 50801 ****************************************************************************************/ 50802 50803 var createIsVar; 50804 var hasRequiredCreateIsVar; 50805 50806 function requireCreateIsVar () { 50807 if (hasRequiredCreateIsVar) return createIsVar; 50808 hasRequiredCreateIsVar = 1; 50809 /** 50810 * Determines if the provided name is a valid variable, where the variable 50811 * can be a data element, element, event, target, or custom var. 50812 * @param variableName 50813 * @returns {boolean} 50814 */ 50815 createIsVar = function (customVars, getDataElementDefinition) { 50816 return function (variableName) { 50817 var nameBeforeDot = variableName.split('.')[0]; 50818 50819 return Boolean( 50820 getDataElementDefinition(variableName) || 50821 nameBeforeDot === 'this' || 50822 nameBeforeDot === 'event' || 50823 nameBeforeDot === 'target' || 50824 customVars.hasOwnProperty(nameBeforeDot) 50825 ); 50826 }; 50827 }; 50828 return createIsVar; 50829 } 50830 50831 /*************************************************************************************** 50832 * (c) 2017 Adobe. All rights reserved. 50833 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50834 * you may not use this file except in compliance with the License. You may obtain a copy 50835 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50836 * 50837 * Unless required by applicable law or agreed to in writing, software distributed under 50838 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50839 * OF ANY KIND, either express or implied. See the License for the specific language 50840 * governing permissions and limitations under the License. 50841 ****************************************************************************************/ 50842 50843 var extractModuleExports; 50844 var hasRequiredExtractModuleExports; 50845 50846 function requireExtractModuleExports () { 50847 if (hasRequiredExtractModuleExports) return extractModuleExports; 50848 hasRequiredExtractModuleExports = 1; 50849 extractModuleExports = function (script, require, turbine) { 50850 var module = { 50851 exports: {} 50852 }; 50853 50854 // simulate CommonJS environment where a developer can define module.exports 50855 script.call(module.exports, module, module.exports, require, turbine); 50856 50857 return module.exports; 50858 }; 50859 return extractModuleExports; 50860 } 50861 50862 /*************************************************************************************** 50863 * (c) 2017 Adobe. All rights reserved. 50864 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50865 * you may not use this file except in compliance with the License. You may obtain a copy 50866 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50867 * 50868 * Unless required by applicable law or agreed to in writing, softw
50868are distributed under 50869 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50870 * OF ANY KIND, either express or implied. See the License for the specific language 50871 * governing permissions and limitations under the License. 50872 ****************************************************************************************/ 50873 50874 var createModuleProvider; 50875 var hasRequiredCreateModuleProvider; 50876 50877 function requireCreateModuleProvider () { 50878 if (hasRequiredCreateModuleProvider) return createModuleProvider; 50879 hasRequiredCreateModuleProvider = 1; 50880 var validateInjectedParams = requireValidateInjectedParams(); 50881 50882 function injectCreateModuleProvider({ extractModuleExports, logger }) { 50883 return function createModuleProvider() { 50884 var moduleByReferencePath = {}; 50885 50886 var getModule = function (referencePath) { 50887 var module = moduleByReferencePath[referencePath]; 50888 50889 if (!module) { 50890 throw new Error('Module ' + referencePath + ' not found.'); 50891 } 50892 50893 return module; 50894 }; 50895 50896 var registerModule = function ( 50897 referencePath, 50898 moduleDefinition, 50899 extensionName, 50900 require, 50901 turbine 50902 ) { 50903 var module = { 50904 definition: moduleDefinition, 50905 extensionName: extensionName, 50906 require: require, 50907 turbine: turbine 50908 }; 50909 module.require = require; 50910 moduleByReferencePath[referencePath] = module; 50911 }; 50912 50913 var hydrateCache = function () { 50914 Object.keys(moduleByReferencePath).forEach(function (referencePath) { 50915 try { 50916 getModuleExports(referencePath); 50917 } catch (e) { 50918 var errorMessage = 50919 'Error initializing module ' + 50920 referencePath + 50921 '. ' + 50922 e.message + 50923 (e.stack ? '\n' + e.stack : ''); 50924 logger.error(errorMessage); 50925 } 50926 }); 50927 }; 50928 50929 var getModuleExports = function (referencePath) { 50930 var module = getModule(referencePath); 50931 50932 // Using hasOwnProperty instead of a falsey check because the module could export undefined 50933 // in which case we don't want to execute the module each time the exports is requested. 50934 if (!module.hasOwnProperty('exports')) { 50935 module.exports = extractModuleExports( 50936 module.definition.script, 50937 module.require, 50938 module.turbine 50939 ); 50940 } 50941 50942 return module.exports; 50943 }; 50944 50945 var getModuleDefinition = function (referencePath) { 50946 return getModule(referencePath).definition; 50947 }; 50948 50949 var getModuleExtensionName = function (referencePath) { 50950 return getModule(referencePath).extensionName; 50951 }; 50952 50953 return { 50954 registerModule: registerModule, 50955 hydrateCache: hydrateCache, 50956 getModuleExports: getModuleExports, 50957 getModuleDefinition: getModuleDefinition, 50958 getModuleExtensionName: getModuleExtensionName 50959 }; 50960 }; 50961 } 50962 50963 const validateInjection = validateInjectedParams(injectCreateModuleProvider); 50964 50965 createModuleProvider = validateInjection({ 50966 extractModuleExports: requireExtractModuleExports(), 50967 logger: requireLogger() 50968 }); 50969 return createModuleProvider; 50970 } 50971 50972 /*************************************************************************************** 50973 * (c) 2017 Adobe. All rights reserved. 50974 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 50975 * you may not use this file except in compliance with the License. You may obtain a copy 50976 * of the License at http://www.apache.org/licenses/LICENSE-2.0 50977 * 50978 * Unless required by applicable law or agreed to in writing, software distributed under 50979 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 50980 * OF ANY KIND, either express or implied. See the License for the specific language 50981 * governing permissions and limitations under the License. 50982 ****************************************************************************************/ 50983 50984 var createNotifyMonitors; 50985 var hasRequiredCreateNotifyMonitors; 50986 50987 function requireCreateNotifyMonitors () { 50988 if (hasRequiredCreateNotifyMonitors) return createNotifyMonitors; 50989 hasRequiredCreateNotifyMonitors = 1;
50990 var validateInjectedParams = requireValidateInjectedParams(); 50991 50992 function injectCreateNotifyMonitors({ logger }) { 50993 return function createNotifyMonitors(satellite) { 50994 var warningLogged = false; 50995 50996 return function notifyMonitors(type, event) { 50997 var monitors = satellite._monitors; 50998 50999 if (monitors) { 51000 if (!warningLogged) { 51001 logger.warn( 51002 'The _satellite._monitors API may change at any time and should only ' + 51003 'be used for debugging.' 51004 ); 51005 warningLogged = true; 51006 } 51007 51008 monitors.forEach(function (monitor) { 51009 if (monitor[type]) { 51010 monitor[type](event); 51011 } 51012 }); 51013 } 51014 }; 51015 }; 51016 } 51017 51018 const validateInjection = validateInjectedParams(injectCreateNotifyMonitors); 51019 51020 createNotifyMonitors = validateInjection({ 51021 logger: requireLogger() 51022 }); 51023 return createNotifyMonitors; 51024 } 51025 51026 /*************************************************************************************** 51027 * (c) 2017 Adobe. All rights reserved. 51028 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51029 * you may not use this file except in compliance with the License. You may obtain a copy 51030 * of the License at http://www.apache.org/licenses/LICENSE-2.0 51031 * 51032 * Unless required by applicable law or agreed to in writing, software distributed under 51033 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51034 * OF ANY KIND, either express or implied. See the License for the specific language 51035 * governing permissions and limitations under the License. 51036 ****************************************************************************************/ 51037 51038 var createReplaceTokens; 51039 var hasRequiredCreateReplaceTokens; 51040 51041 function requireCreateReplaceTokens () { 51042 if (hasRequiredCreateReplaceTokens) return createReplaceTokens; 51043 hasRequiredCreateReplaceTokens = 1; 51044 var validateInjectedParams = requireValidateInjectedParams(); 51045 51046 function injectCreateReplaceTokens({ logger }) { 51047 /** 51048 * Replacing any variable tokens (%myDataElement%, %this.foo%, etc.) with their associated values. 51049 * A new string, object, or array will be created; the thing being processed will never be 51050 * modified. 51051 * @param {*} thing Thing potentially containing variable tokens. Objects and arrays will be 51052 * deeply processed. 51053 * @param {HTMLElement} [element] Associated HTML element. Used for special tokens 51054 * (%this.something%). 51055 * @param {Object} [event] Associated event. Used for special tokens (%event.something%, 51056 * %target.something%) 51057 * @returns {*} A processed value. 51058 */ 51059 return function createReplaceTokens(isVar, getVar, undefinedVarsReturnEmpty) { 51060 var replaceTokensInString; 51061 var replaceTokensInObject; 51062 var replaceTokensInArray; 51063 var replaceTokens; 51064 var variablesBeingRetrieved = []; 51065 51066 var getVarValue = function (token, variableName, syntheticEvent) { 51067 if (!isVar(variableName)) { 51068 return token; 51069 } 51070 51071 variablesBeingRetrieved.push(variableName); 51072 var val = getVar(variableName, syntheticEvent); 51073 variablesBeingRetrieved.pop(); 51074 return val == null && undefinedVarsReturnEmpty ? '' : val; 51075 }; 51076 51077 /** 51078 * Perform variable substitutions to a string where tokens are specified in the form %foo%. 51079 * If the only content of the string is a single data element token, then the raw data element 51080 * value will be returned instead. 51081 * 51082 * @param str {string} The string potentially containing data element tokens. 51083 * @param element {HTMLElement} The element to use for tokens in the form of %this.property%. 51084 * @param event {Object} The event object to use for tokens in the form of %target.property%. 51085 * @returns {*} 51086 */ 51087 replaceTokensInString = function (str, syntheticEvent) { 51088 // Is the string a single data element token and nothing else? 51089 var result = /^%([^%]+)%$/.exec(str); 51090 51091 if (result) { 51092 return getVarValue(str, result[1], syntheticEvent); 51093 } else { 51094 return str.replace(/%(.+?)%/g, function (token, variableName) { 51095 return getVarValue(token, variableName, syntheticEvent); 51096 }); 51097 } 51098 }; 51099 51100 replaceTokensInObject = function (obj, syntheticEvent) { 51101 var ret = {}; 51102 var keys = Object.keys(obj); 51103 for (var i = 0; i < keys.length; i++) { 51104 var key = keys[i]; 51105 var value = obj[key]; 51106 ret[key] = replaceTokens(value, syntheticEvent); 51107 } 51108 return ret; 51109 }; 51110 51111 replaceTokensInArray = function (arr, syntheticEvent) { 51112 var ret = []; 51113 for (var i = 0, len = arr.length; i < len; i++) {
51114 ret.push(replaceTokens(arr[i], syntheticEvent)); 51115 } 51116 return ret; 51117 }; 51118 51119 replaceTokens = function (thing, syntheticEvent) { 51120 if (typeof thing === 'string') { 51121 return replaceTokensInString(thing, syntheticEvent); 51122 } else if (Array.isArray(thing)) { 51123 return replaceTokensInArray(thing, syntheticEvent); 51124 } else if (typeof thing === 'object' && thing !== null) { 51125 return replaceTokensInObject(thing, syntheticEvent); 51126 } 51127 51128 return thing; 51129 }; 51130 51131 return function (thing, syntheticEvent) { 51132 // It's possible for a data element to reference another data element. Because of this, 51133 // we need to prevent circular dependencies from causing an infinite loop. 51134 if (variablesBeingRetrieved.length > 10) { 51135 logger.error( 51136 'Data element circular reference detected: ' + 51137 variablesBeingRetrieved.join(' -> ') 51138 ); 51139 return thing; 51140 } 51141 51142 return replaceTokens(thing, syntheticEvent); 51143 }; 51144 }; 51145 } 51146 51147 const validateInjection = validateInjectedParams(injectCreateReplaceTokens); 51148 51149 createReplaceTokens = validateInjection({ 51150 logger: requireLogger() 51151 }); 51152 return createReplaceTokens; 51153 } 51154 51155 /*************************************************************************************** 51156 * (c) 2017 Adobe. All rights reserved. 51157 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51158 * you may not use this file except in compliance with the License. You may obtain a copy 51159 * of the License at http://www.apache.org/licenses/LICENSE-2.0 51160 * 51161 * Unless required by applicable law or agreed to in writing, software distributed under 51162 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51163 * OF ANY KIND, either express or implied. See the License for the specific language 51164 * governing permissions and limitations under the License. 51165 ****************************************************************************************/ 51166 51167 var createSetCustomVar; 51168 var hasRequiredCreateSetCustomVar; 51169 51170 function requireCreateSetCustomVar () { 51171 if (hasRequiredCreateSetCustomVar) return createSetCustomVar; 51172 hasRequiredCreateSetCustomVar = 1; 51173 createSetCustomVar = function (customVars) { 51174 return function () { 51175 if (typeof arguments[0] === 'string') { 51176 customVars[arguments[0]] = arguments[1]; 51177 } else if (arguments[0]) { 51178 // assume an object literal 51179 var mapping = arguments[0]; 51180 for (var key in mapping) { 51181 customVars[key] = mapping[key]; 51182 } 51183 } 51184 }; 51185 }; 51186 return createSetCustomVar; 51187 } 51188 51189 /*************************************************************************************** 51190 * (c) 2017 Adobe. All rights reserved. 51191 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51192 * you may not use this file except in compliance with the License. You may obtain a copy 51193 * of the License at http://www.apache.org/licenses/LICENSE-2.0 51194 * 51195 * Unless required by applicable law or agreed to in writing, software distributed under 51196 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51197 * OF ANY KIND, either express or implied. See the License for the specific language 51198 * governing permissions and limitations under the License. 51199 ****************************************************************************************/ 51200 51201 var reactorPromise; 51202 var hasRequiredReactorPromise; 51203 51204 function requireReactorPromise () { 51205 if (hasRequiredReactorPromise) return reactorPromise; 51206 hasRequiredReactorPromise = 1; 51207 51208 // For building Turbine we are using Rollup. For running the turbine tests we are using 51209 // Karma + Webpack. You need to specify the default import when using promise-polyfill` 51210 // with Webpack 2+. We need `require('promise-polyfill').default` for running the tests 51211 // and `require('promise-polyfill')` for building Turbine. 51212 reactorPromise = 51213 (typeof window !== 'undefined' && window.Promise) || 51214 (typeof commonjsGlobal !== 'undefined' && commonjsGlobal.Promise); 51215 return reactorPromise; 51216 } 51217 51218 /* 51219 Copyright 2020 Adobe. All rights reserved. 51220 This file is licensed to you under the Apache License, Version 2.0 (the "License");
51221 you may not use this file except in compliance with the License. You may obtain a copy 51222 of the License at http://www.apache.org/licenses/LICENSE-2.0 51223 51224 Unless required by applicable law or agreed to in writing, software distributed under 51225 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51226 OF ANY KIND, either express or implied. See the License for the specific language 51227 governing permissions and limitations under the License. 51228 */ 51229 51230 var createAddActionToQueue; 51231 var hasRequiredCreateAddActionToQueue; 51232 51233 function requireCreateAddActionToQueue () { 51234 if (hasRequiredCreateAddActionToQueue) return createAddActionToQueue; 51235 hasRequiredCreateAddActionToQueue = 1; 51236 var Promise = requireReactorPromise(); 51237 51238 createAddActionToQueue = function ( 51239 executeDelegateModule, 51240 normalizeRuleComponentError, 51241 logActionError 51242 ) { 51243 return function (action, rule, syntheticEvent, lastPromiseInQueue) { 51244 return lastPromiseInQueue.then(function () { 51245 // This module is used when ruleComponentSequencing is enabled. 51246 // action.timeout is always supplied to this module as >= 0 when delayNext is true. 51247 51248 var delayNextAction = action.delayNext; 51249 var actionTimeoutId; 51250 51251 return new Promise(function (resolve, reject) { 51252 var moduleResult = executeDelegateModule(action, syntheticEvent, [ 51253 syntheticEvent 51254 ]); 51255 51256 if (!delayNextAction) { 51257 return resolve(); 51258 } 51259 51260 var promiseTimeoutMs = action.timeout; 51261 var timeoutPromise = new Promise(function (resolve, reject) { 51262 actionTimeoutId = setTimeout(function () { 51263 reject( 51264 new Error( 51265 'A timeout occurred because the action took longer than ' + 51266 promiseTimeoutMs / 1000 + 51267 ' seconds to complete. ' 51268 ) 51269 ); 51270 }, promiseTimeoutMs); 51271 }); 51272 51273 Promise.race([moduleResult, timeoutPromise]).then(resolve, reject); 51274 }) 51275 .catch(function (e) { 51276 clearTimeout(actionTimeoutId); 51277 e = normalizeRuleComponentError(e); 51278 logActionError(action, rule, e); 51279 return Promise.reject(e); 51280 }) 51281 .then(function () { 51282 clearTimeout(actionTimeoutId); 51283 }); 51284 }); 51285 }; 51286 }; 51287 return createAddActionToQueue; 51288 } 51289 51290 /* 51291 Copyright 2020 Adobe. All rights reserved. 51292 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51293 you may not use this file except in compliance with the License. You may obtain a copy 51294 of the License at http://www.apache.org/licenses/LICENSE-2.0 51295 51296 Unless required by applicable law or agreed to in writing, software distributed under 51297 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51298 OF ANY KIND, either express or implied. See the License for the specific language 51299 governing permissions and limitations under the License. 51300 */ 51301 51302 var createAddConditionToQueue; 51303 var hasRequiredCreateAddConditionToQueue; 51304 51305 function requireCreateAddConditionToQueue () { 51306 if (hasRequiredCreateAddConditionToQueue) return createAddConditionToQueue; 51307 hasRequiredCreateAddConditionToQueue = 1; 51308 var Promise = requireReactorPromise(); 51309 51310 createAddConditionToQueue = function ( 51311 executeDelegateModule, 51312 normalizeRuleComponentError, 51313 isConditionMet, 51314 logConditionError, 51315 logConditionNotMet 51316 ) { 51317 return function (condition, rule, syntheticEvent, lastPromiseInQueue) { 51318 return lastPromiseInQueue.then(function () { 51319 // This module is used when ruleComponentSequencing is enabled. 51320 // condition.timeout is always supplied to this module as >= 0. 51321 // Conditions always assume delayNext = true because we have to know the 51322 // condition result before moving on. 51323 var conditionTimeoutId; 51324 51325 return new Promise(function (resolve, reject) { 51326 var moduleResult = executeDelegateModule(condition, syntheticEvent, [ 51327 syntheticEvent 51328 ]); 51329 51330 var promiseTimeoutMs = condition.timeout; 51331 var timeoutPromise = new Promise(function (resolve, reject) { 51332 conditionTimeoutId = setTimeout(function () { 51333 reject( 51334 new Error( 51335 'A timeout occurred because the condition took longer than ' + 51336 promiseTimeoutMs / 1000 + 51337 ' seconds to complete. ' 51338 ) 51339 ); 51340 }, promiseTimeoutMs); 51341 }); 51342 51343 Promise.race([moduleResult, timeoutPromise]).then(resolve, reject); 51344 }) 51345 .catch(function (e) { 51346 clearTimeout(conditionTimeoutId); 51347 e = normalizeRuleComponentError(e); 51348 logConditionError(condition, rule, e); 51349 return Promise.reject(e); 51350 }) 51351 .then(function (result) { 51352 clearTimeout(conditionTimeoutId); 51353 if (!isConditionMet(condition, result)) { 51354 logConditionNotMet(condition, rule); 51355 return Promise.reject(); 51356 } 51357 }); 51358 }); 51359 }; 51360 }; 51361 return createAddConditionToQueue; 51362 } 51363 51364 /* 51365 Copyright 2020 Adobe. All rights reserved. 51366 This file is licensed to you under the Apache License, Version 2.0 (the "License");
51367 you may not use this file except in compliance with the License. You may obtain a copy 51368 of the License at http://www.apache.org/licenses/LICENSE-2.0 51369 51370 Unless required by applicable law or agreed to in writing, software distributed under 51371 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51372 OF ANY KIND, either express or implied. See the License for the specific language 51373 governing permissions and limitations under the License. 51374 */ 51375 51376 var createAddRuleToQueue; 51377 var hasRequiredCreateAddRuleToQueue; 51378 51379 function requireCreateAddRuleToQueue () { 51380 if (hasRequiredCreateAddRuleToQueue) return createAddRuleToQueue; 51381 hasRequiredCreateAddRuleToQueue = 1; 51382 var Promise = requireReactorPromise(); 51383 var lastPromiseInQueue = Promise.resolve(); 51384 51385 createAddRuleToQueue = function ( 51386 addConditionToQueue, 51387 addActionToQueue, 51388 logRuleCompleted 51389 ) { 51390 return function (rule, syntheticEvent) { 51391 if (rule.conditions) { 51392 rule.conditions.forEach(function (condition) { 51393 lastPromiseInQueue = addConditionToQueue( 51394 condition, 51395 rule, 51396 syntheticEvent, 51397 lastPromiseInQueue 51398 ); 51399 }); 51400 } 51401 51402 if (rule.actions) { 51403 rule.actions.forEach(function (action) { 51404 lastPromiseInQueue = addActionToQueue( 51405 action, 51406 rule, 51407 syntheticEvent, 51408 lastPromiseInQueue 51409 ); 51410 }); 51411 } 51412 51413 lastPromiseInQueue = lastPromiseInQueue.then(function () { 51414 logRuleCompleted(rule); 51415 }); 51416 51417 // Allows later rules to keep running when an error occurs within this rule. 51418 lastPromiseInQueue = lastPromiseInQueue.catch(function () {}); 51419 51420 return lastPromiseInQueue; 51421 }; 51422 }; 51423 return createAddRuleToQueue; 51424 } 51425 51426 var isPromiseLike; 51427 var hasRequiredIsPromiseLike; 51428 51429 function requireIsPromiseLike () { 51430 if (hasRequiredIsPromiseLike) return isPromiseLike; 51431 hasRequiredIsPromiseLike = 1; 51432 isPromiseLike = function (value) { 51433 return Boolean( 51434 value && typeof value === 'object' && typeof value.then === 'function' 51435 ); 51436 }; 51437 return isPromiseLike; 51438 } 51439 51440 /* 51441 Copyright 2020 Adobe. All rights reserved. 51442 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51443 you may not use this file except in compliance with the License. You may obtain a copy 51444 of the License at http://www.apache.org/licenses/LICENSE-2.0 51445 51446 Unless required by applicable law or agreed to in writing, software distributed under 51447 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51448 OF ANY KIND, either express or implied. See the License for the specific language 51449 governing permissions and limitations under the License. 51450 */ 51451 51452 var createEvaluateConditions; 51453 var hasRequiredCreateEvaluateConditions; 51454 51455 function requireCreateEvaluateConditions () { 51456 if (hasRequiredCreateEvaluateConditions) return createEvaluateConditions; 51457 hasRequiredCreateEvaluateConditions = 1; 51458 var isPromiseLike = requireIsPromiseLike(); 51459 51460 createEvaluateConditions = function ( 51461 executeDelegateModule, 51462 isConditionMet, 51463 logConditionNotMet, 51464 logConditionError 51465 ) { 51466 return function (rule, syntheticEvent) { 51467 var condition; 51468 51469 if (rule.conditions) { 51470 for (var i = 0; i < rule.conditions.length; i++) { 51471 condition = rule.conditions[i]; 51472 51473 try { 51474 var result = executeDelegateModule(condition, syntheticEvent, [ 51475 syntheticEvent 51476 ]); 51477 51478 // If the result is promise-like, the extension needs to do something asynchronously, 51479 // but the customer does not have rule component sequencing enabled on the property. 51480 // If we didn't do this, the condition would always pass because the promise is 51481 // considered "truthy". 51482 if (isPromiseLike(result)) { 51483 throw new Error( 51484 'Rule component sequencing must be enabled on the property ' + 51485 'for this condition to function properly.' 51486 ); 51487 } 51488 51489 if (!isConditionMet(condition, result)) { 51490 logConditionNotMet(condition, rule); 51491 return false;
51492 } 51493 } catch (e) { 51494 logConditionError(condition, rule, e); 51495 return false; 51496 } 51497 } 51498 } 51499 51500 return true; 51501 }; 51502 }; 51503 return createEvaluateConditions; 51504 } 51505 51506 /* 51507 Copyright 2020 Adobe. All rights reserved. 51508 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51509 you may not use this file except in compliance with the License. You may obtain a copy 51510 of the License at http://www.apache.org/licenses/LICENSE-2.0 51511 51512 Unless required by applicable law or agreed to in writing, software distributed under 51513 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51514 OF ANY KIND, either express or implied. See the License for the specific language 51515 governing permissions and limitations under the License. 51516 */ 51517 51518 var createExecuteRule; 51519 var hasRequiredCreateExecuteRule; 51520 51521 function requireCreateExecuteRule () { 51522 if (hasRequiredCreateExecuteRule) return createExecuteRule; 51523 hasRequiredCreateExecuteRule = 1; 51524 createExecuteRule = function (evaluateConditions, runActions) { 51525 return function (rule, normalizedSyntheticEvent) { 51526 if (evaluateConditions(rule, normalizedSyntheticEvent)) { 51527 runActions(rule, normalizedSyntheticEvent); 51528 } 51529 }; 51530 }; 51531 return createExecuteRule; 51532 } 51533 51534 /* 51535 Copyright 2020 Adobe. All rights reserved. 51536 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51537 you may not use this file except in compliance with the License. You may obtain a copy 51538 of the License at http://www.apache.org/licenses/LICENSE-2.0 51539 51540 Unless required by applicable law or agreed to in writing, software distributed under 51541 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51542 OF ANY KIND, either express or implied. See the License for the specific language 51543 governing permissions and limitations under the License. 51544 */ 51545 51546 var createGetModuleDisplayNameByRuleComponent; 51547 var hasRequiredCreateGetModuleDisplayNameByRuleComponent; 51548 51549 function requireCreateGetModuleDisplayNameByRuleComponent () { 51550 if (hasRequiredCreateGetModuleDisplayNameByRuleComponent) return createGetModuleDisplayNameByRuleComponent; 51551 hasRequiredCreateGetModuleDisplayNameByRuleComponent = 1; 51552 createGetModuleDisplayNameByRuleComponent = function (moduleProvider) { 51553 return function (ruleComponent) { 51554 var moduleDefinition = moduleProvider.getModuleDefinition( 51555 ruleComponent.modulePath 51556 ); 51557 return ( 51558 (moduleDefinition && moduleDefinition.displayName) || 51559 ruleComponent.modulePath 51560 ); 51561 }; 51562 }; 51563 return createGetModuleDisplayNameByRuleComponent; 51564 } 51565 51566 /* 51567 Copyright 2020 Adobe. All rights reserved. 51568 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51569 you may not use this file except in compliance with the License. You may obtain a copy 51570 of the License at http://www.apache.org/licenses/LICENSE-2.0 51571 51572 Unless required by applicable law or agreed to in writing, software distributed under 51573 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51574 OF ANY KIND, either express or implied. See the License for the specific language 51575 governing permissions and limitations under the License. 51576 */ 51577 51578 var createGetSyntheticEventMeta; 51579 var hasRequiredCreateGetSyntheticEventMeta; 51580 51581 function requireCreateGetSyntheticEventMeta () { 51582 if (hasRequiredCreateGetSyntheticEventMeta) return createGetSyntheticEventMeta; 51583 hasRequiredCreateGetSyntheticEventMeta = 1; 51584 createGetSyntheticEventMeta = function (moduleProvider) { 51585 return function (ruleEventPair) { 51586 var rule = ruleEventPair.rule; 51587 var event = ruleEventPair.event; 51588 51589 var moduleName = moduleProvider.getModuleDefinition(event.modulePath).name; 51590 var extensionName = moduleProvider.getModuleExtensionName(event.modulePath); 51591 51592 return { 51593 $type: extensionName + '.' + moduleName, 51594 $rule: { 51595 id: rule.id, 51596 name: rule.name 51597 } 51598 }; 51599 }; 51600 }; 51601 return createGetSyntheticEventMeta; 51602 } 51603 51604 /* 51605 Copyright 2020 Adobe. All rights reserved. 51606 This file is licensed to you under the Apache License, Version 2.0 (the "License");
51607 you may not use this file except in compliance with the License. You may obtain a copy 51608 of the License at http://www.apache.org/licenses/LICENSE-2.0 51609 51610 Unless required by applicable law or agreed to in writing, software distributed under 51611 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51612 OF ANY KIND, either express or implied. See the License for the specific language 51613 governing permissions and limitations under the License. 51614 */ 51615 51616 var createInitEventModule; 51617 var hasRequiredCreateInitEventModule; 51618 51619 function requireCreateInitEventModule () { 51620 if (hasRequiredCreateInitEventModule) return createInitEventModule; 51621 hasRequiredCreateInitEventModule = 1; 51622 createInitEventModule = function ( 51623 triggerRule, 51624 executeDelegateModule, 51625 normalizeSyntheticEvent, 51626 getErrorMessage, 51627 getSyntheticEventMeta, 51628 logger 51629 ) { 51630 return function (guardUntilAllInitialized, ruleEventPair) { 51631 var rule = ruleEventPair.rule; 51632 var event = ruleEventPair.event; 51633 event.settings = event.settings || {}; 51634 51635 try { 51636 var syntheticEventMeta = getSyntheticEventMeta(ruleEventPair); 51637 51638 executeDelegateModule(event, null, [ 51639 /** 51640 * This is the callback that executes a particular rule when an event has occurred. 51641 * @param {Object} [syntheticEvent] An object that contains detail regarding the event 51642 * that occurred. 51643 */ 51644 function trigger(syntheticEvent) { 51645 // DTM-11871 51646 // If we're still in the process of initializing event modules, 51647 // we need to queue up any calls to trigger, otherwise if the triggered 51648 // rule does something that triggers a different rule whose event module 51649 // has not been initialized, that secondary rule will never get executed. 51650 // This can be removed if we decide to always use the rule queue, since 51651 // conditions and actions will be processed asynchronously, which 51652 // would give time for all event modules to be initialized. 51653 51654 var normalizedSyntheticEvent = normalizeSyntheticEvent( 51655 syntheticEventMeta, 51656 syntheticEvent 51657 ); 51658 51659 guardUntilAllInitialized(function () { 51660 triggerRule(normalizedSyntheticEvent, rule); 51661 }); 51662 } 51663 ]); 51664 } catch (e) { 51665 logger.error(getErrorMessage(event, rule, e)); 51666 } 51667 }; 51668 }; 51669 return createInitEventModule; 51670 } 51671 51672 /* 51673 Copyright 2020 Adobe. All rights reserved. 51674 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51675 you may not use this file except in compliance with the License. You may obtain a copy 51676 of the License at http://www.apache.org/licenses/LICENSE-2.0 51677 51678 Unless required by applicable law or agreed to in writing, software distributed under 51679 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51680 OF ANY KIND, either express or implied. See the License for the specific language 51681 governing permissions and limitations under the License. 51682 */ 51683 51684 var createLogActionError; 51685 var hasRequiredCreateLogActionError; 51686 51687 function requireCreateLogActionError () { 51688 if (hasRequiredCreateLogActionError) return createLogActionError; 51689 hasRequiredCreateLogActionError = 1; 51690 createLogActionError = function ( 51691 getRuleComponentErrorMessage, 51692 getModuleDisplayNameByRuleComponent, 51693 logger, 51694 notifyMonitors 51695 ) { 51696 return function (action, rule, e) { 51697 var actionDisplayName = getModuleDisplayNameByRuleComponent(action); 51698 51699 logger.error(getRuleComponentErrorMessage(actionDisplayName, rule.name, e)); 51700 51701 notifyMonitors('ruleActionFailed', { 51702 rule: rule, 51703 action: action 51704 }); 51705 }; 51706 }; 51707 return createLogActionError; 51708 } 51709 51710 /* 51711 Copyright 2020 Adobe. All rights reserved. 51712 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51713 you may not use this file except in compliance with the License. You may obtain a copy 51714 of the License at http://www.apache.org/licenses/LICENSE-2.0 51715 51716 Unless required by applicable law or agreed to in writing, softw
51716are distributed under 51717 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51718 OF ANY KIND, either express or implied. See the License for the specific language 51719 governing permissions and limitations under the License. 51720 */ 51721 51722 var createLogConditionError; 51723 var hasRequiredCreateLogConditionError; 51724 51725 function requireCreateLogConditionError () { 51726 if (hasRequiredCreateLogConditionError) return createLogConditionError; 51727 hasRequiredCreateLogConditionError = 1; 51728 createLogConditionError = function ( 51729 getRuleComponentErrorMessage, 51730 getModuleDisplayNameByRuleComponent, 51731 logger, 51732 notifyMonitors 51733 ) { 51734 return function (condition, rule, e) { 51735 var conditionDisplayName = getModuleDisplayNameByRuleComponent(condition); 51736 51737 logger.error( 51738 getRuleComponentErrorMessage(conditionDisplayName, rule.name, e) 51739 ); 51740 51741 notifyMonitors('ruleConditionFailed', { 51742 rule: rule, 51743 condition: condition 51744 }); 51745 }; 51746 }; 51747 return createLogConditionError; 51748 } 51749 51750 /* 51751 Copyright 2020 Adobe. All rights reserved. 51752 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51753 you may not use this file except in compliance with the License. You may obtain a copy 51754 of the License at http://www.apache.org/licenses/LICENSE-2.0 51755 51756 Unless required by applicable law or agreed to in writing, software distributed under 51757 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51758 OF ANY KIND, either express or implied. See the License for the specific language 51759 governing permissions and limitations under the License. 51760 */ 51761 51762 var createLogConditionNotMet; 51763 var hasRequiredCreateLogConditionNotMet; 51764 51765 function requireCreateLogConditionNotMet () { 51766 if (hasRequiredCreateLogConditionNotMet) return createLogConditionNotMet; 51767 hasRequiredCreateLogConditionNotMet = 1; 51768 createLogConditionNotMet = function ( 51769 getModuleDisplayNameByRuleComponent, 51770 logger, 51771 notifyMonitors 51772 ) { 51773 return function (condition, rule) { 51774 var conditionDisplayName = getModuleDisplayNameByRuleComponent(condition); 51775 51776 logger.log( 51777 'Condition "' + 51778 conditionDisplayName + 51779 '" for rule "' + 51780 rule.name + 51781 '" was not met.' 51782 ); 51783 51784 notifyMonitors('ruleConditionFailed', { 51785 rule: rule, 51786 condition: condition 51787 }); 51788 }; 51789 }; 51790 return createLogConditionNotMet; 51791 } 51792 51793 /* 51794 Copyright 2020 Adobe. All rights reserved. 51795 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51796 you may not use this file except in compliance with the License. You may obtain a copy 51797 of the License at http://www.apache.org/licenses/LICENSE-2.0 51798 51799 Unless required by applicable law or agreed to in writing, software distributed under 51800 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51801 OF ANY KIND, either express or implied. See the License for the specific language 51802 governing permissions and limitations under the License. 51803 */ 51804 51805 var createLogRuleCompleted; 51806 var hasRequiredCreateLogRuleCompleted; 51807 51808 function requireCreateLogRuleCompleted () { 51809 if (hasRequiredCreateLogRuleCompleted) return createLogRuleCompleted; 51810 hasRequiredCreateLogRuleCompleted = 1; 51811 createLogRuleCompleted = function (logger, notifyMonitors) { 51812 return function (rule) { 51813 logger.log('Rule "' + rule.name + '" fired.'); 51814 notifyMonitors('ruleCompleted', { 51815 rule: rule 51816 }); 51817 }; 51818 }; 51819 return createLogRuleCompleted; 51820 } 51821 51822 /* 51823 Copyright 2020 Adobe. All rights reserved. 51824 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51825 you may not use this file except in compliance with the License. You may obtain a copy 51826 of the License at http://www.apache.org/licenses/LICENSE-2.0 51827 51828 Unless required by applicable law or agreed to in writing, software distributed under 51829 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51830 OF ANY KIND, either express or implied. See the License for the specific language 51831 governing permissions and limitations under the License. 51832 */ 51833
51834 var createRunActions; 51835 var hasRequiredCreateRunActions; 51836 51837 function requireCreateRunActions () { 51838 if (hasRequiredCreateRunActions) return createRunActions; 51839 hasRequiredCreateRunActions = 1; 51840 createRunActions = function ( 51841 executeDelegateModule, 51842 logActionError, 51843 logRuleCompleted 51844 ) { 51845 return function (rule, syntheticEvent) { 51846 var action; 51847 51848 if (rule.actions) { 51849 for (var i = 0; i < rule.actions.length; i++) { 51850 action = rule.actions[i]; 51851 try { 51852 executeDelegateModule(action, syntheticEvent, [syntheticEvent]); 51853 } catch (e) { 51854 logActionError(action, rule, e); 51855 return; 51856 } 51857 } 51858 } 51859 51860 logRuleCompleted(rule); 51861 }; 51862 }; 51863 return createRunActions; 51864 } 51865 51866 /* 51867 Copyright 2020 Adobe. All rights reserved. 51868 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51869 you may not use this file except in compliance with the License. You may obtain a copy 51870 of the License at http://www.apache.org/licenses/LICENSE-2.0 51871 51872 Unless required by applicable law or agreed to in writing, software distributed under 51873 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51874 OF ANY KIND, either express or implied. See the License for the specific language 51875 governing permissions and limitations under the License. 51876 */ 51877 51878 var createTriggerRule; 51879 var hasRequiredCreateTriggerRule; 51880 51881 function requireCreateTriggerRule () { 51882 if (hasRequiredCreateTriggerRule) return createTriggerRule; 51883 hasRequiredCreateTriggerRule = 1; 51884 createTriggerRule = function ( 51885 ruleComponentSequencingEnabled, 51886 executeRule, 51887 addRuleToQueue, 51888 notifyMonitors 51889 ) { 51890 return function (normalizedSyntheticEvent, rule) { 51891 notifyMonitors('ruleTriggered', { 51892 rule: rule 51893 }); 51894 51895 if (ruleComponentSequencingEnabled) { 51896 addRuleToQueue(rule, normalizedSyntheticEvent); 51897 } else { 51898 executeRule(rule, normalizedSyntheticEvent); 51899 } 51900 }; 51901 }; 51902 return createTriggerRule; 51903 } 51904 51905 /* 51906 Copyright 2020 Adobe. All rights reserved. 51907 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51908 you may not use this file except in compliance with the License. You may obtain a copy 51909 of the License at http://www.apache.org/licenses/LICENSE-2.0 51910 51911 Unless required by applicable law or agreed to in writing, software distributed under 51912 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51913 OF ANY KIND, either express or implied. See the License for the specific language 51914 governing permissions and limitations under the License. 51915 */ 51916 51917 var getRuleComponentErrorMessage; 51918 var hasRequiredGetRuleComponentErrorMessage; 51919 51920 function requireGetRuleComponentErrorMessage () { 51921 if (hasRequiredGetRuleComponentErrorMessage) return getRuleComponentErrorMessage; 51922 hasRequiredGetRuleComponentErrorMessage = 1; 51923 getRuleComponentErrorMessage = function (ruleComponentName, ruleName, error) { 51924 return ( 51925 'Failed to execute "' + 51926 ruleComponentName + 51927 '" for "' + 51928 ruleName + 51929 '" rule. ' + 51930 error.message + 51931 (error.stack ? '\n' + error.stack : '') 51932 ); 51933 }; 51934 return getRuleComponentErrorMessage; 51935 } 51936 51937 /* 51938 Copyright 2020 Adobe. All rights reserved. 51939 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 51940 you may not use this file except in compliance with the License. You may obtain a copy 51941 of the License at http://www.apache.org/licenses/LICENSE-2.0 51942 51943 Unless required by applicable law or agreed to in writing, software distributed under 51944 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51945 OF ANY KIND, either express or implied. See the License for the specific language 51946 governing permissions and limitations under the License. 51947 */ 51948 51949 var isConditionMet; 51950 var hasRequiredIsConditionMet; 51951 51952 function requireIsConditionMet () { 51953 if (hasRequiredIsConditionMet) return isConditionMet; 51954 hasRequiredIsConditionMet = 1; 51955 isConditionMet = function (condition, result) { 51956 return (result && !condition.negate) || (!result && condition.negate); 51957 }; 51958 return isConditionMet; 51959 } 51960 51961 /* 51962 Copyright 2020 Adobe. All rights reserved. 51963 This file is licensed to you under the Apache License, Version 2.0 (the "License");
51964 you may not use this file except in compliance with the License. You may obtain a copy 51965 of the License at http://www.apache.org/licenses/LICENSE-2.0 51966 51967 Unless required by applicable law or agreed to in writing, software distributed under 51968 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 51969 OF ANY KIND, either express or implied. See the License for the specific language 51970 governing permissions and limitations under the License. 51971 */ 51972 51973 var initRules; 51974 var hasRequiredInitRules; 51975 51976 function requireInitRules () { 51977 if (hasRequiredInitRules) return initRules; 51978 hasRequiredInitRules = 1; 51979 var triggerCallQueue = []; 51980 var eventModulesInitialized = false; 51981 51982 var guardUntilAllInitialized = function (callback) { 51983 if (!eventModulesInitialized) { 51984 triggerCallQueue.push(callback); 51985 } else { 51986 callback(); 51987 } 51988 }; 51989 51990 initRules = function (buildRuleExecutionOrder, rules, initEventModule) { 51991 buildRuleExecutionOrder(rules).forEach(function (ruleEventPair) { 51992 initEventModule(guardUntilAllInitialized, ruleEventPair); 51993 }); 51994 51995 eventModulesInitialized = true; 51996 triggerCallQueue.forEach(function (triggerCall) { 51997 triggerCall(); 51998 }); 51999 52000 triggerCallQueue = []; 52001 }; 52002 return initRules; 52003 } 52004 52005 /* 52006 Copyright 2020 Adobe. All rights reserved. 52007 This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52008 you may not use this file except in compliance with the License. You may obtain a copy 52009 of the License at http://www.apache.org/licenses/LICENSE-2.0 52010 52011 Unless required by applicable law or agreed to in writing, software distributed under 52012 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52013 OF ANY KIND, either express or implied. See the License for the specific language 52014 governing permissions and limitations under the License. 52015 */ 52016 52017 var normalizeRuleComponentError; 52018 var hasRequiredNormalizeRuleComponentError; 52019 52020 function requireNormalizeRuleComponentError () { 52021 if (hasRequiredNormalizeRuleComponentError) return normalizeRuleComponentError; 52022 hasRequiredNormalizeRuleComponentError = 1; 52023 normalizeRuleComponentError = function (e) { 52024 if (!e) { 52025 e = new Error( 52026 'The extension triggered an error, but no error information was provided.' 52027 ); 52028 } 52029 52030 if (!(e instanceof Error)) { 52031 var stringifiedError = 52032 typeof e === 'object' ? JSON.stringify(e) : String(e); 52033 e = new Error(stringifiedError); 52034 } 52035 52036 return e; 52037 }; 52038 return normalizeRuleComponentError; 52039 } 52040 52041 var isPlainObject = {}; 52042 52043 var hasRequiredIsPlainObject; 52044 52045 function requireIsPlainObject () { 52046 if (hasRequiredIsPlainObject) return isPlainObject; 52047 hasRequiredIsPlainObject = 1; 52048 52049 Object.defineProperty(isPlainObject, '__esModule', { value: true }); 52050 52051 /*! 52052 * is-plain-object <https://github.com/jonschlinkert/is-plain-object> 52053 * 52054 * Copyright (c) 2014-2017, Jon Schlinkert. 52055 * Released under the MIT License. 52056 */ 52057 52058 function isObject(o) { 52059 return Object.prototype.toString.call(o) === '[object Object]'; 52060 } 52061 52062 function isPlainObject$1(o) { 52063 var ctor,prot; 52064 52065 if (isObject(o) === false) return false; 52066 52067 // If has modified constructor 52068 ctor = o.constructor; 52069 if (ctor === undefined) return true; 52070 52071 // If has modified prototype 52072 prot = ctor.prototype; 52073 if (isObject(prot) === false) return false; 52074 52075 // If constructor does not have an Object-specific method 52076 if (prot.hasOwnProperty('isPrototypeOf') === false) { 52077 return false; 52078 } 52079 52080 // Most likely a plain Object 52081 return true; 52082 } 52083 52084 isPlainObject.isPlainObject = isPlainObject$1; 52085 return isPlainObject; 52086 } 52087 52088 /*************************************************************************************** 52089 * (c) 2017 Adobe. All rights reserved. 52090 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52091 * you may not use this file except in compliance with the License. You may obtain a copy 52092 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52093 * 52094 * Unless required by applicable law or agreed to in writing, software distributed under 52095 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52096 * OF ANY KIND, either express or implied. See the License for the specific language 52097 * governing permissions and limitations under the License. 52098 ****************************************************************************************/ 52099 52100 var normalizeSyntheticEvent; 52101 var hasRequiredNormalizeSyntheticEvent; 52102 52103 function requireNormalizeSyntheticEvent () { 52104 if (hasRequiredNormalizeSyntheticEvent) return normalizeSyntheticEvent; 52105 hasRequiredNormalizeSyntheticEvent = 1;
52106 var validateInjectedParams = requireValidateInjectedParams(); 52107 52108 function injectNormalizeSyntheticEvent({ 52109 objectAssign, 52110 isPlainObject, 52111 logger 52112 }) { 52113 return function normalizeSyntheticEvent(syntheticEventMeta, syntheticEvent) { 52114 syntheticEvent = syntheticEvent || {}; 52115 if (isPlainObject(syntheticEvent)) { 52116 syntheticEvent = objectAssign({}, syntheticEvent, syntheticEventMeta); 52117 } else { 52118 objectAssign(syntheticEvent, syntheticEventMeta); 52119 } 52120 if (!syntheticEvent.hasOwnProperty('type')) { 52121 Object.defineProperty(syntheticEvent, 'type', { 52122 get: function () { 52123 logger.deprecation( 52124 'Accessing event.type in Adobe Launch has been deprecated and will be ' + 52125 'removed soon. Please use event.$type instead.' 52126 ); 52127 return syntheticEvent.$type; 52128 } 52129 }); 52130 } 52131 return syntheticEvent; 52132 }; 52133 } 52134 52135 const validateInjection = validateInjectedParams(injectNormalizeSyntheticEvent); 52136 52137 normalizeSyntheticEvent = validateInjection({ 52138 objectAssign: requireReactorObjectAssign(), 52139 isPlainObject: requireIsPlainObject().isPlainObject, 52140 logger: requireLogger() 52141 }); 52142 return normalizeSyntheticEvent; 52143 } 52144 52145 /*************************************************************************************** 52146 * (c) 2017 Adobe. All rights reserved. 52147 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52148 * you may not use this file except in compliance with the License. You may obtain a copy 52149 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52150 * 52151 * Unless required by applicable law or agreed to in writing, software distributed under 52152 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52153 * OF ANY KIND, either express or implied. See the License for the specific language 52154 * governing permissions and limitations under the License. 52155 ****************************************************************************************/ 52156 52157 var createGetSharedModuleExports; 52158 var hasRequiredCreateGetSharedModuleExports; 52159 52160 function requireCreateGetSharedModuleExports () { 52161 if (hasRequiredCreateGetSharedModuleExports) return createGetSharedModuleExports; 52162 hasRequiredCreateGetSharedModuleExports = 1; 52163 var validateInjectedParams = requireValidateInjectedParams(); 52164 52165 function injectCreateGetSharedModuleExports({ logger }) { 52166 /** 52167 * Creates a function that, when called with an extension name and module name, will return the 52168 * exports of the respective shared module. 52169 * 52170 * @param {Object} extensions 52171 * @param {Object} moduleProvider 52172 * @returns {Function} 52173 */ 52174 return function createGetSharedModuleExports(extensions, moduleProvider) { 52175 return function getSharedModuleExports(extensionName, moduleName) { 52176 var extension = extensions[extensionName]; 52177 52178 if (extension) { 52179 var modules = extension.modules; 52180 if (modules) { 52181 var referencePaths = Object.keys(modules); 52182 for (var i = 0; i < referencePaths.length; i++) { 52183 var referencePath = referencePaths[i]; 52184 var module = modules[referencePath]; 52185 if (module.shared && module.name === moduleName) { 52186 return moduleProvider.getModuleExports(referencePath); 52187 } 52188 } 52189 logger.error( 52190 `The module "${moduleName}" does not exist in the shared modules of the "${extensionName}" extension` 52191 ); 52192 } 52193 } else { 52194 logger.error( 52195 `The extension "${extensionName}" is not bundled with the library."` 52196 ); 52197 } 52198 }; 52199 }; 52200 } 52201 52202 const validateInjection = validateInjectedParams( 52203 injectCreateGetSharedModuleExports 52204 ); 52205 52206 createGetSharedModuleExports = validateInjection({ 52207 logger: requireLogger() 52208 }); 52209 return createGetSharedModuleExports; 52210 } 52211 52212 /*************************************************************************************** 52213 * (c) 2017 Adobe. All rights reserved. 52214 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
52215 * you may not use this file except in compliance with the License. You may obtain a copy 52216 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52217 * 52218 * Unless required by applicable law or agreed to in writing, software distributed under 52219 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52220 * OF ANY KIND, either express or implied. See the License for the specific language 52221 * governing permissions and limitations under the License. 52222 ****************************************************************************************/ 52223 52224 var createGetExtensionSettings; 52225 var hasRequiredCreateGetExtensionSettings; 52226 52227 function requireCreateGetExtensionSettings () { 52228 if (hasRequiredCreateGetExtensionSettings) return createGetExtensionSettings; 52229 hasRequiredCreateGetExtensionSettings = 1; 52230 /** 52231 * Creates a function that, when called, will return a configuration object with data element 52232 * tokens replaced. 52233 * 52234 * @param {Object} settings 52235 * @returns {Function} 52236 */ 52237 createGetExtensionSettings = function (replaceTokens, settings) { 52238 return function () { 52239 return settings ? replaceTokens(settings) : {}; 52240 }; 52241 }; 52242 return createGetExtensionSettings; 52243 } 52244 52245 /*************************************************************************************** 52246 * (c) 2017 Adobe. All rights reserved. 52247 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52248 * you may not use this file except in compliance with the License. You may obtain a copy 52249 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52250 * 52251 * Unless required by applicable law or agreed to in writing, software distributed under 52252 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52253 * OF ANY KIND, either express or implied. See the License for the specific language 52254 * governing permissions and limitations under the License. 52255 ****************************************************************************************/ 52256 52257 var createGetHostedLibFileUrl; 52258 var hasRequiredCreateGetHostedLibFileUrl; 52259 52260 function requireCreateGetHostedLibFileUrl () { 52261 if (hasRequiredCreateGetHostedLibFileUrl) return createGetHostedLibFileUrl; 52262 hasRequiredCreateGetHostedLibFileUrl = 1; 52263 /** 52264 * Creates a function that, when called, will return the full hosted lib file URL. 52265 * 52266 * @param {string} hostedLibFilesBaseUrl 52267 * @returns {Function} 52268 */ 52269 52270 createGetHostedLibFileUrl = function ( 52271 decorateWithDynamicHost, 52272 hostedLibFilesBaseUrl, 52273 minified 52274 ) { 52275 return function (file) { 52276 if (minified) { 52277 var fileParts = file.split('.'); 52278 fileParts.splice(fileParts.length - 1 || 1, 0, 'min'); 52279 file = fileParts.join('.'); 52280 } 52281 52282 return decorateWithDynamicHost(hostedLibFilesBaseUrl) + file; 52283 }; 52284 }; 52285 return createGetHostedLibFileUrl; 52286 } 52287 52288 /*************************************************************************************** 52289 * (c) 2017 Adobe. All rights reserved. 52290 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52291 * you may not use this file except in compliance with the License. You may obtain a copy 52292 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52293 * 52294 * Unless required by applicable law or agreed to in writing, software distributed under 52295 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52296 * OF ANY KIND, either express or implied. See the License for the specific language 52297 * governing permissions and limitations under the License. 52298 ****************************************************************************************/ 52299 52300 var resolveRelativePath; 52301 var hasRequiredResolveRelativePath; 52302 52303 function requireResolveRelativePath () { 52304 if (hasRequiredResolveRelativePath) return resolveRelativePath; 52305 hasRequiredResolveRelativePath = 1; 52306 var JS_EXTENSION = '.js'; 52307 52308 /** 52309 * @private 52310 * Returns the directory of a path. A limited version of path.dirname in nodejs. 52311 * 52312 * To keep it simple, it makes the following assumptions: 52313 * path has a least one slash 52314 * path does not end with a slash 52315 * path does not have empty segments (e.g., /src/lib//foo.bar) 52316 * 52317 * @param {string} path 52318 * @returns {string} 52319 */ 52320 var dirname = function (path) { 52321 return path.substr(0, path.lastIndexOf('/')); 52322 }; 52323 52324 /** 52325 * Determines if a string ends with a certain string. 52326 * @param {string} str The string to test. 52327 * @param {string} suffix The suffix to look for at the end of str. 52328 * @returns {boolean} Whether str ends in suffix. 52329 */
52330 var endsWith = function (str, suffix) { 52331 return str.indexOf(suffix, str.length - suffix.length) !== -1; 52332 }; 52333 52334 /** 52335 * Given a starting path and a path relative to the starting path, returns the final path. A 52336 * limited version of path.resolve in nodejs. 52337 * 52338 * To keep it simple, it makes the following assumptions: 52339 * fromPath has at least one slash 52340 * fromPath does not end with a slash. 52341 * fromPath does not have empty segments (e.g., /src/lib//foo.bar) 52342 * relativePath starts with ./ or ../ 52343 * 52344 * @param {string} fromPath 52345 * @param {string} relativePath 52346 * @returns {string} 52347 */ 52348 resolveRelativePath = function (fromPath, relativePath) { 52349 // Handle the case where the relative path does not end in the .js extension. We auto-append it. 52350 if (!endsWith(relativePath, JS_EXTENSION)) { 52351 relativePath = relativePath + JS_EXTENSION; 52352 } 52353 52354 var relativePathSegments = relativePath.split('/'); 52355 var resolvedPathSegments = dirname(fromPath).split('/'); 52356 52357 relativePathSegments.forEach(function (relativePathSegment) { 52358 if (!relativePathSegment || relativePathSegment === '.') { 52359 return; 52360 } else if (relativePathSegment === '..') { 52361 if (resolvedPathSegments.length) { 52362 resolvedPathSegments.pop(); 52363 } 52364 } else { 52365 resolvedPathSegments.push(relativePathSegment); 52366 } 52367 }); 52368 52369 return resolvedPathSegments.join('/'); 52370 }; 52371 return resolveRelativePath; 52372 } 52373 52374 var js_cookie$1 = {exports: {}}; 52375 52376 /*! js-cookie v3.0.8 | MIT */ 52377 var js_cookie = js_cookie$1.exports; 52378 52379 var hasRequiredJs_cookie; 52380 52381 function requireJs_cookie () { 52382 if (hasRequiredJs_cookie) return js_cookie$1.exports; 52383 hasRequiredJs_cookie = 1; 52384 (function (module, exports) { 52385 (function (global, factory) { 52386 module.exports = factory() ; 52387 })(js_cookie, (function () { 52388 function assign (target) { 52389 for (var i = 1; i < arguments.length; i++) { 52390 var source = arguments[i]; 52391 for (var key in source) { 52392 if (key === '__proto__') continue 52393 target[key] = source[key]; 52394 } 52395 } 52396 return target 52397 } 52398 52399 var defaultConverter = { 52400 read: function (value) { 52401 if (value[0] === '"') { 52402 value = value.slice(1, -1); 52403 } 52404 return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent) 52405 }, 52406 write: function (value) { 52407 return encodeURIComponent(value).replace( 52408 /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, 52409 decodeURIComponent 52410 ) 52411 } 52412 }; 52413 52414 function init(converter, defaultAttributes) { 52415 function set(name, value, attributes) { 52416 if (typeof document === 'undefined') { 52417 return 52418 } 52419 52420 attributes = assign({}, defaultAttributes, attributes); 52421 52422 if (typeof attributes.expires === 'number') { 52423 attributes.expires = new Date(Date.now() + attributes.expires * 864e5); 52424 } 52425 if (attributes.expires) { 52426 attributes.expires = attributes.expires.toUTCString(); 52427 } 52428 52429 name = encodeURIComponent(name) 52430 .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent) 52431 .replace(/[()]/g, escape); 52432 52433 var stringifiedAttributes = ''; 52434 for (var attributeName in attributes) { 52435 if (!attributes[attributeName]) { 52436 continue 52437 } 52438 52439 stringifiedAttributes += '; ' + attributeName; 52440 52441 if (attributes[attributeName] === true) { 52442 continue 52443 } 52444 52445 // Considers RFC 6265 section 5.2: 52446 // ... 52447 // 3. If the remaining unparsed-attributes contains a %x3B (";") 52448 // character: 52449 // Consume the characters of the unparsed-attributes up to, 52450 // not including, the first %x3B (";") character. 52451 // ... 52452 stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 52453 } 52454 52455 return (document.cookie = 52456 name + '=' + converter.write(value, name) + stringifiedAttributes) 52457 } 52458 52459 function get(name) { 52460 if (typeof document === 'undefined' || (arguments.length && !name)) { 52461 return 52462 } 52463 52464 // To prevent the for loop in the first place assign an empty array 52465 // in case there are no cookies at all. 52466 var cookies = document.cookie ? document.cookie.split('; ') : []; 52467 var jar = {}; 52468 for (var i = 0; i < cookies.length; i++) { 52469 var parts = cookies[i].split('='); 52470 var value = parts.slice(1).join('='); 52471 52472 try { 52473 var found = decodeURIComponent(parts[0]); 52474 if (!(found in jar)) jar[found] = converter.read(value, found);
52475 if (name === found) { 52476 break 52477 } 52478 } catch (_e) { 52479 // Do nothing... 52480 } 52481 } 52482 52483 return name ? jar[name] : jar 52484 } 52485 52486 return Object.create( 52487 { 52488 set: set, 52489 get: get, 52490 remove: function (name, attributes) { 52491 set( 52492 name, 52493 '', 52494 assign({}, attributes, { 52495 expires: -1 52496 }) 52497 ); 52498 }, 52499 withAttributes: function (attributes) { 52500 return init(this.converter, assign({}, this.attributes, attributes)) 52501 }, 52502 withConverter: function (converter) { 52503 return init(assign({}, this.converter, converter), this.attributes) 52504 } 52505 }, 52506 { 52507 attributes: { value: Object.freeze(defaultAttributes) }, 52508 converter: { value: Object.freeze(converter) } 52509 } 52510 ) 52511 } 52512 52513 var api = init(defaultConverter, { path: '/' }); 52514 52515 return api; 52516 52517 })); 52518 } (js_cookie$1)); 52519 return js_cookie$1.exports; 52520 } 52521 52522 /*************************************************************************************** 52523 * (c) 2017 Adobe. All rights reserved. 52524 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52525 * you may not use this file except in compliance with the License. You may obtain a copy 52526 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52527 * 52528 * Unless required by applicable law or agreed to in writing, software distributed under 52529 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52530 * OF ANY KIND, either express or implied. See the License for the specific language 52531 * governing permissions and limitations under the License. 52532 ****************************************************************************************/ 52533 52534 var reactorCookie; 52535 var hasRequiredReactorCookie; 52536 52537 function requireReactorCookie () { 52538 if (hasRequiredReactorCookie) return reactorCookie; 52539 hasRequiredReactorCookie = 1; 52540 52541 var cookie = requireJs_cookie(); 52542 52543 // js-cookie has other methods that we haven't exposed here. By limiting the exposed API, 52544 // we have a little more flexibility to change the underlying implementation later. If clear 52545 // use cases come up for needing the other methods js-cookie exposes, we can re-evaluate whether 52546 // we want to expose them here. 52547 52548 // js-cookie 3.x removed auto-stringification of objects/arrays from set(). This logic is 52549 // preserved from the 2.x source to maintain backward compatibility for extensions that pass 52550 // objects or arrays to cookie.set() without manually stringifying. 52551 // https://github.com/js-cookie/js-cookie/blob/v2.2.1/src/js.cookie.js 52552 function set(name, value, attributes) { 52553 try { 52554 var result = JSON.stringify(value); 52555 if (/^[{[]/.test(result)) { 52556 value = result; 52557 } 52558 } catch (e) { 52559 console.error('error when testing string for setting cookie', e); 52560 } 52561 return cookie.set(name, value, attributes); 52562 } 52563 52564 reactorCookie = { 52565 get: cookie.get, 52566 set: set, 52567 remove: cookie.remove 52568 }; 52569 return reactorCookie; 52570 } 52571 52572 /*************************************************************************************** 52573 * (c) 2017 Adobe. All rights reserved. 52574 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52575 * you may not use this file except in compliance with the License. You may obtain a copy 52576 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52577 * 52578 * Unless required by applicable law or agreed to in writing, software distributed under 52579 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52580 * OF ANY KIND, either express or implied. See the License for the specific language 52581 * governing permissions and limitations under the License. 52582 ****************************************************************************************/ 52583 52584 var reactorLoadScript; 52585 var hasRequiredReactorLoadScript; 52586 52587 function requireReactorLoadScript () { 52588 if (hasRequiredReactorLoadScript) return reactorLoadScript; 52589 hasRequiredReactorLoadScript = 1; 52590 52591 var Promise = requireReactorPromise(); 52592 52593 var getPromise = function(url, script) { 52594 return new Promise(function(resolve, reject) { 52595 script.onload = function() { 52596 resolve(script); 52597 }; 52598 52599 script.onerror = function() { 52600 reject(new Error('Failed to load script ' + url)); 52601 }; 52602 }); 52603 }; 52604 52605 reactorLoadScript = function(url) { 52606 var script = document.createElement('script'); 52607 script.src = url; 52608 script.async = true; 52609 52610 var promise = getPromise(url, script); 52611 52612 document.getElementsByTagName('head')[0].appendChild(script); 52613 return promise; 52614 }; 52615 return reactorLoadScript; 52616 } 52617 52618 /*************************************************************************************** 52619 * (c) 2017 Adobe. All rights reserved. 52620 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
52621 * you may not use this file except in compliance with the License. You may obtain a copy 52622 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52623 * 52624 * Unless required by applicable law or agreed to in writing, software distributed under 52625 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52626 * OF ANY KIND, either express or implied. See the License for the specific language 52627 * governing permissions and limitations under the License. 52628 ****************************************************************************************/ 52629 52630 var reactorQueryString; 52631 var hasRequiredReactorQueryString; 52632 52633 function requireReactorQueryString () { 52634 if (hasRequiredReactorQueryString) return reactorQueryString; 52635 hasRequiredReactorQueryString = 1; 52636 52637 /** 52638 * Parse a query string into an object. Leading `?` or `#` are ignored, so you 52639 * can pass `location.search` or `location.hash` directly. 52640 * 52641 * URL components are decoded with decode-uri-component. 52642 * 52643 * Parse arrays with elements using duplicate keys, e.g. ?a=1&a=2 becomes 52644 * {a: ['1', '2']}. 52645 * 52646 * Query keys are sorted alphabetically. 52647 * 52648 * Numbers and booleans are NOT parsed; they are left as strings. 52649 * @param {string} query the query part of a url 52650 * @returns {{ [key: string]: string | string[] | undefined }} the parsed query string 52651 */ 52652 var parseQueryString = function (query) { 52653 /** @type {{[key: string]: string | string[] | undefined }} */ 52654 var result = {}; 52655 52656 if (!query || typeof query !== 'string') { 52657 return result; 52658 } 52659 52660 var cleanQuery = query.trim().replace(/^[?#&]/, ''); 52661 var params = new URLSearchParams(cleanQuery); 52662 52663 var iter = params.keys(); 52664 do { 52665 var v = iter.next(); 52666 var key = v.value; 52667 52668 if (key) { 52669 var values = params.getAll(key); 52670 if (values.length === 1) { 52671 result[key] = values[0]; 52672 } else { 52673 result[key] = values; 52674 } 52675 } 52676 } while (v.done === false); 52677 52678 return result; 52679 }; 52680 52681 /** 52682 * Transform an object into a query string. 52683 * 52684 * Keys having object values are ignored. 52685 * 52686 * @param {object} the object to transform into a query string 52687 * @returns {string} the parsed query string 52688 */ 52689 52690 var stringifyObject = function (object) { 52691 var spaceToken = '{{space}}'; 52692 var params = new URLSearchParams(); 52693 52694 Object.keys(object).forEach(function (key) { 52695 var value = object[key]; 52696 52697 if (typeof object[key] === 'string') { 52698 value = value.replace(/ /g, spaceToken); 52699 } else if ( 52700 ['object', 'undefined'].includes(typeof value) && 52701 !Array.isArray(value) 52702 ) { 52703 value = ''; 52704 } 52705 52706 if (Array.isArray(value)) { 52707 value.forEach(function (arrayValue) { 52708 params.append(key, arrayValue); 52709 }); 52710 } else { 52711 params.append(key, value); 52712 } 52713 }); 52714 52715 return params 52716 .toString() 52717 .replace(new RegExp(encodeURIComponent(spaceToken), 'g'), '%20'); 52718 }; 52719 52720 // We proxy the underlying querystring module so we can limit the API we expose. 52721 // This allows us to more easily make changes to the underlying implementation later without 52722 // having to worry about breaking extensions. If extensions demand additional functionality, we 52723 // can make adjustments as needed. 52724 reactorQueryString = { 52725 parse: function (string) { 52726 return parseQueryString(string); 52727 }, 52728 stringify: function (object) { 52729 return stringifyObject(object); 52730 } 52731 }; 52732 return reactorQueryString; 52733 } 52734 52735 /*************************************************************************************** 52736 * (c) 2017 Adobe. All rights reserved. 52737 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52738 * you may not use this file except in compliance with the License. You may obtain a copy 52739 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52740 * 52741 * Unless required by applicable law or agreed to in writing, software distributed under 52742 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52743 * OF ANY KIND, either express or implied. See the License for the specific language 52744 * governing permissions and limitations under the License. 52745 ****************************************************************************************/ 52746 52747 var createPublicRequire; 52748 var hasRequiredCreatePublicRequire; 52749 52750 function requireCreatePublicRequire () { 52751 if (hasRequiredCreatePublicRequire) return createPublicRequire; 52752 hasRequiredCreatePublicRequire = 1;
52753 var validateInjectedParams = requireValidateInjectedParams(); 52754 52755 function injectCreatePublicRequire({ moduleMap }) { 52756 moduleMap = moduleMap || {}; 52757 return function createPublicRequire(getModuleExportsByRelativePath) { 52758 // I thought about allowing this prefix to be overridden for testing but 52759 // I think it's safer if we don't allow it to be tampered with. 52760 var CORE_MODULE_PREFIX = '@adobe/reactor-'; 52761 return function publicRequire(key) { 52762 if (key.indexOf(CORE_MODULE_PREFIX) === 0) { 52763 var keyWithoutScope = key.substr(CORE_MODULE_PREFIX.length); 52764 if (moduleMap.hasOwnProperty(keyWithoutScope)) { 52765 return moduleMap[keyWithoutScope]; 52766 } 52767 } 52768 52769 if (key.indexOf('./') === 0 || key.indexOf('../') === 0) { 52770 return getModuleExportsByRelativePath(key); 52771 } 52772 52773 throw new Error('Cannot resolve module "' + key + '".'); 52774 }; 52775 }; 52776 } 52777 52778 const validateInjection = validateInjectedParams(injectCreatePublicRequire); 52779 52780 // 'promise' in this context should be lowercase because imports are of the shape: 52781 // @adobe/reactor-promise, etc. 52782 createPublicRequire = validateInjection({ 52783 moduleMap: { 52784 cookie: requireReactorCookie(), 52785 document: requireReactorDocument(), 52786 'load-script': requireReactorLoadScript(), 52787 'object-assign': requireReactorObjectAssign(), 52788 promise: requireReactorPromise(), 52789 'query-string': requireReactorQueryString(), 52790 window: requireReactorWindow() 52791 } 52792 }); 52793 return createPublicRequire; 52794 } 52795 52796 /*************************************************************************************** 52797 * (c) 2017 Adobe. All rights reserved. 52798 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52799 * you may not use this file except in compliance with the License. You may obtain a copy 52800 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52801 * 52802 * Unless required by applicable law or agreed to in writing, software distributed under 52803 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52804 * OF ANY KIND, either express or implied. See the License for the specific language 52805 * governing permissions and limitations under the License. 52806 ****************************************************************************************/ 52807 52808 var hydrateModuleProvider; 52809 var hasRequiredHydrateModuleProvider; 52810 52811 function requireHydrateModuleProvider () { 52812 if (hasRequiredHydrateModuleProvider) return hydrateModuleProvider; 52813 hasRequiredHydrateModuleProvider = 1; 52814 var validateInjectedParams = requireValidateInjectedParams(); 52815 52816 function injectHydrateModuleProvider({ 52817 createGetSharedModuleExports, 52818 createGetExtensionSettings, 52819 createGetHostedLibFileUrl, 52820 resolveRelativePath, 52821 createPublicRequire, 52822 logger 52823 }) { 52824 return function hydrateModuleProvider( 52825 container, 52826 moduleProvider, 52827 debugController, 52828 replaceTokens, 52829 getDataElementValue, 52830 settingsFileTransformer, 52831 decorateWithDynamicHost 52832 ) { 52833 var extensions = container.extensions; 52834 var buildInfo = container.buildInfo; 52835 var environment = container.environment; 52836 var propertySettings = container.property.settings; 52837 52838 if (extensions) { 52839 var getSharedModuleExports = createGetSharedModuleExports( 52840 extensions, 52841 moduleProvider 52842 ); 52843
52844 Object.keys(extensions).forEach(function (extensionName) { 52845 var extension = extensions[extensionName]; 52846 var extensionSettings = extension.settings; 52847 if (Array.isArray(extension.filePaths)) { 52848 extensionSettings = settingsFileTransformer( 52849 extensionSettings, 52850 extension.filePaths 52851 ); 52852 } 52853 var getExtensionSettings = createGetExtensionSettings( 52854 replaceTokens, 52855 extensionSettings 52856 ); 52857 52858 if (extension.modules) { 52859 var prefixedLogger = logger.createPrefixedLogger( 52860 extension.displayName 52861 ); 52862 var getHostedLibFileUrl = createGetHostedLibFileUrl( 52863 decorateWithDynamicHost, 52864 extension.hostedLibFilesBaseUrl, 52865 buildInfo.minified 52866 ); 52867 var turbine = { 52868 buildInfo: buildInfo, 52869 environment: environment, 52870 property: { 52871 name: container.property.name, 52872 id: container.property.id 52873 }, 52874 getDataElementValue: getDataElementValue, 52875 getExtensionSettings: getExtensionSettings, 52876 getHostedLibFileUrl: getHostedLibFileUrl, 52877 getSharedModule: getSharedModuleExports, 52878 logger: prefixedLogger, 52879 propertySettings: propertySettings, 52880 replaceTokens: replaceTokens, 52881 onDebugChanged: debugController.onDebugChanged, 52882 get debugEnabled() { 52883 return debugController.getDebugEnabled(); 52884 } 52885 }; 52886 52887 Object.keys(extension.modules).forEach(function (referencePath) { 52888 var module = extension.modules[referencePath]; 52889 var getModuleExportsByRelativePath = function (relativePath) { 52890 var resolvedReferencePath = resolveRelativePath( 52891 referencePath, 52892 relativePath 52893 ); 52894 return moduleProvider.getModuleExports(resolvedReferencePath); 52895 }; 52896 var publicRequire = createPublicRequire( 52897 getModuleExportsByRelativePath 52898 ); 52899 52900 moduleProvider.registerModule( 52901 referencePath, 52902 module, 52903 extensionName, 52904 publicRequire, 52905 turbine 52906 ); 52907 }); 52908 } 52909 }); 52910 52911 // We want to extract the module exports immediately to allow the modules 52912 // to run some logic immediately. 52913 // We need to do the extraction here in order for the moduleProvider to 52914 // have all the modules previously registered. (eg. when moduleA needs moduleB, both modules 52915 // must exist inside moduleProvider). 52916 moduleProvider.hydrateCache(); 52917 } 52918 return moduleProvider; 52919 }; 52920 } 52921 52922 const validateInjection = validateInjectedParams(injectHydrateModuleProvider); 52923 52924 hydrateModuleProvider = validateInjection({ 52925 createGetSharedModuleExports: requireCreateGetSharedModuleExports(), 52926 createGetExtensionSettings: requireCreateGetExtensionSettings(), 52927 createGetHostedLibFileUrl: requireCreateGetHostedLibFileUrl(), 52928 resolveRelativePath: requireResolveRelativePath(), 52929 createPublicRequire: requireCreatePublicRequire(), 52930 logger: requireLogger() 52931 }); 52932 return hydrateModuleProvider; 52933 } 52934 52935 /*************************************************************************************** 52936 * (c) 2017 Adobe. All rights reserved. 52937 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 52938 * you may not use this file except in compliance with the License. You may obtain a copy 52939 * of the License at http://www.apache.org/licenses/LICENSE-2.0 52940 * 52941 * Unless required by applicable law or agreed to in writing, software distributed under 52942 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 52943 * OF ANY KIND, either express or implied. See the License for the specific language 52944 * governing permissions and limitations under the License. 52945 ****************************************************************************************/ 52946 52947 var hydrateSatelliteObject; 52948 var hasRequiredHydrateSatelliteObject; 52949 52950 function requireHydrateSatelliteObject () { 52951 if (hasRequiredHydrateSatelliteObject) return hydrateSatelliteObject; 52952 hasRequiredHydrateSatelliteObject = 1;
52953 var validateInjectedParams = requireValidateInjectedParams(); 52954 52955 function injectHydrateSatelliteObject({ cookie, logger }) { 52956 return function hydrateSatelliteObject( 52957 _satellite, 52958 container, 52959 setDebugEnabled, 52960 getVar, 52961 setCustomVar 52962 ) { 52963 var customScriptPrefixedLogger = 52964 logger.createPrefixedLogger('Custom Script'); 52965 52966 // Will get replaced by the directCall event delegate from the Core extension. Exists here in 52967 // case there are no direct call rules (and therefore the directCall event delegate won't get 52968 // included) and our customers are still calling the method. In this case, we don't want an error 52969 // to be thrown. This method existed before Reactor. 52970 _satellite.track = function (identifier) { 52971 logger.log( 52972 '"' + identifier + '" does not match any direct call identifiers.' 52973 ); 52974 }; 52975 52976 // Will get replaced by the Marketing Cloud ID extension if installed. Exists here in case 52977 // the extension is not installed and our customers are still calling the method. In this case, 52978 // we don't want an error to be thrown. This method existed before Reactor. 52979 _satellite.getVisitorId = function () { 52980 return null; 52981 }; 52982 52983 // container.property also has property settings, but it shouldn't concern the user. 52984 // By limiting our API exposure to necessities, we provide more flexibility in the future. 52985 _satellite.property = { 52986 name: container.property.name, 52987 id: container.property.id 52988 }; 52989 52990 _satellite.company = container.company; 52991 52992 _satellite.buildInfo = container.buildInfo; 52993 52994 _satellite.environment = container.environment; 52995 52996 _satellite.logger = customScriptPrefixedLogger; 52997 52998 /** 52999 * Log a message. We keep this due to legacy baggage. 53000 * @param {string} message The message to log. 53001 * @param {number} [level] A number that represents the level of logging. 53002 * 3=info, 4=warn, 5=error, anything else=log 53003 */ 53004 _satellite.notify = function (message, level) { 53005 logger.deprecation( 53006 '_satellite.notify is deprecated. Please use the `_satellite.logger` API.' 53007 ); 53008 53009 switch (level) { 53010 case 3: 53011 customScriptPrefixedLogger.info(message); 53012 break; 53013 case 4: 53014 customScriptPrefixedLogger.warn(message); 53015 break; 53016 case 5: 53017 customScriptPrefixedLogger.error(message); 53018 break; 53019 default: 53020 customScriptPrefixedLogger.log(message); 53021 } 53022 }; 53023 53024 _satellite.getVar = getVar; 53025 _satellite.setVar = setCustomVar; 53026 53027 /** 53028 * Writes a cookie. 53029 * @param {string} name The name of the cookie to save. 53030 * @param {string} value The value of the cookie to save. 53031 * @param {number} [days] The number of days to store the cookie. If not specified, the cookie 53032 * will be stored for the session only. 53033 */ 53034 _satellite.setCookie = function (name, value, days) { 53035 var optionsStr = ''; 53036 var options = {}; 53037 53038 if (days) { 53039 optionsStr = ', { expires: ' + days + ' }'; 53040 options.expires = days; 53041 } 53042 53043 var msg = 53044 '_satellite.setCookie is deprecated. Please use ' + 53045 '_satellite.cookie.set("' + 53046 name + 53047 '", "' + 53048 value + 53049 '"' + 53050 optionsStr + 53051 ').'; 53052 53053 logger.deprecation(msg); 53054 cookie.set(name, value, options); 53055 }; 53056 53057 /** 53058 * Reads a cookie value. 53059 * @param {string} name The name of the cookie to read. 53060 * @returns {string} 53061 */ 53062 _satellite.readCookie = function (name) { 53063 logger.deprecation( 53064 '_satellite.readCookie is deprecated. ' + 53065 'Please use _satellite.cookie.get("' + 53066 name + 53067 '").' 53068 ); 53069 return cookie.get(name); 53070 }; 53071 53072 /** 53073 * Removes a cookie value. 53074 * @param name 53075 */ 53076 _satellite.removeCookie = function (name) { 53077 logger.deprecation( 53078 '_satellite.removeCookie is deprecated. ' + 53079 'Please use _satellite.cookie.remove("' + 53080 name + 53081 '").' 53082 ); 53083 cookie.remove(name); 53084 }; 53085 53086 _satellite.cookie = cookie; 53087
53088 // Will get replaced by the pageBottom event delegate from the Core extension. Exists here in 53089 // case the customers are not using core (and therefore the pageBottom event delegate won't get 53090 // included) and they are still calling the method. In this case, we don't want an error 53091 // to be thrown. This method existed before Reactor. 53092 _satellite.pageBottom = function () {}; 53093 53094 _satellite.setDebug = setDebugEnabled; 53095 53096 var warningLogged = false; 53097 53098 Object.defineProperty(_satellite, '_container', { 53099 get: function () { 53100 if (!warningLogged) { 53101 logger.warn( 53102 '_satellite._container may change at any time and should only ' + 53103 'be used for debugging.' 53104 ); 53105 warningLogged = true; 53106 } 53107 53108 return container; 53109 } 53110 }); 53111 }; 53112 } 53113 53114 const validateInjection = validateInjectedParams(injectHydrateSatelliteObject); 53115 53116 hydrateSatelliteObject = validateInjection({ 53117 cookie: requireReactorCookie(), 53118 logger: requireLogger() 53119 }); 53120 return hydrateSatelliteObject; 53121 } 53122 53123 /*************************************************************************************** 53124 * (c) 2021 Adobe. All rights reserved. 53125 * This file is licensed to you under the Apache License, Version 2.0 (the "License"); 53126 * you may not use this file except in compliance with the License. You may obtain a copy 53127 * of the License at http://www.apache.org/licenses/LICENSE-2.0 53128 * 53129 * Unless required by applicable law or agreed to in writing, software distributed under 53130 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 53131 * OF ANY KIND, either express or implied. See the License for the specific language 53132 * governing permissions and limitations under the License. 53133 ****************************************************************************************/ 53134 53135 var createSettingsFileTransformer; 53136 var hasRequiredCreateSettingsFileTransformer; 53137 53138 function requireCreateSettingsFileTransformer () { 53139 if (hasRequiredCreateSettingsFileTransformer) return createSettingsFileTransformer; 53140 hasRequiredCreateSettingsFileTransformer = 1; 53141 var { isPlainObject } = requireIsPlainObject(); 53142 53143 function isArrayReference(str) { 53144 return ( 53145 typeof str === 'string' && 53146 str.indexOf('[') !== -1 && 53147 str.indexOf(']') !== -1 53148 ); 53149 } 53150 function sanitizeArrayKey(pathStrSegment) { 53151 return pathStrSegment.substr( 53152 0, 53153 // the name goes up to the start of the array bracket: 'someArrayName[]' 53154 pathStrSegment.indexOf('[') 53155 ); 53156 } 53157 53158 /** 53159 * Recursive function to loop through settings and look for the setting to transform, 53160 * which is the final entry within the pathSegments array. Alters settings in-place. 53161 * @param {Array} pathSegments 53162 * @param {Object} settings 53163 * @param {Function} decorateWithDynamicHost 53164 */ 53165 function traverseIntoSettings(pathSegments, settings, decorateWithDynamicHost) { 53166 // nothing to do 53167 if (!pathSegments.length || !isPlainObject(settings)) { 53168 return; 53169 } 53170 53171 var currentKey = pathSegments[0]; 53172 53173 // base case 53174 if (pathSegments.length === 1) { 53175 if ( 53176 settings.hasOwnProperty(currentKey) && 53177 typeof settings[currentKey] === 'string' 53178 ) { 53179 settings[currentKey] = decorateWithDynamicHost(settings[currentKey]); 53180 } 53181 return; 53182 } 53183 53184 // still more work to do 53185 var remainingPathSegments = pathSegments.slice(1); 53186 if (isArrayReference(currentKey)) { 53187 // 'someArrayReference[]' --> 'someArrayReference' 53188 currentKey = sanitizeArrayKey(currentKey); 53189 var settingsValue = settings[currentKey]; 53190 if (Array.isArray(settingsValue)) { 53191 settingsValue.forEach(function (arrayEntryObject) { 53192 return traverseIntoSettings( 53193 remainingPathSegments, 53194 arrayEntryObject, 53195 decorateWithDynamicHost 53196 ); 53197 }); 53198 } 53199 } else { 53200 // object case 53201 return traverseIntoSettings( 53202 remainingPathSegments, 53203 settings[currentKey], 53204 decorateWithDynamicHost 53205 ); 53206 } 53207 } 53208 53209 /** 53210 * Returns a function that when called will attempt to traverse the passed in 53211 * settings object to each file path and transform a relative URL to an absolute 53212 * URL. 53213 * 53214 * @param isDynamicEnforced 53215 * @param decorateWithDynamicHost 53216 * @returns {(function(*=, *=, *=): (*))|*} 53217 */ 53218 createSettingsFileTransformer = function (isDynamicEnforced, decorateWithDynamicHost) { 53219 return function (settings, filePaths, moduleReferencePath) { 53220 if ( 53221 !isDynamicEnforced || 53222 !isPlainObject(settings) || 53223 !Object.keys(settings).length || 53224 !Array.isArray(filePaths) || 53225 !filePaths.length 53226 ) { 53227 return settings; 53228 } 53229 53230 // pull out the file paths by the module's reference path and loop over each urlPath 53231 filePaths.forEach(function (filePathString) { 53232 // The custom code action provides the ability to have the source code in the 'source' 53233 // variable or to have an external file. Therefore, this module has 2 behaviors. 53234 // It also does not provide a value of false for isExternal just as all other extensions 53235 // that use fileTransform do not provide an isExternal variable check. Therefore, we need 53236 // to treat Adobe's custom code action special, and don't augment the 'source' variable 53237 // if isExternal is not also present. 53238 var isAdobeCustomCodeAction = Boolean( 53239 moduleReferencePath != null && 53240 /^core\/.*actions.*\/customCode\.js$/.test(moduleReferencePath) 53241 ); 53242 if ( 53243 isAdobeCustomCodeAction && 53244 filePathString === 'source' &&
53245 !settings.isExternal 53246 ) { 53247 return; 53248 } 53249 53250 // modify the object in place 53251 traverseIntoSettings( 53252 filePathString.split('.'), 53253 settings, 53254 decorateWithDynamicHost 53255 ); 53256 }); 53257 53258 return settings; 53259 }; 53260 }; 53261 return createSettingsFileTransformer; 53262 } 53263 53264 var hasRequiredSrc; 53265 53266 function requireSrc () { 53267 if (hasRequiredSrc) return src.exports; 53268 hasRequiredSrc = 1; 53269 var validateInjectedParams = requireValidateInjectedParams(); 53270 53271 function indexDependencyInjector({ 53272 logger, 53273 document, 53274 objectAssign, 53275 createDynamicHostResolver, 53276 buildRuleExecutionOrder, 53277 createDebugController, 53278 createExecuteDelegateModule, 53279 createGetDataElementValue, 53280 createGetVar, 53281 createIsVar, 53282 createModuleProvider, 53283 createNotifyMonitors, 53284 createReplaceTokens, 53285 createSetCustomVar, 53286 createAddActionToQueue, 53287 createAddConditionToQueue, 53288 createAddRuleToQueue, 53289 createEvaluateConditions, 53290 createExecuteRule, 53291 createGetModuleDisplayNameByRuleComponent, 53292 createGetSyntheticEventMeta, 53293 createInitEventModule, 53294 createLogActionError, 53295 createLogConditionError, 53296 createLogConditionNotMet, 53297 createLogRuleCompleted, 53298 createRunActions, 53299 createTriggerRule, 53300 getRuleComponentErrorMessage, 53301 isConditionMet, 53302 initRules, 53303 normalizeRuleComponentError, 53304 normalizeSyntheticEvent, 53305 getNamespacedStorage, 53306 hydrateModuleProvider, 53307 hydrateSatelliteObject, 53308 createSettingsFileTransformer 53309 }) { 53310 // this satellite variable needs to be a reference to the window._satellite object. 53311 // we will modify it in place. 53312 return function decorateSatellite(satellite) { 53313 if (satellite && !window.__satelliteLoaded) { 53314 // If a consumer loads the library multiple times, make sure only the first time is effective. 53315 window.__satelliteLoaded = true; 53316 53317 var container = satellite.container; 53318 53319 // Remove container in public scope ASAP so it can't be manipulated by extension or user co
53319de. 53320 delete satellite.container; 53321 53322 /* 53323 get rid of container.buildInfo decoration once deprecation is finished of 53324 buildInfo.environment string 53325 */ 53326 var buildInfo = objectAssign({}, container.buildInfo); 53327 Object.defineProperty(buildInfo, 'environment', { 53328 get: function () { 53329 logger.deprecation( 53330 'container.buildInfo.environment is deprecated.' + 53331 'Please use `container.environment.stage` instead' 53332 ); 53333 return container.environment.stage; 53334 } 53335 }); 53336 container.buildInfo = buildInfo; 53337 53338 var localStorage = getNamespacedStorage('localStorage'); 53339 var debugController = createDebugController(localStorage, logger); 53340 53341 var currentScriptSource = ''; 53342 if ( 53343 document.currentScript && 53344 document.currentScript.getAttribute('src') 53345 ) { 53346 currentScriptSource = document.currentScript.getAttribute('src'); 53347 } 53348 var dynamicHostResolver; 53349 try { 53350 dynamicHostResolver = createDynamicHostResolver( 53351 currentScriptSource, 53352 Boolean(container.company.dynamicCdnEnabled), 53353 container.company.cdnAllowList, 53354 debugController 53355 ); 53356 } catch (e) { 53357 logger.warn('Please review the following error:'); 53358 throw e; // We don't want to continue allowing Turbine to start up if we detect an error in here 53359 } 53360 53361 var settingsFileTransformer = createSettingsFileTransformer( 53362 dynamicHostResolver.isDynamicEnforced, 53363 dynamicHostResolver.decorateWithDynamicHost 53364 ); 53365 53366 var moduleProvider = createModuleProvider(); 53367 53368 var replaceTokens; 53369 53370 var undefinedVarsReturnEmpty = 53371 container.property.settings.undefinedVarsReturnEmpty; 53372 var ruleComponentSequencingEnabled = 53373 container.property.settings.ruleComponentSequencingEnabled; 53374 53375 var dataElements = container.dataElements || {}; 53376 53377 var getDataElementDefinition = function (name) { 53378 return dataElements[name]; 53379 }; 53380 53381 // We support data elements referencing other data elements. In order to be able to retrieve a 53382 // data element value, we need to be able to replace data element tokens inside its settings 53383 // object (which is what replaceTokens is for). In order to be able to replace data element 53384 // tokens inside a settings object, we need to be able to retrieve data element 53385 // values (which is what getDataElementValue is for). This proxy replaceTokens function solves the 53386 // chicken-or-the-egg problem by allowing us to provide a replaceTokens function to 53387 // getDataElementValue that will stand in place of the real replaceTokens function until it 53388 // can be created. This also means that createDataElementValue should not call the proxy 53389 // replaceTokens function until after the real replaceTokens has been created. 53390 var proxyReplaceTokens = function () { 53391 return replaceTokens.apply(null, arguments); 53392 }; 53393 53394 var getDataElementValue = createGetDataElementValue( 53395 moduleProvider, 53396 getDataElementDefinition, 53397 proxyReplaceTokens, 53398 undefinedVarsReturnEmpty, 53399 settingsFileTransformer 53400 ); 53401 53402 var customVars = {}; 53403 var setCustomVar = createSetCustomVar(customVars); 53404 53405 var isVar = createIsVar(customVars, getDataElementDefinition); 53406 53407 var getVar = createGetVar( 53408 customVars, 53409 getDataElementDefinition, 53410 getDataElementValue 53411 ); 53412 53413 replaceTokens = createReplaceTokens( 53414 isVar, 53415 getVar, 53416 undefinedVarsReturnEmpty 53417 ); 53418 53419 // Important to hydrate satellite object before we hydrate the module provider or init rules. 53420 // When we hydrate module provider, we also execute extension code which may be 53421 // accessing _satellite. 53422 hydrateSatelliteObject( 53423 satellite, 53424 container, 53425 debugController.setDebugEnabled, 53426 getVar, 53427 setCustomVar 53428 ); 53429 53430 hydrateModuleProvider( 53431 container, 53432 moduleProvider, 53433 debugController, 53434 replaceTokens, 53435 getDataElementValue, 53436 settingsFileTransformer, 53437 dynamicHostResolver.decorateWithDynamicHost 53438 ); 53439 53440 var notifyMonitors = createNotifyMonitors(satellite); 53441 var executeDelegateModule = createExecuteDelegateModule( 53442 moduleProvider, 53443 replaceTokens, 53444 settingsFileTransformer 53445 ); 53446 53447 var getModuleDisplayNameByRuleComponent = 53448 createGetModuleDisplayNameByRuleComponent(moduleProvider); 53449 var logConditionNotMet = createLogConditionNotMet( 53450 getModuleDisplayNameByRuleComponent, 53451 logger, 53452 notifyMonitors 53453 ); 53454 var logConditionError = createLogConditionError( 53455 getRuleComponentErrorMessage, 53456 getModuleDisplayNameByRuleComponent, 53457 logger, 53458 notifyMonitors 53459 ); 53460 var logActionError = createLogActionError( 53461 getRuleComponentErrorMessage, 53462 getModuleDisplayNameByRuleComponent, 53463 logger, 53464 notifyMonitors 53465 ); 53466 var logRuleCompleted = createLogRuleCompleted(logger, notifyMonitors); 53467 53468 var evaluateConditions = createEvaluateConditions( 53469 executeDelegateModule, 53470 isConditionMet, 53471 logConditionNotMet, 53472 logConditionError 53473 );
53474 var runActions = createRunActions( 53475 executeDelegateModule, 53476 logActionError, 53477 logRuleCompleted 53478 ); 53479 var executeRule = createExecuteRule(evaluateConditions, runActions); 53480 53481 var addConditionToQueue = createAddConditionToQueue( 53482 executeDelegateModule, 53483 normalizeRuleComponentError, 53484 isConditionMet, 53485 logConditionError, 53486 logConditionNotMet 53487 ); 53488 var addActionToQueue = createAddActionToQueue( 53489 executeDelegateModule, 53490 normalizeRuleComponentError, 53491 logActionError 53492 ); 53493 var addRuleToQueue = createAddRuleToQueue( 53494 addConditionToQueue, 53495 addActionToQueue, 53496 logRuleCompleted 53497 ); 53498 53499 var triggerRule = createTriggerRule( 53500 ruleComponentSequencingEnabled, 53501 executeRule, 53502 addRuleToQueue, 53503 notifyMonitors 53504 ); 53505 53506 var getSyntheticEventMeta = createGetSyntheticEventMeta(moduleProvider); 53507 53508 var initEventModule = createInitEventModule( 53509 triggerRule, 53510 executeDelegateModule, 53511 normalizeSyntheticEvent, 53512 getRuleComponentErrorMessage, 53513 getSyntheticEventMeta, 53514 logger 53515 ); 53516 53517 initRules( 53518 buildRuleExecutionOrder, 53519 container.rules || [], 53520 initEventModule 53521 ); 53522 } 53523 }; 53524 } 53525 53526 var decorateSatellite = validateInjectedParams( 53527 indexDependencyInjector({ 53528 logger: requireLogger(), 53529 document: requireReactorDocument(), 53530 objectAssign: requireReactorObjectAssign(), 53531 createDynamicHostResolver: requireCreateDynamicHostResolver(), 53532 buildRuleExecutionOrder: requireBuildRuleExecutionOrder(), 53533 createDebugController: requireCreateDebugController(), 53534 createExecuteDelegateModule: requireCreateExecuteDelegateModule(), 53535 createGetDataElementValue: requireCreateGetDataElementValue(), 53536 createGetVar: requireCreateGetVar(), 53537 createIsVar: requireCreateIsVar(), 53538 createModuleProvider: requireCreateModuleProvider(), 53539 createNotifyMonitors: requireCreateNotifyMonitors(), 53540 createReplaceTokens: requireCreateReplaceTokens(), 53541 createSetCustomVar: requireCreateSetCustomVar(), 53542 createAddActionToQueue: requireCreateAddActionToQueue(), 53543 createAddConditionToQueue: requireCreateAddConditionToQueue(), 53544 createAddRuleToQueue: requireCreateAddRuleToQueue(), 53545 createEvaluateConditions: requireCreateEvaluateConditions(), 53546 createExecuteRule: requireCreateExecuteRule(), 53547 createGetModuleDisplayNameByRuleComponent: requireCreateGetModuleDisplayNameByRuleComponent(), 53548 createGetSyntheticEventMeta: requireCreateGetSyntheticEventMeta(), 53549 createInitEventModule: requireCreateInitEventModule(), 53550 createLogActionError: requireCreateLogActionError(), 53551 createLogConditionError: requireCreateLogConditionError(), 53552 createLogConditionNotMet: requireCreateLogConditionNotMet(), 53553 createLogRuleCompleted: requireCreateLogRuleCompleted(), 53554 createRunActions: requireCreateRunActions(), 53555 createTriggerRule: requireCreateTriggerRule(), 53556 getRuleComponentErrorMessage: requireGetRuleComponentErrorMessage(), 53557 isConditionMet: requireIsConditionMet(), 53558 initRules: requireInitRules(), 53559 normalizeRuleComponentError: requireNormalizeRuleComponentError(), 53560 normalizeSyntheticEvent: requireNormalizeSyntheticEvent(), 53561 getNamespacedStorage: requireGetNamespacedStorage(), 53562 hydrateModuleProvider: requireHydrateModuleProvider(), 53563 hydrateSatelliteObject: requireHydrateSatelliteObject(), 53564 createSettingsFileTransformer: requireCreateSettingsFileTransformer() 53565 }) 53566 ); 53567 53568 { 53569 // Forge is outputting an IIFE that defines window._satellite 53570 var _satellite = window._satellite; 53571 decorateSatellite(_satellite); 53572 src.exports = _satellite; 53573 } 53574 return src.exports; 53575 } 53576 53577 var srcExports = requireSrc(); 53578 var index = /*@__PURE__*/getDefaultExportFromCjs(srcExports); 53579 53580 return index; 53581 53582})(); 53583 53584
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.