1class SiteFooterLists { 2 constructor(root = document) { 3 this.root = root; 4 this.selector = '.SiteFooterList__trigger'; 5 this.mq = window.matchMedia('(min-width: 768px)'); 6 this.handleClick = this.handleClick.bind(this); 7 this.handleKeydown = this.handleKeydown.bind(this); 8 this.handleBreakpointChange = this.handleBreakpointChange.bind(this); 9 this.init(); 10 } 11 12 init() { 13 this.root.addEventListener('click', this.handleClick); 14 this.root.addEventListener('keydown', this.handleKeydown); 15 this.mq.addEventListener('change', this.handleBreakpointChange); 16 17 this.applyState(); 18 } 19 20 isDesktop() { 21 return this.mq.matches; 22 } 23 24 handleBreakpointChange() { 25 this.applyState(); 26 } 27 28 applyState() { 29 const triggers = this.root.querySelectorAll(this.selector); 30 31 triggers.forEach(trigger => { 32 const panelId = trigger.getAttribute('aria-controls'); 33 if (!panelId) return; 34 35 const panel = document.getElementById(panelId); 36 if (!panel) return; 37 38 const icon = trigger.querySelector('.SiteFooterList__Icon i'); 39 40 if (this.isDesktop()) { 41 // ALWAYS override DOM defaults 42 trigger.setAttribute('aria-expanded', 'true'); 43 trigger.setAttribute('aria-disabled', 'true'); 44 45 panel.removeAttribute('hidden'); 46 47 if (icon) { 48 icon.classList.remove('icon-circle-chevron-down'); 49 icon.classList.add('icon-circle-chevron-up'); 50 51 const use = icon.querySelector('use'); 52 if (use) { 53 use.setAttribute('xlink:href', '#icon-circle-chevron-up'); 54 } 55 } 56 } else { 57 trigger.setAttribute('aria-expanded', 'false'); 58 trigger.removeAttribute('aria-disabled'); 59 60 panel.setAttribute('hidden', ''); 61 62 if (icon) { 63 icon.classList.remove('icon-circle-chevron-up'); 64 icon.classList.add('icon-circle-chevron-down'); 65 66 const use = icon.querySelector('use'); 67 if (use) { 68 use.setAttribute('xlink:href', '#icon-circle-chevron-down'); 69 } 70 } 71 } 72 }); 73 } 74 75 handleClick(e) { 76 if (this.isDesktop()) return; 77 78 const trigger = e.target.closest(this.selector); 79 if (!trigger) return; 80 81 this.toggle(trigger); 82 } 83 84 handleKeydown(e) { 85 if (this.isDesktop()) return; 86 if (e.key !== 'Enter' && e.key !== ' ') return; 87 88 const trigger = e.target.closest(this.selector); 89 if (!trigger) return; 90 91 e.preventDefault(); 92 this.toggle(trigger); 93 } 94 95 toggle(trigger) { 96 const panelId = trigger.getAttribute('aria-controls'); 97 if (!panelId) return; 98 99 const panel = document.getElementById(panelId); 100 if (!panel) return; 101 102 const icon = trigger.querySelector('.SiteFooterList__Icon i'); 103 104 const isExpanded = trigger.getAttribute('aria-expanded') === 'true'; 105 const nextState = !isExpanded; 106 107 trigger.setAttribute('aria-expanded', String(nextState)); 108 109 if (nextState) { 110 panel.hidden = false; 111 112 if (icon) { 113 icon.classList.remove('icon-circle-chevron-down'); 114 icon.classList.add('icon-circle-chevron-up'); 115 116 const use = icon.querySelector('use'); 117 if (use) { 118 use.setAttribute('xlink:href', '#icon-circle-chevron-up'); 119 } 120 } 121 } else { 122 panel.hidden = true; 123 124 if (icon) { 125 icon.classList.remove('icon-circle-chevron-up'); 126 icon.classList.add('icon-circle-chevron-down'); 127 128 const use = icon.querySelector('use'); 129 if (use) { 130 use.setAttribute('xlink:href', '#icon-circle-chevron-down'); 131 } 132 } 133 } 134 } 135} 136 137new SiteFooterLists(); 138 139class ResolveFooterOverlaps { 140 constructor(options = {}) { 141 this.footerId = options.footerId || 'SiteFooter'; 142 this.targets = options.targets || []; 143 144 this.footerEl = null; 145 this.items = []; 146 this.ticking = false;
147 148 this.onScroll = this.onScroll.bind(this); 149 this.onResize = this.onResize.bind(this); 150 } 151 152 init() { 153 this.footerEl = document.getElementById(this.footerId); 154 if (!this.footerEl) return; 155 156 this.collectTargets(); 157 if (this.items.length === 0) return; 158 159 this.injectStyles(); 160 this.bindEvents(); 161 this.update(); 162 } 163 164 collectTargets() { 165 this.items = this.targets.reduce((acc, t, i) => { 166 if (!t || !t.selector) return acc; 167 168 const el = document.querySelector(t.selector); 169 if (!el) return acc; 170 171 const id = `rfo-${i}`; 172 el.dataset.rfoId = id; 173 174 acc.push({ 175 el, 176 mode: t.mode === 'offset' ? 'offset' : 'hide', 177 offset: Number.isFinite(t.offset) ? t.offset : 16, 178 className: `rfo-hidden-${id}` 179 }); 180 181 return acc; 182 }, []); 183 } 184 185 injectStyles() { 186 const styleId = 'resolve-footer-overlaps'; 187 if (document.getElementById(styleId)) return; 188 189 const css = this.items 190 .map(item => `[data-rfo-id="${item.el.dataset.rfoId}"].${item.className}{display:none!important;}`) 191 .join(''); 192 193 if (!css) return; 194 195 const style = document.createElement('style'); 196 style.id = styleId; 197 style.textContent = css; 198 document.head.appendChild(style); 199 } 200 201 bindEvents() { 202 window.addEventListener('scroll', this.onScroll, { passive: true }); 203 window.addEventListener('resize', this.onResize); 204 } 205 206 onScroll() { 207 this.requestTick(); 208 } 209 210 onResize() { 211 this.requestTick(); 212 } 213 214 requestTick() { 215 if (this.ticking) return; 216 217 this.ticking = true; 218 requestAnimationFrame(() => { 219 this.update(); 220 this.ticking = false; 221 }); 222 } 223 224 update() { 225 if (!this.footerEl || this.items.length === 0) return; 226 227 const footerRect = this.footerEl.getBoundingClientRect(); 228 if (!footerRect) return; 229 230 const viewportHeight = window.innerHeight; 231 const isOverlapping = footerRect.top < viewportHeight; 232 233 this.items.forEach(item => { 234 if (!item || !item.el) return; 235 236 if (item.mode === 'hide') { 237 item.el.classList.toggle(item.className, isOverlapping); 238 return; 239 } 240 241 if (item.mode === 'offset') { 242 const bottom = isOverlapping 243 ? (viewportHeight - footerRect.top) + item.offset 244 : item.offset; 245 246 item.el.style.setProperty('bottom', bottom + 'px', 'important'); 247 } 248 }); 249 } 250} 251 252(function () { 253 const init = () => { 254 const instance = new ResolveFooterOverlaps({ 255 targets: [ 256 { selector: '.jwPlayer--floatingContainer', mode: 'hide' }, 257 { selector: '.social-share-sticky-menu', mode: 'hide' } 258 ] 259 }); 260 261 if (!instance.targets.length) return; 262 instance.init(); 263 }; 264 265 if (document.readyState === 'loading') { 266 document.addEventListener('DOMContentLoaded', init, { once: true }); 267 } else { 268 init(); 269 } 270})();; 271/* eslint-disable no-undef */ 272class GetManager { 273 static PUBLISHER_ALIASES = new Map([ 274 ['arnnet', ['arn']], 275 ['channelasia', ['ca']], 276 ['reseller', ['rsl']], 277 ]); 278 279 static VALID_PUBLISHERS = new Set([ 280 'nww', 281 'iw', 282 'cw', 283 'arnnet', 284 'reseller', 285 'cso', 286 'cio', 287 'channelasia', 288 ]); 289 290 static EDITION_ALIASES = new Map([ 291 ['uk', ['gb']], 292 ['middle-east', ['me']], 293 ['asean', ['as']], 294 ['africa', ['af']], 295 ]); 296 297 static VALID_EDITIONS = new Set([ 298 'africa', 299 'asean', 300 'au', 301 'ca', 302 'es', 303 'ie', 304 'in', 305 'it', 306 'jp', 307 'kr', 308 'middle-east', 309 'nl', 310 'nz', 311 'uk', 312 'us', 313 'de', 314 'fr', 315 'pl', 316 'se', 317 ]); 318 319 constructor() { 320 window.foundry_is_language = GetManager.foundry_is_language; 321 window.foundry_is_publisher = GetManager.foundry_is_publisher; 322 window.foundry_is_edition = GetManager.foundry_is_edition; 323 window.foundry_get_publisher = GetManager.foundry_get_publisher; 324 window.foundry_get_site = GetManager.foundry_get_site; 325 } 326 327 static getCanonicalPublisher(name) { 328 if (!name) return null; 329 const lowerName = name.toLowerCase(); 330 331 const found = Array.from(GetManager.PUBLISHER_ALIASES.entries()).find( 332 ([canonical, aliases]) =>
332 canonical === lowerName || aliases.includes(lowerName), 333 ); 334 if (found) return found[0]; 335 336 return GetManager.VALID_PUBLISHERS.has(lowerName) ? lowerName : null; 337 } 338 339 static getDocumentLanguage() { 340 const langAttr = document.documentElement.getAttribute('lang') || ''; 341 return langAttr.split('-')[0].toLowerCase(); // Extracts the language without the region (e.g., "en" from "en-US") 342 } 343 344 static getDocumentEdition() { 345 const editionAttr = document.documentElement.getAttribute('data-edition') || ''; 346 return editionAttr.toLowerCase(); 347 } 348 349 static getCanonicalEdition(name) { 350 if (!name) return null; 351 const lowerName = name.toLowerCase(); 352 353 const found = Array.from(GetManager.EDITION_ALIASES.entries()).find( 354 ([canonical, aliases]) => canonical === lowerName || aliases.includes(lowerName), 355 ); 356 if (found) return found[0]; 357 358 return GetManager.VALID_EDITIONS.has(lowerName) ? lowerName : null; 359 } 360 361 static foundry_is_publisher(publisherNames) { 362 const brandAttr = document.documentElement.getAttribute('data-brand') || ''; 363 if (!brandAttr) return false; 364 365 const canonicalBrand = brandAttr.toLowerCase(); 366 367 if (Array.isArray(publisherNames)) { 368 return publisherNames.some(name => GetManager.getCanonicalPublisher(name) === canonicalBrand); 369 } 370 371 return GetManager.getCanonicalPublisher(publisherNames) === canonicalBrand; 372 } 373 374 static foundry_is_language(languages) { 375 const currentLang = GetManager.getDocumentLanguage(); 376 if (!currentLang) return false; 377 378 const languageList = Array.isArray(languages) 379 ? languages.map(lang => lang.toLowerCase()) 380 : languages.split(',').map(lang => lang.trim().toLowerCase()); 381 382 return languageList.includes(currentLang); 383 } 384 385 static foundry_is_edition(editionNames) { 386 const currentEdition = GetManager.getDocumentEdition(); 387 if (!currentEdition) return false; 388 389 if (Array.isArray(editionNames)) { 390 return editionNames.some(name => GetManager.getCanonicalEdition(name) === currentEdition); 391 } 392 393 return GetManager.getCanonicalEdition(editionNames) === currentEdition; 394 } 395 396 static foundry_get_publisher() { 397 const brandAttr = document.documentElement.getAttribute('data-brand') || ''; 398 if (!brandAttr) return null; 399 400 return brandAttr.trim().toLowerCase(); 401 } 402 403 static foundry_get_site() { 404 return (window.siteData && window.siteData.site) ? window.siteData.site : ''; 405 } 406 407} 408 409new GetManager(); // eslint-disable-line no-new; 410function ToggleContentVisibilityParagraph() { 411 const elements = document.querySelectorAll('[data-readmore-length]'); 412 413 if (elements.length === 0) return; 414 415 elements.forEach((element, index) => { 416 const uniqueId = `readmore-${index}`; 417 const modifiedElement = element; 418 modifiedElement.id = uniqueId; 419 420 const readMoreText = element.getAttribute('data-readmore-txt') || 'Read more'; 421 const hasReadLess = element.hasAttribute('data-readless'); 422 const readLessText = hasReadLess 423 ? element.getAttribute('data-readless-txt') || readMoreText 424 : ''; 425 426 const readMoreButton = document.createElement('button'); 427 readMoreButton.textContent = readMoreText; 428 readMoreButton.classList.add('read-more-toggle', 'reset-button'); 429 readMoreButton.setAttribute('aria-controls', uniqueId); 430 readMoreButton.setAttribute('aria-expanded', 'false'); 431 432 element.insertAdjacentElement('afterend', readMoreButton); 433 434 readMoreButton.addEventListener('click', function () { 435 const isExpanded = readMoreButton.getAttribute('aria-expanded') === 'true'; 436 readMoreButton.setAttribute('aria-expanded', !isExpanded); 437 element.setAttribute('data-expanded', !isExpanded); 438 439 if (!hasReadLess) { 440 readMoreButton.remove(); 441 } 442 443 if (isExpanded) { 444 readMoreButton.textContent = readMoreText; 445 } else { 446 readMoreButton.textContent = readLessText; 447 } 448 }); 449 }); 450} 451 452document.addEventListener('DOMContentLoaded', ToggleContentVisibilityParagraph); 453; 454 455class PrimaryNavDropdown { 456 static init(selector = ".PrimaryNav") { 457 document.querySelectorAll(selector).forEach((root) => { 458 if (root._primaryNavDropdown) return; 459 460 if (!root.querySelector('[data-nav-item="parent"]')) return; 461 462 const list = root.querySelector(".PrimaryNav__list"); 463 if (!list || !list.getClientRects().length) return; 464 465 root._primaryNavDropdown = new PrimaryNavDropdown(root); 466 }); 467 } 468 469 constructor(root) { 470 this.root = root; 471 this.header = root.closest("#SiteHeader") || root; 472 this.fadeBound = new WeakSet(); 473 474 this.items = Array.from( 475 root.querySelectorAll('[data-nav-item="parent"]') 476 ) 477 .map((item) => this._hydrateItem(item)) 478 .filter(Boolean); 479 480 this.activeItem = null; 481 482 this._buildHorizontalRail(); 483 this._bindItems(); 484 this._bindGlobal(); 485 } 486 487 _buildHorizontalRail() { 488 489 const elements = this.header.querySelectorAll( 490 'a[href], button:not([disabled])' 491 ); 492 493 this.horizontal = Array.from(elements); 494 495 this.horizontalIndex = new Map( 496 this.horizontal.map((el, i) => [el, i]) 497 ); 498 499 this.horizontalSet = new Set(this.horizontal); 500 } 501 502 _hydrateItem(item) { 503 504 const toggle = item.querySelector("[data-nav-toggle]"); 505 const link = item.querySelector("[data-nav-link]"); 506 if (!toggle) return null; 507 508 const key = toggle.dataset.navToggle; 509 510 const dropdown = item.querySelector( 511 `[data-nav-dropdown="${key}"]` 512 ); 513 if (!dropdown) return null; 514 515 const icon = toggle.querySelector("i"); 516 const use = icon?.querySelector("use"); 517 518 const submenuLinks = Array.from( 519 dropdown.querySelectorAll(".PrimaryNav__sublink") 520 ); 521 522 submenuLinks.forEach(a => a.tabIndex = -1); 523 524 return { 525 item, 526 toggle, 527 link, 528 dropdown, 529 icon, 530 use, 531 submenuLinks 532 }; 533 } 534 535 _bindItems() {
536 this.items.forEach((entry) => { 537 const { item, toggle, link, submenuLinks } = entry; 538 539 const open = () => this._open(entry); 540 const close = () => this._close(entry); 541 542 toggle.addEventListener("click", (e) => { 543 e.preventDefault(); 544 this.activeItem === entry ? close() : open(); 545 }); 546 547 [toggle, link].forEach((el) => { 548 if (!el) return; 549 550 el.addEventListener("keydown", (e) => { 551 switch (e.key) { 552 case " ": 553 e.preventDefault(); 554 this.activeItem === entry ? close() : open(); 555 break; 556 557 case "ArrowDown": 558 e.preventDefault(); 559 open(); 560 submenuLinks[0]?.focus(); 561 break; 562 } 563 }); 564 565 el.addEventListener("pointerenter", open); 566 }); 567 568 item.addEventListener("pointerleave", close); 569 570 item.addEventListener("focusout", (e) => { 571 if (!item.contains(e.relatedTarget)) close(); 572 }); 573 574 submenuLinks.forEach((subLink, index) => { 575 subLink.addEventListener("keydown", (e) => { 576 switch (e.key) { 577 case "ArrowDown": 578 e.preventDefault(); 579 submenuLinks[index + 1]?.focus(); 580 break; 581 582 case "ArrowUp": 583 e.preventDefault(); 584 index === 0 585 ? toggle.focus() 586 : submenuLinks[index - 1]?.focus(); 587 break; 588 } 589 }); 590 }); 591 }); 592 } 593 594 _bindGlobal() { 595 596 this.header.addEventListener("keydown", (e) => { 597 598 const target = e.target; 599 600 if (!this.horizontalSet.has(target)) return; 601 602 if (e.key === "ArrowRight") { 603 e.preventDefault(); 604 this._focusHorizontal(target, 1); 605 } 606 607 if (e.key === "ArrowLeft") { 608 e.preventDefault(); 609 this._focusHorizontal(target, -1); 610 } 611 612 if (e.key === "Escape" && this.activeItem) { 613 const { toggle } = this.activeItem; 614 this._close(this.activeItem); 615 toggle.focus(); 616 } 617 }); 618 619 document.addEventListener("pointerdown", (e) => { 620 621 if (this.activeItem && !this.header.contains(e.target)) { 622 this._close(this.activeItem); 623 } 624 }); 625 } 626 627 _bindScrollFade(entry) { 628 const { dropdown, submenuLinks } = entry; 629 630 if (submenuLinks.length <= 5) { 631 dropdown.classList.remove("has-fade"); 632 return; 633 } 634 635 const update = () => { 636 637 const progress = dropdown.scrollTop / (dropdown.scrollHeight - dropdown.clientHeight); 638 const passedThreshold = progress >= 0.6; 639 640 dropdown.classList.toggle("has-fade", !passedThreshold); 641 }; 642 643 if (!this.fadeBound.has(dropdown)) { 644 dropdown.addEventListener("scroll", update); 645 this.fadeBound.add(dropdown); 646 } 647 648 update(); 649 } 650 651 _focusHorizontal(current, delta) { 652 const i = this.horizontalIndex.get(current); 653 if (i === undefined) return; 654 655 let nextIndex = i + delta; 656 657 if (nextIndex < 0) nextIndex = this.horizontal.length - 1; 658 if (nextIndex >= this.horizontal.length) nextIndex = 0; 659 660 this.horizontal[nextIndex]?.focus(); 661 } 662 663 _open(entry) { 664 665 666 const html = document.documentElement; 667 // if html has data-lightbox-open="topics", return 668 if (html.dataset.lightboxOpen === "topics") { 669 return; 670 } 671 672 if (html.dataset.sitenavState === "open" && html.dataset.lightboxOpen !== "topics") { 673 return; 674 } 675 676 if (this.activeItem && this.activeItem !== entry) { 677 this._close(this.activeItem); 678 } 679 680 const { toggle, dropdown, submenuLinks, icon, use } = entry; 681 682 toggle.setAttribute("aria-expanded", "true"); 683 dropdown.setAttribute("aria-hidden", "false"); 684 toggle.classList.add("is-open"); 685 686 requestAnimationFrame(() => { 687 dropdown.scrollTop = 0; 688 }); 689 690 if (icon) { 691 icon.classList.remove("icon-header-angle-down"); 692 icon.classList.add("icon-header-angle-up"); 693 } 694 695 if (use) { 696 use.setAttribute("xlink:href", "#icon-header-angle-up"); 697 } 698 699 submenuLinks.forEach(a => a.tabIndex = 0); 700 701 this._bindScrollFade(entry); 702 703 this.activeItem = entry; 704 } 705 706 _close(entry) { 707 708 const { toggle, dropdown, submenuLinks, icon, use } = entry; 709 710 toggle.setAttribute("aria-expanded", "false"); 711 dropdown.setAttribute("aria-hidden", "true"); 712 toggle.classList.remove("is-open"); 713 714 dropdown.scrollTop = 0; 715 716 if (icon) { 717 icon.classList.remove("icon-header-angle-up"); 718 icon.classList.add("icon-header-angle-down"); 719 } 720 721 if (use) { 722 use.setAttribute("xlink:href", "#icon-header-angle-down"); 723 } 724 725 submenuLinks.forEach(a => a.tabIndex = -1); 726 727 if (this.activeItem === entry) { 728 this.activeItem = null; 729 } 730 } 731} 732 733class PrimaryNavPersistent { 734 735 constructor({ 736 primarySelector = '#SiteHeader', 737 persistentSelector = '#SiteHeaderPersistent',
738 offset = 300, 739 hideDelta = 30, 740 recalcLimit = 500 741 } = {}) { 742 743 this.primary = document.querySelector(primarySelector); 744 if (!this.primary) return; 745 746 this.persistent = this.resolvePersistent(persistentSelector); 747 if (!this.persistent) return; 748 749 this.offset = offset; 750 this.hideDelta = hideDelta; 751 this.recalcLimit = recalcLimit; 752 753 this.lastScrollY = window.scrollY || 0; 754 this.threshold = 0; 755 this.thresholdLocked = false; 756 757 this.ticking = false; 758 this.resizeTicking = false; 759 760 this.visible = false; 761 this.hideStartY = null; 762 763 this.init(); 764 this.bind(); 765 } 766 767 resolvePersistent(selector) { 768 769 let existing = document.querySelector(selector); 770 if (existing) return existing; 771 772 const clone = this.primary.cloneNode(true); 773 774 clone.id = selector.replace('#', ''); 775 clone.classList.add('is-persistent'); 776 777 const list = clone.querySelector('.PrimaryNav__list'); 778 779 if (list) { 780 781 // remove all children 782 list.innerHTML = ''; 783 784 // look for subscribe button inside TrendingBar 785 const trending = document.querySelector('.TrendingBar'); 786 const subscribe = trending 787 ? trending.querySelector('.SubscribeLinkBtn') 788 : null; 789 790 if (subscribe) { 791 792 const li = document.createElement('li'); 793 li.className = 'PrimaryNav__item PrimaryNav__item--subscribe'; 794 795 li.appendChild(subscribe.cloneNode(true)); 796 797 list.appendChild(li); 798 } 799 } 800 801 if (!clone.parentNode) { 802 this.primary.insertAdjacentElement('afterend', clone); 803 } 804 805 return clone; 806 } 807 808 isStickyAdActive() { 809 810 const ad = document.querySelector('.advert-sticky'); 811 if (!ad) return false; 812 813 const rect = ad.getBoundingClientRect(); 814 815 // ad is occupying top of viewport 816 return rect.top <= 0 && rect.bottom > 0; 817 } 818 819 calculateThreshold() { 820 821 this.threshold = 822 this.primary.offsetTop + 823 this.primary.offsetHeight + 824 this.offset; 825 } 826 827 init() { 828 829 if (!this.primary || !this.persistent) return; 830 831 this.calculateThreshold(); 832 833 this.thresholdLocked = false; 834 835 this.persistent.classList.remove('is-visible'); 836 this.visible = false; 837 } 838 839 bind() { 840 841 window.addEventListener('scroll', () => this.onScroll(), { passive: true }); 842 window.addEventListener('resize', () => this.onResize()); 843 } 844 845 onResize() { 846 847 if (this.resizeTicking) return; 848 849 this.resizeTicking = true; 850 851 requestAnimationFrame(() => { 852 this.init(); 853 this.resizeTicking = false; 854 }); 855 } 856 857 onScroll() { 858 859 if (this.ticking) return; 860 861 this.ticking = true; 862 863 requestAnimationFrame(() => { 864 this.update(); 865 this.ticking = false; 866 }); 867 } 868 869 update() { 870 871 const currentY = Math.max(0, window.scrollY || window.pageYOffset); 872 873 if (this.isStickyAdActive()) { 874 if (this.visible) this.hide(); 875 } 876 877 if (!this.thresholdLocked) { 878 879 this.calculateThreshold(); 880 881 if (currentY > this.recalcLimit) { 882 this.thresholdLocked = true; 883 } 884 } 885 886 const delta = currentY - this.lastScrollY; 887 888 const isScrollingUp = delta < -1; 889 const isScrollingDown = delta > 1; 890 891 if (currentY <= this.threshold) { 892 893 if (this.visible) this.hide(); 894 895 this.lastScrollY = currentY <= 0 ? 0 : currentY; 896 return; 897 } 898 899 if (!this.visible) { 900 901 if (isScrollingUp) { 902 this.show(); 903 } 904 905 } else { 906 907 if (isScrollingDown) { 908 909 if (this.hideStartY === null) { 910 this.hideStartY = currentY; 911 } 912 913 if (currentY - this.hideStartY >= this.hideDelta) { 914 this.hide(); 915 } 916 917 } else { 918 this.hideStartY = null; 919 } 920 } 921 922 this.lastScrollY = currentY <= 0 ? 0 : currentY; 923 } 924 925 show() { 926 927 if (!this.persistent) return; 928 929 // block if sticky ad is active 930 if (this.isStickyAdActive()) return; 931 932 this.persistent.style.top = '0px'; 933 this.persistent.classList.add('is-visible'); 934 935 this.visible = true; 936 this.hideStartY = null; 937 } 938 939 hide() { 940 941 if (!this.persistent) return; 942 943 this.persistent.classList.remove('is-visible'); 944 945 this.visible = false; 946 this.hideStartY = null; 947 948 this.persistent.style.top = '0px'; 949 } 950} 951 952class MenuAsideController { 953 954 constructor() { 955 956 this.html = document.documentElement; 957 958 this.aside = document.getElementById('MenuAside'); 959 this.overlay = document.getElementById('MenuOverlay'); 960 961 if (!this.aside || !this.overlay) return; 962 963 this.closeButtons = document.querySelectorAll('.MenuAside__close'); 964 this.openButtons = document.querySelectorAll('[data-menu-open]'); 965 this.sections = [...this.aside.querySelectorAll('[data-menu-section]')]; 966 967 this.focusable = []; 968 this.activeTrigger = null; 969 970 this.init(); 971 this.bind(); 972 } 973
974 init() { 975 976 this.html.dataset.sitenavState = 'closed'; 977 978 this.aside.setAttribute('aria-hidden', 'true'); 979 this.overlay.setAttribute('aria-hidden', 'true'); 980 981 this.hideSections(); 982 983 this.sections.forEach(section => { 984 section.setAttribute('inert', ''); 985 this.setTabIndex(section, -1); 986 }); 987 } 988 989 setTabIndex(section, value) { 990 991 const elements = section.querySelectorAll( 992 'a[href], button:not(.MenuGroup__notoggle), textarea, input, select, [tabindex]' 993 ); 994 995 elements.forEach(el => { 996 el.setAttribute('tabindex', value); 997 }); 998 } 999 1000 bind() { 1001 1002 this.openButtons.forEach(btn => { 1003 btn.addEventListener('click', () => { 1004 this.toggle(btn); 1005 }); 1006 }); 1007 1008 this.closeButtons.forEach(btn => { 1009 btn.addEventListener('click', () => this.close()); 1010 }); 1011 1012 this.overlay.addEventListener('click', () => this.close()); 1013 1014 document.addEventListener('keydown', e => { 1015 1016 if (e.key === 'Escape' && this.html.dataset.sitenavState === 'open') { 1017 this.close(); 1018 } 1019 1020 if (e.key === 'Tab' && this.html.dataset.sitenavState === 'open') { 1021 this.trapFocus(e); 1022 } 1023 }); 1024 1025 /* HARD FOCUS LOCK */ 1026 document.addEventListener('focusin', e => { 1027 1028 if (this.html.dataset.sitenavState !== 'open') return; 1029 1030 if (!this.aside.contains(e.target)) { 1031 const first = this.focusable[0] || this.aside; 1032 first.focus({ preventScroll: true }); 1033 } 1034 }); 1035 } 1036 toggle(trigger) { 1037 1038 const name = trigger.dataset.menuOpen; 1039 1040 const target = this.sections.find( 1041 section => section.dataset.menuSection === name 1042 ); 1043 1044 if (!target) return; 1045 1046 const isOpen = this.html.dataset.sitenavState === 'open'; 1047 const current = this.aside.dataset.sectionCurrent; 1048 1049 if (!isOpen) { 1050 this.open(trigger, target, name); 1051 return; 1052 } 1053 1054 if (current === name) { 1055 this.close(); 1056 return; 1057 } 1058 1059 this.open(trigger, target, name); 1060 } 1061 1062 open(trigger, target, name) { 1063 1064 document.dispatchEvent(new CustomEvent('sitenav:aside-open')); 1065 1066 this.activeTrigger = trigger; 1067 1068 const previous = this.aside.dataset.sectionCurrent || 'default'; 1069 1070 if (name === 'default') { 1071 this.aside.dataset.backBtn = 'false'; 1072 1073 } else if (name === 'topics') { 1074 this.aside.dataset.backBtn = 'true'; 1075 1076 } else if ( 1077 trigger.classList.contains('MenuAside__trigger') && 1078 previous === 'default' 1079 ) { 1080 this.aside.dataset.backBtn = 'true'; 1081 } 1082 1083 if (trigger.classList.contains('HeaderActions__trigger')) { 1084 this.aside.dataset.backBtn = 'false'; 1085 } 1086 1087 this.hideSections(); 1088 1089 this.sections.forEach(section => { 1090 section.setAttribute('inert', ''); 1091 this.setTabIndex(section, -1); 1092 }); 1093 1094 target.removeAttribute('inert'); 1095 target.setAttribute('aria-hidden', 'false'); 1096 this.setTabIndex(target, 0); 1097 1098 target.querySelectorAll('.MenuGroup__notoggle') 1099 .forEach(el => el.setAttribute('tabindex', '-1')); 1100 1101 target.classList.remove('is-visible'); 1102 requestAnimationFrame(() => { 1103 target.classList.add('is-visible'); 1104 }); 1105 1106 this.aside.classList.add('is-open'); 1107 this.overlay.classList.add('is-open'); 1108 1109 this.aside.setAttribute('aria-hidden', 'false'); 1110 this.overlay.setAttribute('aria-hidden', 'false'); 1111 1112 this.html.dataset.sitenavState = 'open'; 1113 this.html.dataset.sitenavSection = name; 1114 this.aside.dataset.sectionCurrent = name; 1115 1116 document.getElementById('SiteHeader')?.setAttribute('inert', ''); 1117 1118 this.syncTriggers(true, name); 1119 1120 if (!target.hasAttribute('tabindex')) { 1121 target.setAttribute('tabindex', '-1'); 1122 } 1123 1124 this.buildFocusable(); 1125 1126 target.focus({ preventScroll: true }); 1127 } 1128 1129 close() { 1130 1131 this.hideSections(); 1132 1133 this.sections.forEach(section => { 1134 section.setAttribute('inert', ''); 1135 this.setTabIndex(section, -1); 1136 }); 1137 1138 this.aside.classList.remove('is-open'); 1139 this.aside.dataset.backBtn = 'false'; 1140 1141 this.overlay.classList.remove('is-open'); 1142 1143 this.aside.setAttribute('aria-hidden', 'true'); 1144 this.overlay.setAttribute('aria-hidden', 'true'); 1145 1146 this.html.dataset.sitenavState = 'closed'; 1147 delete this.html.dataset.sitenavSection; 1148 delete this.aside.dataset.sectionCurrent; 1149 1150 document.getElementById('SiteHeader')?.removeAttribute('inert'); 1151 1152 this.syncTriggers(false); 1153 1154 this.focusable = []; 1155 1156 this.activeTrigger = null; 1157 } 1158 1159 hideSections() { 1160 1161 this.sections.forEach(section => { 1162 section.setAttribute('aria-hidden', 'true'); 1163 section.classList.remove('is-visible'); 1164 }); 1165 } 1166 1167 buildFocusable() { 1168 1169 this.focusable = Array.from( 1170 this.aside.querySelectorAll( 1171 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not
1171([tabindex="-1"])' 1172 ) 1173 ).filter(el => el.getClientRects().length); 1174 } 1175 1176 trapFocus(e) { 1177 1178 const focusable = this.focusable; 1179 if (!focusable.length) return; 1180 1181 const first = focusable[0]; 1182 const last = focusable[focusable.length - 1]; 1183 const active = document.activeElement; 1184 1185 if (e.shiftKey && active === first) { 1186 e.preventDefault(); 1187 last.focus(); 1188 } 1189 1190 if (!e.shiftKey && active === last) { 1191 e.preventDefault(); 1192 first.focus(); 1193 } 1194 } 1195 1196 syncTriggers(expanded, active = null) { 1197 1198 this.openButtons.forEach(btn => { 1199 1200 if (!expanded) { 1201 btn.setAttribute('aria-expanded', 'false'); 1202 return; 1203 } 1204 1205 btn.setAttribute( 1206 'aria-expanded', 1207 btn.dataset.menuOpen === active ? 'true' : 'false' 1208 ); 1209 }); 1210 } 1211} 1212 1213class MenuGroupController { 1214 1215 constructor(root) { 1216 1217 this.root = root; 1218 this.nav = root.querySelector('.MenuAside__nav'); 1219 1220 this.groups = [...root.querySelectorAll('.MenuGroup')]; 1221 this.toggles = [...root.querySelectorAll('.MenuGroup__toggle')]; 1222 this.links = [...root.querySelectorAll('.MenuGroup__link')]; 1223 1224 this.topLevelItems = this.nav 1225 ? [...this.nav.querySelectorAll(':scope > .MenuGroup > a, :scope > .MenuGroup > button, :scope > button')] 1226 : []; 1227 1228 1229 this.panels = new Map(); 1230 this.icons = new Map(); 1231 1232 this.toggles.forEach(toggle => { 1233 1234 const panelId = toggle.getAttribute('aria-controls'); 1235 const panel = document.getElementById(panelId); 1236 1237 if (panel) { 1238 this.panels.set(toggle, panel); 1239 1240 if (!panel.hasAttribute('tabindex')) { 1241 panel.setAttribute('tabindex', '-1'); 1242 } 1243 } 1244 1245 const icon = toggle.querySelector('.MenuGroup__icon i'); 1246 const use = icon?.querySelector('use'); 1247 1248 this.icons.set(toggle, { icon, use }); 1249 }); 1250 1251 this.init(); 1252 this.bind(); 1253 } 1254
1255 init() { 1256 1257 const isEditions = 1258 this.root.dataset.menuSection === 'editions'; 1259 1260 this.toggles.forEach(toggle => { 1261 1262 const group = toggle.closest('.MenuGroup'); 1263 const panel = this.panels.get(toggle); 1264 if (!group || !panel) return; 1265 1266 const isActive = 1267 isEditions || group.classList.contains('is-active'); 1268 1269 toggle.setAttribute('aria-expanded', isActive ? 'true' : 'false'); 1270 panel.setAttribute('aria-hidden', isActive ? 'false' : 'true'); 1271 1272 if (isActive) { 1273 this.enableFocus(panel); 1274 } else { 1275 this.disableFocus(panel); 1276 } 1277 }); 1278 1279 this.root.querySelectorAll('.MenuGroup__notoggle').forEach(el => el.setAttribute('tabindex', '-1')); 1280 } 1281 1282 updateAsideFocusables() { 1283 const aside = this.root.closest('#MenuAside'); 1284 const controller = aside?._controller; 1285 if (controller) controller.buildFocusable(); 1286 } 1287 1288 getFocusable() { 1289 1290 return [...this.root.querySelectorAll( 1291 'a[href], button:not(.MenuGroup__notoggle):not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])' 1292 )] 1293 .filter(el => 1294 !el.closest('[inert]') && 1295 el.getClientRects().length 1296 ); 1297 } 1298 1299 firstLink(panel) { 1300 return panel?.querySelector('.MenuGroup__link'); 1301 } 1302 1303 nextToggle(current) { 1304 1305 const i = this.toggles.indexOf(current); 1306 if (i === -1) return null; 1307 1308 return this.toggles[i + 1] || this.toggles[0]; 1309 } 1310 1311 focusNextTopLevel(current) { 1312 1313 const i = this.topLevelItems.indexOf(current); 1314 if (i === -1) return; 1315 1316 const next = this.topLevelItems[i + 1] || this.topLevelItems[0]; 1317 next.focus(); 1318 } 1319 1320 focusPrevTopLevel(current) { 1321 1322 const i = this.topLevelItems.indexOf(current); 1323 if (i === -1) return; 1324 1325 const prev = this.topLevelItems[i - 1] || this.topLevelItems[this.topLevelItems.length - 1]; 1326 prev.focus(); 1327 } 1328 1329 bind() { 1330 1331 this.root.addEventListener('click', e => { 1332 1333 const toggle = e.target.closest('.MenuGroup__toggle'); 1334 if (!toggle || !this.root.contains(toggle)) return; 1335 1336 const panel = this.panels.get(toggle); 1337 if (!panel) return; 1338 1339 this.toggle(toggle, panel); 1340 }); 1341 1342 this.root.addEventListener('keydown', e => { 1343 1344 const focusables = this.getFocusable(); 1345 const current = document.activeElement; 1346 const i = focusables.indexOf(current); 1347 1348 const toggle = current?.closest('.MenuGroup__toggle'); 1349 const link = current?.closest('.MenuGroup__link'); 1350 const panel = current?.closest('.MenuGroup__panel'); 1351 1352 if (e.key === 'ArrowDown') { 1353 1354 if (i === -1) return; 1355 1356 e.preventDefault(); 1357 (focusables[i + 1] || focusables[0]).focus(); 1358 return; 1359 } 1360 1361 if (e.key === 'ArrowUp') { 1362 1363 if (i === -1) return; 1364 1365 e.preventDefault(); 1366 (focusables[i - 1] || focusables[focusables.length - 1]).focus(); 1367 return; 1368 } 1369 1370 if (toggle) { 1371 1372 const panelEl = this.panels.get(toggle); 1373 if (!panelEl) return; 1374 1375 switch (e.key) { 1376 1377 case 'Enter': 1378 case ' ': 1379 e.preventDefault(); 1380 this.toggle(toggle, panelEl); 1381 break; 1382 1383 case 'ArrowRight': 1384 1385 if (toggle.getAttribute('aria-expanded') !== 'true') { 1386 this.toggle(toggle, panelEl); 1387 } 1388 1389 this.firstLink(panelEl)?.focus(); 1390 break; 1391 1392 case 'ArrowLeft': 1393 1394 if (toggle.getAttribute('aria-expanded') === 'true') { 1395 this.close(toggle, panelEl); 1396 } 1397 1398 toggle.focus(); 1399 break; 1400 } 1401 1402 return; 1403 } 1404 1405 if (link) { 1406 1407 if (e.key === 'ArrowLeft') { 1408 1409 const parentToggle = 1410 link.closest('.MenuGroup')?.querySelector('.MenuGroup__toggle'); 1411 1412 if (parentToggle) { 1413 e.preventDefault(); 1414 parentToggle.focus(); 1415 } 1416 } 1417 } 1418 1419 if (panel && e.key === 'ArrowLeft') { 1420 1421 e.preventDefault(); 1422 1423 panel 1424 .closest('.MenuGroup') 1425 ?.querySelector('.MenuGroup__toggle') 1426 ?.focus(); 1427 } 1428 }); 1429 } 1430 1431 toggle(button, panel) { 1432 1433 const expanded = button.getAttribute('aria-expanded') === 'true'; 1434 const isEditions = 1435 document.documentElement.dataset.sitenavSection === 'editions'; 1436 1437 if (!isEditions) { 1438 this.closeAll(); 1439 } 1440 1441 if (expanded) { 1442 1443 if (isEditions) { 1444 this.close(button, panel); 1445 } else { 1446 button.focus(); 1447 } 1448 1449 this.updateAsideFocusables(); 1450 return; 1451 } 1452 1453 button.setAttribute('aria-expanded', 'true'); 1454 panel.setAttribute('aria-hidden', 'false'); 1455 1456 this.enableFocus(panel); 1457 1458 const { icon, use } = this.icons.get(button) || {}; 1459 1460 if (icon) { 1461 icon.classList.remove('icon-header-angle-down'); 1462 icon.classList.add('icon-header-angle-up'); 1463 } 1464 1465 if (use) { 1466 use.setAttribute('xlink:href', '#icon-header-angle-up'); 1467 } 1468 1469 this.updateAsideFocusables(); 1470 1471 panel.focus({ preventScroll: true }); 1472 } 1473 1474 close(button, panel) { 1475 1476 button.setAttribute('aria-expanded', 'false'); 1477 panel.setAttribute('aria-hidden', 'true'); 1478 1479 this.disableFocus(panel); 1480 1481 const { icon, use } = this.icons.get(button) || {}; 1482 1483 if (icon) { 1484 icon.classList.remove('icon-header-angle-up'); 1485 icon.classList.add('icon-header-angle-down'); 1486 } 1487 1488 if (use) { 1489 use.setAttribute('xlink:href', '#icon-header-angle-down'); 1490 } 1491 1492 this.updateAsideFocusables(); 1493 } 1494 1495 closeAll() { 1496
1497 this.toggles.forEach(toggle => { 1498 1499 const panel = this.panels.get(toggle); 1500 if (!panel) return; 1501 1502 toggle.setAttribute('aria-expanded', 'false'); 1503 panel.setAttribute('aria-hidden', 'true'); 1504 1505 this.disableFocus(panel); 1506 1507 const { icon, use } = this.icons.get(toggle) || {}; 1508 1509 if (icon) { 1510 icon.classList.remove('icon-header-angle-up'); 1511 icon.classList.add('icon-header-angle-down'); 1512 } 1513 1514 if (use) { 1515 use.setAttribute('xlink:href', '#icon-header-angle-down'); 1516 } 1517 }); 1518 } 1519 1520 disableFocus(container) { 1521 1522 const items = container.querySelectorAll( 1523 'a[href], button:not(.MenuGroup__notoggle):not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])' 1524 ); 1525 1526 items.forEach(el => { 1527 1528 if (!('prevTabindex' in el.dataset)) { 1529 el.dataset.prevTabindex = el.getAttribute('tabindex') ?? ''; 1530 } 1531 1532 el.setAttribute('tabindex', '-1'); 1533 }); 1534 } 1535 1536 enableFocus(container) { 1537 1538 const items = container.querySelectorAll( 1539 'a[href], button:not(.MenuGroup__notoggle):not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])' 1540 ); 1541 1542 items.forEach(el => { 1543 1544 if (!('prevTabindex' in el.dataset)) { 1545 el.removeAttribute('tabindex'); 1546 return; 1547 } 1548 1549 const prev = el.dataset.prevTabindex; 1550 1551 if (prev === '') { 1552 el.removeAttribute('tabindex'); 1553 } else { 1554 el.setAttribute('tabindex', prev); 1555 } 1556 1557 delete el.dataset.prevTabindex; 1558 }); 1559 } 1560 1561 focusNext(current) { 1562 1563 const i = this.toggles.indexOf(current); 1564 if (i === -1) return; 1565 1566 const next = this.toggles[i + 1] || this.toggles[0]; 1567 next.focus(); 1568 } 1569 1570 focusPrev(current) { 1571 1572 const i = this.toggles.indexOf(current); 1573 if (i === -1) return; 1574 1575 const prev = this.toggles[i - 1] || this.toggles[this.toggles.length - 1]; 1576 prev.focus(); 1577 } 1578} 1579 1580class LightboxController { 1581 1582 constructor() { 1583 1584 this.html = document.documentElement; 1585 1586 this.overlay = document.getElementById('LightboxOverlay'); 1587 this.lightboxes = [...document.querySelectorAll('.Lightbox')]; 1588 1589 if (!this.lightboxes.length) return; 1590 1591 this.openButtons = document.querySelectorAll('[data-lightbox-open]'); 1592 this.closeButtons = document.querySelectorAll('.Lightbox__close'); 1593 1594 this.primary = document.getElementById('primary'); 1595 this.header = document.getElementById('SiteHeader'); 1596 1597 this.panels = new Map( 1598 this.lightboxes.map(panel => [panel.dataset.lightbox, panel]) 1599 ); 1600 1601 this.activePanel = null; 1602 this.activeTrigger = null; 1603 this.focusable = []; 1604 1605 this.resizeRAF = null; 1606 1607 this.init(); 1608 this.bind(); 1609 } 1610
1611 init() { 1612 1613 this.lightboxes.forEach(panel => { 1614 panel.setAttribute('aria-hidden', 'true'); 1615 panel.setAttribute('inert', ''); 1616 this.setTabIndex(panel, -1); 1617 }); 1618 1619 if (this.overlay) { 1620 this.overlay.setAttribute('aria-hidden', 'true'); 1621 } 1622 } 1623 1624 setTabIndex(panel, value) { 1625 const elements = panel.querySelectorAll( 1626 'a[href], button, textarea, input, select, [tabindex]' 1627 ); 1628 1629 elements.forEach(el => { 1630 el.setAttribute('tabindex', value); 1631 }); 1632 } 1633 1634 bind() { 1635 1636 this.openButtons.forEach(btn => { 1637 btn.addEventListener('click', () => { 1638 this.toggle(btn); 1639 }); 1640 }); 1641 1642 this.closeButtons.forEach(btn => { 1643 btn.addEventListener('click', () => this.close()); 1644 }); 1645 1646 if (this.overlay) { 1647 this.overlay.addEventListener('click', () => this.close()); 1648 } 1649 1650 document.addEventListener('keydown', e => { 1651 1652 if (e.key === 'Escape' && this.html.dataset.lightboxOpen) { 1653 this.close(); 1654 } 1655 1656 if (e.key === 'Tab' && this.html.dataset.lightboxOpen) { 1657 this.trapFocus(e); 1658 } 1659 }); 1660 1661 window.addEventListener('resize', () => { 1662 1663 if (this.resizeRAF) return; 1664 1665 this.resizeRAF = requestAnimationFrame(() => { 1666 this.handleTopicsOverflow(); 1667 this.resizeRAF = null; 1668 }); 1669 1670 }); 1671 1672 document.addEventListener('sitenav:aside-open', () => { 1673 this.close(); 1674 }); 1675 } 1676 1677 toggle(trigger) { 1678 1679 const name = trigger.dataset.lightboxOpen; 1680 const panel = this.panels.get(name); 1681 1682 if (!panel) return; 1683 1684 const expanded = trigger.getAttribute('aria-expanded') === 'true'; 1685 1686 if (expanded) { 1687 this.close(); 1688 return; 1689 } 1690 1691 if (window.scrollY > 0) { 1692 1693 window.scrollTo({ 1694 top: 0, 1695 behavior: 'smooth' 1696 }); 1697 1698 const waitForTop = () => { 1699 1700 if (window.scrollY <= 0) { 1701 window.removeEventListener('scroll', waitForTop); 1702 this.open(trigger, panel, name); 1703 } 1704 }; 1705 1706 window.addEventListener('scroll', waitForTop, { passive: true }); 1707 return; 1708 } 1709 1710 this.open(trigger, panel, name); 1711 } 1712 1713 open(trigger, panel, name) { 1714 1715 document.dispatchEvent(new CustomEvent('sitenav:lightbox-open')); 1716 1717 this.close(); 1718 1719 this.activeTrigger = trigger; 1720 this.activePanel = panel; 1721 1722 panel.classList.add('is-open'); 1723 panel.setAttribute('aria-hidden', 'false'); 1724 panel.removeAttribute('inert'); 1725 this.setTabIndex(panel, 0); 1726 1727 if (!panel.hasAttribute('tabindex')) { 1728 panel.setAttribute('tabindex', '-1'); 1729 } 1730 1731 if (this.overlay) { 1732 this.overlay.classList.add('is-open'); 1733 this.overlay.setAttribute('aria-hidden', 'false'); 1734 } 1735 1736 // inert everything except the lightbox + overlay 1737 [...document.body.children].forEach(el => { 1738 if (!el.contains(panel) && el !== this.overlay) { 1739 el.setAttribute('inert', ''); 1740 } 1741 }); 1742 1743 this.html.dataset.lightboxOpen = name; 1744 1745 this.syncTriggers(true, name); 1746 1747 this.buildFocusable(panel); 1748 1749 if (this.focusable.length) { 1750 this.focusable[0].focus(); 1751 } else { 1752 panel.focus({ preventScroll: true }); 1753 } 1754 } 1755 1756 close() { 1757 1758 this.lightboxes.forEach(panel => { 1759 panel.classList.remove('is-open'); 1760 panel.setAttribute('aria-hidden', 'true'); 1761 panel.setAttribute('inert', ''); 1762 this.setTabIndex(panel, -1); 1763 }); 1764 1765 if (this.overlay) { 1766 this.overlay.classList.remove('is-open'); 1767 this.overlay.setAttribute('aria-hidden', 'true'); 1768 } 1769 1770 [...document.body.children].forEach(el => { 1771 el.removeAttribute('inert'); 1772 }); 1773 1774 delete this.html.dataset.lightboxOpen; 1775 1776 this.syncTriggers(false); 1777 1778 document.body.style.overflow = ''; 1779 1780 this.focusable = []; 1781 1782 if (this.activeTrigger) { 1783 this.activeTrigger.focus({ preventScroll: true }); 1784 this.activeTrigger = null; 1785 } 1786 1787 this.activePanel = null; 1788 } 1789 1790 buildFocusable(panel) { 1791 1792 this.focusable = Array.from( 1793 panel.querySelectorAll( 1794 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])' 1795 ) 1796 ).filter(el => el.getClientRects().length); 1797 } 1798 1799 trapFocus(e) { 1800 1801 const focusable = this.focusable; 1802 if (!focusable.length) return; 1803 1804 const first = focusable[0]; 1805 const last = focusable[focusable.length - 1]; 1806 const active = document.activeElement; 1807 1808 if (e.shiftKey && active === first) { 1809 e.preventDefault(); 1810 last.focus(); 1811 } 1812 1813 if (!e.shiftKey && active === last) { 1814 e.preventDefault(); 1815 first.focus(); 1816 } 1817 } 1818 1819 syncTriggers(expanded, active = null) { 1820 1821 this.openButtons.forEach(btn => { 1822 1823 if (!expanded) { 1824 btn.setAttribute('aria-expanded', 'false'); 1825 return; 1826 } 1827 1828 btn.setAttribute( 1829 'aria-expanded', 1830 btn.dataset.lightboxOpen === active ? 'true' : 'false' 1831 ); 1832 }); 1833 } 1834 1835 handleTopicsOverflow() { 1836 1837 if (this.html.dataset.lightboxOpen !== 'topics') { 1838 document.body.style.overflow = ''; 1839 return; 1840 } 1841 1842 const panel = this.activePanel; 1843 1844 if (!this.header || !panel) { 1845 document.body.style.overflow = ''; 1846 return; 1847 } 1848 1849 const windowHeight = window.innerHeight; 1850 const headerHeight = this.header.offsetHeight; 1851 const panelHeight = panel.offsetHeight; 1852 1853 if (headerHeight + panelHeight < windowHeight) { 1854 document.body.style.overflow = 'hidden'; 1855 } else { 1856 document.body.style.overflow = ''; 1857 } 1858 } 1859} 1860 1861class PrimaryNavCoordinator { 1862 1863 constructor() { 1864 1865 this.aside = document.getElementById('MenuAside'); 1866 this.lightboxes = [...document.querySelectorAll('.Lightbox')]; 1867 1868 document.addEventListener('sitenav:aside-open', () => { 1869 this.closeLightboxes(); 1870 }); 1871 1872 document.addEventListener('sitenav:lightbox-open', () => { 1873 this.closeAside(); 1874 }); 1875 } 1876 1877 closeAside() { 1878 1879 const aside = this.aside; 1880 if (!aside || !aside.classList.contains('is-open')) return; 1881 1882 const controller = aside._controller; 1883 if (controller) controller.close(); 1884 } 1885 1886 closeLightboxes() { 1887 1888 for (const panel of this.lightboxes) { 1889 1890 if (!panel.classList.contains('is-open')) continue; 1891 1892 const controller = panel._controller; 1893 if (controller) controller.close(); 1894 1895 break; 1896 } 1897 } 1898} 1899 1900function priorityNav() { 1901 const runPriority = () => { 1902 const primaryList = document.querySelector('.PrimaryNav__list'); 1903 1904 if (!primaryList) return; 1905 1906 const items = [...primaryList.children]; 1907
1908 items.forEach(item => { 1909 item.style.position = ''; 1910 item.style.top = ''; 1911 item.style.visibility = 'visible'; 1912 }); 1913 1914 if (window.innerWidth <= 768) return; 1915 1916 const totalWidth = primaryList.getBoundingClientRect().width; 1917 const logoBuffer = 120; // Change this number to adjust the gap 1918 const availableWidth = totalWidth - logoBuffer; 1919 1920 const gap = parseFloat(window.getComputedStyle(primaryList).gap) || 0; 1921 let usedWidth = 0; 1922 1923 items.forEach((item, index) => { 1924 usedWidth += item.getBoundingClientRect().width; 1925 1926 if (index > 0) { 1927 usedWidth += gap; 1928 } 1929 1930 if (usedWidth > availableWidth) { 1931 item.style.position = 'absolute'; 1932 item.style.top = '-9999px'; 1933 item.style.visibility = 'hidden'; 1934 } 1935 }); 1936 }; 1937 1938 let resizeFrame; 1939 1940 const schedulePriority = () => { 1941 cancelAnimationFrame(resizeFrame); 1942 resizeFrame = requestAnimationFrame(runPriority); 1943 }; 1944 1945 runPriority(); 1946 window.addEventListener('resize', schedulePriority); 1947} 1948 1949document.addEventListener('DOMContentLoaded', () => { 1950 priorityNav(); 1951 1952 const audience = ( 1953 document.documentElement.getAttribute('data-audience') || 1954 document.body.getAttribute('data-audience') || 1955 '' 1956 ) 1957 .trim() 1958 .toLowerCase() 1959 .replace(/\s+/g, ''); 1960 1961 if ( audience !== 'consumer' ) { 1962 new PrimaryNavPersistent(); 1963 } 1964 1965 // PrimaryNavDropdown.init(); 1966 new PrimaryNavCoordinator(); 1967 1968 let aside; 1969 let lightbox; 1970 1971 document.addEventListener('click', (e) => { 1972 1973 const asideTrigger = e.target.closest('[data-menu-open]'); 1974 if (asideTrigger && !aside) { 1975 1976 aside = new MenuAsideController(); 1977 document.getElementById('MenuAside')._controller = aside; 1978 1979 document 1980 .querySelectorAll('.MenuAside__section') 1981 .forEach(nav => new MenuGroupController(nav)); 1982 1983 asideTrigger.click(); 1984 return; 1985 } 1986 1987 const lightboxTrigger = e.target.closest('[data-lightbox-open]'); 1988 if (lightboxTrigger && !lightbox) { 1989 1990 lightbox = new LightboxController(); 1991 1992 document 1993 .querySelectorAll('.Lightbox') 1994 .forEach(lb => lb._controller = lightbox); 1995 1996 lightboxTrigger.click(); 1997 } 1998 1999 }); 2000}); 2001 2002; 2003/** 2004 * A class to handle the toggling of content visibility with options. 2005 */ 2006 2007class ToggleContentVisibility { 2008 /** 2009 * @param {Element} node - The DOM element to apply the toggle behavior. 2010 * @param {Object} options - Configuration options for the class. 2011 */ 2012 constructor(node, options = {}) { 2013 if (!(node instanceof Element)) { 2014 throw new Error('Input node is not a valid DOM element.'); 2015 } 2016 2017 this.node = node; 2018 this.options = this.setOptions(options); 2019 this.elements = node.querySelectorAll( 2020 Array.isArray(this.options.targetElements) ? this.options.targetElements.join(', ') : '', 2021 ); 2022 this.showingMore = false; 2023 this.readMoreButton = this.node.querySelector('.read-more'); 2024 this.readLessButton = this.node.querySelector('.read-less'); 2025 2026 this.toggleContentBound = this.toggleContent.bind(this); // Bind method once 2027 2028 this.initialize(); 2029 } 2030 2031 setOptions(options) { 2032 const defaults = { 2033 initialIndex: 2, 2034 showReadLess: false, 2035 targetElements: [ 2036 'h1', 2037 'h2', 2038 'h3', 2039 'h4', 2040 'h5', 2041 'h6', 2042 'p', 2043 'blockquote', 2044 'pre', 2045 'address', 2046 'figcaption', 2047 'details', 2048 'ul', 2049 'ol', 2050 'dl', 2051 'table', 2052 'img', 2053 'video', 2054 'audio', 2055 'canvas', 2056 'iframe', 2057 'figure', 2058 'script', 2059 'noscript', 2060 'style', 2061 'form', 2062 'hr', 2063 'svg', 2064 ], 2065 position: 'after', 2066 readMoreText: 'Read more', 2067 readLessText: 'Read less', 2068 transitionEffect: null, 2069 }; 2070 2071 const readMoreAttribute = this.node.getAttribute('data-readmore'); 2072 const readLessAttribute = this.node.getAttribute('data-readless'); 2073 const readMoreCountAttribute = this.node.getAttribute('data-readmore-count'); 2074 2075 const parsedCount = parseInt(readMoreCountAttribute, 10); 2076 const initialIndex = Number.isNaN(parsedCount) ? defaults.initialIndex : parsedCount; 2077 2078 return { 2079 ...defaults, 2080 ...options, 2081 initialIndex, 2082 showReadLess: readLessAttribute !== 'false', 2083 readMoreText: readMoreAttribute || defaults.readMoreText, 2084 readLessText: readLessAttribute || defaults.readLessText, 2085 }; 2086 } 2087 2088 initialize() { 2089 if (this.elements.length === 0) return; // No elements, nothing to toggle 2090 if (this.options.initialIndex >= this.elements.length) { 2091 this.showingMore = true; 2092 return; 2093 } 2094 2095 if (!this.node.id) { 2096 this.node.id = `readmore-${Math.random().toString(36).substr(2, 9)}`; 2097 } 2098
2099 Array.from(this.elements).forEach((element, i) => { 2100 element.classList.toggle('hidden', i >= this.options.initialIndex); 2101 element.setAttribute('aria-hidden', i >= this.options.initialIndex); 2102 }); 2103 2104 this.showingMore = false; 2105 2106 if (!this.readMoreButton) { 2107 this.readMoreButton = ToggleContentVisibility.createControlButton( 2108 this.options.readMoreText, 2109 ['read-more'], 2110 this.toggleContentBound, 2111 ); 2112 this.appendControlButton(this.readMoreButton); 2113 } 2114 2115 if (this.options.showReadLess && !this.readLessButton) { 2116 this.readLessButton = ToggleContentVisibility.createControlButton( 2117 this.options.readLessText, 2118 ['read-less'], 2119 this.toggleContentBound, 2120 ); 2121 this.appendControlButton(this.readLessButton); 2122 } 2123 2124 this.node.setAttribute('aria-expanded', this.showingMore); 2125 this.manageButtonState(); 2126 } 2127 2128 static initAll() { 2129 const nodes = document.querySelectorAll('[data-readmore]'); 2130 nodes.forEach(node => { 2131 new ToggleContentVisibility(node); // eslint-disable-line no-new 2132 }); 2133 } 2134 2135 refresh() { 2136 this.destroy(); 2137 this.initialize(); 2138 } 2139 2140 update(newOptions) { 2141 this.options = this.setOptions({ ...this.options, ...newOptions }); 2142 this.refresh(); 2143 } 2144 2145 destroy() { 2146 this.showingMore = false; 2147 if (this.readMoreButton) { 2148 this.readMoreButton.removeEventListener('click', this.toggleContentBound); 2149 this.readMoreButton.remove(); 2150 this.readMoreButton = null; 2151 } 2152 2153 if (this.readLessButton) { 2154 this.readLessButton.removeEventListener('click', this.toggleContentBound); 2155 this.readLessButton.remove(); 2156 this.readLessButton = null; 2157 } 2158 2159 Array.from(this.elements).forEach(element => { 2160 element.classList.remove('hidden'); 2161 element.removeAttribute('aria-hidden'); 2162 }); 2163 2164 this.node.removeAttribute('aria-expanded'); 2165 } 2166 2167 toggleContent() { 2168 if (this.node.getAttribute('data-readless') === null) { 2169 this.showContent(); 2170 this.readMoreButton.remove(); 2171 if (this.readLessButton) { 2172 this.readLessButton.remove(); 2173 this.readLessButton = null; 2174 } 2175 } else if (this.showingMore) { 2176 this.hideContent(); 2177 } else { 2178 this.showContent(); 2179 } 2180 } 2181 2182 showContent() { 2183 this.showingMore = true; 2184 this.toggleElementsVisibility(true); 2185 this.manageButtonState(); 2186 } 2187 2188 hideContent() { 2189 this.showingMore = false; 2190 this.toggleElementsVisibility(false); 2191 this.manageButtonState(); 2192 } 2193 2194 toggleElementsVisibility(isVisible) { 2195 Array.from(this.elements) 2196 .slice(this.options.initialIndex) 2197 .forEach(element => { 2198 element.classList.toggle('hidden', !isVisible); 2199 element.setAttribute('aria-hidden', !isVisible); 2200 }); 2201 2202 this.node.setAttribute('aria-expanded', isVisible); 2203 } 2204 2205 manageButtonState() { 2206 if (this.showingMore) { 2207 this.configureReadLessButton(); 2208 } else { 2209 this.configureReadMoreButton(); 2210 } 2211 } 2212 2213 configureReadMoreButton() { 2214 if (this.readMoreButton) { 2215 this.readMoreButton.classList.remove('hidden'); 2216 this.readMoreButton.setAttribute('aria-hidden', 'false'); 2217 } 2218 if (this.readLessButton) { 2219 this.readLessButton.classList.add('hidden'); 2220 this.readLessButton.setAttribute('aria-hidden', 'true'); 2221 } 2222 } 2223 2224 configureReadLessButton() { 2225 if (this.readMoreButton) { 2226 this.readMoreButton.classList.add('hidden'); 2227 this.readMoreButton.setAttribute('aria-hidden', 'true'); 2228 } 2229 if (this.readLessButton) { 2230 this.readLessButton.classList.remove('hidden'); 2231 this.readLessButton.setAttribute('aria-hidden', 'false'); 2232 } 2233 } 2234 2235 static createControlButton(text, classNames, handler) { 2236 const button = document.createElement('button'); 2237 button.textContent = text; 2238 button.classList.add(...classNames); 2239 button.addEventListener('click', handler); 2240 return button; 2241 } 2242 2243 appendControlButton(button) { 2244 if (this.node.parentNode) { 2245 this.node.appendChild(button); 2246 } 2247 } 2248 } 2249 2250 2251ToggleContentVisibility.initAll(); 2252 ; 2253(() => { 2254 class dataLayerTracker { 2255 static VERSION = "1.0.0"; 2256 2257 constructor({ 2258 debug = false, 2259 prefix = "[DATA LAYER TRACKER]", 2260 analyticsVendor = "Google Analytics", 2261 trackers = [], 2262 dimensions = {} 2263 } = {}) { 2264 this.debug = debug === true; 2265 this.prefix = prefix; 2266 this.analyticsVendor = analyticsVendor; 2267 this.trackers = Array.isArray(trackers) ? trackers : []; 2268 2269 this.dimensions = ( 2270 dimensions && 2271 typeof dimensions === "object" && 2272 !Array.isArray(dimensions) 2273 ) 2274 ? { ...dimensions } 2275 : {}; 2276 2277 this.initialized = false;
2278 this.destroyed = false; 2279 2280 this.firedEvents = new Set(); 2281 2282 this.handleConsentManagerReady = this.handleConsentManagerReady.bind(this); 2283 this.handleDocumentClick = this.handleDocumentClick.bind(this); 2284 } 2285 2286 log(...args) { 2287 if (!this.debug) { 2288 return; 2289 } 2290 2291 console.log(this.prefix, ...args); 2292 } 2293 2294 warn(...args) { 2295 if (!this.debug) { 2296 return; 2297 } 2298 2299 console.warn(this.prefix, ...args); 2300 } 2301 2302 error(...args) { 2303 if (!this.debug) { 2304 return; 2305 } 2306 2307 console.error(this.prefix, ...args); 2308 } 2309 2310 group(label, callback) { 2311 if (!this.debug || typeof callback !== "function") { 2312 return; 2313 } 2314 2315 console.groupCollapsed(`${this.prefix} ${label}`); 2316 2317 try { 2318 callback(); 2319 } catch (error) { 2320 console.error(this.prefix, "Debug group failed.", error); 2321 } finally { 2322 console.groupEnd(); 2323 } 2324 } 2325 2326 hasAnalyticsConsent() { 2327 if ( 2328 typeof window.consentManager?.checkConsentByVendor !== "function" 2329 ) { 2330 this.log("Consent Manager is unavailable."); 2331 return false; 2332 } 2333 2334 try { 2335 return ( 2336 window.consentManager.checkConsentByVendor( 2337 this.analyticsVendor 2338 ) === true 2339 ); 2340 } catch (error) { 2341 this.error("Consent check failed.", error); 2342 return false; 2343 } 2344 } 2345 2346 getDataLayer() { 2347 if (!Array.isArray(window.dataLayer)) { 2348 this.log("window.dataLayer is unavailable."); 2349 return null; 2350 } 2351 2352 return window.dataLayer; 2353 } 2354 2355 getDimensions() { 2356 return { ...this.dimensions }; 2357 } 2358 2359 setDimensions(dimensions = {}) { 2360 if ( 2361 !dimensions || 2362 typeof dimensions !== "object" || 2363 Array.isArray(dimensions) 2364 ) { 2365 this.warn("Invalid dimensions.", dimensions); 2366 return false; 2367 } 2368 2369 if (!this.hasAnalyticsConsent()) { 2370 this.log("Dimensions blocked because analytics consent is unavailable."); 2371 return false; 2372 } 2373 2374 const dataLayer = this.getDataLayer(); 2375 2376 if (!dataLayer) { 2377 return false; 2378 } 2379 2380 const normalizedDimensions = Object.fromEntries( 2381 Object.entries(dimensions).filter(([key]) => ( 2382 typeof key === "string" && 2383 key.trim().length > 0 2384 )) 2385 ); 2386 2387 if (!Object.keys(normalizedDimensions).length) { 2388 return false; 2389 } 2390 2391 this.dimensions = { 2392 ...this.dimensions, 2393 ...normalizedDimensions 2394 }; 2395 2396 try { 2397 dataLayer.push({ ...normalizedDimensions }); 2398 } catch (error) { 2399 this.error("Data layer dimension push failed.", { 2400 dimensions: normalizedDimensions, 2401 error 2402 }); 2403 2404 return false; 2405 } 2406 2407 this.log("Data layer dimensions updated.", normalizedDimensions); 2408 2409 return true; 2410 } 2411 2412 2413 isValidEventName(eventName) { 2414 return ( 2415 typeof eventName === "string" && 2416 eventName.trim().length > 0 2417 ); 2418 } 2419 2420 isValidPayload(payload) { 2421 return ( 2422 payload === undefined || 2423 ( 2424 payload !== null && 2425 typeof payload === "object" && 2426 !Array.isArray(payload) 2427 ) 2428 ); 2429 } 2430 2431 hasEventFired(eventKey) { 2432 return this.firedEvents.has(eventKey); 2433 } 2434 2435 markEventAsFired(eventKey) { 2436 if (typeof eventKey !== "string" || !eventKey) { 2437 return; 2438 } 2439 2440 this.firedEvents.add(eventKey); 2441 } 2442 2443 resetEvent(eventKey) { 2444 if (typeof eventKey !== "string" || !eventKey) { 2445 return; 2446 } 2447 2448 this.firedEvents.delete(eventKey); 2449 } 2450 2451 resetEvents() { 2452 this.firedEvents.clear(); 2453 } 2454 2455 buildEventKey(eventName, key = "") { 2456 return key 2457 ? `${eventName}:${key}` 2458 : eventName; 2459 } 2460 2461 buildPayload(eventName, payload = {}) { 2462 return { 2463 ...this.dimensions, 2464 ...payload, 2465 event: eventName 2466 }; 2467 } 2468 2469 pushEvent(eventName, payload = {}, { 2470 once = true, 2471 key = "" 2472 } = {}) { 2473 if (!this.isValidEventName(eventName)) { 2474 this.warn("Invalid event name.", eventName); 2475 return false;
2476 } 2477 2478 if (!this.isValidPayload(payload)) { 2479 this.warn("Invalid event payload.", payload); 2480 return false; 2481 } 2482 2483 const normalizedEventName = eventName.trim(); 2484 const eventKey = this.buildEventKey(normalizedEventName, key); 2485 2486 if (once && this.hasEventFired(eventKey)) { 2487 return false; 2488 } 2489 2490 if (!this.hasAnalyticsConsent()) { 2491 this.log( 2492 "Event blocked because analytics consent is unavailable.", 2493 normalizedEventName 2494 ); 2495 2496 return false; 2497 } 2498 2499 const dataLayer = this.getDataLayer(); 2500 2501 if (!dataLayer) { 2502 return false; 2503 } 2504 2505 const eventPayload = this.buildPayload( 2506 normalizedEventName, 2507 payload 2508 ); 2509 2510 try { 2511 dataLayer.push(eventPayload); 2512 } catch (error) { 2513 this.error("Data layer push failed.", { 2514 eventName: normalizedEventName, 2515 payload: eventPayload, 2516 error 2517 }); 2518 2519 return false; 2520 } 2521 2522 if (once) { 2523 this.markEventAsFired(eventKey); 2524 } 2525 2526 this.group("Data layer event pushed", () => { 2527 console.log("Event:", normalizedEventName); 2528 console.log("Key:", eventKey); 2529 console.log("Payload:", eventPayload); 2530 console.log("Data layer length:", dataLayer.length); 2531 }); 2532 2533 return true; 2534 } 2535 2536 validateSelector(selector) { 2537 if (typeof selector !== "string" || !selector.trim()) { 2538 return false; 2539 } 2540 2541 try { 2542 document.querySelector(selector); 2543 return true; 2544 } catch (error) { 2545 this.error("Invalid selector.", { 2546 selector, 2547 error 2548 }); 2549 2550 return false; 2551 } 2552 } 2553 2554 getElements(selector) { 2555 if (!this.validateSelector(selector)) { 2556 return []; 2557 } 2558 2559 try { 2560 return Array.from(document.querySelectorAll(selector)); 2561 } catch (error) { 2562 this.error("Element lookup failed.", { 2563 selector, 2564 error 2565 }); 2566 2567 return []; 2568 } 2569 } 2570 2571 isElementVisible(element) { 2572 if (!(element instanceof HTMLElement)) { 2573 return false; 2574 } 2575 2576 if (!element.isConnected) { 2577 return false; 2578 } 2579 2580 if ( 2581 element.hidden || 2582 element.getAttribute("aria-hidden") === "true" || 2583 element.closest('[hidden], [inert], [aria-hidden="true"]') 2584 ) { 2585 return false; 2586 } 2587 2588 const style = window.getComputedStyle(element); 2589 2590 if ( 2591 style.display === "none" || 2592 style.visibility === "hidden" || 2593 style.visibility === "collapse" || 2594 Number.parseFloat(style.opacity) <= 0 2595 ) { 2596 return false; 2597 } 2598 2599 const rect = element.getBoundingClientRect(); 2600 2601 if (rect.width <= 0 || rect.height <= 0) { 2602 return false; 2603 } 2604 2605 return ( 2606 rect.bottom > 0 && 2607 rect.right > 0 && 2608 rect.top < window.innerHeight && 2609 rect.left < window.innerWidth 2610 ); 2611 } 2612 2613 handleVisibleElement(element, tracker) { 2614 if ( 2615 !tracker || 2616 !this.isValidEventName(tracker.visibleEvent) || 2617 !this.isElementVisible(element) 2618 ) { 2619 return false; 2620 } 2621 2622 const eventKey = this.buildEventKey( 2623 tracker.visibleEvent, 2624 tracker.visibleSelector 2625 ); 2626 2627 if (this.hasEventFired(eventKey)) { 2628 return false;
2629 } 2630 2631 if (tracker.visibleDimensions) { 2632 this.setDimensions(tracker.visibleDimensions); 2633 } 2634 2635 const pushed = this.pushEvent( 2636 tracker.visibleEvent, 2637 tracker.visiblePayload || {}, 2638 { 2639 once: true, 2640 key: tracker.visibleSelector 2641 } 2642 ); 2643 2644 if (!pushed) { 2645 return false; 2646 } 2647 2648 this.intersectionObserver?.unobserve(element); 2649 2650 this.log("Visible element tracked.", { 2651 selector: tracker.visibleSelector, 2652 element, 2653 event: tracker.visibleEvent 2654 }); 2655 2656 return true; 2657 } 2658 2659 handleClickedElement(element, tracker, event) { 2660 if ( 2661 !tracker || 2662 !this.isValidEventName(tracker.clickEvent) || 2663 !(element instanceof HTMLElement) || 2664 !this.isElementVisible(element) 2665 ) { 2666 return false; 2667 } 2668 2669 const pushed = this.pushEvent( 2670 tracker.clickEvent, 2671 tracker.clickPayload || {}, 2672 { 2673 once: true, 2674 key: tracker.clickSelector 2675 } 2676 ); 2677 2678 if (pushed) { 2679 this.log("Clicked element tracked.", { 2680 selector: tracker.clickSelector, 2681 element, 2682 event: tracker.clickEvent, 2683 originalEvent: event 2684 }); 2685 } 2686 2687 return pushed; 2688 } 2689 2690 checkVisibleElements() { 2691 for (const tracker of this.trackers) { 2692 if (!this.validateSelector(tracker?.visibleSelector)) { 2693 continue; 2694 } 2695 2696 const eventKey = this.buildEventKey( 2697 tracker.visibleEvent, 2698 tracker.visibleSelector 2699 ); 2700 2701 if (this.hasEventFired(eventKey)) { 2702 continue; 2703 } 2704 2705 const elements = this.getElements(tracker.visibleSelector); 2706 2707 for (const element of elements) { 2708 if (this.handleVisibleElement(element, tracker)) { 2709 break; 2710 } 2711 } 2712 } 2713 } 2714 2715 observeElements() { 2716 if (typeof MutationObserver !== "function") { 2717 this.warn("MutationObserver is unavailable."); 2718 return; 2719 } 2720 2721 this.mutationObserver = new MutationObserver(() => { 2722 this.observeCurrentElements(); 2723 this.checkVisibleElements(); 2724 }); 2725 2726 this.mutationObserver.observe(document.documentElement, { 2727 childList: true, 2728 subtree: true, 2729 attributes: true, 2730 attributeFilter: [ 2731 "class", 2732 "style", 2733 "hidden", 2734 "aria-hidden" 2735 ] 2736 }); 2737 2738 if (typeof IntersectionObserver !== "function") { 2739 this.warn("IntersectionObserver is unavailable."); 2740 return; 2741 } 2742 2743 this.intersectionObserver = new IntersectionObserver(entries => { 2744 for (const entry of entries) { 2745 if (!entry.isIntersecting) { 2746 continue; 2747 } 2748 2749 for (const tracker of this.trackers) { 2750 if ( 2751 this.validateSelector(tracker?.visibleSelector) && 2752 entry.target.matches(tracker.visibleSelector) 2753 ) { 2754 this.handleVisibleElement(entry.target, tracker); 2755 } 2756 } 2757 } 2758 }, { 2759 threshold: 0.01 2760 }); 2761 2762 this.observeCurrentElements(); 2763 } 2764 2765 observeCurrentElements() { 2766 if (!this.intersectionObserver) { 2767 return; 2768 } 2769 2770 for (const tracker of this.trackers) { 2771 if (!this.validateSelector(tracker?.visibleSelector)) { 2772 continue; 2773 } 2774 2775 const eventKey = this.buildEventKey( 2776 tracker.visibleEvent, 2777 tracker.visibleSelector 2778 ); 2779 2780 if (this.hasEventFired(eventKey)) { 2781 continue; 2782 } 2783 2784 const elements = this.getElements(tracker.visibleSelector); 2785 2786 for (const element of elements) { 2787 this.intersectionObserver.observe(element); 2788 } 2789 } 2790 } 2791 2792 disconnectObservers() { 2793 this.mutationObserver?.disconnect(); 2794 this.intersectionObserver?.disconnect(); 2795 2796 this.mutationObserver = null; 2797 this.intersectionObserver = null; 2798 } 2799 2800 handleDocumentClick(event) { 2801 if (!(event.target instanceof Element)) { 2802 return; 2803 } 2804 2805 for (const tracker of this.trackers) { 2806 if (!this.validateSelector(tracker?.clickSelector)) { 2807 continue; 2808 } 2809 2810 const clickedElement = event.target.closest(tracker.clickSelector); 2811 2812 if (!(clickedElement instanceof HTMLElement)) { 2813 continue; 2814 } 2815 2816 this.handleClickedElement(clickedElement, tracker, event); 2817 } 2818 } 2819 2820 attachEventListeners() { 2821 document.addEventListener( 2822 "click", 2823 this.handleDocumentClick, 2824 true 2825 ); 2826 } 2827 2828 detachEventListeners() { 2829 document.removeEventListener( 2830 "click", 2831 this.handleDocumentClick, 2832 true 2833 ); 2834 } 2835 2836 handleConsentManagerReady() { 2837 this.initialize(); 2838 } 2839 2840 initialize() { 2841 if (this.initialized || this.destroyed) { 2842 return false;
2843 } 2844 2845 if (!this.hasAnalyticsConsent()) { 2846 this.log("Analytics consent was not granted."); 2847 return false; 2848 } 2849 2850 this.initialized = true; 2851 2852 this.setDimensions(this.dimensions); 2853 2854 this.attachEventListeners(); 2855 this.observeElements(); 2856 this.checkVisibleElements(); 2857 2858 this.log( 2859 `Tracking initialized v${dataLayerTracker.VERSION}.`, 2860 { 2861 trackers: this.trackers.length, 2862 dimensions: this.getDimensions() 2863 } 2864 ); 2865 2866 return true; 2867 } 2868 2869 registerConsentManager() { 2870 document.addEventListener( 2871 "consentManagerReady", 2872 this.handleConsentManagerReady 2873 ); 2874 2875 if (window.consentManager?.eventDispatched === true) { 2876 this.initialize(); 2877 return; 2878 } 2879 2880 this.log("Waiting for consentManagerReady."); 2881 } 2882 2883 destroy() { 2884 if (this.destroyed) { 2885 return; 2886 } 2887 2888 document.removeEventListener( 2889 "consentManagerReady", 2890 this.handleConsentManagerReady 2891 ); 2892 2893 this.detachEventListeners(); 2894 this.disconnectObservers(); 2895 this.resetEvents(); 2896 2897 this.initialized = false; 2898 this.destroyed = true; 2899 2900 this.log("Tracking destroyed."); 2901 } 2902 } 2903 2904 const welcomeAdTracker = { 2905 visibleSelector: '.ad-overlay[data-ad-template="overlay"]', 2906 visibleEvent: "welcome_ad_shown", 2907 visiblePayload: { 2908 welcome_ad_shown: true, 2909 welcome_ad_closed: false 2910 }, 2911 2912 clickSelector: '.ad-overlay[data-ad-template="overlay"] #superstitial-text', 2913 clickEvent: "welcome_ad_closed", 2914 clickPayload: { 2915 welcome_ad_shown: true, 2916 welcome_ad_closed: true 2917 } 2918 }; 2919 2920 const topScrollerTracker = { 2921 visibleSelector: '[data-adnm-fid="adnami-canvas-desktop-topscroll"]', 2922 visibleEvent: "topscroller_ad_shown", 2923 2924 visibleDimensions: { 2925 topscroller_ad_shown: true 2926 } 2927 }; 2928 2929 const tracker = new dataLayerTracker({ 2930 debug: true, 2931 prefix: "[DATA LAYER TRACKER]", 2932 analyticsVendor: "Google Analytics", 2933 2934 dimensions: { 2935 topscroller_ad_shown: false 2936 }, 2937 2938 trackers: [ 2939 welcomeAdTracker, 2940 topScrollerTracker 2941 ] 2942 }); 2943 2944 tracker.registerConsentManager(); 2945 2946})();; 2947/*! 2948 Highlight.js v11.9.0 (git: f47103d4f1) 2949 (c) 2006-2023 undefined and other contributors 2950 License: BSD-3-Clause 2951 */ 2952 var hljs=function(){"use strict";function e(n){ 2953 return n instanceof Map?n.clear=n.delete=n.set=()=>{ 2954 throw Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=()=>{ 2955 throw Error("set is read-only") 2956 }),Object.freeze(n),Object.getOwnPropertyNames(n).forEach((t=>{ 2957 const a=n[t],i=typeof a;"object"!==i&&"function"!==i||Object.isFrozen(a)||e(a) 2958 })),n}class n{constructor(e){ 2959 void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} 2960 ignoreMatch(){this.isMatchIgnored=!0}}function t(e){ 2961 return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'") 2962 }function a(e,...n){const t=Object.create(null);for(const n in e)t[n]=e[n] 2963 ;return n.forEach((e=>{for(const n in e)t[n]=e[n]})),t}const i=e=>!!e.scope 2964 ;class r{constructor(e,n){ 2965 this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){ 2966 this.buffer+=t(e)}openNode(e){if(!i(e))return;const n=((e,{prefix:n})=>{ 2967 if(e.startsWith("language:"))return e.replace("language:","language-") 2968 ;if(e.includes(".")){const t=e.split(".") 2969 ;return[`${n}${t.shift()}`,...t.map(((e,n)=>`${e}${"_".repeat(n+1)}`))].join(" ") 2970 }return`${n}${e}`})(e.scope,{prefix:this.classPrefix});this.span(n)} 2971 closeNode(e){i(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){ 2972 this.buffer+=`<span class="${e}">`}}const s=(e={})=>{const n={children:[]} 2973 ;return Object.assign(n,e),n};class o{constructor(){ 2974 this.rootNode=s(),this.stack=[this.rootNode]}get top(){ 2975 return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ 2976 this.top.children.push(e)}openNode(e){const n=s({scope:e}) 2977 ;this.add(n),this.stack.push(n)}closeNode(){ 2978 if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ 2979 for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} 2980 walk(e){return this.constructor._walk(e,this.rootNode)}
2980static _walk(e,n){ 2981 return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n), 2982 n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(e){ 2983 "string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ 2984 o._collapse(e)})))}}class l extends o{constructor(e){super(),this.options=e} 2985 addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){ 2986 this.closeNode()}__addSublanguage(e,n){const t=e.root 2987 ;n&&(t.scope="language:"+n),this.add(t)}toHTML(){ 2988 return new r(this,this.options).value()}finalize(){ 2989 return this.closeAllNodes(),!0}}function c(e){ 2990 return e?"string"==typeof e?e:e.source:null}function d(e){return b("(?=",e,")")} 2991 function g(e){return b("(?:",e,")*")}function u(e){return b("(?:",e,")?")} 2992 function b(...e){return e.map((e=>c(e))).join("")}function m(...e){const n=(e=>{ 2993 const n=e[e.length-1] 2994 ;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} 2995 })(e);return"("+(n.capture?"":"?:")+e.map((e=>c(e))).join("|")+")"} 2996 function p(e){return RegExp(e.toString()+"|").exec("").length-1} 2997 const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ 2998 ;function h(e,{joinWith:n}){let t=0;return e.map((e=>{t+=1;const n=t 2999 ;let a=c(e),i="";for(;a.length>0;){const e=_.exec(a);if(!e){i+=a;break} 3000 i+=a.substring(0,e.index), 3001 a=a.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+(Number(e[1])+n):(i+=e[0], 3002 "("===e[0]&&t++)}return i})).map((e=>`(${e})`)).join(n)} 3003 const f="[a-zA-Z]\\w*",E="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",N="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",w="\\b(0b[01]+)",v={ 3004 begin:"\\\\[\\s\\S]",relevance:0},O={scope:"string",begin:"'",end:"'", 3005 illegal:"\\n",contains:[v]},k={scope:"string",begin:'"',end:'"',illegal:"\\n", 3006 contains:[v]},x=(e,n,t={})=>{const i=a({scope:"comment",begin:e,end:n, 3007 contains:[]},t);i.contains.push({scope:"doctag", 3008 begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", 3009 end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}) 3010 ;
vendor: 11,693 bytes, lines 3010-3175
3010const r=m("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/) 3011 ;return i.contains.push({begin:b(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i 3012 },M=x("//","$"),S=x("/\\*","\\*/"),A=x("#","$");var C=Object.freeze({ 3013 __proto__:null,APOS_STRING_MODE:O,BACKSLASH_ESCAPE:v,BINARY_NUMBER_MODE:{ 3014 scope:"number",begin:w,relevance:0},BINARY_NUMBER_RE:w,COMMENT:x, 3015 C_BLOCK_COMMENT_MODE:S,C_LINE_COMMENT_MODE:M,C_NUMBER_MODE:{scope:"number", 3016 begin:N,relevance:0},C_NUMBER_RE:N,END_SAME_AS_BEGIN:e=>Object.assign(e,{ 3017 "on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{ 3018 n.data._beginMatch!==e[1]&&n.ignoreMatch()}}),HASH_COMMENT_MODE:A,IDENT_RE:f, 3019 MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+E,relevance:0}, 3020 NUMBER_MODE:{scope:"number",begin:y,relevance:0},NUMBER_RE:y, 3021 PHRASAL_WORDS_MODE:{ 3022 begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ 3023 },QUOTE_STRING_MODE:k,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/, 3024 end:/\/[gimuy]*/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,contains:[v]}]}, 3025 RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", 3026 SHEBANG:(e={})=>{const n=/^#![ ]*\// 3027 ;return e.binary&&(e.begin=b(n,/.*\b/,e.binary,/\b.*/)),a({scope:"meta",begin:n, 3028 end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)}, 3029 TITLE_MODE:{scope:"title",begin:f,relevance:0},UNDERSCORE_IDENT_RE:E, 3030 UNDERSCORE_TITLE_MODE:{scope:"title",begin:E,relevance:0}});function T(e,n){ 3031 "."===e.input[e.index-1]&&n.ignoreMatch()}function R(e,n){ 3032 void 0!==e.className&&(e.scope=e.className,delete e.className)}function D(e,n){ 3033 n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", 3034 e.__beforeBegin=T,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, 3035 void 0===e.relevance&&(e.relevance=0))}function I(e,n){ 3036 Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function L(e,n){ 3037 if(e.match){ 3038 if(e.begin||e.end)throw Error("begin & end are not supported with match") 3039 ;e.begin=e.match,delete e.match}}function B(e,n){ 3040 void 0===e.relevance&&(e.relevance=1)}const $=(e,n)=>{if(!e.beforeMatch)return 3041 ;if(e.starts)throw Error("beforeMatch cannot be used with starts") 3042 ;const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n] 3043 })),e.keywords=t.keywords,e.begin=b(t.beforeMatch,d(t.begin)),e.starts={ 3044 relevance:0,contains:[Object.assign(t,{endsParent:!0})] 3045 },e.relevance=0,delete t.beforeMatch 3046 },z=["of","and","for","in","not","or","if","then","parent","list","value"],F="keyword" 3047 ;function U(e,n,t=F){const a=Object.create(null) 3048 ;return"string"==typeof e?i(t,e.split(" ")):Array.isArray(e)?i(t,e):Object.keys(e).forEach((t=>{ 3049 Object.assign(a,U(e[t],n,t))})),a;function i(e,t){ 3050 n&&(t=t.map((e=>e.toLowerCase()))),t.forEach((n=>{const t=n.split("|") 3051 ;a[t[0]]=[e,j(t[0],t[1])]}))}}function j(e,n){ 3052 return n?Number(n):(e=>z.includes(e.toLowerCase()))(e)?0:1}const P={},K=e=>{ 3053 console.error(e)},H=(e,...n)=>{console.log("WARN: "+e,...n)},q=(e,n)=>{ 3054 P[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),P[`${e}/${n}`]=!0) 3055 },G=Error();function Z(e,n,{key:t}){let a=0;const i=e[t],r={},s={} 3056 ;for(let e=1;e<=n.length;e++)s[e+a]=i[e],r[e+a]=!0,a+=p(n[e-1]) 3057 ;e[t]=s,e[t]._emit=r,e[t]._multi=!0}function W(e){(e=>{ 3058 e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, 3059 delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ 3060 _wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope 3061 }),(e=>{if(Array.isArray(e.begin)){ 3062 if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), 3063 G 3064 ;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"), 3065 G;Z(e,e.begin,{key:"beginScope"}),e.begin=h(e.begin,{joinWith:""})}})(e),(e=>{ 3066 if(Array.isArray(e.end)){ 3067 if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"), 3068 G 3069 ;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"), 3070 G;Z(e,e.end,{key:"endScope"}),e.end=h(e.end,{joinWith:""})}})(e)}function Q(e){ 3071 function n(n,t){ 3072 return RegExp(c(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":"")) 3073 }class t{constructor(){ 3074 this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} 3075 addRule(e,n){ 3076 n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]), 3077 this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null) 3078 ;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(h(e,{joinWith:"|" 3079 }),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex 3080 ;const n=this.matcherRe.exec(e);if(!n)return null 3081 ;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),a=this.matchIndexes[t] 3082 ;return n.splice(0,t),Object.assign(n,a)}}class i{constructor(){ 3083 this.rules=[],this.multiRegexes=[], 3084 this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ 3085 if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t 3086 ;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))), 3087 n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){ 3088 return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){ 3089 this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){ 3090 const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex 3091 ;let t=n.exec(e) 3092 ;if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{ 3093 const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)} 3094 return t&&(this.regexIndex+=t.position+1, 3095 this.regexIndex===this.count&&this.considerAll()),t}} 3096 if(e.compilerExtensions||(e.compilerExtensions=[]), 3097 e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") 3098 ;return e.classNameAliases=a(e.classNameAliases||{}),function t(r,s){const o=r 3099 ;if(r.isCompiled)return o 3100 ;[R,L,W,$].forEach((e=>e(r,s))),e.compilerExtensions.forEach((e=>e(r,s))), 3101 r.__beforeBegin=null,[D,I,B].forEach((e=>e(r,s))),r.isCompiled=!0;let l=null 3102 ;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords), 3103 l=r.keywords.$pattern, 3104 delete r.keywords.$pattern),l=l||/\w+/,r.keywords&&(r.keywords=U(r.keywords,e.case_insensitive)), 3105 o.keywordPatternRe=n(l,!0), 3106 s&&(r.begin||(r.begin=/\B|\b/),o.beginRe=n(o.begin),r.end||r.endsWithParent||(r.end=/\B|\b/), 3107 r.end&&(o.endRe=n(o.end)), 3108 o.terminatorEnd=c(o.end)||"",r.endsWithParent&&s.terminatorEnd&&(o.terminatorEnd+=(r.end?"|":"")+s.terminatorEnd)), 3109 r.illegal&&(o.illegalRe=n(r.illegal)), 3110 r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((n=>a(e,{ 3111 variants:null},n)))),e.cachedVariants?e.cachedVariants:X(e)?a(e,{ 3112 starts:e.starts?a(e.starts):null 3113 }):Object.isFrozen(e)?a(e):e))("self"===e?r:e)))),r.contains.forEach((e=>{t(e,o) 3114 })),r.starts&&t(r.starts,s),o.matcher=(e=>{const n=new i 3115 ;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin" 3116 }))),e.terminatorEnd&&n.addRule(e.terminatorEnd,{type:"end" 3117 }),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n})(o),o}(e)}function X(e){ 3118 return!!e&&(e.endsWithParent||X(e.starts))}class V extends Error{ 3119 constructor(e,n){super(e),this.name="HTMLInjectionError",this.html=n}} 3120 const J=t,Y=a,ee=Symbol("nomatch"),ne=t=>{ 3121 const a=Object.create(null),i=Object.create(null),r=[];let s=!0 3122 ;const o="Could not find the language '{}', did you forget to load/include a language module?",c={ 3123 disableAutodetect:!0,name:"Plain text",contains:[]};let p={ 3124 ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i, 3125 languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", 3126 cssSelector:"pre code",languages:null,__emitter:l};function _(e){ 3127 return p.noHighlightRe.test(e)}function h(e,n,t){let a="",i="" 3128 ;"object"==typeof n?(a=e, 3129 t=n.ignoreIllegals,i=n.language):(q("10.7.0","highlight(lang, code, ...args) has been deprecated."), 3130 q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), 3131 i=e,a=n),void 0===t&&(t=!0);const r={code:a,language:i};x("before:highlight",r) 3132 ;const s=r.result?r.result:f(r.language,r.code,t) 3133 ;return s.code=r.code,x("after:highlight",s),s}function f(e,t,i,r){ 3134 const l=Object.create(null);function c(){if(!x.keywords)return void S.addText(A) 3135 ;let e=0;x.keywordPatternRe.lastIndex=0;let n=x.keywordPatternRe.exec(A),t="" 3136 ;for(;n;){t+=A.substring(e,n.index) 3137 ;const i=w.case_insensitive?n[0].toLowerCase():n[0],r=(a=i,x.keywords[a]);if(r){ 3138 const[e,a]=r 3139 ;if(S.addText(t),t="",l[i]=(l[i]||0)+1,l[i]<=7&&(C+=a),e.startsWith("_"))t+=n[0];else{ 3140 const t=w.classNameAliases[e]||e;g(n[0],t)}}else t+=n[0] 3141 ;e=x.keywordPatternRe.lastIndex,n=x.keywordPatternRe.exec(A)}var a 3142 ;t+=A.substring(e),S.addText(t)}function d(){null!=x.subLanguage?(()=>{ 3143 if(""===A)return;let e=null;if("string"==typeof x.subLanguage){ 3144 if(!a[x.subLanguage])return void S.addText(A) 3145 ;e=f(x.subLanguage,A,!0,M[x.subLanguage]),M[x.subLanguage]=e._top 3146 }else e=E(A,x.subLanguage.length?x.subLanguage:null) 3147 ;x.relevance>0&&(C+=e.relevance),S.__addSublanguage(e._emitter,e.language) 3148 })():c(),A=""}function g(e,n){ 3149 ""!==e&&(S.startScope(n),S.addText(e),S.endScope())}function u(e,n){let t=1 3150 ;const a=n.length-1;for(;t<=a;){if(!e._emit[t]){t++;continue} 3151 const a=w.classNameAliases[e[t]]||e[t],i=n[t];a?g(i,a):(A=i,c(),A=""),t++}} 3152 function b(e,n){ 3153 return e.scope&&"string"==typeof e.scope&&S.openNode(w.classNameAliases[e.scope]||e.scope), 3154 e.beginScope&&(e.beginScope._wrap?(g(A,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap), 3155 A=""):e.beginScope._multi&&(u(e.beginScope,n),A="")),x=Object.create(e,{parent:{ 3156 value:x}}),x}function m(e,t,a){let i=((e,n)=>{const t=e&&e.exec(n) 3157 ;return t&&0===t.index})(e.endRe,a);if(i){if(e["on:end"]){const a=new n(e) 3158 ;e["on:end"](t,a),a.isMatchIgnored&&(i=!1)}if(i){ 3159 for(;e.endsParent&&e.parent;)e=e.parent;return e}} 3160 if(e.endsWithParent)return m(e.parent,t,a)}function _(e){ 3161 return 0===x.matcher.regexIndex?(A+=e[0],1):(D=!0,0)}function h(e){ 3162 const n=e[0],a=t.substring(e.index),i=m(x,e,a);if(!i)return ee;const r=x 3163 ;x.endScope&&x.endScope._wrap?(d(), 3164 g(n,x.endScope._wrap)):x.endScope&&x.endScope._multi?(d(), 3165 u(x.endScope,e)):r.skip?A+=n:(r.returnEnd||r.excludeEnd||(A+=n), 3166 d(),r.excludeEnd&&(A=n));do{ 3167 x.scope&&S.closeNode(),x.skip||x.subLanguage||(C+=x.relevance),x=x.parent 3168 }while(x!==i.parent);return i.starts&&b(i.starts,e),r.returnEnd?0:n.length} 3169 let y={};function N(a,r){const o=r&&r[0];if(A+=a,null==o)return d(),0 3170 ;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===o){ 3171 if(A+=t.slice(r.index,r.index+1),!s){const n=Error(`0 width match regex (${e})`) 3172 ;throw n.languageName=e,n.badRule=y.rule,n}return 1} 3173 if(y=r,"begin"===r.type)return(e=>{ 3174 const t=e[0],a=e.rule,i=new n(a),r=[a.__beforeBegin,a["on:begin"]] 3175 ;
3175for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return _(t) 3176 ;return a.skip?A+=t:(a.excludeBegin&&(A+=t), 3177 d(),a.returnBegin||a.excludeBegin||(A=t)),b(a,e),a.returnBegin?0:t.length})(r) 3178 ;if("illegal"===r.type&&!i){ 3179 const e=Error('Illegal lexeme "'+o+'" for mode "'+(x.scope||"<unnamed>")+'"') 3180 ;throw e.mode=x,e}if("end"===r.type){const e=h(r);if(e!==ee)return e} 3181 if("illegal"===r.type&&""===o)return 1 3182 ;if(R>1e5&&R>3*r.index)throw Error("potential infinite loop, way more iterations than matches") 3183 ;return A+=o,o.length}const w=v(e) 3184 ;if(!w)throw K(o.replace("{}",e)),Error('Unknown language: "'+e+'"') 3185 ;const O=Q(w);let k="",x=r||O;const M={},S=new p.__emitter(p);(()=>{const e=[] 3186 ;for(let n=x;n!==w;n=n.parent)n.scope&&e.unshift(n.scope) 3187 ;e.forEach((e=>S.openNode(e)))})();let A="",C=0,T=0,R=0,D=!1;try{ 3188 if(w.__emitTokens)w.__emitTokens(t,S);else{for(x.matcher.considerAll();;){ 3189 R++,D?D=!1:x.matcher.considerAll(),x.matcher.lastIndex=T 3190 ;const e=x.matcher.exec(t);if(!e)break;const n=N(t.substring(T,e.index),e) 3191 ;T=e.index+n}N(t.substring(T))}return S.finalize(),k=S.toHTML(),{language:e, 3192 value:k,relevance:C,illegal:!1,_emitter:S,_top:x}}catch(n){ 3193 if(n.message&&n.message.includes("Illegal"))return{language:e,value:J(t), 3194 illegal:!0,relevance:0,_illegalBy:{message:n.message,index:T, 3195 context:t.slice(T-100,T+100),mode:n.mode,resultSoFar:k},_emitter:S};if(s)return{ 3196 language:e,value:J(t),illegal:!1,relevance:0,errorRaised:n,_emitter:S,_top:x} 3197 ;throw n}}function E(e,n){n=n||p.languages||Object.keys(a);const t=(e=>{ 3198 const n={value:J(e),illegal:!1,relevance:0,_top:c,_emitter:new p.__emitter(p)} 3199 ;return n._emitter.addText(e),n})(e),i=n.filter(v).filter(k).map((n=>f(n,e,!1))) 3200 ;i.unshift(t);const r=i.sort(((e,n)=>{ 3201 if(e.relevance!==n.relevance)return n.relevance-e.relevance 3202 ;if(e.language&&n.language){if(v(e.language).supersetOf===n.language)return 1 3203 ;if(v(n.language).supersetOf===e.language)return-1}return 0})),[s,o]=r,l=s 3204 ;return l.secondBest=o,l}function y(e){let n=null;const t=(e=>{ 3205 let n=e.className+" ";n+=e.parentNode?e.parentNode.className:"" 3206 ;const t=p.languageDetectRe.exec(n);if(t){const n=v(t[1]) 3207 ;return n||(H(o.replace("{}",t[1])), 3208 H("Falling back to no-highlight mode for this block.",e)),n?t[1]:"no-highlight"} 3209 return n.split(/\s+/).find((e=>_(e)||v(e)))})(e);if(_(t))return 3210 ;if(x("before:highlightElement",{el:e,language:t 3211 }),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e) 3212 ;if(e.children.length>
32120&&(p.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), 3213 console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), 3214 console.warn("The element with unescaped HTML:"), 3215 console.warn(e)),p.throwUnescapedHTML))throw new V("One of your code blocks includes unescaped HTML.",e.innerHTML) 3216 ;n=e;const a=n.textContent,r=t?h(a,{language:t,ignoreIllegals:!0}):E(a) 3217 ;e.innerHTML=r.value,e.dataset.highlighted="yes",((e,n,t)=>{const a=n&&i[n]||t 3218 ;e.classList.add("hljs"),e.classList.add("language-"+a) 3219 })(e,t,r.language),e.result={language:r.language,re:r.relevance, 3220 relevance:r.relevance},r.secondBest&&(e.secondBest={ 3221 language:r.secondBest.language,relevance:r.secondBest.relevance 3222 }),x("after:highlightElement",{el:e,result:r,text:a})}let N=!1;function w(){ 3223 "loading"!==document.readyState?document.querySelectorAll(p.cssSelector).forEach(y):N=!0 3224 }function v(e){return e=(e||"").toLowerCase(),a[e]||a[i[e]]} 3225 function O(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ 3226 i[e.toLowerCase()]=n}))}function k(e){const n=v(e) 3227 ;return n&&!n.disableAutodetect}function x(e,n){const t=e;r.forEach((e=>{ 3228 e[t]&&e[t](n)}))} 3229 "undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ 3230 N&&w()}
vendor: 4,124 bytes, lines 3230-3263
3230),!1),Object.assign(t,{highlight:h,highlightAuto:E,highlightAll:w, 3231 highlightElement:y, 3232 highlightBlock:e=>(q("10.7.0","highlightBlock will be removed entirely in v12.0"), 3233 q("10.7.0","Please use highlightElement now."),y(e)),configure:e=>{p=Y(p,e)}, 3234 initHighlighting:()=>{ 3235 w(),q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")}, 3236 initHighlightingOnLoad:()=>{ 3237 w(),q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.") 3238 },registerLanguage:(e,n)=>{let i=null;try{i=n(t)}catch(n){ 3239 if(K("Language definition for '{}' could not be registered.".replace("{}",e)), 3240 !s)throw n;K(n),i=c} 3241 i.name||(i.name=e),a[e]=i,i.rawDefinition=n.bind(null,t),i.aliases&&O(i.aliases,{ 3242 languageName:e})},unregisterLanguage:e=>{delete a[e] 3243 ;for(const n of Object.keys(i))i[n]===e&&delete i[n]}, 3244 listLanguages:()=>Object.keys(a),getLanguage:v,registerAliases:O, 3245 autoDetection:k,inherit:Y,addPlugin:e=>{(e=>{ 3246 e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=n=>{ 3247 e["before:highlightBlock"](Object.assign({block:n.el},n)) 3248 }),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=n=>{ 3249 e["after:highlightBlock"](Object.assign({block:n.el},n))})})(e),r.push(e)}, 3250 removePlugin:e=>{const n=r.indexOf(e);-1!==n&&r.splice(n,1)}}),t.debugMode=()=>{ 3251 s=!1},t.safeMode=()=>{s=!0},t.versionString="11.9.0",t.regex={concat:b, 3252 lookahead:d,either:m,optional:u,anyNumberOfTimes:g} 3253 ;for(const n in C)"object"==typeof C[n]&&e(C[n]);return Object.assign(t,C),t 3254 },te=ne({});te.newInstance=()=>ne({});var ae=te;const ie=e=>({IMPORTANT:{ 3255 scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{ 3256 scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/}, 3257 FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/}, 3258 ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", 3259 contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{ 3260 scope:"number", 3261 begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", 3262 relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/} 3263 }),re=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],se=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],oe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],le=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],
3263ce=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode
3263-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),de=oe.concat(le) 3264 ;var ge="[0-9](_*[0-9])*",ue=`\\.(${ge})`,be="[0-9a-fA-F](_*[0-9a-fA-F])*",me={ 3265 className:"number",variants:[{ 3266 begin:`(\\b(${ge})((${ue})|\\.)?|(${ue}))[eE][+-]?(${ge})[fFdD]?\\b`},{ 3267 begin:`\\b(${ge})((${ue})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ 3268 begin:`(${ue})[fFdD]?\\b`},{begin:`\\b(${ge})[fFdD]\\b`},{ 3269 begin:`\\b0[xX]((${be})\\.?|(${be})?\\.(${be}))[pP][+-]?(${ge})[fFdD]?\\b`},{ 3270 begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${be})[lL]?\\b`},{ 3271 begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], 3272 relevance:0};function pe(e,n,t){return-1===t?"":e.replace(n,(a=>pe(e,n,t-1)))} 3273 const _e="[A-Za-z$_][0-9A-Za-z$_]*",he=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],fe=["true","false","null","undefined","NaN","Infinity"],Ee=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ye=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ne=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],we=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ve=[].concat(Ne,Ee,ye) 3274 ;function Oe(e){const n=e.regex,t=_e,a={begin:/<[A-Za-z0-9\\._:-]+/, 3275 end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ 3276 const t=e[0].length+e.index,a=e.input[t] 3277 ;if("<"===a||","===a)return void n.ignoreMatch();let i 3278 ;">"===a&&(((e,{after:n})=>{const t="</"+e[0].slice(1) 3279 ;return-1!==e.input.indexOf(t,n)})(e,{after:t})||n.ignoreMatch()) 3280 ;const r=e.input.substring(t) 3281 ;((i=r.match(/^\s*=/))||(i=r.match(/^\s+extends\s+/))&&0===i.index)&&n.ignoreMatch() 3282 }},i={$pattern:_e,keyword:he,literal:fe,built_in:ve,"variable.language":we 3283 },r="[0-9](_?[0-9])*",s=`\\.(${r})`,o="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",l={ 3284 className:"number",variants:[{ 3285 begin:`(\\b(${o})((${s})|\\.)?|(${s}))[eE][+-]?(${r})\\b`},{ 3286 begin:`\\b(${o})\\b((${s})\\b|\\.)?|(${s})\\b`},{ 3287 begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{ 3288 begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{ 3289 begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{ 3290 begin:"\\b0[0-7]+n?\\b"}],relevance:0},c={className:"subst",begin:"\\$\\{", 3291 end:"\\}",keywords:i,contains:[]},d={begin:"html`",end:"",starts:{end:"`", 3292 returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},g={ 3293 begin:"css`",end:"",starts:{end:"`",returnEnd:!1, 3294 contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},u={begin:"gql`",end:"", 3295 starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c], 3296 subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`", 3297 contains:[e.BACKSLASH_ESCAPE,c]},m={className:"comment", 3298 variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{ 3299 begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag", 3300 begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0, 3301 excludeBegin:!0,relevance:0}
vendor: 5,421 bytes, lines 3301-3350
3301,{className:"variable",begin:t+"(?=\\s*(-)|$)", 3302 endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}] 3303 }),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE] 3304 },p=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,g,u,b,{match:/\$\d+/},l] 3305 ;c.contains=p.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(p) 3306 });const _=[].concat(m,c.contains),h=_.concat([{begin:/\(/,end:/\)/,keywords:i, 3307 contains:["self"].concat(_)}]),f={className:"params",begin:/\(/,end:/\)/, 3308 excludeBegin:!0,excludeEnd:!0,keywords:i,contains:h},E={variants:[{ 3309 match:[/class/,/\s+/,t,/\s+/,/extends/,/\s+/,n.concat(t,"(",n.concat(/\./,t),")*")], 3310 scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{ 3311 match:[/class/,/\s+/,t],scope:{1:"keyword",3:"title.class"}}]},y={relevance:0, 3312 match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/), 3313 className:"title.class",keywords:{_:[...Ee,...ye]}},N={variants:[{ 3314 match:[/function/,/\s+/,t,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}], 3315 className:{1:"keyword",3:"title.function"},label:"func.def",contains:[f], 3316 illegal:/%/},w={ 3317 match:n.concat(/\b/,(v=[...Ne,"super","import"],n.concat("(?!",v.join("|"),")")),t,n.lookahead(/\(/)), 3318 className:"title.function",relevance:0};var v;const O={ 3319 begin:n.concat(/\./,n.lookahead(n.concat(t,/(?![0-9A-Za-z$_(])/))),end:t, 3320 excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},k={ 3321 match:[/get|set/,/\s+/,t,/(?=\()/],className:{1:"keyword",3:"title.function"}, 3322 contains:[{begin:/\(\)/},f] 3323 },x="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={ 3324 match:[/const|var|let/,/\s+/,t,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(x)], 3325 keywords:"async",className:{1:"keyword",3:"title.function"},contains:[f]} 3326 ;return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{ 3327 PARAMS_CONTAINS:h,CLASS_REFERENCE:y},illegal:/#(?![$_A-z])/, 3328 contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{ 3329 label:"use_strict",className:"meta",relevance:10, 3330 begin:/^\s*['"]use (strict|asm)['"]/ 3331 },e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,g,u,b,m,{match:/\$\d+/},l,y,{ 3332 className:"attr",begin:t+n.lookahead(":"),relevance:0},M,{ 3333 begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", 3334 keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{ 3335 className:"function",begin:x,returnBegin:!0,end:"\\s*=>",contains:[{ 3336 className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{ 3337 className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, 3338 excludeEnd:!0,keywords:i,contains:h}]}]},{begin:/,/,relevance:0},{match:/\s+/, 3339 relevance:0},{variants:[{begin:"<>",end:"</>"},{ 3340 match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:a.begin, 3341 "on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{ 3342 begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},N,{ 3343 beginKeywords:"while if switch catch for"},{ 3344 begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", 3345 returnBegin:!0,label:"func.def",contains:[f,e.inherit(e.TITLE_MODE,{begin:t, 3346 className:"title.function"})]},{match:/\.\.\./,relevance:0},O,{match:"\\$"+t, 3347 relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, 3348 contains:[f]},w,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, 3349 className:"variable.constant"},E,k,{match:/\$[(.]/}]}} 3350 const ke=e=>b(/\b/,e,/\w$/.test(e)?/\b/:/\B/),xe=["Protocol","Type"].map(ke),Me=["init","self"].map(ke),Se=["Any","Self"],Ae=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Ce=["false","nil","true"],Te=["assignment","associativity","higherThan","left","lowerThan","none","right"],Re=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],De=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","
3350withoutActuallyEscaping","zip"],Ie=m(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Le=m(Ie,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Be=b(Ie,Le,"*"),$e=m(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),ze=m($e,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Fe=b($e,ze,"*"),Ue=b(/[A-Z]/,ze,"*"),je=["attached","autoclosure",b(/convention\(/,m("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",b(/objc\(/,Fe,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Pe=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"] 3351 ;var Ke=Object.freeze({__proto__:null,grmr_bash:e=>{const n=e.regex,t={},a={ 3352 begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]} 3353 ;Object.assign(t,{className:"variable",variants:[{ 3354 begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const i={ 3355 className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},r={ 3356 begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/, 3357 end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/, 3358 contains:[e.BACKSLASH_ESCAPE,t,i]};i.contains.push(s);const o={begin:/\$?\(\(/, 3359 end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t] 3360 },l=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 3361 }),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, 3362 contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ 3363 name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/, 3364 keyword:["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"], 3365 literal:["true","false"], 3366 built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"] 3367 },contains:[l,e.SHEBANG(),c,o,e.HASH_COMMENT_MODE,r,{match:/(\/[a-z._-]+)+/},s,{ 3368 match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},t]}}, 3369 grmr_c:e=>{const n=e.regex,t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}] 3370 }),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",r="("+a+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",s={ 3371 className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{ 3372 match:/\batomic_[a-z]{3,6}\b/}]},o={className:"string",variants:[{ 3373 begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ 3374 begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", 3375 end:"'",illegal:"."}
vendor: 4,944 bytes, lines 3375-3425
3375,e.END_SAME_AS_BEGIN({ 3376 begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ 3377 className:"number",variants:[{begin:"\\b(0b[01']+)"},{ 3378 begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" 3379 },{ 3380 begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" 3381 }],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ 3382 keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" 3383 },contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:"string"}),{ 3384 className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},d={ 3385 className:"title",begin:n.optional(i)+e.IDENT_RE,relevance:0 3386 },g=n.optional(i)+e.IDENT_RE+"\\s*\\(",u={ 3387 keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"], 3388 type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"], 3389 literal:"true false NULL", 3390 built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" 3391 },b=[c,s,t,e.C_BLOCK_COMMENT_MODE,l,o],m={variants:[{begin:/=/,end:/;/},{ 3392 begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], 3393 keywords:u,contains:b.concat([{begin:/\(/,end:/\)/,keywords:u, 3394 contains:b.concat(["self"]),relevance:0}]),relevance:0},p={ 3395 begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, 3396 keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:u,relevance:0},{ 3397 begin:g,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})], 3398 relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/, 3399 keywords:u,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,o,l,s,{begin:/\(/, 3400 end:/\)/,keywords:u,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,o,l,s] 3401 }]},s,t,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:u, 3402 disableAutodetect:!0,illegal:"</",contains:[].concat(m,p,b,[c,{ 3403 begin:e.IDENT_RE+"::",keywords:u},{className:"class", 3404 beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{ 3405 beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c, 3406 strings:o,keywords:u}}},grmr_cpp:e=>{const n=e.regex,t=e.COMMENT("//","$",{ 3407 contains:[{begin:/\\\n/}] 3408 }),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",r="(?!struct)("+a+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",s={ 3409 className:"type",begin:"\\b[a-z\\d_]*_t\\b"},o={className:"string",variants:[{ 3410 begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ 3411 begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", 3412 end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ 3413 begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ 3414 className:"number",variants:[{begin:"\\b(0b[01']+)"},{ 3415 begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" 3416 },{ 3417 begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" 3418 }],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ 3419 keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" 3420 },contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:"string"}),{ 3421 className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},d={ 3422 className:"title",begin:n.optional(i)+e.IDENT_RE,relevance:0 3423 },g=n.optional(i)+e.IDENT_RE+"\\s*\\(",u={ 3424 type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"], 3425 keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_
3425noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"], 3426 literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"], 3427 _type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"] 3428 },b={className:"function.dispatch",relevance:0,keywords:{ 3429 _hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"] 3430 }, 3431 begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/)) 3432 },m=[b,c,s,t,e.C_BLOCK_COMMENT_MODE,l,o],p={variants:[{begin:/=/,end:/;/},{ 3433 begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], 3434 keywords:u,contains:m.concat([{begin:/\(/,end:/\)/,keywords:u, 3435 contains:m.concat(["self"]),relevance:0}]),relevance:0},_={className:"function", 3436 begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, 3437 keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:u,relevance:0},{ 3438 begin:g,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{ 3439 begin:/:/,endsWithParent:!0,contains:[o,l]},{relevance:0,match:/,/},{ 3440 className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0, 3441 contains:[t,e.C_BLOCK_COMMENT_MODE,o,l,s,{begin:/\(/,end:/\)/,keywords:u, 3442 relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,o,l,s]}] 3443 },s,t,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++", 3444 aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:u,illegal:"</", 3445 classNameAliases:{"function.dispatch":"built_in"}, 3446 contains:[].concat(p,_,b,m,[c,{ 3447 begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)", 3448 end:">",keywords:u,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:u},{ 3449 match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/], 3450 className:{1:"keyword",3:"title.class"}}])}},grmr_csharp:e=>{const n={
vendor: 24,978 bytes, lines 3451-3727
3451 keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]), 3452 built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"], 3453 literal:["default","false","null","true"]},t=e.inherit(e.TITLE_MODE,{ 3454 begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{ 3455 begin:"\\b(0b[01']+)"},{ 3456 begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ 3457 begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" 3458 }],relevance:0},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}] 3459 },r=e.inherit(i,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/, 3460 keywords:n},o=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/, 3461 end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/ 3462 },e.BACKSLASH_ESCAPE,o]},c={className:"string",begin:/\$@"/,end:'"',contains:[{ 3463 begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},d=e.inherit(c,{illegal:/\n/, 3464 contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},o]}) 3465 ;s.contains=[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE], 3466 o.contains=[d,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{ 3467 illegal:/\n/})];const g={variants:[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] 3468 },u={begin:"<",end:">",contains:[{beginKeywords:"in out"},t] 3469 },b=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",m={ 3470 begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"], 3471 keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0, 3472 contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{ 3473 begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}] 3474 }),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#", 3475 end:"$",keywords:{ 3476 keyword:"if else elif endif define undef warning error line region endregion pragma checksum" 3477 }},g,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/, 3478 illegal:/[^\s:,]/,contains:[{beginKeywords:"where class" 3479 },t,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace", 3480 relevance:0,end:/[{;=]/,illegal:/[^\s:]/, 3481 contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ 3482 beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, 3483 contains:[t,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta", 3484 begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{ 3485 className:"string",begin:/"/,end:/"/}]},{ 3486 beginKeywords:"new return throw await else",relevance:0},{className:"function", 3487 begin:"("+b+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, 3488 end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{ 3489 beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", 3490 relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, 3491 contains:[e.TITLE_MODE,u],relevance:0},{match:/\(\)/},{className:"params", 3492 begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0, 3493 contains:[g,a,e.C_BLOCK_COMMENT_MODE] 3494 },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m]}},grmr_css:e=>{ 3495 const n=e.regex,t=ie(e),a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{ 3496 name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{ 3497 keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"}, 3498 contains:[t.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/ 3499 },t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0 3500 },{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0 3501 },t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{ 3502 begin:":("+oe.join("|")+")"},{begin:":(:)?("+le.join("|")+")"}] 3503 },t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ce.join("|")+")\\b"},{ 3504 begin:/:/,end:/[;}{]/, 3505 contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...a,{ 3506 begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri" 3507 },contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0, 3508 excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:n.lookahead(/@/),end:"[{;]", 3509 relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/ 3510 },{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{ 3511 $pattern:/[a-z-]+/,keyword:"and or not only",attribute:se.join(" ")},contains:[{ 3512 begin:/[a-z-]+(?=:)/,className:"attribute"},...a,t.CSS_NUMBER_MODE]}]},{ 3513 className:"selector-tag",begin:"\\b("+re.join("|")+")\\b"}]}},grmr_diff:e=>{ 3514 const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{ 3515 className:"meta",relevance:10, 3516 match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/) 3517 },{className:"comment",variants:[{ 3518 begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/), 3519 end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{ 3520 className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, 3521 end:/$/}]}},grmr_go:e=>{const n={ 3522 keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"], 3523 type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"], 3524 literal:["true","false","iota","nil"], 3525 built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"] 3526 };return{name:"Go",aliases:["golang"],keywords:n,illegal:"</", 3527 contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string", 3528 variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{ 3529 className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1 3530 },e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func", 3531 end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params", 3532 begin:/\(/,end:/\)/,endsParent:!0,keywords:n,illegal:/["']/}]}]}}, 3533 grmr_graphql:e=>{const n=e.regex;return{name:"GraphQL",aliases:["gql"], 3534 case_insensitive:!0,disableAutodetect:!1,keywords:{ 3535 keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"], 3536 literal:["true","false","null"]}, 3537 contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ 3538 scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation", 3539 begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/, 3540 end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{ 3541 scope:"symbol",begin:n.concat(/[_A-Za-z][_0-9A-Za-z]*/,n.lookahead(/\s*:/)), 3542 relevance:0}],illegal:[/[;<']/,/BEGIN/]}},grmr_ini:e=>{const n=e.regex,t={ 3543 className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{ 3544 begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/, 3545 end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{ 3546 begin:/\$\{(.*?)\}/}]},r={className:"literal", 3547 begin:/\bon|off|true|false|yes|no\b/},s={className:"string", 3548 contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{ 3549 begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}] 3550 },o={begin:/\[/,end:/\]/,contains:[a,r,i,s,t,"self"],relevance:0 3551 },l=n.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{ 3552 name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, 3553 contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{ 3554 begin:n.concat(l,"(\\s*\\.\\s*",l,")*",n.lookahead(/\s*=\s*[^#\s]/)), 3555 className:"attr",starts:{end:/$/,contains:[a,o,r,i,s,t]}}]}},grmr_java:e=>{ 3556 const n=e.regex,t="[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*",a=t+pe("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),i={ 3557 keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"], 3558 literal:["false","true","null"], 3559 type:["char","boolean","long","float","int","byte","short","double"], 3560 built_in:["super","this"]},r={className:"meta",begin:"@"+t,contains:[{ 3561 begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/, 3562 end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0} 3563 ;return{name:"Java",aliases:["jsp"],keywords:i,illegal:/<\/|#/, 3564 contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/, 3565 relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{ 3566 begin:/import java\.[a-z]+\./,keywords:"import",relevance:2 3567 },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/, 3568 className:"string",contains:[e.BACKSLASH_ESCAPE] 3569 },e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{ 3570 match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{ 3571 1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{ 3572 begin:[n.concat(/(?!else)/,t),/\s+/,t,/\s+/,/=(?!=)/],className:{1:"type", 3573 3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword", 3574 3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ 3575 beginKeywords:"new throw return else",relevance:0},{ 3576 begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{ 3577 2:"title.function"},keywords:i,contains:[{className:"params",begin:/\(/, 3578 end:/\)/,keywords:i,relevance:0, 3579 contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,me,e.C_BLOCK_COMMENT_MODE] 3580 },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},me,r]}},grmr_javascript:Oe, 3581 grmr_json:e=>{const n=["true","false","null"],t={scope:"literal", 3582 beginKeywords:n.join(" ")};return{name:"JSON",keywords:{literal:n},contains:[{ 3583 className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{ 3584 match:/[{}[\],:]/,className:"punctuation",relevance:0 3585 },e.QUOTE_STRING_MODE,t,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE], 3586 illegal:"\\S"}},grmr_kotlin:e=>{const n={ 3587 keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", 3588 built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing", 3589 literal:"true false null"},t={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@" 3590 },a={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={ 3591 className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string", 3592 variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,a]},{begin:"'",end:"'", 3593 illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/, 3594 contains:[e.BACKSLASH_ESCAPE,i,a]}]};a.contains.push(r);const s={ 3595 className:"meta", 3596 begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?" 3597 },o={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/, 3598 end:/\)/,contains:[e.inherit(r,{className:"string"}),"self"]}] 3599 },l=me,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={ 3600 variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/, 3601 contains:[]}]},g=d;return g.variants[1].contains=[d],d.variants[1].contains=[g], 3602 {name:"Kotlin",aliases:["kt","kts"],keywords:n, 3603 contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag", 3604 begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword", 3605 begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol", 3606 begin:/@\w+/}]}},t,s,o,{className:"function",beginKeywords:"fun",end:"[(]|$", 3607 returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{ 3608 begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, 3609 contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/, 3610 keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/, 3611 endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/, 3612 endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0 3613 },e.C_LINE_COMMENT_MODE,c,s,o,r,e.C_NUMBER_MODE]},c]},{ 3614 begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{ 3615 3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0, 3616 illegal:"extends implements",contains:[{ 3617 beginKeywords:"public protected internal private constructor" 3618 },e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0, 3619 excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/, 3620 excludeBegin:!0,returnEnd:!0},s,o]},r,{className:"meta",begin:"^#!/usr/bin/env", 3621 end:"$",illegal:"\n"},l]}},grmr_less:e=>{ 3622 const n=ie(e),t=de,a="[\\w-]+",i="("+a+"|@\\{"+a+"\\})",r=[],s=[],o=e=>({ 3623 className:"string",begin:"~?"+e+".*?"+e}),l=(e,n,t)=>({className:e,begin:n, 3624 relevance:t}),c={$pattern:/[a-z-]+/,keyword:"and or not only", 3625 attribute:se.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:c, 3626 relevance:0} 3627 ;s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o("'"),o('"'),n.CSS_NUMBER_MODE,{ 3628 begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]", 3629 excludeEnd:!0} 3630 },n.HEXCOLOR,d,l("variable","@@?"+a,10),l("variable","@\\{"+a+"\\}"),l("built_in","~?`[^`]*?`"),{ 3631 className:"attribute",begin:a+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0 3632 },n.IMPORTANT,{beginKeywords:"and not"},n.FUNCTION_DISPATCH);const g=s.concat({ 3633 begin:/\{/,end:/\}/,contains:r}),u={beginKeywords:"when",endsWithParent:!0, 3634 contains:[{beginKeywords:"and not"}].concat(s)},b={begin:i+"\\s*:", 3635 returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/ 3636 },n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ce.join("|")+")\\b", 3637 end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}] 3638 },m={className:"keyword", 3639 begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", 3640 starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},p={ 3641 className:"variable",variants:[{begin:"@"+a+"\\s*:",relevance:15},{begin:"@"+a 3642 }],starts:{end:"[;}]",returnEnd:!0,contains:g}},_={variants:[{ 3643 begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0, 3644 returnEnd:!0,illegal:"[<='$\"]",relevance:0, 3645 contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u,l("keyword","all\\b"),l("variable","@\\{"+a+"\\}"),{ 3646 begin:"\\b("+re.join("|")+")\\b",className:"selector-tag" 3647 },n.CSS_NUMBER_MODE,l("selector-tag",i,0),l("selector-id","#"+i),l("selector-class","\\."+i,0),l("selector-tag","&",0),n.ATTRIBUTE_SELECTOR_MODE,{ 3648 className:"selector-pseudo",begin:":("+oe.join("|")+")"},{ 3649 className:"selector-pseudo",begin:":(:)?("+le.join("|")+")"},{begin:/\(/, 3650 end:/\)/,relevance:0,contains:g},{begin:"!important"},n.FUNCTION_DISPATCH]},h={ 3651 begin:a+":(:)?"+`(${t.join("|")})`,returnBegin:!0,contains:[_]} 3652 ;return r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,p,h,b,_,u,n.FUNCTION_DISPATCH), 3653 {name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:r}}, 3654 grmr_lua:e=>{const n="\\[=*\\[",t="\\]=*\\]",a={begin:n,end:t,contains:["self"] 3655 },i=[e.COMMENT("--(?!"+n+")","$"),e.COMMENT("--"+n,t,{contains:[a],relevance:10 3656 })];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE, 3657 literal:"true false nil", 3658 keyword:"and break do else elseif end for goto if in local not or repeat return then until while", 3659 built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" 3660 },contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)", 3661 contains:[e.inherit(e.TITLE_MODE,{ 3662 begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params", 3663 begin:"\\(",endsWithParent:!0,contains:i}].concat(i) 3664 },e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string", 3665 begin:n,end:t,contains:[a],relevance:5}])}},grmr_makefile:e=>{const n={ 3666 className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)", 3667 contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},t={className:"string", 3668 begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n]},a={className:"variable", 3669 begin:/\$\([\w-]+\s/,end:/\)/,keywords:{ 3670 built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value" 3671 },contains:[n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},r={ 3672 className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{ 3673 name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/, 3674 keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath" 3675 },contains:[e.HASH_COMMENT_MODE,n,t,a,i,{className:"meta",begin:/^\.PHONY:/, 3676 end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},r]}},grmr_markdown:e=>{ 3677 const n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},t={ 3678 variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{ 3679 begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, 3680 relevance:2},{ 3681 begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), 3682 relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ 3683 begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/ 3684 },{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, 3685 returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", 3686 excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", 3687 end:"\\]",excludeBegin:!0,excludeEnd:!0}]},a={className:"strong",contains:[], 3688 variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}] 3689 },i={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{ 3690 begin:/_(?![_\s])/,end:/_/,relevance:0}]},r=e.inherit(a,{contains:[] 3691 }),s=e.inherit(i,{contains:[]});a.contains.push(s),i.contains.push(r) 3692 ;let o=[n,t];return[a,i,r,s].forEach((e=>{e.contains=e.contains.concat(o) 3693 })),o=o.concat(a,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ 3694 className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:o},{ 3695 begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", 3696 contains:o}]}]},n,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", 3697 end:"\\s+",excludeEnd:!0},a,i,{className:"quote",begin:"^>\\s+",contains:o, 3698 end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ 3699 begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ 3700 begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", 3701 contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ 3702 begin:"^[-\\*]{3,}",end:"$"},t,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ 3703 className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ 3704 className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}},grmr_objectivec:e=>{ 3705 const n=/[a-zA-Z@][a-zA-Z0-9_]*/,t={$pattern:n, 3706 keyword:["@interface","@class","@protocol","@implementation"]};return{ 3707 name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"], 3708 keywords:{"variable.language":["this","super"],$pattern:n, 3709 keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"], 3710 literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"], 3711 built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"], 3712 type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"] 3713 },illegal:"</",contains:[{className:"built_in", 3714 begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+" 3715 },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{ 3716 className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n", 3717 contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/, 3718 keywords:{ 3719 keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include" 3720 },contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{ 3721 className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n" 3722 },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class", 3723 begin:"("+t.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:t, 3724 contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE, 3725 relevance:0}]}},grmr_perl:e=>{const n=e.regex,t=/[dualxmsipngr]{0,12}/,a={ 3726 $pattern:/[\w.]+/, 3727 keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir c
3727onnect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0" 3728 },i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:a},r={begin:/->\{/, 3729 end:/\}/},s={variants:[{begin:/\$\d/},{ 3730 begin:n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])") 3731 },{begin:/[$%@][^\s\w{]/,relevance:0}] 3732 },o=[e.BACKSLASH_ESCAPE,i,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,a,i="\\1")=>{ 3733 const r="\\1"===i?i:n.concat(i,a) 3734 ;return n.concat(n.concat("(?:",e,")"),a,/(?:\\.|[^\\\/])*?/,r,/(?:\\.|[^\\\/])*?/,i,t) 3735 },d=(e,a,i)=>n.concat(n.concat("(?:",e,")"),a,/(?:\\.|[^\\\/])*?/,i,t),g=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{ 3736 endsWithParent:!0}),r,{className:"string",contains:o,variants:[{ 3737 begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[", 3738 end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{ 3739 begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">", 3740 relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'", 3741 contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`", 3742 contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{ 3743 begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number", 3744 begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", 3745 relevance:0},{ 3746 begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*", 3747 keywords:"split return print reverse grep",relevance:0, 3748 contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{ 3749 begin:c("s|tr|y",n.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{ 3750 begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{ 3751 className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{ 3752 begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",n.either(...l,{capture:!0 3753 }),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{ 3754 begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub", 3755 end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{ 3756 begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$", 3757 subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}] 3758 }];return i.contains=g,r.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:a, 3759 contains:g}},grmr_php:e=>{ 3760 const n=e.regex,t=/(?![A-Za-z0-9])(?![$])/,a=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,t),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,t),r={ 3761 scope:"variable",match:"\\$+"+a},s={scope:"subst",variants:[{begin:/\$\w+/},{ 3762 begin:/\{\$/,end:/\}/}]},o=e.inherit(e.APOS_STRING_MODE,{illegal:null 3763 }),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{ 3764 illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),o,{ 3765 begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/, 3766 contains:e.QUOTE_STRING_MODE.contains.concat(s),"on:begin":(e,n
vendor: 25,913 bytes, lines 3766-3987
3766)=>{ 3767 n.data._beginMatch=e[1]||e[2]},"on:end":(e,n)=>{ 3768 n.data._beginMatch!==e[1]&&n.ignoreMatch()}},e.END_SAME_AS_BEGIN({ 3769 begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={scope:"number",variants:[{ 3770 begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{ 3771 begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{ 3772 begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?" 3773 }],relevance:0 3774 },g=["false","null","true"],u=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],b=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],m={ 3775 keyword:u,literal:(e=>{const n=[];return e.forEach((e=>{ 3776 n.push(e),e.toLowerCase()===e?n.push(e.toUpperCase()):n.push(e.toLowerCase()) 3777 })),n})(g),built_in:b},p=e=>e.map((e=>e.replace(/\|\d+$/,""))),_={variants:[{ 3778 match:[/new/,n.concat(l,"+"),n.concat("(?!",p(b).join("\\b|"),"\\b)"),i],scope:{ 3779 1:"keyword",4:"title.class"}}]},h=n.concat(a,"\\b(?!\\()"),f={variants:[{ 3780 match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),h],scope:{2:"variable.constant" 3781 }},{match:[/::/,/class/],scope:{2:"variable.language"}},{ 3782 match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),h],scope:{1:"title.class", 3783 3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))], 3784 scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class", 3785 3:"variable.language"}}]},E={scope:"attr", 3786 match:n.concat(a,n.lookahead(":"),n.lookahead(/(?!::)/))},y={relevance:0, 3787 begin:/\(/,end:/\)/,keywords:m,contains:[E,r,f,e.C_BLOCK_COMMENT_MODE,c,d,_] 3788 },N={relevance:0, 3789 match:[/\b/,n.concat("(?!fn\\b|function\\b|",p(u).join("\\b|"),"|",p(b).join("\\b|"),"\\b)"),a,n.concat(l,"*"),n.lookahead(/(?=\()/)], 3790 scope:{3:"title.function.invoke"},contains:[y]};y.contains.push(N) 3791 ;const w=[E,f,e.C_BLOCK_COMMENT_MODE,c,d,_];return{case_insensitive:!1, 3792 keywords:m,contains:[{begin:n.concat(/#\[\s*/,i),beginScope:"meta",end:/]/, 3793 endScope:"meta",keywords:{literal:g,keyword:["new","array"]},contains:[{ 3794 begin:/\[/,end:/]/,keywords:{literal:g,keyword:["new","array"]}, 3795 contains:["self",...w]},...w,{scope:"meta",match:i}] 3796 },e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{ 3797 scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/, 3798 keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE, 3799 contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{ 3800 begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{ 3801 begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},r,N,f,{ 3802 match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},_,{ 3803 scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/, 3804 excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use" 3805 },e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params", 3806 begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:m, 3807 contains:["self",r,f,e.C_BLOCK_COMMENT_MODE,c,d]}]},{scope:"class",variants:[{ 3808 beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait", 3809 illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{ 3810 beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ 3811 beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/, 3812 contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{ 3813 beginKeywords:"use",relevance:0,end:";",contains:[{ 3814 match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,d]} 3815 },grmr_php_template:e=>({name:"PHP template",subLanguage:"xml",contains:[{ 3816 begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*", 3817 end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0 3818 },e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null, 3819 skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null, 3820 contains:null,skip:!0})]}]}),grmr_plaintext:e=>({name:"Plain text", 3821 aliases:["text","txt"],disableAutodetect:!0}),grmr_python:e=>{ 3822 const n=e.regex,t=/[\p{XID_Start}_]\p{XID_Continue}*/u,a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],i={ 3823 $pattern:/[A-Za-z]\w+|__\w+__/,keyword:a, 3824 built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], 3825 literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], 3826 type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] 3827 },r={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/, 3828 end:/\}/,keywords:i,illegal:/#/},o={begin:/\{\{/,relevance:0},l={ 3829 className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ 3830 begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, 3831 contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{ 3832 begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, 3833 contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{ 3834 begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, 3835 contains:[e.BACKSLASH_ESCAPE,r,o,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, 3836 end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,o,s]},{begin:/([uU]|[rR])'/,end:/'/, 3837 relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ 3838 begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, 3839 end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, 3840 contains:[e.BACKSLASH_ESCAPE,o,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, 3841 contains:[e.BACKSLASH_ESCAPE,o,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] 3842 },c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,g="\\b|"+a.join("|"),u={ 3843 className:"number",relevance:0,variants:[{ 3844 begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${g})`},{begin:`(${d})[jJ]?`},{ 3845 begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{ 3846 begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})` 3847 },{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${c})[jJ](?=${g})` 3848 }]},b={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:i, 3849 contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ 3850 className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, 3851 end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i, 3852 contains:["self",r,u,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,u,r],{ 3853 name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:i, 3854 illegal:/(<\/|\?)|=>/,contains:[r,u,{begin:/\bself\b/},{beginKeywords:"if", 3855 relevance:0},l,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,t],scope:{ 3856 1:"keyword",3:"title.function"},contains:[m]},{variants:[{ 3857 match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{match:[/\bclass/,/\s+/,t]}], 3858 scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ 3859 className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[u,m,l]}]}}, 3860 grmr_python_repl:e=>({aliases:["pycon"],contains:[{className:"meta.prompt", 3861 starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{ 3862 begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}),grmr_r:e=>{ 3863 const n=e.regex,t=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,r=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/) 3864 ;return{name:"R",keywords:{$pattern:t, 3865 keyword:"function if in break next repeat else for while", 3866 literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10", 3867 built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm" 3868 },contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/, 3869 starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)), 3870 endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{ 3871 scope:"variable",variants:[{match:t},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0 3872 }]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}] 3873 }),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE], 3874 variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/ 3875 }),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/ 3876 }),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/ 3877 }),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/ 3878 }),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/ 3879 }),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"', 3880 relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{ 3881 1:"operator",2:"number"},match:[i,a]},{scope:{1:"operator",2:"number"}, 3882 match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[r,a]},{scope:{ 3883 2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"}, 3884 match:[t,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{ 3885 match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:r},{begin:"`",end:"`", 3886 contains:[{begin:/\\./}]}]}},grmr_ruby:e=>{ 3887 const n=e.regex,t="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(a,/(::\w+)*/),r={ 3888 "variable.constant":["__FILE__","__LINE__","__ENCODING__"], 3889 "variable.language":["self","super"], 3890 keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"], 3891 built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"], 3892 literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},o={ 3893 begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s] 3894 }),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10 3895 }),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/, 3896 end:/\}/,keywords:r},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c], 3897 variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{ 3898 begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{ 3899 begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//, 3900 end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{ 3901 begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{ 3902 begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{ 3903 begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{ 3904 begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{ 3905 begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)), 3906 contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, 3907 contains:[e.BACKSLASH_ESCAPE,c]})]}]},g="[0-9](_?[0-9])*",u={className:"number", 3908 relevance:0,variants:[{ 3909 begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{ 3910 begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" 3911 },{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ 3912 begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ 3913 begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{ 3914 className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0, 3915 keywords:r}]},m=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{ 3916 match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class", 3917 4:"title.class.inherited"},keywords:r},{match:[/(include|extend)\s+/,i],scope:{ 3918 2:"title.class"},keywords:r},{relevance:0,match:[i,/\.new[. (]/],scope:{ 3919 1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, 3920 className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{ 3921 match:[/def/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[b]},{ 3922 begin:e.IDENT_RE+"::"},{className:"symbol", 3923 begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol", 3924 begin:":(?!\\s)",contains:[d,{begin:t}],relevance:0},u,{className:"variable", 3925 begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ 3926 className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0, 3927 relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*", 3928 keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c], 3929 illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{ 3930 begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[", 3931 end:"\\][a-z]*"}]}].concat(o,l),relevance:0}].concat(o,l) 3932 ;c.contains=m,b.contains=m;const p=[{begin:/^\s*=>/,starts:{end:"$",contains:m} 3933 },{className:"meta.prompt", 3934 begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", 3935 starts:{end:"$",keywords:r,contains:m}}];return l.unshift(o),{name:"Ruby", 3936 aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/, 3937 contains:[e.SHEBANG({binary:"ruby"})].concat(p).concat(l).concat(m)}}, 3938 grmr_rust:e=>{const n=e.regex,t={className:"title.function.invoke",relevance:0, 3939 begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,e.IDENT_RE,n.lookahead(/\s*\(/)) 3940 },a="([ui](8|16|32|64|128|size)|f(32|64))?",i=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],r=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"] 3941 ;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:r, 3942 keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"], 3943 literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:"</", 3944 contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"] 3945 }),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{ 3946 className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{ 3947 begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol", 3948 begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{ 3949 begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{ 3950 begin:"\\b0x([A-Fa-f0-9_]+)"+a},{ 3951 begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{ 3952 begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword", 3953 3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{ 3954 className:"string",begin:/"/,end:/"/}]},{ 3955 begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword", 3956 3:"keyword",4:"variable"}},{ 3957 begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword", 3958 3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE], 3959 className:{1:"keyword",3:"title.class"}},{ 3960 begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE], 3961 className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{ 3962 keyword:"Self",built_in:i,type:r}},{className:"punctuation",begin:"->"},t]}}, 3963 grmr_scss:e=>{const n=ie(e),t=le,a=oe,i="@[a-z-]+",r={className:"variable", 3964 begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS", 3965 case_insensitive:!0,illegal:"[=/|']", 3966 contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n.CSS_NUMBER_MODE,{ 3967 className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ 3968 className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0 3969 },n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag", 3970 begin:"\\b("+re.join("|")+")\\b",relevance:0},{className:"selector-pseudo", 3971 begin:":("+a.join("|")+")"},{className:"selector-pseudo", 3972 begin:":(:)?("+t.join("|")+")"},r,{begin:/\(/,end:/\)/, 3973 contains:[n.CSS_NUMBER_MODE]},n.CSS_VARIABLE,{className:"attribute", 3974 begin:"\\b("+ce.join("|")+")\\b"},{ 3975 begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" 3976 },{begin:/:/,end:/[;}{]/,relevance:0, 3977 contains:[n.BLOCK_COMMENT,r,n.HEXCOLOR,n.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.IMPORTANT,n.FUNCTION_DISPATCH] 3978 },{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{ 3979 begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/, 3980 keyword:"and or not only",attribute:se.join(" ")},contains:[{begin:i, 3981 className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute" 3982 },r,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.HEXCOLOR,n.CSS_NUMBER_MODE] 3983 },n.FUNCTION_DISPATCH]}},grmr_shell:e=>({name:"Shell Session", 3984 aliases:["console","shellsession"],contains:[{className:"meta.prompt", 3985 begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/, 3986 subLanguage:"bash"}}]}),grmr_sql:e=>{ 3987 const n=e.regex,t=e.COMMENT("--","$"),a=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],r=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],o=r,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","
3987initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!r.includes(e))),c={ 3988 begin:n.concat(/\b/,n.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}} 3989 ;return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ 3990 $pattern:/\b[\w\.]+/,keyword:((e,{exceptions:n,when:t}={})=>{const a=t 3991 ;return n=n||[],e.map((e=>e.match(/\|\d+$/)||n.includes(e)?e:a(e)?e+"|0":e)) 3992 })(l,{when:e=>e.length<3}),literal:a,type:i, 3993 built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] 3994 },contains:[{begin:n.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/, 3995 keyword:l.concat(s),literal:a,type:i}},{className:"type", 3996 begin:n.either("double precision","large object","with timezone","without timezone") 3997 },c,{className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},{className:"string", 3998 variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/, 3999 contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{ 4000 className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, 4001 relevance:0}]}},grmr_swift:e=>{const n={match:/\s+/,relevance:0 4002 },t=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,t],i={ 4003 match:[/\./,m(...xe,...Me)],className:{2:"keyword"}},r={match:b(/\./,m(...Ae)), 4004 relevance:0},s=Ae.filter((e=>"string"==typeof e)).concat(["_|0"]),o={variants:[{ 4005 className:"keyword", 4006 match:m(...Ae.filter((e=>"string"!=typeof e)).concat(Se).map(ke),...Me)}]},l={ 4007 $pattern:m(/\b\w+/,/#\w+/),keyword:s.concat(Re),literal:Ce},c=[i,r,o],g=[{ 4008 match:b(/\./,m(...De)),relevance:0},{className:"built_in", 4009 match:b(/\b/,m(...De),/(?=\()/)}],u={match:/->/,relevance:0},p=[u,{ 4010 className:"operator",relevance:0,variants:[{match:Be},{match:`\\.(\\.|${Le})+`}] 4011 }],_="([0-9]_*)+",h="([0-9a-fA-F]_*)+",f={className:"number",relevance:0, 4012 variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{
vendor: 4,353 bytes, lines 4013-4070
4013 match:`\\b0x(${h})(\\.(${h}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/ 4014 },{match:/\b0b([01]_*)+\b/}]},E=(e="")=>({className:"subst",variants:[{ 4015 match:b(/\\/,e,/[0\\tnr"']/)},{match:b(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}] 4016 }),y=(e="")=>({className:"subst",match:b(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/) 4017 }),N=(e="")=>({className:"subst",label:"interpol",begin:b(/\\/,e,/\(/),end:/\)/ 4018 }),w=(e="")=>({begin:b(e,/"""/),end:b(/"""/,e),contains:[E(e),y(e),N(e)] 4019 }),v=(e="")=>({begin:b(e,/"/),end:b(/"/,e),contains:[E(e),N(e)]}),O={ 4020 className:"string", 4021 variants:[w(),w("#"),w("##"),w("###"),v(),v("#"),v("##"),v("###")] 4022 },k=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0, 4023 contains:[e.BACKSLASH_ESCAPE]}],x={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//, 4024 contains:k},M=e=>{const n=b(e,/\//),t=b(/\//,e);return{begin:n,end:t, 4025 contains:[...k,{scope:"comment",begin:`#(?!.*${t})`,end:/$/}]}},S={ 4026 scope:"regexp",variants:[M("###"),M("##"),M("#"),x]},A={match:b(/`/,Fe,/`/) 4027 },C=[A,{className:"variable",match:/\$\d+/},{className:"variable", 4028 match:`\\$${ze}+`}],T=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{ 4029 contains:[{begin:/\(/,end:/\)/,keywords:Pe,contains:[...p,f,O]}]}},{ 4030 scope:"keyword",match:b(/@/,m(...je))},{scope:"meta",match:b(/@/,Fe)}],R={ 4031 match:d(/\b[A-Z]/),relevance:0,contains:[{className:"type", 4032 match:b(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,ze,"+") 4033 },{className:"type",match:Ue,relevance:0},{match:/[?!]+/,relevance:0},{ 4034 match:/\.\.\./,relevance:0},{match:b(/\s+&\s+/,d(Ue)),relevance:0}]},D={ 4035 begin:/</,end:/>/,keywords:l,contains:[...a,...c,...T,u,R]};R.contains.push(D) 4036 ;const I={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{ 4037 match:b(Fe,/\s*:/),keywords:"_|0",relevance:0 4038 },...a,S,...c,...g,...p,f,O,...C,...T,R]},L={begin:/</,end:/>/, 4039 keywords:"repeat each",contains:[...a,R]},B={begin:/\(/,end:/\)/,keywords:l, 4040 contains:[{begin:m(d(b(Fe,/\s*:/)),d(b(Fe,/\s+/,Fe,/\s*:/))),end:/:/, 4041 relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params", 4042 match:Fe}]},...a,...c,...p,f,O,...T,R,I],endsParent:!0,illegal:/["']/},$={ 4043 match:[/(func|macro)/,/\s+/,m(A.match,Fe,Be)],className:{1:"keyword", 4044 3:"title.function"},contains:[L,B,n],illegal:[/\[/,/%/]},z={ 4045 match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"}, 4046 contains:[L,B,n],illegal:/\[|%/},F={match:[/operator/,/\s+/,Be],className:{ 4047 1:"keyword",3:"title"}},U={begin:[/precedencegroup/,/\s+/,Ue],className:{ 4048 1:"keyword",3:"title"},contains:[R],keywords:[...Te,...Ce],end:/}/} 4049 ;for(const e of O.variants){const n=e.contains.find((e=>"interpol"===e.label)) 4050 ;n.keywords=l;const t=[...c,...g,...p,f,O,...C];n.contains=[...t,{begin:/\(/, 4051 end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:l, 4052 contains:[...a,$,z,{beginKeywords:"struct protocol class extension enum actor", 4053 end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{ 4054 className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c] 4055 },F,U,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0 4056 },S,...c,...g,...p,f,O,...C,...T,R,I]}},grmr_typescript:e=>{ 4057 const n=Oe(e),t=_e,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={ 4058 beginKeywords:"namespace",end:/\{/,excludeEnd:!0, 4059 contains:[n.exports.CLASS_REFERENCE]},r={beginKeywords:"interface",end:/\{/, 4060 excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a}, 4061 contains:[n.exports.CLASS_REFERENCE]},s={$pattern:_e, 4062 keyword:he.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]), 4063 literal:fe,built_in:ve.concat(a),"variable.language":we},o={className:"meta", 4064 begin:"@"+t},l=(e,n,t)=>{const a=e.contains.findIndex((e=>e.label===n)) 4065 ;if(-1===a)throw Error("can not find mode to replace");e.contains.splice(a,1,t)} 4066 ;return Object.assign(n.keywords,s), 4067 n.exports.PARAMS_CONTAINS.push(o),n.contains=n.contains.concat([o,i,r]), 4068 l(n,"shebang",e.SHEBANG()),l(n,"use_strict",{className:"meta",relevance:10, 4069 begin:/^\s*['"]use strict['"]/ 4070 }),n.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(n,{
4071 name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n},grmr_vbnet:e=>{ 4072 const n=e.regex,t=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,r=/\d{1,2}(:\d{1,2}){1,2}/,s={ 4073 className:"literal",variants:[{begin:n.concat(/# */,n.either(a,t),/ *#/)},{ 4074 begin:n.concat(/# */,r,/ *#/)},{begin:n.concat(/# */,i,/ *#/)},{ 4075 begin:n.concat(/# */,n.either(a,t),/ +/,n.either(i,r),/ *#/)}] 4076 },o=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}] 4077 }),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]}) 4078 ;return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0, 4079 classNameAliases:{label:"symbol"},keywords:{ 4080 keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield", 4081 built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort", 4082 type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort", 4083 literal:"true false nothing"}, 4084 illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{ 4085 className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/, 4086 end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0, 4087 variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/ 4088 },{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{ 4089 begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{ 4090 className:"label",begin:/^\w+:/},o,l,{className:"meta", 4091 begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/, 4092 end:/$/,keywords:{ 4093 keyword:"const disable else elseif enable end externalsource if region then"}, 4094 contains:[l]}]}},grmr_wasm:e=>{e.regex;const n=e.COMMENT(/\(;/,/;\)/) 4095 ;return n.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/, 4096 keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"] 4097 },contains:[e.COMMENT(/;;/,/$/),n,{match:[/(?:offset|align)/,/\s*/,/=/], 4098 className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{ 4099 match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{ 4100 begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword", 4101 3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/, 4102 className:"type"},{className:"keyword", 4103 match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[
4103su]\/f(?:32|64))?|wrap\/i64|xor))\b/ 4104 },{className:"number",relevance:0, 4105 match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/ 4106 }]}},grmr_xml:e=>{ 4107 const n=e.regex,t=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a={ 4108 className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/, 4109 contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] 4110 },r=e.inherit(i,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{ 4111 className:"string"}),o=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={ 4112 endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr", 4113 begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{ 4114 className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{ 4115 begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{ 4116 name:"HTML, XML", 4117 aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], 4118 case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/, 4119 end:/>/,relevance:10,contains:[i,o,s,r,{begin:/\[/,end:/\]/,contains:[{ 4120 className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,r,o,s]}]}] 4121 },e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/, 4122 relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/, 4123 relevance:10,contains:[o]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag", 4124 begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{ 4125 end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", 4126 begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{ 4127 end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ 4128 className:"tag",begin:/<>|<\/>/},{className:"tag", 4129 begin:n.concat(/</,n.lookahead(n.concat(t,n.either(/\/>/,/>/,/\s/)))), 4130 end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:l}]},{ 4131 className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(t,/>/))),contains:[{ 4132 className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]} 4133 },grmr_yaml:e=>{ 4134 const n="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={ 4135 className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ 4136 },{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", 4137 variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(a,{ 4138 variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),r={ 4139 end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},s={begin:/\{/, 4140 end:/\}/,contains:[r],illegal:"\\n",relevance:0},o={begin:"\\[",end:"\\]", 4141 contains:[r],illegal:"\\n",relevance:0},l=[{className:"attr",variants:[{ 4142 begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{ 4143 begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$", 4144 relevance:10},{className:"string", 4145 begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ 4146 begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, 4147 relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type", 4148 begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t 4149 },{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", 4150 begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", 4151 relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ 4152 className:"number", 4153 begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" 4154 },{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,o,a],c=[...l] 4155 ;return c.pop(),c.push(i),r.contains=c,{name:"YAML",case_insensitive:!0, 4156 aliases:["yml"],contains:l}}});const He=ae;for(const e of Object.keys(Ke)){ 4157 const n=e.replace("grmr_","").replace("_","-");He.registerLanguage(n,Ke[e])} 4158 return He}() 4159 ;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); 4160 4161function highlightCodeBlocks() { 4162 const prettyPrintBlocks = document.querySelectorAll('pre.prettyprint, .wp-block-code'); 4163 4164 if (prettyPrintBlocks.length === 0) { 4165 return; 4166 } 4167 4168 prettyPrintBlocks.forEach(block => {
4169 hljs.highlightElement(block); 4170 }); 4171} 4172 4173document.addEventListener("DOMContentLoaded", highlightCodeBlocks); 4174;
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.