1/** 2 * Keep ContentBox / AI-built pages clickable (parallax overlays, decorative layers, CTA anchors). 3 */ 4(function (global) { 5 'use strict'; 6 7 if (global.__bwContentboxClickfixBooted) { 8 return; 9 } 10 global.__bwContentboxClickfixBooted = true; 11 12 function isEditorMode() { 13 if (global.BW_IS_CONTENTBOX_EDITOR) { 14 return true; 15 } 16 if (document.body && document.body.classList.contains('bw-page-editor')) { 17 return true; 18 } 19 if (global.jQuery) { 20 var $w = global.jQuery('.is-wrapper'); 21 if ($w.length && $w.data('contentbox')) { 22 return true; 23 } 24 } 25 return false; 26 } 27 28 function isInteractiveWidget(el) { 29 if (!el || !el.closest) { 30 return false; 31 } 32 return !!el.closest( 33 '.bw-content-slider-wrap, #sliderContainer, [data-bw-slider], ' 34 + '.bw-faq-accordion, ul.accordion-list, .faq-item, details.bw-faq-item' 35 ); 36 } 37 38 function repairPhotoParticleOverlaySplit(root) { 39 root = root || document; 40 root.querySelectorAll('.is-section > .bw-ai-particles, .is-box > .bw-ai-particles').forEach(function (particles) { 41 var host = particles.parentNode; 42 if (!host) { 43 return; 44 } 45 var bgInside = null; 46 Array.prototype.forEach.call(particles.children, function (ch) { 47 if (ch.classList && ch.classList.contains('is-overlay-bg')) { 48 bgInside = ch; 49 } 50 }); 51 if (!bgInside) { 52 return; 53 } 54 var photoOverlay = null; 55 Array.prototype.forEach.call(host.children, function (sibling) { 56 if (sibling === particles || !sibling.classList) { 57 return; 58 } 59 if (sibling.classList.contains('is-overlay') && !sibling.classList.contains('bw-ai-particles')) { 60 photoOverlay = sibling; 61 } 62 }); 63 if (!photoOverlay) { 64 photoOverlay = document.createElement('div'); 65 photoOverlay.className = 'is-overlay'; 66 host.insertBefore(photoOverlay, particles); 67 } 68 photoOverlay.appendChild(bgInside); 69 Array.prototype.slice.call(particles.children).forEach(function (ch) { 70 if (!ch.classList.contains('bw-particle-canvas')) { 71 particles.removeChild(ch); 72 } 73 }); 74 }); 75 76 root.querySelectorAll('.is-section').forEach(function (sec) { 77 var sectionBg = sec.querySelector(':scope > .is-overlay:not(.bw-ai-particles) .is-overlay-bg'); 78 if (!sectionBg) { 79 return; 80 } 81 var sectionUrl = (sectionBg.style.backgroundImage || '').replace(/\s/g, '').toLowerCase(); 82 if (!sectionUrl) { 83 return; 84 } 85 sec.querySelectorAll('.is-boxes .is-box > .is-overlay .is-overlay-bg').forEach(function (nestedBg) { 86 var nestedUrl = (nestedBg.style.backgroundImage || '').replace(/\s/g, '').toLowerCase(); 87 if (nestedUrl && nestedUrl === sectionUrl) { 88 var nestOverlay = nestedBg.closest('.is-overlay'); 89 if (nestOverlay && nestOverlay.parentNode) { 90 nestOverlay.parentNode.removeChild(nestOverlay); 91 } 92 } 93 }); 94 }); 95 } 96 97 function isEmbedEditorOverlay(el) { 98 if (!el || !el.classList) { 99 return false; 100 } 101 if (el.classList.contains('ovl')) { 102 return true; 103 } 104 return !!(el.closest && el.closest('.embed-responsive')); 105 } 106 107 function ensureEmbedVideoOverlays(root) { 108 if (!isEditorMode()) { 109 return; 110 } 111 root = root || document; 112 root.querySelectorAll('.is-wrapper .embed-responsive').forEach(function (wrap) { 113 var iframe = wrap.querySelector('iframe'); 114 if (!iframe) { 115 return; 116 } 117 wrap.style.pointerEvents = 'auto'; 118 var ovl = wrap.querySelector('.ovl'); 119 if (!ovl) { 120 ovl = document.createElement('div'); 121 ovl.className = 'ovl'; 122 ovl.setAttribute('style', 'position:absolute;background:#fff;opacity:0.01;cursor:pointer;top:0;left:0;width:100%;height:100%;z-index:2'); 123 wrap.appendChild(ovl); 124 } 125 ovl.style.pointerEvents = 'auto'; 126 ovl.style.display = ''; 127 }); 128 } 129 130 function applyOverlayFix(root) { 131 root = root || document; 132 repairPhotoParticleOverlaySplit(root); 133 root.querySelectorAll('.is-wrapper .is-overlay, .is-wrapper .is-overlay *').forEach(function (el) { 134 el.style.pointerEvents = 'none'; 135 }); 136 root.querySelectorAll('.is-wrapper .bw-ai-particles, .is-wrapper .bw-ai-particles *').forEach(function (el) { 137 el.style.pointerEvents = 'none'; 138 }); 139 root.querySelectorAll('.is-wrapper .is-section').forEach(function (sec) { 140 Array.prototype.forEach.call(sec.children, function (child) { 141 if (!child.classList) { 142 return; 143 } 144 if (child.classList.contains('is-boxes') || child.classList.contains('is-section-tool')) { 145 return; 146 } 147 var st = child.getAttribute('style') || ''; 148 if (isInteractiveWidget(child)) { 149 child.style.pointerEvents = 'auto'; 150 return; 151 } 152 if (child.classList.contains('is-overlay') || child.classList.contains('bw-ai-particles')
153 || /position\s*:\s*(absolute|fixed)/i.test(st)) { 154 child.style.pointerEvents = 'none'; 155 } 156 }); 157 }); 158 root.querySelectorAll('.is-wrapper .is-section div[style*="position"]').forEach(function (el) { 159 if (!el || el.classList.contains('bw-slider-prev') || el.classList.contains('bw-slider-next')) { 160 return; 161 } 162 if (isInteractiveWidget(el) || isEmbedEditorOverlay(el)) { 163 return; 164 } 165 if (el.closest('a.is-btn, button.is-btn')) { 166 return; 167 } 168 var st = el.getAttribute('style') || ''; 169 if (!/position\s*:\s*absolute/i.test(st) || /pointer-events\s*:\s*none/i.test(st)) { 170 return; 171 } 172 if (/inset\s*:\s*0/i.test(st) 173 || (/top\s*:\s*0/i.test(st) && /bottom\s*:\s*0/i.test(st)) 174 || /width\s*:\s*100%/i.test(st)) { 175 el.style.pointerEvents = 'none'; 176 } 177 }); 178 ensureEmbedVideoOverlays(root); 179 } 180 181 function scrollToSection(el) { 182 if (!el || !el.scrollIntoView) { 183 return; 184 } 185 el.scrollIntoView({ behavior: 'smooth', block: 'start' }); 186 } 187 188 function getPageWrapper(root) { 189 root = root || document; 190 var wrapper = root.querySelector ? root.querySelector('.is-wrapper') : null; 191 return wrapper || root; 192 } 193 194 function isEditorNavTarget(el) { 195 if (!el || !el.closest) { 196 return false; 197 } 198 if (isInteractiveWidget(el)) { 199 return false; 200 } 201 if (el.closest('.is-section-edit, .is-section-remove, .is-sidebar, .is-modal, .is-section-tool')) { 202 return false; 203 } 204 if (el.closest('.bw-slider-prev, .bw-slider-next')) { 205 return false; 206 } 207 var link = el.closest('.is-wrapper a[href]'); 208 if (!link) { 209 return false; 210 } 211 if (link.classList.contains('is-lightbox')) { 212 return false; 213 } 214 return true; 215 } 216 217 function performLinkNavigation(a, wrapper) { 218 if (!a) { 219 return; 220 } 221 wrapper = wrapper || getPageWrapper(); 222 var sections = wrapper.querySelectorAll ? wrapper.querySelectorAll('.is-section') : []; 223 var href = (a.getAttribute('href') || '').trim(); 224 225 if (href === '' || href === '#') { 226 if (a.getAttribute('data-bw-scroll') === 'next') { 227 var sec = a.closest('.is-section'); 228 var idx = -1; 229 for (var i = 0; i < sections.length; i++) { 230 if (sections[i] === sec) { 231 idx = i; 232 break; 233 } 234 } 235 if (idx >= 0 && sections[idx + 1]) { 236 scrollToSection(sections[idx + 1]); 237 } 238 } 239 return; 240 } 241 242 if (href.charAt(0) === '#') { 243 var target = document.getElementById(href.slice(1)); 244 if (target) { 245 scrollToSection(target); 246 } 247 return; 248 } 249 250 if (/^https?:\/\//i.test(href)) { 251 window.open(href, '_blank', 'noopener,noreferrer'); 252 } 253 } 254 255 var editorLinkGuardWired = false; 256 257 function wireEditorLinkGuard() { 258 if (!isEditorMode() || editorLinkGuardWired) { 259 return; 260 } 261 editorLinkGuardWired = true; 262 263 /* Single click: block navigation so ContentBox can select/edit links & buttons */ 264 document.addEventListener('click', function (e) { 265 if (!isEditorMode() || e.detail > 1) { 266 return; 267 } 268 if (!isEditorNavTarget(e.target)) { 269 return; 270 } 271 e.preventDefault(); 272 if (e.target.closest('.is-arrow-down')) { 273 e.stopImmediatePropagation(); 274 } 275 }, true); 276 277 /* Double click: preview navigation (scroll to section / open external link) */ 278 document.addEventListener('dblclick', function (e) { 279 if (!isEditorMode()) { 280 return; 281 } 282 if (!isEditorNavTarget(e.target)) { 283 return; 284 } 285 var link = e.target.closest('.is-wrapper a[href]'); 286 if (!link) { 287 return; 288 } 289 e.preventDefault(); 290 e.stopPropagation(); 291 performLinkNavigation(link, getPageWrapper()); 292 }, true); 293 } 294 295 function wireButtons(root) { 296 if (isEditorMode()) { 297 wireEditorLinkGuard(); 298 return; 299 } 300 root = root || document; 301 var wrapper = getPageWrapper(root); 302 var sections = wrapper.querySelectorAll ? wrapper.querySelectorAll('.is-section') : []; 303 304 wrapper.querySelectorAll('a.is-btn[href^="#"]').forEach(function (a) { 305 if (a.getAttribute('data-bw-wired') === '1') { 306 return; 307 } 308 a.setAttribute('data-bw-wired', '1'); 309 a.addEventListener('click', function (e) { 310 var href = (a.getAttribute('href') || '').trim(); 311 if (href === '' || href === '#') { 312 if (a.getAttribute('data-bw-scroll') === 'next') { 313 var sec = a.closest('.is-section'); 314 var idx = -1; 315 for (var i = 0; i < sections.length; i++) { 316 if (sections[i] === sec) { 317 idx = i; 318 break; 319 } 320 } 321 if (idx >= 0 && sections[idx + 1]) { 322 e.preventDefault(); 323 scrollToSection(sections[idx + 1]); 324 } 325 } 326 return; 327 } 328 var id = href.charAt(0) === '#' ? href.slice(1) : href; 329 if (!id) { 330 return; 331 } 332 var target = document.getElementById(id); 333 if (target) { 334 e.preventDefault(); 335 scrollToSection(target); 336 } 337 }); 338 }); 339 } 340 341 var BW_SECTION_HEIGHTS = [10, 15, 20, 25, 30, 40, 50, 60, 70, 75, 80, 85, 90, 100]; 342 343 function readSectionHeightFromClass(sec) { 344 if (!sec || !sec.classList) { 345 return ''; 346 } 347 if (sec.classList.contains('is-section-auto')) { 348 return 'auto'; 349 } 350 var found = []; 351 var i; 352 for (i = 0; i < BW_SECTION_HEIGHTS.length; i++) { 353 if (sec.classList.contains('is-section-' + BW_SECTION_HEIGHTS[i])) { 354 found.push(String(BW_SECTION_HEIGHTS[i])); 355 } 356 } 357 if (!found.length) { 358 return ''; 359 } 360 // Prefer last height token in the class attribute (latest editor choice) 361 var tokens = String(sec.getAttribute('class') || '').split(/\s+/); 362 var last = ''; 363 for (i = 0; i < tokens.length; i++) { 364 var m = /^is-section-(\d+|auto)$/.exec(tokens[i]); 365 if (m && m[1] !== 'auto') { 366 last = m[1]; 367 } 368 } 369 return last || found[found.length - 1]; 370 } 371 372 function dedupeSectionHeightClasses(sec, keep) { 373 if (!sec || !sec.classList) { 374 return; 375 } 376 var i; 377 for (i = 0; i < BW_SECTION_HEIGHTS.length; i++) { 378 var h = String(BW_SECTION_HEIGHTS[i]); 379 if (keep && h === keep) { 380 continue; 381 } 382 sec.classList.remove('is-section-' + h); 383 } 384 if (keep && keep !== 'auto') { 385 sec.classList.remove('is-section-auto'); 386 if (!sec.classList.contains('is-section-' + keep)) { 387 sec.classList.add('is-section-' + keep); 388 } 389 } 390 } 391 392 function syncSectionHeightAttrs(root) { 393 root = root || document; 394 root.querySelectorAll('.is-wrapper .is-section').forEach(function (sec) { 395 var fromClass = readSectionHeightFromClass(sec); 396 if (fromClass === 'auto') { 397 dedupeSectionHeightClasses(sec, ''); 398 sec.classList.add('is-section-auto'); 399 sec.removeAttribute('data-bw-section-height'); 400 return; 401 } 402 if (fromClass) { 403 dedupeSectionHeightClasses(sec, fromClass); 404 sec.setAttribute('data-bw-section-height', fromClass); 405 return; 406 } 407 // Class cleared â drop stale attr so clickfix !important cannot pin old vh 408 if (sec.getAttribute('data-bw-section-height')) { 409 sec.removeAttribute('data-bw-section-height'); 410 } 411 }); 412 } 413 414 function trblAttrToCss(raw) { 415 if (!raw) { 416 return ''; 417 } 418 var parts = String(raw).trim().split(/\s+/); 419 if (!parts.length) { 420 return ''; 421 } 422 return parts.map(function (p) { 423 if (/^auto$/i.test(p)) { 424 return 'auto'; 425 } 426 if (/^\d+(?:\.\d+)?px$/i.test(p)) { 427 return p; 428 } 429 if (/^\d+(?:\.\d+)?$/.test(p)) { 430 return p + 'px'; 431 } 432 return p; 433 }).join(' '); 434 } 435 436 var mobileSpacingMq = global.matchMedia ? global.matchMedia('(max-width: 960px)') : null; 437 438 function applyContainerSpacing(root) { 439 root = root || document; 440 var isMobile = !!(mobileSpacingMq && mobileSpacingMq.matches); 441 root.querySelectorAll('.is-wrapper .is-container').forEach(function (el) { 442 var padRaw = el.getAttribute('data-bw-container-padding'); 443 var marRaw = el.getAttribute('data-bw-container-margin'); 444 if (!padRaw && !marRaw) { 445 var sec = el.closest('.is-section'); 446 if (sec) { 447 padRaw = padRaw || sec.getAttribute('data-bw-section-padding'); 448 marRaw = marRaw || sec.getAttribute('data-bw-section-margin'); 449 } 450 } 451 if (isMobile) { 452 padRaw = (padRaw && el.getAttribute('data-bw-container-padding-mobile')) || padRaw; 453 marRaw = (marRaw && el.getAttribute('data-bw-container-margin-mobile')) || marRaw; 454 }
455 if (padRaw) { 456 var padCss = trblAttrToCss(padRaw); 457 if (padCss) { 458 el.style.setProperty('padding', padCss, 'important'); 459 } 460 } 461 if (marRaw) { 462 var mp = String(marRaw).trim().split(/\s+/); 463 var top = mp[0] || '0'; 464 var bottom = mp.length >= 3 ? mp[2] : top; 465 var topCss = /^auto$/i.test(top) ? 'auto' : (/^\d+(?:\.\d+)?px$/i.test(top) ? top : (top + 'px')); 466 var bottomCss = /^auto$/i.test(bottom) ? 'auto' : (/^\d+(?:\.\d+)?px$/i.test(bottom) ? bottom : (bottom + 'px')); 467 el.style.setProperty('margin', topCss + ' auto ' + bottomCss + ' auto', 'important'); 468 } 469 }); 470 } 471 472 var FRACTION_CLASSES = ['full', 'half', 'third', 'fourth', 'fifth', 'sixth', 'two-third', 'two-fourth', 'two-fifth', 'two-sixth']; 473 var WIDTH_PERCENT = { 474 full: 100, 475 'two-sixth': 83.3, 476 'two-fifth': 80, 477 'two-fourth': 75, 478 'two-third': 66.7, 479 half: 50, 480 third: 33.3, 481 fourth: 25, 482 fifth: 20, 483 sixth: 16.6 484 }; 485 486 function columnFractionClass(n) { 487 var map = { 1: 'full', 2: 'half', 3: 'third', 4: 'fourth', 5: 'fifth', 6: 'sixth' }; 488 n = Math.min(6, Math.max(1, n || 1)); 489 return map[n] || 'third'; 490 } 491 492 function classFromPercent(pct) { 493 var best = null; 494 var bestDiff = 999; 495 Object.keys(WIDTH_PERCENT).forEach(function (cls) { 496 var d = Math.abs(pct - WIDTH_PERCENT[cls]); 497 if (d < bestDiff) { 498 bestDiff = d; 499 best = cls; 500 } 501 }); 502 return (best && bestDiff <= 3.25) ? best : null; 503 } 504 505 function existingWidthClass(col) { 506 var i; 507 for (i = 0; i < FRACTION_CLASSES.length; i++) { 508 if (col.classList.contains(FRACTION_CLASSES[i])) { 509 return FRACTION_CLASSES[i]; 510 } 511 } 512 return ''; 513 } 514 515 function pairComplement(cls) { 516 var map = { 517 'two-third': 'third', 518 third: 'two-third', 519 'two-fourth': 'fourth', 520 fourth: 'two-fourth', 521 'two-fifth': 'fifth', 522 fifth: 'two-fifth', 523 'two-sixth': 'sixth', 524 sixth: 'two-sixth', 525 half: 'half' 526 }; 527 return map[cls] || ''; 528 } 529 530 function stripGridRowStyles(row) { 531 if (!row) { 532 return; 533 } 534 row.removeAttribute('data-bw-card-grid'); 535 row.classList.remove('bw-ai-card-row'); 536 FRACTION_CLASSES.concat(['bw-cols-2', 'bw-cols-3', 'bw-cols-4', 'bw-cols-5', 'bw-cols-6']).forEach(function (c) { 537 row.classList.remove(c); 538 }); 539 if (!row.classList.contains('clearfix')) { 540 row.classList.add('clearfix'); 541 } 542 row.style.removeProperty('display'); 543 row.style.removeProperty('grid-template-columns'); 544 row.style.removeProperty('gap'); 545 row.style.removeProperty('align-items'); 546 var st = row.getAttribute('style') || ''; 547 st = st.replace(/\bdisplay\s*:\s*grid[^;]*;?/gi, ''); 548 st = st.replace(/\bgrid-template-columns\s*:[^;]+;?/gi, ''); 549 st = st.replace(/\bgap\s*:[^;]+;?/gi, ''); 550 st = st.replace(/\balign-items\s*:[^;]+;?/gi, ''); 551 row.setAttribute('style', st.replace(/;\s*;/g, ';').replace(/^;\s*|;\s*$/g, '').trim()); 552 } 553 554 function stripGridColumnStyles(col) { 555 if (!col) { 556 return; 557 } 558 col.style.removeProperty('float'); 559 col.style.removeProperty('clear'); 560 col.style.removeProperty('width'); 561 col.style.removeProperty('max-width'); 562 col.style.removeProperty('min-width'); 563 col.style.removeProperty('margin'); 564 col.style.removeProperty('padding'); 565 var st = col.getAttribute('style') || ''; 566 st = st.replace(/\bfloat\s*:[^;]+;?/gi, ''); 567 st = st.replace(/\bclear\s*:[^;]+;?/gi, ''); 568 st = st.replace(/\bwidth\s*:[^;]+;?/gi, ''); 569 st = st.replace(/\bmax-width\s*:[^;]+;?/gi, ''); 570 st = st.replace(/\bmin-width\s*:[^;]+;?/gi, ''); 571 st = st.replace(/\bmargin\s*:[^;]+;?/gi, ''); 572 st = st.replace(/\bpadding\s*:[^;]+;?/gi, ''); 573 col.setAttribute('style', st.replace(/;\s*;/g, ';').replace(/^;\s*|;\s*$/g, '').trim()); 574 } 575 576 function applyFloatColumnRow(row) { 577 var cols = []; 578 row.querySelectorAll(':scope > .column').forEach(function (col) { 579 if (!col.classList.contains('full')) { 580 cols.push(col); 581 } 582 }); 583 if (cols.length < 2) {
584 stripGridRowStyles(row); 585 return; 586 } 587 var keepOpp = cols.map(function (col) { 588 return col.classList.contains('flow-opposite'); 589 }); 590 var mapped = cols.map(function (col) { 591 var ex = existingWidthClass(col); 592 if (ex) { 593 return ex; 594 } 595 var m = /width\s*:\s*([\d.]+)\s*%/i.exec(col.getAttribute('style') || ''); 596 return m ? classFromPercent(parseFloat(m[1], 10)) : ''; 597 }); 598 var unique = []; 599 mapped.forEach(function (c) { 600 if (c && unique.indexOf(c) === -1) { 601 unique.push(c); 602 } 603 }); 604 var mixed = unique.length > 1 || unique.some(function (c) { 605 return c.indexOf('two-') === 0; 606 }); 607 if (mixed) { 608 stripGridRowStyles(row); 609 cols.forEach(function (col, i) { 610 var cls = mapped[i]; 611 if (!cls && cols.length === 2 && unique.length === 1) { 612 cls = pairComplement(unique[0]); 613 } 614 if (cls) { 615 FRACTION_CLASSES.forEach(function (c) { 616 col.classList.remove(c); 617 }); 618 col.classList.add(cls); 619 } 620 stripGridColumnStyles(col); 621 if (keepOpp[i]) { 622 col.classList.add('flow-opposite'); 623 } 624 }); 625 return; 626 } 627 var frac = columnFractionClass(cols.length); 628 stripGridRowStyles(row); 629 cols.forEach(function (col, i) { 630 FRACTION_CLASSES.forEach(function (c) { 631 col.classList.remove(c); 632 }); 633 if (!col.classList.contains('column')) { 634 col.classList.add('column'); 635 } 636 col.classList.add(frac); 637 stripGridColumnStyles(col); 638 if (keepOpp[i]) { 639 col.classList.add('flow-opposite'); 640 } 641 }); 642 } 643 644 function repairFloatColumnLayout(root) { 645 root = root || document; 646 root.querySelectorAll('.is-wrapper .row').forEach(function (row) { 647 var style = row.getAttribute('style') || ''; 648 var isGrid = row.getAttribute('data-bw-card-grid') 649 || row.classList.contains('bw-ai-card-row') 650 || /display\s*:\s*grid/i.test(style) 651 || row.style.display === 'grid'; 652 if (!isGrid) { 653 return; 654 } 655 applyFloatColumnRow(row); 656 }); 657 } 658 659 function lockCardGridLayout(root) { 660 repairFloatColumnLayout(root); 661 } 662 663 function boot() { 664 syncSectionHeightAttrs(document); 665 applyContainerSpacing(document); 666 applyOverlayFix(document); 667 wireEditorLinkGuard(); 668 wireButtons(document); 669 lockCardGridLayout(document); 670 var mains = document.getElementById('mains'); 671 if (mains && mains.querySelector('.is-wrapper')) { 672 mains.style.position = 'relative'; 673 mains.style.zIndex = '1'; 674 } 675 } 676 677 if (document.readyState === 'loading') { 678 document.addEventListener('DOMContentLoaded', boot); 679 } else { 680 boot(); 681 } 682 683 if (typeof MutationObserver !== 'undefined' && document.body) { 684 var t = null; 685 var obs = new MutationObserver(function () { 686 if (t) { 687 clearTimeout(t); 688 } 689 t = setTimeout(function () { 690 syncSectionHeightAttrs(document); 691 applyContainerSpacing(document); 692 repairPhotoParticleOverlaySplit(document); 693 applyOverlayFix(document); 694 wireButtons(document); 695 lockCardGridLayout(document); 696 }, 150); 697 }); 698 obs.observe(document.body, { 699 childList: true, 700 subtree: true, 701 attributes: true, 702 attributeFilter: ['style', 'class', 'data-bw-container-padding', 'data-bw-container-margin', 'data-bw-section-padding', 'data-bw-section-margin', 'data-bw-container-padding-mobile', 'data-bw-container-margin-mobile'] 703 }); 704 } 705 706 if (mobileSpacingMq) { 707 var onSpacingMq = function () { 708 applyContainerSpacing(document); 709 }; 710 if (typeof mobileSpacingMq.addEventListener === 'function') { 711 mobileSpacingMq.addEventListener('change', onSpacingMq); 712 } else if (typeof mobileSpacingMq.addListener === 'function') { 713 mobileSpacingMq.addListener(onSpacingMq); 714 } 715 } 716 717 if (isEditorMode()) { 718 document.addEventListener('click', function () { 719 window.setTimeout(function () { 720 lockCardGridLayout(document); 721 }, 0); 722 }, true); 723 } 724 725 global.BwContentboxClickfix = { 726 apply: applyOverlayFix, 727 applyContainerSpacing: applyContainerSpacing, 728 wireButtons: wireButtons, 729 wireEditorLinkGuard: wireEditorLinkGuard, 730 performLinkNavigation: performLinkNavigation, 731 syncSectionHeightAttrs: syncSectionHeightAttrs, 732 lockCardGridLayout: lockCardGridLayout, 733 repairFloatColumnLayout: repairFloatColumnLayout, 734 ensureEmbedVideoOverlays: ensureEmbedVideoOverlays, 735 isEditorMode: isEditorMode, 736 isInteractiveWidget: isInteractiveWidget 737 }; 738 global.BwIsContentboxEditor = isEditorMode; 739})(typeof window !== 'undefined' ? window : this);
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.