(function(){"use strict";var e={970:function(e,t,a){var n=a(9242),r=a(3396);function o(e,t,a,n,o,i){const s=(0,r.up)("AppHeader"),c=(0,r.up)("router-view"),l=(0,r.up)("AppFooter");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r.Wm)(s),(0,r.Wm)(c),(0,r.Wm)(l)],64)}const i={class:"header"},s={class:"header-wrapper container"},c=(0,r._)("div",{class:"logo-wrapper"},[(0,r._)("span",{class:"logo-wrapper__logo",translate:"no"},"Wavelovers")],-1),l={class:"menu-wrapper"},d={class:"navigation"},u={class:"navigation__item"},v=(0,r.Uk)("Home"),m={class:"navigation__item"},p=(0,r.Uk)("FAQ"),h={class:"navigation__item"},g=(0,r.Uk)("About"),f={class:"navigation__item"},b=(0,r.Uk)("Donate");function w(e,t,a,n,o,w){const y=(0,r.up)("router-link");return(0,r.wg)(),(0,r.iD)("header",i,[(0,r._)("div",s,[c,(0,r._)("nav",l,[(0,r._)("ul",d,[(0,r._)("li",u,[(0,r.Wm)(y,{to:"/",class:"navigation__link"},{default:(0,r.w5)((()=>[v])),_:1})]),(0,r._)("li",m,[(0,r.Wm)(y,{to:"/faq",class:"navigation__link"},{default:(0,r.w5)((()=>[p])),_:1})]),(0,r._)("li",h,[(0,r.Wm)(y,{to:"/about",class:"navigation__link"},{default:(0,r.w5)((()=>[g])),_:1})]),(0,r._)("li",f,[(0,r.Wm)(y,{to:"/donate",class:"navigation__link"},{default:(0,r.w5)((()=>[b])),_:1})])])])])])}var y=(0,r.aZ)({name:"AppHeader"}),W=a(89);const _=(0,W.Z)(y,[["render",w]]);var k=_;const A={class:"footer"},V=(0,r.uE)('',1),T=[V];function P(e,t,a,n,o,i){return(0,r.wg)(),(0,r.iD)("footer",A,T)}var G=(0,r.aZ)({name:"AppFooter"});const C=(0,W.Z)(G,[["render",P]]);var E=C,j=(0,r.aZ)({name:"App",components:{AppHeader:k,AppFooter:E}});const Z=(0,W.Z)(j,[["render",o]]);var x=Z,D=a(2483);const M={class:"page container"},L=(0,r._)("h1",{class:"visually-hidden"},"Wavelovers",-1);function O(e,t,a,n,o,i){const s=(0,r.up)("WaveloversApp");return(0,r.wg)(),(0,r.iD)("main",M,[L,(0,r.Wm)(s)])}const S={class:"wavelovers"},F=(0,r.Uk)("Loading..."),q=(0,r.Uk)("Press any gamepad's button or connect new gamepad.");function I(e,t,a,n,o,i){const s=(0,r.up)("PatternList"),c=(0,r.up)("MessageItem"),l=(0,r.up)("GamepadList");return(0,r.wg)(),(0,r.iD)("div",S,[e.patterns.length>0?((0,r.wg)(),(0,r.j4)(s,{key:0,patterns:e.patterns,mode:e.mode,isActive:e.isActive,onChange:e.change},null,8,["patterns","mode","isActive","onChange"])):((0,r.wg)(),(0,r.j4)(c,{key:1},{default:(0,r.w5)((()=>[F])),_:1})),e.gamepads.length>0?((0,r.wg)(),(0,r.j4)(l,{key:2,gamepads:e.gamepads},null,8,["gamepads"])):((0,r.wg)(),(0,r.j4)(c,{key:3},{default:(0,r.w5)((()=>[q])),_:1}))])}const N={class:"pattern-list"};function U(e,t,a,n,o,i){const s=(0,r.up)("PatternItem");return(0,r.wg)(),(0,r.iD)("div",N,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.patterns,((t,a)=>((0,r.wg)(),(0,r.j4)(s,{key:t.name,pattern:t,index:a,mode:e.mode,isActive:e.isActive,onChange:e.change},null,8,["pattern","index","mode","isActive","onChange"])))),128))])}var H=a(7139);const z=["textContent"],B=["textContent"];function Q(e,t,a,n,o,i){return(0,r.wg)(),(0,r.iD)("div",{onClick:t[0]||(t[0]=t=>e.change(e.index)),class:(0,H.C_)(["pattern-item",e.index===e.mode&&!0===e.isActive?"pattern-item_selected":""])},[(0,r._)("span",{class:"pattern-item__icon",textContent:(0,H.zw)(e.pattern.icon)},null,8,z),(0,r._)("span",{class:"pattern-item__name",textContent:(0,H.zw)(e.pattern.name)},null,8,B)],2)}var R=(0,r.aZ)({name:"PatternItem",props:{pattern:{type:Object},index:{type:Number},mode:{type:Number},isActive:{type:Boolean}},methods:{change(e){this.$emit("change",e)}}});const K=(0,W.Z)(R,[["render",Q]]);var Y=K,$=(0,r.aZ)({name:"PatternList",props:{patterns:{type:Array},mode:{type:Number},isActive:{type:Boolean}},components:{PatternItem:Y},methods:{change(e){this.$emit("change",e)}}});const J=(0,W.Z)($,[["render",U]]);var X=J;const ee={class:"device-list"};function te(e,t,a,n,o,i){const s=(0,r.up)("GamepadItem");return(0,r.wg)(),(0,r.iD)("div",ee,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.gamepads,(e=>((0,r.wg)(),(0,r.j4)(s,{key:e.id,textContent:(0,H.zw)(e.unit.id)},null,8,["textContent"])))),128))])}const ae={class:"list-item"};function ne(e,t,a,n,o,i){return(0,r.wg)(),(0,r.iD)("div",ae)}var re=(0,r.aZ)({name:"GamepadItem"});const oe=(0,W.Z)(re,[["render",ne]]);var ie=oe,se=(0,r.aZ)({name:"GamepadList",props:{gamepads:{type:Array}},components:{GamepadItem:ie}});const ce=(0,W.Z)(se,[["render",te]]);var le=ce;const de={class:"message"};function ue(e,t,a,n,o,i){return(0,r.wg)(),(0,r.iD)("div",de,[(0,r._)("span",null,[(0,r.WI)(e.$slots,"default")])])}var ve=(0,r.aZ)({name:"MessageItem"});const me=(0,W.Z)(ve,[["render",ue]]);var pe=me,he=a(2482);class ge{constructor(e){(0,he.Z)(this,"id",void 0),(0,he.Z)(this,"canVibrate",void 0),(0,he.Z)(this,"isVibrating",void 0),(0,he.Z)(this,"unit",void 0),(0,he.Z)(this,"pattern",void 0),this.unit=e,this.id=Date.now(),this.canVibrate=!!this.unit.vibrationActuator,this.isVibrating=!1,this.pattern=[]}update(){const e=navigator.getGamepads();this.unit=e[this.unit.index]}reset(){this.isVibrating=!1,this.unit.vibrationActuator.reset()}async vibrate(e){this.isVibrating=!0,this.pattern=e;while(!0===this.isVibrating)for(let e=0;esetTimeout(t,e)))}}var fe=(0,r.aZ)({name:"WaveloversApp",components:{PatternList:X,GamepadList:le,MessageItem:pe},data:()=>({gamepads:[],patterns:[],isActive:!1,mode:0}),methods:{loadPatterns:async function(){const e="https://wavelovers.ru/assets/patterns.json";try{const t=await fetch(e);if(t.ok){let e=await t.json();this.patterns=e}else console.log("Connect to the Internet for download more patterns...")}catch(t){console.log(t)}},addEventListeners(){window.addEventListener("gamepadconnected",(e=>this.addGamepad(e))),window.addEventListener("gamepaddisconnected",(e=>this.deleteGamepad(e)))},addGamepad(e){const t=e;this.gamepads.length>=1||this.gamepads.push(new ge(t.gamepad))},deleteGamepad(e){this.gamepads.forEach(((t,a)=>{t.unit.id===e.gamepad.id&&this.gamepads.splice(a,1)}))},change(e){this.mode===e?(this.isActive=!this.isActive,this.reset()):(this.isActive=!0,this.mode=e),!0===this.isActive&&(this.reset(),this.vibrate())},vibrate(){this.gamepads.forEach((e=>{e.vibrate(this.patterns[this.mode].pattern)}))},reset(){this.gamepads.forEach((e=>{e.reset()}))}},mounted(){this.loadPatterns(),this.addEventListeners()}});const be=(0,W.Z)(fe,[["render",I]]);var we=be,ye=(0,r.aZ)({name:"HomeView",components:{WaveloversApp:we}});const We=(0,W.Z)(ye,[["render",O]]);var _e=We;function ke(e,t){e.map((e=>{const a=document.createElement(t);return Object.keys(e).forEach((t=>{a.setAttribute(t,e[t])})),a.setAttribute("data-vue-router-controlled",""),a})).forEach((e=>document.head.appendChild(e)))}function Ae(e,t,a){const n=e.matched.slice().reverse().find((e=>e.meta&&e.meta.title)),r=e.matched.slice().reverse().find((e=>e.meta&&e.meta.metaTags&&e.meta.linkTags));if(n&&(document.title=n.meta.title),Array.from(document.querySelectorAll("[data-vue-router-controlled]")).map((e=>{e.parentNode&&e.parentNode.removeChild(e)})),!r)return a();const o=r.meta.linkTags,i=r.meta.metaTags;return ke(o,"link"),ke(i,"meta"),a()}const Ve={update:Ae};var Te=Ve;const Pe=[{path:"/",name:"home",component:_e,meta:{title:"Wavelovers",metaTags:[{name:"description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона"},{name:"og:title",content:"Wavelovers"},{name:"og:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:url",content:"https://wavelovers.ru/"},{name:"twitter:title",content:"Wavelovers"},{name:"twitter:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."}],linkTags:[{name:"canonical",href:"https://wavelovers.ru/"}]}},{path:"/about",name:"about",component:()=>a.e(548).then(a.bind(a,2548)),meta:{title:"Wavelovers – About",metaTags:[{name:"description",content:"Wavelovers. Page with information about the project and data on donations."},{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, advertise, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона, реклама"},{name:"og:title",content:"Wavelovers – About"},{name:"og:description",content:"Wavelovers. Page with information about the project and data on donations."},{name:"og:url",content:"https://wavelovers.ru/about"},{name:"twitter:title",content:"Wavelovers – About"},{name:"twitter:description",content:"Wavelovers. Page with information about the project and data on donations."}],linkTags:[{name:"canonical",href:"https://wavelovers.ru/about"}]}},{path:"/faq",name:"faq",component:()=>a.e(877).then(a.bind(a,877)),meta:{title:"Wavelovers – FAQ",metaTags:[{name:"description",content:"Wavelovers. Frequently asked questions page."},{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, FAQ, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона, часто задаваемые вопросы"},{name:"og:title",content:"Wavelovers – FAQ"},{name:"og:description",content:"Wavelovers. Frequently asked questions page."},{name:"og:url",content:"https://wavelovers.ru/faq"},{name:"twitter:title",content:"Wavelovers – FAQ"},{name:"twitter:description",content:"Wavelovers. Frequently asked questions page."}],linkTags:[{name:"canonical",href:"https://wavelovers.ru/faq"}]}},{path:"/donate",name:"donate",component:()=>a.e(93).then(a.bind(a,93)),meta:{title:"Wavelovers – Donate",metaTags:[{name:"description",content:"Wavelovers. Donate to the author."},{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, Donate, Support, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона, задонатить, пожертвовать, помочь, поблагодарить"},{name:"og:title",content:"Wavelovers – Donate"},{name:"og:description",content:"Wavelovers. Donate to the author."},{name:"og:url",content:"https://wavelovers.ru/donate"},{name:"twitter:title",content:"Wavelovers – Donate"},{name:"twitter:description",content:"Wavelovers. Donate to the author."}],linkTags:[{name:"canonical",href:"https://wavelovers.ru/donate"}]}},{path:"/404",name:"404",component:()=>a.e(447).then(a.bind(a,8447)),meta:{title:"Wavelovers – 404 Page not found",metaTags:[{name:"description",content:"Wavelovers. Page not found."},{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, 404, page not found, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона, 404, страница не найдена"},{name:"og:title",content:"Wavelovers – 404 Page not found"},{name:"og:description",content:"Wavelovers. Page not found."},{name:"og:url",content:"https://wavelovers.ru/404"},{name:"twitter:title",content:"Wavelovers – 404 Page not found"},{name:"twitter:description",content:"Wavelovers. Page not found."}],linkTags:[{name:"canonical",href:"https://wavelovers.ru/404"}]}},{path:"/:catchAll(.*)",redirect:"/404"}],Ge=(0,D.p7)({history:(0,D.PO)("/"),routes:Pe});Ge.beforeEach(Te.update);var Ce=Ge;(0,n.ri)(x).use(Ce).mount("#app")}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.m=e,function(){var e=[];a.O=function(t,n,r,o){if(!n){var i=1/0;for(d=0;d=o)&&Object.keys(a.O).every((function(e){return a.O[e](n[c])}))?n.splice(c--,1):(s=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))}}(),function(){a.u=function(e){return"js/"+e+"."+{93:"22832789",447:"cde26208",548:"8603e4a4",877:"a8dd8d41"}[e]+".js"}}(),function(){a.miniCssF=function(e){return"css/"+e+".c8608f84.css"}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="wavelovers:";a.l=function(n,r,o,i){if(e[n])e[n].push(r);else{var s,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),d=0;d