1window.socialWarfare = window.socialWarfare || {}; 2( function ( window, $ ) { 3 'use strict'; 4 if ( typeof $ !== 'function' ) { 5 if ( typeof jQuery === 'function' ) { 6 var $ = jQuery; 7 } else { 8 console.log( 9 'Social Warfare requires jQuery, or $ as an alias of jQuery. Please make sure your theme provides access to jQuery before activating Social Warfare.' 10 ); 11 return; 12 } 13 } 14 function isString( maybeString ) { 15 return typeof maybeString === 'string' && maybeString.length > 0; 16 } 17 socialWarfare.paddingTop = parseInt( $( 'body' ).css( 'padding-top' ) ); 18 socialWarfare.paddingBottom = parseInt( 19 $( 'body' ).css( 'padding-bottom' ) 20 ); 21 socialWarfare.initPlugin = function () { 22 $( 'body' ).css( { 23 paddingTop: socialWarfare.paddingTop, 24 paddingBottom: socialWarfare.paddingBottom, 25 } ); 26 socialWarfare.establishPanels(); 27 socialWarfare.establishBreakpoint(); 28 if ( 29 ! socialWarfare.panels.staticHorizontal && 30 ! socialWarfare.panels.floatingSide && 31 ! socialWarfare.panels.floatingHorizontal 32 ) { 33 return; 34 } 35 socialWarfare.emphasizeButtons(); 36 socialWarfare.createFloatHorizontalPanel(); 37 socialWarfare.positionFloatSidePanel(); 38 socialWarfare.activateHoverStates(); 39 socialWarfare.handleButtonClicks(); 40 socialWarfare.updateFloatingButtons(); 41 socialWarfare.closeLightboxOverlay(); 42 socialWarfare.preloadPinterestImages(); 43 if ( typeof swpPinIt === 'object' && swpPinIt.enabled == true ) { 44 socialWarfare.createHoverSaveButton(); 45 socialWarfare.triggerImageListeners(); 46 } 47 setTimeout( function () { 48 socialWarfare.checkListeners( 0, 5 ); 49 }, 2e3 ); 50 let time = Date.now(); 51 const scrollDelay = 50; 52 $( window ).on( 'scroll', function () { 53 if ( time + scrollDelay - Date.now() < 0 ) { 54 socialWarfare.updateFloatingButtons(); 55 time = Date.now(); 56 } 57 } ); 58 }; 59 let resizeWait; 60 socialWarfare.onWindowResize = function () { 61 clearTimeout( resizeWait ); 62 resizeWait = setTimeout( socialWarfare.initPlugin, 100 ); 63 }; 64 socialWarfare.establishPanels = function () { 65 socialWarfare.panels = { 66 staticHorizontal: null, 67 floatingSide: null, 68 floatingHorizontal: null, 69 }; 70 socialWarfare.panels.staticHorizontal = $( '.swp_social_panel' ).not( 71 '.swp_social_panelSide' 72 ); 73 socialWarfare.panels.floatingSide = $( '.swp_social_panelSide' ); 74 return socialWarfare.panels; 75 }; 76 socialWarfare.emphasizeButtons = function () { 77 if ( typeof socialWarfare.variables.emphasizeIcons === 'undefined' ) { 78 return; 79 } 80 if ( socialWarfare.isMobile() ) { 81 return; 82 } 83 jQuery( '.swp_social_panel:not(.swp_social_panelSide)' ).each( 84 function ( i, panel ) { 85 jQuery( panel ) 86 .find( '.nc_tweetContainer:not(.total_shares)' ) 87 .each( function ( index, button ) { 88 if ( index < socialWarfare.variables.emphasizeIcons ) { 89 const shareWidth = jQuery( button ) 90 .find( '.swp_share' ) 91 .width(); 92 const iconWidth = jQuery( button ) 93 .find( 'i.sw' ) 94 .outerWidth(); 95 const iconTextWidth = shareWidth + iconWidth + 35; 96 const containerWidth = jQuery( button ).width(); 97 const change = 98 1 + ( shareWidth + 35 ) / containerWidth; 99 if ( change < 2 ) { 100 jQuery( button ) 101 .addClass( 'swp_nohover' ) 102 .css( { flex: '2 1 0%' } ) 103 .find( '.iconFiller' ) 104 .width( iconTextWidth ); 105 } else { 106 jQuery( button ) 107 .addClass( 'swp_nohover' ) 108 .css( { flex: change + ' 1 0%' } ) 109 .find( '.iconFiller' ) 110 .width( iconTextWidth ); 111 } 112 } 113 } ); 114 } 115 ); 116 }; 117 socialWarfare.activateHoverStates = function () { 118 socialWarfare.trigger( 'pre_activate_buttons' ); 119 $( 120 '.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer' 121 ).on( 'mouseenter', function () { 122 if ( $( this ).hasClass( 'swp_nohover' ) ) { 123 return; 124 } 125 socialWarfare.resetStaticPanel(); 126 const termWidth = $( this ).find( '.swp_share' ).outerWidth(); 127 const iconWidth = $( this ).find( 'i.sw' ).outerWidth(); 128 const containerWidth = $( this ).width(); 129 const change = 1 + ( termWidth + 35 ) / containerWidth; 130 $( this ) 131 .find( '.iconFiller' ) 132 .width( termWidth + iconWidth + 25 + 'px' ); 133 $( this ).css( 'flex', change + ' 1 0%' ); 134 } ); 135 $( '.swp_social_panel:not(.swp_social_panelSide)' ).on( 136 'mouseleave', 137 socialWarfare.resetStaticPanel 138 ); 139 }; 140 socialWarfare.resetStaticPanel = function () { 141 $( 142 '.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover) .iconFiller' 143 ).removeAttr( 'style' ); 144 $( 145 '.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover)' 146 ).removeAttr( 'style' ); 147 }; 148 socialWarfare.handleButtonClicks = function () { 149 $( '.nc_tweet, a.swp_CTT' ).off( 'click' ); 150 $( '.nc_tweet, a.swp_CTT' ).on( 'click', function ( event ) { 151 if ( $( this ).parent( '.swp_print' ).length > 0 ) { 152 event.preventDefault(); 153 window.print(); 154 return; 155 } 156 if ( 157 true === $( this ).hasClass( 'pinterest_multi_image_select' ) 158 ) { 159 event.preventDefault(); 160 socialWarfare.openMultiPinterestOverlay( $( this ) ); 161 return; 162 } 163 if ( $( this ).parent( '.swp_more' ).length > 0 ) { 164 event.preventDefault(); 165 socialWarfare.openMoreOptions( $( this ) ); 166 return; 167 } 168 if ( $( this ).hasClass( 'noPop' ) ) { 169 return event; 170 } 171 if ( 172 'undefined' === typeof $( this ).data( 'link' ) && 173 false === $( this ).is( '.swp-hover-pin-button' ) 174 ) { 175 return event; 176 } 177 event.preventDefault(); 178 const href = $( this ).data( 'link' ).replace( 'â', "'" ); 179 let height, width, top, left, instance, windowAttributes, network; 180 height = 270; 181 width = 500; 182 if ( 183 $( this ).is( 184 '.swp_pinterest a, .buffer_link a, .flipboard a, .swp-hover-pin-button' 185 ) 186 ) { 187 height = 550; 188 width = 775; 189 } 190 if ( $( this ).hasClass( 'nc_tweet' ) ) { 191 network = $( this ) 192 .parents( '.nc_tweetContainer' ) 193 .data( 'network' ); 194 } else if ( $( this ).hasClass( 'swp_CTT' ) ) { 195 network = 'ctt'; 196 } 197 top = window.screenY + ( window.innerHeight - height ) / 2; 198 left = window.screenX + ( window.innerWidth - width ) / 2; 199 windowAttributes = 200 'height=' + 201 height + 202 ',width=' + 203 width + 204 ',top=' + 205 top + 206 ',left=' + 207 left; 208 instance = window.open( href, network, windowAttributes ); 209 socialWarfare.trackClick( network ); 210 } ); 211 }; 212 socialWarfare.openMultiPinterestOverlay = function ( element ) { 213 if ( $( '.pinterest-overlay' ).length > 0 ) { 214 $( '.pinterest-overlay' ).fadeIn(); 215 $( '.swp-lightbox-inner' ).scrollTop( 0 ); 216 return; 217 } 218 let html = ''; 219 const pin_data = element.data( 'pins' ); 220 let pin_images = '';
221 pin_data.images.forEach( function ( image ) { 222 const share_url = 223 'https://pinterest.com/pin/create/button/?url=' + 224 pin_data.url + 225 '&media=' + 226 image + 227 '&description=' + 228 encodeURIComponent( pin_data.description ); 229 let pin_html = ''; 230 pin_html += '<div class="pin_image_select_wrapper">'; 231 pin_html += '<img class="pin_image" src="' + image + '" />'; 232 pin_html += 233 '<a class="swp-hover-pin-button" href="' + 234 share_url + 235 '" data-link="' + 236 share_url + 237 '">Save</a>'; 238 pin_html += '</div>'; 239 pin_images += pin_html; 240 } ); 241 html += 242 '<div class="swp-lightbox-wrapper pinterest-overlay"><div class="swp-lightbox-inner">'; 243 html += '<i class="sw swp_pinterest_icon top_icon"></i>'; 244 html += '<div class="swp-lightbox-close"></div>'; 245 html += '<h5>Which image would you like to pin?</h5>'; 246 html += '<div class="pin_images_wrapper">'; 247 html += pin_images; 248 html += '</div>'; 249 html += socialWarfare.buildPoweredByLink(); 250 html += '</div></div>'; 251 $( 'body' ).append( html ); 252 $( '.pinterest-overlay' ).hide().fadeIn(); 253 socialWarfare.handleButtonClicks(); 254 let max_height = 999999; 255 let iteration = 0, 256 images = $( '.pinterest-overlay .pin_images_wrapper img' ); 257 images.load( function () { 258 if ( ++iteration === images.length ) { 259 images 260 .each( function () { 261 if ( $( this ).height() < max_height ) { 262 max_height = $( this ).height(); 263 } 264 } ) 265 .promise() 266 .done( function () { 267 images.height( max_height + 'px' ); 268 const number_of_rows = Math.ceil( images.length / 4 ); 269 for ( i = 0; i < number_of_rows; i++ ) { 270 const current_row_images = images.slice( 271 i * 4, 272 i * 4 + 4 273 ); 274 var max_allowable_width = 275 current_row_images.length / 4; 276 var total_width = $( 277 '.pin_images_wrapper' 278 ).width(); 279 var total_images_width = 0; 280 current_row_images.each( function () { 281 total_images_width = 282 total_images_width + $( this ).width(); 283 } ); 284 var ratio = total_width / total_images_width; 285 current_row_images.each( function () { 286 const new_width = 287 ( ( $( this ).width() * ratio ) / 288 total_width ) * 289 100 * 290 max_allowable_width - 291 1; 292 $( this ) 293 .parent() 294 .width( new_width + '%' ); 295 $( this ).height( 'auto' ); 296 } ); 297 var height = current_row_images.first().height(); 298 current_row_images.each( function () { 299 $( this ) 300 .width( $( this ).width() ) 301 .height( height ); 302 } ); 303 } 304 } ); 305 } 306 } ); 307 }; 308 socialWarfare.buildPoweredByLink = function () { 309 let html = ''; 310 if ( true === socialWarfare.variables.powered_by_toggle ) { 311 let anchor_tag_open = ''; 312 let anchor_tag_close = ''; 313 if ( false !== socialWarfare.variables.affiliate_link ) { 314 anchor_tag_open = 315 '<a href="' + 316 socialWarfare.variables.affiliate_link + 317 '" target="_blank">'; 318 anchor_tag_close = '</a>'; 319 } 320 html = 321 '<div class="swp_powered_by">' + 322 anchor_tag_open + 323 '<span>Powered by</span> <img src="/wp-content/plugins/social-warfare/assets/images/admin-options-page/social-warfare-pro-light.png">' + 324 anchor_tag_close + 325 '</div>'; 326 } 327 return html; 328 }; 329 socialWarfare.preloadPinterestImages = function () { 330 if ( $( '.pinterest_multi_image_select' ).length < 1 ) { 331 return; 332 } 333 const pin_data = $( '.pinterest_multi_image_select' ).data( 'pins' ); 334 pin_data.images.forEach( function ( image_url ) { 335 const image_object = new Image(); 336 image_object.src = image_url; 337 } ); 338 }; 339 socialWarfare.openMoreOptions = function ( element ) { 340 if ( $( '.swp-more-wrapper' ).length > 0 ) { 341 $( '.swp-more-wrapper' ).fadeIn(); 342 return; 343 } 344 const post_id = element 345 .parents( '.swp_social_panel' ) 346 .data( 'post-id' ); 347 const data = { 348 action: 'swp_buttons_panel', 349 post_id, 350 _ajax_nonce: swp_nonce, 351 }; 352 jQuery.post( swp_ajax_url, data, function ( response ) { 353 $( 'body' ).append( response ); 354 $( '.swp-lightbox-wrapper' ).hide().fadeIn(); 355 socialWarfare.activateHoverStates(); 356 socialWarfare.handleButtonClicks(); 357 } ); 358 }; 359 socialWarfare.closeLightboxOverlay = function () { 360 $( 'body' ).on( 'click', '.swp-lightbox-close', function () { 361 $( '.swp-lightbox-wrapper' ).fadeOut(); 362 } ); 363 $( document ).on( 'keyup', function ( e ) { 364 if ( e.key === 'Escape' ) { 365 $( '.swp-lightbox-wrapper' ).fadeOut(); 366 } 367 } ); 368 }; 369 socialWarfare.createFloatHorizontalPanel = function () { 370 if ( ! socialWarfare.panels.staticHorizontal.length ) { 371 return; 372 } 373 const floatLocation = 374 socialWarfare.panels.staticHorizontal.data( 'float' ); 375 const mobileFloatLocation = 376 socialWarfare.panels.staticHorizontal.data( 'float-mobile' ); 377 const backgroundColor = 378 socialWarfare.panels.staticHorizontal.data( 'float-color' ); 379 const wrapper = $( 380 '<div class="nc_wrapper swp_floating_horizontal_wrapper" style="background-color:' + 381 backgroundColor + 382 '"></div>' 383 ); 384 let barLocation = ''; 385 if ( $( '.nc_wrapper' ).length ) { 386 $( '.nc_wrapper' ).remove(); 387 } 388 if ( $( '.swp_floating_horizontal_wrapper' ).length ) { 389 $( '.swp_floating_horizontal_wrapper' ).remove(); 390 } 391 if ( 392 floatLocation != 'top' && 393 floatLocation != 'bottom' && 394 mobileFloatLocation != 'top' && 395 mobileFloatLocation != 'bottom' 396 ) { 397 return; 398 } 399 if ( socialWarfare.isMobile() ) { 400 barLocation = mobileFloatLocation; 401 } else { 402 barLocation = floatLocation; 403 } 404 wrapper.addClass( barLocation ).hide().appendTo( 'body' ); 405 socialWarfare.panels.floatingHorizontal = 406 socialWarfare.panels.staticHorizontal.first().clone(); 407 socialWarfare.panels.floatingHorizontal 408 .addClass( 'nc_floater' ) 409 .appendTo( wrapper ); 410 socialWarfare.updateFloatingHorizontalDimensions(); 411 $( '.swp_social_panel .swp_count' ).css( { 412 transition: 'padding .1s linear', 413 } ); 414 }; 415 socialWarfare.updateFloatingHorizontalDimensions = function () { 416 if ( ! socialWarfare.panels.staticHorizontal.length ) { 417 return; 418 } 419 if ( ! socialWarfare.panels.floatingHorizontal ) { 420 return; 421 } 422 let width = '100%'; 423 let left = 0; 424 const panel = socialWarfare.panels.staticHorizontal; 425 let parent = panel.parent(); 426 if ( parent.hasClass( 'swp-hidden-panel-wrap' ) ) { 427 parent = parent.parent(); 428 } 429 if ( 'undefined' !== typeof panel.offset().left ) { 430 left = panel.offset().left; 431 } 432 if ( 'undefined' !== typeof panel.width() ) { 433 width = panel.width(); 434 } 435 if ( left == 0 ) { 436 left = parent.offset().left; 437 } 438 if ( width == 100 || width == 0 ) { 439 width = parent.width(); 440 } 441 socialWarfare.panels.floatingHorizontal.css( { 442 width, 443 left, 444 } ); 445 }; 446 socialWarfare.staticPanelIsVisible = function () { 447 let visible = false; 448 const scrollPos = $( window ).scrollTop(); 449 $( '.swp_social_panel' ) 450 .not( '.swp_social_panelSide, .nc_floater' ) 451 .each( function ( index ) { 452 const offset = $( this ).offset(); 453 if ( 454 typeof socialWarfare.floatBeforeContent !== 'undefined' && 455 '1' != socialWarfare.floatBeforeContent 456 ) { 457 const theContent = $( '.swp-content-locator' ).parent(); 458 if ( 459 index === 0 && 460 theContent.length && 461 theContent.offset().top > 462 scrollPos + $( window ).height() 463 ) { 464 visible = true; 465 } 466 } 467 if ( 468 $( this ).is( ':visible' ) && 469 offset.top + $( this ).height() > scrollPos && 470 offset.top < scrollPos + $( window ).height() 471 ) { 472 visible = true; 473 } 474 } ); 475 return visible; 476 }; 477 socialWarfare.updateFloatingButtons = function () { 478 if ( socialWarfare.panels.staticHorizontal.length ) { 479 var panel = socialWarfare.panels.staticHorizontal; 480 } else if ( socialWarfare.panels.floatingSide.length ) { 481 var panel = socialWarfare.panels.floatingSide; 482 } else { 483 return; 484 } 485 var location = panel.data( 'float' ); 486 if ( true == socialWarfare.isMobile() ) { 487 var location = panel.data( 'float-mobile' ); 488 } 489 if ( location == 'none' ) { 490 return $( 491 '.nc_wrapper, .swp_floating_horizontal_wrapper, .swp_social_panelSide' 492 ).hide(); 493 } 494 if ( socialWarfare.isMobile() ) { 495 socialWarfare.toggleMobileButtons(); 496 socialWarfare.toggleFloatingHorizontalPanel(); 497 return; 498 } 499 if ( location == 'right' || location == 'left' ) { 500 socialWarfare.toggleFloatingVerticalPanel(); 501 } 502 if ( location == 'bottom' || location == 'top' ) { 503 socialWarfare.toggleFloatingHorizontalPanel(); 504 } 505 }; 506 socialWarfare.toggleMobileButtons = function () { 507 socialWarfare.panels.floatingSide.hide(); 508 const visibility = socialWarfare.staticPanelIsVisible() 509 ? 'collapse' 510 : 'visible'; 511 $( '.nc_wrapper, .swp_floating_horizontal_wrapper' ).css( 512 'visibility', 513 visibility 514 ); 515 }; 516 socialWarfare.toggleFloatingVerticalPanel = function () { 517 let direction = ''; 518 const location = socialWarfare.panels.floatingSide.data( 'float' ); 519 let visible = socialWarfare.staticPanelIsVisible(); 520 let offset = ''; 521 if ( socialWarfare.isMobile() ) { 522 return socialWarfare.panels.floatingSide.hide(); 523 } 524 if ( 525 ! socialWarfare.panels.floatingSide || 526 ! socialWarfare.panels.floatingSide.length 527 ) { 528 visible = true; 529 } 530 if ( 531 socialWarfare.panels.floatingSide.data( 'transition' ) == 'slide' 532 ) { 533 direction = location; 534 offset = visible ? '-150px' : '5px'; 535 socialWarfare.panels.floatingSide.css( direction, offset ).show(); 536 } else if ( visible ) { 537 socialWarfare.panels.floatingSide 538 .css( 'opacity', 1 ) 539 .fadeOut( 300 ) 540 .css( 'opacity', 0 ); 541 } else { 542 socialWarfare.panels.floatingSide 543 .css( 'opacity', 0 ) 544 .fadeIn( 300 ) 545 .css( 'display', 'flex' ) 546 .css( 'opacity', 1 ); 547 } 548 }; 549 socialWarfare.hasReferencePanel = function () { 550 return (
551 typeof socialWarfare.panels.staticHorizontal !== 'undefined' && 552 socialWarfare.panels.staticHorizontal.length > 0 553 ); 554 }; 555 socialWarfare.toggleFloatingHorizontalPanel = function () { 556 if ( ! socialWarfare.hasReferencePanel() ) { 557 return; 558 } 559 if ( ! socialWarfare.panels.floatingHorizontal ) { 560 return; 561 } 562 const panel = socialWarfare.panels.floatingHorizontal.first(); 563 const location = socialWarfare.isMobile() 564 ? $( panel ).data( 'float-mobile' ) 565 : $( panel ).data( 'float' ); 566 let newPadding = 567 location == 'bottom' 568 ? socialWarfare.paddingBottom 569 : socialWarfare.paddingTop; 570 const paddingProp = 'padding-' + location; 571 if ( location == 'off' ) { 572 return; 573 } 574 if ( socialWarfare.staticPanelIsVisible() ) { 575 $( '.nc_wrapper, .swp_floating_horizontal_wrapper' ).hide(); 576 if ( socialWarfare.isMobile() && $( '#wpadminbar' ).length ) { 577 $( '#wpadminbar' ).css( 'top', 0 ); 578 } 579 } else { 580 newPadding += 50; 581 $( '.nc_wrapper, .swp_floating_horizontal_wrapper' ).show(); 582 if ( 583 socialWarfare.isMobile() && 584 location == 'top' && 585 $( '#wpadminbar' ).length 586 ) { 587 $( '#wpadminbar' ).css( 'top', panel.parent().height() ); 588 } 589 } 590 $( 'body' ).css( paddingProp, newPadding ); 591 }; 592 socialWarfare.positionFloatSidePanel = function () { 593 let panelHeight, windowHeight, offset; 594 const sidePanel = socialWarfare.panels.floatingSide; 595 if ( ! sidePanel || ! sidePanel.length ) { 596 return; 597 } 598 if ( 599 sidePanel.hasClass( 'swp_side_top' ) || 600 sidePanel.hasClass( 'swp_side_bottom' ) 601 ) { 602 return; 603 } 604 panelHeight = sidePanel.outerHeight(); 605 windowHeight = window.innerHeight; 606 if ( panelHeight > windowHeight ) { 607 return sidePanel.css( 'top', 0 ); 608 } 609 offset = ( windowHeight - panelHeight ) / 2; 610 sidePanel.css( 'top', offset ); 611 }; 612 socialWarfare.createHoverSaveButton = function () { 613 if ( $( '.tve_editor_page' ).length ) { 614 $( '.sw-pinit-button' ).remove(); 615 $( '.sw-pinit' ).each( function () { 616 const inner_content = $( '.sw-pinit' ).contents(); 617 $( this ).replaceWith( inner_content ); 618 } ); 619 return; 620 } 621 const button = $( document.createElement( 'a' ) ); 622 button.css( 'display: none' ); 623 button.addClass( 'swp-hover-pin-button' ); 624 button.text( 'Save' ); 625 socialWarfare.hoverSaveButton = $( button ); 626 return button; 627 }; 628 socialWarfare.triggerImageListeners = function () { 629 $( '.swp-content-locator' ) 630 .parent() 631 .find( 'img' ) 632 .off( 'mouseenter', socialWarfare.renderPinterestSaveButton ); 633 $( '.swp-content-locator' ) 634 .parent() 635 .find( 'img' ) 636 .on( 'mouseenter', socialWarfare.renderPinterestSaveButton ); 637 setTimeout( socialWarfare.triggerImageListeners, 2e3 ); 638 }; 639 socialWarfare.getPinMedia = function ( image ) { 640 if ( isString( swpPinIt.image_source ) ) { 641 return swpPinIt.image_source; 642 } 643 if ( isString( image.attr( 'src' ) ) ) { 644 return image.attr( 'src' ); 645 } 646 const dataSources = [ 'src', 'lazy-src', 'media' ]; 647 let media = ''; 648 dataSources.some( function ( maybeSource ) { 649 if ( isString( image.data( maybeSource ) ) ) { 650 media = image.data( maybeSource ); 651 return true; 652 } 653 } ); 654 if ( media == '' ) { 655 return; 656 } 657 const i = $( '<img>' ); 658 i.attr( 'src', media ); 659 return i.prop( 'src' ); 660 }; 661 socialWarfare.getPinDescription = function ( image ) { 662 if ( isString( image.data( 'pin-description' ) ) ) { 663 return image.data( 'pin-description' ); 664 } 665 if ( isString( swpPinIt.image_description ) ) { 666 return swpPinIt.image_description; 667 } 668 if ( isString( image.attr( 'title' ) ) ) { 669 return image.attr( 'title' ); 670 } 671 if ( isString( image.attr( 'alt' ) ) ) { 672 return image.attr( 'alt' ); 673 } 674 if ( isString( swpPinIt.post_title ) ) { 675 return swpPinIt.post_title; 676 } 677 }; 678 socialWarfare.enablePinterestSaveButtons = function () { 679 jQuery( 'img' ).on( 'mouseenter', function () { 680 const pinterestBrowserButtons = 681 socialWarfare.findPinterestBrowserSaveButtons(); 682 if ( 683 typeof pinterestBrowserButtons !== 'undefined' && 684 pinterestBrowserButtons 685 ) { 686 socialWarfare.removePinterestBrowserSaveButtons( 687 pinterestBrowserButtons 688 ); 689 } 690 } ); 691 }; 692 socialWarfare.toggleHoverSaveDisplay = function ( image ) { 693 let top = image.offset().top; 694 let left = image.offset().left; 695 const vMargin = 15; 696 const hMargin = 15; 697 const button_size = swpPinIt.button_size || 1; 698 const buttonHeight = 24; 699 const buttonWidth = 120; 700 switch ( swpPinIt.vLocation ) { 701 case 'top': 702 top += vMargin; 703 break; 704 case 'middle': 705 var offset = 706 image.height() / 2 - vMargin / 2 - buttonHeight / 2; 707 top += offset; 708 break; 709 case 'bottom': 710 top += image.height() - vMargin - buttonHeight; 711 break; 712 } 713 switch ( swpPinIt.hLocation ) { 714 case 'left': 715 left += hMargin; 716 break; 717 case 'center': 718 var offset = image.width() / 2 - hMargin / 2 - buttonWidth / 2; 719 left += offset; 720 break; 721 case 'right': 722 left += image.width() - hMargin - buttonWidth; 723 break; 724 } 725 socialWarfare.hoverSaveButton.css( { 726 top, 727 left, 728 transform: 'scale(' + button_size + ')', 729 'transform-origin': swpPinIt.vLocation + ' ' + swpPinIt.hLocation, 730 } ); 731 image.on( 'mouseleave', function ( event ) { 732 if ( 733 event.relatedTarget != null && 734 event.relatedTarget.className == 'swp-hover-pin-button' 735 ) { 736 return; 737 } 738 $( '.swp-hover-pin-button' ).remove(); 739 } ); 740 $( document.body ).append( socialWarfare.hoverSaveButton ); 741 }; 742 socialWarfare.renderPinterestSaveButton = function ( event ) { 743 if ( 744 event.relatedTarget && 745 event.relatedTarget.className == 'swp-hover-pin-button' 746 ) { 747 return; 748 } 749 if ( $( '.swp-hover-pin-button' ).length > 0 ) { 750 return; 751 } 752 const image = $( event.target ); 753 if (
754 typeof swpPinIt.disableOnAnchors !== undefined && 755 swpPinIt.disableOnAnchors 756 ) { 757 if ( image.parents().filter( 'a' ).length ) { 758 return; 759 } 760 } 761 if ( 762 image.outerHeight() < swpPinIt.minHeight || 763 image.outerWidth() < swpPinIt.minWidth 764 ) { 765 return; 766 } 767 if ( image.hasClass( 'no_pin' ) || image.hasClass( 'no-pin' ) ) { 768 return; 769 } 770 socialWarfare.toggleHoverSaveDisplay( image ); 771 const description = socialWarfare.getPinDescription( image ); 772 const media = socialWarfare.getPinMedia( image ); 773 const shareLink = 774 'http://pinterest.com/pin/create/bookmarklet/?media=' + 775 encodeURI( media ) + 776 '&url=' + 777 encodeURI( document.URL ) + 778 '&is_video=false' + 779 '&description=' + 780 encodeURIComponent( description ); 781 function openPinterestDialogue( event ) { 782 const offsetLeft = ( $( window ).width() - 775 ) / 2; 783 const offsetTop = ( $( window ).height() - 550 ) / 2; 784 const position = ',top=' + offsetTop + ',left=' + offsetLeft; 785 window.open( 786 shareLink, 787 'Pinterest', 788 'width=775,height=550,status=0,toolbar=0,menubar=0,location=1,scrollbars=1' + 789 position 790 ); 791 socialWarfare.trackClick( 'pin_image' ); 792 $( '.swp-hover-pin-button' ).remove(); 793 } 794 $( '.swp-hover-pin-button' ).on( 'click', openPinterestDialogue ); 795 }; 796 socialWarfare.findPinterestBrowserSaveButtons = function () { 797 let pinterestRed, 798 pinterestRed2019, 799 pinterestZIndex, 800 pinterestBackgroundSize, 801 button, 802 style; 803 pinterestRed = 'rgb(189, 8, 28)'; 804 pinterestRed2019 = 'rgb(230, 0, 35)'; 805 pinterestZIndex = '8675309'; 806 pinterestBackgroundSize = '14px 14px'; 807 button = null; 808 document 809 .querySelectorAll( 'span' ) 810 .forEach( function ( element, index ) { 811 style = window.getComputedStyle( element ); 812 if ( 813 style.backgroundColor == pinterestRed || 814 style.backgroundColor == pinterestRed2019 815 ) { 816 if ( 817 style.backgroundSize == pinterestBackgroundSize && 818 style.zIndex == pinterestZIndex 819 ) { 820 button = element; 821 } 822 } 823 } ); 824 return button; 825 }; 826 socialWarfare.removePinterestBrowserSaveButtons = function ( button ) { 827 let pinterestSquare, style, size; 828 pinterestSquare = button.nextSibling; 829 if ( 830 pinterestSquare != undefined && 831 pinterestSquare.nodeName == 'SPAN' 832 ) { 833 style = window.getComputedStyle( pinterestSquare ); 834 size = '24px'; 835 if ( 836 style.width.indexOf( size ) === 0 && 837 style.height.indexOf( size ) === 0 838 ) { 839 pinterestSquare.remove(); 840 } 841 } 842 button.remove(); 843 }; 844 socialWarfare.fetchFacebookShares = function () { 845 const url1 = 846 'https://graph.facebook.com/v18.0/?fields=og_object{engagement}&id=' + 847 swp_post_url; 848 const url2 = swp_post_recovery_url 849 ? 'https://graph.facebook.com/v18.0/?fields=og_object{engagement}&id=' + 850 swp_post_recovery_url 851 : ''; 852 console.log( 'Facebook Share API: ' + url1 ); 853 console.log( 'Facebook Share API (recovery): ' + url2 ); 854 $.when( $.get( url1 ), $.get( url2 ) ).then( 855 function ( response1, response2 ) { 856 var shares, shares1, shares2, data; 857 shares1 = socialWarfare.parseFacebookShares( response1[ 0 ] ); 858 shares2 = 0; 859 if ( swp_post_recovery_url ) { 860 shares2 = socialWarfare.parseFacebookShares( 861 response2[ 0 ] 862 ); 863 } 864 shares = shares1; 865 if ( shares1 !== shares2 ) { 866 shares = shares1 + shares2; 867 } 868 var data = { 869 action: 'swp_facebook_shares_update', 870 post_id: swp_post_id, 871 share_counts: shares, 872 }; 873 $.post( swp_admin_ajax, data, function ( response ) { 874 console.log( response ); 875 } ); 876 } 877 ); 878 }; 879 socialWarfare.parseFacebookShares = function ( response ) { 880 if ( 'undefined' === typeof response.og_object ) { 881 console.log( 'Facebook Shares: 0' ); 882 return 0; 883 } 884 console.log( 885 'Facebook Shares: ' + response.og_object.engagement.count 886 ); 887 return parseInt( response.og_object.engagement.count ); 888 }; 889 socialWarfare.trigger = function ( event ) { 890 $( window ).trigger( $.Event( event ) ); 891 }; 892 socialWarfare.trackClick = function ( event ) { 893 if ( true === swpClickTracking ) { 894 if ( 'function' === typeof ga ) { 895 ga( 896 'send', 897 'event', 898 'social_media', 899 'swp_' + event + '_share' 900 ); 901 } 902 if ( 'object' === typeof dataLayer ) { 903 dataLayer.push( { event: 'swp_' + event + '_share' } ); 904 } 905 } 906 }; 907 socialWarfare.checkListeners = function ( count, limit ) { 908 if ( count > limit ) { 909 return; 910 } 911 const panel = $( '.swp_social_panel' ); 912 if ( panel.length > 0 && panel.find( '.swp_pinterest' ) ) { 913 socialWarfare.handleButtonClicks(); 914 return; 915 } 916 setTimeout( function () { 917 socialWarfare.checkListeners( ++count, limit ); 918 }, 2e3 ); 919 }; 920 socialWarfare.establishBreakpoint = function () { 921 const panel = $( '.swp_social_panel' ); 922 socialWarfare.breakpoint = 1100; 923 if ( 924 ( panel.length && panel.data( 'min-width' ) ) || 925 panel.data( 'min-width' ) == 0 926 ) { 927 socialWarfare.breakpoint = parseInt( panel.data( 'min-width' ) ); 928 } 929 }; 930 socialWarfare.isMobile = function () { 931 return $( window ).width() < socialWarfare.breakpoint; 932 }; 933 $( document ).ready( function () { 934 socialWarfare.initPlugin(); 935 socialWarfare.panels.floatingSide.hide(); 936 $( window ).on( 'resize', socialWarfare.onWindowResize ); 937 if ( 'undefined' !== typeof swpPinIt && swpPinIt.enabled ) { 938 socialWarfare.enablePinterestSaveButtons(); 939 } 940 } ); 941 $( window ).on( 'load', function () { 942 if ( 'undefined' !== typeof swpPinIt && swpPinIt.enabled ) { 943 socialWarfare.enablePinterestSaveButtons(); 944 } 945 window.clearCheckID = 0; 946 } ); 947} )( this, jQuery ); 948//# sourceMappingURL=script.min.js.map 949; 950function scrollToQueryId(queryId){const targetElement=document.getElementById(`uagb-block-queryid-${queryId}`);if(targetElement){const rect=targetElement.getBoundingClientRect();const adminBar=document.querySelector('#wpadminbar');const adminBarOffSetHeight=adminBar?.offsetHeight||0;const scrollTop=window?.pageYOffset||document?.documentElement?.scrollTop;const targetOffset=(rect?.top+scrollTop)-adminBarOffSetHeight;window.scrollTo({top:targetOffset,behavior:'smooth'})}}
951function findAncestorWithClass(element,className){while(element&&!element.classList.contains(className)){element=element.parentNode} 952return element} 953document.addEventListener('DOMContentLoaded',function(){function debounce(func,wait){let timeout;return function executedFunction(...args){const context=this;const later=()=>{timeout=null;func.apply(context,args)};clearTimeout(timeout);timeout=setTimeout(later,wait)}};function storeActiveFilter(loopBuilder,filterData,filterType){if(loopBuilder&&filterData){loopBuilder.setAttribute(`data-active-filter-${filterType}`,filterData)}} 954function getActiveFilter(loopBuilder,filterType){return loopBuilder?.getAttribute(`data-active-filter-${filterType}`)||null} 955async function updateContent(event,paged=null,buttonFilter=null,loopParentContainer){try{const loopBuilder=loopParentContainer;const formData=new FormData();const search=loopBuilder?.querySelector('.uagb-loop-search')?.value||'';const sorting=loopBuilder?.querySelector('.uagb-loop-sort')?.value||'';const categorySelect=loopBuilder?.querySelector('.uagb-loop-category');if(categorySelect?.value){formData.append('category',categorySelect.value);storeActiveFilter(loopBuilder,categorySelect.value,'select')}else{const storedSelectFilter=getActiveFilter(loopBuilder,'select');if(storedSelectFilter){formData.append('category',storedSelectFilter)}} 956const checkBoxValues=loopBuilder?.querySelectorAll('.uagb-cat-checkbox');const checkedValues=[];checkBoxValues?.forEach(checkBox=>{if(checkBox.checked&&checkBox.getAttribute('data-uagb-block-query-id')===event.target.dataset.uagbBlockQueryId){checkedValues.push(checkBox.value)}});let activeButtonData=getActiveFilter(loopBuilder,'button');if(!activeButtonData&&buttonFilter?.type){activeButtonData=buttonFilter.type;storeActiveFilter(loopBuilder,activeButtonData,'button')} 957formData.delete('buttonFilter');formData.delete('checkbox');formData.delete('category');loopBuilder.removeAttribute('data-active-filter-checkbox');loopBuilder.removeAttribute('data-active-filter-select');loopBuilder.removeAttribute('data-active-filter-button');if(event.target.classList.contains('uagb-cat-checkbox')){if(categorySelect)categorySelect.value='';formData.append('checkbox',checkedValues);storeActiveFilter(loopBuilder,JSON.stringify(checkedValues),'checkbox')}else if(event.target.classList.contains('uagb-loop-category')){checkBoxValues?.forEach(checkBox=>{if(checkBox.getAttribute('data-uagb-block-query-id')===event.target.dataset.uagbBlockQueryId){checkBox.checked=!1}});formData.append('category',categorySelect.value);storeActiveFilter(loopBuilder,categorySelect.value,'select')}else if(buttonFilter?.type){if(categorySelect)categorySelect.value='';checkBoxValues?.forEach(checkBox=>{if(checkBox.getAttribute('data-uagb-block-query-id')===event.target.dataset.uagbBlockQueryId){checkBox.checked=!1}});formData.append('buttonFilter',buttonFilter.type);storeActiveFilter(loopBuilder,buttonFilter.type,'button')} 958if(search){formData.append('search',search)} 959if(sorting){formData.append('sorting',sorting)} 960if(paged){formData.append('paged',paged)} 961let queryId=null;if(buttonFilter?.type==='all'){const el=document.querySelector('[data-query-id]');if(el){queryId=el.getAttribute('data-query-id')}else{queryId=0}}else{queryId=event.target?.dataset?.uagbBlockQueryId||event.target?.parentElement?.dataset?.uagbBlockQueryId||event?.dataset?.uagbBlockQueryId||event.target.closest('a')?.getAttribute('data-uagb-block-query-id')||0} 962scrollToQueryId(queryId);formData.append('queryId',queryId);formData.append('block_id',loopBuilder?.getAttribute('data-block_id'));formData.append('action','uagb_update_loop_builder_content');formData.append('postId',uagb_loop_builder.post_id);formData.append('postType',uagb_loop_builder.post_type);formData.append('security',uagb_loop_builder.nonce);const formDataObj={};formData.forEach((value,key)=>{formDataObj[key]=value});
962const output=await getUpdatedLoopWrapperContent(formData);if(output?.content?.wrapper){const loopElement=loopBuilder?.querySelector('#uagb-block-queryid-'+queryId);if(loopElement){loopElement.innerHTML=output.content.wrapper}} 963if(output?.content?.pagination){const paginationElements=loopBuilder?.querySelectorAll('#uagb-block-pagination-queryid-'+queryId);paginationElements?.forEach(element=>{element.innerHTML=output.content.pagination})}}catch(error){throw error}} 964function handleInput(event){const loopParentContainer=this.closest('.wp-block-uagb-loop-builder');const searchInputs=loopParentContainer.querySelectorAll('.uagb-loop-search');searchInputs.forEach(searchInput=>{if(searchInput.getAttribute('data-uagb-block-query-id')===event.target.dataset.uagbBlockQueryId){searchInput.value=event.target.value}});updateContent(event,null,null,loopParentContainer)} 965function handleCheckBoxVal(event){const loopParentContainer=this.closest('.wp-block-uagb-loop-builder');const checkBoxValues=loopParentContainer.querySelectorAll('.uagb-cat-checkbox');const checkedValues=[];checkBoxValues.forEach(checkBoxVal=>{const isChecked=checkBoxVal.checked;if(isChecked&&checkBoxVal.getAttribute('data-uagb-block-query-id')===event.target.dataset.uagbBlockQueryId){checkedValues.push(checkBoxVal.value)}});updateContent(event,null,null,loopParentContainer)} 966function handleSelect(event){const loopParentContainer=this.closest('.wp-block-uagb-loop-builder');const sortSelects=loopParentContainer.querySelectorAll('.uagb-loop-sort');sortSelects.forEach(sortSelect=>{if(sortSelect.getAttribute('data-uagb-block-query-id')===event.target.dataset.uagbBlockQueryId){sortSelect.value=event.target.value}});updateContent(event,null,null,loopParentContainer)} 967function handleCatSelect(event){const loopParentContainer=this.closest('.wp-block-uagb-loop-builder');const categorySelects=loopParentContainer.querySelectorAll('.uagb-loop-category');categorySelects.forEach(categorySelect=>{if(categorySelect.getAttribute('data-uagb-block-query-id')===event.target.dataset.uagbBlockQueryId){categorySelect.value=event.target.value}});if(!event.target.value||event.target.value===''||event.target.value==='all'){loopParentContainer.removeAttribute('data-active-filter-select')} 968updateContent(event,null,null,loopParentContainer)} 969function resetValues(container,selector,queryId,resetCallback){const elements=container.querySelectorAll(selector);elements.forEach(element=>{const elementQueryId=element.dataset.uagbBlockQueryId;if(elementQueryId===queryId){resetCallback(element)}})} 970function handleReset(event){const loopParentContainer=this.closest('.wp-block-uagb-loop-builder');let queryId=event.target.parentElement.dataset.uagbBlockQueryId;if(event.target.tagName.toLowerCase()==='a'){queryId=event.target.dataset.uagbBlockQueryId}else if(event.target.tagName.toLowerCase()==='svg'||event.target.tagName.toLowerCase()==='path'){queryId=event.target.closest('a')?.getAttribute('data-uagb-block-query-id')} 971const loopBuilder=findAncestorWithClass(event.target.parentNode,'wp-block-uagb-loop-builder');resetValues(loopBuilder,'.uagb-loop-search',queryId,element=>{element.value=''});resetValues(loopBuilder,'.uagb-loop-sort',queryId,element=>{element.value=''});resetValues(loopBuilder,'.uagb-loop-category',queryId,element=>{element.value=''});resetValues(loopBuilder,'.uagb-cat-checkbox',queryId,element=>{element.checked=!1});if(loopBuilder){loopBuilder.removeAttribute('data-active-filter-select');loopBuilder.removeAttribute('data-active-filter-checkbox');loopBuilder.removeAttribute('data-active-filter-button')} 972updateContent(event,null,null,loopParentContainer)} 973const resetButtons=document.querySelectorAll('.uagb-loop-reset');const searchInputs=document.querySelectorAll('.uagb-loop-search');searchInputs.forEach(searchInput=>{const debouncedHandleInput=debounce(handleInput,250);searchInput.addEventListener('input',debouncedHandleInput)});const sortSelects=document.querySelectorAll('.uagb-loop-sort');sortSelects.forEach(sortSelect=>{const debouncedHandleInput=debounce(handleSelect,250);sortSelect.addEventListener('change',debouncedHandleInput)});const categorySelects=document.querySelectorAll('.uagb-loop-category');
973categorySelects.forEach(categorySelect=>{const debouncedHandleInput=debounce(handleCatSelect,250);categorySelect.addEventListener('change',debouncedHandleInput)});const checkBoxValues=document.querySelectorAll('.uagb-cat-checkbox');checkBoxValues.forEach(checkBoxVal=>{const debouncedHandleInput=debounce(handleCheckBoxVal,250);checkBoxVal.addEventListener('click',debouncedHandleInput)});resetButtons.forEach(resetButton=>{const debouncedHandleReset=debounce(handleReset,250);resetButton.addEventListener('click',debouncedHandleReset)});const oldPaginations=document.querySelectorAll('.wp-block-uagb-loop-builder > :not(.uagb-loop-pagination).wp-block-uagb-buttons');oldPaginations?.forEach(function(container){const parentContainer=document.createElement('div');parentContainer.classList.add('uagb-loop-pagination');const queryIdPAginationLink=container.querySelector('a').getAttribute('data-uagb-block-query-id');parentContainer.id='uagb-block-pagination-queryid-'+queryIdPAginationLink;parentContainer.innerHTML=container.outerHTML;container.parentNode.insertBefore(parentContainer,container.nextSibling);container.parentNode.removeChild(container)});const paginationContainer=document.querySelectorAll('.uagb-loop-pagination');paginationContainer.forEach(pagination=>{pagination.addEventListener('click',function(event){event.preventDefault();const loopParentContainer=this.closest('.wp-block-uagb-loop-builder');const paged=event.target.dataset.uagbBlockQueryPaged||event.target.parentElement.dataset.uagbBlockQueryPaged||event?.target?.closest('a')?.getAttribute('data-uagb-block-query-paged');const activeButtonData=getActiveFilter(loopParentContainer,'button');const activeSelectData=getActiveFilter(loopParentContainer,'select');const activeCheckboxData=getActiveFilter(loopParentContainer,'checkbox');const formData=new FormData();if(paged){formData.append('paged',paged)} 974if(activeButtonData){formData.append('buttonFilter',activeButtonData)}else if(activeSelectData){formData.append('category',activeSelectData)}else if(activeCheckboxData){formData.append('checkbox',activeCheckboxData)} 975formData.append('queryId',event.target.dataset.uagbBlockQueryId||event.target.parentElement.dataset.uagbBlockQueryId||event?.target?.closest('a')?.getAttribute('data-uagb-block-query-id')||0);formData.append('block_id',loopParentContainer?.getAttribute('data-block_id'));formData.append('action','uagb_update_loop_builder_content');formData.append('postId',uagb_loop_builder.post_id);formData.append('postType',uagb_loop_builder.post_type);formData.append('security',uagb_loop_builder.nonce);const search=loopParentContainer?.querySelector('.uagb-loop-search')?.value||'';const sorting=loopParentContainer?.querySelector('.uagb-loop-sort')?.value||'';if(search){formData.append('search',search)} 976if(sorting){formData.append('sorting',sorting)} 977getUpdatedLoopWrapperContent(formData).then(output=>{if(output?.content?.wrapper){const loopElement=loopParentContainer?.querySelector('#uagb-block-queryid-'+formData.get('queryId'));if(loopElement){loopElement.innerHTML=output.content.wrapper}} 978if(output?.content?.pagination){const paginationElements=loopParentContainer?.querySelectorAll('#uagb-block-pagination-queryid-'+formData.get('queryId'));paginationElements?.forEach(element=>{element.innerHTML=output.content.pagination})}}).catch(error=>{throw error})})});const categoryButtonFilterContainer=document.querySelectorAll('.uagb-loop-category-inner a');categoryButtonFilterContainer.forEach((buttons)=>{buttons.addEventListener('click',function(event){event.preventDefault();const loopParentContainer=this.closest('.wp-block-uagb-loop-builder');let buttonData=null;if(event.target.tagName.toLowerCase()==='a'){buttonData=event.target.children[0].dataset.type}else if(event.target.tagName.toLowerCase()==='div'&&event.target.parentElement.tagName.toLowerCase()==='a'){buttonData=event.target.dataset.type} 979checkBoxValues?.forEach(checkBox=>{checkBox.checked=!1});if(buttonData==='all'||buttonData===undefined){loopParentContainer.removeAttribute('data-active-filter-button');updateContent(event,null,{type:'all'},loopParentContainer)}else if(buttonData){storeActiveFilter(loopParentContainer,buttonData,'button');updateContent(event,null,{type:buttonData},loopParentContainer)}})})});function getUpdatedLoopWrapperContent(data){data.append('action','uagb_update_loop_builder_content');data.append('postId',uagb_loop_builder?.post_id);data.append('postType',uagb_loop_builder?.what_post_type);data.append('security',uagb_loop_builder?.nonce) 980return fetch(uagb_loop_builder?.ajax_url,{method:'POST',credentials:'same-origin',body:data,}).then(response=>{if(!response.ok){throw new Error('Network response was not ok')} 981return response.json()}).then(output=>{if(output.success){return output.data} 982throw new Error(output.data.message)}
982).catch(error=>{throw error})}; 983const UAGBBlockPositioning={init(t,e){const s=document.querySelector(e);s?.classList.contains("uagb-position__sticky")&&UAGBBlockPositioning.handleSticky(s,t)},handleSticky(t,e){var s=()=>{return document.querySelector("#wpadminbar")?.offsetHeight||0},p=()=>{"undefined"!=typeof AOS&&e?.UAGAnimationType&&(t.dataset.aos=e?.UAGAnimationType,t.dataset.aosDuration=e?.UAGAnimationTime,t.dataset.aosDelay=e?.UAGAnimationDelay,t.dataset.aosEasing=e?.UAGAnimationEasing,t.dataset.aosOnce=!0,setTimeout(()=>{AOS.refreshHard()},100))};const o=t.getBoundingClientRect(),y=e?.isBlockRootParent?null:t.parentElement,i=((t,e,s)=>{const o=document.createElement("div"),i=(o.style.height=e.height+"px",o.style.boxSizing="border-box",window.getComputedStyle(t));return s?(o.style.width="100%",o.style.maxWidth=i.getPropertyValue("max-width")||e.width+"px",o.style.padding=i.getPropertyValue("padding")||0,o.style.margin=i.getPropertyValue("margin")||0,o.style.border=i.getPropertyValue("border")||0,o.style.borderColor="transparent"):(o.style.width=e.width+"px",o.style.margin=i.getPropertyValue("margin")||0),o})(t,o,y);let n,a,l,r;const c={top:0,bottom:0},d={top:0,right:0,bottom:0,left:0};if(e?.UAGStickyRestricted){r=y.getBoundingClientRect();const g=window.getComputedStyle(y);d.top=parseInt(g.getPropertyValue("padding-top")||0,10),d.bottom=parseInt(g.getPropertyValue("padding-bottom")||0,10),c.top=r.top+(window.pageYOffset||0)+d.top,c.bottom=r.bottom+(window.pageYOffset||0)-d.bottom-o.height-s()-(e?.UAGStickyOffset||0)}"bottom"===e?.UAGStickyLocation?(n=o.top+(window.pageYOffset||0)-window.innerHeight+o.height+(e?.UAGStickyOffset||0),a=`${e?.UAGStickyOffset||0}px`,(l=void 0!==window.pageYOffset?window.pageYOffset:document.body.scrollTop)<=n&&!t.classList.contains("uagb-position__sticky--stuck")&&(t.parentNode.insertBefore(i,t),t.classList.add("uagb-position__sticky--stuck"),t.style.bottom=`calc(${a} - ${window.innerHeight}px)`,t.style.left=o.left+"px",t.style.width=o.width+"px",t.style.zIndex="999",setTimeout(()=>{t.style.bottom=a},50)),p(),window.addEventListener("scroll",()=>{(l=void 0!==window.pageYOffset?window.pageYOffset:document.body.scrollTop)<=n?t.classList.contains("uagb-position__sticky--stuck")||(t.parentNode.insertBefore(i,t),t.classList.add("uagb-position__sticky--stuck"),t.style.bottom=a,t.style.left=o.left+"px",t.style.width=o.width+"px",t.style.zIndex="999"):l>n&&t.classList.contains("uagb-position__sticky--stuck")&&(t.parentNode.removeChild(i),t.classList.remove("uagb-position__sticky--stuck"),t.style.bottom="",t.style.left="",t.style.width="",t.style.zIndex="")})):(n=o.top+(window.pageYOffset||0)-s()-(e?.UAGStickyOffset||0),a=s()+(e?.UAGStickyOffset||0)+"px",(l=void 0!==window.pageYOffset?window.pageYOffset:document.body.scrollTop)>=n&&!t.classList.contains("uagb-position__sticky--stuck")&&(t.parentNode.insertBefore(i,t),t.classList.add("uagb-position__sticky--stuck"),e?.UAGStickyRestricted&&l>=c.bottom?(t.classList.remove("uagb-position__sticky--stuck"),t.classList.add("uagb-position__sticky--restricted"),t.style.top="",t.style.bottom=d.bottom+"px",t.style.left=`${i?.offsetLeft||0}px`):(t.style.top=`calc(${a} - ${window.innerHeight}px)`,t.style.left=o.left+"px",t.style.top=a),t.style.width=o.width+"px",t.style.zIndex="999"),p(),window.addEventListener("scroll",()=>{(l=void 0!==window.pageYOffset?window.pageYOffset:document.body.scrollTop)>=n?t.classList.contains("uagb-position__sticky--stuck")||t.classList.contains("uagb-position__sticky--restricted")?e?.UAGStickyRestricted&&!t.classList.contains("uagb-position__sticky--restricted")&&l>=c.bottom?(t.classList.remove("uagb-position__sticky--stuck"),t.classList.add("uagb-position__sticky--restricted"),t.style.top="",t.style.bottom=d.bottom+"px",t.style.left=`${i?.offsetLeft||0}px`):t.classList.contains("uagb-position__sticky--restricted")&&l<c.bottom&&(t.classList.remove("uagb-position__sticky--restricted"),t.classList.add("uagb-position__sticky--stuck"),t.style.top=a,t.style.bottom="",t.style.left=o.left+"px",t.style.width=o.width+"px",t.style.zIndex="999"):(t.parentNode.insertBefore(i,t),t.classList.add("uagb-position__sticky--stuck"),t.style.top=a,t.style.left=o.left+"px",t.style.width=o.width+"px",t.style.zIndex="999"):l<n&&t.classList.contains("uagb-position__sticky--stuck")&&(t.parentNode.removeChild(i),t.classList.remove("uagb-position__sticky--stuck"),t.style.top="",t.style.left="",t.style.width="",t.style.zIndex="")}))}};; 984UAGBButtonChild={init(e){const t=document.querySelector(e);t&&(t.addEventListener("focusin",()=>{document.addEventListener("keydown",this.handleKeyDown)}),t.addEventListener("focusout",()=>{document.removeEventListener("keydown",this.handleKeyDown)}))},handleKeyDown(e){" "!==e.key&&"Spacebar"!==e.key||"A"===e.target.tagName&&e.target.classList.contains("uagb-buttons-repeater")&&(e.preventDefault(),e.target.click())}};; 985const EXIT_INTENT_THRESHOLD=20;const MS_PER_DAY=24*60*60*1000;const DEFAULT_HIDE_DAYS=7;const getCookie=(name)=>{const value=`; ${document.cookie}`;const parts=value.split(`; ${name}=`);return parts.length===2?parts.pop().split(';').shift():undefined};const setPopupCookie=(blockId,days)=>{const cookieKey=`block-${blockId}`;const expires=new Date(Date.now()+days*MS_PER_DAY).toUTCString();document.cookie=`${cookieKey}=true; expires=${expires}; path=/`};const canShow=(args={})=>{const cookieName=`block-${args.blockId}`;const cookie=getCookie(cookieName);if(args.enableCookies&&cookie&&args.modalTrigger==='automatic'){return!1}else if(!args.enableCookies){document.cookie=`${cookieName}=; max-age=-1; path=/`} 986const modal=document.getElementById(args.blockId);return!(modal?.classList?.contains('active'))};const openModal=(args)=>{const modal=document.getElementById(args.blockId);if(!modal){return} 987modal.classList.add('active');modal.setAttribute('data-modal-trigger',args.modalTrigger||'manual');document.dispatchEvent(new CustomEvent('spectra:modal:opened',{detail:{blockId:args.blockId,modalTrigger:args.modalTrigger||'manual',triggerElement:args.triggerElement||null},bubbles:!0}))};let exitIntentTriggered=!1;const exitIntentModals=new Map();const attachExitIntent=(args={})=>exitIntentModals.set(args.blockId,args);const attachAutomaticOpen=(args={})=>{const delay=args.noOfSecondsToShow===0?0:args.noOfSecondsToShow*1000;setTimeout(()=>{if(canShow(args)){openModal(args);
987if(args.enableCookies&&args.setCookiesOn==='page-refresh'){setPopupCookie(args.blockId,args.hideForDays||DEFAULT_HIDE_DAYS)}}},delay)};const attachCustomTriggers=(args={})=>{const setupTrigger=(trigger)=>{const handleOpen=(e)=>{e.preventDefault();openModal({...args,triggerElement:trigger})};trigger.addEventListener('click',handleOpen);if(trigger.tagName!=='BUTTON'&&trigger.tagName!=='A'){trigger.setAttribute('tabindex',trigger.getAttribute('tabindex')||'0');trigger.setAttribute('role',trigger.getAttribute('role')||'button');trigger.addEventListener('keydown',(e)=>{if(e.key===' '||e.key==='Enter'){handleOpen(e)}})}else if(trigger.tagName==='A'){trigger.addEventListener('keydown',(e)=>{if(e.key==='Enter'){handleOpen(e)}})} 988if(!trigger.getAttribute('aria-label')&&!trigger.textContent.trim()){trigger.setAttribute('aria-label','Open modal')}};if(args.modalTrigger==='custom-class'&&args.cssClass){document.querySelectorAll(`.${args.cssClass}`).forEach(setupTrigger)}else if(args.modalTrigger==='custom-id'&&args.cssId){const trigger=document.getElementById(args.cssId);if(trigger){setupTrigger(trigger)}}};const handleModalInitialization=(event)=>{const{detail}=event;const args={...detail,cssClass:detail.cssClass||'',cssId:detail.cssId||'',modalTrigger:detail.modalTrigger||'automatic',showAfterSeconds:detail.showAfterSeconds||!1,noOfSecondsToShow:parseInt(detail.noOfSecondsToShow||'5',10),hideForDays:parseInt(detail.hideForDays||'7',10),enableCookies:detail.enableCookies==='1'||detail.enableCookies==='true'||detail.enableCookies===!0,setCookiesOn:detail.setCookiesOn||'page-refresh'};if(args.modalTrigger==='custom-class'||args.modalTrigger==='custom-id'){attachCustomTriggers(args)}else if(args.modalTrigger==='automatic'){if(args.exitIntent){attachExitIntent(args)}else if(args.showAfterSeconds){attachAutomaticOpen(args)}}};const setupGlobalHandlers=()=>{let isNearTop=!1;let moveTimeout;document.addEventListener('mousemove',(e)=>{if(moveTimeout){return} 989moveTimeout=setTimeout(()=>{moveTimeout=null},16);isNearTop=e.clientY<=EXIT_INTENT_THRESHOLD});document.addEventListener('mouseleave',()=>{if(exitIntentTriggered||exitIntentModals.size===0||!isNearTop){return} 990for(const[blockId,modal]of exitIntentModals.entries()){if(canShow(modal)){openModal(modal);exitIntentTriggered=!0;return}}})};const processExistingModals=()=>{document.querySelectorAll('[data-wp-interactive="spectra/modal"][data-wp-context]').forEach(modal=>{const contextAttr=modal.getAttribute('data-wp-context');const contextMatch=contextAttr?.match(/^[^:]+::(.+)$/);if(contextMatch){try{modal.dispatchEvent(new CustomEvent('spectra:modal:initialized',{detail:JSON.parse(contextMatch[1]),bubbles:!0}))}catch(e){}}})};const initialize=()=>{setupGlobalHandlers();document.addEventListener('spectra:modal:initialized',handleModalInitialization);document.addEventListener('UAGModalEditor',(event)=>{const{detail}=event;handleModalInitialization({detail:{blockId:'uagb-block-'+detail.block_id,modalTrigger:detail.modalTrigger||'automatic',cssClass:detail.cssClass||'',cssId:detail.cssID||'',exitIntent:detail.exitIntent||!1,showAfterSeconds:detail.showAfterSeconds||!1,noOfSecondsToShow:detail.noOfSecondsToShow||'5',enableCookies:detail.enableCookies||!1,setCookiesOn:detail.setCookiesOn||'page-refresh',hideForDays:detail.hideForDays||'7'}})});if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',processExistingModals)}else{processExistingModals()} 991setTimeout(processExistingModals,1000)};initialize(); 992astraSyncMobileMenuState=function(e){for(var t=document.querySelectorAll("#masthead #ast-mobile-header, #ast-fixed-header #ast-mobile-header"),o=0;o<t.length;o++){var a=t[o].querySelector(".main-header-bar-navigation"),s=t[o].querySelector(".main-header-menu-toggle");a&&(a.classList.toggle("toggle-on",e),a.style.display=e?"block":""),s&&(s.classList.toggle("toggled",e),s.setAttribute("aria-expanded",e?"true":"false"))}document.body.classList.toggle("ast-main-header-nav-open",e)},astraToggleSetupPro=function(e,t,o){var a,s,n,r=!1;if(0<(a="off-canvas"===e||"full-width"===e?(s=document.querySelectorAll("#ast-mobile-popup, #ast-mobile-header"),(n=t.classList.contains("ast-header-break-point")?document.querySelectorAll("#ast-mobile-header .main-header-menu-toggle"):document.querySelectorAll("#ast-desktop-header .main-header-menu-toggle")).length):t.classList.contains("ast-header-break-point")?(s=document.querySelectorAll("#ast-mobile-header"),(r=!(0<(a=(n=document.querySelectorAll("#ast-mobile-header .main-header-menu-toggle")).length)))?1:a):(s=document.querySelectorAll("#ast-desktop-header"),(n=document.querySelectorAll("#ast-desktop-header .main-header-menu-toggle")).length))||r)for(var i=0;i<a;i++)if(r||(n[i].setAttribute("data-index",i),o[i])||(o[i]=n[i],n[i].removeEventListener("click",astraNavMenuToggle),n[i].addEventListener("click",astraNavMenuToggle,!1)),void 0!==s[i])for(var l,c=0;c<s.length;c++)if(0<(l=document.querySelector("header.site-header").classList.contains("ast-builder
992-menu-toggle-link")?s[c].querySelectorAll("ul.main-header-menu .menu-item-has-children > .menu-link, ul.main-header-menu .ast-menu-toggle"):s[c].querySelectorAll("ul.main-header-menu .ast-menu-toggle")).length)for(var d=0;d<l.length;d++)l[d].removeEventListener("click",AstraToggleSubMenu),l[d].addEventListener("click",AstraToggleSubMenu,!1)},astraNavMenuTogglePro=function(e,t,o,a){e.preventDefault();var s=e.target.closest("#ast-desktop-header"),n=document.querySelector("#masthead > #ast-desktop-header .ast-desktop-header-content"),r=(s=null!=s&&""!==s?s.querySelector(".main-header-menu-toggle"):document.querySelector("#masthead > #ast-desktop-header .main-header-menu-toggle"),document.querySelector("#masthead > #ast-desktop-header .ast-desktop-header-content .main-header-bar-navigation"));if("desktop"===e.currentTarget.trigger_type)null!==r&&""!==r&&void 0!==r&&(astraToggleClass(r,"toggle-on"),r.classList.contains("toggle-on")?r.style.display="block":r.style.display=""),astraToggleClass(s,"toggled"),s.classList.contains("toggled")?(t.classList.add("ast-main-header-nav-open"),"dropdown"===o&&(n.style.display="block")):(t.classList.remove("ast-main-header-nav-open"),n.style.display="none");else{e=a.closest("#ast-fixed-header")||document.getElementById("masthead");if(e)for(var i=e.querySelectorAll("#ast-mobile-header .main-header-bar-navigation .menu-item-has-children"),l=0;l<i.length;l++){i[l].classList.remove("ast-submenu-expanded");for(var c=i[l].querySelectorAll(".sub-menu"),d=0;d<c.length;d++)c[d].style.display="none"}-1!==(a.getAttribute("class")||"").indexOf("main-header-menu-toggle")&&(r=!a.classList.contains("toggled"),astraSyncMobileMenuState(r))}};let accountMenuToggle=function(){let n=astraAddon.hf_account_action_type&&"menu"===astraAddon.hf_account_action_type,r=n&&astraAddon.hf_account_show_menu_on&&"click"===astraAddon.hf_account_show_menu_on;var e=document.querySelectorAll(".ast-header-account-wrap");e&&e.forEach(t=>{let o=t.querySelector(".ast-account-nav-menu");function e(e){(r||n&&document.querySelector("body").classList.contains("ast-header-break-point"))&&o&&!t.contains(e.target)&&(o.style.right="",o.style.left="")}t._accountPointerUpHandler||(t._accountPointerUpHandler=e,document.addEventListener("pointerup",e));var a,s=t.querySelector(".ast-header-account-link");s&&(a=function(e){(r||n&&document.querySelector("body").classList.contains("ast-header-break-point"))&&(headerSelectionPosition=e.target.closest(".site-header-section"))&&(headerSelectionPosition.classList.contains("site-header-section-left")?(o.style.left=""===o.style.left?"-100%":"",o.style.right=""===o.style.right?"auto":""):(o.style.right=""===o.style.right?"-100%":"",o.style.left=""===o.style.left?"auto":""))},s._accountClickHandler||(s._accountClickHandler=a,s.addEventListener("click",a)))})},astraColorSwitcher={...astraAddon?.colorSwitcher,init:function(){this?.isInit&&(this.switcherButtons=document.querySelectorAll(".ast-builder-color-switcher .ast-switcher-button"),this.switcherButtons?.length)&&(this.switcherButtons?.forEach(e=>{e?.addEventListener("click",this.toggle)}),this.isDarkPalette&&"system"===this.defaultMode&&this.detectSystemColorScheme(),this.isSwitched)&&this.switchLogo()},detectSystemColorScheme:function(){null===this.getCookie("astraColorSwitcherState")&&window.matchMedia("(prefers-color-scheme: dark)").matches&&!this.isSwitched&&this.toggle()},toggle:function(e){e?.preventDefault();e=astraColorSwitcher;e.isSwitched=!e.isSwitched,e.setCookie("astraColorSwitcherState",e.isSwitched,90),e?.forceReload?window.location.reload():(e.switchPaletteColors(),e.switchIcon(),e.switchLogo(),e.isDarkPalette&&e.handleDarkModeCompatibility())},switchPaletteColors:function(){(this.isSwitched?this?.palettes?.switched:this?.palettes?.default)?.forEach((e,t)=>{document.documentElement.style.setProperty("--ast-global-color-"+t,e),astraAddon?.is_elementor_active&&document.documentElement.style.setProperty("--e-global-color-astglobalcolor"+t,e)})},switchIcon:function(){this.switcherButtons?.forEach(o=>{var[a,s]=o?.querySelectorAll(".ast-switcher-icon");if(a&&s){let[e,t]=this.isSwitched?[s,a]:[a,s];o?.classList.add("ast-animate"),setTimeout(()=>{e?.classList.add("ast-current"),t?.classList.remove("ast-current")},100),setTimeout(()=>
992o?.classList.remove("ast-animate"),200)}a=this.isSwitched?"defaultText":"switchedText";o?.setAttribute("aria-label",o?.dataset?.[a]||"Switch color palette.")})},switchLogo:function(){this.isDarkPalette&&this?.logos?.switched&&this?.logos?.default&&this.switchColorSwitcherLogo()},switchColorSwitcherLogo:function(){var e,t;let o=[];for(e of[".custom-logo-link:not(.sticky-custom-logo):not(.transparent-custom-logo) .custom-logo",".site-branding .site-logo-img img:not(.ast-sticky-header-logo)",".ast-site-identity .site-logo-img img:not(.ast-sticky-header-logo)"]){var a=document.querySelectorAll(e);if(0<a.length&&0<(o=Array.from(a).filter(e=>!(e.closest(".ast-sticky-header-logo")||e.closest(".sticky-custom-logo")||e.closest(".transparent-custom-logo")||e.classList.contains("ast-sticky-header-logo")))).length)break}o.length&&(t=this.isSwitched?this.logos.switched:this.logos.default)&&this.updateLogoImages(o,t)},updateLogoImages:function(e,o){e.forEach(e=>{var t;e&&e.src!==o&&((t=new Image).onload=function(){e.src=o,e.hasAttribute("srcset")&&e.removeAttribute("srcset"),e.hasAttribute("data-src")&&e.setAttribute("data-src",o)},t.onerror=function(){e.src=o},t.src=o)})},handleDarkModeCompatibility:function(){document.body.classList.toggle("astra-dark-mode-enable")},setCookie:(e,t,o)=>{var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),document.cookie=`${e}=${t}; expires=${a.toUTCString()}; path=/`},getCookie:e=>{var t;for(t of document.cookie.split("; ")){var[o,a]=t.split("=");if(o===e)return a}return null}};var accountPopupTrigger=function(){if("undefined"!=typeof astraAddon&&"login"===astraAddon.hf_account_logout_action){var e,o=document.querySelectorAll(".ast-account-action-login");if(o.length){let t=document.querySelector("#ast-hb-account-login-wrap");t&&(e=document.querySelector("#ast-hb-login-close"),o.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),t.classList.add("show")})}),e)&&e.addEventListener("click",function(e){e.preventDefault(),t.classList.remove("show")})}}};document.addEventListener("astPartialContentRendered",function(){accountMenuToggle(),accountPopupTrigger()}),window.addEventListener("load",function(){accountMenuToggle(),accountPopupTrigger(),astraColorSwitcher.init()}),document.addEventListener("astLayoutWidthChanged",function(){accountMenuToggle(),accountPopupTrigger()}),document.addEventListener("click",function(e){var t,e=e.target.closest("a");e&&(t=e.getAttribute("href"))&&-1!==t.indexOf("#")&&e.closest("#masthead #ast-mobile-header, #ast-fixed-header #ast-mobile-header")&&setTimeout(function(){astraSyncMobileMenuState(!1)},20)});((o,r)=>{var s="astHookExtSticky",i=r.document,a=(jQuery(r).outerWidth(),jQuery(r).width()),n={dependent:[],max_width:"",site_layout:"",break_point:920,admin_bar_height_lg:32,admin_bar_height_sm:46,admin_bar_height_xs:0,stick_upto_scroll:0,gutter:0,wrap:"<div></div>",body_padding_support:!0,html_padding_support:!0,active_shrink:!1,shrink:{padding_top:"",padding_bottom:""},sticky_on_device:"desktop",header_style:"none",hide_on_scroll:"no"};function e(t,e){this.element=t,this.options=o.extend({},n,e),this._defaults=n,this._name=s,"1"==this.options.hide_on_scroll&&(this.navbarHeight=o(t).outerHeight()),this.lastScrollTop=0,this.delta=5,this.should_stick=!0,this.hideScrollInterval="",this.init()}e.prototype.stick_me=function(t,e){var o=jQuery(t.element),s=jQuery(r).outerWidth(),i=parseInt(t.options.stick_upto_scroll),a=parseInt(o.parent().attr("data-stick-maxwidth")),n=parseInt(o.parent().attr("data-stick-gutter"));"enabled"==(astraAddon.hook_sticky_header||"")&&(!("desktop"==t.options.sticky_on_device&&astraAddon.hook_custom_header_break_point>s||"mobile"==t.options.sticky_on_device&&astraAddon.hook_custom_header_break_point<=s)&&jQuery(r).scrollTop()>i?"none"==t.options.header_style&&("enabled"==t.options.active_shrink?(t.hasShrink(t,"stick"),i="none",o.hasClass("ast-custom-header")||(i=n),o.parent().css("min-height",o.outerHeight()),o.addClass("ast-header-sticky-active").stop().css({"max-width":a,top:i,"padding-top":t.options.shrink.padding_top,"padding-bottom":t.options.shrink.padding_bottom})):(t.hasShrink(t,"stick"),o.parent().css("min-height",o.outerHeight()),o.addClass("ast-header-sticky-active").stop().css({"max-width":a,top:n,"padding-top":t.options.shrink.padding_top,"padding-bottom":t.options.shrink.padding_bottom})),o.addClass("ast-sticky-shrunk").stop()):t.stickRelease(t)),"enabled"==(astraAddon.hook_sticky_footer||"")&&("desktop"==t.options.sticky_on_device&&astraAddon.hook_custom_footer_break_point>s||"mobile"==t.options.sticky_on_device&&astraAddon.hook_custom_footer_break_point<=s?t.stickRelease(t):(jQuery("body").addClass("ast-footer-sticky-active"),o.parent().css("min-height",o.outerHeight()),o.stop().css({"max-width":a})))},e.prototype.update_attrs=function(){var o,t=this,e=jQuery(t.element),s=parseInt(t.options.gutter),i=t.options.max_width;"none"==t.options.header_style&&(o=e.offset().top||0),"ast-box-layout"!=t.o
992ptions.site_layout&&(i=jQuery("body").width()),t.options.dependent&&jQuery.each(t.options.dependent,function(t,e){jQuery(e).length&&"on"==jQuery(e).parent().attr("data-stick-support")&&(dependent_height=jQuery(e).outerHeight(),s+=parseInt(dependent_height),o-=parseInt(dependent_height))}),t.options.admin_bar_height_lg&&jQuery("#wpadminbar").length&&782<a&&(s+=parseInt(t.options.admin_bar_height_lg),o-=parseInt(t.options.admin_bar_height_lg)),t.options.admin_bar_height_sm&&jQuery("#wpadminbar").length&&600<=a&&a<=782&&(s+=parseInt(t.options.admin_bar_height_sm),o-=parseInt(t.options.admin_bar_height_sm)),t.options.admin_bar_height_xs&&jQuery("#wpadminbar").length&&(s+=parseInt(t.options.admin_bar_height_xs),o-=parseInt(t.options.admin_bar_height_xs)),t.options.body_padding_support&&(s+=parseInt(jQuery("body").css("padding-top"),10),o-=parseInt(jQuery("body").css("padding-top"),10)),t.options.html_padding_support&&(s+=parseInt(jQuery("html").css("padding-top"),10),o-=parseInt(jQuery("html").css("padding-top"),10)),t.options.stick_upto_scroll=o,"none"==t.options.header_style&&e.parent().css("min-height",e.outerHeight()).attr("data-stick-gutter",parseInt(s)).attr("data-stick-maxwidth",parseInt(i))},e.prototype.hasShrink=function(t,e){o(r).scrollTop()>jQuery(t.element).outerHeight()?jQuery("body").addClass("ast-shrink-custom-header"):jQuery("body").removeClass("ast-shrink-custom-header")},e.prototype.stickRelease=function(t){var e=jQuery(t.element);"enabled"==(astraAddon.hook_sticky_header||"")&&"none"==t.options.header_style&&(e.removeClass("ast-header-sticky-active").stop().css({"max-width":"",top:"",padding:""}),e.parent().css("min-height",""),e.removeClass("ast-sticky-shrunk").stop()),"enabled"==(astraAddon.hook_sticky_footer||"")&&jQuery("body").removeClass("ast-footer-sticky-active")},e.prototype.init=function(){var e,t;jQuery(this.element)&&(e=this,t=jQuery(e.element),parseInt(e.options.gutter),t.position().top,"none"==e.options.header_style&&t.wrap(e.options.wrap).parent().css("min-height",t.outerHeight()).attr("data-stick-support","on").attr("data-stick-maxwidth",parseInt(e.options.max_width)),e.update_attrs(),jQuery(r).on("resize",function(){e.stickRelease(e),e.update_attrs(),e.stick_me(e)}),jQuery(r).on("scroll",function(){e.stick_me(e,"scroll")}),jQuery(i).ready(function(t){e.stick_me(e)}))},o.fn[s]=function(t){return this.each(function(){o.data(this,"plugin_"+s)||o.data(this,"plugin_"+s,new e(this,t))})};var d=jQuery("body").width(),_=astraAddon.site_layout||"",h=astraAddon.hook_sticky_header||"",p=astraAddon.hook_shrink_header||"";sticky_header_on_devices=astraAddon.hook_sticky_header_on_devices||"desktop",site_layout_box_width=astraAddon.site_layout_box_width||1200,hook_sticky_footer=astraAddon.hook_sticky_footer||"",sticky_footer_on_devices=astraAddon.hook_sticky_footer_on_devices||"desktop","ast-box-layout"===_&&(d=parseInt(site_layout_box_width)),jQuery(i).ready(function(t){"enabled"==h&&jQuery(".ast-custom-header").astHookExtSticky({sticky_on_device:sticky_header_on_devices,header_style:"none",site_layout:_,max_width:d,active_shrink:p}),"enabled"==hook_sticky_footer&&jQuery(".ast-custom-footer").astHookExtSticky({sticky_on_device:sticky_footer_on_devices,max_width:d,site_layout:_,header_style:"none"})})})(jQuery,window);((n,h)=>{var a="astExtSticky",l=h.document,r=jQuery(h).width(),c=astraAddon.header_builder_active,s={dependent:[],max_width:"",site_layout:"",break_point:920,admin_bar_height_lg:32,admin_bar_height_sm:46,admin_bar_height_xs:0,stick_upto_scroll:0,gutter:0,wrap:"<div></div>",body_padding_support:!0,html_padding_support:!0,shrink:{padding_top:"",padding_bottom:""},sticky_on_device:"desktop",header_style:"none",hide_on_scroll:"no"},i=0,p=null!==l.querySelector("#ast-hb-account-login-wrap");function t(e,t){this.element=e,this.options=n.extend({},s,t),this._defaults=s,this._name=a,"1"==this.options.hide_on_scroll&&(this.navbarHeight=n(e).outerHeight()),this.lastScrollTop=0,this.delta=5,this.should_stick=!0,this.hideScrollInterval="",this.init()}t.prototype.stick_me=function(e,t){var a,s,i,d,r,o=jQuery(e.element);h.innerWidth;stick_upto_scroll=parseInt(e.options.stick_upto_scroll),max_width=parseInt(o.parent().attr("data-stick-maxwidth")),gutter=parseInt(o.parent().attr("data-stick-gutter")),aboveHeaderSelectorValue=gutter,c&&astraAddon.header_main_shrink&&((o.hasClass("ast-stick-primary-below-wrapper")||o.hasClass("ast-primary-header"))&&1==astraAddon.header_above_stick&&0<gutter&&(gutter-=10),a=l.querySelector(".ast-above-header-bar"),"1"===astraAddon.header_above_stick)&&null!==a&&(a=a.getBoundingClientRect().height+parseInt(a.parentNode.getAttribute("data-stick-gutter")),o.hasClass("ast-stick-primary-below-wrapper")||o.hasClass("ast-primary-header"))&&0<gutter&&(gutter=a),"desktop"===e.options.sticky_on_device&&jQuery("body").hasClass("ast-header-break-point")||"mobile"===e.options.sticky_on_device&&!jQuery("body").hasClass("ast-header-break-point")?e.stickRelease(e):(stick_upto_scroll<0&&(stick_upto_scroll=0),a=0<l.getElementsByClassName("elementor-motion-effects-parent").length,jQuery(h).scrollTop()>stick_upto_scroll?(s=o,c&&(r=o.closest(".ast-mobile-header-wrap"),i=o.closest("#ast-desktop-header"),r=0===r.length?o.find(".ast-mobile-header-wrap"):r,i=0===i.length?o.find("#ast-desktop-header"):i,r.find(".ast-mobile-header-content").css("top",o.outerHeight()+gutter),"ast-box-layout"==e.options.site_layout?(d=jQuery("body").width(),r.find(".ast-mobile-header-content").css("width",d)):r.find(".ast-mobile-header-content").css("width",max_width),i.find(".ast-desktop-header-content").css("top",o.outerHeight()+gutter),i.find(".ast-desktop-header-content").css("width",max_width)),"1"===e.options.hide_on_scroll?e.hasScrolled(e,"stick"):"none"==e.options.header_style?(a||o.parent().css("min-height",o.outerHeight()),l.querySelector("body").classList.contains("fl-builder
992-edit")||o.addClass("ast-sticky-active").stop().css({top:gutter}),d={"max-width":max_width,"padding-top":e.options.shrink.padding_top,"padding-bottom":e.options.shrink.padding_bottom},"ast-box-layout"===e.options.site_layout&&n(h).width()>parseInt(max_width)&&(d["margin-left"]="auto",d["margin-right"]="auto"),o.addClass("ast-sticky-active").stop().css(d),(o.hasClass("ast-stick-primary-below-wrapper")||o.hasClass("ast-primary-header"))&&1==astraAddon.header_above_stick&&o.closest("#ast-desktop-header").find(".ast-above-header-bar").outerHeight()<70&&o.parent().css("min-height",o.outerHeight()),o.addClass("ast-sticky-shrunk").stop(),n(l).trigger("addStickyClass"),s.addClass("ast-header-sticked")):"slide"==e.options.header_style?(s.css({top:gutter}),s.addClass("ast-header-slide"),s.css("visibility","visible"),s.addClass("ast-sticky-active").stop().css({transform:p?"none":"translateY(0)"}),n("html").addClass("ast-header-stick-slide-active"),n(l).trigger("addStickyClass"),s.addClass("ast-header-sticked")):"fade"==e.options.header_style&&(s.css({top:gutter}),s.addClass("ast-header-fade"),s.css("visibility","visible"),s.addClass("ast-sticky-active").stop().css({opacity:"1"}),n("html").addClass("ast-header-stick-fade-active"),n(l).trigger("addStickyClass"),s.addClass("ast-header-sticked"))):(e.stickRelease(e),c&&(r=0===(r=o.closest(".ast-mobile-header-wrap")).length?o.find(".ast-mobile-header-wrap"):r,jQuery("body").hasClass("ast-primary-sticky-header-active")&&jQuery("body").hasClass("ast-above-sticky-header-active")&&jQuery("body").hasClass("ast-below-sticky-header-active")||r.find(".ast-mobile-header-content").removeAttr("style"))))},t.prototype.update_attrs=function(){var e,a,t=this,s=jQuery(t.element),i=parseInt(t.options.gutter),d=t.options.max_width;"none"!=t.options.header_style||jQuery("body").hasClass("ast-sticky-toggled-off")?n("#masthead").length&&(e=n("#masthead"),a=("none"==t.options.header_style?e.offset().top:e.offset().top+e.outerHeight()+100)||0):a=s.offset().top||0,"ast-box-layout"!=t.options.site_layout&&(d=jQuery("body").width()),t.options.dependent&&jQuery.each(t.options.dependent,function(e,t){jQuery(t).length&&"on"==jQuery(t).parent().attr("data-stick-support")&&(dependent_height=jQuery(t).outerHeight(),i+=parseInt(dependent_height),a-=parseInt(dependent_height))}),t.options.admin_bar_height_lg&&jQuery("#wpadminbar").length&&782<r&&(i+=parseInt(t.options.admin_bar_height_lg),a-=parseInt(t.options.admin_bar_height_lg)),t.options.admin_bar_height_sm&&jQuery("#wpadminbar").length&&600<=r&&r<=782&&(i+=parseInt(t.options.admin_bar_height_sm),a-=parseInt(t.options.admin_bar_height_sm)),t.options.admin_bar_height_xs&&jQuery("#wpadminbar").length&&(i+=parseInt(t.options.admin_bar_height_xs),a-=parseInt(t.options.admin_bar_height_xs)),t.options.body_padding_support&&(i+=parseInt(jQuery("body").css("padding-top"),10),a-=parseInt(jQuery("body").css("padding-top"),10)),t.options.html_padding_support&&(i+=parseInt(jQuery("html").css("padding-top"),10),a-=parseInt(jQuery("html").css("padding-top"),10)),C&&a--,t.options.stick_upto_scroll=a,"none"==t.options.header_style?s.parent().css("min-height",s.outerHeight()).attr("data-stick-gutter",parseInt(i)).attr("data-stick-maxwidth",parseInt(d)):(s.parent().attr("data-stick-gutter",parseInt(i)).attr("data-stick-maxwidth",parseInt(d)),"ast-padded-layout"!==t.options.site_layout&&"ast-box-layout"!==t.options.site_layout||s.css("max-width",parseInt(d)))},t.prototype.hasScrolled=function(e,t){var a,s=n(h).scrollTop();Math.abs(i-s)<=5||(a=jQuery(e.element),i<s&&0<s?jQuery(e.element).removeClass("ast-nav-down").addClass("ast-nav-up"):s+n(h).height()<n(l).height()&&jQuery(e.element).removeClass("ast-nav-up").addClass("ast-nav-down"),i=s,n(e.element).hasClass("ast-nav-up")||"stick"!=t?(a.css({transform:"translateY(-100%)"}).stop(),setTimeout(function(){a.removeClass("ast-sticky-active")},300),a.css({visibility:"hidden",top:""}),n(l).trigger("removeStickyClass"),n("html").removeClass("ast-header-stick-scroll-active"),a.removeClass("ast-header-sticked")):(a.css({top:gutter}),a.addClass("ast-header-sticked"),a.addClass("ast-header-slide"),a.css("visibility","visible"),a.addClass("ast-sticky-active").stop().css({transform:"translateY(0)"}),n(l).trigger("addStickyClass"),n("html").addClass("ast-header-stick-scroll-active")))},t.prototype.stickRelease=function(e){var t=jQuery(e.element),a=t;"1"===e.options.hide_on_scroll?e.hasScrolled(e,"release"):"none"==e.options.header_style?(t.removeClass("ast-sticky-active").stop().css({"max-width":"",top:"",padding:"","margin-left":"","margin-right":""}),t.parent().css("min-height",""),n(l).trigger("removeStickyClass"),a.removeClass("ast-header-sticked"),t.removeClass("ast-sticky-shrunk").stop()):"slide"==e.options.header_style?(a.removeClass("ast-sticky-active").stop().css({transform:p?"translateY(-100vh)":"translateY(-100%)"}),a.css({visibility:"hidden",top:""}
992),n("html").removeClass("ast-header-stick-slide-active"),n(l).trigger("removeStickyClass"),a.removeClass("ast-header-sticked")):"fade"==e.options.header_style&&(a.removeClass("ast-sticky-active").stop().css({opacity:"0"}),a.css({visibility:"hidden"}),a.removeClass("ast-header-sticked"),n(l).trigger("removeStickyClass"),n("html").removeClass("ast-header-stick-fade-active"))},t.prototype.init=function(){var t,e;jQuery(this.element)&&(t=this,e=jQuery(t.element),("none"==t.options.header_style?e.wrap(t.options.wrap).parent().css("min-height",e.outerHeight()):e.wrap(t.options.wrap)).attr("data-stick-support","on").attr("data-stick-maxwidth",parseInt(t.options.max_width)),t.update_attrs(),jQuery(h).on("resize",function(){t.stickRelease(t),t.update_attrs(),t.stick_me(t)}),jQuery(h).on("scroll",function(){t.stick_me(t,"scroll"),jQuery("body").hasClass("ast-sticky-toggled-off")&&(t.update_attrs(),t.stick_me(t,"scroll"))}),jQuery(l).ready(function(e){t.stick_me(t),setTimeout(()=>t.stick_me(t),0)}))},n.fn[a]=function(e){return this.each(function(){n.data(this,"plugin_"+a)||n.data(this,"plugin_"+a,new t(this,e))})};var e,d,o=jQuery("body"),y=o.width(),_=astraAddon.stick_header_meta||"default",m=astraAddon.header_main_stick||"",u=astraAddon.header_main_shrink||"",g=astraAddon.header_above_stick||"",b=astraAddon.header_below_stick||"",k=astraAddon.site_layout||"",v=astraAddon.site_layout_box_width||1200,w=astraAddon.sticky_header_on_devices||"desktop",j=astraAddon.sticky_header_style||"none",Q=astraAddon.sticky_hide_on_scroll||"",f=astraAddon.header_logo_width||"",x=astraAddon.responsive_header_logo_width||"",C=astraAddon.stick_origin_position||"",S=astraAddon.tablet_break_point||768,I=astraAddon.mobile_break_point||544;function A(){var e;"1"==Q?("1"==u&&jQuery("#ast-fixed-header").addClass("ast-sticky-shrunk").stop(),"1"!=g&&"on"!=g&&"disabled"!=g&&jQuery("#ast-fixed-header .ast-above-header").hide(),"1"!=m&&"on"!=m&&"disabled"!=m&&jQuery("#ast-fixed-header .main-header-bar").hide(),"1"!=b&&"on"!=b&&"disabled"!=b&&jQuery("#ast-fixed-header .ast-below-header").hide(),jQuery("#ast-fixed-header").astExtSticky({max_width:y,site_layout:k,sticky_on_device:w,header_style:"slide",hide_on_scroll:Q})):"none"==j?c?("both"===w?["desktop","mobile"]:[w]).forEach(function(e){var t;"1"!=g&&"on"!=g&&"disabled"!=g||jQuery("#masthead #ast-"+e+"-header .ast-above-header").astExtSticky({max_width:y,site_layout:k,sticky_on_device:w,header_style:j,hide_on_scroll:Q}),"1"!=m&&"on"!=m&&"disabled"!=m||"1"!=b&&"on"!=b&&"disabled"!=b?("1"!=m&&"on"!=m&&"disabled"!=m||(t=u?{padding_top:"",padding_bottom:""}:"",jQuery("#masthead #ast-"+e+"-header .main-header-bar").astExtSticky({dependent:["#masthead #ast-"+e+"-header .ast-above-header"],max_width:y,site_layout:k,shrink:t,sticky_on_device:w,header_style:j,hide_on_scroll:Q}),jQuery("#masthead #ast-"+e+"-header .ast-custom-header").astExtSticky({max_width:y,site_layout:k,shrink:t,sticky_on_device:w,header_style:j,hide_on_scroll:Q})),"1"!=b&&"on"!=b&&"disabled"!=b||jQuery("#masthead #ast-"+e+"-header .ast-below-header").astExtSticky({dependent:["#masthead #ast-"+e+"-header .main-header-bar","#masthead #ast-"+e+"-header .ast-above-header"],max_width:y,site_layout:k,sticky_on_device:w,header_style:j,hide_on_scroll:Q})):((jQuery("#masthead #ast-"+e+"-header .main-header-bar-wrap").length?jQuery("#masthead #ast-"+e+"-header .main-header-bar-wrap"):jQuery("#masthead #ast-"+e+"-header .ast-below-header-wrap")).wrap('<div class="ast-stick-primary-below-wrapper"></div>'),jQuery("#masthead #ast-"+e+"-header .ast-below-header-wrap").prependTo("#masthead #ast-"+e+"-header .ast-stick-primary-below-wrapper"),jQuery("#masthead #ast-"+e+"-header .main-header-bar-wrap").prependTo("#masthead #ast-"+e+"-header .ast-stick-primary-below-wrapper"),jQuery("#masthead #ast-"+e+"-header .ast-stick-primary-below-wrapper").astExtSticky({dependent:["#masthead #ast-"+e+"-header .ast-above-header"],max_width:y,site_layout:k,shrink:t,sticky_on_device:w,header_style:j,hide_on_scroll:Q}))}):("1"!=g&&"on"!=g&&"disabled"!=g||jQuery("#masthead .ast-above-header").astExtSticky({max_width:y,site_layout:k,sticky_on_device:w,header_style:j,hide_on_scroll:Q}),"1"!=m&&"on"!=m&&"disabled"!=m||"1"!=b&&"on"!=b&&"disabled"!=b?("1"!=m&&"on"!=m&&"disabled"!=m||(e=u?{padding_top:"",padding_bottom:""}
992:"",jQuery("#masthead .main-header-bar").astExtSticky({dependent:["#masthead .ast-above-header"],max_width:y,site_layout:k,shrink:e,sticky_on_device:w,header_style:j,hide_on_scroll:Q}),jQuery("#masthead .ast-custom-header").astExtSticky({max_width:y,site_layout:k,shrink:e,sticky_on_device:w,header_style:j,hide_on_scroll:Q})),"1"!=b&&"on"!=b&&"disabled"!=b||jQuery("#masthead .ast-below-header").astExtSticky({dependent:["#masthead .main-header-bar","#masthead .ast-above-header"],max_width:y,site_layout:k,sticky_on_device:w,header_style:j,hide_on_scroll:Q})):(jQuery("#masthead .main-header-bar-wrap").wrap('<div class="ast-stick-primary-below-wrapper"></div>'),jQuery("#masthead .ast-below-header-wrap").prependTo(".ast-stick-primary-below-wrapper"),jQuery("#masthead .main-header-bar-wrap").prependTo(".ast-stick-primary-below-wrapper"),jQuery("#masthead .ast-stick-primary-below-wrapper").astExtSticky({dependent:["#masthead .ast-above-header"],max_width:y,site_layout:k,shrink:e,sticky_on_device:w,header_style:j,hide_on_scroll:Q}))):(jQuery("#ast-fixed-header").addClass("ast-sticky-shrunk").stop(),"1"!=g&&"on"!=g&&"disabled"!=g&&jQuery("#ast-fixed-header .ast-above-header").hide(),"1"!=m&&"on"!=m&&"disabled"!=m&&jQuery("#ast-fixed-header .main-header-bar").hide(),"1"!=b&&"on"!=b&&"disabled"!=b&&jQuery("#ast-fixed-header .ast-below-header").hide(),"1"!=g&&"on"!=g&&"disabled"!=g&&"1"!=m&&"on"!=m&&"disabled"!=m&&"1"!=b&&"on"!=b&&"disabled"!=b||(e=u?{padding_top:"",padding_bottom:""}:"",jQuery("#ast-fixed-header").astExtSticky({max_width:y,site_layout:k,shrink:e,sticky_on_device:w,header_style:j,hide_on_scroll:Q}))),"mobile"!=w&&"both"!=w||(jQuery("#masthead .main-header-menu-toggle").click(function(e){var t,a;jQuery("#masthead .main-header-menu-toggle").hasClass("toggled")?(o.addClass("ast-sticky-toggled-off"),"none"==s.header_style&&(jQuery("#masthead .main-header-bar").hasClass("ast-sticky-active")||jQuery("#masthead .ast-stick-primary-below-wrapper").hasClass("ast-sticky-active"))&&(t=jQuery(h).height(),a=0,jQuery("#masthead .ast-above-header")&&jQuery("#masthead .ast-above-header").length&&(a=jQuery("#masthead .ast-above-header").height()),"1"==Q&&jQuery("html").css({overflow:"hidden"}),("1"!=u||"1"!=m&&"on"!=m&&"disabled"!=m||"1"!=b&&"on"!=b&&"disabled"!=b?jQuery("#masthead .main-header-bar.ast-sticky-active"):jQuery("#masthead .ast-stick-primary-below-wrapper")).css({"max-height":t-a+"px","overflow-y":"auto"}))):(o.addClass("ast-sticky-toggled-off"),jQuery("html").css({overflow:""}),("1"!=u||"1"!=m&&"on"!=m&&"disabled"!=m||"1"!=b&&"on"!=b&&"disabled"!=b?jQuery("#masthead .main-header-bar.ast-sticky-active"):jQuery("#masthead .ast-stick-primary-below-wrapper")).css({"max-height":"","overflow-y":""}))}),jQuery("#ast-fixed-header .main-header-menu-toggle").click(function(e){var t;jQuery("#ast-fixed-header .main-header-menu-toggle").hasClass("toggled")?(t=jQuery(h).height(),"1"==Q&&jQuery("html").css({overflow:"auto"}),jQuery("#ast-fixed-header").css({"max-height":t+"px","overflow-y":"auto"})):(jQuery("html").css({overflow:""}),jQuery("#ast-fixed-header").css({"max-height":"","overflow-y":""}))}))}"disabled"!=_&&("enabled"===_&&(m=astraAddon.header_main_stick_meta||"",g=astraAddon.header_above_stick_meta||"",b=astraAddon.header_below_stick_meta||""),0<n("header .site-logo-img img").length&&(-1===(e=0==(e=void 0===(e=(_=n("header .site-logo-img img")).attr("height"))?_.height():e)?"":e).toString().indexOf("%")&&(e+="px"),""!=x.desktop||""!=x.tablet||""!=x.mobile?d="<style type='text/css' id='ast-site-identity-img' class='ast-site-identity-img' > #masthead .ast-header-sticked .site-logo-img .astra-logo-svg { width: "+x.desktop+"px; } @media (max-width: "+S+"px) { #masthead .ast-header-sticked .site-logo-img .astra-logo-svg { width: "+x.tablet+"px; } } @media (max-width: "+I+"px) { #masthead .ast-header-sticked .site-logo-img .astra-logo-svg{ width: "+x.mobile+"px; } } </style>":""!=f&&(d="<style type='text/css' id='ast-site-identity-img' class='ast-site-identity-img' > #masthead .ast-header-sticked .site-logo-img .astra-logo-svg { width: "+f+"px; } #masthead .ast-header-sticked .site-logo-img img { max-height: "+e+"; width: auto; } </style>"),n("head").append(d)),m||g||b)&&(n(l).on("addStickyClass",function(){var e="";"1"!=m&&"on"!=m&&"disabled"!=m||(e+=" ast-primary-sticky-header-active"),"1"!=g&&"on"!=g&&"disabled"!=g||(e+=" ast-above-sticky-header-active"),"1"!=b&&"on"!=b&&"disabled"!=b||(e+=" ast-below-sticky-header-active"),n("body").addClass(e)}),n(l).on("removeStickyClass",function(){var e="";"1"!=m&&"on"!=m&&"disabled"!=m||(e+=" ast-primary-sticky-header-active"),"1"!=g&&"on"!=g&&"disabled"!=g||(e+=" ast-above-sticky-header-active"),"1"!=b&&"on"!=b&&"disabled"!=b||(e+=" ast-below-sticky-header-active"),n("body").removeClass(e)}),"ast-box-layout"===k&&(y=parseInt(v)),jQuery(function(e){A()}),jQuery(l).on("astLayoutWidthChanged",function(e){(parseInt(m)||parseInt(b)||parseInt(g))&&(jQuery("div.ast-stick-primary-below-wrapper").children().unwrap(),jQuery('div[data-stick-support="on"]').children().unwrap(),A())}))})(jQuery,window);function display_mega_menu_on_load(){var e=document.querySelectorAll(".content-width-mega");if(0<e.length)for(var t=0;t<e.length;t++)"hover"===(e[t].getAttribute("data-megamenu-trigger")||"hover")&&e[t].addEventListener("mouseenter",function(e){e=e.target.querySelector(".astra-mega-menu-width-content");null!==e&&e.classList.remove("ast-hidden")});var a=document.querySelectorAll(".menu-container-width-mega");if(0<a.length)for(t=0;t<a.length;t++)"hover"===(a[t].getAttribute("data-megamenu-trigger")||"hover")&&a[t].addEventListener("mouseenter",function(e){e=e.target.querySelector(".astra-mega-menu-width-menu-container");null!==e&&e.classList.remove("ast-hidden")});var s=document.querySelectorAll(".full-width-mega");if(0<s.length)for(t=0;t<s.length;t++)"hover"===(s[t].getAttribute("data-megamenu-trigger")||"hover")&&s[t].addEventListener("mouseenter",function(e){var t=e.target.querySelector(".astra-full-megamenu-wrapper"),e=e.target.querySelector(".astra-mega-menu-width-full");null!==t&&t.classList.remove("ast-hidden"),null!==e&&e.classList.remove("ast-hidden")});var r=document.querySelectorAll(".full-stretched-width-mega");if(0<r.length)for(t=0;t<r.length;t++)"hover"===(r[t].getAttribute("data-megamenu-trigger")||"hover")&&r[t].addEventListener("mouseenter",function(e){var t=e.target.querySelector(".astra-full-megamenu-wrapper"),e=e.target.querySelector(".astra-mega-menu-width-full-stretched");null!==t&&t.classList.remove("ast-hidden"),null!==e&&e.classList.remove("ast-hidden")});var n=document.querySelectorAll(".custom-width-mega");if(0<n.length)for(t=0;t<n.length;t++)"hover"===(n[t].getAttribute("data-megamenu-trigger")||"hover")&&n[t].addEventListener("mouseenter",function(e){e=e.target.querySelector(".astra-mega-menu-width-custom");null!==e&&e.classList.remove("ast-hidden")})}document.addEventListener("DOMContentLoaded",display_mega_menu_on_load),document.addEventListener("astPartialContentRendered",display_mega_menu_on_load);var items=document.getElementsByClassName("astra-megamenu-li");function apply_megamenu_width_styles(){[].slice.call(items).forEac
992h(g=>{function s(){var e,t,a,s,r,n,i,d,u,l=(m=jQuery(g).parents(".ast-container")).children(),m=m.parent(),o=jQuery(g);(l=o.hasClass("full-width-mega")||o.hasClass("full-stretched-width-mega")?jQuery(l).closest(".ast-container"):l).length&&parseInt(window.innerWidth)>parseInt(astra.break_point)&&"ast-hf-mobile-menu"!==o.parent().attr("id")&&"ast-desktop-toggle-menu"!==o.parent().attr("id")?(e=l.width(),t=l.offset(),l=(a=o.offset()).left-(t.left+parseFloat(l.css("paddingLeft"))),d=e-(a.left+t.left)+130,s=m.width(),r=m.offset(),r=a.left-(r.left+parseFloat(m.css("paddingLeft"))),o.hasClass("custom-width-mega")&&(i=(i=window.getComputedStyle(o.find(".astra-mega-menu-width-custom")[0],"::before").getPropertyValue("content")||1200).replace(/[^0-9]/g,""),(i=parseInt(i))<=e?(u=parseInt(e-i),n=parseInt(l-u),t.left):(u=parseInt(i-e),n=parseInt(l+u),t.left)),o.hasClass("menu-container-width-mega")&&(u=jQuery(g).parents(".main-navigation"),m.hasClass("ast-above-header")?u=jQuery(".ast-above-header-navigation"):m.hasClass("ast-below-header")&&(u=jQuery(".ast-below-header-actual-nav")),e=($target_container=u.length?u:o.parent("ul")).width()+"px",m=jQuery(window).width()-($target_container.offset().left+$target_container.outerWidth()),u=o.offset(),m=jQuery(window).width()-m-u.left,l=parseInt($target_container.width()-m),d=parseInt(e)-o.outerWidth()-parseInt($target_container.width()-m)),o.hasClass("full-width-mega")?(o.find(".astra-full-megamenu-wrapper").css({left:"-"+r+"px",width:s}),o.find(".astra-megamenu").css({width:e})):o.hasClass("full-stretched-width-mega")?o.find(".astra-full-megamenu-wrapper").css({left:"-"+r+"px",width:s}):o.hasClass("custom-width-mega")?astra.isRtl?o.find(".astra-mega-menu-width-custom").css({width:i+"px"}):o.find(".astra-mega-menu-width-custom").css({left:"-"+n+"px",width:i+"px"}):o.hasClass("content-width-mega")?astra.isRtl?(u=t.left+e-(a.left+o.outerWidth()),o.find(".astra-megamenu").css({right:"-"+u+"px",width:e}).data("astra-hover-right",u)):o.find(".astra-megamenu").css({left:"-"+l+"px",width:e}):astra.isRtl?(o.find(".astra-megamenu").css({right:"-"+d+"px",width:e}),o.data("astra-hover-right",d)):o.find(".astra-megamenu").css({left:"-"+l+"px",width:e})):astra.isRtl?(o.find(".astra-megamenu").css({right:"",width:"","background-image":""}),o.find(".astra-full-megamenu-wrapper").css({right:"",width:"","background-image":""})):(o.find(".astra-megamenu").css({left:"",width:"","background-image":""}),o.find(".astra-full-megamenu-wrapper").css({left:"",width:"","background-image":""}))}"click"===(jQuery(g).data("megamenu-trigger")||"hover")?(jQuery(g).find("> a").on("click",function(e){var t=jQuery(g),a=t.hasClass("megamenu-active");jQuery(".astra-megamenu-li.megamenu-active").removeClass("megamenu-active"),a||(e.preventDefault(),t.addClass("megamenu-active"),t.find(".ast-hidden").removeClass("ast-hidden"),s())}),jQuery(document).on("click",function(e){jQuery(e.target).closest(".astra-megamenu-li").length||jQuery(".astra-megamenu-li.megamenu-active").removeClass("megamenu-active")})):(jQuery(g).hover(s),jQuery(g).mouseenter(function(){document.dispatchEvent(new CustomEvent("astra_mega_menu_on_hover",{detail:{}}))}))})}apply_megamenu_width_styles(),document.addEventListener("astMenuHoverStyleChanged",function(){apply_megamenu_width_styles()}),[].slice.call(items).forEach(function(h){var e=jQuery(h).parents(".ast-container"),f=e.children(),c=e.parent(),p=jQuery(h);(p.hasClass("full-width-mega")||p.hasClass("full-stretched-width-mega"))&&(f=jQuery(f).closest(".ast-container"),p.find(".astra-full-megamenu-wrapper").removeClass("ast-hidden")),p.find(".menu-link").focusin(function(e){var t,a,s,r,n,i,d,u,l,m,o,g;astra.is_header_footer_builder_active||(p.find(".sub-menu").addClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").addClass("astra-megamenu-wrapper-focus")),p.find(".sub-menu").removeClass("ast-hidden"),f.length&&parseInt(jQuery(window).width())>parseInt(astra.break_point)&&"ast-hf-mobile-menu"!==p.parent().attr("id")&&"ast-desktop-toggle-menu"!==p.parent().attr("id")?(t=f.width(),a=f.offset(),u=(s=p.offset()).left-(a.left+parseFloat(f.css("paddingLeft"))),l=t-(s.left+a.left)+130,r=c.width(),g=c.offset(),g=s.left-(g.left+parseFloat(c.css("paddingLeft"))),p.hasClass("custom-width-mega")&&(
992d=(d=window.getComputedStyle(p.find(".astra-mega-menu-width-custom")[0],"::before").getPropertyValue("content")||1200).replace(/[^0-9]/g,""),i=(d=parseInt(d))<=t?(i=parseInt(t-d),n=parseInt(u-i),a.left-n):(i=parseInt(d-t),n=parseInt(u+i),a.left+n)),p.hasClass("menu-container-width-mega")&&(o=jQuery(h).parents(".main-navigation"),c.hasClass("ast-above-header")?o=jQuery(".ast-above-header-navigation"):c.hasClass("ast-below-header")&&(o=jQuery(".ast-below-header-actual-nav")),t=($target_container=o.length?o:p.parent("ul")).width()+"px",o=jQuery(window).width()-($target_container.offset().left+$target_container.outerWidth()),m=p.offset(),o=jQuery(window).width()-o-m.left,u=parseInt($target_container.width()-o),l=parseInt(t)-p.outerWidth()-parseInt($target_container.width()-o)),p.hasClass("full-width-mega")?(p.find(".astra-full-megamenu-wrapper").css({left:"-"+g+"px",width:r}),p.find(".astra-megamenu").css({width:t})):p.hasClass("full-stretched-width-mega")?p.find(".astra-full-megamenu-wrapper").css({left:"-"+g+"px",width:r}):p.hasClass("custom-width-mega")?astra.isRtl?p.find(".astra-mega-menu-width-custom").css({right:"-"+i+"px",width:d+"px"}):p.find(".astra-mega-menu-width-custom").css({left:"-"+n+"px",width:d+"px"}):p.hasClass("content-width-mega")?astra.isRtl?(m=a.left+t-(s.left+p.outerWidth()),p.find(".astra-megamenu").css({right:"-"+m+"px",width:t}).data("astra-hover-right",m)):p.find(".astra-megamenu").css({left:"-"+u+"px",width:t}):(g=void 0!==(o=p.data("astra-hover-right"))?o:l,astra.isRtl?p.find(".astra-megamenu").css({right:"-"+g+"px",width:t}).data("astra-hover-right",g):p.find(".astra-megamenu").css({left:"-"+u+"px",width:t}))):astra.isRtl?(p.find(".astra-megamenu").css({right:"",width:"","background-image":""}),p.find(".astra-full-megamenu-wrapper").css({right:"",width:"","background-image":""})):(p.find(".astra-megamenu").css({left:"",width:"","background-image":""}),p.find(".astra-full-megamenu-wrapper").css({left:"",width:"","background-image":""}))}),astra.is_header_footer_builder_active||(p.find(".menu-link").keydown(function(e){9==e.which&&e.shiftKey&&(p.find(".sub-menu").removeClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").removeClass("astra-megamenu-wrapper-focus"))}),jQuery(h).find(".sub-menu .menu-item").last().focusout(function(){p.find(".sub-menu").removeClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").removeClass("astra-megamenu-wrapper-focus")}),jQuery(window).click(function(){p.find(".sub-menu").removeClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").removeClass("astra-megamenu-wrapper-focus")})),p.click(function(e){jQuery(e.target).hasClass("menu-item")&&e.stopImmediatePropagation()})});(()=>{var e;function o(e){var t=(t=document.body.className).replace(e,"");document.body.className=t}function d(e){e.style.display="block",setTimeout(function(){e.style.opacity=1},1)}function n(e){e.style.opacity="",setTimeout(function(){e.style.display=""},200)}r="iPhone"==navigator.userAgent.match(/iPhone/i)?"iphone":"",e="iPod"==navigator.userAgent.match(/iPod/i)?"ipod":"",document.body.className+=" "+r,document.body.className+=" "+e;for(var t=document.querySelectorAll("a.astra-search-icon:not(.slide-search)"),a=0;t.length>a;a++)t[a].onclick=function(e){var t,a,o,n;if(e.preventDefault(),e=e||window.event,this.classList.contains("header-cover"))for(var s=document.querySelectorAll(".ast-search-box.header-cover"),c=astraAddon.is_header_builder_active||!1,r=0;r<s.length;r++)for(var l=s[r].parentNode.querySelectorAll("a.astra-search-icon"),i=0;i<l.length;i++)l[i]==this&&(d(s[r]),s[r].querySelector("input.search-field").focus(),c?(t=s[r],n=o=a=void 0,document.body.classList.contains("ast-header-break-point")&&(n=document.querySelector(".main-navigation"),a=document.querySelector(".main-header-bar"),o=document.querySelector(".ast-mobile-header-wrap"),null!==a)&&null!==n&&(n=n.offsetHeight,a=a.offsetHeight,o=o.offsetHeight,n=n&&!document.body.classList.contains("ast-no-toggle-menu-enable")?parseFloat(n)-parseFloat(a):parseFloat(a),t.parentNode.classList.contains("ast-mobile-header-wrap")&&(n=parseFloat(o)),t.style.maxHeight=Math.abs(n)+"px")):(a=s[r],t=o=void 0,document.body.classList.contains("ast-header-break-point")&&(t=document.querySelector(".main-navigation"),null!==(o=document.querySelector(".main-header-bar")))&&null!==t&&(t=t.offsetHeight,o=o.offsetHeight,t=t&&!document.body.classList.contains("ast-no-toggle-menu-enable")?parseFloat(t)-parseFloat(o):parseFloat(o),a.style.maxHeight=Math.abs(t)+"px")));else this.classList.contains("full-screen")&&(e=document.getElementById("ast-seach-full-screen-form")).classList.contains("full-screen")&&(d(e),document.body.className+=" full-screen",e.querySelector("input.search-field").focus())};for(var s=document.querySelectorAll(".ast-search-box .close"),a=0,
992c=s.length;a<c;++a)s[a].onclick=function(e){e=e||window.event;for(var t=this;;){if(t.parentNode.classList.contains("ast-search-box")){n(t.parentNode),o("full-screen");break}if(t.parentNode.classList.contains("site-header"))break;t=t.parentNode}};document.onkeydown=function(e){if(27==e.keyCode)for(var e=document.getElementById("ast-seach-full-screen-form"),t=(null!=e&&(n(e),o("full-screen")),document.querySelectorAll(".ast-search-box.header-cover")),a=0;a<t.length;a++)n(t[a])},window.addEventListener("resize",function(){if("BODY"===document.activeElement.tagName&&"INPUT"!=document.activeElement.tagName){var e=document.querySelectorAll(".ast-search-box.header-cover");if(!document.body.classList.contains("ast-header-break-point"))for(var t=0;t<e.length;t++)e[t].style.maxHeight="",e[t].style.opacity="",e[t].style.display=""}});var r=document.getElementById("close");r&&r.addEventListener("keydown",function(e){"Enter"===e.key?(e.preventDefault(),this.click()):"Tab"===e.key&&e.preventDefault()})})(); 993/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */ 994!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function t(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(c=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw r}}return l}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const n=Object.entries,o=Object.setPrototypeOf,r=Object.isFrozen,i=Object.getPrototypeOf,a=Object.getOwnPropertyDescriptor;let l=Object.freeze,c=Object.seal,s=Object.create,u="undefined"!=typeof Reflect&&Reflect,f=u.apply,p=u.construct;l||(l=function(e){return e}),c||(c=function(e){return e}),f||(f=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),p||(p=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const m=L(Array.prototype.forEach),d=L(Array.prototype.lastIndexOf),h=L(Array.prototype.pop),g=L(Array.prototype.push),y=L(Array.prototype.splice),T=Array.isArray,b=L(String.prototype.toLowerCase),S=L(String.prototype.toString),E=L(String.prototype.match),A=L(String.prototype.replace),N=L(String.prototype.indexOf),_=L(String.prototype.trim),w=L(Number.prototype.toString),O=L(Boolean.prototype.toString),v="undefined"==typeof BigInt?null:L(BigInt.prototype.toString),D="undefined"==typeof Symbol?null:L(Symbol.prototype.toString),R=L(Object.prototype.hasOwnProperty),C=L(Object.prototype.toString),I=L(RegExp.prototype.test),k=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(x,t)});var x;function L(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return f(e,t,o)}}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;if(o&&o(e,null),!T(t))return e;let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(r(t)||(t[i]=e),o=e)}e[o]=!0}return e}function z(e){for(let t=0;t<e.length;t++){R(e,t)||(e[t]=null)}return e}function P(e){const o=s(null);for(const i of n(e)){var r=t(i,2);const n=r[0],a=r[1];R(e,n)&&(T(a)?o[n]=z(a):a&&"object"==typeof a&&a.constructor===Object?o[n]=P(a):o[n]=a)}return o}function U(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return L(n.get);if("function"==typeof n.value)return L(n.value)}e=i(e)}return function(){return null}}const F=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),H=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),B=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=l(["#text"]),q=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
994spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),X=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=c(/{{[\w\W]*|^[\w\W]*}}/g),Z=c(/<%[\w\W]*|^[\w\W]*%>/g),J=c(/\${[\w\W]*/g),Q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),ee=c(/^aria-[\-\w]+$/),te=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ne=c(/^(?:\w+script|data):/i),oe=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),re=c(/^html$/i),ie=c(/^[a-z][.\w]*(-[.\w]+)+$/i),ae=c(/<[/\w!]/g),le=c(/<[/\w]/g),ce=c(/<\/no(script|embed|frames)/i),se=c(/\/>/i),ue=1,fe=3,pe=7,me=8,de=9,he=11,ge=function(){return"undefined"==typeof window?null:window},ye=function(e,t,n,o){return R(e,t)&&T(e[t])?M(o.base?P(o.base):{},e[t],o.transform):n};var Te=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ge();const o=t=>e(t);if(o.version="3.4.11",o.removed=[],!t||!t.document||t.document.nodeType!==de||!t.Element)return o.isSupported=!1,o;let r=t.document;const i=r,a=i.currentScript;t.DocumentFragment;const u=t.HTMLTemplateElement,f=t.Node,p=t.Element,x=t.NodeFilter,L=t.NamedNodeMap;void 0===L&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const z=t.DOMParser,Te=t.trustedTypes,be=p.prototype,Se=U(be,"cloneNode"),Ee=U(be,"remove"),Ae=U(be,"nextSibling"),Ne=U(be,"childNodes"),_e=U(be,"parentNode"),we=U(be,"shadowRoot"),Oe=U(be,"attributes"),ve=f&&f.prototype?U(f.prototype,"nodeType"):null,De=f&&f.prototype?U(f.prototype,"nodeName"):null;if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Re,Ce,Ie="",ke=!1,xe=0;const Le=function(){if(xe>0)throw k('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Me=function(e){Le(),xe++;try{return Re.createHTML(e)}finally{xe--}},ze=function(){return ke||(Ce=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;
vendor: 2,237 bytes, line 994
994const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(Te,a),ke=!0),Ce},Pe=r,Ue=Pe.implementation,Fe=Pe.createNodeIterator,He=Pe.createDocumentFragment,je=Pe.getElementsByTagName,Be=i.importNode;let Ge={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof n&&"function"==typeof _e&&Ue&&void 0!==Ue.createHTMLDocument;const We=V,Ye=Z,qe=J,Xe=Q,$e=ee,Ke=ne,Ve=oe,Ze=ie;let Je=te,Qe=null;const et=M({},[...F,...H,...j,...G,...Y]);let tt=null;const nt=M({},[...q,...X,...$,...K]);let ot=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),rt=null,it=null;const at=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let lt=!0,ct=!0,st=!1,ut=!0,ft=!1,pt=!0,mt=!1,dt=!1,ht=null,gt=null,yt=!1,Tt=!1,bt=!1,St=!1,Et=!0,At=!1;const Nt="user-content-";let _t=!0,wt=!1,Ot={},vt=null;const Dt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Rt=null;const Ct=M({},["audio","video","img","source","image","track"]);let It=null;const kt=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",Mt="http://www.w3.org/1999/xhtml";let zt=Mt,Pt=!1,Ut=null;const Ft=M({},[xt,Lt,Mt],S),Ht=l(["mi","mo","mn","ms","mtext"]);let jt=M({},Ht);const Bt=l(["annotation-xml"]);let Gt=M({},Bt);const Wt=M({}
vendor: 12,584 bytes, line 994
994,["title","style","font","a","script"]);let Yt=null;const qt=["application/xhtml+xml","text/html"];let Xt=null,$t=null;const Kt=r.createElement("form"),Vt=function(e){return e instanceof RegExp||e instanceof Function},Zt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if($t&&$t===e)return;e&&"object"==typeof e||(e={}),e=P(e),Yt=-1===qt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Xt="application/xhtml+xml"===Yt?S:b,Qe=ye(e,"ALLOWED_TAGS",et,{transform:Xt}),tt=ye(e,"ALLOWED_ATTR",nt,{transform:Xt}),Ut=ye(e,"ALLOWED_NAMESPACES",Ft,{transform:S}),It=ye(e,"ADD_URI_SAFE_ATTR",kt,{transform:Xt,base:kt}),Rt=ye(e,"ADD_DATA_URI_TAGS",Ct,{transform:Xt,base:Ct}),vt=ye(e,"FORBID_CONTENTS",Dt,{transform:Xt}),rt=ye(e,"FORBID_TAGS",P({}),{transform:Xt}),it=ye(e,"FORBID_ATTR",P({}),{transform:Xt}),Ot=!!R(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?P(e.USE_PROFILES):e.USE_PROFILES),lt=!1!==e.ALLOW_ARIA_ATTR,ct=!1!==e.ALLOW_DATA_ATTR,st=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ut=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ft=e.SAFE_FOR_TEMPLATES||!1,pt=!1!==e.SAFE_FOR_XML,mt=e.WHOLE_DOCUMENT||!1,Tt=e.RETURN_DOM||!1,bt=e.RETURN_DOM_FRAGMENT||!1,St=e.RETURN_TRUSTED_TYPE||!1,yt=e.FORCE_BODY||!1,Et=!1!==e.SANITIZE_DOM,At=e.SANITIZE_NAMED_PROPS||!1,_t=!1!==e.KEEP_CONTENT,wt=e.IN_PLACE||!1,Je=function(e){try{return I(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:te,zt="string"==typeof e.NAMESPACE?e.NAMESPACE:Mt,jt=R(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?P(e.MATHML_TEXT_INTEGRATION_POINTS):M({},Ht),Gt=R(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?P(e.HTML_INTEGRATION_POINTS):M({},Bt);const t=R(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?P(e.CUSTOM_ELEMENT_HANDLING):s(null);if(ot=s(null),R(t,"tagNameCheck")&&Vt(t.tagNameCheck)&&(ot.tagNameCheck=t.tagNameCheck),R(t,"attributeNameCheck")&&Vt(t.attributeNameCheck)&&(ot.attributeNameCheck=t.attributeNameCheck),R(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(ot.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),c(ot),ft&&(ct=!1),bt&&(Tt=!0),Ot&&(Qe=M({},Y),tt=s(null),!0===Ot.html&&(M(Qe,F),M(tt,q)),!0===Ot.svg&&(M(Qe,H),M(tt,X),M(tt,K)),!0===Ot.svgFilters&&(M(Qe,j),M(tt,X),M(tt,K)),!0===Ot.mathMl&&(M(Qe,G),M(tt,$),M(tt,K))),at.tagCheck=null,at.attributeCheck=null,R(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?at.tagCheck=e.ADD_TAGS:T(e.ADD_TAGS)&&(Qe===et&&(Qe=P(Qe)),M(Qe,e.ADD_TAGS,Xt))),R(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?at.attributeCheck=e.ADD_ATTR:T(e.ADD_ATTR)&&(tt===nt&&(tt=P(tt)),M(tt,e.ADD_ATTR,Xt))),R(e,"ADD_URI_SAFE_ATTR")&&T(e.ADD_URI_SAFE_ATTR)&&M(It,e.ADD_URI_SAFE_ATTR,Xt),R(e,"FORBID_CONTENTS")&&T(e.FORBID_CONTENTS)&&(vt===Dt&&(vt=P(vt)),M(vt,e.FORBID_CONTENTS,Xt)),R(e,"ADD_FORBID_CONTENTS")&&T(e.ADD_FORBID_CONTENTS)&&(vt===Dt&&(vt=P(vt)),M(vt,e.ADD_FORBID_CONTENTS,Xt)),_t&&(Qe["#text"]=!0),mt&&M(Qe,["html","head","body"]),Qe.table&&(M(Qe,["tbody"]),delete rt.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Re;Re=e.TRUSTED_TYPES_POLICY;try{Ie=Me("")}catch(e){throw Re=t,e}}else null===e.TRUSTED_TYPES_POLICY?(Re=void 0,Ie=""):(void 0===Re&&(Re=ze()),Re&&"string"==typeof Ie&&(Ie=Me("")));l&&l(e),$t=e},Jt=M({},[...H,...j,...B]),Qt=M({},[...G,...W]),en=function(e){let t=_e(e);t&&t.tagName||(t={namespaceURI:zt,tagName:"template"});const n=b(e.tagName),o=b(t.tagName);return!!Ut[e.namespaceURI]&&(e.namespaceURI===Lt?function(e,t,n){return t.namespaceURI===Mt?"svg"===e:t.namespaceURI===xt?"svg"===e&&("annotation-xml"===n||jt[n]):Boolean(Jt[e])}(n,t,o):e.namespaceURI===xt?function(e,t,n){return t.namespaceURI===Mt?"math"===e:t.namespaceURI===Lt?"math"===e&&Gt[n]:Boolean(Qt[e])}(n,t,o):e.namespaceURI===Mt?function(e,t,n){return!(t.namespaceURI===Lt&&!Gt[n])&&!(t.namespaceURI===xt&&!jt[n])&&!Qt[e]&&(Wt[e]||!Jt[e])}(n,t,o):!("application/xhtml+xml"!==Yt||!Ut[e.namespaceURI]))},tn=function(e){g(o.removed,{element:e});try{_e(e).removeChild(e)}catch(t){if(Ee(e),!_e(e))throw k("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nn=function(e){const t=Ne(e);if(t){const e=[];m(t,t=>{g(e,t)}),m(e,e=>{try{Ee(e)}catch(e){}})}const n=Oe(e);if(n)for(let t=n.length-1;t>=0;--t){const o=n[t],r=o&&o.name;if("string"==typeof r)try{e.removeAttribute(r)}catch(e){}}},on=function(e,t){try{g(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Tt||bt)try{tn(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},rn=function(e){const t=Oe(e);if(t)for(let n=t.length-1;n>=0;--n){const o=t[n],r=o&&o.name;if("string"==typeof r&&!tt[Xt(r)])try{e.removeAttribute(r)}catch(e){}}},an=function(e){let t=null,n=null;if(yt)e="<remove></remove>"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Yt&&zt===Mt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Re?Me(e):e;if(zt===Mt)try{t=(new z).parseFromString(o,Yt)}catch(e){}if(!t||!t.documentElement){t=Ue.createDocument(zt,"template",null);try{t.documentElement.innerHTML=Pt?Ie:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),zt===Mt?je.call(t,mt?"html":"body")[0]:mt?t.documentElement:i},ln=function(e){return Fe.call(e.ownerDocument||e,e,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},cn=function(e){return e=A(e,We," "),e=A(e,Ye," "),e=A(e,qe," ")},sn=function(e){var t;e.normalize();const n=Fe.call(e.ownerDocument||e,e,x.SHOW_TEXT|x.SHOW_COMMENT|x.SHOW_CDATA_SECTION|x.SHOW_PROCESSING_INSTRUCTION,null);let o=n.nextNode();for(;o;)o.data=cn(o.data),o=n.nextNode();const r=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");r&&m(r,e=>{fn(e.content)&&sn(e.content)})},un=function(e){const t=De?De(e):null;return"string"==typeof t&&("form"===Xt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==Oe(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==ve(e)||e.childNodes!==Ne(e)))},fn=function(e){if(!ve||"object"!=typeof e||null===e)return!1;try{return ve(e)===he}catch(e){return!1}},pn=function(e){if(!ve||"object"!=typeof e||null===e)return!1;try{return"number"==typeof ve(e)}catch(e){return!1}};function mn(e,t,n){0!==e.length&&m(e,e=>{e.call(o,t,n,$t)})}const dn=function(e){if(mn(Ge.beforeSanitizeElements,e,null),un(e))return tn(e),!0;const t=Xt(De?De(e):e.nodeName);if(mn(Ge.uponSanitizeElement,e,{tagName:t,allowedTags:Qe}),function(e,t){return!!(pt&&e.hasChildNodes()&&!pn(e.firstElementChild)&&I(ae,e.textContent)&&I(ae,e.innerHTML))||!(!pt||e.namespaceURI!==Mt||"style"!==t||!pn(e.firstElementChild))||e.nodeType===pe||!(!pt||e.nodeType!==me||!I(le,e.data))}(e,t))return tn(e),!0;if(rt[t]||!(at.tagCheck instanceof Function&&at.tagCheck(t))&&!Qe[t])return function(e,t){if(!rt[t]&&yn(t)){if(ot.tagNameCheck instanceof RegExp&&I(ot.tagNameCheck,t))return!1;if(ot.tagNameCheck instanceof Function&&ot.tagNameCheck(t))return!1}if(_t&&!vt[t]){const t=_e(e),n=Ne(e);if(n&&t)for(let o=n.length-1;o>=0;--o){const r=wt?n[o]:Se(n[o],!0);t.insertBefore(r,Ae(e))}}return tn(e),!0}(e,t);if((ve?ve(e):e.nodeType)===ue&&!en(e))return tn(e),!0;if(("noscript"===t||"noembed"===t||"noframes"===t)&&I(ce,e.innerHTML))return tn(e),!0;if(ft&&e.nodeType===fe){const t=cn(e.textContent);e.textContent!==t&&(g(o.removed,{element:e.cloneNode()}),e.textContent=t)}return mn(Ge.afterSanitizeElements,e,null),!1},hn=function(e,t,n){if(it[t])return!1;if(Et&&("id"===t||"name"===t)&&(n in r||n in Kt))return!1;const o=tt[t]||at.attributeCheck instanceof Function&&at.attributeCheck(t,e);if(ct&&I(Xe,t));else if(lt&&I($e,t));else if(o)if(It[t]);else if(I(Je,A(n,Ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==N(n,"data:")||!Rt[e]){if(st&&!I(Ke,A(n,Ve,"")));else if(n)return!1}else;else if(!(yn(e)&&(ot.tagNameCheck instanceof RegExp&&I(ot.tagNameCheck,e)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(e))&&(ot.attributeNameCheck instanceof RegExp&&I(ot.attributeNameCheck,t)||ot.attributeNameCheck instanceof Function&&ot.attributeNameCheck(t,e))||"is"===t&&ot.allowCustomizedBuiltInElements&&(ot.tagNameCheck instanceof RegExp&&I(ot.tagNameCheck,n)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(n))))return!1;return!0},gn=M({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yn=function(e){return!gn[b(e)]&&I(Ze,e)},Tn=function(e,t,n,o){if(Re&&"object"==typeof Te&&"function"==typeof Te.getAttributeType&&!n)switch(Te.getAttributeType(e,t)){case"TrustedHTML":return Me(o);case"TrustedScriptURL":return function(e){Le(),xe++;try{return Re.createScriptURL(e)}finally{xe--}}(o)}return o},bn=function(e,t,n,r){try{n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),un(e)?tn(e):h(o.removed)}catch(n){on(t,e)}},Sn=function(e){mn(Ge.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||un(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tt,forceKeepAttr:void 0};let o=t.length;const r=Xt(e.nodeName);for(;o--;){const i=t[o],a=i.name,l=i.namespaceURI,c=i.value,s=Xt(a),u=c;let f="value"===a?u:_(u);n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,mn(Ge.uponSanitizeAttribute,e,n),f=n.attrValue,!At||"id"!==s&&"name"!==s||0===N(f,Nt)||(on(a,e),f=Nt+f),pt&&I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)?on(a,e):"attributename"===s&&E(f,"href")?on(a,e):n.forceKeepAttr||(n.keepAttr&&(ut||!I(se,f))?(ft&&(f=cn(f)),hn(r,s,f)?(f=Tn(r,s,l,f),f!==u&&bn(e,a,l,f)):on(a,e)):on(a,e))}mn(Ge.afterSanitizeAttributes,e,null)},En=function(e){let t=null;const n=ln(e);for(mn(Ge.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){mn(Ge.uponSanitizeShadowNode,t,null),dn(t),Sn(t),fn(t.content)&&En(t.content);if((ve?ve(t):t.nodeType)===ue){const e=we(t);fn(e)&&(An(e),En(e))}}mn(Ge.afterSanitizeShadowDOM,e,null)},An=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){En(e.shadow);continue}const n=e.node,o=(ve?ve(n):n.nodeType)===ue,r=Ne(n);if(r)for(let e=r.length-1;e>=0;--e)t.push({node:r[e],shadow:null});if(o){const e=De?De(n):null;if("string"==typeof e&&"template"===Xt(e)){const e=n.content;fn(e)&&t.push({node:e,shadow:null})}}if(o){const e=we(n);fn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(Pt=!e,Pt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return w(e);case"boolean":return O(e);case"bigint":return v?v(e):"0";case"symbol":return D?D(e):"Symbol()";case"undefined":default:return C(e);case"function":case"object":{if(null===e)return C(e);const t=e,n=U(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:C(e)}return C(e)}}}(e)))throw k("dirty is not a string, aborting");if(!o.isSupported)return e;dt?(Qe=ht,tt=gt):Zt(t),(Ge.uponSanitizeElement.length>0||Ge.uponSanitizeAttribute.length>0)&&(Qe=P(Qe)),Ge.uponSanitizeAttribute.length>0&&(tt=P(tt)),o.removed=[];const c=wt&&"string"!=typeof e&&pn(e);if(c){const t=De?De(e):e.nodeName;if("string"==typeof t){const e=Xt(t);if(!Qe[e]||rt[e])throw k("root node is forbidden and cannot be sanitized in-place")}if(un(e))throw k("root node is clobbered and cannot be sanitized in-place");try{An(e)}catch(t){throw nn(e),t}}else if(pn(e))n=an("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===ue&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r),An(r);else{if(!Tt&&!ft&&!mt&&-1===e.indexOf("<"))return Re&&St?Me(e):e;if(n=an(e),!n)return Tt?null:St?Ie:""}n&&yt&&tn(n.firstChild);const s=ln(c?e:n);try{for(;a=s.nextNode();
994)dn(a),Sn(a),fn(a.content)&&En(a.content)}catch(t){throw c&&nn(e),t}if(c)return m(o.removed,e=>{e.element&&function(e){const t=[e];for(;t.length>0;){const e=t.pop();(ve?ve(e):e.nodeType)===ue&&rn(e);const n=Ne(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}}(e.element)}),ft&&sn(e),e;if(Tt){if(ft&&sn(n),bt)for(l=He.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(tt.shadowroot||tt.shadowrootmode)&&(l=Be.call(i,l,!0)),l}let u=mt?n.outerHTML:n.innerHTML;return mt&&Qe["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&I(re,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),ft&&(u=cn(u)),Re&&St?Me(u):u},o.setConfig=function(){Zt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),dt=!0,ht=Qe,gt=tt},o.clearConfig=function(){$t=null,dt=!1,ht=null,gt=null,Re=Ce,Ie=""},o.isValidAttribute=function(e,t,n){$t||Zt({});const o=Xt(e),r=Xt(t);return hn(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&R(Ge,e)&&g(Ge[e],t)},o.removeHook=function(e,t){if(R(Ge,e)){if(void 0!==t){const n=d(Ge[e],t);return-1===n?void 0:y(Ge[e],n,1)[0]}return h(Ge[e])}},o.removeHooks=function(e){R(Ge,e)&&(Ge[e]=[])},o.removeAllHooks=function(){Ge={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return Te});; 995/*! This file is auto-generated */ 996window.edButtons=[],window.edAddTag=function(){},window.edCheckOpenTags=function(){},window.edCloseAllTags=function(){},window.edInsertImage=function(){},window.edInsertLink=function(){},window.edInsertTag=function(){},window.edLink=function(){},window.edQuickLink=function(){},window.edRemoveTag=function(){},window.edShowButton=function(){},window.edShowLinks=function(){},window.edSpell=function(){},window.edToolbar=function(){},function(){function u(t){var e,n,o,a;"undefined"!=typeof jQuery?jQuery(t):((e=u).funcs=[],e.ready=function(){if(!e.isReady)for(e.isReady=!0,n=0;n<e.funcs.length;n++)e.funcs[n]()},e.isReady?t():e.funcs.push(t),e.eventAttached||(document.addEventListener?(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),e.ready()},document.addEventListener("DOMContentLoaded",o,!1),window.addEventListener("load",e.ready,!1)):document.attachEvent&&(o=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",o),e.ready())},document.attachEvent("onreadystatechange",o),window.attachEvent("onload",e.ready),(a=function(){try{document.documentElement.doScroll("left")}catch(t){return void setTimeout(a,50)}e.ready()})()),e.eventAttached=!0))}t=new Date,e=function(t){t=t.toString();return t=t.length<2?"0"+t:t};var t,e=t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"+00:00",r=window.QTags=function(t){if("string"==typeof t)t={id:t};else if("object"!=typeof t)return!1;var e,n,o,a=this,i=t.id,s=document.getElementById(i),l="qt_"+i;if(!i||!s)return!1;a.name=l,a.id=i,a.canvas=s,a.settings=t,t="content"!==i||"string"!=typeof adminpage||"post-new-php"!==adminpage&&"post-php"!==adminpage?l+"_toolbar":(window.edCanvas=s,"ed_toolbar"),(e=document.getElementById(t))||((e=document.createElement("div")).id=t,e.className="quicktags-toolbar"),s.parentNode.insertBefore(e,s),a.toolbar=e,t=function(t){var e,t=(t=t||window.event).target||t.srcElement;(t.clientWidth||t.offsetWidth)&&/ ed_button /.test(" "+t.className+" ")&&(a.canvas=s=document.getElementById(i),e=t.id.replace(l+"_",""),a.theButtons[e])&&a.theButtons[e].callback.call(a.theButtons[e],t,s,a)},o=function(){window.wpActiveEditor=i},n=document.getElementById("wp-"+i+"-wrap"),e.addEventListener?(e.addEventListener("click",t,!1),n&&n.addEventListener("click",o,!1)):e.attachEvent&&(e.attachEvent("onclick",t),n)&&n.attachEvent("onclick",o),a.getButton=function(t){return a.theButtons[t]},a.getButtonElement=function(t){return document.getElementById(l+"_"+t)},a.init=function(){u(function(){r._buttonsInit(i)})},a.remove=function(){delete r.instances[i],e&&e.parentNode&&e.parentNode.removeChild(e)},(r.instances[i]=a).init()};function s(t){return(t=(t=t||"").replace(/&([^#])(?![a-z1-4]{1,8};)/gi,"&$1")).replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}r.instances={},r.getInstance=function(t){return r.instances[t]},r._buttonsInit=function(t){var c=this;function e(t){var e,n,o=c.instances[t],a=(o.canvas,o.name),i=o.settings,s="",l={},u="";for(n in i.buttons&&(u=","+i.buttons+","),edButtons)edButtons[n]&&(e=edButtons[n].id,u&&-1!==",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,".indexOf(","+e+",")&&-1===u.indexOf(","+e+",")||edButtons[n].instance&&edButtons[n].instance!==t||(l[e]=edButtons[n],edButtons[n].html&&(s+=edButtons[n].html(a+"_"))));u&&-1!==u.indexOf(",dfw,")&&(l.dfw=new r.DFWButton,s+=l.dfw.html(a+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(l.textdirection=new r.TextDirectionButton,s+=l.textdirection.html(a+"_")),o.toolbar.innerHTML=s,o.theButtons=l,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[o])}if(t)e(t);else for(t in c.instances)e(t);c.buttonsInitDone=!0},r.addButton=function(t,e,n,o,a,i,s,l,u){var c;if(t&&e){if(s=s||0,o=o||"",u=u||{},"function"==typeof n)(c=new r.Button(t,e,a,i,l,u)).callback=n;else{if("string"!=typeof n)return;c=new r.TagButton(t,e,n,o,a,i,l,u)}if(-1===s)return c;if(0<s){for(;void 0!==edButtons[s];)s++;edButtons[s]=c}else edButtons[edButtons.length]=c;this.buttonsInitDone&&this._buttonsInit()}},r.insertContent=function(t){var e,n,o,a,i=document.getElementById(wpActiveEditor);return!!i&&(document.selection?(i.focus(),document.selection.createRange().text=t):i.selectionStart||0===i.selectionStart?(o=i.value,e=i.selectionStart,a=i.selectionEnd,n=i.scrollTop,i.value=o.substring(0,e)+t+o.substring(a,o.length),i.selectionStart=e+t.length,i.selectionEnd=e+t.length,i.scrollTop=n):i.value+=t,i.focus(),document.createEvent?((a=document.createEvent("HTMLEvents")).initEvent("change",!1,!0),i.dispatchEvent(a)):i.fireEvent&&i.fireEvent("onchange"),!0)},r.Button=function(t,e,n,o,a,i){this.id=t,this.display=e,this.access="",this.title=o||"",this.instance=a||"",this.attr=i||{}},r.Button.prototype.html=function(t){var e,n=this.title?' title="'+s(this.title)+'"':"",o=this.attr&&this.attr.ariaLabel?' aria-label="'+s(this.attr.ariaLabel)+'"':"",a=this.display?' value="'+s(this.display)+'"':"",t
996=this.id?' id="'+s(t+this.id)+'"':"",i=(i=window.wp)&&i.editor&&i.editor.dfw;return"fullscreen"===this.id?'<button type="button"'+t+' class="ed_button qt-dfw qt-fullscreen"'+n+o+"></button>":"dfw"===this.id?(e=i&&i.isActive()?"":' disabled="disabled"','<button type="button"'+t+' class="ed_button qt-dfw'+(i&&i.isOn()?" active":"")+'"'+n+o+e+"></button>"):'<input type="button"'+t+' class="ed_button button button-small"'+n+o+a+" />"},r.Button.prototype.callback=function(){},r.TagButton=function(t,e,n,o,a,i,s,l){r.Button.call(this,t,e,a,i,s,l),this.tagStart=n,this.tagEnd=o},r.TagButton.prototype=new r.Button,r.TagButton.prototype.openTag=function(t,e){e.openTags||(e.openTags=[]),this.tagEnd&&(e.openTags.push(this.id),t.value="/"+t.value,this.attr.ariaLabelClose)&&t.setAttribute("aria-label",this.attr.ariaLabelClose)},r.TagButton.prototype.closeTag=function(t,e){var n=this.isOpen(e);!1!==n&&e.openTags.splice(n,1),t.value=this.display,this.attr.ariaLabel&&t.setAttribute("aria-label",this.attr.ariaLabel)},r.TagButton.prototype.isOpen=function(t){var e=0,n=!1;if(t.openTags)for(;!1===n&&e<t.openTags.length;)n=t.openTags[e]===this.id&&e,e++;else n=!1;return n},r.TagButton.prototype.callback=function(t,e,n){var o,a,i,s,l,u,c=this,r=e.value,d=r?c.tagEnd:"";document.selection?(e.focus(),0<(l=document.selection.createRange()).text.length?c.tagEnd?l.text=c.tagStart+l.text+d:l.text=l.text+c.tagStart:c.tagEnd?!1===c.isOpen(n)?(l.text=c.tagStart,c.openTag(t,n)):(l.text=d,c.closeTag(t,n)):l.text=c.tagStart):e.selectionStart||0===e.selectionStart?((l=e.selectionStart)<(u=e.selectionEnd)&&"\n"===r.charAt(u-1)&&--u,o=u,a=e.scrollTop,i=r.substring(0,l),s=r.substring(u,r.length),r=r.substring(l,u),l!==u?c.tagEnd?(e.value=i+c.tagStart+r+d+s,o+=c.tagStart.length+d.length):(e.value=i+r+c.tagStart+s,o+=c.tagStart.length):c.tagEnd?!1===c.isOpen(n)?(e.value=i+c.tagStart+s,c.openTag(t,n),o=l+c.tagStart.length):(e.value=i+d+s,o=l+d.length,c.closeTag(t,n)):(e.value=i+c.tagStart+s,o=l+c.tagStart.length),e.selectionStart=o,e.selectionEnd=o,e.scrollTop=a):d?!1!==c.isOpen(n)?(e.value+=c.tagStart,c.openTag(t,n)):(e.value+=d,c.closeTag(t,n)):e.value+=c.tagStart,e.focus(),document.createEvent?((u=document.createEvent("HTMLEvents")).initEvent("change",!1,!0),e.dispatchEvent(u)):e.fireEvent&&e.fireEvent("onchange")},r.SpellButton=function(){},r.CloseButton=function(){r.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)},r.CloseButton.prototype=new r.Button,r._close=function(t,e,n){var o,a,i=n.openTags;if(i)for(;0<i.length;)o=n.getButton(i[i.length-1]),a=document.getElementById(n.name+"_"+o.id),t?o.callback.call(o,a,e,n):o.closeTag(a,n)},r.CloseButton.prototype.callback=r._close,r.closeAllTags=function(t){t=this.getInstance(t);t&&r._close("",t.canvas,t)},r.LinkButton=function(){var t={ariaLabel:quicktagsL10n.link};r.TagButton.call(this,"link","link","","</a>","","","",t)},r.LinkButton.prototype=new r.TagButton,r.LinkButton.prototype.callback=function(t,e,n,o){"undefined"!=typeof wpLink?wpLink.open(n.id):(o=o||"http://",!1===this.isOpen(n)?(o=prompt(quicktagsL10n.enterURL,o))&&(this.tagStart='<a href="'+o+'">',r.TagButton.prototype.callback.call(this,t,e,n)):r.TagButton.prototype.callback.call(this,t,e,n))},r.ImgButton=function(){var t={ariaLabel:quicktagsL10n.image};r.TagButton.call(this,"img","img","","","","","",t)},r.ImgButton.prototype=new r.TagButton,r.ImgButton.prototype.callback=function(t,e,n,o){o=o||"http://";var a,o=prompt(quicktagsL10n.enterImageURL,o);o&&(a=prompt(quicktagsL10n.enterImageDescription,""),this.tagStart='<img src="'+o+'" alt="'+a+'" />',r.TagButton.prototype.callback.call(this,t,e,n))},r.DFWButton=function(){r.Button.call(this,"dfw","","f",quicktagsL10n.dfw)},r.DFWButton.prototype=new r.Button,r.DFWButton.prototype.callback=function(){var t;(t=window.wp)&&t.editor&&t.editor.dfw&&window.wp.editor.dfw.toggle()},r.TextDirectionButton=function(){r.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)},r.TextDirectionButton.prototype=new r.Button,r.TextDirectionButton.prototype.callback=function(t,e){var n="rtl"===document.getElementsByTagName("html")[0].dir,o=(o=e.style.direction)||(n?"rtl":"ltr");e.style.direction="rtl"===o?"ltr":"rtl",e.focus()},edButtons[10]=new r.TagButton("strong","b","<strong>","</strong>","","","",{ariaLabel:quicktagsL10n.strong,ariaLabelClose:quicktagsL10n.strongClose}),edButtons[20]=new r.TagButton("em","i","<em>","</em>","","","",{ariaLabel:quicktagsL10n.em,ariaLabelClose:quicktagsL10n.emClose}),edButtons[30]=new r.LinkButton,edButtons[40]=new r.TagButton("block","b-quote","\n\n<blockquote>","</blockquote>\n\n","","","",{ariaLabel:quicktagsL10n.blockquote,ariaLabelClose:quicktagsL10n.blockquoteClose}),edButtons[50]=new r.TagButton("del","del",'<del datetime="'+e+'">',"</del>","","","",{ariaLabel:quicktagsL10n.del,ariaLabelClose:quicktagsL10n.delClose}),edButtons[60]=new r.TagButton("ins","ins",'<ins datetime="'+e+'">',"</ins>","","","",{ariaLabel:quicktagsL10n.ins,ariaLabelClose:quicktagsL10n.insClose}),edButtons[70]=new r.ImgButton,edButtons[80]=new r.TagButton("ul","ul","<ul>\n","</ul>\n\n","","","",{ariaLabel:quicktagsL10n.ul,ariaLabelClose:quicktagsL10n.ulClose}),edButtons[90]=new r.TagButton("ol","ol","<ol>\n","</ol>\n\n","","","",{ariaLabel:quicktagsL10n.ol,ariaLabelClose:quicktagsL10n.olClose}),edButtons[100]=new r.TagButton("li","li","\t<li>","</li>\n","","","",{ariaLabel:quicktagsL10n.li,ariaLabelClose:quicktagsL10n.liClose}),edButtons[110]=new r.TagButton("code","code","<code>","</code>","","","",{ariaLabel:quicktagsL10n.code,ariaLabelClose:quicktagsL10n.codeClose}),edButtons[120]=new r.TagButton("more","more","\x3c!--more--\x3e\n\n","","","","",{ariaLabel:quicktagsL10n.more}),edButtons[140]=new r.CloseButton}(),window.quicktags=function(t){return new window.QTags(t)},window.edInsertContent=function(t,e){return window.QTags.insertContent(e)},window.edButton=function(t,e,n,o,a){return window.QTags.addButton(t,e,n,o,a,"",-1)};; 997for(const block in convertkit_quicktags){convertKitQuickTagRegister(convertkit_quicktags[block])} 998function convertKitQuickTagRegister(block){QTags.addButton('convertkit-'+block.name,block.title,function(){fetch(convertkit_admin_tinymce.ajaxurl+'/'+block.name+'/'+'quicktags',{method:'GET',headers:{'X-WP-Nonce':convertkit_admin_tinymce.nonce,},}).then(function(response){return response.json()}).then(function(result){convertKitQuickTagsModal.open();const quicktagsModal=document.querySelector('div.convertkit-quicktags-modal div.media-modal.wp-core-ui'),quicktagsModalHeader=quicktagsModal.querySelector('div.media-frame-title'),quicktagsModalFooter=quicktagsModal.querySelector('div.media-frame-toolbar div.media-toolbar');quicktagsModal.style.width=block.modal.width+'px';quicktagsModal.style.height=block.modal.height+quicktagsModalHeader.offsetHeight+quicktagsModalFooter.offsetHeight+'px';document.querySelector('#convertkit-quicktags-modal .media-frame-title h1').textContent=block.title;document.querySelector('#convertkit-quicktags-modal .media-frame-content').innerHTML=result;
998convertKitTabsInit();convertKitColorInputInit();convertKitConditionallyDisplayTinyMCEModalFields();convertKitConditionalFieldsInit();convertKitRefreshResourcesInitEventListeners()}).catch(function(error){console.error(error)})})};
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.