1jQuery( document ).ready( function( $ ) { 2 var hash = document.location.hash; 3 if( $(".wp-block-getwid-table table").length > 0 ){ 4 $(".wp-block-getwid-table table").addClass('table table-bordered'); 5 } 6 7 if ($(".mim-tabs-nav").length > 0) { 8 const $nav = $(".mim-tabs-nav"); 9 10 // Trigger first tab on load 11 $nav.find("li").eq(0).find("a").trigger("click"); 12 13 function getTopOffset() { 14 // Adjust for admin bar if present 15 let offset = $("#wpadminbar").length ? 92 : 60; 16 if (window.matchMedia("(max-width: 767px)").matches) { 17 offset = 0; 18 } 19 return offset; 20 } 21 22 // Animate scroll when tab is clicked 23 $('a[data-toggle="tab"]').on("shown.bs.tab", function () { 24 const navOffset = $nav.offset().top; 25 $("html, body").animate( 26 { scrollTop: navOffset - getTopOffset() }, 27 300 28 ); 29 }); 30 31 // Ensure sticky nav width matches parent on resize 32 function adjustNavWidth() { 33 $nav.css("width", $nav.parent().width()); 34 } 35 36 $(window).on("resize", adjustNavWidth); 37 adjustNavWidth(); 38 39 // Optional: adjust top dynamically (if admin bar appears/disappears) 40 function adjustNavTop() { 41 $nav.css("top", getTopOffset()); 42 } 43 $(window).on("resize scroll load", adjustNavTop); 44 adjustNavTop(); 45 } 46 47 48 if (hash) { 49 if( $(hash).length > 0 ){ 50 $(hash).click(); 51 } 52 } 53 54 $(document).on("click", ".open-tab", function (e) { 55 e.preventDefault(); 56 57 const target = $(this).data("target"); // e.g. "#profile-tab" 58 59 // Find the matching nav link inside the tab nav 60 const $link = $('.mim-tabs-nav a[id="' + target + '"]'); 61 62 if ($link.length) { 63 $link.tab("show"); // Bootstrap tab API 64 } 65 }); 66 67 if (typeof Swiper !== "undefined") { 68 document.querySelectorAll(".unique-features-slider").forEach((block) => { 69 const swiper = new Swiper('.mySwiper', { 70 loop: false, 71 spaceBetween: 10, 72 centeredSlides: false, 73 navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev' }, 74 pagination: { el: '.swiper-pagination', clickable: true }, 75 }); 76 77 // Feature list interactions 78 const featureItems = Array.from(document.querySelectorAll('.feature-item')); 79 const toggleBtns = Array.from(document.querySelectorAll('.toggle-btn')); 80 81 function setActive(index, opts = {}){ 82 featureItems.forEach((it,i)=>{ 83 it.removeAttribute('aria-current'); 84 it.classList.remove('ring-1','ring-red-200'); 85 const panel = it.querySelector('.panel'); 86 if(i===index){ 87 it.setAttribute('aria-current','true'); 88 it.classList.add('ring-1','ring-red-200'); 89 if(opts.open) { panel.classList.add('active'); it.querySelector('.toggle-btn').setAttribute('aria-expanded','true'); } 90 } else { 91 panel.classList.remove('active'); 92 it.querySelector('.toggle-btn').setAttribute('aria-expanded','false'); 93 } 94 }); 95 // Move slider 96 swiper.slideTo(index); 97 } 98 99 // Click a feature to activate 100 featureItems.forEach((it, idx) => { 101 it.addEventListener('click', (e)=>{ 102 // if actual toggle button clicked, handle separately 103 const btn = e.target.closest('.toggle-btn'); 104 if(btn){ 105 const panel = it.querySelector('.panel'); 106 const isOpen = panel.classList.contains('active'); 107 if(isOpen){ panel.classList.remove('active'); btn.setAttribute('aria-expanded','false'); } 108 else { panel.classList.add('active'); btn.setAttribute('aria-expanded','true'); } 109 // keep selection active 110 setActive(idx, {open: panel.classList.contains('active')}); 111 return; 112 } 113 // otherwise select and open short description (do not expand panel) 114 setActive(idx, {open: false}); 115 }); 116 }); 117 118 // Sync swiper -> highlight when slide changes 119 swiper.on('slideChange', function(){ 120 setActive(swiper.activeIndex, {open:false}); 121 }); 122 123 // Initialize: ensure first panel closed but item active 124 setActive(0, {open:false}); 125 126 }); 127 } 128}); 129 130if( jQuery(".mim-justified-gallery").length > 0 ){ 131 jQuery(".mim-justified-gallery").justifiedGallery({ 132 rowHeight : 160, 133 border : 0, 134 selector : 'figure, div:not(.spinner)', 135 lastRow : 'justify', 136 margins : 1 137 }); 138} 139 140if( jQuery(".wp-block-mimaki-blocks-printer-specs").length > 0 ){ 141 jQuery(".wp-block-mimaki-blocks-printer-specs").eq(0).css({border: 0}); 142} 143if( jQuery("#mim-popup-modal").length > 0 ){ 144 jQuery("#mim-popup-modal").insertAfter('#primary'); 145} 146if( jQuery("#mimaki-accordion").length > 0 ){ 147 jQuery(".wpdm-pro").parent().find('h5').css({'margin' : '0 10%'}); 148} 149if( jQuery(".wp-block-table").length > 0 ){ 150 jQuery(".wp-block-table table").addClass('table table-bordered '); 151} 152/* 153$('#mimaki-accordion').on('hidden.bs.collapse', function () {
154 // do something⦠155})*/ 156 157var prevButton = '<a class="carousel-control-prev" role="button" href="#" aria-label="Previous"><span class="carousel-control-prev-icon" aria-hidden="true"></span></a>'; 158var nextButton = '<a class="carousel-control-next" href="#" role="button" aria-label="Next"><span class="carousel-control-next-icon" aria-hidden="true"></span></a>'; 159if( jQuery("#primary .wp-block-mimaki-blocks-manual-slider").length > 0 ){ 160 jQuery('.wp-block-mimaki-blocks-manual-slider').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 161 //console.log(currentSlide); 162 if( jQuery(".wp-block-mimaki-blocks-unique-features").length > 0 ){ 163 jQuery(".ufb__feature-holder").removeClass('active-feature'); 164 jQuery(".ufb__feature-holder").eq(nextSlide).addClass('active-feature'); 165 } 166 167 }); 168 jQuery('.wp-block-mimaki-blocks-manual-slider').slick({ 169 dots: true, 170 infinite: true, 171 autoplay: true, 172 autoplaySpeed: 4000, 173 dotsClass: 'slick-dots', 174 arrows: false, 175 speed: 300, 176 slidesToShow: 1, 177 slidesToScroll: 1, 178 prevArrow: prevButton, 179 nextArrow: nextButton, 180 responsive: [ 181 { 182 breakpoint: 1024, 183 settings: { 184 dots: true 185 } 186 }, 187 { 188 breakpoint: 600, 189 settings: { 190 dots: false, 191 arrows: true, 192 } 193 }, 194 { 195 breakpoint: 480, 196 settings: { 197 dots: false, 198 arrows: true, 199 } 200 } 201 ] 202 }); 203} 204if( jQuery(".glider").length > 0 ){ 205 jQuery('.glider').slick({ 206 accessibility: false, 207 dots: true, 208 infinite: true, 209 autoplay: true, 210 autoplaySpeed: 4000, 211 dotsClass: 'slick-dots', 212 arrows: false, 213 speed: 300, 214 slidesToShow: 1, 215 slidesToScroll: 1, 216 prevArrow: prevButton, 217 nextArrow: nextButton, 218 responsive: [ 219 { 220 breakpoint: 1024, 221 settings: { 222 dots: true 223 } 224 }, 225 { 226 breakpoint: 600, 227 settings: { 228 dots: false, 229 arrows: true, 230 } 231 }, 232 { 233 breakpoint: 480, 234 settings: { 235 dots: false, 236 arrows: true, 237 } 238 } 239 ] 240 }); 241} 242if( jQuery("#primary .wp-block-mimaki-blocks-testimonial-slider").length > 0 ){ 243 jQuery('.wp-block-mimaki-blocks-testimonial-slider').slick({ 244 dots: true, 245 infinite: true, 246 autoplay: true, 247 autoplaySpeed: 6000, 248 dotsClass: 'slick-dots carousel-indicators', 249 arrows: false, 250 speed: 300, 251 slidesToShow: 1, 252 slidesToScroll: 1, 253 prevArrow: prevButton, 254 nextArrow: nextButton, 255 responsive: [ 256 { 257 breakpoint: 1024, 258 settings: { 259 dots: true 260 } 261 }, 262 { 263 breakpoint: 600, 264 settings: { 265 dots: false, 266 arrows: true, 267 } 268 }, 269 { 270 breakpoint: 480, 271 settings: { 272 dots: false, 273 arrows: true, 274 } 275 } 276 ] 277 }); 278} 279jQuery(".slideshow-video").on('click', function(e){ 280 e.preventDefault(); 281 var video_id = jQuery(this).attr('video-id'); 282 var video_frame = jQuery('<iframe>', { src: 'https://www.youtube-nocookie.com/embed/' + video_id + '?autoplay=1', allow: 'autoplay,fullscreen', allowfullscreen: 'allowfullscreen', frameborder: 0, scrolling: 'no', id: 'slideshow-video' }); 283 jQuery('#mimaki-slider-modal .modal-body').html(video_frame); 284 jQuery("#mimaki-slider-modal").modal("show"); 285}); 286 287jQuery("#mimaki-slider-modal").on("hide.bs.modal",function(){ 288 jQuery('#mimaki-slider-modal .modal-body').html(''); 289}); 290 291jQuery(".wp-blocks-header-section .mplp-vid-btn, .image-section .play-btn, .mpc-media .play-btn").on('click', function(e){ 292 e.preventDefault(); 293 var video_id = jQuery(this).attr('video-id'); 294 var video_frame = jQuery('<iframe>', { src: 'https://www.youtube-nocookie.com/embed/' + video_id + '?autoplay=1&autohide=1&fs=1&rel=0&hd=1&wmode=transparent&enablejsapi=1&html5=1', allowfullscreen: 'allowfullscreen', allow: 'autoplay,fullscreen', frameborder: 0, scrolling: 'no', id: 'product-video' }); 295 jQuery('#landing-vid .modal-body').html(video_frame); 296 //jQuery("#product-video", window.parent.document).height(document.body.scrollHeight); 297 jQuery("#product-video", window.parent.document).height(window.innerHeight - 200); 298 jQuery("#landing-vid").modal("show"); 299}); 300 301jQuery("#landing-vid").on("hide.bs.modal",function(){ 302 jQuery('#landing-vid .modal-body').html(''); 303}); 304 305jQuery(".uf-show-btn").on('click', function(e){ 306 e.preventDefault(); 307 var showElement = jQuery(this).attr('href');
308 if( jQuery( showElement ).hasClass( "hidden-sm-down" ) ){ 309 jQuery( showElement ).removeClass( "hidden-sm-down" ); 310 jQuery( this ).find('.show-more').hide(); 311 jQuery( this ).find('.show-less').show(); 312 }else{ 313 jQuery( showElement ).addClass( "hidden-sm-down" ); 314 jQuery( this ).find('.show-more').show(); 315 jQuery( this ).find('.show-less').hide(); 316 } 317 318 jQuery('html, body').animate({ 319 scrollTop: jQuery(showElement).offset().top - 90 320 }, 800, function(){ 321 }); 322}); 323 324 325document.addEventListener("DOMContentLoaded", function () { 326 const sections = Array.from( 327 document.querySelectorAll("div.mim-container, div.wp-block-mimaki-blocks-media-plus-container, div.wp-block-ugb-container") 328 ).filter(div => div.id && div.id.trim() !== ""); 329 330 const dots = document.querySelectorAll(".quicknav li"); 331 const label = document.getElementById("quicknav-label"); 332 const dropdown = document.getElementById("quicknav-dropdown"); 333 const quicknav = document.getElementById("quicknav"); 334 const toggleButton = document.getElementById("quicknav-toggle"); 335 336 let lastScrollTop = 0; 337 let isQuicknavVisible = true; 338 339 function updateActiveDot() { 340 let scrollPosition = window.scrollY; 341 let targetTitle = ""; 342 343 sections.forEach((section, index) => { 344 const sectionTop = section.offsetTop - 50; 345 const sectionBottom = sectionTop + section.offsetHeight; 346 347 if (scrollPosition >= sectionTop && scrollPosition < sectionBottom) { 348 dots.forEach((dot) => dot.classList.remove("active")); 349 targetTitle = dots[index].getAttribute("data-title"); 350 label.textContent = targetTitle; 351 label.style.display = "block"; 352 label.style.top = dots[index].offsetTop + "px"; 353 dots[index].classList.add("active"); 354 } 355 }); 356 } 357 358 function handleScroll() { 359 const currentScroll = window.scrollY; 360 const dropdownBottom = dropdown.getBoundingClientRect().bottom; 361 const isMobile = window.innerWidth < 1024; // Mobile breakpoint 362 363 if (isMobile) { 364 if (currentScroll > lastScrollTop) { 365 // Scrolling Down - Hide Quicknav on Mobile 366 quicknav.classList.add("d-none"); 367 isQuicknavVisible = false; 368 } else if (currentScroll < lastScrollTop && dropdownBottom <= 0) { 369 // Scrolling Up - Show Quicknav on Mobile 370 quicknav.classList.remove("d-none"); 371 isQuicknavVisible = true; 372 } 373 } else { 374 // Ensure Quicknav is always visible on Desktop 375 quicknav.classList.remove("d-none"); 376 } 377 378 lastScrollTop = currentScroll <= 0 ? 0 : currentScroll; 379 updateActiveDot(); 380 } 381 382 function scrollToSection(e) { 383 const targetId = e.target.getAttribute("data-target"); 384 const targetSection = document.getElementById(targetId); 385 386 if (targetSection) { 387 window.scrollTo({ 388 top: targetSection.offsetTop - 50, 389 behavior: "smooth", 390 }); 391 } 392 } 393 394 function toggleQuicknav() { 395 if (isQuicknavVisible) { 396 quicknav.classList.add("d-none"); 397 } else { 398 quicknav.classList.remove("d-none"); 399 } 400 isQuicknavVisible = !isQuicknavVisible; 401 } 402 403 function showTooltip(e) { 404 const title = e.target.getAttribute("data-title"); 405 if (title) { 406 label.textContent = title; 407 label.style.display = "block"; 408 label.style.top = e.target.offsetTop + "px"; 409 } 410 } 411 412 function hideTooltip() { 413 label.style.display = "none"; 414 } 415 416 if(toggleButton){ 417 dots.forEach((dot) => { 418 dot.addEventListener("click", scrollToSection); 419 dot.addEventListener("mouseenter", showTooltip); // Show title on hover 420 dot.addEventListener("mouseleave", hideTooltip); // Hide title when not hovering 421 }); 422 423 window.addEventListener("scroll", handleScroll); 424 toggleButton.addEventListener("click", toggleQuicknav); 425 426 updateActiveDot(); 427 } 428 429}); 430 431 432 433 434jQuery(window).load(function() { 435 if( jQuery(".site-main .mimaki-isotope-gallery, .page-template .mimaki-isotope-gallery").length > 0 ){ 436 var $grid = jQuery('.mimaki-isotope-gallery').isotope({ 437 itemSelector: '.mim-gallery-item', 438 filter: '.mimaki-main-category', 439 percentPosition: true, 440 layoutMode: 'packery' 441 }); 442 jQuery('.mimaki-isotope-gallery').show(); 443 jQuery('.filter-button-group').on( 'click', 'button', function() { 444 var filterValue = jQuery(this).attr('data-filter'); 445 $grid.isotope({ filter: filterValue }); 446 }); 447 jQuery(".mim-gallery-item").on({ 448 mouseenter: function () { 449 var caption = jQuery(this).find('.mim-gallery-item__caption'); 450 var category = jQuery(this).attr('data-group'); 451 var description = jQuery(this).find('.mim-gallery-item__description'); 452 var titleHolder = description.find('.item__title'); 453 titleHolder.html(caption.html()); 454 //caption.appendTo(titleHolder); 455 if( description.html() ){ 456 description.show(); 457 caption.hide(); 458 } 459 460 if( category ){ 461 var filterSelect = jQuery('button[data-filter=".'+ category +'"]'); 462 filterSelect.trigger('click'); 463 } 464 }, 465 mouseleave: function () { 466 var caption = jQuery(this).find('.mim-gallery-item__caption'); 467 var description = jQuery(this).find('.mim-gallery-item__description'); 468 var titleHolder = description.find('.item__title'); 469 var category = '.mimaki-main-category'; 470 caption.show(); 471 //caption.insertBefore(description); 472 description.hide(); 473 if( category ){ 474 var filterSelect = jQuery('button[data-filter=".mimaki-main-category"]'); 475 filterSelect.trigger('click'); 476 } 477 478 } 479 }); 480 jQuery('.mim-gallery-item').on('touchstart', function (e) { 481 'use strict'; 482 jQuery('.mim-gallery-item__description').hide(); 483 jQuery(this).find('.mim-gallery-item__description').show(); 484 }); 485 } 486 487 //usp-hover-link 488 if( jQuery(".usp-hover-link").length > 0 ){ 489 jQuery(".usp-hover-link").on('click', function(e){ 490 e.preventDefault(); 491 var position = jQuery(this).parent().parent().position(); 492 var height = jQuery(this).outerHeight( true ); 493 var setTop = position.top + height + 90; 494 var topPosition = '-' + setTop + 'px'; 495 jQuery('.ufb__features-hoverbox').hide(); 496 jQuery(this).parent().find('.ufb__features-hoverbox').show(); 497 }); 498 jQuery(".hoverbox-close").on('click', function(e){ 499 e.preventDefault(); 500 jQuery(this).parent().hide(); 501 }); 502 } 503 504 jQuery("body").on('click','.is-root-container .mim-tab-link', function(e){ 505 e.preventDefault(); 506 var tabId = jQuery(this).attr('data-tab'); 507 jQuery(".is-root-container .mim-tab-link").removeClass('active-tab-link'); 508 jQuery(this).addClass('active-tab-link'); 509 jQuery(".is-root-container .mim-tab").removeClass('mim-tab-active'); 510 jQuery(".is-root-container .mim-tab").eq(tabId).addClass('mim-tab-active'); 511 var parentTab = jQuery('.mim-tab.mim-tab-active').parent(); 512 var parentTabId = '#' + parentTab.attr('id'); 513 514 document.querySelector(parentTabId).click(); 515 document.querySelector(parentTabId).focus(); 516 }); 517 if( jQuery(".is-root-container .mim-tab-link").length > 0 ){ 518 jQuery(".is-root-container .mim-tab-link").eq(0).addClass('active-tab-link'); 519 jQuery(".is-root-container .mim-tab").eq(0).addClass('mim-tab-active'); 520 var childTab = jQuery('.mim-tab.mim-tab-active'); 521 var parentTab = childTab.parent(); 522 var parentTabId = '#' + parentTab.attr('id'); 523 document.querySelector(parentTabId).click(); 524 document.querySelector(parentTabId).focus(); 525 526 jQuery("body").on('click',".block-editor-block-mover-button", function(e){ 527 jQuery(".is-root-container .mim-tab-link").removeClass('active-tab-link'); 528 }); 529 } 530});
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.