diff --git a/output/keymanweb.js b/output/keymanweb.js index 98dcdc64c1..978f4ef413 100644 --- a/output/keymanweb.js +++ b/output/keymanweb.js @@ -8,7 +8,7 @@ String.prototype.kmwCodePointToCodeUnit=function(a){if(null===a)return null;var String.prototype.kmwBMPNextChar=function(a){return 0>a||a>=(""+this).length-1?null:a+1};String.prototype.kmwBMPPrevChar=function(a){return 0>=a||a>(""+this).length?null:a-1};String.prototype.kmwBMPCodePointToCodeUnit=function(a){return a};String.prototype.kmwBMPCodeUnitToCodePoint=function(a){return a};String.prototype.kmwBMPLength=function(){return(""+this).length};String.prototype.kmwBMPSubstr=function(a,b){var c=""+this;return-12*a?c.focusNode.substringData(c.focusOffset- 2*a,2*a)._kmwSubstr(-a)._kmwSubstr(0,g):c.focusNode.substringData(0,c.focusOffset)._kmwSubstr(-a)._kmwSubstr(0,g)}else{if(c.setSelectionRange){if(c._KeymanWebSelectionStart)d=c._KeymanWebSelectionStart;else{if(null===b._CachedSelectionStart||c.selectionStart!==b._LastCachedSelection)b._LastCachedSelection=c.selectionStart,b._CachedSelectionStart=c.value._kmwCodeUnitToCodePoint(c.selectionStart),b._CachedSelectionEnd=c.value._kmwCodeUnitToCodePoint(c.selectionEnd);d=b._CachedSelectionStart}return d< -a?c.value._kmwSubstr(0,d):c.value._kmwSubstring(d-a,d-a+g)}if(e&&(d=e.selection))return c=d.createRange(),c.moveStart("character",-2*a),c.text._kmwSubstr(-a)._kmwSubstring(0,g)}return""};b.alignInputs=function(a){if(i.touchable)for(var g=0;gf&&gi&&cwindow.innerWidth-k-o&&(w=1,d-=o);a.drawPreview(t,k,m,w);l.left=d-o+"px";l.display="block"}else c.style.display= -"none";c.key=b;c.state=g}};a.drawPreview=function(a,b,c,d){var c=a.getContext("2d"),e=(a.width-b)/2,f=a.height,h=0,k=e,m=b+e,b=b+2*e,o=0.5*f,l=0.6*f,p=8;"Android"==i.OS&&(p=3);switch(d){case -1:k-=e;m-=e;b-=e;break;case 1:h+=e,k+=e,m+=e}c.clearRect(0,0,a.width,a.height);"Android"==i.OS?(k=m=(k+m)/2,c.fillStyle="#999"):c.fillStyle="#ffffff";c.lineWidth="1";c.strokeStyle="#cccccc";c.save();c.beginPath();c.moveTo(h+p,0);c.arcTo(b,0,b,p,p);"Android"==i.OS?(c.arcTo(b,o,m,l,p),c.arcTo(m,l,k,l,p)):(c.arcTo(b, -o,m,l,p),c.arcTo(m,l,m-p,f,p),c.arcTo(m,f,k,f,p),c.arcTo(k,f,k,l-p,p));c.arcTo(k,l,h,o-p,p);c.arcTo(h,o,h,p,p);c.arcTo(h,0,h+p,0,p);c.fill();c.stroke();c.restore()};a.addCallout=function(b){if("phone"!=i.formFactor||"iOS"!=i.OS)return null;var g=h._CreateElement("DIV"),c=g.style;g.id="kmw-popup-callout";a._Box.appendChild(g);var d=b.offsetLeft,e=b.offsetWidth,f=b.offsetHeight;c.top=b.offsetTop-6+"px";c.left=d+"px";c.width=e+"px";c.height=f+6+"px";return g};b.handleRotationEvents=function(){"iOS"== -i.OS&&h.attachDOMEvent(window,"orientationchange",b.rotateDevice);"Android"==i.OS&&(a.wasVisible=a.isVisible,"onmozorientationchange"in screen?h.attachDOMEvent(screen,"mozorientationchange",a.hideNow):h.attachDOMEvent(window,"orientationchange",a.hideNow),h.attachDOMEvent(window,"resize",function(){b.alignInputs(!0);a.hideLanguageList();a._Load();a.wasVisible&&a._Show()}))};b.rotateDevice=function(){a.hideLanguageList();a._Visible&&(a.adjustHeights(),"phone"==i.formFactor&&"Android"==i.OS&&window.setTimeout(function(){window.scrollTo(0, -1)},1E3))};a.waitForFonts=function(a,g){if("undefined"==typeof a&&"undefined"==typeof g||"undefined"==typeof a.files&&"undefined"==typeof g.files)return!0;var c=h.checkFontDescriptor(a),d=h.checkFontDescriptor(g);if(c&&d)return!0;b.fontCheckTimer=window.setInterval(function(){h.checkFontDescriptor(a)&&h.checkFontDescriptor(g)&&(window.clearInterval(b.fontCheckTimer),b.fontCheckTimer=null,b.alignInputs(!0))},100);window.setTimeout(function(){b.fontCheckTimer&&(window.clearInterval(b.fontCheckTimer), -b.fontCheckTimer=null,b.alignInputs(!0))},5E3);return!1}})();(function(){var b=window.tavultesoft.keymanweb,a=b.util,h=b.osk,i=a.device;b.TSS_LAYER=33;b.TSS_PLATFORM=31;b._BeepObjects=[];b._BeepTimeout=0;b.KSF=b.KSF=function(){b._IgnoreNextSelChange=1};b.KT=b.KT=function(a,g){b.cachedContext.reset();var c=b._LastActiveElement,d,e,f;d=!1;null!=c&&(d=c._KeymanWebSelectionStart,e=c._KeymanWebSelectionEnd,f=b._Selection,b._IsActivatingKeymanWebUI=1,b._IgnoreNextSelChange=100,b._FocusLastActiveElement(),b._IsMozillaEditableIframe(c,0)&&(c=c.documentElement),document.selection&& +a?(Array(a-d+1).join("\ufffe")+c.value._kmwSubstr(0,d))._kmwSubstr(0,g):c.value._kmwSubstring(d-a,d-a+g)}if(e&&(d=e.selection))return c=d.createRange(),c.moveStart("character",-2*a),c.text._kmwSubstr(-a)._kmwSubstring(0,g)}return""};b.alignInputs=function(a){if(i.touchable)for(var g=0;gf&&gi&&cwindow.innerWidth-k-o&&(w=1,d-=o);a.drawPreview(t,k,m,w); +l.left=d-o+"px";l.display="block"}else c.style.display="none";c.key=b;c.state=g}};a.drawPreview=function(a,b,c,d){var c=a.getContext("2d"),e=(a.width-b)/2,f=a.height,h=0,k=e,m=b+e,b=b+2*e,o=0.5*f,l=0.6*f,p=8;"Android"==i.OS&&(p=3);switch(d){case -1:k-=e;m-=e;b-=e;break;case 1:h+=e,k+=e,m+=e}c.clearRect(0,0,a.width,a.height);"Android"==i.OS?(k=m=(k+m)/2,c.fillStyle="#999"):c.fillStyle="#ffffff";c.lineWidth="1";c.strokeStyle="#cccccc";c.save();c.beginPath();c.moveTo(h+p,0);c.arcTo(b,0,b,p,p);"Android"== +i.OS?(c.arcTo(b,o,m,l,p),c.arcTo(m,l,k,l,p)):(c.arcTo(b,o,m,l,p),c.arcTo(m,l,m-p,f,p),c.arcTo(m,f,k,f,p),c.arcTo(k,f,k,l-p,p));c.arcTo(k,l,h,o-p,p);c.arcTo(h,o,h,p,p);c.arcTo(h,0,h+p,0,p);c.fill();c.stroke();c.restore()};a.addCallout=function(b){if("phone"!=i.formFactor||"iOS"!=i.OS)return null;var g=h._CreateElement("DIV"),c=g.style;g.id="kmw-popup-callout";a._Box.appendChild(g);var d=b.offsetLeft,e=b.offsetWidth,f=b.offsetHeight;c.top=b.offsetTop-6+"px";c.left=d+"px";c.width=e+"px";c.height=f+6+ +"px";return g};b.handleRotationEvents=function(){"iOS"==i.OS&&h.attachDOMEvent(window,"orientationchange",b.rotateDevice);"Android"==i.OS&&(a.wasVisible=a.isVisible,"onmozorientationchange"in screen?h.attachDOMEvent(screen,"mozorientationchange",a.hideNow):h.attachDOMEvent(window,"orientationchange",a.hideNow),h.attachDOMEvent(window,"resize",function(){b.alignInputs(!0);a.hideLanguageList();a._Load();a.wasVisible&&a._Show()}))};b.rotateDevice=function(){a.hideLanguageList();a._Visible&&(a.adjustHeights(), +"phone"==i.formFactor&&"Android"==i.OS&&window.setTimeout(function(){window.scrollTo(0,1)},1E3))};a.waitForFonts=function(a,g){if("undefined"==typeof a&&"undefined"==typeof g||"undefined"==typeof a.files&&"undefined"==typeof g.files)return!0;var c=h.checkFontDescriptor(a),d=h.checkFontDescriptor(g);if(c&&d)return!0;b.fontCheckTimer=window.setInterval(function(){h.checkFontDescriptor(a)&&h.checkFontDescriptor(g)&&(window.clearInterval(b.fontCheckTimer),b.fontCheckTimer=null,b.alignInputs(!0))},100); +window.setTimeout(function(){b.fontCheckTimer&&(window.clearInterval(b.fontCheckTimer),b.fontCheckTimer=null,b.alignInputs(!0))},5E3);return!1}})();(function(){var b=window.tavultesoft.keymanweb,a=b.util,h=b.osk,i=a.device;b.TSS_LAYER=33;b.TSS_PLATFORM=31;b._BeepObjects=[];b._BeepTimeout=0;b.KSF=b.KSF=function(){b._IgnoreNextSelChange=1};b.KT=b.KT=function(a,g){b.cachedContext.reset();var c=b._LastActiveElement,d,e,f;d=!1;null!=c&&(d=c._KeymanWebSelectionStart,e=c._KeymanWebSelectionEnd,f=b._Selection,b._IsActivatingKeymanWebUI=1,b._IgnoreNextSelChange=100,b._FocusLastActiveElement(),b._IsMozillaEditableIframe(c,0)&&(c=c.documentElement),document.selection&& null!=f&&f.select(),c._KeymanWebSelectionStart=d,c._KeymanWebSelectionEnd=e,b._IgnoreNextSelChange=0,null!=a&&b.KO(0,c,a),"undefined"!=typeof g&&b.KDO(0,c,g),c._KeymanWebSelectionStart=null,c._KeymanWebSelectionEnd=null,d=!0);return d};b.KR=b.KR=function(j){b.loadTimer&&j.KI==b._LoadingInternalName&&(window.clearTimeout(b.loadTimer),b.loadTimer=null);if(b.initialized){var g,c=b._ActiveStub;if(!c||!("KI"in c)||c.KI!=j.KI)for(g=0;g