"use strict";(()=>{(self.webpackChunkFalcon_theme=self.webpackChunkFalcon_theme||[]).push([[376],{376:(M,k,c)=>{c.r(k),c.d(k,{default:()=>U});var m=c(7628),h=c(9482);function U({swiper:e,extendParams:V,on:g,emit:N}){const i=(0,m.Me)(),E=(0,m.Jj)();e.keyboard={enabled:!1},V({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}});function D(O){if(!e.enabled)return;const{rtlTranslate:r}=e;let t=O;t.originalEvent&&(t=t.originalEvent);const a=t.keyCode||t.charCode,_=e.params.keyboard.pageUpDown,l=_&&a===33,o=_&&a===34,f=a===37,s=a===39,u=a===38,b=a===40;if(!e.allowSlideNext&&(e.isHorizontal()&&s||e.isVertical()&&b||o)||!e.allowSlidePrev&&(e.isHorizontal()&&f||e.isVertical()&&u||l))return!1;if(!(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)&&!(i.activeElement&&i.activeElement.nodeName&&(i.activeElement.nodeName.toLowerCase()==="input"||i.activeElement.nodeName.toLowerCase()==="textarea"))){if(e.params.keyboard.onlyInViewport&&(l||o||f||s||u||b)){let H=!1;if((0,h.pZ)(e.el,`.${e.params.slideClass}, swiper-slide`).length>0&&(0,h.pZ)(e.el,`.${e.params.slideActiveClass}`).length===0)return;const y=e.el,L=y.clientWidth,A=y.clientHeight,W=E.innerWidth,p=E.innerHeight,n=(0,h.hH)(y);r&&(n.left-=y.scrollLeft);const K=[[n.left,n.top],[n.left+L,n.top],[n.left,n.top+A],[n.left+L,n.top+A]];for(let v=0;v<K.length;v+=1){const d=K[v];if(d[0]>=0&&d[0]<=W&&d[1]>=0&&d[1]<=p){if(d[0]===0&&d[1]===0)continue;H=!0}}if(!H)return}e.isHorizontal()?((l||o||f||s)&&(t.preventDefault?t.preventDefault():t.returnValue=!1),((o||s)&&!r||(l||f)&&r)&&e.slideNext(),((l||f)&&!r||(o||s)&&r)&&e.slidePrev()):((l||o||u||b)&&(t.preventDefault?t.preventDefault():t.returnValue=!1),(o||b)&&e.slideNext(),(l||u)&&e.slidePrev()),N("keyPress",a)}}function C(){e.keyboard.enabled||(i.addEventListener("keydown",D),e.keyboard.enabled=!0)}function P(){e.keyboard.enabled&&(i.removeEventListener("keydown",D),e.keyboard.enabled=!1)}g("init",()=>{e.params.keyboard.enabled&&C()}),g("destroy",()=>{e.keyboard.enabled&&P()}),Object.assign(e.keyboard,{enable:C,disable:P})}}}]);})();
