From b96967b41afb4c7293848be19a4061024132bdbc Mon Sep 17 00:00:00 2001 From: Dan McDougall Date: Sat, 19 Aug 2017 21:53:03 -0400 Subject: [PATCH] Rebuilt everything for version 1.1.15 --- dist/humaninput-1.1.14-full.min.js.gz | Bin 14969 -> 0 bytes ...1.14-full.js => humaninput-1.1.15-full.js} | 29 ++++++++++-------- ...l.min.js => humaninput-1.1.15-full.min.js} | 2 +- dist/humaninput-1.1.15-full.min.js.gz | Bin 0 -> 15001 bytes ...aninput-1.1.14.js => humaninput-1.1.15.js} | 4 +-- ...1.1.14.min.js => humaninput-1.1.15.min.js} | 2 +- ....min.js.gz => humaninput-1.1.15.min.js.gz} | Bin 8376 -> 8376 bytes dist/humaninput-full.min.js | 2 +- humaninput-latest.js | 2 +- humaninput-latest.min.js | 2 +- lib/gamepad.js | 25 ++++++++------- lib/humaninput.js | 2 +- 12 files changed, 38 insertions(+), 32 deletions(-) delete mode 100644 dist/humaninput-1.1.14-full.min.js.gz rename dist/{humaninput-1.1.14-full.js => humaninput-1.1.15-full.js} (99%) rename dist/{humaninput-1.1.14-full.min.js => humaninput-1.1.15-full.min.js} (66%) create mode 100644 dist/humaninput-1.1.15-full.min.js.gz rename dist/{humaninput-1.1.14.js => humaninput-1.1.15.js} (99%) rename dist/{humaninput-1.1.14.min.js => humaninput-1.1.15.min.js} (99%) rename dist/{humaninput-1.1.14.min.js.gz => humaninput-1.1.15.min.js.gz} (74%) diff --git a/dist/humaninput-1.1.14-full.min.js.gz b/dist/humaninput-1.1.14-full.min.js.gz deleted file mode 100644 index e97822e31c4d56e574b533b67a1f07f3361d6987..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14969 zcmV-UYI6YOT!*jlKAvFifS}as1MW`qzPl3Gq3ty;!G4)t*xg7B? zg)CJy9`Ds`WLoF^)ci!2j`5Jhf$Os+PWdtud^|S4QL;%-&0{#5!?^KtR(VEkiNO=EM@>vtz*YJ}F0%VG(=E;*93;!7;U!@zZWMwT%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*^I`xi$vi9`b>W>YHi}tjtk;G82!5yPV3Rc^~#Hunwlvu@?g2*V@*2ru` zncfUGNN_)18&= z#F?Es9+;n@BplSvphcCbHP&W`noq%wQP5z5Rh%bkZ<>|Y#-iBcHT@N0O~);mYnff+ z3wU03e>n|2H3@}8U=|SPHPh+tpt$`xUjTk;$y1ecO13-*$a@c5ygZpqcaZWs4==Pz zs&uB9%4NwaRSZ=*(Gw*Z*&v(GD2929MpTU)d*pC7o1$Y4Q~$4MwZNXU%42LDy(@N7 zwCCEXp!(S~8|UHE?$c`){P%zUR}hg=)Q@Ol3p?+04~KWF3Cc76A9SM|BR{0jm2v=3 z&=b9pARL{3GEDqMgj40(*m`q833H)MX=d-9Y~5zUB)V^#`8E|dLh8a7Zzfu%AMN8S z{%ros;?L&5EdFdB%;GIvm~C0p!RM-}-}`Je#hthis.settings.maxSequenceBuf&&n.shift(),n.length>1)){for(var s=this._seqCombinations(n),r=0;r1&&(t=this._handleShifted(n),e=e.concat(this._seqCombinations([n],"->")),t&&(e=e.concat(this._seqCombinations([o],"->")))),n.length>1&&((0,c.sortEvents)(n),e=e.concat(this._seqCombinations([n]))),t&&((0,c.sortEvents)(o),e=e.concat(this._seqCombinations([o])))}return e},e.prototype._keydown=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type,l=this.filter(t),u=this.scope+"faceplant";return t.repeat&&l&&this.settings.noKeyRepeat?(t.preventDefault(),!1):"Compose"==(r=this._normSpecial(o,r,s))?void(n.composing=!0):(n.down.includes(r)||this._addDown(r,s),this._resetSeqTimeout(),void(l&&(e=this._triggerWithSelectors(a,[t,r,s]),e=e.concat(this._triggerWithSelectors(a+=":"+r.toLowerCase(),[t,r,s])),n.down.length>5&&(e=e.concat(this.trigger(u,t))),b&&(e=e.concat(this._handleDownEvents(t,r,s))),(0,c.handlePreventDefault)(t,e))))},e.prototype._keypress=function(t){var e=t.charCode||t.which,n=t.key||String.fromCharCode(e);!b&&e>47&&n.length&&(this.state.down.pop(),this.state.down.push(n))},e.prototype._keyup=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type;if(r=this._normSpecial(o,r,s),l.MACOS&&l.OSKEYS.includes(r)){for(var u=[],h=0;h")||(t=(0,s.normCombo)(t))),n||(n={});var u={callback:e,context:n,times:i};o.events[t]||(o.events[t]=[]),o.events[t].push(u)}),this},t.prototype.once=function(t,e,n){return this.on(t,e,n,1)},t.prototype.off=function(t,e,n){if(arguments.length){t=t?(0,s.normEvents)(t):Object.keys(this.events);for(var i in t){var o=t[i],r=this.events[o];if(r){var a=[];if(!n&&!e){delete this.events[o];break}for(var l=0;l1&&!isNaN(e)&&(e=parseInt(e)),o[t][o[t][e]]=e})}(p)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.Logger=void 0;var o=n(1),s=window.console,r={40:"ERROR",30:"WARNING",20:"INFO",10:"DEBUG",ERROR:40,WARNING:30,INFO:20,DEBUG:10};e.Logger=function(){function t(e,n){i(this,t),this.prefix=n,this.setLevel(e),this.writeErr=this.fallback,this.writeWarn=this.fallback,this.writeInfo=this.fallback,this.writeDebug=this.fallback,(0,o.isFunction)(s.error)&&(this.writeErr=s.error),(0,o.isFunction)(s.warn)&&(this.writeWarn=s.warn),(0,o.isFunction)(s.info)&&(this.writeInfo=s.info),(0,o.isFunction)(s.debug)&&(this.writeDebug=s.debug)}return t.prototype.setLevel=function(t){t=t.toUpperCase(),this.error=this.write.bind(this,40),this.warn=this.write.bind(this,30),this.info=this.write.bind(this,20),this.debug=this.write.bind(this,10),this.logLevel=t,isNaN(t)&&(this.logLevel=t=r[t]),t>40&&(this.error=o.noop),t>30&&(this.warn=o.noop),t>20&&(this.info=o.noop),t>10&&(this.debug=o.noop)},t.prototype.fallback=function(t){var e=Array.from(arguments);e[0]=this.prefix+r[t]+" "+e[0],(0,o.isFunction)(s.log)&&s.log.apply(s,e)},t.prototype.write=function(t){var e=this.logLevel,n=Array.from(arguments).slice(1);this.prefix.length&&n.unshift(this.prefix),40===t&&e<=40?this.writeErr.apply(s,n):30===t&&e<=30?this.writeWarn.apply(s,n):20===t&&e<=20?this.writeInfo.apply(s,n):10===t&&e<=10&&this.writeDebug.apply(s,n)},t}()},function(t,e,n){"use strict";function i(){Array.from||(Array.prototype.from=function(t){return[].slice.call(t)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e,n,i=Object(this),o=parseInt(i.length,10)||0,s=parseInt(arguments[1],10)||0;if(0===o)return!1;for(s>=0?e=s:(e=o+s)<0&&(e=0);ethis.length)&&-1!==this.indexOf(t,e)}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t})}e.__esModule=!0,e.polyfill=i},function(t,e,n){"use strict";function i(t){return t}function o(t){var e="";return t.name?e+=" "+t.name:t.id?e+=" "+t.id:t.nodeName&&(e+=" "+t.nodeName),"[HI"+e+"]"}function s(t){if("string"==typeof t){return document.querySelector(t)}return t}function r(t){return p(t)?[t]:t}function a(t,e){if(e.includes(!1))return t.preventDefault(),!0}function l(t){var e,n,i,o=[];for(t=t.split(/ +(?=(?:(?:[^"]*"){2})*[^"]*$)/g),e=0;ee[n]?-1:e[t]t[n+1]&&e.push(n);return e},c=e.ClapperPlugin=function(){function t(e){i(this,t),this.HI=e,this.l=e.l,this.exports={},this.history=[],this.rollingAvg=[],this.calcHistoryAverage=this.calcHistoryAverage.bind(this),this.startClapper=this.startClapper.bind(this),this.stopClapper=this.stopClapper.bind(this)}return t.prototype.init=function(t){var e=this;t.state;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Clapper]"),t.settings.autostartClapper=t.settings.autostartClapper||!1,t.settings.clapThreshold=t.settings.clapThreshold||130,t.settings.autotoggleClapper=t.settings.autotoggleClapper||!0,-1!=t.settings.listenEvents.indexOf("clapper")&&(r?(t.settings.autostartClapper&&this.startClapper(),t.settings.autotoggleClapper&&(t.on("document:hidden",function(){e._started&&e.stopClapper()}),t.on("document:visible",function(){!e._started&&t.settings.autostartClapper&&e.startClapper()}))):(this.startClapper=t.noop,this.stopClapper=t.noop)),this.exports.startClapper=this.startClapper,this.exports.stopClapper=this.stopClapper,this},t.prototype.calcHistoryAverage=function(){var t,e,n=0;for(t=0;t60&&(t.freqData=new Uint8Array(t.analyser.frequencyBinCount),t.analyser.getByteFrequencyData(t.freqData),u=l(t.freqData),h=t.freqData.indexOf(Math.max.apply(null,t.freqData)),t.freqData[h],p=t.freqData[h]-t.rollingAvg[h],s>=240&&h<8&&p>t.HI.settings.clapThreshold&&(d=a(t.freqData.slice(0,10))/a(t.freqData.slice(10,20)),f=a(t.freqData.slice(0,3))/a(t.freqData.slice(3,6)),d<1.8&&f<1.4&&u.length>2&&(c="clap",s<480&&(c="doubleclap",o=g,r<720&&(c="applause")),t.HI._addDown(c),t.HI._handleDownEvents(),t.HI._handleSeqEvents(),t.HI._removeDown(c),i=g)),n=g,i!=g&&(t.history.push(t.freqData),t.history.length>50&&t.history.shift(),t.calcHistoryAverage()))}};this.context=new r,this.scriptProcessor=this.context.createScriptProcessor(1024,1,1),this.analyser=this.context.createAnalyser(),this.freqData=new Uint8Array(this.analyser.frequencyBinCount),this.log.debug(this.l("Starting clap detection")),this._started=!0,navigator.mediaDevices.getUserMedia({audio:!0}).then(e,function(e){t.log.error(t.l("Could not get audio stream"),e)})},t.prototype.stopClapper=function(){this.log.debug(this.l("Stopping clap detection")),this.stream.getAudioTracks().forEach(function(t){t.stop()}),this.stream.getVideoTracks().forEach(function(t){t.stop()}),this.streamSource.disconnect(this.analyser),this.analyser.disconnect(this.scriptProcessor),this.scriptProcessor.disconnect(this.context.destination),this._started=!1},t}();s.default.plugins.push(c)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ClipboardPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents=r.default.defaultListenEvents.concat(["cut","copy","paste","select"]);var a=e.ClipboardPlugin=function(){function t(e){i(this,t),this.HI=e,e._clipboard=this._clipboard.bind(e),this._paste=this._clipboard,this._copy=this._clipboard,this._cut=this._clipboard,e._select=this._select.bind(e),this._input=this._select}return t.prototype.init=function(t){return this},t.prototype._clipboard=function(t){var e,n=t.type+':"';if(this.filter(t)&&(window.clipboardData?e=window.clipboardData.getData("Text"):t.clipboardData&&(e=t.clipboardData.getData("text/plain")),e||"copy"!=t.type&&"cut"!=t.type||(e=this.getSelText()),e)){var i=this._triggerWithSelectors(t.type,[t,e]);i=i.concat(this._triggerWithSelectors(n+e+'"',[t])),(0,o.handlePreventDefault)(t,i)}},t.prototype._select=function(t){var e=t.type+':"';if("select"==t.type)var n=this.getSelText();else if("input"==t.type)var n=t.data||t.target.value;if(this.filter(t)){var i=this._triggerWithSelectors(t.type,[t,n]);n&&(i=i.concat(this._triggerWithSelectors(e+n+'"',[t])),(0,o.handlePreventDefault)(t,i))}},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sine",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,o=c.createGain(),s=c.createOscillator();s.connect(o),o.connect(c.destination),s.frequency.value=e,o.gain.value=i,s.type=n,s.start(),setTimeout(function(){s.stop()},t||50)}e.__esModule=!0,e.FeedbackPlugin=void 0;var s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s),a=n(1),l=n(3),c=new(window.AudioContext||window.webkitAudioContext||window.audioContext),u=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:left:down","pointer:middle:down","pointer:right:down","scroll:up","scroll:down","scroll:left","scroll:right"],h=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:down"],p=["pointer:down"],d=e.FeedbackPlugin=function(){function t(e){return i(this,t),this.HI=e,this.l=e.l,this.exports={beep:o},this.vibrationInterval=null,this}return t.prototype.init=function(t){var e=this;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Feedback]"),this.lastActivity=new Date,this.timeout=null,t.settings.visualEvents=t.settings.visualEvents||u,t.settings.audioEvents=t.settings.audioEvents||h,t.settings.vibrationEvents=t.settings.vibrationEvents||p,t.settings.visualFeedback=t.settings.visualFeedback||!1,t.settings.audioFeedback=t.settings.audioFeedback||!1,t.settings.vibrationFeedback=t.settings.vibrationFeedback||!1,t.settings.feedbackClass=t.settings.feedbackClass||"event",this.feedbackElem=(0,a.getNode)(t.settings.feedbackElem),this.feedbackElem||(this.feedbackElem=(0,a.getNode)("#hi_feedback")),this.feedbackElem||(t.settings.feedbackElem="#hi_feedback",this.feedbackStyle=document.createElement("style"),this.feedbackStyle.type="text/css",this.feedbackStyle.appendChild(document.createTextNode("\n#hi_feedback {\n position: fixed;\n top: 1em;\n right: 1em;\n align-items: flex-end;\n justify-content: flex-end;\n font-size: 2em;\n display: flex;\n flex-flow: row wrap;\n width: 8em;\n}\n\n#hi_feedback .event {\n transition: all .5s ease-in-out;\n transform-origin: right bottom;\n opacity: 0;\n border: black .15rem solid;\n border-radius: .2em;\n text-align: center;\n padding: .2rem;\n min-width: 1em;\n padding: .2em;\n background-color: rgba(0,0,0,0.7);\n color: #fff;\n z-index: 9999;\n}\n")),document.body.appendChild(this.feedbackStyle),this.feedbackElem=document.createElement("div"),this.feedbackElem.id="hi_feedback",t.elem!==window?t.elem.appendChild(this.feedbackElem):document.body.appendChild(this.feedbackElem)),t.settings.visualFeedback&&t.on(t.settings.visualEvents,this.visualEvent,this),t.settings.audioFeedback&&t.on(t.settings.audioEvents,this.audioEvent,this),t.settings.vibrationFeedback&&(t.on(t.settings.vibrationEvents,this.vibrationEvent,this),t.settings.vibrationEvents.forEach(function(n){n.endsWith("down")&&t.on(n.split("down",1)[0]+"up",e.stopVibration,e)})),this},t.prototype.containsModifiers=function(t,e,n){return l.AllModifiers.includes(t)},t.prototype.visualEvent=function(t){var e=this.HIEvent,n=["cut","copy","paste","select"],i=HI.getDown(),o=document.createElement("div");if(o.classList.add(this.HI.settings.feedbackClass),n.includes(t.type)&&(arguments.length<=1?0:arguments.length-1))o.innerHTML=e+":"+(arguments.length<=1?void 0:arguments[1]);else if("keydown"==t.type)e=arguments.length<=1?void 0:arguments[1],o.innerHTML=e,l.AllModifiers.includes(e)&&!i.includes("-")?o.innerHTML=e.toLowerCase():HI.state.down.some(this.containsModifiers)&&(o.innerHTML=i);else if(e.startsWith("pointer")){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width",100),s.setAttribute("height",100),s.style.position="fixed",s.style.top=t.clientY-50+"px",s.style.left=t.clientX-50+"px",s.style.transition="all .33s ease-out",s.style.transform="scale(0.1)",s.style.zIndex=1e4,s.innerHTML='',document.body.appendChild(s),setTimeout(function(){s.style.transform="scale(2)",s.style.opacity=0,setTimeout(function(){s.parentNode.removeChild(s)},500)},10),e.includes(":down")&&(e=e.substr(0,e.length-5)),o.innerHTML=e}else i.length?o.innerHTML=i:o.innerHTML=e;o.style.opacity=1,this.feedbackElem.appendChild(o),setTimeout(function(){o.style.opacity=0,showEventTimeout=setTimeout(function(){o.parentNode.removeChild(o)},500)},1e3)},t.prototype.audioEvent=function(t){o(33,500,"triangle")},t.prototype.startVibration=function(){navigator.vibrate(150)},t.prototype.stopVibration=function(){clearInterval(this.vibrationInterval),navigator.vibrate(0)},t.prototype.vibrationEvent=function(t){navigator.vibrate(150),clearInterval(this.vibrationInterval),this.vibrationInterval=setInterval(this.startVibration,100)},t}();r.default.plugins.push(d)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.GamepadPlugin=void 0;var o=(n(1),n(2)),s=function(t){return t&&t.__esModule?t:{default:t}}(o),r=function(t){for(var e=navigator.getGamepads(),n=0;nthis.idleTimeout?this.HI.trigger("idle",this.lastActivity):this.timeout=setTimeout(this.idleCheck,this.idleCheckInterval)},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.PointerPlugin=void 0;var o,s=n(1),r=n(2),a=function(t){return t&&t.__esModule?t:{default:t}}(r),l=["pan","mousedown","mouseup","touchstart","touchend","touchcancel","wheel"],c=["pointermove"];a.default.defaultListenEvents=a.default.defaultListenEvents.concat(l),c=["mousemove","touchmove"];var u=e.PointerPlugin=function(){function t(e){var n=this;i(this,t),this.HI=e,["_click","_dragendPointerup","_pointerdown","_pointerup","_pointercancel","_pointerMoveCheck","_trackMotion","_wheel"].forEach(function(t){e[t]=n[t].bind(e)}),e.on("hold",function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,e._pointerMoveCheck,!0),(0,s.addListeners)(window,c,e._pointerMoveCheck,!0))}),e._mousedown=e._pointerdown,e._touchstart=e._pointerdown,e._mouseup=e._pointerup,e._touchend=e._pointerup,e._touchcancel=e._pointercancel,e._tap=e._click,e.on("hi:resetstates",this._resetStates,e),e.on("hi:removedown",function(t){(0,s.removeListeners)(window,c,e._pointerMoveCheck,!0)}),e.on("hold",this._holdCheck,e)}return t.prototype.init=function(t){var e=t.state;return e.multitap=0,e.pointerCount=0,e.pointers={},e.scrollX=0,e.scrollY=0,(0,s.removeListeners)(window,c,t._pointerMoveCheck,!0),(0,s.removeListeners)(t.elem,c,t._trackMotion,!0),this.exports={mouse:this.mouse},this},t.prototype._resetStates=function(){(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.removeListeners)(this.elem,c,this._trackMotion,!0),this.state.pointers={},this.state.pointerCount=0},t.prototype._holdCheck=function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.addListeners)(window,c,this._pointerMoveCheck,!0))},t.prototype._pointerMoveCheck=function(t){var e,n,i,o,r=this.settings.moveThreshold,a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type)i=t.pointerId||1;else if(l&&l.length)for(var u=0;ur||Math.abs(o.y-n)>r)&&(clearTimeout(this.state.holdTimeout),(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0)))},t.prototype._trackMotion=function(t){var e,n,i=[],o="pan",r={},a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type){if(e=t.pointerId||1,!(n=a[e]))return;n.event=t}else if(l&&l.length)for(var c=0;c1?(o="multitouch:",i=i.concat(this._triggerWithSelectors(o+"pan",[t,a])),i=i.concat(this._triggerWithSelectors(o+this.state.pointerCount+":pan",[t,a]))):i=i.concat(this._triggerWithSelectors(o,[t,r])),(0,s.handlePreventDefault)(t,i))},t.prototype._dragendPointerup=function(t){var e=t.pointerId||1,n=this.state.pointers,i={bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,isPrimary:!0,layerX:t.layerX,layerY:t.layerY,offsetX:t.offsetX,offsetY:t.offsetY,pageX:t.pageX,pageY:t.pageY,pointerId:e,pressure:t.pressure||0,relatedTarget:window,screenX:t.screenX,screenY:t.screenY,target:t.target,tiltX:t.tiltX||0,tiltY:t.tiltY||0,view:window,x:t.x,y:t.y};new MouseEvent("mouseup",i);n[e]&&(this._pointerup(t),window.removeEventListener("dragend",this._dragendPointerup,!0))},t.prototype._pointerdown=function(t){var e,n,i=this.state,r=this.mouse(t),a=t.changedTouches,l=t.pointerType,u="pointer",h=":down";if("mousedown"!=t.type||!o){if(l||"mousedown"==t.type)e=t.pointerId||1,i.pointers[e]={x:t.clientX,y:t.clientY,event:t,timestamp:Date.now()};else if(a&&a.length){for(var p=0;p1||this.settings.listenEvents.includes("pan"))&&((0,s.removeListeners)(window,c,this._trackMotion,!0),(0,s.addListeners)(window,c,this._trackMotion,!0)),this._addDown(u+":"+r.buttonName),this._resetSeqTimeout(),this.filter(t)&&(n=this._triggerWithSelectors(u+h,[t]),void 0!==r.buttonName&&(u+=":"+r.buttonName,n=n.concat(this._triggerWithSelectors(u+h,[t]))),n=n.concat(this._handleDownEvents(t)),(0,s.handlePreventDefault)(t,n))}},t.prototype._pointerup=function(t){var e,n,i,r,a=this.state,l=this.settings.moveThreshold,u=t.clientX,h=t.clientY,p=a.pointers,d={},f=t.changedTouches,g=t.pointerType,v=this.settings.swipeThreshold,m="pointer:",w=this.filter(t);if("mouseup"==t.type&&o)return void(o=!1);if(g||"mouseup"==t.type)e=t.pointerId||1;else if(f&&f.length)for(var y=0;yMath.abs(d.y)?d.x>v?i+="left":d.x<-v&&(i+="right"):d.y>v?i+="up":d.y<-v&&(i+="down")),o=!1,delete p[e],a.pointerCount--,a.pointerCount>0?d.x0?n=n.concat(this._doDownEvent("wheel:down",t)):t.deltaY<0&&(n=n.concat(this._doDownEvent("wheel:up",t))),t.deltaZ>0?n=n.concat(this._doDownEvent("wheel:out",t)):t.deltaZ<0&&(n=n.concat(this._doDownEvent("wheel:in",t))),t.deltaX>0?(n=n.concat(this._doDownEvent("wheel:right",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:right",[t])))):t.deltaX<0&&(n=n.concat(this._doDownEvent("wheel:left",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:left",[t])))),(0,s.handlePreventDefault)(t,n)}},t.prototype.mouse=function(t){var e={type:t.type};return"mousemove"!=t.type&&"wheel"!=t.type&&(0===t.button?(e.left=!0,e.buttonName="left"):1===t.button?(e.middle=!0,e.buttonName="middle"):2===t.button?(e.right=!0,e.buttonName="right"):3===t.button?(e.back=!0,e.buttonName="back"):4===t.button?(e.forward=!0,e.buttonName="forward"):5===t.button?(e.forward=!0,e.buttonName="eraser"):e.buttonName=t.button),e.button=t.button,e},t}();a.default.plugins.push(u)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ScrollPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("scroll");var a=e.ScrollPlugin=function(){function t(e){i(this,t),this.HI=e,e._scroll=(0,o.debounce)(this._scroll.bind(e),50),e.on("hi:resetstates",this._resetStates,e)}return t.prototype.init=function(t){var e=t.state;return e.scrollX=0,e.scrollY=0,this},t.prototype._resetStates=function(){this.state.scrollX=0,this.state.scrollY=0},t.prototype._scroll=function(t){var e,n,i,s=this.state,r=t.target,a=r.scrollLeft,l=r.scrollTop;r.scrollingElement&&(a=r.scrollingElement.scrollLeft,l=r.scrollingElement.scrollTop),n=a-s.scrollX,0===(i=l-s.scrollY)&&0===n||(e=this._triggerWithSelectors(t.type,[t,{x:n,y:i}]),void 0!==a&&a!==s.scrollX&&(n=Math.abs(n),e=a>s.scrollX?e.concat(this._triggerWithSelectors(t.type+":right",[t,n])):e.concat(this._triggerWithSelectors(t.type+":left",[t,n])),s.scrollX=a),void 0!==l&&l!==s.scrollY&&(i=Math.abs(i),e=l>s.scrollY?e.concat(this._triggerWithSelectors(t.type+":down",[t,i])):e.concat(this._triggerWithSelectors(t.type+":up",[t,i])),s.scrollY=l),(0,o.handlePreventDefault)(t,e))},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.SpeechRecPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("speech");var a=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||window.oSpeechRecognition,l=e.SpeechRecPlugin=function(){function t(e){return i(this,t),this.exports={startSpeechRec:this.startSpeechRec.bind(this),stopSpeechRec:this.stopSpeechRec.bind(this)},this.HI=e,this.l=e.l,this.log=new e.Logger(e.settings.logLevel||"INFO","[HI SpeechRec]"),this._rtSpeech=[],this._rtSpeechTimer=null,this}return t.prototype.init=function(){var t=this,e=this.HI,n=e.settings;return n.autostartSpeech=n.autostartSpeech||!1,n.listenEvents.includes("speech")&&(a?(n.autostartSpeech&&this.startSpeechRec(),e.on("document:hidden",function(){t._started&&t.stopSpeechRec()}),e.on("document:visible",function(){!t._started&&n.autostartSpeech&&t.startSpeechRec()})):(this.startSpeechRec=o.noop,this.stopSpeechRec=o.noop)),this},t.prototype.startSpeechRec=function(){var t=this,e=this.HI;this._recognition=new a,this.log.debug(this.l("Starting speech recognition"),this._recognition),this._recognition.lang=e.settings.speechLang||navigator.language||"en-US",this._recognition.continuous=!0,this._recognition.interimResults=!0,this._recognition.onresult=function(e){for(var n=e.resultIndex;nthis.settings.maxSequenceBuf&&n.shift(),n.length>1)){for(var s=this._seqCombinations(n),r=0;r1&&(t=this._handleShifted(n),e=e.concat(this._seqCombinations([n],"->")),t&&(e=e.concat(this._seqCombinations([o],"->")))),n.length>1&&((0,c.sortEvents)(n),e=e.concat(this._seqCombinations([n]))),t&&((0,c.sortEvents)(o),e=e.concat(this._seqCombinations([o])))}return e},e.prototype._keydown=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type,l=this.filter(t),u=this.scope+"faceplant";return t.repeat&&l&&this.settings.noKeyRepeat?(t.preventDefault(),!1):"Compose"==(r=this._normSpecial(o,r,s))?void(n.composing=!0):(n.down.includes(r)||this._addDown(r,s),this._resetSeqTimeout(),void(l&&(e=this._triggerWithSelectors(a,[t,r,s]),e=e.concat(this._triggerWithSelectors(a+=":"+r.toLowerCase(),[t,r,s])),n.down.length>5&&(e=e.concat(this.trigger(u,t))),b&&(e=e.concat(this._handleDownEvents(t,r,s))),(0,c.handlePreventDefault)(t,e))))},e.prototype._keypress=function(t){var e=t.charCode||t.which,n=t.key||String.fromCharCode(e);!b&&e>47&&n.length&&(this.state.down.pop(),this.state.down.push(n))},e.prototype._keyup=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type;if(r=this._normSpecial(o,r,s),l.MACOS&&l.OSKEYS.includes(r)){for(var u=[],h=0;h")||(t=(0,s.normCombo)(t))),n||(n={});var u={callback:e,context:n,times:i};o.events[t]||(o.events[t]=[]),o.events[t].push(u)}),this},t.prototype.once=function(t,e,n){return this.on(t,e,n,1)},t.prototype.off=function(t,e,n){if(arguments.length){t=t?(0,s.normEvents)(t):Object.keys(this.events);for(var i in t){var o=t[i],r=this.events[o];if(r){var a=[];if(!n&&!e){delete this.events[o];break}for(var l=0;l1&&!isNaN(e)&&(e=parseInt(e)),o[t][o[t][e]]=e})}(p)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.Logger=void 0;var o=n(1),s=window.console,r={40:"ERROR",30:"WARNING",20:"INFO",10:"DEBUG",ERROR:40,WARNING:30,INFO:20,DEBUG:10};e.Logger=function(){function t(e,n){i(this,t),this.prefix=n,this.setLevel(e),this.writeErr=this.fallback,this.writeWarn=this.fallback,this.writeInfo=this.fallback,this.writeDebug=this.fallback,(0,o.isFunction)(s.error)&&(this.writeErr=s.error),(0,o.isFunction)(s.warn)&&(this.writeWarn=s.warn),(0,o.isFunction)(s.info)&&(this.writeInfo=s.info),(0,o.isFunction)(s.debug)&&(this.writeDebug=s.debug)}return t.prototype.setLevel=function(t){t=t.toUpperCase(),this.error=this.write.bind(this,40),this.warn=this.write.bind(this,30),this.info=this.write.bind(this,20),this.debug=this.write.bind(this,10),this.logLevel=t,isNaN(t)&&(this.logLevel=t=r[t]),t>40&&(this.error=o.noop),t>30&&(this.warn=o.noop),t>20&&(this.info=o.noop),t>10&&(this.debug=o.noop)},t.prototype.fallback=function(t){var e=Array.from(arguments);e[0]=this.prefix+r[t]+" "+e[0],(0,o.isFunction)(s.log)&&s.log.apply(s,e)},t.prototype.write=function(t){var e=this.logLevel,n=Array.from(arguments).slice(1);this.prefix.length&&n.unshift(this.prefix),40===t&&e<=40?this.writeErr.apply(s,n):30===t&&e<=30?this.writeWarn.apply(s,n):20===t&&e<=20?this.writeInfo.apply(s,n):10===t&&e<=10&&this.writeDebug.apply(s,n)},t}()},function(t,e,n){"use strict";function i(){Array.from||(Array.prototype.from=function(t){return[].slice.call(t)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e,n,i=Object(this),o=parseInt(i.length,10)||0,s=parseInt(arguments[1],10)||0;if(0===o)return!1;for(s>=0?e=s:(e=o+s)<0&&(e=0);ethis.length)&&-1!==this.indexOf(t,e)}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t})}e.__esModule=!0,e.polyfill=i},function(t,e,n){"use strict";function i(t){return t}function o(t){var e="";return t.name?e+=" "+t.name:t.id?e+=" "+t.id:t.nodeName&&(e+=" "+t.nodeName),"[HI"+e+"]"}function s(t){if("string"==typeof t){return document.querySelector(t)}return t}function r(t){return p(t)?[t]:t}function a(t,e){if(e.includes(!1))return t.preventDefault(),!0}function l(t){var e,n,i,o=[];for(t=t.split(/ +(?=(?:(?:[^"]*"){2})*[^"]*$)/g),e=0;ee[n]?-1:e[t]t[n+1]&&e.push(n);return e},c=e.ClapperPlugin=function(){function t(e){i(this,t),this.HI=e,this.l=e.l,this.exports={},this.history=[],this.rollingAvg=[],this.calcHistoryAverage=this.calcHistoryAverage.bind(this),this.startClapper=this.startClapper.bind(this),this.stopClapper=this.stopClapper.bind(this)}return t.prototype.init=function(t){var e=this;t.state;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Clapper]"),t.settings.autostartClapper=t.settings.autostartClapper||!1,t.settings.clapThreshold=t.settings.clapThreshold||130,t.settings.autotoggleClapper=t.settings.autotoggleClapper||!0,-1!=t.settings.listenEvents.indexOf("clapper")&&(r?(t.settings.autostartClapper&&this.startClapper(),t.settings.autotoggleClapper&&(t.on("document:hidden",function(){e._started&&e.stopClapper()}),t.on("document:visible",function(){!e._started&&t.settings.autostartClapper&&e.startClapper()}))):(this.startClapper=t.noop,this.stopClapper=t.noop)),this.exports.startClapper=this.startClapper,this.exports.stopClapper=this.stopClapper,this},t.prototype.calcHistoryAverage=function(){var t,e,n=0;for(t=0;t60&&(t.freqData=new Uint8Array(t.analyser.frequencyBinCount),t.analyser.getByteFrequencyData(t.freqData),u=l(t.freqData),h=t.freqData.indexOf(Math.max.apply(null,t.freqData)),t.freqData[h],p=t.freqData[h]-t.rollingAvg[h],s>=240&&h<8&&p>t.HI.settings.clapThreshold&&(d=a(t.freqData.slice(0,10))/a(t.freqData.slice(10,20)),f=a(t.freqData.slice(0,3))/a(t.freqData.slice(3,6)),d<1.8&&f<1.4&&u.length>2&&(c="clap",s<480&&(c="doubleclap",o=g,r<720&&(c="applause")),t.HI._addDown(c),t.HI._handleDownEvents(),t.HI._handleSeqEvents(),t.HI._removeDown(c),i=g)),n=g,i!=g&&(t.history.push(t.freqData),t.history.length>50&&t.history.shift(),t.calcHistoryAverage()))}};this.context=new r,this.scriptProcessor=this.context.createScriptProcessor(1024,1,1),this.analyser=this.context.createAnalyser(),this.freqData=new Uint8Array(this.analyser.frequencyBinCount),this.log.debug(this.l("Starting clap detection")),this._started=!0,navigator.mediaDevices.getUserMedia({audio:!0}).then(e,function(e){t.log.error(t.l("Could not get audio stream"),e)})},t.prototype.stopClapper=function(){this.log.debug(this.l("Stopping clap detection")),this.stream.getAudioTracks().forEach(function(t){t.stop()}),this.stream.getVideoTracks().forEach(function(t){t.stop()}),this.streamSource.disconnect(this.analyser),this.analyser.disconnect(this.scriptProcessor),this.scriptProcessor.disconnect(this.context.destination),this._started=!1},t}();s.default.plugins.push(c)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ClipboardPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents=r.default.defaultListenEvents.concat(["cut","copy","paste","select"]);var a=e.ClipboardPlugin=function(){function t(e){i(this,t),this.HI=e,e._clipboard=this._clipboard.bind(e),this._paste=this._clipboard,this._copy=this._clipboard,this._cut=this._clipboard,e._select=this._select.bind(e),this._input=this._select}return t.prototype.init=function(t){return this},t.prototype._clipboard=function(t){var e,n=t.type+':"';if(this.filter(t)&&(window.clipboardData?e=window.clipboardData.getData("Text"):t.clipboardData&&(e=t.clipboardData.getData("text/plain")),e||"copy"!=t.type&&"cut"!=t.type||(e=this.getSelText()),e)){var i=this._triggerWithSelectors(t.type,[t,e]);i=i.concat(this._triggerWithSelectors(n+e+'"',[t])),(0,o.handlePreventDefault)(t,i)}},t.prototype._select=function(t){var e=t.type+':"';if("select"==t.type)var n=this.getSelText();else if("input"==t.type)var n=t.data||t.target.value;if(this.filter(t)){var i=this._triggerWithSelectors(t.type,[t,n]);n&&(i=i.concat(this._triggerWithSelectors(e+n+'"',[t])),(0,o.handlePreventDefault)(t,i))}},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sine",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,o=c.createGain(),s=c.createOscillator();s.connect(o),o.connect(c.destination),s.frequency.value=e,o.gain.value=i,s.type=n,s.start(),setTimeout(function(){s.stop()},t||50)}e.__esModule=!0,e.FeedbackPlugin=void 0;var s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s),a=n(1),l=n(3),c=new(window.AudioContext||window.webkitAudioContext||window.audioContext),u=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:left:down","pointer:middle:down","pointer:right:down","scroll:up","scroll:down","scroll:left","scroll:right"],h=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:down"],p=["pointer:down"],d=e.FeedbackPlugin=function(){function t(e){return i(this,t),this.HI=e,this.l=e.l,this.exports={beep:o},this.vibrationInterval=null,this}return t.prototype.init=function(t){var e=this;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Feedback]"),this.lastActivity=new Date,this.timeout=null,t.settings.visualEvents=t.settings.visualEvents||u,t.settings.audioEvents=t.settings.audioEvents||h,t.settings.vibrationEvents=t.settings.vibrationEvents||p,t.settings.visualFeedback=t.settings.visualFeedback||!1,t.settings.audioFeedback=t.settings.audioFeedback||!1,t.settings.vibrationFeedback=t.settings.vibrationFeedback||!1,t.settings.feedbackClass=t.settings.feedbackClass||"event",this.feedbackElem=(0,a.getNode)(t.settings.feedbackElem),this.feedbackElem||(this.feedbackElem=(0,a.getNode)("#hi_feedback")),this.feedbackElem||(t.settings.feedbackElem="#hi_feedback",this.feedbackStyle=document.createElement("style"),this.feedbackStyle.type="text/css",this.feedbackStyle.appendChild(document.createTextNode("\n#hi_feedback {\n position: fixed;\n top: 1em;\n right: 1em;\n align-items: flex-end;\n justify-content: flex-end;\n font-size: 2em;\n display: flex;\n flex-flow: row wrap;\n width: 8em;\n}\n\n#hi_feedback .event {\n transition: all .5s ease-in-out;\n transform-origin: right bottom;\n opacity: 0;\n border: black .15rem solid;\n border-radius: .2em;\n text-align: center;\n padding: .2rem;\n min-width: 1em;\n padding: .2em;\n background-color: rgba(0,0,0,0.7);\n color: #fff;\n z-index: 9999;\n}\n")),document.body.appendChild(this.feedbackStyle),this.feedbackElem=document.createElement("div"),this.feedbackElem.id="hi_feedback",t.elem!==window?t.elem.appendChild(this.feedbackElem):document.body.appendChild(this.feedbackElem)),t.settings.visualFeedback&&t.on(t.settings.visualEvents,this.visualEvent,this),t.settings.audioFeedback&&t.on(t.settings.audioEvents,this.audioEvent,this),t.settings.vibrationFeedback&&(t.on(t.settings.vibrationEvents,this.vibrationEvent,this),t.settings.vibrationEvents.forEach(function(n){n.endsWith("down")&&t.on(n.split("down",1)[0]+"up",e.stopVibration,e)})),this},t.prototype.containsModifiers=function(t,e,n){return l.AllModifiers.includes(t)},t.prototype.visualEvent=function(t){var e=this.HIEvent,n=["cut","copy","paste","select"],i=HI.getDown(),o=document.createElement("div");if(o.classList.add(this.HI.settings.feedbackClass),n.includes(t.type)&&(arguments.length<=1?0:arguments.length-1))o.innerHTML=e+":"+(arguments.length<=1?void 0:arguments[1]);else if("keydown"==t.type)e=arguments.length<=1?void 0:arguments[1],o.innerHTML=e,l.AllModifiers.includes(e)&&!i.includes("-")?o.innerHTML=e.toLowerCase():HI.state.down.some(this.containsModifiers)&&(o.innerHTML=i);else if(e.startsWith("pointer")){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width",100),s.setAttribute("height",100),s.style.position="fixed",s.style.top=t.clientY-50+"px",s.style.left=t.clientX-50+"px",s.style.transition="all .33s ease-out",s.style.transform="scale(0.1)",s.style.zIndex=1e4,s.innerHTML='',document.body.appendChild(s),setTimeout(function(){s.style.transform="scale(2)",s.style.opacity=0,setTimeout(function(){s.parentNode.removeChild(s)},500)},10),e.includes(":down")&&(e=e.substr(0,e.length-5)),o.innerHTML=e}else i.length?o.innerHTML=i:o.innerHTML=e;o.style.opacity=1,this.feedbackElem.appendChild(o),setTimeout(function(){o.style.opacity=0,showEventTimeout=setTimeout(function(){o.parentNode.removeChild(o)},500)},1e3)},t.prototype.audioEvent=function(t){o(33,500,"triangle")},t.prototype.startVibration=function(){navigator.vibrate(150)},t.prototype.stopVibration=function(){clearInterval(this.vibrationInterval),navigator.vibrate(0)},t.prototype.vibrationEvent=function(t){navigator.vibrate(150),clearInterval(this.vibrationInterval),this.vibrationInterval=setInterval(this.startVibration,100)},t}();r.default.plugins.push(d)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.GamepadPlugin=void 0;var o=(n(1),n(2)),s=function(t){return t&&t.__esModule?t:{default:t}}(o),r=function(t){for(var e=navigator.getGamepads(),n=0;nthis.idleTimeout?this.HI.trigger("idle",this.lastActivity):this.timeout=setTimeout(this.idleCheck,this.idleCheckInterval)},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.PointerPlugin=void 0;var o,s=n(1),r=n(2),a=function(t){return t&&t.__esModule?t:{default:t}}(r),l=["pan","mousedown","mouseup","touchstart","touchend","touchcancel","wheel"],c=["pointermove"];a.default.defaultListenEvents=a.default.defaultListenEvents.concat(l),c=["mousemove","touchmove"];var u=e.PointerPlugin=function(){function t(e){var n=this;i(this,t),this.HI=e,["_click","_dragendPointerup","_pointerdown","_pointerup","_pointercancel","_pointerMoveCheck","_trackMotion","_wheel"].forEach(function(t){e[t]=n[t].bind(e)}),e.on("hold",function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,e._pointerMoveCheck,!0),(0,s.addListeners)(window,c,e._pointerMoveCheck,!0))}),e._mousedown=e._pointerdown,e._touchstart=e._pointerdown,e._mouseup=e._pointerup,e._touchend=e._pointerup,e._touchcancel=e._pointercancel,e._tap=e._click,e.on("hi:resetstates",this._resetStates,e),e.on("hi:removedown",function(t){(0,s.removeListeners)(window,c,e._pointerMoveCheck,!0)}),e.on("hold",this._holdCheck,e)}return t.prototype.init=function(t){var e=t.state;return e.multitap=0,e.pointerCount=0,e.pointers={},e.scrollX=0,e.scrollY=0,(0,s.removeListeners)(window,c,t._pointerMoveCheck,!0),(0,s.removeListeners)(t.elem,c,t._trackMotion,!0),this.exports={mouse:this.mouse},this},t.prototype._resetStates=function(){(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.removeListeners)(this.elem,c,this._trackMotion,!0),this.state.pointers={},this.state.pointerCount=0},t.prototype._holdCheck=function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.addListeners)(window,c,this._pointerMoveCheck,!0))},t.prototype._pointerMoveCheck=function(t){var e,n,i,o,r=this.settings.moveThreshold,a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type)i=t.pointerId||1;else if(l&&l.length)for(var u=0;ur||Math.abs(o.y-n)>r)&&(clearTimeout(this.state.holdTimeout),(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0)))},t.prototype._trackMotion=function(t){var e,n,i=[],o="pan",r={},a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type){if(e=t.pointerId||1,!(n=a[e]))return;n.event=t}else if(l&&l.length)for(var c=0;c1?(o="multitouch:",i=i.concat(this._triggerWithSelectors(o+"pan",[t,a])),i=i.concat(this._triggerWithSelectors(o+this.state.pointerCount+":pan",[t,a]))):i=i.concat(this._triggerWithSelectors(o,[t,r])),(0,s.handlePreventDefault)(t,i))},t.prototype._dragendPointerup=function(t){var e=t.pointerId||1,n=this.state.pointers,i={bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,isPrimary:!0,layerX:t.layerX,layerY:t.layerY,offsetX:t.offsetX,offsetY:t.offsetY,pageX:t.pageX,pageY:t.pageY,pointerId:e,pressure:t.pressure||0,relatedTarget:window,screenX:t.screenX,screenY:t.screenY,target:t.target,tiltX:t.tiltX||0,tiltY:t.tiltY||0,view:window,x:t.x,y:t.y};new MouseEvent("mouseup",i);n[e]&&(this._pointerup(t),window.removeEventListener("dragend",this._dragendPointerup,!0))},t.prototype._pointerdown=function(t){var e,n,i=this.state,r=this.mouse(t),a=t.changedTouches,l=t.pointerType,u="pointer",h=":down";if("mousedown"!=t.type||!o){if(l||"mousedown"==t.type)e=t.pointerId||1,i.pointers[e]={x:t.clientX,y:t.clientY,event:t,timestamp:Date.now()};else if(a&&a.length){for(var p=0;p1||this.settings.listenEvents.includes("pan"))&&((0,s.removeListeners)(window,c,this._trackMotion,!0),(0,s.addListeners)(window,c,this._trackMotion,!0)),this._addDown(u+":"+r.buttonName),this._resetSeqTimeout(),this.filter(t)&&(n=this._triggerWithSelectors(u+h,[t]),void 0!==r.buttonName&&(u+=":"+r.buttonName,n=n.concat(this._triggerWithSelectors(u+h,[t]))),n=n.concat(this._handleDownEvents(t)),(0,s.handlePreventDefault)(t,n))}},t.prototype._pointerup=function(t){var e,n,i,r,a=this.state,l=this.settings.moveThreshold,u=t.clientX,h=t.clientY,p=a.pointers,d={},f=t.changedTouches,g=t.pointerType,v=this.settings.swipeThreshold,m="pointer:",w=this.filter(t);if("mouseup"==t.type&&o)return void(o=!1);if(g||"mouseup"==t.type)e=t.pointerId||1;else if(f&&f.length)for(var y=0;yMath.abs(d.y)?d.x>v?i+="left":d.x<-v&&(i+="right"):d.y>v?i+="up":d.y<-v&&(i+="down")),o=!1,delete p[e],a.pointerCount--,a.pointerCount>0?d.x0?n=n.concat(this._doDownEvent("wheel:down",t)):t.deltaY<0&&(n=n.concat(this._doDownEvent("wheel:up",t))),t.deltaZ>0?n=n.concat(this._doDownEvent("wheel:out",t)):t.deltaZ<0&&(n=n.concat(this._doDownEvent("wheel:in",t))),t.deltaX>0?(n=n.concat(this._doDownEvent("wheel:right",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:right",[t])))):t.deltaX<0&&(n=n.concat(this._doDownEvent("wheel:left",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:left",[t])))),(0,s.handlePreventDefault)(t,n)}},t.prototype.mouse=function(t){var e={type:t.type};return"mousemove"!=t.type&&"wheel"!=t.type&&(0===t.button?(e.left=!0,e.buttonName="left"):1===t.button?(e.middle=!0,e.buttonName="middle"):2===t.button?(e.right=!0,e.buttonName="right"):3===t.button?(e.back=!0,e.buttonName="back"):4===t.button?(e.forward=!0,e.buttonName="forward"):5===t.button?(e.forward=!0,e.buttonName="eraser"):e.buttonName=t.button),e.button=t.button,e},t}();a.default.plugins.push(u)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ScrollPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("scroll");var a=e.ScrollPlugin=function(){function t(e){i(this,t),this.HI=e,e._scroll=(0,o.debounce)(this._scroll.bind(e),50),e.on("hi:resetstates",this._resetStates,e)}return t.prototype.init=function(t){var e=t.state;return e.scrollX=0,e.scrollY=0,this},t.prototype._resetStates=function(){this.state.scrollX=0,this.state.scrollY=0},t.prototype._scroll=function(t){var e,n,i,s=this.state,r=t.target,a=r.scrollLeft,l=r.scrollTop;r.scrollingElement&&(a=r.scrollingElement.scrollLeft,l=r.scrollingElement.scrollTop),n=a-s.scrollX,0===(i=l-s.scrollY)&&0===n||(e=this._triggerWithSelectors(t.type,[t,{x:n,y:i}]),void 0!==a&&a!==s.scrollX&&(n=Math.abs(n),e=a>s.scrollX?e.concat(this._triggerWithSelectors(t.type+":right",[t,n])):e.concat(this._triggerWithSelectors(t.type+":left",[t,n])),s.scrollX=a),void 0!==l&&l!==s.scrollY&&(i=Math.abs(i),e=l>s.scrollY?e.concat(this._triggerWithSelectors(t.type+":down",[t,i])):e.concat(this._triggerWithSelectors(t.type+":up",[t,i])),s.scrollY=l),(0,o.handlePreventDefault)(t,e))},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.SpeechRecPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("speech");var a=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||window.oSpeechRecognition,l=e.SpeechRecPlugin=function(){function t(e){return i(this,t),this.exports={startSpeechRec:this.startSpeechRec.bind(this),stopSpeechRec:this.stopSpeechRec.bind(this)},this.HI=e,this.l=e.l,this.log=new e.Logger(e.settings.logLevel||"INFO","[HI SpeechRec]"),this._rtSpeech=[],this._rtSpeechTimer=null,this}return t.prototype.init=function(){var t=this,e=this.HI,n=e.settings;return n.autostartSpeech=n.autostartSpeech||!1,n.listenEvents.includes("speech")&&(a?(n.autostartSpeech&&this.startSpeechRec(),e.on("document:hidden",function(){t._started&&t.stopSpeechRec()}),e.on("document:visible",function(){!t._started&&n.autostartSpeech&&t.startSpeechRec()})):(this.startSpeechRec=o.noop,this.stopSpeechRec=o.noop)),this},t.prototype.startSpeechRec=function(){var t=this,e=this.HI;this._recognition=new a,this.log.debug(this.l("Starting speech recognition"),this._recognition),this._recognition.lang=e.settings.speechLang||navigator.language||"en-US",this._recognition.continuous=!0,this._recognition.interimResults=!0,this._recognition.onresult=function(e){for(var n=e.resultIndex;nX=yo188+^VQy(|aCLMoF)lGKF*Pk_b!==dZE0>UYI6YOT>Wm_ z$aa4fnfF5BT#s2f*`O`uStIp&vB4&BVC8;6Pz_ofNxY$Ec*&t1ucg2HPamK!Q1rd- zlk}YVAcqv~E&Ybx=bI$L4%y5rZwOFc5icnEb9s_y%7rs;hW9p&cay8;# z3R$XZJU*z|%Cye;x%r7K9pfR11J`FuobpvB_;_r7qhy<&o5ygzfN|re#yz*c^I%hN z6OoCcRwt`E&x3^?Dpb)=Sn(DsnE$fdJ?^Pr@I)76AF54O(S{G?vE-^Q#i->Bd34Vs z9%ke*TZLktEr=z=XUBl)T~dxD!y@*W#Tm`xqf=@tM$X%*F=TN5O)C@{mUrd-+cw z1M_Z|dJR)=UG2m`SoR^As`BAcFtOYH=tu&OA|N5~Hk?p?m*gZ2Oxb>!sO1KEbRh5d znMmdRcpM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aQ^zoGH6)+0(ql6ookVsMG)vnpq5AnOon)P-y{FeK`0xMx zuOKAbt{>6F7Ut^d9uDtTW0Yt7Kj=m;LVif0E9J)^rzd(NLHKL^WSIDi2&c-m&G_bm z5>`)}(#+mH*}Bbynx1c)`8E}|rRu^LZ6;b~AML6v`fP64qR-}sE&6PZ*rF{wv29t? j!RM-J(En^TMW3yv!Dp*!*r@3OVn+W1cq6Xv3(^1pkCq)c literal 0 HcmV?d00001 diff --git a/dist/humaninput-1.1.14.js b/dist/humaninput-1.1.15.js similarity index 99% rename from dist/humaninput-1.1.14.js rename to dist/humaninput-1.1.15.js index d9855ec..04d00fb 100644 --- a/dist/humaninput-1.1.14.js +++ b/dist/humaninput-1.1.15.js @@ -250,7 +250,7 @@ var HumanInput = function (_EventHandler) { _this.elem = (0, _utils.getNode)(elem || window); _this.Logger = _logger.Logger; // In case someone wants to use it separately _this.log = log; - _this.VERSION = "1.1.14"; + _this.VERSION = "1.1.15"; _this.plugin_instances = []; // Each instance of HumanInput gets its own set of plugin instances // NOTE: Most state-tracking variables are set inside HumanInput.init() @@ -699,7 +699,7 @@ var HumanInput = function (_EventHandler) { return code; // The code for spacebar is 'Space' } if (code.hasOwnProperty('includes')) { - // This check should resolve the edge case in issue #14 (https://github.com/liftoff/HumanInput/issues/14) + // This check was put here to resolve the edge case in issue #14 (https://github.com/liftoff/HumanInput/issues/14) if (code.includes('Left') || code.includes('Right')) { // Use the left and right variants of the name as the 'key' key = code; // So modifiers can be more specific diff --git a/dist/humaninput-1.1.14.min.js b/dist/humaninput-1.1.15.min.js similarity index 99% rename from dist/humaninput-1.1.14.min.js rename to dist/humaninput-1.1.15.min.js index 584787d..fe47620 100644 --- a/dist/humaninput-1.1.14.min.js +++ b/dist/humaninput-1.1.15.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.humaninput=e():(t.HumanInput=t.HumanInput||{},t.HumanInput.humaninput=e())}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(e){t.exports=e.HumanInput=n(10)}).call(e,n(0))},function(t,e,n){(function(e){t.exports=e.HumanInput=n(4)}).call(e,n(0))},function(t,e,n){(function(e){t.exports=e.HumanInput=n(5)}).call(e,n(0))},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;nthis.settings.maxSequenceBuf&&n.shift(),n.length>1)){for(var r=this._seqCombinations(n),s=0;s1&&(t=this._handleShifted(n),e=e.concat(this._seqCombinations([n],"->")),t&&(e=e.concat(this._seqCombinations([i],"->")))),n.length>1&&((0,u.sortEvents)(n),e=e.concat(this._seqCombinations([n]))),t&&((0,u.sortEvents)(i),e=e.concat(this._seqCombinations([i])))}return e},e.prototype._keydown=function(t){var e,n=this.state,o=t.which||t.keyCode,i=t.location||0,r=this.keyMaps[i][o]||this.keyMaps[0][o]||t.code,s=t.key||r,a=t.type,l=this.filter(t),c=this.scope+"faceplant";return t.repeat&&l&&this.settings.noKeyRepeat?(t.preventDefault(),!1):"Compose"==(s=this._normSpecial(i,s,r))?void(n.composing=!0):(n.down.includes(s)||this._addDown(s,r),this._resetSeqTimeout(),void(l&&(e=this._triggerWithSelectors(a,[t,s,r]),e=e.concat(this._triggerWithSelectors(a+=":"+s.toLowerCase(),[t,s,r])),n.down.length>5&&(e=e.concat(this.trigger(c,t))),E&&(e=e.concat(this._handleDownEvents(t,s,r))),(0,u.handlePreventDefault)(t,e))))},e.prototype._keypress=function(t){var e=t.charCode||t.which,n=t.key||String.fromCharCode(e);!E&&e>47&&n.length&&(this.state.down.pop(),this.state.down.push(n))},e.prototype._keyup=function(t){var e,n=this.state,o=t.which||t.keyCode,i=t.location||0,r=this.keyMaps[i][o]||this.keyMaps[0][o]||t.code,s=t.key||r,a=t.type;if(s=this._normSpecial(i,s,r),l.MACOS&&l.OSKEYS.includes(s)){for(var c=[],h=0;h")||(t=(0,r.normCombo)(t))),n||(n={});var c={callback:e,context:n,times:o};i.events[t]||(i.events[t]=[]),i.events[t].push(c)}),this},t.prototype.once=function(t,e,n){return this.on(t,e,n,1)},t.prototype.off=function(t,e,n){if(arguments.length){t=t?(0,r.normEvents)(t):Object.keys(this.events);for(var o in t){var i=t[o],s=this.events[i];if(s){var a=[];if(!n&&!e){delete this.events[i];break}for(var l=0;l1&&!isNaN(e)&&(e=parseInt(e)),i[t][i[t][e]]=e})}(f)},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.Logger=void 0;var i=n(1),r=window.console,s={40:"ERROR",30:"WARNING",20:"INFO",10:"DEBUG",ERROR:40,WARNING:30,INFO:20,DEBUG:10};e.Logger=function(){function t(e,n){o(this,t),this.prefix=n,this.setLevel(e),this.writeErr=this.fallback,this.writeWarn=this.fallback,this.writeInfo=this.fallback,this.writeDebug=this.fallback,(0,i.isFunction)(r.error)&&(this.writeErr=r.error),(0,i.isFunction)(r.warn)&&(this.writeWarn=r.warn),(0,i.isFunction)(r.info)&&(this.writeInfo=r.info),(0,i.isFunction)(r.debug)&&(this.writeDebug=r.debug)}return t.prototype.setLevel=function(t){t=t.toUpperCase(),this.error=this.write.bind(this,40),this.warn=this.write.bind(this,30),this.info=this.write.bind(this,20),this.debug=this.write.bind(this,10),this.logLevel=t,isNaN(t)&&(this.logLevel=t=s[t]),t>40&&(this.error=i.noop),t>30&&(this.warn=i.noop),t>20&&(this.info=i.noop),t>10&&(this.debug=i.noop)},t.prototype.fallback=function(t){var e=Array.from(arguments);e[0]=this.prefix+s[t]+" "+e[0],(0,i.isFunction)(r.log)&&r.log.apply(r,e)},t.prototype.write=function(t){var e=this.logLevel,n=Array.from(arguments).slice(1);this.prefix.length&&n.unshift(this.prefix),40===t&&e<=40?this.writeErr.apply(r,n):30===t&&e<=30?this.writeWarn.apply(r,n):20===t&&e<=20?this.writeInfo.apply(r,n):10===t&&e<=10&&this.writeDebug.apply(r,n)},t}()},function(t,e,n){"use strict";function o(){Array.from||(Array.prototype.from=function(t){return[].slice.call(t)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e,n,o=Object(this),i=parseInt(o.length,10)||0,r=parseInt(arguments[1],10)||0;if(0===i)return!1;for(r>=0?e=r:(e=i+r)<0&&(e=0);ethis.length)&&-1!==this.indexOf(t,e)}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var o=n.indexOf(t,e);return-1!==o&&o===e}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t})}e.__esModule=!0,e.polyfill=o},function(t,e,n){"use strict";function o(t){return t}function i(t){var e="";return t.name?e+=" "+t.name:t.id?e+=" "+t.id:t.nodeName&&(e+=" "+t.nodeName),"[HI"+e+"]"}function r(t){if("string"==typeof t){return document.querySelector(t)}return t}function s(t){return f(t)?[t]:t}function a(t,e){if(e.includes(!1))return t.preventDefault(),!0}function l(t){var e,n,o,i=[];for(t=t.split(/ +(?=(?:(?:[^"]*"){2})*[^"]*$)/g),e=0;ee[n]?-1:e[t]this.settings.maxSequenceBuf&&n.shift(),n.length>1)){for(var r=this._seqCombinations(n),s=0;s1&&(t=this._handleShifted(n),e=e.concat(this._seqCombinations([n],"->")),t&&(e=e.concat(this._seqCombinations([i],"->")))),n.length>1&&((0,u.sortEvents)(n),e=e.concat(this._seqCombinations([n]))),t&&((0,u.sortEvents)(i),e=e.concat(this._seqCombinations([i])))}return e},e.prototype._keydown=function(t){var e,n=this.state,o=t.which||t.keyCode,i=t.location||0,r=this.keyMaps[i][o]||this.keyMaps[0][o]||t.code,s=t.key||r,a=t.type,l=this.filter(t),c=this.scope+"faceplant";return t.repeat&&l&&this.settings.noKeyRepeat?(t.preventDefault(),!1):"Compose"==(s=this._normSpecial(i,s,r))?void(n.composing=!0):(n.down.includes(s)||this._addDown(s,r),this._resetSeqTimeout(),void(l&&(e=this._triggerWithSelectors(a,[t,s,r]),e=e.concat(this._triggerWithSelectors(a+=":"+s.toLowerCase(),[t,s,r])),n.down.length>5&&(e=e.concat(this.trigger(c,t))),E&&(e=e.concat(this._handleDownEvents(t,s,r))),(0,u.handlePreventDefault)(t,e))))},e.prototype._keypress=function(t){var e=t.charCode||t.which,n=t.key||String.fromCharCode(e);!E&&e>47&&n.length&&(this.state.down.pop(),this.state.down.push(n))},e.prototype._keyup=function(t){var e,n=this.state,o=t.which||t.keyCode,i=t.location||0,r=this.keyMaps[i][o]||this.keyMaps[0][o]||t.code,s=t.key||r,a=t.type;if(s=this._normSpecial(i,s,r),l.MACOS&&l.OSKEYS.includes(s)){for(var c=[],h=0;h")||(t=(0,r.normCombo)(t))),n||(n={});var c={callback:e,context:n,times:o};i.events[t]||(i.events[t]=[]),i.events[t].push(c)}),this},t.prototype.once=function(t,e,n){return this.on(t,e,n,1)},t.prototype.off=function(t,e,n){if(arguments.length){t=t?(0,r.normEvents)(t):Object.keys(this.events);for(var o in t){var i=t[o],s=this.events[i];if(s){var a=[];if(!n&&!e){delete this.events[i];break}for(var l=0;l1&&!isNaN(e)&&(e=parseInt(e)),i[t][i[t][e]]=e})}(f)},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.Logger=void 0;var i=n(1),r=window.console,s={40:"ERROR",30:"WARNING",20:"INFO",10:"DEBUG",ERROR:40,WARNING:30,INFO:20,DEBUG:10};e.Logger=function(){function t(e,n){o(this,t),this.prefix=n,this.setLevel(e),this.writeErr=this.fallback,this.writeWarn=this.fallback,this.writeInfo=this.fallback,this.writeDebug=this.fallback,(0,i.isFunction)(r.error)&&(this.writeErr=r.error),(0,i.isFunction)(r.warn)&&(this.writeWarn=r.warn),(0,i.isFunction)(r.info)&&(this.writeInfo=r.info),(0,i.isFunction)(r.debug)&&(this.writeDebug=r.debug)}return t.prototype.setLevel=function(t){t=t.toUpperCase(),this.error=this.write.bind(this,40),this.warn=this.write.bind(this,30),this.info=this.write.bind(this,20),this.debug=this.write.bind(this,10),this.logLevel=t,isNaN(t)&&(this.logLevel=t=s[t]),t>40&&(this.error=i.noop),t>30&&(this.warn=i.noop),t>20&&(this.info=i.noop),t>10&&(this.debug=i.noop)},t.prototype.fallback=function(t){var e=Array.from(arguments);e[0]=this.prefix+s[t]+" "+e[0],(0,i.isFunction)(r.log)&&r.log.apply(r,e)},t.prototype.write=function(t){var e=this.logLevel,n=Array.from(arguments).slice(1);this.prefix.length&&n.unshift(this.prefix),40===t&&e<=40?this.writeErr.apply(r,n):30===t&&e<=30?this.writeWarn.apply(r,n):20===t&&e<=20?this.writeInfo.apply(r,n):10===t&&e<=10&&this.writeDebug.apply(r,n)},t}()},function(t,e,n){"use strict";function o(){Array.from||(Array.prototype.from=function(t){return[].slice.call(t)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e,n,o=Object(this),i=parseInt(o.length,10)||0,r=parseInt(arguments[1],10)||0;if(0===i)return!1;for(r>=0?e=r:(e=i+r)<0&&(e=0);ethis.length)&&-1!==this.indexOf(t,e)}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var o=n.indexOf(t,e);return-1!==o&&o===e}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t})}e.__esModule=!0,e.polyfill=o},function(t,e,n){"use strict";function o(t){return t}function i(t){var e="";return t.name?e+=" "+t.name:t.id?e+=" "+t.id:t.nodeName&&(e+=" "+t.nodeName),"[HI"+e+"]"}function r(t){if("string"==typeof t){return document.querySelector(t)}return t}function s(t){return f(t)?[t]:t}function a(t,e){if(e.includes(!1))return t.preventDefault(),!0}function l(t){var e,n,o,i=[];for(t=t.split(/ +(?=(?:(?:[^"]*"){2})*[^"]*$)/g),e=0;ee[n]?-1:e[t]gdhaI|}NGk1ADWz@S;9c+%_)sNOhKqfAsP5lf8>gs4p^??-~)kFJ58=Vd9&FgQzu zkZOcujgrwaPpWE^z`sVXVMChUv$l8Tb$7{EyyP&B?GyKL1Y#v#sL?Iw&`xA3OY*GZ z>FDLCszK61(xJfdc^VKa&SSpYf4SWsH{b?v+RUmgJykJpr&u;q9HN~}M4jhj#`rKd zu5fCIq9v~?>~33EYQ!_Of#O>}!qy{MdhDSiWM6RPMgW;_b&FYLTb4XgphlAkZ!0x& zzy{V!CCeC;DX)2~I`DB!@5@X%DCq*tbiXGQdJOFt6<42J*B7hP!BWkee;5Hr&*J6= z_^{_5{s53_Xs&#nZg{H{NYw6WqN)G%W9cTqD(CFI^|V}!vqBO_Z+uX^X!H_;X(*n8iA^2 z(s&=-v`E+^V2R>Fk5k3mnaKBEDNWMU*2C0GzLj^pedqXeQD}C8zd?nBxnJ@E^b}RC z;(x6X(5|yBm$iyt0l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|70BH>Jd6y|!SIy!LU9${Z?feE++RFpK9ecO zeTs6q)Z^@SQ)+FvJ%omFLC&qa?8>IL45kbnR7`ia+m)b))(6i!$s>i=c|7_hV zc_LKMI)A0U1u~iBjca3#pm#@q1XHa=$DIdHWPD8G;7p(8a^&45%ptG9$;7#f@p34T9h2$kX0vza!fb8&q@cSrssL(Xor+$1Fm z9LkLrLX=G-I9D)FvDT5rnWe&n;~3`4zkmI+L=b)i6R(>lYiP1Q*|;Wa-DERgA2j){ flhqW{2|Givl65&u@LIF675@qd@Y1~{{$cthis.settings.maxSequenceBuf&&n.shift(),n.length>1)){for(var s=this._seqCombinations(n),r=0;r1&&(t=this._handleShifted(n),e=e.concat(this._seqCombinations([n],"->")),t&&(e=e.concat(this._seqCombinations([o],"->")))),n.length>1&&((0,c.sortEvents)(n),e=e.concat(this._seqCombinations([n]))),t&&((0,c.sortEvents)(o),e=e.concat(this._seqCombinations([o])))}return e},e.prototype._keydown=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type,l=this.filter(t),u=this.scope+"faceplant";return t.repeat&&l&&this.settings.noKeyRepeat?(t.preventDefault(),!1):"Compose"==(r=this._normSpecial(o,r,s))?void(n.composing=!0):(n.down.includes(r)||this._addDown(r,s),this._resetSeqTimeout(),void(l&&(e=this._triggerWithSelectors(a,[t,r,s]),e=e.concat(this._triggerWithSelectors(a+=":"+r.toLowerCase(),[t,r,s])),n.down.length>5&&(e=e.concat(this.trigger(u,t))),b&&(e=e.concat(this._handleDownEvents(t,r,s))),(0,c.handlePreventDefault)(t,e))))},e.prototype._keypress=function(t){var e=t.charCode||t.which,n=t.key||String.fromCharCode(e);!b&&e>47&&n.length&&(this.state.down.pop(),this.state.down.push(n))},e.prototype._keyup=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type;if(r=this._normSpecial(o,r,s),l.MACOS&&l.OSKEYS.includes(r)){for(var u=[],h=0;h")||(t=(0,s.normCombo)(t))),n||(n={});var u={callback:e,context:n,times:i};o.events[t]||(o.events[t]=[]),o.events[t].push(u)}),this},t.prototype.once=function(t,e,n){return this.on(t,e,n,1)},t.prototype.off=function(t,e,n){if(arguments.length){t=t?(0,s.normEvents)(t):Object.keys(this.events);for(var i in t){var o=t[i],r=this.events[o];if(r){var a=[];if(!n&&!e){delete this.events[o];break}for(var l=0;l1&&!isNaN(e)&&(e=parseInt(e)),o[t][o[t][e]]=e})}(p)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.Logger=void 0;var o=n(1),s=window.console,r={40:"ERROR",30:"WARNING",20:"INFO",10:"DEBUG",ERROR:40,WARNING:30,INFO:20,DEBUG:10};e.Logger=function(){function t(e,n){i(this,t),this.prefix=n,this.setLevel(e),this.writeErr=this.fallback,this.writeWarn=this.fallback,this.writeInfo=this.fallback,this.writeDebug=this.fallback,(0,o.isFunction)(s.error)&&(this.writeErr=s.error),(0,o.isFunction)(s.warn)&&(this.writeWarn=s.warn),(0,o.isFunction)(s.info)&&(this.writeInfo=s.info),(0,o.isFunction)(s.debug)&&(this.writeDebug=s.debug)}return t.prototype.setLevel=function(t){t=t.toUpperCase(),this.error=this.write.bind(this,40),this.warn=this.write.bind(this,30),this.info=this.write.bind(this,20),this.debug=this.write.bind(this,10),this.logLevel=t,isNaN(t)&&(this.logLevel=t=r[t]),t>40&&(this.error=o.noop),t>30&&(this.warn=o.noop),t>20&&(this.info=o.noop),t>10&&(this.debug=o.noop)},t.prototype.fallback=function(t){var e=Array.from(arguments);e[0]=this.prefix+r[t]+" "+e[0],(0,o.isFunction)(s.log)&&s.log.apply(s,e)},t.prototype.write=function(t){var e=this.logLevel,n=Array.from(arguments).slice(1);this.prefix.length&&n.unshift(this.prefix),40===t&&e<=40?this.writeErr.apply(s,n):30===t&&e<=30?this.writeWarn.apply(s,n):20===t&&e<=20?this.writeInfo.apply(s,n):10===t&&e<=10&&this.writeDebug.apply(s,n)},t}()},function(t,e,n){"use strict";function i(){Array.from||(Array.prototype.from=function(t){return[].slice.call(t)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e,n,i=Object(this),o=parseInt(i.length,10)||0,s=parseInt(arguments[1],10)||0;if(0===o)return!1;for(s>=0?e=s:(e=o+s)<0&&(e=0);ethis.length)&&-1!==this.indexOf(t,e)}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t})}e.__esModule=!0,e.polyfill=i},function(t,e,n){"use strict";function i(t){return t}function o(t){var e="";return t.name?e+=" "+t.name:t.id?e+=" "+t.id:t.nodeName&&(e+=" "+t.nodeName),"[HI"+e+"]"}function s(t){if("string"==typeof t){return document.querySelector(t)}return t}function r(t){return p(t)?[t]:t}function a(t,e){if(e.includes(!1))return t.preventDefault(),!0}function l(t){var e,n,i,o=[];for(t=t.split(/ +(?=(?:(?:[^"]*"){2})*[^"]*$)/g),e=0;ee[n]?-1:e[t]t[n+1]&&e.push(n);return e},c=e.ClapperPlugin=function(){function t(e){i(this,t),this.HI=e,this.l=e.l,this.exports={},this.history=[],this.rollingAvg=[],this.calcHistoryAverage=this.calcHistoryAverage.bind(this),this.startClapper=this.startClapper.bind(this),this.stopClapper=this.stopClapper.bind(this)}return t.prototype.init=function(t){var e=this;t.state;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Clapper]"),t.settings.autostartClapper=t.settings.autostartClapper||!1,t.settings.clapThreshold=t.settings.clapThreshold||130,t.settings.autotoggleClapper=t.settings.autotoggleClapper||!0,-1!=t.settings.listenEvents.indexOf("clapper")&&(r?(t.settings.autostartClapper&&this.startClapper(),t.settings.autotoggleClapper&&(t.on("document:hidden",function(){e._started&&e.stopClapper()}),t.on("document:visible",function(){!e._started&&t.settings.autostartClapper&&e.startClapper()}))):(this.startClapper=t.noop,this.stopClapper=t.noop)),this.exports.startClapper=this.startClapper,this.exports.stopClapper=this.stopClapper,this},t.prototype.calcHistoryAverage=function(){var t,e,n=0;for(t=0;t60&&(t.freqData=new Uint8Array(t.analyser.frequencyBinCount),t.analyser.getByteFrequencyData(t.freqData),u=l(t.freqData),h=t.freqData.indexOf(Math.max.apply(null,t.freqData)),t.freqData[h],p=t.freqData[h]-t.rollingAvg[h],s>=240&&h<8&&p>t.HI.settings.clapThreshold&&(d=a(t.freqData.slice(0,10))/a(t.freqData.slice(10,20)),f=a(t.freqData.slice(0,3))/a(t.freqData.slice(3,6)),d<1.8&&f<1.4&&u.length>2&&(c="clap",s<480&&(c="doubleclap",o=g,r<720&&(c="applause")),t.HI._addDown(c),t.HI._handleDownEvents(),t.HI._handleSeqEvents(),t.HI._removeDown(c),i=g)),n=g,i!=g&&(t.history.push(t.freqData),t.history.length>50&&t.history.shift(),t.calcHistoryAverage()))}};this.context=new r,this.scriptProcessor=this.context.createScriptProcessor(1024,1,1),this.analyser=this.context.createAnalyser(),this.freqData=new Uint8Array(this.analyser.frequencyBinCount),this.log.debug(this.l("Starting clap detection")),this._started=!0,navigator.mediaDevices.getUserMedia({audio:!0}).then(e,function(e){t.log.error(t.l("Could not get audio stream"),e)})},t.prototype.stopClapper=function(){this.log.debug(this.l("Stopping clap detection")),this.stream.getAudioTracks().forEach(function(t){t.stop()}),this.stream.getVideoTracks().forEach(function(t){t.stop()}),this.streamSource.disconnect(this.analyser),this.analyser.disconnect(this.scriptProcessor),this.scriptProcessor.disconnect(this.context.destination),this._started=!1},t}();s.default.plugins.push(c)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ClipboardPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents=r.default.defaultListenEvents.concat(["cut","copy","paste","select"]);var a=e.ClipboardPlugin=function(){function t(e){i(this,t),this.HI=e,e._clipboard=this._clipboard.bind(e),this._paste=this._clipboard,this._copy=this._clipboard,this._cut=this._clipboard,e._select=this._select.bind(e),this._input=this._select}return t.prototype.init=function(t){return this},t.prototype._clipboard=function(t){var e,n=t.type+':"';if(this.filter(t)&&(window.clipboardData?e=window.clipboardData.getData("Text"):t.clipboardData&&(e=t.clipboardData.getData("text/plain")),e||"copy"!=t.type&&"cut"!=t.type||(e=this.getSelText()),e)){var i=this._triggerWithSelectors(t.type,[t,e]);i=i.concat(this._triggerWithSelectors(n+e+'"',[t])),(0,o.handlePreventDefault)(t,i)}},t.prototype._select=function(t){var e=t.type+':"';if("select"==t.type)var n=this.getSelText();else if("input"==t.type)var n=t.data||t.target.value;if(this.filter(t)){var i=this._triggerWithSelectors(t.type,[t,n]);n&&(i=i.concat(this._triggerWithSelectors(e+n+'"',[t])),(0,o.handlePreventDefault)(t,i))}},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sine",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,o=c.createGain(),s=c.createOscillator();s.connect(o),o.connect(c.destination),s.frequency.value=e,o.gain.value=i,s.type=n,s.start(),setTimeout(function(){s.stop()},t||50)}e.__esModule=!0,e.FeedbackPlugin=void 0;var s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s),a=n(1),l=n(3),c=new(window.AudioContext||window.webkitAudioContext||window.audioContext),u=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:left:down","pointer:middle:down","pointer:right:down","scroll:up","scroll:down","scroll:left","scroll:right"],h=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:down"],p=["pointer:down"],d=e.FeedbackPlugin=function(){function t(e){return i(this,t),this.HI=e,this.l=e.l,this.exports={beep:o},this.vibrationInterval=null,this}return t.prototype.init=function(t){var e=this;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Feedback]"),this.lastActivity=new Date,this.timeout=null,t.settings.visualEvents=t.settings.visualEvents||u,t.settings.audioEvents=t.settings.audioEvents||h,t.settings.vibrationEvents=t.settings.vibrationEvents||p,t.settings.visualFeedback=t.settings.visualFeedback||!1,t.settings.audioFeedback=t.settings.audioFeedback||!1,t.settings.vibrationFeedback=t.settings.vibrationFeedback||!1,t.settings.feedbackClass=t.settings.feedbackClass||"event",this.feedbackElem=(0,a.getNode)(t.settings.feedbackElem),this.feedbackElem||(this.feedbackElem=(0,a.getNode)("#hi_feedback")),this.feedbackElem||(t.settings.feedbackElem="#hi_feedback",this.feedbackStyle=document.createElement("style"),this.feedbackStyle.type="text/css",this.feedbackStyle.appendChild(document.createTextNode("\n#hi_feedback {\n position: fixed;\n top: 1em;\n right: 1em;\n align-items: flex-end;\n justify-content: flex-end;\n font-size: 2em;\n display: flex;\n flex-flow: row wrap;\n width: 8em;\n}\n\n#hi_feedback .event {\n transition: all .5s ease-in-out;\n transform-origin: right bottom;\n opacity: 0;\n border: black .15rem solid;\n border-radius: .2em;\n text-align: center;\n padding: .2rem;\n min-width: 1em;\n padding: .2em;\n background-color: rgba(0,0,0,0.7);\n color: #fff;\n z-index: 9999;\n}\n")),document.body.appendChild(this.feedbackStyle),this.feedbackElem=document.createElement("div"),this.feedbackElem.id="hi_feedback",t.elem!==window?t.elem.appendChild(this.feedbackElem):document.body.appendChild(this.feedbackElem)),t.settings.visualFeedback&&t.on(t.settings.visualEvents,this.visualEvent,this),t.settings.audioFeedback&&t.on(t.settings.audioEvents,this.audioEvent,this),t.settings.vibrationFeedback&&(t.on(t.settings.vibrationEvents,this.vibrationEvent,this),t.settings.vibrationEvents.forEach(function(n){n.endsWith("down")&&t.on(n.split("down",1)[0]+"up",e.stopVibration,e)})),this},t.prototype.containsModifiers=function(t,e,n){return l.AllModifiers.includes(t)},t.prototype.visualEvent=function(t){var e=this.HIEvent,n=["cut","copy","paste","select"],i=HI.getDown(),o=document.createElement("div");if(o.classList.add(this.HI.settings.feedbackClass),n.includes(t.type)&&(arguments.length<=1?0:arguments.length-1))o.innerHTML=e+":"+(arguments.length<=1?void 0:arguments[1]);else if("keydown"==t.type)e=arguments.length<=1?void 0:arguments[1],o.innerHTML=e,l.AllModifiers.includes(e)&&!i.includes("-")?o.innerHTML=e.toLowerCase():HI.state.down.some(this.containsModifiers)&&(o.innerHTML=i);else if(e.startsWith("pointer")){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width",100),s.setAttribute("height",100),s.style.position="fixed",s.style.top=t.clientY-50+"px",s.style.left=t.clientX-50+"px",s.style.transition="all .33s ease-out",s.style.transform="scale(0.1)",s.style.zIndex=1e4,s.innerHTML='',document.body.appendChild(s),setTimeout(function(){s.style.transform="scale(2)",s.style.opacity=0,setTimeout(function(){s.parentNode.removeChild(s)},500)},10),e.includes(":down")&&(e=e.substr(0,e.length-5)),o.innerHTML=e}else i.length?o.innerHTML=i:o.innerHTML=e;o.style.opacity=1,this.feedbackElem.appendChild(o),setTimeout(function(){o.style.opacity=0,showEventTimeout=setTimeout(function(){o.parentNode.removeChild(o)},500)},1e3)},t.prototype.audioEvent=function(t){o(33,500,"triangle")},t.prototype.startVibration=function(){navigator.vibrate(150)},t.prototype.stopVibration=function(){clearInterval(this.vibrationInterval),navigator.vibrate(0)},t.prototype.vibrationEvent=function(t){navigator.vibrate(150),clearInterval(this.vibrationInterval),this.vibrationInterval=setInterval(this.startVibration,100)},t}();r.default.plugins.push(d)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.GamepadPlugin=void 0;var o=(n(1),n(2)),s=function(t){return t&&t.__esModule?t:{default:t}}(o),r=function(t){for(var e=navigator.getGamepads(),n=0;nthis.idleTimeout?this.HI.trigger("idle",this.lastActivity):this.timeout=setTimeout(this.idleCheck,this.idleCheckInterval)},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.PointerPlugin=void 0;var o,s=n(1),r=n(2),a=function(t){return t&&t.__esModule?t:{default:t}}(r),l=["pan","mousedown","mouseup","touchstart","touchend","touchcancel","wheel"],c=["pointermove"];a.default.defaultListenEvents=a.default.defaultListenEvents.concat(l),c=["mousemove","touchmove"];var u=e.PointerPlugin=function(){function t(e){var n=this;i(this,t),this.HI=e,["_click","_dragendPointerup","_pointerdown","_pointerup","_pointercancel","_pointerMoveCheck","_trackMotion","_wheel"].forEach(function(t){e[t]=n[t].bind(e)}),e.on("hold",function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,e._pointerMoveCheck,!0),(0,s.addListeners)(window,c,e._pointerMoveCheck,!0))}),e._mousedown=e._pointerdown,e._touchstart=e._pointerdown,e._mouseup=e._pointerup,e._touchend=e._pointerup,e._touchcancel=e._pointercancel,e._tap=e._click,e.on("hi:resetstates",this._resetStates,e),e.on("hi:removedown",function(t){(0,s.removeListeners)(window,c,e._pointerMoveCheck,!0)}),e.on("hold",this._holdCheck,e)}return t.prototype.init=function(t){var e=t.state;return e.multitap=0,e.pointerCount=0,e.pointers={},e.scrollX=0,e.scrollY=0,(0,s.removeListeners)(window,c,t._pointerMoveCheck,!0),(0,s.removeListeners)(t.elem,c,t._trackMotion,!0),this.exports={mouse:this.mouse},this},t.prototype._resetStates=function(){(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.removeListeners)(this.elem,c,this._trackMotion,!0),this.state.pointers={},this.state.pointerCount=0},t.prototype._holdCheck=function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.addListeners)(window,c,this._pointerMoveCheck,!0))},t.prototype._pointerMoveCheck=function(t){var e,n,i,o,r=this.settings.moveThreshold,a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type)i=t.pointerId||1;else if(l&&l.length)for(var u=0;ur||Math.abs(o.y-n)>r)&&(clearTimeout(this.state.holdTimeout),(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0)))},t.prototype._trackMotion=function(t){var e,n,i=[],o="pan",r={},a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type){if(e=t.pointerId||1,!(n=a[e]))return;n.event=t}else if(l&&l.length)for(var c=0;c1?(o="multitouch:",i=i.concat(this._triggerWithSelectors(o+"pan",[t,a])),i=i.concat(this._triggerWithSelectors(o+this.state.pointerCount+":pan",[t,a]))):i=i.concat(this._triggerWithSelectors(o,[t,r])),(0,s.handlePreventDefault)(t,i))},t.prototype._dragendPointerup=function(t){var e=t.pointerId||1,n=this.state.pointers,i={bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,isPrimary:!0,layerX:t.layerX,layerY:t.layerY,offsetX:t.offsetX,offsetY:t.offsetY,pageX:t.pageX,pageY:t.pageY,pointerId:e,pressure:t.pressure||0,relatedTarget:window,screenX:t.screenX,screenY:t.screenY,target:t.target,tiltX:t.tiltX||0,tiltY:t.tiltY||0,view:window,x:t.x,y:t.y};new MouseEvent("mouseup",i);n[e]&&(this._pointerup(t),window.removeEventListener("dragend",this._dragendPointerup,!0))},t.prototype._pointerdown=function(t){var e,n,i=this.state,r=this.mouse(t),a=t.changedTouches,l=t.pointerType,u="pointer",h=":down";if("mousedown"!=t.type||!o){if(l||"mousedown"==t.type)e=t.pointerId||1,i.pointers[e]={x:t.clientX,y:t.clientY,event:t,timestamp:Date.now()};else if(a&&a.length){for(var p=0;p1||this.settings.listenEvents.includes("pan"))&&((0,s.removeListeners)(window,c,this._trackMotion,!0),(0,s.addListeners)(window,c,this._trackMotion,!0)),this._addDown(u+":"+r.buttonName),this._resetSeqTimeout(),this.filter(t)&&(n=this._triggerWithSelectors(u+h,[t]),void 0!==r.buttonName&&(u+=":"+r.buttonName,n=n.concat(this._triggerWithSelectors(u+h,[t]))),n=n.concat(this._handleDownEvents(t)),(0,s.handlePreventDefault)(t,n))}},t.prototype._pointerup=function(t){var e,n,i,r,a=this.state,l=this.settings.moveThreshold,u=t.clientX,h=t.clientY,p=a.pointers,d={},f=t.changedTouches,g=t.pointerType,v=this.settings.swipeThreshold,m="pointer:",w=this.filter(t);if("mouseup"==t.type&&o)return void(o=!1);if(g||"mouseup"==t.type)e=t.pointerId||1;else if(f&&f.length)for(var y=0;yMath.abs(d.y)?d.x>v?i+="left":d.x<-v&&(i+="right"):d.y>v?i+="up":d.y<-v&&(i+="down")),o=!1,delete p[e],a.pointerCount--,a.pointerCount>0?d.x0?n=n.concat(this._doDownEvent("wheel:down",t)):t.deltaY<0&&(n=n.concat(this._doDownEvent("wheel:up",t))),t.deltaZ>0?n=n.concat(this._doDownEvent("wheel:out",t)):t.deltaZ<0&&(n=n.concat(this._doDownEvent("wheel:in",t))),t.deltaX>0?(n=n.concat(this._doDownEvent("wheel:right",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:right",[t])))):t.deltaX<0&&(n=n.concat(this._doDownEvent("wheel:left",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:left",[t])))),(0,s.handlePreventDefault)(t,n)}},t.prototype.mouse=function(t){var e={type:t.type};return"mousemove"!=t.type&&"wheel"!=t.type&&(0===t.button?(e.left=!0,e.buttonName="left"):1===t.button?(e.middle=!0,e.buttonName="middle"):2===t.button?(e.right=!0,e.buttonName="right"):3===t.button?(e.back=!0,e.buttonName="back"):4===t.button?(e.forward=!0,e.buttonName="forward"):5===t.button?(e.forward=!0,e.buttonName="eraser"):e.buttonName=t.button),e.button=t.button,e},t}();a.default.plugins.push(u)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ScrollPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("scroll");var a=e.ScrollPlugin=function(){function t(e){i(this,t),this.HI=e,e._scroll=(0,o.debounce)(this._scroll.bind(e),50),e.on("hi:resetstates",this._resetStates,e)}return t.prototype.init=function(t){var e=t.state;return e.scrollX=0,e.scrollY=0,this},t.prototype._resetStates=function(){this.state.scrollX=0,this.state.scrollY=0},t.prototype._scroll=function(t){var e,n,i,s=this.state,r=t.target,a=r.scrollLeft,l=r.scrollTop;r.scrollingElement&&(a=r.scrollingElement.scrollLeft,l=r.scrollingElement.scrollTop),n=a-s.scrollX,0===(i=l-s.scrollY)&&0===n||(e=this._triggerWithSelectors(t.type,[t,{x:n,y:i}]),void 0!==a&&a!==s.scrollX&&(n=Math.abs(n),e=a>s.scrollX?e.concat(this._triggerWithSelectors(t.type+":right",[t,n])):e.concat(this._triggerWithSelectors(t.type+":left",[t,n])),s.scrollX=a),void 0!==l&&l!==s.scrollY&&(i=Math.abs(i),e=l>s.scrollY?e.concat(this._triggerWithSelectors(t.type+":down",[t,i])):e.concat(this._triggerWithSelectors(t.type+":up",[t,i])),s.scrollY=l),(0,o.handlePreventDefault)(t,e))},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.SpeechRecPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("speech");var a=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||window.oSpeechRecognition,l=e.SpeechRecPlugin=function(){function t(e){return i(this,t),this.exports={startSpeechRec:this.startSpeechRec.bind(this),stopSpeechRec:this.stopSpeechRec.bind(this)},this.HI=e,this.l=e.l,this.log=new e.Logger(e.settings.logLevel||"INFO","[HI SpeechRec]"),this._rtSpeech=[],this._rtSpeechTimer=null,this}return t.prototype.init=function(){var t=this,e=this.HI,n=e.settings;return n.autostartSpeech=n.autostartSpeech||!1,n.listenEvents.includes("speech")&&(a?(n.autostartSpeech&&this.startSpeechRec(),e.on("document:hidden",function(){t._started&&t.stopSpeechRec()}),e.on("document:visible",function(){!t._started&&n.autostartSpeech&&t.startSpeechRec()})):(this.startSpeechRec=o.noop,this.stopSpeechRec=o.noop)),this},t.prototype.startSpeechRec=function(){var t=this,e=this.HI;this._recognition=new a,this.log.debug(this.l("Starting speech recognition"),this._recognition),this._recognition.lang=e.settings.speechLang||navigator.language||"en-US",this._recognition.continuous=!0,this._recognition.interimResults=!0,this._recognition.onresult=function(e){for(var n=e.resultIndex;nthis.settings.maxSequenceBuf&&n.shift(),n.length>1)){for(var s=this._seqCombinations(n),r=0;r1&&(t=this._handleShifted(n),e=e.concat(this._seqCombinations([n],"->")),t&&(e=e.concat(this._seqCombinations([o],"->")))),n.length>1&&((0,c.sortEvents)(n),e=e.concat(this._seqCombinations([n]))),t&&((0,c.sortEvents)(o),e=e.concat(this._seqCombinations([o])))}return e},e.prototype._keydown=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type,l=this.filter(t),u=this.scope+"faceplant";return t.repeat&&l&&this.settings.noKeyRepeat?(t.preventDefault(),!1):"Compose"==(r=this._normSpecial(o,r,s))?void(n.composing=!0):(n.down.includes(r)||this._addDown(r,s),this._resetSeqTimeout(),void(l&&(e=this._triggerWithSelectors(a,[t,r,s]),e=e.concat(this._triggerWithSelectors(a+=":"+r.toLowerCase(),[t,r,s])),n.down.length>5&&(e=e.concat(this.trigger(u,t))),b&&(e=e.concat(this._handleDownEvents(t,r,s))),(0,c.handlePreventDefault)(t,e))))},e.prototype._keypress=function(t){var e=t.charCode||t.which,n=t.key||String.fromCharCode(e);!b&&e>47&&n.length&&(this.state.down.pop(),this.state.down.push(n))},e.prototype._keyup=function(t){var e,n=this.state,i=t.which||t.keyCode,o=t.location||0,s=this.keyMaps[o][i]||this.keyMaps[0][i]||t.code,r=t.key||s,a=t.type;if(r=this._normSpecial(o,r,s),l.MACOS&&l.OSKEYS.includes(r)){for(var u=[],h=0;h")||(t=(0,s.normCombo)(t))),n||(n={});var u={callback:e,context:n,times:i};o.events[t]||(o.events[t]=[]),o.events[t].push(u)}),this},t.prototype.once=function(t,e,n){return this.on(t,e,n,1)},t.prototype.off=function(t,e,n){if(arguments.length){t=t?(0,s.normEvents)(t):Object.keys(this.events);for(var i in t){var o=t[i],r=this.events[o];if(r){var a=[];if(!n&&!e){delete this.events[o];break}for(var l=0;l1&&!isNaN(e)&&(e=parseInt(e)),o[t][o[t][e]]=e})}(p)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.Logger=void 0;var o=n(1),s=window.console,r={40:"ERROR",30:"WARNING",20:"INFO",10:"DEBUG",ERROR:40,WARNING:30,INFO:20,DEBUG:10};e.Logger=function(){function t(e,n){i(this,t),this.prefix=n,this.setLevel(e),this.writeErr=this.fallback,this.writeWarn=this.fallback,this.writeInfo=this.fallback,this.writeDebug=this.fallback,(0,o.isFunction)(s.error)&&(this.writeErr=s.error),(0,o.isFunction)(s.warn)&&(this.writeWarn=s.warn),(0,o.isFunction)(s.info)&&(this.writeInfo=s.info),(0,o.isFunction)(s.debug)&&(this.writeDebug=s.debug)}return t.prototype.setLevel=function(t){t=t.toUpperCase(),this.error=this.write.bind(this,40),this.warn=this.write.bind(this,30),this.info=this.write.bind(this,20),this.debug=this.write.bind(this,10),this.logLevel=t,isNaN(t)&&(this.logLevel=t=r[t]),t>40&&(this.error=o.noop),t>30&&(this.warn=o.noop),t>20&&(this.info=o.noop),t>10&&(this.debug=o.noop)},t.prototype.fallback=function(t){var e=Array.from(arguments);e[0]=this.prefix+r[t]+" "+e[0],(0,o.isFunction)(s.log)&&s.log.apply(s,e)},t.prototype.write=function(t){var e=this.logLevel,n=Array.from(arguments).slice(1);this.prefix.length&&n.unshift(this.prefix),40===t&&e<=40?this.writeErr.apply(s,n):30===t&&e<=30?this.writeWarn.apply(s,n):20===t&&e<=20?this.writeInfo.apply(s,n):10===t&&e<=10&&this.writeDebug.apply(s,n)},t}()},function(t,e,n){"use strict";function i(){Array.from||(Array.prototype.from=function(t){return[].slice.call(t)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e,n,i=Object(this),o=parseInt(i.length,10)||0,s=parseInt(arguments[1],10)||0;if(0===o)return!1;for(s>=0?e=s:(e=o+s)<0&&(e=0);ethis.length)&&-1!==this.indexOf(t,e)}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t})}e.__esModule=!0,e.polyfill=i},function(t,e,n){"use strict";function i(t){return t}function o(t){var e="";return t.name?e+=" "+t.name:t.id?e+=" "+t.id:t.nodeName&&(e+=" "+t.nodeName),"[HI"+e+"]"}function s(t){if("string"==typeof t){return document.querySelector(t)}return t}function r(t){return p(t)?[t]:t}function a(t,e){if(e.includes(!1))return t.preventDefault(),!0}function l(t){var e,n,i,o=[];for(t=t.split(/ +(?=(?:(?:[^"]*"){2})*[^"]*$)/g),e=0;ee[n]?-1:e[t]t[n+1]&&e.push(n);return e},c=e.ClapperPlugin=function(){function t(e){i(this,t),this.HI=e,this.l=e.l,this.exports={},this.history=[],this.rollingAvg=[],this.calcHistoryAverage=this.calcHistoryAverage.bind(this),this.startClapper=this.startClapper.bind(this),this.stopClapper=this.stopClapper.bind(this)}return t.prototype.init=function(t){var e=this;t.state;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Clapper]"),t.settings.autostartClapper=t.settings.autostartClapper||!1,t.settings.clapThreshold=t.settings.clapThreshold||130,t.settings.autotoggleClapper=t.settings.autotoggleClapper||!0,-1!=t.settings.listenEvents.indexOf("clapper")&&(r?(t.settings.autostartClapper&&this.startClapper(),t.settings.autotoggleClapper&&(t.on("document:hidden",function(){e._started&&e.stopClapper()}),t.on("document:visible",function(){!e._started&&t.settings.autostartClapper&&e.startClapper()}))):(this.startClapper=t.noop,this.stopClapper=t.noop)),this.exports.startClapper=this.startClapper,this.exports.stopClapper=this.stopClapper,this},t.prototype.calcHistoryAverage=function(){var t,e,n=0;for(t=0;t60&&(t.freqData=new Uint8Array(t.analyser.frequencyBinCount),t.analyser.getByteFrequencyData(t.freqData),u=l(t.freqData),h=t.freqData.indexOf(Math.max.apply(null,t.freqData)),t.freqData[h],p=t.freqData[h]-t.rollingAvg[h],s>=240&&h<8&&p>t.HI.settings.clapThreshold&&(d=a(t.freqData.slice(0,10))/a(t.freqData.slice(10,20)),f=a(t.freqData.slice(0,3))/a(t.freqData.slice(3,6)),d<1.8&&f<1.4&&u.length>2&&(c="clap",s<480&&(c="doubleclap",o=g,r<720&&(c="applause")),t.HI._addDown(c),t.HI._handleDownEvents(),t.HI._handleSeqEvents(),t.HI._removeDown(c),i=g)),n=g,i!=g&&(t.history.push(t.freqData),t.history.length>50&&t.history.shift(),t.calcHistoryAverage()))}};this.context=new r,this.scriptProcessor=this.context.createScriptProcessor(1024,1,1),this.analyser=this.context.createAnalyser(),this.freqData=new Uint8Array(this.analyser.frequencyBinCount),this.log.debug(this.l("Starting clap detection")),this._started=!0,navigator.mediaDevices.getUserMedia({audio:!0}).then(e,function(e){t.log.error(t.l("Could not get audio stream"),e)})},t.prototype.stopClapper=function(){this.log.debug(this.l("Stopping clap detection")),this.stream.getAudioTracks().forEach(function(t){t.stop()}),this.stream.getVideoTracks().forEach(function(t){t.stop()}),this.streamSource.disconnect(this.analyser),this.analyser.disconnect(this.scriptProcessor),this.scriptProcessor.disconnect(this.context.destination),this._started=!1},t}();s.default.plugins.push(c)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ClipboardPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents=r.default.defaultListenEvents.concat(["cut","copy","paste","select"]);var a=e.ClipboardPlugin=function(){function t(e){i(this,t),this.HI=e,e._clipboard=this._clipboard.bind(e),this._paste=this._clipboard,this._copy=this._clipboard,this._cut=this._clipboard,e._select=this._select.bind(e),this._input=this._select}return t.prototype.init=function(t){return this},t.prototype._clipboard=function(t){var e,n=t.type+':"';if(this.filter(t)&&(window.clipboardData?e=window.clipboardData.getData("Text"):t.clipboardData&&(e=t.clipboardData.getData("text/plain")),e||"copy"!=t.type&&"cut"!=t.type||(e=this.getSelText()),e)){var i=this._triggerWithSelectors(t.type,[t,e]);i=i.concat(this._triggerWithSelectors(n+e+'"',[t])),(0,o.handlePreventDefault)(t,i)}},t.prototype._select=function(t){var e=t.type+':"';if("select"==t.type)var n=this.getSelText();else if("input"==t.type)var n=t.data||t.target.value;if(this.filter(t)){var i=this._triggerWithSelectors(t.type,[t,n]);n&&(i=i.concat(this._triggerWithSelectors(e+n+'"',[t])),(0,o.handlePreventDefault)(t,i))}},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sine",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,o=c.createGain(),s=c.createOscillator();s.connect(o),o.connect(c.destination),s.frequency.value=e,o.gain.value=i,s.type=n,s.start(),setTimeout(function(){s.stop()},t||50)}e.__esModule=!0,e.FeedbackPlugin=void 0;var s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s),a=n(1),l=n(3),c=new(window.AudioContext||window.webkitAudioContext||window.audioContext),u=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:left:down","pointer:middle:down","pointer:right:down","scroll:up","scroll:down","scroll:left","scroll:right"],h=["keydown","dblclick","wheel:down","wheel:up","wheel:left","wheel:right","pointer:down"],p=["pointer:down"],d=e.FeedbackPlugin=function(){function t(e){return i(this,t),this.HI=e,this.l=e.l,this.exports={beep:o},this.vibrationInterval=null,this}return t.prototype.init=function(t){var e=this;return this.log=new t.Logger(t.settings.logLevel||"INFO","[HI Feedback]"),this.lastActivity=new Date,this.timeout=null,t.settings.visualEvents=t.settings.visualEvents||u,t.settings.audioEvents=t.settings.audioEvents||h,t.settings.vibrationEvents=t.settings.vibrationEvents||p,t.settings.visualFeedback=t.settings.visualFeedback||!1,t.settings.audioFeedback=t.settings.audioFeedback||!1,t.settings.vibrationFeedback=t.settings.vibrationFeedback||!1,t.settings.feedbackClass=t.settings.feedbackClass||"event",this.feedbackElem=(0,a.getNode)(t.settings.feedbackElem),this.feedbackElem||(this.feedbackElem=(0,a.getNode)("#hi_feedback")),this.feedbackElem||(t.settings.feedbackElem="#hi_feedback",this.feedbackStyle=document.createElement("style"),this.feedbackStyle.type="text/css",this.feedbackStyle.appendChild(document.createTextNode("\n#hi_feedback {\n position: fixed;\n top: 1em;\n right: 1em;\n align-items: flex-end;\n justify-content: flex-end;\n font-size: 2em;\n display: flex;\n flex-flow: row wrap;\n width: 8em;\n}\n\n#hi_feedback .event {\n transition: all .5s ease-in-out;\n transform-origin: right bottom;\n opacity: 0;\n border: black .15rem solid;\n border-radius: .2em;\n text-align: center;\n padding: .2rem;\n min-width: 1em;\n padding: .2em;\n background-color: rgba(0,0,0,0.7);\n color: #fff;\n z-index: 9999;\n}\n")),document.body.appendChild(this.feedbackStyle),this.feedbackElem=document.createElement("div"),this.feedbackElem.id="hi_feedback",t.elem!==window?t.elem.appendChild(this.feedbackElem):document.body.appendChild(this.feedbackElem)),t.settings.visualFeedback&&t.on(t.settings.visualEvents,this.visualEvent,this),t.settings.audioFeedback&&t.on(t.settings.audioEvents,this.audioEvent,this),t.settings.vibrationFeedback&&(t.on(t.settings.vibrationEvents,this.vibrationEvent,this),t.settings.vibrationEvents.forEach(function(n){n.endsWith("down")&&t.on(n.split("down",1)[0]+"up",e.stopVibration,e)})),this},t.prototype.containsModifiers=function(t,e,n){return l.AllModifiers.includes(t)},t.prototype.visualEvent=function(t){var e=this.HIEvent,n=["cut","copy","paste","select"],i=HI.getDown(),o=document.createElement("div");if(o.classList.add(this.HI.settings.feedbackClass),n.includes(t.type)&&(arguments.length<=1?0:arguments.length-1))o.innerHTML=e+":"+(arguments.length<=1?void 0:arguments[1]);else if("keydown"==t.type)e=arguments.length<=1?void 0:arguments[1],o.innerHTML=e,l.AllModifiers.includes(e)&&!i.includes("-")?o.innerHTML=e.toLowerCase():HI.state.down.some(this.containsModifiers)&&(o.innerHTML=i);else if(e.startsWith("pointer")){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width",100),s.setAttribute("height",100),s.style.position="fixed",s.style.top=t.clientY-50+"px",s.style.left=t.clientX-50+"px",s.style.transition="all .33s ease-out",s.style.transform="scale(0.1)",s.style.zIndex=1e4,s.innerHTML='',document.body.appendChild(s),setTimeout(function(){s.style.transform="scale(2)",s.style.opacity=0,setTimeout(function(){s.parentNode.removeChild(s)},500)},10),e.includes(":down")&&(e=e.substr(0,e.length-5)),o.innerHTML=e}else i.length?o.innerHTML=i:o.innerHTML=e;o.style.opacity=1,this.feedbackElem.appendChild(o),setTimeout(function(){o.style.opacity=0,showEventTimeout=setTimeout(function(){o.parentNode.removeChild(o)},500)},1e3)},t.prototype.audioEvent=function(t){o(33,500,"triangle")},t.prototype.startVibration=function(){navigator.vibrate(150)},t.prototype.stopVibration=function(){clearInterval(this.vibrationInterval),navigator.vibrate(0)},t.prototype.vibrationEvent=function(t){navigator.vibrate(150),clearInterval(this.vibrationInterval),this.vibrationInterval=setInterval(this.startVibration,100)},t}();r.default.plugins.push(d)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.GamepadPlugin=void 0;var o=(n(1),n(2)),s=function(t){return t&&t.__esModule?t:{default:t}}(o),r=function(t){for(var e=navigator.getGamepads(),n=0;nthis.idleTimeout?this.HI.trigger("idle",this.lastActivity):this.timeout=setTimeout(this.idleCheck,this.idleCheckInterval)},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.PointerPlugin=void 0;var o,s=n(1),r=n(2),a=function(t){return t&&t.__esModule?t:{default:t}}(r),l=["pan","mousedown","mouseup","touchstart","touchend","touchcancel","wheel"],c=["pointermove"];a.default.defaultListenEvents=a.default.defaultListenEvents.concat(l),c=["mousemove","touchmove"];var u=e.PointerPlugin=function(){function t(e){var n=this;i(this,t),this.HI=e,["_click","_dragendPointerup","_pointerdown","_pointerup","_pointercancel","_pointerMoveCheck","_trackMotion","_wheel"].forEach(function(t){e[t]=n[t].bind(e)}),e.on("hold",function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,e._pointerMoveCheck,!0),(0,s.addListeners)(window,c,e._pointerMoveCheck,!0))}),e._mousedown=e._pointerdown,e._touchstart=e._pointerdown,e._mouseup=e._pointerup,e._touchend=e._pointerup,e._touchcancel=e._pointercancel,e._tap=e._click,e.on("hi:resetstates",this._resetStates,e),e.on("hi:removedown",function(t){(0,s.removeListeners)(window,c,e._pointerMoveCheck,!0)}),e.on("hold",this._holdCheck,e)}return t.prototype.init=function(t){var e=t.state;return e.multitap=0,e.pointerCount=0,e.pointers={},e.scrollX=0,e.scrollY=0,(0,s.removeListeners)(window,c,t._pointerMoveCheck,!0),(0,s.removeListeners)(t.elem,c,t._trackMotion,!0),this.exports={mouse:this.mouse},this},t.prototype._resetStates=function(){(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.removeListeners)(this.elem,c,this._trackMotion,!0),this.state.pointers={},this.state.pointerCount=0},t.prototype._holdCheck=function(t){t.includes("pointer:")&&((0,s.removeListeners)(window,c,this._pointerMoveCheck,!0),(0,s.addListeners)(window,c,this._pointerMoveCheck,!0))},t.prototype._pointerMoveCheck=function(t){var e,n,i,o,r=this.settings.moveThreshold,a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type)i=t.pointerId||1;else if(l&&l.length)for(var u=0;ur||Math.abs(o.y-n)>r)&&(clearTimeout(this.state.holdTimeout),(0,s.removeListeners)(window,c,this._pointerMoveCheck,!0)))},t.prototype._trackMotion=function(t){var e,n,i=[],o="pan",r={},a=this.state.pointers,l=t.touches;if(t.pointerType||"mousemove"==t.type){if(e=t.pointerId||1,!(n=a[e]))return;n.event=t}else if(l&&l.length)for(var c=0;c1?(o="multitouch:",i=i.concat(this._triggerWithSelectors(o+"pan",[t,a])),i=i.concat(this._triggerWithSelectors(o+this.state.pointerCount+":pan",[t,a]))):i=i.concat(this._triggerWithSelectors(o,[t,r])),(0,s.handlePreventDefault)(t,i))},t.prototype._dragendPointerup=function(t){var e=t.pointerId||1,n=this.state.pointers,i={bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,isPrimary:!0,layerX:t.layerX,layerY:t.layerY,offsetX:t.offsetX,offsetY:t.offsetY,pageX:t.pageX,pageY:t.pageY,pointerId:e,pressure:t.pressure||0,relatedTarget:window,screenX:t.screenX,screenY:t.screenY,target:t.target,tiltX:t.tiltX||0,tiltY:t.tiltY||0,view:window,x:t.x,y:t.y};new MouseEvent("mouseup",i);n[e]&&(this._pointerup(t),window.removeEventListener("dragend",this._dragendPointerup,!0))},t.prototype._pointerdown=function(t){var e,n,i=this.state,r=this.mouse(t),a=t.changedTouches,l=t.pointerType,u="pointer",h=":down";if("mousedown"!=t.type||!o){if(l||"mousedown"==t.type)e=t.pointerId||1,i.pointers[e]={x:t.clientX,y:t.clientY,event:t,timestamp:Date.now()};else if(a&&a.length){for(var p=0;p1||this.settings.listenEvents.includes("pan"))&&((0,s.removeListeners)(window,c,this._trackMotion,!0),(0,s.addListeners)(window,c,this._trackMotion,!0)),this._addDown(u+":"+r.buttonName),this._resetSeqTimeout(),this.filter(t)&&(n=this._triggerWithSelectors(u+h,[t]),void 0!==r.buttonName&&(u+=":"+r.buttonName,n=n.concat(this._triggerWithSelectors(u+h,[t]))),n=n.concat(this._handleDownEvents(t)),(0,s.handlePreventDefault)(t,n))}},t.prototype._pointerup=function(t){var e,n,i,r,a=this.state,l=this.settings.moveThreshold,u=t.clientX,h=t.clientY,p=a.pointers,d={},f=t.changedTouches,g=t.pointerType,v=this.settings.swipeThreshold,m="pointer:",w=this.filter(t);if("mouseup"==t.type&&o)return void(o=!1);if(g||"mouseup"==t.type)e=t.pointerId||1;else if(f&&f.length)for(var y=0;yMath.abs(d.y)?d.x>v?i+="left":d.x<-v&&(i+="right"):d.y>v?i+="up":d.y<-v&&(i+="down")),o=!1,delete p[e],a.pointerCount--,a.pointerCount>0?d.x0?n=n.concat(this._doDownEvent("wheel:down",t)):t.deltaY<0&&(n=n.concat(this._doDownEvent("wheel:up",t))),t.deltaZ>0?n=n.concat(this._doDownEvent("wheel:out",t)):t.deltaZ<0&&(n=n.concat(this._doDownEvent("wheel:in",t))),t.deltaX>0?(n=n.concat(this._doDownEvent("wheel:right",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:right",[t])))):t.deltaX<0&&(n=n.concat(this._doDownEvent("wheel:left",t)),this.isDown("shift")&&(n=n.concat(this._triggerWithSelectors("wheel:left",[t])))),(0,s.handlePreventDefault)(t,n)}},t.prototype.mouse=function(t){var e={type:t.type};return"mousemove"!=t.type&&"wheel"!=t.type&&(0===t.button?(e.left=!0,e.buttonName="left"):1===t.button?(e.middle=!0,e.buttonName="middle"):2===t.button?(e.right=!0,e.buttonName="right"):3===t.button?(e.back=!0,e.buttonName="back"):4===t.button?(e.forward=!0,e.buttonName="forward"):5===t.button?(e.forward=!0,e.buttonName="eraser"):e.buttonName=t.button),e.button=t.button,e},t}();a.default.plugins.push(u)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.ScrollPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("scroll");var a=e.ScrollPlugin=function(){function t(e){i(this,t),this.HI=e,e._scroll=(0,o.debounce)(this._scroll.bind(e),50),e.on("hi:resetstates",this._resetStates,e)}return t.prototype.init=function(t){var e=t.state;return e.scrollX=0,e.scrollY=0,this},t.prototype._resetStates=function(){this.state.scrollX=0,this.state.scrollY=0},t.prototype._scroll=function(t){var e,n,i,s=this.state,r=t.target,a=r.scrollLeft,l=r.scrollTop;r.scrollingElement&&(a=r.scrollingElement.scrollLeft,l=r.scrollingElement.scrollTop),n=a-s.scrollX,0===(i=l-s.scrollY)&&0===n||(e=this._triggerWithSelectors(t.type,[t,{x:n,y:i}]),void 0!==a&&a!==s.scrollX&&(n=Math.abs(n),e=a>s.scrollX?e.concat(this._triggerWithSelectors(t.type+":right",[t,n])):e.concat(this._triggerWithSelectors(t.type+":left",[t,n])),s.scrollX=a),void 0!==l&&l!==s.scrollY&&(i=Math.abs(i),e=l>s.scrollY?e.concat(this._triggerWithSelectors(t.type+":down",[t,i])):e.concat(this._triggerWithSelectors(t.type+":up",[t,i])),s.scrollY=l),(0,o.handlePreventDefault)(t,e))},t}();r.default.plugins.push(a)},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.SpeechRecPlugin=void 0;var o=n(1),s=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(s);r.default.defaultListenEvents.push("speech");var a=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||window.oSpeechRecognition,l=e.SpeechRecPlugin=function(){function t(e){return i(this,t),this.exports={startSpeechRec:this.startSpeechRec.bind(this),stopSpeechRec:this.stopSpeechRec.bind(this)},this.HI=e,this.l=e.l,this.log=new e.Logger(e.settings.logLevel||"INFO","[HI SpeechRec]"),this._rtSpeech=[],this._rtSpeechTimer=null,this}return t.prototype.init=function(){var t=this,e=this.HI,n=e.settings;return n.autostartSpeech=n.autostartSpeech||!1,n.listenEvents.includes("speech")&&(a?(n.autostartSpeech&&this.startSpeechRec(),e.on("document:hidden",function(){t._started&&t.stopSpeechRec()}),e.on("document:visible",function(){!t._started&&n.autostartSpeech&&t.startSpeechRec()})):(this.startSpeechRec=o.noop,this.stopSpeechRec=o.noop)),this},t.prototype.startSpeechRec=function(){var t=this,e=this.HI;this._recognition=new a,this.log.debug(this.l("Starting speech recognition"),this._recognition),this._recognition.lang=e.settings.speechLang||navigator.language||"en-US",this._recognition.continuous=!0,this._recognition.interimResults=!0,this._recognition.onresult=function(e){for(var n=e.resultIndex;n