12345 |
- /*! jQuery UI Virtual Keyboard (1.28.7) - ALL Extensions + Mousewheel */
- /*! jQuery UI Virtual Keyboard Alt Key Popup v2.0.0 */
- !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(b){"use strict";var f=b.keyboard;b.extend(f.css,{altKeyPopup:"ui-keyboard-popup",altKeyOverlay:"ui-keyboard-overlay",altKeyPopupOpen:"ui-keyboard-popup-open"}),f.altKeys=b.extend({a:"å æ ā ă ą à á â ã ä",A:"Å Æ Ā Ă Ą À Á  à Ä",c:"ç ć ĉ ċ č",C:"Ç Ć Ĉ Ċ Č",d:"ď ð ď",D:"Ď Ð Ď",e:"ė ę ĕ ě ə è é ê ë ē",E:"Ė Ę Ĕ Ě Ǝ È É Ê Ë Ē",g:"ģ ğ ĝ ġ",G:"Ģ Ğ Ĝ Ġ",h:"ĥ ħ",H:"Ĥ Ħ",i:"ı į ī ï î í ì ĩ ĭ",I:"İ Į Ī Ï Î Í Ì Ĩ Ĭ",j:"ĵ",J:"Ĵ",k:"ķ",K:"Ķ",l:"Ł Ľ Ļ Ĺ Ŀ",L:"ł ľ ļ ĺ ŀ",n:"ʼn ň ņ ń ñ",N:"ʼn Ň Ņ Ń Ñ",o:"œ ő ø ö õ ô ó ò ō ŏ",O:"Œ Ő Ø Ö Õ Ô Ó Ò Ō Ŏ",r:"ŕ ř ŗ",R:"Ŕ Ř Ŗ",s:"ś š ş ß § ŝ",S:"Ś Š Ş ẞ § Ŝ",t:"þ ť ț ţ ŧ",T:"Þ Ť Ț Ţ Ŧ",u:"ų ű ů ū ü û ú ù ũ ŭ",U:"Ų Ű Ů Ū Ü Û Ú Ù Ũ Ŭ",w:"ŵ",W:"Ŵ",y:"ý",Y:"Ý",z:"ź ż ž",Z:"Ź Ż Ž","!":"¡",$:"€ £ ¤ ¥ ¢ ₡ ₱ ₩ ₹ ₪ ₭ ₮ ₦ ₤","?":"¿","'":"〈 「 『 “",'"':"〉 」 』 ”","(":"《 【 〔",")":"》 】 〕"},f.altKeys),b.fn.addAltKeyPopup=function(e){var t={holdTime:500,popupVisible:"popup-visible",popupHidden:"popup-hidden",popupPosition:null};return this.each(function(){var y=b(this).data("keyboard");if(y){if(y.altkeypopup_options=b.extend({},t,y.altkeypopup_options,e),y.altkeypopup_namespace)return y.altkeypopup_setup();y.altkeypopup_namespace=y.namespace+"AltKeyPopup",y.extensionNamespace.push(y.altkeypopup_namespace),y.altkeypopup_setup=function(){var a,e="mousedown touchstart ".split(" ").join(y.altkeypopup_namespace+" "),t="mouseup touchend touchcancel ".split(" ").join(y.altkeypopup_namespace+" ");y.options.repeatRate=0,y.unbindButton(y.altkeypopup_namespace).bindButton(e,function(){clearTimeout(a);var e=b(this),t=e.attr("data-value")||"",n=y.altkeypopup_options.holdTime;t in f.altKeys&&(n?a=setTimeout(function(){y.altKeyPopup_popup(t,e)},n):y.altKeyPopup_popup(t,e))}).bindButton(t,function(){clearTimeout(a)}),y.altkeypopup_blockingFlag=!1,y.$preview.unbind("keypress keydown keyup ".split(" ").join(y.altkeypopup_namespace+" ").trim()).bind("keypress keydown keyup ".split(" ").join(y.altkeypopup_namespace+" "),function(e){if("keyup"===e.type)return clearTimeout(a),y.altkeypopup_blockingFlag=!1,"Escape"!==e.key;var t=f.builtLayouts[y.layout],n=b(e.target),o=e.key,i=e.key;return"keydown"===e.type&&i in f.altKeys?y.altkeypopup_blockingFlag!==o&&(y.altkeypopup_blockingFlag=o,!0):y.altkeypopup_blockingFlag?(t.hasMappedKeys&&t.mappedKeys.hasOwnProperty(i)&&(i=t.mappedKeys[i]),i in f.altKeys&&(clearTimeout(a),a=setTimeout(function(){y.altkeypopup_blockingFlag===o&&y.altKeyPopup_popup(i,n)},y.altkeypopup_options.holdTime)),!0):void 0})},y.altKeyPopup_close=function(){y.altkeypopup_blockingFlag=!1,y.altKeyPopup_$overlay=null,setTimeout(function(){if(y.$keyboard.length){y.$keyboard.removeClass(f.css.altKeyPopupOpen);var e=y.$keyboard.find("."+f.css.altKeyOverlay);e&&e.remove()}},1),b(document).unbind(y.altkeypopup_namespace),y.$preview.focus(),y.options.ignoreEsc=y.altKeyPopup_savedIgnoreEsc,y.$el.trigger(y.altkeypopup_options.popupHidden,[y])},y.altKeyPopup_popup=function(e,t){if(!y.$keyboard.find("."+f.css.altKeyOverlay).length){var n,o,i,a,s,r,p,u,l,d=f.css,c={$kb:y.$keyboard,kbWidth:y.$keyboard.outerWidth(),kbHeight:y.$keyboard.outerHeight(),$key:t};y.altKeyPopup_$overlay=b('<div class="'+d.altKeyOverlay+'" />').css({width:c.kbWidth,height:c.kbHeight}).appendTo(y.$keyboard).bind("click touchstart",function(){y.altKeyPopup_close()}),l="inactive hidden ".split(" ").join(y.altkeypopup_namespace+" "),y.$keyboard.addClass(f.css.altKeyPopupOpen),y.$el.unbind(l).bind(l,function(){y.altKeyPopup_close()}),"bksp"!==e&&f.keyaction.bksp(y),o=b('<div class="'+d.altKeyPopup+" "+y.options.css.container+'" />'),n=f.altKeys[e].split(/\s+/),y.buildRow(o,0,n,[]),i=o.appendTo(y.altKeyPopup_$overlay).children().bind("mousedown touchstart",function(){y.altKeyPopup_close()}).bind("mouseover mouseleave",function(e){i.removeClass(y.options.css.buttonHover),"mouseleave"!==e.type&&b(this).addClass(y.options.css.buttonHover)}),y.altKeyPopup_navigate(!0),y.altKeyPopup_savedIgnoreEsc=y.options.ignoreEsc,y.options.ignoreEsc=!0,b(document).unbind(y.altkeypopup_namespace).bind("keydown"+y.altkeypopup_namespace,function(){return!1}).bind("keyup"+y.altkeypopup_namespace,function(e){return"Escape"===e.key?(e.which=0,y.altKeyPopup_close()):y.altKeyPopup_navigate(e),!1}),p=(c.$popup=o).outerWidth(),(a=t.position().left-p/2)+p>c.kbWidth&&(a=c.kbWidth-p)<0&&o.css({width:c.kbWidth,height:"auto"}),s=t.position().top-t.outerHeight()-5,u=o.outerHeight(),r=y.$keyboard.find("."+d.keySet).position().top,s+u>c.kbHeight&&(s=c.kbHeight-u)<r&&o.css({height:c.popupHeight,width:"auto"}),c.popupWidth=o.outerWidth(),c.popupHeight=o.outerHeight(),c.popupLeft=a<0?0:a,c.popupTop=s<r?r:s,o.css({position:"absolute",left:c.popupLeft,top:c.popupTop}),"function"==typeof y.altkeypopup_options.popupPosition&&y.altkeypopup_options.popupPosition(y,c),y.$preview.blur(),y.$el.trigger(y.altkeypopup_options.popupVisible,[y])}},y.altKeyPopup_navigate=function(e){var t,n=f.css,o=(f.navigationKeys,y.options.css.buttonHover),i=y.$keyboard.find("."+n.altKeyPopup).find("."+n.keyButton),a=i.length-1;if(!0===e)return i.eq(0).addClass(o),void(y.altKeyPopup_currentIndex=0);if(t=y.altKeyPopup_currentIndex,"Enter"===e.key)return y.insertText(i.eq(t).attr("data-value")),y.altKeyPopup_close(),!0;switch(e.key){case"End":t=a;break;case"Home":t=0;break;case"ArrowLeft":t-=1;break;case"ArrowRight":t+=1}t<0&&(t=0),a<t&&(t=a),y.altKeyPopup_currentIndex=t,i.removeClass(o).eq(t).addClass(o)},y.options.alwaysOpen&&y.isVisible()&&y.altkeypopup_setup(),y.$el.unbind(f.events.kbBeforeVisible+y.altkeypopup_namespace).bind(f.events.kbBeforeVisible+y.altkeypopup_namespace,function(){y.altkeypopup_setup()})}})}}),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(s){"use strict";s.fn.addAutocomplete=function(i){var a={position:{of:null,my:"right top",at:"left top",collision:"flip"},events:"autocomplete",data:""};return this.each(function(){var t,n,o=s(this).data("keyboard");o&&(n=o.namespace+"Autocomplete",o.autocomplete_namespace=n,o.extensionNamespace.push(n),o.autocomplete_init=function(){var e=(t=o.autocomplete_options=s.extend(!0,{},a,i)).events||t.data||"autocomplete";o.options.alwaysOpen&&o.isVisible()&&o.autocomplete_setup(),o.$el.unbind(n).bind(s.keyboard.events.kbVisible+n,function(){o.autocomplete_setup()}).bind(s.keyboard.events.kbHidden+n,function(){o.$el[t.data||"autocomplete"]("close")}).bind(s.keyboard.events.kbChange+n,function(){o.hasAutocomplete&&o.isVisible()&&o.$el.val(o.$preview.val())}).bind(e+"open"+n,function(){if(o.hasAutocomplete){var e=s.extend({},t.position);e.of=e.of||o.$keyboard,o.$autocomplete.menu.element.position(e)}}).bind(e+"select"+n,function(e,t){o.autocomplete_getVal(t.item)})},o.autocomplete_getVal=function(e){var t;switch(typeof e){case"string":t=e||"";break;case"object":t=e.label||e.value||"";break;default:t=o.preview&&o.preview.value||o.el.value}t=t.toString(),o.hasAutocomplete&&""!==t&&((o.$preview||o.$el).val(t).focus(),o.last.start=t.length,o.last.end=t.length,o.last.val=t)},o.autocomplete_update=function(e){clearTimeout(o.$autocomplete.searching),o.$autocomplete.searching=setTimeout(function(){o.$autocomplete.term!==o.$autocomplete.element.val()&&(o.$autocomplete.selectedItem=null,o.$autocomplete.search(null,e))},o.$autocomplete.options.delay)},o.autocomplete_navKeys={8:"backSpace",9:"tab",13:"enter",20:"capsLock",27:"escape",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete"},o.autocomplete_setup=function(){var t;if(o.$autocomplete=o.$el.data(o.autocomplete_options.data)||o.$el.data("uiAutocomplete")||o.$el.data("ui-autocomplete")||o.$el.data("autocomplete"),o.hasAutocomplete=void 0!==o.$autocomplete&&!o.$autocomplete.options.disabled,o.hasAutocomplete){o.$preview.bind("keydown"+n+" keypress"+n,function(e){o.$preview&&e.namespace!==o.$autocomplete.eventNamespace&&(e.namespace=o.$autocomplete.eventNamespace.slice(1),(t=o.autocomplete_navKeys[e.which])?o.el!==o.preview&&(o.$el.triggerHandler(e),"enter"===t&&setTimeout(function(){o.$autocomplete&&(o.$preview.val(o.$autocomplete.selectedItem.value),o.$preview.focus())},100)):o.autocomplete_update(e))});var e="mouseup mousedown mouseleave touchstart touchend touchcancel ".split(" ").join(n+" ");o.bindButton(e,function(e){o.autocomplete_update(e)})}o.escCloseCallback.autocomplete||(o.escCloseCallback.autocomplete=o.checkAutocompleteMenu)},o.checkAutocompleteMenu=function(e){return o.hasAutocomplete&&e.closest("ul").hasClass("ui-autocomplete")},o.autocomplete_destroy=function(){clearTimeout(o.$autocomplete.searching),o.hasAutocomplete=!1,o.$el.unbind(n),o.$preview&&(o.$preview.unbind(n),o.unbindButton(n)),delete o.$autocomplete},o.autocomplete_init())})}}),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(b){"use strict";var f=b.keyboard;f.firefox=void 0!==window.mozInnerScreenX,b.extend(f.css,{caret:"ui-keyboard-caret",caretMirror:"ui-keyboard-mirror-div"}),b.fn.addCaret=function(e){var t={caretClass:"",charAttr:"data-character",charIndex:1,offsetX:0,offsetY:0,adjustHt:0};return this.each(function(){var c,o,i=f.events,y=b(this).data("keyboard");y&&(c=y.caret_options=b.extend({},t,e),o=y.caret_namespace=y.namespace+"caret",y.extensionNamespace.push(o),y.textareaCaretProperties=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],y.caret_setup=function(){var e=f.css,t="keyup keypress mouseup mouseleave ".split(" ").join(o+" "),n="position:absolute;visibility:hidden;top:-9999em;left:-9999em;white-space:pre-wrap;z-index:-10;"+("INPUT"===y.preview.nodeName?"":"word-wrap:break-word;");y.$keyboard.find("."+e.caretMirror).remove(),y.caret_$div=b('<div class="'+e.caretMirror+'" style="'+n+'">').appendTo(y.$keyboard),y.$caret&&y.$caret.remove(),y.$caret=b('<div class="'+e.caret+" "+c.caretClass+'" style="position:absolute;">').insertAfter(y.$preview),y.$el.unbind(i.kbChange+o).bind(i.kbChange+o,function(){y.findCaretPos()}),y.$preview.unbind(t).bind(t,function(){y.findCaretPos()})},y.findCaretPos=function(){if(y.caret_$div){var t,n,e,o,i,a,s,r,p=y.preview,u=parseFloat(y.$preview.css("fontSize")),l="INPUT"===p.nodeName,d=y.caret_$div[0];t=d.style,n=window.getComputedStyle?getComputedStyle(p,null):p.currentStyle,o=f.caret(y.$preview),i=Math["ltr"===n.direction?"max":"min"](o.start,o.end),y.textareaCaretProperties.forEach(function(e){t[e]=n[e]}),f.firefox&&(t.width=parseInt(n.width,10)-2+"px",p.scrollHeight>parseInt(n.height,10)&&(t.overflowY="scroll")),t.width=parseInt(l?p.scrollWidth:n.width,10)+(l?2*u:0)+"px",d.textContent=p.value.substring(0,i),"INPUT"===p.nodeName&&(d.textContent=d.textContent.replace(/\x20/g," ")),(s=document.createElement("span")).textContent=p.value.substring(i)||"",d.appendChild(s),r=b(s).position(),o="center"===t.textAlign?u:0,y.caretPos={top:r.top+parseInt(n.borderTopWidth,10)+c.offsetY,left:r.left+parseInt(n.borderLeftWidth,10)+c.offsetX-o},e=parseInt(y.$caret.css("margin-top"),10),t=Math.round(u+2*e)+c.adjustHt,r=y.$preview.position(),y.$caret.css({top:r.top-p.scrollTop+y.caretPos.top-e,left:r.left-p.scrollLeft+y.caretPos.left,height:t}),a=p.value.substring(i,i+c.charIndex).replace(/\s/," ")||" ",y.$caret.attr(c.charAttr,a)}},y.$el.unbind(o).bind(i.kbBeforeVisible+o,function(){y.caret_setup()}).bind(i.kbVisible+o,function(){y.findCaretPos()}).bind(i.kbHidden+o,function(){var e="keyup keypress mouseup mouseleave ".split(" ").join(o+" ");y.$preview.unbind(e),y.$caret.remove(),y.$caret=null,y.caret_$div=null}),y.options.alwaysOpen&&y.isVisible()&&(y.caret_setup(),y.findCaretPos()))})}}),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(o){"use strict";var i=o.keyboard;i.css.extender="ui-keyboard-extender",i.language.en.display.extender=" :toggle_numpad",i.layouts.numpad={normal:["{clear} / * -","7 8 9 +","4 5 6 %","1 2 3 =","0 {dec} {left} {right}"]},i.keyaction.extender=function(e){return e.extender_toggle(),!1},o.fn.addExtender=function(e){var t={layout:"numpad",showing:!1,reposition:!0};return this.each(function(){var n=o(this).data("keyboard");if(n){if(n.extender_options=o.extend({},t,n.extender_options,e),n.extender_namespace)return n.extender_layoutSwitcher();n.extender_namespace=n.namespace+"extender",n.extensionNamespace.push(n.extender_namespace),n.extender_layoutSwitcher=function(){n.extender_lastKeyset=n.last.keyset,n.extender_bindEvents(!1),n.$el.one(i.events.kbBeforeVisible,function(){n.shiftActive=n.extender_lastKeyset[0],n.altActive=n.extender_lastKeyset[1],n.metaActive=n.extender_lastKeyset[2],n.showKeySet(),n.extender_setup(),n.extender_bindEvents()}),n.redraw()},n.extender_bindEvents=function(e){var t=i.events.kbBeforeVisible+n.extender_namespace;n.$el.unbind(t),!1!==e&&n.$el.bind(t,function(){n.extender_setup()})},n.extender_setup=function(){var e,t=n.extender_options.layout;void 0===i.builtLayouts[t]&&n.buildKeyboard(t),(e=i.builtLayouts[t].$keyboard.find("."+i.css.keySet+"-normal").clone()).removeClass().removeAttr("name").addClass(i.css.extender).children("button").removeAttr("data-pos"),e[0].style.display=n.extender_options.showing?"inline-block":"none",n.$keyboard.find("div."+i.css.extender).remove(),n.$keyboard.append(e),n.extender_toggle(n.extender_options.showing),n.bindKeys()},n.extender_toggle=function(e){n.extender_options.showing=void 0===e?!n.extender_options.showing:e,n.$keyboard.find("button."+i.css.extender).toggleClass(n.options.css.buttonActive,n.extender_options.showing).end().find("div."+i.css.extender)[0].style.display=n.extender_options.showing?"inline-block":"none",n.extender_options.reposition&&o(window).trigger("resize")},n.options.alwaysOpen&&n.isVisible()&&n.extender_setup(),n.extender_bindEvents()}})}}),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(s){s.fn.addMobile=function(e){var a,t={container:{theme:"b",cssClass:"ui-body"},input:{theme:"b",cssClass:""},buttonMarkup:{theme:"b",cssClass:"ui-btn",shadow:"true",corners:"true"},buttonHover:{theme:"b",cssClass:"ui-btn-hover"},buttonAction:{theme:"b",cssClass:"ui-btn-active"},buttonActive:{theme:"b",cssClass:"ui-btn-active"},allThemes:"a b c"};return this.each(function(){var i=s(this).data("keyboard");i&&void 0!==s.fn.textinput&&(i.mobile_options=a=s.extend(!0,{},t,e),i.mobile_themes=s.trim((" "+a.allThemes).split(" ").join(" "+a.buttonMarkup.cssClass+"-")+(" "+a.allThemes).split(" ").join(" "+a.buttonAction.cssClass+"-")+(" "+a.allThemes).split(" ").join(" "+a.buttonActive.cssClass+"-")),void 0===i.options.mobile_savedActiveClass&&(i.options.mobile_savedActiveClass=""+i.options.css.buttonActive),i.mobile_init=function(){var e=i.namespace+"Mobile";s("."+s.keyboard.css.input).textinput(),i.options.alwaysOpen&&i.isVisible&&i.mobile_setup(),i.extensionNamespace.push(e),i.$el.unbind(e).bind(s.keyboard.events.kbBeforeVisible+e,function(){i&&i.el.active&&i.$keyboard.length&&i.$keyboard.css("visibility","hidden")}).bind(s.keyboard.events.kbVisible+e,function(){i&&i.el.active&&i.$keyboard.length&&(i.mobile_setup(),i.$keyboard.css("visibility","visible"),i.$preview.focus())})},i.mobile_setup=function(){var e,t=s.keyboard.css,n=i.options,o=i.mobile_themes;i.mobile_$actionKeys=i.$keyboard.find("."+i.options.css.buttonAction),n.css.buttonActive=n.mobile_savedActiveClass+" "+i.modOptions(a.buttonActive,a.buttonMarkup),i.$keyboard.addClass(i.modOptions(a.container,a.container)).find("."+t.preview).removeClass("ui-widget ui-widget-content").addClass(i.modOptions(a.input,a.input)).end().find("button").removeClass(s.trim("ui-corner-all ui-state-default "+o)).addClass(i.modOptions(a.buttonMarkup,a.buttonMarkup)).not(i.mobile_$actionKeys).hover(function(){s(this).removeClass(o).addClass(i.modOptions(a.buttonHover,a.buttonMarkup))},function(){s(this).removeClass(o+" "+a.buttonHover.cssClass).addClass(i.modOptions(a.buttonMarkup,a.buttonMarkup))}),i.mobile_$actionKeys.removeClass(o).addClass(i.modOptions(a.buttonAction,a.buttonMarkup)),i.msie&&i.$preview[0]!==i.el&&(i.$preview.hide(),i.$keyboard.css("width",""),i.width=i.$keyboard.outerWidth(),i.$keyboard.width(i.width+parseInt(i.$preview.css("fontSize"),10)),i.$preview.width(i.width),i.$preview.show()),s.ui&&s.ui.position&&((e=n.position).of=e.of||i.$el.data("keyboardPosition")||i.$el,e.collision=e.collision||"flipfit flipfit",i.$keyboard.position(e))},i.modOptions=function(e,t){return" "+(e.cssClass||"")+" "+(t&&t.cssClass?t.cssClass+"-"+(e.theme||""):"")+("true"==e.shadow?" ui-shadow":"")+("true"==e.corners?" ui-corner-all":"")},i.mobile_init())})}}),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(b){"use strict";b.keyboard=b.keyboard||{},b.keyboard.navigationKeys={toggle:112,enter:13,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,caretrt:45,caretlt:46,caretright:function(e){b.keyboard.keyaction.right(e)},caretleft:function(e){b.keyboard.keyaction.left(e)}},b.fn.addNavigation=function(t){return this.each(function(){var l,e,d=b(this).data("keyboard"),c=d.options,o=b.keyboard.events,y=b.keyboard.css;d&&(d.navigation_options=l=b.extend({},{position:[0,0],toggleMode:!1,focusClass:"hasFocus",toggleKey:null,rowLooping:!1},t),d.navigation_keys=e=b.extend({},b.keyboard.navigationKeys),d.navigation_namespace=d.namespace+"Nav",d.extensionNamespace.push(d.navigation_namespace),d.saveNav=[d.options.tabNavigation,d.options.enterNavigation],d.allNavKeys=b.map(e,function(e){return e}),d.navigation_init=function(){d.$keyboard.toggleClass(l.focusClass,l.toggleMode).find("."+y.keySet+":visible").find("."+y.keyButton+'[data-pos="'+l.position[0]+","+l.position[1]+'"]').addClass(c.css.buttonHover),d.$preview.unbind(d.navigation_namespace).bind("keydown"+d.navigation_namespace,function(e){return d.checkKeys(e.which)})},d.checkKeys=function(e,t){if(void 0!==e){var n=d.navigation_keys;return(e===(l.toggleKey||n.toggle)||t)&&(l.toggleMode=!t&&!l.toggleMode,d.options.tabNavigation=!l.toggleMode&&d.saveNav[0],d.options.enterNavigation=!l.toggleMode&&d.saveNav[1]),d.$keyboard.toggleClass(l.focusClass,l.toggleMode),l.toggleMode&&e===n.enter?(d.$keyboard.find("."+y.keySet+":visible").find("."+y.keyButton+'[data-pos="'+l.position[0]+","+l.position[1]+'"]').trigger(o.kbRepeater),!1):l.toggleMode&&0<=b.inArray(e,d.allNavKeys)?(d.navigateKeys(e),!1):void 0}},d.getMaxIndex=function(e,t){return e.find("."+y.keyButton+'[data-pos^="'+t+',"]').length-1},d.leftNavigateKey=function(e,t){var n=d.navigation_options.rowLooping,o=e-1;return 0<=o?o:n?t:0},d.rightNavigateKey=function(e,t){var n=d.navigation_options.rowLooping,o=e+1;return o<=t?o:n?0:t},d.navigateKeys=function(e,t,n){if(d.isVisible()){n="number"==typeof n?n:l.position[1],t="number"==typeof t?t:l.position[0];var o,i=d.$keyboard.find("."+y.keySet+":visible"),a=i.find("."+y.endRow).length-1,s=d.getMaxIndex(i,t),r=d.last,p=d.$preview.val().length,u=d.navigation_keys;switch(e){case u.pageup:t=0;break;case u.pagedown:t=a;break;case u.end:n=s;break;case u.home:n=0;break;case u.left:n=d.leftNavigateKey(n,s);break;case u.up:t+=0<t?-1:0,o=d.getMaxIndex(i,t),n=n===s?o:n;break;case u.right:n=d.rightNavigateKey(n,s);break;case u.down:t+=a<t+1?0:1,o=d.getMaxIndex(i,t),n=n===s?o:n;break;case u.caretrt:r.start++;break;case u.caretlt:r.start--}e!==u.caretrt&&e!==u.caretlt||(r.start=r.start<0?0:r.start>p?p:r.start,d.last.start=d.last.end=r.end=r.start,b.keyboard.caret(d.$preview,d.last)),(s=d.getMaxIndex(i,t))<n&&(n=s),i.find("."+c.css.buttonHover).removeClass(c.css.buttonHover),i.find("."+y.keyButton+'[data-pos="'+t+","+n+'"]').addClass(c.css.buttonHover),l.position=[t,n]}},d.options.alwaysOpen&&d.isVisible()&&(d.$keyboard.find("."+c.css.buttonHover).removeClass(c.css.buttonHover),d.navigation_init()),d.$el.unbind(d.navigation_namespace).bind(o.kbVisible,function(){d.$keyboard.find("."+c.css.buttonHover).removeClass(c.css.buttonHover),d.navigation_init()}).bind(o.kbInactive+" "+o.kbHidden,function(e){d.checkKeys(e.which,!0)}).bind(o.kbKeysetChange,function(){d.navigateKeys(null)}).bind("navigate navigateTo",function(e,t,n){var o;(t=isNaN(t)?t.toLowerCase():t)in d.navigation_keys?(o=d.navigation_keys[t],isNaN(o)&&o in b.keyboard.keyaction?b.keyboard.keyaction[o](d,this,e):b.isFunction(o)?o(d):d.checkKeys(o)):"string"==typeof t&&t in b.keyboard.keyaction?b.keyboard.keyaction[t](d,this,e):d.navigateKeys(null,t,n)}))})}}),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(p){"use strict";p.keyboard=p.keyboard||{},p.fn.previewKeyset=function(n){return this.each(function(){var e=p(this).data("keyboard"),t=e.namespace+"Preview";e&&(e.previewKeyset_options=p.extend({},{sets:["normal","shift","alt","alt-shift"]},n),e.extensionNamespace.push(t),e.previewKeyset=function(){var a=p.keyboard.css,s=e.previewKeyset_options.sets,r=e.$keyboard.find("."+a.keySet).filter('[name="'+s.join('"],[name="')+'"]');1<r.length&&r.eq(0).find("."+a.keyButton).not("."+a.keyAction).each(function(){var e,t,n={},o=s.length,i=r.find('button[data-pos="'+p(this).attr("data-pos")+'"]');for(e=0;e<o;e++)t=i.eq(e).parent().attr("name"),0<=p.inArray(t,s)&&(n["data-"+t]=i.eq(e).find("."+a.keyText).text());i.attr(n)})},e.options.alwaysOpen&&e.isVisible()?e.previewKeyset():e.$el.unbind(p.keyboard.events.kbBeforeVisible+t).bind(p.keyboard.events.kbBeforeVisible+t,function(){e.previewKeyset()}))})}}),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(b){"use strict";b.keyboard=b.keyboard||{},b.fn.addScramble=function(e){var o={targetKeys:/[a-z\d]/i,byRow:!0,byKeySet:!1,randomizeOnce:!0,randomizeInput:!1,init:null,sameForAll:!1};return this.each(function(){var c,y=b(this).data("keyboard"),t=y.namespace+"Scramble",n=y.options;y&&!y.scramble_options&&(c=y.scramble_options=b.extend({},o,e),y.extensionNamespace.push(t),c.orig_create=n.create,y.scramble_setup=function(e){var t,n,o,i,a,s,r,p,u,l,d;if(t=e.find("."+b.keyboard.css.keySet),e.length){for(c.byKeySet&&(t=t.eq(0)),n=0;n<t.length;n++)if(o=t.eq(n),r=0,d=[],u=[],p=[],l=[],o.children("button, span, br").each(function(){"BR"===this.tagName?(c.byRow?(d.push(this),u.push(!1),l[r]=d,p[r]=u,d=[],u=[]):(l[r]=this,p[r]=!1),r++):(s=!(1!==(s=b(this).attr("data-value")||"").length||!c.targetKeys.test(s))&&s,c.byRow?(d.push(this),u.push(s)):(l[r]=this,p[r]=s,r++))}),o.find("."+b.keyboard.css.endRow).remove(),c.byRow)for(a=0;a<l.length;a++)for(d=y.shuffle(l[a],p[a]),i=0;i<d.length;i++)o.append(d[i]);else for(d=y.shuffle(l,p),i=0;i<d.length;i++)o.append(d[i]);return c.byKeySet&&(e=y.realign(e)),e}},y.getRandomUInt=function(e){var t=window.crypto||window.msCrypto;if(void 0===t)return Math.floor(Math.random()*e);var n=new Uint32Array(1);return t.getRandomValues(n),n[0]%e},y.shuffle=function(e,t){for(var n,o,i=e.length;0<i;)o=y.getRandomUInt(i),!1===t[i-1]&&i--,!1!==t[i-1]&&!1!==t[o]&&(n=e[--i],e[i]=e[o],e[o]=n);return e},y.realign=function(e){var n,o,i,a=e.find("."+b.keyboard.css.keySet),t=a.eq(0);return a=a.filter(":gt(0)"),t.children().each(function(e,t){o="BR"===t.tagName,i=b(t).attr("data-pos"),a.each(function(e,t){n=o?"br:first":'button[data-pos="'+i+'"]',b(t).find(n).appendTo(t)})}),e},y.setScrambleLayout=function(){if(!/^scrambled/.test(n.layout)){y.orig_layout=n.layout;var e=e||"scrambled"+Math.round(1e4*Math.random());n.layout=c.sameForAll?e:"scrambled"+Math.round(1e4*Math.random())}},n.create=function(){var e=n.layout;b.keyboard.builtLayouts[e]={mappedKeys:{},acceptedKeys:[],$keyboard:null},y.layout=n.layout=y.orig_layout,y.buildKeyboard(y.layout,!0),y.layout=n.layout=e,b.keyboard.builtLayouts[e]=b.extend(!0,{},b.keyboard.builtLayouts[y.orig_layout]),c.randomizeOnce&&(b.keyboard.builtLayouts[e].$keyboard=y.scramble_setup(b.keyboard.builtLayouts[y.orig_layout].$keyboard.clone())),y.$keyboard=b.keyboard.builtLayouts[e].$keyboard,c.randomizeInput?y.$el.unbind(b.keyboard.events.kbChange+t).bind(b.keyboard.events.kbChange+t,function(e,t){c.targetKeys.test(t.last.key)&&(t.$keyboard.find("."+n.css.buttonHover).removeClass(n.css.buttonHover),t.$keyboard=t.scramble_setup(t.$keyboard),b(document.elementFromPoint(e.clientX,e.clientY)).trigger("mouseenter"))}):c.randomizeOnce||y.$el.unbind(b.keyboard.events.kbBeforeVisible+t).bind(b.keyboard.events.kbBeforeVisible+t,function(e,t){t.$keyboard=t.scramble_setup(t.$keyboard)}),b.isFunction(c.orig_create)&&c.orig_create(y)},y.setScrambleLayout(),n.alwaysOpen&&y.$keyboard.length?setTimeout(function(){var e=b.keyboard.builtLayouts;y.$keyboard=y.scramble_setup(y.$keyboard),y.setScrambleLayout(),void 0===e[n.layout]&&(e[n.layout]={mappedKeys:b.extend({},e[y.layout].mappedKeys),acceptedKeys:b.extend([],e[y.layout].acceptedKeys),$keyboard:y.$keyboard.clone()}),b.isFunction(c.init)&&c.init(y)},0):b.isFunction(c.init)&&c.init(y))})}}),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(f){f.fn.addTyping=function(e){var t={showTyping:!0,lockTypeIn:!1,delay:250,hoverDelay:250},b=f.keyboard;return this.each(function(){var c,y=f(this).data("keyboard");y&&(c=y.typing_options=f.extend({},t,e),y.typing_keymap={" ":"space",'"':"34","'":"39"," ":"space","\b":"bksp","{b}":"bksp","{d}":"del","{l}":"left","{r}":"right","\n":"enter","\r":"enter","{e}":"enter","\t":"tab","{t}":"tab"},y.typing_xref={8:"bksp",9:"tab",13:"enter",32:"space",37:"left",39:"right",46:"del"},y.typing_event=!1,y.typing_namespace=y.namespace+"typing",y.extensionNamespace.push(y.typing_namespace),c.savedLockInput=y.options.lockInput,y.typing_setup_reset=function(){var e=b.events,t=y.typing_namespace,n=[e.kbHidden,e.kbInactive,""].join(t+" ");y.$el.unbind(t).bind(n,function(){y.typing_reset()}),y.unbindButton(t).bindButton("mousedown"+t,function(){y.typing_reset()})},y.typing_setup=function(){var e=y.typing_namespace;y.typing_setup_reset(),y.$el.bind(b.events.kbBeforeVisible+e,function(){y.typing_setup()}),y.$preview.unbind(e).bind("keyup"+e,function(e){return!(c.init&&c.lockTypeIn||!c.showTyping)&&(37<=e.which&&e.which<=40?void 0:(16===e.which&&(y.shiftActive=!1),18===e.which&&(y.altActive=!1),16===e.which||18===e.which?(y.showSet(),void setTimeout(function(){y.$preview&&y.$preview.focus()},200)):void 0))}).bind("keydown"+e,function(e){if(c.init&&c.lockTypeIn||!c.showTyping)return!1;e.temp=!1,16===e.which&&(e.temp=!y.shiftActive,y.shiftActive=!0),18===e.which&&(e.temp=!y.altActive,y.altActive=!0),e.temp&&(y.showSet(),y.$preview.focus()),y.typing_event=!0,y.typing_xref[e.which]&&y.typing_findKey("",e)}).bind("keypress"+e,function(e){if(c.init&&c.lockTypeIn)return!1;y.typing_event&&!y.options.lockInput&&(y.typing_reset(),y.typing_event=!0,y.typing_findKey("",e))})},y.typing_reset=function(){y.typing_event=c.init=!1,c.text="",c.len=c.current=0,y.options.lockInput=c.savedLockInput},y.typeIn=function(e,t,n,o){if(!y.isVisible())return clearTimeout(y.typing_timer),void y.typing_reset();if(y.typing_event){if(void 0===e)return y.typing_event=!1,void(y.options.lockInput=c.savedLockInput)}else!0!==c.init&&(c.init=!0,y.options.lockInput=c.lockTypeIn,c.text=e||c.text||"",c.len=c.text.length,c.delay=t||c.delay,c.current=0,n&&(c.callback=n)),"{"===(e=c.text.substring(c.current,++c.current))&&"}"===c.text.substring(c.current+1,c.current+2)&&(e+=c.text.substring(c.current,c.current+=2)),y.typing_findKey(e,o)},y.typing_findKey=function(e,t){var n,o,i,a,s,r,p,u,l=b.css,d=b.builtLayouts[y.layout].mappedKeys;if(y.isOpen&&y.$keyboard.length)if(r=y.$keyboard.find("."+l.keySet),a=e in y.typing_keymap?y.typing_keymap[e]:e,n="."+l.keyButton+'[data-action="'+a+'"]',y.typing_event&&t&&(n="keypress"!==t.type&&y.typing_xref.hasOwnProperty(t.keyCode||t.which)?"."+l.keyPrefix+y.processName(y.typing_xref[t.keyCode||t.which]):(o=String.fromCharCode(t.charCode||t.which),d.hasOwnProperty(o)?"."+l.keyButton+'[data-value="'+d[o].replace(/"/g,'\\"')+'"]':"."+l.keyPrefix+y.processName(o))),(s=r.filter(":visible").find(n)).length?y.typing_simulateKey(s,e,t):(u=(s=y.typing_event?r.find(n):(i=e in y.typing_keymap?y.typing_keymap[e]:y.processName(e),r.find("."+l.keyPrefix+i))).closest("."+l.keySet)).attr("name")?(c.showTyping&&(p=u.attr("name"),y.shiftActive=/shift/.test(p),y.altActive=/alt/.test(p),y.metaActive=y.last.keyset[2]=!!/\bmeta/.test(p)&&p.match(/meta[\w-]+/)[0],y.showSet(y.metaActive)),y.typing_simulateKey(s,e,t)):y.typing_event||(e in y.typing_keymap&&y.typing_keymap[e]in b.keyaction?b.keyaction[y.typing_keymap[e]](y,s,t):y.insertText(e),y.checkCombos(),y.$el.trigger(b.events.kbChange,[y,y.el])),c.current<=c.len&&0!==c.len){if(!y.isVisible())return;y.typing_timer=setTimeout(function(){y.typeIn()},c.delay)}else{if(0!==c.len)return y.typing_reset(),void(f.isFunction(c.callback)&&(y.typing_timer=setTimeout(function(){f.isFunction(c.callback)&&c.callback(y)},c.delay)));y.typing_reset()}},y.typing_simulateKey=function(e,t,n){var o=e.length;y.isVisible()&&(c.showTyping&&o&&(e.filter(":visible").trigger("mouseenter"+y.namespace),c.showTyping&&o&&setTimeout(function(){e.trigger("mouseleave"+y.namespace)},Math.min(c.hoverDelay,c.delay))),y.typing_event||setTimeout(function(){t in y.typing_keymap&&y.typing_keymap[t]in b.keyaction?((n=n||f.Event("keypress")).target=e,b.keyaction[y.typing_keymap[t]](y,e,n)):y.insertText(t),y.checkCombos(),y.$el.trigger(b.events.kbChange,[y,y.el])},c.delay/3))},c.showTyping&&y.options.alwaysOpen&&y.isVisible()?y.typing_setup():y.$el.unbind(b.events.kbBeforeVisible+y.typing_namespace).bind(b.events.kbBeforeVisible+y.typing_namespace,function(){c.showTyping?y.typing_setup():y.typing_setup_reset()}))})}}),
- /*! Mousewheel version: 3.1.12 * (c) 2014 Brandon Aaron * MIT License */
- function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(c){var y,b,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],f=Array.prototype.slice;if(c.event.fixHooks)for(var n=e.length;n;)c.event.fixHooks[e[--n]]=c.event.mouseHooks;var m=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],o,!1);else this.onmousewheel=o;c.data(this,"mousewheel-line-height",m.getLineHeight(this)),c.data(this,"mousewheel-page-height",m.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],o,!1);else this.onmousewheel=null;c.removeData(this,"mousewheel-line-height"),c.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=c(e),n=t["offsetParent"in c.fn?"offsetParent":"parent"]();return n.length||(n=c("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return c(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function o(e){var t,n=e||window.event,o=f.call(arguments,1),i=0,a=0,s=0,r=0,p=0;if((e=c.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(a=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(a=-1*s,s=0),i=0===s?a:s,"deltaY"in n&&(i=s=-1*n.deltaY),"deltaX"in n&&(a=n.deltaX,0===s&&(i=-1*a)),0!==s||0!==a){if(1===n.deltaMode){var u=c.data(this,"mousewheel-line-height");i*=u,s*=u,a*=u}else if(2===n.deltaMode){var l=c.data(this,"mousewheel-page-height");i*=l,s*=l,a*=l}if(t=Math.max(Math.abs(s),Math.abs(a)),(!b||t<b)&&v(n,b=t)&&(b/=40),v(n,t)&&(i/=40,a/=40,s/=40),i=Math[1<=i?"floor":"ceil"](i/b),a=Math[1<=a?"floor":"ceil"](a/b),s=Math[1<=s?"floor":"ceil"](s/b),m.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();r=e.clientX-d.left,p=e.clientY-d.top}return e.deltaX=a,e.deltaY=s,e.deltaFactor=b,e.offsetX=r,e.offsetY=p,e.deltaMode=0,o.unshift(e,i,a,s),y&&clearTimeout(y),y=setTimeout(h,200),(c.event.dispatch||c.event.handle).apply(this,o)}}function h(){b=null}function v(e,t){return m.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}c.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});
|