/*! jQuery UI Virtual Keyboard v1.30.2 */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(h){"use strict";var b=h.keyboard=function(c,o){var p,y=this;y.version="1.30.2",y.$el=h(c),y.el=c,y.$el.data("keyboard",y),y.init=function(){y.initialized=!1,y.isTextArea="textarea"===y.el.nodeName.toLowerCase(),y.isInput="input"===y.el.nodeName.toLowerCase(),y.isContentEditable=!y.isTextArea&&!y.isInput&&y.el.isContentEditable;var e,t,a,i=b.css,n=b.events;if(y.isInput&&h.inArray((y.el.type||"").toLowerCase(),b.supportedInputTypes)<0)throw new TypeError('Input of type "'+y.el.type+'" is not supported; use type text, search, URL, tel or password');y.settings=o||{},o&&o.position&&(t=h.extend({},o.position),o.position=null),y.options=p=h.extend(!0,{},b.defaultOptions,o),t&&(p.position=t,o.position=t),y.el.active=!0,y.namespace=".keyboard"+Math.random().toString(16).slice(2),y.extensionNamespace=[],y.shiftActive=y.altActive=y.metaActive=y.sets=y.capsLock=!1,y.rows=["","-shift","-alt","-alt-shift"],y.inPlaceholder=y.$el.attr("placeholder")||"",y.watermark=b.watermark&&""!==y.inPlaceholder,y.repeatTime=1e3/(p.repeatRate||20),p.preventDoubleEventTime=p.preventDoubleEventTime||100,y.isOpen=!1,y.wheel="function"==typeof h.fn.mousewheel,y.escapeRegex=/[-\/\\^$*+?.()|[\]{}]/g,e=b.keyCodes,y.alwaysAllowed=[e.capsLock,e.pageUp,e.pageDown,e.end,e.home,e.left,e.up,e.right,e.down,e.insert,e.delete],y.$keyboard=[],y.enabled=!0,y.checkCaret=p.lockInput||b.checkCaretSupport(),y.isContentEditable&&(p.usePreview=!1),y.last={start:0,end:0,key:"",val:"",preVal:"",layout:"",virtual:!0,keyset:[!1,!1,!1],wheel_$Keys:[],wheelIndex:0,wheelLayers:[]},y.temp=["",0,0],h.each([n.kbInit,n.kbBeforeVisible,n.kbVisible,n.kbHidden,n.inputCanceled,n.inputAccepted,n.kbBeforeClose,n.inputRestricted],function(e,t){"function"==typeof p[t]&&y.$el.bind(t+y.namespace+"callbacks",p[t])}),p.alwaysOpen&&(p.stayOpen=!0),a=h(document),y.el.ownerDocument!==document&&(a=a.add(y.el.ownerDocument));var s="keyup checkkeyboard mousedown touchstart ";p.closeByClickEvent&&(s+="click "),a.bind(s.split(" ").join(y.namespace+" "),function(e){clearTimeout(y.timer3),y.timer3=setTimeout(function(){y.checkClose(e)},1)}),y.$el.addClass(i.input+" "+p.css.input).attr({"aria-haspopup":"true",role:"textbox"}),(p.lockInput||y.el.readOnly)&&(p.lockInput=!0,y.$el.addClass(i.locked).attr({readonly:"readonly"})),y.isUnavailable()&&y.$el.addClass(i.noKeyboard),p.openOn&&y.bindFocus(),y.watermark||""!==y.getValue(y.$el)||""===y.inPlaceholder||""===y.$el.attr("placeholder")||(y.$el.addClass(i.placeholder),y.setValue(y.inPlaceholder,y.$el)),y.$el.trigger(n.kbInit,[y,y.el]),p.alwaysOpen&&y.reveal(),y.initialized=!0},y.toggle=function(){if(y.hasKeyboard()){var e=y.$keyboard.find("."+b.css.keyToggle),t=!y.enabled;return y.preview.readonly=t||y.options.lockInput,y.$keyboard.toggleClass(b.css.keyDisabled,t).find("."+b.css.keyButton).not(e).attr("aria-disabled",t).each(function(){this.disabled=t}),e.toggleClass(b.css.keyDisabled,t),t&&y.typing_options&&(y.typing_options.text=""),y}},y.setCurrent=function(){var e=b.css,t=h("."+e.isCurrent),a=t.data("keyboard");h.isEmptyObject(a)||a.el===y.el||a.close(!!a.options.autoAccept&&"true"),t.removeClass(e.isCurrent),h("."+e.hasFocus).removeClass(e.hasFocus),y.$el.addClass(e.isCurrent),y.$preview.focus(),y.$keyboard.addClass(e.hasFocus),y.isCurrent(!0),y.isOpen=!0},y.isUnavailable=function(){return y.$el.is(":disabled")||!y.options.activeOnReadonly&&y.$el.attr("readonly")&&!y.$el.hasClass(b.css.locked)},y.isCurrent=function(e){var t=b.currentKeyboard||!1;return e?t=b.currentKeyboard=y.el:!1===e&&t===y.el&&(t=b.currentKeyboard=""),t===y.el},y.hasKeyboard=function(){return y.$keyboard&&0").addClass(n.wrapper).append(y.$preview).prependTo(y.$keyboard)}else y.$preview=y.$el,y.preview=y.el},y.caret=function(e,t){var a=b.caret(y.$preview,e,t);return a instanceof h?(y.saveCaret(a.start,a.end),y):a},y.saveCaret=function(e,t,a){var i;y.isCurrent()&&(i=void 0===e?b.caret(a||y.$preview):b.caret(a||y.$preview,e,t),y.last.start=void 0===e?i.start:e,y.last.end=void 0===t?i.end:t)},y.saveLastChange=function(e){y.last.val=e||y.getValue(y.$preview||y.$el),y.isContentEditable&&(y.last.elms=y.el.cloneNode(!0))},y.setScroll=function(){if(!y.isContentEditable&&y.last.virtual){var e,t,a,i,n=y.last.val.substring(0,Math.max(y.last.start,y.last.end));y.$previewCopy||(y.$previewCopy=y.$preview.clone().removeAttr("id").css({position:"absolute",left:0,zIndex:-10,visibility:"hidden"}).addClass(b.css.inputClone),y.$previewCopy[0].disabled=!0,y.isTextArea||y.$previewCopy.css({"white-space":"pre",width:0}),p.usePreview?y.$preview.after(y.$previewCopy):y.$keyboard.prepend(y.$previewCopy)),y.isTextArea?(y.$previewCopy.height(y.lineHeight).val(n),y.preview.scrollTop=y.lineHeight*(Math.floor(y.$previewCopy[0].scrollHeight/y.lineHeight)-1)):(y.$previewCopy.val(n.replace(/\s/g," ")),a=/c/i.test(p.scrollAdjustment)?y.preview.clientWidth/2:p.scrollAdjustment,e=y.$previewCopy[0].scrollWidth-1,void 0===y.last.scrollWidth&&(y.last.scrollWidth=e,y.last.direction=!0),i=y.last.scrollWidth===e?y.last.direction:y.last.scrollWidth=y.preview.scrollWidth-t?y.preview.scrollLeft=y.preview.scrollWidth-a:y.preview.scrollLeft=0=o.A&&t<=o.Z,i=t>=o.a&&t<=o.z,n=y.last.key=String.fromCharCode(t);if(!(t=o.X&&e.which<=o.Z))return;r.hasMappedKeys&&r.mappedKeys.hasOwnProperty(n)&&(y.last.key=r.mappedKeys[n],y.insertText(y.last.key),e.preventDefault()),"function"==typeof p.beforeInsert&&(y.insertText(y.last.key),e.preventDefault()),y.checkMaxLength()}}}).bind("keyup"+e,function(e){if(y.isCurrent()){switch(y.last.virtual=!1,e.which){case o.tab:if(y.tab&&!p.lockInput){y.shiftActive=e.shiftKey;var t=b.keyaction.tab(y);if(y.tab=!1,!t)return!1}else e.preventDefault();break;case o.escape:return p.ignoreEsc||y.close(!(!p.autoAccept||!p.autoAcceptOnEsc)&&"true"),!1}clearTimeout(y.throttled),y.throttled=setTimeout(function(){y&&y.isVisible()&&y.checkCombos()},100),y.checkMaxLength(),y.last.preVal=""+y.last.val,y.saveLastChange();var a=h.Event(b.events.kbChange);if(a.action=y.last.key,y.$el.trigger(a,[y,y.el]),"function"==typeof p.change)return a.type=b.events.inputChange,p.change(a,y,y.el),!1;p.acceptValid&&p.autoAcceptOnValid&&"function"==typeof p.validate&&p.validate(y,y.getValue(y.$preview))&&(y.$preview.blur(),y.accept())}}).bind("keydown"+e,function(e){if(y.last.keyPress=e.which,p.alwaysOpen&&!y.isCurrent()&&y.reveal(),e.which===o.tab)return!(y.tab=!0);if(p.lockInput||e.timeStamp===y.last.timeStamp)return!p.lockInput;switch(y.last.timeStamp=e.timeStamp,y.last.virtual=!1,e.which){case o.backSpace:b.keyaction.bksp(y,null,e),e.preventDefault();break;case o.enter:b.keyaction.enter(y,null,e);break;case o.capsLock:y.shiftActive=y.capsLock=!y.capsLock,y.showSet();break;case o.V:if(e.ctrlKey||e.metaKey){if(p.preventPaste)return void e.preventDefault();y.checkCombos()}}}).bind("mouseup touchend ".split(" ").join(e+" "),function(){y.last.virtual=!0,y.saveCaret()}),y.$keyboard.bind("mousedown click touchstart ".split(" ").join(y.namespace+" "),function(e){e.stopPropagation(),y.isCurrent()||(y.reveal(),h(y.el.ownerDocument).trigger("checkkeyboard"+y.namespace)),y.setFocus()}),p.preventPaste&&(y.$preview.bind("contextmenu"+y.namespace,function(e){e.preventDefault()}),y.$el.bind("contextmenu"+y.namespace,function(e){e.preventDefault()}))},y.bindButton=function(e,t){var a="."+b.css.keyButton,i=function(e){e.stopPropagation(),e.$target=h(this).closest("."+b.css.keyboard+", ."+b.css.input),t.call(this,e)};return h.fn.on?y.$keyboard.on(e,a,i):h.fn.delegate&&y.$keyboard.delegate(a,e,i),y},y.unbindButton=function(e){return h.fn.off?y.$keyboard.off(e):h.fn.undelegate&&y.$keyboard.undelegate("."+b.css.keyButton,e),y},y.bindKeys=function(){var s=b.css;y.unbindButton(y.namespace+" "+y.namespace+"kb").bindButton("mouseenter mouseleave touchstart ".split(" ").join(y.namespace+" "),function(e){if(!p.alwaysOpen&&!p.userClosed||"mouseleave"===e.type||y.isCurrent()||(y.reveal(),y.setFocus()),y.isCurrent()&&!this.disabled){var t,a,i=y.last,n=h(this),s=e.type;p.useWheel&&y.wheel&&(t=y.getLayers(n),a=(t.length?t.map(function(){return h(this).attr("data-value")||""}).get():"")||[n.text()],i.wheel_$Keys=t,i.wheelLayers=a,i.wheelIndex=h.inArray(n.attr("data-value"),a)),"mouseenter"!==s&&"touchstart"!==s||"password"===y.el.type||n.hasClass(p.css.buttonDisabled)||(n.addClass(p.css.buttonHover),p.useWheel&&y.wheel&&n.attr("title",function(e,t){return y.wheel&&""===t&&y.sets&&1=t.left&&e.originalEvent.touches[0].pageX=t.top&&e.originalEvent.touches[0].pageYn.length-1&&(i=0),i<0&&(i=n.length-1)):i=0,y.last.wheelIndex=i,a.html(n[i]),!1}},30)).bindButton("mousedown touchstart ".split(" ").join(y.namespace+"kb "),function(){var e=h(this);if(e&&(!e.hasClass(s.keyAction)||e.is("."+s.keyPrefix+"tab bksp space enter".split(" ").join(",."+s.keyPrefix))))return 0!==p.repeatRate&&(y.mouseRepeat=[!0,e],setTimeout(function(){y&&y.mouseRepeat[0]&&y.mouseRepeat[1]===e&&!e[0].disabled&&y.repeatKey(e)},p.repeatDelay)),!1})},y.throttleEvent=function(e,t){var a;return function(){a||(e.apply(this,arguments),a=!0,setTimeout(function(){a=!1},t))}},y.execCommand=function(e,t){y.el.ownerDocument.execCommand(e,!1,t),y.el.normalize(),p.reposition&&y.reposition()},y.getValue=function(e){return(e=e||y.$preview)[y.isContentEditable?"text":"val"]()},y.setValue=function(e,t){return t=t||y.$preview,y.isContentEditable?e!==t.text()&&(b.replaceContent(t,e),y.saveCaret()):t.val(e),y},y.insertText=function(e){if(!y.$preview)return y;if("function"==typeof p.beforeInsert&&(e=p.beforeInsert(y.last.event,y,y.el,e)),void 0===e||!1===e)return y.last.key="",y;if(y.isContentEditable)return y.insertContentEditable(e);var t,a=!1,i="\b"===e,n=y.getValue(),s=b.caret(y.$preview),o=n.length;return s.endo&&(s.end=s.start=o),y.isTextArea&&b.msie&&"\n"===n.substring(s.start,s.start+1)&&(s.start+=1,s.end+=1),t=s.start,"{d}"===e&&(e="",s.end+=1),i&&(e="",a=i&&t===s.end&&0p.maxLength&&(e=b.caret(y.$preview).start,t=Math.min(e,p.maxLength),p.maxInsert||(a=y.last.val,t=e-1),y.setValue(a.substring(0,p.maxLength)),y.saveCaret(t,t)),y.$decBtn.length&&y.checkDecimal(),y}},y.repeatKey=function(e){e.trigger(b.events.kbRepeater),y.mouseRepeat[0]&&(y.repeater=setTimeout(function(){y&&y.repeatKey(e)},y.repeatTime))},y.getKeySet=function(){var e=[];return y.altActive&&e.push("alt"),y.shiftActive&&e.push("shift"),y.metaActive&&e.push(y.metaActive),e.length?e.join("+"):"normal"},y.showKeySet=function(e){return"string"==typeof e?(y.last.keyset=[y.shiftActive,y.altActive,y.metaActive],y.shiftActive=/shift/i.test(e),y.altActive=/alt/i.test(e),/\bmeta/.test(e)?(y.metaActive=!0,y.showSet(e.match(/\bmeta[\w-]+/i)[0])):(y.metaActive=!1,y.showSet())):y.showSet(e),y},y.showSet=function(e){if(y.hasKeyboard()){p=y.options;var t=b.css,a="."+t.keyPrefix,i=p.css.buttonActive,n="",s=(y.shiftActive?1:0)+(y.altActive?2:0);if(y.shiftActive||(y.capsLock=!1),y.metaActive?(y.shiftActive&&(e=(e||"").replace("-shift","")),y.altActive&&(e=(e||"").replace("-alt","")),""===(n=/^meta/i.test(e)?e:"")?n=!0===y.metaActive?"":y.metaActive:y.metaActive=n,(!p.stickyShift&&y.last.keyset[2]!==y.metaActive||(y.shiftActive||y.altActive)&&!y.$keyboard.find("."+t.keySet+"-"+n+y.rows[s]).length)&&(y.shiftActive=y.altActive=!1)):!p.stickyShift&&y.last.keyset[2]!==y.metaActive&&y.shiftActive&&(y.shiftActive=y.altActive=!1),n=0!==(s=(y.shiftActive?1:0)+(y.altActive?2:0))||y.metaActive?""===n?"":"-"+n:"-normal",!y.$keyboard.find("."+t.keySet+n+y.rows[s]).length)return y.shiftActive=y.last.keyset[0],y.altActive=y.last.keyset[1],void(y.metaActive=y.last.keyset[2]);y.$keyboard.find(a+"alt,"+a+"shift,."+t.keyAction+"[class*=meta]").removeClass(i).end().find(a+"alt").toggleClass(i,y.altActive).end().find(a+"shift").toggleClass(i,y.shiftActive).end().find(a+"lock").toggleClass(i,y.capsLock).end().find("."+t.keySet).hide().end().find("."+(t.keyAction+a+n).replace("--","-")).addClass(i),y.$keyboard.find("."+t.keySet+n+y.rows[s])[0].style.display="inline-block",y.metaActive&&y.$keyboard.find(a+y.metaActive).toggleClass(i,!1!==y.metaActive),y.last.keyset=[y.shiftActive,y.altActive,y.metaActive],y.$el.trigger(b.events.kbKeysetChange,[y,y.el]),p.reposition&&y.reposition()}},y.checkCombos=function(){if(!(y.isVisible()||y.hasKeyboard()&&y.$keyboard.hasClass(b.css.hasFocus)))return y.getValue(y.$preview||y.$el);var e,t,a,i,n=y.getValue(),s=b.caret(y.$preview),o=b.builtLayouts[y.layout],r=y.isContentEditable?b.getEditableLength(y.el):n.length,l=r;return""===n||(s.endl&&(s.end=s.start=l),b.msie&&"\n"===n.substring(s.start,s.start+1)&&(s.start+=1,s.end+=1),p.useCombos&&(b.msie?n=n.replace(y.regex,function(e,t,a){return p.combos.hasOwnProperty(t)&&p.combos[t][a]||e}):y.$preview.length&&(t=s.start-(0<=s.start-2?2:0),b.caret(y.$preview,t,s.end),a=(i=function(e){return(e||"").replace(y.regex,function(e,t,a){return p.combos.hasOwnProperty(t)&&p.combos[t][a]||e})})((t=b.caret(y.$preview)).text),t&&t.replaceStr&&a!==t.text&&(y.isContentEditable?b.replaceContent(c,i):y.setValue(t.replaceStr(a))),n=y.getValue())),p.restrictInput&&""!==n&&(t=o.acceptedKeys.length,(e=o.acceptedKeysRegex)||(a=h.map(o.acceptedKeys,function(e){return e.replace(y.escapeRegex,"\\$&")}),-1n.length-1&&(i=p.stopAtEnd,s=0),s<0&&(i=p.stopAtEnd,s=n.length-1),!i){if(!(t=y.close(t)))return;(a=n.eq(s).data("keyboard"))&&a.options.openOn.length?a.focusOn():n.eq(s).focus()}}return!1},y.close=function(e){if(y.isOpen&&y.$keyboard.length){clearTimeout(y.throttled);var t=b.css,a=b.events,i=e?y.checkCombos():y.originalContent;if(e&&"function"==typeof p.validate&&!p.validate(y,i,!0)&&(i=y.originalContent,e=!1,p.cancelClose))return;y.isCurrent(!1),y.isOpen=p.alwaysOpen||p.userClosed,y.isContentEditable&&!e?y.$el.html(i):y.setValue(i,y.$el),y.$el.removeClass(t.isCurrent+" "+t.inputAutoAccepted).addClass(e?!0===e?"":t.inputAutoAccepted:"").trigger(a.inputChange),p.alwaysOpen||y.$el.trigger(a.kbBeforeClose,[y,y.el,e||!1]),b.caret(y.$preview,y.last),y.$el.trigger(e?a.inputAccepted:a.inputCanceled,[y,y.el]).trigger(p.alwaysOpen?a.kbInactive:a.kbHidden,[y,y.el]).blur(),y&&(y.last.eventTime=(new Date).getTime(),p.alwaysOpen||p.userClosed&&"true"===e||!y.$keyboard.length||(y.removeKeyboard(),y.timer=setTimeout(function(){y&&y.bindFocus()},200)),y.watermark||""!==y.el.value||""===y.inPlaceholder||(y.$el.addClass(t.placeholder),y.setValue(y.inPlaceholder,y.$el)))}return!!e},y.accept=function(){return y.close(!0)},y.checkClose=function(e){if(!y.opening){var t=h.keyboard.css,a=e.$target||h(e.target).closest("."+b.css.keyboard+", ."+b.css.input);if(a.length||(a=h(e.target)),a.length&&a.hasClass(t.keyboard)){var i=a.data("keyboard");i!==y&&!i.$el.hasClass(t.isCurrent)&&i.options.openOn&&e.type===p.openOn&&i.focusOn()}else y.escClose(e,a)}},y.escCloseCallback={keepOpen:function(){return!y.isOpen}},y.escClose=function(e,t){if(y.isOpen){if(e&&"keyup"===e.type)return e.which!==b.keyCodes.escape||p.ignoreEsc?"":y.close(!(!p.autoAccept||!p.autoAcceptOnEsc)&&"true");var a=!1,i=t.length&&t||h(e.target);if(h.each(y.escCloseCallback,function(e,t){"function"==typeof t&&(a=a||t(i))}),!a&&(!y.isCurrent()&&y.isOpen||y.isOpen&&i[0]!==y.el)){if((p.stayOpen||p.userClosed)&&!i.hasClass(b.css.input))return;if(b.allie&&e.preventDefault(),p.closeByClickEvent){var n=i[0]&&i[0].nodeName.toLowerCase();"input"!==n&&"textarea"!==n&&"click"!==e.type||y.close(!!p.autoAccept&&"true")}else y.close(!!p.autoAccept&&"true")}}},y.keyBtn=h("").attr({role:"button",type:"button","aria-disabled":"false",tabindex:"-1"}).addClass(b.css.keyButton),y.processName=function(e){var t,a,i=(e||"").replace(/[^a-z0-9-_]/gi,""),n=i.length,s=[];if(1'+s.name+"",o.$key=y.keyBtn.clone().attr({"data-value":a?s.name:s.action,"data-name":s.action,"data-pos":y.temp[1]+","+y.temp[2],"data-action":s.action,"data-html":o.html}).addClass(i).html(o.html).appendTo(y.temp[0]),s.map&&o.$key.attr("data-mapped",s.map),(s.title||r.title)&&o.$key.attr({"data-title":r.title||s.title,title:r.title||s.title}),"function"==typeof p.buildKey&&(n=(o=p.buildKey(y,o)).$key.html(),o.$key.attr("data-html",n)),o.$key},y.customHash=function(e){var t,a,i,n,s=[],o=[];for(a in e=void 0===e?p.customLayout:e)e.hasOwnProperty(a)&&s.push(e[a]);if((i=0)===(n=(o=o.concat.apply(o,s).join(" ")).length))return i;for(t=0;t").addClass(d).attr({role:"textbox"}).hide();return-1<(a=h.inArray("{space}",c))&&(c[a]=" "),d=t&&"custom"===p.layout||!b.layouts.hasOwnProperty(p.layout)?(p.layout="custom",b.layouts.custom=p.customLayout||{normal:["{cancel}"]}):b.layouts[t?p.layout:e||y.layout||p.layout],h.each(d,function(e,t){if(""!==e&&!/^(name|lang|rtl)$/i.test(e))for("default"===e&&(e="normal"),r++,n=h("").attr("name",e).addClass(o.keySet+" "+o.keySet+"-"+e).appendTo(u).toggle("normal"===e),i=0;i')}),1').width(l.match(/px/i)?c+"px":2*c+"em").addClass(d.keySpacer).appendTo(e)),/^empty(:((\d+)?([\.|,]\d+)?)(em|px)?)?$/i.test(l)){c=/:/.test(l)?parseFloat(l.replace(/,/,".").match(/^empty:((\d+)?([\.|,]\d+)?)(em|px)?$/i)[1]||0):"",y.addKey(""," ",!0).addClass(p.css.buttonDisabled+" "+p.css.buttonEmpty).attr("aria-disabled",!0).width(c?l.match("px")?c+"px":2*c+"em":"");continue}if(/^meta[\w-]+\:?(\w+)?/i.test(l)){y.addKey(l.split(":")[0],l).addClass(d.keyHasActive);continue}switch((s=l.split(":"))[0].toLowerCase()){case"a":case"accept":y.addKey("accept",l).addClass(p.css.buttonAction+" "+d.keyAction);break;case"alt":case"altgr":y.addKey("alt",l).addClass(d.keyHasActive);break;case"b":case"bksp":y.addKey("bksp",l);break;case"c":case"cancel":y.addKey("cancel",l).addClass(p.css.buttonAction+" "+d.keyAction);break;case"combo":y.addKey("combo",l).addClass(d.keyHasActive).attr("title",function(e,t){return t+" "+p.display[p.useCombos?"active":"disabled"]}).toggleClass(p.css.buttonActive,p.useCombos);break;case"dec":i.push(y.decimal?".":","),y.addKey("dec",l);break;case"e":case"enter":y.addKey("enter",l).addClass(p.css.buttonAction+" "+d.keyAction);break;case"lock":y.addKey("lock",l).addClass(d.keyHasActive);break;case"s":case"shift":y.addKey("shift",l).addClass(d.keyHasActive);break;case"sign":i.push("-"),y.addKey("sign",l);break;case"space":i.push(" "),y.addKey("space",l);break;case"t":case"tab":y.addKey("tab",l);break;default:b.keyaction.hasOwnProperty(s[0])&&y.addKey(s[0],l).toggleClass(p.css.buttonAction+" "+d.keyAction,r)}}else n=a[o],y.addKey(n,n,!0)},y.removeBindings=function(e){h(document).unbind(e),y.el.ownerDocument!==document&&h(y.el.ownerDocument).unbind(e),h(window).unbind(e),y.$el.unbind(e)},y.removeKeyboard=function(){y.$decBtn=[],p.usePreview&&y.$preview.removeData("keyboard"),y.$preview.unbind(y.namespace+"keybindings"),y.preview=null,y.$preview=null,y.$previewCopy=null,y.$keyboard.removeData("keyboard"),y.$keyboard.remove(),y.$keyboard=[],y.isOpen=!1,y.isCurrent(!1)},y.destroy=function(e){var t,a=b.css,i=y.extensionNamespace.length,n=[a.input,a.locked,a.placeholder,a.noKeyboard,a.alwaysOpen,p.css.input,a.isCurrent].join(" ");for(clearTimeout(y.timer),clearTimeout(y.timer2),clearTimeout(y.timer3),y.$keyboard.length&&y.removeKeyboard(),y.options.openOn&&y.removeBindings(y.options.openOn),y.removeBindings(y.namespace),y.removeBindings(y.namespace+"callbacks"),t=0;t
'),setTimeout(function(){b.keyaction.right(e),e.saveCaret()},0)))):e.switchInput(!a[i.enterMod],!!i.autoAccept&&"true")},lock:function(e){e.last.keyset[0]=e.shiftActive=e.capsLock=!e.capsLock,e.showSet()},left:function(e){var t=b.caret(e.$preview);0<=t.start-1&&(e.last.start=e.last.end=t.start-1,b.caret(e.$preview,e.last),e.setScroll())},meta:function(e,t){var a=h(t);e.metaActive=!a.hasClass(e.options.css.buttonActive),e.showSet(a.attr("data-name"))},next:function(e){return e.switchInput(!0,e.options.autoAccept),!1},normal:function(e){e.shiftActive=e.altActive=e.metaActive=!1,e.showSet()},prev:function(e){return e.switchInput(!1,e.options.autoAccept),!1},right:function(e){var t=b.caret(e.$preview),a=e.isContentEditable?b.getEditableLength(e.el):e.getValue().length;t.end+1<=a&&(e.last.start=e.last.end=t.end+1,b.caret(e.$preview,e.last),e.setScroll())},shift:function(e){e.last.keyset[0]=e.shiftActive=!e.shiftActive,e.showSet()},sign:function(e){if((e.decimal?/^[+-]?\d*\.?\d*$/:/^[+-]?\d*,?\d*$/).test(e.getValue())){var t,a=b.caret(e.$preview),i=e.getValue(),n=e.isContentEditable?b.getEditableLength(e.el):i.length;e.setValue(-1*i),t=n-i.length,e.last.start=a.start+t,e.last.end=a.end+t,b.caret(e.$preview,e.last),e.setScroll()}},space:function(e){e.insertText(" ")},tab:function(e){var t=e.options;if(!e.isTextArea){if(t.tabNavigation)return e.switchInput(!e.shiftActive,!0);if(e.isInput)return!1}e.insertText("\t")},toggle:function(e){e.enabled=!e.enabled,e.toggle()},NBSP:" ",ZWSP:"",ZWNJ:"",ZWJ:"",LRM:"",RLM:""},b.builtLayouts={},b.layouts={alpha:{normal:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} a b c d e f g h i j [ ] \\","k l m n o p q r s ; ' {enter}","{shift} t u v w x y z , . / {shift}","{accept} {space} {cancel}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} A B C D E F G H I J { } |",'K L M N O P Q R S : " {enter}',"{shift} T U V W X Y Z < > ? {shift}","{accept} {space} {cancel}"]},qwerty:{normal:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}","{accept} {space} {cancel}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}","{accept} {space} {cancel}"]},international:{normal:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}","{accept} {alt} {space} {alt} {cancel}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}","{accept} {alt} {space} {alt} {cancel}"],alt:["~ ¡ ² ³ ¤ € ¼ ½ ¾ ‘ ’ ¥ × {bksp}","{tab} ä å é ® þ ü ú í ó ö « » ¬","á ß ð f g h j k ø ¶ ´ {enter}","{shift} æ x © v b ñ µ ç > ¿ {shift}","{accept} {alt} {space} {alt} {cancel}"],"alt-shift":["~ ¹ ² ³ £ € ¼ ½ ¾ ‘ ’ ¥ ÷ {bksp}","{tab} Ä Å É ® Þ Ü Ú Í Ó Ö « » ¦","Ä § Ð F G H J K Ø ° ¨ {enter}","{shift} Æ X ¢ V B Ñ µ Ç . ¿ {shift}","{accept} {alt} {space} {alt} {cancel}"]},colemak:{normal:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w f p g j l u y ; [ ] \\","{bksp} a r s t d h n e i o ' {enter}","{shift} z x c v b k m , . / {shift}","{accept} {space} {cancel}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W F P G J L U Y : { } |",'{bksp} A R S T D H N E I O " {enter}',"{shift} Z X C V B K M < > ? {shift}","{accept} {space} {cancel}"]},dvorak:{normal:["` 1 2 3 4 5 6 7 8 9 0 [ ] {bksp}","{tab} ' , . p y f g c r l / = \\","a o e u i d h t n s - {enter}","{shift} ; q j k x b m w v z {shift}","{accept} {space} {cancel}"],shift:["~ ! @ # $ % ^ & * ( ) { } {bksp}",'{tab} " < > P Y F G C R L ? + |',"A O E U I D H T N S _ {enter}","{shift} : Q J K X B M W V Z {shift}","{accept} {space} {cancel}"]},num:{normal:["= ( ) {b}","{clear} / * -","7 8 9 +","4 5 6 {sign}","1 2 3 %","0 {dec} {a} {c}"]}},b.language={en:{display:{a:"✔:Accept (Shift+Enter)",accept:"Accept:Accept (Shift+Enter)",alt:"Alt:⌥ AltGr",b:"⌫:Backspace",bksp:"Bksp:Backspace",c:"✖:Cancel (Esc)",cancel:"Cancel:Cancel (Esc)",clear:"C:Clear",combo:"ö:Toggle Combo Keys",dec:".:Decimal",e:"⏎:Enter",empty:" ",enter:"Enter:Enter ⏎",left:"←",lock:"Lock:⇪ Caps Lock",next:"Next ⇨",prev:"⇦ Prev",right:"→",s:"⇧:Shift",shift:"Shift:Shift",sign:"±:Change Sign",space:" :Space",t:"⇥:Tab",tab:"⇥ Tab:Tab",toggle:" ",valid:"valid",invalid:"invalid",active:"active",disabled:"disabled"},wheelMessage:"Use mousewheel to see other keys",comboRegex:/([`\'~\^\"ao])([a-z])/gim,combos:{"`":{a:"à",A:"À",e:"è",E:"È",i:"ì",I:"Ì",o:"ò",O:"Ò",u:"ù",U:"Ù",y:"ỳ",Y:"Ỳ"},"'":{a:"á",A:"Á",e:"é",E:"É",i:"í",I:"Í",o:"ó",O:"Ó",u:"ú",U:"Ú",y:"ý",Y:"Ý"},'"':{a:"ä",A:"Ä",e:"ë",E:"Ë",i:"ï",I:"Ï",o:"ö",O:"Ö",u:"ü",U:"Ü",y:"ÿ",Y:"Ÿ"},"^":{a:"â",A:"Â",e:"ê",E:"Ê",i:"î",I:"Î",o:"ô",O:"Ô",u:"û",U:"Û",y:"ŷ",Y:"Ŷ"},"~":{a:"ã",A:"Ã",e:"ẽ",E:"Ẽ",i:"ĩ",I:"Ĩ",o:"õ",O:"Õ",u:"ũ",U:"Ũ",y:"ỹ",Y:"Ỹ",n:"ñ",N:"Ñ"}}}},b.defaultOptions={language:null,rtl:!1,layout:"qwerty",customLayout:null,position:{of:null,my:"center top",at:"center top",at2:"center bottom"},reposition:!0,usePreview:!0,alwaysOpen:!1,initialFocus:!0,noFocus:!1,stayOpen:!1,userClosed:!1,ignoreEsc:!1,closeByClickEvent:!1,css:{input:"ui-widget-content ui-corner-all",container:"ui-widget-content ui-widget ui-corner-all ui-helper-clearfix",popup:"",buttonDefault:"ui-state-default ui-corner-all",buttonHover:"ui-state-hover",buttonAction:"ui-state-active",buttonActive:"ui-state-active",buttonDisabled:"ui-state-disabled",buttonEmpty:"ui-keyboard-empty"},autoAccept:!1,autoAcceptOnEsc:!1,lockInput:!1,restrictInput:!1,restrictInclude:"",acceptValid:!1,autoAcceptOnValid:!1,checkValidOnInit:!0,cancelClose:!0,tabNavigation:!1,enterNavigation:!1,enterMod:"altKey",stopAtEnd:!0,appendLocally:!1,appendTo:"body",wrapBRs:!0,stickyShift:!0,preventPaste:!1,caretToEnd:!1,scrollAdjustment:10,maxLength:!1,maxInsert:!0,repeatDelay:500,repeatRate:20,resetDefault:!0,openOn:"focus",activeOnReadonly:!1,keyBinding:"mousedown touchstart",useWheel:!0,useCombos:!0,validate:function(){return!0}},b.supportedInputTypes=["text","search","url","tel","password"],b.comboRegex=/([`\'~\^\"ao])([a-z])/gim,b.currentKeyboard="",h('\x3c!--[if lte IE 8]>