!function(t,n){"object"===typeofexports&&"object"===typeofmodule?module.exports=n():"function"===typeofdefine&&define.amd?define([],n):"object"===typeofexports?exports.SimpleKeyboard=n():t.SimpleKeyboard=n()}(this,function(){returnfunction(t){functionn(o){if(e[o])returne[o].exports;vari=e[o]={i:o,l:!1,exports:{}};returnt[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}vare={};returnn.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){vare=t&&t.__esModule?function(){returnt.default}:function(){returnt};returnn.d(e,"a",e),e},n.o=function(t,n){returnObject.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=0)}([function(t,n,e){t.exports=e(1)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});varo=e(2);n.default=o.a},function(t,n,e){"use strict";functiono(t,n){if(!(tinstanceofn))thrownewTypeError("Cannot call a class as a function")}vari=e(3),a=(e.n(i),e(4)),s=e(5),r="function"===typeofSymbol&&"symbol"===typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"===typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},u=functiont(){o(this,t),c.call(this);varn="string"===typeof(arguments.length<=0?void0:arguments[0])?arguments.length<=0?void0:arguments[0]:".simple-keyboard",e="object"===r(arguments.length<=0?void0:arguments[0])?arguments.length<=0?void0:arguments[0]:arguments.length<=1?void0:arguments[1];e||(e={}),this.keyboardDOM=document.querySelector(n),this.options=e,this.options.layoutName=this.options.layoutName||"default",this.options.theme=this.options.theme||"hg-theme-default",this.options.inputName=this.options.inputName||"default",this.input={},this.input[this.options.inputName]="",this.keyboardDOMClass=n.split(".").join(""),this.keyboardDOM?this.render():console.error('"'+n+'" was not found in the DOM.')},c=function(){vart=this;this.handleButtonClicked=function(n){vare=t.options.debug;if("{//}"===n)return!1;"function"===typeoft.options.onKeyPress&&t.options.onKeyPress(n);varo={newLineOnEnter:!0===t.options.newLineOnEnter};t.input[t.options.inputName]||(t.input[t.options.inputName]="");vari=s.a.getUpdatedInput(n,t.input[t.options.inputName],o);t.input[t.options.inputName]!==i&&(t.input[t.options.inputName]=i,e&&console.log("Input changed:",t.input),"function"===typeoft.options.onChange&&t.options.onChange(t.input[t.options.inputName])),e&&console.log("Key pressed:",n)},this.clearInput=function(n){n=n||t.options.inputName,t.input[t.options.inputName]=""},this.getInput=function(n){returnn=n||t.options.inputName,t.input[t.options.inputName]},this.setInput=function(n,e){e=e||t.options.inputName,t.input[e]=n},this.setOptions=function(n){n=n||{},t.options=Object.assign(t.options,n),t.render()},this.clear=function(){t.keyboardDOM.innerHTML="",t.keyboardDOM.className=t.keyboardDOMClass},this.render=function(){t.clear();varn=t.options.layout?"hg-layout-custom":"hg-layout-"+t.options.layoutName,e=t.options.layout||a.a.getLayout(t.options.layoutName),o={};Array.isArray(t.options.buttonTheme)&&t.options.buttonTheme.forEach(function(t){if(t.buttons&&t.class){varn=t.buttons.split(" ");Array.isArray(n)&&n.forEach(function(n){vare=o[n];o[n]=e?e+" "+t.class:t.class})}elseconsole.warn('buttonTheme row is missing the "buttons" or the "class". Please check the documentation.')}),t.keyboardDOM.className+=" "+t.options.theme+" "+n,e[t.options.layoutName].forEach(function(n){vare=n.split(" "),i=document.createElement("div");i.className+="hg-row",e.forEach(function(n){vare=s.a.getButtonClass(n),a=o[n],r=s.a.getButtonDisplayName(n,t.options.display),u=document.createElement("div");u.className+="hg-button "+e+(a?" "+a:""),u.onclick=function(){returnt.handleButtonClicked(n)};varc=document.createElement("span");c.innerHTML=r,u.appendChild(c),i.appendChild(u),"function"===typeoft.options.onInit&&t.options.onInit()}),t.keyboardDOM.appendChild(i)})}};n.a=u},function(t,n){},function(t,n,e){"use strict";functiono(t,n){if(!(tinstanceofn))thrownewType