diff --git a/.gitignore b/.gitignore index 62ebe28685a48e03044c19ae8930a945f96614d8..66d2cf7357f8cc5e6dabc988dc1653d68442616a 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,18 @@ /windows/src/**/*.suo /windows/src/**/.idea +# Temp files generated during release build +/windows/src/buildtools/inst/copydebug.mak +/windows/src/desktop/inst/desktop_resources.res +/windows/src/desktop/inst/desktopui.wxs +/windows/src/developer/inst/cef.wxs +/windows/src/developer/inst/keymandeveloper.msi +/windows/src/developer/inst/setup.inf +/windows/src/developer/inst/setup.zip +/windows/src/developer/inst/templates.wxs +/windows/src/developer/inst/xml.wxs +/windows/src/developer/inst/kmlmc.wxs + # local defines for build, usually used for certificates and passwords /windows/src/UserDefines.mak diff --git a/android/KMAPro/build.gradle b/android/KMAPro/build.gradle index a3ba47065ff6d744e538e9b39d08dfab0b3a7150..9f6728c04d0a03d103ff3261bf03d6046341423f 100644 --- a/android/KMAPro/build.gradle +++ b/android/KMAPro/build.gradle @@ -8,9 +8,9 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:3.3.2' + classpath 'com.android.tools.build:gradle:3.4.1' classpath 'com.google.gms:google-services:4.2.0' - classpath 'io.fabric.tools:gradle:1.26.1' + classpath 'io.fabric.tools:gradle:1.28.1' } } diff --git a/android/KMAPro/gradle/wrapper/gradle-wrapper.properties b/android/KMAPro/gradle/wrapper/gradle-wrapper.properties index beaab5b5e8edf6e17924a9414e9e1ada3ea427a0..29126efb6c477e1a080fe16f6976b39139a6ba70 100644 --- a/android/KMAPro/gradle/wrapper/gradle-wrapper.properties +++ b/android/KMAPro/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/android/KMAPro/kMAPro/build.gradle b/android/KMAPro/kMAPro/build.gradle index 7deaa4acb6c41332678ab97e965a6ae1062a94ac..0ab3a071d2c972852070eeb2fc998559cfdce49d 100644 --- a/android/KMAPro/kMAPro/build.gradle +++ b/android/KMAPro/kMAPro/build.gradle @@ -9,38 +9,51 @@ android { defaultConfig { applicationId "com.tavultesoft.kmapro" - minSdkVersion 16 + minSdkVersion 19 targetSdkVersion 28 - //dumpProperties(project.ext) // Use this to dump all external properties for debugging TeamCity integration + //println "===DUMPING PROPERTIES===" + //dumpProperties(project) // Use this to dump all external properties for debugging TeamCity integration + //println "===END DUMP===" - if (project.hasProperty("services_json_file")) { + String env_services_json_file = System.getenv('services_json_file') + + if (env_services_json_file != null) { + env_services_json_file = String.valueOf(env_services_json_file) println "Copying production google-services.json and using at kMAPro/" copy { - from project.ext.services_json_file + from env_services_json_file include '*.json' into './' } } - if (project.hasProperty("build.number")) { - versionCode project.ext['build_counter'] as Integer - // Because TeamCity does not bubble build.counter into system properties... - versionName "${project.ext['build.number']}" + String env_build_number = System.getenv("BUILD_NUMBER") //assigned by TeamCity, so all caps + String env_build_counter = System.getenv("build_counter") + if (env_build_number != null) { + println "Using build number $env_build_number and counter $env_build_counter from environment" + versionCode env_build_counter as Integer + versionName env_build_number } else { String majorMinorVersion = file('$projectDir/../../../../resources/VERSION.md').text.trim() versionCode 100 versionName majorMinorVersion + '.0.0' + println "Using build $majorMinorVersion from project VERSION.md" } } - if (project.hasProperty("release_store_file")) { + String env_release_store_file = System.getenv("release_store_file") + String env_release_store_password = System.getenv("release_store_password") + String env_release_key_alias = System.getenv("release_key_alias") + String env_release_key_password = System.getenv("release_key_password") + if (env_release_store_file != null) { signingConfigs { release { - storeFile file(project.ext.release_store_file) - storePassword project.ext.release_store_password - keyAlias project.ext.release_key_alias - keyPassword project.ext.release_key_password + println "Using signing from environment" + storeFile file(String.valueOf(env_release_store_file)) + storePassword env_release_store_password + keyAlias env_release_key_alias + keyPassword env_release_key_password } } } @@ -52,7 +65,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' - if (project.hasProperty("release_store_file")) { + if (env_release_store_file != null) { signingConfig signingConfigs.release } } @@ -65,11 +78,12 @@ android { } } -if (project.hasProperty("keys_json_file")) { +String env_keys_json_file = System.getenv("keys_json_file") +if (env_keys_json_file != null) { apply plugin: 'com.github.triplet.play' play { - serviceAccountCredentials = file(project.ext.keys_json_file) + serviceAccountCredentials = file(String.valueOf(env_keys_json_file)) // Deactivate lower conflicting version APKs resolutionStrategy = "ignore" @@ -104,15 +118,15 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'com.google.android.material:material:1.0.0' api(name: 'keyman-engine', ext: 'aar') - implementation "com.google.firebase:firebase-core:16.0.7" + implementation "com.google.firebase:firebase-core:16.0.8" implementation "com.google.firebase:firebase-crash:16.2.1" implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') { transitive = true } + implementation 'androidx.preference:preference:1.1.0-alpha04' } -/* -def void dumpProperties(it){ +/*def void dumpProperties(it){ //println "Examining $it.name:" //println "Meta:" //println it.metaClass.metaMethods*.name.sort().unique() @@ -123,7 +137,6 @@ def void dumpProperties(it){ println "Properties:" println it.properties.entrySet()*.toString() .sort().toString().replaceAll(", ","\n") -} -*/ +}*/ apply plugin: 'com.google.gms.google-services' diff --git a/android/KMAPro/kMAPro/src/main/AndroidManifest.xml b/android/KMAPro/kMAPro/src/main/AndroidManifest.xml index 217124a1148a6464356ea27b88971805e38faa19..4b0592ade0cab6428268aa2556ff59ac491860cb 100644 --- a/android/KMAPro/kMAPro/src/main/AndroidManifest.xml +++ b/android/KMAPro/kMAPro/src/main/AndroidManifest.xml @@ -1,91 +1,89 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - + + + + + + + + - - + + - - + + - - + + - - - - - - - - - - - - - + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/app-info-a.css b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/app-info-a.css new file mode 100644 index 0000000000000000000000000000000000000000..b628b8aa930a8957f08efb4920b6fcdf168309e9 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/app-info-a.css @@ -0,0 +1,102 @@ + +/*********************** + Wrapper CSS +***********************/ + +#android-tab-header{ + width: 100%; + background: #f2f2f2; +} + +#android-mobile-header, #android-tablet-header{ + width: 50%; + float: left; + text-align: center; + background: #e4e4e4; + padding: 10px 0px; + cursor: pointer; +} + +.tab{ + display: none; +} + +#android-mobile-header.selected-tab, #android-tablet-header.selected-tab, .tab.selected-tab{ + display: block; + background: #f2f2f2; +} + +#android-mobile-header h4, #android-tablet-header h4{ + font-size: 14pt; + font-weight: bold; +} + +h2{ + font-size: 22pt; + font-weight: 400; + margin: 30px 20px 15px 20px; + text-align: center; + color: #BA2034; +} + +/* + Setting display: block; to ~!important will break CSS rules for phone vs tablet. + */ +p img{ + margin-top: 10px !important; + display: block; + margin-left: auto !important; + margin-right: auto !important; + margin-bottom: 10px !important; +} + +table{ + width: 100%; + margin-bottom: 50px; +} + + +td{ + text-align: left; + vertical-align: middle; + padding: 10px; +} + +td:first-child{ + width: 15%; +} + +td:last-child{ + width: 85%; +} + +th{ + font-weight: bold; + font-size: 14pt; + padding: 15px 0px 5px 0px; +} + +.command{ + font-weight: bold; + color: #69B7D3; +} + +#toolbar{ + padding-top: 40px; +} + +/*********************** + Images CSS +***********************/ + +#section2 img{ + min-width: 40px; +} + +/** + Removes existing max-width property settings from images in tables. + They overly shrink the images on the main Android symbol glossary. + */ +#section2 td img { + max-width: unset; +} \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/embed.css b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/embed.css new file mode 100644 index 0000000000000000000000000000000000000000..3e0cb6058e1556062ae3047a9a8c0b88461fa567 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/embed.css @@ -0,0 +1,7 @@ +.embed-on .content-online { + display: none; +} + +.embed-off .content-in-app { + display: none; +} \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/formfactor.css b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/formfactor.css new file mode 100644 index 0000000000000000000000000000000000000000..52f60e9532d2e0fead4a0a254f1acd7176f839e7 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/formfactor.css @@ -0,0 +1,28 @@ +.phone-form .tablet { + display: none; +} + +.tablet-form .phone { + display: none; +} + +#section2 a.phone, #section2 a.tablet { + color: #000000; +} + +.tablet-form a.phone { + display: block; +} + +.phone-form a.tablet { + display: block; +} + +.phone-form #android-mobile-header { + background: #f2f2f2; +} + +.tablet-form #android-tablet-header { + background: #f2f2f2; +} + diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/template.css b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/template.css new file mode 100644 index 0000000000000000000000000000000000000000..305491a18ca6dbb628400809897cca2f25e45056 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/css/template.css @@ -0,0 +1,1914 @@ +/************************************** + * CSS RESET + * ***********************************/ + +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; + padding-left: 10px; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; +} + +tbody { + display: table-row-group; + vertical-align: middle; +} + +table td{ + padding: 4px; +} + +html{ + font-family: 'Cabin', sans-serif; + /*font-family: 'Open Sans', sans-serif;*/ + /*font-family: 'Source Sans Pro', sans-serif;*/ +} + +html p, +html dd, +html li { + font-family: 'Calibri', sans-serif; + font-size: 14pt; +} + +body { + line-height: inherit; +} + +/************************************** + * Language Section CSS + * ***********************************/ + +@font-face { + font-family:GeezWeb; + font-style:normal; + font-weight:normal; + src:url('http://r.keymanweb.com/20/fonts/wookianos.ttf') format('truetype'); +} +@font-face { + font-family:MyanmarWeb; + font-style:normal; + font-weight:normal; + src:url('http://r.keymanweb.com/20/fonts/Padauk.ttf') format('truetype'); +} +/*@font-face { + font-family:LatinWeb; + font-style:normal; + font-weight:normal; + src:url('//r.keymanweb.com/20/fonts/DejaVuSans.ttf') format('truetype'); +}*/ +@font-face { + font-family:OriyaWeb; + font-style:normal; + font-weight:normal; + src:url('http://r.keymanweb.com/20/fonts/utkalm.ttf') format('truetype'); +} +@font-face { + font-family:SinhalaWeb; + font-style:normal; + font-weight:normal; + src:url('http://r.keymanweb.com/20/fonts/kaputaunicode.ttf') format('truetype'); +} +@font-face { + font-family:TamilWeb; + font-style:normal; + font-weight:normal; + src:url('http://r.keymanweb.com/20/fonts/aava1.ttf') format('truetype'); +} +@font-face { + font-family:CherokeeWeb; + font-style:normal; + font-weight:normal; + src:url('http://r.keymanweb.com/20/fonts/digohweli_1_7.ttf') format('truetype'); +} +@font-face { + font-family: SindhiWeb; + font-style: normal; + font-weight: normal; + src: url('http://r.keymanweb.com/20/fonts/MBKhursheed10.6.ttf') format("truetype"); +} +@font-face { + font-family: TibetanWeb; + font-style: normal; + font-weight: normal; + src: url('http://r.keymanweb.com/20/fonts/CTRC-Uchen.ttf') format("truetype"); +} +@font-face { + font-family: LaoWeb; + font-style: normal; + font-weight: normal; + src: url('http://r.keymanweb.com/20/fonts/SAYSETT0.eot'); + src: url('http://r.keymanweb.com/20/fonts/SAYSETT0.eot?') format('embedded-opentype'), + url('http://r.keymanweb.com/20/fonts/saysettha_web.woff') format('woff'), + url('http://r.keymanweb.com/20/fonts/saysettha_OT.ttf') format('truetype'); +} +@font-face { + font-family: PashtoWeb; + font-style: normal; + font-weight: normal; + src: url('http://r.keymanweb.com/20/fonts/LateefRegOT.ttf') format("truetype"); +} + +/* Amharic */ +:lang(amh).lang-example { + font-family: GeezWeb; +} +/* Burmese */ +:lang(mya).lang-example { + font-family: MyanmarWeb; +} +/* Cherokee */ +:lang(chr).lang-example { + font-family: CherokeeWeb; +} +/* Lao */ +:lang(lao).lang-example { + font-family: LaoWeb; +} +/* Malayalam +:lang(mal).lang-example { + font-family: GeezWeb; +} */ + +/* Marathi +:lang(mar).lang-example { + font-family: GeezWeb; +} */ +/* Oriya */ +:lang(ori).lang-example { + font-family: OriyaWeb; +} +/* Rawang */ +:lang(raw).lang-example { + font-family: MyanmarWeb; +} +/* Sindhi */ +:lang(snd).lang-example { + font-family: SindhiWeb; +} +/* Sinhala */ +:lang(sin).lang-example { + font-family: SinhalaWeb; +} + +/* Tamil */ +:lang(tam).lang-example { + font-family: TamilWeb; +} +/* Tibetan */ +:lang(bod).lang-example { + font-family: TibetanWeb; +} +/* Tigrigna */ +:lang(tir).lang-example { + font-family: GeezWeb; +} + +/************************************** + * Page Layout CSS + * ***********************************/ + +html{ + cursor: default; + background: #fff; +} + +.wrapper { + width: 960px; + margin-left: auto; + margin-right: auto; +} + +#section2 .wrapper { + width: initial; + overflow-x: auto; /* fixes content too wide leading to content dropping below index, but not ideal, temp fix better than previous */ + max-width: 960px; + margin-left: 220px; + margin-right: 220px; +} + +:not(div.interface-hierarchy) blockquote { + margin-left: 32px; + margin-bottom: 16px; + background: rgba(242,242,242,0.9); + padding: 4px; + border-radius: 4px; +} + +div.interface-hierarchy { + padding: 0px 10px 10px 10px; + line-height: 1.2em; + font-size: 14pt; +} + +div.interface-hierarchy blockquote { + padding-left: 20px; +} + +.no-toc #section2 .wrapper { + margin-right: auto; +} + +.no-index #section2 .wrapper { + margin-left: auto; +} + +@media only screen and (min-width: 1440px) { + #section2 .wrapper { + width: 960px; + } + body #section2 { + float: none; + width: 1400px; + margin-left: auto; + margin-right: auto; + display: block; + } +} + +@media only screen and (min-width: 1024px) and (max-width: 1279px) { + #section2 .wrapper { + margin-right: 20px; + } +} + +.menu-wrapper { + width: 960px; + margin-left: auto; + margin-right: auto; +} + +.button{ + float: left; + width: 200px; + height: 40px; + line-height: 40px; + border-radius: 6px; + text-align: center; + margin: 20px; + cursor: pointer; + box-shadow: 1px 1px 2px #3e3e3e; +} + +.button a{ + text-decoration: none; +} + +.button h2{ + color: #fff; +} + +#container{ + min-height: 100%; + width: 100%; +} + +.main{ + float: left; + width: 100%; +} + +.valign-outer{ + height: 100%; + width: 100%; + overflow: hidden; + display: table; + position: static; +} + +.valign-middle{ + display: table-cell; + vertical-align: middle; + width: 100%; + position: static; +} + +.center{ + text-align: center; +} + +.command{ + font-weight: 400; + color: #69B7D2; +} + +.inline{ + text-align: center; +} + +.red{ + color: #B92034; +} + +.underline{ + border-bottom: 1px solid #B92034; + margin-bottom: 15px; + padding-bottom: 0px !important; +} + +.caption{ + text-align: center; + font-size: 11pt; + font-weight: 600; + margin-top: -15px; + padding: 0px 10px; +} + +.people-text{ + font-size: 12pt !important; +} + +.testimonial{ + display: block; + margin: 20px; + background: #fff; + border-radius: 14px; + padding: 30px 20px; + box-shadow: 1px 1px 4px #000; + font-style: italic; + color: #6e6e6e; +} + +.caption a{ + text-decoration: underline; + color: #B92034; +} + +.contact-social{ + position: relative; + top: 12px; +} + +/********************************** + * HEADER CSS + *********************************/ + +.header{ + float: left; + width: 100%; + background: #f2f2f2; + display: block; + z-index: 5; +} + +#show-phone-menu{ + display: none; +} + +#logo{ + margin-left: 30px; + float: left; +} + +#no-menu-spacer{ + float: left; + width: 100%; + height: 20px; + display: block; +} + +#header-bottom{ + width: 100%; + height: 8px; + display: block; +} + +#help{ + width: 160px; + position: absolute; + top: 35px; + left: 100%; + margin-left: -160px; + text-decoration: none; +} + +#help p{ + float: left; + font-size: 14pt; + color: #000; + vertical-align: top; + text-decoration: underline; +} + +#help img{ + float: left; + margin-left: 10px; +} + +#breadcrumbTrail{ + float: left; + margin: 10px 10px 20px 40px; + background: #f2f2f2; + padding: 10px; + border-radius: 4px; + font-size: 10pt; +} + +#breadcrumbTrail a{ + color: #B92034; +} + +/************************************** + * TOP MENU 1 CSS + * ***********************************/ + +#top-menu1{ + float: left; + width: 100%; + height: 50px; + background: #f2f2f2; + position: absolute; + z-index: 2; + top: 66px; + padding-top: 12px; +} + +#top-menu-bg{ + position:relative; + top:-8px; + width:100%; + padding-top: 12px; + height:50px; + float: left; + background:white; +} + +#top-menu1.faded-menu { + position: fixed; + top: 0; + background: rgba(242,242,242,0.9); +} + +#top-menu-icon{ + float: left; + position: absolute; + top: 13px; + left: 30px; + display: none; +} + +#top-menu-icon2{ + float: left; + position: absolute; + top: 25px; + left: 100%; + margin-left: -57px; + display: none; +} + +#top-menu1 .menu-item{ + float: left; + width: 240px; + height: 50px; + text-align: center; + line-height: 50px; + overflow-y: visible; +} + +#top-menu1 .menu-item:hover, #top-menu1 .menu-item img:hover, #top-menu1 .menu-item h3:hover, #top-menu1 .menu-item h3:hover a{ + color: #B92034; +} + +#top-menu1 .menu-item:nth-child(odd):hover{ + background: #f2f2f2; + box-shadow: 1px 1px 4px #000; + position: relative; + z-index: 2; +} + +#top-menu1 .menu-item:hover .menu-item-dropdown{ + display: block !important; +} + +#top-menu1 .menu-item:hover .header-triangle img{ + background: url('../img/triangle.png') 17px 0; +} + +#top-menu1 .menu-item a{ + color: #000; + text-decoration: none; +} + +#top-menu1 .menu-item h3 a:hover{ + color: #B92034; +} + +#top-menu1 .menu-item h3{ + font-weight: 600; + color: #000; +} + +.header-triangle img{ + margin-left: 5px; + height: 9px; + width: 17px; + background: url('../img/triangle.png') 0 0; +} + +#top-menu1 .menu-item .menu-item-sub{ + float: right; +} + +#top-menu-bottom{ + width: 100%; + height: 8px; + display: block; +} + +.menu-item-dropdown{ + width: 240px; + position: relative; + left: -5px; + z-index: 3; + display: none; + text-align: left; + padding: 0px 5px 5px 5px; + overflow: hidden; +} + +.menu-dropdown-inner{ + width: 240px; + background: #f2f2f2; + margin-bottom: 10px; + padding-bottom: 10px; + box-shadow: 1px 1px 4px #000; +} + +.menu-item-dropdown h4{ + color: #000; + border-bottom: 1px solid #000; + margin: 0px 10px; + padding-top: 10px; + font-weight: 600; + line-height: 1.5em; +} + +.menu-item-dropdown h4:first-child{ + border-top: none; +} + +.menu-item-dropdown form{ + width: 100%; + height: 30px; + padding: 10px 0px; +} + +#language-search{ + float: left; + width: 139px; + height: 28px; + border-radius: 0px; + border: solid 1px gray; + margin-left: 10px; + padding-left: 10px; +} + +#search-submit{ + float: left; + position: relative; + left: -1px; +} + +.menu-item-dropdown ul{ + padding-top: 10px; +} + +.menu-item-dropdown ul li{ + padding: 0px; + text-align: left; + line-height: 1.8em; + width: 220px; + margin: 0px 10px; +} + +.menu-item-dropdown ul li a{ + color: #B92034 !important; + font-weight: 500; + font-size: 11pt; + display: inline-block; + width: 100%; + height: 100%; + padding: 0px 10px; +} + +.menu-item-dropdown ul li:hover a{ + text-decoration: underline !important; +} + +.menu-item-dropdown ul li:hover{ + background: #e2e2e2; +} + +.beta{ + display: inline-block; + font-size:8pt; + color:#000; + position:relative; + top:-6px;left:3px +} + +#phone-menu{ + display: none; +} + +#phone-header-spacer{ + display: none; +} + +/* Search Box */ + +.search-wrap { + right: 0; + top: 0; + position: absolute; + margin: 21px 32px 21px 21px; +} + +input[type="search"] { + -webkit-appearance: textfield; + appearance: textfield; + -moz-appearance: textfield; +} + +.search-wrap input { + width: 22px; + -moz-transition: all 0.3s ease-out; + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; + padding: 4px 22px 4px 4px; + background-color: #6D6C6F; + border-radius: 6px; + border: none; + background-image: url('../img/search-icon.png'); + background-repeat: no-repeat; + background-position: right 4px; + color: white; +} +.search-wrap input:focus { + width: 200px; + -moz-transition: all 0.3s ease-out; + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.search-wrap .offscreen { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + + +/********************************** + * FOOTER CSS + *********************************/ + +.footer{ + float: left; + width: 100%; + text-align: center; + background: #A4A8AB; +} + +.footer .wrapper { + width: auto; + display: inline-block; + margin: 0; + text-align: left; +} + +.footer-third{ + float: left; + width: 320px; + margin-left: 4px; + margin-right: 4px; +} + +.footer-third-title{ + margin-top: 30px; + text-align: center; + font-size: 18pt; + color: #fff; + margin-bottom: 25px; +} + +.footer-third form{ + width: 320px; +} + +.footer-third form input{ + -webkit-appearance: none; + padding: 0px; + float: left; + height: 38px; + width: 200px; + padding-left: 10px; + font-size: 14pt; + border-radius: 6px; + border-bottom-right-radius: 0px; + border-top-right-radius: 0px; + box-shadow: none; + border: 1px solid #FFFFFF; + margin-left: 10px; +} + +.footer-third form input:focus{ + outline: 0; +} + +.subscribe{ + width: 90px; + margin: 0px; + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + background: #666666; + box-shadow: none; +} + +.subscribe h2{ + font-size: 16px; + margin: 0px; + padding: 0px; + font-weight: normal; +} + +.subscribe:hover{ + background: #888888; +} + +#footer-mailchimp br { + clear: both; +} + +/* + social-logos font from https://github.com/Automattic/social-logos, GPLv2 + */ +@font-face { + font-family: "social-logos"; + src: url("../../fonts/social-logos.ttf"); + font-weight: normal; + font-style: normal; +} + +[data-icon]:before { + font-family: "social-logos" !important; + content: attr(data-icon); + font-style: normal !important; + font-weight: normal !important; + font-variant: normal !important; + text-transform: none !important; + line-height: 1; + speak: none; + padding-right: 4px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } + +#footer-social { + text-align: center; +} + +#footer-social a { + display: block; + text-decoration: none; + color: #666666; + font-size: 14pt; + padding: 4px; +} + +#footer-social a:hover { + color: #444444; +} + +#privacy-policy { + text-align: center; + margin-top: 32px; + display: block; +} + +#privacy-policy a { + display: block; + text-decoration: none; + color: white; + font-size: 12pt; +} + +#privacy-policy a:hover { + color: #444444; +} + +#footer-social div { + display: inline-block; + text-align: left; + margin-bottom: 24px; +} + +#footer-social a#footer-community { + padding-left: 27px; +} + +.sil-logo a, .sil-logo a:visited { + color: white; + text-decoration: none; +} + +.sil-logo a:hover { + color: white; + text-decoration: underline; +} + +.sil-logo{ + text-align: center; + margin-top: 20px; +} + +.sil-logo p{ + color: #fff; + font-size: 12pt; + margin-top: 10px; +} + +/********************************** + * SECTION 2 CSS + *********************************/ + +#section2{ + float: left; + width: 100%; + margin-bottom: 30px; + display: inline; +} + +#section2 h1{ + text-align: center; + font-size: 28pt; + padding: 40px 10px 10px 10px; +} + +#section2 h2{ + font-size: 20pt; + line-height: 1.2em; + padding: 32px 10px 10px 10px; +} + +#section2 h3{ + font-size: 16pt; + font-weight: 600; + padding: 16px 10px 10px 10px; +} + +#section2 h4{ + font-size: 14pt; + font-weight: 600; + padding: 4px 10px 4px 10px; +} + +#section2 p, #section2 dl, #section2 .itemizedlist { + padding: 0px 10px 10px 10px; + line-height: 1.2em; + font-size: 14pt; +} + +#section2 p a{ + color: #B92034; + text-decoration: underline; + cursor: pointer; + font-weight: 600; + line-height: 1.2em; +} + +#section2 li{ + margin-left: 30px; + list-style: disc; + list-style-position: outside; + line-height: 1.2em; + font-size: 14pt; +} + +#section2 p.context-main-image { + text-align: center; + margin-left: -12px; +} + +#section2 p.context-main-image img, +#section2 img.context-main-image { + box-shadow: 0px 4px 12px rgba(0,0,0,0.75); + border-radius: 4px; +} + +/*#section2 img{ + margin: 10px; +}*/ + +#section2 img.center{ + margin-left: auto; + margin-right: auto; + display: block; +} + +#section2 img.inline { + margin: 0; +} + +#section2 .itemizedlist li{ + list-style-position: outside; +} + +#section2 li { + margin-bottom: 12px; +} + +/* TODO: deprecate this since prismjs handles it. This also conflicts with the line-numbers plugin */ +#section2 pre[class*="language-"] { + margin-left: 9px; + margin-right: 9px; + padding: 9px; + line-height: 1.2; +} + +#section2 pre[class*="language-"] code[class*="language-"] { + line-height: 1.2; +} + +.product{ + margin-bottom: 10px; + margin-top: 20px; + background: #e3e3e3; + text-align: center; + max-height: 340px; +} + +.product a{ + display: inline-block; +} + +.product p{ + text-align: left; + font-size: 12pt !important; + height: 130px; +} + +#engine-support-list{ + margin-bottom: 20px; + columns: 2; + -webkit-columns: 2; + -moz-columns: 2; +} + +#keyboard-support-list{ + margin-bottom: 20px; + columns: 4; + -webkit-columns: 4; + -moz-columns: 4; +} + +#product-support-list{ + columns: 3; + -webkit-columns: 3; + -moz-columns: 3; + text-align: center; +} + +#version-history{ + text-align: center; +} + +#keyboard-support-list li, #product-support-list li, #engine-support-list li, #version-history li{ + list-style: none !important; +} + +#keyboard-support-list li a, #product-support-list li a, #engine-support-list li a, #version-history li a{ + color: #B92034; + text-decoration: underline; +} + +kbd { + background: none repeat scroll 0 0 #CCCCD0; + border: 1px solid #808080; + border-radius: 4px; + color: #000000; + font-size: 13px; + font-weight: bold; + margin: 0 1px; + padding: 0px 0px 0px; + min-width: 1.5em; + text-align: center; + vertical-align: bottom; + display: inline-block; +} + +/* Make the element look like an iOS key. */ +kbd.ios { + background-color: #fafafa; /* faaa fa fa fa fa faaaa far better... */ + border: 0; + box-shadow: /* Hard shadow */ 0 1px rgba(0,0,0,0.4), + /* Diffuse shadow */ 0 1px 4px rgba(0,0,0,0.2), + /* Highlight */ inset 0 1px white; + border-radius: 4px; + font-weight: 500; +} + +#section2 aside { + margin: 12px; + background: #e3e5e6; + border-radius: 6px; + padding: 1px 0; +} + +#section2 aside h2, +#section2 aside h3 { + padding-top: 8px; +} + +.list-of-tables { + display: none; +} + +.bold{ + font-weight: bold; +} + +.programlisting{ + font-family: -moz-fixed; + font-family: "Courier New", Courier, monospace; + background: #f2f2f2; + padding: 5px; + line-height: 1.3; + margin: 10px; + overflow-x: auto; +} + +.navheader, .navfooter{ + width: auto; + margin: 0px 10px; +} + +ol li a{ + color: #B92034; +} + +.tip{ + background: #f2f2f2; + border-radius: 6px; + padding: 20px; + margin: 10px 30px; +} + +.tip .title{ + margin-top: 0px !important; +} + +.informaltable table{ + background: #f2f2f2; + margin: 10px; +} + +.informaltable td, .informaltable th{ + border: 1px solid gray; + padding: 5px; +} + +.note{ + border: 1px solid #F3E5DE; +} + +.note .title{ + margin-top: 0px !important; + padding-top: 5px; + background-color: #F3E5DE; +} + +.display{ + background: #f2f2f2; +} + +.display td, .display th{ + border: solid 1px gray; + padding: 5px; +} + +.display th{ + font-weight: bold; +} + +table.display { + margin-bottom: 12px; +} + +table.platform { + margin-left: 10px; + margin-bottom: 12px; +} + +.platform th { + background: #f2f2f2; + font-weight: bold; +} + +.platform td, .platform th { + border: solid 1px gray; + padding: 5px; + text-align: center; +} + +#osk, +#osk-phone, +#osk-tablet{ + position: relative; + z-index: -2; +} + +#osk .kmw-osk-inner-frame{ + height: 320px !important; + font-size: 2em !important; + padding: 4px 0 4px 4px; +} + +#osk-phone .kmw-osk-inner-frame{ + padding-top: 6px !important; + height: 256px !important; + width: 528px !important; + font-size: 1.5em !important; +} + +#osk-tablet .kmw-osk-inner-frame{ + padding-top: 6px !important; + width: 726px !important; + height: 372px !important; + font-size: 1.5em !important; +} + +#osk-container, +#osk-phone-container, +#osk-tablet-container { + display: none; +} + +body[data-device='Windows'] #osk-container, +body[data-device='Windows'] #osk-phone-container, +body[data-device='Windows'] #osk-tablet-container { + display: block; +} + +body[data-device='iPhone'] #osk-phone-container, +body[data-device='Android'] #osk-phone-container { + display: block; +} + +body[data-device='iPad'] #osk-tablet-container, +body[data-device='Android'] #osk-tablet-container { + display: block; +} + +body[data-device='Unknown'] #osk-container, +body[data-device='Unknown'] #osk-phone-container, +body[data-device='Unknown'] #osk-tablet-container { + display: block; +} + +/********************************** + * PHONE MENU CSS + *********************************/ + +#show-phone-menu{ + display: none; + float: left; + margin: 10px; + position: relative; + z-index: 6; +} +#phone-menu{ + position: fixed; + top: 49px; + left: 0px; + z-index: 6; + width: 80%; + height: 100%; +} +#phone-menu-inner{ + width: 100%; + height: 100%; + overflow-y: scroll; + padding-bottom: 40%; + -webkit-overflow-scrolling:touch; + border-right: solid 4px #C1C1C1; + background: #fff; +} +.phone-menu-item{ + float: left; + width: 100%; + height: auto; + padding: 10px 0px; + background: #f2f2f2; +} +.phone-menu-item:last-child{ + margin-bottom: 60px; +} +.phone-menu-item h3{ + font-size: 14pt; + font-weight: bold; + margin: 0px 10px; + border-bottom: solid 1px #000; +} +.phone-menu-item form{ + margin-top: 10px; +} +#language-search2{ + float: left; + width: 144px; + height: 30px; + margin-left: 10px; + border-radius: 0px; + border: solid 1px gray; + padding: 0px; + padding-left: 10px; + font-size: 12pt; +} +#search-submit2{ + float: left; + position: relative; + left: -1px; + border-radius: 0px; +} +.phone-menu-item ul{ + padding: 10px; +} +.phone-menu-item ul li{ + line-height: 1.8em; +} +.phone-menu-item ul li a{ + text-decoration: underline; + color: #B92034; +} +#show-phone-menu-spacer{ + display: none; + float: left; +} + +/************************************** + * JIRA FEEDBACK CSS + * ***********************************/ + +#jira-feedback{ + width: 300px; + height: 320px; + padding: 9px; + background: #f2f2f2; + position: fixed; + top: 100%; + left: 100%; + margin-left: -340px; + border-top-left-radius: 6px; + border: solid 1px #000; + z-index: 4; +} + +#jira-feedback.selected{ + margin-top: -339px; +} + +#jira-feedback-tab{ + float: right; + position: relative; + top: -50px; + right: -10px; + z-index: 4; + background: #69B7D2; + height: 30px; + line-height: 30px; + padding: 5px 10px; + text-align: center; + border-top-left-radius: 6px; + border-top-right-radius: 6px; + width: 70px; + margin-left: 210px; + cursor: pointer; + border-top: solid 1px #000; + border-left: solid 1px #000; + border-right: solid 1px #000; +} + +#jira-feedback-tab h4{ + color: #fff; +} + +#jira-feedback-form{ + position: relative; + top: -30px; +} + +#jira-feedback input, #jira-feedback textarea, #jira-feedback select{ + width: 288px; + border: solid 1px #000; + padding: 4px 5px; + margin: 5px 0px 10px 0px; +} + +#jira-feedback textarea{ + height: 100px; +} + +#jira-feedback select{ + width: 298px; +} + +#jira-submit{ + float: right; + width: 140px; + height: 40px; + border-radius: 6px; + border: solid 3px #fff; + margin: 10px 0px; + cursor: pointer; + background: #91db51; /* Old browsers */ + background: -moz-linear-gradient(top, #69B7D2 0%, #5A9EB5 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#69B7D2), color-stop(100%,#5A9EB5)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #69B7D2 0%,#5A9EB5 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #69B7D2 0%,#5A9EB5 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #69B7D2 0%,#5A9EB5 100%); /* IE10+ */ + background: linear-gradient(to bottom, #69B7D2 0%,#5A9EB5 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#69B7D2', endColorstr='#5A9EB5',GradientType=0 ); /* IE6-9 */ +} + +#jira-submit input{ + color: #fff; + line-height: 40px; + text-align: center; + font-weight: bold; + width: auto; + background: none; + border: none; + cursor: pointer; +} + +#jira-submit:hover{ + background: #91db51; /* Old browsers */ + background: -moz-linear-gradient(top, #5A9EB5 0%, #477C8E 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5A9EB5), color-stop(100%,#477C8E)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #5A9EB5 0%,#477C8E 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #5A9EB5 0%,#477C8E 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #5A9EB5 0%,#477C8E 100%); /* IE10+ */ + background: linear-gradient(to bottom, #5A9EB5 0%,#477C8E 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5A9EB5', endColorstr='#477C8E',GradientType=0 ); /* IE6-9 */ +} + +#jira-feedback form{ + width: 300px; +} + +#jira-feedback p{ + float: left; + width: 300px; + text-align: left; + font-size: 12pt !important; + position: relative; + top: -30px; +} + +#jira-feedback p#jira-title { + top: -40px; +} + +/************************************** + * TABLET CSS + * ***********************************/ + +@media only screen and (min-width: 768px) and (max-width: 1024px){ + .wrapper, #section2 .wrapper{ + width: 740px; + margin-left: auto; + margin-right: auto; + } + /* Header */ + .header{ + position: fixed; + } + #top-menu1 .menu-item{ + width: 148px; + } + #top-menu1 .menu-item h3{ + font-size: 10pt; + } + #logo{ + margin-bottom: 15px; + } + #phone-header-spacer{ + display: block; + height: 80px; + } + /* Footer */ + .footer { + height: auto; + } + .footer-third{ + float: none; + clear: both; + width: 370px; + margin: 20px 0px 0px 0px; + } + /* Section 1 */ + #sect1-title h1{ + font-size: 36pt; + } + #sect1-image img{ + max-width: 90%; + } + /* Phone Menu */ + #top-menu1{ + display: none; + } + #top-menu-bg{ + display: none; + } + #show-phone-menu{ + display: block; + margin-top: 28px; + } + #phone-menu{ + top: 81px; + width: 40%; + } + #osk .kmw-osk-inner-frame{ + height: 280px; + font-size: 1.8em !important; + } + #jira-feedback{ + display: none; + } +} + +@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){ + #sect1-title h1{ + text-align: center; + font-size: 28pt; + } +} + +/* 7 inch */ +@media all and (min-width: 600px) and (max-width: 768px){ + .wrapper, #section2 .wrapper{ + width: 580px; + margin-left: auto; + margin-right: auto; + } + /* Header */ + #top-menu-bg{ + display: none; + } + #top-menu1 .menu-item{ + width: auto; + padding: 0 16px; + } + #top-menu1 .menu-item h3{ + font-size: 8pt; + } + /* Footer */ + .footer-third{ + width: 290px; + margin-left: 0px; + margin-right: 0px; + } + .footer-third form{ + width: 290px; + } + .footer-third form input{ + width: 170px; + } + #facebook{ + margin-left: 20px; + } + /* Section 1 */ + #sect1-title h1{ + font-size: 28pt; + text-align: center; + } + #sect1-image img{ + max-width: 90%; + } + /* Phone Menu */ + #show-phone-menu{ + display: block; + } + #osk .kmw-osk-inner-frame{ + height: 220px; + font-size: 1.5em !important; + } + #jira-feedback{ + display: none; + } +} + + + + +/************************************** + * PHONE CSS + * ***********************************/ + +@media all and (min-width: 10px) and (max-width: 600px){ + .wrapper, #section2 .wrapper{ + width: 320px; + margin-left: auto; + margin-right: auto; + } + /* Header */ + #top-menu-bg{ + display: none; + } + .header{ + position: fixed; + } + #top-menu1{ + display: none; + } + #help{ + display: none; + } + .header{ + height: 49px !important; + } + #logo{ + margin-top: 3px; + width: 185px; + position: fixed; + left: 50%; + margin-left: -92px; + } + #phone-header-spacer{ + display: block; + height: 57px; + } + /* Footer */ + .footer{ + height: auto; + } + .footer-third{ + margin-left: 0px; + margin-right: 0px; + height: auto; + } + .sil-logo{ + float: left; + margin-top: 40px; + margin-bottom: 20px; + } + /* Section 1 */ + .section1{ + height: auto; + background-size: auto 100%; + } + #sect1-image{ + width: 100%; + height: auto; + } + #sect1-image img{ + max-width: 80%; + height: auto; + padding-bottom: 10px; + } + #sect1-title{ + width: 100%; + height: auto; + } + #sect1-title h1{ + font-size: 24pt; + text-align: center; + padding: 20px 10px 0px 10px; + } + #sect1-title a{ + display: none; + } + /* Phone Menu */ + #show-phone-menu{ + display: block; + } + #show-phone-menu-spacer{ + display: block; + width: 40px; + height: 29px; + } + /* Section 2 */ + #section2 img{ + max-width: 80%; + } + #section2 h2{ + margin: 10px 10px 15px 10px; + text-align: center; + } + #keyboard-support-list{ + columns: 2; + -webkit-columns: 2; + -moz-columns: 2; + margin-bottom: 20px; + } + #product-support-list { + padding: 0px 30px; + font-size: 14pt; + columns: 1; + -webkit-columns: 1; + -moz-columns: 1; + margin-bottom: 20px; + } + #osk .kmw-osk-inner-frame{ + height: 140px; + font-size: 1em !important; + } + #keymanExample{ + overflow-x: scroll; + overflow-y: hidden; + height: 100px; + } + #keymanExample table{ + width: 1000px; + } + #jira-feedback{ + display: none; + } +} + +#KeymanWebControl{ + display: none; +} + +/* Landscape mode */ +@media all and (min-width: 480px) and (max-width: 600px) and (orientation: landscape){ + .wrapper, #section2 .wrapper{ + width: 460px; + margin-left: auto; + margin-right: auto; + } + /* Header */ + /* Footer */ + .footer-third{ + margin-left: 70px; + margin-right: 70px; + } + .sil-logo{ + margin-left: 70px; + } + /* Section 1 */ +} + +/************************************** + * WEB DEVELOPER HELP CSS + * ***********************************/ + +div.webhelp { + clear: both; +} + +div.webhelp h3 { + margin: 16px 0 0 0; + padding: 0; +} + +div.webhelp h4 { + margin: 0 0 16px 0; + padding:0; +} +img.webhelp, div.webhelp img {margin:16px 0 !important;border: 1px solid grey;} + + +code { + font-family: Consolas, Courier, "Courier New", mono; + font-size: 10.5pt; +} + +strong, b { + font-weight: bold; +} + +i, cite, em, var, address, dfn { +font-style: italic; +} + +dt { + margin-top: 16px; +} + +dt:first-child { + margin-top: 0; +} + +dd { + margin-left: 32pt; +} + +table.standard-table td, +table.standard-table th { + border: solid #e0e0dc; + border-width: 0 1px 1px 0; + padding: 6px; + text-align: left; +} +table.standard-table th { + border: 2px solid #fff; + border-bottom: 2px solid #d4dde4; + background: #eaeff2; + background: rgba(212,221,228,.5); + font-family: 'Open Sans Light',sans-serif; + font-size: 14px; + padding: 2px 8px 4px; + font-weight: 700; +} + +table.standard-table td { + background-color: #f9fafb; + background-color: rgba(212,221,228,.15); + border: 2px solid #fff; + box-shadow: inset 0 -1px 0 0 #eaeff2; + box-shadow: inset 0 -1px 0 0 rgba(212,221,228,.5); +} + +article dl dt span.readonly { + background-color: #666769; + font-size: 13px; + color: white; + padding: 1px 6px 3px; + border-radius: 6px; +} + +article dl dd span.optional { + background-color: #9c9c9c; + font-size: 13px; + font-style: italic; + font-weight: lighter; + color: white; + padding: 1px 6px 3px; + border-radius: 6px; +} + +/** + Table of contents -- developer section only +*/ + +.column-right { + display: none; + float: right; +} + +.column-left { + display: none; + float: left; +} + +.column-left.show-index { + display: block; +} + +.column-right.show-toc { + display: block; +} + +/* TOC on narrow displays should be shown at top */ + +@media all and (max-width: 1279px){ + .column-right { + display: none !important; + float: none; + } + #toc.fixed { + position: static !important; + } +} + +@media all and (max-width: 1023px){ + .column-left { + display: none !important; + float: none; + } +} + +#toc.fixed { + position: fixed; + top: 130px; +} + +#toc { + top: 0px; + margin-right: 10px; + width: 200px; + background: rgba(242,242,242,0.9); + overflow: auto; + border-radius: 4px; +} + +#index { + margin-left: 10px; + width: 200px; + overflow: auto; +} + +#section2 #toc h3 { + padding: 8px 12px; + margin-top: 0px; + color: black; +} + +#section2 h3, #section2 h2 { + color: #B92034; + margin-top: 10px; +} + +#section2 a { + color: #B92034; +} + +#section2 #toc a { + color: black; +} + +#toc ul, +#index ul { + margin: 0; + padding: 0 0 8px 0; + list-style: none; +} + +#toc li, +#index li { + font-family: 'Calibri', sans-serif; + font-size: 11pt; + list-style: none; + margin-bottom: 2px; + margin-left: 12px; +} + +#toc a, +#toc a:visited, +#index a, +#index a:visited { + color: black; + text-decoration: none; + display: block; +} + +#toc a:hover, +#index a:hover { + background: rgba(224,224,224,0.9); +} + +#index .current { + background: rgba(242,242,242,0.9); +} + +#toc .toc-h2 { + padding-left: 10px; +} + +#toc .toc-h3 { + padding-left: 20px; +} + +#toc .toc-h4 { + padding-left: 30px; +} + +#toc .toc-active a { + color: #69B7D2; +} diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/backspace-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/backspace-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/backspace-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/backspace-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/backspace-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/backspace-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/backspace-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/backspace-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/browser-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/browser-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/browser-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/browser-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/close-keyman-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/close-keyman-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/close-keyman-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/close-keyman-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-dl-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-dl-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..95100b4131fc7c4a5553a396e53ccd965790fa4d Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-dl-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-dl-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-dl-at.png new file mode 100644 index 0000000000000000000000000000000000000000..d3f5caf0e589b0d628b6a09cc1a82c10f8c4ea99 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-dl-at.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-english-dictionary-delete-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-english-dictionary-delete-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..d33a12186015948b7684bd9f34cad3e7034d7b58 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-english-dictionary-delete-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-khmer-delete-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-khmer-delete-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..d572f04a8d6f6b41afe0c51fbbc9954df33ef2a2 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/confirm-khmer-delete-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/delete-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/delete-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/delete-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/delete-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-file-browser-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-file-browser-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-file-browser-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-file-browser-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-file-browser-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-file-browser-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-file-browser-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-file-browser-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-install1-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-install1-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-install1-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-install1-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-install1-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-install1-at.png new file mode 100644 index 0000000000000000000000000000000000000000..3e4a1eca01a461fb1b4c494cc34f0ce695707043 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-install1-at.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-storage-permission-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-storage-permission-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-storage-permission-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-storage-permission-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-storage-permission-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-storage-permission-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-storage-permission-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-storage-permission-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-url-screen-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-url-screen-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-url-screen-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-url-screen-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-url-screen-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-url-screen-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-url-screen-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-url-screen-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-welcome-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-welcome-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-welcome-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-welcome-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-welcome-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-welcome-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-welcome-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dist-welcome-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dl-success-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dl-success-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..847ba5e4ee843a42ef403701eab06ad7cdaf5994 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dl-success-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dl-success-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dl-success-at.png new file mode 100644 index 0000000000000000000000000000000000000000..d47af615e8883718155e8d6837d7daf498b974c7 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/dl-success-at.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-dictionaries-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-dictionaries-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..fa8fc8da074a8756cf70ab8a09106cda2e366787 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-dictionaries-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-dictionary-info-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-dictionary-info-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..4308fcb7e7f675330132fdce2e3b5b44b564860f Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-dictionary-info-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-settings-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-settings-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..f565542f472e3ae35593a701ef38f374bed8d57b Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/english-settings-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/font-size-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/font-size-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/font-size-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/font-size-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/get-started-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/get-started-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/get-started-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/get-started-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/globe-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/globe-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/globe-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/globe-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/globe-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/globe-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/globe-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/globe-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/hide-keyboard-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/hide-keyboard-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/hide-keyboard-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/hide-keyboard-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/hide-keyboard-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/hide-keyboard-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/hide-keyboard-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/hide-keyboard-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/info-a-gray.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/info-a-gray.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/info-a-gray.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/info-a-gray.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/info-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/info-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/info-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/info-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/keyman-storage-permission-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/keyman-storage-permission-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/keyman-storage-permission-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/keyman-storage-permission-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/keyman-storage-permission-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/keyman-storage-permission-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/keyman-storage-permission-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/keyman-storage-permission-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/khmer-settings-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/khmer-settings-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..180b4be15de86a483f9ae0a7de377a41f9396ff8 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/khmer-settings-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/lang-list-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/lang-list-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..0063d6f5d45d5190c2b7ecc0e26746d4075f6f76 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/lang-list-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/lang-list-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/lang-list-at.png new file mode 100644 index 0000000000000000000000000000000000000000..8c2f64bbccc5221f703c04a030de61e8a38d9046 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/lang-list-at.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/menu-icon-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/menu-icon-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/menu-icon-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/menu-icon-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/plus-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/plus-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/plus-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/plus-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/return-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/return-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/return-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/return-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/return-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/return-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/return-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/return-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-a.png new file mode 100644 index 0000000000000000000000000000000000000000..5754bf2ada98b9fec16c9918dac176b854e0bf1c Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-a.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-khmer-info-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-khmer-info-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..7106bf5ab7bcb1593b741164ddf2ce089833c4d7 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-khmer-info-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-language-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-language-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..e6b2ac4c9d0c6fefc3f1f899c1485bae7eeec3d2 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-language-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-languages-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-languages-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..d68babc40fe41850bfd123cf0038e7993e2de69c Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-languages-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-two-installed-languages-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-two-installed-languages-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..f65847054933425c28a50b4fb16cd543c1139a56 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings-two-installed-languages-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings1-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings1-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..ed57492ef95dac0cc8b0a969691774cb318a26ed Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings1-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings1-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings1-at.png new file mode 100644 index 0000000000000000000000000000000000000000..c0b0f1bdea4a9531958bd55db077ca682ad45120 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings1-at.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings2-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings2-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..2aba1e210c7fe46cd887c7b7db3cc113f665232d Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings2-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings2-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings2-at.png new file mode 100644 index 0000000000000000000000000000000000000000..890ec39796966f624549be2b822a1ae74ac29fb8 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings2-at.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings3-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings3-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings3-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings3-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings3-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings3-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings3-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings3-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings4-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings4-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings4-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings4-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings4-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings4-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings4-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings4-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings5-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings5-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings5-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings5-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings5-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings5-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings5-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings5-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings6-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings6-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings6-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings6-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings6-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings6-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings6-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings6-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings7-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings7-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings7-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings7-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings7-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings7-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings7-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/settings7-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/share-a.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/share-a.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/share-a.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/share-a.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/shift-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/shift-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/shift-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/shift-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/shift-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/shift-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/shift-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/shift-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/touch-hold-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/touch-hold-ap.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/touch-hold-ap.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/touch-hold-ap.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/touch-hold-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/touch-hold-at.png similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/touch-hold-at.png rename to android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/touch-hold-at.png diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-dictionary-notification-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-dictionary-notification-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..512ec9476fe9a36f5b5a9e2f1ce352f819f4f609 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-dictionary-notification-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-notification-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-notification-ap.png new file mode 100644 index 0000000000000000000000000000000000000000..ef0d25689d3dbb8cbd102528837c1767d09ad764 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-notification-ap.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-notification-at.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-notification-at.png new file mode 100644 index 0000000000000000000000000000000000000000..01c6f063ddcd013101c2cf0b52dddeb8d3bb7dd6 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/app/12.0/uninstall-notification-at.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/favicon.ico b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..671c7c9156f6242dd683c8ed75d532eef1445a21 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/favicon.ico differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/headerbar.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/headerbar.png new file mode 100644 index 0000000000000000000000000000000000000000..19a21025d1f7cc1580c8b3d46579fa26584edf6a Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/headerbar.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/helpIcon.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/helpIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..8178e4ff76e3c32339d8e01829623d0c99c428a0 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/helpIcon.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/logo2.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/logo2.png new file mode 100644 index 0000000000000000000000000000000000000000..246c4cd5e004a297ec77acdef5f5b579869a45ed Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/logo2.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/search-icon.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/search-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ab7d73d0c3d372b2073e1ddddd620949507944f1 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/search-icon.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/sil-logo-blue-2017_1.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/sil-logo-blue-2017_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e82317a6d064ad09b123bbdf72bf9a642e20a383 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/sil-logo-blue-2017_1.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/triangle.png b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/triangle.png new file mode 100644 index 0000000000000000000000000000000000000000..0f4a9db7d1d1e6de12f446c161f33ece55494b71 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/img/triangle.png differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/js/keyrenderer.js b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/js/keyrenderer.js new file mode 100644 index 0000000000000000000000000000000000000000..2a3ef173973cfab9cf0fda2a3b1f542c9e65af6d --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/cdn/dev/js/keyrenderer.js @@ -0,0 +1,250 @@ +if(typeof KeyRenderer == 'undefined') +{ + var KeyRenderer = new function() + { + var site = '/cdn/dev'; + + this.render = function(s) + { + return "" + this.renderInternal(s, true) + ""; + } + + this.renderInternal = function(s, includePrintable) + { + var i = 0, r = ''; + var spkey = {PgUp:'pgup',PgDn:'pgdn',Left:'left',Right:'right',Up:'up',Down:'down',Ins:'ins',Del:'del',Home:'home',End:'end', + Enter:'enter',Tab:'tab',Esc:'esc',Caps:'caps',Shift:'shift2',Ctrl:'ctrl2',Alt:'alt2',Bksp:'bksp'}; + while(i < s.length) + { + var endspan = false; + var ch = s.charAt(i); + if(ch == '[' && i < s.length-1) + { + i++; ch = s.charAt(i); + if(ch != '[') + { + /* Ctrl+Shift+Alt+key */ + var t = ''; + while(s.charAt(i) != ']' && i < s.length) + { + t += s.charAt(i); + i++; + } + var n = t.indexOf('&'),t1=t; + if(n >= 0) + { + ch = t.substr(n,t.length-n); + t = t.substr(0,n); + } + else + { + ch = t.charAt(t.length-1); + t = t.substr(0, t.length-1); + } + r += ""; + + var x = t1.indexOf('!'),u='',ks,kn; + if(x >= 0) + { + ks = t1.substr(x+1,t1.length-x-1); + kn = spkey[ks]; + if(kn) + { + u = ""+ks+""; + t = t.substr(0,x); ch = '*'; + } + } + + if(t.indexOf('C') >= 0) r += "Ctrl"; + if(t.indexOf('S') >= 0) r += "Shift"; + if(t.indexOf('A') >= 0) r += "Alt"; + + r += u; + endspan = true; + } + } + if(!endspan || ch != '*') + { + if(ch.substr(0,1) == '&') + { + if(ch == '&') + { + ch = ''; + while(s.charAt(i) != ';' && i < s.length) + { + ch += s.charAt(i); + i++; + } + ch += ';'; + } + if(ch == '<') ch = '<'; + else if(ch == '>') ch = '>'; + else if(ch == '&') ch = '&'; + else if(ch == '"') ch = '"'; + } + chv = ch.charCodeAt(0); + r += ""+this.encodeEntities(ch)+""; + } + if(endspan) r += ""; + i++; + } + + if(includePrintable) + { + r += ""; + i = 0; + while(i < s.length) + { + endspan = false; + ch = s.charAt(i); + if(ch == '[' && i < s.length-1) + { + i++; ch = s.charAt(i); + if(ch != '[') + { + /* Ctrl+Shift+Alt+key */ + t = ''; + while(s.charAt(i) != ']' && i < s.length) + { + t += s.charAt(i); + i++; + } + var t1 = t; + ch = t.charAt(t.length-1); + t = t.substr(0, t.length-1); + r += ""; + + var x = t1.indexOf('!'),u='',ks,kn; + if(x >= 0) + { + ks = t1.substr(x+1,t1.length-x-1); + kn = spkey[ks]; + if(kn) + { + u = ks; + t = t.substr(0,x); ch = '*'; + } + } + + if(t.indexOf('C') >= 0) r += "Ctrl+"; + if(t.indexOf('S') >= 0) r += "Shift+"; + if(t.indexOf('A') >= 0) r += "Alt+"; + endspan = true; + + r += u; + } + } + if(!endspan || ch != '*') + if(ch == ' ') r += "Space"; else r += this.encodeEntities(ch); + if(endspan) r += ""; + i++; + } + r += ""; + } + + return r; + } + + this.encodeEntities = function(s) + { + return s.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", '''); + } + + this.getElementsByClassName = function(className, tag, elm) + { + if (document.getElementsByClassName) { + getElementsByClassName = function (className, tag, elm) { + elm = elm || document; + var elements = elm.getElementsByClassName(className), + nodeName = (tag)? new RegExp("\\b" + tag + "\\b", "i") : null, + returnElements = [], + current; + for(var i=0, il=elements.length; idocument.writeln(KeyRenderer.render('hf')); + } + + } + + if(window.attachEvent) + { + window.attachEvent('onload', KeyRenderer.renderAll); + } + else if(window.addEventListener) + { + window.addEventListener('load', KeyRenderer.renderAll, false); + } +} \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/cdn/fonts/social-logos.ttf b/android/KMAPro/kMAPro/src/main/assets/info/cdn/fonts/social-logos.ttf new file mode 100644 index 0000000000000000000000000000000000000000..e8013681b9896473dbe12c201a9bd124222a9426 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/assets/info/cdn/fonts/social-logos.ttf differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/css/app-info2.css b/android/KMAPro/kMAPro/src/main/assets/info/css/app-info2.css deleted file mode 100644 index 67049142c54fce0f786020b9d6846aa2fec022cc..0000000000000000000000000000000000000000 --- a/android/KMAPro/kMAPro/src/main/assets/info/css/app-info2.css +++ /dev/null @@ -1,255 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} - -body{ - font-family: verdana; - background: #fff; -} - -/*********************** - Wrapper CSS -***********************/ - -.wrapper{ - margin-left: auto; - margin-right: auto; - width: 960px; - padding-bottom: 30px; -} - -h2{ - font-size: 22pt; - font-weight: 400; - margin: 30px 20px 15px 20px; - text-align: center; - color: #BA2034; -} - -p{ - font-size: 16pt; - line-height: 1.3; - padding: 0px 20px; -} - -p img{ - margin-top: 10px; - display: block; - margin-left: auto; - margin-right: auto; - margin-bottom: 10px; -} - -img{ - border: solid 2px #fff; -} - -table{ - width: 100%; - margin-bottom: 50px; -} - - -td{ - text-align: left; - vertical-align: middle; - padding: 10px; -} - -td:first-child{ - width: 15%; -} - -td:last-child{ - width: 85%; -} - -th{ - font-weight: bold; - font-size: 14pt; - padding: 15px 0px 5px 0px; -} - -.command{ - font-weight: bold; - color: #69B7D3; -} - -#toolbar{ - padding-top: 40px; -} - - -@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait){ - .wrapper{ - width: 750px; - } -} - - -@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape){ - .wrapper{ - width: 960px; - } -} - - -@media only screen and (min-device-width: 320px) and (max-device-width: 600px) and (orientation: portrait){ - .wrapper{ - width: 300px; - } -} - - -@media only screen and (min-device-width: 320px) and (max-device-width: 600px) and (orientation: landscape){ - .wrapper{ - width: 460px; - } -} - - -/*********************** - Wrapper CSS -***********************/ - -#android-tab-header{ - width: 100%; - background: #f2f2f2; -} - -#android-mobile-header, #android-tablet-header{ - width: 50%; - float: left; - text-align: center; - background: #e4e4e4; - padding: 10px 0px; - cursor: pointer; -} - -.tab{ - display: none; -} - -#android-mobile-header.selected-tab, #android-tablet-header.selected-tab, .tab.selected-tab{ - display: block; - background: #f2f2f2; -} - -#android-mobile-header h4, #android-tablet-header h4{ - font-size: 14pt; - font-weight: bold; -} - -h2{ - font-size: 22pt; - font-weight: 400; - margin: 30px 20px 15px 20px; - text-align: center; - color: #BA2034; -} - -p img, img{ - margin-top: 10px !important; - display: block !important; - margin-left: auto !important; - margin-right: auto !important; - margin-bottom: 10px !important; -} - -table{ - width: 100%; - margin-bottom: 50px; -} - - -td{ - text-align: left; - vertical-align: middle; - padding: 10px; -} - -td:first-child{ - width: 15%; -} - -td:last-child{ - width: 85%; -} - -th{ - font-weight: bold; - font-size: 14pt; - padding: 15px 0px 5px 0px; -} - -.command{ - font-weight: bold; - color: #69B7D3; -} - -#toolbar{ - padding-top: 40px; -} - -/*********************** - Images CSS -***********************/ - -#section2 img{ - min-width: 40px; -} -a{ - color: #BA2034; -} - - - - - - - diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/confirm-dl-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/confirm-dl-ap.png deleted file mode 100644 index a8af9f862e0f12f040741b28300c7fef87aa069e..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/confirm-dl-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/confirm-dl-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/confirm-dl-at.png deleted file mode 100644 index 78fa10827f629c3879a8a32b0a930b0411c837c3..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/confirm-dl-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-downloads-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-downloads-ap.png deleted file mode 100644 index 93a95bf426b8bd5624a849d87d35afd2bdef77d1..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-downloads-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-downloads-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-downloads-at.png deleted file mode 100644 index 19da0c46ce1bd87da1e3008354a4721421263185..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-downloads-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-install1-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-install1-at.png deleted file mode 100644 index de2e9967f86a0d40578c4f7190ac03950e0da2da..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dist-install1-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dl-success-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dl-success-ap.png deleted file mode 100644 index 7a80f015886d6c51ff01145437929ae2e64e3e84..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dl-success-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dl-success-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dl-success-at.png deleted file mode 100644 index d401cc07234460800a0fbf9ea02712af1af739de..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/dl-success-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/lang-list-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/lang-list-ap.png deleted file mode 100644 index bfa88714544f589ade9cd81f5cd45c721236111e..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/lang-list-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/lang-list-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/lang-list-at.png deleted file mode 100644 index 9fae99c3756adb379420cda3dbd0d4ba37639a64..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/lang-list-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings1-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings1-ap.png deleted file mode 100644 index 27eb33dde93ac357296c9e014513c725988fe065..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings1-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings1-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings1-at.png deleted file mode 100644 index 48d2b4dd64c701ade6b73641fd1be504fbbb1316..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings1-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings2-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings2-ap.png deleted file mode 100644 index 43a7aa0e768a375b827a6a8b9f268b7569ef96f8..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings2-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings2-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings2-at.png deleted file mode 100644 index 7aeeb3d9fd18dd7c698012488ebbb5ec6051e1af..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/settings2-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-delete-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-delete-ap.png deleted file mode 100644 index ec7750b165aa107eaab9d8694efa039750667e74..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-delete-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-delete-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-delete-at.png deleted file mode 100644 index a5bf40d1a64c6739262d5e5c810429099d9891f7..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-delete-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-list-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-list-ap.png deleted file mode 100644 index 59e5798faadea7a2d2d737d4452fdfb62c60b278..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-list-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-list-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-list-at.png deleted file mode 100644 index 01a4ecad5035313e1d4346ca6e21db7017bb1bd9..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-list-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-notification-ap.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-notification-ap.png deleted file mode 100644 index 517fd54d26ad782293c4d07905941c5c43e38b62..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-notification-ap.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-notification-at.png b/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-notification-at.png deleted file mode 100644 index df61618b0a1dee4c61b1d3940294011ae0542199..0000000000000000000000000000000000000000 Binary files a/android/KMAPro/kMAPro/src/main/assets/info/img/app/11.0/uninstall-notification-at.png and /dev/null differ diff --git a/android/KMAPro/kMAPro/src/main/assets/info/info.html b/android/KMAPro/kMAPro/src/main/assets/info/info.html deleted file mode 100644 index 93ae90477d38d391183622651ab62cf3dde9c2cd..0000000000000000000000000000000000000000 --- a/android/KMAPro/kMAPro/src/main/assets/info/info.html +++ /dev/null @@ -1,654 +0,0 @@ - - - - - Keyman for Android Information Page - - - - - - - - -
-

- Getting Started -

- -
-
-

Phone

-
-
-

Tablet

-
-
-
-

- Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. - To get started, here are some helpful hints: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Keyboard Keys
(Keyboard Present)
Install or select another language/keyboard
Hide the keyboard
Backspace
Return
Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys - (which can access additional key layers) -
Keys with a small dot in the top right corner indicate a long press key. Access - further functionality by long pressing the key -
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Open the menu for additional options
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
- -

Switching between Keyboards

-

- To switch keyboards, follow these steps: -

- Step 1) -
- With the keyboard visible, touch the globe key: -
- -
- This will bring up a list of all currently installed languages (the default is English - EuroLatin (SIL)). If you have already downloaded additional languages, they will appear here. - Simply select them and the keyboard will re-appear with the new language. -

- If you haven't installed any languages as yet, touch the + - button in the bottom right corner of your screen. -
- -

- Step 2) -
- A list of all available languages will appear. Scroll through this list until you find - the language you want to install. Some languages may have multiple keyboards - for - example we have 10+ different Tamil keyboards. -
- -

- Select the language and keyboard you want to install - a popup will ask for confirmation, - hit the Download button. -
- -

- Step 3) -
- Once the download is complete, the new keyboard will be selected. Touch the ← - button on the top left corner of the popup and the new keyboard will become active. -
- -

- Alternate Step for System Keyboard) -
- The Keyman system keyboard has an additional CLOSE KEYMAN button at the bottom left of - the "Keyboards" menu. Pushing this button will close Keyman and switch to the next non-Keyman system keyboard. -
- -
-

- -

Removing a Keyboard

-

- To uninstall a keyboard, follow these steps: -

- Step 1) -
- With the keyboard visible, touch the globe key: -
- -

- Step 2) -
- A list of all available languages will appear. Scroll through this list until you find - the keyboard you want to uninstall -
- -

- Step 3) -
- Long press the keyboard and release to get a prompt to delete the keyboard. -
- -

- Step 4) - Press "Delete" to uninstall the keyboard. You'll see a notification when the keyboard is deleted. -
- -

- -

Hotkey

-

- To switch between languages while using an external keyboard (i.e. a bluetooth keyboard), a quick and easy way is to - use a hotkey combination. Press and hold 'Ctrl' and then press 'Tab'. - You should see a list of languages/keyboards. Tap on any available language of your choice. -

- -

Accessing Keyboard Help

-

- Step 1) Open the keyboard list by touching the globe key. -

-

-
-

- Step 2) Touch the info icon for your keyboard. -

-

-
- -

Installing System Wide Keyboards

-

- Step 1) Open the Keyman app and select the menu for additional options. - The screenshots below are of a device running Android 8.1 Oreo. -

-

-
-

- Step 2) Select 'Get Started' and then select 'Enable Keyman as system-wide keyboard'. -

-

-
-

- This will open an Android settings screen for 'Available virtual keyboard'. -

-

-
-

- Step 3) Enable 'Keyman' as an available virtual keyboard. - This will bring up two confirmation dialogs. -

-

-
-

-
-

- Select 'OK' on both. Now when the on-screen keyboard appears for apps other than Keyman, - you'll see a keyboard icon at the bottom right. -

-

-
-

- Click the keyboard icon whenever you want to change the current system keyboard. -

-

-

- -

Installing Custom Keyboards

-

- Step 1) Click the link to your custom keyboard package file. The link in this example is for Khmer Angkor keyboard. -

-

-

- Step 2) Browse to the KMP file. Once the KMP file is on your device, you will need to browse to the KMP file and select it. - If using the Chrome browser, select the Menu, then "Downloads", and select the downloaded KMP file. -

-

-

- Otherwise, use the "Downloads" or file browser app available on your Android device to select the downloaded KMP file. - If your default file browser doesn't prompt for Keyman to open the package file, you may need to use a different file - browser from the Google Play store. -

-

-

- Selecting the KMP file should bring you to Step 3) -

-

- Step 3) On Android 6.0 (Marshmallow) and higher, mobile apps need to request permissions to access storage. Keyman - for Android needs access to read storage for installing the KMP file. At the dialog, select "ALLOW". Once authorized, - Keyman for Android won't need to ask for storage permission again, unless the user revokes or uninstalls the app. -

-

-

- Older versions of Android grant Storage permissions at app installation time, so those users can skip this step. -

-

- Step 4) Keyman for Android will parse the metadata in the package. If the keyboard package includes a "welcome.htm" - file, this will be displayed at the confirmation to install the keyboard package. -

-

-

- If "welcome.htm" is not included, a generic page with the package ID and package version will be shown. Click the - left "Install" button to install the entire keyboard package. -

-

- Step 5) All the keyboards in the package are installed as a group. In this example, the package only has the - "Khmer Angkor" keyboard, so it becomes the active keyboard. -

-

-

- Once the keyboard has been downloaded, you should be able to use it as normal. -
- To learn how to create a custom installable keyboard, - click here. -

- -

Granting storage permission

-

- If Keyman for Android is permanently denied storage access, attempts to install custom keyboards will fail with the - notification "Storage permission request was denied". Perform these steps to grant Keyman for Android access to storage -

-

- Step 1) Go to Android Settings. -
- Step 2) Depending on your device, click "Apps", "Apps & notifications", or "App permissions" and grant Keyman - storage permission. The screenshot below is from Android 8.1 Oreo. -

-

- -

Use the Keyman Browser

-

- Step 1) Click the Keyman Browser button in the Keyman app -
- Step 2) Enter the URL of a website to visit into the address bar, for example google.com. - Keyman Browser will load the page and detect your language if it is present, and reformat it to show your - language instead of square boxes. -
- Step 3) Use the bookmark button to save the current page for browsing later. -
- Step 4) Use the Globe icon to swap between languages. -

- -

Integrate Keyman with your App or Website

-

- If you are interested in learning how Keyman can be integrated into your own app or - website, visit keyman.com/engine -

- -

Further Help

-

- For more information on Keyman, visit keyman.com -

- For more information on Keyman for Android, visit keyman.com/android -

- -
- -
-

- Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. - To get started, here are some helpful hints: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Keyboard Keys
(Keyboard Present)
Install or select another language/keyboard
Hide the keyboard
Backspace
Return
Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys - (which can access additional key layers) -
Keys with a small dot in the top right corner indicate a long press key. Access - further functionality by long pressing the key -
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
- -

Switching between Keyboards

-

- To switch keyboards, follow these steps: -

- Step 1) -
- With the keyboard visible, touch the globe key: -
- -
- This will bring up a list of all currently installed languages (the default is English - EuroLatin (SIL)). If you have already downloaded additional languages, they will appear here. - Simply select them and the keyboard will re-appear with the new language. -

- If you haven't installed any languages as yet, touch the + - button in the bottom right corner of your screen. -
- -

- Step 2) -
- A list of all available languages will appear. Scroll through this list until you find - the language you want to install. Some languages may have multiple keyboards - for - example we have 10+ different Tamil keyboards. -
- -

- Select the language and keyboard you want to install - a popup will ask for confirmation, hit the Download button. -
- -

- Step 3) -
- Once the download is complete, the new keyboard will be selected. Touch the ← - button on the top left corner of the popup and the new keyboard will become active. -
- -

- Alternate Step for System Keyboard) -
- The Keyman system keyboard has an additional CLOSE KEYMAN button at the bottom left of - the "Keyboards" menu. Pushing this button will close Keyman and switch to the next non-Keyman system keyboard. -
- -
-

- -

Removing a Keyboard

-

- To uninstall a keyboard, follow these steps: -

- Step 1) -
- With the keyboard visible, touch the globe key: -
- -

- Step 2) -
- A list of all available languages will appear. Scroll through this list until you find - the keyboard you want to uninstall -
- -

- Step 3) -
- Long press the keyboard and release to get a prompt to delete the keyboard. -
- -

- Step 4) - Press "Delete" to uninstall the keyboard. You'll see a notification when the keyboard is deleted. -
- -

- -

Hotkey

-

- To switch between languages while using an external keyboard (i.e. a bluetooth keyboard), a quick and easy way is to - use a hotkey combination. Press and hold 'Ctrl' and then press 'Tab'. - You should see a list of languages/keyboards. Tap on any available language of your choice. -

- -

Accessing Keyboard Help

-

- Step 1) Open the keyboard list by touching the globe key. -

-

-
-

- Step 2) Touch the info icon for your keyboard. -

-

-
- -

Installing System Wide Keyboards

-

- Step 1) Open the Keyman app. The screenshots below are of a device running Android 8.1 Oreo. -

-

-
-

- Step 2) Select 'Get Started' and then select 'Enable Keyman as system-wide keyboard'. -

-

-
-

- This will open an Android settings screen for 'Available virtual keyboard'. -

-

-
-

- Step 3) Enable 'Keyman' as an available virtual keyboard. - This will bring up two confirmation dialogs. -

-

-
-

-
-

- Select 'OK' on both. Now when the on-screen keyboard appears for apps other than Keyman, you'll see a keyboard - icon at the bottom right. -

-

-
-

- Click the keyboard icon whenever you want to change the current system keyboard. -

-

-

- -

Installing Custom Keyboards

-

- Step 1) Click the link to your custom keyboard package file. The link in this example is for Khmer Angkor keyboard. -

-

-

- Step 2) Browse to the KMP file. Once the KMP file is on your device, you will need to browse to the KMP file and select it. - If using the Chrome browser, select the Menu, then "Downloads", and select the downloaded KMP file. -

-

-

- Otherwise, use the "Downloads" or file browser app available on your Android device to select the downloaded KMP file. - If your default file browser doesn't prompt for Keyman to open the package file, you may need to use a different file - browser from the Google Play store. -

-

-

- Selecting the KMP file should bring you to Step 3) -

-

- Step 3) On Android 6.0 (Marshmallow) and higher, mobile apps need to request permissions to access storage. Keyman - for Android needs access to read storage for installing the KMP file. At the dialog, select "ALLOW". Once authorized, - Keyman for Android won't need to ask for storage permission again, unless the user revokes or uninstalls the app. -

-

-

- Older versions of Android grant Storage permissions at app installation time, so those users can skip this step. -

-

- Step 4) Keyman for Android will parse the metadata in the package. If the keyboard package includes a "welcome.htm" - file, this will be displayed at the confirmation to install the keyboard package. -

-

-

- If "welcome.htm" is not included, a generic page with the package ID and package version will be shown. Click the - left "Install" button to install the entire keyboard package. -

-

- Step 5) All the keyboards in the package are installed as a group. In this example, the package only has the - "Khmer Angkor" keyboard, so it becomes the active keyboard. -

-

-

- Once the keyboard has been downloaded, you should be able to use it as normal. -
- To learn how to create a custom installable keyboard, - click here. -

- -

Granting storage permission

-

- If Keyman for Android is permanently denied storage access, attempts to install custom keyboards will fail with the - notification "Storage permission request was denied". Perform these steps to grant Keyman for Android access to storage -

-

- Step 1) Go to Android Settings. -
- Step 2) Depending on your device, click "Apps", "Apps & notifications", or "App permissions" and grant Keyman - storage permission. The screenshot below is from Android 8.1 Oreo. -

-

- -

Use the Keyman Browser

-

- Step 1) Click the Keyman Browser button in the Keyman app -
- Step 2) Enter the URL of a website to visit into the address bar, for example google.com. - Keyman Browser will load the page and detect your language if it is present, and reformat it to show your - language instead of square boxes. -
- Step 3) Use the bookmark button to save the current page for browsing later. -
- Step 4) Use the Globe icon to swap between languages. -

- -

Integrate Keyman with your App or Website

-

- If you are interested in learning how Keyman can be integrated into your own app or - website, visit keyman.com/engine -

- -

Further Help

-

- For more information on Keyman, visit keyman.com -

- For more information on Keyman for Android, visit keyman.com/android -

-
-
- - diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.html new file mode 100644 index 0000000000000000000000000000000000000000..827604b495d6fd2bc88ba6e97d1d8ef1dd53d1c5 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.html @@ -0,0 +1,240 @@ + + + + + + Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Getting Started

+

Keyman for Android

+ +

Version history

+ + +

+ Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. + To get started, here are some helpful hints: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Keyboard Keys
(Keyboard Present)
+ + + Select another language/keyboard
+ + + Hide the keyboard
+ + + Backspace
+ + + Return
+ + + Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys + (which can access additional key layers) +
+ + + Keys with a small dot in the top right corner indicate a long press key. Access + further functionality by long pressing the key +
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Open the menu for additional options
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
Open the Keyman Settings screen
+ +

Accessing Keyboard Help

+

+ Step 1) Open the keyboard list by touching the globe key. +

+

+ + +

+
+

+ Step 2) Touch the info icon for your keyboard. +

+

+
+ +

Help Index

+ + + +

Integrate Keyman with your App or Website

+

+ If you are interested in learning how Keyman can be integrated into your own app or + website, visit keyman.com/engine +

+ +

Further Help

+

+ For more information on Keyman, visit keyman.com +

+ For more information on Keyman for Android, visit keyman.com/android +

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.php.html new file mode 100644 index 0000000000000000000000000000000000000000..827604b495d6fd2bc88ba6e97d1d8ef1dd53d1c5 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.php.html @@ -0,0 +1,240 @@ + + + + + + Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Getting Started

+

Keyman for Android

+ +

Version history

+ + +

+ Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. + To get started, here are some helpful hints: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Keyboard Keys
(Keyboard Present)
+ + + Select another language/keyboard
+ + + Hide the keyboard
+ + + Backspace
+ + + Return
+ + + Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys + (which can access additional key layers) +
+ + + Keys with a small dot in the top right corner indicate a long press key. Access + further functionality by long pressing the key +
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Open the menu for additional options
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
Open the Keyman Settings screen
+ +

Accessing Keyboard Help

+

+ Step 1) Open the keyboard list by touching the globe key. +

+

+ + +

+
+

+ Step 2) Touch the info icon for your keyboard. +

+

+
+ +

Help Index

+ + + +

Integrate Keyman with your App or Website

+

+ If you are interested in learning how Keyman can be integrated into your own app or + website, visit keyman.com/engine +

+ +

Further Help

+

+ For more information on Keyman, visit keyman.com +

+ For more information on Keyman for Android, visit keyman.com/android +

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.php@embed=android&formfactor=phone.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.php@embed=android&formfactor=phone.html new file mode 100644 index 0000000000000000000000000000000000000000..827604b495d6fd2bc88ba6e97d1d8ef1dd53d1c5 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/index.php@embed=android&formfactor=phone.html @@ -0,0 +1,240 @@ + + + + + + Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Getting Started

+

Keyman for Android

+ +

Version history

+ + +

+ Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. + To get started, here are some helpful hints: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Keyboard Keys
(Keyboard Present)
+ + + Select another language/keyboard
+ + + Hide the keyboard
+ + + Backspace
+ + + Return
+ + + Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys + (which can access additional key layers) +
+ + + Keys with a small dot in the top right corner indicate a long press key. Access + further functionality by long pressing the key +
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Open the menu for additional options
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
Open the Keyman Settings screen
+ +

Accessing Keyboard Help

+

+ Step 1) Open the keyboard list by touching the globe key. +

+

+ + +

+
+

+ Step 2) Touch the info icon for your keyboard. +

+

+
+ +

Help Index

+ + + +

Integrate Keyman with your App or Website

+

+ If you are interested in learning how Keyman can be integrated into your own app or + website, visit keyman.com/engine +

+ +

Further Help

+

+ For more information on Keyman, visit keyman.com +

+ For more information on Keyman for Android, visit keyman.com/android +

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-custom-packages.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-custom-packages.php.html new file mode 100644 index 0000000000000000000000000000000000000000..fde633b4d0012b0e738934034338ee7162548c3d --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-custom-packages.php.html @@ -0,0 +1,192 @@ + + + + + + Installing Custom Keyboards/Dictionaries - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Installing Custom Keyboards/Dictionaries

+ + +

+ These same steps can be used for installing custom keyboard or custom dictionary packages. This example is for Khmer Angkor keyboard. +

+ +

+ Step 1) Click the link to your custom package file. +

+

+ + +

+

+ Step 2) Once the KMP file is on your device, you will need to browse to the KMP file and select it. + From the Keyman menu, select 'Settings'. +
+ From the Keyman Settings menu, select 'Add Keyboard from Device'. +

+

+

+ The device will launch a file browser where you'll browse to the directory of your KMP file. + A common place to look is the "Downloads" folder. +

+

+ + +

+

+ Selecting the KMP file should bring you to Step 3) +

+

+ Step 3) On Android 6.0 (Marshmallow) and higher, mobile apps need to request permissions to access storage. Keyman + for Android needs access to read storage for installing the KMP file. At the dialog, select "ALLOW". Once authorized, + Keyman for Android won't need to ask for storage permission again, unless the user revokes or uninstalls the app. +

+

+ + +

+

+ Older versions of Android grant Storage permissions at app installation time, so those users can skip this step. +

+

+ Step 4) Keyman for Android will parse the metadata in the package. If the keyboard package includes a "welcome.htm" + file, this will be displayed at the confirmation to install the keyboard package. +

+

+ + +

+

+ If "welcome.htm" is not included, a generic page with the package ID and package version will be shown. Click the + left "Install" button to install the entire keyboard package. +

+

+ Step 5) All the keyboards in the package are installed as a group. In this example, the package only has the + "Khmer Angkor" keyboard, so it becomes the active keyboard. For custom dictionary packages, only one dictionary + will be installed. +

+

+ + +

+

+ Once the keyboard has been installed, you should be able to use it as normal. +
+ To learn how to create a custom installable keyboard, + click here. +

+ +

Granting storage permission

+

+ If Keyman for Android is permanently denied storage access, attempts to install custom packages will fail with the + notification "Storage permission request was denied". Perform these steps to grant Keyman for Android access to storage +

+

+ Step 1) Go to Android Settings. +
+ Step 2) Depending on your device, click "Apps", "Apps & notifications", or "App permissions" and grant Keyman + storage permission. The screenshot below is from Android 9.0 Pie. +

+

+ + +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-keyboards.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-keyboards.php.html new file mode 100644 index 0000000000000000000000000000000000000000..a551a2f08fcc40714f1a565bb37aa38106d7351c --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-keyboards.php.html @@ -0,0 +1,158 @@ + + + + + + Adding Keyboards - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Adding New Keyboards

+ + +

+ To add keyboards, follow these steps: +

+ Step 1) +

+ Open the menu for additional options. Select 'Settings' +

+ Step 2) +

+ From the Keyman Settings menu, select 'Installed languages' +

+ +

+ Step 3) +

+ From the 'Installed languages' menu, touch the + + button in the bottom right corner of your screen. +

+ +

+ Step 4) +

+ A list of all available languages will appear. Scroll through this list until you find + the language you want to install. Languages marked with a right arrow have multiple keyboards - for + example we have 10+ different Tamil keyboards. +

+ + +

+ Select the language and keyboard you want to install - a popup will ask for confirmation, + hit the Download button. +

+ + +

+ Step 5) +

+ Once the download is complete, the new keyboard will be selected. Touch the ← + button on the top left corner of the popup several times and the new keyboard will become active. +

+ + +

+ Alternate Step for System Keyboard) +

+ The Keyman system keyboard has an additional CLOSE KEYMAN button at the bottom left of + the "Keyboards" menu. Pushing this button will close Keyman and switch to the next non-Keyman system keyboard. +

+ +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-system-keyboard.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-system-keyboard.php.html new file mode 100644 index 0000000000000000000000000000000000000000..2034f9eb8676b061f652d7aaed2ff4f87eeb2be4 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/installing-system-keyboard.php.html @@ -0,0 +1,163 @@ + + + + + + The System-Wide Keyboard - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Installing System Wide Keyboards

+ + +

+ Step 1) Open the Keyman app and select the menu for additional options. + The screenshots below are of a device running Android 9.0 Pie. +

+

+ + +

+
+

+ Step 2) Select 'Get Started' and then select 'Enable Keyman as system-wide keyboard'. +

+

+ + +

+
+

+ This will open an Android settings screen for 'Available virtual keyboard'. +

+

+ + +

+
+

+ Step 3) Enable 'Keyman' as an available virtual keyboard. + This will bring up two confirmation dialogs. +

+

+ + +

+
+

+ + +

+
+

+ Select 'OK' on both. Now when the on-screen keyboard appears for apps other than Keyman, + you'll see a keyboard icon at the bottom right. +

+

+ + +

+
+

+ Click the keyboard icon whenever you want to change the current system keyboard. +

+

+ + +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/switching-between-keyboards.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/switching-between-keyboards.php.html new file mode 100644 index 0000000000000000000000000000000000000000..2f94dff80e6b7c50f2c1a4f3a9aa0ec08add39e4 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/switching-between-keyboards.php.html @@ -0,0 +1,132 @@ + + + + + + Switching Between Keyboards - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Switching Between Keyboards

+ + +

+ To switch keyboards, follow these steps: +

+

+ Step 1) +

+

+ With the keyboard visible, touch the globe key: +

+ + +

+

+ This will bring up a list of all currently installed languages (the default is English + EuroLatin (SIL)). If you have already downloaded additional languages, they will appear here. + Simply select them and the keyboard will re-appear with the new language. +

+ +

Hotkey

+

+ To switch between languages while using an external keyboard (i.e. a bluetooth keyboard), a quick and easy way is to + use a hotkey combination. Press and hold 'Ctrl' and then press 'Tab'. + You should then see the same listing of languages/keyboards. Tap on any available language of your choice. +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/uninstalling-dictionaries.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/uninstalling-dictionaries.php.html new file mode 100644 index 0000000000000000000000000000000000000000..b845fe4a89b91819546c92192b582adc05851037 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/uninstalling-dictionaries.php.html @@ -0,0 +1,182 @@ + + + + + + Removing Dictionaries - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Removing a Dictionary

+ + +

+ To uninstall a dictionary, follow these steps: +

+ +

+ Step 1) +

+

+ Open the menu for additional options. Select 'Settings' +

+

+ Step 2) +

+

+ From the Keyman Settings menu, select 'Installed languages' +

+

+ +

+

+ Step 3) +

+

+ From the 'Installed languages' menu, select the language for the dictionary you want to remove. In this example, + we will be removing the "MTNT Dictionary" for the English language. +

+

+ +

+

+ Step 4) +

+

+ The language Settings menu lists currently installed keyboards and dictionaries associated with the language. + Select the dictionary you want to uninstall at the bottom of the page. +

+

+ +

+

+ Step 5) +

+

+ The dictionaries menu displays the dictionaries that are available for a language. Installed dictionaries show a check mark. + Select the dictionary to display the info menu. +

+

+ +

+

+ Step 6) +

+

+ The bottom of the dictionary settings menu displays an option to uninstall the dictionary. + Select 'Uninstall dictionary' to get a prompt to delete the dictionary. +

+

+ +

+

+ Step 7) +

+

+ Press "Delete" to uninstall the dictionary. +

+

+ +

+

+ You'll see a notification when the dictionary is deleted. +

+

+ +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/uninstalling-keyboards.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/uninstalling-keyboards.php.html new file mode 100644 index 0000000000000000000000000000000000000000..f758757ca73e1e9b0b25fe9768e485b34a4edf75 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/uninstalling-keyboards.php.html @@ -0,0 +1,154 @@ + + + + + + Removing Keyboards - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Removing a Keyboard

+ + +

+ To uninstall a keyboard, follow these steps: +

+ Step 1) +

+ Open the menu for additional options. Select 'Settings' +

+ Step 2) +

+ From the Keyman Settings menu, select 'Installed languages' +

+ +

+ Step 3) +

+ From the 'Installed languages' menu, select the language for the keyboard you want to remove. +

+ +

+ Step 4) +

+ The language Settings menu lists currently installed keyboards associated with the language. + Select the keyboard you want to uninstall +

+ +

+ Step 5) +

+ The bottom of the keyboard settings menu displays an option to uninstall the keyboard. + Select 'Uninstall keyboard' to get a prompt to delete the keyboard. +

+ Note: the default 'SIL EuroLatin' keyboard for English cannot be removed. +

+ +

+ Step 6) +

+ Press "Delete" to uninstall the keyboard. +

+ +

+ You'll see a notification when the keyboard is deleted. +

+ + +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/using-keyman-browser.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/using-keyman-browser.php.html new file mode 100644 index 0000000000000000000000000000000000000000..d00a4b4a4fc46500710b5da91ba865939a516bfb --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/phone/using-keyman-browser.php.html @@ -0,0 +1,119 @@ + + + + + + Using the Keyman Browser - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Using the Keyman Browser

+ + +

+ Step 1) Click the Keyman Browser button in the Keyman app +

+ Step 2) Enter the URL of a website to visit into the address bar, for example google.com. + Keyman Browser will load the page and detect your language if it is present, and reformat it to show your + language instead of square boxes. +

+ Step 3) Use the bookmark button to save the current page for browsing later. +

+ Step 4) Use the Globe icon to swap between languages. +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.html new file mode 100644 index 0000000000000000000000000000000000000000..b17cfbdf116dbd0139c1d2bc291ac3edc084a69a --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.html @@ -0,0 +1,240 @@ + + + + + + Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Getting Started

+

Keyman for Android

+ +

Version history

+ + +

+ Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. + To get started, here are some helpful hints: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Keyboard Keys
(Keyboard Present)
+ + + Select another language/keyboard
+ + + Hide the keyboard
+ + + Backspace
+ + + Return
+ + + Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys + (which can access additional key layers) +
+ + + Keys with a small dot in the top right corner indicate a long press key. Access + further functionality by long pressing the key +
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Open the menu for additional options
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
Open the Keyman Settings screen
+ +

Accessing Keyboard Help

+

+ Step 1) Open the keyboard list by touching the globe key. +

+

+ + +

+
+

+ Step 2) Touch the info icon for your keyboard. +

+

+
+ +

Help Index

+ + + +

Integrate Keyman with your App or Website

+

+ If you are interested in learning how Keyman can be integrated into your own app or + website, visit keyman.com/engine +

+ +

Further Help

+

+ For more information on Keyman, visit keyman.com +

+ For more information on Keyman for Android, visit keyman.com/android +

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.php.html new file mode 100644 index 0000000000000000000000000000000000000000..b17cfbdf116dbd0139c1d2bc291ac3edc084a69a --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.php.html @@ -0,0 +1,240 @@ + + + + + + Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Getting Started

+

Keyman for Android

+ +

Version history

+ + +

+ Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. + To get started, here are some helpful hints: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Keyboard Keys
(Keyboard Present)
+ + + Select another language/keyboard
+ + + Hide the keyboard
+ + + Backspace
+ + + Return
+ + + Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys + (which can access additional key layers) +
+ + + Keys with a small dot in the top right corner indicate a long press key. Access + further functionality by long pressing the key +
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Open the menu for additional options
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
Open the Keyman Settings screen
+ +

Accessing Keyboard Help

+

+ Step 1) Open the keyboard list by touching the globe key. +

+

+ + +

+
+

+ Step 2) Touch the info icon for your keyboard. +

+

+
+ +

Help Index

+ + + +

Integrate Keyman with your App or Website

+

+ If you are interested in learning how Keyman can be integrated into your own app or + website, visit keyman.com/engine +

+ +

Further Help

+

+ For more information on Keyman, visit keyman.com +

+ For more information on Keyman for Android, visit keyman.com/android +

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.php@embed=android&formfactor=tablet.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.php@embed=android&formfactor=tablet.html new file mode 100644 index 0000000000000000000000000000000000000000..b17cfbdf116dbd0139c1d2bc291ac3edc084a69a --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/index.php@embed=android&formfactor=tablet.html @@ -0,0 +1,240 @@ + + + + + + Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Getting Started

+

Keyman for Android

+ +

Version history

+ + +

+ Keyman for Android lets you type in over 600 languages on Android mobiles and tablets. + To get started, here are some helpful hints: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Keyboard Keys
(Keyboard Present)
+ + + Select another language/keyboard
+ + + Hide the keyboard
+ + + Backspace
+ + + Return
+ + + Shift key. Long press this key to access the CTRL, ALT and CTRL ALT keys + (which can access additional key layers) +
+ + + Keys with a small dot in the top right corner indicate a long press key. Access + further functionality by long pressing the key +
Toolbar Icons
Share your text via Mail, Text, or Twitter
Open the Keyman Browser to use the web in your language
Open the menu for additional options
Adjust the font size
Delete all current text
Load this help page
Open the initial setup screen
Open the Keyman Settings screen
+ +

Accessing Keyboard Help

+

+ Step 1) Open the keyboard list by touching the globe key. +

+

+ + +

+
+

+ Step 2) Touch the info icon for your keyboard. +

+

+
+ +

Help Index

+ + + +

Integrate Keyman with your App or Website

+

+ If you are interested in learning how Keyman can be integrated into your own app or + website, visit keyman.com/engine +

+ +

Further Help

+

+ For more information on Keyman, visit keyman.com +

+ For more information on Keyman for Android, visit keyman.com/android +

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-custom-packages.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-custom-packages.php.html new file mode 100644 index 0000000000000000000000000000000000000000..3eed5282293a41590ee09a7ee4e837ca9c2b26d3 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-custom-packages.php.html @@ -0,0 +1,192 @@ + + + + + + Installing Custom Keyboards/Dictionaries - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Installing Custom Keyboards/Dictionaries

+ + +

+ These same steps can be used for installing custom keyboard or custom dictionary packages. This example is for Khmer Angkor keyboard. +

+ +

+ Step 1) Click the link to your custom package file. +

+

+ + +

+

+ Step 2) Once the KMP file is on your device, you will need to browse to the KMP file and select it. + From the Keyman menu, select 'Settings'. +
+ From the Keyman Settings menu, select 'Add Keyboard from Device'. +

+

+

+ The device will launch a file browser where you'll browse to the directory of your KMP file. + A common place to look is the "Downloads" folder. +

+

+ + +

+

+ Selecting the KMP file should bring you to Step 3) +

+

+ Step 3) On Android 6.0 (Marshmallow) and higher, mobile apps need to request permissions to access storage. Keyman + for Android needs access to read storage for installing the KMP file. At the dialog, select "ALLOW". Once authorized, + Keyman for Android won't need to ask for storage permission again, unless the user revokes or uninstalls the app. +

+

+ + +

+

+ Older versions of Android grant Storage permissions at app installation time, so those users can skip this step. +

+

+ Step 4) Keyman for Android will parse the metadata in the package. If the keyboard package includes a "welcome.htm" + file, this will be displayed at the confirmation to install the keyboard package. +

+

+ + +

+

+ If "welcome.htm" is not included, a generic page with the package ID and package version will be shown. Click the + left "Install" button to install the entire keyboard package. +

+

+ Step 5) All the keyboards in the package are installed as a group. In this example, the package only has the + "Khmer Angkor" keyboard, so it becomes the active keyboard. For custom dictionary packages, only one dictionary + will be installed. +

+

+ + +

+

+ Once the keyboard has been installed, you should be able to use it as normal. +
+ To learn how to create a custom installable keyboard, + click here. +

+ +

Granting storage permission

+

+ If Keyman for Android is permanently denied storage access, attempts to install custom packages will fail with the + notification "Storage permission request was denied". Perform these steps to grant Keyman for Android access to storage +

+

+ Step 1) Go to Android Settings. +
+ Step 2) Depending on your device, click "Apps", "Apps & notifications", or "App permissions" and grant Keyman + storage permission. The screenshot below is from Android 9.0 Pie. +

+

+ + +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-keyboards.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-keyboards.php.html new file mode 100644 index 0000000000000000000000000000000000000000..7a41dbd9a7a317d05cb0fb62defcd88cc41d345c --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-keyboards.php.html @@ -0,0 +1,158 @@ + + + + + + Adding Keyboards - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Adding New Keyboards

+ + +

+ To add keyboards, follow these steps: +

+ Step 1) +

+ Open the menu for additional options. Select 'Settings' +

+ Step 2) +

+ From the Keyman Settings menu, select 'Installed languages' +

+ +

+ Step 3) +

+ From the 'Installed languages' menu, touch the + + button in the bottom right corner of your screen. +

+ +

+ Step 4) +

+ A list of all available languages will appear. Scroll through this list until you find + the language you want to install. Languages marked with a right arrow have multiple keyboards - for + example we have 10+ different Tamil keyboards. +

+ + +

+ Select the language and keyboard you want to install - a popup will ask for confirmation, + hit the Download button. +

+ + +

+ Step 5) +

+ Once the download is complete, the new keyboard will be selected. Touch the ← + button on the top left corner of the popup several times and the new keyboard will become active. +

+ + +

+ Alternate Step for System Keyboard) +

+ The Keyman system keyboard has an additional CLOSE KEYMAN button at the bottom left of + the "Keyboards" menu. Pushing this button will close Keyman and switch to the next non-Keyman system keyboard. +

+ +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-system-keyboard.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-system-keyboard.php.html new file mode 100644 index 0000000000000000000000000000000000000000..f346a9e863cced54c264ea561ffc5d3a427c32c4 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/installing-system-keyboard.php.html @@ -0,0 +1,163 @@ + + + + + + The System-Wide Keyboard - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Installing System Wide Keyboards

+ + +

+ Step 1) Open the Keyman app and select the menu for additional options. + The screenshots below are of a device running Android 9.0 Pie. +

+

+ + +

+
+

+ Step 2) Select 'Get Started' and then select 'Enable Keyman as system-wide keyboard'. +

+

+ + +

+
+

+ This will open an Android settings screen for 'Available virtual keyboard'. +

+

+ + +

+
+

+ Step 3) Enable 'Keyman' as an available virtual keyboard. + This will bring up two confirmation dialogs. +

+

+ + +

+
+

+ + +

+
+

+ Select 'OK' on both. Now when the on-screen keyboard appears for apps other than Keyman, + you'll see a keyboard icon at the bottom right. +

+

+ + +

+
+

+ Click the keyboard icon whenever you want to change the current system keyboard. +

+

+ + +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/switching-between-keyboards.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/switching-between-keyboards.php.html new file mode 100644 index 0000000000000000000000000000000000000000..93c0c9f39ffbba2b77e9af3ed3f06e5f4dd9948f --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/switching-between-keyboards.php.html @@ -0,0 +1,132 @@ + + + + + + Switching Between Keyboards - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Switching Between Keyboards

+ + +

+ To switch keyboards, follow these steps: +

+

+ Step 1) +

+

+ With the keyboard visible, touch the globe key: +

+ + +

+

+ This will bring up a list of all currently installed languages (the default is English + EuroLatin (SIL)). If you have already downloaded additional languages, they will appear here. + Simply select them and the keyboard will re-appear with the new language. +

+ +

Hotkey

+

+ To switch between languages while using an external keyboard (i.e. a bluetooth keyboard), a quick and easy way is to + use a hotkey combination. Press and hold 'Ctrl' and then press 'Tab'. + You should then see the same listing of languages/keyboards. Tap on any available language of your choice. +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/uninstalling-dictionaries.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/uninstalling-dictionaries.php.html new file mode 100644 index 0000000000000000000000000000000000000000..2997c247ebb23bca611f3ba7e6ac4b02a478db8a --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/uninstalling-dictionaries.php.html @@ -0,0 +1,182 @@ + + + + + + Removing Dictionaries - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Removing a Dictionary

+ + +

+ To uninstall a dictionary, follow these steps: +

+ +

+ Step 1) +

+

+ Open the menu for additional options. Select 'Settings' +

+

+ Step 2) +

+

+ From the Keyman Settings menu, select 'Installed languages' +

+

+ +

+

+ Step 3) +

+

+ From the 'Installed languages' menu, select the language for the dictionary you want to remove. In this example, + we will be removing the "MTNT Dictionary" for the English language. +

+

+ +

+

+ Step 4) +

+

+ The language Settings menu lists currently installed keyboards and dictionaries associated with the language. + Select the dictionary you want to uninstall at the bottom of the page. +

+

+ +

+

+ Step 5) +

+

+ The dictionaries menu displays the dictionaries that are available for a language. Installed dictionaries show a check mark. + Select the dictionary to display the info menu. +

+

+ +

+

+ Step 6) +

+

+ The bottom of the dictionary settings menu displays an option to uninstall the dictionary. + Select 'Uninstall dictionary' to get a prompt to delete the dictionary. +

+

+ +

+

+ Step 7) +

+

+ Press "Delete" to uninstall the dictionary. +

+

+ +

+

+ You'll see a notification when the dictionary is deleted. +

+

+ +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/uninstalling-keyboards.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/uninstalling-keyboards.php.html new file mode 100644 index 0000000000000000000000000000000000000000..d93befca1a7b437b64c6f3586620b16f5df4b32a --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/uninstalling-keyboards.php.html @@ -0,0 +1,154 @@ + + + + + + Removing Keyboards - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Removing a Keyboard

+ + +

+ To uninstall a keyboard, follow these steps: +

+ Step 1) +

+ Open the menu for additional options. Select 'Settings' +

+ Step 2) +

+ From the Keyman Settings menu, select 'Installed languages' +

+ +

+ Step 3) +

+ From the 'Installed languages' menu, select the language for the keyboard you want to remove. +

+ +

+ Step 4) +

+ The language Settings menu lists currently installed keyboards associated with the language. + Select the keyboard you want to uninstall +

+ +

+ Step 5) +

+ The bottom of the keyboard settings menu displays an option to uninstall the keyboard. + Select 'Uninstall keyboard' to get a prompt to delete the keyboard. +

+ Note: the default 'SIL EuroLatin' keyboard for English cannot be removed. +

+ +

+ Step 6) +

+ Press "Delete" to uninstall the keyboard. +

+ +

+ You'll see a notification when the keyboard is deleted. +

+ + +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/using-keyman-browser.php.html b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/using-keyman-browser.php.html new file mode 100644 index 0000000000000000000000000000000000000000..02162717f75b0773de7280413d4529ecc8667342 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/assets/info/products/android/tablet/using-keyman-browser.php.html @@ -0,0 +1,119 @@ + + + + + + Using the Keyman Browser - Keyman for Android Help + + + + + + + + + + + + + +
+
+
+ +
+ Header bottom + +

Keyman.com

+
+
+
+
+
+
+

Index

+
+
+
+
+
+

Using the Keyman Browser

+ + +

+ Step 1) Click the Keyman Browser button in the Keyman app +

+ Step 2) Enter the URL of a website to visit into the address bar, for example google.com. + Keyman Browser will load the page and detect your language if it is present, and reformat it to show your + language instead of square boxes. +

+ Step 3) Use the bookmark button to save the current page for browsing later. +

+ Step 4) Use the Globe icon to swap between languages. +

+ +

Help Index

+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java index b82072d9593a01027fe3e36726145700ad14cb95..228fcd052708dfa8f1acbb24fd4c6357ef9dbb28 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java +++ b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java @@ -155,8 +155,9 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven if (inputView != null) inputViewHeight = inputView.getHeight(); + int bannerHeight = KMManager.getBannerHeight(this); int kbHeight = KMManager.getKeyboardHeight(this); - outInsets.contentTopInsets = inputViewHeight - kbHeight; + outInsets.contentTopInsets = inputViewHeight - bannerHeight - kbHeight; outInsets.touchableInsets = InputMethodService.Insets.TOUCHABLE_INSETS_REGION; outInsets.touchableRegion.set(0, outInsets.contentTopInsets, size.x, size.y); } diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java index 9872b4d8d1fd496024e28a7190867fb2c68e58fb..c82178371b046c0dbf03b0edf9ce33d67222e674 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/GetStartedActivity.java @@ -26,12 +26,14 @@ import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; +import android.widget.TextView; public class GetStartedActivity extends AppCompatActivity { private static ListView listView = null; private static ArrayList> list = null; private static KMListAdapter listAdapter = null; + protected static final String showGetStartedKey = "ShowGetStarted"; private final String iconKey = "icon"; private final String textKey = "text"; private final String isEnabledKey = "isEnabled"; @@ -53,19 +55,27 @@ public class GetStartedActivity extends AppCompatActivity { }); final SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - boolean dontShowGetStarted = prefs.getBoolean(MainActivity.dontShowGetStartedKey, false); + boolean showGetStarted = prefs.getBoolean(showGetStartedKey, true); final CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox); - checkBox.setChecked(dontShowGetStarted); + checkBox.setChecked(showGetStarted); checkBox.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { SharedPreferences.Editor editor = prefs.edit(); - editor.putBoolean(MainActivity.dontShowGetStartedKey, isChecked); + editor.putBoolean(showGetStartedKey, isChecked); editor.commit(); } }); + final TextView getStartedText = findViewById(R.id.getStartedText); + getStartedText.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + checkBox.setChecked(!checkBox.isChecked()); + } + }); + list = new ArrayList>(); HashMap hashMap = new HashMap(); @@ -145,7 +155,7 @@ public class GetStartedActivity extends AppCompatActivity { list.get(0).put(iconKey, one); } - if (isEnabledAsSystemKB(this)) { + if (SystemIMESettings.isEnabledAsSystemKB(this)) { list.get(1).put(iconKey, checkbox_on); list.get(2).put(isEnabledKey, "true"); } else { @@ -153,7 +163,7 @@ public class GetStartedActivity extends AppCompatActivity { list.get(2).put(isEnabledKey, "false"); } - if (isDefaultKB(this)) { + if (SystemIMESettings.isDefaultKB(this)) { list.get(2).put(iconKey, checkbox_on); } else { list.get(2).put(iconKey, three); @@ -167,24 +177,4 @@ public class GetStartedActivity extends AppCompatActivity { listView.setAdapter(listAdapter); } } - - protected static boolean isEnabledAsSystemKB(Context context) { - InputMethodManager imManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); - List imList = imManager.getEnabledInputMethodList(); - boolean isEnabled = false; - int size = imList.size(); - for (int i = 0; i < size; i++) { - if (imList.get(i).getServiceName().equals("com.keyman.android.SystemKeyboard")) { - isEnabled = true; - break; - } - } - - return isEnabled; - } - - protected static boolean isDefaultKB(Context context) { - String inputMethod = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); - return inputMethod.equals(context.getPackageName() + "/com.keyman.android.SystemKeyboard"); - } } \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java index b1ea501d42535b09861c7d0b04413e323ff0a1dd..529b6b7548f56048e7c7c75e0b70bbc1e71e4d15 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/InfoActivity.java @@ -1,13 +1,11 @@ /** - * Copyright (C) 2017 SIL International. All rights reserved. + * Copyright (C) 2017-2019 SIL International. All rights reserved. */ package com.tavultesoft.kmapro; -import java.util.ArrayList; -import java.util.HashMap; - import com.tavultesoft.kmea.KMManager; +import com.tavultesoft.kmea.KMManager.FormFactor; import android.content.Context; import android.graphics.Bitmap; @@ -28,9 +26,11 @@ import android.content.pm.PackageManager.NameNotFoundException; public class InfoActivity extends AppCompatActivity { private WebView webView; - private final String kmBaseUrl = "https://keyman.com/android/app/"; + private final String kmHelpBaseUrl = "https://help.keyman.com/products/android"; private String kmUrl = ""; - private final String htmlPath = "file:///android_asset/info/info.html"; + private final String htmlPath = "file:///android_asset/info/products/android"; + private final String htmlPage = "index.php"; + private String kmOfflineUrl = ""; @SuppressLint("SetJavaScriptEnabled") @Override @@ -54,41 +54,38 @@ public class InfoActivity extends AppCompatActivity { version.setTextSize(getResources().getDimension(R.dimen.titlebar_label_textsize)); version.setGravity(Gravity.CENTER); - String ver = ""; + // Parse to create a version title + String versionStr = ""; PackageInfo pInfo; try { pInfo = getPackageManager().getPackageInfo(getPackageName(), 0); - ver = String.format("%s: %s", getString(R.string.title_version), pInfo.versionName); + versionStr = pInfo.versionName; } catch (NameNotFoundException e) { - // Could not get version number + // Fallback to a "current" version. This does not need to be maintained + versionStr = "12.0.0.0"; } - version.setText(ver); + + String versionTitle = String.format("%s: %s", getString(R.string.title_version), versionStr); + version.setText(versionTitle); getSupportActionBar().setCustomView(version); + // Extract the the major minor version from the full version string + String[] versionArray = versionStr.split("\\.", 3); + String majorMinorVersion = String.format("%s.%s", versionArray[0], versionArray[1]); - String currentKbID = KMManager.KMDefault_KeyboardID; - HashMap curKbInfo = KMManager.getCurrentKeyboardInfo(this); - if (curKbInfo != null) - currentKbID = KMManager.getCurrentKeyboardInfo(this).get(KMManager.KMKey_KeyboardID); + // Determine the appropriate form factor + FormFactor ff = KMManager.getFormFactor(); + String formFactor; - String installedKbs = ""; - ArrayList> kbList = KMManager.getKeyboardsList(this); - if (kbList != null) { - for (HashMap kbInfo : kbList) { - String kbID = kbInfo.get(KMManager.KMKey_KeyboardID); - if (!installedKbs.contains(kbID)) - installedKbs += kbID + ","; - } + if(ff == FormFactor.PHONE) { + formFactor = "phone"; + } else { + formFactor = "tablet"; } - int lastIndex = installedKbs.length() - 1; - if (lastIndex > 0) - installedKbs = installedKbs.substring(0, lastIndex); - - if (installedKbs.isEmpty()) - installedKbs = currentKbID; - - kmUrl = String.format("%s?active=%s&installed=%s", kmBaseUrl, currentKbID, installedKbs); + kmUrl = String.format("%s/%s/%s?embed=android&formfactor=%s", kmHelpBaseUrl, majorMinorVersion, htmlPage, formFactor); + // The offline mirroring process (currently) adds .html to the end of the whole string. + kmOfflineUrl = String.format("%s/%s/%s.html", htmlPath, formFactor, htmlPage); webView = (WebView) findViewById(R.id.infoWebView); webView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN); webView.getSettings().setJavaScriptEnabled(true); @@ -126,7 +123,7 @@ public class InfoActivity extends AppCompatActivity { webView.loadUrl(kmUrl); } else { // Load app info page from assets - webView.loadUrl(htmlPath); + webView.loadUrl(kmOfflineUrl); } } diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..c86d88373e48421e5bbd41faf383dc8053b55cc0 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java @@ -0,0 +1,39 @@ +package com.tavultesoft.kmapro; + +import android.os.Bundle; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +public class KeymanSettingsActivity extends AppCompatActivity { + protected static final String installedLanguagesKey = "InstalledLanguages"; + protected static final String showBannerKey = "ShowBanner"; + + protected KeymanSettingsFragment innerFragment; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.keyman_settings_layout); + Toolbar toolbar = (Toolbar) findViewById(R.id.keyman_settings_toolbar); + toolbar.setTitleTextColor(getResources().getColor(android.R.color.white)); + setSupportActionBar(toolbar); + if (getSupportActionBar() != null) { + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayShowTitleEnabled(true); + } + + innerFragment = (KeymanSettingsFragment) getSupportFragmentManager().findFragmentById(R.id.keyman_settings_fragment); + } + + @Override + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + + if(hasFocus) { + innerFragment.update(); + } + } +} diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsFragment.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsFragment.java new file mode 100644 index 0000000000000000000000000000000000000000..676ab7bbd0510b97219dd26aaa883f946fbe4165 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsFragment.java @@ -0,0 +1,173 @@ +package com.tavultesoft.kmapro; + +import android.content.Context; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.provider.Settings; +import android.view.inputmethod.InputMethodManager; + +import androidx.preference.CheckBoxPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceFragmentCompat; +import androidx.preference.PreferenceScreen; +import androidx.preference.SwitchPreference; + +import com.tavultesoft.kmea.KMManager; +import com.tavultesoft.kmea.data.Dataset; + +public class KeymanSettingsFragment extends PreferenceFragmentCompat { + private static final String TAG = "SettingsFragment"; + private static Context context; + + private Preference languagesPreference, addKeyboardFromDevice; + private CheckBoxPreference setSystemKeyboardPreference; + private CheckBoxPreference setDefaultKeyboardPreference; + + @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { + context = getActivity(); + PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(context); + + // Set the filename so this Fragment uses the common preferences file as other Activities + getPreferenceManager().setSharedPreferencesName(getString(R.string.kma_prefs_name)); + + languagesPreference = new Preference(context); + languagesPreference.setKey(KeymanSettingsActivity.installedLanguagesKey); + languagesPreference.setTitle(getInstalledLanguagesText()); + languagesPreference.setWidgetLayoutResource(R.layout.preference_icon_layout); + Intent languagesIntent = new Intent(); + languagesIntent.setClassName(context.getPackageName(), "com.tavultesoft.kmea.LanguagesSettingsActivity"); + languagesIntent.putExtra(KMManager.KMKey_DisplayKeyboardSwitcher, false); + languagesPreference.setIntent(languagesIntent); + + // Launch System file browser for user to navigate to local .kmp files + // Using generic "Add keyboard" title even though this can also install lexical model .kmp's. + addKeyboardFromDevice = new Preference(context); + addKeyboardFromDevice.setTitle(getString(R.string.title_add_keyboard_from_device)); + addKeyboardFromDevice.setWidgetLayoutResource(R.layout.preference_file_browser_layout); + addKeyboardFromDevice.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); + intent.addCategory(Intent.CATEGORY_OPENABLE); + intent.putExtra("android.content.extra.SHOW_ADVANCED", false); + // Unfortunately, we can't filter for a "kmp" mime type + intent.setType("*/*"); + startActivityForResult(intent, MainActivity.READ_REQUEST_CODE); + return false; + } + }); + + /* + Automatically does the following: + SharedPreferences.Editor editor = prefs.edit(); + editor.putBoolean(KeymanSettingsActivity.showBannerKey, isChecked); + as part of the default onClick() used by SwitchPreference. + */ + SwitchPreference bannerPreference = new SwitchPreference(context); + bannerPreference.setKey(KeymanSettingsActivity.showBannerKey); + bannerPreference.setTitle(getString(R.string.show_banner)); + bannerPreference.setSummaryOn(getString(R.string.show_banner_on)); + bannerPreference.setSummaryOff(getString(R.string.show_banner_off)); + + SwitchPreference getStartedPreference = new SwitchPreference(context); + getStartedPreference.setKey(GetStartedActivity.showGetStartedKey); + getStartedPreference.setTitle(getString(R.string.show_get_started)); + getStartedPreference.setDefaultValue(true); + + // Blocks the default checkmark interaction; we want to control the checkmark's state separately + // from within update() based on if the user has taken the appropriate actions with the OS. + final Preference.OnPreferenceChangeListener checkBlocker = new Preference.OnPreferenceChangeListener() { + @Override + public boolean onPreferenceChange(Preference preference, Object newValue) { + return false; + } + }; + + setSystemKeyboardPreference = new CheckBoxPreference(context); + setSystemKeyboardPreference.setTitle(R.string.enable_system_keyboard); + setSystemKeyboardPreference.setDefaultValue(SystemIMESettings.isEnabledAsSystemKB(context)); + setSystemKeyboardPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + startActivity(new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS)); + return false; + } + }); + setSystemKeyboardPreference.setOnPreferenceChangeListener(checkBlocker); + + setDefaultKeyboardPreference = new CheckBoxPreference(context); + setDefaultKeyboardPreference.setTitle(R.string.set_keyman_as_default); + setDefaultKeyboardPreference.setDefaultValue(SystemIMESettings.isDefaultKB(context)); + setDefaultKeyboardPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + InputMethodManager imManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); + imManager.showInputMethodPicker(); + return false; + } + }); + setDefaultKeyboardPreference.setOnPreferenceChangeListener(checkBlocker); + + screen.addPreference(languagesPreference); + screen.addPreference(addKeyboardFromDevice); + + screen.addPreference(setSystemKeyboardPreference); + screen.addPreference(setDefaultKeyboardPreference); + + screen.addPreference(bannerPreference); + screen.addPreference(getStartedPreference); + + setPreferenceScreen(screen); + } + + String getInstalledLanguagesText() { + Dataset dataset = KMManager.getInstalledDataset(context); + int langCount = 0; + + // Some dataset languages may only have lexical models installed. + // This may happen if one model covers multiple variants of one language. (Ex: en vs en-us) + for(Dataset.LanguageDataset language: dataset.asList()) { + if(language.keyboards.size() > 0) { + langCount++; + } + } + + if(langCount > 1) { + // Has a %d slot to insert the count. + return String.format(getString(R.string.installed_languages), langCount); + } else { + return getString(R.string.installed_languages_empty); + } + } + + @Override + public void onResume() { + super.onResume(); + + // The onResume() function isn't called after the default-keyboard selection and cannot fix that + // option, though it is sufficient for handling the system-keyboard enablement option. + // + // As a result, we rely on KeymanSettingsActivity.onWindowFocusChanged to call + // .update() on our behalf. + } + + + public void onActivityResult(int requestCode, int resultCode, Intent returnIntent) { + // Handle kmp file selected from file browser + if ((requestCode == MainActivity.READ_REQUEST_CODE) && (returnIntent != null)) { + String kmpFilename = returnIntent.getDataString(); + Uri data = Uri.parse(kmpFilename); + MainActivity.useLocalKMP(this.getContext(), data); + } + } + + public void update() { + setSystemKeyboardPreference.setChecked(SystemIMESettings.isEnabledAsSystemKB(context)); + setDefaultKeyboardPreference.setChecked(SystemIMESettings.isDefaultKB(context)); + + // Update the language / keyboard count when we return to this menu from deeper levels. + languagesPreference.setTitle(getInstalledLanguagesText()); + } +} diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java index 2071569fe6e9ac8f69395b6539d895f075c14761..2342b986a36cab6a53f42b33f15fc7bce097ccb8 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018 SIL International. All rights reserved. + * Copyright (C) 2018-2019 SIL International. All rights reserved. */ package com.tavultesoft.kmapro; @@ -24,6 +24,7 @@ import com.tavultesoft.kmea.KMTextView; import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; import com.tavultesoft.kmea.util.FileUtils; +import com.tavultesoft.kmea.util.FileProviderUtils; import com.tavultesoft.kmea.util.DownloadIntentService; import android.Manifest; @@ -61,6 +62,7 @@ import android.os.ResultReceiver; import android.provider.OpenableColumns; import androidx.annotation.NonNull; import androidx.core.app.ActivityCompat; +import androidx.core.content.FileProvider; import android.text.Html; import android.util.Log; import android.util.TypedValue; @@ -75,10 +77,12 @@ import android.widget.SeekBar; import android.widget.Toast; public class MainActivity extends AppCompatActivity implements OnKeyboardEventListener, OnKeyboardDownloadEventListener, - ActivityCompat.OnRequestPermissionsResultCallback { + ActivityCompat.OnRequestPermissionsResultCallback { + public static Context context; // Fields used for installing kmp packages private static final int PERMISSION_REQUEST_STORAGE = 0; + public static final int READ_REQUEST_CODE = 42; Uri data; private static final String TAG = "MainActivity"; @@ -88,9 +92,10 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi private final int minTextSize = 16; private final int maxTextSize = 72; private int textSize = minTextSize; + private static final String defaultKeyboardInstalled = "DefaultKeyboardInstalled"; + private static final String defaultDictionaryInstalled = "DefaultDictionaryInstalled"; private static final String userTextKey = "UserText"; private static final String userTextSizeKey = "UserTextSize"; - protected static final String dontShowGetStartedKey = "DontShowGetStarted"; protected static final String didCheckUserDataKey = "DidCheckUserData"; private Toolbar toolbar; private Menu menu; @@ -133,6 +138,7 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi protected void onCreate(Bundle savedInstanceState) { setTheme(R.style.AppTheme); super.onCreate(savedInstanceState); + context = this; resultReceiver = new DownloadResultReceiver(new Handler()); mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); @@ -237,24 +243,36 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi KMManager.onResume(); KMManager.hideSystemKeyboard(); + SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + SharedPreferences.Editor editor = prefs.edit(); + + // Check if default keyboard should be added if (!KMManager.keyboardExists(this, KMManager.KMDefault_UndefinedPackageID, - KMManager.KMDefault_KeyboardID, KMManager.KMDefault_LanguageID)) { - HashMap kbInfo = new HashMap(); - kbInfo.put(KMManager.KMKey_PackageID, KMManager.KMDefault_UndefinedPackageID); - kbInfo.put(KMManager.KMKey_KeyboardID, KMManager.KMDefault_KeyboardID); - kbInfo.put(KMManager.KMKey_LanguageID, KMManager.KMDefault_LanguageID); - kbInfo.put(KMManager.KMKey_KeyboardName, KMManager.KMDefault_KeyboardName); - kbInfo.put(KMManager.KMKey_LanguageName, KMManager.KMDefault_LanguageName); - kbInfo.put(KMManager.KMKey_KeyboardVersion, KMManager.getLatestKeyboardFileVersion( - this, KMManager.KMDefault_UndefinedPackageID, KMManager.KMDefault_KeyboardID)); - kbInfo.put(KMManager.KMKey_Font, KMManager.KMDefault_KeyboardFont); - KMManager.addKeyboard(this, kbInfo); + KMManager.KMDefault_KeyboardID, KMManager.KMDefault_LanguageID)) { + boolean installDefaultKeyboard = prefs.getBoolean(defaultKeyboardInstalled, false); + if (!installDefaultKeyboard) { + HashMap kbInfo = new HashMap(); + kbInfo.put(KMManager.KMKey_PackageID, KMManager.KMDefault_UndefinedPackageID); + kbInfo.put(KMManager.KMKey_KeyboardID, KMManager.KMDefault_KeyboardID); + kbInfo.put(KMManager.KMKey_LanguageID, KMManager.KMDefault_LanguageID); + kbInfo.put(KMManager.KMKey_KeyboardName, KMManager.KMDefault_KeyboardName); + kbInfo.put(KMManager.KMKey_LanguageName, KMManager.KMDefault_LanguageName); + kbInfo.put(KMManager.KMKey_KeyboardVersion, KMManager.getLatestKeyboardFileVersion( + this, KMManager.KMDefault_UndefinedPackageID, KMManager.KMDefault_KeyboardID)); + kbInfo.put(KMManager.KMKey_Font, KMManager.KMDefault_KeyboardFont); + KMManager.addKeyboard(this, kbInfo); + } + + editor.putBoolean(defaultKeyboardInstalled, true); + editor.commit(); } KMManager.addKeyboardEventListener(this); KMKeyboardDownloaderActivity.addKeyboardDownloadEventListener(this); PackageActivity.addKeyboardDownloadEventListener(this); + checkAndInstallDefaultDictionary(); + Intent intent = getIntent(); data = intent.getData(); @@ -383,6 +401,9 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi case R.id.action_get_started: showGetStarted(); return true; + case R.id.action_settings: + showSettings(); + return true; default: return super.onOptionsItemSelected(item); } @@ -419,10 +440,36 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi resizeTextView(false); } + private void checkAndInstallDefaultDictionary() { + SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + + // Check if default dictionary model package should be installed + // This also depends on a current keyboard being loaded + HashMap curKbInfo = KMManager.getCurrentKeyboardInfo(this); + if (!KMManager.lexicalModelExists(this, KMManager.KMDefault_DictionaryPackageID, + KMManager.KMDefault_LanguageID, KMManager.KMDefault_DictionaryModelID) && curKbInfo != null) { + boolean installDefaultDictionary = prefs.getBoolean(defaultDictionaryInstalled, false); + if (!installDefaultDictionary) { + File defaultDictionaryKMP = new File( + new File(KMManager.getResourceRoot(), KMManager.KMDefault_DictionaryKMP).getAbsolutePath()); + Uri uri = FileProvider.getUriForFile( + context, FileProviderUtils.getAuthority(context), defaultDictionaryKMP); + useLocalKMP(context, uri, true); + } + + SharedPreferences.Editor editor = prefs.edit(); + editor.putBoolean(defaultDictionaryInstalled, true); + editor.commit(); + } + } + private void resizeTextView(boolean isKeyboardVisible) { + int bannerHeight = 0; int keyboardHeight = 0; - if (isKeyboardVisible) + if (isKeyboardVisible) { + bannerHeight = KMManager.getBannerHeight(this); keyboardHeight = KMManager.getKeyboardHeight(this); + } TypedValue outValue = new TypedValue(); getTheme().resolveAttribute(android.R.attr.actionBarSize, outValue, true); @@ -437,7 +484,8 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi Point size = new Point(0, 0); getWindowManager().getDefaultDisplay().getSize(size); int screenHeight = size.y; - textView.setHeight(screenHeight - statusBarHeight - actionBarHeight - keyboardHeight); + Log.d(TAG, "Main resizeTextView bannerHeight: " + bannerHeight); + textView.setHeight(screenHeight - statusBarHeight - actionBarHeight - bannerHeight - keyboardHeight); } private void showInfo() { @@ -589,17 +637,17 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi private void checkGetStarted() { SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - boolean dontShowGetStarted = prefs.getBoolean(MainActivity.dontShowGetStartedKey, false); - if (!dontShowGetStarted) { + boolean showGetStarted = prefs.getBoolean(GetStartedActivity.showGetStartedKey, true); + if (showGetStarted) { boolean shouldShowGetStarted = false; ArrayList> kbList = KMManager.getKeyboardsList(this); if (kbList != null && kbList.size() < 2) shouldShowGetStarted = true; - if (!GetStartedActivity.isEnabledAsSystemKB(this)) + if (!SystemIMESettings.isEnabledAsSystemKB(this)) shouldShowGetStarted = true; - if (!GetStartedActivity.isDefaultKB(this)) + if (!SystemIMESettings.isDefaultKB(this)) shouldShowGetStarted = true; if (shouldShowGetStarted) @@ -613,7 +661,7 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi // Request for storage permission if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { // Permission has been granted. Resume task needing this permission - useLocalKMP(data); + useLocalKMP(context, data); } else { // Permission request denied String message = "Storage permission request was denied. Unable to install keyboard package"; @@ -628,14 +676,14 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { - useLocalKMP(data); + useLocalKMP(context, data); } else { // Permission is missing and must be requested requestStoragePermission(); } } else { // Permission automatically granted on older Android versions - useLocalKMP(data); + useLocalKMP(context, data); } } @@ -658,7 +706,12 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi } } - private void useLocalKMP(Uri data) { + // TODO: Move this to KMEA during Keyman 13.0 refactoring + public static void useLocalKMP(Context context, Uri data) { + useLocalKMP(context, data, false); + } + + public static void useLocalKMP(Context context, Uri data, boolean silentInstall) { String filename = ""; String cacheKMPFilename = ""; File cacheKMPFile = null; @@ -669,13 +722,13 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi switch (data.getScheme().toLowerCase()) { case "content": // DownloadManager passes a path "/document/number" so we need to extract the .kmp filename - Cursor cursor = getContentResolver().query(data, null, null, null, null); + Cursor cursor = context.getContentResolver().query(data, null, null, null, null); cursor.moveToFirst(); int nameIndex = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME); filename = cursor.getString(nameIndex); isKMP = FileUtils.hasKeymanPackageExtension(filename); cacheKMPFilename = filename; - inputFile = getContentResolver().openInputStream(data); + inputFile = context.getContentResolver().openInputStream(data); break; case "file": @@ -689,31 +742,33 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi if (isKMP) { // Copy KMP to app cache - cacheKMPFile = new File(MainActivity.this.getCacheDir().toString(), cacheKMPFilename); + cacheKMPFile = new File(context.getCacheDir().toString(), cacheKMPFilename); if (cacheKMPFile.exists()) { cacheKMPFile.delete(); } FileUtils.copy(inputFile, new FileOutputStream(cacheKMPFile)); } else { - String noKeyboardsInstalledMessage = " is not a valid keyboard package file.\nNo keyboards were installed."; - Toast.makeText(getApplicationContext(), + String noKeyboardsInstalledMessage = " is not a valid Keyman package file.\n" + + "No keyboards/dictionaries were installed."; + Toast.makeText(context, filename + noKeyboardsInstalledMessage, Toast.LENGTH_LONG).show(); } } catch (Exception e) { String message = "Access denied to " + filename + ".\nCheck Android Settings --> Apps --> Keyman to grant storage permissions"; - Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show(); + Toast.makeText(context, message, Toast.LENGTH_LONG).show(); Log.e(TAG, "Unable to copy " + filename + " to app cache"); return; } if (cacheKMPFile != null) { bundle.putString("kmpFile", cacheKMPFile.getAbsolutePath()); + bundle.putBoolean("silentInstall", silentInstall); - Intent packageIntent = new Intent(getApplicationContext(), PackageActivity.class); + Intent packageIntent = new Intent(context, PackageActivity.class); packageIntent.putExtras(bundle); - startActivity(packageIntent); + context.startActivity(packageIntent); } } @@ -722,6 +777,11 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi startActivity(getStartedIntent); } + private void showSettings() { + Intent settingsIntent = new Intent(this, KeymanSettingsActivity.class); + startActivity(settingsIntent); + } + public static Drawable getActionBarDrawable(Context context) { Point size = new Point(); WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); @@ -832,10 +892,24 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi @Override public void onLexicalModelInstalled(List> lexicalModelsInstalled) { + String langId = (KMManager.getCurrentKeyboardInfo(this) != null) ? + KMManager.getCurrentKeyboardInfo(this).get(KMManager.KMKey_LanguageID) : + KMManager.KMDefault_LanguageID; + boolean matchingModel = false; + for(int i=0; ilexicalModelInfo = new HashMap<>(lexicalModelsInstalled.get(i)); + if(lexicalModelInfo.get(KMManager.KMKey_LanguageID).equals(langId)) { + matchingModel = true; + } KMManager.addLexicalModel(this, lexicalModelInfo); } + + // We're on the main thread, so if the active keyboard's language code matches, + // let's register the associated lexical model. + if(matchingModel) { + KMManager.registerAssociatedLexicalModel(langId); + } } private void copyFile(FileInputStream inStream, File dstFile) throws IOException { diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java index 47179ed6e28b31c364b7a7ce0a6f08f45d2e3fa7..7b22b2af36c3f191eee1e1d711010f2ebbee372a 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/PackageActivity.java @@ -42,8 +42,6 @@ public class PackageActivity extends AppCompatActivity { private AlertDialog alertDialog; private File kmpFile; private File tempPackagePath; - private List> installedPackageKeyboards; - private List> installedLexicalModels; private static ArrayList kbDownloadEventListeners = null; private PackageProcessor kmpProcessor; @@ -52,11 +50,13 @@ public class PackageActivity extends AppCompatActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_package_installer); + boolean silentInstall = false; final Context context = this; Bundle bundle = getIntent().getExtras(); if (bundle != null) { kmpFile = new File(bundle.getString("kmpFile")); + silentInstall = bundle.getBoolean("silentInstall", false); } File resourceRoot = new File(context.getDir("data", Context.MODE_PRIVATE).toString() + File.separator); @@ -84,6 +84,12 @@ public class PackageActivity extends AppCompatActivity { return; } + // Silent installation (skip displaying welcome.htm and user confirmation) + if (silentInstall) { + installPackage(context, pkgTarget, pkgId); + return; + } + String pkgVersion = kmpProcessor.getPackageVersion(pkgInfo); String pkgName = kmpProcessor.getPackageName(pkgInfo); @@ -179,45 +185,7 @@ public class PackageActivity extends AppCompatActivity { installButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { - try { - if (pkgTarget.equals(PackageProcessor.PP_TARGET_KEYBOARDS)) { - // processKMP will remove currently installed package and install - installedPackageKeyboards = kmpProcessor.processKMP(kmpFile, tempPackagePath, - PackageProcessor.PP_KEYBOARDS_KEY); - // Do the notifications! - boolean success = installedPackageKeyboards.size() != 0; - if (success) { - notifyPackageInstallListeners(KeyboardEventHandler.EventType.PACKAGE_INSTALLED, - installedPackageKeyboards, 1); - if (installedPackageKeyboards != null) { - notifyPackageInstallListeners(KeyboardEventHandler.EventType.PACKAGE_INSTALLED, - installedPackageKeyboards, 1); - } - cleanup(); - } else { - showErrorDialog(context, pkgId, getString(R.string.no_new_touch_keyboards_to_install)); - } - } else if (pkgTarget.equals(PackageProcessor.PP_TARGET_LEXICAL_MODELS)) { - installedLexicalModels = kmpProcessor.processKMP(kmpFile, tempPackagePath, - PackageProcessor.PP_LEXICAL_MODELS_KEY); - // Do the notifications - boolean success = installedLexicalModels.size() != 0; - if (success) { - notifyLexicalModelInstallListeners(KeyboardEventHandler.EventType.LEXICAL_MODEL_INSTALLED, - installedLexicalModels, 1); - if (installedLexicalModels != null) { - notifyLexicalModelInstallListeners(KeyboardEventHandler.EventType.LEXICAL_MODEL_INSTALLED, - installedLexicalModels, 1); - } - cleanup(); - } else { - showErrorDialog(context, pkgId, getString(R.string.no_new_predictive_text_to_install)); - } - } - } catch (Exception e) { - Log.e("PackageActivity", "Error " + e); - showErrorDialog(context, pkgId, getString(R.string.no_targets_to_install)); - } + installPackage(context, pkgTarget, pkgId); } }); @@ -270,6 +238,54 @@ public class PackageActivity extends AppCompatActivity { cleanup(); } + /** + * Installs the keyboard or lexical model package, and then notifies the corresponding listeners + * @param context Context The activity context + * @param pkgTarget String: PackageProcessor.PP_TARGET_KEYBOARDS or PP_TARGET_LEXICAL_MODELS + * @param pkgId String The Keyman package ID + */ + private void installPackage(Context context, String pkgTarget, String pkgId) { + try { + if (pkgTarget.equals(PackageProcessor.PP_TARGET_KEYBOARDS)) { + // processKMP will remove currently installed package and install + List> installedPackageKeyboards = + kmpProcessor.processKMP(kmpFile, tempPackagePath, PackageProcessor.PP_KEYBOARDS_KEY); + // Do the notifications! + boolean success = installedPackageKeyboards.size() != 0; + if (success) { + notifyPackageInstallListeners(KeyboardEventHandler.EventType.PACKAGE_INSTALLED, + installedPackageKeyboards, 1); + if (installedPackageKeyboards != null) { + notifyPackageInstallListeners(KeyboardEventHandler.EventType.PACKAGE_INSTALLED, + installedPackageKeyboards, 1); + } + cleanup(); + } else { + showErrorDialog(context, pkgId, getString(R.string.no_new_touch_keyboards_to_install)); + } + } else if (pkgTarget.equals(PackageProcessor.PP_TARGET_LEXICAL_MODELS)) { + List> installedLexicalModels = + kmpProcessor.processKMP(kmpFile, tempPackagePath, PackageProcessor.PP_LEXICAL_MODELS_KEY); + // Do the notifications + boolean success = installedLexicalModels.size() != 0; + if (success) { + notifyLexicalModelInstallListeners(KeyboardEventHandler.EventType.LEXICAL_MODEL_INSTALLED, + installedLexicalModels, 1); + if (installedLexicalModels != null) { + notifyLexicalModelInstallListeners(KeyboardEventHandler.EventType.LEXICAL_MODEL_INSTALLED, + installedLexicalModels, 1); + } + cleanup(); + } else { + showErrorDialog(context, pkgId, getString(R.string.no_new_predictive_text_to_install)); + } + } + } catch (Exception e) { + Log.e("PackageActivity", "Error " + e); + showErrorDialog(context, pkgId, getString(R.string.no_targets_to_install)); + } + } + private void showErrorDialog(Context context, String pkgId, String message) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java index 68378bf4fc8915e79bc01ee85649e1cc41a46137..543124668f29fd323ea5f226334b4da9919ea5cb 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SplashScreenActivity.java @@ -29,12 +29,13 @@ public class SplashScreenActivity extends Activity { } catch (PackageManager.NameNotFoundException e) { // Could not get version number } - version.setText(ver); + // TODO: Add version and copyright info when Android supports TextViews in the splash screen + //version.setText(ver); TextView copyright = (TextView)findViewById(R.id.splash_copyright); int year = Calendar.getInstance().get(Calendar.YEAR); String date = String.format("%s%s", copyright.getText(), year); - copyright.setText(date); + //copyright.setText(date); new Handler().postDelayed(new Runnable() { @Override diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SystemIMESettings.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SystemIMESettings.java new file mode 100644 index 0000000000000000000000000000000000000000..fcbdf1390395972ead3ec3fd7c5053a64223394b --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/SystemIMESettings.java @@ -0,0 +1,30 @@ +package com.tavultesoft.kmapro; + +import android.content.Context; +import android.provider.Settings; +import android.view.inputmethod.InputMethodInfo; +import android.view.inputmethod.InputMethodManager; + +import java.util.List; + +public class SystemIMESettings { + static boolean isEnabledAsSystemKB(Context context) { + InputMethodManager imManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); + List imList = imManager.getEnabledInputMethodList(); + boolean isEnabled = false; + int size = imList.size(); + for (int i = 0; i < size; i++) { + if (imList.get(i).getServiceName().equals("com.keyman.android.SystemKeyboard")) { + isEnabled = true; + break; + } + } + + return isEnabled; + } + + static boolean isDefaultKB(Context context) { + String inputMethod = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); + return inputMethod.equals(context.getPackageName() + "/com.keyman.android.SystemKeyboard"); + } +} diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-hdpi/ic_folder_open.png b/android/KMAPro/kMAPro/src/main/res/drawable-hdpi/ic_folder_open.png new file mode 100644 index 0000000000000000000000000000000000000000..4f90c63104aba086b4dc5c6a69a7720fc5c262b9 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-hdpi/ic_folder_open.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-hdpi/ic_settings.png b/android/KMAPro/kMAPro/src/main/res/drawable-hdpi/ic_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..acf1ddf85b3388b4fb02a683664d7599d96ebfe3 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-hdpi/ic_settings.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-mdpi/ic_folder_open.png b/android/KMAPro/kMAPro/src/main/res/drawable-mdpi/ic_folder_open.png new file mode 100644 index 0000000000000000000000000000000000000000..4f90c63104aba086b4dc5c6a69a7720fc5c262b9 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-mdpi/ic_folder_open.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-mdpi/ic_settings.png b/android/KMAPro/kMAPro/src/main/res/drawable-mdpi/ic_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..acf1ddf85b3388b4fb02a683664d7599d96ebfe3 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-mdpi/ic_settings.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-xhdpi/ic_folder_open.png b/android/KMAPro/kMAPro/src/main/res/drawable-xhdpi/ic_folder_open.png new file mode 100644 index 0000000000000000000000000000000000000000..f55b92e9ba4044323a87a369887b9f0726730b45 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-xhdpi/ic_folder_open.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-xhdpi/ic_settings.png b/android/KMAPro/kMAPro/src/main/res/drawable-xhdpi/ic_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..e84e188a1de15564930f961aefb5e591b2fa34ec Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-xhdpi/ic_settings.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-xxhdpi/ic_folder_open.png b/android/KMAPro/kMAPro/src/main/res/drawable-xxhdpi/ic_folder_open.png new file mode 100644 index 0000000000000000000000000000000000000000..1eb3365e090b4bdc3c2837b4815d93b0e68706ad Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-xxhdpi/ic_folder_open.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-xxhdpi/ic_settings.png b/android/KMAPro/kMAPro/src/main/res/drawable-xxhdpi/ic_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..5754bf2ada98b9fec16c9918dac176b854e0bf1c Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-xxhdpi/ic_settings.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-xxxhdpi/ic_folder_open.png b/android/KMAPro/kMAPro/src/main/res/drawable-xxxhdpi/ic_folder_open.png new file mode 100644 index 0000000000000000000000000000000000000000..e6faa991f402255879a2c6dbabfcbc852095eda8 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-xxxhdpi/ic_folder_open.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/drawable-xxxhdpi/ic_settings.png b/android/KMAPro/kMAPro/src/main/res/drawable-xxxhdpi/ic_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..8f2a8bc23ae0462cc81157a6c9c103b4ce2f28d0 Binary files /dev/null and b/android/KMAPro/kMAPro/src/main/res/drawable-xxxhdpi/ic_settings.png differ diff --git a/android/KMAPro/kMAPro/src/main/res/layout/activity_splash_screen.xml b/android/KMAPro/kMAPro/src/main/res/layout/activity_splash_screen.xml index ef441602782bb397d15dfd41bb79aa25658c63a1..c6cde0e2595774e667bdd1953cb70eddd70fbb42 100644 --- a/android/KMAPro/kMAPro/src/main/res/layout/activity_splash_screen.xml +++ b/android/KMAPro/kMAPro/src/main/res/layout/activity_splash_screen.xml @@ -13,7 +13,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" - android:text="@string/title_version" + android:text="@string/splash_blank" android:textSize="@dimen/activity_splash_textsize" /> diff --git a/android/KMAPro/kMAPro/src/main/res/layout/get_started_list_layout.xml b/android/KMAPro/kMAPro/src/main/res/layout/get_started_list_layout.xml index 4b66a5e62fb9dbc03d10bf3ef6bb4c16966b9693..be6862a65e1464636fd5f13b686ff221d8210bf1 100644 --- a/android/KMAPro/kMAPro/src/main/res/layout/get_started_list_layout.xml +++ b/android/KMAPro/kMAPro/src/main/res/layout/get_started_list_layout.xml @@ -40,12 +40,13 @@ android:paddingBottom="@dimen/checkbox_padding" /> + android:id="@+id/getStartedText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginStart="@dimen/checkbox_margin_left" + android:layout_marginLeft="@dimen/checkbox_margin_left" + android:text="@string/show_get_started" /> diff --git a/android/KMAPro/kMAPro/src/main/res/layout/keyman_settings_layout.xml b/android/KMAPro/kMAPro/src/main/res/layout/keyman_settings_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..edaabd10d7bd481e5a500836ef1f232eadc6b50c --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/layout/keyman_settings_layout.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + diff --git a/android/KMAPro/kMAPro/src/main/res/layout/preference_file_browser_layout.xml b/android/KMAPro/kMAPro/src/main/res/layout/preference_file_browser_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..9483748278a427724c74a999bc0b170cdd53bfe2 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/layout/preference_file_browser_layout.xml @@ -0,0 +1,5 @@ + + diff --git a/android/KMAPro/kMAPro/src/main/res/layout/preference_icon_layout.xml b/android/KMAPro/kMAPro/src/main/res/layout/preference_icon_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..6aa84ce384b4577a06c69ac1fa09a617f24046e8 --- /dev/null +++ b/android/KMAPro/kMAPro/src/main/res/layout/preference_icon_layout.xml @@ -0,0 +1,5 @@ + + diff --git a/android/KMAPro/kMAPro/src/main/res/menu-land/main.xml b/android/KMAPro/kMAPro/src/main/res/menu-land/main.xml index 5a077c99f4e10b9792eb63517aa797bb6a9177c2..6cb3ec10a3aba9bb0135fc31485506310683a753 100644 --- a/android/KMAPro/kMAPro/src/main/res/menu-land/main.xml +++ b/android/KMAPro/kMAPro/src/main/res/menu-land/main.xml @@ -14,7 +14,7 @@ app:showAsAction="always" android:title="@string/action_web" android:icon="@drawable/ic_light_action_web" /> - + - + + + diff --git a/android/KMAPro/kMAPro/src/main/res/menu-sw600dp/main.xml b/android/KMAPro/kMAPro/src/main/res/menu-sw600dp/main.xml index 7263dda25322c50e759d1bcd78faa8733ddede69..6cb3ec10a3aba9bb0135fc31485506310683a753 100644 --- a/android/KMAPro/kMAPro/src/main/res/menu-sw600dp/main.xml +++ b/android/KMAPro/kMAPro/src/main/res/menu-sw600dp/main.xml @@ -14,7 +14,7 @@ app:showAsAction="always" android:title="@string/action_web" android:icon="@drawable/ic_light_action_web" /> - + - + + + diff --git a/android/KMAPro/kMAPro/src/main/res/menu/main.xml b/android/KMAPro/kMAPro/src/main/res/menu/main.xml index ebde4a41748c227aa34215d0754390b5306b6c87..c2d17e6a381501407bb1787bdfc870b07a99f5e3 100644 --- a/android/KMAPro/kMAPro/src/main/res/menu/main.xml +++ b/android/KMAPro/kMAPro/src/main/res/menu/main.xml @@ -27,7 +27,7 @@ android:id="@+id/action_text_size" android:title="@string/action_text_size" app:showAsAction="never" - android:icon="@drawable/ic_light_action_textsize"/> + android:icon="@drawable/ic_light_action_textsize" /> + + + \ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/res/values-sw600dp/dimens.xml b/android/KMAPro/kMAPro/src/main/res/values-sw600dp/dimens.xml index e466f62acf7d1150962673e92652be438d67aa32..c6ee6f144c247925f9aa2e7bf29de642a70d2c63 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-sw600dp/dimens.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-sw600dp/dimens.xml @@ -10,5 +10,5 @@ 18dp 12dp 10dp - + 32dp diff --git a/android/KMAPro/kMAPro/src/main/res/values-sw720dp-land/dimens.xml b/android/KMAPro/kMAPro/src/main/res/values-sw720dp-land/dimens.xml index 5d1e6e39ec19d0e7d6acf30160ddacffd5578b16..6140c8a828f1c6f492203f96db05c7f3f06779ca 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-sw720dp-land/dimens.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-sw720dp-land/dimens.xml @@ -10,5 +10,5 @@ 8dp 15dp 10dp - + 32dp diff --git a/android/KMAPro/kMAPro/src/main/res/values-sw720dp/dimens.xml b/android/KMAPro/kMAPro/src/main/res/values-sw720dp/dimens.xml index 2436c7dd7b132a43196207ef9b7e825121c4fbde..6a29e9f14384fd62d7daff2aecb0afdabf475c33 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-sw720dp/dimens.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-sw720dp/dimens.xml @@ -11,5 +11,5 @@ 8dp 15dp 10dp - + 32dp diff --git a/android/KMAPro/kMAPro/src/main/res/values-v21/styles.xml b/android/KMAPro/kMAPro/src/main/res/values-v21/styles.xml index ee37eff14a0a083fcdfc9e1ffdb37898037203d6..57d753e79c2501282d6f7271d3a262e0f7fd76c3 100644 --- a/android/KMAPro/kMAPro/src/main/res/values-v21/styles.xml +++ b/android/KMAPro/kMAPro/src/main/res/values-v21/styles.xml @@ -20,6 +20,10 @@ @style/AppTheme.Dialog @style/AppTheme.Dialog.Alert + @style/PreferenceThemeOverlay + false + true + - diff --git a/android/KMAPro/kMAPro/src/main/res/xml/file_paths.xml b/android/KMAPro/kMAPro/src/main/res/xml/file_paths.xml index 0ca3a0ac7a4ba3c578c4e4e543fc971b0f5b6992..56b0b5e8632e52780f04288ed434eda8689e9c98 100644 --- a/android/KMAPro/kMAPro/src/main/res/xml/file_paths.xml +++ b/android/KMAPro/kMAPro/src/main/res/xml/file_paths.xml @@ -1,5 +1,8 @@ + + + diff --git a/android/KMEA/app/build.gradle b/android/KMEA/app/build.gradle index 41875e2f1062732bba25c5beba1db6a785b73775..eb271e91c00eec9a5b95b72375447ec67de5de44 100644 --- a/android/KMEA/app/build.gradle +++ b/android/KMEA/app/build.gradle @@ -8,13 +8,17 @@ android { minSdkVersion 16 targetSdkVersion 28 - if (project.hasProperty("build.number")) { - versionCode project.ext['build_counter'] as Integer // Because TeamCity does not bubble build.counter into system properties... - versionName "${project.ext['build.number']}" + String env_build_number = System.getenv("BUILD_NUMBER") //assigned by TeamCity, so all caps + String env_build_counter = System.getenv("build_counter") + if (env_build_number != null) { + println "Using build number $env_build_number and counter $env_build_counter from environment" + versionCode env_build_counter as Integer + versionName env_build_number } else { String majorMinorVersion = file('$projectDir/../../../../resources/VERSION.md').text.trim() versionCode 100 versionName majorMinorVersion + '.0.0' + println "Using build $majorMinorVersion from project VERSION.md" } } @@ -54,7 +58,7 @@ dependencies { testImplementation 'org.robolectric:robolectric:4.2' /* We only want these Firebase Crashlytics dependencies for KMEA */ - implementation 'com.google.firebase:firebase-analytics:16.3.0' + implementation 'com.google.firebase:firebase-analytics:16.4.0' implementation 'com.google.firebase:firebase-crash:16.2.1' implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') { transitive = true; diff --git a/android/KMEA/app/src/main/AndroidManifest.xml b/android/KMEA/app/src/main/AndroidManifest.xml index 7ea2f1095f2b19f72d7baeafe12162a2300995d4..cbc8d9644a5e52509114681cd39ff271975894e9 100644 --- a/android/KMEA/app/src/main/AndroidManifest.xml +++ b/android/KMEA/app/src/main/AndroidManifest.xml @@ -37,6 +37,37 @@ android:label="" android:theme="@style/Theme.AppCompat.Light.Dialog"> + + + + + + + + + + - \ No newline at end of file + diff --git a/android/KMEA/app/src/main/assets/keyboard.html b/android/KMEA/app/src/main/assets/keyboard.html index cfcdb5aced0330e0d6e575cd0e5aa78623f5210c..a0eebfa92ab25519fcabc6fa8207b20c2f992bbb 100644 --- a/android/KMEA/app/src/main/assets/keyboard.html +++ b/android/KMEA/app/src/main/assets/keyboard.html @@ -1,6 +1,6 @@ @@ -12,13 +12,14 @@ var device = window.jsInterface.getDeviceType(); var oskHeight = window.jsInterface.getKeyboardHeight(); var oskWidth = 0; + var fragmentToggle = 0; window.addEventListener('load', init, false); function init() { //document.body.style.backgroundColor="transparent"; //window.console.log('Device type = '+device); //window.console.log('Keyboard height = '+oskHeight); - var kmw=window['keyman']; + var kmw=com.keyman.singleton; kmw.init({'app':device,'fonts':'packages/'}); kmw['util']['setOption']('attachType','manual'); kmw['oninserttext'] = insertText; @@ -32,8 +33,36 @@ ta.readOnly = false; + // Tell KMW the default banner height to use + com.keyman.osk.Banner.DEFAULT_HEIGHT = + Math.ceil(window.jsInterface.getDefaultBannerHeight() / window.devicePixelRatio); + kmw.addEventListener('keyboardloaded', setIsChiral); kmw.addEventListener('keyboardchange', setIsChiral); + kmw.addEventListener('mm.modelchange', onModelChange); + + notifyHost('pageLoaded'); + } + + function notifyHost(event, params) { + // TODO: Update all other host notifications to use notifyHost instead of directly setting window.location.hash + window.setTimeout(function() { + // We use a timeout so that the navigation doesn't cause the calling function to abort after the call + fragmentToggle = (fragmentToggle + 1) % 100; + params = params ? '+'+params : ''; + window.location.hash = event+'-'+fragmentToggle+params; + }, 10); + } + + // Update the KMW banner height + function setBannerHeight(h) { + var kmw=com.keyman.singleton; + if (h > 0) { + var osk = kmw.osk; + osk.banner.height = Math.ceil(h / window.devicePixelRatio); + } + // Refresh KMW OSK + kmw.correctOSKTextSize(); } function setOskHeight(h) { @@ -66,6 +95,17 @@ window.jsInterface.beepKeyboard(); } + function onModelChange(change) { + //window.console.log('onModelChange change: ' + change); + + // Refresh KMW OSK + var kmw=window['keyman']; + kmw['correctOSKTextSize'](); + + fragmentToggle = (fragmentToggle + 1) % 100; + window.location.hash = 'refreshBannerHeight-'+fragmentToggle+'+change='+change; + } + // Query KMW if a given keyboard uses chiral modifiers. function setIsChiral(keyboardProperties) { var name = typeof(keyboardProperties.internalName) == 'undefined' ? keyboardProperties.keyboardName : keyboardProperties.internalName; @@ -121,14 +161,37 @@ kmw['osk']['show'](true); } - function insertText(dn, s) { - //window.console.log('insertText('+ dn +', ' + s +');'); - window.jsInterface.insertText(dn, s); + /** + * Inserts the selected string s + * @param dn Number of pre-caret code points (UTF+8 characters) to delete + * @param s Text to insert + * @param dr Number of post-caret code points to delete. (optional) + */ + function insertText(dn, s, dr) { + dr = dr || 0; // Sets a default value of zero when dr is undefined + //window.console.log('insertText('+ dn +', ' + s +', ' + dr + ');'); + window.jsInterface.insertText(dn, s, dr); + } + + function deregisterModel(modelID) { + var kmw=window['keyman']; + kmw.modelManager.deregister(modelID); + } + + function enableSuggestions(model, mayPredict, mayCorrect) { + // Set the options first so that KMW's ModelManager can properly handle model enablement states + // the moment we actually register the new model. + keyman.osk.banner.setOptions({ + 'mayPredict': mayPredict, + 'mayCorrect': mayCorrect + }); + + registerModel(model); } function registerModel(model) { var kmw=window['keyman']; - window.console.log('model: ' + model); + //window.console.log('registerModel: ' + model); kmw.registerModel(model); } @@ -161,7 +224,6 @@ kmw['setActiveElement'](ta); } - var fragmentToggle = 0; function oskCreateKeyPreview(x,y,w,h,t) { fragmentToggle = (fragmentToggle + 1) % 100; var div = document.createElement('div'); @@ -197,6 +259,21 @@ } } + function suggestionPopup(obj,custom,x,y,w,h) { + if(obj != null) { + let s = JSON.stringify(obj); + + fragmentToggle=(fragmentToggle+1) % 100; + let hash = 'suggestPopup-' + fragmentToggle; + + hash = hash + '&x=' + encodeURIComponent(x) + '&y=' + encodeURIComponent(y); + hash = hash + '&w=' + encodeURIComponent(w) + '&h=' + encodeURIComponent(h); + hash = hash + '&suggestion=' + encodeURIComponent(s) + '&custom=' + encodeURIComponent(custom); + + window.location.hash = hash; + } + } + function showMenu() { fragmentToggle = (fragmentToggle + 1) % 100; window.location.hash = 'globeKeyAction' + fragmentToggle; diff --git a/android/KMEA/app/src/main/assets/nrc.en.mtnt.model.kmp b/android/KMEA/app/src/main/assets/nrc.en.mtnt.model.kmp new file mode 100644 index 0000000000000000000000000000000000000000..4a1ed46be69cbff5d4e7a65ffe0e02bdc12e1d69 Binary files /dev/null and b/android/KMEA/app/src/main/assets/nrc.en.mtnt.model.kmp differ diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ConfirmDialogFragment.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ConfirmDialogFragment.java index 2ad8549853bcbedba6a23574060f284a5247b0a3..e093a11314104e157a2b4dbeea848c157f5b051d 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ConfirmDialogFragment.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ConfirmDialogFragment.java @@ -9,17 +9,39 @@ import android.os.Bundle; import android.widget.Toast; /** - * Confirmation dialog for downloading a Keyman keyboard + * Confirmation dialog for downloading or deleting a Keyman keyboard/model */ public class ConfirmDialogFragment extends DialogFragment { + public static final String ARG_DIALOG_TYPE = "ConfirmDialogFragment.dialogType"; public static final String ARG_TITLE = "ConfirmDialogFragment.title"; public static final String ARG_MESSAGE = "ConfirmDialogFragment.message"; + public static final String ARG_ITEM_KEY = "confirmDialogFragment.itemKey"; + private boolean dismissOnSelect = false; - public static ConfirmDialogFragment newInstance(String title, String message) { + public enum DialogType { + DIALOG_TYPE_DOWNLOAD_KEYBOARD, + DIALOG_TYPE_DELETE_KEYBOARD, + DIALOG_TYPE_DOWNLOAD_MODEL, + DIALOG_TYPE_DELETE_MODEL + } + + public static ConfirmDialogFragment newInstance(DialogType dialogType, String title, String message) { + ConfirmDialogFragment frag = new ConfirmDialogFragment(); + Bundle args = new Bundle(); + args.putSerializable(ARG_DIALOG_TYPE, dialogType); + args.putString(ARG_TITLE, title); + args.putString(ARG_MESSAGE, message); + frag.setArguments(args); + return frag; + } + + public static ConfirmDialogFragment newInstance(DialogType dialogType, String title, String message, String itemKey) { ConfirmDialogFragment frag = new ConfirmDialogFragment(); Bundle args = new Bundle(); + args.putSerializable(ARG_DIALOG_TYPE, dialogType); args.putString(ARG_TITLE, title); args.putString(ARG_MESSAGE, message); + args.putString(ARG_ITEM_KEY, itemKey); frag.setArguments(args); return frag; } @@ -28,24 +50,59 @@ public class ConfirmDialogFragment extends DialogFragment { public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); + final DialogType dialogType = (DialogType)getArguments().getSerializable(ARG_DIALOG_TYPE); final String title = getArguments().getString(ARG_TITLE); final String message = getArguments().getString(ARG_MESSAGE); + final String itemKey = getArguments().getString(ARG_ITEM_KEY); + String positiveLabel = (dialogType == DialogType.DIALOG_TYPE_DOWNLOAD_KEYBOARD || + dialogType == DialogType.DIALOG_TYPE_DOWNLOAD_MODEL) ? + getString(R.string.label_download) : getString(R.string.label_delete); return new AlertDialog.Builder(getActivity()) .setTitle(title) .setMessage(message) - .setPositiveButton(getString(R.string.label_download), new DialogInterface.OnClickListener() { + .setPositiveButton(positiveLabel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - // Download keyboard - if (KMManager.hasConnection(getActivity())) { - KMKeyboardDownloaderActivity.download(getActivity(), true); - } else { - Toast.makeText(getActivity(), "No internet connection", Toast.LENGTH_SHORT).show(); + switch (dialogType) { + case DIALOG_TYPE_DOWNLOAD_KEYBOARD : + // Confirmation to download keyboard + if (KMManager.hasConnection(getActivity())) { + KMKeyboardDownloaderActivity.download(getActivity(), true); + } else { + Toast.makeText(getActivity(), "No internet connection", Toast.LENGTH_SHORT).show(); + } + break; + case DIALOG_TYPE_DELETE_KEYBOARD : + // Confirmation to delete keyboard + int keyboardIndex = KeyboardPickerActivity.getKeyboardIndex(getActivity(), itemKey); + KeyboardPickerActivity.deleteKeyboard(getActivity(), keyboardIndex); + dismissOnSelect = true; + break; + case DIALOG_TYPE_DOWNLOAD_MODEL : + // Confirmation to download lexical model + if (KMManager.hasConnection(getActivity())) { + KMKeyboardDownloaderActivity.download(getActivity(), true, true); + } else { + Toast.makeText(getActivity(), "No internet connection", Toast.LENGTH_SHORT).show(); + } + break; + case DIALOG_TYPE_DELETE_MODEL : + // Confirmation to delete model + int modelIndex = KeyboardPickerActivity.getLexicalModelIndex(getActivity(), itemKey); + KeyboardPickerActivity.deleteLexicalModel(getActivity(), modelIndex, false); + dismissOnSelect = true; + break; + default : + break; } if (dialog != null) { dialog.dismiss(); } + + if (dismissOnSelect && !getActivity().isFinishing()) { + getActivity().finish(); + } } }) .setNegativeButton(getString(R.string.label_cancel), new DialogInterface.OnClickListener() { diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/JSONParser.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/JSONParser.java index 00ce496df7d44435dc65eb3619ba61b82ab35ad5..04c9391e111eeb86382a0e81876129ffb29ab3ec 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/JSONParser.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/JSONParser.java @@ -12,6 +12,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.InterruptedIOException; +import java.io.StringReader; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; @@ -162,4 +163,16 @@ public final class JSONParser { public JSONObject getJSONObjectFromUrl(String urlStr) { return getJSONObjectFromUrl(urlStr, JSONObject.class); } + + public JSONObject getJSONObjectFromString(String str) { + return getJSONObjectFromReader(new BufferedReader(new StringReader(str))); + } + + public JSONObject getJSONObjectFromURIString(String str) { + try { + return getJSONObjectFromString(java.net.URLDecoder.decode(str, "UTF-8")); + } catch (UnsupportedEncodingException e) { + return null; + } + } } \ No newline at end of file diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java index b60612aed505d7f635800122847f7b62eff109e7..a5a614a34be45131517b51c5e410f9a6b2ea6604 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java @@ -35,6 +35,8 @@ import android.util.Log; import android.view.GestureDetector; import android.view.Gravity; import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; @@ -46,6 +48,7 @@ import android.webkit.WebView; import android.widget.Button; import android.widget.FrameLayout; import android.widget.GridLayout; +import android.widget.PopupMenu; import android.widget.PopupWindow; import android.widget.PopupWindow.OnDismissListener; import android.widget.TextView; @@ -59,6 +62,8 @@ final class KMKeyboard extends WebView { private String keyboardName; private String keyboardVersion; + protected ArrayList javascriptAfterLoad = new ArrayList(); + private static String currentKeyboard = null; private static String txtFont = ""; private static String oskFont = null; @@ -77,8 +82,15 @@ final class KMKeyboard extends WebView { public PopupWindow subKeysWindow = null; public PopupWindow keyPreviewWindow = null; public PopupWindow helpBubbleWindow = null; + public ArrayList> subKeysList = null; public String[] subKeysWindowPos = {"0", "0"}; + + // public something-something for the suggestion. + public PopupWindow suggestionMenuWindow = null; + public double[] suggestionWindowPos = {0, 0}; + public String suggestionJSON = null; + public String specialOskFont = ""; public KMKeyboard(Context context) { @@ -126,12 +138,16 @@ final class KMKeyboard extends WebView { public boolean onConsoleMessage(ConsoleMessage cm) { if (KMManager.isDebugMode()) { Log.d("KMEA", "Keyman JS Log: Line " + cm.lineNumber() + ", " + cm.sourceId() + ":" + cm.message()); + if (cm.messageLevel() == ConsoleMessage.MessageLevel.ERROR) { + Log.e("KMEA", "Keyman JS Log: ERROR"); + } } // Send console errors to Firebase Analytics. // (Ignoring spurious message "No keyboard stubs exist = ...") // TODO: Analyze if this error warrants reverting to default keyboard // TODO: Fix base error rather than trying to ignore it "No keyboard stubs exist" + if ((cm.messageLevel() == ConsoleMessage.MessageLevel.ERROR) && (!cm.message().startsWith("No keyboard stubs exist"))) { sendKMWError(cm.lineNumber(), cm.sourceId(), cm.message()); Toast.makeText(context, "Fatal Error with " + currentKeyboard + @@ -141,6 +157,7 @@ final class KMKeyboard extends WebView { KMManager.KMDefault_LanguageID, KMManager.KMDefault_KeyboardName, KMManager.KMDefault_LanguageName, KMManager.KMDefault_KeyboardFont, null); } + return true; } }); @@ -153,7 +170,15 @@ final class KMKeyboard extends WebView { @Override public void onLongPress(MotionEvent event) { - showSubKeys(context); + // This is also called for banner longpresses! Need a way to differentiate the sources. + if (subKeysList != null) { + showSubKeys(context); + return; + } /* For future implementation + else if(suggestionJSON != null) { + showSuggestionLongpress(context); + return; + }*/ } @Override @@ -165,27 +190,75 @@ final class KMKeyboard extends WebView { public void loadKeyboard() { keyboardSet = false; + this.javascriptAfterLoad.clear(); + + if(keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) + KMManager.InAppKeyboardLoaded = false; + else + KMManager.SystemKeyboardLoaded = false; + String htmlPath = "file://" + getContext().getDir("data", Context.MODE_PRIVATE) + "/" + KMManager.KMFilename_KeyboardHtml; loadUrl(htmlPath); setBackgroundColor(0); } + public void loadJavascript(String func) { + this.javascriptAfterLoad.add(func); + + if((keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP && KMManager.InAppKeyboardLoaded) || + (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM && KMManager.SystemKeyboardLoaded)) { + + // If !this.keyboardSet, then pageLoaded hasn't fired yet. + // When pageLoaded fires, it'll call `callJavascriptAfterLoad` safely. + if(this.javascriptAfterLoad.size() == 1 && keyboardSet) + callJavascriptAfterLoad(); + } + } + + public void callJavascriptAfterLoad() { + if(this.javascriptAfterLoad.size() > 0) { + Handler handler = new Handler(); + handler.postDelayed(new Runnable() { + @Override + public void run() { + if(javascriptAfterLoad.size() > 0) { + loadUrl("javascript:" + javascriptAfterLoad.get(0)); + javascriptAfterLoad.remove(0); + // Make sure we didn't reset the page in the middle of the queue! + if(keyboardSet) { + if (javascriptAfterLoad.size() > 0) { + callJavascriptAfterLoad(); + } + } + } + } + }, 1); + } + } + public void hideKeyboard() { - String jsString = "javascript:hideKeyboard()"; - loadUrl(jsString); + String jsString = "hideKeyboard()"; + loadJavascript(jsString); } public void executeHardwareKeystroke(int code, int shift, int lstates, int eventModifiers) { - String jsFormat = "javascript:executeHardwareKeystroke(%d,%d, %d, %d)"; + String jsFormat = "executeHardwareKeystroke(%d,%d, %d, %d)"; String jsString = String.format(jsFormat, code, shift, lstates, eventModifiers); - loadUrl(jsString); + loadJavascript(jsString); } @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent event) { - if (subKeysWindow != null) { - //popupWindow.getContentView().dispatchTouchEvent(event); + // JH: I'm not sure if we even USE the suggestionMenuWindow construct anywhere, but either way, + // this if block is designed explicitly for handling the subKeysWindow. + // + // Come to think of it, I wonder if suggestionMenuWindow was work being done to link with + // suggestion banner longpresses - if so, it's not yet ready for proper integration... + // and would need its own rung in this if-else ladder. + if (subKeysWindow != null && suggestionMenuWindow == null) { + // Passes KMKeyboard (subclass of WebView)'s touch events off to our subkey window + // if active, allowing for smooth, integrated gesture control. subKeysWindow.getContentView().findViewById(R.id.grid).dispatchTouchEvent(event); } else { //handleTouchEvent(event); @@ -201,8 +274,8 @@ final class KMKeyboard extends WebView { DisplayMetrics dms = context.getResources().getDisplayMetrics(); int kbWidth = (int) (dms.widthPixels / dms.density); // Ensure window is loaded for javascript functions - loadUrl(String.format( - "javascript:window.onload = function(){ setOskWidth(\"%d\");"+ + loadJavascript(String.format( + "window.onload = function(){ setOskWidth(\"%d\");"+ "setOskHeight(\"0\"); };", kbWidth)); if (ShouldShowHelpBubble) { ShouldShowHelpBubble = false; @@ -210,7 +283,7 @@ final class KMKeyboard extends WebView { handler.postDelayed(new Runnable() { @Override public void run() { - loadUrl("javascript:showHelpBubble()"); + loadJavascript("showHelpBubble()"); } }, 2000); } @@ -232,14 +305,16 @@ final class KMKeyboard extends WebView { super.onConfigurationChanged(newConfig); dismissKeyPreview(0); dismissSubKeysWindow(); - loadUrl(String.format("javascript:setOskWidth(%d)", newConfig.screenWidthDp)); - loadUrl("javascript:setOskHeight(0)"); + int bannerHeight = KMManager.getBannerHeight(context); + loadJavascript(String.format("setBannerHeight(%d)", bannerHeight)); + loadJavascript(String.format("setOskWidth(%d)", newConfig.screenWidthDp)); + loadJavascript("setOskHeight(0)"); if (dismissHelpBubble()) { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { - loadUrl("javascript:showHelpBubble()"); + loadJavascript("showHelpBubble()"); } }, 2000); } @@ -253,6 +328,15 @@ final class KMKeyboard extends WebView { } } + public void dismissSuggestionMenuWindow() { + try { + if (suggestionMenuWindow != null && suggestionMenuWindow.isShowing()) { + suggestionMenuWindow.dismiss(); + } + } catch (Exception e) { + } + } + public static String currentKeyboard() { return currentKeyboard; } @@ -350,9 +434,9 @@ final class KMKeyboard extends WebView { keyboardName = keyboardName.replaceAll("\'", "\\\\'"); // Double-escaped-backslash b/c regex. languageName = languageName.replaceAll("\'", "\\\\'"); - String jsFormat = "javascript:setKeymanLanguage('%s','%s','%s','%s','%s', %s, %s, '%s')"; + String jsFormat = "setKeymanLanguage('%s','%s','%s','%s','%s', %s, %s, '%s')"; String jsString = String.format(jsFormat, keyboardName, keyboardID, languageName, languageID, keyboardPath, tFont, oFont, packageID); - loadUrl(jsString); + loadJavascript(jsString); this.packageID = packageID; this.keyboardID = keyboardID; @@ -366,7 +450,7 @@ final class KMKeyboard extends WebView { handler.postDelayed(new Runnable() { @Override public void run() { - loadUrl("javascript:showHelpBubble()"); + loadJavascript("showHelpBubble()"); } }, 2000); } @@ -451,9 +535,9 @@ final class KMKeyboard extends WebView { keyboardName = keyboardName.replaceAll("\'", "\\\\'"); // Double-escaped-backslash b/c regex. languageName = languageName.replaceAll("\'", "\\\\'"); - String jsFormat = "javascript:setKeymanLanguage('%s','%s','%s','%s','%s', %s, %s, '%s')"; + String jsFormat = "setKeymanLanguage('%s','%s','%s','%s','%s', %s, %s, '%s')"; String jsString = String.format(jsFormat, keyboardName, keyboardID, languageName, languageID, keyboardPath, tFont, oFont, packageID); - loadUrl(jsString); + loadJavascript(jsString); this.packageID = packageID; this.keyboardID = keyboardID; @@ -467,7 +551,7 @@ final class KMKeyboard extends WebView { handler.postDelayed(new Runnable() { @Override public void run() { - loadUrl("javascript:showHelpBubble()"); + loadJavascript("showHelpBubble()"); } }, 2000); } @@ -596,6 +680,100 @@ final class KMKeyboard extends WebView { } @SuppressLint("InflateParams") + private void showSuggestionLongpress(Context context) { + if(suggestionJSON == null || suggestionMenuWindow != null) { + return; + } + + // Construct from resources. + LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View contentView = inflater.inflate(R.layout.predictive_submenu, null, false); + + suggestionMenuWindow = new PopupWindow(contentView, 300, 120, false); + suggestionMenuWindow.setFocusable(false); + suggestionMenuWindow.setContentView(contentView); + + Button rotateSuggestions = contentView.findViewById(R.id.rotateSuggestionBtn); + rotateSuggestions.setClickable(false); + + // Compute the actual display position (offset coordinate by actual screen pos of kbd) + WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); + DisplayMetrics metrics = new DisplayMetrics(); + wm.getDefaultDisplay().getMetrics(metrics); + float density = metrics.density; + + int posX, posY; + if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) { + int[] kbPos = new int[2]; + KMKeyboard.this.getLocationOnScreen(kbPos); + posX = (int) (this.suggestionWindowPos[0] * density); + posY = kbPos[1] + (int) (this.suggestionWindowPos[1] * density); + } else { + int[] kbPos = new int[2]; + KMKeyboard.this.getLocationInWindow(kbPos); + posX = (int) (this.suggestionWindowPos[0] * density); + posY = kbPos[1] + (int) (this.suggestionWindowPos[1] * density); + } + + suggestionMenuWindow.setTouchable(true); + suggestionMenuWindow.setTouchInterceptor(new View.OnTouchListener() { + @SuppressLint("ClickableViewAccessibility") + @Override + public boolean onTouch(View v, MotionEvent event) { + int action = event.getAction(); + int tx = (int) event.getRawX(); + int ty = (int) event.getRawY(); + + if (action == MotionEvent.ACTION_UP) { +// int count = ((ViewGroup) v).getChildCount(); +// for (int i = 0; i < count; i++) { +// FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i); +// Button button = (Button) frame.getChildAt(0); +// if (button.isPressed()) { +// button.performClick(); +// break; +// } +// } + dismissSuggestionMenuWindow(); + } else if (action == MotionEvent.ACTION_MOVE) { +// int count = ((ViewGroup) v).getChildCount(); +// for (int i = 0; i < count; i++) { +// FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i); +// Button button = (Button) frame.getChildAt(0); +// int[] pos = new int[2]; +// button.getLocationOnScreen(pos); +// Rect rect = new Rect(); +// button.getDrawingRect(rect); +// rect.offset(pos[0], pos[1]); +// if (rect.contains(tx, ty)) { +// button.setPressed(true); +// } else { +// button.setPressed(false); +// } +// } + } + return false; + } + }); + + suggestionMenuWindow.setOnDismissListener(new OnDismissListener() { + @Override + public void onDismiss() { + suggestionJSON = null; + suggestionMenuWindow = null; + String jsString = "popupVisible(0)"; + loadJavascript(jsString); + } + }); + + suggestionMenuWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX , posY); + String jsString = "popupVisible(1)"; + loadJavascript(jsString); + + return; + } + + @SuppressLint({"InflateParams", "ClickableViewAccessibility"}) private void showSubKeys(Context context) { if (subKeysList == null || subKeysWindow != null) { return; @@ -610,6 +788,7 @@ final class KMKeyboard extends WebView { int x = (int) (Float.valueOf(pos[0]) * density); int y = (int) (Float.valueOf(pos[1]) * density); + // Calculate desired size for subkey display, # of rows/cols, etc. int kbWidth = getWidth(); float pvWidth, pvHeight; @@ -647,8 +826,11 @@ final class KMKeyboard extends WebView { pvHeight = (rows * (buttonHeight + padding)) + 2 * margin + padding + arrowHeight; } + // Construct from resources. LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View contentView = inflater.inflate(R.layout.subkeys_popup_layout, null, false); + + // Configure the popover view with desired size and construct its popup "arrow." KMPopoverView popoverView = (KMPopoverView) contentView.findViewById(R.id.kmPopoverView); popoverView.setSize((int) pvWidth, (int) pvHeight); popoverView.setArrowSize(arrowWidth, arrowHeight); @@ -671,6 +853,7 @@ final class KMKeyboard extends WebView { popoverView.redraw(); + // Add needed subkeys to the popup view. GridLayout grid = (GridLayout) contentView.findViewById(R.id.grid); grid.setColumnCount(columns); @@ -678,15 +861,19 @@ final class KMKeyboard extends WebView { Button button = (Button) inflater.inflate(R.layout.subkey_layout, null); button.setId(i + 1); button.setLayoutParams(new FrameLayout.LayoutParams((int) buttonWidth, (int) buttonHeight)); + // May as well set them here, keeping them in a closure than a prone-to-change field. + // Helps keep things from totally breaking when the event handler triggering subkey menu + // generation and the menu's event handler stop talking to each other. + final ArrayList> subkeyList = subKeysList; button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { int index = v.getId() - 1; - String keyId = subKeysList.get(index).get("keyId"); - String keyText = getSubkeyText(keyId, subKeysList.get(index).get("keyText")); - String jsFormat = "javascript:executePopupKey('%s','%s')"; + String keyId = subkeyList.get(index).get("keyId"); + String keyText = getSubkeyText(keyId, subkeyList.get(index).get("keyText")); + String jsFormat = "executePopupKey('%s','%s')"; String jsString = String.format(jsFormat, keyId, keyText); - loadUrl(jsString); + loadJavascript(jsString); } }); button.setClickable(false); @@ -736,6 +923,7 @@ final class KMKeyboard extends WebView { } } dismissSubKeysWindow(); + return true; } else if (action == MotionEvent.ACTION_MOVE) { int count = ((ViewGroup) v).getChildCount(); for (int i = 0; i < count; i++) { @@ -752,11 +940,17 @@ final class KMKeyboard extends WebView { button.setPressed(false); } } + return true; + } else if (action == MotionEvent.ACTION_DOWN) { + // Must return true if we want the others to properly process if and when this handler + // becomes decoupled from the keyboard's touch handler. + return true; } return false; } }); + // Now to finalize the actual window. subKeysWindow = new PopupWindow(contentView, (int) pvWidth, (int) pvHeight, false); subKeysWindow.setTouchable(true); subKeysWindow.setOnDismissListener(new OnDismissListener() { @@ -764,8 +958,8 @@ final class KMKeyboard extends WebView { public void onDismiss() { subKeysList = null; subKeysWindow = null; - String jsString = "javascript:popupVisible(0)"; - loadUrl(jsString); + String jsString = "popupVisible(0)"; + loadJavascript(jsString); } }); @@ -785,9 +979,11 @@ final class KMKeyboard extends WebView { dismissHelpBubble(); dismissKeyPreview(0); //subKeysWindow.setAnimationStyle(R.style.PopupAnim); + + // And now to actually display it. subKeysWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX, posY); - String jsString = "javascript:popupVisible(1)"; - loadUrl(jsString); + String jsString = "popupVisible(1)"; + loadJavascript(jsString); } // Attempt to get the subkey text. diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardDownloaderActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardDownloaderActivity.java index d4f86f83c7f19184a1f818dc5ec330f61061c77f..766557ce890e770a09ad7addcfa463968a92631a 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardDownloaderActivity.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardDownloaderActivity.java @@ -23,6 +23,8 @@ import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor; import com.tavultesoft.kmea.packages.PackageProcessor; import com.tavultesoft.kmea.util.FileUtils; +import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DOWNLOAD_KEYBOARD; +import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DOWNLOAD_MODEL; import static com.tavultesoft.kmea.KMManager.KMDefault_UndefinedPackageID; public class KMKeyboardDownloaderActivity extends AppCompatActivity { @@ -34,6 +36,10 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { public static final String ARG_KB_NAME = "KMKeyboardActivity.kbName"; public static final String ARG_LANG_NAME = "KMKeyboardActivity.langName"; public static final String ARG_IS_CUSTOM = "KMKeyboardActivity.isCustom"; + public static final String ARG_MODEL_ID = "KMKeyboardActivity.modelID"; + public static final String ARG_MODEL_NAME = "KMKeyboardActivity.modelName"; + public static final String ARG_MODEL_URL = "KMKeyboardActivity.modelURL"; + public static final String ARG_MODEL_CUSTOM_HELP_LINK = "KMKeyboardActivity.customHelpLink"; // custom keyboard public static final String ARG_KEYBOARD = "KMKeyboardActivity.keyboard"; @@ -63,9 +69,12 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { private static String pkgID; private static String kbID; private static String langID; + private static String modelID; + private static String modelName; private static String kbName; private static String langName; private static Boolean isCustom; + private static Boolean downloadOnlyLexicalModel; private static String customKeyboard; private static String customLanguage; @@ -85,19 +94,32 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { if (pkgID == null || pkgID.isEmpty()) { pkgID = KMManager.KMDefault_UndefinedPackageID; } - kbID = bundle.getString(ARG_KB_ID); langID = bundle.getString(ARG_LANG_ID); - kbName = bundle.getString(ARG_KB_NAME); langName = bundle.getString(ARG_LANG_NAME); - isCustom = bundle.getBoolean(ARG_IS_CUSTOM); - // URL parameters for custom keyboard (if they exist) - customKeyboard = bundle.getString(ARG_KEYBOARD); - customLanguage = bundle.getString(ARG_LANGUAGE); - url = bundle.getString(ARG_URL); - filename = bundle.getString(ARG_FILENAME); - if (filename == null || filename.isEmpty()) { - filename = "unknown"; + downloadOnlyLexicalModel = bundle.containsKey(ARG_MODEL_URL) && + bundle.getString(ARG_MODEL_URL) != null && + !bundle.getString(ARG_MODEL_URL).isEmpty(); + + if (downloadOnlyLexicalModel) { + modelID = bundle.getString(ARG_MODEL_ID); + modelName = bundle.getString(ARG_MODEL_NAME); + isCustom = false; + url = bundle.getString(ARG_MODEL_URL); + } else { + + kbID = bundle.getString(ARG_KB_ID); + kbName = bundle.getString(ARG_KB_NAME); + isCustom = bundle.getBoolean(ARG_IS_CUSTOM); + + // URL parameters for custom keyboard (if they exist) + customKeyboard = bundle.getString(ARG_KEYBOARD); + customLanguage = bundle.getString(ARG_LANGUAGE); + url = bundle.getString(ARG_URL); + filename = bundle.getString(ARG_FILENAME); + if (filename == null || filename.isEmpty()) { + filename = "unknown"; + } } } else { return; @@ -123,7 +145,16 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { title = String.format("%s: %s", langName, kbName); } - DialogFragment dialog = ConfirmDialogFragment.newInstance(title, getString(R.string.confirm_download)); + DialogFragment dialog; + if (downloadOnlyLexicalModel) { + title = String.format("%s: %s", langName, modelName); + dialog = ConfirmDialogFragment.newInstance( + DIALOG_TYPE_DOWNLOAD_MODEL, title, getString(R.string.confirm_download_model)); + } else { + dialog = ConfirmDialogFragment.newInstance( + DIALOG_TYPE_DOWNLOAD_KEYBOARD, title, getString(R.string.confirm_download_keyboard)); + } + dialog.show(getFragmentManager(), "dialog"); } @@ -131,7 +162,21 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { * Used by the download method to handle asynchronous downloading and evaluation of * packages and keyboards. */ - static class DownloadTask extends AsyncTask { + static class DownloadTask extends AsyncTask { + static class Result { + public final Integer kbdResult; + public final List> installedLexicalModels; + + public Result(Integer i) { + this(i, null); + } + + public Result(Integer i, List> installedLexicalModels) { + this.kbdResult = i; + this.installedLexicalModels = installedLexicalModels; + } + } + private ProgressDialog progressDialog; private String kbVersion = "1.0"; private String kbIsCustom = isCustom ? "Y" : "N"; @@ -140,10 +185,18 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { private Context context; private boolean showProgressDialog; + private boolean downloadOnlyLexicalModel; public DownloadTask(Context context, boolean showProgressDialog) { this.context = context; this.showProgressDialog = showProgressDialog; + this.downloadOnlyLexicalModel = false; + } + + public DownloadTask(Context context, boolean showProgressDialog, boolean downloadOnlyLexicalModel) { + this.context = context; + this.showProgressDialog = showProgressDialog; + this.downloadOnlyLexicalModel = downloadOnlyLexicalModel; } @Override @@ -151,7 +204,11 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { super.onPreExecute(); if (showProgressDialog) { progressDialog = new ProgressDialog(context); - progressDialog.setMessage(context.getString(R.string.downloading_keyboard)); + if (!downloadOnlyLexicalModel) { + progressDialog.setMessage(context.getString(R.string.downloading_keyboard)); + } else { + progressDialog.setMessage(context.getString(R.string.downloading_model)); + } progressDialog.setCancelable(false); if (!((AppCompatActivity) context).isFinishing()) { progressDialog.show(); @@ -163,13 +220,18 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { } @Override - protected Integer doInBackground(Void... voids) { + protected Result doInBackground(Void... voids) { int ret = -1; if (isCancelled()) - return ret; + return new Result(-1); try { + + if (downloadOnlyLexicalModel) { + return downloadKMPLexicalModel(); + } + String exceptionStr = "Invalid keyboard"; if (pkgID == null || pkgID.trim().isEmpty() || (!isCustom && (langID == null || langID.trim().isEmpty() || kbID == null || kbID.trim().isEmpty()))) { @@ -188,18 +250,19 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { remoteUrl = url; } else { // Keyman cloud - remoteUrl = String.format("%s/%s/%s?version=%s&device=%s&languageidtype=bcp47", kKeymanApiBaseURL, langID, kbID, BuildConfig.VERSION_NAME, deviceType); + remoteUrl = String.format("%s/%s/%s?version=%s&device=%s&languageidtype=bcp47", + kKeymanApiBaseURL, langID, kbID, BuildConfig.VERSION_NAME, deviceType); remoteLexicalModelUrl = String.format("%s?q=bcp47:%s", kKeymanApiModelURL, langID); } - ret = downloadNonKMPKeyboard(remoteUrl, remoteLexicalModelUrl); + return downloadNonKMPKeyboard(remoteUrl, remoteLexicalModelUrl); } catch (Exception e) { ret = -1; - Log.e(TAG, "Error: " + e); + Log.e(TAG, "Error: " + e, e); } - return ret; + return new Result(ret); } @Override @@ -208,7 +271,7 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { } @Override - protected void onPostExecute(Integer result) { + protected void onPostExecute(Result result) { try { if (progressDialog != null && progressDialog.isShowing()) { progressDialog.dismiss(); @@ -219,7 +282,46 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { } ((AppCompatActivity) context).finish(); - notifyListeners(KeyboardEventHandler.EventType.KEYBOARD_DOWNLOAD_FINISHED, result); + + if (!downloadOnlyLexicalModel) { + notifyListeners(KeyboardEventHandler.EventType.KEYBOARD_DOWNLOAD_FINISHED, result.kbdResult); + } + + if(result.installedLexicalModels != null) { + notifyLexicalModelInstallListeners(KeyboardEventHandler.EventType.LEXICAL_MODEL_INSTALLED, + result.installedLexicalModels, 1); + } + } + + /** + * Download a KMP Keyman lexical model from Keyman cloud + * @return A Result object with a success code and any successfully downloaded lexical models. + * @throws Exception + */ + protected Result downloadKMPLexicalModel() throws Exception { + int result = -1; + File resourceRoot = new File(context.getDir("data", Context.MODE_PRIVATE).toString() + File.separator); + LexicalModelPackageProcessor kmpProcessor = new LexicalModelPackageProcessor(resourceRoot); + List> installedLexicalModels = null; + + if (downloadOnlyLexicalModel) { + String destination = (context.getCacheDir() + File.separator).toString(); + filename = FileUtils.getFilename(url); + + result = FileUtils.download(context, url, destination, filename); + if (result > 0 && FileUtils.hasKeymanPackageExtension(url)) { + // Extract the kmp. Validate it contains only lexical models, and then process the lexical model package + File kmpFile = new File(context.getCacheDir(), filename); + String pkgTarget = kmpProcessor.getPackageTarget(kmpFile); + if (pkgTarget.equals(PackageProcessor.PP_TARGET_LEXICAL_MODELS)) { + File unzipPath = kmpProcessor.unzipKMP(kmpFile); + installedLexicalModels = kmpProcessor.processKMP(kmpFile, unzipPath, PackageProcessor.PP_LEXICAL_MODELS_KEY); + } + } + } + + // We'll notify any listeners of the successful download in onPostExecute. + return new Result(result, installedLexicalModels); } /** @@ -230,7 +332,7 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { * @return ret int -1 for fail; >0 for success; 2 for keyboard downloading but not font * @throws Exception */ - protected int downloadNonKMPKeyboard(String remoteUrl, String remoteLexicalModelUrl) throws Exception { + protected Result downloadNonKMPKeyboard(String remoteUrl, String remoteLexicalModelUrl) throws Exception { int ret = -1; JSONParser jsonParser = new JSONParser(); JSONObject kbData = jsonParser.getJSONObjectFromUrl(remoteUrl); @@ -323,6 +425,7 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { try { JSONObject modelInfo = lmData.getJSONObject(0); if (modelInfo.has("packageFilename")) { + // TODO: Confirm if user wants to overwrite exisiting model version urls.add(modelInfo.getString("packageFilename")); } } catch (JSONException e) { @@ -339,6 +442,7 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { int result = 0; File resourceRoot = new File(context.getDir("data", Context.MODE_PRIVATE).toString() + File.separator); LexicalModelPackageProcessor kmpProcessor = new LexicalModelPackageProcessor(resourceRoot); + List> installedLexicalModels = new ArrayList<>(); for (String url : urls) { String filename = ""; if (FileUtils.hasJavaScriptExtension(url)) { @@ -367,17 +471,11 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { String pkgTarget = kmpProcessor.getPackageTarget(kmpFile); if (pkgTarget.equals(PackageProcessor.PP_TARGET_LEXICAL_MODELS)) { File unzipPath = kmpProcessor.unzipKMP(kmpFile); - List> installedLexicalModels = - kmpProcessor.processKMP(kmpFile, unzipPath, PackageProcessor.PP_LEXICAL_MODELS_KEY); - - boolean success = installedLexicalModels.size() != 0; - if (success) { - notifyLexicalModelInstallListeners(KeyboardEventHandler.EventType.LEXICAL_MODEL_INSTALLED, - installedLexicalModels, 1); - } + // Assumption: only one lexical model KMP will occur per download. + installedLexicalModels = kmpProcessor.processKMP(kmpFile, unzipPath, PackageProcessor.PP_LEXICAL_MODELS_KEY); } - } + if (result < 0) { if (FileUtils.hasFontExtension(url)) { // Propagate warning about font failing to download @@ -389,7 +487,12 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { } } - return ret; + if (installedLexicalModels.size() != 0) { + // Let the postExecute method signal the listeners - it's triggered on the main thread. + return new Result(ret, installedLexicalModels); + } + + return new Result(ret); } /** @@ -437,6 +540,11 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity { new DownloadTask(context, showProgressDialog).execute(); } + public static void download(final Context context, final boolean showProgressDialog, + final boolean donwloadOnlyLexicalModel) { + new DownloadTask(context, showProgressDialog, downloadOnlyLexicalModel).execute(); + } + public static boolean isCustom(String u) { boolean ret = false; if (u != null && !u.contains(KMKeyboardDownloaderActivity.kKeymanApiBaseURL) && diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardJSHandler.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardJSHandler.java index d766105f9fd623e3bb94f1448266d450fb6334a2..a7f0bc902d7cc4b64be437341b7d885b4a257471 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardJSHandler.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardJSHandler.java @@ -5,7 +5,9 @@ import android.os.Build; import android.os.VibrationEffect; import android.os.Vibrator; import android.util.DisplayMetrics; +import android.util.Log; import android.webkit.JavascriptInterface; +import android.widget.RelativeLayout; import static android.content.Context.VIBRATOR_SERVICE; @@ -13,6 +15,7 @@ public abstract class KMKeyboardJSHandler { private Context context; private KMKeyboard k = null; private static int KM_VIBRATE_DURATION = 100; // milliseconds + private static String TAG = "KMKeyboardJSHandler"; KMKeyboardJSHandler(Context context, KMKeyboard k) { this.context = context; @@ -25,10 +28,17 @@ public abstract class KMKeyboardJSHandler { return context.getResources().getString(R.string.device_type); } + // This annotation is required in Jelly Bean and later: + @JavascriptInterface + public int getDefaultBannerHeight() { + return (int) context.getResources().getDimension(R.dimen.banner_height); + } + + // Get the keyboard height // This annotation is required in Jelly Bean and later: @JavascriptInterface public int getKeyboardHeight() { - int kbHeight = context.getResources().getDimensionPixelSize(R.dimen.keyboard_height); + int kbHeight = KMManager.getKeyboardHeight(context); kbHeight -= kbHeight % 20; return kbHeight; } @@ -66,7 +76,12 @@ public abstract class KMKeyboardJSHandler { @JavascriptInterface public abstract boolean dispatchKey(final int code, final int eventModifiers); - // Insert the selected string s + /** + * Inserts the selected string s + * @param dn Number of pre-caret code points (UTF+8 characters) to delete + * @param s Text to insert + * @param dr Number of post-caret code points to delete. + */ @JavascriptInterface - public abstract void insertText(final int dn, final String s); + public abstract void insertText(final int dn, final String s, final int dr); } diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardPickerAdapter.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardPickerAdapter.java index e71b6776ade67aeb0ac2fa08b1f85a1f23c9e74e..628e4ef96636fff0d0ff44f75a4196f5a7124266 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardPickerAdapter.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboardPickerAdapter.java @@ -5,72 +5,90 @@ package com.tavultesoft.kmea; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.HashMap; import android.content.Context; import android.content.Intent; import android.graphics.Typeface; -import android.util.Log; +import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageButton; -import android.widget.SimpleAdapter; import android.widget.TextView; -final class KMKeyboardPickerAdapter extends SimpleAdapter implements OnClickListener { +import com.tavultesoft.kmea.data.Dataset; +import com.tavultesoft.kmea.data.Keyboard; +import com.tavultesoft.kmea.data.adapters.AdapterFilter; +import com.tavultesoft.kmea.data.adapters.NestedAdapter; + +final class KMKeyboardPickerAdapter extends NestedAdapter implements OnClickListener { + private final static int KEYBOARD_LAYOUT_RESOURCE = R.layout.list_row_layout3; + + private static class ViewHolder { + TextView textLang; + TextView textKbd; + ImageButton imgDetails; + } - private Context context; - private List> data; - private ArrayList> keyboardsList = null; protected Typeface listFont; - public KMKeyboardPickerAdapter(Context context, List> data, int resource, String[] from, int[] to) { - super(context, data, resource, from, to); - this.context = context; - this.data = data; + public KMKeyboardPickerAdapter(final Context context, Dataset.Keyboards adapter) { + // TODO: (13.0) Swap the inline AdapterFilter definition out for Dataset.keyboardPickerSorter + // once KeyboardPickerActivity is sufficiently refactored. (All references to keyboardList + // should instead refer to this adapter.) + super(context, KEYBOARD_LAYOUT_RESOURCE, adapter, new AdapterFilter() { + + // Yeah, so this is a MASSIVE hack. Right now, it's either this or refactor up to 60 + // separate references to keyboardList within KeyboardPickerActivity. Yikes. + public List selectFrom(Dataset.Keyboards adapter, Void dummy) { + List> kbdMapList = KeyboardPickerActivity.getKeyboardsList(context); + List kbdList = new ArrayList<>(kbdMapList.size()); + + for(HashMap kbdMap: kbdMapList) { + kbdList.add(new Keyboard(kbdMap)); + } + + return kbdList; + } + }, null); } @Override public View getView(int position, View convertView, ViewGroup parent) { - View view = super.getView(position, convertView, parent); - - if (keyboardsList == null || keyboardsList.size() != data.size()) { - keyboardsList = new ArrayList>(); - int length = data.size(); - for (int i = 0; i < length; i++) { - HashMap kbInfo = new HashMap(); - kbInfo.put(KMManager.KMKey_PackageID, data.get(i).get(KMManager.KMKey_PackageID).toString()); - kbInfo.put(KMManager.KMKey_KeyboardID, data.get(i).get(KMManager.KMKey_KeyboardID).toString()); - kbInfo.put(KMManager.KMKey_LanguageID, data.get(i).get(KMManager.KMKey_LanguageID).toString()); - kbInfo.put(KMManager.KMKey_KeyboardName, data.get(i).get(KMManager.KMKey_KeyboardName).toString()); - kbInfo.put(KMManager.KMKey_KeyboardVersion, data.get(i).get(KMManager.KMKey_KeyboardVersion).toString()); - String isCustom = "N"; - if (data.get(i).get(KMManager.KMKey_CustomKeyboard) != null) - isCustom = data.get(i).get(KMManager.KMKey_CustomKeyboard).toString(); - kbInfo.put(KMManager.KMKey_CustomKeyboard, isCustom); - if (data.get(i).get(KMManager.KMKey_CustomHelpLink) != null) - kbInfo.put(KMManager.KMKey_CustomHelpLink, data.get(i).get(KMManager.KMKey_CustomHelpLink).toString()); - keyboardsList.add(kbInfo); - } + Keyboard kbd = getItem(position); + ViewHolder holder; + + // If we're being told to reuse an existing view, do that. It's automatic optimization. + if(convertView == null) { + convertView = LayoutInflater.from(getContext()).inflate(KEYBOARD_LAYOUT_RESOURCE, parent, false); + holder = new ViewHolder(); + + holder.textLang = convertView.findViewById(R.id.text1); + holder.textKbd = convertView.findViewById(R.id.text2); + holder.imgDetails = convertView.findViewById(R.id.imageButton1); + convertView.setTag(holder); + } else { + holder = (ViewHolder) convertView.getTag(); } - TextView text1 = (TextView) view.findViewById(R.id.text1); - TextView text2 = (TextView) view.findViewById(R.id.text2); + holder.textLang.setText(kbd.map.get(KMManager.KMKey_LanguageName)); + holder.textKbd.setText(kbd.map.get(KMManager.KMKey_KeyboardName)); + if (listFont != null) { - text1.setTypeface(listFont, Typeface.BOLD); - text2.setTypeface(listFont, Typeface.NORMAL); + holder.textLang.setTypeface(listFont, Typeface.BOLD); + holder.textKbd.setTypeface(listFont, Typeface.NORMAL); } - if (text2.getText().toString().equals(text1.getText().toString())) - text2.setVisibility(View.INVISIBLE); + if (holder.textKbd.getText().toString().equals(holder.textLang.getText().toString())) { + holder.textKbd.setVisibility(View.INVISIBLE); + } - ImageButton imgButton = (ImageButton) view.findViewById(R.id.imageButton1); - imgButton.setTag(keyboardsList.get(position)); - imgButton.setOnClickListener(this); - return view; + holder.imgDetails.setTag(kbd); + holder.imgDetails.setOnClickListener(this); + return convertView; } @Override @@ -81,8 +99,8 @@ final class KMKeyboardPickerAdapter extends SimpleAdapter implements OnClickList @Override public void onClick(View v) { @SuppressWarnings("unchecked") - HashMap kbInfo = (HashMap) v.getTag(); - Intent i = new Intent(context, KeyboardInfoActivity.class); + Map kbInfo = ((Keyboard) v.getTag()).map; + Intent i = new Intent(this.getContext(), KeyboardInfoActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); String packageID = kbInfo.get(KMManager.KMKey_PackageID); String keyboardID = kbInfo.get(KMManager.KMKey_KeyboardID); @@ -93,13 +111,21 @@ final class KMKeyboardPickerAdapter extends SimpleAdapter implements OnClickList i.putExtra(KMManager.KMKey_KeyboardID, keyboardID); i.putExtra(KMManager.KMKey_LanguageID, kbInfo.get(KMManager.KMKey_LanguageID)); i.putExtra(KMManager.KMKey_KeyboardName, kbInfo.get(KMManager.KMKey_KeyboardName)); - i.putExtra(KMManager.KMKey_KeyboardVersion, KMManager.getLatestKeyboardFileVersion(context, packageID, keyboardID)); - boolean isCustom = kbInfo.get(KMManager.KMKey_CustomKeyboard).equals("Y") ? true : false; + String keyboardVersion = KMManager.getLatestKeyboardFileVersion(this.getContext(), packageID, keyboardID); + i.putExtra(KMManager.KMKey_KeyboardVersion, keyboardVersion); + boolean isCustom = false; + if (kbInfo.get(KMManager.KMKey_CustomKeyboard) != null || kbInfo.containsKey(KMManager.KMKey_CustomKeyboard)) { + isCustom = kbInfo.get(KMManager.KMKey_CustomKeyboard).equals("Y") ? true : false; + } i.putExtra(KMManager.KMKey_CustomKeyboard, isCustom); String customHelpLink = kbInfo.get(KMManager.KMKey_CustomHelpLink); - if (customHelpLink != null) + if (customHelpLink != null) { i.putExtra(KMManager.KMKey_CustomHelpLink, customHelpLink); + } else { + i.putExtra(KMManager.KMKey_HelpLink, + String.format("https://help.keyman.com/keyboard/%s/%s/", keyboardID, keyboardVersion)); + } KeyboardInfoActivity.titleFont = listFont; - context.startActivity(i); + this.getContext().startActivity(i); } } diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMListAdapter.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMListAdapter.java deleted file mode 100644 index f9526234771a6a8a3249c3952e4532bafe893ae3..0000000000000000000000000000000000000000 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMListAdapter.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (C) 2017 SIL International. All rights reserved. - */ - -package com.tavultesoft.kmea; - -import java.util.List; -import java.util.Map; - -import android.content.Context; -import android.view.View; -import android.view.ViewGroup; -import android.widget.SimpleAdapter; - -final class KMListAdapter extends SimpleAdapter { - - private boolean[] enabled; - - public KMListAdapter(Context context, List> data, int resource, String[] from, int[] to) { - super(context, data, resource, from, to); - int length = data.size(); - enabled = new boolean[length]; - for (int i = 0; i < length; i++) { - String value = data.get(i).get("isEnabled").toString(); - enabled[i] = value.equals("true"); - } - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - View view = super.getView(position, convertView, parent); - if (enabled[position]) { - view.setAlpha(1.0f); - } else { - view.setAlpha(0.25f); - } - - return view; - } - - @Override - public boolean areAllItemsEnabled() { - return true; - } - - @Override - public boolean isEnabled(int position) { - return enabled[position]; - } -} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java index 6b1bb0c7e56af9e05b6e1c64e3c7bcc3ed11f767..0814fcbcd4d9d75f63fd801cefb5d1e49486147a 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMManager.java @@ -14,6 +14,7 @@ import java.util.HashMap; import android.annotation.SuppressLint; import android.app.Dialog; +import android.app.KeyguardManager; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -23,8 +24,10 @@ import android.graphics.Bitmap; import android.graphics.RectF; import android.graphics.Typeface; import android.inputmethodservice.InputMethodService; +import android.inputmethodservice.Keyboard; import android.net.ConnectivityManager; import android.net.NetworkInfo; +import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Handler; @@ -50,7 +53,9 @@ import android.widget.RelativeLayout; import com.google.firebase.analytics.FirebaseAnalytics; import com.tavultesoft.kmea.KMKeyboardJSHandler; import com.tavultesoft.kmea.KeyboardEventHandler.EventType; +import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardEventListener; +import com.tavultesoft.kmea.data.Dataset; import com.tavultesoft.kmea.packages.JSONUtils; import com.tavultesoft.kmea.packages.LexicalModelPackageProcessor; import com.tavultesoft.kmea.packages.PackageProcessor; @@ -85,16 +90,23 @@ public final class KMManager { // Globe key actions public enum GlobeKeyAction { GLOBE_KEY_ACTION_SHOW_MENU, - GLOBE_KEY_ACTION_SWITCH_TO_NEXT_KEYBOARD, + GLOBE_KEY_ACTION_SWITCH_TO_NEXT_KEYBOARD, // Switch to next Keyman keyboard + GLOBE_KEY_ACTION_ADVANCE_TO_NEXT_SYSTEM_KEYBOARD, // Advance to next system keyboard GLOBE_KEY_ACTION_DO_NOTHING, } + public enum FormFactor { + PHONE, + TABLET; + } + private static InputMethodService IMService; private static boolean debugMode = false; private static boolean shouldAllowSetKeyboard = true; private static boolean didCopyAssets = false; private static GlobeKeyAction inappKbGlobeKeyAction = GlobeKeyAction.GLOBE_KEY_ACTION_SHOW_MENU; private static GlobeKeyAction sysKbGlobeKeyAction = GlobeKeyAction.GLOBE_KEY_ACTION_SHOW_MENU; + private static int sysKbIndexOnLockScreen = -1; protected static boolean InAppKeyboardLoaded = false; protected static boolean SystemKeyboardLoaded = false; @@ -104,6 +116,8 @@ public final class KMManager { protected static boolean SystemKeyboardShouldIgnoreSelectionChange = false; protected static KMKeyboard InAppKeyboard = null; protected static KMKeyboard SystemKeyboard = null; + protected static HashMap currentLexicalModel = null; + protected static String currentBanner = "blank"; // Keyman public keys public static final String KMKey_ID = "id"; @@ -111,6 +125,9 @@ public final class KMManager { public static final String KMKey_PackageID = "packageId"; public static final String KMKey_LanguageID = "langId"; public static final String KMKey_LanguageName = "langName"; + public static final String KMKey_KeyboardCount = "kbCount"; + public static final String KMKey_HelpLink = "helpLink"; + public static final String KMKey_Icon = "icon"; public static final String KMKey_KeyboardID = "kbId"; public static final String KMKey_KeyboardName = "kbName"; public static final String KMKey_KeyboardVersion = "version"; @@ -122,12 +139,14 @@ public final class KMManager { public static final String KMKey_KeyboardModified = "lastModified"; public static final String KMKey_KeyboardRTL = "rtl"; public static final String KMKey_CustomKeyboard = "CustomKeyboard"; + public static final String KMKey_CustomModel = "CustomModel"; public static final String KMKey_CustomHelpLink = "CustomHelpLink"; public static final String KMKey_UserKeyboardIndex = "UserKeyboardIndex"; public static final String KMKey_DisplayKeyboardSwitcher = "DisplayKeyboardSwitcher"; public static final String KMKey_LexicalModelID = "lmId"; public static final String KMKey_LexicalModelName = "lmName"; public static final String KMKey_LexicalModelVersion = "lmVersion"; + public static final String KMKey_LexicalModelPackageFilename = "kmpPackageFilename"; // Keyman internal keys protected static final String KMKey_ShouldShowHelpBubble = "ShouldShowHelpBubble"; @@ -149,9 +168,15 @@ public final class KMManager { public static final String KMDefault_LanguageName = "English"; public static final String KMDefault_KeyboardFont = "{\"family\":\"LatinWeb\",\"source\":[\"DejaVuSans.ttf\"]}"; + // Default Dictionary Info + public static final String KMDefault_DictionaryPackageID = "nrc.en.mtnt"; + public static final String KMDefault_DictionaryModelID = "nrc.en.mtnt"; + public static final String KMDefault_DictionaryKMP = KMDefault_DictionaryPackageID + FileUtils.MODELPACKAGE; + // Keyman files protected static final String KMFilename_KeyboardHtml = "keyboard.html"; protected static final String KMFilename_JSEngine = "keyman.js"; + protected static final String KMFilename_JSEngine_Sourcemap = "keyman.js.map"; protected static final String KMFilename_KmwCss = "kmwosk.css"; protected static final String KMFilename_Osk_Ttf_Font = "keymanweb-osk.ttf"; protected static final String KMFilename_Osk_Woff_Font = "keymanweb-osk.woff"; @@ -160,22 +185,26 @@ public final class KMManager { private static Context appContext; - protected static String getResourceRoot() { + public static String getResourceRoot() { return appContext.getDir("data", Context.MODE_PRIVATE).toString() + File.separator; } - protected static String getPackagesDir() { + public static String getPackagesDir() { return getResourceRoot() + KMDefault_AssetPackages + File.separator; } - protected static String getLexicalModelsDir() { + public static String getLexicalModelsDir() { return getResourceRoot() + KMDefault_LexicalModelPackages + File.separator; } - protected static String getCloudDir() { + public static String getCloudDir() { return getResourceRoot() + KMDefault_UndefinedPackageID + File.separator; } + public static String getVersion() { + return com.tavultesoft.kmea.BuildConfig.VERSION_NAME; + } + // Check if a keyboard namespace is reserved public static boolean isReservedNamespace(String packageID) { if (packageID.equals(KMDefault_UndefinedPackageID)) { @@ -234,12 +263,24 @@ public final class KMManager { return false; } + /** + * Adjust the keyboard dimensions. If the suggestion banner is active, use the + * combined banner height and keyboard height + * @return RelativeLayout.LayoutParams + */ + private static RelativeLayout.LayoutParams getKeyboardLayoutParams() { + int bannerHeight = getBannerHeight(appContext); + int kbHeight = getKeyboardHeight(appContext); + RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( + RelativeLayout.LayoutParams.MATCH_PARENT, bannerHeight + kbHeight); + params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); + return params; + } + private static void initInAppKeyboard(Context appContext) { if (InAppKeyboard == null) { - int kbHeight = appContext.getResources().getDimensionPixelSize(R.dimen.keyboard_height); - RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, kbHeight); - params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); InAppKeyboard = new KMKeyboard(appContext, KeyboardType.KEYBOARD_TYPE_INAPP); + RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); InAppKeyboard.setLayoutParams(params); InAppKeyboard.setVerticalScrollBarEnabled(false); InAppKeyboard.setHorizontalScrollBarEnabled(false); @@ -251,10 +292,8 @@ public final class KMManager { private static void initSystemKeyboard(Context appContext) { if (SystemKeyboard == null) { - int kbHeight = appContext.getResources().getDimensionPixelSize(R.dimen.keyboard_height); - RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, kbHeight); - params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); SystemKeyboard = new KMKeyboard(appContext, KeyboardType.KEYBOARD_TYPE_SYSTEM); + RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); SystemKeyboard.setLayoutParams(params); SystemKeyboard.setVerticalScrollBarEnabled(false); SystemKeyboard.setHorizontalScrollBarEnabled(false); @@ -334,9 +373,13 @@ public final class KMManager { public static void onConfigurationChanged(Configuration newConfig) { // KMKeyboard if (InAppKeyboard != null) { + RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); + InAppKeyboard.setLayoutParams(params); InAppKeyboard.onConfigurationChanged(newConfig); } if (SystemKeyboard != null) { + RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); + SystemKeyboard.setLayoutParams(params); SystemKeyboard.onConfigurationChanged(newConfig); } } @@ -366,8 +409,12 @@ public final class KMManager { AssetManager assetManager = context.getAssets(); try { // Copy main files + copyAsset(context, KMDefault_DictionaryKMP, "", true); copyAsset(context, KMFilename_KeyboardHtml, "", true); copyAsset(context, KMFilename_JSEngine, "", true); + if(KMManager.isDebugMode()) { + copyAsset(context, KMFilename_JSEngine_Sourcemap, "", true); + } copyAsset(context, KMFilename_KmwCss, "", true); copyAsset(context, KMFilename_Osk_Ttf_Font, "", true); copyAsset(context, KMFilename_Osk_Woff_Font, "", true); @@ -650,6 +697,14 @@ public final class KMManager { return KeyboardPickerActivity.getKeyboardsList(context); } + public static ArrayList> getLexicalModelsList(Context context) { + return KeyboardPickerActivity.getLexicalModelsList(context); + } + + public static Dataset getInstalledDataset(Context context) { + return KeyboardPickerActivity.getInstalledDataset(context); + } + public static boolean registerLexicalModel(HashMap lexicalModelInfo) { String pkgID = lexicalModelInfo.get(KMKey_PackageID); String modelID = lexicalModelInfo.get(KMKey_LexicalModelID); @@ -663,20 +718,46 @@ public final class KMManager { languageJSONArray.put(languageID); modelObj.put("languages", languageJSONArray); modelObj.put("path", path); + modelObj.put("CustomHelpLink", lexicalModelInfo.get(KMKey_CustomHelpLink)); } catch (JSONException e) { Log.e(TAG, "Invalid lexical model to register"); return false; } - // Use single quotes in JSONobject for javascript call + // Escape single quotes, and then convert double quotes to single quotes for javascript call String model = String.valueOf(modelObj); + model = model.replaceAll("\'", "\\\\'"); // Double-escaped-backslash b/c regex. model = model.replaceAll("\"", "'"); + SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + boolean mayPredict = prefs.getBoolean(LanguageSettingsActivity.getLanguagePredictionPreferenceKey(languageID), true); + boolean mayCorrect = prefs.getBoolean(LanguageSettingsActivity.getLanguageCorrectionPreferenceKey(languageID), true); + + RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange) { - InAppKeyboard.loadUrl(String.format("javascript:registerModel(%s)", model)); + InAppKeyboard.setLayoutParams(params); + InAppKeyboard.loadJavascript(String.format("enableSuggestions(%s, %s, %s)", model, mayPredict, mayCorrect)); } if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange) { - SystemKeyboard.loadUrl(String.format("javascript:registerModel(%s)", model)); + SystemKeyboard.setLayoutParams(params); + SystemKeyboard.loadJavascript(String.format("enableSuggestions(%s, %s, %s)", model, mayPredict, mayCorrect)); + } + return true; + } + + public static boolean deregisterLexicalModel(String modelID) { + // Check if current lexical model needs to be cleared + if (currentLexicalModel != null && currentLexicalModel.get(KMManager.KMKey_LexicalModelID).equalsIgnoreCase(modelID)) { + currentLexicalModel = null; + } + + String url = String.format("deregisterModel('%s')", modelID); + if (InAppKeyboard != null) { // && InAppKeyboardLoaded) { + InAppKeyboard.loadJavascript(url); + } + + if (SystemKeyboard != null) { // && SystemKeyboardLoaded) { + SystemKeyboard.loadJavascript(url); } return true; } @@ -685,6 +766,45 @@ public final class KMManager { return KeyboardPickerActivity.addLexicalModel(context, lexicalModelInfo); } + /** + * registerAssociatedLexicalModel - Registers a lexical model with the associated language ID. + * If a new model gets loaded, returns true. + * @param langId - String of the language ID + * @return boolean - True if a new model is loaded + */ + public static boolean registerAssociatedLexicalModel(String langId) { + boolean status = false; + HashMap lmInfo = getAssociatedLexicalModel(langId); + if (lmInfo != null && lmInfo != currentLexicalModel) { + registerLexicalModel(lmInfo); + status = true; + } + currentLexicalModel = lmInfo; + + return status; + } + + /** + * Search the installed lexical models list and see if there's an + * associated model for a given language ID + * @param langId - String of the language ID + * @return HashMap Model information if it exists. Otherwise null + */ + public static HashMap getAssociatedLexicalModel(String langId) { + ArrayList> lexicalModelsList = getLexicalModelsList(appContext); + if (lexicalModelsList != null) { + int length = lexicalModelsList.size(); + for (int i = 0; i < length; i++) { + HashMap lmInfo = lexicalModelsList.get(i); + if (langId.equalsIgnoreCase(lmInfo.get(KMManager.KMKey_LanguageID))) { + return lmInfo; + } + } + } + + return null; + } + public static boolean addKeyboard(Context context, HashMap keyboardInfo) { // Log Firebase analytic event. Bundle params = new Bundle(); @@ -724,11 +844,13 @@ public final class KMManager { if (SystemKeyboard != null && SystemKeyboardLoaded) result2 = SystemKeyboard.setKeyboard(packageID, keyboardID, languageID, keyboardName, languageName, kFont, kOskFont); + registerAssociatedLexicalModel(languageID); + return (result1 || result2); } public static boolean setKeyboard(Context context, int position) { - HashMap keyboardInfo = KeyboardPickerActivity.getKeyboardInfo(context, position); + HashMap keyboardInfo = getKeyboardInfo(context, position); if (keyboardInfo == null) return false; @@ -929,16 +1051,32 @@ public final class KMManager { return kbFileVersion; } + public static void addKeyboardDownloadEventListener(OnKeyboardDownloadEventListener listener) { + KMKeyboardDownloaderActivity.addKeyboardDownloadEventListener(listener); + } + public static void addKeyboardEventListener(OnKeyboardEventListener listener) { KMTextView.addOnKeyboardEventListener(listener); KMKeyboard.addOnKeyboardEventListener(listener); } + public static void removeKeyboardDownloadEventListener(OnKeyboardDownloadEventListener listener) { + KMKeyboardDownloaderActivity.removeKeyboardDownloadEventListener(listener); + } + public static void removeKeyboardEventListener(OnKeyboardEventListener listener) { KMTextView.removeOnKeyboardEventListener(listener); KMKeyboard.removeOnKeyboardEventListener(listener); } + public static int getBannerHeight(Context context) { + int bannerHeight = 0; + if (currentBanner.equals("suggestion")) { + bannerHeight = (int) context.getResources().getDimension(R.dimen.banner_height); + } + return bannerHeight; + } + public static int getKeyboardHeight(Context context) { return (int) context.getResources().getDimension(R.dimen.keyboard_height); } @@ -991,11 +1129,11 @@ public final class KMManager { public static void setNumericLayer(KeyboardType kbType) { if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange) { - InAppKeyboard.loadUrl("javascript:setNumericLayer()"); + InAppKeyboard.loadJavascript("setNumericLayer()"); } } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange) { - SystemKeyboard.loadUrl("javascript:setNumericLayer()"); + SystemKeyboard.loadJavascript("setNumericLayer()"); } } } @@ -1009,14 +1147,14 @@ public final class KMManager { if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreTextChange) { - InAppKeyboard.loadUrl(String.format("javascript:updateKMText('%s')", kmText)); + InAppKeyboard.loadJavascript(String.format("updateKMText('%s')", kmText)); result = true; } InAppKeyboardShouldIgnoreTextChange = false; } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { if (SystemKeyboard != null && SystemKeyboardLoaded && !SystemKeyboardShouldIgnoreTextChange) { - SystemKeyboard.loadUrl(String.format("javascript:updateKMText('%s')", kmText)); + SystemKeyboard.loadJavascript(String.format("updateKMText('%s')", kmText)); result = true; } @@ -1030,7 +1168,7 @@ public final class KMManager { boolean result = false; if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { if (InAppKeyboard != null && InAppKeyboardLoaded && !InAppKeyboardShouldIgnoreSelectionChange) { - InAppKeyboard.loadUrl(String.format("javascript:updateKMSelectionRange(%d,%d)", selStart, selEnd)); + InAppKeyboard.loadJavascript(String.format("updateKMSelectionRange(%d,%d)", selStart, selEnd)); result = true; } @@ -1045,7 +1183,7 @@ public final class KMManager { } } - SystemKeyboard.loadUrl(String.format("javascript:updateKMSelectionRange(%d,%d)", selStart, selEnd)); + SystemKeyboard.loadJavascript(String.format("updateKMSelectionRange(%d,%d)", selStart, selEnd)); result = true; } @@ -1058,11 +1196,11 @@ public final class KMManager { public static void resetContext(KeyboardType kbType) { if (kbType == KeyboardType.KEYBOARD_TYPE_INAPP) { if (InAppKeyboard != null && InAppKeyboardLoaded) { - InAppKeyboard.loadUrl("javascript:resetContext()"); + InAppKeyboard.loadJavascript("resetContext()"); } } else if (kbType == KeyboardType.KEYBOARD_TYPE_SYSTEM) { if (SystemKeyboard != null && SystemKeyboardLoaded) { - SystemKeyboard.loadUrl("javascript:resetContext()"); + SystemKeyboard.loadJavascript("resetContext()"); } } } @@ -1090,6 +1228,10 @@ public final class KMManager { return KeyboardPickerActivity.getKeyboardInfo(context, index); } + public static HashMap getLexicalModelInfo(Context context, int index) { + return KeyboardPickerActivity.getLexicalModelInfo(context, index); + } + public static boolean keyboardExists(Context context, String packageID, String keyboardID, String languageID) { boolean result = false; @@ -1101,6 +1243,23 @@ public final class KMManager { return result; } + public static boolean lexicalModelExists(Context context, String packageID, String languageID, String modelID) { + boolean result = false; + + if (packageID != null && languageID != null && modelID != null) { + String lmKey = String.format("%s_%s_%s", packageID, languageID, modelID); + result = KeyboardPickerActivity.containsLexicalModel(context, lmKey); + } + + return result; + } + + public static FormFactor getFormFactor() { + String device_type = appContext.getResources().getString(R.string.device_type); + + return device_type.equals("AndroidMobile") ? FormFactor.PHONE : FormFactor.TABLET; + } + public static boolean isHelpBubbleEnabled() { boolean retVal = true; @@ -1174,14 +1333,18 @@ public final class KMManager { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { - if (url.endsWith(KMFilename_KeyboardHtml)) { - InAppKeyboardLoaded = false; - } } @Override public void onPageFinished(WebView view, String url) { - if (url.endsWith(KMFilename_KeyboardHtml)) { + Log.d("KMEA", "onPageFinished: [inapp] " + url); + shouldOverrideUrlLoading(view, url); + } + + private void pageLoaded(WebView view, String url) { + String langId = KMManager.KMKey_LanguageID; + Log.d("KMEA", "pageLoaded: [inapp] " + url); + if (url.startsWith("file")) { //endsWith(KMFilename_KeyboardHtml)) { InAppKeyboardLoaded = true; if (!InAppKeyboard.keyboardSet) { @@ -1194,7 +1357,7 @@ public final class KMManager { if (keyboardInfo != null) { String pkgId = keyboardInfo.get(KMManager.KMKey_PackageID); String kbId = keyboardInfo.get(KMManager.KMKey_KeyboardID); - String langId = keyboardInfo.get(KMManager.KMKey_LanguageID); + langId = keyboardInfo.get(KMManager.KMKey_LanguageID); String kbName = keyboardInfo.get(KMManager.KMKey_KeyboardName); String langName = keyboardInfo.get(KMManager.KMKey_LanguageName); String kFont = keyboardInfo.get(KMManager.KMKey_Font); @@ -1204,6 +1367,8 @@ public final class KMManager { InAppKeyboard.setKeyboard(KMDefault_UndefinedPackageID, KMDefault_KeyboardID, KMDefault_LanguageID, KMDefault_KeyboardName, KMDefault_LanguageName, KMDefault_KeyboardFont, null); } + + registerAssociatedLexicalModel(langId); } Handler handler = new Handler(); @@ -1212,20 +1377,23 @@ public final class KMManager { public void run() { SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); if (prefs.getBoolean(KMManager.KMKey_ShouldShowHelpBubble, true)) { - InAppKeyboard.loadUrl("javascript:showHelpBubble()"); + InAppKeyboard.loadJavascript("showHelpBubble()"); } } }, 2000); + InAppKeyboard.callJavascriptAfterLoad(); + KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, KeyboardType.KEYBOARD_TYPE_INAPP, EventType.KEYBOARD_LOADED, null); } - - shouldOverrideUrlLoading(view, url); } @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { - if (url.indexOf("hideKeyboard") >= 0) { + Log.d("KMEA", "shouldOverrideUrlLoading [inapp]: "+url); + if(url.indexOf("pageLoaded") >= 0) { + pageLoaded(view, url); + } else if (url.indexOf("hideKeyboard") >= 0) { if (KMTextView.activeView != null && KMTextView.activeView.getClass() == KMTextView.class) { InAppKeyboard.dismissHelpBubble(); KMTextView textView = (KMTextView) KMTextView.activeView; @@ -1335,6 +1503,44 @@ public final class KMManager { hashMap.put("keyText", keyText); InAppKeyboard.subKeysList.add(hashMap); } + } else if (url.indexOf("refreshBannerHeight") >= 0) { + int start = url.indexOf("change=") + 7; + String change = url.substring(start); + currentBanner = (change.equals("loaded")) ? "suggestion" : "blank"; + RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); + InAppKeyboard.setLayoutParams(params); + } else if (url.indexOf("suggestPopup") >= 0) { + // URL has actual path to the keyboard.html file as a prefix! We need to replace + // just the first intended '#' to get URI-based query param processing. + + // At some point, other parts of the function should be redone to allow use of ? instead + // of # in our WebView command "queries" entirely. + String cmd = url.replace("keyboard.html#", "keyboard.html?"); + Uri urlCommand = Uri.parse(cmd); + + double x = Float.parseFloat(urlCommand.getQueryParameter("x")); + double y = Float.parseFloat(urlCommand.getQueryParameter("y")); + double width = Float.parseFloat(urlCommand.getQueryParameter("w")); + double height = Float.parseFloat(urlCommand.getQueryParameter("h")); + String suggestionJSON = urlCommand.getQueryParameter("suggestion"); + boolean isCustom = Boolean.parseBoolean(urlCommand.getQueryParameter("custom")); + + JSONParser parser = new JSONParser(); + JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON); + + /* // For future implementation + InAppKeyboard.suggestionWindowPos = new double[]{x, y}; + InAppKeyboard.suggestionJSON = suggestionJSON; + + try { + Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs")); + Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height); + Log.v("KMEA", "Is a suggestion: " + isCustom); // likely outdated now that tags exist. + } catch (JSONException e) { + //e.printStackTrace(); + Log.v("KMEA", "JSON parsing error: " + e.getMessage()); + } + */ } return false; } @@ -1349,14 +1555,18 @@ public final class KMManager { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { - if (url.endsWith(KMFilename_KeyboardHtml)) { - SystemKeyboardLoaded = false; - } } @Override public void onPageFinished(WebView view, String url) { - if (url.endsWith(KMFilename_KeyboardHtml)) { + Log.d("KMEA", "onPageFinished: [system] " + url); + shouldOverrideUrlLoading(view, url); + } + + private void pageLoaded(WebView view, String url) { + String langId = KMManager.KMKey_LanguageID; + Log.d("KMEA", "pageLoaded: [system] " + url); + if (url.startsWith("file:")) { SystemKeyboardLoaded = true; if (!SystemKeyboard.keyboardSet) { SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); @@ -1368,7 +1578,7 @@ public final class KMManager { if (keyboardInfo != null) { String pkgId = keyboardInfo.get(KMManager.KMKey_PackageID); String kbId = keyboardInfo.get(KMManager.KMKey_KeyboardID); - String langId = keyboardInfo.get(KMManager.KMKey_LanguageID); + langId = keyboardInfo.get(KMManager.KMKey_LanguageID); String kbName = keyboardInfo.get(KMManager.KMKey_KeyboardName); String langName = keyboardInfo.get(KMManager.KMKey_LanguageName); String kFont = keyboardInfo.get(KMManager.KMKey_Font); @@ -1380,26 +1590,30 @@ public final class KMManager { } } + registerAssociatedLexicalModel(langId); + Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); if (prefs.getBoolean(KMManager.KMKey_ShouldShowHelpBubble, true)) { - SystemKeyboard.loadUrl("javascript:showHelpBubble()"); + SystemKeyboard.loadJavascript("showHelpBubble()"); } } }, 2000); KeyboardEventHandler.notifyListeners(KMTextView.kbEventListeners, KeyboardType.KEYBOARD_TYPE_SYSTEM, EventType.KEYBOARD_LOADED, null); - } - shouldOverrideUrlLoading(view, url); + SystemKeyboard.callJavascriptAfterLoad(); + } } @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { - if (url.indexOf("hideKeyboard") >= 0) { + if(url.indexOf("pageLoaded") >= 0) { + pageLoaded(view, url); + } else if (url.indexOf("hideKeyboard") >= 0) { SystemKeyboard.dismissHelpBubble(); IMService.requestHideSelf(0); } else if (url.indexOf("globeKeyAction") >= 0) { @@ -1415,10 +1629,29 @@ public final class KMManager { if (KMManager.shouldAllowSetKeyboard()) { if (SystemKeyboard.keyboardPickerEnabled) { + KeyguardManager km = (KeyguardManager) appContext.getSystemService(Context.KEYGUARD_SERVICE); + if(km.inKeyguardRestrictedInputMode()) { + // Override system keyboard globe key action if screen is locked: + // 1. Switch to next Keyman keyboard (no menu) + // 2. When all the Keyman keyboards have been cycled through, advance to the next system keyboard + if (sysKbIndexOnLockScreen == -1) { + sysKbIndexOnLockScreen = getCurrentKeyboardIndex(context); + sysKbGlobeKeyAction = GlobeKeyAction.GLOBE_KEY_ACTION_SWITCH_TO_NEXT_KEYBOARD; + } else if (sysKbIndexOnLockScreen == getCurrentKeyboardIndex(context)) { + sysKbGlobeKeyAction = GlobeKeyAction.GLOBE_KEY_ACTION_ADVANCE_TO_NEXT_SYSTEM_KEYBOARD; + } + } else { + // If screen isn't locked, revert to default system globe key action + sysKbIndexOnLockScreen = -1; + sysKbGlobeKeyAction = GlobeKeyAction.GLOBE_KEY_ACTION_SHOW_MENU; + } + if (sysKbGlobeKeyAction == GlobeKeyAction.GLOBE_KEY_ACTION_SHOW_MENU) { showKeyboardPicker(context, KeyboardType.KEYBOARD_TYPE_SYSTEM); } else if (sysKbGlobeKeyAction == GlobeKeyAction.GLOBE_KEY_ACTION_SWITCH_TO_NEXT_KEYBOARD) { switchToNextKeyboard(context); + } else if (sysKbGlobeKeyAction == GlobeKeyAction.GLOBE_KEY_ACTION_ADVANCE_TO_NEXT_SYSTEM_KEYBOARD) { + advanceToNextInputMode(); } } else { switchToNextKeyboard(context); @@ -1505,6 +1738,44 @@ public final class KMManager { hashMap.put("keyText", keyText); SystemKeyboard.subKeysList.add(hashMap); } + } else if (url.indexOf("refreshBannerHeight") >= 0) { + int start = url.indexOf("change=") + 7; + String change = url.substring(start); + currentBanner = (change.equals("loaded")) ? "suggestion" : "blank"; + RelativeLayout.LayoutParams params = getKeyboardLayoutParams(); + SystemKeyboard.setLayoutParams(params); + } else if (url.indexOf("suggestPopup") >= 0) { + // URL has actual path to the keyboard.html file as a prefix! We need to replace + // just the first intended '#' to get URI-based query param processing. + + // At some point, other parts of the function should be redone to allow use of ? instead + // of # in our WebView command "queries" entirely. + String cmd = url.replace("keyboard.html#", "keyboard.html?"); + Uri urlCommand = Uri.parse(cmd); + + double x = Float.parseFloat(urlCommand.getQueryParameter("x")); + double y = Float.parseFloat(urlCommand.getQueryParameter("y")); + double width = Float.parseFloat(urlCommand.getQueryParameter("w")); + double height = Float.parseFloat(urlCommand.getQueryParameter("h")); + String suggestionJSON = urlCommand.getQueryParameter("suggestion"); + boolean isCustom = Boolean.parseBoolean(urlCommand.getQueryParameter("custom")); + + JSONParser parser = new JSONParser(); + JSONObject obj = parser.getJSONObjectFromURIString(suggestionJSON); + + /* // For future implementation + SystemKeyboard.suggestionWindowPos = new double[]{x, y}; + SystemKeyboard.suggestionJSON = suggestionJSON; + + try { + Log.v("KMEA", "Suggestion display: " + obj.getString("displayAs")); + Log.v("KMEA", "Suggestion's banner coords: " + x + ", " + y + ", " + width + ", " + height); + Log.v("KMEA", "Is a suggestion: " + isCustom); // likely outdated now that tags exist. + } catch (JSONException e) { + //e.printStackTrace(); + Log.v("KMEA", "JSON parsing error: " + e.getMessage()); + } + */ } return false; @@ -1546,7 +1817,11 @@ public final class KMManager { // This annotation is required in Jelly Bean and later: @JavascriptInterface - public void insertText(final int dn, final String s) { + public void insertText(final int dn, final String s, final int dr) { + if(dr != 0) { + Log.d(TAG, "Right deletions requested but are not presently supported by the in-app keyboard."); + } + Handler mainLoop = new Handler(Looper.getMainLooper()); mainLoop.post(new Runnable() { public void run() { @@ -1671,7 +1946,7 @@ public final class KMManager { // This annotation is required in Jelly Bean and later: @JavascriptInterface - public void insertText(final int dn, final String s) { + public void insertText(final int dn, final String s, final int dr) { Handler mainLoop = new Handler(Looper.getMainLooper()); mainLoop.post(new Runnable() { public void run() { @@ -1691,6 +1966,7 @@ public final class KMManager { ic.beginBatchEdit(); + // Delete any existing selected text. ExtractedText icText = ic.getExtractedText(new ExtractedTextRequest(), 0); if (icText != null) { // This can be null if the input connection becomes invalid. int start = icText.startOffset + icText.selectionStart; @@ -1715,6 +1991,7 @@ public final class KMManager { return; } + // Perform left-deletions for (int i = 0; i < dn; i++) { CharSequence chars = ic.getTextBeforeCursor(1, 0); if (chars != null && chars.length() > 0) { @@ -1728,6 +2005,20 @@ public final class KMManager { } } + // Perform right-deletions + for (int i = 0; i < dr; i++) { + CharSequence chars = ic.getTextAfterCursor(1, 0); + if (chars != null && chars.length() > 0) { + char c = chars.charAt(0); + SystemKeyboardShouldIgnoreSelectionChange = true; + if (Character.isHighSurrogate(c)) { + ic.deleteSurroundingText(0, 2); + } else { + ic.deleteSurroundingText(0, 1); + } + } + } + if (s.length() > 0) { SystemKeyboardShouldIgnoreSelectionChange = true; ic.commitText(s, s.length()); diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMTextView.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMTextView.java index bffbb359df35ce88c071e679f0747d94bb533fcd..80b11ea2c6e0d742398cfabd9e2767f943cb2428 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMTextView.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMTextView.java @@ -286,15 +286,11 @@ public final class KMTextView extends AppCompatEditText { } public void dismissKeyboard() { - AppCompatActivity activity; - if (context instanceof ContextThemeWrapper) { - activity = (AppCompatActivity)(((ContextThemeWrapper)context).getBaseContext()); - } else { - activity = (AppCompatActivity)context; - } + AppCompatActivity activity = (AppCompatActivity) context; Window mainWindow = activity.getWindow(); FrameLayout mainLayout = (FrameLayout) mainWindow.getDecorView().findViewById(android.R.id.content); + //mainWindow.clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); ((InputMethodManager) activity.getSystemService(AppCompatActivity.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(mainLayout.getWindowToken(), 0); //keyboardLayout.setAnimation(AnimationUtils.loadAnimation(context, R.anim.slide_out)); diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardInfoActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardInfoActivity.java index f3ff21cc0690ecc6903fbe84052b518ffe40f4a0..2b95427c07bf1cc04787afeeb9abda8dcb0cc021 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardInfoActivity.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardInfoActivity.java @@ -24,8 +24,11 @@ import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.TextView; +import android.widget.Toast; import com.tavultesoft.kmea.util.FileUtils; +import com.tavultesoft.kmea.util.FileProviderUtils; +import com.tavultesoft.kmea.util.MapCompat; // Public access is necessary to avoid IllegalAccessException public final class KeyboardInfoActivity extends AppCompatActivity { @@ -43,6 +46,7 @@ public final class KeyboardInfoActivity extends AppCompatActivity { super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_NO_TITLE); final Context context = this; + final String authority = FileProviderUtils.getAuthority(context); setContentView(R.layout.activity_list_layout); toolbar = (Toolbar) findViewById(R.id.list_toolbar); @@ -53,38 +57,62 @@ public final class KeyboardInfoActivity extends AppCompatActivity { listView = (ListView) findViewById(R.id.listView); + final String packageID = getIntent().getStringExtra(KMManager.KMKey_PackageID); final String kbID = getIntent().getStringExtra(KMManager.KMKey_KeyboardID); + String kbName = getIntent().getStringExtra(KMManager.KMKey_KeyboardName); + final String kbVersion = getIntent().getStringExtra(KMManager.KMKey_KeyboardVersion); + final boolean isCustomKeyboard = getIntent().getBooleanExtra(KMManager.KMKey_CustomKeyboard, false); final TextView textView = (TextView) findViewById(R.id.bar_title); - String kbName = getIntent().getStringExtra(KMManager.KMKey_KeyboardName); textView.setText(kbName); if (titleFont != null) textView.setTypeface(titleFont, Typeface.BOLD); - final String kbVersion = getIntent().getStringExtra(KMManager.KMKey_KeyboardVersion); - boolean isCustomKeyboard = getIntent().getBooleanExtra(KMManager.KMKey_CustomKeyboard, false); - infoList = new ArrayList>(); - String icon = "0"; + // Display keyboard version title + final String noIcon = "0"; HashMap hashMap = new HashMap(); hashMap.put(titleKey, getString(R.string.keyboard_version)); hashMap.put(subtitleKey, kbVersion); - hashMap.put(iconKey, icon); + hashMap.put(iconKey, noIcon); infoList.add(hashMap); + // Display keyboard help link + hashMap = new HashMap(); + final String helpUrlStr = getIntent().getStringExtra(KMManager.KMKey_HelpLink); final String customHelpLink = getIntent().getStringExtra(KMManager.KMKey_CustomHelpLink); - if (!isCustomKeyboard || customHelpLink != null) { - icon = String.valueOf(R.drawable.ic_arrow_forward); - hashMap = new HashMap(); - hashMap.put(titleKey, getString(R.string.help_link)); - hashMap.put(subtitleKey, ""); - hashMap.put(iconKey, icon); - infoList.add(hashMap); + // Check if app declared FileProvider + String icon = String.valueOf(R.drawable.ic_arrow_forward); + // Don't show help link arrow if File Provider unavailable, or custom help doesn't exist + if ( (customHelpLink != null && !FileProviderUtils.exists(context)) || + (customHelpLink == null && !packageID.equals(KMManager.KMDefault_UndefinedPackageID)) ) { + icon = noIcon; } + hashMap.put(titleKey, getString(R.string.help_link)); + hashMap.put(subtitleKey, ""); + hashMap.put(iconKey, icon); + infoList.add(hashMap); String[] from = new String[]{titleKey, subtitleKey, iconKey}; int[] to = new int[]{R.id.text1, R.id.text2, R.id.image1}; - ListAdapter adapter = new SimpleAdapter(context, infoList, R.layout.list_row_layout2, from, to); + + ListAdapter adapter = new SimpleAdapter(context, infoList, R.layout.list_row_layout2, from, to) { + @Override + public boolean isEnabled(int position) { + HashMap hashMap = (HashMap) infoList.get(position); + String itemTitle = MapCompat.getOrDefault(hashMap, titleKey, ""); + String icon = MapCompat.getOrDefault(hashMap, iconKey, noIcon); + if (itemTitle.equals(getString(R.string.keyboard_version))) { + // No point in 'clicking' on version info. + return false; + // Visibly disables the help option when help isn't available + } else if (itemTitle.equals(getString(R.string.help_link)) && icon.equals(noIcon)) { + return false; + } + + return super.isEnabled(position); + } + }; listView.setAdapter(adapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -100,28 +128,27 @@ public final class KeyboardInfoActivity extends AppCompatActivity { // Starting with Android N, you can't pass file:// to intents, so we use FileProvider try { Uri contentUri = FileProvider.getUriForFile( - context, getApplication().getPackageName() + ".fileProvider", customHelp); + context, authority, customHelp); i.setDataAndType(contentUri, "text/html"); - } catch (Exception e) { - Log.e("KeyboardInfoActivity", "Failed to access " + customHelp.toString()); + } catch (NullPointerException e) { + String message = "FileProvider undefined in app to load" + customHelp.toString(); + Toast.makeText(context, message, Toast.LENGTH_LONG).show(); + Log.e("KeyboardInfoActivity", message); } } else { i.setData(Uri.parse(customHelpLink)); } - startActivity(i); + if (FileProviderUtils.exists(context)) { + startActivity(i); + } } else { - String helpUrlStr = String.format("http://help.keyman.com/keyboard/%s/%s/", kbID, kbVersion); i.setData(Uri.parse(helpUrlStr)); startActivity(i); } } } - - }); - - } @Override diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardListActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardListActivity.java index 937550131bcb3f31b00607a3056c2089c3e5fac6..26eca3f0bc6f21793647d37d5bbe1ad65a85261a 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardListActivity.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardListActivity.java @@ -4,18 +4,18 @@ package com.tavultesoft.kmea; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; +import com.tavultesoft.kmea.data.CloudRepository; +import com.tavultesoft.kmea.data.Dataset; +import com.tavultesoft.kmea.data.Keyboard; +import com.tavultesoft.kmea.data.adapters.NestedAdapter; import com.tavultesoft.kmea.util.MapCompat; +import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; @@ -23,10 +23,12 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; +import android.view.LayoutInflater; import android.view.View; +import android.view.ViewGroup; import android.view.Window; import android.widget.AdapterView; -import android.widget.ListAdapter; +import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; @@ -36,11 +38,7 @@ public final class KeyboardListActivity extends AppCompatActivity implements OnK private static Toolbar toolbar = null; private static ListView listView = null; - private static JSONArray languages = LanguageListActivity.languages(); - private static JSONArray keyboards = null; - private static ArrayList> keyboardsArrayList = null; - private static int langIndex = 0; - private final String iconKey = "icon"; + private static final String TAG = "KeyboardListActivity"; @Override public void onCreate(Bundle savedInstanceState) { @@ -58,80 +56,51 @@ public final class KeyboardListActivity extends AppCompatActivity implements OnK listView = (ListView) findViewById(R.id.listView); final TextView textView = (TextView) findViewById(R.id.bar_title); + textView.setText(getString(R.string.title_add_keyboard)); - try { - langIndex = getIntent().getIntExtra("selectedIndex", 0); - JSONObject language = languages.getJSONObject(langIndex); - final String langID = language.getString(KMManager.KMKey_ID); - final String langName = language.getString(KMManager.KMKey_Name); - textView.setText(langName); - - keyboards = language.getJSONArray(KMKeyboardDownloaderActivity.KMKey_LanguageKeyboards); - keyboardsArrayList = new ArrayList>(); - - int length = keyboards.length(); - for (int i = 0; i < length; i++) { - String kbID = keyboards.getJSONObject(i).getString(KMManager.KMKey_ID); - String kbName = keyboards.getJSONObject(i).getString(KMManager.KMKey_Name); - String isEnabled = "true"; - String icon = "0"; - String kbKey = String.format("%s_%s", langID, kbID); - if (KeyboardPickerActivity.containsKeyboard(context, kbKey)) { - isEnabled = "false"; - icon = String.valueOf(R.drawable.ic_check); - } + String langID = getIntent().getStringExtra("languageCode"); + String langName = getIntent().getStringExtra("languageName"); - HashMap hashMap = new HashMap(); - hashMap.put(KMManager.KMKey_KeyboardName, kbName); - hashMap.put(iconKey, icon); - hashMap.put("isEnabled", isEnabled); - keyboardsArrayList.add(hashMap); - } + Dataset repo = CloudRepository.shared.fetchDataset(this); + final FilteredKeyboardsAdapter adapter = new FilteredKeyboardsAdapter(this, repo, langID); - String[] from = new String[]{KMManager.KMKey_KeyboardName, iconKey}; - int[] to = new int[]{R.id.text1, R.id.image1}; - ListAdapter adapter = new KMListAdapter(context, keyboardsArrayList, R.layout.list_row_layout1, from, to); - listView.setAdapter(adapter); - listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { - @Override - public void onItemClick(AdapterView parent, View view, final int position, long id) { - HashMap kbInfo = LanguageListActivity.getKeyboardInfo(langIndex, position); - final String pkgID = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_PackageID, KMManager.KMDefault_UndefinedPackageID); - final String kbID = kbInfo.get(KMManager.KMKey_KeyboardID); - final String langID = kbInfo.get(KMManager.KMKey_LanguageID); - String kbName = kbInfo.get(KMManager.KMKey_KeyboardName); - String langName = kbInfo.get(KMManager.KMKey_LanguageName); - String kFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_Font, ""); - String kOskFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_OskFont, kFont); - String isCustom = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_CustomKeyboard, "N"); - - if (!pkgID.equals(KMManager.KMDefault_UndefinedPackageID)) { - // keyboard already exists in packages/ so just add the language association - KeyboardPickerActivity.addKeyboard(context, kbInfo); - KMManager.setKeyboard(pkgID, kbID, langID, kbName, langName, kFont, kOskFont); - Toast.makeText(context, "Keyboard installed", Toast.LENGTH_SHORT).show(); - // Setting result to 1 so calling activity will finish too - setResult(1); - ((AppCompatActivity) context).finish(); - return; - } - - Bundle args = new Bundle(); - args.putString(KMKeyboardDownloaderActivity.ARG_PKG_ID, pkgID); - args.putString(KMKeyboardDownloaderActivity.ARG_KB_ID, kbID); - args.putString(KMKeyboardDownloaderActivity.ARG_LANG_ID, langID); - args.putString(KMKeyboardDownloaderActivity.ARG_KB_NAME, kbName); - args.putString(KMKeyboardDownloaderActivity.ARG_LANG_NAME, langName); - args.putBoolean(KMKeyboardDownloaderActivity.ARG_IS_CUSTOM, isCustom.toUpperCase().equals("Y")); - Intent i = new Intent(getApplicationContext(), KMKeyboardDownloaderActivity.class); - i.putExtras(args); - startActivity(i); + textView.setText(langName); + listView.setAdapter(adapter); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, final int position, long id) { + Keyboard kbd = adapter.getItem(position); + if(kbd == null) { + Log.e(TAG, "Could not find keyboard corresponding to item click position " + position); + return; } - }); - } catch (JSONException e) { - Log.e("JSON Error", (e.getMessage() == null) ? "JSONException" : e.getMessage()); - } + HashMap kbInfo = new HashMap<>(kbd.map); + final String pkgID = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_PackageID, KMManager.KMDefault_UndefinedPackageID); + final String kbID = kbInfo.get(KMManager.KMKey_KeyboardID); + final String lgID = kbInfo.get(KMManager.KMKey_LanguageID); + String kbName = kbInfo.get(KMManager.KMKey_KeyboardName); + String lgName = kbInfo.get(KMManager.KMKey_LanguageName); + String kFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_Font, ""); + String kOskFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_OskFont, kFont); + + if (!pkgID.equals(KMManager.KMDefault_UndefinedPackageID)) { + // keyboard already exists in packages/ so just add the language association + KeyboardPickerActivity.addKeyboard(context, kbInfo); + KMManager.setKeyboard(pkgID, kbID, lgID, kbName, lgName, kFont, kOskFont); + Toast.makeText(context, "Keyboard installed", Toast.LENGTH_SHORT).show(); + // Setting result to 1 so calling activity will finish too + setResult(1); + ((AppCompatActivity) context).finish(); + return; + } + + Bundle args = kbd.buildDownloadBundle(); + Intent i = new Intent(getApplicationContext(), KMKeyboardDownloaderActivity.class); + i.putExtras(args); + startActivity(i); + } + }); } @Override @@ -190,4 +159,63 @@ public final class KeyboardListActivity extends AppCompatActivity implements OnK public void onLexicalModelInstalled(List> lexicalModelsInstalled) { // Do nothing. } + + // Fully details the building of this Activity's list view items. + static private class FilteredKeyboardsAdapter extends NestedAdapter { + static final int RESOURCE = R.layout.list_row_layout1; + private final Context context; + + private static class ViewHolder { + ImageView img; + TextView text; + } + + public FilteredKeyboardsAdapter(@NonNull Context context, final Dataset repo, final String languageCode) { + // Goal: to not need a custom filter here, instead relying on LanguageDataset's built-in filters. + super(context, RESOURCE, repo.keyboards, repo.keyboardFilter, languageCode); + + this.context = context; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + Keyboard kbd = this.getItem(position); + ViewHolder holder; + + // If we're being told to reuse an existing view, do that. It's automatic optimization. + if (convertView == null) { + convertView = LayoutInflater.from(getContext()).inflate(RESOURCE, parent, false); + holder = new ViewHolder(); + + holder.img = convertView.findViewById(R.id.image1); + holder.text = convertView.findViewById(R.id.text1); + convertView.setTag(holder); + } else { + holder = (ViewHolder) convertView.getTag(); + } + + holder.text.setText(kbd.map.get(KMManager.KMKey_KeyboardName)); + + if (!this.isEnabled(position)) { + convertView.setAlpha(0.25f); + holder.img.setImageResource(R.drawable.ic_check); + } else { + convertView.setAlpha(1.0f); + holder.img.setImageResource(0); + } + + return convertView; + } + + @Override + public boolean isEnabled(int position) { + Keyboard kbd = this.getItem(position); + + final String langID = kbd.map.get(KMManager.KMKey_LanguageID); // Has the selected language code. + String kbID = kbd.map.get(KMManager.KMKey_KeyboardID); + + String kbKey = String.format("%s_%s", langID, kbID); + return !KeyboardPickerActivity.containsKeyboard(context, kbKey); + } + } } diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java index 389e313258da4f5a43264c38066f8cca685d594f..f8d09cedc70a9cd06d9ad0b2d0d8fa58814eb680 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java @@ -10,31 +10,23 @@ import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.json.JSONArray; -import org.json.JSONObject; - -import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; -import com.tavultesoft.kmea.util.FileUtils; +import com.tavultesoft.kmea.data.CloudRepository; +import com.tavultesoft.kmea.data.Dataset; +import com.tavultesoft.kmea.data.Keyboard; +import com.tavultesoft.kmea.data.LexicalModel; import com.tavultesoft.kmea.util.MapCompat; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; -import android.content.DialogInterface; -import android.content.DialogInterface.OnCancelListener; import android.content.Intent; -import android.content.SharedPreferences; import android.graphics.Typeface; -import android.os.AsyncTask; import android.os.Bundle; -import android.os.Handler; import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.MenuItem; @@ -47,27 +39,22 @@ import android.widget.Button; import android.widget.ImageButton; import android.widget.ListView; import android.widget.PopupMenu; +import android.widget.TextView; import android.widget.Toast; -public final class KeyboardPickerActivity extends AppCompatActivity implements OnKeyboardDownloadEventListener { +public final class KeyboardPickerActivity extends AppCompatActivity { private static Toolbar toolbar = null; private static ListView listView = null; - private static ImageButton addButton = null; private static Button closeButton = null; private static KMKeyboardPickerAdapter listAdapter = null; + + // Lists of installed keyboards and installed lexical models private static ArrayList> keyboardsList = null; - private static HashMap keyboardVersions = null; private static ArrayList> lexicalModelsList = null; - // private static HashMap lexicalModelsVersions = null; TODO - private static boolean checkingUpdates = false; - private static int updateCount = 0; - private static int failedUpdateCount = 0; - private static ProgressDialog updateProgress; - private static boolean didUpdate = false; - private static boolean updateCheckFailed = false; - private static boolean updateFailed = false; - private static Calendar lastUpdateCheck = null; + private static Dataset storageDataset = null; + + //private static boolean didUpdate = false; private static int selectedIndex = 0; private static final String TAG = "KeyboardPickerActivity"; @@ -88,11 +75,13 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O final Context context = this; setContentView(R.layout.keyboard_picker_list_layout); - toolbar = (Toolbar) findViewById(R.id.keyboard_picker_toolbar); + toolbar = (Toolbar) findViewById(R.id.list_toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayShowTitleEnabled(false); + TextView textView = (TextView) findViewById(R.id.bar_title); + textView.setText(getString(R.string.title_keyboards)); closeButton = (Button) findViewById(R.id.close_keyman_button); Bundle bundle = getIntent().getExtras(); @@ -146,9 +135,8 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O } } - String[] from = new String[]{KMManager.KMKey_LanguageName, KMManager.KMKey_KeyboardName}; - int[] to = new int[]{R.id.text1, R.id.text2}; - listAdapter = new KMKeyboardPickerAdapter(context, keyboardsList, R.layout.list_row_layout3, from, to); + // TODO: Use a persistently-loaded version of the installed dataset. + listAdapter = new KMKeyboardPickerAdapter(context, getInstalledDataset(context).keyboards); listAdapter.listFont = listFont; listView.setAdapter(listAdapter); listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); @@ -170,7 +158,7 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { if (item.getItemId() == R.id.popup_delete) { - deleteKeyboard(position); + deleteKeyboard(context, position); return true; } else { return false; @@ -185,33 +173,6 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O } }); - addButton = (ImageButton) findViewById(R.id.add_button); - addButton.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - // Check that available keyboard information can be obtained via: - // 1. connection to cloud catalog - // 2. cached file - // 3. local kmp.json files in packages/ - if (KMManager.hasConnection(context) || LanguageListActivity.getCacheFile(context).exists() || - KeyboardPickerActivity.hasKeyboardFromPackage()){ - dismissOnSelect = false; - Intent i = new Intent(context, LanguageListActivity.class); - i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); - context.startActivity(i); - } else { - AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); - dialogBuilder.setTitle(getString(R.string.title_add_keyboard)); - dialogBuilder.setMessage(String.format("\n%s\n", getString(R.string.cannot_connect))); - dialogBuilder.setPositiveButton(getString(R.string.label_ok), null); - AlertDialog dialog = dialogBuilder.create(); - dialog.show(); - } - } - }); - if (!canAddNewKeyboard) { - addButton.setVisibility(View.GONE); - } - int curKbPos = getCurrentKeyboardIndex(); setSelection(curKbPos); } @@ -219,72 +180,26 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O @Override protected void onResume() { super.onResume(); - KMKeyboardDownloaderActivity.addKeyboardDownloadEventListener(this); BaseAdapter adapter = (BaseAdapter) listAdapter; - adapter.notifyDataSetChanged(); + if(listAdapter != null) { + adapter.notifyDataSetChanged(); + } + int curKbPos = getCurrentKeyboardIndex(); setSelection(curKbPos); if (!shouldCheckKeyboardUpdates) return; - - final Context context = this; - Handler handler = new Handler(); - handler.postDelayed(new Runnable() { - @Override - public void run() { - boolean shouldCheckUpdate = false; - if (lastUpdateCheck == null) { - SharedPreferences prefs = context.getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - Long lastUpdateCheckTime = prefs.getLong("lastUpdateCheck", 0); - if (lastUpdateCheckTime > 0) { - lastUpdateCheck = Calendar.getInstance(); - lastUpdateCheck.setTime(new Date(lastUpdateCheckTime)); - } - } - - if (lastUpdateCheck != null) { - Calendar lastChecked = Calendar.getInstance(); - lastChecked.setTime(lastUpdateCheck.getTime()); - if (updateCheckFailed || updateFailed) { - lastChecked.add(Calendar.HOUR_OF_DAY, 1); - } else { - lastChecked.add(Calendar.HOUR_OF_DAY, 24); - } - - Calendar now = Calendar.getInstance(); - if (now.compareTo(lastChecked) > 0) { - shouldCheckUpdate = true; - } - } else { - shouldCheckUpdate = true; - } - - if (shouldCheckUpdate) { - updateCheckFailed = false; - updateFailed = false; - if (!checkingUpdates) { - checkKeyboardUpdates(context); - } - } - } - }, 1000); } @Override protected void onPause() { super.onPause(); - // Intentionally not removing KeyboardDownloadEventListener to - // ensure onKeyboardDownloadFinished() gets called - - if (didUpdate) { - if (KMManager.InAppKeyboard != null) { - KMManager.InAppKeyboard.loadKeyboard(); - } - if (KMManager.SystemKeyboard != null) { - KMManager.SystemKeyboard.loadKeyboard(); - } - didUpdate = false; + if (KMManager.InAppKeyboard != null) { + KMManager.InAppKeyboard.loadKeyboard(); + } + if (KMManager.SystemKeyboard != null) { + KMManager.SystemKeyboard.loadKeyboard(); } } @@ -319,10 +234,10 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O return pos; } - private static boolean hasKeyboardFromPackage() { + protected static boolean hasKeyboardFromPackage() { for(HashMap kbInfo: keyboardsList) { - String packageID = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_PackageID, KMManager.KMDefault_UndefinedPackageID); - if (!packageID.equals(KMManager.KMDefault_UndefinedPackageID)) { + String customKeyboard = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_CustomKeyboard, "N"); + if (customKeyboard.equalsIgnoreCase("Y")) { return true; } } @@ -351,29 +266,44 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O return result; } + /** + * Save the list of installed keyboards + * @param context + * @param list + * @return boolean - Status if the keyboard list was successfully saved + */ protected static boolean updateKeyboardsList(Context context, ArrayList> list) { boolean result; keyboardsList = list; result = saveList(context, KMManager.KMFilename_KeyboardsList); + notifyKeyboardsUpdate(context); return result; } + /** + * Save the list of installed lexical models + * @param context + * @param list + * @return boolean - Status if the lexical models list was successfully saved + */ protected static boolean updateLexicalModelsList(Context context, ArrayList> list) { boolean result; lexicalModelsList = list; result = saveList(context, KMManager.KMFilename_LexicalModelsList); + notifyLexicalModelsUpdate(context); return result; } - private void setSelection(int position) { + private static void setSelection(int position) { listView.setItemChecked(position, true); listView.setSelection(position); selectedIndex = position; } - private void switchKeyboard(int position) { + private static void switchKeyboard(int position) { setSelection(position); - HashMap kbInfo = keyboardsList.get(position); + int listPosition = (position >= keyboardsList.size()) ? keyboardsList.size()-1 : position; + HashMap kbInfo = keyboardsList.get(listPosition); String pkgId = kbInfo.get(KMManager.KMKey_PackageID); if (pkgId == null || pkgId.isEmpty()) { pkgId = KMManager.KMDefault_UndefinedPackageID; @@ -385,13 +315,6 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O String kFont = kbInfo.get(KMManager.KMKey_Font); String kOskFont = kbInfo.get(KMManager.KMKey_OskFont); KMManager.setKeyboard(pkgId, kbId, langId, kbName, langName, kFont, kOskFont); - - // Register associated lexical model - HashMap lmInfo = getAssociatedLexicalModel(langId); - if (lmInfo != null) { - KMManager.registerLexicalModel(lmInfo); - } - } protected static boolean addKeyboard(Context context, HashMap keyboardInfo) { @@ -409,6 +332,11 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O String pkgID = keyboardInfo.get(KMManager.KMKey_PackageID); String kbID = keyboardInfo.get(KMManager.KMKey_KeyboardID); String langID = keyboardInfo.get(KMManager.KMKey_LanguageID); + + // TODO: Possible optimization - do we have anything with this language code already? + // Only invalidate the lexical cache if not. + CloudRepository.shared.invalidateLexicalModelCache(context); + if (pkgID != null && kbID != null && langID != null) { String kbKey = String.format("%s_%s", langID, kbID); if (kbKey.length() >= 3) { @@ -427,6 +355,8 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O } } + notifyKeyboardsUpdate(context); + return result; } @@ -434,7 +364,12 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O boolean result = false; if (lexicalModelsList == null) { - lexicalModelsList = new ArrayList>(); + // First, try loading our existing (file-backed) model list. + lexicalModelsList = getLexicalModelsList(context); + // If there is no existing list, time to build one from scratch. + if(lexicalModelsList == null) { + lexicalModelsList = new ArrayList<>(); + } } if (lexicalModelInfo != null) { @@ -443,8 +378,8 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O String langID = lexicalModelInfo.get(KMManager.KMKey_LanguageID); if (pkgID != null && modelID != null && langID != null) { - String lmKey = String.format("%s_%s_%s", langID, pkgID, modelID); - if (lmKey.length() >= 3) { + String lmKey = String.format("%s_%s_%s", pkgID, langID, modelID); + if (lmKey.length() >= 5) { int x = getLexicalModelIndex(context, lmKey); if (x >= 0) { lexicalModelsList.set(x, lexicalModelInfo); @@ -460,6 +395,8 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O } } + notifyLexicalModelsUpdate(context); + return result; } @@ -474,27 +411,97 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O result = saveList(context, KMManager.KMFilename_KeyboardsList); } + notifyKeyboardsUpdate(context); + return result; } - protected void deleteKeyboard(int position) { + protected static void deleteKeyboard(Context context, int position) { int curKbPos = getCurrentKeyboardIndex(); - boolean result = removeKeyboard(this, position); - ; + boolean result = removeKeyboard(context, position); if (result) { - Toast.makeText(this, "Keyboard deleted", Toast.LENGTH_SHORT).show(); + Toast.makeText(context, "Keyboard deleted", Toast.LENGTH_SHORT).show(); BaseAdapter adapter = (BaseAdapter) listAdapter; - adapter.notifyDataSetChanged(); - if (position == curKbPos) { + if(adapter != null) { + adapter.notifyDataSetChanged(); + } + if (position == curKbPos && listView != null) { switchKeyboard(0); - } else { + } else if(listView != null) { // A bit of a hack, since LanguageSettingsActivity calls this method too. curKbPos = getCurrentKeyboardIndex(); setSelection(curKbPos); } } + + notifyKeyboardsUpdate(context); } + /** + * getModelIDFromPosition - Get the lexical model ID at a given position + * @param context + * @param position - int position of the lexical model + * @return String - model ID. Blank if invalid position + */ + protected static String getModelIDFromPosition(Context context, int position) { + if (lexicalModelsList == null) { + lexicalModelsList = getLexicalModelsList(context); + } + + String modelID = ""; + if (lexicalModelsList != null && position >= 0 && position < lexicalModelsList.size()) { + HashMap lexicalModelInfo = lexicalModelsList.get(position); + modelID = lexicalModelInfo.get(KMManager.KMKey_LexicalModelID); + } + + return modelID; + } + + /** + * removeLexicalModel - Remove lexical model at a given position from the installed lexical models list + * @param context + * @param position - int position of the lexical model to remove + * @return boolean - result of the model could be removed and list saved + */ + protected static boolean removeLexicalModel(Context context, int position) { + boolean result = false; + + if (lexicalModelsList == null) { + lexicalModelsList = getLexicalModelsList(context); + } + + if (lexicalModelsList != null && position >= 0 && position < lexicalModelsList.size()) { + lexicalModelsList.remove(position); + result = saveList(context, KMManager.KMFilename_LexicalModelsList); + } + + notifyLexicalModelsUpdate(context); + + return result; + } + + + /** + * deleteLexicalModel - Remove lexical model from the installed list + * and deregister the model with KMW + * @param context + * @param position - int position in the models list + */ + protected static void deleteLexicalModel(Context context, int position, boolean silenceNotification) { + String modelID = getModelIDFromPosition(context, position); + boolean result = removeLexicalModel(context, position); + + if (result) { + if(!silenceNotification) { + Toast.makeText(context, "" + "Model deleted", Toast.LENGTH_SHORT).show(); + } + KMManager.deregisterLexicalModel(modelID); + } + + notifyLexicalModelsUpdate(context); + } + + // Gets a raw list of installed lexical models. @SuppressWarnings("unchecked") private static ArrayList> getList(Context context, String filename) { ArrayList> list = null; @@ -514,6 +521,66 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O return list; } + public static Dataset getInstalledDataset(Context context) { + if(storageDataset != null) { + return storageDataset; + } + + List> kbdMapList = getKeyboardsList(context); + List kbdsList = new ArrayList<>(kbdMapList.size()); + + for(Map map: kbdMapList) { + kbdsList.add(new Keyboard(map)); + } + + List> lexMapList = getLexicalModelsList(context); + if(lexMapList == null) { + lexMapList = new ArrayList<>(0); + } + List lexList = new ArrayList<>(lexMapList.size()); + + for(Map map: lexMapList) { + lexList.add(new LexicalModel(map)); + } + + storageDataset = new Dataset(context); + storageDataset.keyboards.addAll(kbdsList); + storageDataset.lexicalModels.addAll(lexList); + + return storageDataset; + } + + // While the two following methods aren't exactly ideal, they should be enough to get the job done + // for 12.0 before a more complete refactor of this class is done. + protected static void notifyKeyboardsUpdate(Context context) { + Dataset storage = getInstalledDataset(context); + storage.keyboards.setNotifyOnChange(false); + storage.keyboards.clear(); + + List> mapList = getKeyboardsList(context); + List kbdList = new ArrayList<>(mapList.size()); + for(Map map: mapList) { + kbdList.add(new Keyboard(map)); + } + storage.keyboards.addAll(kbdList); + storage.keyboards.notifyDataSetChanged(); + } + + protected static void notifyLexicalModelsUpdate(Context context) { + Dataset storage = getInstalledDataset(context); + storage.lexicalModels.setNotifyOnChange(false); + storage.lexicalModels.clear(); + + List> mapList = getLexicalModelsList(context); + List lexList = new ArrayList<>(mapList.size()); + for(Map map: mapList) { + lexList.add(new LexicalModel(map)); + } + storage.lexicalModels.addAll(lexList); + + storage.lexicalModels.notifyDataSetChanged(); + } + protected static ArrayList> getKeyboardsList(Context context) { return getList(context, KMManager.KMFilename_KeyboardsList); } @@ -541,6 +608,26 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O return kbKeys.contains(keyboardKey); } + public static boolean containsLexicalModel(Context context, String lexicalModelKey) { + if (lexicalModelsList == null) { + lexicalModelsList = getLexicalModelsList(context); + } + + if (lexicalModelsList == null) { + return false; + } + + for(HashMap lmInfo : lexicalModelsList) { + String key = String.format("%s_%s_%s", lmInfo.get(KMManager.KMKey_PackageID), + lmInfo.get(KMManager.KMKey_LanguageID), lmInfo.get(KMManager.KMKey_LexicalModelID)); + if (lexicalModelKey.equalsIgnoreCase(key)) { + return true; + } + } + + return false; + } + protected static int getCurrentKeyboardIndex(Context context) { int index = -1; @@ -598,6 +685,33 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O return index; } + /** + * Get the list of associated keyboards for a given language ID + * @param langId + * @return ArrayList of keyboard + */ + public static ArrayList> getAssociatedKeyboards(String langId) { + if (keyboardsList != null) { + ArrayList> associatedKeyboards = new ArrayList>(); + for (HashMap keyboardInfo: keyboardsList) { + if (keyboardInfo.get(KMManager.KMKey_LanguageID).equalsIgnoreCase(langId)) { + keyboardInfo.put(KMManager.KMKey_Icon, String.valueOf(R.drawable.ic_arrow_forward)); + keyboardInfo.put("isEnabled", "true"); + associatedKeyboards.add(keyboardInfo); + } + } + return associatedKeyboards; + } + + return null; + } + + /** + * Get the index of a lexical model key in the list of installed lexical models. + * @param context + * @param lexicalModelKey - key of "{package ID}_{language ID}_{lexical model ID}" + * @return Index >= 0 if the lexical model key exists. Otherwise -1 + */ protected static int getLexicalModelIndex(Context context, String lexicalModelKey) { int index = -1; @@ -609,10 +723,10 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O int length = lexicalModelsList.size(); for (int i=0; i < length; i++) { HashMap lmInfo = lexicalModelsList.get(i); - String langId = lmInfo.get(KMManager.KMKey_LanguageID); String pkgId = lmInfo.get(KMManager.KMKey_PackageID); + String langId = lmInfo.get(KMManager.KMKey_LanguageID); String lmId = lmInfo.get(KMManager.KMKey_LexicalModelID); - String lmKey = String.format("%s_%s_%s", langId, pkgId, lmId); + String lmKey = String.format("%s_%s_%s", pkgId, langId, lmId); if (lmKey.equals(lexicalModelKey)) { index = i; break; @@ -623,20 +737,6 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O return index; } - protected static HashMap getAssociatedLexicalModel(String langId) { - if (lexicalModelsList != null) { - int length = lexicalModelsList.size(); - for (int i = 0; i < length; i++) { - HashMap lmInfo = lexicalModelsList.get(i); - if (langId.equalsIgnoreCase(lmInfo.get(KMManager.KMKey_LanguageID))) { - return lmInfo; - } - } - } - - return null; - } - protected static HashMap getKeyboardInfo(Context context, int index) { if (index < 0) { return null; @@ -658,6 +758,23 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O return null; } + protected static HashMap getLexicalModelInfo(Context context,int index) { + if (index < 0) { + return null; + } + + if (lexicalModelsList == null) { + lexicalModelsList = getLexicalModelsList(context); + } + + if (lexicalModelsList != null && index < lexicalModelsList.size()) { + HashMap lmInfo = lexicalModelsList.get(index); + return lmInfo; + } + + return null; + } + protected static void showLanguageList(Context context) { if (KMManager.hasConnection(context) || LanguageListActivity.getCacheFile(context).exists()) { Intent i = new Intent(context, LanguageListActivity.class); @@ -673,244 +790,17 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O } } - private static void checkKeyboardUpdates(final Context context) { - new AsyncTask() { - private final boolean hasConnection = KMManager.hasConnection(context); - private ProgressDialog progressDialog; - JSONParser jsonParser = new JSONParser(); - - @Override - protected void onPreExecute() { - super.onPreExecute(); - checkingUpdates = true; - if (hasConnection) { - progressDialog = new ProgressDialog(context); - progressDialog.setMessage(context.getString(R.string.checking_keyboard_updates)); - progressDialog.setCancelable(false); - if (!((AppCompatActivity) context).isFinishing()) { - progressDialog.show(); - } else { - cancel(true); - progressDialog = null; - } - } - } - - @Override - protected Integer doInBackground(Void... voids) { - int ret = 0; - if (hasConnection && !isCancelled()) { - try { - String deviceType = context.getString(R.string.device_type); - if (deviceType.equals("AndroidTablet")) { - deviceType = "androidtablet"; - } else { - deviceType = "androidphone"; - } - - keyboardVersions = new HashMap(); - int len = keyboardsList.size(); - for (int i = 0; i < len; i++) { - String packageID = keyboardsList.get(i).get(KMManager.KMKey_PackageID); - String languageID = keyboardsList.get(i).get(KMManager.KMKey_LanguageID); - String keyboardID = keyboardsList.get(i).get(KMManager.KMKey_KeyboardID); - String kbVersion = keyboardsList.get(i).get(KMManager.KMKey_KeyboardVersion); - String url = String.format("%s/%s/%s?version=%s&device=%s&languageidtype=bcp47", - KMKeyboardDownloaderActivity.kKeymanApiBaseURL, languageID, keyboardID, BuildConfig.VERSION_NAME, deviceType); - JSONObject kbData = jsonParser.getJSONObjectFromUrl(url); - JSONObject language = kbData.optJSONObject(KMKeyboardDownloaderActivity.KMKey_Language); - JSONArray keyboards = language.getJSONArray(KMKeyboardDownloaderActivity.KMKey_LanguageKeyboards); - JSONObject keyboard = keyboards.getJSONObject(0); - String newKbVersion = keyboard.optString(KMManager.KMKey_KeyboardVersion, "1.0"); - String kbKey = String.format("%s_%s", languageID, keyboardID); - if (keyboardVersions.get(kbKey) == null) { - keyboardVersions.put(kbKey, newKbVersion); - } - - if (FileUtils.compareVersions(newKbVersion, kbVersion) == FileUtils.VERSION_GREATER) { - ret++; - } - } - } catch (Exception e) { - Log.e(TAG, "Failed to compare keyboard version. Error: " + e); - keyboardVersions = null; - ret = -1; - } - } - - return ret; - } - - @Override - protected void onProgressUpdate(Integer... progress) { - // Do nothing - } - - @Override - protected void onPostExecute(Integer result) { - if (progressDialog != null && progressDialog.isShowing()) { - try { - progressDialog.dismiss(); - progressDialog = null; - } catch (Exception e) { - progressDialog = null; - } - } - - if (result > 0) { - failedUpdateCount = 0; - updateCount = result; - AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); - dialogBuilder.setTitle(context.getString(R.string.keyboard_updates_available)); - dialogBuilder.setMessage(context.getString(R.string.confirm_update)); - dialogBuilder.setPositiveButton(context.getString(R.string.label_update), new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - // Update keyboards - if (KMManager.hasConnection(context)) { - int len = keyboardsList.size(); - for (int i = 0; i < len; i++) { - String pkgID = keyboardsList.get(i).get(KMManager.KMKey_PackageID); - String kbID = keyboardsList.get(i).get(KMManager.KMKey_KeyboardID); - String langID = keyboardsList.get(i).get(KMManager.KMKey_LanguageID); - String kbKey = String.format("%s_%s", langID, kbID); - String langName = keyboardsList.get(i).get(KMManager.KMKey_LanguageName); - String kbName = keyboardsList.get(i).get(KMManager.KMKey_KeyboardName); - String kbVersion = keyboardsList.get(i).get(KMManager.KMKey_KeyboardVersion); - String newKbVersion = keyboardVersions.get(kbKey); - if (newKbVersion != null) { - keyboardVersions.put(kbKey, newKbVersion); - if (FileUtils.compareVersions(newKbVersion, kbVersion) == FileUtils.VERSION_GREATER) { - if (updateProgress == null || !updateProgress.isShowing()) { - updateProgress = new ProgressDialog(context); - updateProgress.setMessage(context.getString(R.string.updating_keyboards)); - updateProgress.setCancelable(false); - updateProgress.show(); - } - - Bundle bundle = new Bundle(); - bundle.putString(KMKeyboardDownloaderActivity.ARG_PKG_ID, pkgID); - bundle.putString(KMKeyboardDownloaderActivity.ARG_KB_ID, kbID); - bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_ID, langID); - bundle.putString(KMKeyboardDownloaderActivity.ARG_KB_NAME, kbName); - bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_NAME, langName); - bundle.putBoolean(KMKeyboardDownloaderActivity.ARG_IS_CUSTOM, false); - Intent intent = new Intent(context, KMKeyboardDownloaderActivity.class); - intent.putExtras(bundle); - context.startActivity(intent); - } - } - } - } else { - Toast.makeText(context, "No internet connection", Toast.LENGTH_SHORT).show(); - checkingUpdates = false; - } - } - }); - - dialogBuilder.setNegativeButton(context.getString(R.string.label_later), new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - lastUpdateCheck = Calendar.getInstance(); - checkingUpdates = false; - } - }); - - AlertDialog dialog = dialogBuilder.create(); - if (!((AppCompatActivity) context).isFinishing()) { - dialog.setOnCancelListener(new OnCancelListener() { - @Override - public void onCancel(DialogInterface dialog) { - lastUpdateCheck = Calendar.getInstance(); - checkingUpdates = false; - } - }); - dialog.show(); - } else { - checkingUpdates = false; - } - } else if (result == 0) { - Toast.makeText(context, "All keyboards are up to date!", Toast.LENGTH_SHORT).show(); - lastUpdateCheck = Calendar.getInstance(); - SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - SharedPreferences.Editor editor = prefs.edit(); - editor.putLong("lastUpdateCheck", lastUpdateCheck.getTime().getTime()); - editor.commit(); - checkingUpdates = false; - } else { - Toast.makeText(context, "Failed to access Keyman server!", Toast.LENGTH_SHORT).show(); - lastUpdateCheck = Calendar.getInstance(); - updateCheckFailed = true; - checkingUpdates = false; - } - } - }.execute(); - } - - @Override - public void onKeyboardDownloadStarted(HashMap keyboardInfo) { - // Do nothing - } - - @Override - public void onKeyboardDownloadFinished(HashMap keyboardInfo, int result) { - if (result > 0) { - didUpdate = true; - String keyboardID = keyboardInfo.get(KMManager.KMKey_KeyboardID); - String languageID = keyboardInfo.get(KMManager.KMKey_LanguageID); - String kbKey = String.format("%s_%s", languageID, keyboardID); - int index = getKeyboardIndex(this, kbKey); - if (index == -1) { - // Add the downloaded keyboard if not found - addKeyboard(this, keyboardInfo); - index = getKeyboardIndex(this, kbKey); - } - keyboardsList.set(index, keyboardInfo); - saveList(this, KMManager.KMFilename_KeyboardsList); - } else if (result < 0) { - failedUpdateCount++; + static void handleDownloadedKeyboard(Context context, HashMap keyboardInfo) { + String keyboardID = keyboardInfo.get(KMManager.KMKey_KeyboardID); + String languageID = keyboardInfo.get(KMManager.KMKey_LanguageID); + String kbKey = String.format("%s_%s", languageID, keyboardID); + int index = getKeyboardIndex(context, kbKey); + if (index == -1) { + // Add the downloaded keyboard if not found + addKeyboard(context, keyboardInfo); + index = getKeyboardIndex(context, kbKey); } - - if (updateCount > 0) { - updateCount--; - } - - if (updateCount == 0 && updateProgress != null && updateProgress.isShowing()) { - if (updateProgress != null && updateProgress.isShowing()) { - try { - updateProgress.dismiss(); - updateProgress = null; - } catch (Exception e) { - updateProgress = null; - } - } - - if (failedUpdateCount > 0) { - Toast.makeText(this, "One or more keyboards failed to update!", Toast.LENGTH_SHORT).show(); - keyboardVersions = null; - lastUpdateCheck = Calendar.getInstance(); - updateFailed = true; - checkingUpdates = false; - } else { - Toast.makeText(this, "Keyboards successfully updated!", Toast.LENGTH_SHORT).show(); - lastUpdateCheck = Calendar.getInstance(); - SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); - SharedPreferences.Editor editor = prefs.edit(); - editor.putLong("lastUpdateCheck", lastUpdateCheck.getTime().getTime()); - editor.commit(); - checkingUpdates = false; - } - } - if (updateProgress != null && updateProgress.isShowing()) { - updateProgress.dismiss(); - } - } - - @Override - public void onPackageInstalled(List> keyboardsInstalled) { - // Do nothing - } - - @Override - public void onLexicalModelInstalled(List> lexicalModelsInstalled) { - // Do nothing + keyboardsList.set(index, keyboardInfo); + saveList(context, KMManager.KMFilename_KeyboardsList); } } diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardSettingsActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardSettingsActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..091208615a22e31ed2f89341cb6f425eaed2c90e --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardSettingsActivity.java @@ -0,0 +1,198 @@ +/** + * Copyright (C) 2019 SIL International. All rights reserved. + */ + +package com.tavultesoft.kmea; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; + +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +import android.app.DialogFragment; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.graphics.Typeface; +import android.net.Uri; +import android.os.Bundle; +import androidx.core.content.FileProvider; +import android.util.Log; +import android.view.View; +import android.view.Window; +import android.widget.AdapterView; +import android.widget.ListAdapter; +import android.widget.ListView; +import android.widget.SimpleAdapter; +import android.widget.TextView; +import android.widget.Toast; + +import com.tavultesoft.kmea.util.FileUtils; +import com.tavultesoft.kmea.util.FileProviderUtils; +import com.tavultesoft.kmea.util.MapCompat; + +import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_KEYBOARD; + +// Public access is necessary to avoid IllegalAccessException +public final class KeyboardSettingsActivity extends AppCompatActivity { + + private static Toolbar toolbar = null; + private static ListView listView = null; + private DialogFragment dialog; + private static ArrayList> infoList = null; + protected static Typeface titleFont = null; + private final String titleKey = "title"; + private final String subtitleKey = "subtitle"; + private final String iconKey = "icon"; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + supportRequestWindowFeature(Window.FEATURE_NO_TITLE); + final Context context = this; + final String authority = FileProviderUtils.getAuthority(context); + + setContentView(R.layout.activity_list_layout); + toolbar = (Toolbar) findViewById(R.id.list_toolbar); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayShowTitleEnabled(false); + + listView = (ListView) findViewById(R.id.listView); + + final String packageID = getIntent().getStringExtra(KMManager.KMKey_PackageID); + final String languageID = getIntent().getStringExtra(KMManager.KMKey_LanguageID); + final String languageName = getIntent().getStringExtra(KMManager.KMKey_LanguageName); + final String kbID = getIntent().getStringExtra(KMManager.KMKey_KeyboardID); + final String kbName = getIntent().getStringExtra(KMManager.KMKey_KeyboardName); + final String kbVersion = getIntent().getStringExtra(KMManager.KMKey_KeyboardVersion); + + final TextView textView = (TextView) findViewById(R.id.bar_title); + textView.setText(kbName); + if (titleFont != null) + textView.setTypeface(titleFont, Typeface.BOLD); + + infoList = new ArrayList>(); + // Display keyboard version title + final String noIcon = "0"; + HashMap hashMap = new HashMap(); + hashMap.put(titleKey, getString(R.string.keyboard_version)); + hashMap.put(subtitleKey, kbVersion); + hashMap.put(iconKey, noIcon); + infoList.add(hashMap); + + // Display keyboard help link + hashMap = new HashMap(); + final String helpUrlStr = getIntent().getStringExtra(KMManager.KMKey_HelpLink); + final String customHelpLink = getIntent().getStringExtra(KMManager.KMKey_CustomHelpLink); + // Check if app declared FileProvider + String icon = String.valueOf(R.drawable.ic_arrow_forward); + // Don't show help link arrow if File Provider unavailable, or custom help doesn't exist + if ( (customHelpLink != null && !FileProviderUtils.exists(context)) || + (customHelpLink == null && !packageID.equals(KMManager.KMDefault_UndefinedPackageID)) ) { + icon = noIcon; + } + hashMap.put(titleKey, getString(R.string.help_link)); + hashMap.put(subtitleKey, ""); + hashMap.put(iconKey, icon); + infoList.add(hashMap); + + // Display uninstall keyboard + if (!packageID.equalsIgnoreCase(KMManager.KMDefault_UndefinedPackageID) || + !kbID.equalsIgnoreCase(KMManager.KMDefault_KeyboardID)) { + hashMap = new HashMap(); + hashMap.put(titleKey, getString(R.string.uninstall_keyboard)); + hashMap.put(subtitleKey, ""); + hashMap.put(iconKey, noIcon); + infoList.add(hashMap); + } + + String[] from = new String[]{titleKey, subtitleKey, iconKey}; + int[] to = new int[]{R.id.text1, R.id.text2, R.id.image1}; + + ListAdapter adapter = new SimpleAdapter(context, infoList, R.layout.list_row_layout2, from, to) { + @Override + public boolean isEnabled(int position) { + HashMap hashMap = (HashMap)infoList.get(position); + String itemTitle = MapCompat.getOrDefault(hashMap, titleKey, ""); + String icon = MapCompat.getOrDefault(hashMap, iconKey, noIcon); + if (itemTitle.equals(getString(R.string.keyboard_version))) { + // No point in 'clicking' on version info. + return false; + // Visibly disables the help option when help isn't available + } else if (itemTitle.equals(getString(R.string.help_link)) && icon.equals(noIcon)) { + return false; + } + + return super.isEnabled(position); + } + }; + listView.setAdapter(adapter); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + HashMap hashMap = (HashMap)parent.getItemAtPosition(position); + String itemTitle = MapCompat.getOrDefault(hashMap, titleKey, ""); + + // "Help" link clicked + if (itemTitle.equals(getString(R.string.help_link))) { + Intent i = new Intent(Intent.ACTION_VIEW); + + if (customHelpLink != null) { + if (FileUtils.isWelcomeFile(customHelpLink)) { + File customHelp = new File(new File(customHelpLink).getAbsolutePath()); + i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + // Starting with Android N, you can't pass file:// to intents, so we use FileProvider + try { + Uri contentUri = FileProvider.getUriForFile( + context, authority, customHelp); + i.setDataAndType(contentUri, "text/html"); + } catch (NullPointerException e) { + String message = "FileProvider undefined in app to load" + customHelp.toString(); + Toast.makeText(context, message, Toast.LENGTH_LONG).show(); + Log.e("KeyboardSettingsActivity", message); + } + } + else { + i.setData(Uri.parse(customHelpLink)); + } + if (FileProviderUtils.exists(context)) { + startActivity(i); + } + } else { + i.setData(Uri.parse(helpUrlStr)); + startActivity(i); + } + // "Uninstall Keyboard" clicked + } else if (itemTitle.equals(getString(R.string.uninstall_keyboard))) { + // Uninstall selected keyboard + String title = String.format("%s: %s", languageName, kbName); + String keyboardKey = String.format("%s_%s", languageID, kbID); + DialogFragment dialog = ConfirmDialogFragment.newInstance( + DIALOG_TYPE_DELETE_KEYBOARD, title, getString(R.string.confirm_delete_keyboard), keyboardKey); + dialog.show(getFragmentManager(), "dialog"); + } + } + }); + } + + @Override + public boolean onSupportNavigateUp() { + super.onBackPressed(); + return true; + } + + @Override + public void onDestroy(){ + super.onDestroy(); + if ( dialog !=null ){ + dialog.dismiss(); + } + } + +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguageListActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguageListActivity.java index b14a6b1c4092fdbf18bcb63f57693055c4100fa9..cfa8d93d8e60f318c7df12d3ba3f7e6eafd7b623 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguageListActivity.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguageListActivity.java @@ -6,56 +6,57 @@ package com.tavultesoft.kmea; import java.io.File; import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.ObjectInputStream; -import java.io.ObjectOutput; -import java.io.ObjectOutputStream; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.json.JSONArray; -import org.json.JSONException; import org.json.JSONObject; import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener; -import com.tavultesoft.kmea.packages.JSONUtils; -import com.tavultesoft.kmea.util.FileUtils; +import com.tavultesoft.kmea.data.CloudRepository; +import com.tavultesoft.kmea.data.Dataset; +import com.tavultesoft.kmea.data.Keyboard; +import com.tavultesoft.kmea.data.adapters.NestedAdapter; import com.tavultesoft.kmea.util.MapCompat; -import android.annotation.SuppressLint; import android.content.DialogInterface; -import android.os.Build; + +import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; -import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; -import android.os.AsyncTask; import android.os.Bundle; import androidx.appcompat.widget.Toolbar; import android.util.Log; +import android.view.LayoutInflater; import android.view.View; +import android.view.ViewGroup; import android.view.Window; import android.widget.AdapterView; -import android.widget.ListAdapter; +import android.widget.ImageView; import android.widget.ListView; +import android.widget.TextView; import android.widget.Toast; +/** + * "Add new keyboard" + * Gets the list of installable languages from Keyman cloud and allows user to download a keyboard. + * After downloading, the new keyboard is selected. + * + * The language list is saved to a cache file "jsonKeyboardsCache.dat". + */ public final class LanguageListActivity extends AppCompatActivity implements OnKeyboardDownloadEventListener { private Context context; private static Toolbar toolbar = null; private static ListView listView = null; - private static ArrayList> languagesArrayList = null; - private boolean didExecuteParser = false; - private static final String jsonCacheFilename = "jsonCache.dat"; + private static final String TAG = "LanguageListActivity"; + // These two JSON objects and their getters are still used by legacy metadata functions. private static JSONArray languages = null; protected static JSONArray languages() { @@ -68,12 +69,11 @@ public final class LanguageListActivity extends AppCompatActivity implements OnK return options; } + // Also these. private static HashMap> keyboardsInfo = null; private static HashMap keyboardModifiedDates = null; - private int selectedIndex = 0; private static AlertDialog alertDialog; - //protected static int selectedIndex() { return selectedIndex; } @Override public void onCreate(Bundle savedInstanceState) { @@ -87,20 +87,86 @@ public final class LanguageListActivity extends AppCompatActivity implements OnK getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayShowTitleEnabled(false); + TextView textView = (TextView) findViewById(R.id.bar_title); + textView.setText(getString(R.string.title_add_language)); listView = (ListView) findViewById(R.id.listView); listView.setFastScrollEnabled(true); - languagesArrayList = new ArrayList>(); + // Establish the list view based on the CloudRepository's Dataset. + Dataset repo = CloudRepository.shared.fetchDataset(this); + + listView.setAdapter(new LanguagesAdapter(this, repo)); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + + @Override + public void onItemClick(AdapterView parent, View view, final int position, long id) { + Dataset.LanguageDataset language = ((LanguagesAdapter) listView.getAdapter()).getItem(position); + + if (language.keyboards.size() > 1) { + Intent i = new Intent(context, KeyboardListActivity.class); + i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); + //Map map = languagesArrayList.get(selectedIndex); + i.putExtra("languageCode", language.code); + i.putExtra("languageName", language.name); + + // Useful to restore the user's scroll position upon backing out. + int listPosition = listView.getFirstVisiblePosition(); + i.putExtra("listPosition", listPosition); + View v = listView.getChildAt(0); + int offsetY = (v == null) ? 0 : v.getTop(); + i.putExtra("offsetY", offsetY); + startActivityForResult(i, 1); + } else if (language.keyboards.size() == 1) { + Keyboard kbd = language.keyboards.iterator().next(); + String kbName = kbd.map.get(KMManager.KMKey_KeyboardName); + + HashMap kbInfo = new HashMap<>(kbd.map); + String pkgID = kbInfo.get(KMManager.KMKey_PackageID); + final String kbID = kbInfo.get(KMManager.KMKey_KeyboardID); + final String langID = kbInfo.get(KMManager.KMKey_LanguageID); + String kFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_Font, ""); + String kOskFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_OskFont, ""); + String isCustom = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_CustomKeyboard, "N"); + + if(pkgID == null) { + pkgID = KMManager.KMDefault_UndefinedPackageID; + } + + if (!pkgID.equals(KMManager.KMDefault_UndefinedPackageID)) { + // Custom keyboard already exists in packages/ so just add the language association + KeyboardPickerActivity.addKeyboard(context, kbInfo); + KMManager.setKeyboard(pkgID, kbID, langID, kbName, language.name, kFont, kOskFont); + Toast.makeText(context, "Keyboard installed", Toast.LENGTH_SHORT).show(); + setResult(RESULT_OK); + ((AppCompatActivity) context).finish(); + } else { + // Keyboard needs to be downloaded + Bundle bundle = kbd.buildDownloadBundle(); + Intent i = new Intent(getApplicationContext(), KMKeyboardDownloaderActivity.class); + i.putExtras(bundle); + startActivity(i); + } + } else { + // language.keyboards.size() == 0 + // No language.keyboards entries exist because of previous failure in downloading keyboard catalog + Toast.makeText(context, "One or more resources failed to update!", Toast.LENGTH_SHORT).show(); + } + } + }); + + Intent i = getIntent(); + listView.setSelectionFromTop(i.getIntExtra("listPosition", 0), i.getIntExtra("offsetY", 0)); } @Override protected void onResume() { super.onResume(); KMKeyboardDownloaderActivity.addKeyboardDownloadEventListener(this); - if (!didExecuteParser) { - didExecuteParser = true; - new JSONParse().execute(); + + if(listView.getAdapter() != null) { + LanguagesAdapter languages = ((LanguagesAdapter) listView.getAdapter()); + languages.notifyDataSetChanged(); } } @@ -169,41 +235,7 @@ public final class LanguageListActivity extends AppCompatActivity implements OnK // Do nothing. } - protected static HashMap getKeyboardInfo(int languageIndex, int keyboardIndex) { - if (languages == null) - return null; - - HashMap kbInfo = null; - try { - JSONObject language = languages.getJSONObject(languageIndex); - String langID = language.getString(KMManager.KMKey_ID); - String langName = language.getString(KMManager.KMKey_Name); - - JSONArray keyboards = language.getJSONArray(KMKeyboardDownloaderActivity.KMKey_LanguageKeyboards); - String pkgID = keyboards.getJSONObject(keyboardIndex).optString(KMManager.KMKey_PackageID, KMManager.KMDefault_UndefinedPackageID); - String kbID = keyboards.getJSONObject(keyboardIndex).getString(KMManager.KMKey_ID); - String kbName = keyboards.getJSONObject(keyboardIndex).getString(KMManager.KMKey_Name); - String kbVersion = keyboards.getJSONObject(keyboardIndex).optString(KMManager.KMKey_KeyboardVersion, "1.0"); - String isCustom = keyboards.getJSONObject(keyboardIndex).optString(KMManager.KMKey_CustomKeyboard, "N"); - String kbFont = keyboards.getJSONObject(keyboardIndex).optString(KMManager.KMKey_Font, ""); - - kbInfo = new HashMap(); - kbInfo.put(KMManager.KMKey_PackageID, pkgID); - kbInfo.put(KMManager.KMKey_KeyboardID, kbID); - kbInfo.put(KMManager.KMKey_LanguageID, langID); - kbInfo.put(KMManager.KMKey_KeyboardName, kbName); - kbInfo.put(KMManager.KMKey_LanguageName, langName); - kbInfo.put(KMManager.KMKey_KeyboardVersion, kbVersion); - kbInfo.put(KMManager.KMKey_CustomKeyboard, isCustom); - kbInfo.put(KMManager.KMKey_Font, kbFont); - } catch (JSONException e) { - kbInfo = null; - Log.e(TAG, "getKeyboardInfo - JSON Error: " + e); - } - - return kbInfo; - } - + // Still used by KMManager and/or KMKeyboard. protected static HashMap> getKeyboardsInfo(Context context) { if (keyboardsInfo != null) { return keyboardsInfo; @@ -290,359 +322,121 @@ public final class LanguageListActivity extends AppCompatActivity implements OnK } } + // Still used by KMManager and/or KMKeyboard. protected static File getCacheFile(Context context) { + final String jsonCacheFilename = "jsonKeyboardsCache.dat"; return new File(context.getCacheDir(), jsonCacheFilename); } + // Still used by KMManager and/or KMKeyboard. protected static JSONObject getCachedJSONObject(Context context) { - JSONObject jsonObj; + JSONObject jsonObj = null; try { // Read from cache file - ObjectInputStream objInput = new ObjectInputStream(new FileInputStream(getCacheFile(context))); - jsonObj = new JSONObject(objInput.readObject().toString()); - objInput.close(); + File file = getCacheFile(context); + if (file.exists()) { + ObjectInputStream objInput = new ObjectInputStream(new FileInputStream(file)); + jsonObj = new JSONObject(objInput.readObject().toString()); + objInput.close(); + } } catch (Exception e) { - Log.e("LanguageListActivity", "Failed to read from cache file. Error: " + e); + Log.e(TAG, "Failed to read from cache file. Error: " + e); jsonObj = null; } return jsonObj; } - private static void saveToCache(Context context, JSONObject jsonObj) { - ObjectOutput objOutput; - try { - // Save to cache file - objOutput = new ObjectOutputStream(new FileOutputStream(getCacheFile(context))); - objOutput.writeObject(jsonObj.toString()); - objOutput.close(); - } catch (Exception e) { - Log.e("LanguageListActivity", "Failed to save to cache file. Error: " + e); - } - } + private static void showErrorDialog(Context context, String title, String message) { + AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); - @SuppressLint("SimpleDateFormat") - protected static Date getKeyboardModifiedDate(String keyboardID) { - Date date = null; - if (keyboardModifiedDates != null) { - String modDate = keyboardModifiedDates.get(keyboardID); - if (modDate != null && !modDate.isEmpty()) { - try { - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZZZZ"); - date = dateFormat.parse(modDate); - } catch (Exception e) { - date = null; + alertDialogBuilder.setTitle(title); + alertDialogBuilder + .setMessage(message) + .setCancelable(false) + .setPositiveButton(context.getString(R.string.label_close),new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog,int id) { + if (dialog != null) { + dialog.dismiss(); } - } - } - return date; - } + } + }); - private class JSONParse extends AsyncTask { + alertDialog = alertDialogBuilder.create(); + alertDialog.show(); + } - private final boolean hasConnection = KMManager.hasConnection(context); - private ProgressDialog progressDialog; - private boolean loadFromCache; - private final String iconKey = "icon"; + // Fully details the building of this Activity's list view items. + static private class LanguagesAdapter extends NestedAdapter { + static final int RESOURCE = R.layout.list_row_layout2; + private final Context context; - @Override - protected void onPreExecute() { - super.onPreExecute(); - loadFromCache = false; - File cacheFile = getCacheFile(context); - if (cacheFile.exists()) { - Calendar lastModified = Calendar.getInstance(); - lastModified.setTime(new Date(cacheFile.lastModified())); - lastModified.add(Calendar.HOUR_OF_DAY, 1); - Calendar now = Calendar.getInstance(); - if (!hasConnection || lastModified.compareTo(now) > 0) - loadFromCache = true; - } + private static class ViewHolder { + ImageView img; + TextView textLang; + TextView textKbd; + } - if (hasConnection && !loadFromCache) { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - progressDialog = new ProgressDialog(context, R.style.AppTheme_Dialog_Progress); - } else { - progressDialog = new ProgressDialog(context); - } - progressDialog.setMessage(getString(R.string.getting_keyboard_catalog)); - progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(R.string.label_cancel), - new DialogInterface.OnClickListener() { - - @Override - public void onClick(DialogInterface dialogInterface, int which) { - cancel(true); - progressDialog.dismiss(); - progressDialog = null; - LanguageListActivity.this.finish(); - return; - } - }); - progressDialog.setCancelable(true); - if (!((AppCompatActivity) context).isFinishing()) { - progressDialog.show(); - } else { - cancel(true); - progressDialog = null; - } - } + public LanguagesAdapter(@NonNull Context context, final Dataset repo) { + super(context, RESOURCE, repo); + this.context = context; } @Override - protected JSONObject doInBackground(Void... voids) { - if (isCancelled()) { - return null; - } - - JSONParser jsonParser = new JSONParser(); - JSONObject jsonObj = null; - if (loadFromCache) { - jsonObj = getCachedJSONObject(context); - } else if (hasConnection) { - try { - String deviceType = getString(R.string.device_type); - if (deviceType.equals("AndroidTablet")) { - deviceType = "androidtablet"; - } else { - deviceType = "androidphone"; - } - String remoteUrl = String.format("%s?version=%s&device=%s&languageidtype=bcp47", - KMKeyboardDownloaderActivity.kKeymanApiBaseURL, BuildConfig.VERSION_NAME, deviceType); - jsonObj = jsonParser.getJSONObjectFromUrl(remoteUrl); - } catch (Exception e) { - jsonObj = null; - } + public View getView(int position, View convertView, ViewGroup parent) { + Dataset.LanguageDataset data = this.getItem(position); + ViewHolder holder; + + // If we're being told to reuse an existing view, do that. It's automatic optimization. + if (convertView == null) { + convertView = LayoutInflater.from(getContext()).inflate(RESOURCE, parent, false); + holder = new ViewHolder(); + + holder.img = convertView.findViewById(R.id.image1); + holder.textLang = convertView.findViewById(R.id.text1); + holder.textKbd = convertView.findViewById(R.id.text2); + convertView.setTag(holder); } else { - jsonObj = null; + holder = (ViewHolder) convertView.getTag(); } - return jsonObj; - } - - @Override - protected void onPostExecute(JSONObject jsonObj) { - if (progressDialog != null && progressDialog.isShowing()) { - try { - progressDialog.dismiss(); - progressDialog = null; - } catch (Exception e) { - progressDialog = null; - } - } + convertView.setAlpha(1.0f); - // Consolidate kmp.json info from packages/ - JSONArray kmpLanguagesArray = JSONUtils.getLanguages(); - if (jsonObj == null && kmpLanguagesArray.length() == 0) { - Toast.makeText(context, "Failed to access Keyman server!", Toast.LENGTH_SHORT).show(); - finish(); - return; - } else if (!loadFromCache) { - saveToCache(context, jsonObj); - } + holder.textLang.setText(data.name); + holder.img.setImageResource(0); - try { - keyboardsInfo = new HashMap>(); - keyboardModifiedDates = new HashMap(); + if(data.keyboards.size() == 1) { + Keyboard kbd = data.keyboards.iterator().next(); + holder.textKbd.setText(kbd.map.get(KMManager.KMKey_KeyboardName)); - if (!hasConnection) { - // When offline, only use keyboards available from kmp.json - // Use default options - options = JSONUtils.defaultOptions(context.getString(R.string.device_type)); - languages = kmpLanguagesArray; - } else { - // Otherwise, merge kmpLanguagesArray with cloud languagesArray - options = jsonObj.getJSONObject(KMKeyboardDownloaderActivity.KMKey_Options); - languages = jsonObj.getJSONObject(KMKeyboardDownloaderActivity.KMKey_Languages).getJSONArray(KMKeyboardDownloaderActivity.KMKey_Languages); - for (int i = 0; i < kmpLanguagesArray.length(); i++) { - JSONObject kmpLanguage = kmpLanguagesArray.getJSONObject(i); - String kmpLanguageID = kmpLanguage.getString("id"); - int languageIndex = JSONUtils.findID(languages, kmpLanguageID); - if (languageIndex == -1) { - // Add new language object - languages.put(kmpLanguage); - } else { - // Merge language info - JSONObject language = languages.getJSONObject(languageIndex); - JSONArray keyboards = language.getJSONArray("keyboards"); - JSONArray kmpKeyboards = kmpLanguage.getJSONArray("keyboards"); - for (int j = 0; j < kmpKeyboards.length(); j++) { - JSONObject kmpKeyboard = kmpKeyboards.getJSONObject(j); - String kmpKeyboardID = kmpKeyboard.getString("id"); - int keyboardIndex = JSONUtils.findID(keyboards, kmpKeyboardID); - if (keyboardIndex == -1) { - // Add new keyboard object - keyboards.put(kmpKeyboard); - } else { - // Merge keyboard info - JSONObject keyboard = keyboards.getJSONObject(keyboardIndex); - - String keyboardVersion = keyboard.getString(KMManager.KMKey_KeyboardVersion); - String kmpKeyboardVersion = kmpKeyboard.getString(KMManager.KMKey_KeyboardVersion); - int versionComparison = FileUtils.compareVersions(kmpKeyboardVersion, keyboardVersion); - if ((versionComparison == FileUtils.VERSION_GREATER) || (versionComparison == FileUtils.VERSION_EQUAL)) { - // Keyboard from package >= Keyboard from cloud so replace keyboard entry with local kmp info - keyboards.put(keyboardIndex, kmpKeyboard); - } - } - } - } - } + if (!isEnabled(position)) { + convertView.setAlpha(0.25f); + holder.img.setImageResource(R.drawable.ic_check); } + } else { + holder.textKbd.setText(""); + holder.img.setImageResource(R.drawable.ic_arrow_forward); + } - int langLength = languages.length(); - for (int i = 0; i < langLength; i++) { - JSONObject language = languages.getJSONObject(i); - - String kbKey = ""; - String kbID = ""; - String langID = language.getString(KMManager.KMKey_ID); - String kbName = ""; - String langName = language.getString(KMManager.KMKey_Name); - String kbVersion = "1.0"; - String isCustom = "N"; - String kbFont = ""; - String icon = "0"; - String isEnabled = "true"; - JSONArray langKeyboards = language.getJSONArray(KMKeyboardDownloaderActivity.KMKey_LanguageKeyboards); - JSONObject keyboard = null; - - int kbLength = langKeyboards.length(); - if (kbLength == 1) { - keyboard = langKeyboards.getJSONObject(0); - kbID = keyboard.getString(KMManager.KMKey_ID); - kbName = keyboard.getString(KMManager.KMKey_Name); - kbVersion = keyboard.optString(KMManager.KMKey_KeyboardVersion, "1.0"); - kbFont = keyboard.optString(KMManager.KMKey_Font, ""); - - kbKey = String.format("%s_%s", langID, kbID); - if (KeyboardPickerActivity.containsKeyboard(context, kbKey)) { - isEnabled = "false"; - icon = String.valueOf(R.drawable.ic_check); - } - - HashMap hashMap = new HashMap(); - hashMap.put(KMManager.KMKey_KeyboardName, kbName); - hashMap.put(KMManager.KMKey_LanguageName, langName); - hashMap.put(KMManager.KMKey_KeyboardVersion, kbVersion); - hashMap.put(KMManager.KMKey_CustomKeyboard, isCustom); - hashMap.put(KMManager.KMKey_Font, kbFont); - keyboardsInfo.put(kbKey, hashMap); - - if (keyboardModifiedDates.get(kbID) == null) - keyboardModifiedDates.put(kbID, keyboard.getString(KMManager.KMKey_KeyboardModified)); - } else { - icon = String.valueOf(R.drawable.ic_arrow_forward); - for (int j = 0; j < kbLength; j++) { - keyboard = langKeyboards.getJSONObject(j); - kbID = keyboard.getString(KMManager.KMKey_ID); - kbName = keyboard.getString(KMManager.KMKey_Name); - kbVersion = keyboard.optString(KMManager.KMKey_KeyboardVersion, "1.0"); - kbFont = keyboard.optString(KMManager.KMKey_Font, ""); - - kbKey = String.format("%s_%s", langID, kbID); - HashMap hashMap = new HashMap(); - hashMap.put(KMManager.KMKey_KeyboardName, kbName); - hashMap.put(KMManager.KMKey_LanguageName, langName); - hashMap.put(KMManager.KMKey_KeyboardVersion, kbVersion); - hashMap.put(KMManager.KMKey_CustomKeyboard, isCustom); - hashMap.put(KMManager.KMKey_Font, kbFont); - keyboardsInfo.put(kbKey, hashMap); - - if (keyboardModifiedDates.get(kbID) == null) - keyboardModifiedDates.put(kbID, keyboard.getString(KMManager.KMKey_KeyboardModified)); - } - kbName = ""; - } - - HashMap hashMap = new HashMap(); - hashMap.put(KMManager.KMKey_LanguageName, langName); - hashMap.put(KMManager.KMKey_KeyboardName, kbName); - hashMap.put(iconKey, icon); - hashMap.put("isEnabled", isEnabled); - languagesArrayList.add(hashMap); - } + return convertView; + } - String[] from = new String[]{KMManager.KMKey_LanguageName, KMManager.KMKey_KeyboardName, iconKey}; - int[] to = new int[]{R.id.text1, R.id.text2, R.id.image1}; - ListAdapter adapter = new KMListAdapter(context, languagesArrayList, R.layout.list_row_layout2, from, to); - listView.setAdapter(adapter); - listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { - - @Override - public void onItemClick(AdapterView parent, View view, final int position, long id) { - selectedIndex = position; - String kbName = languagesArrayList.get(+position).get(KMManager.KMKey_KeyboardName); - String langName = languagesArrayList.get(+position).get(KMManager.KMKey_LanguageName); - - if (kbName == "") { - Intent i = new Intent(context, KeyboardListActivity.class); - i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); - i.putExtra("selectedIndex", selectedIndex); - int listPosition = listView.getFirstVisiblePosition(); - i.putExtra("listPosition", listPosition); - View v = listView.getChildAt(0); - int offsetY = (v == null) ? 0 : v.getTop(); - i.putExtra("offsetY", offsetY); - startActivityForResult(i, 1); - } else { - HashMap kbInfo = getKeyboardInfo(selectedIndex, 0); - final String pkgID = kbInfo.get(KMManager.KMKey_PackageID); - final String kbID = kbInfo.get(KMManager.KMKey_KeyboardID); - final String langID = kbInfo.get(KMManager.KMKey_LanguageID); - String kFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_Font, ""); - String kOskFont = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_OskFont, ""); - String isCustom = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_CustomKeyboard, "N"); - - if (!pkgID.equals(KMManager.KMDefault_UndefinedPackageID)) { - // Custom keyboard already exists in packages/ so just add the language association - KeyboardPickerActivity.addKeyboard(context, kbInfo); - KMManager.setKeyboard(pkgID, kbID, langID, kbName, langName, kFont, kOskFont); - Toast.makeText(context, "Keyboard installed", Toast.LENGTH_SHORT).show(); - setResult(RESULT_OK); - ((AppCompatActivity) context).finish(); - } else { - // Keyboard needs to be downloaded - Bundle bundle = new Bundle(); - bundle.putString(KMKeyboardDownloaderActivity.ARG_PKG_ID, pkgID); - bundle.putString(KMKeyboardDownloaderActivity.ARG_KB_ID, kbID); - bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_ID, langID); - bundle.putString(KMKeyboardDownloaderActivity.ARG_KB_NAME, kbName); - bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_NAME, langName); - bundle.putBoolean(KMKeyboardDownloaderActivity.ARG_IS_CUSTOM, isCustom.toUpperCase().equals("Y")); - Intent i = new Intent(getApplicationContext(), KMKeyboardDownloaderActivity.class); - i.putExtras(bundle); - startActivity(i); - } - } - } - }); + @Override + public boolean isEnabled(int position) { + Dataset.LanguageDataset data = this.getItem(position); - Intent i = getIntent(); - listView.setSelectionFromTop(i.getIntExtra("listPosition", 0), i.getIntExtra("offsetY", 0)); - } catch (JSONException e) { - Log.e("JSONParse", "Error: " + e); + if(data.keyboards.size() != 1) { + return true; } - } - } - private static void showErrorDialog(Context context, String title, String message) { - AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); + Keyboard kbd = data.keyboards.iterator().next(); - alertDialogBuilder.setTitle(title); - alertDialogBuilder - .setMessage(message) - .setCancelable(false) - .setPositiveButton(context.getString(R.string.label_close),new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog,int id) { - if (dialog != null) { - dialog.dismiss(); - } - } - }); + final String langID = kbd.map.get(KMManager.KMKey_LanguageID); // Has the selected language code. + String kbID = kbd.map.get(KMManager.KMKey_KeyboardID); - alertDialog = alertDialogBuilder.create(); - alertDialog.show(); + String kbKey = String.format("%s_%s", langID, kbID); + return !KeyboardPickerActivity.containsKeyboard(context, kbKey); + } } - } \ No newline at end of file diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguageSettingsActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguageSettingsActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..bb47a60501b61c15e88f876558bf4e762d4099ae --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguageSettingsActivity.java @@ -0,0 +1,375 @@ +/** + * Copyright (C) 2019 SIL International. All rights reserved. + */ + +package com.tavultesoft.kmea; + +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Bundle; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.widget.AdapterView; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.SwitchCompat; +import androidx.appcompat.widget.Toolbar; + +import com.tavultesoft.kmea.data.CloudRepository; +import com.tavultesoft.kmea.data.Dataset; +import com.tavultesoft.kmea.data.Keyboard; +import com.tavultesoft.kmea.data.adapters.NestedAdapter; +import com.tavultesoft.kmea.util.MapCompat; + +import java.util.HashMap; + +/** + * Keyman Settings --> Languages Settings --> Language Settings + * Displays a list of installed keyboards and some lexical model switches. + */ +public final class LanguageSettingsActivity extends AppCompatActivity { + private Context context; + private static Toolbar toolbar = null; + private static ListView listView = null; + private static TextView lexicalModelTextView = null; + private static TextView correctionsTextView = null; + private static SwitchCompat correctionsToggle = null; + private ImageButton addButton = null; + private String associatedLexicalModel = ""; + private String lgCode; + private String lgName; + private String customHelpLink; + private SharedPreferences prefs; + + private final static String TAG = "LanguageSettingsAct"; + + private final static String predictionPrefSuffix = ".mayPredict"; + private final static String correctionPrefSuffix = ".mayCorrect"; + + private class PreferenceToggleListener implements View.OnClickListener { + String prefsKey; + String lgCode; + + public PreferenceToggleListener(String prefsKey, String lgCode) { + this.prefsKey = prefsKey; + this.lgCode = lgCode; + } + + @Override + public void onClick(View v) { + // For predictions/corrections toggle + SwitchCompat toggle = (SwitchCompat) v; + + SharedPreferences.Editor prefEditor = prefs.edit(); + + // predictionsToggle overrides correctionToggle and correctionsTextView + if (prefsKey.endsWith(predictionPrefSuffix)) { + boolean override = toggle.isChecked(); + overrideCorrectionsToggle(override); + } + + // This will allow preemptively making settings for languages without models. + // Seems more trouble than it's worth to block this. + prefEditor.putBoolean(prefsKey, toggle.isChecked()); + prefEditor.apply(); + + // Don't use/apply language modeling settings for languages without models. + if (associatedLexicalModel.isEmpty()) { + return; + } + + // If the active keyboard is for this language, immediately enact the new pref setting. + String kbdLgCode = KMManager.getCurrentKeyboardInfo(context).get(KMManager.KMKey_LanguageID); + if (kbdLgCode.equals(lgCode)) { + // Not only registers the model but also applies our modeling preferences. + KMManager.registerAssociatedLexicalModel(lgCode); + } + } + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + supportRequestWindowFeature(Window.FEATURE_NO_TITLE); + context = this; + setContentView(R.layout.language_settings_list_layout); + + toolbar = (Toolbar) findViewById(R.id.list_toolbar); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayShowTitleEnabled(false); + TextView textView = (TextView) findViewById(R.id.bar_title); + + listView = (ListView) findViewById(R.id.listView); + listView.setFastScrollEnabled(true); + + Bundle bundle = getIntent().getExtras(); + if (bundle == null) { + // Should never actually happen. + Log.e(TAG, "Language data not specified for LanguageSettingsActivity!"); + finish(); + + if(KMManager.isDebugMode()) { + throw new NullPointerException("Language data not specified for LanguageSettingsActivity!"); + } else { + return; + } + } + + lgCode = bundle.getString(KMManager.KMKey_LanguageID); + lgName = bundle.getString(KMManager.KMKey_LanguageName); + customHelpLink = bundle.getString(KMManager.KMKey_CustomHelpLink); + + // Necessary to properly insert a language name into the title. (Has a %s slot for it.) + String title = String.format(getString(R.string.title_language_settings), lgName); + textView.setText(title); + + FilteredKeyboardsAdapter adapter = new FilteredKeyboardsAdapter(context, KeyboardPickerActivity.getInstalledDataset(context), lgCode); + + // The following two layouts/toggles will need to link with these objects. + Context appContext = this.getApplicationContext(); + prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + boolean mayPredict = prefs.getBoolean(getLanguagePredictionPreferenceKey(lgCode), true); + boolean mayCorrect = prefs.getBoolean(getLanguageCorrectionPreferenceKey(lgCode), true); + + RelativeLayout layout = (RelativeLayout)findViewById(R.id.corrections_toggle); + + correctionsTextView = (TextView) layout.findViewById(R.id.text1); + correctionsTextView.setText(getString(R.string.enable_corrections)); + correctionsToggle = layout.findViewById(R.id.toggle); + correctionsToggle.setChecked(mayCorrect); // Link to persistent option storage! Also needs handler. + String prefsKey = getLanguageCorrectionPreferenceKey(lgCode); + correctionsToggle.setOnClickListener(new PreferenceToggleListener(prefsKey, lgCode)); + + layout = (RelativeLayout)findViewById(R.id.predictions_toggle); + + textView = (TextView) layout.findViewById(R.id.text1); + textView.setText(getString(R.string.enable_predictions)); + SwitchCompat predictionsToggle = layout.findViewById(R.id.toggle); + predictionsToggle.setChecked(mayPredict); // Link to persistent option storage! Also needs handler. + prefsKey = getLanguagePredictionPreferenceKey(lgCode); + predictionsToggle.setOnClickListener(new PreferenceToggleListener(prefsKey, lgCode)); + + overrideCorrectionsToggle(mayPredict); + + layout = (RelativeLayout)findViewById(R.id.model_picker); + textView = (TextView) layout.findViewById(R.id.text1); + textView.setText(getString(R.string.model)); + + lexicalModelTextView = layout.findViewById(R.id.text2); + + updateActiveLexicalModel(); + + ImageView imageView = (ImageView) layout.findViewById(R.id.image1); + imageView.setImageResource(R.drawable.ic_arrow_forward); + layout.setEnabled(true); + layout.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + // Start ModelPickerActivity + Bundle bundle = new Bundle(); + bundle.putString(KMManager.KMKey_LanguageID, lgCode); + bundle.putString(KMManager.KMKey_LanguageName, lgName); + bundle.putString(KMManager.KMKey_CustomHelpLink, customHelpLink); + Intent i = new Intent(context, ModelPickerActivity.class); + i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); + i.putExtras(bundle); + startActivity(i); + } + }); + + /** + * This is a placeholder for "Manage dictionary" settings + * + * layout = (RelativeLayout)findViewById(R.id.manage_dictionary); + * textView = (TextView) layout.findViewById(R.id.text1); + * textView.setText(getString(R.string.manage_dictionary)); + * imageView = (ImageView) layout.findViewById(R.id.image1); + * imageView.setImageResource(R.drawable.ic_arrow_forward); + */ + + listView.setAdapter(adapter); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + listView.setItemChecked(position, true); + listView.setSelection(position); + Keyboard kbd = ((FilteredKeyboardsAdapter) listView.getAdapter()).getItem(position); + HashMap kbInfo = new HashMap<>(kbd.map); + String packageID = kbInfo.get(KMManager.KMKey_PackageID); + String keyboardID = kbInfo.get(KMManager.KMKey_KeyboardID); + if (packageID == null || packageID.isEmpty()) { + packageID = KMManager.KMDefault_UndefinedPackageID; + } + Intent intent = new Intent(context, KeyboardSettingsActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); + intent.putExtra(KMManager.KMKey_PackageID, packageID); + intent.putExtra(KMManager.KMKey_KeyboardID, keyboardID); + intent.putExtra(KMManager.KMKey_LanguageID, kbInfo.get(KMManager.KMKey_LanguageID)); + intent.putExtra(KMManager.KMKey_LanguageName, kbInfo.get(KMManager.KMKey_LanguageName)); + intent.putExtra(KMManager.KMKey_KeyboardName, kbInfo.get(KMManager.KMKey_KeyboardName)); + String keyboardVersion = KMManager.getLatestKeyboardFileVersion(context, packageID, keyboardID); + intent.putExtra(KMManager.KMKey_KeyboardVersion, keyboardVersion); + boolean isCustom = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_CustomKeyboard, "N").equals("Y") ? true : false; + intent.putExtra(KMManager.KMKey_CustomKeyboard, isCustom); + String customHelpLink = kbInfo.get(KMManager.KMKey_CustomHelpLink); + if (customHelpLink != null) { + intent.putExtra(KMManager.KMKey_CustomHelpLink, customHelpLink); + } else { + intent.putExtra(KMManager.KMKey_HelpLink, + String.format("https://help.keyman.com/keyboard/%s/%s/", keyboardID, keyboardVersion)); + } + startActivity(intent); + } + }); + + addButton = (ImageButton) findViewById(R.id.add_button); + addButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + // Check that available keyboard information can be obtained via: + // 1. connection to cloud catalog + // 2. cached file + // 3. local kmp.json files in packages/ + if (KMManager.hasConnection(context) || CloudRepository.shared.hasCache(context) || + KeyboardPickerActivity.hasKeyboardFromPackage()){ + // Rework to use languuage-specific (KeyboardList) picker! + Intent i = new Intent(context, KeyboardListActivity.class); + i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); + i.putExtra("languageCode", lgCode); + i.putExtra("languageName", lgName); + context.startActivity(i); + } else { + AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); + dialogBuilder.setTitle(getString(R.string.title_add_keyboard)); + dialogBuilder.setMessage(String.format("\n%s\n", getString(R.string.cannot_connect))); + dialogBuilder.setPositiveButton(getString(R.string.label_ok), null); + AlertDialog dialog = dialogBuilder.create(); + dialog.show(); + } + } + }); + } + + @Override + public void onResume() { + super.onResume(); + + FilteredKeyboardsAdapter adapter = ((FilteredKeyboardsAdapter) listView.getAdapter()); + + if(adapter != null) { + // Despite the fact that updates should have been auto-triggered anyway, it seems that we + // need a manual call here for things to happen in a timely fashion. + adapter.notifyDataSetChanged(); + } + + updateActiveLexicalModel(); + } + + public void updateActiveLexicalModel() { + HashMap lexModelMap = KMManager.getAssociatedLexicalModel(lgCode); + if(lexModelMap != null) { + associatedLexicalModel = lexModelMap.get(KMManager.KMKey_LexicalModelName); + } else { + associatedLexicalModel = ""; + } + if (!associatedLexicalModel.isEmpty()) { + lexicalModelTextView.setText(associatedLexicalModel); + lexicalModelTextView.setEnabled(true); + } else { + lexicalModelTextView.setText(""); + lexicalModelTextView.setEnabled(false); + } + } + + @Override + public void onPause() { + super.onPause(); + } + + @Override + public boolean onSupportNavigateUp() { + onBackPressed(); + return true; + } + + @Override + public void onBackPressed() { + finish(); + } + + public static String getLanguagePredictionPreferenceKey(String langID) { + return langID + predictionPrefSuffix; + } + + public static String getLanguageCorrectionPreferenceKey(String langID) { + return langID + correctionPrefSuffix; + } + + /** + * Overrides the enable and visibility of corrections toggle, + * and overrides the enable of the corrections text view. + * Does not change the corrections toggle value. + * @param override boolean - Value from predictions toggle + * When true, enables corrections toggle and text field, and makes corrections toggle visible + * When false, disables corrections toggle and text field, and makes corrections toggle invisible + */ + private void overrideCorrectionsToggle(boolean override) { + if (correctionsTextView != null) { + correctionsTextView.setEnabled(override); + } + if (correctionsToggle != null) { + correctionsToggle.setEnabled(override); + int visibility = override ? View.VISIBLE : View.INVISIBLE; + correctionsToggle.setVisibility(visibility); + } + } + + // Fully details the building of this Activity's list view items. + static private class FilteredKeyboardsAdapter extends NestedAdapter { + static final int RESOURCE = R.layout.list_row_layout1; + + private static class ViewHolder { + ImageView img; + TextView text; + } + + public FilteredKeyboardsAdapter(@NonNull Context context, final Dataset storage, final String languageCode) { + // Goal: to not need a custom filter here, instead relying on LanguageDataset's built-in filters. + super(context, RESOURCE, storage.keyboards, storage.keyboardFilter, languageCode); + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + com.tavultesoft.kmea.data.Keyboard kbd = this.getItem(position); + ViewHolder holder; + + // If we're being told to reuse an existing view, do that. It's automatic optimization. + if (convertView == null) { + convertView = LayoutInflater.from(getContext()).inflate(RESOURCE, parent, false); + holder = new ViewHolder(); + holder.img = convertView.findViewById(R.id.image1); + holder.text = convertView.findViewById(R.id.text1); + convertView.setTag(holder); + } else { + holder = (ViewHolder) convertView.getTag(); + } + + holder.text.setText(kbd.map.get(KMManager.KMKey_KeyboardName)); + holder.img.setImageResource(R.drawable.ic_arrow_forward); + + return convertView; + } + } +} \ No newline at end of file diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguagesSettingsActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguagesSettingsActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..50fd72cd8fffbcbe7853b46966be743741f31c91 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/LanguagesSettingsActivity.java @@ -0,0 +1,429 @@ +/** + * Copyright (C) 2019 SIL International. All rights reserved. + */ + +package com.tavultesoft.kmea; + +import android.app.ProgressDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Bundle; +import android.os.Handler; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.widget.AdapterView; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +import com.tavultesoft.kmea.data.CloudRepository; +import com.tavultesoft.kmea.data.Dataset; +import com.tavultesoft.kmea.data.adapters.AdapterFilter; +import com.tavultesoft.kmea.data.adapters.NestedAdapter; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Keyman Settings --> Languages Settings + * Displays a list of installed languages and a count of their associated installed keyboards. + */ +public final class LanguagesSettingsActivity extends AppCompatActivity + implements KeyboardEventHandler.OnKeyboardDownloadEventListener, CloudRepository.UpdateHandler { + + private Context context; + private static Toolbar toolbar = null; + private static ListView listView = null; + private static ImageButton addButton = null; + + // ********* ONLY USED BY UPDATE CODE *********** + + private static boolean updateCheckFailed = false; + private static boolean updateFailed = false; + private static Calendar lastUpdateCheck = null; + private static boolean checkingUpdates = false; + + private static int updateCount = 0; + private static int failedUpdateCount = 0; + private static ProgressDialog updateProgress; + + // ****** END - ONLY USED BY UPDATE CODE ******** + + private boolean dismissOnSelect = false; + protected static boolean canAddNewKeyboard = true; + + private static String TAG = "LanguagesSettingsActivity"; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + supportRequestWindowFeature(Window.FEATURE_NO_TITLE); + context = this; + setContentView(R.layout.languages_settings_list_layout); + + toolbar = (Toolbar) findViewById(R.id.list_toolbar); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayShowTitleEnabled(false); + TextView textView = (TextView) findViewById(R.id.bar_title); + textView.setText(getString(R.string.title_languages_settings)); + + listView = (ListView) findViewById(R.id.listView); + listView.setFastScrollEnabled(true); + + Dataset storage = KeyboardPickerActivity.getInstalledDataset(this); + LanguagesAdapter listAdapter = new LanguagesAdapter(this, storage); + + listView.setAdapter(listAdapter); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + LanguagesAdapter adapter = ((LanguagesAdapter) listView.getAdapter()); + + Dataset.LanguageDataset languageData = adapter.getItem(position); + String langId = languageData.code; + String langName = languageData.name; + + HashMap associatedLexicalModel = KMManager.getAssociatedLexicalModel(langId); + + Bundle args = new Bundle(); + args.putString(KMManager.KMKey_LanguageID, langId); + args.putString(KMManager.KMKey_LanguageName, langName); + + if(associatedLexicalModel != null) { + args.putString(KMManager.KMKey_LexicalModelName, associatedLexicalModel.get(KMManager.KMKey_LexicalModelName)); + args.putString(KMManager.KMKey_CustomHelpLink, associatedLexicalModel.get(KMManager.KMKey_CustomHelpLink)); + } + + Intent intent = new Intent(context, LanguageSettingsActivity.class); + intent.putExtras(args); + startActivity(intent); + + if (dismissOnSelect) + finish(); + } + }); + + addButton = (ImageButton) findViewById(R.id.add_button); + addButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + // Check that available keyboard information can be obtained via: + // 1. connection to cloud catalog + // 2. cached file + // 3. local kmp.json files in packages/ + if (KMManager.hasConnection(context) || LanguageListActivity.getCacheFile(context).exists() || + KeyboardPickerActivity.hasKeyboardFromPackage()){ + dismissOnSelect = false; + Intent i = new Intent(context, LanguageListActivity.class); + i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); + context.startActivity(i); + } else { + AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); + dialogBuilder.setTitle(getString(R.string.title_add_keyboard)); + dialogBuilder.setMessage(String.format("\n%s\n", getString(R.string.cannot_connect))); + dialogBuilder.setPositiveButton(getString(R.string.label_ok), null); + AlertDialog dialog = dialogBuilder.create(); + dialog.show(); + } + } + }); + if (!canAddNewKeyboard) { + addButton.setVisibility(View.GONE); + } + } + + @Override + public void onResume() { + super.onResume(); + + // From here on is update-specific stuff. + KMKeyboardDownloaderActivity.addKeyboardDownloadEventListener(this); + + final Context context = this; + Handler handler = new Handler(); + handler.postDelayed(new Runnable() { + @Override + public void run() { + boolean shouldCheckUpdate = false; + if (lastUpdateCheck == null) { + SharedPreferences prefs = context.getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + Long lastUpdateCheckTime = prefs.getLong("lastUpdateCheck", 0); + if (lastUpdateCheckTime > 0) { + lastUpdateCheck = Calendar.getInstance(); + lastUpdateCheck.setTime(new Date(lastUpdateCheckTime)); + } + } + + if (lastUpdateCheck != null) { + Calendar lastChecked = Calendar.getInstance(); + lastChecked.setTime(lastUpdateCheck.getTime()); + if (updateCheckFailed || updateFailed) { + lastChecked.add(Calendar.HOUR_OF_DAY, 1); + } else { + lastChecked.add(Calendar.HOUR_OF_DAY, 24); + } + + Calendar now = Calendar.getInstance(); + if (now.compareTo(lastChecked) > 0) { + shouldCheckUpdate = true; + } + } else { + shouldCheckUpdate = true; + } + + // TODO: Extremely temporary code for testing - remove before merging! + shouldCheckUpdate = true; + + if (shouldCheckUpdate) { + updateCheckFailed = false; + updateFailed = false; + if (!checkingUpdates) { + checkResourceUpdates(context); + } + } + } + }, 1000); + } + + @Override + public void onPause() { + super.onPause(); + + // Intentionally not removing KeyboardDownloadEventListener to + // ensure onKeyboardDownloadFinished() gets called + // (Transplanted from KeyboardPickerActivity.) + } + + @Override + public boolean onSupportNavigateUp() { + onBackPressed(); + return true; + } + + @Override + public void onBackPressed() { + finish(); + } + + // Fully details the building of this Activity's list view items. + static private class LanguagesAdapter extends NestedAdapter { + static final int RESOURCE = R.layout.list_row_layout2; + + private static class ViewHolder { + ImageView img; + TextView textLang; + TextView textCount; + } + + public LanguagesAdapter(@NonNull Context context, final Dataset storage) { + super(context, RESOURCE, storage, new AdapterFilter() { + public List selectFrom(Dataset dataset, Void dummy) { + // Filter out any languages without installed keyboards. This can occur with ad-hoc + // lexical model installations. + ArrayList languages = new ArrayList<>(); + + for(Dataset.LanguageDataset language: dataset.asList()) { + if(language.keyboards.size() > 0) { + languages.add(language); + } + } + + return languages; + } + }, null); + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + Dataset.LanguageDataset data = this.getItem(position); + ViewHolder holder; + + // If we're being told to reuse an existing view, do that. It's automatic optimization. + if (convertView == null) { + convertView = LayoutInflater.from(getContext()).inflate(RESOURCE, parent, false); + holder = new ViewHolder(); + + holder.img = convertView.findViewById(R.id.image1); + holder.textLang = convertView.findViewById(R.id.text1); + holder.textCount = convertView.findViewById(R.id.text2); + convertView.setTag(holder); + } else { + holder = (ViewHolder) convertView.getTag(); + } + + holder.textLang.setText(data.name); + holder.img.setImageResource(R.drawable.ic_arrow_forward); + + if(data.keyboards.size() == 1) { + holder.textCount.setText(this.getContext().getString(R.string.single_keyboard_count)); + } else { + String msg = String.format(this.getContext().getString(R.string.multiple_keyboard_count), data.keyboards.size()); + holder.textCount.setText(msg); + } + + return convertView; + } + } + + private void checkResourceUpdates(final Context context) { + + Runnable onSuccess = new Runnable() { + public void run() { + if(updateCount > 0) { + return; + } + + Toast.makeText(context, context.getString(R.string.update_check_current), Toast.LENGTH_SHORT).show(); + lastUpdateCheck = Calendar.getInstance(); + SharedPreferences prefs = context.getSharedPreferences(context.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + SharedPreferences.Editor editor = prefs.edit(); + editor.putLong("lastUpdateCheck", lastUpdateCheck.getTime().getTime()); + editor.commit(); + checkingUpdates = false; + } + }; + + Runnable onFailure = new Runnable() { + public void run() { + if(updateCount > 0) { + return; + } + + Toast.makeText(context, context.getString(R.string.update_check_unavailable), Toast.LENGTH_SHORT).show(); + lastUpdateCheck = Calendar.getInstance(); + updateCheckFailed = true; + checkingUpdates = false; + } + }; + + checkingUpdates = true; + CloudRepository.shared.fetchDataset(this, this, onSuccess, onFailure); + } + + public void onUpdateDetection(final List updatableResources) { + failedUpdateCount = 0; + updateCount = updatableResources.size(); + AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); + dialogBuilder.setTitle(context.getString(R.string.keyboard_updates_available)); + dialogBuilder.setMessage(context.getString(R.string.confirm_update)); + dialogBuilder.setPositiveButton(context.getString(R.string.label_update), new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + // Update keyboards + if (KMManager.hasConnection(context)) { + // For each updatable keyboard, one at a time, do the update. + // TODO: May need a reework to better handle large amounts of updates - + // these calls will stack within the Android subsystem and may have issues accordingly. + for (Bundle resourceBundle: updatableResources) { + Intent intent = new Intent(context, KMKeyboardDownloaderActivity.class); + intent.putExtras(resourceBundle); + context.startActivity(intent); + } + } else { + Toast.makeText(context, "No internet connection", Toast.LENGTH_SHORT).show(); + checkingUpdates = false; + } + } + }); + + dialogBuilder.setNegativeButton(context.getString(R.string.label_later), new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + lastUpdateCheck = Calendar.getInstance(); + checkingUpdates = false; + } + }); + + AlertDialog dialog = dialogBuilder.create(); + if (!((AppCompatActivity) context).isFinishing()) { + dialog.setOnCancelListener(new DialogInterface.OnCancelListener() { + @Override + public void onCancel(DialogInterface dialog) { + lastUpdateCheck = Calendar.getInstance(); + checkingUpdates = false; + } + }); + dialog.show(); + } else { + checkingUpdates = false; + } + } + + @Override + public void onKeyboardDownloadStarted(HashMap keyboardInfo) { + // Do nothing + } + + @Override + public void onKeyboardDownloadFinished(HashMap keyboardInfo, int result) { + if (result > 0) { + KeyboardPickerActivity.handleDownloadedKeyboard(this, keyboardInfo); + } else if (result < 0) { + failedUpdateCount++; + } + + if (updateCount > 0) { + updateCount--; + } + + tryFinalizeUpdate(); + } + + @Override + public void onPackageInstalled(List> keyboardsInstalled) { + // Do nothing + } + + @Override + public void onLexicalModelInstalled(List> lexicalModelsInstalled) { + if (updateCount > 0) { + updateCount -= lexicalModelsInstalled.size(); + } + + tryFinalizeUpdate(); + } + + void tryFinalizeUpdate() { + if (updateCount == 0 && updateProgress != null && updateProgress.isShowing()) { + if (updateProgress != null && updateProgress.isShowing()) { + try { + updateProgress.dismiss(); + updateProgress = null; + } catch (Exception e) { + updateProgress = null; + } + } + + if (failedUpdateCount > 0) { + Toast.makeText(this, "One or more resources failed to update!", Toast.LENGTH_SHORT).show(); + lastUpdateCheck = Calendar.getInstance(); + updateFailed = true; + checkingUpdates = false; + } else { + Toast.makeText(this, "Resources successfully updated!", Toast.LENGTH_SHORT).show(); + lastUpdateCheck = Calendar.getInstance(); + SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE); + SharedPreferences.Editor editor = prefs.edit(); + editor.putLong("lastUpdateCheck", lastUpdateCheck.getTime().getTime()); + editor.commit(); + checkingUpdates = false; + } + } + if (updateProgress != null && updateProgress.isShowing()) { + updateProgress.dismiss(); + } + } +} \ No newline at end of file diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelInfoActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelInfoActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..ab38e1e198e250e997a10b9648d510f98053988a --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelInfoActivity.java @@ -0,0 +1,187 @@ +/** + * Copyright (C) 2017 SIL International. All rights reserved. + */ + +package com.tavultesoft.kmea; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import android.app.DialogFragment; +import android.content.Context; +import android.content.Intent; +import android.graphics.Typeface; +import android.net.Uri; +import android.os.Bundle; +import androidx.core.content.FileProvider; +import android.util.Log; +import android.view.MenuItem; +import android.view.View; +import android.view.Window; +import android.widget.AdapterView; +import android.widget.BaseAdapter; +import android.widget.ListAdapter; +import android.widget.ListView; +import android.widget.PopupMenu; +import android.widget.SimpleAdapter; +import android.widget.TextView; +import android.widget.Toast; + +import com.tavultesoft.kmea.util.FileUtils; +import com.tavultesoft.kmea.util.FileProviderUtils; +import com.tavultesoft.kmea.util.MapCompat; + +import static com.tavultesoft.kmea.ConfirmDialogFragment.DialogType.DIALOG_TYPE_DELETE_MODEL; + +// Public access is necessary to avoid IllegalAccessException +public final class ModelInfoActivity extends AppCompatActivity { + + private static Toolbar toolbar = null; + private static ListView listView = null; + private static ArrayList> infoList = null; + protected static Typeface titleFont = null; + private final String titleKey = "title"; + private final String subtitleKey = "subtitle"; + private final String iconKey = "icon"; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + supportRequestWindowFeature(Window.FEATURE_NO_TITLE); + final Context context = this; + final String authority = FileProviderUtils.getAuthority(context); + + setContentView(R.layout.activity_list_layout); + toolbar = (Toolbar) findViewById(R.id.list_toolbar); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayShowTitleEnabled(false); + + listView = (ListView) findViewById(R.id.listView); + + final String packageID = getIntent().getStringExtra(KMManager.KMKey_PackageID); + final String languageID = getIntent().getStringExtra(KMManager.KMKey_LanguageID); + final String modelID = getIntent().getStringExtra(KMManager.KMKey_LexicalModelID); + final String modelName = getIntent().getStringExtra(KMManager.KMKey_LexicalModelName); + final String modelVersion = getIntent().getStringExtra(KMManager.KMKey_LexicalModelVersion); + + final TextView textView = (TextView) findViewById(R.id.bar_title); + textView.setText(String.format(getString(R.string.model_info_header), modelName)); + if (titleFont != null) + textView.setTypeface(titleFont, Typeface.BOLD); + + + infoList = new ArrayList>(); + // Display model version title + final String noIcon = "0"; + HashMap hashMap = new HashMap(); + hashMap.put(titleKey, getString(R.string.model_version)); + hashMap.put(subtitleKey, modelVersion); + hashMap.put(iconKey, noIcon); + infoList.add(hashMap); + + // Display model help link + hashMap = new HashMap(); + final String customHelpLink = getIntent().getStringExtra(KMManager.KMKey_CustomHelpLink); + // Check if app declared FileProvider + // Currently, model help only available if custom link exists + String icon = String.valueOf(R.drawable.ic_arrow_forward); + // Don't show help link arrow if both custom help and File Provider don't exist + // TODO: Update this when model help available on help.keyman.com + if ( (!customHelpLink.equals("") && !FileProviderUtils.exists(context)) || + customHelpLink.equals("") ){ + icon = noIcon; + } + hashMap.put(titleKey, getString(R.string.help_link)); + hashMap.put(subtitleKey, ""); + hashMap.put(iconKey, icon); + infoList.add(hashMap); + + // Display link to uninstall model + hashMap = new HashMap(); + hashMap.put(titleKey, getString(R.string.uninstall_model)); + hashMap.put(subtitleKey, ""); + hashMap.put(iconKey, noIcon); + infoList.add(hashMap); + + String[] from = new String[]{titleKey, subtitleKey, iconKey}; + int[] to = new int[]{R.id.text1, R.id.text2, R.id.image1}; + + ListAdapter adapter = new SimpleAdapter(context, infoList, R.layout.list_row_layout2, from, to) { + @Override + public boolean isEnabled(int position) { + HashMap hashMap = (HashMap)infoList.get(position); + String itemTitle = MapCompat.getOrDefault(hashMap, titleKey, ""); + String icon = MapCompat.getOrDefault(hashMap, iconKey, noIcon); + if (itemTitle.equals(getString(R.string.model_version))) { + // No point in 'clicking' on version info. + return false; + // Visibly disables the help option when custom help isn't available + } else if (itemTitle.equals(getString(R.string.help_link)) && icon.equals(noIcon)) { + return false; + } + + return super.isEnabled(position); + } + }; + listView.setAdapter(adapter); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + HashMap hashMap = (HashMap)parent.getItemAtPosition(position); + String itemTitle = MapCompat.getOrDefault(hashMap, titleKey, ""); + + // "Help" link clicked + if (itemTitle.equals(getString(R.string.help_link))) { + Intent i = new Intent(Intent.ACTION_VIEW); + + if (!customHelpLink.equals("")) { + if (FileUtils.isWelcomeFile(customHelpLink)) { + File customHelp = new File(new File(customHelpLink).getAbsolutePath()); + i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + // Starting with Android N, you can't pass file:// to intents, so we use FileProvider + try { + Uri contentUri = FileProvider.getUriForFile( + context, authority, customHelp); + i.setDataAndType(contentUri, "text/html"); + } catch (NullPointerException e) { + String message = "FileProvider undefined in app to load" + customHelp.toString(); + Toast.makeText(context, message, Toast.LENGTH_LONG).show(); + Log.e("ModelInfoActivity", message); + } + } + else { + i.setData(Uri.parse(customHelpLink)); + } + if (FileProviderUtils.exists(context)) { + startActivity(i); + } + } else { + // We should always have a help file packaged with models. + } + // "Uninstall Model" clicked + } else if (itemTitle.equals(getString(R.string.uninstall_model))) { + // Uninstall selected model + String lexicalModelKey = String.format("%s_%s_%s", packageID, languageID, modelID); + DialogFragment dialog = ConfirmDialogFragment.newInstance( + DIALOG_TYPE_DELETE_MODEL, modelName, getString(R.string.confirm_delete_model), lexicalModelKey); + dialog.show(getFragmentManager(), "dialog"); + + } else { + return; + } + } + }); + } + + @Override + public boolean onSupportNavigateUp() { + super.onBackPressed(); + return true; + } +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelPickerActivity.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelPickerActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..b2301d671b18e2b9b2950d79510c2a704e6f0047 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/ModelPickerActivity.java @@ -0,0 +1,273 @@ + +package com.tavultesoft.kmea; + +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.widget.AdapterView; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +import com.tavultesoft.kmea.data.CloudRepository; +import com.tavultesoft.kmea.data.Dataset; +import com.tavultesoft.kmea.data.LexicalModel; +import com.tavultesoft.kmea.data.adapters.NestedAdapter; +import com.tavultesoft.kmea.util.MapCompat; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; + +/** + * Keyman Settings --> Languages Settings --> Language Settings --> Model List + * Gets the list of installable lexical models from Keyman cloud and allows user to download a model. + * Displays a list of available models for a language ID. + */ +public final class ModelPickerActivity extends AppCompatActivity { + + private Context context; + private static Toolbar toolbar = null; + private static ListView listView = null; + + private static Dataset repo; + private boolean didExecuteParser = false; + + private final static String TAG = "ModelPickerActivity"; + + private String languageID = ""; + private String customHelpLink = ""; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + supportRequestWindowFeature(Window.FEATURE_NO_TITLE); + context = this; + setContentView(R.layout.activity_list_layout); + + toolbar = (Toolbar) findViewById(R.id.list_toolbar); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayShowTitleEnabled(false); + TextView textView = (TextView) findViewById(R.id.bar_title); + + Bundle bundle = getIntent().getExtras(); + String newLanguageID = bundle.getString(KMManager.KMKey_LanguageID); + String newCustomHelpLink = bundle.getString(KMManager.KMKey_CustomHelpLink); + + // Sometimes we need to re-initialize the list of models that are displayed in the ListView + languageID = newLanguageID; + customHelpLink = newCustomHelpLink; + + final String languageName = bundle.getString(KMManager.KMKey_LanguageName); + textView.setText(String.format(getString(R.string.model_picker_header), languageName)); + + listView = (ListView) findViewById(R.id.listView); + listView.setFastScrollEnabled(true); + } + + @Override + protected void onResume() { + super.onResume(); + if (!didExecuteParser) { + didExecuteParser = true; + //new JSONParse().execute(); + repo = CloudRepository.shared.fetchDataset(context); + + listView.setAdapter(new FilteredLexicalModelAdapter(context, repo, languageID)); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + + @Override + public void onItemClick(AdapterView parent, View view, final int position, long id) { + int selectedIndex = position; + LexicalModel model = ((FilteredLexicalModelAdapter) listView.getAdapter()).getItem(position); + Map modelInfo = model.map; + String packageID = modelInfo.get(KMManager.KMKey_PackageID); + String languageID = modelInfo.get(KMManager.KMKey_LanguageID); + String modelID = modelInfo.get(KMManager.KMKey_LexicalModelID); + String modelName = modelInfo.get(KMManager.KMKey_LexicalModelName); + String langName = modelInfo.get(KMManager.KMKey_LanguageName); + + // File check to see if lexical model already exists locally + File modelCheck = new File(KMManager.getLexicalModelsDir() + packageID + File.separator + modelID + ".model.js"); + + String modelKey = String.format("%s_%s_%s", packageID, languageID, modelID); + boolean modelInstalled = KeyboardPickerActivity.containsLexicalModel(context, modelKey); + boolean immediateRegister = false; + Map preInstalledModelMap = KMManager.getAssociatedLexicalModel(languageID); + + if (modelInstalled) { + // Show Model Info + listView.setItemChecked(position, true); + listView.setSelection(position); + + // Start intent for selected Predictive Text Model screen + if (!languageID.equalsIgnoreCase(modelInfo.get(KMManager.KMKey_LanguageID))) { + Log.d(TAG, "Language ID " + languageID + " doesn't match model language ID: " + + modelInfo.get(KMManager.KMKey_LanguageID)); + } + Bundle bundle = new Bundle(); + // Note: package ID of a model is different from package ID for a keyboard. + // Language ID can be re-used + bundle.putString(KMManager.KMKey_PackageID, packageID); + bundle.putString(KMManager.KMKey_LanguageID, languageID); + bundle.putString(KMManager.KMKey_LexicalModelID, modelID); + bundle.putString(KMManager.KMKey_LexicalModelName, modelName); + bundle.putString(KMManager.KMKey_LexicalModelVersion, + modelInfo.get(KMManager.KMKey_LexicalModelVersion)); + bundle.putString(KMManager.KMKey_CustomHelpLink, customHelpLink); + Intent i = new Intent(context, ModelInfoActivity.class); + i.putExtras(bundle); + startActivityForResult(i, 1); + } else if (modelCheck.exists()) { + // Handle scenario where previously installed kmp already exists so + // we only need to add the model to the list of installed models + // Add help link + modelInfo.put(KMManager.KMKey_CustomHelpLink, ""); + boolean result = KMManager.addLexicalModel(context, new HashMap<>(modelInfo)); + if (result) { + Toast.makeText(context, getString(R.string.model_install_toast), Toast.LENGTH_SHORT).show(); + } + + immediateRegister = true; + } else { + // Model isn't installed so prompt to download it + Bundle args = model.buildDownloadBundle(); + Intent i = new Intent(getApplicationContext(), KMKeyboardDownloaderActivity.class); + i.putExtras(args); + startActivity(i); + } + + // If we had a previously-installed lexical model, we should 'deinstall' it so that only + // one model is actively linked to any given language. + if(!modelInstalled) { + // While awkward, we must obtain the preInstalledModelMap before any installations occur. + // We don't want to remove the model we just installed, after all! + if(preInstalledModelMap != null) { + LexicalModel preInstalled = new LexicalModel(preInstalledModelMap); + String itemKey = String.format("%s_%s_%s", + preInstalled.map.get(KMManager.KMKey_PackageID), preInstalled.getLanguageCode(), preInstalled.getResourceId()); + int modelIndex = KeyboardPickerActivity.getLexicalModelIndex(context, itemKey); + KeyboardPickerActivity.deleteLexicalModel(context, modelIndex, true); + } + } + + if(immediateRegister) { + // Register associated lexical model if it matches the active keyboard's language code; + // it's safe since we're on the same thread. Needs to be called AFTER deinstalling the old one. + String kbdLgCode = KMManager.getCurrentKeyboardInfo(context).get(KMManager.KMKey_LanguageID); + if(kbdLgCode.equals(languageID)) { + KMManager.registerAssociatedLexicalModel(languageID); + } + } + + // Force a display refresh. + ((FilteredLexicalModelAdapter) listView.getAdapter()).notifyDataSetChanged(); + } + }); + + Intent i = getIntent(); + listView.setSelectionFromTop(i.getIntExtra("listPosition", 0), + i.getIntExtra("offsetY", 0)); + } else { + // Forces a display refresh. + ((FilteredLexicalModelAdapter) listView.getAdapter()).notifyDataSetChanged(); + } + } + + @Override + protected void onPause() { + super.onPause(); + + } + + @Override + public boolean onSupportNavigateUp() { + onBackPressed(); + return true; + } + + @Override + public void onBackPressed() { + finish(); + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + if (resultCode == 1) { + finish(); + } + } + + // Uses the repo dataset's master lexical model list to create a filtered adapter for use here. + // As this one is specific to this class, we can implement Activity-specific functionality within it. + static private class FilteredLexicalModelAdapter extends NestedAdapter { + static final int RESOURCE = R.layout.models_list_row_layout; + private final Context context; + + static private class ViewHolder { + ImageView imgInstalled; + ImageView imgDetails; + TextView text; + } + + public FilteredLexicalModelAdapter(@NonNull Context context, final Dataset repo, final String languageCode) { + // Goal: to not need a custom filter here, instead relying on LanguageDataset's built-in filters. + super(context, RESOURCE, repo.lexicalModels, repo.lexicalModelFilter, languageCode); + + this.context = context; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + LexicalModel model = this.getItem(position); + ViewHolder holder; + + // If we're being told to reuse an existing view, do that. It's automatic optimization. + if (convertView == null) { + convertView = LayoutInflater.from(getContext()).inflate(RESOURCE, parent, false); + holder = new ViewHolder(); + + holder.imgInstalled = convertView.findViewById(R.id.image1); + holder.text = convertView.findViewById(R.id.text1); + holder.imgDetails = convertView.findViewById(R.id.image2); + convertView.setTag(holder); + } else { + holder = (ViewHolder) convertView.getTag(); + } + + // Needed for the check below. + String packageID = model.map.get(KMManager.KMKey_PackageID); + String languageID = model.map.get(KMManager.KMKey_LanguageID); + String modelID = model.map.get(KMManager.KMKey_LexicalModelID); + String modelKey = String.format("%s_%s_%s", packageID, languageID, modelID); + + // TODO: Refactor this check - we should instead test against the installed models listing + // once it has its own backing Dataset instance. + // Is this an installed model or not? + + if (KeyboardPickerActivity.containsLexicalModel(context, modelKey)) { + holder.imgInstalled.setImageResource(R.drawable.ic_check); + holder.imgDetails.setImageResource(R.drawable.ic_arrow_forward); + } else { + holder.imgInstalled.setImageResource(0); + holder.imgDetails.setImageResource(0); + } + + holder.text.setText(model.map.get(KMManager.KMKey_LexicalModelName)); + + return convertView; + } + } +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..a2b7095bec6e46ff797c72b5f12810b63404b072 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java @@ -0,0 +1,864 @@ +package com.tavultesoft.kmea.data; + +import android.app.ProgressDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.os.AsyncTask; +import android.os.Build; +import android.os.Bundle; +import android.util.Log; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; + +import com.tavultesoft.kmea.BuildConfig; +import com.tavultesoft.kmea.JSONParser; +import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; +import com.tavultesoft.kmea.KMManager; +import com.tavultesoft.kmea.KeyboardPickerActivity; +import com.tavultesoft.kmea.R; +import com.tavultesoft.kmea.packages.JSONUtils; +import com.tavultesoft.kmea.util.FileUtils; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutput; +import java.io.ObjectOutputStream; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +public class CloudRepository { + static public final CloudRepository shared = new CloudRepository(); + static private final String TAG = "CloudRepository"; + + private Dataset memCachedDataset; + private Calendar lastLoad; // To be used for Dataset caching. + private boolean invalidateLexicalCache = false; + + // DEBUG: Never allow these to be `true` in production. + private static final boolean DEBUG_DISABLE_CACHE = false; + private static final boolean DEBUG_SIMULATE_UPDATES = false; + + private CloudRepository() { + // Tracks the time of the most recent cache. We start at null to indicate that we haven't + // tried to read the cache yet, as we don't yet have a Context instance to reference. + lastLoad = null; + } + + public interface UpdateHandler { + void onUpdateDetection(List updateBundles); + } + + public boolean hasCache(Context context) { + if(DEBUG_DISABLE_CACHE) { + return false; + } + + if(shouldUseMemCache(context)) { + return true; + } else { + return shouldUseCache(context, getKeyboardCacheFile(context)) && + shouldUseCache(context, getLexicalModelCacheFile(context)); + } + } + + private boolean shouldUseMemCache(Context context) { + if(DEBUG_DISABLE_CACHE) { + return false; + } + + boolean hasConnection = KMManager.hasConnection(context); + + if (memCachedDataset != null) { + Calendar lastModified = Calendar.getInstance(); + lastModified.setTime(lastLoad.getTime()); + lastModified.add(Calendar.HOUR_OF_DAY, 1); + Calendar now = Calendar.getInstance(); + return (!hasConnection || lastModified.compareTo(now) > 0); + } else { + return false; + } + } + + private boolean shouldUseCache(Context context, File cacheFile) { + if(DEBUG_DISABLE_CACHE) { + return false; + } + + boolean hasConnection = KMManager.hasConnection(context); + + // Forced cache bypass - we need to load more lexical models (signaled by invalidation). + if(this.invalidateLexicalCache && cacheFile.equals(this.getLexicalModelCacheFile(context))) { + this.invalidateLexicalCache = false; + return false; + } + + if (cacheFile.exists()) { + Calendar lastModified = Calendar.getInstance(); + lastModified.setTime(new Date(cacheFile.lastModified())); + lastModified.add(Calendar.HOUR_OF_DAY, 1); + Calendar now = Calendar.getInstance(); + return (!hasConnection || lastModified.compareTo(now) > 0); + } else { + return false; + } + } + + // Should be called whenever a new language code starts being managed in order to help signal + // retrieval of the language code's lexical models. + public void invalidateLexicalModelCache(@NonNull Context context) { + this.invalidateLexicalCache = true; + + // We should also pre-emptively clear out the old cache file + // in case of an app close or crash. + File file = getLexicalModelCacheFile(context); + file.delete(); + } + + public Dataset fetchDataset(@NonNull Context context) { + return fetchDataset(context, null, null, null); + } + + /** + * Fetches a Dataset object corresponding to keyboards and models available from the Cloud API + * services. Unless recently cached, this object will be populated asynchronously. + * @param context The current Activity requesting the Dataset. + * @param updateHandler An object that can handle update notification if desired. + * @param onSuccess A callback to be triggered on completion of all queries and operations. + * @param onFailure A callback to be triggered upon failure of a query. + * @return A Dataset object implementing the Adapter interface to be asynchronously filled. + */ + public Dataset fetchDataset(@NonNull Context context, UpdateHandler updateHandler, Runnable onSuccess, Runnable onFailure) { + boolean loadKeyboardsFromCache = this.shouldUseCache(context, getKeyboardCacheFile(context)); + boolean loadLexicalModelsFromCache = this.shouldUseCache(context, getLexicalModelCacheFile(context)); + + boolean cacheValid = loadKeyboardsFromCache && loadLexicalModelsFromCache; + + if(cacheValid && shouldUseMemCache(context)) { + return memCachedDataset; // isn't null - checked by `shouldUseCache`. + } + + // Can't use the mem-cached version as is - let's prep it / reuse the instance. + if(memCachedDataset == null) { + memCachedDataset = new Dataset(context); + } else { + // Clear the cached data and rebuild it from scratch. + memCachedDataset.clear(); + } + + lastLoad = Calendar.getInstance(); // Mark a cache timing. + + // Get the installed language codes listing. + Dataset installedSet = KeyboardPickerActivity.getInstalledDataset(context); + List languageCodes = new ArrayList<>(installedSet.getCount()); + for(int i=0; i < installedSet.getCount(); i++) { + languageCodes.add(installedSet.getItem(i).code); + } + + // Get kmp.json info from installed (adhoc and cloud) models. + // Consolidate kmp.json info from packages/ + JSONObject kmpLanguagesArray = wrapKmpKeyboardJSON(JSONUtils.getLanguages()); + JSONArray kmpLexicalModelsArray = JSONUtils.getLexicalModels(); + + if (kmpLanguagesArray.length() == 0 && kmpLexicalModelsArray.length() == 0) { + // May need to note this for handling a 'failure' check. + } else { + memCachedDataset.keyboards.addAll(processKeyboardJSON(kmpLanguagesArray, true)); + memCachedDataset.lexicalModels.addAll(processLexicalModelJSON(kmpLexicalModelsArray)); + } + + CloudDownloadTask downloadTask = new CloudDownloadTask(context, memCachedDataset, updateHandler, onSuccess, onFailure); + +// CloudApiParam[] cloudQueries = new CloudApiParam[2]; +// int cloudQueryEntries = 0; + List cloudQueries = new ArrayList<>(2); + // Default values: empty JSON instances. `null` will instead break things. + JSONObject kbdData = new JSONObject(); + JSONArray lexData = new JSONArray(); + + if(loadKeyboardsFromCache) { + kbdData = getCachedJSONObject(getKeyboardCacheFile(context)); + + // In case something went wrong with the last cache attempt, which can cause a null return. + if(kbdData == null) { + kbdData = new JSONObject(); + loadKeyboardsFromCache = false; + } + } + + if(!loadKeyboardsFromCache) { + String deviceType = context.getString(R.string.device_type); + if (deviceType.equals("AndroidTablet")) { + deviceType = "androidtablet"; + } else { + deviceType = "androidphone"; + } + + // Retrieves the cloud-based keyboard catalog in Android's preferred format. + String keyboardURL = String.format("%s?version=%s&device=%s&languageidtype=bcp47", + KMKeyboardDownloaderActivity.kKeymanApiBaseURL, BuildConfig.VERSION_NAME, deviceType); + + //cloudQueries[cloudQueryEntries++] = new CloudApiParam(ApiTarget.Keyboards, keyboardURL, JSONType.Object); + cloudQueries.add(new CloudApiParam(ApiTarget.Keyboards, keyboardURL, JSONType.Object)); + } + + if(loadLexicalModelsFromCache) { + lexData = getCachedJSONArray(getLexicalModelCacheFile(context)); + + if(lexData == null) { + lexData = new JSONArray(); + loadLexicalModelsFromCache = false; + } + } + + if(!loadLexicalModelsFromCache) { + // This allows us to directly get the full lexical model catalog. + // TODO: Remove and replace with commented-out code below once the proper multi-language + // query is ready! + String lexicalURL = String.format("%s?q", KMKeyboardDownloaderActivity.kKeymanApiModelURL); + + cloudQueries.add(new CloudApiParam(ApiTarget.LexicalModels, lexicalURL, JSONType.Array)); + + + // TODO: We want a list of lexical models for every language with an installed resource (kbd, lex model) +// String lexicalURL = String.format("%s?q=bcp47:", KMKeyboardDownloaderActivity.kKeymanApiModelURL); +// +// for(String lgCode: languageCodes) { +// lexicalURL = String.format("%s%s,", lexicalURL, lgCode); +// } +// +// lexicalURL = lexicalURL.substring(0, lexicalURL.lastIndexOf(',')); + + /* do what's possible here, rather than in the Task */ + } + + boolean executeCallbacks = true; + int cloudQueryEntries = cloudQueries.size(); + if(cloudQueryEntries > 0) { + // We need the array to be exactly the same size as our entry count. + CloudApiParam[] params = new CloudApiParam[cloudQueryEntries]; + cloudQueries.toArray(params); + // We can pass in multiple URLs; this format is extensible if we need extra catalogs in the future. + downloadTask.execute(params); + executeCallbacks = false; + } + + // Reuse any valid parts of the cache. + if(loadKeyboardsFromCache || loadLexicalModelsFromCache) { + CloudDownloadReturns jsonData = new CloudDownloadReturns(kbdData, lexData); + + // Call the processor method directly with the cached API data. + downloadTask.processCloudReturns(jsonData, executeCallbacks); // TODO: Take params for finish, return val for failures + } + + return memCachedDataset; + } + + protected File getKeyboardCacheFile(Context context) { + final String jsonCacheFilename = "jsonKeyboardsCache.dat"; + return new File(context.getCacheDir(), jsonCacheFilename); + } + + protected File getLexicalModelCacheFile(Context context) { + final String jsonLexicalCacheFilename = "jsonLexicalModelsCache.dat"; + return new File(context.getCacheDir(), jsonLexicalCacheFilename); + } + + protected JSONArray getCachedJSONArray(File file) { + JSONArray lmData = null; + try { + // Read from cache file + if (file.exists()) { + ObjectInputStream objInput = new ObjectInputStream(new FileInputStream(file)); + lmData = new JSONArray(objInput.readObject().toString()); + objInput.close(); + } + } catch (Exception e) { + Log.e(TAG, "Failed to read from cache file. Error: " + e); + lmData = null; + } + + return lmData; + } + + protected JSONObject getCachedJSONObject(File file) { + JSONObject kbData = null; + try { + // Read from cache file + if (file.exists()) { + ObjectInputStream objInput = new ObjectInputStream(new FileInputStream(file)); + kbData = new JSONObject(objInput.readObject().toString()); + objInput.close(); + } + } catch (Exception e) { + Log.e(TAG, "Failed to read from cache file. Error: " + e); + kbData = null; + } + + return kbData; + } + + /** + * Save the JSON catalog data that's available from the cloud. + * The catalog is saved to a unique file. Separate files should + * be used for each API call, such as for keyboards vs lexical models. + * @param json - Array of JSON objects containing API return info + */ + private static void saveJSONArrayToCache(File file, JSONArray json) { + ObjectOutput objOutput; + try { + // Save to cache file + objOutput = new ObjectOutputStream(new FileOutputStream(file)); + objOutput.writeObject(json.toString()); + objOutput.close(); + } catch (Exception e) { + Log.e(TAG, "Failed to save to cache file. Error: " + e); + } + } + + /** + * Save the JSON catalog data that's available from the cloud. + * The catalog is saved to a unique file. Separate files should + * be used for each API call, such as for keyboards vs lexical models. + * @param json - JSON object containing API return info + */ + private static void saveJSONObjectToCache(File file, JSONObject json) { + ObjectOutput objOutput; + try { + // Save to cache file + objOutput = new ObjectOutputStream(new FileOutputStream(file)); + objOutput.writeObject(json.toString()); + objOutput.close(); + } catch (Exception e) { + Log.e(TAG, "Failed to save to cache file. Error: " + e); + } + } + + protected JSONObject wrapKmpKeyboardJSON(JSONArray languagesArray) { + try { + JSONObject json = new JSONObject().put(KMKeyboardDownloaderActivity.KMKey_Languages, languagesArray); + return new JSONObject().put(KMKeyboardDownloaderActivity.KMKey_Languages, json); + } catch (JSONException e) { + Log.e(TAG, "Failed to properly handle KMP JSON. Error: " + e); + return null; + } + } + + protected List processKeyboardJSON(JSONObject query, boolean fromKMP) { + List keyboardsList = new ArrayList<>(); + //keyboardModifiedDates = new HashMap(); + + String isCustom = fromKMP ? "Y" : "N"; + + try { + // Thank you, Cloud API format. + JSONArray languages = query.getJSONObject(KMKeyboardDownloaderActivity.KMKey_Languages).getJSONArray(KMKeyboardDownloaderActivity.KMKey_Languages); + for (int i = 0; i < languages.length(); i++) { + JSONObject language = languages.getJSONObject(i); + + String langID = language.getString(KMManager.KMKey_ID); + String langName = language.getString(KMManager.KMKey_Name); + + JSONArray langKeyboards = language.getJSONArray(KMKeyboardDownloaderActivity.KMKey_LanguageKeyboards); + + int kbLength = langKeyboards.length(); + for (int j = 0; j < kbLength; j++) { + JSONObject keyboardJSON = langKeyboards.getJSONObject(j); + String kbID = keyboardJSON.getString(KMManager.KMKey_ID); + String kbName = keyboardJSON.getString(KMManager.KMKey_Name); + String kbVersion = keyboardJSON.optString(KMManager.KMKey_KeyboardVersion, "1.0"); + String kbFont = keyboardJSON.optString(KMManager.KMKey_Font, ""); + + //String kbKey = String.format("%s_%s", langID, kbID); + HashMap hashMap = new HashMap(); + hashMap.put(KMManager.KMKey_KeyboardName, kbName); + hashMap.put(KMManager.KMKey_KeyboardID, kbID); + hashMap.put(KMManager.KMKey_LanguageName, langName); + hashMap.put(KMManager.KMKey_LanguageID, langID); + hashMap.put(KMManager.KMKey_KeyboardVersion, kbVersion); + hashMap.put(KMManager.KMKey_CustomKeyboard, isCustom); + hashMap.put(KMManager.KMKey_Font, kbFont); + +// if (keyboardModifiedDates.get(kbID) == null) { +// keyboardModifiedDates.put(kbID, keyboardJSON.getString(KMManager.KMKey_KeyboardModified)); +// } + + keyboardsList.add(new Keyboard(hashMap)); + } + } + } catch (JSONException | NullPointerException e) { + Log.e(TAG, "JSONParse Error: " + e); + return new ArrayList<>(); // Is this ideal? + } + + return keyboardsList; + } + + protected List processLexicalModelJSON(JSONArray models) { + List modelList = new ArrayList<>(models.length()); + + try { + // Parse each model JSON Object. + int modelsLength = models.length(); + for (int i = 0; i < modelsLength; i++) { + JSONObject model = models.getJSONObject(i); + String packageID = "", modelURL = ""; + if (model.has(KMManager.KMKey_PackageID)) { + packageID = model.getString(KMManager.KMKey_PackageID); + } else { + // Determine package ID from packageFilename + modelURL = model.optString("packageFilename", ""); + packageID = FileUtils.getFilename(modelURL); + packageID = packageID.replace(FileUtils.MODELPACKAGE, ""); + } + + // api.keyman.com query returns an array of language IDs Strings while + // kmp.json "languages" is an array of JSONObject + String languageID = "", langName = ""; + Object obj = model.getJSONArray("languages"); + if (((JSONArray) obj).get(0) instanceof String) { + // language name not provided, so re-use language ID + languageID = model.getJSONArray("languages").getString(0); + langName = languageID; + } else if (((JSONArray) obj).get(0) instanceof JSONObject) { + JSONObject languageObj = model.getJSONArray("languages").getJSONObject(0); + languageID = languageObj.getString("id"); + langName = languageObj.getString("name"); + } + + String modelID = model.getString("id"); + String modelName = model.getString("name"); + String modelVersion = model.getString("version"); + + String isCustom = model.optString("CustomModel", "N"); + String icon = "0"; + + HashMap hashMap = new HashMap(); + hashMap.put(KMManager.KMKey_PackageID, packageID); + hashMap.put(KMManager.KMKey_LanguageID, languageID); + hashMap.put(KMManager.KMKey_LexicalModelID, modelID); + hashMap.put(KMManager.KMKey_LexicalModelName, modelName); + hashMap.put(KMManager.KMKey_LanguageName, langName); + hashMap.put(KMManager.KMKey_LexicalModelVersion, modelVersion); + hashMap.put(KMManager.KMKey_CustomModel, isCustom); + hashMap.put(KMManager.KMKey_LexicalModelPackageFilename, modelURL); + hashMap.put("isEnabled", "true"); + hashMap.put(KMManager.KMKey_Icon, String.valueOf(R.drawable.ic_arrow_forward)); + + modelList.add(new LexicalModel(hashMap)); + } + } catch (JSONException | NullPointerException e) { + Log.e(TAG, "JSONParse Error: " + e); + return new ArrayList<>(); // Is this ideal? + } + + return modelList; + } + + private enum ApiTarget { + Keyboards, + LexicalModels + } + + private enum JSONType { + Array, + Object + } + + private static class CloudApiParam { + public final ApiTarget target; + public final String url; + public final JSONType type; + + CloudApiParam(ApiTarget target, String url, JSONType type) { + this.target = target; + this.url = url; + this.type = type; + } + } + + private static class CloudApiReturns { + public final ApiTarget target; + public final JSONArray jsonArray; + public final JSONObject jsonObject; + + public CloudApiReturns(ApiTarget target, JSONArray jsonArray) { + this.target = target; + this.jsonArray = jsonArray; + this.jsonObject = null; + } + + public CloudApiReturns(ApiTarget target, JSONObject jsonObject) { + this.target = target; + this.jsonArray = null; + this.jsonObject = jsonObject; + } + } + + private static class CloudDownloadReturns { + public JSONObject keyboardJSON; + public JSONArray lexicalModelJSON; + + // Used by the CloudDownloadTask, as it fits well with doInBackground's param structure. + public CloudDownloadReturns(List returns) { + JSONObject kbd = null; + JSONArray lex = null; + + for(CloudApiReturns ret: returns) { + switch(ret.target) { + case Keyboards: + kbd = ret.jsonObject; + break; + case LexicalModels: + lex = ret.jsonArray; + } + } + + // Errors are thrown if we try to do this assignment within the loop. + this.keyboardJSON = kbd; + this.lexicalModelJSON = lex; + } + + public CloudDownloadReturns(JSONObject keyboardJSON, JSONArray lexicalModelJSON) { + this.keyboardJSON = keyboardJSON; + this.lexicalModelJSON = lexicalModelJSON; + } + + public boolean isEmpty() { + boolean emptyKbd = false; + boolean emptyLex = false; + + if (keyboardJSON == null) { + emptyKbd = true; + } else if (keyboardJSON.length() == 0) { + emptyKbd = true; + } + + if(lexicalModelJSON == null) { + emptyLex = true; + } else if(lexicalModelJSON.length() == 0) { + emptyLex = true; + } + + return emptyKbd && emptyLex; + } + } + + // This is copied from LanguageListActivity to download a catalog from the cloud. + // TODO: Keyman roadmap is to refactor to use background WorkManager in Keyman 13.0 + private class CloudDownloadTask extends AsyncTask { + private final boolean hasConnection; + private ProgressDialog progressDialog; + + private final Context context; + + // These keyboard query callback parameters actually aren't used at present. + private final Runnable querySuccess; + private final Runnable failure; + private final UpdateHandler updateHandler; + + // + + private final Dataset dataset; + + public CloudDownloadTask(Context context, Dataset dataset, UpdateHandler updateHandler, Runnable success, Runnable failure) { + this.context = context; + this.dataset = dataset; + this.hasConnection = KMManager.hasConnection(context); + + Runnable dummy = new Runnable() { + public void run() { + // Do nothing. + } + }; + this.querySuccess = success != null ? success : dummy; + this.failure = failure != null ? failure : dummy; + + this.updateHandler = updateHandler != null ? updateHandler : new UpdateHandler() { + @Override + public void onUpdateDetection(List updateBundles) { + // Do nothing. + return; + } + }; + } + + protected void showProgressDialog(final Runnable finishCallback) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { + progressDialog = new ProgressDialog(context, R.style.AppTheme_Dialog_Progress); + } else { + progressDialog = new ProgressDialog(context); + } + progressDialog.setMessage(context.getString(R.string.getting_cloud_catalog)); + progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(R.string.label_cancel), + new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialogInterface, int which) { + cancel(true); + progressDialog.dismiss(); + progressDialog = null; + if(finishCallback != null) { + finishCallback.run(); + } + return; + } + }); + progressDialog.setCancelable(true); + if (!((AppCompatActivity) context).isFinishing()) { + progressDialog.show(); + } else { + cancel(true); + progressDialog = null; + } + } + + @Override + protected void onPreExecute() { + super.onPreExecute(); + + if (hasConnection) { + showProgressDialog(new Runnable() { + @Override + public void run() { // runs on 'cancel' selection. + failure.run(); + } + }); + } + } + + @Override + protected CloudDownloadReturns doInBackground(CloudApiParam... params) { + if (isCancelled()) { + return null; + } + + List retrievedJSON = new ArrayList<>(params.length); + if(progressDialog != null) { + progressDialog.setMax(params.length); + } + + for(CloudApiParam param:params) { + JSONParser jsonParser = new JSONParser(); + JSONArray dataArray = null; + JSONObject dataObject = null; + + if (hasConnection) { + try { + String remoteUrl = param.url; + + if(param.type == JSONType.Array) { + dataArray = jsonParser.getJSONObjectFromUrl(remoteUrl, JSONArray.class); + } else { + dataObject = jsonParser.getJSONObjectFromUrl(remoteUrl, JSONObject.class); + } + } catch (Exception e) { + Log.d(TAG, e.getMessage()); + } + } else { + // Offline trouble! That said, we can't get anything, so we simply shouldn't add anything. + } + + if(param.type == JSONType.Array) { + retrievedJSON.add(new CloudApiReturns(param.target, dataArray)); // Null if offline. + } else { + retrievedJSON.add(new CloudApiReturns(param.target, dataObject)); // Null if offline. + } + if(progressDialog != null) { + progressDialog.setProgress(progressDialog.getProgress()); + } + } + + return new CloudDownloadReturns(retrievedJSON); // Will report empty arrays/objects if offline. + } + + protected JSONArray ensureInit(JSONArray json) { + if(json == null && dataset.isEmpty()) { + Toast.makeText(context, "Failed to access Keyman server!", Toast.LENGTH_SHORT).show(); + failure.run(); + return null; + } + + return (json != null) ? json : new JSONArray(); + } + + protected JSONObject ensureInit(JSONObject json) { + if(json == null && dataset.isEmpty()) { + Toast.makeText(context, "Failed to access Keyman server!", Toast.LENGTH_SHORT).show(); + failure.run(); + return null; + } + + return (json != null) ? json : new JSONObject(); + } + + @Override + protected void onPostExecute(CloudDownloadReturns jsonTuple) { + // First things first - we've successfully downloaded from the Cloud. Cache that stuff! + if(jsonTuple.keyboardJSON != null) { + saveJSONObjectToCache(getKeyboardCacheFile(context), jsonTuple.keyboardJSON); + } + if(jsonTuple.lexicalModelJSON != null) { + saveJSONArrayToCache(getLexicalModelCacheFile(context), jsonTuple.lexicalModelJSON); + } + + if (progressDialog != null && progressDialog.isShowing()) { + try { + progressDialog.dismiss(); + progressDialog = null; + } catch (Exception e) { + progressDialog = null; + } + } + + jsonTuple.keyboardJSON = ensureInit(jsonTuple.keyboardJSON); + jsonTuple.lexicalModelJSON = ensureInit(jsonTuple.lexicalModelJSON); + + processCloudReturns(jsonTuple, true); + } + + public Bundle updateCheck(LanguageResource cloudResource, LanguageResource existingMatch) { + if(DEBUG_SIMULATE_UPDATES) { + return cloudResource.buildDownloadBundle(); + } + + if (compareVersions(cloudResource, existingMatch) == FileUtils.VERSION_GREATER) { + return cloudResource.buildDownloadBundle(); + } else { + return null; + } + } + + public int compareVersions(LanguageResource addition, LanguageResource original) { + // Get version from newly-downloaded keyboard. + String addVersion = addition.getVersion(); + String origVersion = original.getVersion(); + + int result = FileUtils.compareVersions(addVersion, origVersion); + + if(DEBUG_SIMULATE_UPDATES && result == FileUtils.VERSION_EQUAL) { + // Ensures that we preserve the cloud-based version that provides download URLs. + return FileUtils.VERSION_GREATER; + } else { + return result; + } + } + + public void processCloudReturns(CloudDownloadReturns jsonTuple, boolean executeCallbacks) { + // Only empty if no queries returned data - we're offline. + if(jsonTuple.isEmpty()) { + if(this.updateHandler == null) { + String msg = context.getString(R.string.catalog_unavailable); + Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); + } + this.failure.run(); // Signal failure to download to our failure callback. + return; + } + + List keyboardsArrayList = processKeyboardJSON(jsonTuple.keyboardJSON, false); + List lexicalModelsArrayList = processLexicalModelJSON(jsonTuple.lexicalModelJSON); + + Dataset installedData = KeyboardPickerActivity.getInstalledDataset(context); + final List updateBundles = new ArrayList<>(); + + // We're about to do a big batch of edits. + this.dataset.setNotifyOnChange(false); + + // Filter out any duplicates from KMP keyboards, properly merging the lists. + for(int i = 0; i < keyboardsArrayList.size(); i++) { + Keyboard keyboard = keyboardsArrayList.get(i); + + // Check for duplicates / possible updates. + Keyboard match = dataset.keyboards.findMatch(keyboard); + + if(match != null) { + if(compareVersions(keyboard, match) == FileUtils.VERSION_GREATER) { + dataset.keyboards.remove(match); + } else { + keyboardsArrayList.remove(keyboard); + i--; // Decrement our index to reflect the removal. + } + } // else no match == no special handling. + } + + // Add cloud-returned keyboard info to the CloudRepository's KeyboardsAdapter. + dataset.keyboards.addAll(keyboardsArrayList); + + // The actual update check. + for(int i = 0; i < installedData.keyboards.getCount(); i++) { + Keyboard keyboard = installedData.keyboards.getItem(i); + + // Check for duplicates / possible updates. + Keyboard match = dataset.keyboards.findMatch(keyboard); + + if(match != null) { + Bundle bundle = updateCheck(match, keyboard); + if(bundle != null) { + updateBundles.add(bundle); + } + } // else no match == no special handling. + } + + // Filter out any duplicates from already-installed models, properly merging the lists. + for(int i = 0; i < lexicalModelsArrayList.size(); i++) { + LexicalModel model = lexicalModelsArrayList.get(i); + + // Check for duplicates / possible updates. + LexicalModel match = dataset.lexicalModels.findMatch(model); + + if(match != null) { + if (compareVersions(model, match) == FileUtils.VERSION_GREATER) { + dataset.lexicalModels.remove(match); + } else { + lexicalModelsArrayList.remove(model); + i--; // Decrement our index to reflect the removal. + } + } // else no match == no special handling. + } + + // Add the cloud-returned lexical model info to the CloudRepository's lexical models adapter. + dataset.lexicalModels.addAll(lexicalModelsArrayList); + + // Do the actual update checks. + for(int i = 0; i < installedData.lexicalModels.getCount(); i++) { + LexicalModel model = installedData.lexicalModels.getItem(i); + + // Check for duplicates / possible updates. + LexicalModel match = dataset.lexicalModels.findMatch(model); + + if(match != null) { + Bundle bundle = updateCheck(match, model); + if(bundle != null) { + updateBundles.add(bundle); + } + } // else no match == no special handling. + } + + if(updateBundles.size() > 0) { + // Time for updates! + Log.v(TAG, "Performing keyboard and model updates for " + updateBundles.size() + " resources."); + + updateHandler.onUpdateDetection(updateBundles); + } + + // And finish. + this.dataset.notifyDataSetChanged(); // Edits are done - signal that. + + if(executeCallbacks) { + querySuccess.run(); + } + } + } +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Dataset.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Dataset.java new file mode 100644 index 0000000000000000000000000000000000000000..4edb60b496d760a06f5b16444b7566cc9cd38fa8 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Dataset.java @@ -0,0 +1,371 @@ +package com.tavultesoft.kmea.data; + +import android.content.Context; +import android.widget.ArrayAdapter; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.tavultesoft.kmea.data.adapters.AdapterFilter; +import com.tavultesoft.kmea.data.adapters.ListBacked; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class Dataset extends ArrayAdapter implements ListBacked { + public abstract class LanguageFilter> implements AdapterFilter { + abstract Set getSetFrom(LanguageDataset metadata); + + @Override + public List selectFrom(Adapter adapter, String lgCode) { + // Since we know that the adapter is connected to the master Dataset, we can pre-filter and optimize + // performance of our linked adapters. + LanguageDataset metadata = Dataset.this.languageMetadata.get(lgCode); + + List retList = new ArrayList<>(getSetFrom(metadata)); + + Collections.sort(retList, new Comparator() { + public int compare(Type obj1, Type obj2) { + return obj1.getResourceName().compareTo(obj2.getResourceName()); + } + }); + + return retList; + } + } + + public final LanguageFilter keyboardFilter = new LanguageFilter() { + Set getSetFrom(LanguageDataset metadata) { + if(metadata == null) { + return new HashSet<>(); + } else { + return metadata.keyboards; + } + } + }; + + public final LanguageFilter lexicalModelFilter = new LanguageFilter() { + Set getSetFrom(LanguageDataset metadata) { + if(metadata == null) { + return new HashSet<>(); + } else { + return metadata.lexicalModels; + } + } + }; + + static class LanguageCategorizer> implements AdapterFilter { + public List selectFrom(Adapter adapter, Void dummy) { + List list = new ArrayList<>(adapter.asList()); + + Collections.sort(list, new Comparator() { + public int compare(Type obj1, Type obj2) { + int langComp = obj1.getLanguageName().compareTo(obj2.getLanguageName()); + if(langComp != 0) { + return langComp; + } + + return obj1.getResourceName().compareTo(obj2.getResourceName()); + } + }); + + return list; + } + } + + public static final LanguageCategorizer keyboardPickerSorter = new LanguageCategorizer(); + + // Implements common language-tracking functionality for each internally-managed master list. + private class LanguageCodedAdapter extends ArrayAdapter implements ListBacked { + private final List data; + private boolean doNotify = true; + private boolean recursiveBlock = false; + + public LanguageCodedAdapter(@NonNull Context context) { + this(context, new ArrayList()); + } + + private LanguageCodedAdapter(@NonNull Context context, @NonNull List data) { + super(context, 0, data); + + // We only want to allow mutations through the adapter, but it's useful to maintain + // a List<> version of the data to assist with other adapters. + this.data = Collections.unmodifiableList(data); + + // Make sure our language dataset map is properly initialized! + for(Type obj: data) { + getMetadataFor(obj); // We can ignore the return; this makes sure the needed object is constructed. + } + } + + public List asList() { + return this.data; + } + + public Type findMatch(Type target) { + for(Type obj: data) { + if(obj.getResourceId().equals(target.getResourceId()) && obj.getLanguageCode().equals(target.getLanguageCode())) { + return obj; + } + } + + return null; + } + + @Override + public void add(@Nullable Type object) { + boolean notify = doNotify; // Save initial value. + if(notify) { + Dataset.this.setNotifyOnChange(false); + } + + super.add(object); + + LanguageDataset data = getMetadataFor(object); // We can ignore the return; this makes sure the needed object is constructed. + + if(object instanceof Keyboard) { + if(!data.keyboards.contains(object)) { + data.keyboards.add((Keyboard) object); + } + } else if(object instanceof LexicalModel) { + if(!data.lexicalModels.contains(object)) { + data.lexicalModels.add((LexicalModel) object); + } + } + + if(notify) { + Dataset.this.notifyDataSetChanged(); + } + } + + @Override + public void addAll(Type... items) { + this.addAll(Arrays.asList(items)); + } + + @Override + public void addAll(@NonNull Collection collection) { + boolean notify = doNotify; // Save initial value. + if(notify) { + Dataset.this.setNotifyOnChange(false); + } + + super.addAll(collection); + + HashSet mutatedLanguages = new HashSet<>(); + + for(Type item: collection) { + LanguageDataset data = getMetadataFor(item); + + if(item instanceof Keyboard) { + if(!data.keyboards.contains(item)) { + data.keyboards.add((Keyboard) item); + } + } else if(item instanceof LexicalModel) { + if(!data.lexicalModels.contains(item)) { + data.lexicalModels.add((LexicalModel) item); + } + } else { + continue; + } + + mutatedLanguages.add(data.code); + } + + if(notify) { + Dataset.this.notifyDataSetChanged(); + } + } + + @Override + public void remove(Type object) { + boolean notify = doNotify; // Save initial value. + if(notify) { + Dataset.this.setNotifyOnChange(false); + } + + super.remove(object); + + LanguageDataset data = getMetadataFor(object); + + if(object instanceof Keyboard) { + data.keyboards.remove(object); + } else if(object instanceof LexicalModel) { + data.lexicalModels.remove(object); + } + + handleLanguageItemRemoval(object); + + if(notify) { + Dataset.this.notifyDataSetChanged(); + } + } + + @Override + public void clear() { + boolean notify = doNotify; // Save initial value. + if(notify) { + Dataset.this.setNotifyOnChange(false); + } + + // this.asList returns an unmodifiable reference to the internal list - + // but that list itself may be modified by this adapter's functions! + List clearedItems = new ArrayList<>(this.asList()); + + super.clear(); + + for(Type object: clearedItems) { + LanguageDataset data = getMetadataFor(object); + if(object instanceof Keyboard) { + data.keyboards.remove(object); + } else if(object instanceof LexicalModel) { + data.lexicalModels.remove(object); + } + + handleLanguageItemRemoval(object); + } + + if(notify) { + Dataset.this.notifyDataSetChanged(); + } + } + + @Override + public void setNotifyOnChange(boolean notify) { + super.setNotifyOnChange(notify); + doNotify = notify; + + if(!recursiveBlock) { + recursiveBlock = true; + Dataset.this.setNotifyOnChange(notify); + recursiveBlock = false; + } + } + + @Override + public void notifyDataSetChanged() { + Dataset.this.notifyDataSetChanged(); + } + + void _notifyDataSetChanged() { + doNotify = true; + super.notifyDataSetChanged(); + } + + // Override other class methods (following 'Decorator' pattern) to facilitate data tracking as needed. + } + + public class Keyboards extends LanguageCodedAdapter { + public Keyboards(@NonNull Context context) { + super(context); + } + } + + public class LexicalModels extends LanguageCodedAdapter { + public LexicalModels(@NonNull Context context) { + super(context); + } + } + + public class LanguageDataset implements Comparable { + public final String name; + public final String code; + public Set keyboards = new HashSet<>(); + public Set lexicalModels = new HashSet<>(); + + public LanguageDataset(String name, String code) { + this.name = name; + this.code = code; + } + + public int compareTo(LanguageDataset other) { + return name.compareTo(other.name); + } + } + + // Stores internal adapters for keyboard, lexical model listings + public final Keyboards keyboards; + public final LexicalModels lexicalModels; + + // Tracks keyboards and model by language tag separately from the adapters; useful for + // optimizing Adapter functionality. + private final Map languageMetadata = new HashMap<>(); + + // 'Items' are language-specific datasets holding their own language-specific adapters. + + public Dataset(@NonNull Context context) { + super(context.getApplicationContext(), 0, new ArrayList()); + + keyboards = new Keyboards(context); + lexicalModels = new LexicalModels(context); + } + + protected void handleLanguageItemRemoval(LanguageResource coded) { + String lgCode = coded.getLanguageCode(); + LanguageDataset lgData = languageMetadata.get(lgCode); + + if(lgData.keyboards.size() == 0 && lgData.lexicalModels.size() == 0) { + // We're no longer storing anything for this language - remove lgData from tracking. + this.remove(lgData); + languageMetadata.remove(lgCode); + } + } + + protected LanguageDataset getMetadataFor(LanguageResource coded) { + final String lgCode = coded.getLanguageCode(); + LanguageDataset data = Dataset.this.languageMetadata.get(lgCode); + + if(data == null) { + data = new LanguageDataset(coded.getLanguageName(), coded.getLanguageCode()); + Dataset.this.languageMetadata.put(lgCode, data); + Dataset.this.add(data); + } + + return data; + } + + + public void clear() { + keyboards.clear(); + lexicalModels.clear(); + + this.languageMetadata.clear(); + } + + // TODO: Do we need to override any of this class's menbers in case someone SOMEHOW constructs + // a LanguageDataset from outside the Dataset class? + + @Override + public void setNotifyOnChange(boolean notify) { + super.setNotifyOnChange(notify); + keyboards.setNotifyOnChange(notify); + lexicalModels.setNotifyOnChange(notify); + } + + @Override + public void notifyDataSetChanged() { + super.notifyDataSetChanged(); + keyboards._notifyDataSetChanged(); + lexicalModels._notifyDataSetChanged(); + } + + public List asList() { + // Convert the value set of our language-code map into the requested list. + List list = new ArrayList<>(languageMetadata.values()); + Collections.sort(list); + + return list; + } + + void _notifyDataSetChanged() { + super.notifyDataSetChanged(); + } +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Keyboard.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Keyboard.java new file mode 100644 index 0000000000000000000000000000000000000000..567d9e0a59f267f2f6b8a909da4611fd22e310a2 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/Keyboard.java @@ -0,0 +1,89 @@ +package com.tavultesoft.kmea.data; + +import android.os.Bundle; + +import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; +import com.tavultesoft.kmea.KMManager; + +import java.io.Serializable; +import java.util.Map; + +public class Keyboard implements Serializable, LanguageResource { + public final Map map; + + /* TODO: (v13 refactor) + * Drop the HashMap and instead directly represent the following as object properties: + * + * String kbId = kbInfo.get(KMManager.KMKey_KeyboardID); + * String langId = kbInfo.get(KMManager.KMKey_LanguageID); + * String kbName = kbInfo.get(KMManager.KMKey_KeyboardName); + * String langName = kbInfo.get(KMManager.KMKey_LanguageName); + * String kFont = kbInfo.get(KMManager.KMKey_Font); + * String kOskFont = kbInfo.get(KMManager.KMKey_OskFont); + */ + + public Keyboard(Map kbdData) { + this.map = kbdData; + } + + public String getResourceId() { + return this.map.get(KMManager.KMKey_KeyboardID); + } + + @Override + public String getLanguageCode() { + return this.map.get(KMManager.KMKey_LanguageID); + } + + public String getLanguageName() { + return this.map.get(KMManager.KMKey_LanguageName); + } + + public String getResourceName() { + return this.map.get(KMManager.KMKey_KeyboardName); + } + + public String getVersion() { + return this.map.get(KMManager.KMKey_KeyboardVersion); + } + + public String getPackage() { + return this.map.get(KMManager.KMKey_PackageID); + } + + public Bundle buildDownloadBundle() { + Bundle bundle = new Bundle(); + bundle.putString(KMKeyboardDownloaderActivity.ARG_PKG_ID, getPackage()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_KB_ID, getResourceId()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_ID, getLanguageCode()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_KB_NAME, getResourceName()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_NAME, getLanguageName()); + + String isCustom = map.get(KMManager.KMKey_CustomKeyboard); + if(isCustom == null) { + isCustom = "N"; + } + + bundle.putBoolean(KMKeyboardDownloaderActivity.ARG_IS_CUSTOM, isCustom.equals("Y")); + + return bundle; + } + + public boolean equals(Object obj) { + if(obj instanceof Keyboard) { + boolean lgCodeMatch = ((Keyboard) obj).getLanguageCode().equals(this.getLanguageCode()); + boolean idMatch = ((Keyboard) obj).getResourceId().equals(this.getResourceId()); + + return lgCodeMatch && idMatch; + } + + return false; + } + + @Override + public int hashCode() { + String id = getResourceId(); + String lgCode = getLanguageCode(); + return id.hashCode() * lgCode.hashCode(); + } +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LanguageResource.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LanguageResource.java new file mode 100644 index 0000000000000000000000000000000000000000..635c76580b41bdf5f61ab6a328edccef4a6cbb20 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LanguageResource.java @@ -0,0 +1,14 @@ +package com.tavultesoft.kmea.data; + +import android.os.Bundle; + +public interface LanguageResource { + String getResourceId(); + String getResourceName(); + String getLanguageCode(); + String getLanguageName(); + String getVersion(); + String getPackage(); + + Bundle buildDownloadBundle(); +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LexicalModel.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LexicalModel.java new file mode 100644 index 0000000000000000000000000000000000000000..2dddca0ddb1ef46f3b40b912f5d060115839e1e1 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/LexicalModel.java @@ -0,0 +1,96 @@ +package com.tavultesoft.kmea.data; + +import android.os.Bundle; + +import com.tavultesoft.kmea.KMKeyboardDownloaderActivity; +import com.tavultesoft.kmea.KMManager; + +import java.io.Serializable; +import java.util.Map; + +public class LexicalModel implements Serializable, LanguageResource { + public final Map map; + + /* TODO: (v13 refactor) + * Drop the HashMap and instead directly represent the following as object properties: + * + * hashMap.put(KMManager.KMKey_PackageID, packageID); + * hashMap.put(KMManager.KMKey_LanguageID, languageID); + * hashMap.put(KMManager.KMKey_LexicalModelID, modelID); + * hashMap.put(KMManager.KMKey_LexicalModelName, modelName); + * hashMap.put(KMManager.KMKey_LanguageName, langName); + * hashMap.put(KMManager.KMKey_LexicalModelVersion, modelVersion); + * hashMap.put(KMManager.KMKey_CustomModel, isCustom); + */ + + public LexicalModel(Map modelData) { + this.map = modelData; + } + + public String getResourceId() { + return this.map.get(KMManager.KMKey_LexicalModelID); + } + + @Override + public String getLanguageCode() { + return this.map.get(KMManager.KMKey_LanguageID); + } + + public String getLanguageName() { + return this.map.get(KMManager.KMKey_LanguageName); + } + + public String getResourceName() { + return this.map.get(KMManager.KMKey_LexicalModelName); + } + + public String getVersion() { + return this.map.get(KMManager.KMKey_LexicalModelVersion); + } + + public String getPackage() { + return this.map.get(KMManager.KMKey_PackageID); + } + + public Bundle buildDownloadBundle() { + Bundle bundle = new Bundle(); + + // Make sure we have an actual download URL. If not, we can't build a proper download bundle - + // the downloader conditions on this URL's existence in 12.0! + String modelURL = map.get(KMManager.KMKey_LexicalModelPackageFilename); + if(modelURL == null) { + return null; + } else if (modelURL.equals("")) { + return null; + } + + String customHelpLink = map.get(KMManager.KMKey_CustomHelpLink); + + bundle.putString(KMKeyboardDownloaderActivity.ARG_PKG_ID, getPackage()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_MODEL_ID, getResourceId()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_ID, getLanguageCode()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_MODEL_NAME, getResourceName()); + bundle.putString(KMKeyboardDownloaderActivity.ARG_LANG_NAME, getLanguageName()); + bundle.putBoolean(KMKeyboardDownloaderActivity.ARG_IS_CUSTOM, false); + bundle.putString(KMKeyboardDownloaderActivity.ARG_MODEL_URL, modelURL); + bundle.putString(KMKeyboardDownloaderActivity.ARG_MODEL_CUSTOM_HELP_LINK, customHelpLink); + + return bundle; + } + + public boolean equals(Object obj) { + if(obj instanceof LexicalModel) { + boolean lgCodeMatch = ((LexicalModel) obj).getLanguageCode().equals(this.getLanguageCode()); + boolean idMatch = ((LexicalModel) obj).getResourceId().equals(this.getResourceId()); + + return lgCodeMatch && idMatch; + } + + return false; + } + + @Override + public int hashCode() { + return getResourceId().hashCode() * getLanguageCode().hashCode(); + } +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/AdapterFilter.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/AdapterFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..3cba3874e7c1b3711a6ebc68d1aaadc5a531f507 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/AdapterFilter.java @@ -0,0 +1,18 @@ +package com.tavultesoft.kmea.data.adapters; + +import android.widget.ArrayAdapter; + +import java.util.List; + +/** + * Used by NestedAdapters to selectively filter which elements are selected from the original Adapter. + * @param The type of both Adapters' elements. + */ +public interface AdapterFilter, FilterArg> { + /** + * Filters the specified adapter for matching elements. + * @param adapter An existing adapter with elements, some of which should be excluded by this filter. + * @return A List of all elements of the adapter that match the filter's conditions. + */ + List selectFrom(Adapter adapter, FilterArg argument); +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/ListBacked.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/ListBacked.java new file mode 100644 index 0000000000000000000000000000000000000000..e928ef6745ea6d5f8c71c7cde89837f7eefcc4c3 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/ListBacked.java @@ -0,0 +1,7 @@ +package com.tavultesoft.kmea.data.adapters; + +import java.util.List; + +public interface ListBacked { + List asList(); +} \ No newline at end of file diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/NestedAdapter.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/NestedAdapter.java new file mode 100644 index 0000000000000000000000000000000000000000..16de592a7aa8a07a5e8cc6c23798b88b4083ff24 --- /dev/null +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/adapters/NestedAdapter.java @@ -0,0 +1,186 @@ +package com.tavultesoft.kmea.data.adapters; + +import android.content.Context; +import android.database.DataSetObserver; +import android.widget.ArrayAdapter; + +import androidx.annotation.NonNull; + +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * An ArrayAdapter subclass that uses another ArrayAdapter (or subclass) as its data source, + * propagating relevant changes across both to maintain a 'linked'/'nested' state. + * Also permits use of an AdapterFilter to allow using a filtered view of that source. + * @param The shared item type of the two Adapters. + * @param The type specification of the Adapter to be nested/linked. + */ +public class NestedAdapter & ListBacked, FilterArg> extends ArrayAdapter implements ListBacked { + final A wrappedAdapter; + final AdapterFilter filter; + final List filteredList; + + boolean isMutating = false; + + /** + * Links a NestedAdapter 'listener' with a pre-existing ArrayAdapter 'source' by listening to its + * events that signal state changes. Is GC-friendly, automatically disconnecting and managing + * itself when the 'listener' is GC'd. + * @param The Element type of the Adapters being linked. + * @param The type of the 'wrapped' source ArrayAdapter (possibly a subclass). + * @param The type of the 'listener' NestedAdapter, complete with its generic type parameters. + */ + static class WrapperObserver & ListBacked, A extends NestedAdapter, F> extends DataSetObserver { + // By being static and using a WeakReference here, we avoid memory leaks that would otherwise + // prevent our owner from being GC'd. + private WeakReference listenerRef; + private S source; + private final F filterArg; + + WrapperObserver(A listener, S source, F filterArg) { + this.listenerRef = new WeakReference<>(listener); + this.source = source; + this.filterArg = filterArg; + } + + @Override + public void onChanged() { + A listener = listenerRef.get(); + if(listener == null) { + // Our listener has been GC'd. Time to disconnect and allow this instance to be GC'd, too. + source.unregisterDataSetObserver(this); + return; + } else if(listener.isMutating){ + // This event was triggered by a reaction to what our owning listener did. No need to update. + return; + } + listener.setNotifyOnChange(false); // Disable event notifications temporarily. + listener._internalClear(); + listener._internalAddAll(listener.filter.selectFrom(listener.wrappedAdapter, this.filterArg)); + listener.notifyDataSetChanged(); // Re-enables events and signals that we did change. + } + + @Override + public void onInvalidated() { + A listener = listenerRef.get(); + if(listener == null) { + // Our listener has been GC'd. Time to disconnect and allow this instance to be GC'd, too. + source.unregisterDataSetObserver(this); + return; + } + listener.notifyDataSetInvalidated(); + } + } + + private final WrapperObserver, FilterArg> observer; + + public NestedAdapter(@NonNull Context context, int resource, @NonNull A adapter) { + this(context, resource, adapter, new AdapterFilter() { + @Override + public List selectFrom(A adapter, FilterArg dummy) { + // Make sure to duplicate the list so that we don't accidentally try to modify our + // wrapped adapter's (unmodifiable) contents. + return new ArrayList<>(adapter.asList()); + } + }, null); + } + + public NestedAdapter(@NonNull Context context, int resource, @NonNull A adapter, AdapterFilter filter, FilterArg filterArg) { + this(context, resource, adapter, filter, filterArg, filter.selectFrom(adapter, filterArg)); + } + + public NestedAdapter(@NonNull Context context, int resource, @NonNull A adapter, AdapterFilter filter, FilterArg filterArg, List filteredList) { + super(context, resource, filteredList); + + this.wrappedAdapter = adapter; + observer = new WrapperObserver<>(this, adapter, filterArg); + this.wrappedAdapter.registerDataSetObserver(observer); + + this.filter = filter; + this.filteredList = filteredList; + } + + @Override + public void notifyDataSetInvalidated() { + this.wrappedAdapter.unregisterDataSetObserver(this.observer); + } + + @Override + public void add(Element elem) { + super.add(elem); // Modifies our internal element list, which is separate from the wrapped adapter's. + + this.isMutating = true; + wrappedAdapter.add(elem); // Reflect the changes to our wrapped adapter. + this.isMutating = false; + } + + @Override + public void addAll(Element... elements) { + super.addAll(elements); + + this.isMutating = true; + wrappedAdapter.addAll(elements); + this.isMutating = false; + } + + @Override + public void addAll(@NonNull Collection collection) { + super.addAll(collection); + + this.isMutating = true; + wrappedAdapter.addAll(collection); + this.isMutating = false; + } + + @Override + public void remove(Element element) { + super.remove(element); + + this.isMutating = true; + wrappedAdapter.remove(element); + this.isMutating = false; + } + + @Override + public void clear() { + List cleared = new ArrayList<>(filteredList); // Duplicate list before it's cleared. + super.clear(); + + // Since we use a filtered view for clear() and we want the clear() operation to seem atomic, + // we need to manage the setNotify flags. This same method is also used to manage this class, + // though, so `doNotify` signals if this is a reactive clear() triggered by our wrapped adapter + // and prevents accidental looping. + this.isMutating = true; + wrappedAdapter.setNotifyOnChange(false); + + for(Element element: cleared) { + wrappedAdapter.remove(element); + } + + + wrappedAdapter.notifyDataSetChanged(); + this.isMutating = false; + } + + public List asList() { + return Collections.unmodifiableList(this.filteredList); + } + + // These methods allow bypassing of our externally-visible 'linking' versions for operations + // triggered by the other end of the link. + protected void _internalAddAll(@NonNull Collection collection) { + super.addAll(collection); + } + + protected void _internalClear() { + super.clear(); + } + + // TODO: As needed, override mutation functions so that we can reflect the changes onto + // the wrappedAdapter instance. We should handle these cases directly rather than + // through self-triggered events, as we may only hold a subset due to use of filters. +} diff --git a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/JSONUtils.java b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/JSONUtils.java index e8de160fc37818251acef55e7c5de4c7fbec5a13..b14b08f9203daf1e0df88b8483204887a3ce5011 100644 --- a/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/JSONUtils.java +++ b/android/KMEA/app/src/main/java/com/tavultesoft/kmea/packages/JSONUtils.java @@ -83,7 +83,7 @@ public class JSONUtils { File jsFile = new File(pkg, kbdID + ".js"); if (jsFile.exists()) { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); kbdObj.put("lastModified", sdf.format(jsFile.lastModified())); } else { Log.d(TAG, "getLanguages() can't generate modified date for " + jsFile); @@ -120,7 +120,7 @@ public class JSONUtils { } /** - * Iterate through a JSONArray to determine if a language/keyboard ID exists. + * Iterate through a JSONArray to determine if a language/keyboard/model ID exists. * @param {a} JSONArray to search * @param {id} String of the language/keyboard ID * @return int - Index if the ID is found (starting with 0). -1 if the ID doesn't exist @@ -193,4 +193,92 @@ public class JSONUtils { } return options; } + + /** + * Iterate through each model's folder and parse kmp.json, whether installed or not. + */ + public static JSONArray getLexicalModels() { + File[] packages = new File(KMManager.getLexicalModelsDir()).listFiles(); + JSONArray lexicalModelsArray = new JSONArray(); + JSONParser parser = new JSONParser(); + + for (File pkg: packages) { + for (File file: pkg.listFiles()) { + if (file.getName().toLowerCase().endsWith(PackageProcessor.PP_DEFAULT_METADATA)) { + try { + String packageID = pkg.getName(); + JSONObject kmp = parser.getJSONObjectFromFile(file); + JSONArray kmpModels = kmp.getJSONArray("lexicalModels"); + + // Determine if kmp contains welcome.htm help file + JSONArray kmpFiles = kmp.getJSONArray("files"); + boolean containsHelp = JSONUtils.findHelp(kmpFiles); + + for (int i=0; i + + + + \ No newline at end of file diff --git a/android/KMEA/app/src/main/res/layout/keyboard_picker_list_layout.xml b/android/KMEA/app/src/main/res/layout/keyboard_picker_list_layout.xml index 7238c1c48d276a76b52941bdd5ddc81be81e5a3a..f635675f596412ea689b3de7fa41ccde5f1016cd 100644 --- a/android/KMEA/app/src/main/res/layout/keyboard_picker_list_layout.xml +++ b/android/KMEA/app/src/main/res/layout/keyboard_picker_list_layout.xml @@ -7,13 +7,13 @@ android:layout_height="wrap_content" android:orientation="vertical"> - + + android:layout_below="@id/list_appbar"/> - - diff --git a/android/KMEA/app/src/main/res/layout/keyboard_picker_toolbar.xml b/android/KMEA/app/src/main/res/layout/keyboard_picker_toolbar.xml deleted file mode 100644 index 2b72552686b958c1c4e87b854fc80b04ca008194..0000000000000000000000000000000000000000 --- a/android/KMEA/app/src/main/res/layout/keyboard_picker_toolbar.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - diff --git a/android/KMEA/app/src/main/res/layout/language_settings_list_layout.xml b/android/KMEA/app/src/main/res/layout/language_settings_list_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..c015e23e614c1269fdc06fb60e952f5ef6fe0ecd --- /dev/null +++ b/android/KMEA/app/src/main/res/layout/language_settings_list_layout.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/KMEA/app/src/main/res/layout/languages_settings_list_layout.xml b/android/KMEA/app/src/main/res/layout/languages_settings_list_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..cfd94dc9229ab742ca0714bbe0ef9335458c9797 --- /dev/null +++ b/android/KMEA/app/src/main/res/layout/languages_settings_list_layout.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/android/KMEA/app/src/main/res/layout/list_row_layout4.xml b/android/KMEA/app/src/main/res/layout/list_row_layout4.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ae4bb771c2d772f9e5ea3ca5770824836fb29ef --- /dev/null +++ b/android/KMEA/app/src/main/res/layout/list_row_layout4.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + diff --git a/android/KMEA/app/src/main/res/layout/list_toolbar.xml b/android/KMEA/app/src/main/res/layout/list_toolbar.xml index 339c5791779dd77d4238bc7665e753b1be6bf8d5..93ba49a11a7fa1339b2c03884676b5b5d30977ac 100644 --- a/android/KMEA/app/src/main/res/layout/list_toolbar.xml +++ b/android/KMEA/app/src/main/res/layout/list_toolbar.xml @@ -7,8 +7,6 @@ app:elevation="0dp"> diff --git a/android/KMEA/app/src/main/res/layout/models_list_row_layout.xml b/android/KMEA/app/src/main/res/layout/models_list_row_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b6f18b1b17f71669d3a3961a175ac10f8c56eca --- /dev/null +++ b/android/KMEA/app/src/main/res/layout/models_list_row_layout.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/KMEA/app/src/main/res/layout/predictive_submenu.xml b/android/KMEA/app/src/main/res/layout/predictive_submenu.xml new file mode 100644 index 0000000000000000000000000000000000000000..47ca58deae8cc246a6aca6eb4a72a95c1444d7b7 --- /dev/null +++ b/android/KMEA/app/src/main/res/layout/predictive_submenu.xml @@ -0,0 +1,12 @@ + + + + + + + + + + submit + button + + + button_ + location.href=""; + + + + width: ; + font-size: 11px; + height: 25px; + display: inline-block; + margin-right: 8px; + + + + + + + + + + + + + + + javascript:menuitemover(); + javascript:menuitemout(); + javascript:menuitemdown(false); + javascript:menuitemover(); + javascript:menuitemout(); + javascript:return menuitem_keydown(0); + + javascript:HideMenu();return menuitemdown(true); + + + + + + + + + + + + + + + + ShowMenu('','',0,0); return false; + javascript:ShowMenu('','',0,0); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/oem/firstvoices/windows/src/xml/expand20.png b/oem/firstvoices/windows/src/xml/expand20.png new file mode 100644 index 0000000000000000000000000000000000000000..1cbaffa312709e9d9072499bab8ea5584d31b82b Binary files /dev/null and b/oem/firstvoices/windows/src/xml/expand20.png differ diff --git a/oem/firstvoices/windows/src/xml/fonthelper.xsl b/oem/firstvoices/windows/src/xml/fonthelper.xsl new file mode 100644 index 0000000000000000000000000000000000000000..173f6f61b0639fe2ce4063a4d4bb2c3584339183 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/fonthelper.xsl @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + fonts + + + + + + + + + +
+
+
+ +
+
+
+
+ + + +
+ + + + + +
+
+ +
+
+ + + + + +
+
+ + + +
+
+ +
+ +
+
+ + + +
+
+
+
+
+ +
+
+ + + + + + +
+
+ + + +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+
+
+
+
+ +
+
+
+ + + info.png + + + + +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + +
+ + + + font_ + + + + + % + + + + + + + char excluded + U+ + + + + + +
diff --git a/oem/firstvoices/windows/src/xml/fonthinticon.gif b/oem/firstvoices/windows/src/xml/fonthinticon.gif new file mode 100644 index 0000000000000000000000000000000000000000..bcde35fa36f9239ee4154c5911e96d972f3a0886 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/fonthinticon.gif differ diff --git a/oem/firstvoices/windows/src/xml/for-firstvoices-large.png b/oem/firstvoices/windows/src/xml/for-firstvoices-large.png new file mode 100644 index 0000000000000000000000000000000000000000..b31f6cf1eb16ffb981f4c982d00c4d9db975b0ff Binary files /dev/null and b/oem/firstvoices/windows/src/xml/for-firstvoices-large.png differ diff --git a/oem/firstvoices/windows/src/xml/for-firstvoices.png b/oem/firstvoices/windows/src/xml/for-firstvoices.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0ba682aafae6c67016cee197bb2ae5d75a139e Binary files /dev/null and b/oem/firstvoices/windows/src/xml/for-firstvoices.png differ diff --git a/oem/firstvoices/windows/src/xml/fpcc-200x51.png b/oem/firstvoices/windows/src/xml/fpcc-200x51.png new file mode 100644 index 0000000000000000000000000000000000000000..889ea5439a377e4c6ff4477092e0dcc60a9ee4d5 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/fpcc-200x51.png differ diff --git a/oem/firstvoices/windows/src/xml/fpcc-53x50.png b/oem/firstvoices/windows/src/xml/fpcc-53x50.png new file mode 100644 index 0000000000000000000000000000000000000000..8751b5e733b494ca4a723fa083e35bae8af2de50 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/fpcc-53x50.png differ diff --git a/oem/firstvoices/windows/src/xml/fv-intro-background.jpg b/oem/firstvoices/windows/src/xml/fv-intro-background.jpg new file mode 100644 index 0000000000000000000000000000000000000000..91ed2e5b1f9e588539e5d1229e74e292b1ba0bd9 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/fv-intro-background.jpg differ diff --git a/oem/firstvoices/windows/src/xml/gradient.gif b/oem/firstvoices/windows/src/xml/gradient.gif new file mode 100644 index 0000000000000000000000000000000000000000..fced365961469d4d01489bf54c42a7e91993c125 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/gradient.gif differ diff --git a/oem/firstvoices/windows/src/xml/help.xsl b/oem/firstvoices/windows/src/xml/help.xsl new file mode 100644 index 0000000000000000000000000000000000000000..9d41ddde59973b20b42e53b816948864cdaa21c2 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/help.xsl @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='S_HelpTitle']" /> + config.css + + + + +
+
+
+ + +
+ + + +
+ + + +
+
+ + +
+ + + +
+ +
diff --git a/oem/firstvoices/windows/src/xml/help20.png b/oem/firstvoices/windows/src/xml/help20.png new file mode 100644 index 0000000000000000000000000000000000000000..f7ed0c1be058402d948b3e1daecb9fd67a9f10ef Binary files /dev/null and b/oem/firstvoices/windows/src/xml/help20.png differ diff --git a/oem/firstvoices/windows/src/xml/help24.png b/oem/firstvoices/windows/src/xml/help24.png new file mode 100644 index 0000000000000000000000000000000000000000..cfb79f5a9ad3c662ccfaf65c3520f5956305a098 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/help24.png differ diff --git a/oem/firstvoices/windows/src/xml/hint.css b/oem/firstvoices/windows/src/xml/hint.css new file mode 100644 index 0000000000000000000000000000000000000000..1eb5195aa4a49b698c7920e76b2802fc1e41506b --- /dev/null +++ b/oem/firstvoices/windows/src/xml/hint.css @@ -0,0 +1,116 @@ +* { + font-size: 13.3px; +} + +body { + padding: 0px; + margin: 0px; + overflow: hidden; + background: white; + border: none; +} + +html { + padding: 0px; + margin: 0px; + overflow: hidden; +} + +#container { + left: 0; + top: 0; +} + +#captionBox { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 8px; +} + +#captionBox div { + float: left; + position: relative; + display: block; + height: 6px; +} + +#captionBox #c1 { + width: 60%; + background: #FC7200; +} + +#captionBox #c2 { + width: 22%; + background: #B92034; +} + +#captionBox #c3 { + width: 18%; + background: #69B7D2; +} + +#header { + background: white; + top: 8px; + left: 0; + width: 100%; + position: absolute; + height: 64px; + border-bottom: solid 1px #929396; +} + +#footer { + left: 0px; + position: absolute; + bottom: 0px; + height: 40px; + width: 100%; + background: #79C3DA; +} + +#icon { + position: absolute; + left: 0; + top: 16px; + margin: 0 15px; +} + +#exiticon { + float: left +} + +#title { + left: 80px; + top: 20px; + position: absolute; + font-size: 21.3px; + color: #333333; + vertical-align: middle; +} + +#hint { + position: absolute; + left: 0; + top: 64px; + font-size: 14.7px; + padding: 20px; +} + +#checkbox { + float: left; + font-size: 13.3px; + color: white; + padding: 12px 10px; +} + +#buttons { + float: right; + padding: 10px; +} + +#buttons input { + width: 80px; + margin: 0 4px; +} diff --git a/oem/firstvoices/windows/src/xml/hint.xsl b/oem/firstvoices/windows/src/xml/hint.xsl new file mode 100644 index 0000000000000000000000000000000000000000..5bc9d999d8fe6e7b0815866cb6c98e2948e19a7b --- /dev/null +++ b/oem/firstvoices/windows/src/xml/hint.xsl @@ -0,0 +1,115 @@ + + + + + + + + HintTitle_ + Hint_ + + + + + + + + <xsl:value-of select="$locale/String[@Id=$HintTitle]" /> + config.css + hint.css + + + + + +
+
+ + + +
+ +
+ + +
+ + + +
+ + + + + + + +
diff --git a/oem/firstvoices/windows/src/xml/hint_close.gif b/oem/firstvoices/windows/src/xml/hint_close.gif new file mode 100644 index 0000000000000000000000000000000000000000..9850838c0ef8b125617c1d56780f43c0b20b23cf Binary files /dev/null and b/oem/firstvoices/windows/src/xml/hint_close.gif differ diff --git a/oem/firstvoices/windows/src/xml/hint_next.gif b/oem/firstvoices/windows/src/xml/hint_next.gif new file mode 100644 index 0000000000000000000000000000000000000000..6e81d804284b4643fa3b155a2d1aaa3902e32b9e Binary files /dev/null and b/oem/firstvoices/windows/src/xml/hint_next.gif differ diff --git a/oem/firstvoices/windows/src/xml/hint_prev.gif b/oem/firstvoices/windows/src/xml/hint_prev.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0f72bcc06fa784101c86c10eb6663f4b1d86ea3 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/hint_prev.gif differ diff --git a/oem/firstvoices/windows/src/xml/icon_keyboard.gif b/oem/firstvoices/windows/src/xml/icon_keyboard.gif new file mode 100644 index 0000000000000000000000000000000000000000..82fe8d68bede8e386a3ec05768603eade2c779c4 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/icon_keyboard.gif differ diff --git a/oem/firstvoices/windows/src/xml/info.png b/oem/firstvoices/windows/src/xml/info.png new file mode 100644 index 0000000000000000000000000000000000000000..59b94d8ab69569a4593d9f222f725f5254780fdd Binary files /dev/null and b/oem/firstvoices/windows/src/xml/info.png differ diff --git a/oem/firstvoices/windows/src/xml/info24.png b/oem/firstvoices/windows/src/xml/info24.png new file mode 100644 index 0000000000000000000000000000000000000000..dea0ccd2fab9ffc2a1bda2bb02d50d0116915307 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/info24.png differ diff --git a/oem/firstvoices/windows/src/xml/installkeyboard.css b/oem/firstvoices/windows/src/xml/installkeyboard.css new file mode 100644 index 0000000000000000000000000000000000000000..1b3398bd82184b9db90de2beca8489af7eda29fa --- /dev/null +++ b/oem/firstvoices/windows/src/xml/installkeyboard.css @@ -0,0 +1,127 @@ +html, body { + overflow: hidden; +} + +div { + position: absolute; +} + +#background { + background: #79C3DA; z-index: 1; left: 0; top: 0; +} + +#foreground { + z-index: 2; left: 0; top: 0; +} + +#frame { + top: 0; left: 0; + height: 244px; + padding: 10px; +} + +#image { + top: 0; + left: 0; + height: 250px; + width: 140px; + padding: 5px +} + +.content { + left: 150px; top: 0px; + width: 438px; + padding: 4px; + background: white; + border-left: 2px solid #888888; + border-top: 2px solid #888888; + border-right: 2px solid #888888; + overflow-y: auto; + height: 244px; + border-bottom: solid 2px #888888; +} + +.has_readme .content { + height: 226px; + visibility: hidden; +} + +.content_selected { + left: 150px; top: 0px; + width: 438px; + padding: 4px; + background: white; + border-left: 2px solid #888888; + border-top: 2px solid #888888; + border-right: 2px solid #888888; + overflow-y: auto; + height: 226px; + visibility: visible +} + +.content_selected#readme { + padding: 0px; width: 446px; height: 234px; overflow: hidden; +} + +#tabs { + cursor: default; + left: 150px; top: 236px; + width: 448px; background: none; + border-top: 2px solid #888888; + padding-left: 2px; +} +#tabs div { + float: left; + position: relative; + font-weight: bold; + font-size: 13.3px; + padding: 2px; + width: 76px; background: #cccccc; text-align: center; + top: -2px; margin-left: -2px; + border-left: solid 2px #888888; + border-right: solid 2px #888888; + border-bottom: solid 2px #888888; + } +#tabs div.selected { + top: -2px; + background: white; + border-left: solid 2px #888888; + border-right: solid 2px #888888; + border-bottom: solid 2px #888888; + } +} + +#details { +} + +#readme { +} + +#footer { + top: 260px; + left: 0; + height: 26px; + vertical-align: middle; + padding: 8px; + text-align: right; +} + +.keyboardname { + font-weight: bold; + font-size: 14.7px; + padding: 4px; + color: white; + background: #CC3846; +} +.detailheader { + white-space: nowrap; + font-weight: bold; + font-size: 13.3px; + padding-right: 10px; + margin: 1px; + vertical-align: top; +} +.otherdetails { + font-size: 13.3px; + vertical-align: top; +} diff --git a/oem/firstvoices/windows/src/xml/installkeyboard.js b/oem/firstvoices/windows/src/xml/installkeyboard.js new file mode 100644 index 0000000000000000000000000000000000000000..a4256cb382cdf69f7c3fa5643f94568d89997b35 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/installkeyboard.js @@ -0,0 +1,54 @@ +function tabClick(tab) { + var elemDetails = document.getElementById('details'); + var elemReadme = document.getElementById('readme'); + var tabDetails = document.getElementById('tabDetails'); + var tabReadme = document.getElementById('tabReadme'); + if(tab == tabDetails) { + tabDetails.className = "selected"; + tabReadme.className = ""; + elemDetails.className = "content_selected"; + elemReadme.className = "content"; + } else { + tabDetails.className = ""; + tabReadme.className = "selected"; + elemDetails.className = "content"; + elemReadme.className = "content_selected"; + } +} + +function genkeydown(event) { + if(!event) return true; + if(event.keyCode == 13 && event.srcElement.tagName != 'A' && (!event.srcElement.type || event.srcElement.type != 'button')) { + location.href='keyman:keyboard_install'; + } else if(event.keyCode == 27) { + location.href='keyman:keyboard_cancel'; + } else { + return true; + } + event.cancelBubble = true; + event.returnValue = false; + return false; +} + +function framekeydown() { + genkeydown(document.getElementById('frameReadme').contentWindow.event); +} + +document.onkeydown = function() { + return genkeydown(event); +} + +function setupframehotkeys() { + try { + var e = document.getElementById('frameReadme').contentWindow.document; + e.onkeydown = framekeydown; + } catch(ex) { /* I1672 - ignore access denied when loading other links */ } +} + +window.onload = function() { + setupframehotkeys(); + + if(document.getElementById('tabs') != null) { + tabClick(document.getElementById('tabDetails')); + } +} diff --git a/oem/firstvoices/windows/src/xml/installkeyboard.xsl b/oem/firstvoices/windows/src/xml/installkeyboard.xsl new file mode 100644 index 0000000000000000000000000000000000000000..e36f89b6270a47830d0e279ac49e9e52844ca049 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/installkeyboard.xsl @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='S_InstallKeyboard_Title']"/> + config.css + installkeyboard.css + + + + + +
+
+
+ + has_readme + +
+ + + + defaultkeyboard.gif + + + + height: 250px; width: 140px; border: solid 1px black + + + defaultpackage.gif + + + +
+ + +
+
+
+
+
+ +
+
+
+
+ + + + + + + +
+ + + + + + + + + no_icon.gif + + + + + +
+
+
+
+ +
+ + +
+ + +
+
+ + +
+
+ + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + keyman:link?url= + + + + + + + + + + + + +
\ No newline at end of file diff --git a/android/KMAPro/kMAPro/src/main/assets/info/jquery1-10-2.js b/oem/firstvoices/windows/src/xml/jquery.min.js similarity index 100% rename from android/KMAPro/kMAPro/src/main/assets/info/jquery1-10-2.js rename to oem/firstvoices/windows/src/xml/jquery.min.js diff --git a/oem/firstvoices/windows/src/xml/keyboardhelpicon.gif b/oem/firstvoices/windows/src/xml/keyboardhelpicon.gif new file mode 100644 index 0000000000000000000000000000000000000000..a0377787fe5fbd24fe69d49fe132ea8b19c57782 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/keyboardhelpicon.gif differ diff --git a/oem/firstvoices/windows/src/xml/keyman-desktop-for-first-voices-486x86-black.png b/oem/firstvoices/windows/src/xml/keyman-desktop-for-first-voices-486x86-black.png new file mode 100644 index 0000000000000000000000000000000000000000..3b5ec042c7a0c45368bea08bdb700d7c7d025d39 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/keyman-desktop-for-first-voices-486x86-black.png differ diff --git a/oem/firstvoices/windows/src/xml/keyman-desktop.png b/oem/firstvoices/windows/src/xml/keyman-desktop.png new file mode 100644 index 0000000000000000000000000000000000000000..e3446530159335c5a3c5a0428e2a3c598f91c329 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/keyman-desktop.png differ diff --git a/oem/firstvoices/windows/src/xml/keyman.xsl b/oem/firstvoices/windows/src/xml/keyman.xsl new file mode 100644 index 0000000000000000000000000000000000000000..9521d4a0b53bb71e5ce36e3cc65b9a6e06af0534 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman.xsl @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='S_ConfigurationTitle']"/> + config.css + menu.css + + + + + + + + +
+
+ +
+ +
+
+
+
+
+
+
+
+
+ +
+
+ + +
+ + + + + + + + + +
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/keyman_footer.xsl b/oem/firstvoices/windows/src/xml/keyman_footer.xsl new file mode 100644 index 0000000000000000000000000000000000000000..f54bb46e82c345ca3365abd5a937b3181f0dcb60 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman_footer.xsl @@ -0,0 +1,36 @@ + + + + + + + + + + +
+ + + 1 + keyman:footer_ok + 70px + + + + keyman:footer_cancel + 70px + +
+ +
+ +
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/keyman_hotkeys.xsl b/oem/firstvoices/windows/src/xml/keyman_hotkeys.xsl new file mode 100644 index 0000000000000000000000000000000000000000..f8013bc9fcce43396b0c5a50192762d4757023e2 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman_hotkeys.xsl @@ -0,0 +1,138 @@ + + + + + + + + /* Hotkey Styles */ + #hotkeys { + position: absolute; + left: 0; + top: 0; + width: 100%; + font-size: 13.3px; + xheight: 100%; + height: expression( document.getElementById('subcontent_hotkeys').offsetHeight ); + overflow-y: auto; + padding: 6px 4px 4px 4px; + border-bottom: 2px solid white; + } + + .hotkey_title + { + background: #e0e5ef; + font-size: 13.3px; + font-weight: bold; + color: #001020; + padding: 4px 8px; + } + + + +
+ + +
+ +
+
+ + + + + +
+ + + +
+ +
+ + +
+ list_lang_ + return list_keydown(event,'lang_'); + document.getElementById('list_lang_').focus(); return true; + +
+ +
+ + + + + + + + + + + no_icon.png + + + + + windows_keyboard.png + + + + +
+ + — + +
+ +
+
+
+ + +
+ list_hotkey_ + return list_keydown(event,'hotkey_'); + document.getElementById('list_hotkey_').focus(); return true; + +
+ + + + + + + + + + + +
+ +
+
+
+ +
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/keyman_icon.png b/oem/firstvoices/windows/src/xml/keyman_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a84ae9f1b277e157defad5dbbb1300ba10d8bf7a Binary files /dev/null and b/oem/firstvoices/windows/src/xml/keyman_icon.png differ diff --git a/oem/firstvoices/windows/src/xml/keyman_keepintouch.xsl b/oem/firstvoices/windows/src/xml/keyman_keepintouch.xsl new file mode 100644 index 0000000000000000000000000000000000000000..f24bd97619a091467ffd5f38aa51acd0ac672615 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman_keepintouch.xsl @@ -0,0 +1,23 @@ + + + + + + + +
+ + +
+ +
+
+ +
+
+
+
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/keyman_keyboardlist.xsl b/oem/firstvoices/windows/src/xml/keyman_keyboardlist.xsl new file mode 100644 index 0000000000000000000000000000000000000000..a1fd8a215ac3db2f7e46b1b6a01cdfe91e4ddd83 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman_keyboardlist.xsl @@ -0,0 +1,304 @@ + + + + + + + + + ]]> + +
+ + +
+ +
+
+ + +
+ + + + + + 1 + + + + + + + + + +
+ package_ + + + package.gif + +
+ + + .kmp + +
+
+
+ + + + +
+
+
+ +
+
+ + + info.png + + + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+ list_item + list_keyboard_ + + + return list_keydown(event,'keyboard_'); + return list_focus(event,'keyboard_'); + return list_blur(event,'keyboard_'); + event.cancelBubble=true;event.returnValue=false; + + left:0;top:0;width:99% +
+ return list_detail(event,'keyboard_'); + listtitle_keyboard_ + + list_title keyboard_loadedkeyboard_unloaded + +
+ + keyboardcheck_ + event.stopPropagation();return false; + return keyboard_checkclick(''); + checked + +
+ + + + + + + + + + + no_icon.gif + + + + +
+ +
+ keyboard_name_ + + + .kmx + + +
+
+ + +
+ list_expand_keyboard_ +
+ + + + +
+ list_help_keyboard_ + location.href='keyman:package_welcome?id=';event.cancelBubble=true;return false; +
+
+ + + +
+ +
+
+
+ list_detail_keyboard_ + + + + + + + +
+
+
+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ .kmx +
+ +
+ +
+ +
+ + + , + +
+ + + , + +
+ + + + +
+ + + + + +
+ + + + +
+ +
+ +
+
+
 
+
+
+
+ +
+ + +
+ + + +
+
+ +
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/keyman_menu.xsl b/oem/firstvoices/windows/src/xml/keyman_menu.xsl new file mode 100644 index 0000000000000000000000000000000000000000..2122fd5ec2d9a1bd1f20231523d8bcd5e36dea9a --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman_menu.xsl @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/oem/firstvoices/windows/src/xml/keyman_options.xsl b/oem/firstvoices/windows/src/xml/keyman_options.xsl new file mode 100644 index 0000000000000000000000000000000000000000..246d6b98aeee1bd82fdb7db4893af4628071723c --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman_options.xsl @@ -0,0 +1,95 @@ + + + + + +
+ + +
+ +
+
+ + +
+ + + + + + + + +
+ + +
+ + + keyman:support_proxyconfig + + + + 1 + + keyman:options_basekeyboard + + () +
+
+
+
+ + + +
+ + + + + keyman:options_resethints + +
+
+
+ + 1 + javascript:options_updatecheck(''); + javascript:options_updatecheck(''); + + list_option_ + return list_keydown(event,'option_'); +
+
+ + optionscheck_ + true + true + javascript:event.cancelBubble=true;event.returnValue=true;location.href='keyman:options_clickcheck?id=&value='+this.checked; + -1 + +
+
+ + + vertical-align: middle; display: inline; margin-left: 3px; color: #808080 + + + vertical-align: middle; display: inline; margin-left: 3px; + + + +
+
+ +
+ list_detail_ +
+ +
+
+
+
+ +
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/keyman_support.xsl b/oem/firstvoices/windows/src/xml/keyman_support.xsl new file mode 100644 index 0000000000000000000000000000000000000000..7a7ea01dc0ccb6197644d55a0c3038c2dc264c51 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/keyman_support.xsl @@ -0,0 +1,61 @@ + + + + + + + +
+ + +
+ +
+
+
+ + + keyman-desktop.png + + +
+ +
+  
+
+ +
+

+ + + keyman:link?url=https://firstvoices.atlassian.net/servicedesk/customer/portals + 220px + +
+ +
+
+ +
+ +
+ + + + +
+
+
+ +
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/list-expand.png b/oem/firstvoices/windows/src/xml/list-expand.png new file mode 100644 index 0000000000000000000000000000000000000000..e9b02ce7f64a869d33386b005c0f9c470cae1350 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/list-expand.png differ diff --git a/oem/firstvoices/windows/src/xml/locale.xml b/oem/firstvoices/windows/src/xml/locale.xml new file mode 100644 index 0000000000000000000000000000000000000000..4951e178151b86ba534208e41b2ddce3c673da10 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/locale.xml @@ -0,0 +1,589 @@ + + + + + + + +Keyman + +Tahoma +8 + + + + + + + +&Name_CNV; + + + + + +Yes +No + +&Yes +&No + +OK +Cancel +Close +Apply +Remind me Later + +OK +Cancel + +Click this icon to select a keyboard +&Name; is still running. Click this icon to use your language keyboard at any time + + + + + +&Name; Configuration + + + 40 + 118 + 40 + + +Help + + + +Keyboard Layouts K +Options O +Hotkeys H +Support S +Keep in Touch T + + + +Filename: + +Package version: +Keyboard version: +Author: +Website: + +Package: +Fonts: +Keyboard Layouts: + +Encodings: + +Layout Type: + Fixed (Positional) + Mapped to Windows layout (Mnemonic) + +Description: + +Installed for: + All users + Current user + +Languages: + ✕ + Add language + +On Screen Keyboard: + Custom + Installed + Not installed + +Documentation: + Installed + Not installed + +Message: +Copyright: + + + +Package options +Options +Install keyboard... +Download keyboard... + + Keyboard options +Uninstall +Uninstall package +Show introductory help +Change hotkey +Set hotkey +Uninstall On Screen Keyboard +Install On Screen Keyboard... + +You do not have any keyboards installed. Click the Download Keyboard button to install a keyboard layout from the Keyman website. +You can only uninstall the keyboard '%0:s' if you are an Administrator + + + +General +Startup +On Screen Keyboard +Advanced + +Keyboard hotkeys toggle keyboard activation +Simulate AltGr with Ctrl+Alt +Treat hardware deadkeys as plain keys +Show hint messages + +Start when Windows starts +Show splash screen +Show welcome screen +Automatically check keyman.com weekly for updates +Test for conflicting applications when &Name; starts + +Release Shift/Ctrl/Alt on On Screen Keyboard after clicking a key +Always show On Screen Keyboard Window when Keyman keyboard is selected +Switch to appropriate On Screen Keyboard/Help automatically when a keyboard is selected + +Turn on Unicode supplementary character display (requires restart) +Turn on 'Unknown' language +Debugging +Switch Windows language when a Keyman keyboard is selected + Select keyboard layout for all applications +Always elevate user permissions when running in Windows Vista + +User interface language... + +Base Keyboard... + + + + + + + + + +(none) +Switch &Name; Off +Open Keyboard Menu +Show On Screen Keyboard Pane +Open Configuration + +Show Keyboard Usage Pane +Show Font Helper Pane +Show Character Map Pane +Open Text Editor + +Open Language Switcher + +General Hotkeys +Keyboard Layouts + + + +Installed Language +Windows Layout +Keyman Keyboard + +(use Windows layout) + + + +Upgrade now! +Send Support Request +Contact Keyman Support +If you have any issues using Keyman, just ask us for help. +Open FirstVoices Help Center +Created by SIL International +Copyright © SIL International. All Rights Reserved. +Version +Engine Version + +Useful Links + +Online Help +Diagnostics +Check for Updates +Proxy Settings... + +Diagnostics +Check Language Settings + +Microsoft Windows appears to be correctly configured for your language(s). + + + + + + + 40 + + +Download Keyboard From keyman.com +Don't install, just download + + + + + + + + + +Install Keyboard/Package + +Details +Readme + +Install +Install for all users + + + + + + + +Proxy Server Configuration + +Server: +Port: +Username: +Password: + + + + + + + +Set Base Keyboard +Select the base Latin script +keyboard that you use in Windows. Keyman keyboards will adapt automatically to your preferred layout. + + + + + +Change Hotkey + +&Clear Hotkey +Select a standard hotkey or choose 'Custom' and hold Ctrl,Shift and/or Alt and type your desired hotkey for keyboard %0:s: +Select a standard hotkey or choose 'Custom' and hold Ctrl,Shift and/or Alt and type your desired hotkey for language %0:s: +Select a standard hotkey or choose 'Custom' and hold Ctrl,Shift and/or Alt and type your desired hotkey: + +The hotkey %0:s will conflict with normal keyboard use. You should use at least Ctrl or Alt. Do you want to change this now? +The hotkey %0:s conflicts with the hotkey selected for keyboard %1:s. If you continue, the hotkey for keyboard %1:s will be cleared. Continue? + + + + + +Select Keyboards to Install +You cannot install all the keyboards in this package. You can install a maximum of %0:d additional keyboards. Please select the keyboards you wish to install from this package. + + + + + + + +Updated &Name; Components Available + +Updates for &Name_CN; are now available +Please select the updates you wish to install: + +Do you want to download and install this patch now? +You can download the new version from: +Do you want to visit the website now? + +Install Now +Cancel + +Old Version +Updated Component +Size + +&Name; %0:s +Keyboard %0:s %1:s + +Unable to contact keyman.com - please make sure you have an active Internet connection and try again. +Unable to contact keyman.com - please make sure you have an active Internet connection and try again. The error received was: %0:s + +&Name; updates are available +Click this icon to download and install updates +View and &install &Name; updates +E&xit online update check + + + + + + + +&Name_CNV; +&Name; +&Version; + +Start Keyman +Exit + +Other tasks + Configuration + Show this screen at startup + Hide this screen at startup + + + + + +Display in +Find other display languages online... +Help translate the user interface... +English +English +en +en + +&Name; + +Select User Interface Language + +Choose the language that you want displayed in the &Name; interface. +&More languages online... + +Create a new translation online + + + + + + +Language Configuration Tasks + +Configure your computer to work with + + +&Name; has detected that the following configuration tasks need to be completed in order for +script(s) to work correctly on your computer: + +Microsoft Office Language Support + +More Information... + +Do you want &Name; to complete these tasks now? + + +Don't ask me about this again + + + + + + + 40 + 40 + + +Reset Hints +All hint messages have been reset and will be displayed again. + +Exit &Name;? +Are you sure you want to exit &Name;? Your Keyman keyboards will still be listed in the Windows languages, but will not be functional until you restart &Name;. + +On Screen Keyboard Closed +You have closed the On Screen Keyboard. &Name; is still running. You can open the On Screen Keyboard at any time by clicking on the &Name; Icon and selecting "On Screen Keyboard" + +Don't show this hint again + + + + + + +&Name; Help +Help Contents + +Help on " +" keyboard + +View On Screen Keyboard +View Keyboard Usage +View Font Helper +View Character Map +Switch &Name; Off +Open &Name; Configuration +Open Help +Close On Screen Keyboard + + + + + +Switch &Name; &Off +On Screen &Keyboard +Keyboard &Usage +&Font Helper +Character &Map +&Text Editor... +&Configuration... + +&Help... +E&xit + +No keyboard layouts are installed. +Choose "Configuration" to install a +keyboard layout for your language. + +Fade When Inactive +Show Toolbar +Save as Web Page... +Print... + + + + + +Keyboard Help +On Screen Keyboard +&Name; Help +&Name; Configuration +This keyboard layout has no Getting Started or Usage documentation. Please check the Start Menu or contact the keyboard developer for more information on how to use this keyboard layout. +Click the buttons below to view additional documentation and/or On Screen Keyboard. +No keyboard layout is currently selected in &Name;. Click on any of the keyboard icons in the toolbar above to choose a keyboard layout. +No keyboard layouts are currently installed or loaded. Use &Name; Configuration to install a keyboard layout. + + + + + + + + + +&Name_CN; +Version %0:s + +Help +&Print... +&Download... + + + +A package with the name %0:s is already installed. Do you want to uninstall it and install the new one? +A keyboard with the name '%0:s' is already installed. If you continue, it will be uninstalled before the new one is installed. Continue? +The keyboard '%0:s' is part of package '%1:s'. You must uninstall the entire package. Continue? +You can only install or uninstall keyboards as Administrator. Use Control Panel to select languages for use as a normal user. +Changing the setting of Surrogates requires Windows to be restarted. Do you want to restart Windows now? +The package or keyboard '%0:s' does not include any introductory help. +This operating system is not supported. +Your licence has been successfully activated. +KeymanDesktop.chm +The help file $(SKOnlineHelpFile) could not be found. +<Damaged keyboard> +Codepage +Unicode +Downloading File + + + + +Are you sure you want to remove the on screen keyboard installed for %0:s? +Are you sure you want to uninstall keyboard %0:s? +Are you sure you want to uninstall package %0:s? + +%1:s +The following fonts will also be uninstalled: %0:s. +Do you want to activate $(SKShortApplicationTitle) online now with licence number %0:s? If you click No, you can choose from alternate activation methods. +The Character Map has a database of characters that needs to be built before it can be used. Build it now? + + + +The Unicode Character database could not be deleted for a rebuild. Error details are: %0:s +The Unicode Character database could not be created and has been disabled. Error details are: %0:s +The Unicode character database did not load successfully (%0:s). Rebuild it now? + + +Cannot activate browser or email program for this URL. +The keyboard could not be printed successfully. Please save to a web page and print manually. +&Name; failed to start. Please check your security settings to make sure that the program keyman.exe is allowed to start before continuing. The error returned was: + +"%0:s" + +Do you want to try and start &Name; again now? + + + +&Name; debug information will be stored in a log file called %LOCALAPPDATA%\Keyman\Diag\system#.etl (where # is a number). You should exit &Name; before attempting to delete this file. + +WARNING: This file can grow large very quickly. Enabling debugging may slow down your system and should only be done if advised by technical support. + +PRIVACY WARNING: Please note that the debug logfile records all keystrokes that you type. You should only turn on the debug log for the duration of a debugging or diagnostic session. + + + +Add %0:s editing support to %1:s +Microsoft Office 2000 +Microsoft Office XP +Microsoft Office 2003 +Microsoft Office 2007 +Microsoft Office 2010 + + +Link language %0:s to Keyman keyboard %1:s +Install language %0:s and link to Keyman keyboard %1:s + + + +Please wait while &Name; finds the fonts that will work with +keyboard. + + +is not a Unicode keyboard. Fonts cannot be automatically located. Please check the keyboard documentation for font information. + +The following fonts work with +keyboard: + +The following fonts may also work: + +The following fonts may work with +keyboard: + +No fonts were found on your system that work with +. Please check the documentation to find fonts for this keyboard. + +No keyboard layouts are currently installed or loaded. Use &Name; Configuration to install a keyboard layout. +Please choose a &Name; keyboard to find the fonts that will work with it. + + + +Hint: +Resize the On Screen Keyboard by clicking and dragging on the window border +Move the On Screen Keyboard by clicking and dragging on the "&Name;" title +Insert any Unicode character into your document with the +Character Map Tool +Find out which fonts will work with your language with the +Font Helper Tool +Get more help on the keyboard by clicking the +Keyboard Usage button + + + + + +Text Editor - &Name; + + diff --git a/oem/firstvoices/windows/src/xml/localedef.dtd b/oem/firstvoices/windows/src/xml/localedef.dtd new file mode 100644 index 0000000000000000000000000000000000000000..38493a6ad878ce787e02013f842f6bee93509078 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/localedef.dtd @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/oem/firstvoices/windows/src/xml/menu-frame.js b/oem/firstvoices/windows/src/xml/menu-frame.js new file mode 100644 index 0000000000000000000000000000000000000000..95aa0797c62541cc75e9d870e20a18b4a6bebabe --- /dev/null +++ b/oem/firstvoices/windows/src/xml/menu-frame.js @@ -0,0 +1,142 @@ + var menuframe_activeindex=0, menuframe_items = []; + + function menuframe_add(path, name, description, hotkey) + { + var n = menuframe_items.length; + document.write('' + + ''+description+'
'+description+'
'); + menuframe_items.push(document.getElementById('menuframe'+n)); + document.getElementById('menuframe'+n).onclick = function(event) { menuframe_activate(n); } + //menuframe_items[n].onclick = function() { menuframe_activate(n); } + menuframe_items[n].menu_description = description; + menuframe_items[n].menu_hotkey = hotkey; + menuframe_items[n].menu_name = name; + } + + function menuframe_activate(n) + { + var p = menuframe_items[menuframe_activeindex], c = menuframe_items[n]; + var itemtype, blah; + + p.className='menuframe'; + c.className='menuframe_active'; + menuframe_activeindex=n; + document.getElementById('content_'+p.menu_name).style.display = 'none'; + document.getElementById('content_'+c.menu_name).style.display = 'block'; + + save_state(); + + if(!loading_state) { + var q = document.getElementById('content_'+c.menu_name).getElementsByTagName('span'); + for(var i = 0; i < q.length; i++) { + blah = q[i].id; + itemtype = blah.substr(0, 5); + + if( itemtype == "list_" ) { + q[i].focus(); + break; + } + } + } + + if(typeof window['menuframe_activate_'+c.menu_name] != 'undefined') { + window['menuframe_activate_'+c.menu_name](); + } + } + + function menuframe_keydown(event) + //document.onkeydown = function() + { + if(!event) event = window.event; + switch(event.keyCode) { + case 9: + if( event.ctrlKey == true && event.shiftKey == false ) { + event.cancelBubble = true; + event.returnValue = false; + if(menuframe_activeindex < menuframe_items.length - 1) { + menuframe_activate(menuframe_activeindex+1); + } + } else if( event.ctrlKey == true && event.shiftKey == true ) { + event.cancelBubble = true; + event.returnValue = false; + if(menuframe_activeindex > 0) { + menuframe_activate(menuframe_activeindex-1); + } + } else event.returnValue = true; + break; + case 34: /* pgdn */ + event.cancelBubble = true; + event.returnValue = false; + if(menuframe_activeindex < menuframe_items.length - 1) { + menuframe_activate(menuframe_activeindex+1); + } + break; + case 33: /* pgup */ + event.cancelBubble = true; + event.returnValue = false; + if(menuframe_activeindex > 0) { + menuframe_activate(menuframe_activeindex-1); + } + break; + case 13: // enter + if( event.target.id.substring(0,6) != 'button' && event.target.tagName != 'TEXTAREA' ) { + event.cancelBubble = true; event.returnValue = false; + location.href='keyman:footer_ok'; + break; + } + event.cancelBubble = true; event.returnValue = true; + break; + case 27: // esc + event.cancelBubble = true; event.returnValue = false; + location.href='keyman:footer_cancel'; + break; + case 32: // spacebar + switch(event.srcElement.tagName.toLowerCase()) { + case 'select': + var k = 'list_' + event.srcElement.index; + document.getElementById(k).focus(); + break; + case 'option': + var k = 'list_' + event.srcElement.index; + alert(k); + document.getElementById(k).focus(); + break; + case 'input': return true; + case 'div': + case 'span': + if(event.srcElement.parentElement) { + switch(event.srcElement.parentElement.id) { + case 'keyboards': + keyboard_checkclick(event.srcElement.id.substring(5),true); + break; + case 'options': + options_updatecheck(event.srcElement.id.substring(5),true); + break; + case 'hotkeys': + location.href='keyman:hotkey_set?index=hotkey_' + event.srcElement.id.substring(5); + break; + default: + break; + } + } + break; + } + event.cancelBubble = true; event.returnValue = false; event.preventDefault(); break; + break; + default: + for(var i = 0; i < menuframe_items.length; i++) + if(menuframe_items[i].menu_hotkey.charCodeAt(0) == event.keyCode && event.altKey) + { + event.cancelBubble = true; event.returnValue = false; menuframe_activate(i); break; + } + + } + } + + function menuframe_setup() { + document.onkeydown = menuframe_keydown; + } + doAttachEvent(window, 'load', menuframe_setup); + + \ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/menu.css b/oem/firstvoices/windows/src/xml/menu.css new file mode 100644 index 0000000000000000000000000000000000000000..bf1dcdba94f88c527719dc7d45857d573edc69ed --- /dev/null +++ b/oem/firstvoices/windows/src/xml/menu.css @@ -0,0 +1,37 @@ +/* Popup menu styles */ +.menu +{ + white-space: nowrap; + position: absolute; + display: block; + visibility: hidden; + background: white; + border: solid 1px #ACA899; + font-size: 11px; + padding: 4px; + background-image: url("menugrey.gif"); + background-repeat: repeat-y; + background-position: 0 0; + width: 220px; + z-index: 100; +} + +.menuitem +{ + display: block; + padding: 4px 4px 4px 28px; + margin: 1px; +} + +.hover +{ + color: #000000; + background: #FFE3DB; + border: solid 1px #DB704F; + padding: 3px 3px 3px 27px; +} + +.down +{ + background: #DB704F; +} diff --git a/oem/firstvoices/windows/src/xml/menu.js b/oem/firstvoices/windows/src/xml/menu.js new file mode 100644 index 0000000000000000000000000000000000000000..c706e26b9c2f27f7876835120bd1f0d91a40c5b5 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/menu.js @@ -0,0 +1,203 @@ +var menudiv = null, global_menu_elem_name = null; + + function RightButtonMenu( menuid ) { + if( (event.clientX + 180) > document.body.clientWidth ) { + ShowMenu( menuid,'right', event.clientX, event.clientY ); + } else { + ShowMenu( menuid,'left', event.clientX, event.clientY ); + } + } + + function PageOffset(e) + { + var pt = {x: 0, y: 0}; + while(e) + { + pt.x += e.offsetLeft; pt.y += e.offsetTop; pt.x -= e.scrollLeft; pt.y -= e.scrollTop; + e = e.offsetParent; + } + return pt; + } + + function ShowMenu(name,align,xpos,ypos) { + global_menu_elem_name = name; + var q; + var menu = document.getElementById('menu_'+name), button = document.getElementById('button_'+name); + var index = name.substr(8,2); + + menudiv.innerHTML = menu.innerHTML; + menudiv.style.width = menu.offsetWidth + 'px'; + + (function(m) { + for(var i = 0; i < m.children.length; i++) { + if(m.children[i].id != '') { m.children[i].id = 'Popup_'+m.children[i].id; } + } + })(menudiv); + + var pb = PageOffset(button); + var pm = PageOffset(menu.offsetParent); + + menudiv.style.zIndex=100; + menudiv.style.visibility='visible'; + + if( xpos && ypos ) { + if(align=='right') + menudiv.style.left = (xpos-menudiv.offsetWidth) + 'px'; + else + menudiv.style.left = xpos + 'px'; + menudiv.style.top = ypos + 'px'; + } else { + if(align=='right') menudiv.style.left = (pb.x+button.offsetWidth-menudiv.offsetWidth) + 'px'; + else menudiv.style.left = pb.x + 'px'; + menudiv.style.top = (pb.y+button.offsetHeight) + 'px'; + } + + + q = menudiv.children[0]; + q.focus(); +//menudiv.setCapture(false); // I1828 + } + + function HideMenu() { + if(event.srcElement != menudiv) { + global_menu_elem_name = null; + menudiv.style.visibility='hidden'; + document.releaseCapture(); + try { + if(lastfocus_item != null) lastfocus_item.focus(); + } catch(e) { + ; // I912 + } + } + } + + function menuitem_keydown(n) + { + switch(event.keyCode) { + case 27: // esc + /* esc */ + HideMenu(); + event.cancelBubble = true; + event.returnValue = false; + return false; + case 13: + case 32: // enter, spacebar + HideMenu(); + menuitemdown(true); + event.cancelBubble = true; + event.returnValue = false; + return true; + + case 35: // end + var elem = event.srcElement.parentElement; + var j = elem.children.length - 1; + elem.children[j].focus(); + break; + case 36: // home + var elem = event.srcElement.parentElement; + for( var i = 0; i < elem.children.length; i++ ) { + if( elem.children[i].tabIndex ) { + elem.children[i].focus(); + break; + } + + } + break; + case 38: // up + // avoid dropdowns + if( event.srcElement.tagName.toLowerCase() == 'select' ) { + event.cancelBubble=true; + return true; + } + + // find prev list element + var elem = event.srcElement.parentElement; + for(var i = 0; i < elem.children.length; i++) { + if(elem.children[i] == event.srcElement) + { + j = i; + do { + if(--j < 0) j = elem.children.length-1; + if(elem.children[j].tabIndex) + { + elem.children[j].focus(); + break; + } + } while(j != i); + break; + } + } + break; + case 40: // down + // avoid dropdowns + if( event.srcElement.tagName.toLowerCase() == 'select' ) { + event.cancelBubble=true; + return true; + } + + // find next file element + var elem = event.srcElement.parentElement; + for(var i = 0; i < elem.children.length; i++) { + if(elem.children[i] == event.srcElement) + { + j = i; + do { + if(++j >= elem.children.length) j = 0; + if(elem.children[j].tabIndex) + { + elem.children[j].focus(); + break; + } + } while(j != i); + break; + } + } + break; + default: + event.returnValue = true; + return true; + } + event.returnValue = false; + event.cancelBubble = true; + return false; + } + + function menuitemover() + { + var e = event.srcElement; while(e && e.tagName.toLowerCase() != 'span') e=e.parentElement; + if(e) { e.className="menuitem hover"; e.focus(); } // I1601 + } + function menuitemout() + { + var e = event.srcElement; while(e && e.tagName.toLowerCase() != 'span') e=e.parentElement; + if(e) e.className="menuitem"; + } + function menuitemdown(b) + { + if(b) { + var e = event.srcElement; + if (e) { + location.href = e.attributes['command'].value; + e.className="menuitem"; + } + } else { + event.returnValue = false; + event.cancelBubble = true; + } + } + + function menu_doAttachEvent(obj, e, f) + { + if(obj.attachEvent) return obj.attachEvent('on'+e, f); + return obj.addEventListener(e, f, false); + } + + function menusetup() { + menudiv = document.createElement('SPAN'); + menudiv.className='menu'; + menu_doAttachEvent(menudiv, 'mouseup', HideMenu); + document.body.appendChild(menudiv); + } + menu_doAttachEvent(window, 'load', menusetup); + + \ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/menuframe_hotkeys.png b/oem/firstvoices/windows/src/xml/menuframe_hotkeys.png new file mode 100644 index 0000000000000000000000000000000000000000..8bba89fd710d7127b5ff9105a821c3438dd9d652 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/menuframe_hotkeys.png differ diff --git a/oem/firstvoices/windows/src/xml/menuframe_keepintouch.png b/oem/firstvoices/windows/src/xml/menuframe_keepintouch.png new file mode 100644 index 0000000000000000000000000000000000000000..fa701ce263299b6431758a6aceeff7716f4669df Binary files /dev/null and b/oem/firstvoices/windows/src/xml/menuframe_keepintouch.png differ diff --git a/oem/firstvoices/windows/src/xml/menuframe_keyboardlist.png b/oem/firstvoices/windows/src/xml/menuframe_keyboardlist.png new file mode 100644 index 0000000000000000000000000000000000000000..75bf8b867be3dc4211e18a91fdbe0c8f6ca5907c Binary files /dev/null and b/oem/firstvoices/windows/src/xml/menuframe_keyboardlist.png differ diff --git a/oem/firstvoices/windows/src/xml/menuframe_options.png b/oem/firstvoices/windows/src/xml/menuframe_options.png new file mode 100644 index 0000000000000000000000000000000000000000..9ce4af2e69a495b91e64299e7ea4a305b3bfbfe9 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/menuframe_options.png differ diff --git a/oem/firstvoices/windows/src/xml/menuframe_support.png b/oem/firstvoices/windows/src/xml/menuframe_support.png new file mode 100644 index 0000000000000000000000000000000000000000..70a0325cafcd15f1758b2190634c254bcac4e4eb Binary files /dev/null and b/oem/firstvoices/windows/src/xml/menuframe_support.png differ diff --git a/oem/firstvoices/windows/src/xml/menugrey.gif b/oem/firstvoices/windows/src/xml/menugrey.gif new file mode 100644 index 0000000000000000000000000000000000000000..d68d486fa0a594fb6796b6ae8976973fe5002ebf Binary files /dev/null and b/oem/firstvoices/windows/src/xml/menugrey.gif differ diff --git a/oem/firstvoices/windows/src/xml/no_icon.gif b/oem/firstvoices/windows/src/xml/no_icon.gif new file mode 100644 index 0000000000000000000000000000000000000000..19167f76ed6fcb98eab066c4bb0c6048934ca9a8 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/no_icon.gif differ diff --git a/oem/firstvoices/windows/src/xml/no_icon.png b/oem/firstvoices/windows/src/xml/no_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ac0de97a6b5045457f59d9d5872c061f960a91e2 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/no_icon.png differ diff --git a/oem/firstvoices/windows/src/xml/onlineupdate.xsl b/oem/firstvoices/windows/src/xml/onlineupdate.xsl new file mode 100644 index 0000000000000000000000000000000000000000..9896aec4b90f8ce9643d77866c6d5e9503bdadf2 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/onlineupdate.xsl @@ -0,0 +1,230 @@ + + + + + + + + + + + + +<xsl:value-of select="$locale/String[@Id='S_Update_Title']"/> + + + + + +
+ +
+
+
+
+ + + + + + + + +
+
+
+ +
+ + +
+ + + + + + javascript:updateTick(""); + Update_ + checked + Update_ + + + Update__RequiresAdmin + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + +
+ + + + +
+
+ +
+
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/package.gif b/oem/firstvoices/windows/src/xml/package.gif new file mode 100644 index 0000000000000000000000000000000000000000..4cf70581bad19b718d774dd64750166671e34a2e Binary files /dev/null and b/oem/firstvoices/windows/src/xml/package.gif differ diff --git a/oem/firstvoices/windows/src/xml/proxyconfiguration.xsl b/oem/firstvoices/windows/src/xml/proxyconfiguration.xsl new file mode 100644 index 0000000000000000000000000000000000000000..8b17d5311670597ae3b1916bf9996c29c691b4fb --- /dev/null +++ b/oem/firstvoices/windows/src/xml/proxyconfiguration.xsl @@ -0,0 +1,143 @@ + + + + + + + + + + + + +<xsl:value-of select="$locale/String[@Id='S_ProxyConfiguration_Title']"/> + + + + + + +
+
+
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+
+ +
+ + +
+
\ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/search.gif b/oem/firstvoices/windows/src/xml/search.gif new file mode 100644 index 0000000000000000000000000000000000000000..44f1ab11c0548a3e28d9a9371bc3ec9d1ba1965f Binary files /dev/null and b/oem/firstvoices/windows/src/xml/search.gif differ diff --git a/oem/firstvoices/windows/src/xml/shield.png b/oem/firstvoices/windows/src/xml/shield.png new file mode 100644 index 0000000000000000000000000000000000000000..d50a9db741b1308e99f33e25c0d08a1014823ca3 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/shield.png differ diff --git a/oem/firstvoices/windows/src/xml/sil-logo-blue.png b/oem/firstvoices/windows/src/xml/sil-logo-blue.png new file mode 100644 index 0000000000000000000000000000000000000000..e51c0804a3ba28f16a159e2da4dcacd098ea22b3 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/sil-logo-blue.png differ diff --git a/oem/firstvoices/windows/src/xml/smallgreentick.png b/oem/firstvoices/windows/src/xml/smallgreentick.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb2a5dba3359d70b6847bcaf37c72b05c893601 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/smallgreentick.png differ diff --git a/oem/firstvoices/windows/src/xml/splash.css b/oem/firstvoices/windows/src/xml/splash.css new file mode 100644 index 0000000000000000000000000000000000000000..03caf54211e1f696714f55858266e9a9f3bc323d --- /dev/null +++ b/oem/firstvoices/windows/src/xml/splash.css @@ -0,0 +1,168 @@ +* { + font-family: Calibri; +} + +html, body { + padding: 0px; + margin: 0px; + overflow: hidden; + font-size: 15px; + background: white; +} + +div { + position: static; +} + +#size { + position: absolute; + left: 0; + top: 0; + border: solid 1px #444444; + background: white; + width: 630px; + height: 470px; +} + +#displaylanguage { top: 40px; right: 12px; position: absolute; color: white; } +#displaylanguage a { color: white; } + +#titleBox { + position: absolute; left: 20px; top: 24px; background: url("keyman-desktop-for-first-voices-486x86-black.png"); width: 486px; height: 86px; +} + +#silLogo { + position: absolute; right: 20px; top: 24px; background: url("fpcc-53x50.png"); width: 53px; height: 50px; +} + +#family { + position: absolute; left: 0px; top: 128px; width: 630px; height: 210px; + background: url("fv-intro-background.jpg"); +} + +#footer { + left: 0; + bottom: 0; + position: absolute; + width: 700px; + padding: 8px; +} + +#version { + position: absolute; font-size: 0.8em; right: 90px; bottom: 10px; color: #F68924 +} + +#beta { + color: red; font-weight: bold; +} + +#keyboards { + position: absolute; + left: 15px; + top: 348px; + font-size: 12pt; + color: #626364; + height: 84px; + max-height: 84px; + overflow-y: auto; + width: 400px; + padding: 0 16px 0 0; +} + +a.button { + cursor: pointer; + text-align: center; + color: black; + text-decoration: none; + position: absolute; +} + +.btn { + float: left; + width: 160px; + height: 26px; + font-weight: bold; + font-size: 18px; + font-family: Calibri; + padding: 6px 12px 2px 12px; + text-align: center; + border-radius: 4px; + color: #33333f; +} + +.btn-orange { + background: #F68924; +} + +.btn-blue { + background: #79C3DA; +} + +.btn-red { + background: #CC3846; + color: #fcf8f8; +} + +.btn-small { + width: 61px; + height: 20px; + font-size: 15px; + padding: 2px 6px 0 6px; + background: #F68924; + border-radius: 3px; +} + +#ribbon { + display:none; + position: absolute; + left: 0; + top: 100px; + width: 100%; + height: 8px; + background: #79C3DA; +} + +#ribbon div { + position: static; + float: left; + height: 8px; +} + +#ribbon #ribbon1 { + width: 56%; + background: #F68924; +} + +#ribbon #ribbon2 { + width: 24%; + background: #CC3846; +} + +#tasks { + position: absolute; + left: 0; bottom: 0; margin-left: 8px; margin-bottom: 8px; font-size: 13px } +#tasks div { margin-bottom: 2px; margin-left: 4px } + +#startNow { + left: 434px; + top: 352px; + height: 1.2em; +} + +#config { + left: 434px; + top: 392px; +} + +#exit { right: 12px; bottom: 12px; } + +#tasks div#showAtStartupBox { margin-top: 6px; margin-left: 0; } +#tasks a, #showAtStartupLabel { color: #F68924; text-decoration: none; } +#tasks a:hover { text-decoration: underline; } +#showAtStartup { margin: 0 4px 0 0; } + +#showAtStartupBox #showAtStartup { display: none; } +#showAtStartupBox #hideAtStartup { display: inline; } +#showAtStartupBox.hideAtStartup #showAtStartup { display: inline; } +#showAtStartupBox.hideAtStartup #hideAtStartup { display: none; } + diff --git a/oem/firstvoices/windows/src/xml/splash.js b/oem/firstvoices/windows/src/xml/splash.js new file mode 100644 index 0000000000000000000000000000000000000000..48f52b82c054e95da32cc92c5591d3d880beaf4c --- /dev/null +++ b/oem/firstvoices/windows/src/xml/splash.js @@ -0,0 +1,27 @@ +function toggleDisplay(self) { + if(self.checked) { + location.href = 'keyman:showsplash'; + } else { + location.href = 'keyman:hidesplash'; + } + return false; +} + +window.onload = function() { + document.onkeydown = function() { + switch(event.keyCode) { + case 13: // enter + if( event.srcElement.id.substring(0,6) != 'button' ) { + event.cancelBubble = true; event.returnValue = false; + location.href='keyman:start'; + break; + } + event.cancelBubble = true; event.returnValue = true; + break; + case 27: // esc + event.cancelBubble = true; event.returnValue = false; + location.href='keyman:exit'; + break; + } + } +} \ No newline at end of file diff --git a/oem/firstvoices/windows/src/xml/splash.xsl b/oem/firstvoices/windows/src/xml/splash.xsl new file mode 100644 index 0000000000000000000000000000000000000000..978da7b79a1ef571dccc9d8bcf5c879152112ea7 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/splash.xsl @@ -0,0 +1,61 @@ + + + + + + + + + + + + <xsl:value-of select="($locale/String[@Id='S_Splash_Title'])[1]" /> + menu.css + splash.css + + + + + +
+
+
+
+
+
+
+ +
+ + +
+
+
+ +
+ +
+
+ + +
+
+ +
+ + No keyboards loaded - Open Configuration +
+ +
+ +
+
+ + +
+ + +
+
+ +
diff --git a/oem/firstvoices/windows/src/xml/swoosh.png b/oem/firstvoices/windows/src/xml/swoosh.png new file mode 100644 index 0000000000000000000000000000000000000000..925e8821e4a484d2da207104f787486162eec314 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/swoosh.png differ diff --git a/oem/firstvoices/windows/src/xml/tab-selected.png b/oem/firstvoices/windows/src/xml/tab-selected.png new file mode 100644 index 0000000000000000000000000000000000000000..cbd7cc30a5b7417f739a5bc4db96810f8b5d565a Binary files /dev/null and b/oem/firstvoices/windows/src/xml/tab-selected.png differ diff --git a/oem/firstvoices/windows/src/xml/tab-unselected.png b/oem/firstvoices/windows/src/xml/tab-unselected.png new file mode 100644 index 0000000000000000000000000000000000000000..5894c9173f35ba9dcd772493bf55c18b1fadbdf8 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/tab-unselected.png differ diff --git a/oem/firstvoices/windows/src/xml/transBlue.png b/oem/firstvoices/windows/src/xml/transBlue.png new file mode 100644 index 0000000000000000000000000000000000000000..eee17adfb6a4813788ca6ec7b05c61542e2c209e Binary files /dev/null and b/oem/firstvoices/windows/src/xml/transBlue.png differ diff --git a/oem/firstvoices/windows/src/xml/transLightBlue.png b/oem/firstvoices/windows/src/xml/transLightBlue.png new file mode 100644 index 0000000000000000000000000000000000000000..4988db3499dd1bf04b1763831a5e161161f6ccbe Binary files /dev/null and b/oem/firstvoices/windows/src/xml/transLightBlue.png differ diff --git a/oem/firstvoices/windows/src/xml/tray.png b/oem/firstvoices/windows/src/xml/tray.png new file mode 100644 index 0000000000000000000000000000000000000000..df5ffb9a30542039069ebbb780dbd66cdd13673d Binary files /dev/null and b/oem/firstvoices/windows/src/xml/tray.png differ diff --git a/oem/firstvoices/windows/src/xml/usage_keyboard.xsl b/oem/firstvoices/windows/src/xml/usage_keyboard.xsl new file mode 100644 index 0000000000000000000000000000000000000000..227b79d7049b3c68406d8b493f95f9574fb3dc6a --- /dev/null +++ b/oem/firstvoices/windows/src/xml/usage_keyboard.xsl @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='Usage_Title']" /> + + + + + +
+

+ + + +

+ +

+
+ +

+ +

+
+
+
+ + + + + + + + + + + + + + + + + + +       + + + + + + + + + +
+ +
+ + +
+ +
diff --git a/oem/firstvoices/windows/src/xml/usage_off.xsl b/oem/firstvoices/windows/src/xml/usage_off.xsl new file mode 100644 index 0000000000000000000000000000000000000000..b558578dc11bff6bf962cac3d03ef9f42aef6813 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/usage_off.xsl @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='SK_Usage_Title']" /> + + + + + +
+
+
+ + +

+ +

+
+ + + + + +
+
+ +
+ + info.png + + +
+

+
+ + + + + + + + + + +
+
+
+
+
+
+ + +
+ +
diff --git a/oem/firstvoices/windows/src/xml/vkhints.xsl b/oem/firstvoices/windows/src/xml/vkhints.xsl new file mode 100644 index 0000000000000000000000000000000000000000..813b6c804759ed660906f360d22de8fa5157d427 --- /dev/null +++ b/oem/firstvoices/windows/src/xml/vkhints.xsl @@ -0,0 +1,184 @@ + + + + + + + + + + + + + hintbar + + + + +
+
+
+ + +
+
+
+
+
+ + + iconcharmapicon.gif + + +
+
+ + + iconfonthinticon.gif + + +
+
+ + + iconkeyboardhelpicon.gif + + +
+
+
+
+ + +
+
diff --git a/oem/firstvoices/windows/src/xml/welcome_fonts.xsl b/oem/firstvoices/windows/src/xml/welcome_fonts.xsl new file mode 100644 index 0000000000000000000000000000000000000000..3f55ea2b445a7c6ecc9b7b9b49b3d37ce174c89f --- /dev/null +++ b/oem/firstvoices/windows/src/xml/welcome_fonts.xsl @@ -0,0 +1,93 @@ + + + + + + + + + + + + + fonts + + + + + + + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+ +
+
+
+ +
+ + + + + fonthinticon.gif + + + + +
+ + + +
+ + + + + + keyman:selectfont?font= + + + + + % + + + +
diff --git a/oem/firstvoices/windows/src/xml/welcome_info.png b/oem/firstvoices/windows/src/xml/welcome_info.png new file mode 100644 index 0000000000000000000000000000000000000000..09b9ded9d8ff03b7c9d810db93a3a5d317c3f61c Binary files /dev/null and b/oem/firstvoices/windows/src/xml/welcome_info.png differ diff --git a/oem/firstvoices/windows/src/xml/welcome_logo.png b/oem/firstvoices/windows/src/xml/welcome_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e5258192968282ceee5362a324e21d9693201925 Binary files /dev/null and b/oem/firstvoices/windows/src/xml/welcome_logo.png differ diff --git a/oem/firstvoices/windows/src/xml/windows_keyboard.png b/oem/firstvoices/windows/src/xml/windows_keyboard.png new file mode 100644 index 0000000000000000000000000000000000000000..16a75e448a8538f7a14ce7a0b5136b19ce78bb3b Binary files /dev/null and b/oem/firstvoices/windows/src/xml/windows_keyboard.png differ diff --git a/resources/VERSION.md b/resources/VERSION.md index 8bafbd775999a81137ea806ba9c07135b6606577..7f27d6b1d94d9d123bc4bd5ce5d971096f97599c 100644 --- a/resources/VERSION.md +++ b/resources/VERSION.md @@ -1 +1 @@ -12.0 \ No newline at end of file +13.0 \ No newline at end of file diff --git a/resources/shellHelperFunctions.sh b/resources/shellHelperFunctions.sh index 9cc5ce956a1703245e04e0e199ebe376f05285e6..f18561a794f1805a337a6b6597c5ef61c8250c59 100755 --- a/resources/shellHelperFunctions.sh +++ b/resources/shellHelperFunctions.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash _shf_base_dir=$(dirname "$BASH_SOURCE")/.. @@ -27,7 +27,7 @@ verify_on_mac() { } # The list of valid projects that our build scripts ought expect. -projects=("android" "ios" "linux" "mac" "web" "windows") +projects=("android" "ios" "linux" "lmlayer" "mac" "web" "windows") # Used to validate a specified 'project' parameter. verify_project() { @@ -45,7 +45,7 @@ verify_project() { } # The list of valid platforms that our build scripts ought expect. -platforms=("android" "ios" "linux" "mac" "web" "desktop" "developer") +platforms=("android" "ios" "linux" "lmlayer" "mac" "web" "desktop" "developer") # Used to validate a specified 'platform' parameter. verify_platform() { @@ -66,9 +66,11 @@ verify_platform() { # Sets $platform_folder accordingly. get_platform_folder() { verify_platform $1 - + if [[ $1 = "desktop" || $1 = "developer" ]]; then platform_folder="$_shf_base_dir/windows/src/$1" + elif [[ $1 = "lmlayer" ]]; then + platform_folder="common/predictive-text" else platform_folder="$_shf_base_dir/$1" fi @@ -80,8 +82,18 @@ if [[ -n "$TERM" ]] && [[ "$TERM" != "dumb" ]]; then ERROR_RED=$(tput setaf 1) WARNING_YELLOW=$(tput setaf 3) NORMAL=$(tput sgr0) + TERM_HEADING=$(tput setaf 4) +else + ERROR_RED= + WARNING_YELLOW= + NORMAL= + TERM_HEADING= fi +echo_heading() { + echo "${TERM_HEADING}$*${NORMAL}" +} + fail() { FAILURE_MSG="$1" if [[ "$FAILURE_MSG" == "" ]]; then @@ -213,3 +225,35 @@ write_download_info() { echo " \"size\": \"${FILE_SIZE}\"" >> "$DOWNLOAD_INFO_FILEPATH" echo } >> "$DOWNLOAD_INFO_FILEPATH" } + +# set_version sets the file version on mac/ios projects +set_version ( ) { + PRODUCT_PATH=$1 + + if [ $BUILD_NUMBER ]; then + if [ $2 ]; then # $2 = product name. + echo "Setting version numbers in $2 to $BUILD_NUMBER." + fi + /usr/libexec/Plistbuddy -c "Set CFBundleVersion $BUILD_NUMBER" "$PRODUCT_PATH/Info.plist" + /usr/libexec/Plistbuddy -c "Set CFBundleShortVersionString $BUILD_NUMBER" "$PRODUCT_PATH/Info.plist" + fi +} + + +# Uses npm to set the current package version (package.json). +# +# NOTE: this must be invoked exclusively on the CI system! +# +# Usage: +# +# set_npm_version VERSION_WITH_TIER +# +set_npm_version () { + local version=$1 + # We use --no-git-tag-version because our CI system controls version numbering and + # already tags releases. We also want to have the version of this match the + # release of Keyman Developer -- these two versions should be in sync. Because this + # is a large repo with multiple projects and build systems, it's better for us that + # individual build systems don't take too much ownership of git tagging. :) + npm --no-git-tag-version --allow-same-version version "$version" || fail "Could not set package version to $version." +} diff --git a/resources/standards-data/unicode-character-database/Blocks.txt b/resources/standards-data/unicode-character-database/Blocks.txt index 357982078a27e21d21a9c2eafa46789cd96a6380..7216614be65b8de609b6ed8ed26ba755d87dc3c4 100644 --- a/resources/standards-data/unicode-character-database/Blocks.txt +++ b/resources/standards-data/unicode-character-database/Blocks.txt @@ -1,6 +1,6 @@ -# Blocks-11.0.0.txt -# Date: 2017-10-16, 24:39:00 GMT [KW] -# © 2017 Unicode®, Inc. +# Blocks-12.0.0.txt +# Date: 2018-07-30, 19:40:00 GMT [KW] +# © 2018 Unicode®, Inc. # For terms of use, see http://www.unicode.org/terms_of_use.html # # Unicode Character Database @@ -239,6 +239,7 @@ FFF0..FFFF; Specials 10E60..10E7F; Rumi Numeral Symbols 10F00..10F2F; Old Sogdian 10F30..10F6F; Sogdian +10FE0..10FFF; Elymaic 11000..1107F; Brahmi 11080..110CF; Kaithi 110D0..110FF; Sora Sompeng @@ -259,6 +260,7 @@ FFF0..FFFF; Specials 11700..1173F; Ahom 11800..1184F; Dogra 118A0..118FF; Warang Citi +119A0..119FF; Nandinagari 11A00..11A4F; Zanabazar Square 11A50..11AAF; Soyombo 11AC0..11AFF; Pau Cin Hau @@ -267,10 +269,12 @@ FFF0..FFFF; Specials 11D00..11D5F; Masaram Gondi 11D60..11DAF; Gunjala Gondi 11EE0..11EFF; Makasar +11FC0..11FFF; Tamil Supplement 12000..123FF; Cuneiform 12400..1247F; Cuneiform Numbers and Punctuation 12480..1254F; Early Dynastic Cuneiform 13000..1342F; Egyptian Hieroglyphs +13430..1343F; Egyptian Hieroglyph Format Controls 14400..1467F; Anatolian Hieroglyphs 16800..16A3F; Bamum Supplement 16A40..16A6F; Mro @@ -283,6 +287,7 @@ FFF0..FFFF; Specials 18800..18AFF; Tangut Components 1B000..1B0FF; Kana Supplement 1B100..1B12F; Kana Extended-A +1B130..1B16F; Small Kana Extension 1B170..1B2FF; Nushu 1BC00..1BC9F; Duployan 1BCA0..1BCAF; Shorthand Format Controls @@ -295,9 +300,12 @@ FFF0..FFFF; Specials 1D400..1D7FF; Mathematical Alphanumeric Symbols 1D800..1DAAF; Sutton SignWriting 1E000..1E02F; Glagolitic Supplement +1E100..1E14F; Nyiakeng Puachue Hmong +1E2C0..1E2FF; Wancho 1E800..1E8DF; Mende Kikakui 1E900..1E95F; Adlam 1EC70..1ECBF; Indic Siyaq Numbers +1ED00..1ED4F; Ottoman Siyaq Numbers 1EE00..1EEFF; Arabic Mathematical Alphabetic Symbols 1F000..1F02F; Mahjong Tiles 1F030..1F09F; Domino Tiles @@ -313,6 +321,7 @@ FFF0..FFFF; Specials 1F800..1F8FF; Supplemental Arrows-C 1F900..1F9FF; Supplemental Symbols and Pictographs 1FA00..1FA6F; Chess Symbols +1FA70..1FAFF; Symbols and Pictographs Extended-A 20000..2A6DF; CJK Unified Ideographs Extension B 2A700..2B73F; CJK Unified Ideographs Extension C 2B740..2B81F; CJK Unified Ideographs Extension D diff --git a/resources/standards-data/unicode-character-database/UnicodeData.txt b/resources/standards-data/unicode-character-database/UnicodeData.txt index ec32fafbce5f25e30a724db51c525a68b8a7d687..d88a60135f4c66bf9c443cb9657382a44a5971d1 100644 --- a/resources/standards-data/unicode-character-database/UnicodeData.txt +++ b/resources/standards-data/unicode-character-database/UnicodeData.txt @@ -640,7 +640,7 @@ 027F;LATIN SMALL LETTER REVERSED R WITH FISHHOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED FISHHOOK R;;;; 0280;LATIN LETTER SMALL CAPITAL R;Ll;0;L;;;;;N;;;01A6;;01A6 0281;LATIN LETTER SMALL CAPITAL INVERTED R;Ll;0;L;;;;;N;;;;; -0282;LATIN SMALL LETTER S WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER S HOOK;;;; +0282;LATIN SMALL LETTER S WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER S HOOK;;A7C5;;A7C5 0283;LATIN SMALL LETTER ESH;Ll;0;L;;;;;N;;;01A9;;01A9 0284;LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER DOTLESS J BAR HOOK;;;; 0285;LATIN SMALL LETTER SQUAT REVERSED ESH;Ll;0;L;;;;;N;;;;; @@ -2809,6 +2809,7 @@ 0C6D;TELUGU DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; 0C6E;TELUGU DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; 0C6F;TELUGU DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0C77;TELUGU SIGN SIDDHAM;Po;0;L;;;;;N;;;;; 0C78;TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR;No;0;ON;;;;0;N;;;;; 0C79;TELUGU FRACTION DIGIT ONE FOR ODD POWERS OF FOUR;No;0;ON;;;;1;N;;;;; 0C7A;TELUGU FRACTION DIGIT TWO FOR ODD POWERS OF FOUR;No;0;ON;;;;2;N;;;;; @@ -3203,14 +3204,24 @@ 0E81;LAO LETTER KO;Lo;0;L;;;;;N;;;;; 0E82;LAO LETTER KHO SUNG;Lo;0;L;;;;;N;;;;; 0E84;LAO LETTER KHO TAM;Lo;0;L;;;;;N;;;;; +0E86;LAO LETTER PALI GHA;Lo;0;L;;;;;N;;;;; 0E87;LAO LETTER NGO;Lo;0;L;;;;;N;;;;; 0E88;LAO LETTER CO;Lo;0;L;;;;;N;;;;; +0E89;LAO LETTER PALI CHA;Lo;0;L;;;;;N;;;;; 0E8A;LAO LETTER SO TAM;Lo;0;L;;;;;N;;;;; +0E8C;LAO LETTER PALI JHA;Lo;0;L;;;;;N;;;;; 0E8D;LAO LETTER NYO;Lo;0;L;;;;;N;;;;; +0E8E;LAO LETTER PALI NYA;Lo;0;L;;;;;N;;;;; +0E8F;LAO LETTER PALI TTA;Lo;0;L;;;;;N;;;;; +0E90;LAO LETTER PALI TTHA;Lo;0;L;;;;;N;;;;; +0E91;LAO LETTER PALI DDA;Lo;0;L;;;;;N;;;;; +0E92;LAO LETTER PALI DDHA;Lo;0;L;;;;;N;;;;; +0E93;LAO LETTER PALI NNA;Lo;0;L;;;;;N;;;;; 0E94;LAO LETTER DO;Lo;0;L;;;;;N;;;;; 0E95;LAO LETTER TO;Lo;0;L;;;;;N;;;;; 0E96;LAO LETTER THO SUNG;Lo;0;L;;;;;N;;;;; 0E97;LAO LETTER THO TAM;Lo;0;L;;;;;N;;;;; +0E98;LAO LETTER PALI DHA;Lo;0;L;;;;;N;;;;; 0E99;LAO LETTER NO;Lo;0;L;;;;;N;;;;; 0E9A;LAO LETTER BO;Lo;0;L;;;;;N;;;;; 0E9B;LAO LETTER PO;Lo;0;L;;;;;N;;;;; @@ -3218,13 +3229,17 @@ 0E9D;LAO LETTER FO TAM;Lo;0;L;;;;;N;;;;; 0E9E;LAO LETTER PHO TAM;Lo;0;L;;;;;N;;;;; 0E9F;LAO LETTER FO SUNG;Lo;0;L;;;;;N;;;;; +0EA0;LAO LETTER PALI BHA;Lo;0;L;;;;;N;;;;; 0EA1;LAO LETTER MO;Lo;0;L;;;;;N;;;;; 0EA2;LAO LETTER YO;Lo;0;L;;;;;N;;;;; 0EA3;LAO LETTER LO LING;Lo;0;L;;;;;N;;;;; 0EA5;LAO LETTER LO LOOT;Lo;0;L;;;;;N;;;;; 0EA7;LAO LETTER WO;Lo;0;L;;;;;N;;;;; +0EA8;LAO LETTER SANSKRIT SHA;Lo;0;L;;;;;N;;;;; +0EA9;LAO LETTER SANSKRIT SSA;Lo;0;L;;;;;N;;;;; 0EAA;LAO LETTER SO SUNG;Lo;0;L;;;;;N;;;;; 0EAB;LAO LETTER HO SUNG;Lo;0;L;;;;;N;;;;; +0EAC;LAO LETTER PALI LLA;Lo;0;L;;;;;N;;;;; 0EAD;LAO LETTER O;Lo;0;L;;;;;N;;;;; 0EAE;LAO LETTER HO TAM;Lo;0;L;;;;;N;;;;; 0EAF;LAO ELLIPSIS;Lo;0;L;;;;;N;;;;; @@ -3238,6 +3253,7 @@ 0EB7;LAO VOWEL SIGN YY;Mn;0;NSM;;;;;N;;;;; 0EB8;LAO VOWEL SIGN U;Mn;118;NSM;;;;;N;;;;; 0EB9;LAO VOWEL SIGN UU;Mn;118;NSM;;;;;N;;;;; +0EBA;LAO SIGN PALI VIRAMA;Mn;9;NSM;;;;;N;;;;; 0EBB;LAO VOWEL SIGN MAI KON;Mn;0;NSM;;;;;N;;;;; 0EBC;LAO SEMIVOWEL SIGN LO;Mn;0;NSM;;;;;N;;;;; 0EBD;LAO SEMIVOWEL SIGN NYO;Lo;0;L;;;;;N;;;;; @@ -5079,7 +5095,7 @@ 166A;CANADIAN SYLLABICS CARRIER TTSEE;Lo;0;L;;;;;N;;;;; 166B;CANADIAN SYLLABICS CARRIER TTSI;Lo;0;L;;;;;N;;;;; 166C;CANADIAN SYLLABICS CARRIER TTSA;Lo;0;L;;;;;N;;;;; -166D;CANADIAN SYLLABICS CHI SIGN;Po;0;L;;;;;N;;;;; +166D;CANADIAN SYLLABICS CHI SIGN;So;0;L;;;;;N;;;;; 166E;CANADIAN SYLLABICS FULL STOP;Po;0;L;;;;;N;;;;; 166F;CANADIAN SYLLABICS QAI;Lo;0;L;;;;;N;;;;; 1670;CANADIAN SYLLABICS NGAI;Lo;0;L;;;;;N;;;;; @@ -6488,14 +6504,15 @@ 1CEF;VEDIC SIGN LONG ANUSVARA;Lo;0;L;;;;;N;;;;; 1CF0;VEDIC SIGN RTHANG LONG ANUSVARA;Lo;0;L;;;;;N;;;;; 1CF1;VEDIC SIGN ANUSVARA UBHAYATO MUKHA;Lo;0;L;;;;;N;;;;; -1CF2;VEDIC SIGN ARDHAVISARGA;Mc;0;L;;;;;N;;;;; -1CF3;VEDIC SIGN ROTATED ARDHAVISARGA;Mc;0;L;;;;;N;;;;; +1CF2;VEDIC SIGN ARDHAVISARGA;Lo;0;L;;;;;N;;;;; +1CF3;VEDIC SIGN ROTATED ARDHAVISARGA;Lo;0;L;;;;;N;;;;; 1CF4;VEDIC TONE CANDRA ABOVE;Mn;230;NSM;;;;;N;;;;; 1CF5;VEDIC SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; 1CF6;VEDIC SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; 1CF7;VEDIC SIGN ATIKRAMA;Mc;0;L;;;;;N;;;;; 1CF8;VEDIC TONE RING ABOVE;Mn;230;NSM;;;;;N;;;;; 1CF9;VEDIC TONE DOUBLE RING ABOVE;Mn;230;NSM;;;;;N;;;;; +1CFA;VEDIC SIGN DOUBLE ANUSVARA ANTARGOMUKHA;Lo;0;L;;;;;N;;;;; 1D00;LATIN LETTER SMALL CAPITAL A;Ll;0;L;;;;;N;;;;; 1D01;LATIN LETTER SMALL CAPITAL AE;Ll;0;L;;;;;N;;;;; 1D02;LATIN SMALL LETTER TURNED AE;Ll;0;L;;;;;N;;;;; @@ -6638,7 +6655,7 @@ 1D8B;LATIN SMALL LETTER ESH WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; 1D8C;LATIN SMALL LETTER V WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; 1D8D;LATIN SMALL LETTER X WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; -1D8E;LATIN SMALL LETTER Z WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D8E;LATIN SMALL LETTER Z WITH PALATAL HOOK;Ll;0;L;;;;;N;;;A7C6;;A7C6 1D8F;LATIN SMALL LETTER A WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; 1D90;LATIN SMALL LETTER ALPHA WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; 1D91;LATIN SMALL LETTER D WITH HOOK AND TAIL;Ll;0;L;;;;;N;;;;; @@ -10165,6 +10182,7 @@ 2BC6;BLACK MEDIUM DOWN-POINTING TRIANGLE CENTRED;So;0;ON;;;;;N;;;;; 2BC7;BLACK MEDIUM LEFT-POINTING TRIANGLE CENTRED;So;0;ON;;;;;N;;;;; 2BC8;BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED;So;0;ON;;;;;N;;;;; +2BC9;NEPTUNE FORM TWO;So;0;ON;;;;;N;;;;; 2BCA;TOP HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; 2BCB;BOTTOM HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; 2BCC;LIGHT FOUR POINTED BLACK CUSP;So;0;ON;;;;;N;;;;; @@ -10218,6 +10236,7 @@ 2BFC;DOUBLED SYMBOL;So;0;ON;;;;;N;;;;; 2BFD;PASSED SYMBOL;So;0;ON;;;;;N;;;;; 2BFE;REVERSED RIGHT ANGLE;So;0;ON;;;;;Y;;;;; +2BFF;HELLSCHREIBER PAUSE SYMBOL;So;0;ON;;;;;N;;;;; 2C00;GLAGOLITIC CAPITAL LETTER AZU;Lu;0;L;;;;;N;;;;2C30; 2C01;GLAGOLITIC CAPITAL LETTER BUKY;Lu;0;L;;;;;N;;;;2C31; 2C02;GLAGOLITIC CAPITAL LETTER VEDE;Lu;0;L;;;;;N;;;;2C32; @@ -10756,6 +10775,7 @@ 2E4C;MEDIEVAL COMMA;Po;0;ON;;;;;N;;;;; 2E4D;PARAGRAPHUS MARK;Po;0;ON;;;;;N;;;;; 2E4E;PUNCTUS ELEVATUS MARK;Po;0;ON;;;;;N;;;;; +2E4F;CORNISH VERSE DIVIDER;Po;0;ON;;;;;N;;;;; 2E80;CJK RADICAL REPEAT;So;0;ON;;;;;N;;;;; 2E81;CJK RADICAL CLIFF;So;0;ON;;;;;N;;;;; 2E82;CJK RADICAL SECOND ONE;So;0;ON;;;;;N;;;;; @@ -14060,7 +14080,7 @@ A790;LATIN CAPITAL LETTER N WITH DESCENDER;Lu;0;L;;;;;N;;;;A791; A791;LATIN SMALL LETTER N WITH DESCENDER;Ll;0;L;;;;;N;;;A790;;A790 A792;LATIN CAPITAL LETTER C WITH BAR;Lu;0;L;;;;;N;;;;A793; A793;LATIN SMALL LETTER C WITH BAR;Ll;0;L;;;;;N;;;A792;;A792 -A794;LATIN SMALL LETTER C WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +A794;LATIN SMALL LETTER C WITH PALATAL HOOK;Ll;0;L;;;;;N;;;A7C4;;A7C4 A795;LATIN SMALL LETTER H WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; A796;LATIN CAPITAL LETTER B WITH FLOURISH;Lu;0;L;;;;;N;;;;A797; A797;LATIN SMALL LETTER B WITH FLOURISH;Ll;0;L;;;;;N;;;A796;;A796 @@ -14098,6 +14118,17 @@ A7B6;LATIN CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;A7B7; A7B7;LATIN SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;A7B6;;A7B6 A7B8;LATIN CAPITAL LETTER U WITH STROKE;Lu;0;L;;;;;N;;;;A7B9; A7B9;LATIN SMALL LETTER U WITH STROKE;Ll;0;L;;;;;N;;;A7B8;;A7B8 +A7BA;LATIN CAPITAL LETTER GLOTTAL A;Lu;0;L;;;;;N;;;;A7BB; +A7BB;LATIN SMALL LETTER GLOTTAL A;Ll;0;L;;;;;N;;;A7BA;;A7BA +A7BC;LATIN CAPITAL LETTER GLOTTAL I;Lu;0;L;;;;;N;;;;A7BD; +A7BD;LATIN SMALL LETTER GLOTTAL I;Ll;0;L;;;;;N;;;A7BC;;A7BC +A7BE;LATIN CAPITAL LETTER GLOTTAL U;Lu;0;L;;;;;N;;;;A7BF; +A7BF;LATIN SMALL LETTER GLOTTAL U;Ll;0;L;;;;;N;;;A7BE;;A7BE +A7C2;LATIN CAPITAL LETTER ANGLICANA W;Lu;0;L;;;;;N;;;;A7C3; +A7C3;LATIN SMALL LETTER ANGLICANA W;Ll;0;L;;;;;N;;;A7C2;;A7C2 +A7C4;LATIN CAPITAL LETTER C WITH PALATAL HOOK;Lu;0;L;;;;;N;;;;A794; +A7C5;LATIN CAPITAL LETTER S WITH HOOK;Lu;0;L;;;;;N;;;;0282; +A7C6;LATIN CAPITAL LETTER Z WITH PALATAL HOOK;Lu;0;L;;;;;N;;;;1D8E; A7F7;LATIN EPIGRAPHIC LETTER SIDEWAYS I;Lo;0;L;;;;;N;;;;; A7F8;MODIFIER LETTER CAPITAL H WITH STROKE;Lm;0;L; 0126;;;;N;;;;; A7F9;MODIFIER LETTER SMALL LIGATURE OE;Lm;0;L; 0153;;;;N;;;;; @@ -14506,7 +14537,7 @@ A9B9;JAVANESE VOWEL SIGN SUKU MENDUT;Mn;0;NSM;;;;;N;;;;; A9BA;JAVANESE VOWEL SIGN TALING;Mc;0;L;;;;;N;;;;; A9BB;JAVANESE VOWEL SIGN DIRGA MURE;Mc;0;L;;;;;N;;;;; A9BC;JAVANESE VOWEL SIGN PEPET;Mn;0;NSM;;;;;N;;;;; -A9BD;JAVANESE CONSONANT SIGN KERET;Mc;0;L;;;;;N;;;;; +A9BD;JAVANESE CONSONANT SIGN KERET;Mn;0;NSM;;;;;N;;;;; A9BE;JAVANESE CONSONANT SIGN PENGKAL;Mc;0;L;;;;;N;;;;; A9BF;JAVANESE CONSONANT SIGN CAKRA;Mc;0;L;;;;;N;;;;; A9C0;JAVANESE PANGKON;Mc;9;L;;;;;N;;;;; @@ -14863,6 +14894,8 @@ AB62;LATIN SMALL LETTER OPEN OE;Ll;0;L;;;;;N;;;;; AB63;LATIN SMALL LETTER UO;Ll;0;L;;;;;N;;;;; AB64;LATIN SMALL LETTER INVERTED ALPHA;Ll;0;L;;;;;N;;;;; AB65;GREEK LETTER SMALL CAPITAL OMEGA;Ll;0;L;;;;;N;;;;; +AB66;LATIN SMALL LETTER DZ DIGRAPH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +AB67;LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; AB70;CHEROKEE SMALL LETTER A;Ll;0;L;;;;;N;;;13A0;;13A0 AB71;CHEROKEE SMALL LETTER E;Ll;0;L;;;;;N;;;13A1;;13A1 AB72;CHEROKEE SMALL LETTER I;Ll;0;L;;;;;N;;;13A2;;13A2 @@ -19105,6 +19138,29 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 10F57;SOGDIAN PUNCTUATION CIRCLE WITH DOT;Po;0;AL;;;;;N;;;;; 10F58;SOGDIAN PUNCTUATION TWO CIRCLES WITH DOTS;Po;0;AL;;;;;N;;;;; 10F59;SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT;Po;0;AL;;;;;N;;;;; +10FE0;ELYMAIC LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10FE1;ELYMAIC LETTER BETH;Lo;0;R;;;;;N;;;;; +10FE2;ELYMAIC LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10FE3;ELYMAIC LETTER DALETH;Lo;0;R;;;;;N;;;;; +10FE4;ELYMAIC LETTER HE;Lo;0;R;;;;;N;;;;; +10FE5;ELYMAIC LETTER WAW;Lo;0;R;;;;;N;;;;; +10FE6;ELYMAIC LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10FE7;ELYMAIC LETTER HETH;Lo;0;R;;;;;N;;;;; +10FE8;ELYMAIC LETTER TETH;Lo;0;R;;;;;N;;;;; +10FE9;ELYMAIC LETTER YODH;Lo;0;R;;;;;N;;;;; +10FEA;ELYMAIC LETTER KAPH;Lo;0;R;;;;;N;;;;; +10FEB;ELYMAIC LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10FEC;ELYMAIC LETTER MEM;Lo;0;R;;;;;N;;;;; +10FED;ELYMAIC LETTER NUN;Lo;0;R;;;;;N;;;;; +10FEE;ELYMAIC LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10FEF;ELYMAIC LETTER AYIN;Lo;0;R;;;;;N;;;;; +10FF0;ELYMAIC LETTER PE;Lo;0;R;;;;;N;;;;; +10FF1;ELYMAIC LETTER SADHE;Lo;0;R;;;;;N;;;;; +10FF2;ELYMAIC LETTER QOPH;Lo;0;R;;;;;N;;;;; +10FF3;ELYMAIC LETTER RESH;Lo;0;R;;;;;N;;;;; +10FF4;ELYMAIC LETTER SHIN;Lo;0;R;;;;;N;;;;; +10FF5;ELYMAIC LETTER TAW;Lo;0;R;;;;;N;;;;; +10FF6;ELYMAIC LIGATURE ZAYIN-YODH;Lo;0;R;;;;;N;;;;; 11000;BRAHMI SIGN CANDRABINDU;Mc;0;L;;;;;N;;;;; 11001;BRAHMI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; 11002;BRAHMI SIGN VISARGA;Mc;0;L;;;;;N;;;;; @@ -19887,6 +19943,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1145B;NEWA PLACEHOLDER MARK;Po;0;L;;;;;N;;;;; 1145D;NEWA INSERTION SIGN;Po;0;L;;;;;N;;;;; 1145E;NEWA SANDHI MARK;Mn;230;NSM;;;;;N;;;;; +1145F;NEWA LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;; 11480;TIRHUTA ANJI;Lo;0;L;;;;;N;;;;; 11481;TIRHUTA LETTER A;Lo;0;L;;;;;N;;;;; 11482;TIRHUTA LETTER AA;Lo;0;L;;;;;N;;;;; @@ -20209,6 +20266,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 116B5;TAKRI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; 116B6;TAKRI SIGN VIRAMA;Mc;9;L;;;;;N;;;;; 116B7;TAKRI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +116B8;TAKRI LETTER ARCHAIC KHA;Lo;0;L;;;;;N;;;;; 116C0;TAKRI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; 116C1;TAKRI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; 116C2;TAKRI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; @@ -20421,6 +20479,71 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 118F1;WARANG CITI NUMBER EIGHTY;No;0;L;;;;80;N;;;;; 118F2;WARANG CITI NUMBER NINETY;No;0;L;;;;90;N;;;;; 118FF;WARANG CITI OM;Lo;0;L;;;;;N;;;;; +119A0;NANDINAGARI LETTER A;Lo;0;L;;;;;N;;;;; +119A1;NANDINAGARI LETTER AA;Lo;0;L;;;;;N;;;;; +119A2;NANDINAGARI LETTER I;Lo;0;L;;;;;N;;;;; +119A3;NANDINAGARI LETTER II;Lo;0;L;;;;;N;;;;; +119A4;NANDINAGARI LETTER U;Lo;0;L;;;;;N;;;;; +119A5;NANDINAGARI LETTER UU;Lo;0;L;;;;;N;;;;; +119A6;NANDINAGARI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +119A7;NANDINAGARI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +119AA;NANDINAGARI LETTER E;Lo;0;L;;;;;N;;;;; +119AB;NANDINAGARI LETTER AI;Lo;0;L;;;;;N;;;;; +119AC;NANDINAGARI LETTER O;Lo;0;L;;;;;N;;;;; +119AD;NANDINAGARI LETTER AU;Lo;0;L;;;;;N;;;;; +119AE;NANDINAGARI LETTER KA;Lo;0;L;;;;;N;;;;; +119AF;NANDINAGARI LETTER KHA;Lo;0;L;;;;;N;;;;; +119B0;NANDINAGARI LETTER GA;Lo;0;L;;;;;N;;;;; +119B1;NANDINAGARI LETTER GHA;Lo;0;L;;;;;N;;;;; +119B2;NANDINAGARI LETTER NGA;Lo;0;L;;;;;N;;;;; +119B3;NANDINAGARI LETTER CA;Lo;0;L;;;;;N;;;;; +119B4;NANDINAGARI LETTER CHA;Lo;0;L;;;;;N;;;;; +119B5;NANDINAGARI LETTER JA;Lo;0;L;;;;;N;;;;; +119B6;NANDINAGARI LETTER JHA;Lo;0;L;;;;;N;;;;; +119B7;NANDINAGARI LETTER NYA;Lo;0;L;;;;;N;;;;; +119B8;NANDINAGARI LETTER TTA;Lo;0;L;;;;;N;;;;; +119B9;NANDINAGARI LETTER TTHA;Lo;0;L;;;;;N;;;;; +119BA;NANDINAGARI LETTER DDA;Lo;0;L;;;;;N;;;;; +119BB;NANDINAGARI LETTER DDHA;Lo;0;L;;;;;N;;;;; +119BC;NANDINAGARI LETTER NNA;Lo;0;L;;;;;N;;;;; +119BD;NANDINAGARI LETTER TA;Lo;0;L;;;;;N;;;;; +119BE;NANDINAGARI LETTER THA;Lo;0;L;;;;;N;;;;; +119BF;NANDINAGARI LETTER DA;Lo;0;L;;;;;N;;;;; +119C0;NANDINAGARI LETTER DHA;Lo;0;L;;;;;N;;;;; +119C1;NANDINAGARI LETTER NA;Lo;0;L;;;;;N;;;;; +119C2;NANDINAGARI LETTER PA;Lo;0;L;;;;;N;;;;; +119C3;NANDINAGARI LETTER PHA;Lo;0;L;;;;;N;;;;; +119C4;NANDINAGARI LETTER BA;Lo;0;L;;;;;N;;;;; +119C5;NANDINAGARI LETTER BHA;Lo;0;L;;;;;N;;;;; +119C6;NANDINAGARI LETTER MA;Lo;0;L;;;;;N;;;;; +119C7;NANDINAGARI LETTER YA;Lo;0;L;;;;;N;;;;; +119C8;NANDINAGARI LETTER RA;Lo;0;L;;;;;N;;;;; +119C9;NANDINAGARI LETTER LA;Lo;0;L;;;;;N;;;;; +119CA;NANDINAGARI LETTER VA;Lo;0;L;;;;;N;;;;; +119CB;NANDINAGARI LETTER SHA;Lo;0;L;;;;;N;;;;; +119CC;NANDINAGARI LETTER SSA;Lo;0;L;;;;;N;;;;; +119CD;NANDINAGARI LETTER SA;Lo;0;L;;;;;N;;;;; +119CE;NANDINAGARI LETTER HA;Lo;0;L;;;;;N;;;;; +119CF;NANDINAGARI LETTER LLA;Lo;0;L;;;;;N;;;;; +119D0;NANDINAGARI LETTER RRA;Lo;0;L;;;;;N;;;;; +119D1;NANDINAGARI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +119D2;NANDINAGARI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +119D3;NANDINAGARI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +119D4;NANDINAGARI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +119D5;NANDINAGARI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +119D6;NANDINAGARI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +119D7;NANDINAGARI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +119DA;NANDINAGARI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +119DB;NANDINAGARI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +119DC;NANDINAGARI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +119DD;NANDINAGARI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +119DE;NANDINAGARI SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +119DF;NANDINAGARI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +119E0;NANDINAGARI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +119E1;NANDINAGARI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +119E2;NANDINAGARI SIGN SIDDHAM;Po;0;L;;;;;N;;;;; +119E3;NANDINAGARI HEADSTROKE;Lo;0;L;;;;;N;;;;; +119E4;NANDINAGARI VOWEL SIGN PRISHTHAMATRA E;Mc;0;L;;;;;N;;;;; 11A00;ZANABAZAR SQUARE LETTER A;Lo;0;L;;;;;N;;;;; 11A01;ZANABAZAR SQUARE VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; 11A02;ZANABAZAR SQUARE VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;; @@ -20545,6 +20668,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 11A81;SOYOMBO LETTER SA;Lo;0;L;;;;;N;;;;; 11A82;SOYOMBO LETTER HA;Lo;0;L;;;;;N;;;;; 11A83;SOYOMBO LETTER KSSA;Lo;0;L;;;;;N;;;;; +11A84;SOYOMBO SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; +11A85;SOYOMBO SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; 11A86;SOYOMBO CLUSTER-INITIAL LETTER RA;Lo;0;L;;;;;N;;;;; 11A87;SOYOMBO CLUSTER-INITIAL LETTER LA;Lo;0;L;;;;;N;;;;; 11A88;SOYOMBO CLUSTER-INITIAL LETTER SHA;Lo;0;L;;;;;N;;;;; @@ -20959,6 +21084,57 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 11EF6;MAKASAR VOWEL SIGN O;Mc;0;L;;;;;N;;;;; 11EF7;MAKASAR PASSIMBANG;Po;0;L;;;;;N;;;;; 11EF8;MAKASAR END OF SECTION;Po;0;L;;;;;N;;;;; +11FC0;TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH;No;0;L;;;;1/320;N;;;;; +11FC1;TAMIL FRACTION ONE ONE-HUNDRED-AND-SIXTIETH;No;0;L;;;;1/160;N;;;;; +11FC2;TAMIL FRACTION ONE EIGHTIETH;No;0;L;;;;1/80;N;;;;; +11FC3;TAMIL FRACTION ONE SIXTY-FOURTH;No;0;L;;;;1/64;N;;;;; +11FC4;TAMIL FRACTION ONE FORTIETH;No;0;L;;;;1/40;N;;;;; +11FC5;TAMIL FRACTION ONE THIRTY-SECOND;No;0;L;;;;1/32;N;;;;; +11FC6;TAMIL FRACTION THREE EIGHTIETHS;No;0;L;;;;3/80;N;;;;; +11FC7;TAMIL FRACTION THREE SIXTY-FOURTHS;No;0;L;;;;3/64;N;;;;; +11FC8;TAMIL FRACTION ONE TWENTIETH;No;0;L;;;;1/20;N;;;;; +11FC9;TAMIL FRACTION ONE SIXTEENTH-1;No;0;L;;;;1/16;N;;;;; +11FCA;TAMIL FRACTION ONE SIXTEENTH-2;No;0;L;;;;1/16;N;;;;; +11FCB;TAMIL FRACTION ONE TENTH;No;0;L;;;;1/10;N;;;;; +11FCC;TAMIL FRACTION ONE EIGHTH;No;0;L;;;;1/8;N;;;;; +11FCD;TAMIL FRACTION THREE TWENTIETHS;No;0;L;;;;3/20;N;;;;; +11FCE;TAMIL FRACTION THREE SIXTEENTHS;No;0;L;;;;3/16;N;;;;; +11FCF;TAMIL FRACTION ONE FIFTH;No;0;L;;;;1/5;N;;;;; +11FD0;TAMIL FRACTION ONE QUARTER;No;0;L;;;;1/4;N;;;;; +11FD1;TAMIL FRACTION ONE HALF-1;No;0;L;;;;1/2;N;;;;; +11FD2;TAMIL FRACTION ONE HALF-2;No;0;L;;;;1/2;N;;;;; +11FD3;TAMIL FRACTION THREE QUARTERS;No;0;L;;;;3/4;N;;;;; +11FD4;TAMIL FRACTION DOWNSCALING FACTOR KIIZH;No;0;L;;;;1/320;N;;;;; +11FD5;TAMIL SIGN NEL;So;0;ON;;;;;N;;;;; +11FD6;TAMIL SIGN CEVITU;So;0;ON;;;;;N;;;;; +11FD7;TAMIL SIGN AAZHAAKKU;So;0;ON;;;;;N;;;;; +11FD8;TAMIL SIGN UZHAKKU;So;0;ON;;;;;N;;;;; +11FD9;TAMIL SIGN MUUVUZHAKKU;So;0;ON;;;;;N;;;;; +11FDA;TAMIL SIGN KURUNI;So;0;ON;;;;;N;;;;; +11FDB;TAMIL SIGN PATHAKKU;So;0;ON;;;;;N;;;;; +11FDC;TAMIL SIGN MUKKURUNI;So;0;ON;;;;;N;;;;; +11FDD;TAMIL SIGN KAACU;Sc;0;ET;;;;;N;;;;; +11FDE;TAMIL SIGN PANAM;Sc;0;ET;;;;;N;;;;; +11FDF;TAMIL SIGN PON;Sc;0;ET;;;;;N;;;;; +11FE0;TAMIL SIGN VARAAKAN;Sc;0;ET;;;;;N;;;;; +11FE1;TAMIL SIGN PAARAM;So;0;ON;;;;;N;;;;; +11FE2;TAMIL SIGN KUZHI;So;0;ON;;;;;N;;;;; +11FE3;TAMIL SIGN VELI;So;0;ON;;;;;N;;;;; +11FE4;TAMIL WET CULTIVATION SIGN;So;0;ON;;;;;N;;;;; +11FE5;TAMIL DRY CULTIVATION SIGN;So;0;ON;;;;;N;;;;; +11FE6;TAMIL LAND SIGN;So;0;ON;;;;;N;;;;; +11FE7;TAMIL SALT PAN SIGN;So;0;ON;;;;;N;;;;; +11FE8;TAMIL TRADITIONAL CREDIT SIGN;So;0;ON;;;;;N;;;;; +11FE9;TAMIL TRADITIONAL NUMBER SIGN;So;0;ON;;;;;N;;;;; +11FEA;TAMIL CURRENT SIGN;So;0;ON;;;;;N;;;;; +11FEB;TAMIL AND ODD SIGN;So;0;ON;;;;;N;;;;; +11FEC;TAMIL SPENT SIGN;So;0;ON;;;;;N;;;;; +11FED;TAMIL TOTAL SIGN;So;0;ON;;;;;N;;;;; +11FEE;TAMIL IN POSSESSION SIGN;So;0;ON;;;;;N;;;;; +11FEF;TAMIL STARTING FROM SIGN;So;0;ON;;;;;N;;;;; +11FF0;TAMIL SIGN MUTHALIYA;So;0;ON;;;;;N;;;;; +11FF1;TAMIL SIGN VAKAIYARAA;So;0;ON;;;;;N;;;;; +11FFF;TAMIL PUNCTUATION END OF TEXT;Po;0;L;;;;;N;;;;; 12000;CUNEIFORM SIGN A;Lo;0;L;;;;;N;;;;; 12001;CUNEIFORM SIGN A TIMES A;Lo;0;L;;;;;N;;;;; 12002;CUNEIFORM SIGN A TIMES BAD;Lo;0;L;;;;;N;;;;; @@ -23264,6 +23440,15 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1342C;EGYPTIAN HIEROGLYPH AA030;Lo;0;L;;;;;N;;;;; 1342D;EGYPTIAN HIEROGLYPH AA031;Lo;0;L;;;;;N;;;;; 1342E;EGYPTIAN HIEROGLYPH AA032;Lo;0;L;;;;;N;;;;; +13430;EGYPTIAN HIEROGLYPH VERTICAL JOINER;Cf;0;L;;;;;N;;;;; +13431;EGYPTIAN HIEROGLYPH HORIZONTAL JOINER;Cf;0;L;;;;;N;;;;; +13432;EGYPTIAN HIEROGLYPH INSERT AT TOP START;Cf;0;L;;;;;N;;;;; +13433;EGYPTIAN HIEROGLYPH INSERT AT BOTTOM START;Cf;0;L;;;;;N;;;;; +13434;EGYPTIAN HIEROGLYPH INSERT AT TOP END;Cf;0;L;;;;;N;;;;; +13435;EGYPTIAN HIEROGLYPH INSERT AT BOTTOM END;Cf;0;L;;;;;N;;;;; +13436;EGYPTIAN HIEROGLYPH OVERLAY MIDDLE;Cf;0;L;;;;;N;;;;; +13437;EGYPTIAN HIEROGLYPH BEGIN SEGMENT;Cf;0;L;;;;;N;;;;; +13438;EGYPTIAN HIEROGLYPH END SEGMENT;Cf;0;L;;;;;N;;;;; 14400;ANATOLIAN HIEROGLYPH A001;Lo;0;L;;;;;N;;;;; 14401;ANATOLIAN HIEROGLYPH A002;Lo;0;L;;;;;N;;;;; 14402;ANATOLIAN HIEROGLYPH A003;Lo;0;L;;;;;N;;;;; @@ -24782,6 +24967,13 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 16F42;MIAO LETTER WA;Lo;0;L;;;;;N;;;;; 16F43;MIAO LETTER AH;Lo;0;L;;;;;N;;;;; 16F44;MIAO LETTER HHA;Lo;0;L;;;;;N;;;;; +16F45;MIAO LETTER BRI;Lo;0;L;;;;;N;;;;; +16F46;MIAO LETTER SYI;Lo;0;L;;;;;N;;;;; +16F47;MIAO LETTER DZYI;Lo;0;L;;;;;N;;;;; +16F48;MIAO LETTER TE;Lo;0;L;;;;;N;;;;; +16F49;MIAO LETTER TSE;Lo;0;L;;;;;N;;;;; +16F4A;MIAO LETTER RTE;Lo;0;L;;;;;N;;;;; +16F4F;MIAO SIGN CONSONANT MODIFIER BAR;Mn;0;NSM;;;;;N;;;;; 16F50;MIAO LETTER NASALIZATION;Lo;0;L;;;;;N;;;;; 16F51;MIAO SIGN ASPIRATION;Mc;0;L;;;;;N;;;;; 16F52;MIAO SIGN REFORMED VOICING;Mc;0;L;;;;;N;;;;; @@ -24829,6 +25021,15 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 16F7C;MIAO VOWEL SIGN OU;Mc;0;L;;;;;N;;;;; 16F7D;MIAO VOWEL SIGN N;Mc;0;L;;;;;N;;;;; 16F7E;MIAO VOWEL SIGN NG;Mc;0;L;;;;;N;;;;; +16F7F;MIAO VOWEL SIGN UOG;Mc;0;L;;;;;N;;;;; +16F80;MIAO VOWEL SIGN YUI;Mc;0;L;;;;;N;;;;; +16F81;MIAO VOWEL SIGN OG;Mc;0;L;;;;;N;;;;; +16F82;MIAO VOWEL SIGN OER;Mc;0;L;;;;;N;;;;; +16F83;MIAO VOWEL SIGN VW;Mc;0;L;;;;;N;;;;; +16F84;MIAO VOWEL SIGN IG;Mc;0;L;;;;;N;;;;; +16F85;MIAO VOWEL SIGN EA;Mc;0;L;;;;;N;;;;; +16F86;MIAO VOWEL SIGN IONG;Mc;0;L;;;;;N;;;;; +16F87;MIAO VOWEL SIGN UI;Mc;0;L;;;;;N;;;;; 16F8F;MIAO TONE RIGHT;Mn;0;NSM;;;;;N;;;;; 16F90;MIAO TONE TOP RIGHT;Mn;0;NSM;;;;;N;;;;; 16F91;MIAO TONE ABOVE;Mn;0;NSM;;;;;N;;;;; @@ -24848,8 +25049,10 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 16F9F;MIAO LETTER REFORMED TONE-8;Lm;0;L;;;;;N;;;;; 16FE0;TANGUT ITERATION MARK;Lm;0;L;;;;;N;;;;; 16FE1;NUSHU ITERATION MARK;Lm;0;L;;;;;N;;;;; +16FE2;OLD CHINESE HOOK MARK;Po;0;ON;;;;;N;;;;; +16FE3;OLD CHINESE ITERATION MARK;Lm;0;L;;;;;N;;;;; 17000;;Lo;0;L;;;;;N;;;;; -187F1;;Lo;0;L;;;;;N;;;;; +187F7;;Lo;0;L;;;;;N;;;;; 18800;TANGUT COMPONENT-001;Lo;0;L;;;;;N;;;;; 18801;TANGUT COMPONENT-002;Lo;0;L;;;;;N;;;;; 18802;TANGUT COMPONENT-003;Lo;0;L;;;;;N;;;;; @@ -25892,6 +26095,13 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1B11C;HENTAIGANA LETTER WO-7;Lo;0;L;;;;;N;;;;; 1B11D;HENTAIGANA LETTER N-MU-MO-1;Lo;0;L;;;;;N;;;;; 1B11E;HENTAIGANA LETTER N-MU-MO-2;Lo;0;L;;;;;N;;;;; +1B150;HIRAGANA LETTER SMALL WI;Lo;0;L;;;;;N;;;;; +1B151;HIRAGANA LETTER SMALL WE;Lo;0;L;;;;;N;;;;; +1B152;HIRAGANA LETTER SMALL WO;Lo;0;L;;;;;N;;;;; +1B164;KATAKANA LETTER SMALL WI;Lo;0;L;;;;;N;;;;; +1B165;KATAKANA LETTER SMALL WE;Lo;0;L;;;;;N;;;;; +1B166;KATAKANA LETTER SMALL WO;Lo;0;L;;;;;N;;;;; +1B167;KATAKANA LETTER SMALL N;Lo;0;L;;;;;N;;;;; 1B170;NUSHU CHARACTER-1B170;Lo;0;L;;;;;N;;;;; 1B171;NUSHU CHARACTER-1B171;Lo;0;L;;;;;N;;;;; 1B172;NUSHU CHARACTER-1B172;Lo;0;L;;;;;N;;;;; @@ -28820,6 +29030,136 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1E028;COMBINING GLAGOLITIC LETTER BIG YUS;Mn;230;NSM;;;;;N;;;;; 1E029;COMBINING GLAGOLITIC LETTER IOTATED BIG YUS;Mn;230;NSM;;;;;N;;;;; 1E02A;COMBINING GLAGOLITIC LETTER FITA;Mn;230;NSM;;;;;N;;;;; +1E100;NYIAKENG PUACHUE HMONG LETTER MA;Lo;0;L;;;;;N;;;;; +1E101;NYIAKENG PUACHUE HMONG LETTER TSA;Lo;0;L;;;;;N;;;;; +1E102;NYIAKENG PUACHUE HMONG LETTER NTA;Lo;0;L;;;;;N;;;;; +1E103;NYIAKENG PUACHUE HMONG LETTER TA;Lo;0;L;;;;;N;;;;; +1E104;NYIAKENG PUACHUE HMONG LETTER HA;Lo;0;L;;;;;N;;;;; +1E105;NYIAKENG PUACHUE HMONG LETTER NA;Lo;0;L;;;;;N;;;;; +1E106;NYIAKENG PUACHUE HMONG LETTER XA;Lo;0;L;;;;;N;;;;; +1E107;NYIAKENG PUACHUE HMONG LETTER NKA;Lo;0;L;;;;;N;;;;; +1E108;NYIAKENG PUACHUE HMONG LETTER CA;Lo;0;L;;;;;N;;;;; +1E109;NYIAKENG PUACHUE HMONG LETTER LA;Lo;0;L;;;;;N;;;;; +1E10A;NYIAKENG PUACHUE HMONG LETTER SA;Lo;0;L;;;;;N;;;;; +1E10B;NYIAKENG PUACHUE HMONG LETTER ZA;Lo;0;L;;;;;N;;;;; +1E10C;NYIAKENG PUACHUE HMONG LETTER NCA;Lo;0;L;;;;;N;;;;; +1E10D;NYIAKENG PUACHUE HMONG LETTER NTSA;Lo;0;L;;;;;N;;;;; +1E10E;NYIAKENG PUACHUE HMONG LETTER KA;Lo;0;L;;;;;N;;;;; +1E10F;NYIAKENG PUACHUE HMONG LETTER DA;Lo;0;L;;;;;N;;;;; +1E110;NYIAKENG PUACHUE HMONG LETTER NYA;Lo;0;L;;;;;N;;;;; +1E111;NYIAKENG PUACHUE HMONG LETTER NRA;Lo;0;L;;;;;N;;;;; +1E112;NYIAKENG PUACHUE HMONG LETTER VA;Lo;0;L;;;;;N;;;;; +1E113;NYIAKENG PUACHUE HMONG LETTER NTXA;Lo;0;L;;;;;N;;;;; +1E114;NYIAKENG PUACHUE HMONG LETTER TXA;Lo;0;L;;;;;N;;;;; +1E115;NYIAKENG PUACHUE HMONG LETTER FA;Lo;0;L;;;;;N;;;;; +1E116;NYIAKENG PUACHUE HMONG LETTER RA;Lo;0;L;;;;;N;;;;; +1E117;NYIAKENG PUACHUE HMONG LETTER QA;Lo;0;L;;;;;N;;;;; +1E118;NYIAKENG PUACHUE HMONG LETTER YA;Lo;0;L;;;;;N;;;;; +1E119;NYIAKENG PUACHUE HMONG LETTER NQA;Lo;0;L;;;;;N;;;;; +1E11A;NYIAKENG PUACHUE HMONG LETTER PA;Lo;0;L;;;;;N;;;;; +1E11B;NYIAKENG PUACHUE HMONG LETTER XYA;Lo;0;L;;;;;N;;;;; +1E11C;NYIAKENG PUACHUE HMONG LETTER NPA;Lo;0;L;;;;;N;;;;; +1E11D;NYIAKENG PUACHUE HMONG LETTER DLA;Lo;0;L;;;;;N;;;;; +1E11E;NYIAKENG PUACHUE HMONG LETTER NPLA;Lo;0;L;;;;;N;;;;; +1E11F;NYIAKENG PUACHUE HMONG LETTER HAH;Lo;0;L;;;;;N;;;;; +1E120;NYIAKENG PUACHUE HMONG LETTER MLA;Lo;0;L;;;;;N;;;;; +1E121;NYIAKENG PUACHUE HMONG LETTER PLA;Lo;0;L;;;;;N;;;;; +1E122;NYIAKENG PUACHUE HMONG LETTER GA;Lo;0;L;;;;;N;;;;; +1E123;NYIAKENG PUACHUE HMONG LETTER RRA;Lo;0;L;;;;;N;;;;; +1E124;NYIAKENG PUACHUE HMONG LETTER A;Lo;0;L;;;;;N;;;;; +1E125;NYIAKENG PUACHUE HMONG LETTER AA;Lo;0;L;;;;;N;;;;; +1E126;NYIAKENG PUACHUE HMONG LETTER I;Lo;0;L;;;;;N;;;;; +1E127;NYIAKENG PUACHUE HMONG LETTER U;Lo;0;L;;;;;N;;;;; +1E128;NYIAKENG PUACHUE HMONG LETTER O;Lo;0;L;;;;;N;;;;; +1E129;NYIAKENG PUACHUE HMONG LETTER OO;Lo;0;L;;;;;N;;;;; +1E12A;NYIAKENG PUACHUE HMONG LETTER E;Lo;0;L;;;;;N;;;;; +1E12B;NYIAKENG PUACHUE HMONG LETTER EE;Lo;0;L;;;;;N;;;;; +1E12C;NYIAKENG PUACHUE HMONG LETTER W;Lo;0;L;;;;;N;;;;; +1E130;NYIAKENG PUACHUE HMONG TONE-B;Mn;230;NSM;;;;;N;;;;; +1E131;NYIAKENG PUACHUE HMONG TONE-M;Mn;230;NSM;;;;;N;;;;; +1E132;NYIAKENG PUACHUE HMONG TONE-J;Mn;230;NSM;;;;;N;;;;; +1E133;NYIAKENG PUACHUE HMONG TONE-V;Mn;230;NSM;;;;;N;;;;; +1E134;NYIAKENG PUACHUE HMONG TONE-S;Mn;230;NSM;;;;;N;;;;; +1E135;NYIAKENG PUACHUE HMONG TONE-G;Mn;230;NSM;;;;;N;;;;; +1E136;NYIAKENG PUACHUE HMONG TONE-D;Mn;230;NSM;;;;;N;;;;; +1E137;NYIAKENG PUACHUE HMONG SIGN FOR PERSON;Lm;0;L;;;;;N;;;;; +1E138;NYIAKENG PUACHUE HMONG SIGN FOR THING;Lm;0;L;;;;;N;;;;; +1E139;NYIAKENG PUACHUE HMONG SIGN FOR LOCATION;Lm;0;L;;;;;N;;;;; +1E13A;NYIAKENG PUACHUE HMONG SIGN FOR ANIMAL;Lm;0;L;;;;;N;;;;; +1E13B;NYIAKENG PUACHUE HMONG SIGN FOR INVERTEBRATE;Lm;0;L;;;;;N;;;;; +1E13C;NYIAKENG PUACHUE HMONG SIGN XW XW;Lm;0;L;;;;;N;;;;; +1E13D;NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER;Lm;0;L;;;;;N;;;;; +1E140;NYIAKENG PUACHUE HMONG DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1E141;NYIAKENG PUACHUE HMONG DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1E142;NYIAKENG PUACHUE HMONG DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1E143;NYIAKENG PUACHUE HMONG DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1E144;NYIAKENG PUACHUE HMONG DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1E145;NYIAKENG PUACHUE HMONG DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1E146;NYIAKENG PUACHUE HMONG DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1E147;NYIAKENG PUACHUE HMONG DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1E148;NYIAKENG PUACHUE HMONG DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1E149;NYIAKENG PUACHUE HMONG DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1E14E;NYIAKENG PUACHUE HMONG LOGOGRAM NYAJ;Lo;0;L;;;;;N;;;;; +1E14F;NYIAKENG PUACHUE HMONG CIRCLED CA;So;0;L;;;;;N;;;;; +1E2C0;WANCHO LETTER AA;Lo;0;L;;;;;N;;;;; +1E2C1;WANCHO LETTER A;Lo;0;L;;;;;N;;;;; +1E2C2;WANCHO LETTER BA;Lo;0;L;;;;;N;;;;; +1E2C3;WANCHO LETTER CA;Lo;0;L;;;;;N;;;;; +1E2C4;WANCHO LETTER DA;Lo;0;L;;;;;N;;;;; +1E2C5;WANCHO LETTER GA;Lo;0;L;;;;;N;;;;; +1E2C6;WANCHO LETTER YA;Lo;0;L;;;;;N;;;;; +1E2C7;WANCHO LETTER PHA;Lo;0;L;;;;;N;;;;; +1E2C8;WANCHO LETTER LA;Lo;0;L;;;;;N;;;;; +1E2C9;WANCHO LETTER NA;Lo;0;L;;;;;N;;;;; +1E2CA;WANCHO LETTER PA;Lo;0;L;;;;;N;;;;; +1E2CB;WANCHO LETTER TA;Lo;0;L;;;;;N;;;;; +1E2CC;WANCHO LETTER THA;Lo;0;L;;;;;N;;;;; +1E2CD;WANCHO LETTER FA;Lo;0;L;;;;;N;;;;; +1E2CE;WANCHO LETTER SA;Lo;0;L;;;;;N;;;;; +1E2CF;WANCHO LETTER SHA;Lo;0;L;;;;;N;;;;; +1E2D0;WANCHO LETTER JA;Lo;0;L;;;;;N;;;;; +1E2D1;WANCHO LETTER ZA;Lo;0;L;;;;;N;;;;; +1E2D2;WANCHO LETTER WA;Lo;0;L;;;;;N;;;;; +1E2D3;WANCHO LETTER VA;Lo;0;L;;;;;N;;;;; +1E2D4;WANCHO LETTER KA;Lo;0;L;;;;;N;;;;; +1E2D5;WANCHO LETTER O;Lo;0;L;;;;;N;;;;; +1E2D6;WANCHO LETTER AU;Lo;0;L;;;;;N;;;;; +1E2D7;WANCHO LETTER RA;Lo;0;L;;;;;N;;;;; +1E2D8;WANCHO LETTER MA;Lo;0;L;;;;;N;;;;; +1E2D9;WANCHO LETTER KHA;Lo;0;L;;;;;N;;;;; +1E2DA;WANCHO LETTER HA;Lo;0;L;;;;;N;;;;; +1E2DB;WANCHO LETTER E;Lo;0;L;;;;;N;;;;; +1E2DC;WANCHO LETTER I;Lo;0;L;;;;;N;;;;; +1E2DD;WANCHO LETTER NGA;Lo;0;L;;;;;N;;;;; +1E2DE;WANCHO LETTER U;Lo;0;L;;;;;N;;;;; +1E2DF;WANCHO LETTER LLHA;Lo;0;L;;;;;N;;;;; +1E2E0;WANCHO LETTER TSA;Lo;0;L;;;;;N;;;;; +1E2E1;WANCHO LETTER TRA;Lo;0;L;;;;;N;;;;; +1E2E2;WANCHO LETTER ONG;Lo;0;L;;;;;N;;;;; +1E2E3;WANCHO LETTER AANG;Lo;0;L;;;;;N;;;;; +1E2E4;WANCHO LETTER ANG;Lo;0;L;;;;;N;;;;; +1E2E5;WANCHO LETTER ING;Lo;0;L;;;;;N;;;;; +1E2E6;WANCHO LETTER ON;Lo;0;L;;;;;N;;;;; +1E2E7;WANCHO LETTER EN;Lo;0;L;;;;;N;;;;; +1E2E8;WANCHO LETTER AAN;Lo;0;L;;;;;N;;;;; +1E2E9;WANCHO LETTER NYA;Lo;0;L;;;;;N;;;;; +1E2EA;WANCHO LETTER UEN;Lo;0;L;;;;;N;;;;; +1E2EB;WANCHO LETTER YIH;Lo;0;L;;;;;N;;;;; +1E2EC;WANCHO TONE TUP;Mn;230;NSM;;;;;N;;;;; +1E2ED;WANCHO TONE TUPNI;Mn;230;NSM;;;;;N;;;;; +1E2EE;WANCHO TONE KOI;Mn;230;NSM;;;;;N;;;;; +1E2EF;WANCHO TONE KOINI;Mn;230;NSM;;;;;N;;;;; +1E2F0;WANCHO DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1E2F1;WANCHO DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1E2F2;WANCHO DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1E2F3;WANCHO DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1E2F4;WANCHO DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1E2F5;WANCHO DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1E2F6;WANCHO DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1E2F7;WANCHO DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1E2F8;WANCHO DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1E2F9;WANCHO DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1E2FF;WANCHO NGUN SIGN;Sc;0;ET;;;;;N;;;;; 1E800;MENDE KIKAKUI SYLLABLE M001 KI;Lo;0;R;;;;;N;;;;; 1E801;MENDE KIKAKUI SYLLABLE M002 KA;Lo;0;R;;;;;N;;;;; 1E802;MENDE KIKAKUI SYLLABLE M003 KU;Lo;0;R;;;;;N;;;;; @@ -29108,6 +29448,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1E948;ADLAM CONSONANT MODIFIER;Mn;230;NSM;;;;;N;;;;; 1E949;ADLAM GEMINATE CONSONANT MODIFIER;Mn;230;NSM;;;;;N;;;;; 1E94A;ADLAM NUKTA;Mn;7;NSM;;;;;N;;;;; +1E94B;ADLAM NASALIZATION MARK;Lm;0;R;;;;;N;;;;; 1E950;ADLAM DIGIT ZERO;Nd;0;R;;0;0;0;N;;;;; 1E951;ADLAM DIGIT ONE;Nd;0;R;;1;1;1;N;;;;; 1E952;ADLAM DIGIT TWO;Nd;0;R;;2;2;2;N;;;;; @@ -29188,6 +29529,67 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1ECB2;INDIC SIYAQ NUMBER ALTERNATE TWO;No;0;AL;;;;2;N;;;;; 1ECB3;INDIC SIYAQ NUMBER ALTERNATE TEN THOUSAND;No;0;AL;;;;10000;N;;;;; 1ECB4;INDIC SIYAQ ALTERNATE LAKH MARK;No;0;AL;;;;100000;N;;;;; +1ED01;OTTOMAN SIYAQ NUMBER ONE;No;0;AL;;;;1;N;;;;; +1ED02;OTTOMAN SIYAQ NUMBER TWO;No;0;AL;;;;2;N;;;;; +1ED03;OTTOMAN SIYAQ NUMBER THREE;No;0;AL;;;;3;N;;;;; +1ED04;OTTOMAN SIYAQ NUMBER FOUR;No;0;AL;;;;4;N;;;;; +1ED05;OTTOMAN SIYAQ NUMBER FIVE;No;0;AL;;;;5;N;;;;; +1ED06;OTTOMAN SIYAQ NUMBER SIX;No;0;AL;;;;6;N;;;;; +1ED07;OTTOMAN SIYAQ NUMBER SEVEN;No;0;AL;;;;7;N;;;;; +1ED08;OTTOMAN SIYAQ NUMBER EIGHT;No;0;AL;;;;8;N;;;;; +1ED09;OTTOMAN SIYAQ NUMBER NINE;No;0;AL;;;;9;N;;;;; +1ED0A;OTTOMAN SIYAQ NUMBER TEN;No;0;AL;;;;10;N;;;;; +1ED0B;OTTOMAN SIYAQ NUMBER TWENTY;No;0;AL;;;;20;N;;;;; +1ED0C;OTTOMAN SIYAQ NUMBER THIRTY;No;0;AL;;;;30;N;;;;; +1ED0D;OTTOMAN SIYAQ NUMBER FORTY;No;0;AL;;;;40;N;;;;; +1ED0E;OTTOMAN SIYAQ NUMBER FIFTY;No;0;AL;;;;50;N;;;;; +1ED0F;OTTOMAN SIYAQ NUMBER SIXTY;No;0;AL;;;;60;N;;;;; +1ED10;OTTOMAN SIYAQ NUMBER SEVENTY;No;0;AL;;;;70;N;;;;; +1ED11;OTTOMAN SIYAQ NUMBER EIGHTY;No;0;AL;;;;80;N;;;;; +1ED12;OTTOMAN SIYAQ NUMBER NINETY;No;0;AL;;;;90;N;;;;; +1ED13;OTTOMAN SIYAQ NUMBER ONE HUNDRED;No;0;AL;;;;100;N;;;;; +1ED14;OTTOMAN SIYAQ NUMBER TWO HUNDRED;No;0;AL;;;;200;N;;;;; +1ED15;OTTOMAN SIYAQ NUMBER THREE HUNDRED;No;0;AL;;;;300;N;;;;; +1ED16;OTTOMAN SIYAQ NUMBER FOUR HUNDRED;No;0;AL;;;;400;N;;;;; +1ED17;OTTOMAN SIYAQ NUMBER FIVE HUNDRED;No;0;AL;;;;500;N;;;;; +1ED18;OTTOMAN SIYAQ NUMBER SIX HUNDRED;No;0;AL;;;;600;N;;;;; +1ED19;OTTOMAN SIYAQ NUMBER SEVEN HUNDRED;No;0;AL;;;;700;N;;;;; +1ED1A;OTTOMAN SIYAQ NUMBER EIGHT HUNDRED;No;0;AL;;;;800;N;;;;; +1ED1B;OTTOMAN SIYAQ NUMBER NINE HUNDRED;No;0;AL;;;;900;N;;;;; +1ED1C;OTTOMAN SIYAQ NUMBER ONE THOUSAND;No;0;AL;;;;1000;N;;;;; +1ED1D;OTTOMAN SIYAQ NUMBER TWO THOUSAND;No;0;AL;;;;2000;N;;;;; +1ED1E;OTTOMAN SIYAQ NUMBER THREE THOUSAND;No;0;AL;;;;3000;N;;;;; +1ED1F;OTTOMAN SIYAQ NUMBER FOUR THOUSAND;No;0;AL;;;;4000;N;;;;; +1ED20;OTTOMAN SIYAQ NUMBER FIVE THOUSAND;No;0;AL;;;;5000;N;;;;; +1ED21;OTTOMAN SIYAQ NUMBER SIX THOUSAND;No;0;AL;;;;6000;N;;;;; +1ED22;OTTOMAN SIYAQ NUMBER SEVEN THOUSAND;No;0;AL;;;;7000;N;;;;; +1ED23;OTTOMAN SIYAQ NUMBER EIGHT THOUSAND;No;0;AL;;;;8000;N;;;;; +1ED24;OTTOMAN SIYAQ NUMBER NINE THOUSAND;No;0;AL;;;;9000;N;;;;; +1ED25;OTTOMAN SIYAQ NUMBER TEN THOUSAND;No;0;AL;;;;10000;N;;;;; +1ED26;OTTOMAN SIYAQ NUMBER TWENTY THOUSAND;No;0;AL;;;;20000;N;;;;; +1ED27;OTTOMAN SIYAQ NUMBER THIRTY THOUSAND;No;0;AL;;;;30000;N;;;;; +1ED28;OTTOMAN SIYAQ NUMBER FORTY THOUSAND;No;0;AL;;;;40000;N;;;;; +1ED29;OTTOMAN SIYAQ NUMBER FIFTY THOUSAND;No;0;AL;;;;50000;N;;;;; +1ED2A;OTTOMAN SIYAQ NUMBER SIXTY THOUSAND;No;0;AL;;;;60000;N;;;;; +1ED2B;OTTOMAN SIYAQ NUMBER SEVENTY THOUSAND;No;0;AL;;;;70000;N;;;;; +1ED2C;OTTOMAN SIYAQ NUMBER EIGHTY THOUSAND;No;0;AL;;;;80000;N;;;;; +1ED2D;OTTOMAN SIYAQ NUMBER NINETY THOUSAND;No;0;AL;;;;90000;N;;;;; +1ED2E;OTTOMAN SIYAQ MARRATAN;So;0;AL;;;;;N;;;;; +1ED2F;OTTOMAN SIYAQ ALTERNATE NUMBER TWO;No;0;AL;;;;2;N;;;;; +1ED30;OTTOMAN SIYAQ ALTERNATE NUMBER THREE;No;0;AL;;;;3;N;;;;; +1ED31;OTTOMAN SIYAQ ALTERNATE NUMBER FOUR;No;0;AL;;;;4;N;;;;; +1ED32;OTTOMAN SIYAQ ALTERNATE NUMBER FIVE;No;0;AL;;;;5;N;;;;; +1ED33;OTTOMAN SIYAQ ALTERNATE NUMBER SIX;No;0;AL;;;;6;N;;;;; +1ED34;OTTOMAN SIYAQ ALTERNATE NUMBER SEVEN;No;0;AL;;;;7;N;;;;; +1ED35;OTTOMAN SIYAQ ALTERNATE NUMBER EIGHT;No;0;AL;;;;8;N;;;;; +1ED36;OTTOMAN SIYAQ ALTERNATE NUMBER NINE;No;0;AL;;;;9;N;;;;; +1ED37;OTTOMAN SIYAQ ALTERNATE NUMBER TEN;No;0;AL;;;;10;N;;;;; +1ED38;OTTOMAN SIYAQ ALTERNATE NUMBER FOUR HUNDRED;No;0;AL;;;;400;N;;;;; +1ED39;OTTOMAN SIYAQ ALTERNATE NUMBER SIX HUNDRED;No;0;AL;;;;600;N;;;;; +1ED3A;OTTOMAN SIYAQ ALTERNATE NUMBER TWO THOUSAND;No;0;AL;;;;2000;N;;;;; +1ED3B;OTTOMAN SIYAQ ALTERNATE NUMBER TEN THOUSAND;No;0;AL;;;;10000;N;;;;; +1ED3C;OTTOMAN SIYAQ FRACTION ONE HALF;No;0;AL;;;;1/2;N;;;;; +1ED3D;OTTOMAN SIYAQ FRACTION ONE SIXTH;No;0;AL;;;;1/6;N;;;;; 1EE00;ARABIC MATHEMATICAL ALEF;Lo;0;AL; 0627;;;;N;;;;; 1EE01;ARABIC MATHEMATICAL BEH;Lo;0;AL; 0628;;;;N;;;;; 1EE02;ARABIC MATHEMATICAL JEEM;Lo;0;AL; 062C;;;;N;;;;; @@ -29662,6 +30064,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F169;NEGATIVE CIRCLED LATIN CAPITAL LETTER Z;So;0;L;;;;;N;;;;; 1F16A;RAISED MC SIGN;So;0;ON; 004D 0043;;;;N;;;;; 1F16B;RAISED MD SIGN;So;0;ON; 004D 0044;;;;N;;;;; +1F16C;RAISED MR SIGN;So;0;ON; 004D 0052;;;;N;;;;; 1F170;NEGATIVE SQUARED LATIN CAPITAL LETTER A;So;0;L;;;;;N;;;;; 1F171;NEGATIVE SQUARED LATIN CAPITAL LETTER B;So;0;L;;;;;N;;;;; 1F172;NEGATIVE SQUARED LATIN CAPITAL LETTER C;So;0;L;;;;;N;;;;; @@ -30794,6 +31197,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F6D2;SHOPPING TROLLEY;So;0;ON;;;;;N;;;;; 1F6D3;STUPA;So;0;ON;;;;;N;;;;; 1F6D4;PAGODA;So;0;ON;;;;;N;;;;; +1F6D5;HINDU TEMPLE;So;0;ON;;;;;N;;;;; 1F6E0;HAMMER AND WRENCH;So;0;ON;;;;;N;;;;; 1F6E1;SHIELD;So;0;ON;;;;;N;;;;; 1F6E2;OIL DRUM;So;0;ON;;;;;N;;;;; @@ -30817,6 +31221,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F6F7;SLED;So;0;ON;;;;;N;;;;; 1F6F8;FLYING SAUCER;So;0;ON;;;;;N;;;;; 1F6F9;SKATEBOARD;So;0;ON;;;;;N;;;;; +1F6FA;AUTO RICKSHAW;So;0;ON;;;;;N;;;;; 1F700;ALCHEMICAL SYMBOL FOR QUINTESSENCE;So;0;ON;;;;;N;;;;; 1F701;ALCHEMICAL SYMBOL FOR AIR;So;0;ON;;;;;N;;;;; 1F702;ALCHEMICAL SYMBOL FOR FIRE;So;0;ON;;;;;N;;;;; @@ -31022,6 +31427,18 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F7D6;NEGATIVE CIRCLED TRIANGLE;So;0;ON;;;;;N;;;;; 1F7D7;CIRCLED SQUARE;So;0;ON;;;;;N;;;;; 1F7D8;NEGATIVE CIRCLED SQUARE;So;0;ON;;;;;N;;;;; +1F7E0;LARGE ORANGE CIRCLE;So;0;ON;;;;;N;;;;; +1F7E1;LARGE YELLOW CIRCLE;So;0;ON;;;;;N;;;;; +1F7E2;LARGE GREEN CIRCLE;So;0;ON;;;;;N;;;;; +1F7E3;LARGE PURPLE CIRCLE;So;0;ON;;;;;N;;;;; +1F7E4;LARGE BROWN CIRCLE;So;0;ON;;;;;N;;;;; +1F7E5;LARGE RED SQUARE;So;0;ON;;;;;N;;;;; +1F7E6;LARGE BLUE SQUARE;So;0;ON;;;;;N;;;;; +1F7E7;LARGE ORANGE SQUARE;So;0;ON;;;;;N;;;;; +1F7E8;LARGE YELLOW SQUARE;So;0;ON;;;;;N;;;;; +1F7E9;LARGE GREEN SQUARE;So;0;ON;;;;;N;;;;; +1F7EA;LARGE PURPLE SQUARE;So;0;ON;;;;;N;;;;; +1F7EB;LARGE BROWN SQUARE;So;0;ON;;;;;N;;;;; 1F800;LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; 1F801;UPWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; 1F802;RIGHTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; @@ -31182,6 +31599,9 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F909;DOWNWARD FACING NOTCHED HOOK;So;0;ON;;;;;N;;;;; 1F90A;DOWNWARD FACING HOOK WITH DOT;So;0;ON;;;;;N;;;;; 1F90B;DOWNWARD FACING NOTCHED HOOK WITH DOT;So;0;ON;;;;;N;;;;; +1F90D;WHITE HEART;So;0;ON;;;;;N;;;;; +1F90E;BROWN HEART;So;0;ON;;;;;N;;;;; +1F90F;PINCHING HAND;So;0;ON;;;;;N;;;;; 1F910;ZIPPER-MOUTH FACE;So;0;ON;;;;;N;;;;; 1F911;MONEY-MOUTH FACE;So;0;ON;;;;;N;;;;; 1F912;FACE WITH THERMOMETER;So;0;ON;;;;;N;;;;; @@ -31229,6 +31649,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F93C;WRESTLERS;So;0;ON;;;;;N;;;;; 1F93D;WATER POLO;So;0;ON;;;;;N;;;;; 1F93E;HANDBALL;So;0;ON;;;;;N;;;;; +1F93F;DIVING MASK;So;0;ON;;;;;N;;;;; 1F940;WILTED FLOWER;So;0;ON;;;;;N;;;;; 1F941;DRUM WITH DRUMSTICKS;So;0;ON;;;;;N;;;;; 1F942;CLINKING GLASSES;So;0;ON;;;;;N;;;;; @@ -31278,11 +31699,13 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F96E;MOON CAKE;So;0;ON;;;;;N;;;;; 1F96F;BAGEL;So;0;ON;;;;;N;;;;; 1F970;SMILING FACE WITH SMILING EYES AND THREE HEARTS;So;0;ON;;;;;N;;;;; +1F971;YAWNING FACE;So;0;ON;;;;;N;;;;; 1F973;FACE WITH PARTY HORN AND PARTY HAT;So;0;ON;;;;;N;;;;; 1F974;FACE WITH UNEVEN EYES AND WAVY MOUTH;So;0;ON;;;;;N;;;;; 1F975;OVERHEATED FACE;So;0;ON;;;;;N;;;;; 1F976;FREEZING FACE;So;0;ON;;;;;N;;;;; 1F97A;FACE WITH PLEADING EYES;So;0;ON;;;;;N;;;;; +1F97B;SARI;So;0;ON;;;;;N;;;;; 1F97C;LAB COAT;So;0;ON;;;;;N;;;;; 1F97D;GOGGLES;So;0;ON;;;;;N;;;;; 1F97E;HIKING BOOT;So;0;ON;;;;;N;;;;; @@ -31322,6 +31745,14 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F9A0;MICROBE;So;0;ON;;;;;N;;;;; 1F9A1;BADGER;So;0;ON;;;;;N;;;;; 1F9A2;SWAN;So;0;ON;;;;;N;;;;; +1F9A5;SLOTH;So;0;ON;;;;;N;;;;; +1F9A6;OTTER;So;0;ON;;;;;N;;;;; +1F9A7;ORANGUTAN;So;0;ON;;;;;N;;;;; +1F9A8;SKUNK;So;0;ON;;;;;N;;;;; +1F9A9;FLAMINGO;So;0;ON;;;;;N;;;;; +1F9AA;OYSTER;So;0;ON;;;;;N;;;;; +1F9AE;GUIDE DOG;So;0;ON;;;;;N;;;;; +1F9AF;PROBING CANE;So;0;ON;;;;;N;;;;; 1F9B0;EMOJI COMPONENT RED HAIR;So;0;ON;;;;;N;;;;; 1F9B1;EMOJI COMPONENT CURLY HAIR;So;0;ON;;;;;N;;;;; 1F9B2;EMOJI COMPONENT BALD;So;0;ON;;;;;N;;;;; @@ -31332,9 +31763,26 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F9B7;TOOTH;So;0;ON;;;;;N;;;;; 1F9B8;SUPERHERO;So;0;ON;;;;;N;;;;; 1F9B9;SUPERVILLAIN;So;0;ON;;;;;N;;;;; +1F9BA;SAFETY VEST;So;0;ON;;;;;N;;;;; +1F9BB;EAR WITH HEARING AID;So;0;ON;;;;;N;;;;; +1F9BC;MOTORIZED WHEELCHAIR;So;0;ON;;;;;N;;;;; +1F9BD;MANUAL WHEELCHAIR;So;0;ON;;;;;N;;;;; +1F9BE;MECHANICAL ARM;So;0;ON;;;;;N;;;;; +1F9BF;MECHANICAL LEG;So;0;ON;;;;;N;;;;; 1F9C0;CHEESE WEDGE;So;0;ON;;;;;N;;;;; 1F9C1;CUPCAKE;So;0;ON;;;;;N;;;;; 1F9C2;SALT SHAKER;So;0;ON;;;;;N;;;;; +1F9C3;BEVERAGE BOX;So;0;ON;;;;;N;;;;; +1F9C4;GARLIC;So;0;ON;;;;;N;;;;; +1F9C5;ONION;So;0;ON;;;;;N;;;;; +1F9C6;FALAFEL;So;0;ON;;;;;N;;;;; +1F9C7;WAFFLE;So;0;ON;;;;;N;;;;; +1F9C8;BUTTER;So;0;ON;;;;;N;;;;; +1F9C9;MATE DRINK;So;0;ON;;;;;N;;;;; +1F9CA;ICE CUBE;So;0;ON;;;;;N;;;;; +1F9CD;STANDING PERSON;So;0;ON;;;;;N;;;;; +1F9CE;KNEELING PERSON;So;0;ON;;;;;N;;;;; +1F9CF;DEAF PERSON;So;0;ON;;;;;N;;;;; 1F9D0;FACE WITH MONOCLE;So;0;ON;;;;;N;;;;; 1F9D1;ADULT;So;0;ON;;;;;N;;;;; 1F9D2;CHILD;So;0;ON;;;;;N;;;;; @@ -31383,6 +31831,90 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1F9FD;SPONGE;So;0;ON;;;;;N;;;;; 1F9FE;RECEIPT;So;0;ON;;;;;N;;;;; 1F9FF;NAZAR AMULET;So;0;ON;;;;;N;;;;; +1FA00;NEUTRAL CHESS KING;So;0;ON;;;;;N;;;;; +1FA01;NEUTRAL CHESS QUEEN;So;0;ON;;;;;N;;;;; +1FA02;NEUTRAL CHESS ROOK;So;0;ON;;;;;N;;;;; +1FA03;NEUTRAL CHESS BISHOP;So;0;ON;;;;;N;;;;; +1FA04;NEUTRAL CHESS KNIGHT;So;0;ON;;;;;N;;;;; +1FA05;NEUTRAL CHESS PAWN;So;0;ON;;;;;N;;;;; +1FA06;WHITE CHESS KNIGHT ROTATED FORTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA07;BLACK CHESS KNIGHT ROTATED FORTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA08;NEUTRAL CHESS KNIGHT ROTATED FORTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA09;WHITE CHESS KING ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0A;WHITE CHESS QUEEN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0B;WHITE CHESS ROOK ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0C;WHITE CHESS BISHOP ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0D;WHITE CHESS KNIGHT ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0E;WHITE CHESS PAWN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0F;BLACK CHESS KING ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA10;BLACK CHESS QUEEN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA11;BLACK CHESS ROOK ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA12;BLACK CHESS BISHOP ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA13;BLACK CHESS KNIGHT ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA14;BLACK CHESS PAWN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA15;NEUTRAL CHESS KING ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA16;NEUTRAL CHESS QUEEN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA17;NEUTRAL CHESS ROOK ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA18;NEUTRAL CHESS BISHOP ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA19;NEUTRAL CHESS KNIGHT ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA1A;NEUTRAL CHESS PAWN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA1B;WHITE CHESS KNIGHT ROTATED ONE HUNDRED THIRTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA1C;BLACK CHESS KNIGHT ROTATED ONE HUNDRED THIRTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA1D;NEUTRAL CHESS KNIGHT ROTATED ONE HUNDRED THIRTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA1E;WHITE CHESS TURNED KING;So;0;ON;;;;;N;;;;; +1FA1F;WHITE CHESS TURNED QUEEN;So;0;ON;;;;;N;;;;; +1FA20;WHITE CHESS TURNED ROOK;So;0;ON;;;;;N;;;;; +1FA21;WHITE CHESS TURNED BISHOP;So;0;ON;;;;;N;;;;; +1FA22;WHITE CHESS TURNED KNIGHT;So;0;ON;;;;;N;;;;; +1FA23;WHITE CHESS TURNED PAWN;So;0;ON;;;;;N;;;;; +1FA24;BLACK CHESS TURNED KING;So;0;ON;;;;;N;;;;; +1FA25;BLACK CHESS TURNED QUEEN;So;0;ON;;;;;N;;;;; +1FA26;BLACK CHESS TURNED ROOK;So;0;ON;;;;;N;;;;; +1FA27;BLACK CHESS TURNED BISHOP;So;0;ON;;;;;N;;;;; +1FA28;BLACK CHESS TURNED KNIGHT;So;0;ON;;;;;N;;;;; +1FA29;BLACK CHESS TURNED PAWN;So;0;ON;;;;;N;;;;; +1FA2A;NEUTRAL CHESS TURNED KING;So;0;ON;;;;;N;;;;; +1FA2B;NEUTRAL CHESS TURNED QUEEN;So;0;ON;;;;;N;;;;; +1FA2C;NEUTRAL CHESS TURNED ROOK;So;0;ON;;;;;N;;;;; +1FA2D;NEUTRAL CHESS TURNED BISHOP;So;0;ON;;;;;N;;;;; +1FA2E;NEUTRAL CHESS TURNED KNIGHT;So;0;ON;;;;;N;;;;; +1FA2F;NEUTRAL CHESS TURNED PAWN;So;0;ON;;;;;N;;;;; +1FA30;WHITE CHESS KNIGHT ROTATED TWO HUNDRED TWENTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA31;BLACK CHESS KNIGHT ROTATED TWO HUNDRED TWENTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA32;NEUTRAL CHESS KNIGHT ROTATED TWO HUNDRED TWENTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA33;WHITE CHESS KING ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA34;WHITE CHESS QUEEN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA35;WHITE CHESS ROOK ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA36;WHITE CHESS BISHOP ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA37;WHITE CHESS KNIGHT ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA38;WHITE CHESS PAWN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA39;BLACK CHESS KING ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3A;BLACK CHESS QUEEN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3B;BLACK CHESS ROOK ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3C;BLACK CHESS BISHOP ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3D;BLACK CHESS KNIGHT ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3E;BLACK CHESS PAWN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3F;NEUTRAL CHESS KING ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA40;NEUTRAL CHESS QUEEN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA41;NEUTRAL CHESS ROOK ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA42;NEUTRAL CHESS BISHOP ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA43;NEUTRAL CHESS KNIGHT ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA44;NEUTRAL CHESS PAWN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA45;WHITE CHESS KNIGHT ROTATED THREE HUNDRED FIFTEEN DEGREES;So;0;ON;;;;;N;;;;; +1FA46;BLACK CHESS KNIGHT ROTATED THREE HUNDRED FIFTEEN DEGREES;So;0;ON;;;;;N;;;;; +1FA47;NEUTRAL CHESS KNIGHT ROTATED THREE HUNDRED FIFTEEN DEGREES;So;0;ON;;;;;N;;;;; +1FA48;WHITE CHESS EQUIHOPPER;So;0;ON;;;;;N;;;;; +1FA49;BLACK CHESS EQUIHOPPER;So;0;ON;;;;;N;;;;; +1FA4A;NEUTRAL CHESS EQUIHOPPER;So;0;ON;;;;;N;;;;; +1FA4B;WHITE CHESS EQUIHOPPER ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA4C;BLACK CHESS EQUIHOPPER ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA4D;NEUTRAL CHESS EQUIHOPPER ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA4E;WHITE CHESS KNIGHT-QUEEN;So;0;ON;;;;;N;;;;; +1FA4F;WHITE CHESS KNIGHT-ROOK;So;0;ON;;;;;N;;;;; +1FA50;WHITE CHESS KNIGHT-BISHOP;So;0;ON;;;;;N;;;;; +1FA51;BLACK CHESS KNIGHT-QUEEN;So;0;ON;;;;;N;;;;; +1FA52;BLACK CHESS KNIGHT-ROOK;So;0;ON;;;;;N;;;;; +1FA53;BLACK CHESS KNIGHT-BISHOP;So;0;ON;;;;;N;;;;; 1FA60;XIANGQI RED GENERAL;So;0;ON;;;;;N;;;;; 1FA61;XIANGQI RED MANDARIN;So;0;ON;;;;;N;;;;; 1FA62;XIANGQI RED ELEPHANT;So;0;ON;;;;;N;;;;; @@ -31397,6 +31929,22 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 1FA6B;XIANGQI BLACK CHARIOT;So;0;ON;;;;;N;;;;; 1FA6C;XIANGQI BLACK CANNON;So;0;ON;;;;;N;;;;; 1FA6D;XIANGQI BLACK SOLDIER;So;0;ON;;;;;N;;;;; +1FA70;BALLET SHOES;So;0;ON;;;;;N;;;;; +1FA71;ONE-PIECE SWIMSUIT;So;0;ON;;;;;N;;;;; +1FA72;BRIEFS;So;0;ON;;;;;N;;;;; +1FA73;SHORTS;So;0;ON;;;;;N;;;;; +1FA78;DROP OF BLOOD;So;0;ON;;;;;N;;;;; +1FA79;ADHESIVE BANDAGE;So;0;ON;;;;;N;;;;; +1FA7A;STETHOSCOPE;So;0;ON;;;;;N;;;;; +1FA80;YO-YO;So;0;ON;;;;;N;;;;; +1FA81;KITE;So;0;ON;;;;;N;;;;; +1FA82;PARACHUTE;So;0;ON;;;;;N;;;;; +1FA90;RINGED PLANET;So;0;ON;;;;;N;;;;; +1FA91;CHAIR;So;0;ON;;;;;N;;;;; +1FA92;RAZOR;So;0;ON;;;;;N;;;;; +1FA93;AXE;So;0;ON;;;;;N;;;;; +1FA94;DIYA LAMP;So;0;ON;;;;;N;;;;; +1FA95;BANJO;So;0;ON;;;;;N;;;;; 20000;;Lo;0;L;;;;;N;;;;; 2A6D6;;Lo;0;L;;;;;N;;;;; 2A700;;Lo;0;L;;;;;N;;;;; diff --git a/resources/standards-data/unicode-character-database/unicode-copyright.txt b/resources/standards-data/unicode-character-database/unicode-copyright.txt index c7031219285e4c9ecfd234476ce9fd71bb3eb9d0..1aabb6db2151d30e53d8cd69fbe75953b3239447 100644 --- a/resources/standards-data/unicode-character-database/unicode-copyright.txt +++ b/resources/standards-data/unicode-character-database/unicode-copyright.txt @@ -1,16 +1,17 @@ -Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. +Unicode Data Files ("DATA FILES") include all data files under the directories: +http://www.unicode.org/Public/ +http://www.unicode.org/reports/ +https://www.unicode.org/ivd/data/ Unicode Data Files do not include PDF online code charts under the -directory http://www.unicode.org/Public/. +directory: +http://www.unicode.org/Public/ -Software includes any source code published in the Unicode Standard -or under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. +Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard +or any source code or compiled code under the directories: +https://www.unicode.org/Public/PROGRAMS/ +https://www.unicode.org/Public/cldr/ +https://site.icu-project.org/download/ NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S @@ -22,8 +23,8 @@ THE DATA FILES OR SOFTWARE. COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2017 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in http://www.unicode.org/copyright.html. +Copyright © 1991-2019 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation @@ -52,4 +53,4 @@ PERFORMANCE OF THE DATA FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. \ No newline at end of file +written authorization of the copyright holder. diff --git a/resources/validateHistory.sh b/resources/validateHistory.sh index ef2335ef760e1cab2b4918f686105c97b41a1862..03a8da18aadcba3809ca3d56c6c3f48eac45ec5e 100755 --- a/resources/validateHistory.sh +++ b/resources/validateHistory.sh @@ -1,4 +1,6 @@ -. historyUtils.sh +_hu_base_dir=$(dirname "$BASH_SOURCE")/.. + +. $_hu_base_dir/resources/historyUtils.sh # Insert the shorthand for a platform as the command-line argument. validate_history_file "$1" \ No newline at end of file diff --git a/web/history.md b/web/history.md index eeb61b9a598a6a7eedbb88d5a588c81b3782550a..62643f2d217e1083aed3702bbc3f0f3ec66c60db 100644 --- a/web/history.md +++ b/web/history.md @@ -1,13 +1,86 @@ # KeymanWeb Version History -## 12.0 alpha -* Resumed TypeScript conversion work, resulting in significant internal restructuring and reorganization while leaving our published API intact. - * Mobile web "touch alias" elements have been refactored into their own type. - * Heavily reorganizes and refactors the keystroke processing engine of KMW. - * Attachment to all supported element types has now been abstracted, splitting keystroke processing from related DOM management. - * Centralizes code paths to improve parity between hardware and OSK-based keystrokes. - * In both cases above, significant unit testing was facilitated and has been added as a result, further improving code maintainability into the future. -* Began adding support for our common LMLayer interface for predictive modeling. +## 13.0 alpha +* Start version 13.0 + +## 2019-10-04 12.0.90 beta +* Fixes next-layer management complications with predictive correction data computation (#2172) + +## 2019-10-01 12.0.87 beta +* Fixes the `setLastActiveElement` API function for touch form factors (#2151) + +## 2019-09-23 12.0.86 beta +* Fixes issue in Toolbar UI for some keyboards with language ids that include subtags (#2116) +* Fixes issue with '=' key use on certain platforms in Firefox (#2118) + +## 2019-09-20 12.0.85 beta +* Adds failsafe in case of sticky backspace scenarios, making it simpler to cancel. (#2107) + +## 2019-09-10 12.0.83 beta +* Enables scrolling for long suggestions in the mobile-only predictive text banner (#2071) + +## 2019-09-09 12.0.82 beta +* Fixes output of the 102nd key for touch keyboards using desktop layouts (#2064) + +## 2019-09-06 12.0.81 beta +* For keyboards compiled with Developer 12.0 onward, default key caps will no longer be provided. (#2045) + +## 2019-09-04 12.0.80 beta +* Fixed issue with 'pt' and unitless font size specifications for keyboard layouts (#2033) +* Slightly enhanced error logging for internal events (#2037) + +## 2019-09-03 12.0.79 beta +* Tweaks suggestion banner behavior after multiple backspaces. (#2027) + +## 2019-09-02 12.0.78 beta +* Fixes erroneous 'beep' feedback on mobile form-factors (#2013) +* Longpress menu disappears properly after selecting a subkey (#2013) + +## 2019-08-09 12.0.76 beta +* The suggestion banner will no longer activate if predictions are not enabled, regardless of correction state. (#1960) + +## 2019-08-07 12.0.75 beta +* Fixes issue where keyboard name / language caption was missing from spacebar (#1937) + +## 2019-08-06 12.0.74 beta +* Fixes issue with an extra space being added after accepted predictive suggestions (#1936) + +## 2019-07-29 12.0.72 beta +* Initial beta release of KeymanWeb 12 +* [Pull Requests](https://github.com/keymanapp/keyman/pulls?utf8=%E2%9C%93&q=is%3Apr+merged%3A2019-02-25..2019-08-04+label%3Aweb+base%3Amaster) + +* New Features: + * Began adding support for our common LMLayer interface for predictive modeling. + * Implemented WebWorker background thread for the heavy lifting; all API calls with relevant return values return Promises. + * Provides API for the following language-modeling functions: + * predict - Prediction of user's desired word based on context and recent input + * Also returns a tagged prediction corresponding to the original context state. + * Corrections are currently limited to the most recent input keystroke. + * Accepts a probability distribution for the most recent keystroke, which is be used to weight prediction probabilities + * wordbreak - Performs wordbreaking on the current context state + * A default wordbreaker based on the Unicode specification is provided as a default. + * Implements a common "template" for weighted wordlist lexical model functionality: + * Accepts a "search term to key" function to facilitate common corrections, such as diacritics, + during prediction lookups. + * Predictions are weighted based on their frequency and their input likelihood (based on keystroke probabilities). + * Accepts fully-specified custom lexical models that do not rely on model "templates." + +* Changes: + * Resumed TypeScript conversion work, resulting in significant internal restructuring and reorganization while leaving our published API intact. + * Mobile web "touch alias" elements have been refactored into their own type. + * Heavily reorganizes and refactors the keystroke processing engine of KMW. + * Attachment to all supported element types has now been abstracted, splitting keystroke processing from related DOM management. + * Centralizes code paths to improve parity between hardware and OSK-based keystrokes. + * In both cases above, significant unit testing was facilitated and has been added as a result, further improving code maintainability into the future. + +## 2019-04-25 11.0.225 stable +* Fixes bug with Mandarin Chinese 'picker' UI + +## 2019-02-27 11.0.222 stable +* Fixes bug with OSK keys set as if on a different layer from the one they are actually on (#1628) + +## 2019-02-26 11.0.221 stable +* Fixes bug with the Toolbar UI (#1629) ## 2019-02-25 11.0.220 stable * 11.0 Stable release diff --git a/web/package-lock.json b/web/package-lock.json index 7d1c95809ff6abbde7593dbd7c881e22a1182cfb..35e351e7a4e514a7f0cecb876090e58cbba777b5 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -10,13 +10,13 @@ "integrity": "sha512-Zl8dGvAcEmadgs1tmSPcvwzO1YRsz38bVJQvH1RvRqSR9/5n61Q1ktcDL0ht3FXWR+ZpVmXVwN1LuH4Ax23NsA==" }, "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", "dev": true, "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" + "mime-types": "~2.1.24", + "negotiator": "0.6.2" } }, "after": { @@ -47,13 +47,13 @@ "dev": true }, "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.0.3.tgz", + "integrity": "sha512-c6IvoeBECQlMVuYUjSwimnhmztImpErfxJzWZhIQinIvQWoGOnB0dLIgifbPHQt5heS6mNlaZG16f06H3C8t1g==", "dev": true, "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, "arg": { @@ -62,13 +62,12 @@ "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==" }, "argparse": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", - "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "underscore": "~1.7.0", - "underscore.string": "~2.4.0" + "sprintf-js": "~1.0.2" } }, "arr-diff": { @@ -113,17 +112,14 @@ "integrity": "sha1-5gtrDo8wG9l+U3UhW9pAbIURjAs=", "dev": true }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } }, "async-limiter": { "version": "1.0.0", @@ -131,18 +127,6 @@ "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autolinker": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.15.3.tgz", - "integrity": "sha1-NCQX2PLzRhsUzwkIjV7fh5HcmDI=", - "dev": true - }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", @@ -155,61 +139,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", @@ -231,26 +160,10 @@ "callsite": "1.0.0" } }, - "big-integer": { - "version": "1.6.40", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.40.tgz", - "integrity": "sha512-CjhtJp0BViLzP1ZkEnoywjgtFQXS2pomKjAJtIISTCnuHILkLcAXLdFLG/nxsHc4s9kJfc+82Xpg8WNyhfACzQ==", - "dev": true - }, - "binary": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", - "dev": true, - "requires": { - "buffers": "~0.1.1", - "chainsaw": "~0.1.0" - } - }, "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", "dev": true }, "blob": { @@ -260,27 +173,27 @@ "dev": true }, "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", + "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", "dev": true }, "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "dev": true, "requires": { - "bytes": "3.0.0", + "bytes": "3.1.0", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" } }, "brace-expansion": { @@ -294,32 +207,12 @@ } }, "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "fill-range": "^7.0.1" } }, "browser-stdout": { @@ -337,14 +230,17 @@ "https-proxy-agent": "^2.2.1" } }, - "browserstacktunnel-wrapper": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/browserstacktunnel-wrapper/-/browserstacktunnel-wrapper-2.0.4.tgz", - "integrity": "sha512-GCV599FUUxNOCFl3WgPnfc5dcqq9XTmMXoxWpqkvmk0R9TOIoqmjENNU6LY6DtgIL6WfBVbg/jmWtnM5K6UYSg==", + "browserstack-local": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/browserstack-local/-/browserstack-local-1.4.0.tgz", + "integrity": "sha512-BUJWxIsJkJxqfTPJIvGWTsf+IYSqSFUeFNW9tnuyTG7va/0LkXLhIi/ErFGDle1urQkol48HlQUXj4QrliXFpg==", "dev": true, "requires": { "https-proxy-agent": "^2.2.1", - "unzipper": "^0.9.3" + "is-running": "^2.0.0", + "ps-tree": "=1.1.1", + "sinon": "^1.17.6", + "temp-fs": "^0.9.9" } }, "buffer-alloc": { @@ -374,47 +270,12 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, - "buffer-indexof-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.1.tgz", - "integrity": "sha1-qfuAbOgUXVQoUQznLyeLs2OmOL8=", - "dev": true - }, - "buffers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", "dev": true }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", @@ -422,9 +283,9 @@ "dev": true }, "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "chai": { @@ -441,15 +302,6 @@ "type-detect": "^4.0.5" } }, - "chainsaw": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", - "dev": true, - "requires": { - "traverse": ">=0.3.0 <0.4" - } - }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -470,66 +322,49 @@ "dev": true }, "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.0.2.tgz", + "integrity": "sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA==", "dev": true, "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" + "anymatch": "^3.0.1", + "braces": "^3.0.2", + "fsevents": "^2.0.6", + "glob-parent": "^5.0.0", + "is-binary-path": "^2.1.0", + "is-glob": "^4.0.1", + "normalize-path": "^3.0.0", + "readdirp": "^3.1.1" } }, - "circular-json": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz", - "integrity": "sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "ansi-regex": "^4.1.0" } } } }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, "clone": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", @@ -559,22 +394,6 @@ "through2": "^2.0.1" } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -596,15 +415,6 @@ "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", "dev": true }, - "combine-lists": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", - "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", - "dev": true, - "requires": { - "lodash": "^4.5.0" - } - }, "component-bind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", @@ -630,14 +440,14 @@ "dev": true }, "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", "dev": true, "requires": { "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", "utils-merge": "1.0.1" } }, @@ -653,16 +463,10 @@ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", "dev": true }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, "core-js": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.2.tgz", - "integrity": "sha512-NdBPF/RVwPW6jr0NCILuyN9RiqLo2b1mddWHkUL+VnvcB7dzlnBJ1bXYntjpTGOgkZiiLWj2JxmOr7eGE3qK6g==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", + "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==", "dev": true }, "core-util-is": { @@ -687,9 +491,9 @@ "dev": true }, "date-format": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", - "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", + "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", "dev": true }, "debug": { @@ -707,12 +511,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -722,45 +520,13 @@ "type-detect": "^4.0.0" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } + "object-keys": "^1.0.12" } }, "depd": { @@ -781,13 +547,12 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" }, "doctrine": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.3.tgz", - "integrity": "sha1-auxrvWLPid1JjK5wwO2fSdqHOmo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" } }, "dom-serialize": { @@ -802,14 +567,11 @@ "void-elements": "^2.0.0" } }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true }, "edge-launcher": { "version": "1.2.2", @@ -823,6 +585,12 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", "dev": true }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -903,19 +671,41 @@ "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", "dev": true }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "es-abstract": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" } }, "es6-promise": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", - "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", + "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==", "dev": true }, "es6-promisify": { @@ -945,98 +735,26 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "expand-braces": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", - "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", - "dev": true, - "requires": { - "array-slice": "^0.2.3", - "array-unique": "^0.2.1", - "braces": "^0.1.2" - }, - "dependencies": { - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", - "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", - "dev": true, - "requires": { - "expand-range": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" } }, - "expand-range": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", - "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", - "dev": true, - "requires": { - "is-number": "^0.1.1", - "repeat-string": "^0.2.2" - }, - "dependencies": { - "is-number": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", - "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", - "dev": true - }, - "repeat-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", - "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", - "dev": true - } - } + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true }, "extend": { "version": "3.0.2", @@ -1044,92 +762,6 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "file": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/file/-/file-0.2.2.tgz", @@ -1137,108 +769,85 @@ "dev": true }, "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "to-regex-range": "^5.0.1" } }, "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "dev": true, "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.1", + "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", "unpipe": "~1.0.0" - }, - "dependencies": { - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - } } }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", - "dev": true - }, "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "locate-path": "^3.0.0" } }, "flatted": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", - "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", "dev": true }, "follow-redirects": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.6.1.tgz", - "integrity": "sha512-t2JCjbzxQpWvbhts3l6SH1DKzSrx8a+SsaVf4h6bG4kOXUuPYS/kg2Lr4gQSb7eemaHqJkOThF1BGyjlUkO1GQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", "dev": true, "requires": { - "debug": "=3.1.0" + "debug": "^3.2.6" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "formatio": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", + "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", "dev": true, "requires": { - "map-cache": "^0.2.2" + "samsam": "~1.1" } }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, "fs-access": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", @@ -1248,6 +857,17 @@ "null-check": "^1.0.0" } }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1255,550 +875,22 @@ "dev": true }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.0.7.tgz", + "integrity": "sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ==", "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } + "optional": true }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true }, "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-func-name": { @@ -1807,12 +899,6 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -1828,24 +914,12 @@ } }, "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", + "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } + "is-glob": "^4.0.1" } }, "google-closure-compiler": { @@ -1860,9 +934,9 @@ } }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", "dev": true }, "growl": { @@ -1871,6 +945,15 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -1909,37 +992,11 @@ "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { + "has-symbols": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true }, "he": { "version": "1.1.1", @@ -1947,12 +1004,6 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, "html2canvas": { "version": "1.0.0-alpha.12", "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-alpha.12.tgz", @@ -1963,15 +1014,16 @@ } }, "http-errors": { - "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "dev": true, "requires": { "depd": "~1.1.2", "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" } }, "http-proxy": { @@ -2013,135 +1065,66 @@ } }, "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", "dev": true }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "once": "^1.3.0", + "wrappy": "1" } }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "binary-extensions": "^2.0.0" } }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, "is-extglob": { @@ -2151,63 +1134,55 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-generator-function": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", + "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw==", + "dev": true }, "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" } }, "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "isobject": "^3.0.1" + "has": "^1.0.1" } }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "is-running": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-running/-/is-running-2.1.0.tgz", + "integrity": "sha1-MKc/9cw4VOT8JUkICen1q/jeCeA=", "dev": true }, - "is-windows": { + "is-symbol": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } }, "isarray": { "version": "1.0.0", @@ -2230,35 +1205,37 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } }, "karma": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/karma/-/karma-3.1.4.tgz", - "integrity": "sha512-31Vo8Qr5glN+dZEVIpnPCxEGleqE0EY6CtC2X9TagRV3rRQ3SNrvfhddICkJgUK3AgqpeKSZau03QumTGhGoSw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/karma/-/karma-4.2.0.tgz", + "integrity": "sha512-fmCuxN1rwJxTdZfOXK5LjlmS4Ana/OvzNMpkyLL/TLE8hmgSkpVpMYQ7RTVa8TNKRVQDZNl5W1oF5cfKfgIMlA==", "dev": true, "requires": { "bluebird": "^3.3.0", "body-parser": "^1.16.1", - "chokidar": "^2.0.3", + "braces": "^3.0.2", + "chokidar": "^3.0.0", "colors": "^1.1.0", - "combine-lists": "^1.0.0", "connect": "^3.6.0", - "core-js": "^2.2.0", + "core-js": "^3.1.3", "di": "^0.0.1", "dom-serialize": "^2.2.0", - "expand-braces": "^0.1.1", "flatted": "^2.0.0", "glob": "^7.1.1", "graceful-fs": "^4.1.2", "http-proxy": "^1.13.0", "isbinaryfile": "^3.0.0", - "lodash": "^4.17.5", - "log4js": "^3.0.0", + "lodash": "^4.17.11", + "log4js": "^4.0.0", "mime": "^2.3.1", "minimatch": "^3.0.2", "optimist": "^0.6.1", @@ -2281,13 +1258,13 @@ } }, "karma-browserstack-launcher": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/karma-browserstack-launcher/-/karma-browserstack-launcher-1.4.0.tgz", - "integrity": "sha512-bUQK84U+euDfOUfEjcF4IareySMOBNRLrrl9q6cttIe8f011Ir6olLITTYMOJDcGY58wiFIdhPHSPd9Pi6+NfQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/karma-browserstack-launcher/-/karma-browserstack-launcher-1.5.1.tgz", + "integrity": "sha512-zt9Ukow5A9WZHZXCFVO/h5kRsAdaZYeMNJK9Uan8v42amQXt3B/DZVxl24NCcAIxufKjW13UWd9iJ9knG9OCYw==", "dev": true, "requires": { "browserstack": "~1.5.1", - "browserstacktunnel-wrapper": "~2.0.2", + "browserstack-local": "^1.3.7", "q": "~1.5.0" } }, @@ -2435,50 +1412,29 @@ "integrity": "sha1-eYD33JHmqwhH4SKt4Ls0x8b0KBY=", "dev": true }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "uc.micro": "^1.0.1" } }, - "listenercount": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", - "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=", - "dev": true - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "log-symbols": { @@ -2522,35 +1478,41 @@ } }, "log4js": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-3.0.6.tgz", - "integrity": "sha512-ezXZk6oPJCWL483zj64pNkMuY/NcRX5MPiB0zE6tjZM137aeusrOnW1ecxgF9cmwMWkBMhjteQxBPoZBh9FDxQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-4.5.1.tgz", + "integrity": "sha512-EEEgFcE9bLgaYUKuozyFfytQM2wDHtXn4tAN41pkaxpNjAykv11GVdeI4tHtmPWW4Xrgh9R/2d7XYghDVjbKKw==", "dev": true, "requires": { - "circular-json": "^0.5.5", - "date-format": "^1.2.0", - "debug": "^3.1.0", - "rfdc": "^1.1.2", - "streamroller": "0.7.0" + "date-format": "^2.0.0", + "debug": "^4.1.1", + "flatted": "^2.0.0", + "rfdc": "^1.1.4", + "streamroller": "^1.0.6" }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, + "lolex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", + "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", + "dev": true + }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -2566,67 +1528,56 @@ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==" }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", "dev": true }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "markdown-it": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", + "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", "dev": true, "requires": { - "object-visit": "^1.0.0" + "argparse": "^1.0.7", + "entities": "~1.1.1", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" } }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", "dev": true }, "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", "dev": true }, "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", "dev": true, "requires": { - "mime-db": "~1.37.0" + "mime-db": "1.40.0" } }, "minimatch": { @@ -2644,27 +1595,6 @@ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -2726,27 +1656,18 @@ } }, "modernizr": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/modernizr/-/modernizr-3.6.0.tgz", - "integrity": "sha512-CC6hAvMDNlfSqaGt2EgU3/4ufAIKJYgZePt6rj6vEFqr7rsr6KVhl1PZ7E974E4JvlfmxAPIObUKwb/bqO22cA==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/modernizr/-/modernizr-3.7.1.tgz", + "integrity": "sha512-pewTfEGiY5pHRnJNKFALn/nkYpWmEOtZ+iRMzQUjexkOum3X4v+xAZ9AqgXdjnDBh37HNCDP6ieq68NGPYvkTA==", "dev": true, "requires": { - "doctrine": "1.2.3", - "file": "0.2.2", - "find-parent-dir": "0.3.0", - "lodash": "4.17.4", - "mkdirp": "0.5.1", - "remarkable": "^1.6.2", - "requirejs": "2.1.22", - "yargs": "7.0.2" - }, - "dependencies": { - "lodash": { - "version": "4.17.4", - "resolved": "http://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true - } + "doctrine": "^3.0.0", + "file": "^0.2.2", + "lodash": "^4.17.11", + "markdown-it": "^8.4.2", + "mkdirp": "^0.5.1", + "requirejs": "^2.3.6", + "yargs": "^13.2.1" } }, "ms": { @@ -2755,36 +1676,10 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "nan": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", - "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", "dev": true }, "normalize-package-data": { @@ -2800,13 +1695,10 @@ } }, "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "null-check": { "version": "1.0.0", @@ -2814,65 +1706,28 @@ "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", "dev": true }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, "object-component": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", "dev": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "object.entries": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", + "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", "dev": true, "requires": { - "isobject": "^3.0.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" } }, "on-finished": { @@ -2903,30 +1758,36 @@ "wordwrap": "~0.0.2" } }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "parse-json": { + "p-limit": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "error-ex": "^1.2.0" + "p-limit": "^2.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "parseqs": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", @@ -2946,31 +1807,16 @@ } }, "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", @@ -2978,48 +1824,25 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, "pathval": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", "dev": true }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "through": "~2.3" } }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "picomatch": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", + "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==", "dev": true }, "process-nextick-args": { @@ -3033,6 +1856,15 @@ "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.0.tgz", "integrity": "sha512-OzSf6gcCUQ01byV4BgwyUCswlaQQ6gzXc23aLQWhicvfX9kfsUiUhgt3CCQej8jDnl8/PhGF31JdHX2/MzF3WA==" }, + "ps-tree": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.1.tgz", + "integrity": "sha512-kef7fYYSKVqQffmzTMsVcUD1ObNJMp8sNSmHGlGKsZQyL/ht9MZKk86u0Rd1NhpTOAuhqwKCLLpktwkqz+MF8A==", + "dev": true, + "requires": { + "event-stream": "=3.3.4" + } + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -3052,50 +1884,29 @@ "dev": true }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", "dev": true }, "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true }, "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", "dev": true, "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "unpipe": "1.0.0" } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", @@ -3112,34 +1923,12 @@ } }, "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "remarkable": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.1.tgz", - "integrity": "sha1-qspJchALZqZCpjoQIcpLrBvjv/Y=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.1.1.tgz", + "integrity": "sha512-XXdSXZrQuvqoETj50+JAitxz1UPdt5dupjT6T5nVB+WvjMv2XKYj+s7hPeAVCXvmJrL36O4YYyWlIC3an2ePiQ==", "dev": true, "requires": { - "argparse": "~0.1.15", - "autolinker": "~0.15.0" + "picomatch": "^2.0.4" } }, "remove-trailing-separator": { @@ -3148,18 +1937,6 @@ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, "replace-ext": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", @@ -3173,15 +1950,15 @@ "dev": true }, "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "requirejs": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.1.22.tgz", - "integrity": "sha1-3Xj9LTQYDA1ixyS1uK68BmTgNm8=", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", + "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==", "dev": true }, "requires-port": { @@ -3190,22 +1967,10 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, "rfdc": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.2.tgz", - "integrity": "sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz", + "integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug==", "dev": true }, "rimraf": { @@ -3218,9 +1983,9 @@ }, "dependencies": { "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -3239,25 +2004,16 @@ "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=", "dev": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "samsam": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", + "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", "dev": true }, "set-blocking": { @@ -3266,146 +2022,22 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", "dev": true }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "sinon": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", + "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", "dev": true, "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "formatio": "1.1.1", + "lolex": "1.3.2", + "samsam": "1.1.2", + "util": ">=0.10.3 <1" } }, "socket.io": { @@ -3506,19 +2138,6 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "source-map-support": { "version": "0.5.10", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", @@ -3535,90 +2154,47 @@ } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", - "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "through": "2" } }, - "spdx-license-ids": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", - "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "dev": true }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "~0.1.1" + } + }, "streamroller": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha1-odG3z4PTmvsNYwSaWsv5NJO99ks=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-1.0.6.tgz", + "integrity": "sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg==", "dev": true, "requires": { - "date-format": "^1.2.0", - "debug": "^3.1.0", - "mkdirp": "^0.5.1", - "readable-stream": "^2.3.0" + "async": "^2.6.2", + "date-format": "^2.0.0", + "debug": "^3.2.6", + "fs-extra": "^7.0.1", + "lodash": "^4.17.14" }, "dependencies": { "debug": { @@ -3631,22 +2207,39 @@ } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "string_decoder": { @@ -3667,19 +2260,36 @@ "ansi-regex": "^2.0.0" } }, - "strip-bom": { + "supports-color": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "temp-fs": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/temp-fs/-/temp-fs-0.9.9.tgz", + "integrity": "sha1-gHFzBDeHByDpQxUy/igUNk+IA9c=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "rimraf": "~2.5.2" + }, + "dependencies": { + "rimraf": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + } } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { @@ -3707,52 +2317,19 @@ "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "^7.0.0" } }, - "traverse": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "dev": true }, "ts-node": { @@ -3774,13 +2351,13 @@ "dev": true }, "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, "requires": { "media-typer": "0.3.0", - "mime-types": "~2.1.18" + "mime-types": "~2.1.24" } }, "typescript": { @@ -3789,188 +2366,61 @@ "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==", "dev": true }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha1-n+FTahCmZKZSZqHjzPhf02MCvJw=", "dev": true }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true - }, - "underscore.string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", - "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=", + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "useragent": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "dev": true, "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } + "lru-cache": "4.1.x", + "tmp": "0.0.x" } }, - "unzipper": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.9.7.tgz", - "integrity": "sha512-icFtME1RD648v+cjfcUWoky4bHbMTi8nk06nGxH77EPYyEeKaTgT3nRHM/dQ3znGXLi3+OlhYo86zQzNBRdNhw==", + "util": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.0.tgz", + "integrity": "sha512-pPSOFl7VLhZ7LO/SFABPraZEEurkJUWSMn3MuA/r3WQZc+Z1fqou2JqLSOZbCLl73EUIxuUVX8X4jkX2vfJeAA==", "dev": true, "requires": { - "big-integer": "^1.6.17", - "binary": "~0.3.0", - "bluebird": "~3.4.1", - "buffer-indexof-polyfill": "~1.0.0", - "duplexer2": "~0.1.4", - "fstream": "~1.0.10", - "listenercount": "~1.0.1", - "readable-stream": "~2.3.6", - "setimmediate": "~1.0.4" + "inherits": "2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "object.entries": "^1.1.0", + "safe-buffer": "^5.1.2" }, "dependencies": { - "bluebird": { - "version": "3.4.7", - "resolved": "http://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } } } }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "useragent": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", - "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", - "dev": true, - "requires": { - "lru-cache": "4.1.x", - "tmp": "0.0.x" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -3983,16 +2433,6 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "vinyl": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", @@ -4032,9 +2472,9 @@ } }, "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wordwrap": { @@ -4044,13 +2484,40 @@ "dev": true }, "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "wrappy": { @@ -4083,9 +2550,9 @@ "dev": true }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yallist": { @@ -4095,33 +2562,31 @@ "dev": true }, "yargs": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.0.2.tgz", - "integrity": "sha1-EVuX3xMhgj6Lhkjolox4JSEiH2c=", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "dev": true, "requires": { - "camelcase": "^3.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } }, "yeast": { @@ -4136,4 +2601,4 @@ "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==" } } -} +} \ No newline at end of file diff --git a/web/package.json b/web/package.json index 08f3cbeaa7bf72c151f35a4d49f9f0487ccda6ed..fe57e635c7f49babc1464f50804f2ae573932a0e 100644 --- a/web/package.json +++ b/web/package.json @@ -21,8 +21,8 @@ "chai": "^4.2.0", "google-closure-compiler": "^20171203.0.0", "html2canvas": "^1.0.0-alpha.12", - "karma": "^3.1.4", - "karma-browserstack-launcher": "^1.4.0", + "karma": "^4.2.0", + "karma-browserstack-launcher": "^1.5.1", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", "karma-edge-launcher": "^0.4.2", @@ -36,7 +36,7 @@ "karma-safari-launcher": "^1.0.0", "karma-teamcity-reporter": "^1.1.0", "mocha": "^5.2.0", - "modernizr": "^3.6.0", + "modernizr": "^3.7.1", "typescript": "^3.2.2" }, "scripts": { diff --git a/web/source/build.sh b/web/source/build.sh index 426fe42c5e204259db7c92e2b52739b245ac1426..8319212947546ee7d2553cd421c6ce0ca03b230d 100755 --- a/web/source/build.sh +++ b/web/source/build.sh @@ -46,14 +46,21 @@ EMBED_TARGET=( "keyman.js" ) echo "Node.js + dependencies check" npm install --no-optional + +# Variables for the LMLayer +PREDICTIVE_TEXT_SOURCE="../../common/predictive-text/unit_tests/in_browser/resources/models/simple-trie.js" +PREDICTIVE_TEXT_OUTPUT="../testing/prediction-ui/simple-en-trie.js" + # Ensure that the LMLayer compiles properly, readying the build product for comsumption by KMW. cd ../../common/predictive-text/ echo "" echo "Compiling the Language Modeling layer module..." ./build.sh || fail "Failed to compile the language modeling layer module." +cd ../../web/source +echo "Copying ${PREDICTIVE_TEXT_SOURCE} to ${PREDICTIVE_TEXT_OUTPUT}" +cp "${PREDICTIVE_TEXT_SOURCE}" "${PREDICTIVE_TEXT_OUTPUT}" || fail "Failed to copy predictive text model" echo "Language Modeling layer compilation successful." echo "" -cd ../../web/source if [ $? -ne 0 ]; then fail "Build environment setup error detected! Please ensure Node.js is installed!" @@ -264,7 +271,7 @@ while [[ $# -gt 0 ]] ; do ;; -debug_embedded) set_default_vars - BUILD_EMBED=false + BUILD_EMBED=true BUILD_UI=false BUILD_COREWEB=false BUILD_FULLWEB=false @@ -420,7 +427,11 @@ if [ $BUILD_UI = true ]; then fi if [ $BUILD_DEBUG_EMBED = true ]; then + # We currently have an issue with sourcemaps for minified versions. + # We should use the unminified one instead for now. + cp $EMBED_OUTPUT_NO_MINI/keyman.js $EMBED_OUTPUT/keyman.js # Copy the sourcemap. - cp $INTERMEDIATE/keyman.js.map $EMBED_OUTPUT/keyman.js.map + cp $EMBED_OUTPUT_NO_MINI/keyman.js.map $EMBED_OUTPUT/keyman.js.map echo Uncompiled embedded application saved as keyman.js fi + diff --git a/web/source/dom/contentEditable.ts b/web/source/dom/contentEditable.ts index 0a858fd2be4fdf129d53af7d73bd738fea85d6a9..d6713cadeeb8691c433dd04b3ebfe64e4f08a8b4 100644 --- a/web/source/dom/contentEditable.ts +++ b/web/source/dom/contentEditable.ts @@ -190,7 +190,7 @@ namespace com.keyman.dom { var n = start.node.ownerDocument.createTextNode(s); let range = this.root.ownerDocument.createRange(); - range.setStart(start.node, s.length); + range.setStart(start.node, start.offset); range.collapse(true); range.insertNode(n); } @@ -207,5 +207,35 @@ namespace com.keyman.dom { } Lsel.collapseToEnd(); } + + protected setTextAfterCaret(s: string) { + if(!this.hasSelection()) { + return; + } + + let caret = this.getCarets().end; + let delta = s._kmwLength(); + let Lsel = this.root.ownerDocument.getSelection(); + + if(delta == 0) { + return; + } + + // This is designed explicitly for use in direct-setting operations; deadkeys + // will be handled after this method. + + if(caret.node.nodeType == 3) { + let textStart = caret.node; + textStart.replaceData(caret.offset, textStart.length, s); + } else { + // Create a new text node - empty control + var n = caret.node.ownerDocument.createTextNode(s); + + let range = this.root.ownerDocument.createRange(); + range.setStart(caret.node, caret.offset); + range.collapse(true); + range.insertNode(n); + } + } } } \ No newline at end of file diff --git a/web/source/dom/designIFrame.ts b/web/source/dom/designIFrame.ts index 53e4ae95a9b4e0dfd49c2d489e06b5ef89a30a18..b20b2cdbff937dba6f1e4af19611786f1f3ac658 100644 --- a/web/source/dom/designIFrame.ts +++ b/web/source/dom/designIFrame.ts @@ -196,7 +196,7 @@ namespace com.keyman.dom { var n = this.doc.createTextNode(s); let range = this.doc.createRange(); - range.setStart(start.node, s.length); + range.setStart(start.node, start.offset); range.collapse(true); range.insertNode(n); } @@ -214,6 +214,36 @@ namespace com.keyman.dom { Lsel.collapseToEnd(); } + protected setTextAfterCaret(s: string) { + if(!this.hasSelection()) { + return; + } + + let caret = this.getCarets().end; + let delta = s._kmwLength(); + let Lsel = this.doc.getSelection(); + + if(delta == 0) { + return; + } + + // This is designed explicitly for use in direct-setting operations; deadkeys + // will be handled after this method. + + if(caret.node.nodeType == 3) { + let textStart = caret.node; + textStart.replaceData(caret.offset, textStart.length, s); + } else { + // Create a new text node - empty control + var n = caret.node.ownerDocument.createTextNode(s); + + let range = this.root.ownerDocument.createRange(); + range.setStart(caret.node, caret.offset); + range.collapse(true); + range.insertNode(n); + } + } + /** * Function saveProperties * Scope Private diff --git a/web/source/dom/input.ts b/web/source/dom/input.ts index 46cab7750642d898a60d92cec3905dedb16bfe98..d432f5ce998f7a787ad5356736dcf27402129fcc 100644 --- a/web/source/dom/input.ts +++ b/web/source/dom/input.ts @@ -92,6 +92,13 @@ namespace com.keyman.dom { this.setCaret(newCaret); } + protected setTextAfterCaret(s: string) { + let c = this.getCaret(); + + this.root.value = this.getTextBeforeCaret() + s; + this.setCaret(c); + } + getTextAfterCaret(): string { this.getCaret(); return this.getText()._kmwSubstring(this.processedSelectionEnd); diff --git a/web/source/dom/textarea.ts b/web/source/dom/textarea.ts index aa9e539c3189865b4d427ee706e9be34db3c9dc8..de9d82027f9f08454fa5350b11b99bcec4c3de3b 100644 --- a/web/source/dom/textarea.ts +++ b/web/source/dom/textarea.ts @@ -99,6 +99,13 @@ namespace com.keyman.dom { this.setCaret(newCaret); } + protected setTextAfterCaret(s: string) { + let c = this.getCaret(); + + this.root.value = this.getTextBeforeCaret() + s; + this.setCaret(c); + } + getTextAfterCaret(): string { this.getCaret(); return this.getText()._kmwSubstring(this.processedSelectionEnd); diff --git a/web/source/dom/touchAlias.ts b/web/source/dom/touchAlias.ts index ca7941a4a9bcf113cd25a312e270fa6c70ac6b3a..e64948235b47a1ea44dba2e788f5e3a46b787bd1 100644 --- a/web/source/dom/touchAlias.ts +++ b/web/source/dom/touchAlias.ts @@ -59,5 +59,9 @@ namespace com.keyman.dom { this.adjustDeadkeys(s._kmwLength()); this.root.setTextBeforeCaret(this.root.getTextBeforeCaret() + s); } + + protected setTextAfterCaret(s: string) { + this.root.setText(this.getTextBeforeCaret() + s, this.getTextBeforeCaret()._kmwLength()); + } } } \ No newline at end of file diff --git a/web/source/dom/touchAliasElement.ts b/web/source/dom/touchAliasElement.ts index a0919cc530decf64d5648de8039e4d1ac101b995..448368ba06759a927c0fb8d4d58a5f1400432d60 100644 --- a/web/source/dom/touchAliasElement.ts +++ b/web/source/dom/touchAliasElement.ts @@ -295,7 +295,7 @@ namespace com.keyman.dom { this.setText(textValue, null); } - private setText(t?: string, cp?: number): void { + setText(t?: string, cp?: number): void { var tLen=0; var t1: string, t2: string; diff --git a/web/source/dom/uiTouchHandlerBase.ts b/web/source/dom/uiTouchHandlerBase.ts new file mode 100644 index 0000000000000000000000000000000000000000..78a0e82b10e38e39e2cabab6beaba9714e90bd86 --- /dev/null +++ b/web/source/dom/uiTouchHandlerBase.ts @@ -0,0 +1,457 @@ +namespace com.keyman.dom { + /** + * This class was added to facilitate scroll handling for overflow-x elements, though it could + * be extended in the future to accept overflow-y if needed. + * + * This is necessary because of the OSK's need to use `.preventDefault()` for stability; that + * same method blocks native handling of overflow scrolling for touch browsers. + */ + class ScrollState { + // While we don't currently track y-coordinates here, the class is designed + // to permit tracking them with minimal extra effort if we ever decide to do so. + x: number; + totalLength = 0; + + // The amount of coordinate 'noise' allowed during a scroll-enabled touch allowed + // before interpreting the currently-ongoing touch command as having scrolled. + static readonly HAS_SCROLLED_FUDGE_FACTOR = 10; + + constructor(touch: Touch) { + this.x = touch.pageX; + + this.totalLength = 0; + } + + updateTo(touch: Touch): {deltaX: number} { + let x = this.x; + this.x = touch.pageX; + + let deltas = {deltaX: this.x - x}; + this.totalLength += Math.abs(deltas.deltaX); + + return deltas; + } + + public get hasScrolled(): boolean { + // Allow an accidental fudge-factor for overflow element noise during a touch, but not much. + return this.totalLength > ScrollState.HAS_SCROLLED_FUDGE_FACTOR; + } + } + + export abstract class UITouchHandlerBase { + private rowClassMatch: string; + private selectedTargetMatch: string; + private baseElement: HTMLElement; + + private touchX: number; + private touchY: number; + private touchCount: number; + + private currentTarget: Target; + + private scrollTouchState: ScrollState; + private pendingTarget: Target; + private popupBaseTarget: Target; + + constructor(baseElement: HTMLElement, rowClassMatch: string, selectedTargetMatch: string) { + this.baseElement = baseElement; + this.rowClassMatch = rowClassMatch; + this.selectedTargetMatch = selectedTargetMatch; + } + + /** + * Finds the internally-preferred target element or submenu target element. + * @param e The DOM element that actually received the touch event. + * May be parent, child, or the actually-desired element itself. + */ + abstract findTargetFrom(e: HTMLElement): Target; + + /** + * Highlights the target element as visual feedback representing + * a pending touch. + * @param t The `Target` to highlight + * @param state `true` to apply highlighting, `false` to remove it. + */ + protected abstract highlight(t: Target, state: boolean): void; + + /** + * Called whenever the touch-handling analysis determines that the Target has been selected + * @param t The `Target` to activate/execute. + */ + protected abstract select(t: Target): void; + + /** + * Requests info on whether or not the indicated `Target` has subkeys or a submenu. + * @param t A `Target`. + */ + protected abstract hasSubmenu(t: Target): boolean; + + /** + * Indicates that the user is maintaining a `Touch` on the specified `Target`. + * Popups and-or longpress menus may be appropriate. + * @param t The `Target` being held. + */ + protected abstract hold(t: Target): void; + + /** + * Signals that any popup elements (previews, subkey views, etc) should be cancelled. + */ + protected abstract clearHolds(): void; + + /** + * Requests a boolean indicating whether or not the UI is currently displaying any input-blocking popup elements. + * Embedded mode should return `true` when the app is displaying popup menus. + */ + protected abstract hasModalPopup(): boolean; + + /** + * Designed to support highlighting of prepended base keys on phone form-factor subkey menus. + * @param target The base element with a potential subkey menu alias. + * @returns The aliased submenu version of the `Target`, or the original `Target` if no alias exists. + */ + protected abstract dealiasSubTarget(target: Target): Target; + + /** + * Should return true whenever a 'native'-mode submenu (or subkey) display is active. + */ + protected abstract isSubmenuActive(): boolean; + + /** + * For 'native' mode - requests that the submenu for the indicated `Target` be instantly displayed. + * @param target The base element with a potential submenu + */ + protected abstract displaySubmenuFor(target: Target); + + /** + * Identify the key nearest to (but NOT under) the touch point if at the end of a key row, + * but return null more than about 0.6 key width from the nearest key. + * + * @param {Event} e touch event + * @param {Object} t HTML object at touch point + * @param {boolean} omitCurrent Omits any target directly under the touch point. + * @return {Object} nearest key to touch point + * + **/ + private findTargetFromTouch(e: TouchEvent, t: HTMLElement, forMove: boolean): Target { + let touchList = forMove ? e.touches : e.changedTouches; + + if((!e) || (typeof touchList == 'undefined') + || (touchList.length == 0)) { + return null; + } + + // Get touch point on screen + var x = touchList[0].pageX; + + // Get the UI row beneath touch point (SuggestionBanner div, 'kmw-key-row' if OSK, ...) + while(t && t.className !== undefined && t.className.indexOf(this.rowClassMatch) < 0) { + t = t.parentNode; + } + if(!t) { + return null; + } + + // Find minimum distance from any key + var k: number, bestMatch=0, dxMax=24, dxMin=100000, x1: number, x2: number; + for(k = 0; k < t.childNodes.length; k++) { + let childNode = t.childNodes[k] as HTMLElement; + + if(this.isInvalidTarget(this.findTargetFrom(childNode))) { + continue; + } + + x1 = childNode.offsetLeft; + x2 = x1 + childNode.offsetWidth; + + // If it lies completely to the right and is the closest so far + let dxRight = x1 - x; + if(dxRight >= 0 && dxRight < dxMin) { + bestMatch = k; + dxMin = dxRight; + } + + // If it lies completely to the left and is the closest so far + let dxLeft = x - x2; + if(dxLeft >= 0 && dxLeft < dxMin) { + bestMatch = k; + dxMin = dxLeft; + } + + // If it is neither completely to the left nor completely to the right, + // it's under the cursor. Stop the search! + if(dxLeft < 0 && dxRight < 0) { + return this.findTargetFrom(childNode); + } + } + + if(dxMin < 100000) { + t = t.childNodes[bestMatch]; + x1 = t.offsetLeft; + x2 = x1 + t.offsetWidth; + + // Limit extended touch area to the larger of 0.6 of the potential target's width and 24 px + if(t.offsetWidth > 40) { + dxMax = 0.6 * t.offsetWidth; + } + + if(((x1 - x) >= 0 && (x1 - x) < dxMax) || ((x - x2) >= 0 && (x - x2) < dxMax)) { + return this.findTargetFrom(t); + } + } + return null; + } + + findBestTarget(e: TouchEvent, forMove?: boolean) { + var eventTarget: HTMLElement; + + if(forMove) { + eventTarget = document.elementFromPoint(e.touches[0].clientX, e.touches[0].clientY) as HTMLElement; + } else { + eventTarget = e.changedTouches[0].target as HTMLElement; + } + + let target = this.findTargetFrom(eventTarget); + + // Should refactor this multi-check a bit for more overall reliability. + if(!target) { + // We didn't find a direct target, so we should look for the closest possible one. + // Filters out invalid targets. + target = this.findTargetFromTouch(e, eventTarget, forMove); + } + + return target; + } + + /** + * Reports whether or not a `Target` should be considered invalid. Needed by the OSK for + * hidden keys. + * @param target A `Target` element to be validated. + */ + protected isInvalidTarget(target: Target): boolean { + return false; + } + + touchStart(e: TouchEvent) { + // Determine the selected Target, manage state. + //this.currentTarget = this.findTargetFrom(e.changedTouches[0].target as HTMLElement); + this.currentTarget = this.findBestTarget(e); + this.touchX = e.changedTouches[0].pageX; + this.touchY = e.changedTouches[0].pageY; + + // If popup stuff, immediately return. + + this.touchCount = e.touches.length; + + if(!this.currentTarget) { + return; + } + + // Establish scroll tracking. + let shouldScroll = (this.currentTarget.clientWidth < this.currentTarget.scrollWidth); + this.scrollTouchState = shouldScroll ? new ScrollState(e.changedTouches[0]) : null; + + // Alright, Target acquired! Now to use it: + + // Highlight the touched key + this.highlight(this.currentTarget,true); + + // If used by the OSK, the special function keys need immediate action + // Add a `checkForImmediates()` to facilitate this. + if(this.pendingTarget) { + this.highlight(this.pendingTarget, false); + this.select(this.pendingTarget); + this.clearHolds(); + // Decrement the number of unreleased touch points to prevent + // sending the keystroke again when the key is actually released + this.touchCount--; + } else { + // If this key has subkey, start timer to display subkeys after delay, set up release + this.hold(this.currentTarget); + } + this.pendingTarget = this.currentTarget; + } + + touchEnd(e: TouchEvent): void { + // Prevent incorrect multi-touch behaviour if native or device popup visible + let t = this.currentTarget; + + if(this.isSubmenuActive() || this.hasModalPopup()) { + // Ignore release if a multiple touch + if(e.touches.length > 0) { + return; + } + + // Cancel (but do not execute) pending key if neither a popup key or the base key + if((t == null) || ((t.id.indexOf('popup') < 0) && (t.id != this.popupBaseTarget.id))) { + this.highlight(this.pendingTarget,false); + this.clearHolds(); + this.pendingTarget = null; + } + } + + // Test if moved off screen (effective release point must be corrected for touch point horizontal speed) + // This is not completely effective and needs some tweaking, especially on Android + var x = e.changedTouches[0].pageX; + var beyondEdge = ((x < 2 && this.touchX > 5) || (x > window.innerWidth - 2 && this.touchX < window.innerWidth - 5)); + + if(this.scrollTouchState) { + beyondEdge = beyondEdge || this.scrollTouchState.hasScrolled; + } + + // Save then decrement current touch count + var tc=this.touchCount; + if(this.touchCount > 0) { + this.touchCount--; + } + + // Process and clear highlighting of pending target + if(this.pendingTarget) { + this.highlight(this.pendingTarget,false); + + // Output character unless moved off key + if(this.pendingTarget.className.indexOf('hidden') < 0 && tc > 0 && !beyondEdge) { + this.select(this.pendingTarget); + } + this.clearHolds(); + this.pendingTarget = null; + // Always clear highlighting of current target on release (multi-touch) + } else { + t = this.findBestTarget(e); + + if(t) { + this.highlight(t,false); + } + } + } + + /** + * OSK touch move event handler + * + * @param {Event} e touch move event object + * + **/ + touchMove(e: TouchEvent): void { + let keyman = com.keyman.singleton; + let util = keyman.util; + + e.preventDefault(); + e.cancelBubble=true; + + if(typeof e.stopImmediatePropagation == 'function') { + e.stopImmediatePropagation(); + } else if(typeof e.stopPropagation == 'function') { + e.stopPropagation(); + } + + // Do not attempt to support reselection of target key for overlapped keystrokes + if(e.touches.length > 1 || this.touchCount == 0) { + return; + } + + if(this.currentTarget && this.scrollTouchState != null) { + let deltaX = this.scrollTouchState.updateTo(e.changedTouches[0]).deltaX; + this.currentTarget.scrollLeft -= window.devicePixelRatio * deltaX; + + return; + } + + // Get touch position + var y=typeof e.touches == 'object' ? e.touches[0].clientY : e.clientY; + + // Move target key and highlighting + var key0 = this.pendingTarget, + key1 = this.findBestTarget(e, true); // For the OSK, this ALSO gets subkeys. + + // If option should not be selectable, how do we re-target? + + + // Do not move over keys if device popup visible + if(this.hasModalPopup()) { + if(key1 == null) { + if(key0) { + this.highlight(key0,false); + } + this.pendingTarget=null; + } else { + if(key1 == this.popupBaseTarget) { + if(!util.hasClass(key1, this.selectedTargetMatch)) { + this.highlight(key1,true); + } + this.pendingTarget = key1; + } else { + if(key0) { + this.highlight(key0,false); + } + this.pendingTarget = null; + } + } + return; + } + + // Use the popup duplicate of the base key if a phone with a visible popup array + key1 = this.dealiasSubTarget(key1); + + // Identify current touch position (to manage off-key release) + this.currentTarget = key1; + + // Clear previous key highlighting + if(key0 && key1 && key1 !== key0) { + this.highlight(key0,false); + } + + // Code below directly related to subkeys should only be triggered within 'native' mode. + // The embedded version instead passes info to the apps to produce their own subkeys in-app. + + // If popup is visible, need to move over popup, not over main keyboard + if(key1 && this.hasSubmenu(key1)) { + //this.highlightSubKeys(key1,x,y); + + // Native-mode: show popup keys immediately if touch moved up towards key array (KMEW-100, Build 353) + if(!keyman.isEmbedded && (this.touchY-y > 5) && !this.isSubmenuActive()) { + // Instantly show the submenu. + this.displaySubmenuFor(key1); + } + + // Once a subkey array is displayed, do not allow changing the base key. + // Keep that array visible and accept no other options until the touch ends. + if(key1 && key1.id.indexOf('popup') < 0 && key1 != this.popupBaseTarget) { // TODO: reliant on 'popup' in .id + return; + } + + // Highlight the base key on devices that do not append it to the subkey array. + if(key1 && key1 == this.popupBaseTarget && key1.className.indexOf(this.selectedTargetMatch) < 0) { + this.highlight(key1,true); + } + // Cancel touch if moved up and off keyboard, unless popup keys visible + } else { + let base = this.baseElement; + let top = (base.offsetParent as HTMLElement).offsetTop + base.offsetTop; + let height = base.offsetHeight; + let yMin = Math.max(5, top - 0.25 * height); + let yMax = (top + height) + 0.25 * height; + if(key0 && (e.touches[0].pageY < yMin || e.touches[0].pageY > yMax)) { + this.highlight(key0,false); + this.clearHolds(); + this.pendingTarget = null; + } + } + + // Replace the target key, if any, by the new target key + // Do not replace a null target, as that indicates the key has already been released + if(key1 && this.pendingTarget) { + this.pendingTarget = key1; + } + + if(this.pendingTarget) { + if(key1 && (key0 != key1 || key1.className.indexOf(this.selectedTargetMatch) < 0)) { + this.highlight(key1,true); + } + } + + if(key0 && key1 && (key1 != key0) && (key1.id != '')) { + // Display the touch-hold keys (after a pause) + this.hold(key1); + } + } + } +} \ No newline at end of file diff --git a/web/source/dom/utils.ts b/web/source/dom/utils.ts index 92a0486102697ed6ddc695121d444c33791e5cde..0d6c589331943bad031b597c1eb221471d9b2ab6 100644 --- a/web/source/dom/utils.ts +++ b/web/source/dom/utils.ts @@ -24,6 +24,12 @@ namespace com.keyman.dom { Lobj = Lobj.offsetParent as HTMLElement; Lcurleft += Lobj.offsetLeft; } + + // On mobile devices, the OSK uses 'fixed' - this requires some extra offset work to handle. + if(Lobj.style.position == 'fixed') { + let Ldoc = Lobj.ownerDocument; + Lcurleft += Ldoc.scrollingElement.scrollLeft; + } } // Correct position if element is within a frame (but not if the controller is in document within that frame) // We used to reference a KMW state variable `this.keyman._MasterDocument`, but it was only ever set to `window.document`. @@ -58,6 +64,12 @@ namespace com.keyman.dom { Lobj = Lobj.offsetParent as HTMLElement; Lcurtop += Lobj.offsetTop; } + + // On mobile devices, the OSK uses 'fixed' - this requires some extra offset work to handle. + if(Lobj.style.position == 'fixed') { + let Ldoc = Lobj.ownerDocument; + Lcurtop += Ldoc.scrollingElement.scrollTop; + } } // Correct position if element is within a frame (but not if the controller is in document within that frame) diff --git a/web/source/kmwbase.ts b/web/source/kmwbase.ts index 1acdf8e7ec45aa7b196d8676573c8be6cf9e77a0..e1c0cf7d8c5df15e278918d9a9ff72432bdf1c07 100644 --- a/web/source/kmwbase.ts +++ b/web/source/kmwbase.ts @@ -578,7 +578,12 @@ namespace com.keyman { // Functions that might be added later ['beepKeyboard']: () => void; - ['oninserttext']: (dn: number, s: string) => void; + /** + * @param {number} dn Number of pre-caret characters to delete + * @param {string} s Text to insert + * @param {number=} dr Number of post-caret characters to delete + */ + ['oninserttext']: (dn: number, s: string, dr?: number) => void; /** * Create copy of the OSK that can be used for embedding in documentation or help diff --git a/web/source/kmwdevice.ts b/web/source/kmwdevice.ts index 5b21c4cd550e7a7bca4cf5f7d27c9f9c5572d643..6be109c4d929563652dce1dcf9465c4ac89b9db3 100644 --- a/web/source/kmwdevice.ts +++ b/web/source/kmwdevice.ts @@ -95,9 +95,12 @@ namespace com.keyman { this.formFactor='tablet'; } + // Test for potential Chrome emulation on Windows or macOS X (used only in next if-check) + let possibleChromeEmulation = navigator.platform == 'Win32' || navigator.platform == 'MacIntel' + // alert(sxx+'->'+device.formFactor); - // Check for phony iOS devices (Win32 test excludes Chrome touch emulation on Windows)! - if(this.OS == 'iOS' && !('ongesturestart' in window) && navigator.platform != 'Win32') { + // Check for phony iOS devices (but don't undo for Chrome emulation used during development) + if(this.OS == 'iOS' && !('ongesturestart' in window) && !possibleChromeEmulation) { this.OS='Android'; } diff --git a/web/source/kmwdom.ts b/web/source/kmwdom.ts index cce4615d53f07f7e36f24875209d4fb74bfb04fd..ad4c05f533b5f953c941c1d1ea31d21da38cc0de 100644 --- a/web/source/kmwdom.ts +++ b/web/source/kmwdom.ts @@ -297,9 +297,14 @@ namespace com.keyman { * Note that the 'kmw-disabled' property is managed by the MutationObserver and by the surface API calls. */ disableInputElement(Pelem: HTMLElement, isAlias?: boolean) { + if(!Pelem) { + return; + } + var baseElement = isAlias ? Pelem['base'] : Pelem; // Do NOT test for pre-disabledness - we also use this to fully detach without officially 'disabling' via kmw-disabled. - if(Pelem instanceof Pelem.ownerDocument.defaultView.HTMLIFrameElement) { + if((Pelem.ownerDocument.defaultView && Pelem instanceof Pelem.ownerDocument.defaultView.HTMLIFrameElement) || + Pelem instanceof HTMLIFrameElement) { this._DetachFromIframe(Pelem); } else { var cnIndex = baseElement.className.indexOf('keymanweb-font'); @@ -335,7 +340,6 @@ namespace com.keyman { var lastElem = this.getLastActiveElement(); if(lastElem == Pelem || lastElem == Pelem['kmw_ip']) { this.clearLastActiveElement(); - this.keyman.keyboardManager.setActiveKeyboard(this.keyman.globalKeyboard, this.keyman.globalLanguageCode); this.keyman.osk._Hide(false); } @@ -378,7 +382,7 @@ namespace com.keyman { if(this.isKMWInput(Pelem)) { if(!this.isKMWDisabled(Pelem)) { - if(touchable) { + if(touchable && !this.keyman.isEmbedded) { this.enableTouchElement(Pelem); } else { this.enableInputElement(Pelem); @@ -445,11 +449,17 @@ namespace com.keyman { } } else if(x instanceof x.ownerDocument.defaultView.HTMLIFrameElement && !touchable) { // Do not allow iframe attachment if in 'touch' mode. try { - if(x.contentWindow.document) { // Only allow attachment if the iframe's internal document is valid. - return true; - } + if(x.contentWindow) { + if(x.contentWindow.document) { // Only allow attachment if the iframe's internal document is valid. + return true; + } + } // else nothing? + } + catch(err) { + /* Do not attempt to access iframes outside this site */ + console.warn("Error during attachment to / detachment from iframe: "); + console.warn(err); } - catch(err) { /* Do not attempt to access iframes outside this site */ } } else if(x.isContentEditable && !touchable) { // Only allow contentEditable attachment outside of 'touch' mode. return true; } @@ -1172,7 +1182,14 @@ namespace com.keyman { // Allow external focusing KMEW-123 if(arguments.length > 1 && setFocus) { if(this.keyman.util.device.touchable) { - this.keyman.touchAliasing.setFocus(); + var tEvent = { + clientX: 0, + clientY: 0, + target: e as HTMLElement + }; + + // Kinda hacky, but gets the job done. + (this.keyman.touchAliasing as DOMTouchHandlers).setFocusWithTouch(tEvent); } else { this.focusLastActiveElement(); } diff --git a/web/source/kmwdomevents.ts b/web/source/kmwdomevents.ts index dbebbbfab292b4255df6405dd7386a00e5feee51..cb6cdeafc04751756a66fda9401c0f955c5d0256 100644 --- a/web/source/kmwdomevents.ts +++ b/web/source/kmwdomevents.ts @@ -296,6 +296,11 @@ namespace com.keyman { } else if(!blockGlobalChange) { this.keyman.keyboardManager.setActiveKeyboard(this.keyman.globalKeyboard, this.keyman.globalLanguageCode); } + + // Now that we've fully entered the new context, invalidate the context so we can generate initial predictions from it. + if(this.keyman.modelManager) { + this.keyman.modelManager.invalidateContext(); + } } /** @@ -483,8 +488,6 @@ namespace com.keyman { * */ setFocus: (e?: TouchEvent|MSPointerEvent) => void = function(this: DOMTouchHandlers, e?: TouchEvent|MSPointerEvent): void { - var osk = this.keyman.osk; - DOMEventHandlers.states.setFocusTimer(); var tEvent: { @@ -493,8 +496,8 @@ namespace com.keyman { target?: EventTarget; }; - if(dom.Utils.instanceof(e, "TouchEvent")) { - tEvent=(e as TouchEvent).touches[0]; + if(e && dom.Utils.instanceof(e, "TouchEvent")) { + tEvent=(e as TouchEvent).touches[0]; } else { // Allow external code to set focus and thus display the OSK on touch devices if required (KMEW-123) tEvent={clientX:0, clientY:0} // Will usually be called from setActiveElement, which should define DOMEventHandlers.states.lastActiveElement @@ -504,16 +507,22 @@ namespace com.keyman { } else { tEvent.target = this.keyman.domManager.sortedInputs[0]['kmw_ip']; } - } + } + + this.setFocusWithTouch(tEvent); + }.bind(this); + setFocusWithTouch(tEvent: {clientX: number, clientY: number, target?: EventTarget}) { + var osk = this.keyman.osk; + var touchX=tEvent.clientX,touchY=tEvent.clientY; var tTarg=tEvent.target as HTMLElement; var scroller: HTMLElement; // Identify the scroller element - if(dom.Utils.instanceof(tTarg, "HTMLSpanElement")) { + if(tTarg && dom.Utils.instanceof(tTarg, "HTMLSpanElement")) { scroller=tTarg.parentNode as HTMLElement; - } else if(tTarg.className != null && tTarg.className.indexOf('keymanweb-input') >= 0) { + } else if(tTarg && (tTarg.className != null && tTarg.className.indexOf('keymanweb-input') >= 0)) { scroller=tTarg.firstChild as HTMLElement; } else { scroller=tTarg; @@ -548,7 +557,7 @@ namespace com.keyman { } // If clicked on DIV, set caret to end of text - if(dom.Utils.instanceof(tTarg, "TouchAliasElement")) { + if(tTarg && dom.Utils.instanceof(tTarg, "TouchAliasElement")) { var x,cp; x=dom.Utils.getAbsoluteX(scroller.firstChild as HTMLElement); if(target.dir == 'rtl') { @@ -650,7 +659,7 @@ namespace com.keyman { if(this._CommonFocusHelper(target)) { return; } - }.bind(this); + } /** * Close OSK and remove simulated caret on losing focus @@ -808,4 +817,4 @@ namespace com.keyman { } } } -} \ No newline at end of file +} diff --git a/web/source/kmwembedded.ts b/web/source/kmwembedded.ts index 3e98bd613ca3eac338c975d3cdabfe943625737d..0edfc4fbf73d4c003f25d80a4e83f5694f1de6b3 100644 --- a/web/source/kmwembedded.ts +++ b/web/source/kmwembedded.ts @@ -20,18 +20,19 @@ namespace com.keyman.osk { * * @param {Object} key base key element */ - VisualKeyboard.prototype.touchHold = function(this: VisualKeyboard, key: KeyElement) { - let util = com.keyman.singleton.util; + VisualKeyboard.prototype.touchHold = function(this: VisualKeyboard, key: KeyElement) { + let util = com.keyman.singleton.util; if(key['subKeys'] && (typeof(window['oskCreatePopup']) == 'function')) { - var xBase=dom.Utils.getAbsoluteX(key)-dom.Utils.getAbsoluteX(this.kbdDiv)+key.offsetWidth/2, - yBase=dom.Utils.getAbsoluteY(key)-dom.Utils.getAbsoluteY(this.kbdDiv); + let bannerHeight : number = com.keyman.singleton.osk.getBannerHeight(); + var xBase = dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(this.kbdDiv) + key.offsetWidth/2, + yBase = dom.Utils.getAbsoluteY(key) /*- dom.Utils.getAbsoluteY(this.kbdDiv)*/ /*+ bannerHeight*/; if(util.device.formFactor == 'phone') { this.prependBaseKey(key); } this.popupBaseKey = key; - this.popupPending=true; + this.popupPending=true; window['oskCreatePopup'](key['subKeys'], xBase, yBase, key.offsetWidth, key.offsetHeight); } }; @@ -76,8 +77,10 @@ namespace com.keyman.osk { } if(on && (typeof showPreview == 'function')) { - var xBase=dom.Utils.getAbsoluteX(key)-dom.Utils.getAbsoluteX(this.kbdDiv)+key.offsetWidth/2, - yBase=dom.Utils.getAbsoluteY(key)-dom.Utils.getAbsoluteY(this.kbdDiv), kc; + let bannerHeight : number = com.keyman.singleton.osk.getBannerHeight(); + var xBase = dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(this.kbdDiv) + key.offsetWidth/2, + yBase = dom.Utils.getAbsoluteY(key) /*- dom.Utils.getAbsoluteY(this.kbdDiv) + bannerHeight*/, + kc; // Find key text element for(var i=0; i= 0 && key.id.indexOf('K_SPACE') < 0) { - showPreview(xBase,yBase,key.offsetWidth,key.offsetHeight,kc.innerHTML); + showPreview(xBase, yBase, key.offsetWidth, key.offsetHeight, kc.innerHTML); } } else if(!on && (typeof clearPreview == 'function')) { if(this.touchCount == 0 || key == null) { @@ -107,80 +110,24 @@ namespace com.keyman.osk { } }; - /** - * Adjust the absolute height of each keyboard element after a rotation - modified for KMEI, 13/11/14 - * - **/ - VisualKeyboard.prototype.adjustHeights = function(this: VisualKeyboard): boolean { - let keyman = com.keyman.singleton; - let oskManager = keyman.osk; - let _Box = oskManager._Box; - let util = keyman.util; - let device = util.device; - - if(!_Box || !this.kbdDiv || !this.kbdDiv.firstChild || !this.kbdDiv.firstChild.firstChild.childNodes) { - return false; - } + SuggestionManager.prototype.platformHold = function(this: SuggestionManager, suggestionObj: BannerSuggestion, isCustom: boolean) { + // Parallels VisualKeyboard.prototype.touchHold, but for predictive suggestions instead of keystrokes. + let suggestionEle = suggestionObj.div; - var layers=this.kbdDiv.firstChild.childNodes, - nRows=layers[0].childNodes.length, - rowHeight=Math.floor(oskManager.getKeyboardHeight()/(nRows == 0 ? 1 : nRows)), - nLayer,nRow,rs,keys,nKeys,nKey,key,ks,j,pad=4,fs=1.0; + // Need to know if it's a option or not! - if(device.OS == 'Android' && 'devicePixelRatio' in window) { - rowHeight = rowHeight/window.devicePixelRatio; - } - let oskHeight : number = nRows*rowHeight; - - var b: HTMLElement = _Box, bs=b.style; - bs.height=bs.maxHeight=(oskHeight+3)+'px'; - b = b.childNodes.item(1).firstChild; - bs=b.style; - bs.height=bs.maxHeight=(oskHeight+3)+'px'; - pad = Math.round(0.15*rowHeight); - - var resizeLabels=(device.OS == 'iOS' && device.formFactor == 'phone' && util.landscapeView()); - - for(nLayer=0;nLayer layers[nLayer]).style.height=(oskManager.getKeyboardHeight()+3)+'px'; - - for(nRow=0; nRow layers[nLayer].childNodes[nRow]).style; - rs.bottom=(nRows-nRow-1)*rowHeight+'px'; - rs.maxHeight=rs.height=rowHeight+'px'; - keys=layers[nLayer].childNodes[nRow].childNodes; - nKeys=keys.length; - for(nKey=0;nKey 0)) { - key.childNodes[0].style.fontSize='6px'; - } - } - } - } + var xBase = dom.Utils.getAbsoluteX(suggestionEle) - dom.Utils.getAbsoluteX(suggestionEle.parentElement) + suggestionEle.offsetWidth/2, + yBase = dom.Utils.getAbsoluteY(suggestionEle) - dom.Utils.getAbsoluteY(suggestionEle.parentElement); - return true; - }; + window['suggestionPopup'](suggestionObj.suggestion, isCustom, xBase, yBase, suggestionEle.offsetWidth, suggestionEle.offsetHeight); + } } namespace com.keyman.text { let nativeDefaultKeyOutput = Processor.prototype.defaultKeyOutput; // Overrides the 'native'-mode implementation with in-app friendly defaults prioritized over 'native' defaults. - Processor.prototype.defaultKeyOutput = function(this: Processor, Lkc: KeyEvent, keyShiftState: number, usingOSK: boolean): string { + Processor.prototype.defaultKeyOutput = function(this: Processor, Lkc: KeyEvent, keyShiftState: number, usingOSK: boolean, disableDOM: boolean): string { let keyman = com.keyman.singleton; // Note: this assumes Lelem is properly attached and has an element interface. @@ -193,8 +140,12 @@ namespace com.keyman.text { if (code == Codes.keyCodes.K_SPACE) { return ' '; } else if (code == Codes.keyCodes.K_BKSP) { - keyman['interface'].defaultBackspace(); - return ''; + if(!disableDOM) { + keyman['interface'].defaultBackspace(); + return ''; + } else { + return '\b'; + } } else if (code == Codes.keyCodes.K_oE2) { // Using defaults of English US layout for the 102nd key if (Lkc.Lmodifiers == Codes.modifierCodes['SHIFT']) { @@ -205,7 +156,7 @@ namespace com.keyman.text { } // Use 'native'-mode defaults, determining the character from the OSK - return nativeDefaultKeyOutput.call(this, Lkc, keyShiftState, false); + return nativeDefaultKeyOutput.call(this, Lkc, keyShiftState, usingOSK); } } @@ -346,7 +297,7 @@ namespace com.keyman.text { * correctOSKTextSize handles rotation event -- currently rebuilds keyboard and adjusts font sizes */ keymanweb['correctOSKTextSize']=function() { - if(osk.vkbd.adjustHeights()) { + if(osk && osk.vkbd && osk.vkbd.adjustHeights()) { osk._Load(); } }; @@ -358,10 +309,19 @@ namespace com.keyman.text { */ keymanweb['registerModel']=function(model: com.keyman.text.prediction.ModelSpec) { keymanweb.modelManager.register(model); + }; + + keymanweb['showNewSuggestions'] = function() { + let keyman = com.keyman.singleton; + + if(keyman['osk'].banner['activeBanner'] instanceof com.keyman.osk.SuggestionBanner) { + let banner = keyman['osk'].banner['activeBanner']; + banner.rotateSuggestions(); + } } /** - * Function called by iOS when a device-implemented keyboard popup is displayed or hidden + * Function called by Android and iOS when a device-implemented keyboard popup is displayed or hidden * * @param {boolean} isVisible * @@ -395,8 +355,10 @@ namespace com.keyman.text { var w=key.offsetWidth, h=key.offsetHeight, - x=dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(osk.vkbd.kbdDiv) + w/2, - y=dom.Utils.getAbsoluteY(key) - dom.Utils.getAbsoluteY(osk.vkbd.kbdDiv); + // Since the full OSKManager '_Box' is displayed within the keyboards' WebViews, + // these calculations should be performed with respect to that, rather than osk.vkbd.kbdDiv. + x=dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(osk._Box) + w/2, + y=dom.Utils.getAbsoluteY(key) - dom.Utils.getAbsoluteY(osk._Box); return x+','+y+','+w+','+h; }; diff --git a/web/source/kmwnative.ts b/web/source/kmwnative.ts index 9e4406a773437641624ef49733d3d8e8ba02a4aa..66b6a7ac8b9015b9acc704bf82250866a9c64cf0 100644 --- a/web/source/kmwnative.ts +++ b/web/source/kmwnative.ts @@ -53,6 +53,7 @@ namespace com.keyman.osk { let util = com.keyman.singleton.util; // Test for subkey array, return if none + // (JH 2/4/19) So, if a subkey is passed in, we return immediately? if(k == null || k['subKeys'] == null) { return; } @@ -60,6 +61,9 @@ namespace com.keyman.osk { // Highlight key at touch position (and clear other highlighting) var i,sk,x0,y0,x1,y1,onKey,skBox=document.getElementById('kmw-popup-keys'); + //#region This section fills a different role than the method name would suggest. + // Might correspond better to a 'checkInstantSubkeys' or something. + // Show popup keys immediately if touch moved up towards key array (KMEW-100, Build 353) if((this.touchY-y > 5) && skBox == null) { if(this.subkeyDelayTimer) { @@ -68,7 +72,13 @@ namespace com.keyman.osk { this.showSubKeys(k); skBox=document.getElementById('kmw-popup-keys'); } - + //#endregion + + /* (JH 2/4/19) Because of that earlier note, in KMW 12 alpha (and probably 11), + * the following code is effectively impotent and could be deleted with no effect. + * Note that this probably results from VisualKeyboard.keyTarget finding the + * subkey first... which is necessary anyway to support subkey output. + */ for(i=0; i < k['subKeys'].length; i++) { try { sk= skBox.childNodes[i].firstChild; @@ -361,83 +371,6 @@ namespace com.keyman.osk { return false; }; - /** - * Adjust the absolute height of each keyboard element after a rotation - * - **/ - VisualKeyboard.prototype.adjustHeights = function(this: VisualKeyboard): boolean { - let keyman = com.keyman.singleton; - let oskManager = keyman.osk; - let _Box = oskManager._Box; - let util = keyman.util; - let device = util.device; - - if(!_Box || !this.kbdDiv || !this.kbdDiv.firstChild || !this.kbdDiv.firstChild.firstChild.childNodes) { - return false; - } - - var layers=this.kbdDiv.firstChild.childNodes, - nRows=layers[0].childNodes.length, - rowHeight=Math.floor(oskManager.getKeyboardHeight()/(nRows == 0 ? 1 : nRows)), - nLayer,nRow,rs,keys,nKeys,nKey,key,ks,j,pad=4,fs=1.0; - - if(device.OS == 'Android' && 'devicePixelRatio' in window) { - rowHeight = rowHeight/window.devicePixelRatio; - } - let oskHeight : number = nRows*rowHeight; - - var b: HTMLElement = _Box, bs=b.style; - bs.height=bs.maxHeight=(oskHeight+3)+'px'; - b = b.childNodes.item(1).firstChild; - bs=b.style; - bs.height=bs.maxHeight=(oskHeight+3)+'px'; - pad = Math.round(0.15*rowHeight); - - // TODO: Logically, this should be needed for Android, too - may need to be changed for the next version! - if(device.OS == 'iOS') { - fs=fs/util.getViewportScale(); - } - - bs.fontSize=fs+'em'; - var resizeLabels=(device.OS == 'iOS' && device.formFactor == 'phone' && util.landscapeView()); - - for(nLayer=0;nLayer layers[nLayer]).style.height=(oskManager.getKeyboardHeight()+3)+'px'; - - for(nRow=0; nRow layers[nLayer].childNodes[nRow]).style; - rs.bottom=(nRows-nRow-1)*rowHeight+1+'px'; - rs.maxHeight=rs.height=rowHeight+'px'; - keys=layers[nLayer].childNodes[nRow].childNodes; - nKeys=keys.length; - for(nKey=0;nKey 0)) { - key.childNodes[0].style.fontSize='6px'; - } - } - } - } - - return true; - }; - // /** // * Adjust the width of the last cell in each row for length differences // * due to rounding percentage widths to nearest pixel. diff --git a/web/source/kmwuitoolbar.ts b/web/source/kmwuitoolbar.ts index d24b742efe700e2147efd7f1234aea272a001bbf..1917eaaad176016cfc5a5dc9a4883d82a8b588bc 100644 --- a/web/source/kmwuitoolbar.ts +++ b/web/source/kmwuitoolbar.ts @@ -49,6 +49,7 @@ if(!window['keyman']['ui']['name']) { langKeyboardListNodes: [], selectedRegion: 'as', listedKeyboards: [], + catchAllRegion: 'un', keyboardListPriority: 0, maxListedKeyboards: 1, lastActiveControl: null, @@ -81,10 +82,10 @@ if(!window['keyman']['ui']['name']) { ui.ToolBar_Text['ca']='Central America'; ui.ToolBar_Text['sa']='South America'; - ui.ToolBar_Text['na']='North America'; + ui.ToolBar_Text['na']='Americas'; ui.ToolBar_Text['eu']='Europe'; ui.ToolBar_Text['af']='Africa'; - ui.ToolBar_Text['me']='Middle east'; + ui.ToolBar_Text['un']='Undetermined'; ui.ToolBar_Text['as']='Asia'; ui.ToolBar_Text['oc']='Oceania'; @@ -147,14 +148,14 @@ if(!window['keyman']['ui']['name']) { util['linkStyleSheet'](util['getOption']('resources')+'ui/toolbar/kmwuitoolbar.css'); ui.regions = {}; - ui.regions['ca'] = {t: ui.ToolBar_Text['ca'], m: '49,52,65,54,68,57,71,56,73,59,75,60,93,61,94,58,97,58,101,59,107,60,114,64,115,68,114,77,104,74,98,75,96,78,95,82,90,81,85,80,82,76,78,74,74,73,65,68,57,61' }, - ui.regions['sa'] = {t: ui.ToolBar_Text['sa'], m: '82,82,95,82,96,78,98,75,104,74,114,77,120,79,124,83,126,87,141,90,142,97,138,103,135,113,127,116,123,124,115,131,112,132,109,138,117,139,140,141,141,146,134,148,114,145,109,148,100,148,91,143,91,130,96,111,89,102,83,95,77,89' }, - ui.regions['na'] = {t: ui.ToolBar_Text['na'], m: '0,3,0,37,24,32,35,37,43,47,49,52,65,54,68,57,71,56,73,59,75,60,93,61,93,57,103,49,118,41,126,41,136,23,148,17,156,14,164,5,164,0,57,0,35,5,25,9,5,8' }, + //ui.regions['ca'] = {t: ui.ToolBar_Text['ca'], m: '49,52,65,54,68,57,71,56,73,59,75,60,93,61,94,58,97,58,101,59,107,60,114,64,115,68,114,77,104,74,98,75,96,78,95,82,90,81,85,80,82,76,78,74,74,73,65,68,57,61' }, + //ui.regions['sa'] = {t: ui.ToolBar_Text['sa'], m: '82,82,95,82,96,78,98,75,104,74,114,77,120,79,124,83,126,87,141,90,142,97,138,103,135,113,127,116,123,124,115,131,112,132,109,138,117,139,140,141,141,146,134,148,114,145,109,148,100,148,91,143,91,130,96,111,89,102,83,95,77,89' }, + ui.regions['na'] = {t: ui.ToolBar_Text['na'], m: '0,3,0,37,24,32,35,37,43,47,49,52,65,54,68,57,71,56,73,59,75,60,93,61,93,57,103,49,118,41,126,41,136,23,148,17,156,14,164,5,164,0,57,0,35,5,25,9,5,8,49,52,65,54,68,57,71,56,73,59,75,60,93,61,94,58,97,58,101,59,107,60,114,64,115,68,114,77,104,74,98,75,96,78,95,82,90,81,85,80,82,76,78,74,74,73,65,68,57,61,82,82,95,82,96,78,98,75,104,74,114,77,120,79,124,83,126,87,141,90,142,97,138,103,135,113,127,116,123,124,115,131,112,132,109,138,117,139,140,141,141,146,134,148,114,145,109,148,100,148,91,143,91,130,96,111,89,102,83,95,77,89' }, ui.regions['eu'] = {t: ui.ToolBar_Text['eu'], m: '145,29,146,19,158,14,171,6,187,2,206,1,217,4,227,11,231,16,231,33,227,34,225,35,225,37,227,39,228,44,228,47,227,48,223,46,218,44,215,43,208,43,203,45,202,48,205,52,201,52,195,49,189,50,187,48,177,48,175,49,166,50,147,33' }, ui.regions['af'] = {t: ui.ToolBar_Text['af'], m: '150,58,158,50,166,50,175,49,177,48,187,48,189,50,195,49,201,52,205,52,207,53,221,75,229,75,231,77,231,85,227,92,232,101,237,106,237,112,227,115,222,118,206,125,199,127,193,127,185,111,183,104,180,87,168,89,153,85,143,71,147,60' }, - ui.regions['me'] = {t: ui.ToolBar_Text['me'], m: '205,52,202,48,203,45,208,43,215,43,218,44,223,46,227,48,232,48,239,48,240,49,239,53,242,60,243,65,237,76,231,77,229,75,221,75,207,53' }, ui.regions['as'] = {t: ui.ToolBar_Text['as'], m: '219,1,221,6,228,12,231,16,231,33,227,34,225,35,225,37,227,39,229,45,232,48,239,48,240,49,239,53,242,60,243,65,249,70,252,81,259,87,271,87,278,95,289,100,303,101,311,98,320,98,323,98,323,84,311,81,308,73,307,65,317,57,330,50,334,44,348,36,364,38,375,34,375,8,355,8,336,5,292,1,285,0,219,0' }, ui.regions['oc'] = {t: ui.ToolBar_Text['oc'], m: '288,117,289,107,303,101,311,98,323,98,323,84,333,77,344,73,362,80,369,88,375,96,375,141,352,143,323,142,316,136,310,130,291,130' } + ui.regions['un'] = {t: ui.ToolBar_Text['un'], m: '205,52,202,48,203,45,208,43,215,43,218,44,223,46,227,48,232,48,239,48,240,49,239,53,242,60,243,65,237,76,231,77,229,75,221,75,207,53' }, ui.toolbarNode = ui.createNode('div', 'kmw_controls'); ui.toolbarNode.style.display='block'; @@ -332,9 +333,17 @@ if(!window['keyman']['ui']['name']) { var max = 0, count = 0, languageCode = ''; // Get number of languages for the region - for(var j=0; j keys[j]).proportionalX = (totalPercent + padPercent + (keyPercent/2)); + ( keys[j]).proportionalWidth = keyPercent; + totalPercent += padPercent+keyPercent; } // Allow for right OSK margin (15 layout units) - totalPercent += 15/totalWidth; + let rightMargin = ActiveKey.DEFAULT_RIGHT_MARGIN/totalWidth; + totalPercent += rightMargin; // If a single key, and padding is negative, add padding to right align the key if(keys.length == 1 && parseInt(keys[0]['pad'],10) < 0) { @@ -67,12 +120,21 @@ namespace com.keyman.osk { keys[0]['widthpc']=keyPercent; totalPercent += keyPercent; keys[0]['padpc']=1-totalPercent; + + // compute center's default x-coord (used in headless modes) + ( keys[0]).proportionalX = ((totalPercent - rightMargin) - keyPercent/2); + ( keys[0]).proportionalWidth = keyPercent; + } else if(keys.length > 0) { let j=keys.length-1; padPercent=parseInt(keys[j]['pad'],10)/totalWidth; keys[j]['padpc']=padPercent; totalPercent += padPercent; - keys[j]['widthpc']=1-totalPercent; + keys[j]['widthpc'] = keyPercent = 1-totalPercent; + + // compute center's default x-coord (used in headless modes) + ( keys[j]).proportionalX = (1 - rightMargin) - keyPercent/2; + ( keys[j]).proportionalWidth = keyPercent; } // Add class functions to the existing layout object, allowing it to act as an ActiveLayout. @@ -83,7 +145,16 @@ namespace com.keyman.osk { } } - (row as ActiveRow).totalWidth = totalWidth; + let aRow = row as ActiveRow; + aRow.proportionalY = proportionalY; + } + + populateKeyMap(map: {[keyId: string]: ActiveKey}) { + this.key.forEach(function(key: ActiveKey) { + if(key.id) { + map[key.id] = key; + } + }); } } @@ -91,6 +162,16 @@ namespace com.keyman.osk { row: ActiveRow[]; id: string; + totalWidth: number; + + defaultKeyProportionalWidth: number; + rowProportionalHeight: number; + + /** + * Facilitates mapping key id strings to their specification objects. + */ + keyMap: {[keyId: string]: ActiveKey}; + constructor() { } @@ -115,14 +196,14 @@ namespace com.keyman.osk { keys.length = keys.length-1; } else { var kw, kp; - kw = (typeof key['width'] == 'string' && key['width'] != '') ? parseInt(key['width'],10) : 100; - if(isNaN(kw) || kw == 0) kw = 100; + kw = (typeof key['width'] == 'string' && key['width'] != '') ? parseInt(key['width'],10) : ActiveKey.DEFAULT_KEY_WIDTH; + if(isNaN(kw) || kw == 0) kw = ActiveKey.DEFAULT_KEY_WIDTH; key['width'] = kw.toString(); - kp = (typeof key['pad'] == 'string' && key['pad'] != '') ? parseInt(key['pad'],10) : 15; - if(isNaN(kp) || kp == 0) kp = 15; // KMEW-119 + kp = (typeof key['pad'] == 'string' && key['pad'] != '') ? parseInt(key['pad'],10) : ActiveKey.DEFAULT_PAD; + if(isNaN(kp) || kp == 0) kp = ActiveKey.DEFAULT_PAD; // KMEW-119 key['pad'] = kp.toString(); width += kw + kp; - //if(typeof key['width'] == 'string' && key['width'] != '') width += parseInt(key['width'],10); else width += 100; + //if(typeof key['width'] == 'string' && key['width'] != '') width += parseInt(key['width'],10); else width += DEFAULT_KEY_WIDTH; //if(typeof key['pad'] == 'string' && key['pad'] != '') width += parseInt(key['pad'],10); else width += 5; } } @@ -133,24 +214,163 @@ namespace com.keyman.osk { // Add default right margin if(formFactor == 'desktop') { - totalWidth += 5; // KMEW-117 + totalWidth += 5; // TODO: resolve difference between touch and desktop; why don't we use ActiveKey.DEFAULT_RIGHT_MARGIN? } else { - // TODO: Not entirely clear why this needs to be 15 instead of 5 on touch layouts. We probably have - // a miscalculation somewhere - totalWidth += 15; + totalWidth += ActiveKey.DEFAULT_RIGHT_MARGIN; } - for(let i=0; i probability, use a function parameter in place + // of the formula in the loop below. + for(let key in keyDists) { + totalMass += keyProbs[key] = 1 / (keyDists[key] + 1e-6); // Prevent div-by-0 errors. + } + + for(let key in keyProbs) { + keyProbs[key] /= totalMass; + } + + return keyProbs; + } + + /** + * Computes a squared 'pseudo-distance' for the touch from each key. (Not a proper metric.) + * Intended for use in generating a probability distribution over the keys based on the touch input. + * @param touchCoords A proportional (x, y) coordinate of the touch within the keyboard's geometry. + * Should be within [0, 0] to [1, 1]. + * @param kbdScaleRatio The ratio of the keyboard's horizontal scale to its vertical scale. + * For a 400 x 200 keyboard, should be 2. + */ + private keyTouchDistances(touchCoords: {x: number, y: number}, kbdScaleRatio: number): {[keyId: string]: number} { + let layer = this; + + let keyDists: {[keyId: string]: number} = {}; + + // This double-nested loop computes a pseudo-distance for the touch from each key. Quite useful for + // generating a probability distribution. + this.row.forEach(function(row: ActiveRow): void { + row.key.forEach(function(key: ActiveKey): void { + // If the key lacks an ID, just skip it. Sometimes used for padding. + if(!key.id) { + return; + } + // These represent the within-key distance of the touch from the key's center. + // Both should be on the interval [0, 0.5]. + let dx = Math.abs(touchCoords.x - key.proportionalX); + let dy = Math.abs(touchCoords.y - row.proportionalY); + + // If the touch isn't within the key, these store the out-of-key distance + // from the closest point on the key being checked. + let distX: number, distY: number; + + if(dx > 0.5 * key.proportionalWidth) { + distX = (dx - 0.5 * key.proportionalWidth); + dx = 0.5; + } else { + distX = 0; + dx /= key.proportionalWidth; + } + + if(dy > 0.5 * layer.rowProportionalHeight) { + distY = (dy - 0.5 * layer.rowProportionalHeight); + dy = 0.5; + } else { + distY = 0; + dy /= layer.rowProportionalHeight; + } + + // Now that the differentials are computed, it's time to do distance scaling. + // + // For out-of-key distance, we scale the X component by the keyboard's aspect ratio + // to get the actual out-of-key distance rather than proportional. + distX *= kbdScaleRatio; + + // While the keys are rarely perfect squares, we map all within-key distance + // to a square shape. (ALT/CMD should seem as close to SPACE as a 'B'.) + // + // For that square, we take the rowHeight as its edge lengths. + distX += dx * layer.rowProportionalHeight; + distY += dy * layer.rowProportionalHeight; + + let distance = distX * distX + distY * distY; + keyDists[key.id] = distance; + }); + }); + + return keyDists; + } + + getKey(keyId: string) { + // Keys usually are specified in a "long form" prefixed with their layer's ID. + if(keyId.indexOf(this.id + '-') == 0) { + keyId = keyId.replace(this.id + '-', ''); + } + + return this.keyMap[keyId]; } } @@ -158,16 +378,25 @@ namespace com.keyman.osk { layer: ActiveLayer[]; font: string; + /** + * Facilitates mapping layer id strings to their specification objects. + */ + layerMap: {[layerId: string]: ActiveLayer}; + private constructor() { } + getLayer(layerId: string): ActiveLayer { + return this.layerMap[layerId]; + } + /** - * + * * @param layout - * @param formFactor + * @param formFactor */ - static polyfill(layout: LayoutFormFactor, formFactor: string) { + static polyfill(layout: LayoutFormFactor, formFactor: string): ActiveLayout { if(layout == null) { throw new Error("Cannot build an ActiveLayout for a null specification."); } @@ -175,6 +404,7 @@ namespace com.keyman.osk { // Create a separate OSK div for each OSK layer, only one of which will ever be visible var n: number, i: number; var layers: LayoutLayer[], layer: LayoutLayer; + let layerMap: {[layerId: string]: ActiveLayer} = {}; var rows: LayoutRow[]; layers=layout['layer']; @@ -196,6 +426,7 @@ namespace com.keyman.osk { for(n=0; n +/// + namespace com.keyman.osk { // Base class for a banner above the keyboard in the OSK @@ -6,7 +8,10 @@ namespace com.keyman.osk { private _height: number; // pixels private div: HTMLDivElement; - public static DEFAULT_HEIGHT: number = 40; // pixels + public static DEFAULT_HEIGHT: number = 37; // pixels; embedded apps can modify + + public static readonly BANNER_CLASS: string = 'kmw-banner-bar'; + public static readonly BANNER_ID: string = 'kmw-banner-bar'; /** * Function height @@ -58,8 +63,8 @@ namespace com.keyman.osk { let util = keymanweb.util; let d = util._CreateElement('div'); - d.id = "keymanweb_banner_bar"; - d.className = "kmw-banner-bar"; + d.id = Banner.BANNER_ID; + d.className = Banner.BANNER_CLASS; this.div = d; this.height = height; @@ -82,6 +87,24 @@ namespace com.keyman.osk { public getDiv(): HTMLElement { return this.div; } + + /** + * Function activate + * Scope Public + * Description Adds any relevant event listeners needed by this banner type. + */ + public activate() { + // Default implementation - no listeners. + } + + /** + * Function activate + * Scope Public + * Description Removes any relevant event listeners previously added by this banner. + */ + public deactivate() { + // Default implementation - no listeners. + } } /** @@ -114,12 +137,14 @@ namespace com.keyman.osk { super(0); } + console.log("Loading img with src '" + imagePath + "'"); this.img = document.createElement('img'); this.img.setAttribute('src', imagePath); let ds = this.img.style; ds.width = '100%'; ds.height = '100%'; this.getDiv().appendChild(this.img); + console.log("Image loaded."); } /** @@ -135,31 +160,64 @@ namespace com.keyman.osk { } } - export class BannerSuggestionSpec { - id: string; - languageID: string; - text?: string; - width: number; - pad?: string; - widthpc?: number; // Added during OSK construction. - padpc?: number; // Added during OSK construction. + export class BannerSuggestion { + div: HTMLDivElement; + private display: HTMLSpanElement; + private fontFamily?: string; + + private _suggestion: Suggestion; + private _applyFunctor: () => void = null; + + private index: number; + + static readonly BASE_ID = 'kmw-suggestion-'; + + constructor(index: number) { + let keyman = com.keyman.singleton; - public DEFAULT_SUGGESTION_WIDTH: number = 50; // pixels + this.index = index; - constructor(id: string, languageID: string, text?: string, width?: number, pad?: string) { - this.id = id; - this.languageID = languageID; - this.text = text; - this.width = width ? width : this.DEFAULT_SUGGESTION_WIDTH; - this.pad = pad; + this.constructRoot(); + + // Provides an empty, base SPAN for text display. We'll swap these out regularly; + // `Suggestion`s will have varying length and may need different styling. + let display = this.display = keyman.util._CreateElement('span'); + this.div.appendChild(display); } - } - export class BannerSuggestion { - spec: BannerSuggestionSpec; + private constructRoot() { + let keyman = com.keyman.singleton; + + // Add OSK suggestion labels + let div = this.div = keyman.util._CreateElement('div'), ds=div.style; + div.className = "kmw-suggest-option"; + div.id = BannerSuggestion.BASE_ID + this.index; + + let kbdDetails = keyman.keyboardManager.activeStub; + if(kbdDetails) { + if (kbdDetails['KLC']) { + div.lang = kbdDetails['KLC']; + } + + // Establish base font settings + let font = kbdDetails['KFont']; + if(font && font.family && font.family != '') { + ds.fontFamily = this.fontFamily = font.family; + } + } + + // Ensures that a reasonable width % is set. + let usableWidth = 100 - SuggestionBanner.MARGIN * (SuggestionBanner.SUGGESTION_LIMIT + 1); + let widthpc = usableWidth / SuggestionBanner.SUGGESTION_LIMIT; + + ds.width = widthpc + '%'; + ds.marginLeft = SuggestionBanner.MARGIN + '%'; - constructor(spec: BannerSuggestionSpec) { - this.spec = spec; + this.div['suggestion'] = this; + } + + get suggestion(): Suggestion { + return this._suggestion; } /** @@ -168,9 +226,75 @@ namespace com.keyman.osk { * @param {Suggestion} suggestion Suggestion from the lexical model * Description Update the ID and text of the BannerSuggestionSpec */ - public update(id: string, suggestion: Suggestion) { - this.spec.id = id; - this.spec.text = suggestion.displayAs; + public update(suggestion: Suggestion, applyFunctor?: () => void) { + this._suggestion = suggestion; + this._applyFunctor = applyFunctor || null; + this.updateText(); + } + + private updateText() { + let display = this.generateSuggestionText(); + this.div.replaceChild(display, this.display); + this.display = display; + } + + /** + * Function apply + * @param target (Optional) The OutputTarget to which the `Suggestion` ought be applied. + * Description Applies the predictive `Suggestion` represented by this `BannerSuggestion`. + */ + public apply(target?: text.OutputTarget): [text.Transcription, Promise] { + let keyman = com.keyman.singleton; + + if(this.isEmpty()) { + return [null, null]; + } else if(this._applyFunctor) { + this._applyFunctor(); + return [null, null]; + } + + // Find the state of the context at the time the prediction-triggering keystroke was applied. + let original = keyman.modelManager.getPredictionState(this._suggestion.transformId); + if(!original) { + console.warn("Could not apply the Suggestion!"); + return [null, null]; + } else { + if(!target) { + /* Assume it's the currently-active `OutputTarget`. We should probably invalidate + * everything if/when the active `OutputTarget` changes, though we haven't gotten that + * far in implementation yet. + */ + target = text.Processor.getOutputTarget(); + } + + // Apply the Suggestion! + + // Step 1: determine the final output text + let final = text.Mock.from(original.preInput); + final.apply(this._suggestion.transform); + + // Step 2: build a final, master Transform that will produce the desired results from the CURRENT state. + // In embedded mode, both Android and iOS are best served by calculating this transform and applying its + // values as needed for use with their IME interfaces. + let transform = final.buildTransformFrom(target); + let wordbreakPromise = keyman.modelManager.wordbreak(target); // Also build the display string for the reversion. + target.apply(transform); + + // Signal the necessary text changes to the embedding app, if it exists. + if(keyman['oninserttext'] && keyman.isEmbedded) { + keyman['oninserttext'](transform.deleteLeft, transform.insert, transform.deleteRight); + } + + // Build a 'reversion' Transcription that can be used to undo this apply() if needed. + let preApply = text.Mock.from(original.preInput); + + preApply.apply(original.transform); + return [preApply.buildTranscriptionFrom(target, null), wordbreakPromise]; + } + } + + public isEmpty(): boolean { + return !this._suggestion; } /** @@ -180,39 +304,23 @@ namespace com.keyman.osk { */ // public generateSuggestionText(): HTMLSpanElement { - let util = (window['keyman']).util; - let spec = this.spec; + let keyman = com.keyman.singleton; + let util = keyman.util; - // Add OSK suggestion labels + let suggestion = this._suggestion; var suggestionText: string; - var t=util._CreateElement('span'), ts=t.style; - t.id = spec.id; - t.className = "kmw-suggestion-span"; - if(spec.text == null || spec.text == '') { - suggestionText = '\xa0'; // default: nbsp. - } else { - suggestionText = spec.text; - } - - if (this.spec.languageID) { - t.lang = this.spec.languageID; - } - //Override font spec if set for this key in the layout - if(typeof spec['font'] == 'string' && spec['font'] != '') { - ts.fontFamily=spec['font']; - } + var s=util._CreateElement('span'); + s.className = 'kmw-suggestion-text'; - if(typeof spec['fontsize'] == 'string' && spec['fontsize'] != 0) { - ts.fontSize=spec['fontsize']; + if(suggestion == null) { + return s; } - let device = util.device; - let oskManager = com.keyman.singleton.osk; - if (device.formFactor != 'desktop') { - ts.width = Math.floor(oskManager.getWidth() / SuggestionBanner.SUGGESTION_LIMIT) + 'px'; + if(suggestion.displayAs == null || suggestion.displayAs == '') { + suggestionText = '\xa0'; // default: nbsp. } else { - ts.width = Math.floor(oskManager.getWidthFromCookie() / SuggestionBanner.SUGGESTION_LIMIT) + 'px'; + suggestionText = suggestion.displayAs; } let keyboardManager = (window['keyman']).keyboardManager; @@ -221,74 +329,453 @@ namespace com.keyman.osk { suggestionText = '\u200f' + suggestionText; } - // Finalize the suggestion text - var d=util._CreateElement('div'), ds=d.style; - d.className = 'kmw-suggestion-text'; - d.innerHTML = suggestionText; - t.appendChild(d); + // TODO: Dynamic suggestion text resizing. (Refer to OSKKey.getTextWidth in visualKeyboard.ts.) - return t; + // Finalize the suggestion text + s.innerHTML = suggestionText; + return s; } } /** * Function SuggestionBanner * Scope Public + * @param {number} height - If provided, the height of the banner in pixels * Description Display lexical model suggestions in the banner */ export class SuggestionBanner extends Banner { - public static SUGGESTION_LIMIT: number = 3; - private suggestionList : BannerSuggestion[]; + public static readonly SUGGESTION_LIMIT: number = 3; + public static readonly MARGIN = 1; - constructor() { - super(SuggestionBanner.DEFAULT_HEIGHT); - this.suggestionList = new Array(); + private options : BannerSuggestion[]; + + private manager: SuggestionManager; + + static readonly TOUCHED_CLASS: string = 'kmw-suggest-touched'; + + constructor(height?: number) { + super(height || Banner.DEFAULT_HEIGHT); + + this.options = new Array(); for (var i=0; i { + private selected: BannerSuggestion; + + platformHold: (suggestion: BannerSuggestion, isCustom: boolean) => void; + + //#region Touch handling implementation + findTargetFrom(e: HTMLElement): HTMLDivElement { + let keyman = com.keyman.singleton; + let util = keyman.util; + + try { + if(e) { + if(util.hasClass(e,'kmw-suggest-option')) { + return e as HTMLDivElement; + } + if(e.parentNode && util.hasClass( e.parentNode,'kmw-suggest-option')) { + return e.parentNode as HTMLDivElement; + } + // if(e.firstChild && util.hasClass( e.firstChild,'kmw-suggest-option')) { + // return e.firstChild as HTMLDivElement; + // } } + } catch(ex) {} + return null; + } + + protected highlight(t: HTMLDivElement, on: boolean): void { + let classes = t.className; + let cs = ' ' + SuggestionBanner.TOUCHED_CLASS; + + if(t.id.indexOf(BannerSuggestion.BASE_ID) == -1) { + console.warn("Cannot find BannerSuggestion object for element to highlight!"); + } else { + // Never highlight an empty suggestion button. + let suggestion = this.selected = t['suggestion'] as BannerSuggestion; + if(suggestion.isEmpty()) { + on = false; + this.selected = null; + } + } + + if(on && classes.indexOf(cs) < 0) { + t.className=classes+cs; + } else { + t.className=classes.replace(cs,''); + } + } + + protected select(t: HTMLDivElement): void { + this.doAccept(t['suggestion'] as BannerSuggestion); + } + + //#region Long-press support + protected hold(t: HTMLDivElement): void { + let suggestionObj = t['suggestion'] as BannerSuggestion; + + // Is this the suggestion? It's never in this.currentSuggestions, so check against that. + let isCustom = this.currentSuggestions.indexOf(suggestionObj.suggestion) == -1; + + if(this.platformHold) { + // Implemented separately for native + embedded mode branches. + // Embedded mode should pass any info needed to show a submenu IMMEDIATELY. + this.platformHold(suggestionObj, isCustom); // No implementation yet for native. + } + } + protected clearHolds(): void { + // Temp, pending implementation of suggestion longpress submenus + // - nothing to clear without them - + + // only really used in native-KMW + } + + protected hasModalPopup(): boolean { + // Utilized by the mobile apps; allows them to 'take over' touch handling, + // blocking it within KMW when the apps are already managing an ongoing touch-hold. + let keyman = com.keyman.singleton; + return keyman['osk'].vkbd.popupVisible; + } + + protected dealiasSubTarget(target: HTMLDivElement): HTMLDivElement { + return target; + } + + protected hasSubmenu(t: HTMLDivElement): boolean { + // Temp, pending implementation of suggestion longpress submenus + + // Only really used by native-KMW - see kmwnative's highlightSubKeys func. + return false; + } + + protected isSubmenuActive(): boolean { + // Temp, pending implementation of suggestion longpress submenus + + // Utilized only by native-KMW - it parallels hasModalPopup() in purpose. + return false; + } + + protected displaySubmenuFor(target: HTMLDivElement) { + // Utilized only by native-KMW to show submenus. + throw new Error("Method not implemented."); + } + //#endregion + //#endregion + + private options: BannerSuggestion[]; + + private initNewContext: boolean = true; + + private currentSuggestions: Suggestion[] = []; + private keepSuggestion: Suggestion; + private revertSuggestion: Suggestion; + + private currentTranscriptionID: number; + + private recentAccept: boolean = false; + private recentAccepted: Suggestion; + private preAccept: text.Transcription = null; + private preAcceptText: string; + private swallowPrediction: boolean = false; + + private previousSuggestions: Suggestion[]; + private previousTranscriptionID: number; + + private doRevert: boolean = false; + private recentRevert: boolean = false; + private rejectedSuggestions: Suggestion[] = []; + + constructor(div: HTMLElement, options: BannerSuggestion[]) { + // TODO: Determine appropriate CSS styling names, etc. + super(div, Banner.BANNER_CLASS, SuggestionBanner.TOUCHED_CLASS); + this.options = options; + } + + private doAccept(suggestion: BannerSuggestion) { + let [revert, revertText] = suggestion.apply(); + + let _this = this; + + if(revert) { + this.preAccept = revert; + revertText.then(function (text) { + _this.preAcceptText = text; + }); + } else { + // If null, it's a blank option; we should effectively never 'accept' it. + return; + } + + this.selected = null; + this.recentAccept = true; + this.doRevert = false; + this.recentRevert = false; + this.recentAccepted = suggestion.suggestion; + + this.previousSuggestions = this.currentSuggestions; + this.previousTranscriptionID = this.currentTranscriptionID; + + // Request a 'new' prediction based on current context with a nil Transform. + let keyman = com.keyman.singleton; + this.swallowPrediction = true; + keyman.modelManager.predict(); + } + + private showRevert() { + // Construct a 'revert suggestion' to facilitate a reversion UI component. + this.revertSuggestion = { + transform: null, // Will not be accurate because of the backspace, so we'll construct it later. + displayAs: '"' + this.preAcceptText + '"' }; - return s; - }; + + this.doRevert = true; + this.doUpdate(); + } + + private _applyReversion: () => void = function(this: SuggestionManager): void { + let keyman = com.keyman.singleton; + + let current = text.Processor.getOutputTarget(); + let priorState = this.preAccept; + + // Step 1: construct the reverted state. + let target = text.Mock.from(priorState.preInput); + target.apply(priorState.transform); + + // Step 2: build a final, master Transform that will produce the desired results from the CURRENT state. + // In embedded mode, both Android and iOS are best served by calculating this transform and applying its + // values as needed for use with their IME interfaces. + let transform = target.buildTransformFrom(current); + current.apply(transform); + + // Signal the necessary text changes to the embedding app, if it exists. + if(keyman['oninserttext'] && keyman.isEmbedded) { + keyman['oninserttext'](transform.deleteLeft, transform.insert, transform.deleteRight); + } + + this.currentSuggestions = this.previousSuggestions; // Restore to the previous state's Suggestion list. + this.currentTranscriptionID = this.previousTranscriptionID; + + let rejectIndex = this.currentSuggestions.indexOf(this.recentAccepted); + if(rejectIndex != -1) { + // Denote the previous suggestion as rejected and update the 'valid' suggestion list accordingly. + this.rejectedSuggestions.push(this.recentAccepted); + this.currentSuggestions.splice(rejectIndex, 1); // removes this.recentAccepted from this.currentSuggestions. + } + + // Other state maintenance + this.recentAccept = false; + this.doRevert = false; + this.recentRevert = true; + this.doUpdate(); + }.bind(this); + + /** + * Receives messages from the keyboard that the 'accept' keystroke has been entered. + * Should return 'false' if the current state allows accepting a suggestion and act accordingly. + * Otherwise, return true. + */ + tryAccept: (source: string) => boolean = function(this: SuggestionManager, source: string): boolean { + if(!this.recentAccept && this.selected) { + this.doAccept(this.selected); + return false; + } else if(this.recentAccept && source == 'space') { + this.recentAccept = false; + return false; // Swallows a single space post-accept. + } + return true; // Not yet implemented + }.bind(this); + + /** + * Receives messages from the keyboard that the 'revert' keystroke has been entered. + * Should return 'false' if the current state allows reverting a recently-applied suggestion and act accordingly. + * Otherwise, return true. + */ + tryRevert: () => boolean = function(this: SuggestionManager): boolean { + // Has the revert keystroke (BKSP) already been sent once since the last accept? + if(this.doRevert) { + // If so, clear the 'revert' option and start doing normal predictions again. + this.doRevert = false; + this.recentAccept = false; + // Otherwise, did we just accept something before the revert signal was received? + } else if(this.recentAccept) { + this.showRevert(); + this.swallowPrediction = true; + } + + return true; + }.bind(this); /** * Function invalidateSuggestions * Scope Public * Description Clears the suggestions in the suggestion banner */ - public invalidateSuggestions: (this: SuggestionBanner) => boolean = - function(this: SuggestionBanner) { - this.suggestionList.forEach((suggestion, i) => { - this.suggestionList[i].update('kmw-suggestion-'+i, - SuggestionBanner.BLANK_SUGGESTION()); - this.getDiv().replaceChild(suggestion.generateSuggestionText(), - this.getDiv().childNodes.item(i)); + public invalidateSuggestions: (this: SuggestionManager, source: text.prediction.InvalidateSourceEnum) => boolean = + function(this: SuggestionManager, source: string) { + + // By default, we assume that the context is the same until we notice otherwise. + this.initNewContext = false; + + if(!this.swallowPrediction || source == 'context') { + this.recentAccept = false; + this.doRevert = false; + this.recentRevert = false; + this.rejectedSuggestions = []; + + if(source == 'context') { + this.swallowPrediction = false; + this.initNewContext = true; + } + } + + this.options.forEach((option: BannerSuggestion) => { + option.update(null); }); }.bind(this); + public activateKeep(): boolean { + return !this.recentAccept && !this.recentRevert && !this.initNewContext; + } + + private doUpdate() { + let keyman = com.keyman.singleton; + + let suggestions = []; + // Insert 'current text' if/when valid as the leading option. + if(this.activateKeep() && this.keepSuggestion) { + suggestions.push(this.keepSuggestion); + } else if(this.doRevert) { + suggestions.push(this.revertSuggestion); + } + + suggestions = suggestions.concat(this.currentSuggestions); + + this.options.forEach((option: BannerSuggestion, i: number) => { + if(i < suggestions.length) { + let revertFlag = (i == 0 && this.doRevert); + option.update(suggestions[i], revertFlag ? this._applyReversion : null); + } else { + option.update(null); + } + }); + } + + public rotateSuggestions() { + if(this.currentSuggestions.length > 0) { + let replaceCount = SuggestionBanner.SUGGESTION_LIMIT - (this.activateKeep() ? 1 : 0); + let rotating = this.currentSuggestions.splice(0, replaceCount); + + this.rejectedSuggestions = this.rejectedSuggestions.concat(rotating); + } + + // If we just removed the last available suggestions, it's time to refresh the list. + if(this.currentSuggestions.length == 0) { + this.currentSuggestions = this.rejectedSuggestions; + this.rejectedSuggestions = []; + } + + this.doUpdate(); + } + /** * Function updateSuggestions * Scope Public * @param {Suggestion[]} suggestions Array of suggestions from the lexical model. * Description Update the displayed suggestions in the SuggestionBanner */ - public updateSuggestions: (this: SuggestionBanner, suggestions: Suggestion[]) => boolean = - function(this: SuggestionBanner, suggestions: Suggestion[]) { - this.suggestionList.forEach((suggestion, i) => { - this.suggestionList[i].update('kmw-suggestion-'+i, suggestions[i]); - this.getDiv().replaceChild(suggestion.generateSuggestionText(), - this.getDiv().childNodes.item(i)); - }); + public updateSuggestions: (this: SuggestionManager, prediction: text.prediction.ReadySuggestions) => boolean = + function(this: SuggestionManager, prediction: text.prediction.ReadySuggestions) { + + let suggestions = prediction.suggestions; + + this.currentSuggestions = suggestions; + this.currentTranscriptionID = prediction.transcriptionID; + + // Do we have a keep suggestion? If so, remove it from the list so that we can control its display position + // and prevent it from being hidden after reversion operations. + for(let s of suggestions) { + if(s.tag == 'keep') { + this.keepSuggestion = s; + } + } + + if(this.keepSuggestion) { + this.currentSuggestions.splice(this.currentSuggestions.indexOf(this.keepSuggestion), 1); + } + + // If we've gotten an update request like this, it's almost always user-triggered and means the context has shifted. + if(!this.swallowPrediction) { + this.recentAccept = false; + this.doRevert = false; + this.recentRevert = false; + this.rejectedSuggestions = []; + } else { // This prediction was triggered by a recent 'accept.' Now that it's fulfilled, we clear the flag. + this.swallowPrediction = false; + } + + // The rest is the same, whether from input or from "self-updating" after a reversion to provide new suggestions. + this.doUpdate(); }.bind(this); } } diff --git a/web/source/osk/bannerManager.ts b/web/source/osk/bannerManager.ts index f674ab4a0bd9fed6179d37c5c9a8939fb1ff825d..248abbac7e9a686746e23c224ed0801ecce042d1 100644 --- a/web/source/osk/bannerManager.ts +++ b/web/source/osk/bannerManager.ts @@ -7,8 +7,9 @@ namespace com.keyman.osk { * each field. */ export interface BannerOptions { - persistentBanner?: boolean; - enablePredictions?: boolean; + alwaysShow?: boolean; + mayPredict?: boolean; + mayCorrect?: boolean; imagePath?: string; } @@ -49,15 +50,17 @@ namespace com.keyman.osk { * rather than as its standalone app. */ export class BannerManager { + private _activeType: BannerType; private _options: BannerOptions = {}; private bannerContainer: HTMLDivElement; private activeBanner: Banner; - private alwaysShows: boolean; + private alwaysShow: boolean; private imagePath?: string = ""; public static readonly DEFAULT_OPTIONS: BannerOptions = { - persistentBanner: false, - enablePredictions: true, + alwaysShow: false, + mayPredict: true, + mayCorrect: true, imagePath: "" } @@ -81,10 +84,9 @@ namespace com.keyman.osk { private constructContainer(): HTMLDivElement { let keymanweb = com.keyman.singleton; let util = keymanweb.util; - let d = util._CreateElement('div'); d.id = "keymanweb_banner_container"; - d.className = "keymanweb-banner-container"; + d.className = "kmw-banner-container"; return this.bannerContainer = d; } @@ -136,23 +138,24 @@ namespace com.keyman.osk { for(let key in optionSpec) { switch(key) { // Each defined option may require specialized handling. - case 'persistentBanner': + case 'alwaysShow': // Determines the banner type to activate. - this.alwaysShows = optionSpec['persistentBanner']; + this.alwaysShow = optionSpec[key]; + break; + case 'mayPredict': + keyman.modelManager.mayPredict = optionSpec[key] break; - case 'enablePredictions': - // If we're not going to show suggestions, it's best to turn off predictions. - keyman.modelManager.enabled = optionSpec['enablePredictions']; + case 'mayCorrect': + keyman.modelManager.mayCorrect = optionSpec[key]; break; case 'imagePath': // Determines the image file to use for ImageBanners. - this.imagePath = optionSpec['imagePath']; + this.imagePath = optionSpec[key]; break; default: // Invalid option specified! } - - this._options[key] = optionSpec['key']; + this._options[key] = optionSpec[key]; } this.selectBanner(); @@ -173,25 +176,31 @@ namespace com.keyman.osk { * * @param type `'blank' | 'image' | 'suggestion'` - A plain-text string * representing the type of `Banner` to set active. + * @param height - Optional banner height in pixels. */ - public setBanner(type: BannerType) { + public setBanner(type: BannerType, height?: number) { + var banner: Banner; + switch(type) { case 'blank': - this._setBanner(new BlankBanner()); + banner = new BlankBanner(); break; case 'image': - this._setBanner(new ImageBanner(this.imagePath, ImageBanner.DEFAULT_HEIGHT)); + banner = new ImageBanner(this.imagePath, Banner.DEFAULT_HEIGHT); break; case 'suggestion': - this._setBanner(new SuggestionBanner()); - let keyman = com.keyman.singleton; - let banner = this.activeBanner as SuggestionBanner; - keyman.modelManager['addEventListener']('invalidatesuggestions', banner.invalidateSuggestions); - keyman.modelManager['addEventListener']('suggestionsready', banner.updateSuggestions); + banner = new SuggestionBanner(height); break; default: throw new Error("Invalid type specified for the banner!"); } + + this._activeType = type; + + if(banner) { + this._setBanner(banner); + banner.activate(); + } } /** @@ -208,7 +217,7 @@ namespace com.keyman.osk { // when predictions are disabled. if(keyman.modelManager.activeModel) { this.setBanner('suggestion'); - } else if(this.alwaysShows) { + } else if(this.alwaysShow) { this.setBanner('image'); } else { this.setBanner('blank'); @@ -226,18 +235,21 @@ namespace com.keyman.osk { return; } else { let prevBanner = this.activeBanner; + prevBanner.deactivate(); this.bannerContainer.replaceChild(banner.getDiv(), prevBanner.getDiv()); - - if(prevBanner instanceof SuggestionBanner) { - let keyman = com.keyman.singleton; - keyman.modelManager['removeEventListener']('invalidatesuggestions', prevBanner.invalidateSuggestions); - keyman.modelManager['removeEventListener']('suggestionsready', prevBanner.updateSuggestions); - } } } this.activeBanner = banner; this.bannerContainer.appendChild(banner.getDiv()); + + // Don't forget to adjust the OSK in case we're now using a blank Banner! + let keyman = com.keyman.singleton; + keyman['osk']._Show(); + } + + public get activeType(): BannerType { + return this._activeType; } /** @@ -250,5 +262,14 @@ namespace com.keyman.osk { return 0; } } + + /** + * Sets the height (in pixels) of the active 'Banner' instance. + */ + public set height(h: number) { + if (this.activeBanner) { + this.activeBanner.height = h; + } + } } -} \ No newline at end of file +} diff --git a/web/source/osk/defaultLayouts.ts b/web/source/osk/defaultLayouts.ts index 203c754cc9ba9a25aa1074c1acc6b74a4a28c6c9..f6088746fffc58f12eadbe02b721d707214b42db 100644 --- a/web/source/osk/defaultLayouts.ts +++ b/web/source/osk/defaultLayouts.ts @@ -3,6 +3,8 @@ Copyright 2017 SIL International ***/ +/// + namespace com.keyman.osk { let Codes = com.keyman.text.Codes; @@ -16,6 +18,7 @@ namespace com.keyman.osk { "text"?: string, "sp"?: ButtonClass, "width"?: string, + "layer"?: string, // Key derives any modifiers from the value set here if specified, not the actual display layer. "nextlayer"?: string, "pad"?: string, "sk"?: LayoutKey[] @@ -108,12 +111,13 @@ namespace com.keyman.osk { /** * Build a default layout for keyboards with no explicit layout * - * @param {Object} PVK keyboard object (as loaded) - * @param {number} kbdBitmask keyboard modifier bitmask + * @param {Object} PVK keyboard object (as loaded) + * @param {Object} kbdDevVersion object representing the version of Developer that compiled the keyboard + * @param {number} kbdBitmask keyboard modifier bitmask * @param {string} formFactor * @return {Object} */ - static buildDefaultLayout(PVK, kbdBitmask: number, formFactor: string): LayoutFormFactor { + static buildDefaultLayout(PVK, kbdDevVersion: utils.Version, kbdBitmask: number, formFactor: string): LayoutFormFactor { let keyman = com.keyman.singleton; let util = keyman.util; @@ -247,9 +251,9 @@ namespace com.keyman.osk { if(kx >= 0 && kx < layerSpec.length) key['text']=layerSpec[kx]; } - // Fall back to US English keycap text as default for the base two layers if not otherwise defined. - // (Any 'ghost' keys must be explicitly defined in layout for these layers.) - if(isDefault) { + // Legacy (pre 12.0) behavior: fall back to US English keycap text as default for the base two layers + // if a key cap is not otherwise defined. (Any intentional 'ghost' keys must be explicitly defined.) + if(isDefault && kbdDevVersion.precedes(utils.Version.NO_DEFAULT_KEYCAPS)) { if(key['id'] != 'K_SPACE' && kx+65 * isShift < Layouts.dfltText.length && key['text'] !== null) { key['text'] = key['text'] || Layouts.dfltText[kx+65*isShift]; } diff --git a/web/source/osk/oskManager.ts b/web/source/osk/oskManager.ts index 04a8fef16b0d2871032c6a8df3dbec91df1b9216..cc06d14cfeead762667c6f004365b1f2e6951ca9 100644 --- a/web/source/osk/oskManager.ts +++ b/web/source/osk/oskManager.ts @@ -167,7 +167,7 @@ namespace com.keyman.osk { this._Visible = false; // I3363 (Build 301) var s = this._Box.style; - s.zIndex='9999'; s.display='none'; s.width='auto'; + s.zIndex='9999'; s.display='none'; s.width= device.touchable ? '100%' : 'auto'; s.position = (device.formFactor == 'desktop' ? 'absolute' : 'fixed'); // Use smaller base font size for mobile devices @@ -1001,7 +1001,7 @@ namespace com.keyman.osk { * @return {number} height in pixels */ getBannerHeight(): number { - return this.banner.height; + return (this.banner != null) ? this.banner.height : 0; } /** @@ -1303,7 +1303,7 @@ namespace com.keyman.osk { Ls.left=Ls.bottom='0px'; let vkbdHeight = ( this.vkbd.kbdDiv.firstChild).style.height; vkbdHeight = vkbdHeight.substr(0, vkbdHeight.indexOf('px')); - Ls.height=Ls.maxHeight= (parseInt(vkbdHeight, 10) + this.getBannerHeight()) + 'px'; + Ls.height=Ls.maxHeight= (this.getBannerHeight() + parseInt(vkbdHeight, 10) + 5 /* kmw-banner-bar top in css */) + 'px'; Ls.border='none'; Ls.borderTop='1px solid gray'; @@ -1460,6 +1460,10 @@ namespace com.keyman.osk { this._Box.removeEventListener('transitionend', this.hideNow, false); this._Box.removeEventListener('webkitTransitionEnd', this.hideNow, false); + if(document.body.className.indexOf('osk-always-visible') >= 0) { + return; + } + var os=this._Box.style; os.display='none'; os.opacity='1'; diff --git a/web/source/osk/visualKeyboard.ts b/web/source/osk/visualKeyboard.ts index a9257d0e717379d0d34e6a196cb96e95c80488c7..663f1e9d71fd716d0f41858ecc78e2df405ed774 100644 --- a/web/source/osk/visualKeyboard.ts +++ b/web/source/osk/visualKeyboard.ts @@ -1,4 +1,5 @@ -/// +/// +/// namespace com.keyman.osk { let Codes = com.keyman.text.Codes; @@ -7,7 +8,7 @@ namespace com.keyman.osk { ['key']: OSKKey; ['keyId']: string; ['subKeys']?: OSKKeySpec[]; - + constructor(keyData: OSKKey, keyId: string) { this['key'] = keyData; this['keyId'] = keyId; @@ -19,7 +20,7 @@ namespace com.keyman.osk { // Many thanks to https://www.typescriptlang.org/docs/handbook/advanced-types.html for this. function link(elem: HTMLDivElement, data: KeyData): KeyElement { let e = elem; - + // Merges all properties and methods of KeyData onto the underlying HTMLDivElement, creating a merged class. for(let id in data) { if(!e.hasOwnProperty(id)) { @@ -44,7 +45,7 @@ namespace com.keyman.osk { //#endregion //#region OSK key objects and construction - export class OSKKeySpec { + export class OSKKeySpec implements LayoutKey { id: string; text?: string; sp?: number | ButtonClass; @@ -69,8 +70,8 @@ namespace com.keyman.osk { export abstract class OSKKey { spec: OSKKeySpec; - /** - * The layer of the OSK on which the key is displayed. + /** + * The layer of the OSK on which the key is displayed. */ readonly layer: string; @@ -83,10 +84,10 @@ namespace com.keyman.osk { /** * Uses canvas.measureText to compute and return the width of the given text of given font in pixels. - * + * * @param {String} text The text to be rendered. * @param {String} style The CSSStyleDeclaration for an element to measure against, without modification. - * + * * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393 * This version has been substantially modified to work for this particular application. */ @@ -159,7 +160,7 @@ namespace com.keyman.osk { protected renameSpecialKey(oldText: string): string { let keyman = (window['keyman']) // If a 'special key' mapping exists for the text, replace it with its corresponding special OSK character. - return VisualKeyboard.specialCharacters[oldText] ? + return VisualKeyboard.specialCharacters[oldText] ? String.fromCharCode(0XE000 + VisualKeyboard.specialCharacters[oldText]) : oldText; } @@ -229,7 +230,7 @@ namespace com.keyman.osk { // Add the RTL marker to ensure it displays properly. keyText = '\u200f' + keyText; } - + // Recompute the new width for use in autoscaling calculations below, just in case. width = OSKKey.getTextWidth(osk, keyText, styleSpec); } @@ -332,7 +333,7 @@ namespace com.keyman.osk { ks.width=this.objectGeometry(spec['widthpc']); let originalPercent = totalPercent; - + let btnEle=util._CreateElement('div'); let btn = link(btnEle, new KeyData(this, spec['id'])); @@ -388,13 +389,13 @@ namespace com.keyman.osk { } else { btn['subKeys']=null; } - + // Add text to button and button to placeholder div kDiv.appendChild(btn); // Prevent user selection of key captions //t.style.webkitUserSelect='none'; - + // The 'return value' of this process. return {element: kDiv, percent: totalPercent - originalPercent}; } @@ -404,7 +405,7 @@ namespace com.keyman.osk { if(unit == '%') { return v + unit; } else { // unit == 'px' - return Math.round(v)+unit; + return (Math.round(v*100)/100)+unit; // round to 2 decimal places, making css more readable } } } @@ -510,7 +511,12 @@ namespace com.keyman.osk { '*RCtrlShift*': 0x70 }; - private layout: LayoutFormFactor; + /** + * Contains layout properties corresponding to the OSK's layout. Needs to be public + * so that its geometry may be updated on rotations and keyboard resize events, as + * said geometry needs to be accurate for fat-finger probability calculations. + */ + layout: ActiveLayout; layers: LayoutLayer[]; layerId: string = "default"; layerIndex: number; @@ -529,6 +535,7 @@ namespace com.keyman.osk { ddOSK: boolean = false; popupVisible: boolean; keyPending: KeyElement; + touchPending: Touch; deleteKey: KeyElement; deleting: number; // Tracks a timer id for repeated deletions. nextLayer: string; @@ -563,14 +570,13 @@ namespace com.keyman.osk { createKeyTip: () => void; addCallout: (key: KeyElement) => HTMLDivElement = this.addCallout || function(key) {return null}; waitForFonts: (kfd,ofd) => boolean = this.waitForFonts || function(kfd,ofd){return true;}; // Default is used by embedded. - adjustHeights: () => boolean; //#region OSK constructor and helpers /** * @param {Object} PVK Visual keyboard name * @param {Object} Lhelp true if OSK defined for this keyboard - * @param {Object} layout0 + * @param {Object} layout0 * @param {Number} kbdBitmask Keyboard modifier bitmask * Description Generates the base visual keyboard element, prepping for attachment to KMW */ @@ -578,6 +584,7 @@ namespace com.keyman.osk { let keyman = com.keyman.singleton; let util = keyman.util; + let formFactor = util.device.formFactor; let layout=layout0; var Lkbd=util._CreateElement('div'), oskWidth;//s=Lkbd.style, @@ -585,16 +592,26 @@ namespace com.keyman.osk { // Build a layout using the default for the device if(typeof layout != 'object' || layout == null) { - layout=Layouts.buildDefaultLayout(PVK,kbdBitmask,util.device.formFactor); + var kbdDevVersion: utils.Version; + + // This CAN be called with no backing keyboard; KMW will try to force-show + // the OSK even without a backing keyboard on mobile, using the default + // layout as the OSK's base. + if(activeKeyboard) { + kbdDevVersion = new utils.Version(activeKeyboard['KVER']); + } else { + kbdDevVersion = new utils.Version(keyman['version']); + } + layout=Layouts.buildDefaultLayout(PVK, kbdDevVersion, kbdBitmask, formFactor); } // Create the collection of HTML elements from the device-dependent layout object - this.layout=layout; + this.layout = ActiveLayout.polyfill(layout, formFactor); this.layers=layout['layer']; // Override font if specified by keyboard if('font' in layout) { - this.fontFamily=layout['font']; + this.fontFamily=layout['font']; } else { this.fontFamily=''; } @@ -622,7 +639,7 @@ namespace com.keyman.osk { * @return {Object} An object that contains default key properties */ getDefaultKeyObject(): OSKKeySpec { - return new OSKKeySpec(undefined, '', '100', '0', null, '15'); + return new OSKKeySpec(undefined, '', ActiveKey.DEFAULT_KEY.width, ActiveKey.DEFAULT_KEY.sp as ButtonClass, null, ActiveKey.DEFAULT_KEY.pad); }; /** @@ -635,10 +652,9 @@ namespace com.keyman.osk { deviceDependentLayout(layout: LayoutFormFactor, formFactor: string): HTMLDivElement { let util = com.keyman.singleton.util; let oskManager = com.keyman.singleton.osk; - let bannerHeight = oskManager.banner.height; let rowsPercent = 100; - var lDiv=util._CreateElement('div'), ls=lDiv.style, actualHeight=0; + var lDiv=util._CreateElement('div'), ls=lDiv.style, totalHeight=0; // Set OSK box default style lDiv.className='kmw-key-layer-group'; @@ -647,9 +663,9 @@ namespace com.keyman.osk { switch(formFactor) { case 'phone': case 'tablet': - actualHeight=oskManager.getHeight(); - ls.height=actualHeight+'px'; - rowsPercent = Math.round(100*oskManager.getKeyboardHeight()/actualHeight ); + totalHeight=oskManager.getHeight(); + ls.height=totalHeight+'px'; + rowsPercent = Math.round(100*oskManager.getKeyboardHeight()/totalHeight ); break; } @@ -721,13 +737,11 @@ namespace com.keyman.osk { // Not to mention, it's rather redundant. lDiv.addEventListener('touchstart', this.touch, true); // The listener below fails to capture when performing automated testing checks in Chrome emulation unless 'true'. - lDiv.addEventListener('touchend', this.release,true); + lDiv.addEventListener('touchend', this.release,true); lDiv.addEventListener('touchmove', this.moveOver,false); //lDiv.addEventListener('touchcancel', osk.cancel,false); //event never generated by iOS } - ActiveLayout.polyfill(layout, formFactor); - for(n=0; n keys[j]).proportionalX = (totalPercent + padPercent + (keyPercent/2))/objectWidth; + ( keys[j]).proportionalWidth = keyPercent / objectWidth; + totalPercent += padPercent+keyPercent; } // Allow for right OSK margin (15 layout units) - totalPercent += Math.round(15*objectWidth/row.totalWidth); + let rightMargin = ActiveKey.DEFAULT_RIGHT_MARGIN*objectWidth/layer.totalWidth; + totalPercent += rightMargin; // If a single key, and padding is negative, add padding to right align the key if(keys.length == 1 && parseInt(keys[0]['pad'],10) < 0) { - keyPercent = Math.round(keys[0]['widthpc'] * objectWidth); //Math.round(parseInt(keys[0]['width'],10)*objectWidth/totalWidth); + keyPercent = keys[0]['widthpc'] * objectWidth; keys[0]['widthpc']=keyPercent; totalPercent += keyPercent; keys[0]['padpc']=(objectWidth-totalPercent); + + // Recompute center's x-coord with exact, in-browser values. + ( keys[0]).proportionalX = (totalPercent - rightMargin - keyPercent/2)/objectWidth; + ( keys[0]).proportionalWidth = keyPercent / objectWidth; } else if(keys.length > 0) { j=keys.length-1; - padPercent = Math.round(keys[j]['padpc'] * objectWidth); //Math.round(parseInt(keys[j]['pad'],10)*objectWidth/totalWidth); + padPercent = keys[j]['padpc'] * objectWidth; keys[j]['padpc']=padPercent; totalPercent += padPercent; - keys[j]['widthpc']=(objectWidth-totalPercent); + keys[j]['widthpc']= keyPercent = (objectWidth-totalPercent); + + // Recompute center's x-coord with exact, in-browser values. + ( keys[j]).proportionalX = (objectWidth - rightMargin - keyPercent/2)/objectWidth; + ( keys[j]).proportionalWidth = keyPercent / objectWidth; } //Create the key square (an outer DIV) for each key element with padding, and an inner DIV for the button (btn) totalPercent=0; for(j=0; j 0) { @@ -915,6 +978,7 @@ namespace com.keyman.osk { this.highlightKey(this.keyPending,false); this.clearPopup(); this.keyPending = null; + this.touchPending = null; } } @@ -940,10 +1004,12 @@ namespace com.keyman.osk { // Output character unless moved off key if(this.keyPending.className.indexOf('hidden') < 0 && tc > 0 && !beyondEdge) { - Processor.clickKey(this.keyPending); + let touchProbabilities = this.getTouchProbabilities(e.changedTouches[0]); + Processor.clickKey(this.keyPending, e.changedTouches[0], this.layerId, touchProbabilities); } this.clearPopup(); this.keyPending = null; + this.touchPending = null; // Always clear highlighting of current target on release (multi-touch) } else { var tt = e.changedTouches[0]; @@ -955,12 +1021,6 @@ namespace com.keyman.osk { this.highlightKey(t,false); } - - // Clear repeated backspace if active - if(this.deleting) { - window.clearTimeout(this.deleting); - } - this.deleting = 0; }.bind(this); /** @@ -980,8 +1040,9 @@ namespace com.keyman.osk { e.stopPropagation(); } - // Do not attempt to support reselection of target key for overlapped keystrokes - if(e.touches.length > 1 || this.touchCount == 0) { + // Shouldn't be possible, but just in case. + if(this.touchCount == 0) { + this.cancelDelete(); return; } @@ -990,10 +1051,10 @@ namespace com.keyman.osk { y=typeof e.touches == 'object' ? e.touches[0].clientY : e.clientY; // Move target key and highlighting - var t = e.changedTouches[0], + var t = this.touchPending = e.changedTouches[0], t1 = document.elementFromPoint(x,y), key0 = this.keyPending, - key1 = this.keyTarget(t1); + key1 = this.keyTarget(t1); // Not only gets base keys, but also gets popup keys! // Find the nearest key to the touch point if not on a visible key if((key1 && key1.className.indexOf('key-hidden') >= 0) || @@ -1002,11 +1063,14 @@ namespace com.keyman.osk { } // Stop repeat if no longer on BKSP key - if(key1 && (typeof key1.id == 'string') && (key1.id.indexOf('BKSP') < 0)) { - if(this.deleting) { - window.clearTimeout(this.deleting); - } - this.deleting = 0; + if(key1 && (typeof key1.id == 'string') && (key1.id.indexOf('-K_BKSP') < 0)) { + this.cancelDelete(); + } + + // Do not attempt to support reselection of target key for overlapped keystrokes. + // Perform _after_ ensuring possible sticky keys have been cancelled. + if(e.touches.length > 1) { + return; } // Do not move over keys if device popup visible @@ -1016,24 +1080,28 @@ namespace com.keyman.osk { this.highlightKey(key0,false); } this.keyPending=null; + this.touchPending=null; } else { if(key1 == this.popupBaseKey) { if(!util.hasClass(key1,'kmw-key-touched')) { this.highlightKey(key1,true); } this.keyPending = key1; + this.touchPending = e.touches[0]; } else { if(key0) { this.highlightKey(key0,false); } this.keyPending = null; + this.touchPending = null; } } return; } - // Use the popup duplicate of the base key if a phone with a visible popup array var sk=document.getElementById('kmw-popup-keys'); + + // Use the popup duplicate of the base key if a phone with a visible popup array if(sk && sk.style.visibility == 'visible' && util.device.formFactor == 'phone' && key1 == this.popupBaseKey) { key1 = sk.childNodes[0].firstChild; } @@ -1042,7 +1110,7 @@ namespace com.keyman.osk { this.currentTarget = key1; // Clear previous key highlighting - if(key0 && key1 && (key1.id != key0.id)) { + if(key0 && key1 && key1 !== key0) { this.highlightKey(key0,false); } @@ -1050,20 +1118,28 @@ namespace com.keyman.osk { this.highlightSubKeys(key1,x,y); if(sk && sk.style.visibility == 'visible') { + // Once a subkey array is displayed, do not allow changing the base key. + // Keep that array visible and accept no other options until the touch ends. if(key1 && key1.id.indexOf('popup') < 0 && key1 != this.popupBaseKey) { return; } + + // Highlight the base key on devices that do not append it to the subkey array. if(key1 && key1 == this.popupBaseKey && key1.className.indexOf('kmw-key-touched') < 0) { this.highlightKey(key1,true); } // Cancel touch if moved up and off keyboard, unless popup keys visible } else { - let _Box = com.keyman.singleton.osk._Box; - var yMin = Math.max(5, _Box.offsetTop - 0.25*_Box.offsetHeight); - if(key0 && e.touches[0].pageY < Math.max(5,_Box.offsetTop - 0.25*_Box.offsetHeight)) { + // _Box has (most of) the useful client values. + let _Box = this.kbdDiv.offsetParent as HTMLElement; // == osk._Box + let height = (this.kbdDiv.firstChild as HTMLElement).offsetHeight; // firstChild == layer-group, has height info. + // We need to adjust the offset properties by any offsets related to the active banner. + var yMin = Math.max(5, this.kbdDiv.offsetTop + _Box.offsetTop - 0.25*height); + if(key0 && e.touches[0].pageY < yMin) { this.highlightKey(key0,false); this.showKeyTip(null,false); this.keyPending = null; + this.touchPending = null; } } @@ -1071,6 +1147,7 @@ namespace com.keyman.osk { // Do not replace a null target, as that indicates the key has already been released if(key1 && this.keyPending) { this.keyPending = key1; + this.touchPending = e.touches[0]; } if(this.keyPending) { @@ -1165,12 +1242,18 @@ namespace com.keyman.osk { } x1 = childNode.offsetLeft; x2 = x1 + childNode.offsetWidth; - dx =x1 - x; + if(x >= x1 && x <= x2) { + // Within the key square + return childNode.firstChild; + } + dx = x1 - x; if(dx >= 0 && dx < dxMin) { + // To right of key k0 = k; dxMin = dx; } dx = x - x2; if(dx >= 0 && dx < dxMin) { + // To left of key k0 = k; dxMin = dx; } } @@ -1203,6 +1286,18 @@ namespace com.keyman.osk { this.deleting = window.setTimeout(this.repeatDelete,100); } }.bind(this); + + /** + * Cancels any active repeatDelete() timeouts, ensuring that + * repeating backspace operations are properly terminated. + */ + cancelDelete() { + // Clears the delete-repeating timeout. + if(this.deleting) { + window.clearTimeout(this.deleting); + } + this.deleting = 0; + } //#endregion // cancel = function(e) {} //cancel event is never generated by iOS @@ -1231,7 +1326,7 @@ namespace com.keyman.osk { } layer=this.layers[n]; - + // Set the on/off state of any visible state keys. var states = ['K_CAPS', 'K_NUMLOCK', 'K_SCROLL']; var keys = [layer.capsKey, layer.numKey, layer.scrollKey]; @@ -1259,13 +1354,13 @@ namespace com.keyman.osk { setButtonClass(key, btn, layout?) { let keyman = com.keyman.singleton; var n=0, keyTypes=['default','shift','shift-on','special','special-on','','','','deadkey','blank','hidden']; - if(typeof key['dk'] == 'string' && key['dk'] == '1') { + if(typeof key['dk'] == 'string' && key['dk'] == '1') { n=8; } if(typeof key['sp'] == 'string') { n=parseInt(key['sp'],10); - } + } if(n < 0 || n > 10) { n=0; @@ -1304,7 +1399,7 @@ namespace com.keyman.osk { } this.popupBaseKey = null; } - + //#region 'native'-mode subkey handling /** * Display touch-hold array of 'sub-keys' above the currently touched key @@ -1319,7 +1414,7 @@ namespace com.keyman.osk { let keyman = com.keyman.singleton; let util = keyman.util; let device = util.device; - + // A tag we directly set on a key element during its construction. let subKeySpec: OSKKeySpec[] = e['subKeys']; @@ -1370,7 +1465,7 @@ namespace com.keyman.osk { let keyGenerator = new com.keyman.osk.OSKSubKey(subKeySpec[i], e['key'].layer); let kDiv = keyGenerator.construct(this, e, needsTopMargin); - + subKeys.appendChild(kDiv); } @@ -1424,8 +1519,8 @@ namespace com.keyman.osk { if(e && typeof(e.id) != 'undefined') { //TODO: refactor this, it's pretty messy... - var i, - idx = e.id.split('-'), + var i, + idx = e.id.split('-'), baseId = e['keyId'], layer = e['key'].spec['layer'], sp = e['key'].spec['sp'], @@ -1470,11 +1565,11 @@ namespace com.keyman.osk { } try { - var t= this.spaceBar.firstChild.firstChild; + var t= this.spaceBar.firstChild; let tParent = t.parentNode; if(typeof(tParent.className) == 'undefined' || tParent.className == '') { tParent.className='kmw-spacebar'; - } else { + } else if(tParent.className.indexOf('kmw-spacebar') == -1) { tParent.className +=' kmw-spacebar'; } @@ -1710,10 +1805,148 @@ namespace com.keyman.osk { } } } - + return false; } + /** + * Adjust the absolute height of each keyboard element after a rotation + * + **/ + adjustHeights() { + let keyman = com.keyman.singleton; + let _Box = keyman.osk._Box; + let device = keyman.util.device; + + if(!_Box || !this.kbdDiv || !this.kbdDiv.firstChild || !this.kbdDiv.firstChild.firstChild.childNodes) { + return false; + } + + var fs=1.0; + // TODO: Logically, this should be needed for Android, too - may need to be changed for the next version! + if(device.OS == 'iOS' && !keyman.isEmbedded) { + fs=fs/keyman.util.getViewportScale(); + } + + let oskHeight = this.computedAdjustedOskHeight(); + + var b: HTMLElement = _Box, bs=b.style; + bs.height=bs.maxHeight=oskHeight+'px'; + + b = b.childNodes.item(1).firstChild; + bs=b.style; + // Sets the layer group to the correct height. + bs.height=bs.maxHeight=oskHeight+'px'; + bs.fontSize=fs+'em'; + + this.adjustLayerHeights(oskHeight); + + return true; + } + + private computedAdjustedOskHeight(): number { + let oskManager = com.keyman.singleton.osk; + let device = com.keyman.singleton.util.device; + + var layers=this.kbdDiv.firstChild.childNodes; + let kbdHeight = oskManager.getKeyboardHeight(); + let oskHeight = 0; + + // In case the keyboard's layers have differing row counts, we check them all for the maximum needed oskHeight. + for(let i = 0; i < layers.length; i++) { + let nRows = layers[i].childNodes.length; + let rowHeight = Math.floor(kbdHeight/(nRows == 0 ? 1 : nRows)); + let layerHeight = nRows * rowHeight; + + if(layerHeight > oskHeight) { + oskHeight = layerHeight; + } + } + + // This isn't set anywhere else; it's a legacy part of the original methods. + const oskPad = 0; + let oskPaddedHeight = oskHeight + oskPad; + + if(device.OS == 'Android' && 'devicePixelRatio' in window) { + oskPaddedHeight /= window.devicePixelRatio; + } + + return oskPaddedHeight; + } + + private adjustLayerHeights(oskHeight: number) { + let oskManager = com.keyman.singleton.osk; + let device = com.keyman.singleton.util.device; + let layers = this.kbdDiv.firstChild.childNodes; + + for(let nLayer=0;nLayer layers[nLayer]).style.height=(oskHeight)+'px'; + + let rowHeight = Math.floor(oskManager.getKeyboardHeight()/(nRows == 0 ? 1 : nRows)); + + if(device.OS == 'Android' && 'devicePixelRatio' in window) { + layer.style.height = layer.style.maxHeight = oskHeight + 'px'; + rowHeight /= window.devicePixelRatio; + } + + // Sets the layers to the correct height + let rowPad = Math.round(0.15*rowHeight); + + for(let nRow=0; nRow layers[nLayer].childNodes[nRow]).style; + let bottom = (nRows-nRow-1)*rowHeight+1; + rs.bottom=bottom+'px'; + rs.maxHeight=rs.height=rowHeight+'px'; + + // Calculate the exact vertical coordinate of the row's center. + this.layout.layer[nLayer].row[nRow].proportionalY = ((oskHeight - bottom) - rowHeight/2) / oskHeight; + + let keys=layers[nLayer].childNodes[nRow].childNodes as NodeListOf; + this.adjustRowHeights(keys, rowHeight, bottom, rowPad); + } + } + } + + private adjustRowHeights(keys: NodeListOf, rowHeight: number, bottom: number, pad: number) { + let util = com.keyman.singleton.util; + let device = util.device; + + let resizeLabels = (device.OS == 'iOS' && device.formFactor == 'phone' && util.landscapeView()); + + let nKeys=keys.length; + for(let nKey=0;nKey 0)) { + (key.childNodes[0] as HTMLElement).style.fontSize='6px'; + } + } + } + // /** // * Function _VKeyGetTarget // * Scope Private @@ -1887,7 +2120,8 @@ namespace com.keyman.osk { // Else get a default layout for the device for this keyboard if(layout == null && PVK != null) { - layout=Layouts.buildDefaultLayout(PVK,keymanweb.keyboardManager.getKeyboardModifierBitmask(PKbd),formFactor); + let kbdDevVersion = new utils.Version(PKbd['KVER']); + layout=Layouts.buildDefaultLayout(PVK, kbdDevVersion, keymanweb.keyboardManager.getKeyboardModifierBitmask(PKbd),formFactor); } // Cannot create an OSK if no layout defined, just return empty DIV diff --git a/web/source/resources/osk/kmwosk.css b/web/source/resources/osk/kmwosk.css index 5bc8a176e5e3e6f0243a470741b914a23acc24a8..dfbb0a279375a7ef63aedefdaab8b29be90e59d4 100644 --- a/web/source/resources/osk/kmwosk.css +++ b/web/source/resources/osk/kmwosk.css @@ -20,7 +20,7 @@ /* kmw-key-square applies only to OSK key elements, kmw-key-square-ex applies only to popup key elements */ .phone.kmw-osk-frame{position:fixed;left:0;bottom:0;width:100%;height:144px;overflow-y:visible; - background-color:rgba(0,0,0,0.8);-webkit-user-select:none;} + -webkit-user-select:none;} .phone .kmw-osk-inner-frame{margin:0;background:transparent;} .phone .kmw-key-layer-group{position:fixed;left:0;bottom:0;width:100%;margin:0;padding:1px 0;border:none;background-color:#999999;} .phone .kmw-key-layer{position:fixed;left:0;bottom:0;width:100%;height:100%;margin:0;padding:0;background-color:transparent;overflow:hidden;} @@ -32,6 +32,21 @@ box-shadow: 0px -1px 1px 0px rgba(0,0,0,1) inset; } +.phone .kmw-suggestion-text, +.tablet .kmw-suggestion-text { + color: #000; + text-align: center; + display: block; + line-height: normal; + position: relative; + top: 50%; + transform: translateY(-50%); +} + +.tablet .kmw-suggestion-text { + font-size: 0.75em; +} + .phone.windows .kmw-key-row{max-width:80%;} .phone.windows .kmw-key {position:static;} @@ -49,9 +64,33 @@ .phone.ios .kmw-key.kmw-key-special-on {color:#000;background-color:#fdfdfe;} .phone.ios .kmw-key.kmw-key-touched {background-color:#88f;} -.phone.ios .kmw-banner-bar {background-color: #cfd3d9; height: 40px; width: 100%;} -.phone.ios .kmw-banner-bar span {background-color: #cfd3d9; display:inline-block; vertical-align: middle;} -.phone.ios .kmw-suggestion-text {color:#000; background-color:#fdfdfe; text-align: center;} +.ios .kmw-banner-bar { + background-color: #cfd3d9; + position: absolute; + top: 6px; + height: 100%; + width: 100%; +} + +.ios .kmw-banner-bar .kmw-suggest-option { + background-color: #fdfdfe; + display:inline-block; + text-align: center; + border-radius: 5px; + border-bottom: solid 1px #8a8d90; + vertical-align: top; +} + +.ios .kmw-suggestion-text { + color: #000; +} + +.phone.ios .kmw-suggest-option.kmw-suggest-touched {background-color:#88f;} + +.phone.ios.kmw-osk-frame, +.tablet.ios.kmw-osk-frame { + background-color: #cfd3d9; +} .phone.android .kmw-key-layer-group {background-color: #333;} .phone.android .kmw-key {border: none; border-bottom: solid 1px #8a8d90; box-shadow:none; border-radius: 3px;} @@ -65,9 +104,29 @@ .phone.android .kmw-key.kmw-spacebar.kmw-key-touched {background-color: #bbb;} .phone.android .kmw-spacebar-caption {color: #aaa;} -.phone.android .kmw-banner-bar {background-color: #222; height: 40px; width: 100%;} -.phone.android .kmw-banner-bar span {background-color: #333; display:inline-block; vertical-align: middle;} -.phone.android .kmw-suggestion-text {color:#ffff; background-color: #222; text-align: center;} +.phone.android.kmw-osk-frame { background-color: #222;} + +.phone.android .kmw-banner-bar { + background-color: #222; + position: absolute; + top: 4px; + height: 100%; + width: 100%; +} + +.phone.android .kmw-banner-bar .kmw-suggest-option { + background-color: #333; + display:inline-block; + text-align: center; + border-radius: 5px; + vertical-align: top; +} + +.phone.android .kmw-suggestion-text { + color:#fff; +} + +.phone.android .kmw-suggest-option.kmw-suggest-touched {background-color:#bbb;} .tablet.kmw-osk-frame{position:fixed;left:0;bottom:0;width:100%;height:144px;overflow-y:visible; background-color:rgba(0,0,0,0.8);-webkit-user-select:none;} @@ -77,7 +136,7 @@ .tablet .kmw-key-row {position:fixed;width:100%;height:20%;margin:0;padding:0;border:none;overflow:hidden;} .tablet .kmw-key-square {position:fixed; display:inline-block; height:100%; max-height:100%; overflow:hidden; margin:0 0 0 0; z-index: 10000; padding:0 0 0 0; background-color:transparent;cursor:default; border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)} .tablet .kmw-key-square-ex {display:inline-block;box-sizing:border-box;margin:0 0 0 5px;z-index:10001; padding:0; background-color:transparent; cursor:default;} -.tablet .kmw-key {display:block;position:fixed;margin:2px;border-radius:8px;text-align:center;box-sizing:border-box;overflow:visible; +.tablet .kmw-key {display:block;position:fixed;margin:0px;border-radius:8px;text-align:center;box-sizing:border-box;overflow:visible; border:solid 2px #999999; box-shadow: 0px -1px 1px 0px rgba(0,0,0,1) inset; } @@ -94,9 +153,7 @@ .tablet.ios .kmw-key.kmw-key-special-on {color:#000;background-color:#fdfdfe;} .tablet.ios .kmw-key.kmw-key-touched {background-color:#88f;} -.tablet.ios .kmw-banner-bar {background-color: #cfd3d9} -.tablet.ios .kmw-banner-bar span {background-color: #cfd3d9; display:inline-block; vertical-align:middle;} -.tablet.ios .kmw-suggestion-text {color:#000; background-color:#fdfdfe; text-align: center;} +.tablet.ios .kmw-suggest-option.kmw-suggest-touched {background-color:#88f;} .tablet .kmw-key-row {-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);} @@ -112,9 +169,26 @@ .tablet.android .kmw-key.kmw-spacebar.kmw-key-touched {background-color: #777;} .tablet.android .kmw-spacebar-caption {color: #888;} -.tablet.android .kmw-banner-bar {background-color: #b4b4b8; height: 40px; width: 100%;} -.tablet.android .kmw-banner-bar span {background-color: #b4b4b8; display:inline-block; vertical-align: middle;} -.tablet.android .kmw-suggestion-text {color:#77f; background-color: #b4b4b8; text-align: center;} +.tablet.android .kmw-banner-bar { + background-color: #b4b4b8; + position: absolute; + top: 4px; + height: 100%; + width: 100%; +} + +.tablet.android .kmw-banner-bar .kmw-suggest-option { + background-color: #b4b4b8; + display:inline-block; + text-align: center; + border-radius: 5px; + vertical-align: top; +} + +.tablet.android .kmw-suggestion-text { + color:#77f; +} +.tablet.android .kmw-suggest-option.kmw-suggest-touched {background-color:#777;} /* Vertical centering of text labels on keys */ .kmw-key {text-align:center; white-space:nowrap;} @@ -155,11 +229,9 @@ .kmw-title-bar-actions{position: absolute; cursor: default; right:2px; top:0; width: 33px; height: 13px;} .kmw-footer-caption{color:#fff;font:0.7em Arial;margin:0 0 0 4px;} - -.kmw-banner-bar{height:40px; width:100%; margin:0; background-color:darkorange;} -.kmw-banner-bar span {background-color: orange; display:inline-block; vertical-align: middle;} -.kmw-suggestion-text{color:#ffff; background-color: orange; text-align: center;} - +.kmw-banner-bar{height:100%; width:100%; margin:0; background-color:darkorange; display: inline-block;} +.kmw-banner-bar .kmw-suggest-option {background-color: orange; display:inline-block; text-align: center; height: 85%; border-radius: 5px;overflow-x:scroll} +.kmw-suggestion-text{color:#fff; line-height: normal; position: relative; vertical-align: middle;} .kmw-footer-resize{cursor:se-resize;position:absolute;right:2px;bottom:2px;width:16px;height:16px;overflow:hidden; font-family:SpecialOSK;color:white;} @@ -321,24 +393,3 @@ div.android #keytip {background-color:#f00;} .tablet-static .kmw-key-label{position:absolute;left:2px;top:2px;font:0.5em Arial;color:#888;background-color:transparent;} .tablet-static .kmw-key-text{position:relative;left:2px;top:2px;} -.kmw-embedded .ios .kmw-key { - left: 0 !important; - bottom: 4px !important; -} - -.kmw-embedded .ios .kmw-key-square { - height: 100% !important; -} - -.kmw-embedded .ios.kmw-osk-frame {top:0 !important;bottom:initial !important; width:100% !important;} - -.kmw-embedded .ios.kmw-osk-frame {position: absolute !important;} - -.kmw-embedded .ios.kmw-osk-frame .kmw-key-layer-group {position: absolute !important; top: 0 !important; bottom: initial !important;} - -.kmw-embedded .ios.kmw-osk-frame .kmw-key-layer {position: absolute !important; top: 0 !important; bottom: initial !important;} - -.kmw-embedded .ios.kmw-osk-frame .kmw-key-square {position: absolute !important;} -.kmw-embedded .ios.kmw-osk-frame .kmw-key-row {position: absolute !important;} -.kmw-embedded .ios.kmw-osk-frame .kmw-key {position: absolute !important;} - diff --git a/web/source/resources/ui/toolbar/world.png b/web/source/resources/ui/toolbar/world.png index 2b380acfb474bc8c81cd9d5aea56d321b2505ffa..1e90c61c38da7aaf0e097b9d1e1895ef73984661 100644 Binary files a/web/source/resources/ui/toolbar/world.png and b/web/source/resources/ui/toolbar/world.png differ diff --git a/web/source/text/codes.ts b/web/source/text/codes.ts index 1c11c98e3e9b49c42ff099a445b3ba1bbf5119c9..c6c3879f11a10d6196962ed3b65fcd292a1d243c 100644 --- a/web/source/text/codes.ts +++ b/web/source/text/codes.ts @@ -58,7 +58,7 @@ namespace com.keyman.text { "K_COLON":186,"K_EQUAL":187,"K_COMMA":188,"K_HYPHEN":189, "K_PERIOD":190,"K_SLASH":191,"K_BKQUOTE":192, "K_LBRKT":219,"K_BKSLASH":220,"K_RBRKT":221, - "K_QUOTE":222,"K_oE2":226, + "K_QUOTE":222,"K_oE2":226,"K_OE2":226, "K_LOPT":50001,"K_ROPT":50002, "K_NUMERALS":50003,"K_SYMBOLS":50004,"K_CURRENCIES":50005, "K_UPPER":50006,"K_LOWER":50007,"K_ALPHA":50008, diff --git a/web/source/text/kbdInterface.ts b/web/source/text/kbdInterface.ts index d5754de151957c1d1010d4f9e24716156cecdcf7..7d8aec4002c0695f74a4aeda5d9af72766cec785 100644 --- a/web/source/text/kbdInterface.ts +++ b/web/source/text/kbdInterface.ts @@ -647,6 +647,11 @@ namespace com.keyman.text { beep(outputTarget: OutputTarget): void { this.resetContextCache(); + // Do not trigger a 'beep' when operating on alternates - the use case of Mocks. + if(outputTarget instanceof Mock) { + return; + } + let keyman = com.keyman.singleton; if ('beepKeyboard' in keyman) { keyman['beepKeyboard'](); @@ -844,7 +849,7 @@ namespace com.keyman.text { let keyman = com.keyman.singleton; // KeymanTouch for Android uses direct insertion of the character string - if('oninserttext' in keyman) { + if('oninserttext' in keyman && !(outputTarget instanceof Mock)) { keyman['oninserttext'](dn,s); } @@ -980,6 +985,11 @@ namespace com.keyman.text { let keyman = com.keyman.singleton; this.resetContextCache(); if(systemId == this.TSS_LAYER) { + // Do not trigger a layer change when operating on alternates - the use case of Mocks. + if(outputTarget instanceof Mock) { + return; + } + // How would this be handled in an eventual headless mode? return keyman.osk.vkbd.showLayer(strValue); //Buld 350, osk reference now OK, so should work } else { @@ -1098,14 +1108,8 @@ namespace com.keyman.text { /** * Legacy entry points (non-standard names)- included only to allow existing IME keyboards to continue to be used */ - ['getLastActiveElement'](): HTMLElement { - let keyman = com.keyman.singleton; - if(!keyman.isHeadless) { - return keyman.domManager.getLastActiveElement(); - } else { - // What are the IMEs looking for with this method? Would an element interface suffice? - return null; - } + ['getLastActiveElement'](): OutputTarget { + return text.Processor.getOutputTarget(); } ['focusLastActiveElement'](): void { @@ -1138,6 +1142,13 @@ namespace com.keyman.text { } } + // Also needed for some legacy CJK keyboards. + ['GetLastActiveElement'] = this['getLastActiveElement']; + ['FocusLastActiveElement'] = this['focusLastActiveElement']; + ['HideHelp'] = this['hideHelp']; + ['ShowHelp'] = this['showHelp']; + ['ShowPinnedHelp'] = this['showPinnedHelp']; + resetContext() { let keyman = com.keyman.singleton; if(!keyman.isHeadless && keyman.osk.vkbd) { @@ -1151,6 +1162,10 @@ namespace com.keyman.text { } this.resetContextCache(); this.resetVKShift(); + + if(keyman.modelManager) { + keyman.modelManager.invalidateContext(); + } if(!keyman.isHeadless) { keyman.osk._Show(); diff --git a/web/source/text/keyEvent.ts b/web/source/text/keyEvent.ts index 4dbeb74020621e64ef17039bcfd1b3ea6d3956df..03142406f436df54a3d05dc86f80afec17b175ad 100644 --- a/web/source/text/keyEvent.ts +++ b/web/source/text/keyEvent.ts @@ -1,4 +1,8 @@ namespace com.keyman.text { + // Represents a probability distribution over a keyboard's keys. + // Defined here to avoid compilation issues. + export type KeyDistribution = {keyId: string, p: number}[]; + /** * This class is defined within its own file so that it can be loaded by code outside of KMW without * having to actually load the entirety of KMW. @@ -12,7 +16,12 @@ namespace com.keyman.text { LisVirtualKey: boolean; vkCode: number; kName: string; - kLayer?: string; + kLayer?: string; // The key's layer property + kbdLayer?: string; // The virtual keyboard's active layer kNextLayer?: string; + // Holds relevant event properties leading to construction of this KeyEvent. + source?: KeyEvent|MouseEvent|Touch; + // Holds a generated fat-finger distribution (when appropriate) + keyDistribution?: KeyDistribution; }; } \ No newline at end of file diff --git a/web/source/text/outputTarget.ts b/web/source/text/outputTarget.ts index 19f85080e6bab4078ec1c89087a075c1548b1f40..fcdf05f0684f895d05beaa4a79b9f03566c82a4a 100644 --- a/web/source/text/outputTarget.ts +++ b/web/source/text/outputTarget.ts @@ -8,7 +8,7 @@ /// namespace com.keyman.text { - class TextTransform implements Transform { + export class TextTransform implements Transform { readonly insert: string; readonly deleteLeft: number; readonly deleteRight?: number; @@ -18,34 +18,40 @@ namespace com.keyman.text { this.deleteLeft = deleteLeft; this.deleteRight = deleteRight || 0; } + + public static readonly nil = new TextTransform('', 0, 0); } export class Transcription { readonly token: number; readonly keystroke: KeyEvent; readonly transform: Transform; + readonly alternates: Alternate[]; readonly preInput: Mock; - // While not presently needed, there's a chance we'll want to have this information tracked - // for developments later down the line. May as well resolve the logic now. - readonly removedDks: Deadkey[]; - readonly insertedDks: Deadkey[]; - private static tokenSeed: number = 0; - constructor(keystroke: KeyEvent, transform: Transform, preInput: Mock, removedDks: Deadkey[], insertedDks: Deadkey[]) { - this.token = Transcription.tokenSeed++; + constructor(keystroke: KeyEvent, transform: Transform, preInput: Mock, alternates: Alternate[]/*, removedDks: Deadkey[], insertedDks: Deadkey[]*/) { + let token = this.token = Transcription.tokenSeed++; this.keystroke = keystroke; this.transform = transform; + this.alternates = alternates; this.preInput = preInput; - this.removedDks = removedDks; - this.insertedDks = insertedDks; this.transform.id = this.token; + + // Assign the ID to each alternate, as well. + if(alternates) { + alternates.forEach(function(alt) { + alt.sample.id = token; + }); + } } } + export type Alternate = ProbabilityMass; + export abstract class OutputTarget { private _dks: text.DeadkeyTracker; @@ -92,7 +98,7 @@ namespace com.keyman.text { * As such, it assumes that the caret is immediately after any inserted text. * @param from An output target (preferably a Mock) representing the prior state of the input/output system. */ - private buildTransformFrom(original: Mock): Transform { + buildTransformFrom(original: OutputTarget): Transform { let to = this.getText(); let from = original.getText(); @@ -120,48 +126,63 @@ namespace com.keyman.text { return new TextTransform(delta, deletedLeft, originalRight - undeletedRight); } - buildTranscriptionFrom(original: Mock, keyEvent: KeyEvent): Transcription { + buildTranscriptionFrom(original: OutputTarget, keyEvent: KeyEvent, alternates?: Alternate[]): Transcription { let transform = this.buildTransformFrom(original); - // While not presently needed, there's a chance we'll want to have Deadkey mutation tracked - // for developments later down the line. May as well resolve the logic now. - - // Determine what deadkeys were removed and added. - let fromDks = original.deadkeys().toSortedArray(); - let toDks = this.deadkeys().toSortedArray(); - - let commonDks: Deadkey[] = []; - let removedDks: Deadkey[] = []; - let insertedDks: Deadkey[] = []; - - // Since the ordinals of any original deadkey are preserved, we can check for the (id, ordinal). - fromDks.forEach(function(dk: Deadkey){ - for(var i=0; i < toDks.length; i++) { - if(toDks[i].d == dk.d && toDks[i].o == dk.o) { - commonDks.push(dk); - return; - } - } + // If we ever decide to re-add deadkey tracking, this is the place for it. - // Wasn't found to be in common? Must have been removed. - removedDks.push(dk); - }); + return new Transcription(keyEvent, transform, Mock.from(original), alternates); + } - toDks.forEach(function(dk: Deadkey) { - for(var i=0; i < commonDks.length; i++) { - if(commonDks[i].d == dk.d && commonDks[i].o == dk.o) { - // It's a common one. - return; - } - } + /** + * Restores the `OutputTarget` to the indicated state. Designed for use with `Transcription.preInput`. + * @param original An `OutputTarget` (usually a `Mock`). + */ + restoreTo(original: OutputTarget) { + // + this.setTextBeforeCaret(original.getTextBeforeCaret()); + this.setTextAfterCaret(original.getTextAfterCaret()); + + // Also, restore the deadkeys! + this._dks = original._dks.clone(); + } + + apply(transform: Transform) { + if(transform.deleteRight) { + this.setTextAfterCaret(this.getTextAfterCaret()._kmwSubstr(transform.deleteRight)); + } + + if(transform.deleteLeft) { + this.deleteCharsBeforeCaret(transform.deleteLeft); + } - // Wasn't found to be in common? Must have been inserted. - insertedDks.push(dk); - }); + if(transform.insert) { + this.insertTextBeforeCaret(transform.insert); + } - return new Transcription(keyEvent, transform, Mock.from(original), removedDks, insertedDks); + // We assume that all deadkeys are invalidated after applying a Transform, since + // prediction implies we'll be completing a word, post-deadkeys. + this._dks.clear(); } + /** + * Helper to `restoreTo` - allows directly setting the 'before' context to that of another + * `OutputTarget`. + * @param s + */ + protected setTextBeforeCaret(s: string): void { + // This one's easy enough to provide a default implementation for. + this.deleteCharsBeforeCaret(this.getTextBeforeCaret()._kmwLength()); + this.insertTextBeforeCaret(s); + } + + /** + * Helper to `restoreTo` - allows directly setting the 'after' context to that of another + * `OutputTarget`. + * @param s + */ + protected abstract setTextAfterCaret(s: string): void; + /** * Returns the underlying element / document modeled by the wrapper. */ @@ -317,5 +338,9 @@ namespace com.keyman.text { this.text = this.getTextBeforeCaret() + s + this.getTextAfterCaret(); this.caretIndex += s.kmwLength(); } + + protected setTextAfterCaret(s: string): void { + this.text = this.getTextBeforeCaret() + s; + } } } \ No newline at end of file diff --git a/web/source/text/prediction/modelManager.ts b/web/source/text/prediction/modelManager.ts index a7c2dad1ebd48f11ca055b47e8372af808682794..89025ce8690c8453c1dd541ea12de95972c5f031 100644 --- a/web/source/text/prediction/modelManager.ts +++ b/web/source/text/prediction/modelManager.ts @@ -47,15 +47,27 @@ namespace com.keyman.text.prediction { } } + export type InvalidateSourceEnum = 'new'|'context'; + /** * Corresponds to the 'invalidatesuggestions' ModelManager event. */ - export type InvalidateSuggestionsHandler = () => boolean; + export type InvalidateSuggestionsHandler = (source: InvalidateSourceEnum) => boolean; + + export class ReadySuggestions { + suggestions: Suggestion[]; + transcriptionID: number; + + constructor(suggestions: Suggestion[], id: number) { + this.suggestions = suggestions; + this.transcriptionID = id; + } + } /** * Corresponds to the 'suggestionsready' ModelManager event. */ - export type ReadySuggestionsHandler = (suggestions: Suggestion[]) => boolean; + export type ReadySuggestionsHandler = (prediction: ReadySuggestions) => boolean; export type ModelChangeEnum = 'loaded'|'unloaded'; /** @@ -63,8 +75,13 @@ namespace com.keyman.text.prediction { */ export type ModelChangeHandler = (state: ModelChangeEnum) => boolean; - type SupportedEventNames = "suggestionsready" | "invalidatesuggestions" | "modelchange"; - type SupportedEventHandler = InvalidateSuggestionsHandler | ReadySuggestionsHandler | ModelChangeHandler; + /** + * Covers both 'tryaccept' and 'tryrevert' events. + */ + export type TryUIHandler = (source: string) => boolean; + + type SupportedEventNames = "suggestionsready" | "invalidatesuggestions" | "modelchange" | "tryaccept" | "tryrevert"; + type SupportedEventHandler = InvalidateSuggestionsHandler | ReadySuggestionsHandler | ModelChangeHandler | TryUIHandler; export class ModelManager { private lmEngine: LMLayer; @@ -74,7 +91,8 @@ namespace com.keyman.text.prediction { private recentTranscriptions: Transcription[] = []; - private _enabled: boolean = true; + private _mayPredict: boolean = true; + private _mayCorrect: boolean = true; // Tracks registered models by ID. private registeredModels: {[id: string]: ModelSpec} = {}; @@ -90,8 +108,15 @@ namespace com.keyman.text.prediction { // Establishes KMW's platform 'capabilities', which limit the range of context a LMLayer // model may expect. let capabilities: Capabilities = { - maxLeftContextCodeUnits: 64 + maxLeftContextCodeUnits: 64, + // Since the apps don't yet support right-deletions. + maxRightContextCodeUnits: keyman.isEmbedded ? 0 : 64 + } + + if(!this.canEnable()) { + return; } + this.lmEngine = new LMLayer(capabilities); // Registers this module for keyboard (language) and model change events. @@ -102,7 +127,7 @@ namespace com.keyman.text.prediction { return this.currentModel; } - private unloadModel() { + public unloadModel() { this.lmEngine.unloadModel(); delete this.currentModel; delete this.configuration; @@ -125,8 +150,9 @@ namespace com.keyman.text.prediction { onKeyboardChange(kbdInfo?: KeyboardChangeData | string) { let keyman = com.keyman.singleton; + let mm: ModelManager = this; - if(!this._enabled) { + if(!this.enabled) { return Promise.resolve(); } @@ -156,7 +182,14 @@ namespace com.keyman.text.prediction { if(loadPromise) { let mm = this; loadPromise.then(function() { - keyman.util.callEvent(ModelManager.EVENT_PREFIX + 'modelchange', 'loaded'); + // Because this is executed from a Promise, it's possible to have a race condition + // where the 'loaded' event triggers after an 'unloaded' event meant to disable the model. + // (Especially in the embedded apps.) This will catch these cases. + if(mm.enabled) { + keyman.util.callEvent(ModelManager.EVENT_PREFIX + 'modelchange', 'loaded'); + } else { + mm.unloadModel(); + } }).catch(function(failReason: any) { // Does this provide enough logging information? console.error("Could not load model '" + model.id + "': " + failReason); @@ -185,6 +218,33 @@ namespace com.keyman.text.prediction { }); } + deregister(modelId: string): void { + let keyman = com.keyman.singleton; + let model: ModelSpec; + + // Remove the model from the id-lookup associative array. + if(this.registeredModels[modelId]) { + model = this.registeredModels[modelId]; + delete this.registeredModels[modelId]; + } else { + return; + } + + // Is it the active model? + if(this.currentModel && this.currentModel.id == modelId) { + this.unloadModel(); + keyman.util.callEvent(ModelManager.EVENT_PREFIX + 'modelchange', 'unloaded'); + } + + // Ensure the model is deregistered for each targeted language code variant. + let mm = this; + model.languages.forEach(function(code: string) { + if(mm.languageModelMap[code].id == modelId) { + delete mm.languageModelMap[code]; + } + }); + } + isRegistered(model: ModelSpec): boolean { return !! this.registeredModels[model.id]; } @@ -215,29 +275,72 @@ namespace com.keyman.text.prediction { return keyman.util.removeEventListener(ModelManager.EVENT_PREFIX + event, func); } - public predict(transcription: Transcription) { + public invalidateContext() { + let keyman = com.keyman.singleton; + + // Signal to any predictive text UI that the context has changed, invalidating recent predictions. + keyman.util.callEvent(ModelManager.EVENT_PREFIX + "invalidatesuggestions", 'context'); + // If there's no active model, there can be no predictions. // We'll also be missing important data needed to even properly REQUEST the predictions. if(!this.currentModel || !this.configuration) { return; } - let context = new TranscriptionContext(transcription.preInput, this.configuration); - this.recordTranscription(transcription); - this.predict_internal(transcription.transform, context); + + this.predict_internal(); } - private predict_internal(transform: Transform, context: Context) { + public wordbreak(target: OutputTarget): Promise { let keyman = com.keyman.singleton; - var promise = this.currentPromise = this.lmEngine.predict(transform, context); + let context = new TranscriptionContext(Mock.from(target), this.configuration); + return this.lmEngine.wordbreak(context); + } + + public predict(transcription?: Transcription) { + let keyman = com.keyman.singleton; + + // If there's no active model, there can be no predictions. + // We'll also be missing important data needed to even properly REQUEST the predictions. + if(!this.currentModel || !this.configuration) { + return; + } + // We've already invalidated any suggestions resulting from any previously-existing Promise - // may as well officially invalidate them via event. - keyman.util.callEvent(ModelManager.EVENT_PREFIX + "invalidatesuggestions", null); + keyman.util.callEvent(ModelManager.EVENT_PREFIX + "invalidatesuggestions", 'new'); + + this.predict_internal(transcription); + } + + /** + * Called internally to do actual predictions after any relevant "invalidatesuggestions" events + * have been raised. + * @param transcription The triggering transcription (if it exists) + */ + private predict_internal(transcription?: Transcription) { + let keyman = com.keyman.singleton; + + if(!transcription) { + let t = text.Processor.getOutputTarget(); + if(t) { + transcription = t.buildTranscriptionFrom(t, null); + } else { + return; + } + } + + let context = new TranscriptionContext(transcription.preInput, this.configuration); + this.recordTranscription(transcription); + + let transform = transcription.transform; + var promise = this.currentPromise = this.lmEngine.predict(transcription.alternates || transcription.transform, context); let mm = this; promise.then(function(suggestions: Suggestion[]) { if(promise == mm.currentPromise) { - keyman.util.callEvent(ModelManager.EVENT_PREFIX + "suggestionsready", suggestions); + let result = new ReadySuggestions(suggestions, transform.id); + keyman.util.callEvent(ModelManager.EVENT_PREFIX + "suggestionsready", result); mm.currentPromise = null; } }) @@ -251,28 +354,99 @@ namespace com.keyman.text.prediction { } } + /** + * Retrieves the context and output state of KMW immediately before the prediction with + * token `id` was generated. Must correspond to a 'recent' one, as only so many are stored + * in `ModelManager`'s history buffer. + * @param id A unique identifier corresponding to a recent `Transcription`. + * @returns The matching `Transcription`, or `null` none is found. + */ + public getPredictionState(id: number): Transcription { + let match = this.recentTranscriptions.filter(function(t: Transcription) { + return t.token == id; + }) + + return match.length == 0 ? null : match[0]; + } + public shutdown() { this.lmEngine.shutdown(); } public get enabled(): boolean { - return this._enabled; + return this._mayPredict; } - public set enabled(flag: boolean) { + private canEnable(): boolean { + let keyman = com.keyman.singleton; + + if(keyman.util.getIEVersion() == 10) { + console.warn("KeymanWeb cannot properly initialize its WebWorker in this version of IE."); + return false; + } else if(keyman.util.getIEVersion() < 10) { + console.warn("WebWorkers are not supported in this version of IE."); + return false; + } + + return true; + } + + private doEnable(flag: boolean) { let keyman = com.keyman.singleton; - this._enabled = flag; if(flag) { let lgCode = keyman.keyboardManager.getActiveLanguage(); - if(this.registeredModels[lgCode]) { + if(this.languageModelMap[lgCode]) { // Just reuse the existing model-change trigger code. this.onKeyboardChange(lgCode); } } else { - this.unloadModel(); + if(this.activeModel) { // We only need to unload a model when one is actually loaded. + this.unloadModel(); + } + + // Ensure that the banner is unloaded. keyman.util.callEvent(ModelManager.EVENT_PREFIX + 'modelchange', 'unloaded'); } } + + public get mayPredict() { + return this._mayPredict; + } + + public set mayPredict(flag: boolean) { + let enabled = this.enabled; + + if(!this.canEnable()) { + return; + } + + this._mayPredict = flag; + if(enabled != this.enabled) { + this.doEnable(flag); + } + } + + public get mayCorrect() { + return this._mayCorrect; + } + + public set mayCorrect(flag: boolean) { + this._mayCorrect = flag; + } + + public tryAcceptSuggestion(source: string): boolean { + let keyman = com.keyman.singleton; + + // Handlers of this event should return 'false' when the 'try' is successful. + return !keyman.util.callEvent(ModelManager.EVENT_PREFIX + 'tryaccept', source); + } + + public tryRevertSuggestion(): boolean { + let keyman = com.keyman.singleton; + + // Handlers of this event should return 'false' when the 'try' is successful. + return !keyman.util.callEvent(ModelManager.EVENT_PREFIX + 'tryrevert', null); + } } } diff --git a/web/source/text/processor.ts b/web/source/text/processor.ts index 1ab9f19fe56c7aec795f7c72f4bc4aaf83c77f03..6e1c93832927307336621eeb8a4ab55f73269f5a 100644 --- a/web/source/text/processor.ts +++ b/web/source/text/processor.ts @@ -38,7 +38,7 @@ namespace com.keyman.text { * @param {boolean} usingOSK * @return {string} */ - defaultKeyOutput(Lkc: KeyEvent, keyShiftState: number, usingOSK: boolean): string { + defaultKeyOutput(Lkc: KeyEvent, keyShiftState: number, usingOSK: boolean, disableDOM: boolean): string { var Lkc: KeyEvent; let keyName = Lkc.kName; @@ -70,16 +70,26 @@ namespace com.keyman.text { switch(code) { case Codes.keyCodes['K_BKSP']: //Only desktop UI, not touch devices. TODO: add repeat while mouse down for desktop UI - keyman.interface.defaultBackspace(); + if(disableDOM) { + return '\b'; // the escape sequence for backspace. + } else { + keyman.interface.defaultBackspace(); + } return ''; case Codes.keyCodes['K_TAB']: - domManager.moveToNext(keyShiftState); + if(!disableDOM) { + domManager.moveToNext(keyShiftState); + } break; case Codes.keyCodes['K_TABBACK']: - domManager.moveToNext(true); + if(!disableDOM) { + domManager.moveToNext(true); + } break; case Codes.keyCodes['K_TABFWD']: - domManager.moveToNext(false); + if(!disableDOM) { + domManager.moveToNext(false); + } break; case Codes.keyCodes['K_ENTER']: // Insert new line in text area fields @@ -88,17 +98,20 @@ namespace com.keyman.text { // Or move to next field from TEXT fields } else if(usingOSK) { var inputEle: HTMLInputElement; - if(dom.Utils.instanceof(Lelem, "HTMLInputElement")) { + if(keyman.isEmbedded) { // In embedded mode, the OutputTarget may not meet other conditions. + return '\n'; + } else if(dom.Utils.instanceof(Lelem, "HTMLInputElement")) { inputEle = Lelem; } else if(typeof(Lelem.base) != 'undefined' && dom.Utils.instanceof(Lelem.base, "HTMLInputElement")) { inputEle = Lelem.base; } - - if (inputEle && (inputEle.type == 'search' || inputEle.type == 'submit')) { - inputEle.disabled=false; - inputEle.form.submit(); - } else { - domManager.moveToNext(false); + if(!disableDOM) { + if (inputEle && (inputEle.type == 'search' || inputEle.type == 'submit')) { + inputEle.disabled=false; + inputEle.form.submit(); + } else { + domManager.moveToNext(false); + } } } break; @@ -208,33 +221,20 @@ namespace com.keyman.text { } } - _GetClickEventProperties(e: osk.KeyElement, Lelem: HTMLElement): KeyEvent { + _GetClickEventProperties(e: osk.ActiveKey, Lelem: HTMLElement): KeyEvent { let keyman = com.keyman.singleton; var activeKeyboard = keyman.keyboardManager.activeKeyboard; let formFactor = keyman.util.device.formFactor; - let outputTarget = Processor.getOutputTarget(Lelem); // Get key name and keyboard shift state (needed only for default layouts and physical keyboard handling) // Note - virtual keys should be treated case-insensitive, so we force uppercasing here. - var layer=e['key'].spec.layer || e['key'].layer || '', keyName=e['keyId'].toUpperCase(); - var keyShiftState = this.getModifierState(keyman['osk'].vkbd.layerId); - - keyman.domManager.initActiveElement(Lelem); - - // Turn off key highlighting (or preview) - keyman['osk'].vkbd.highlightKey(e,false); - - // Clear any cached codepoint data; we can rebuild it if it's unchanged. - outputTarget.invalidateSelection(); - // Deadkey matching continues to be troublesome. - // Deleting matched deadkeys here seems to correct some of the issues. (JD 6/6/14) - outputTarget.deadkeys().deleteMatched(); // Delete any matched deadkeys before continuing + var layer = e.layer || e.displayLayer || '', keyName=e.id.toUpperCase(); // Start: mirrors _GetKeyEventProperties // Override key shift state if specified for key in layout (corrected for popup keys KMEW-93) - keyShiftState = this.getModifierState(e['key'].spec['layer'] || layer); + var keyShiftState = this.getModifierState(layer); // First check the virtual key, and process shift, control, alt or function keys var Lkc: KeyEvent = { @@ -246,7 +246,8 @@ namespace com.keyman.text { vkCode: 0, kName: keyName, kLayer: layer, - kNextLayer: e['key'].spec['nextlayer'] + kbdLayer: e.displayLayer, + kNextLayer: e.nextlayer }; // If it's actually a state key modifier, trigger its effects immediately, as KeyboardEvents would do the same. @@ -312,6 +313,53 @@ namespace com.keyman.text { } } + processKeystroke(keyEvent: KeyEvent, outputTarget: OutputTarget, fromOSK: boolean, disableDOM: boolean): boolean { + let keyman = com.keyman.singleton; + + var activeKeyboard = keyman.keyboardManager.activeKeyboard; + let kbdInterface = keyman.interface; + let keyMapManager = keyman.keyMapManager; + + if(!keyman.isEmbedded && !fromOSK && keyman.util.device.browser == 'firefox') { + // I1466 - Convert the - keycode on mnemonic as well as positional layouts + // FireFox, Mozilla Suite + if(keyMapManager.browserMap.FF['k'+keyEvent.Lcode]) { + keyEvent.Lcode=keyMapManager.browserMap.FF['k'+keyEvent.Lcode]; + } + } + + var LeventMatched = 0; + this.swallowKeypress = false; + + // Pass this key code and state to the keyboard program + if(activeKeyboard && keyEvent.Lcode != 0) { + LeventMatched = LeventMatched || kbdInterface.processKeystroke(fromOSK ? keyman.util.device : keyman.util.physicalDevice, outputTarget, keyEvent); + } + + if(!LeventMatched) { + // Restore the virtual key code if a mnemonic keyboard is being used + // If no vkCode value was stored, maintain the original Lcode value. + keyEvent.Lcode=keyEvent.vkCode || keyEvent.Lcode; + + // Handle unmapped keys, including special keys + // The following is physical layout dependent, so should be avoided if possible. All keys should be mapped. + var ch = this.defaultKeyOutput(keyEvent, keyEvent.Lmodifiers, true, disableDOM); + if(ch) { + if(ch == '\b') { // Is only returned when disableDOM is true, which prevents automatic default backspace application. + // defaultKeyOutput can't always find the outputTarget if we're working with alternates! + kbdInterface.defaultBackspace(outputTarget); + } else { + kbdInterface.output(0, outputTarget, ch); + } + LeventMatched = 1; + } else if(keyEvent.Lcode == 8) { // Backspace + LeventMatched = 1; + } + } + + return LeventMatched == 1; + } + /** * Simulate a keystroke according to the touched keyboard button element * @@ -321,7 +369,6 @@ namespace com.keyman.text { */ processKeyEvent(keyEvent: KeyEvent, e?: osk.KeyElement | boolean): boolean { let keyman = com.keyman.singleton; - //var Lelem = keyman.domManager.getLastActiveElement(); let fromOSK = !!e; // If specified, it's from the OSK. @@ -330,8 +377,6 @@ namespace com.keyman.text { e = null as osk.KeyElement; // Cast is necessary for TS type-checking later in the method. } - var activeKeyboard = keyman.keyboardManager.activeKeyboard; - let kbdInterface = keyman.interface; let formFactor = keyman.util.device.formFactor; let keyMapManager = keyman.keyMapManager; @@ -366,8 +411,7 @@ namespace com.keyman.text { return true; } - - if(!keyman.isEmbedded && !fromOSK && !window.event) { + if(!keyman.isEmbedded && !fromOSK && keyman.util.device.browser == 'firefox') { // I1466 - Convert the - keycode on mnemonic as well as positional layouts // FireFox, Mozilla Suite if(keyMapManager.browserMap.FF['k'+keyEvent.Lcode]) { @@ -378,6 +422,21 @@ namespace com.keyman.text { // Safari, IE, Opera? //} + // If suggestions exist AND space is pressed, accept the suggestion and do not process the keystroke. + // If a suggestion was just accepted AND backspace is pressed, revert the change and do not process the backspace. + // We check the first condition here, while the prediction UI handles the second through the try__() methods below. + if(keyman.modelManager.enabled) { + // The following code relies on JS's logical operator "short-circuit" properties to prevent unwanted triggering of the second condition. + + // Can the suggestion UI revert a recent suggestion? If so, do that and swallow the backspace. + if((keyEvent.kName == "K_BKSP" || keyEvent.Lcode == Codes.keyCodes["K_BKSP"]) && keyman.modelManager.tryRevertSuggestion()) { + return; + // Can the suggestion UI accept an existing suggestion? If so, do that and swallow the space character. + } else if((keyEvent.kName == "K_SPACE" || keyEvent.Lcode == Codes.keyCodes["K_SPACE"]) && keyman.modelManager.tryAcceptSuggestion('space')) { + return; + } + } + if(fromOSK && !keyman.isEmbedded) { keyman.uiManager.setActivatingUI(true); com.keyman.DOMEventHandlers.states._IgnoreNextSelChange = 100; @@ -391,29 +450,7 @@ namespace com.keyman.text { let outputTarget = Processor.getOutputTarget(keyEvent.Ltarg); let preInputMock = Mock.from(outputTarget); - var LeventMatched = 0; - this.swallowKeypress = false; - - // Pass this key code and state to the keyboard program - if(activeKeyboard && keyEvent.Lcode != 0) { - LeventMatched = LeventMatched || kbdInterface.processKeystroke(fromOSK ? keyman.util.device : keyman.util.physicalDevice, outputTarget, keyEvent); - } - - if(!LeventMatched) { - // Restore the virtual key code if a mnemonic keyboard is being used - // If no vkCode value was stored, maintain the original Lcode value. - keyEvent.Lcode=keyEvent.vkCode || keyEvent.Lcode; - - // Handle unmapped keys, including special keys - // The following is physical layout dependent, so should be avoided if possible. All keys should be mapped. - var ch = this.defaultKeyOutput(keyEvent, keyEvent.Lmodifiers, true); - if(ch) { - kbdInterface.output(0, outputTarget, ch); - LeventMatched = 1; - } else if(keyEvent.Lcode == 8) { // Backspace - LeventMatched = 1; - } - } + let LeventMatched = this.processKeystroke(keyEvent, outputTarget, fromOSK, false); // Swap layer as appropriate. if(keyEvent.kNextLayer) { @@ -422,8 +459,31 @@ namespace com.keyman.text { // Should we swallow any further processing of keystroke events for this keydown-keypress sequence? if(LeventMatched) { - let transcription = outputTarget.buildTranscriptionFrom(preInputMock, keyEvent); + let alternates: Alternate[]; + + // Note - we don't yet do fat-fingering with longpress keys. + if(keyEvent.keyDistribution && keyEvent.kbdLayer) { + let activeLayout = keyman['osk'].vkbd.layout as osk.ActiveLayout; + alternates = []; + + for(let pair of keyEvent.keyDistribution) { + let mock = Mock.from(preInputMock); + + let altKey = activeLayout.getLayer(keyEvent.kbdLayer).getKey(pair.keyId); + if(!altKey) { + console.warn("Potential fat-finger key could not be found in layer!"); + continue; + } + + let altEvent = this._GetClickEventProperties(altKey, keyEvent.Ltarg); + if(this.processKeystroke(altEvent, mock, fromOSK, true)) { + alternates.push({sample: mock.buildTransformFrom(preInputMock), 'p': pair.p}); + } + } + } + // Notify the ModelManager of new input + let transcription = outputTarget.buildTranscriptionFrom(preInputMock, keyEvent, alternates); keyman.modelManager.predict(transcription); // Since this method now performs changes for 'default' keystrokes, synthetic 'change' event generation @@ -459,12 +519,29 @@ namespace com.keyman.text { * * @param {Object} e element touched (or clicked) */ - clickKey(e: osk.KeyElement) { + clickKey(e: osk.KeyElement, touch?: Touch, layerId?: string, keyDistribution?: KeyDistribution) { let keyman = com.keyman.singleton; var Lelem = keyman.domManager.getLastActiveElement(); if(Lelem != null) { - let Lkc = this._GetClickEventProperties(e, Lelem); + // Handle any DOM state management related to click inputs. + let outputTarget = Processor.getOutputTarget(Lelem); + keyman.domManager.initActiveElement(Lelem); + + // Turn off key highlighting (or preview) + keyman['osk'].vkbd.highlightKey(e,false); + + // Clear any cached codepoint data; we can rebuild it if it's unchanged. + outputTarget.invalidateSelection(); + // Deadkey matching continues to be troublesome. + // Deleting matched deadkeys here seems to correct some of the issues. (JD 6/6/14) + outputTarget.deadkeys().deleteMatched(); // Delete any matched deadkeys before continuing + + let Lkc = this._GetClickEventProperties(e['key'].spec as osk.ActiveKey, Lelem); + if(keyman.modelManager.enabled) { + Lkc.source = touch; + Lkc.keyDistribution = keyDistribution; + } return this.processKeyEvent(Lkc, e); } else { return true; @@ -485,7 +562,7 @@ namespace com.keyman.text { mappingEvent.kName = 'K_xxxx'; mappingEvent.Ltarg = null; - var mappedChar: string = this.defaultKeyOutput(Lkc, (shifted ? 0x10 : 0), false); + var mappedChar: string = this.defaultKeyOutput(Lkc, (shifted ? 0x10 : 0), false, true); if(mappedChar) { // FIXME; Warning - will return 96 for 'a', which is a keycode corresponding to Codes.keyCodes('K_NP1') - a numpad key. Lkc.Lcode = mappedChar.charCodeAt(0); diff --git a/web/source/utils/version.ts b/web/source/utils/version.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d43ee7ea86c65e5c993061f5ad49f8c5d53f638 --- /dev/null +++ b/web/source/utils/version.ts @@ -0,0 +1,101 @@ +namespace com.keyman.utils { + // Dotted-decimal version + export class Version { + // Represents a default version value for keyboards compiled before this was compiled into keyboards. + // The exact version is unknown at this point, but the value is "good enough" for what we need. + public static readonly DEVELOPER_VERSION_FALLBACK = new Version([9, 0, 0]); + + // For 12.0, the old default behavior of adding missing keycaps to the default layers was removed, + // as it results in unexpected, bug-like behavior for keyboard designers when it is unwanted. + public static readonly NO_DEFAULT_KEYCAPS = new Version([12, 0]); + + private readonly components: number[] + + /** + * Parses version information, preparing it for use in comparisons. + * @param text Either a string representing a version number (ex: "9.0.0") or an array representing + * its components (ex: [9, 0, 0]). + */ + constructor(text: String | number[]) { + // If a keyboard doesn't specify a version, use the DEVELOPER_VERSION_FALLBACK values. + if(text === undefined || text === null) { + this.components = [].concat(Version.DEVELOPER_VERSION_FALLBACK.components); + return; + } + + if(Array.isArray(text)) { + let components = text as number[]; + if(components.length < 2) { + throw new Error("Version string must have at least a major and minor component!"); + } else { + this.components = [].concat(components); + return; + } + } + + // else, standard constructor path. + let parts = text.split('.'); + let componentArray: number[] = []; + + if(parts.length < 2) { + throw new Error("Version string must have at least a major and minor component!"); + } + + for(let i=0; i < parts.length; i++) { + let value = parseInt(parts[i], 10); + if(isNaN(value)) { + throw new Error("Version string components must be numerical!"); + } + + componentArray.push(value); + } + + this.components = componentArray; + } + + get major(): number { + return this.components[0]; + } + + get minor(): number { + return this.components[1]; + } + + toString(): string { + return this.components.join('.'); + } + + equals(other: Version): boolean { + return this.compareTo(other) == 0; + } + + precedes(other: Version): boolean { + return this.compareTo(other) < 0; + } + + compareTo(other: Version): number { + // If the version info depth differs, we need a flag to indicate which instance is shorter. + var isShorter: boolean = this.components.length < other.components.length; + var maxDepth: number = (this.components.length < other.components.length) ? this.components.length : other.components.length; + + var i: number; + for(i = 0; i < maxDepth; i++) { + let delta = this.components[i] - other.components[i]; + if(delta != 0) { + return delta; + } + } + + var longList = isShorter ? other.components : this.components; + do { + if(longList[i] > 0) { + return isShorter ? -1 : 1; + } + i++; + } while (i < longList.length); + + // Equal. + return 0; + } + } +} \ No newline at end of file diff --git a/web/testing/index.html b/web/testing/index.html index 457597208572f06e9d4d424adbb168e392026b73..57459909053655fa1a1dd19a0f6a3d0aa264fedf 100644 --- a/web/testing/index.html +++ b/web/testing/index.html @@ -19,13 +19,14 @@ -

KeymanWeb 10 Testing

+

KeymanWeb 12 Testing

Test unminified Keymanweb

Test unminified Keymanweb in manual-attachment mode.

Tests keyboard error-handling functionality

Tests the new Attachment/Enablement API functionality

Chirality testing/bootstrapping

Platform testing

+

Prediction UI testing

Toolbar UI testing

Auto-attachment mode tests

Test desktop MutationObserver functionality

diff --git a/web/testing/prediction-ui/index.html b/web/testing/prediction-ui/index.html new file mode 100644 index 0000000000000000000000000000000000000000..a0b40d3ea012fceff434f7f0df53740c7723a97a --- /dev/null +++ b/web/testing/prediction-ui/index.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + KeymanWeb Testing Page - Predictive Text bootstrapping + + + + + + + + + + + + + + + + +

KeymanWeb Sample Page - Predictive Text UI (bootstrapping rig)

+

As we're currently developing the predictive text feature, this page is subject to break as model + specifications change and new features are added. Please update the backing model file as necessary. +

+
+ +
+ +

Type in your language in this text area:

+ + +

or in this input field:

+ + +

Return to testing home page

+ + +
+ + + + + diff --git a/web/testing/prediction-ui/simple-en-trie.js b/web/testing/prediction-ui/simple-en-trie.js new file mode 100644 index 0000000000000000000000000000000000000000..91d804c591c6bcfbfd904c2fce99eec0c1527558 --- /dev/null +++ b/web/testing/prediction-ui/simple-en-trie.js @@ -0,0 +1,11 @@ +/** + * While handwritten, this class is designed to mirror the potential results of TypeScript compilation of + * model TS source files. + */ +(function () { + 'use strict'; + LMLayerWorker.loadModel(new models.TrieModel({ + "totalWeight": 500500, + "root": {"type":"internal","weight":1000,"values":["t","o","a","i","w","h","f","b","n","y","s","m","u","c","d","l","e","j","p","g","v","k","r","q"],"children":{"t":{"type":"internal","weight":1000,"values":["h","o","i","w","a","u","e","r","y"],"children":{"h":{"type":"internal","weight":1000,"values":["e","a","i","r","o","u"],"children":{"e":{"type":"internal","weight":1000,"values":["\ufdd0","y","r","i","m","s","n","o"],"children":{"\ufdd0":{"type":"leaf","weight":1000,"entries":[{"key":"the","weight":1000,"content":"the"}]},"y":{"type":"leaf","weight":971,"entries":[{"key":"they","weight":971,"content":"they"}]},"r":{"type":"internal","weight":963,"values":["e"],"children":{"e":{"type":"internal","weight":963,"values":["\ufdd0","f"],"children":{"\ufdd0":{"type":"leaf","weight":963,"entries":[{"key":"there","weight":963,"content":"there"}]},"f":{"type":"leaf","weight":552,"entries":[{"key":"therefore","weight":552,"content":"therefore"}]}}}}},"i":{"type":"leaf","weight":961,"entries":[{"key":"their","weight":961,"content":"their"}]},"m":{"type":"internal","weight":941,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":941,"entries":[{"key":"them","weight":941,"content":"them"}]},"s":{"type":"leaf","weight":662,"entries":[{"key":"themselves","weight":662,"content":"themselves"}]}}},"s":{"type":"leaf","weight":933,"entries":[{"key":"these","weight":933,"content":"these"}]},"n":{"type":"leaf","weight":930,"entries":[{"key":"then","weight":930,"content":"then"}]},"o":{"type":"leaf","weight":229,"entries":[{"key":"theory","weight":229,"content":"theory"}]}}},"a":{"type":"internal","weight":994,"values":["t","n"],"children":{"t":{"type":"leaf","weight":994,"entries":[{"key":"that","weight":994,"content":"that"}]},"n":{"type":"leaf","weight":942,"entries":[{"key":"than","weight":942,"content":"than"}]}}},"i":{"type":"internal","weight":980,"values":["s","n","r"],"children":{"s":{"type":"leaf","weight":980,"entries":[{"key":"this","weight":980,"content":"this"}]},"n":{"type":"internal","weight":808,"values":["k","g"],"children":{"k":{"type":"internal","weight":808,"values":["\ufdd0","i"],"children":{"\ufdd0":{"type":"leaf","weight":808,"entries":[{"key":"think","weight":808,"content":"think"}]},"i":{"type":"leaf","weight":337,"entries":[{"key":"thinking","weight":337,"content":"thinking"}]}}},"g":{"type":"leaf","weight":754,"entries":[{"key":"things","weight":754,"content":"things"},{"key":"thing","weight":732,"content":"thing"}]}}},"r":{"type":"leaf","weight":504,"entries":[{"key":"third","weight":504,"content":"third"}]}}},"r":{"type":"internal","weight":908,"values":["o","e"],"children":{"o":{"type":"internal","weight":908,"values":["u"],"children":{"u":{"type":"internal","weight":908,"values":["g"],"children":{"g":{"type":"internal","weight":908,"values":["h"],"children":{"h":{"type":"internal","weight":908,"values":["\ufdd0","o"],"children":{"\ufdd0":{"type":"leaf","weight":908,"entries":[{"key":"through","weight":908,"content":"through"}]},"o":{"type":"leaf","weight":305,"entries":[{"key":"throughout","weight":305,"content":"throughout"}]}}}}}}}}},"e":{"type":"leaf","weight":852,"entries":[{"key":"three","weight":852,"content":"three"}]}}},"o":{"type":"internal","weight":895,"values":["s","u"],"children":{"s":{"type":"leaf","weight":895,"entries":[{"key":"those","weight":895,"content":"those"}]},"u":{"type":"internal","weight":835,"values":["g"],"children":{"g":{"type":"internal","weight":835,"values":["h"],"children":{"h":{"type":"leaf","weight":835,"entries":[{"key":"thought","weight":835,"content":"thought"},{"key":"though","weight":812,"content":"though"}]}}}}}}},"u":{"type":"leaf","weight":711,"entries":[{"key":"thus","weight":711,"content":"thus"}]}}},"o":{"type":"internal","weight":997,"values":["\ufdd0","o","l","w","d","g","t","p"],"children":{"\ufdd0":{"type":"leaf","weight":997,"entries":[{"key":"to","weight":997,"content":"to"}]},"o":{"type":"internal","weight":893,"values":["\ufdd0","k"],"children":{"\ufdd0":{"type":"leaf","weight":893,"entries":[{"key":"too","weight":893,"content":"too"}]},"k":{"type":"leaf","weight":804,"entries":[{"key":"took","weight":804,"content":"took"}]}}},"l":{"type":"leaf","weight":796,"entries":[{"key":"told","weight":796,"content":"told"}]},"w":{"type":"internal","weight":776,"values":["a","n"],"children":{"a":{"type":"leaf","weight":776,"entries":[{"key":"toward","weight":776,"content":"toward"}]},"n":{"type":"leaf","weight":567,"entries":[{"key":"town","weight":567,"content":"town"}]}}},"d":{"type":"leaf","weight":683,"entries":[{"key":"today","weight":683,"content":"today"}]},"g":{"type":"leaf","weight":658,"entries":[{"key":"together","weight":658,"content":"together"}]},"t":{"type":"leaf","weight":564,"entries":[{"key":"total","weight":564,"content":"total"}]},"p":{"type":"leaf","weight":550,"entries":[{"key":"top","weight":550,"content":"top"}]}}},"i":{"type":"internal","weight":934,"values":["m"],"children":{"m":{"type":"internal","weight":934,"values":["e"],"children":{"e":{"type":"internal","weight":934,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":934,"entries":[{"key":"time","weight":934,"content":"time"}]},"s":{"type":"leaf","weight":700,"entries":[{"key":"times","weight":700,"content":"times"}]}}}}}}},"w":{"type":"leaf","weight":932,"entries":[{"key":"two","weight":932,"content":"two"}]},"a":{"type":"internal","weight":851,"values":["k","x","b","l"],"children":{"k":{"type":"internal","weight":851,"values":["e","i"],"children":{"e":{"type":"internal","weight":851,"values":["\ufdd0","n"],"children":{"\ufdd0":{"type":"leaf","weight":851,"entries":[{"key":"take","weight":851,"content":"take"}]},"n":{"type":"leaf","weight":678,"entries":[{"key":"taken","weight":678,"content":"taken"}]}}},"i":{"type":"leaf","weight":464,"entries":[{"key":"taking","weight":464,"content":"taking"}]}}},"x":{"type":"leaf","weight":542,"entries":[{"key":"tax","weight":542,"content":"tax"}]},"b":{"type":"leaf","weight":529,"entries":[{"key":"table","weight":529,"content":"table"}]},"l":{"type":"leaf","weight":374,"entries":[{"key":"talk","weight":374,"content":"talk"}]}}},"u":{"type":"internal","weight":720,"values":["r"],"children":{"r":{"type":"internal","weight":720,"values":["n"],"children":{"n":{"type":"leaf","weight":720,"entries":[{"key":"turned","weight":720,"content":"turned"},{"key":"turn","weight":610,"content":"turn"}]}}}}},"e":{"type":"internal","weight":660,"values":["l","n","r","m","c","s"],"children":{"l":{"type":"leaf","weight":660,"entries":[{"key":"tell","weight":660,"content":"tell"}]},"n":{"type":"leaf","weight":415,"entries":[{"key":"ten","weight":415,"content":"ten"}]},"r":{"type":"leaf","weight":411,"entries":[{"key":"terms","weight":411,"content":"terms"}]},"m":{"type":"leaf","weight":270,"entries":[{"key":"temperature","weight":270,"content":"temperature"}]},"c":{"type":"leaf","weight":162,"entries":[{"key":"technical","weight":162,"content":"technical"}]},"s":{"type":"leaf","weight":157,"entries":[{"key":"test","weight":157,"content":"test"}]}}},"r":{"type":"internal","weight":607,"values":["u","i","y","a","o","e"],"children":{"u":{"type":"internal","weight":607,"values":["e","t"],"children":{"e":{"type":"leaf","weight":607,"entries":[{"key":"true","weight":607,"content":"true"}]},"t":{"type":"leaf","weight":203,"entries":[{"key":"truth","weight":203,"content":"truth"}]}}},"i":{"type":"internal","weight":431,"values":["e","a"],"children":{"e":{"type":"leaf","weight":431,"entries":[{"key":"tried","weight":431,"content":"tried"}]},"a":{"type":"leaf","weight":268,"entries":[{"key":"trial","weight":268,"content":"trial"}]}}},"y":{"type":"leaf","weight":409,"entries":[{"key":"trying","weight":409,"content":"trying"},{"key":"try","weight":295,"content":"try"}]},"a":{"type":"internal","weight":382,"values":["i","d"],"children":{"i":{"type":"leaf","weight":382,"entries":[{"key":"training","weight":382,"content":"training"}]},"d":{"type":"leaf","weight":315,"entries":[{"key":"trade","weight":315,"content":"trade"}]}}},"o":{"type":"leaf","weight":267,"entries":[{"key":"trouble","weight":267,"content":"trouble"}]},"e":{"type":"leaf","weight":216,"entries":[{"key":"treatment","weight":216,"content":"treatment"}]}}},"y":{"type":"internal","weight":540,"values":["p"],"children":{"p":{"type":"internal","weight":540,"values":["e"],"children":{"e":{"type":"internal","weight":540,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":540,"entries":[{"key":"type","weight":540,"content":"type"}]},"s":{"type":"leaf","weight":132,"entries":[{"key":"types","weight":132,"content":"types"}]}}}}}}}}},"o":{"type":"internal","weight":999,"values":["f","n","r","u","t","v","w","l","p","h","b"],"children":{"f":{"type":"internal","weight":999,"values":["\ufdd0","f","t"],"children":{"\ufdd0":{"type":"leaf","weight":999,"entries":[{"key":"of","weight":999,"content":"of"}]},"f":{"type":"internal","weight":860,"values":["\ufdd0","i"],"children":{"\ufdd0":{"type":"leaf","weight":860,"entries":[{"key":"off","weight":860,"content":"off"}]},"i":{"type":"leaf","weight":641,"entries":[{"key":"office","weight":641,"content":"office"}]}}},"t":{"type":"leaf","weight":756,"entries":[{"key":"often","weight":756,"content":"often"}]}}},"n":{"type":"internal","weight":985,"values":["\ufdd0","e","l","c"],"children":{"\ufdd0":{"type":"leaf","weight":985,"entries":[{"key":"on","weight":985,"content":"on"}]},"e":{"type":"internal","weight":969,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":969,"entries":[{"key":"one","weight":969,"content":"one"}]},"s":{"type":"leaf","weight":133,"entries":[{"key":"ones","weight":133,"content":"ones"}]}}},"l":{"type":"leaf","weight":939,"entries":[{"key":"only","weight":939,"content":"only"}]},"c":{"type":"leaf","weight":831,"entries":[{"key":"once","weight":831,"content":"once"}]}}},"r":{"type":"internal","weight":974,"values":["\ufdd0","d","g","i"],"children":{"\ufdd0":{"type":"leaf","weight":974,"entries":[{"key":"or","weight":974,"content":"or"}]},"d":{"type":"leaf","weight":765,"entries":[{"key":"order","weight":765,"content":"order"}]},"g":{"type":"leaf","weight":219,"entries":[{"key":"organization","weight":219,"content":"organization"}]},"i":{"type":"leaf","weight":4,"entries":[{"key":"original","weight":4,"content":"original"}]}}},"u":{"type":"internal","weight":950,"values":["t","r"],"children":{"t":{"type":"internal","weight":950,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":950,"entries":[{"key":"out","weight":950,"content":"out"}]},"s":{"type":"leaf","weight":562,"entries":[{"key":"outside","weight":562,"content":"outside"}]}}},"r":{"type":"leaf","weight":922,"entries":[{"key":"our","weight":922,"content":"our"}]}}},"t":{"type":"internal","weight":938,"values":["h"],"children":{"h":{"type":"internal","weight":938,"values":["e"],"children":{"e":{"type":"internal","weight":938,"values":["r"],"children":{"r":{"type":"internal","weight":938,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":938,"entries":[{"key":"other","weight":938,"content":"other"}]},"s":{"type":"leaf","weight":722,"entries":[{"key":"others","weight":722,"content":"others"}]}}}}}}}}},"v":{"type":"leaf","weight":921,"entries":[{"key":"over","weight":921,"content":"over"}]},"w":{"type":"leaf","weight":884,"entries":[{"key":"own","weight":884,"content":"own"}]},"l":{"type":"leaf","weight":862,"entries":[{"key":"old","weight":862,"content":"old"}]},"p":{"type":"internal","weight":718,"values":["e","p"],"children":{"e":{"type":"internal","weight":718,"values":["n","r"],"children":{"n":{"type":"internal","weight":718,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":718,"entries":[{"key":"open","weight":718,"content":"open"}]},"e":{"type":"leaf","weight":243,"entries":[{"key":"opened","weight":243,"content":"opened"}]}}},"r":{"type":"leaf","weight":93,"entries":[{"key":"operation","weight":93,"content":"operation"}]}}},"p":{"type":"leaf","weight":167,"entries":[{"key":"opportunity","weight":167,"content":"opportunity"}]}}},"h":{"type":"leaf","weight":176,"entries":[{"key":"oh","weight":176,"content":"oh"}]},"b":{"type":"internal","weight":119,"values":["t","v"],"children":{"t":{"type":"leaf","weight":119,"entries":[{"key":"obtained","weight":119,"content":"obtained"}]},"v":{"type":"leaf","weight":110,"entries":[{"key":"obviously","weight":110,"content":"obviously"}]}}}}},"a":{"type":"internal","weight":998,"values":["n","\ufdd0","s","t","r","l","b","f","g","m","w","c","i","v","d","p","j","u","h"],"children":{"n":{"type":"internal","weight":998,"values":["d","\ufdd0","y","o","s","a"],"children":{"d":{"type":"leaf","weight":998,"entries":[{"key":"and","weight":998,"content":"and"}]},"\ufdd0":{"type":"leaf","weight":972,"entries":[{"key":"an","weight":972,"content":"an"}]},"y":{"type":"internal","weight":927,"values":["\ufdd0","t","o"],"children":{"\ufdd0":{"type":"leaf","weight":927,"entries":[{"key":"any","weight":927,"content":"any"}]},"t":{"type":"leaf","weight":676,"entries":[{"key":"anything","weight":676,"content":"anything"}]},"o":{"type":"leaf","weight":296,"entries":[{"key":"anyone","weight":296,"content":"anyone"}]}}},"o":{"type":"leaf","weight":869,"entries":[{"key":"another","weight":869,"content":"another"}]},"s":{"type":"leaf","weight":366,"entries":[{"key":"answer","weight":366,"content":"answer"}]},"a":{"type":"leaf","weight":65,"entries":[{"key":"analysis","weight":65,"content":"analysis"}]}}},"\ufdd0":{"type":"leaf","weight":996,"entries":[{"key":"a","weight":996,"content":"a"}]},"s":{"type":"internal","weight":987,"values":["\ufdd0","k","s"],"children":{"\ufdd0":{"type":"leaf","weight":987,"entries":[{"key":"as","weight":987,"content":"as"}]},"k":{"type":"leaf","weight":786,"entries":[{"key":"asked","weight":786,"content":"asked"},{"key":"ask","weight":221,"content":"ask"}]},"s":{"type":"leaf","weight":256,"entries":[{"key":"association","weight":256,"content":"association"}]}}},"t":{"type":"internal","weight":983,"values":["\ufdd0","t"],"children":{"\ufdd0":{"type":"leaf","weight":983,"entries":[{"key":"at","weight":983,"content":"at"}]},"t":{"type":"internal","weight":473,"values":["e","i","a"],"children":{"e":{"type":"leaf","weight":473,"entries":[{"key":"attention","weight":473,"content":"attention"}]},"i":{"type":"leaf","weight":48,"entries":[{"key":"attitude","weight":48,"content":"attitude"}]},"a":{"type":"leaf","weight":28,"entries":[{"key":"attack","weight":28,"content":"attack"}]}}}}},"r":{"type":"internal","weight":977,"values":["e","o","t","m"],"children":{"e":{"type":"internal","weight":977,"values":["\ufdd0","a"],"children":{"\ufdd0":{"type":"leaf","weight":977,"entries":[{"key":"are","weight":977,"content":"are"}]},"a":{"type":"internal","weight":724,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":724,"entries":[{"key":"area","weight":724,"content":"area"}]},"s":{"type":"leaf","weight":613,"entries":[{"key":"areas","weight":613,"content":"areas"}]}}}}},"o":{"type":"leaf","weight":840,"entries":[{"key":"around","weight":840,"content":"around"}]},"t":{"type":"leaf","weight":559,"entries":[{"key":"art","weight":559,"content":"art"}]},"m":{"type":"internal","weight":250,"values":["y","s"],"children":{"y":{"type":"leaf","weight":250,"entries":[{"key":"army","weight":250,"content":"army"}]},"s":{"type":"leaf","weight":169,"entries":[{"key":"arms","weight":169,"content":"arms"}]}}}}},"l":{"type":"internal","weight":965,"values":["l","s","w","m","o","t","r"],"children":{"l":{"type":"leaf","weight":965,"entries":[{"key":"all","weight":965,"content":"all"}]},"s":{"type":"leaf","weight":914,"entries":[{"key":"also","weight":914,"content":"also"}]},"w":{"type":"leaf","weight":817,"entries":[{"key":"always","weight":817,"content":"always"}]},"m":{"type":"leaf","weight":807,"entries":[{"key":"almost","weight":807,"content":"almost"}]},"o":{"type":"internal","weight":741,"values":["n"],"children":{"n":{"type":"internal","weight":741,"values":["g","e"],"children":{"g":{"type":"leaf","weight":741,"entries":[{"key":"along","weight":741,"content":"along"}]},"e":{"type":"leaf","weight":519,"entries":[{"key":"alone","weight":519,"content":"alone"}]}}}}},"t":{"type":"leaf","weight":721,"entries":[{"key":"although","weight":721,"content":"although"}]},"r":{"type":"leaf","weight":663,"entries":[{"key":"already","weight":663,"content":"already"}]}}},"b":{"type":"internal","weight":944,"values":["o","l"],"children":{"o":{"type":"internal","weight":944,"values":["u","v"],"children":{"u":{"type":"leaf","weight":944,"entries":[{"key":"about","weight":944,"content":"about"}]},"v":{"type":"leaf","weight":696,"entries":[{"key":"above","weight":696,"content":"above"}]}}},"l":{"type":"leaf","weight":578,"entries":[{"key":"able","weight":578,"content":"able"}]}}},"f":{"type":"internal","weight":915,"values":["t","\ufdd0"],"children":{"t":{"type":"internal","weight":915,"values":["e"],"children":{"e":{"type":"internal","weight":915,"values":["r"],"children":{"r":{"type":"internal","weight":915,"values":["\ufdd0","n"],"children":{"\ufdd0":{"type":"leaf","weight":915,"entries":[{"key":"after","weight":915,"content":"after"}]},"n":{"type":"leaf","weight":33,"entries":[{"key":"afternoon","weight":33,"content":"afternoon"}]}}}}}}},"\ufdd0":{"type":"leaf","weight":909,"entries":[{"key":"af","weight":909,"content":"af"}]}}},"g":{"type":"internal","weight":857,"values":["a","o","e","r"],"children":{"a":{"type":"internal","weight":857,"values":["i"],"children":{"i":{"type":"internal","weight":857,"values":["n"],"children":{"n":{"type":"leaf","weight":857,"entries":[{"key":"against","weight":857,"content":"against"},{"key":"again","weight":843,"content":"again"}]}}}}},"o":{"type":"leaf","weight":630,"entries":[{"key":"ago","weight":630,"content":"ago"}]},"e":{"type":"leaf","weight":600,"entries":[{"key":"age","weight":600,"content":"age"}]},"r":{"type":"leaf","weight":36,"entries":[{"key":"agreement","weight":36,"content":"agreement"}]}}},"m":{"type":"internal","weight":841,"values":["e","o",null],"children":{"e":{"type":"internal","weight":841,"values":["r"],"children":{"r":{"type":"internal","weight":841,"values":["i"],"children":{"i":{"type":"internal","weight":841,"values":["c"],"children":{"c":{"type":"internal","weight":841,"values":["a"],"children":{"a":{"type":"leaf","weight":841,"entries":[{"key":"american","weight":841,"content":"american"},{"key":"america","weight":512,"content":"america"}]}}}}}}}}},"o":{"type":"internal","weight":758,"values":["n","u"],"children":{"n":{"type":"leaf","weight":758,"entries":[{"key":"among","weight":758,"content":"among"}]},"u":{"type":"leaf","weight":442,"entries":[{"key":"amount","weight":442,"content":"amount"}]}}},"undefined":{"type":"leaf","weight":614,"entries":[{"key":"am","weight":614,"content":"am"}]}}},"w":{"type":"leaf","weight":816,"entries":[{"key":"away","weight":816,"content":"away"}]},"c":{"type":"internal","weight":693,"values":["t","r","c"],"children":{"t":{"type":"internal","weight":693,"values":["i","\ufdd0","u"],"children":{"i":{"type":"internal","weight":693,"values":["o","v"],"children":{"o":{"type":"leaf","weight":693,"entries":[{"key":"action","weight":693,"content":"action"}]},"v":{"type":"internal","weight":131,"values":["i"],"children":{"i":{"type":"internal","weight":131,"values":["t"],"children":{"t":{"type":"internal","weight":131,"values":["y","i"],"children":{"y":{"type":"leaf","weight":131,"entries":[{"key":"activity","weight":131,"content":"activity"}]},"i":{"type":"leaf","weight":121,"entries":[{"key":"activities","weight":121,"content":"activities"}]}}}}}}}}},"\ufdd0":{"type":"leaf","weight":682,"entries":[{"key":"act","weight":682,"content":"act"}]},"u":{"type":"leaf","weight":423,"entries":[{"key":"actually","weight":423,"content":"actually"}]}}},"r":{"type":"leaf","weight":680,"entries":[{"key":"across","weight":680,"content":"across"}]},"c":{"type":"internal","weight":298,"values":["o"],"children":{"o":{"type":"internal","weight":298,"values":["r","u"],"children":{"r":{"type":"leaf","weight":298,"entries":[{"key":"according","weight":298,"content":"according"}]},"u":{"type":"leaf","weight":135,"entries":[{"key":"account","weight":135,"content":"account"}]}}}}}}},"i":{"type":"internal","weight":643,"values":["r","d"],"children":{"r":{"type":"leaf","weight":643,"entries":[{"key":"air","weight":643,"content":"air"}]},"d":{"type":"leaf","weight":265,"entries":[{"key":"aid","weight":265,"content":"aid"}]}}},"v":{"type":"internal","weight":627,"values":["a","e"],"children":{"a":{"type":"leaf","weight":627,"entries":[{"key":"available","weight":627,"content":"available"}]},"e":{"type":"leaf","weight":241,"entries":[{"key":"average","weight":241,"content":"average"}]}}},"d":{"type":"internal","weight":446,"values":["d","m"],"children":{"d":{"type":"internal","weight":446,"values":["e","i"],"children":{"e":{"type":"leaf","weight":446,"entries":[{"key":"added","weight":446,"content":"added"}]},"i":{"type":"internal","weight":308,"values":["t"],"children":{"t":{"type":"internal","weight":308,"values":["i"],"children":{"i":{"type":"internal","weight":308,"values":["o"],"children":{"o":{"type":"internal","weight":308,"values":["n"],"children":{"n":{"type":"internal","weight":308,"values":["\ufdd0","a"],"children":{"\ufdd0":{"type":"leaf","weight":308,"entries":[{"key":"addition","weight":308,"content":"addition"}]},"a":{"type":"leaf","weight":164,"entries":[{"key":"additional","weight":164,"content":"additional"}]}}}}}}}}}}}}},"m":{"type":"leaf","weight":402,"entries":[{"key":"administration","weight":402,"content":"administration"}]}}},"p":{"type":"internal","weight":275,"values":["p"],"children":{"p":{"type":"internal","weight":275,"values":["e","a","r","l"],"children":{"e":{"type":"internal","weight":275,"values":["a"],"children":{"a":{"type":"internal","weight":275,"values":["r"],"children":{"r":{"type":"leaf","weight":275,"entries":[{"key":"appeared","weight":275,"content":"appeared"},{"key":"appear","weight":137,"content":"appear"}]}}}}},"a":{"type":"leaf","weight":195,"entries":[{"key":"apparently","weight":195,"content":"apparently"}]},"r":{"type":"leaf","weight":185,"entries":[{"key":"approach","weight":185,"content":"approach"}]},"l":{"type":"leaf","weight":39,"entries":[{"key":"applied","weight":39,"content":"applied"}]}}}}},"j":{"type":"leaf","weight":142,"entries":[{"key":"aj","weight":142,"content":"aj"}]},"u":{"type":"leaf","weight":118,"entries":[{"key":"audience","weight":118,"content":"audience"}]},"h":{"type":"leaf","weight":73,"entries":[{"key":"ahead","weight":73,"content":"ahead"}]}}},"i":{"type":"internal","weight":995,"values":["n","s","t","f","m","d",null],"children":{"n":{"type":"internal","weight":995,"values":["\ufdd0","t","f","d","c","s","v"],"children":{"\ufdd0":{"type":"leaf","weight":995,"entries":[{"key":"in","weight":995,"content":"in"}]},"t":{"type":"internal","weight":943,"values":["o","e"],"children":{"o":{"type":"leaf","weight":943,"entries":[{"key":"into","weight":943,"content":"into"}]},"e":{"type":"internal","weight":728,"values":["r"],"children":{"r":{"type":"internal","weight":728,"values":["e","n"],"children":{"e":{"type":"internal","weight":728,"values":["s"],"children":{"s":{"type":"internal","weight":728,"values":["t"],"children":{"t":{"type":"internal","weight":728,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":728,"entries":[{"key":"interest","weight":728,"content":"interest"}]},"e":{"type":"leaf","weight":24,"entries":[{"key":"interested","weight":24,"content":"interested"}]}}}}}}},"n":{"type":"leaf","weight":380,"entries":[{"key":"international","weight":380,"content":"international"}]}}}}}}},"f":{"type":"internal","weight":661,"values":["o","l"],"children":{"o":{"type":"leaf","weight":661,"entries":[{"key":"information","weight":661,"content":"information"}]},"l":{"type":"leaf","weight":254,"entries":[{"key":"influence","weight":254,"content":"influence"}]}}},"d":{"type":"internal","weight":617,"values":["i","u","e"],"children":{"i":{"type":"internal","weight":617,"values":["v","c"],"children":{"v":{"type":"leaf","weight":617,"entries":[{"key":"individual","weight":617,"content":"individual"}]},"c":{"type":"leaf","weight":59,"entries":[{"key":"indicated","weight":59,"content":"indicated"}]}}},"u":{"type":"internal","weight":432,"values":["s"],"children":{"s":{"type":"internal","weight":432,"values":["t"],"children":{"t":{"type":"internal","weight":432,"values":["r"],"children":{"r":{"type":"internal","weight":432,"values":["y","i"],"children":{"y":{"type":"leaf","weight":432,"entries":[{"key":"industry","weight":432,"content":"industry"}]},"i":{"type":"leaf","weight":323,"entries":[{"key":"industrial","weight":323,"content":"industrial"}]}}}}}}}}},"e":{"type":"leaf","weight":408,"entries":[{"key":"indeed","weight":408,"content":"indeed"}]}}},"c":{"type":"internal","weight":514,"values":["r","l","o"],"children":{"r":{"type":"internal","weight":514,"values":["e"],"children":{"e":{"type":"internal","weight":514,"values":["a"],"children":{"a":{"type":"internal","weight":514,"values":["s"],"children":{"s":{"type":"internal","weight":514,"values":["e"],"children":{"e":{"type":"internal","weight":514,"values":["\ufdd0","d"],"children":{"\ufdd0":{"type":"leaf","weight":514,"entries":[{"key":"increase","weight":514,"content":"increase"}]},"d":{"type":"leaf","weight":339,"entries":[{"key":"increased","weight":339,"content":"increased"}]}}}}}}}}}}},"l":{"type":"internal","weight":438,"values":["u"],"children":{"u":{"type":"internal","weight":438,"values":["d"],"children":{"d":{"type":"internal","weight":438,"values":["i","e"],"children":{"i":{"type":"leaf","weight":438,"entries":[{"key":"including","weight":438,"content":"including"}]},"e":{"type":"leaf","weight":102,"entries":[{"key":"include","weight":102,"content":"include"}]}}}}}}},"o":{"type":"leaf","weight":71,"entries":[{"key":"income","weight":71,"content":"income"}]}}},"s":{"type":"internal","weight":459,"values":["i","t"],"children":{"i":{"type":"leaf","weight":459,"entries":[{"key":"inside","weight":459,"content":"inside"}]},"t":{"type":"leaf","weight":452,"entries":[{"key":"instead","weight":452,"content":"instead"}]}}},"v":{"type":"leaf","weight":344,"entries":[{"key":"involved","weight":344,"content":"involved"}]}}},"s":{"type":"internal","weight":993,"values":["\ufdd0","l","s"],"children":{"\ufdd0":{"type":"leaf","weight":993,"entries":[{"key":"is","weight":993,"content":"is"}]},"l":{"type":"leaf","weight":424,"entries":[{"key":"island","weight":424,"content":"island"}]},"s":{"type":"leaf","weight":368,"entries":[{"key":"issue","weight":368,"content":"issue"}]}}},"t":{"type":"internal","weight":989,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":989,"entries":[{"key":"it","weight":989,"content":"it"}]},"s":{"type":"internal","weight":945,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":945,"entries":[{"key":"its","weight":945,"content":"its"}]},"e":{"type":"leaf","weight":702,"entries":[{"key":"itself","weight":702,"content":"itself"}]}}}}},"undefined":{"type":"leaf","weight":981,"entries":[{"key":"i","weight":981,"content":"i"}]},"f":{"type":"leaf","weight":952,"entries":[{"key":"if","weight":952,"content":"if"}]},"m":{"type":"internal","weight":755,"values":["p","m","a"],"children":{"p":{"type":"internal","weight":755,"values":["o"],"children":{"o":{"type":"internal","weight":755,"values":["r"],"children":{"r":{"type":"internal","weight":755,"values":["t"],"children":{"t":{"type":"internal","weight":755,"values":["a"],"children":{"a":{"type":"internal","weight":755,"values":["n"],"children":{"n":{"type":"internal","weight":755,"values":["t","c"],"children":{"t":{"type":"leaf","weight":755,"entries":[{"key":"important","weight":755,"content":"important"}]},"c":{"type":"leaf","weight":67,"entries":[{"key":"importance","weight":67,"content":"importance"}]}}}}}}}}}}}}},"m":{"type":"leaf","weight":184,"entries":[{"key":"immediately","weight":184,"content":"immediately"}]},"a":{"type":"leaf","weight":152,"entries":[{"key":"image","weight":152,"content":"image"}]}}},"d":{"type":"internal","weight":520,"values":["e"],"children":{"e":{"type":"internal","weight":520,"values":["a"],"children":{"a":{"type":"internal","weight":520,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":520,"entries":[{"key":"idea","weight":520,"content":"idea"}]},"s":{"type":"leaf","weight":319,"entries":[{"key":"ideas","weight":319,"content":"ideas"}]}}}}}}}}},"w":{"type":"internal","weight":992,"values":["a","i","h","e","o","r"],"children":{"a":{"type":"internal","weight":992,"values":["s","y","r","t","n","l","i"],"children":{"s":{"type":"internal","weight":992,"values":["\ufdd0","h"],"children":{"\ufdd0":{"type":"leaf","weight":992,"entries":[{"key":"was","weight":992,"content":"was"}]},"h":{"type":"leaf","weight":554,"entries":[{"key":"washington","weight":554,"content":"washington"}]}}},"y":{"type":"internal","weight":902,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":902,"entries":[{"key":"way","weight":902,"content":"way"}]},"s":{"type":"leaf","weight":217,"entries":[{"key":"ways","weight":217,"content":"ways"}]}}},"r":{"type":"leaf","weight":819,"entries":[{"key":"war","weight":819,"content":"war"}]},"t":{"type":"leaf","weight":813,"entries":[{"key":"water","weight":813,"content":"water"}]},"n":{"type":"internal","weight":727,"values":["t"],"children":{"t":{"type":"internal","weight":727,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":727,"entries":[{"key":"want","weight":727,"content":"want"}]},"e":{"type":"leaf","weight":598,"entries":[{"key":"wanted","weight":598,"content":"wanted"}]}}}}},"l":{"type":"internal","weight":395,"values":["l","k"],"children":{"l":{"type":"leaf","weight":395,"entries":[{"key":"wall","weight":395,"content":"wall"}]},"k":{"type":"leaf","weight":394,"entries":[{"key":"walked","weight":394,"content":"walked"}]}}},"i":{"type":"leaf","weight":81,"entries":[{"key":"waiting","weight":81,"content":"waiting"}]}}},"i":{"type":"internal","weight":988,"values":["t","l","f","d","n","s"],"children":{"t":{"type":"internal","weight":988,"values":["h"],"children":{"h":{"type":"internal","weight":988,"values":["\ufdd0","o","i"],"children":{"\ufdd0":{"type":"leaf","weight":988,"entries":[{"key":"with","weight":988,"content":"with"}]},"o":{"type":"leaf","weight":844,"entries":[{"key":"without","weight":844,"content":"without"}]},"i":{"type":"leaf","weight":744,"entries":[{"key":"within","weight":744,"content":"within"}]}}}}},"l":{"type":"internal","weight":954,"values":["l"],"children":{"l":{"type":"internal","weight":954,"values":["\ufdd0","i"],"children":{"\ufdd0":{"type":"leaf","weight":954,"entries":[{"key":"will","weight":954,"content":"will"}]},"i":{"type":"leaf","weight":347,"entries":[{"key":"william","weight":347,"content":"william"}]}}}}},"f":{"type":"leaf","weight":601,"entries":[{"key":"wife","weight":601,"content":"wife"}]},"d":{"type":"leaf","weight":192,"entries":[{"key":"wide","weight":192,"content":"wide"}]},"n":{"type":"leaf","weight":149,"entries":[{"key":"window","weight":149,"content":"window"}]},"s":{"type":"leaf","weight":77,"entries":[{"key":"wish","weight":77,"content":"wish"}]}}},"h":{"type":"internal","weight":970,"values":["i","e","o","a","y"],"children":{"i":{"type":"internal","weight":970,"values":["c","l","t"],"children":{"c":{"type":"leaf","weight":970,"entries":[{"key":"which","weight":970,"content":"which"}]},"l":{"type":"leaf","weight":867,"entries":[{"key":"while","weight":867,"content":"while"}]},"t":{"type":"leaf","weight":751,"entries":[{"key":"white","weight":751,"content":"white"}]}}},"e":{"type":"internal","weight":956,"values":["n","r","t"],"children":{"n":{"type":"leaf","weight":956,"entries":[{"key":"when","weight":956,"content":"when"}]},"r":{"type":"leaf","weight":904,"entries":[{"key":"where","weight":904,"content":"where"}]},"t":{"type":"leaf","weight":688,"entries":[{"key":"whether","weight":688,"content":"whether"}]}}},"o":{"type":"internal","weight":955,"values":["\ufdd0","l","s","m"],"children":{"\ufdd0":{"type":"leaf","weight":955,"entries":[{"key":"who","weight":955,"content":"who"}]},"l":{"type":"leaf","weight":705,"entries":[{"key":"whole","weight":705,"content":"whole"}]},"s":{"type":"leaf","weight":638,"entries":[{"key":"whose","weight":638,"content":"whose"}]},"m":{"type":"leaf","weight":341,"entries":[{"key":"whom","weight":341,"content":"whom"}]}}},"a":{"type":"internal","weight":947,"values":["t"],"children":{"t":{"type":"internal","weight":947,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":947,"entries":[{"key":"what","weight":947,"content":"what"}]},"e":{"type":"leaf","weight":91,"entries":[{"key":"whatever","weight":91,"content":"whatever"}]}}}}},"y":{"type":"leaf","weight":792,"entries":[{"key":"why","weight":792,"content":"why"}]}}},"e":{"type":"internal","weight":967,"values":["r","\ufdd0","l","n","e","s"],"children":{"r":{"type":"leaf","weight":967,"entries":[{"key":"were","weight":967,"content":"were"}]},"\ufdd0":{"type":"leaf","weight":960,"entries":[{"key":"we","weight":960,"content":"we"}]},"l":{"type":"leaf","weight":901,"entries":[{"key":"well","weight":901,"content":"well"}]},"n":{"type":"leaf","weight":834,"entries":[{"key":"went","weight":834,"content":"went"}]},"e":{"type":"internal","weight":668,"values":["k"],"children":{"k":{"type":"internal","weight":668,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":668,"entries":[{"key":"week","weight":668,"content":"week"}]},"s":{"type":"leaf","weight":299,"entries":[{"key":"weeks","weight":299,"content":"weeks"}]}}}}},"s":{"type":"internal","weight":612,"values":["t"],"children":{"t":{"type":"internal","weight":612,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":612,"entries":[{"key":"west","weight":612,"content":"west"}]},"e":{"type":"leaf","weight":282,"entries":[{"key":"western","weight":282,"content":"western"}]}}}}}}},"o":{"type":"internal","weight":962,"values":["u","r","m"],"children":{"u":{"type":"leaf","weight":962,"entries":[{"key":"would","weight":962,"content":"would"}]},"r":{"type":"internal","weight":886,"values":["l","k","d"],"children":{"l":{"type":"leaf","weight":886,"entries":[{"key":"world","weight":886,"content":"world"}]},"k":{"type":"internal","weight":881,"values":["\ufdd0","i","s","e"],"children":{"\ufdd0":{"type":"leaf","weight":881,"entries":[{"key":"work","weight":881,"content":"work"}]},"i":{"type":"leaf","weight":363,"entries":[{"key":"working","weight":363,"content":"working"}]},"s":{"type":"leaf","weight":237,"entries":[{"key":"works","weight":237,"content":"works"}]},"e":{"type":"leaf","weight":222,"entries":[{"key":"worked","weight":222,"content":"worked"}]}}},"d":{"type":"leaf","weight":665,"entries":[{"key":"words","weight":665,"content":"words"},{"key":"word","weight":664,"content":"word"}]}}},"m":{"type":"internal","weight":594,"values":["a","e"],"children":{"a":{"type":"leaf","weight":594,"entries":[{"key":"woman","weight":594,"content":"woman"}]},"e":{"type":"leaf","weight":518,"entries":[{"key":"women","weight":518,"content":"women"}]}}}}},"r":{"type":"internal","weight":481,"values":["o","i"],"children":{"o":{"type":"internal","weight":481,"values":["t","n"],"children":{"t":{"type":"leaf","weight":481,"entries":[{"key":"wrote","weight":481,"content":"wrote"}]},"n":{"type":"leaf","weight":227,"entries":[{"key":"wrong","weight":227,"content":"wrong"}]}}},"i":{"type":"internal","weight":373,"values":["t"],"children":{"t":{"type":"internal","weight":373,"values":["t","i","e"],"children":{"t":{"type":"leaf","weight":373,"entries":[{"key":"written","weight":373,"content":"written"}]},"i":{"type":"leaf","weight":139,"entries":[{"key":"writing","weight":139,"content":"writing"}]},"e":{"type":"leaf","weight":34,"entries":[{"key":"write","weight":34,"content":"write"}]}}}}}}}}},"h":{"type":"internal","weight":991,"values":["e","i","a","o","u"],"children":{"e":{"type":"internal","weight":991,"values":["\ufdd0","r","a","l"],"children":{"\ufdd0":{"type":"leaf","weight":991,"entries":[{"key":"he","weight":991,"content":"he"}]},"r":{"type":"internal","weight":966,"values":["\ufdd0","e","s"],"children":{"\ufdd0":{"type":"leaf","weight":966,"entries":[{"key":"her","weight":966,"content":"her"}]},"e":{"type":"leaf","weight":879,"entries":[{"key":"here","weight":879,"content":"here"}]},"s":{"type":"leaf","weight":196,"entries":[{"key":"herself","weight":196,"content":"herself"}]}}},"a":{"type":"internal","weight":802,"values":["d","r","v","l"],"children":{"d":{"type":"leaf","weight":802,"entries":[{"key":"head","weight":802,"content":"head"}]},"r":{"type":"internal","weight":634,"values":["d","t",null],"children":{"d":{"type":"leaf","weight":634,"entries":[{"key":"heard","weight":634,"content":"heard"}]},"t":{"type":"leaf","weight":453,"entries":[{"key":"heart","weight":453,"content":"heart"}]},"undefined":{"type":"leaf","weight":369,"entries":[{"key":"hear","weight":369,"content":"hear"}]}}},"v":{"type":"leaf","weight":84,"entries":[{"key":"heavy","weight":84,"content":"heavy"}]},"l":{"type":"leaf","weight":30,"entries":[{"key":"health","weight":30,"content":"health"}]}}},"l":{"type":"internal","weight":707,"values":["p","d"],"children":{"p":{"type":"leaf","weight":707,"entries":[{"key":"help","weight":707,"content":"help"}]},"d":{"type":"leaf","weight":653,"entries":[{"key":"held","weight":653,"content":"held"}]}}}}},"i":{"type":"internal","weight":986,"values":["s","m","g","t"],"children":{"s":{"type":"internal","weight":986,"values":["\ufdd0","t"],"children":{"\ufdd0":{"type":"leaf","weight":986,"entries":[{"key":"his","weight":986,"content":"his"}]},"t":{"type":"leaf","weight":687,"entries":[{"key":"history","weight":687,"content":"history"}]}}},"m":{"type":"internal","weight":959,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":959,"entries":[{"key":"him","weight":959,"content":"him"}]},"s":{"type":"leaf","weight":850,"entries":[{"key":"himself","weight":850,"content":"himself"}]}}},"g":{"type":"internal","weight":829,"values":["h"],"children":{"h":{"type":"internal","weight":829,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":829,"entries":[{"key":"high","weight":829,"content":"high"}]},"e":{"type":"leaf","weight":397,"entries":[{"key":"higher","weight":397,"content":"higher"}]}}}}},"t":{"type":"leaf","weight":114,"entries":[{"key":"hit","weight":114,"content":"hit"}]}}},"a":{"type":"internal","weight":979,"values":["d","v","s","n","l","r","p","i"],"children":{"d":{"type":"leaf","weight":979,"entries":[{"key":"had","weight":979,"content":"had"}]},"v":{"type":"internal","weight":973,"values":["e","i"],"children":{"e":{"type":"leaf","weight":973,"entries":[{"key":"have","weight":973,"content":"have"}]},"i":{"type":"leaf","weight":675,"entries":[{"key":"having","weight":675,"content":"having"}]}}},"s":{"type":"leaf","weight":957,"entries":[{"key":"has","weight":957,"content":"has"}]},"n":{"type":"internal","weight":806,"values":["d"],"children":{"d":{"type":"internal","weight":806,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":806,"entries":[{"key":"hand","weight":806,"content":"hand"}]},"s":{"type":"leaf","weight":691,"entries":[{"key":"hands","weight":691,"content":"hands"}]}}}}},"l":{"type":"internal","weight":669,"values":["f","l"],"children":{"f":{"type":"leaf","weight":669,"entries":[{"key":"half","weight":669,"content":"half"}]},"l":{"type":"leaf","weight":367,"entries":[{"key":"hall","weight":367,"content":"hall"}]}}},"r":{"type":"internal","weight":545,"values":["d"],"children":{"d":{"type":"internal","weight":545,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":545,"entries":[{"key":"hard","weight":545,"content":"hard"}]},"l":{"type":"leaf","weight":40,"entries":[{"key":"hardly","weight":40,"content":"hardly"}]}}}}},"p":{"type":"leaf","weight":353,"entries":[{"key":"happened","weight":353,"content":"happened"}]},"i":{"type":"leaf","weight":348,"entries":[{"key":"hair","weight":348,"content":"hair"}]}}},"o":{"type":"internal","weight":892,"values":["w","u","m","p","l","t","r","s"],"children":{"w":{"type":"internal","weight":892,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":892,"entries":[{"key":"how","weight":892,"content":"how"}]},"e":{"type":"leaf","weight":839,"entries":[{"key":"however","weight":839,"content":"however"}]}}},"u":{"type":"internal","weight":846,"values":["s","r"],"children":{"s":{"type":"leaf","weight":846,"entries":[{"key":"house","weight":846,"content":"house"}]},"r":{"type":"leaf","weight":454,"entries":[{"key":"hours","weight":454,"content":"hours"},{"key":"hour","weight":331,"content":"hour"}]}}},"m":{"type":"leaf","weight":838,"entries":[{"key":"home","weight":838,"content":"home"}]},"p":{"type":"leaf","weight":471,"entries":[{"key":"hope","weight":471,"content":"hope"}]},"l":{"type":"leaf","weight":428,"entries":[{"key":"hold","weight":428,"content":"hold"}]},"t":{"type":"internal","weight":238,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":238,"entries":[{"key":"hot","weight":238,"content":"hot"}]},"e":{"type":"leaf","weight":201,"entries":[{"key":"hotel","weight":201,"content":"hotel"}]}}},"r":{"type":"leaf","weight":138,"entries":[{"key":"horse","weight":138,"content":"horse"}]},"s":{"type":"leaf","weight":79,"entries":[{"key":"hospital","weight":79,"content":"hospital"}]}}},"u":{"type":"internal","weight":699,"values":["m","n","s"],"children":{"m":{"type":"leaf","weight":699,"entries":[{"key":"human","weight":699,"content":"human"}]},"n":{"type":"leaf","weight":434,"entries":[{"key":"hundred","weight":434,"content":"hundred"}]},"s":{"type":"leaf","weight":247,"entries":[{"key":"husband","weight":247,"content":"husband"}]}}}}},"f":{"type":"internal","weight":990,"values":["o","r","i","e","a","u","l"],"children":{"o":{"type":"internal","weight":990,"values":["r","u","l","o"],"children":{"r":{"type":"internal","weight":990,"values":["\ufdd0","m","c","e","w"],"children":{"\ufdd0":{"type":"leaf","weight":990,"entries":[{"key":"for","weight":990,"content":"for"}]},"m":{"type":"internal","weight":757,"values":["\ufdd0","e","s"],"children":{"\ufdd0":{"type":"leaf","weight":757,"entries":[{"key":"form","weight":757,"content":"form"}]},"e":{"type":"leaf","weight":242,"entries":[{"key":"former","weight":242,"content":"former"}]},"s":{"type":"leaf","weight":206,"entries":[{"key":"forms","weight":206,"content":"forms"}]}}},"c":{"type":"internal","weight":606,"values":["e"],"children":{"e":{"type":"internal","weight":606,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":606,"entries":[{"key":"force","weight":606,"content":"force"}]},"s":{"type":"leaf","weight":461,"entries":[{"key":"forces","weight":461,"content":"forces"}]}}}}},"e":{"type":"leaf","weight":390,"entries":[{"key":"foreign","weight":390,"content":"foreign"}]},"w":{"type":"leaf","weight":124,"entries":[{"key":"forward","weight":124,"content":"forward"}]}}},"u":{"type":"internal","weight":836,"values":["n","r"],"children":{"n":{"type":"leaf","weight":836,"entries":[{"key":"found","weight":836,"content":"found"}]},"r":{"type":"leaf","weight":747,"entries":[{"key":"four","weight":747,"content":"four"}]}}},"l":{"type":"internal","weight":588,"values":["l"],"children":{"l":{"type":"internal","weight":588,"values":["o"],"children":{"o":{"type":"internal","weight":588,"values":["w"],"children":{"w":{"type":"internal","weight":588,"values":["i","e"],"children":{"i":{"type":"leaf","weight":588,"entries":[{"key":"following","weight":588,"content":"following"}]},"e":{"type":"leaf","weight":443,"entries":[{"key":"followed","weight":443,"content":"followed"}]}}}}}}}}},"o":{"type":"leaf","weight":342,"entries":[{"key":"food","weight":342,"content":"food"}]}}},"r":{"type":"internal","weight":975,"values":["o","e","i"],"children":{"o":{"type":"internal","weight":975,"values":["m","n"],"children":{"m":{"type":"leaf","weight":975,"entries":[{"key":"from","weight":975,"content":"from"}]},"n":{"type":"leaf","weight":589,"entries":[{"key":"front","weight":589,"content":"front"}]}}},"e":{"type":"internal","weight":650,"values":["e","n"],"children":{"e":{"type":"internal","weight":650,"values":["\ufdd0","d"],"children":{"\ufdd0":{"type":"leaf","weight":650,"entries":[{"key":"free","weight":650,"content":"free"}]},"d":{"type":"leaf","weight":223,"entries":[{"key":"freedom","weight":223,"content":"freedom"}]}}},"n":{"type":"leaf","weight":288,"entries":[{"key":"french","weight":288,"content":"french"}]}}},"i":{"type":"internal","weight":406,"values":["e"],"children":{"e":{"type":"internal","weight":406,"values":["n"],"children":{"n":{"type":"internal","weight":406,"values":["d"],"children":{"d":{"type":"leaf","weight":406,"entries":[{"key":"friends","weight":406,"content":"friends"},{"key":"friend","weight":263,"content":"friend"}]}}}}}}}}},"i":{"type":"internal","weight":928,"values":["r","n","v","e","g","s"],"children":{"r":{"type":"internal","weight":928,"values":["s","e","m"],"children":{"s":{"type":"leaf","weight":928,"entries":[{"key":"first","weight":928,"content":"first"}]},"e":{"type":"leaf","weight":499,"entries":[{"key":"fire","weight":499,"content":"fire"}]},"m":{"type":"leaf","weight":68,"entries":[{"key":"firm","weight":68,"content":"firm"}]}}},"n":{"type":"internal","weight":789,"values":["d","a","e"],"children":{"d":{"type":"leaf","weight":789,"entries":[{"key":"find","weight":789,"content":"find"}]},"a":{"type":"internal","weight":508,"values":["l"],"children":{"l":{"type":"leaf","weight":508,"entries":[{"key":"finally","weight":508,"content":"finally"},{"key":"final","weight":384,"content":"final"}]}}},"e":{"type":"leaf","weight":400,"entries":[{"key":"fine","weight":400,"content":"fine"}]}}},"v":{"type":"leaf","weight":686,"entries":[{"key":"five","weight":686,"content":"five"}]},"e":{"type":"leaf","weight":666,"entries":[{"key":"field","weight":666,"content":"field"}]},"g":{"type":"internal","weight":560,"values":["u"],"children":{"u":{"type":"internal","weight":560,"values":["r"],"children":{"r":{"type":"internal","weight":560,"values":["e"],"children":{"e":{"type":"internal","weight":560,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":560,"entries":[{"key":"figure","weight":560,"content":"figure"}]},"s":{"type":"leaf","weight":100,"entries":[{"key":"figures","weight":100,"content":"figures"}]}}}}}}}}},"s":{"type":"leaf","weight":160,"entries":[{"key":"fiscal","weight":160,"content":"fiscal"}]}}},"e":{"type":"internal","weight":848,"values":["w","l","e","d","a"],"children":{"w":{"type":"leaf","weight":848,"entries":[{"key":"few","weight":848,"content":"few"}]},"l":{"type":"leaf","weight":742,"entries":[{"key":"felt","weight":742,"content":"felt"}]},"e":{"type":"internal","weight":681,"values":["t","l","d"],"children":{"t":{"type":"leaf","weight":681,"entries":[{"key":"feet","weight":681,"content":"feet"}]},"l":{"type":"internal","weight":580,"values":["\ufdd0","i"],"children":{"\ufdd0":{"type":"leaf","weight":580,"entries":[{"key":"feel","weight":580,"content":"feel"}]},"i":{"type":"leaf","weight":440,"entries":[{"key":"feeling","weight":440,"content":"feeling"}]}}},"d":{"type":"leaf","weight":174,"entries":[{"key":"feed","weight":174,"content":"feed"}]}}},"d":{"type":"leaf","weight":629,"entries":[{"key":"federal","weight":629,"content":"federal"}]},"a":{"type":"leaf","weight":215,"entries":[{"key":"fear","weight":215,"content":"fear"}]}}},"a":{"type":"internal","weight":814,"values":["c","r","m","t","l","i"],"children":{"c":{"type":"internal","weight":814,"values":["t","e"],"children":{"t":{"type":"internal","weight":814,"values":["\ufdd0","o"],"children":{"\ufdd0":{"type":"leaf","weight":814,"entries":[{"key":"fact","weight":814,"content":"fact"}]},"o":{"type":"leaf","weight":41,"entries":[{"key":"factors","weight":41,"content":"factors"}]}}},"e":{"type":"leaf","weight":760,"entries":[{"key":"face","weight":760,"content":"face"}]}}},"r":{"type":"internal","weight":803,"values":["\ufdd0","m"],"children":{"\ufdd0":{"type":"leaf","weight":803,"entries":[{"key":"far","weight":803,"content":"far"}]},"m":{"type":"leaf","weight":188,"entries":[{"key":"farm","weight":188,"content":"farm"}]}}},"m":{"type":"leaf","weight":729,"entries":[{"key":"family","weight":729,"content":"family"}]},"t":{"type":"leaf","weight":487,"entries":[{"key":"father","weight":487,"content":"father"}]},"l":{"type":"leaf","weight":343,"entries":[{"key":"fall","weight":343,"content":"fall"}]},"i":{"type":"leaf","weight":88,"entries":[{"key":"faith","weight":88,"content":"faith"}]}}},"u":{"type":"internal","weight":605,"values":["l","t","r","n"],"children":{"l":{"type":"leaf","weight":605,"entries":[{"key":"full","weight":605,"content":"full"}]},"t":{"type":"leaf","weight":599,"entries":[{"key":"future","weight":599,"content":"future"}]},"r":{"type":"leaf","weight":583,"entries":[{"key":"further","weight":583,"content":"further"}]},"n":{"type":"leaf","weight":105,"entries":[{"key":"function","weight":105,"content":"function"}]}}},"l":{"type":"leaf","weight":391,"entries":[{"key":"floor","weight":391,"content":"floor"}]}}},"b":{"type":"internal","weight":984,"values":["e","y","u","a","o","i","r","l",null],"children":{"e":{"type":"internal","weight":984,"values":["\ufdd0","e","f","c","t","i","s","g","h","l","y","a","d"],"children":{"\ufdd0":{"type":"leaf","weight":984,"entries":[{"key":"be","weight":984,"content":"be"}]},"e":{"type":"leaf","weight":958,"entries":[{"key":"been","weight":958,"content":"been"}]},"f":{"type":"leaf","weight":911,"entries":[{"key":"before","weight":911,"content":"before"}]},"c":{"type":"internal","weight":898,"values":["a","o"],"children":{"a":{"type":"internal","weight":898,"values":["u","m"],"children":{"u":{"type":"leaf","weight":898,"entries":[{"key":"because","weight":898,"content":"because"}]},"m":{"type":"leaf","weight":633,"entries":[{"key":"became","weight":633,"content":"became"}]}}},"o":{"type":"internal","weight":743,"values":["m"],"children":{"m":{"type":"internal","weight":743,"values":["e"],"children":{"e":{"type":"internal","weight":743,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":743,"entries":[{"key":"become","weight":743,"content":"become"}]},"s":{"type":"leaf","weight":17,"entries":[{"key":"becomes","weight":17,"content":"becomes"}]}}}}}}}}},"t":{"type":"internal","weight":877,"values":["w","t"],"children":{"w":{"type":"leaf","weight":877,"entries":[{"key":"between","weight":877,"content":"between"}]},"t":{"type":"leaf","weight":797,"entries":[{"key":"better","weight":797,"content":"better"}]}}},"i":{"type":"leaf","weight":874,"entries":[{"key":"being","weight":874,"content":"being"}]},"s":{"type":"leaf","weight":738,"entries":[{"key":"best","weight":738,"content":"best"}]},"g":{"type":"internal","weight":710,"values":["a","i"],"children":{"a":{"type":"leaf","weight":710,"entries":[{"key":"began","weight":710,"content":"began"}]},"i":{"type":"leaf","weight":416,"entries":[{"key":"beginning","weight":416,"content":"beginning"}]}}},"h":{"type":"leaf","weight":648,"entries":[{"key":"behind","weight":648,"content":"behind"}]},"l":{"type":"internal","weight":541,"values":["i","o"],"children":{"i":{"type":"leaf","weight":541,"entries":[{"key":"believe","weight":541,"content":"believe"}]},"o":{"type":"leaf","weight":333,"entries":[{"key":"below","weight":333,"content":"below"}]}}},"y":{"type":"leaf","weight":466,"entries":[{"key":"beyond","weight":466,"content":"beyond"}]},"a":{"type":"leaf","weight":214,"entries":[{"key":"beautiful","weight":214,"content":"beautiful"}]},"d":{"type":"leaf","weight":211,"entries":[{"key":"bed","weight":211,"content":"bed"}]}}},"y":{"type":"leaf","weight":982,"entries":[{"key":"by","weight":982,"content":"by"}]},"u":{"type":"internal","weight":976,"values":["t","s","i"],"children":{"t":{"type":"leaf","weight":976,"entries":[{"key":"but","weight":976,"content":"but"}]},"s":{"type":"leaf","weight":779,"entries":[{"key":"business","weight":779,"content":"business"}]},"i":{"type":"internal","weight":398,"values":["l"],"children":{"l":{"type":"internal","weight":398,"values":["d","t"],"children":{"d":{"type":"leaf","weight":398,"entries":[{"key":"building","weight":398,"content":"building"}]},"t":{"type":"leaf","weight":9,"entries":[{"key":"built","weight":9,"content":"built"}]}}}}}}},"a":{"type":"internal","weight":907,"values":["c","s","d","l"],"children":{"c":{"type":"leaf","weight":907,"entries":[{"key":"back","weight":907,"content":"back"}]},"s":{"type":"internal","weight":489,"values":["i","e"],"children":{"i":{"type":"internal","weight":489,"values":["s","c"],"children":{"s":{"type":"leaf","weight":489,"entries":[{"key":"basis","weight":489,"content":"basis"}]},"c":{"type":"leaf","weight":439,"entries":[{"key":"basic","weight":439,"content":"basic"}]}}},"e":{"type":"leaf","weight":154,"entries":[{"key":"based","weight":154,"content":"based"}]}}},"d":{"type":"leaf","weight":313,"entries":[{"key":"bad","weight":313,"content":"bad"}]},"l":{"type":"leaf","weight":78,"entries":[{"key":"ball","weight":78,"content":"ball"}]}}},"o":{"type":"internal","weight":876,"values":["t","d","y","a","o","r"],"children":{"t":{"type":"leaf","weight":876,"entries":[{"key":"both","weight":876,"content":"both"}]},"d":{"type":"leaf","weight":671,"entries":[{"key":"body","weight":671,"content":"body"}]},"y":{"type":"internal","weight":623,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":623,"entries":[{"key":"boy","weight":623,"content":"boy"}]},"s":{"type":"leaf","weight":324,"entries":[{"key":"boys","weight":324,"content":"boys"}]}}},"a":{"type":"leaf","weight":618,"entries":[{"key":"board","weight":618,"content":"board"}]},"o":{"type":"leaf","weight":528,"entries":[{"key":"book","weight":528,"content":"book"}]},"r":{"type":"leaf","weight":99,"entries":[{"key":"born","weight":99,"content":"born"}]}}},"i":{"type":"internal","weight":745,"values":["g","l"],"children":{"g":{"type":"leaf","weight":745,"entries":[{"key":"big","weight":745,"content":"big"}]},"l":{"type":"leaf","weight":322,"entries":[{"key":"bill","weight":322,"content":"bill"}]}}},"r":{"type":"internal","weight":640,"values":["o","i"],"children":{"o":{"type":"internal","weight":640,"values":["u","w"],"children":{"u":{"type":"leaf","weight":640,"entries":[{"key":"brought","weight":640,"content":"brought"}]},"w":{"type":"leaf","weight":467,"entries":[{"key":"brown","weight":467,"content":"brown"}]}}},"i":{"type":"internal","weight":392,"values":["n","t"],"children":{"n":{"type":"leaf","weight":392,"entries":[{"key":"bring","weight":392,"content":"bring"}]},"t":{"type":"leaf","weight":143,"entries":[{"key":"british","weight":143,"content":"british"}]}}}}},"l":{"type":"internal","weight":546,"values":["a","u","o"],"children":{"a":{"type":"leaf","weight":546,"entries":[{"key":"black","weight":546,"content":"black"}]},"u":{"type":"leaf","weight":316,"entries":[{"key":"blue","weight":316,"content":"blue"}]},"o":{"type":"leaf","weight":168,"entries":[{"key":"blood","weight":168,"content":"blood"}]}}},"undefined":{"type":"leaf","weight":32,"entries":[{"key":"b","weight":32,"content":"b"}]}}},"n":{"type":"internal","weight":978,"values":["o","e","u","i","a"],"children":{"o":{"type":"internal","weight":978,"values":["t","\ufdd0","w","r","n"],"children":{"t":{"type":"internal","weight":978,"values":["\ufdd0","h","e"],"children":{"\ufdd0":{"type":"leaf","weight":978,"entries":[{"key":"not","weight":978,"content":"not"}]},"h":{"type":"leaf","weight":795,"entries":[{"key":"nothing","weight":795,"content":"nothing"}]},"e":{"type":"leaf","weight":204,"entries":[{"key":"note","weight":204,"content":"note"}]}}},"\ufdd0":{"type":"leaf","weight":951,"entries":[{"key":"no","weight":951,"content":"no"}]},"w":{"type":"leaf","weight":925,"entries":[{"key":"now","weight":925,"content":"now"}]},"r":{"type":"internal","weight":555,"values":["t","\ufdd0","m"],"children":{"t":{"type":"leaf","weight":555,"entries":[{"key":"north","weight":555,"content":"north"}]},"\ufdd0":{"type":"leaf","weight":521,"entries":[{"key":"nor","weight":521,"content":"nor"}]},"m":{"type":"leaf","weight":277,"entries":[{"key":"normal","weight":277,"content":"normal"}]}}},"n":{"type":"leaf","weight":61,"entries":[{"key":"none","weight":61,"content":"none"}]}}},"e":{"type":"internal","weight":937,"values":["w","v","x","e","c","a","i","g"],"children":{"w":{"type":"leaf","weight":937,"entries":[{"key":"new","weight":937,"content":"new"}]},"v":{"type":"leaf","weight":872,"entries":[{"key":"never","weight":872,"content":"never"}]},"x":{"type":"leaf","weight":782,"entries":[{"key":"next","weight":782,"content":"next"}]},"e":{"type":"internal","weight":746,"values":["d"],"children":{"d":{"type":"internal","weight":746,"values":["\ufdd0","e","s"],"children":{"\ufdd0":{"type":"leaf","weight":746,"entries":[{"key":"need","weight":746,"content":"need"}]},"e":{"type":"leaf","weight":498,"entries":[{"key":"needed","weight":498,"content":"needed"}]},"s":{"type":"leaf","weight":365,"entries":[{"key":"needs","weight":365,"content":"needs"}]}}}}},"c":{"type":"leaf","weight":591,"entries":[{"key":"necessary","weight":591,"content":"necessary"}]},"a":{"type":"internal","weight":532,"values":["r"],"children":{"r":{"type":"internal","weight":532,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":532,"entries":[{"key":"near","weight":532,"content":"near"}]},"l":{"type":"leaf","weight":303,"entries":[{"key":"nearly","weight":303,"content":"nearly"}]}}}}},"i":{"type":"leaf","weight":307,"entries":[{"key":"neither","weight":307,"content":"neither"}]},"g":{"type":"leaf","weight":43,"entries":[{"key":"negro","weight":43,"content":"negro"}]}}},"u":{"type":"internal","weight":821,"values":["m","c"],"children":{"m":{"type":"internal","weight":821,"values":["b"],"children":{"b":{"type":"internal","weight":821,"values":["e"],"children":{"e":{"type":"internal","weight":821,"values":["r"],"children":{"r":{"type":"internal","weight":821,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":821,"entries":[{"key":"number","weight":821,"content":"number"}]},"s":{"type":"leaf","weight":199,"entries":[{"key":"numbers","weight":199,"content":"numbers"}]}}}}}}}}},"c":{"type":"leaf","weight":127,"entries":[{"key":"nuclear","weight":127,"content":"nuclear"}]}}},"i":{"type":"leaf","weight":794,"entries":[{"key":"night","weight":794,"content":"night"}]},"a":{"type":"internal","weight":764,"values":["t","m"],"children":{"t":{"type":"internal","weight":764,"values":["i","u"],"children":{"i":{"type":"internal","weight":764,"values":["o"],"children":{"o":{"type":"internal","weight":764,"values":["n"],"children":{"n":{"type":"internal","weight":764,"values":["a","s",null],"children":{"a":{"type":"leaf","weight":764,"entries":[{"key":"national","weight":764,"content":"national"}]},"s":{"type":"leaf","weight":462,"entries":[{"key":"nations","weight":462,"content":"nations"}]},"undefined":{"type":"leaf","weight":291,"entries":[{"key":"nation","weight":291,"content":"nation"}]}}}}}}},"u":{"type":"internal","weight":506,"values":["r"],"children":{"r":{"type":"internal","weight":506,"values":["e","a"],"children":{"e":{"type":"leaf","weight":506,"entries":[{"key":"nature","weight":506,"content":"nature"}]},"a":{"type":"leaf","weight":385,"entries":[{"key":"natural","weight":385,"content":"natural"}]}}}}}}},"m":{"type":"leaf","weight":695,"entries":[{"key":"name","weight":695,"content":"name"}]}}}}},"y":{"type":"internal","weight":968,"values":["o","e"],"children":{"o":{"type":"internal","weight":968,"values":["u","r"],"children":{"u":{"type":"internal","weight":968,"values":["\ufdd0","r","n"],"children":{"\ufdd0":{"type":"leaf","weight":968,"entries":[{"key":"you","weight":968,"content":"you"}]},"r":{"type":"leaf","weight":903,"entries":[{"key":"your","weight":903,"content":"your"}]},"n":{"type":"leaf","weight":775,"entries":[{"key":"young","weight":775,"content":"young"}]}}},"r":{"type":"leaf","weight":701,"entries":[{"key":"york","weight":701,"content":"york"}]}}},"e":{"type":"internal","weight":906,"values":["a","t","s"],"children":{"a":{"type":"internal","weight":906,"values":["r"],"children":{"r":{"type":"leaf","weight":906,"entries":[{"key":"years","weight":906,"content":"years"},{"key":"year","weight":861,"content":"year"}]}}},"t":{"type":"leaf","weight":801,"entries":[{"key":"yet","weight":801,"content":"yet"}]},"s":{"type":"leaf","weight":326,"entries":[{"key":"yes","weight":326,"content":"yes"}]}}}}},"s":{"type":"internal","weight":964,"values":["h","o","a","u","t","e","i","m","c","y","p","q","l"],"children":{"h":{"type":"internal","weight":964,"values":["e","o","a"],"children":{"e":{"type":"leaf","weight":964,"entries":[{"key":"she","weight":964,"content":"she"}]},"o":{"type":"internal","weight":899,"values":["u","w","r","t"],"children":{"u":{"type":"leaf","weight":899,"entries":[{"key":"should","weight":899,"content":"should"}]},"w":{"type":"internal","weight":689,"values":["\ufdd0","n","e"],"children":{"\ufdd0":{"type":"leaf","weight":689,"entries":[{"key":"show","weight":689,"content":"show"}]},"n":{"type":"leaf","weight":422,"entries":[{"key":"shown","weight":422,"content":"shown"}]},"e":{"type":"leaf","weight":306,"entries":[{"key":"showed","weight":306,"content":"showed"}]}}},"r":{"type":"leaf","weight":566,"entries":[{"key":"short","weight":566,"content":"short"}]},"t":{"type":"leaf","weight":92,"entries":[{"key":"shot","weight":92,"content":"shot"}]}}},"a":{"type":"leaf","weight":659,"entries":[{"key":"shall","weight":659,"content":"shall"}]}}},"o":{"type":"internal","weight":949,"values":["\ufdd0","m","c","u","o","n","r","v"],"children":{"\ufdd0":{"type":"leaf","weight":949,"entries":[{"key":"so","weight":949,"content":"so"}]},"m":{"type":"internal","weight":936,"values":["e"],"children":{"e":{"type":"internal","weight":936,"values":["\ufdd0","t","w"],"children":{"\ufdd0":{"type":"leaf","weight":936,"entries":[{"key":"some","weight":936,"content":"some"}]},"t":{"type":"internal","weight":815,"values":["h","i"],"children":{"h":{"type":"leaf","weight":815,"entries":[{"key":"something","weight":815,"content":"something"}]},"i":{"type":"leaf","weight":587,"entries":[{"key":"sometimes","weight":587,"content":"sometimes"}]}}},"w":{"type":"leaf","weight":209,"entries":[{"key":"somewhat","weight":209,"content":"somewhat"}]}}}}},"c":{"type":"internal","weight":769,"values":["i"],"children":{"i":{"type":"internal","weight":769,"values":["a","e"],"children":{"a":{"type":"leaf","weight":769,"entries":[{"key":"social","weight":769,"content":"social"}]},"e":{"type":"leaf","weight":615,"entries":[{"key":"society","weight":615,"content":"society"}]}}}}},"u":{"type":"internal","weight":620,"values":["t","n"],"children":{"t":{"type":"internal","weight":620,"values":["h"],"children":{"h":{"type":"internal","weight":620,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":620,"entries":[{"key":"south","weight":620,"content":"south"}]},"e":{"type":"leaf","weight":278,"entries":[{"key":"southern","weight":278,"content":"southern"}]}}}}},"n":{"type":"leaf","weight":548,"entries":[{"key":"sound","weight":548,"content":"sound"}]}}},"o":{"type":"leaf","weight":534,"entries":[{"key":"soon","weight":534,"content":"soon"}]},"n":{"type":"leaf","weight":421,"entries":[{"key":"son","weight":421,"content":"son"}]},"r":{"type":"leaf","weight":414,"entries":[{"key":"sort","weight":414,"content":"sort"}]},"v":{"type":"leaf","weight":224,"entries":[{"key":"soviet","weight":224,"content":"soviet"}]}}},"a":{"type":"internal","weight":948,"values":["i","m","y","w","t","l"],"children":{"i":{"type":"leaf","weight":948,"entries":[{"key":"said","weight":948,"content":"said"}]},"m":{"type":"leaf","weight":870,"entries":[{"key":"same","weight":870,"content":"same"}]},"y":{"type":"internal","weight":833,"values":["\ufdd0","s","i"],"children":{"\ufdd0":{"type":"leaf","weight":833,"entries":[{"key":"say","weight":833,"content":"say"}]},"s":{"type":"leaf","weight":538,"entries":[{"key":"says","weight":538,"content":"says"}]},"i":{"type":"leaf","weight":106,"entries":[{"key":"saying","weight":106,"content":"saying"}]}}},"w":{"type":"leaf","weight":739,"entries":[{"key":"saw","weight":739,"content":"saw"}]},"t":{"type":"leaf","weight":358,"entries":[{"key":"sat","weight":358,"content":"sat"}]},"l":{"type":"leaf","weight":262,"entries":[{"key":"sales","weight":262,"content":"sales"}]}}},"u":{"type":"internal","weight":924,"values":["c","r","p","b","d","m","n","g"],"children":{"c":{"type":"leaf","weight":924,"entries":[{"key":"such","weight":924,"content":"such"}]},"r":{"type":"internal","weight":652,"values":["e","f"],"children":{"e":{"type":"leaf","weight":652,"entries":[{"key":"sure","weight":652,"content":"sure"}]},"f":{"type":"leaf","weight":536,"entries":[{"key":"surface","weight":536,"content":"surface"}]}}},"p":{"type":"leaf","weight":478,"entries":[{"key":"support","weight":478,"content":"support"}]},"b":{"type":"leaf","weight":401,"entries":[{"key":"subject","weight":401,"content":"subject"}]},"d":{"type":"leaf","weight":370,"entries":[{"key":"suddenly","weight":370,"content":"suddenly"}]},"m":{"type":"leaf","weight":266,"entries":[{"key":"summer","weight":266,"content":"summer"}]},"n":{"type":"leaf","weight":89,"entries":[{"key":"sun","weight":89,"content":"sun"}]},"g":{"type":"leaf","weight":31,"entries":[{"key":"suggested","weight":31,"content":"suggested"}]}}},"t":{"type":"internal","weight":890,"values":["a","i","u","r","o","e"],"children":{"a":{"type":"internal","weight":890,"values":["t","r","g","n","f","y"],"children":{"t":{"type":"internal","weight":890,"values":["e","i"],"children":{"e":{"type":"internal","weight":890,"values":["\ufdd0","s","m"],"children":{"\ufdd0":{"type":"leaf","weight":890,"entries":[{"key":"state","weight":890,"content":"state"}]},"s":{"type":"leaf","weight":849,"entries":[{"key":"states","weight":849,"content":"states"}]},"m":{"type":"leaf","weight":302,"entries":[{"key":"statement","weight":302,"content":"statement"}]}}},"i":{"type":"leaf","weight":23,"entries":[{"key":"station","weight":23,"content":"station"}]}}},"r":{"type":"internal","weight":511,"values":["t"],"children":{"t":{"type":"leaf","weight":511,"entries":[{"key":"started","weight":511,"content":"started"},{"key":"start","weight":372,"content":"start"}]}}},"g":{"type":"leaf","weight":465,"entries":[{"key":"stage","weight":465,"content":"stage"}]},"n":{"type":"internal","weight":349,"values":["d"],"children":{"d":{"type":"internal","weight":349,"values":["\ufdd0","a"],"children":{"\ufdd0":{"type":"leaf","weight":349,"entries":[{"key":"stand","weight":349,"content":"stand"}]},"a":{"type":"leaf","weight":80,"entries":[{"key":"standard","weight":80,"content":"standard"}]}}}}},"f":{"type":"leaf","weight":103,"entries":[{"key":"staff","weight":103,"content":"staff"}]},"y":{"type":"leaf","weight":97,"entries":[{"key":"stay","weight":97,"content":"stay"}]}}},"i":{"type":"leaf","weight":885,"entries":[{"key":"still","weight":885,"content":"still"}]},"u":{"type":"internal","weight":631,"values":["d"],"children":{"d":{"type":"internal","weight":631,"values":["y","e","i"],"children":{"y":{"type":"leaf","weight":631,"entries":[{"key":"study","weight":631,"content":"study"}]},"e":{"type":"internal","weight":571,"values":["n"],"children":{"n":{"type":"internal","weight":571,"values":["t"],"children":{"t":{"type":"leaf","weight":571,"entries":[{"key":"students","weight":571,"content":"students"},{"key":"student","weight":244,"content":"student"}]}}}}},"i":{"type":"leaf","weight":3,"entries":[{"key":"studies","weight":3,"content":"studies"}]}}}}},"r":{"type":"internal","weight":626,"values":["e","o","a"],"children":{"e":{"type":"internal","weight":626,"values":["e","n","s"],"children":{"e":{"type":"leaf","weight":626,"entries":[{"key":"street","weight":626,"content":"street"}]},"n":{"type":"leaf","weight":281,"entries":[{"key":"strength","weight":281,"content":"strength"}]},"s":{"type":"leaf","weight":49,"entries":[{"key":"stress","weight":49,"content":"stress"}]}}},"o":{"type":"leaf","weight":544,"entries":[{"key":"strong","weight":544,"content":"strong"}]},"a":{"type":"leaf","weight":109,"entries":[{"key":"straight","weight":109,"content":"straight"}]}}},"o":{"type":"internal","weight":568,"values":["o","r","c","p"],"children":{"o":{"type":"leaf","weight":568,"entries":[{"key":"stood","weight":568,"content":"stood"}]},"r":{"type":"leaf","weight":371,"entries":[{"key":"story","weight":371,"content":"story"}]},"c":{"type":"leaf","weight":345,"entries":[{"key":"stock","weight":345,"content":"stock"}]},"p":{"type":"leaf","weight":231,"entries":[{"key":"stopped","weight":231,"content":"stopped"},{"key":"stop","weight":161,"content":"stop"}]}}},"e":{"type":"internal","weight":246,"values":["p"],"children":{"p":{"type":"internal","weight":246,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":246,"entries":[{"key":"step","weight":246,"content":"step"}]},"s":{"type":"leaf","weight":153,"entries":[{"key":"steps","weight":153,"content":"steps"}]}}}}}}},"e":{"type":"internal","weight":883,"values":["e","t","v","c","r","n","a"],"children":{"e":{"type":"internal","weight":883,"values":["\ufdd0","m","n"],"children":{"\ufdd0":{"type":"leaf","weight":883,"entries":[{"key":"see","weight":883,"content":"see"}]},"m":{"type":"internal","weight":731,"values":["e","s",null],"children":{"e":{"type":"leaf","weight":731,"entries":[{"key":"seemed","weight":731,"content":"seemed"}]},"s":{"type":"leaf","weight":649,"entries":[{"key":"seems","weight":649,"content":"seems"}]},"undefined":{"type":"leaf","weight":603,"entries":[{"key":"seem","weight":603,"content":"seem"}]}}},"n":{"type":"leaf","weight":674,"entries":[{"key":"seen","weight":674,"content":"seen"}]}}},"t":{"type":"leaf","weight":798,"entries":[{"key":"set","weight":798,"content":"set"}]},"v":{"type":"internal","weight":766,"values":["e"],"children":{"e":{"type":"internal","weight":766,"values":["r","n"],"children":{"r":{"type":"leaf","weight":766,"entries":[{"key":"several","weight":766,"content":"several"}]},"n":{"type":"leaf","weight":96,"entries":[{"key":"seven","weight":96,"content":"seven"}]}}}}},"c":{"type":"internal","weight":761,"values":["o","r","t"],"children":{"o":{"type":"leaf","weight":761,"entries":[{"key":"second","weight":761,"content":"second"}]},"r":{"type":"leaf","weight":505,"entries":[{"key":"secretary","weight":505,"content":"secretary"}]},"t":{"type":"leaf","weight":503,"entries":[{"key":"section","weight":503,"content":"section"}]}}},"r":{"type":"internal","weight":716,"values":["v","i"],"children":{"v":{"type":"internal","weight":716,"values":["i","e"],"children":{"i":{"type":"internal","weight":716,"values":["c"],"children":{"c":{"type":"internal","weight":716,"values":["e"],"children":{"e":{"type":"internal","weight":716,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":716,"entries":[{"key":"service","weight":716,"content":"service"}]},"s":{"type":"leaf","weight":290,"entries":[{"key":"services","weight":290,"content":"services"}]}}}}}}},"e":{"type":"leaf","weight":150,"entries":[{"key":"served","weight":150,"content":"served"},{"key":"serve","weight":50,"content":"serve"}]}}},"i":{"type":"internal","weight":239,"values":["e","o"],"children":{"e":{"type":"leaf","weight":239,"entries":[{"key":"series","weight":239,"content":"series"}]},"o":{"type":"leaf","weight":134,"entries":[{"key":"serious","weight":134,"content":"serious"}]}}}}},"n":{"type":"internal","weight":708,"values":["s","t"],"children":{"s":{"type":"leaf","weight":708,"entries":[{"key":"sense","weight":708,"content":"sense"}]},"t":{"type":"leaf","weight":328,"entries":[{"key":"sent","weight":328,"content":"sent"}]}}},"a":{"type":"leaf","weight":25,"entries":[{"key":"season","weight":25,"content":"season"}]}}},"i":{"type":"internal","weight":858,"values":["n","d","x","t","m","z"],"children":{"n":{"type":"internal","weight":858,"values":["c","g"],"children":{"c":{"type":"leaf","weight":858,"entries":[{"key":"since","weight":858,"content":"since"}]},"g":{"type":"leaf","weight":444,"entries":[{"key":"single","weight":444,"content":"single"}]}}},"d":{"type":"leaf","weight":770,"entries":[{"key":"side","weight":770,"content":"side"}]},"x":{"type":"leaf","weight":585,"entries":[{"key":"six","weight":585,"content":"six"}]},"t":{"type":"leaf","weight":525,"entries":[{"key":"situation","weight":525,"content":"situation"}]},"m":{"type":"internal","weight":437,"values":["p","i"],"children":{"p":{"type":"internal","weight":437,"values":["l"],"children":{"l":{"type":"internal","weight":437,"values":["y","e"],"children":{"y":{"type":"leaf","weight":437,"entries":[{"key":"simply","weight":437,"content":"simply"}]},"e":{"type":"leaf","weight":396,"entries":[{"key":"simple","weight":396,"content":"simple"}]}}}}},"i":{"type":"leaf","weight":388,"entries":[{"key":"similar","weight":388,"content":"similar"}]}}},"z":{"type":"leaf","weight":285,"entries":[{"key":"size","weight":285,"content":"size"}]}}},"m":{"type":"leaf","weight":837,"entries":[{"key":"small","weight":837,"content":"small"}]},"c":{"type":"internal","weight":827,"values":["h","i","e"],"children":{"h":{"type":"internal","weight":827,"values":["o"],"children":{"o":{"type":"internal","weight":827,"values":["o"],"children":{"o":{"type":"internal","weight":827,"values":["l"],"children":{"l":{"type":"internal","weight":827,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":827,"entries":[{"key":"school","weight":827,"content":"school"}]},"s":{"type":"leaf","weight":516,"entries":[{"key":"schools","weight":516,"content":"schools"}]}}}}}}}}},"i":{"type":"leaf","weight":249,"entries":[{"key":"science","weight":249,"content":"science"}]},"e":{"type":"leaf","weight":35,"entries":[{"key":"scene","weight":35,"content":"scene"}]}}},"y":{"type":"internal","weight":799,"values":["s"],"children":{"s":{"type":"internal","weight":799,"values":["t"],"children":{"t":{"type":"internal","weight":799,"values":["e"],"children":{"e":{"type":"internal","weight":799,"values":["m"],"children":{"m":{"type":"internal","weight":799,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":799,"entries":[{"key":"system","weight":799,"content":"system"}]},"s":{"type":"leaf","weight":233,"entries":[{"key":"systems","weight":233,"content":"systems"}]}}}}}}}}}}},"p":{"type":"internal","weight":637,"values":["e","a","i","r"],"children":{"e":{"type":"internal","weight":637,"values":["c","a","n"],"children":{"c":{"type":"internal","weight":637,"values":["i"],"children":{"i":{"type":"internal","weight":637,"values":["a","f"],"children":{"a":{"type":"leaf","weight":637,"entries":[{"key":"special","weight":637,"content":"special"}]},"f":{"type":"leaf","weight":126,"entries":[{"key":"specific","weight":126,"content":"specific"}]}}}}},"a":{"type":"leaf","weight":85,"entries":[{"key":"speak","weight":85,"content":"speak"}]},"n":{"type":"leaf","weight":13,"entries":[{"key":"spent","weight":13,"content":"spent"}]}}},"a":{"type":"leaf","weight":488,"entries":[{"key":"space","weight":488,"content":"space"}]},"i":{"type":"leaf","weight":485,"entries":[{"key":"spirit","weight":485,"content":"spirit"}]},"r":{"type":"leaf","weight":210,"entries":[{"key":"spring","weight":210,"content":"spring"}]}}},"q":{"type":"leaf","weight":317,"entries":[{"key":"square","weight":317,"content":"square"}]},"l":{"type":"leaf","weight":125,"entries":[{"key":"slowly","weight":125,"content":"slowly"}]}}},"m":{"type":"internal","weight":953,"values":["o","a","y","e","u","i"],"children":{"o":{"type":"internal","weight":953,"values":["r","s","n","m","t","d","v","u"],"children":{"r":{"type":"internal","weight":953,"values":["e","n","a"],"children":{"e":{"type":"leaf","weight":953,"entries":[{"key":"more","weight":953,"content":"more"}]},"n":{"type":"leaf","weight":563,"entries":[{"key":"morning","weight":563,"content":"morning"}]},"a":{"type":"leaf","weight":314,"entries":[{"key":"moral","weight":314,"content":"moral"}]}}},"s":{"type":"leaf","weight":917,"entries":[{"key":"most","weight":917,"content":"most"}]},"n":{"type":"internal","weight":656,"values":["e","t"],"children":{"e":{"type":"leaf","weight":656,"entries":[{"key":"money","weight":656,"content":"money"}]},"t":{"type":"internal","weight":502,"values":["h"],"children":{"h":{"type":"leaf","weight":502,"entries":[{"key":"months","weight":502,"content":"months"},{"key":"month","weight":240,"content":"month"}]}}}}},"m":{"type":"leaf","weight":632,"entries":[{"key":"moment","weight":632,"content":"moment"}]},"t":{"type":"leaf","weight":579,"entries":[{"key":"mother","weight":579,"content":"mother"}]},"d":{"type":"leaf","weight":533,"entries":[{"key":"modern","weight":533,"content":"modern"}]},"v":{"type":"internal","weight":479,"values":["e","i"],"children":{"e":{"type":"internal","weight":479,"values":["d","\ufdd0","m"],"children":{"d":{"type":"leaf","weight":479,"entries":[{"key":"moved","weight":479,"content":"moved"}]},"\ufdd0":{"type":"leaf","weight":436,"entries":[{"key":"move","weight":436,"content":"move"}]},"m":{"type":"leaf","weight":220,"entries":[{"key":"movement","weight":220,"content":"movement"}]}}},"i":{"type":"leaf","weight":111,"entries":[{"key":"moving","weight":111,"content":"moving"}]}}},"u":{"type":"leaf","weight":6,"entries":[{"key":"mouth","weight":6,"content":"mouth"}]}}},"a":{"type":"internal","weight":931,"values":["y","n","d","k","t","j","r","i","c"],"children":{"y":{"type":"internal","weight":931,"values":["\ufdd0","b"],"children":{"\ufdd0":{"type":"leaf","weight":931,"entries":[{"key":"may","weight":931,"content":"may"}]},"b":{"type":"leaf","weight":259,"entries":[{"key":"maybe","weight":259,"content":"maybe"}]}}},"n":{"type":"internal","weight":920,"values":["\ufdd0","y","n"],"children":{"\ufdd0":{"type":"leaf","weight":920,"entries":[{"key":"man","weight":920,"content":"man"}]},"y":{"type":"leaf","weight":912,"entries":[{"key":"many","weight":912,"content":"many"}]},"n":{"type":"leaf","weight":190,"entries":[{"key":"manner","weight":190,"content":"manner"}]}}},"d":{"type":"leaf","weight":916,"entries":[{"key":"made","weight":916,"content":"made"}]},"k":{"type":"internal","weight":887,"values":["e","i"],"children":{"e":{"type":"internal","weight":887,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":887,"entries":[{"key":"make","weight":887,"content":"make"}]},"s":{"type":"leaf","weight":445,"entries":[{"key":"makes","weight":445,"content":"makes"}]}}},"i":{"type":"leaf","weight":642,"entries":[{"key":"making","weight":642,"content":"making"}]}}},"t":{"type":"internal","weight":704,"values":["t","e"],"children":{"t":{"type":"leaf","weight":704,"entries":[{"key":"matter","weight":704,"content":"matter"}]},"e":{"type":"leaf","weight":463,"entries":[{"key":"material","weight":463,"content":"material"}]}}},"j":{"type":"leaf","weight":635,"entries":[{"key":"major","weight":635,"content":"major"}]},"r":{"type":"internal","weight":377,"values":["k","c","r"],"children":{"k":{"type":"leaf","weight":377,"entries":[{"key":"market","weight":377,"content":"market"}]},"c":{"type":"leaf","weight":166,"entries":[{"key":"march","weight":166,"content":"march"}]},"r":{"type":"leaf","weight":21,"entries":[{"key":"married","weight":21,"content":"married"}]}}},"i":{"type":"leaf","weight":155,"entries":[{"key":"main","weight":155,"content":"main"}]},"c":{"type":"leaf","weight":1,"entries":[{"key":"machine","weight":1,"content":"machine"}]}}},"y":{"type":"internal","weight":926,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":926,"entries":[{"key":"my","weight":926,"content":"my"}]},"s":{"type":"leaf","weight":230,"entries":[{"key":"myself","weight":230,"content":"myself"}]}}},"e":{"type":"internal","weight":919,"values":["\ufdd0","n","m","a","d","e","t","r"],"children":{"\ufdd0":{"type":"leaf","weight":919,"entries":[{"key":"me","weight":919,"content":"me"}]},"n":{"type":"leaf","weight":882,"entries":[{"key":"men","weight":882,"content":"men"}]},"m":{"type":"internal","weight":725,"values":["b"],"children":{"b":{"type":"internal","weight":725,"values":["e"],"children":{"e":{"type":"internal","weight":725,"values":["r"],"children":{"r":{"type":"leaf","weight":725,"entries":[{"key":"members","weight":725,"content":"members"},{"key":"member","weight":284,"content":"member"}]}}}}}}},"a":{"type":"internal","weight":706,"values":["n"],"children":{"n":{"type":"internal","weight":706,"values":["s","\ufdd0","i"],"children":{"s":{"type":"leaf","weight":706,"entries":[{"key":"means","weight":706,"content":"means"}]},"\ufdd0":{"type":"leaf","weight":535,"entries":[{"key":"mean","weight":535,"content":"mean"}]},"i":{"type":"leaf","weight":213,"entries":[{"key":"meaning","weight":213,"content":"meaning"}]}}}}},"d":{"type":"leaf","weight":405,"entries":[{"key":"medical","weight":405,"content":"medical"}]},"e":{"type":"internal","weight":393,"values":["t"],"children":{"t":{"type":"leaf","weight":393,"entries":[{"key":"meeting","weight":393,"content":"meeting"},{"key":"meet","weight":356,"content":"meet"}]}}},"t":{"type":"internal","weight":311,"values":["h",null],"children":{"h":{"type":"internal","weight":311,"values":["o"],"children":{"o":{"type":"internal","weight":311,"values":["d"],"children":{"d":{"type":"leaf","weight":311,"entries":[{"key":"methods","weight":311,"content":"methods"},{"key":"method","weight":309,"content":"method"}]}}}}},"undefined":{"type":"leaf","weight":251,"entries":[{"key":"met","weight":251,"content":"met"}]}}},"r":{"type":"leaf","weight":274,"entries":[{"key":"merely","weight":274,"content":"merely"}]}}},"u":{"type":"internal","weight":910,"values":["s","c"],"children":{"s":{"type":"internal","weight":910,"values":["t","i"],"children":{"t":{"type":"leaf","weight":910,"entries":[{"key":"must","weight":910,"content":"must"}]},"i":{"type":"leaf","weight":581,"entries":[{"key":"music","weight":581,"content":"music"}]}}},"c":{"type":"leaf","weight":905,"entries":[{"key":"much","weight":905,"content":"much"}]}}},"i":{"type":"internal","weight":864,"values":["g","n","s","l","d"],"children":{"g":{"type":"leaf","weight":864,"entries":[{"key":"might","weight":864,"content":"might"}]},"n":{"type":"internal","weight":726,"values":["d","u"],"children":{"d":{"type":"leaf","weight":726,"entries":[{"key":"mind","weight":726,"content":"mind"}]},"u":{"type":"leaf","weight":523,"entries":[{"key":"minutes","weight":523,"content":"minutes"}]}}},"s":{"type":"leaf","weight":639,"entries":[{"key":"miss","weight":639,"content":"miss"}]},"l":{"type":"internal","weight":565,"values":["i","l","e"],"children":{"i":{"type":"leaf","weight":565,"entries":[{"key":"military","weight":565,"content":"military"}]},"l":{"type":"leaf","weight":547,"entries":[{"key":"million","weight":547,"content":"million"}]},"e":{"type":"leaf","weight":450,"entries":[{"key":"miles","weight":450,"content":"miles"}]}}},"d":{"type":"leaf","weight":144,"entries":[{"key":"middle","weight":144,"content":"middle"}]}}}}},"u":{"type":"internal","weight":946,"values":["p","n","s"],"children":{"p":{"type":"internal","weight":946,"values":["\ufdd0","o"],"children":{"\ufdd0":{"type":"leaf","weight":946,"entries":[{"key":"up","weight":946,"content":"up"}]},"o":{"type":"leaf","weight":828,"entries":[{"key":"upon","weight":828,"content":"upon"}]}}},"n":{"type":"internal","weight":873,"values":["d","i","t"],"children":{"d":{"type":"internal","weight":873,"values":["e"],"children":{"e":{"type":"internal","weight":873,"values":["r"],"children":{"r":{"type":"internal","weight":873,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":873,"entries":[{"key":"under","weight":873,"content":"under"}]},"s":{"type":"internal","weight":283,"values":["t"],"children":{"t":{"type":"internal","weight":283,"values":["a"],"children":{"a":{"type":"internal","weight":283,"values":["n"],"children":{"n":{"type":"internal","weight":283,"values":["d"],"children":{"d":{"type":"internal","weight":283,"values":["\ufdd0","i"],"children":{"\ufdd0":{"type":"leaf","weight":283,"entries":[{"key":"understand","weight":283,"content":"understand"}]},"i":{"type":"leaf","weight":170,"entries":[{"key":"understanding","weight":170,"content":"understanding"}]}}}}}}}}}}}}}}}}},"i":{"type":"internal","weight":823,"values":["t","v","o"],"children":{"t":{"type":"leaf","weight":823,"entries":[{"key":"united","weight":823,"content":"united"},{"key":"unit","weight":10,"content":"unit"}]},"v":{"type":"leaf","weight":575,"entries":[{"key":"university","weight":575,"content":"university"}]},"o":{"type":"leaf","weight":483,"entries":[{"key":"union","weight":483,"content":"union"}]}}},"t":{"type":"leaf","weight":818,"entries":[{"key":"until","weight":818,"content":"until"}]}}},"s":{"type":"internal","weight":865,"values":["\ufdd0","e","u","i"],"children":{"\ufdd0":{"type":"leaf","weight":865,"entries":[{"key":"us","weight":865,"content":"us"}]},"e":{"type":"leaf","weight":853,"entries":[{"key":"used","weight":853,"content":"used"},{"key":"use","weight":847,"content":"use"}]},"u":{"type":"leaf","weight":556,"entries":[{"key":"usually","weight":556,"content":"usually"}]},"i":{"type":"leaf","weight":330,"entries":[{"key":"using","weight":330,"content":"using"}]}}}}},"c":{"type":"internal","weight":940,"values":["a","o","i","h","e","l","u",null],"children":{"a":{"type":"internal","weight":940,"values":["n","m","l","s","r","u"],"children":{"n":{"type":"internal","weight":940,"values":["\ufdd0","n"],"children":{"\ufdd0":{"type":"leaf","weight":940,"entries":[{"key":"can","weight":940,"content":"can"}]},"n":{"type":"leaf","weight":646,"entries":[{"key":"cannot","weight":646,"content":"cannot"}]}}},"m":{"type":"leaf","weight":855,"entries":[{"key":"came","weight":855,"content":"came"}]},"l":{"type":"internal","weight":791,"values":["l"],"children":{"l":{"type":"leaf","weight":791,"entries":[{"key":"called","weight":791,"content":"called"},{"key":"call","weight":500,"content":"call"}]}}},"s":{"type":"internal","weight":750,"values":["e"],"children":{"e":{"type":"internal","weight":750,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":750,"entries":[{"key":"case","weight":750,"content":"case"}]},"s":{"type":"leaf","weight":350,"entries":[{"key":"cases","weight":350,"content":"cases"}]}}}}},"r":{"type":"internal","weight":667,"values":["\ufdd0","e","r","s"],"children":{"\ufdd0":{"type":"leaf","weight":667,"entries":[{"key":"car","weight":667,"content":"car"}]},"e":{"type":"leaf","weight":407,"entries":[{"key":"care","weight":407,"content":"care"}]},"r":{"type":"leaf","weight":200,"entries":[{"key":"carried","weight":200,"content":"carried"}]},"s":{"type":"leaf","weight":90,"entries":[{"key":"cars","weight":90,"content":"cars"}]}}},"u":{"type":"leaf","weight":236,"entries":[{"key":"cause","weight":236,"content":"cause"}]}}},"o":{"type":"internal","weight":935,"values":["u","m","l","s","n","r","v"],"children":{"u":{"type":"internal","weight":935,"values":["l","r","n","p"],"children":{"l":{"type":"leaf","weight":935,"entries":[{"key":"could","weight":935,"content":"could"}]},"r":{"type":"internal","weight":820,"values":["s","t"],"children":{"s":{"type":"leaf","weight":820,"entries":[{"key":"course","weight":820,"content":"course"}]},"t":{"type":"leaf","weight":604,"entries":[{"key":"court","weight":604,"content":"court"}]}}},"n":{"type":"internal","weight":723,"values":["t","c"],"children":{"t":{"type":"internal","weight":723,"values":["r","y"],"children":{"r":{"type":"internal","weight":723,"values":["y","i"],"children":{"y":{"type":"leaf","weight":723,"entries":[{"key":"country","weight":723,"content":"country"}]},"i":{"type":"leaf","weight":360,"entries":[{"key":"countries","weight":360,"content":"countries"}]}}},"y":{"type":"leaf","weight":378,"entries":[{"key":"county","weight":378,"content":"county"}]}}},"c":{"type":"leaf","weight":11,"entries":[{"key":"council","weight":11,"content":"council"}]}}},"p":{"type":"leaf","weight":178,"entries":[{"key":"couple","weight":178,"content":"couple"}]}}},"m":{"type":"internal","weight":859,"values":["e","p","m","i"],"children":{"e":{"type":"internal","weight":859,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":859,"entries":[{"key":"come","weight":859,"content":"come"}]},"s":{"type":"leaf","weight":279,"entries":[{"key":"comes","weight":279,"content":"comes"}]}}},"p":{"type":"internal","weight":692,"values":["a","l"],"children":{"a":{"type":"leaf","weight":692,"entries":[{"key":"company","weight":692,"content":"company"}]},"l":{"type":"internal","weight":482,"values":["e"],"children":{"e":{"type":"internal","weight":482,"values":["t"],"children":{"t":{"type":"internal","weight":482,"values":["e"],"children":{"e":{"type":"internal","weight":482,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":482,"entries":[{"key":"complete","weight":482,"content":"complete"}]},"l":{"type":"leaf","weight":83,"entries":[{"key":"completely","weight":83,"content":"completely"}]}}}}}}}}}}},"m":{"type":"internal","weight":608,"values":["u","o","i"],"children":{"u":{"type":"leaf","weight":608,"entries":[{"key":"community","weight":608,"content":"community"}]},"o":{"type":"leaf","weight":593,"entries":[{"key":"common","weight":593,"content":"common"}]},"i":{"type":"internal","weight":427,"values":["t","s"],"children":{"t":{"type":"leaf","weight":427,"entries":[{"key":"committee","weight":427,"content":"committee"}]},"s":{"type":"leaf","weight":8,"entries":[{"key":"commission","weight":8,"content":"commission"}]}}}}},"i":{"type":"leaf","weight":456,"entries":[{"key":"coming","weight":456,"content":"coming"}]}}},"l":{"type":"internal","weight":657,"values":["l","d","o"],"children":{"l":{"type":"leaf","weight":657,"entries":[{"key":"college","weight":657,"content":"college"}]},"d":{"type":"leaf","weight":435,"entries":[{"key":"cold","weight":435,"content":"cold"}]},"o":{"type":"leaf","weight":294,"entries":[{"key":"color","weight":294,"content":"color"}]}}},"s":{"type":"internal","weight":602,"values":["t"],"children":{"t":{"type":"internal","weight":602,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":602,"entries":[{"key":"cost","weight":602,"content":"cost"}]},"s":{"type":"leaf","weight":468,"entries":[{"key":"costs","weight":468,"content":"costs"}]}}}}},"n":{"type":"internal","weight":592,"values":["t","d","g","s","c"],"children":{"t":{"type":"internal","weight":592,"values":["r","i"],"children":{"r":{"type":"leaf","weight":592,"entries":[{"key":"control","weight":592,"content":"control"}]},"i":{"type":"internal","weight":258,"values":["n"],"children":{"n":{"type":"internal","weight":258,"values":["u"],"children":{"u":{"type":"internal","weight":258,"values":["e"],"children":{"e":{"type":"leaf","weight":258,"entries":[{"key":"continued","weight":258,"content":"continued"},{"key":"continue","weight":54,"content":"continue"}]}}}}}}}}},"d":{"type":"leaf","weight":476,"entries":[{"key":"conditions","weight":476,"content":"conditions"}]},"g":{"type":"leaf","weight":364,"entries":[{"key":"congress","weight":364,"content":"congress"}]},"s":{"type":"internal","weight":361,"values":["i"],"children":{"i":{"type":"internal","weight":361,"values":["d"],"children":{"d":{"type":"internal","weight":361,"values":["e"],"children":{"e":{"type":"internal","weight":361,"values":["r"],"children":{"r":{"type":"leaf","weight":361,"entries":[{"key":"considered","weight":361,"content":"considered"},{"key":"consider","weight":212,"content":"consider"}]}}}}}}}}},"c":{"type":"leaf","weight":273,"entries":[{"key":"concerned","weight":273,"content":"concerned"}]}}},"r":{"type":"internal","weight":120,"values":["n","p"],"children":{"n":{"type":"leaf","weight":120,"entries":[{"key":"corner","weight":120,"content":"corner"}]},"p":{"type":"leaf","weight":76,"entries":[{"key":"corps","weight":76,"content":"corps"}]}}},"v":{"type":"leaf","weight":19,"entries":[{"key":"covered","weight":19,"content":"covered"}]}}},"i":{"type":"internal","weight":780,"values":["t"],"children":{"t":{"type":"internal","weight":780,"values":["y","i"],"children":{"y":{"type":"leaf","weight":780,"entries":[{"key":"city","weight":780,"content":"city"}]},"i":{"type":"leaf","weight":44,"entries":[{"key":"cities","weight":44,"content":"cities"}]}}}}},"h":{"type":"internal","weight":740,"values":["i","u","a","r","o"],"children":{"i":{"type":"internal","weight":740,"values":["l","e"],"children":{"l":{"type":"internal","weight":740,"values":["d"],"children":{"d":{"type":"leaf","weight":740,"entries":[{"key":"children","weight":740,"content":"children"},{"key":"child","weight":569,"content":"child"}]}}},"e":{"type":"leaf","weight":151,"entries":[{"key":"chief","weight":151,"content":"chief"}]}}},"u":{"type":"leaf","weight":737,"entries":[{"key":"church","weight":737,"content":"church"}]},"a":{"type":"internal","weight":619,"values":["n","r"],"children":{"n":{"type":"internal","weight":619,"values":["g","c"],"children":{"g":{"type":"internal","weight":619,"values":["e"],"children":{"e":{"type":"internal","weight":619,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":619,"entries":[{"key":"change","weight":619,"content":"change"}]},"s":{"type":"leaf","weight":248,"entries":[{"key":"changes","weight":248,"content":"changes"}]}}}}},"c":{"type":"leaf","weight":245,"entries":[{"key":"chance","weight":245,"content":"chance"}]}}},"r":{"type":"internal","weight":179,"values":["g","a"],"children":{"g":{"type":"leaf","weight":179,"entries":[{"key":"charge","weight":179,"content":"charge"}]},"a":{"type":"leaf","weight":145,"entries":[{"key":"character","weight":145,"content":"character"}]}}}}},"r":{"type":"leaf","weight":327,"entries":[{"key":"christian","weight":327,"content":"christian"}]},"o":{"type":"leaf","weight":104,"entries":[{"key":"choice","weight":104,"content":"choice"}]}}},"e":{"type":"internal","weight":713,"values":["r","n"],"children":{"r":{"type":"internal","weight":713,"values":["t"],"children":{"t":{"type":"internal","weight":713,"values":["a"],"children":{"a":{"type":"internal","weight":713,"values":["i"],"children":{"i":{"type":"internal","weight":713,"values":["n"],"children":{"n":{"type":"internal","weight":713,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":713,"entries":[{"key":"certain","weight":713,"content":"certain"}]},"l":{"type":"leaf","weight":318,"entries":[{"key":"certainly","weight":318,"content":"certainly"}]}}}}}}}}}}},"n":{"type":"internal","weight":595,"values":["t"],"children":{"t":{"type":"internal","weight":595,"values":["e","u","r",null],"children":{"e":{"type":"leaf","weight":595,"entries":[{"key":"center","weight":595,"content":"center"}]},"u":{"type":"leaf","weight":557,"entries":[{"key":"century","weight":557,"content":"century"}]},"r":{"type":"leaf","weight":420,"entries":[{"key":"central","weight":420,"content":"central"}]},"undefined":{"type":"leaf","weight":379,"entries":[{"key":"cent","weight":379,"content":"cent"}]}}}}}}},"l":{"type":"internal","weight":611,"values":["o","e","a","u"],"children":{"o":{"type":"internal","weight":611,"values":["s"],"children":{"s":{"type":"internal","weight":611,"values":["e"],"children":{"e":{"type":"internal","weight":611,"values":["\ufdd0","d"],"children":{"\ufdd0":{"type":"leaf","weight":611,"entries":[{"key":"close","weight":611,"content":"close"}]},"d":{"type":"leaf","weight":37,"entries":[{"key":"closed","weight":37,"content":"closed"}]}}}}}}},"e":{"type":"internal","weight":584,"values":["a"],"children":{"a":{"type":"internal","weight":584,"values":["r"],"children":{"r":{"type":"internal","weight":584,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":584,"entries":[{"key":"clear","weight":584,"content":"clear"}]},"l":{"type":"leaf","weight":218,"entries":[{"key":"clearly","weight":218,"content":"clearly"}]}}}}}}},"a":{"type":"leaf","weight":558,"entries":[{"key":"class","weight":558,"content":"class"}]},"u":{"type":"leaf","weight":336,"entries":[{"key":"club","weight":336,"content":"club"}]}}},"u":{"type":"internal","weight":509,"values":["t","r"],"children":{"t":{"type":"leaf","weight":509,"entries":[{"key":"cut","weight":509,"content":"cut"}]},"r":{"type":"leaf","weight":15,"entries":[{"key":"current","weight":15,"content":"current"}]}}},"undefined":{"type":"leaf","weight":171,"entries":[{"key":"c","weight":171,"content":"c"}]}}},"d":{"type":"internal","weight":929,"values":["o","i","a","u","e","r"],"children":{"o":{"type":"internal","weight":929,"values":["\ufdd0","w","e","n","o","i","u"],"children":{"\ufdd0":{"type":"leaf","weight":929,"entries":[{"key":"do","weight":929,"content":"do"}]},"w":{"type":"leaf","weight":900,"entries":[{"key":"down","weight":900,"content":"down"}]},"e":{"type":"leaf","weight":825,"entries":[{"key":"does","weight":825,"content":"does"}]},"n":{"type":"leaf","weight":719,"entries":[{"key":"done","weight":719,"content":"done"}]},"o":{"type":"leaf","weight":709,"entries":[{"key":"door","weight":709,"content":"door"}]},"i":{"type":"leaf","weight":410,"entries":[{"key":"doing","weight":410,"content":"doing"}]},"u":{"type":"leaf","weight":116,"entries":[{"key":"doubt","weight":116,"content":"doubt"}]}}},"i":{"type":"internal","weight":913,"values":["d","f","r","s","v"],"children":{"d":{"type":"leaf","weight":913,"entries":[{"key":"did","weight":913,"content":"did"}]},"f":{"type":"internal","weight":712,"values":["f"],"children":{"f":{"type":"internal","weight":712,"values":["e","i"],"children":{"e":{"type":"internal","weight":712,"values":["r"],"children":{"r":{"type":"internal","weight":712,"values":["e"],"children":{"e":{"type":"internal","weight":712,"values":["n"],"children":{"n":{"type":"internal","weight":712,"values":["t","c"],"children":{"t":{"type":"leaf","weight":712,"entries":[{"key":"different","weight":712,"content":"different"}]},"c":{"type":"leaf","weight":351,"entries":[{"key":"difference","weight":351,"content":"difference"}]}}}}}}}}},"i":{"type":"leaf","weight":399,"entries":[{"key":"difficult","weight":399,"content":"difficult"}]}}}}},"r":{"type":"internal","weight":304,"values":["e"],"children":{"e":{"type":"internal","weight":304,"values":["c"],"children":{"c":{"type":"internal","weight":304,"values":["t"],"children":{"t":{"type":"internal","weight":304,"values":["l","i",null],"children":{"l":{"type":"leaf","weight":304,"entries":[{"key":"directly","weight":304,"content":"directly"}]},"i":{"type":"leaf","weight":269,"entries":[{"key":"direction","weight":269,"content":"direction"}]},"undefined":{"type":"leaf","weight":234,"entries":[{"key":"direct","weight":234,"content":"direct"}]}}}}}}}}},"s":{"type":"internal","weight":272,"values":["t"],"children":{"t":{"type":"internal","weight":272,"values":["r","a"],"children":{"r":{"type":"leaf","weight":272,"entries":[{"key":"district","weight":272,"content":"district"}]},"a":{"type":"leaf","weight":60,"entries":[{"key":"distance","weight":60,"content":"distance"}]}}}}},"v":{"type":"leaf","weight":55,"entries":[{"key":"division","weight":55,"content":"division"}]}}},"a":{"type":"internal","weight":871,"values":["y","r","t","i"],"children":{"y":{"type":"internal","weight":871,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":871,"entries":[{"key":"day","weight":871,"content":"day"}]},"s":{"type":"leaf","weight":772,"entries":[{"key":"days","weight":772,"content":"days"}]}}},"r":{"type":"leaf","weight":490,"entries":[{"key":"dark","weight":490,"content":"dark"}]},"t":{"type":"internal","weight":447,"values":["a","e"],"children":{"a":{"type":"leaf","weight":447,"entries":[{"key":"data","weight":447,"content":"data"}]},"e":{"type":"leaf","weight":7,"entries":[{"key":"date","weight":7,"content":"date"}]}}},"i":{"type":"leaf","weight":180,"entries":[{"key":"daily","weight":180,"content":"daily"}]}}},"u":{"type":"internal","weight":845,"values":["r","e"],"children":{"r":{"type":"leaf","weight":845,"entries":[{"key":"during","weight":845,"content":"during"}]},"e":{"type":"leaf","weight":312,"entries":[{"key":"due","weight":312,"content":"due"}]}}},"e":{"type":"internal","weight":733,"values":["v","a","p","f","c","g","s","t","e","m",null],"children":{"v":{"type":"internal","weight":733,"values":["e"],"children":{"e":{"type":"internal","weight":733,"values":["l"],"children":{"l":{"type":"internal","weight":733,"values":["o"],"children":{"o":{"type":"internal","weight":733,"values":["p"],"children":{"p":{"type":"internal","weight":733,"values":["m","e"],"children":{"m":{"type":"leaf","weight":733,"entries":[{"key":"development","weight":733,"content":"development"}]},"e":{"type":"leaf","weight":430,"entries":[{"key":"developed","weight":430,"content":"developed"}]}}}}}}}}}}},"a":{"type":"internal","weight":673,"values":["t","d","l"],"children":{"t":{"type":"leaf","weight":673,"entries":[{"key":"death","weight":673,"content":"death"}]},"d":{"type":"leaf","weight":458,"entries":[{"key":"dead","weight":458,"content":"dead"}]},"l":{"type":"leaf","weight":321,"entries":[{"key":"deal","weight":321,"content":"deal"}]}}},"p":{"type":"leaf","weight":596,"entries":[{"key":"department","weight":596,"content":"department"}]},"f":{"type":"leaf","weight":426,"entries":[{"key":"defense","weight":426,"content":"defense"}]},"c":{"type":"internal","weight":301,"values":["i"],"children":{"i":{"type":"internal","weight":301,"values":["d","s"],"children":{"d":{"type":"leaf","weight":301,"entries":[{"key":"decided","weight":301,"content":"decided"}]},"s":{"type":"leaf","weight":148,"entries":[{"key":"decision","weight":148,"content":"decision"}]}}}}},"g":{"type":"leaf","weight":193,"entries":[{"key":"degree","weight":193,"content":"degree"}]},"undefined":{"type":"leaf","weight":173,"entries":[{"key":"de","weight":173,"content":"de"}]},"s":{"type":"internal","weight":163,"values":["c","i","p"],"children":{"c":{"type":"leaf","weight":163,"entries":[{"key":"described","weight":163,"content":"described"}]},"i":{"type":"internal","weight":108,"values":["g"],"children":{"g":{"type":"internal","weight":108,"values":["n"],"children":{"n":{"type":"internal","weight":108,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":108,"entries":[{"key":"design","weight":108,"content":"design"}]},"e":{"type":"leaf","weight":64,"entries":[{"key":"designed","weight":64,"content":"designed"}]}}}}}}},"p":{"type":"leaf","weight":20,"entries":[{"key":"despite","weight":20,"content":"despite"}]}}},"t":{"type":"internal","weight":147,"values":["e"],"children":{"e":{"type":"internal","weight":147,"values":["r"],"children":{"r":{"type":"internal","weight":147,"values":["m"],"children":{"m":{"type":"internal","weight":147,"values":["i"],"children":{"i":{"type":"internal","weight":147,"values":["n"],"children":{"n":{"type":"internal","weight":147,"values":["e"],"children":{"e":{"type":"leaf","weight":147,"entries":[{"key":"determined","weight":147,"content":"determined"},{"key":"determine","weight":51,"content":"determine"}]}}}}}}}}}}}}},"e":{"type":"leaf","weight":72,"entries":[{"key":"deep","weight":72,"content":"deep"}]},"m":{"type":"leaf","weight":69,"entries":[{"key":"democratic","weight":69,"content":"democratic"}]}}},"r":{"type":"leaf","weight":26,"entries":[{"key":"drive","weight":26,"content":"drive"}]}}},"l":{"type":"internal","weight":923,"values":["i","o","a","e"],"children":{"i":{"type":"internal","weight":923,"values":["k","t","f","g","n","v","s","m"],"children":{"k":{"type":"internal","weight":923,"values":["e"],"children":{"e":{"type":"internal","weight":923,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":923,"entries":[{"key":"like","weight":923,"content":"like"}]},"l":{"type":"leaf","weight":362,"entries":[{"key":"likely","weight":362,"content":"likely"}]}}}}},"t":{"type":"internal","weight":891,"values":["t","e"],"children":{"t":{"type":"leaf","weight":891,"entries":[{"key":"little","weight":891,"content":"little"}]},"e":{"type":"leaf","weight":261,"entries":[{"key":"literature","weight":261,"content":"literature"}]}}},"f":{"type":"leaf","weight":875,"entries":[{"key":"life","weight":875,"content":"life"}]},"g":{"type":"leaf","weight":730,"entries":[{"key":"light","weight":730,"content":"light"}]},"n":{"type":"internal","weight":697,"values":["e"],"children":{"e":{"type":"internal","weight":697,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":697,"entries":[{"key":"line","weight":697,"content":"line"}]},"s":{"type":"leaf","weight":530,"entries":[{"key":"lines","weight":530,"content":"lines"}]}}}}},"v":{"type":"internal","weight":513,"values":["i","e"],"children":{"i":{"type":"leaf","weight":513,"entries":[{"key":"living","weight":513,"content":"living"}]},"e":{"type":"internal","weight":470,"values":["\ufdd0","d"],"children":{"\ufdd0":{"type":"leaf","weight":470,"entries":[{"key":"live","weight":470,"content":"live"}]},"d":{"type":"leaf","weight":122,"entries":[{"key":"lived","weight":122,"content":"lived"}]}}}}},"s":{"type":"leaf","weight":260,"entries":[{"key":"list","weight":260,"content":"list"}]},"m":{"type":"leaf","weight":38,"entries":[{"key":"limited","weight":38,"content":"limited"}]}}},"o":{"type":"internal","weight":880,"values":["n","o","c","v","w","s","t"],"children":{"n":{"type":"internal","weight":880,"values":["g"],"children":{"g":{"type":"internal","weight":880,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":880,"entries":[{"key":"long","weight":880,"content":"long"}]},"e":{"type":"leaf","weight":510,"entries":[{"key":"longer","weight":510,"content":"longer"}]}}}}},"o":{"type":"internal","weight":788,"values":["k"],"children":{"k":{"type":"internal","weight":788,"values":["\ufdd0","e","i"],"children":{"\ufdd0":{"type":"leaf","weight":788,"entries":[{"key":"look","weight":788,"content":"look"}]},"e":{"type":"leaf","weight":753,"entries":[{"key":"looked","weight":753,"content":"looked"}]},"i":{"type":"leaf","weight":448,"entries":[{"key":"looking","weight":448,"content":"looking"}]}}}}},"c":{"type":"leaf","weight":690,"entries":[{"key":"local","weight":690,"content":"local"}]},"v":{"type":"leaf","weight":609,"entries":[{"key":"love","weight":609,"content":"love"}]},"w":{"type":"internal","weight":451,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":451,"entries":[{"key":"low","weight":451,"content":"low"}]},"e":{"type":"leaf","weight":187,"entries":[{"key":"lower","weight":187,"content":"lower"}]}}},"s":{"type":"leaf","weight":449,"entries":[{"key":"lost","weight":449,"content":"lost"}]},"t":{"type":"leaf","weight":207,"entries":[{"key":"lot","weight":207,"content":"lot"}]}}},"a":{"type":"internal","weight":866,"values":["s","t","r","w","n","b","y","c"],"children":{"s":{"type":"leaf","weight":866,"entries":[{"key":"last","weight":866,"content":"last"}]},"t":{"type":"internal","weight":785,"values":["e","t"],"children":{"e":{"type":"leaf","weight":785,"entries":[{"key":"later","weight":785,"content":"later"},{"key":"late","weight":472,"content":"late"}]},"t":{"type":"leaf","weight":115,"entries":[{"key":"latter","weight":115,"content":"latter"}]}}},"r":{"type":"internal","weight":748,"values":["g"],"children":{"g":{"type":"internal","weight":748,"values":["e"],"children":{"e":{"type":"internal","weight":748,"values":["\ufdd0","r"],"children":{"\ufdd0":{"type":"leaf","weight":748,"entries":[{"key":"large","weight":748,"content":"large"}]},"r":{"type":"leaf","weight":182,"entries":[{"key":"larger","weight":182,"content":"larger"}]}}}}}}},"w":{"type":"leaf","weight":698,"entries":[{"key":"law","weight":698,"content":"law"}]},"n":{"type":"internal","weight":582,"values":["d","g"],"children":{"d":{"type":"leaf","weight":582,"entries":[{"key":"land","weight":582,"content":"land"}]},"g":{"type":"leaf","weight":74,"entries":[{"key":"language","weight":74,"content":"language"}]}}},"b":{"type":"leaf","weight":354,"entries":[{"key":"labor","weight":354,"content":"labor"}]},"y":{"type":"leaf","weight":289,"entries":[{"key":"lay","weight":289,"content":"lay"}]},"c":{"type":"leaf","weight":82,"entries":[{"key":"lack","weight":82,"content":"lack"}]}}},"e":{"type":"internal","weight":822,"values":["f","s","t","a","v","d","n"],"children":{"f":{"type":"leaf","weight":822,"entries":[{"key":"left","weight":822,"content":"left"}]},"s":{"type":"leaf","weight":809,"entries":[{"key":"less","weight":809,"content":"less"}]},"t":{"type":"internal","weight":774,"values":["\ufdd0","t"],"children":{"\ufdd0":{"type":"leaf","weight":774,"entries":[{"key":"let","weight":774,"content":"let"}]},"t":{"type":"internal","weight":335,"values":["e"],"children":{"e":{"type":"internal","weight":335,"values":["r"],"children":{"r":{"type":"internal","weight":335,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":335,"entries":[{"key":"letter","weight":335,"content":"letter"}]},"s":{"type":"leaf","weight":128,"entries":[{"key":"letters","weight":128,"content":"letters"}]}}}}}}}}},"a":{"type":"internal","weight":735,"values":["s","v","d","r"],"children":{"s":{"type":"leaf","weight":735,"entries":[{"key":"least","weight":735,"content":"least"}]},"v":{"type":"leaf","weight":553,"entries":[{"key":"leave","weight":553,"content":"leave"}]},"d":{"type":"internal","weight":235,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":235,"entries":[{"key":"lead","weight":235,"content":"lead"}]},"e":{"type":"leaf","weight":53,"entries":[{"key":"leaders","weight":53,"content":"leaders"}]}}},"r":{"type":"leaf","weight":136,"entries":[{"key":"learned","weight":136,"content":"learned"}]}}},"v":{"type":"leaf","weight":573,"entries":[{"key":"level","weight":573,"content":"level"}]},"d":{"type":"leaf","weight":253,"entries":[{"key":"led","weight":253,"content":"led"}]},"n":{"type":"leaf","weight":129,"entries":[{"key":"length","weight":129,"content":"length"}]}}}}},"e":{"type":"internal","weight":918,"values":["v","a","n","y","x","i","c","d","f","l","q","s","u"],"children":{"v":{"type":"internal","weight":918,"values":["e","i"],"children":{"e":{"type":"internal","weight":918,"values":["n","r"],"children":{"n":{"type":"internal","weight":918,"values":["\ufdd0","i"],"children":{"\ufdd0":{"type":"leaf","weight":918,"entries":[{"key":"even","weight":918,"content":"even"}]},"i":{"type":"leaf","weight":257,"entries":[{"key":"evening","weight":257,"content":"evening"}]}}},"r":{"type":"internal","weight":826,"values":["y","\ufdd0"],"children":{"y":{"type":"internal","weight":826,"values":["\ufdd0","t"],"children":{"\ufdd0":{"type":"leaf","weight":826,"entries":[{"key":"every","weight":826,"content":"every"}]},"t":{"type":"leaf","weight":492,"entries":[{"key":"everything","weight":492,"content":"everything"}]}}},"\ufdd0":{"type":"leaf","weight":736,"entries":[{"key":"ever","weight":736,"content":"ever"}]}}}}},"i":{"type":"leaf","weight":549,"entries":[{"key":"evidence","weight":549,"content":"evidence"}]}}},"a":{"type":"internal","weight":897,"values":["c","r","s"],"children":{"c":{"type":"leaf","weight":897,"entries":[{"key":"each","weight":897,"content":"each"}]},"r":{"type":"internal","weight":752,"values":["l","t"],"children":{"l":{"type":"internal","weight":752,"values":["y","i"],"children":{"y":{"type":"leaf","weight":752,"entries":[{"key":"early","weight":752,"content":"early"}]},"i":{"type":"leaf","weight":340,"entries":[{"key":"earlier","weight":340,"content":"earlier"}]}}},"t":{"type":"leaf","weight":359,"entries":[{"key":"earth","weight":359,"content":"earth"}]}}},"s":{"type":"internal","weight":486,"values":["t","y","i"],"children":{"t":{"type":"leaf","weight":486,"entries":[{"key":"east","weight":486,"content":"east"}]},"y":{"type":"leaf","weight":191,"entries":[{"key":"easy","weight":191,"content":"easy"}]},"i":{"type":"leaf","weight":45,"entries":[{"key":"easily","weight":45,"content":"easily"}]}}}}},"n":{"type":"internal","weight":805,"values":["o","d","g","t"],"children":{"o":{"type":"leaf","weight":805,"entries":[{"key":"enough","weight":805,"content":"enough"}]},"d":{"type":"leaf","weight":793,"entries":[{"key":"end","weight":793,"content":"end"}]},"g":{"type":"internal","weight":517,"values":["l"],"children":{"l":{"type":"internal","weight":517,"values":["i","a"],"children":{"i":{"type":"leaf","weight":517,"entries":[{"key":"english","weight":517,"content":"english"}]},"a":{"type":"leaf","weight":375,"entries":[{"key":"england","weight":375,"content":"england"}]}}}}},"t":{"type":"leaf","weight":357,"entries":[{"key":"entire","weight":357,"content":"entire"}]}}},"y":{"type":"internal","weight":790,"values":["e"],"children":{"e":{"type":"leaf","weight":790,"entries":[{"key":"eyes","weight":790,"content":"eyes"},{"key":"eye","weight":177,"content":"eye"}]}}},"x":{"type":"internal","weight":694,"values":["a","p","c","t","i"],"children":{"a":{"type":"internal","weight":694,"values":["m","c"],"children":{"m":{"type":"leaf","weight":694,"entries":[{"key":"example","weight":694,"content":"example"}]},"c":{"type":"leaf","weight":5,"entries":[{"key":"exactly","weight":5,"content":"exactly"}]}}},"p":{"type":"internal","weight":672,"values":["e"],"children":{"e":{"type":"internal","weight":672,"values":["r","c"],"children":{"r":{"type":"leaf","weight":672,"entries":[{"key":"experience","weight":672,"content":"experience"}]},"c":{"type":"internal","weight":497,"values":["t"],"children":{"t":{"type":"leaf","weight":497,"entries":[{"key":"expected","weight":497,"content":"expected"},{"key":"expect","weight":56,"content":"expect"}]}}}}}}},"c":{"type":"leaf","weight":480,"entries":[{"key":"except","weight":480,"content":"except"}]},"t":{"type":"leaf","weight":86,"entries":[{"key":"extent","weight":86,"content":"extent"}]},"i":{"type":"leaf","weight":52,"entries":[{"key":"existence","weight":52,"content":"existence"}]}}},"i":{"type":"internal","weight":684,"values":["t","g"],"children":{"t":{"type":"leaf","weight":684,"entries":[{"key":"either","weight":684,"content":"either"}]},"g":{"type":"leaf","weight":16,"entries":[{"key":"eight","weight":16,"content":"eight"}]}}},"c":{"type":"leaf","weight":624,"entries":[{"key":"economic","weight":624,"content":"economic"}]},"d":{"type":"leaf","weight":574,"entries":[{"key":"education","weight":574,"content":"education"}]},"f":{"type":"internal","weight":570,"values":["f"],"children":{"f":{"type":"internal","weight":570,"values":["e","o"],"children":{"e":{"type":"internal","weight":570,"values":["c"],"children":{"c":{"type":"internal","weight":570,"values":["t"],"children":{"t":{"type":"internal","weight":570,"values":["\ufdd0","i","s"],"children":{"\ufdd0":{"type":"leaf","weight":570,"entries":[{"key":"effect","weight":570,"content":"effect"}]},"i":{"type":"leaf","weight":226,"entries":[{"key":"effective","weight":226,"content":"effective"}]},"s":{"type":"leaf","weight":63,"entries":[{"key":"effects","weight":63,"content":"effects"}]}}}}}}},"o":{"type":"internal","weight":332,"values":["r"],"children":{"r":{"type":"internal","weight":332,"values":["t"],"children":{"t":{"type":"internal","weight":332,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":332,"entries":[{"key":"effort","weight":332,"content":"effort"}]},"s":{"type":"leaf","weight":205,"entries":[{"key":"efforts","weight":205,"content":"efforts"}]}}}}}}}}}}},"l":{"type":"internal","weight":469,"values":["s","e"],"children":{"s":{"type":"leaf","weight":469,"entries":[{"key":"else","weight":469,"content":"else"}]},"e":{"type":"leaf","weight":46,"entries":[{"key":"elements","weight":46,"content":"elements"}]}}},"q":{"type":"leaf","weight":425,"entries":[{"key":"equipment","weight":425,"content":"equipment"}]},"s":{"type":"internal","weight":403,"values":["p","t"],"children":{"p":{"type":"leaf","weight":403,"entries":[{"key":"especially","weight":403,"content":"especially"}]},"t":{"type":"leaf","weight":58,"entries":[{"key":"established","weight":58,"content":"established"}]}}},"u":{"type":"leaf","weight":141,"entries":[{"key":"europe","weight":141,"content":"europe"}]}}},"j":{"type":"internal","weight":896,"values":["u","o"],"children":{"u":{"type":"internal","weight":896,"values":["s"],"children":{"s":{"type":"internal","weight":896,"values":["t"],"children":{"t":{"type":"internal","weight":896,"values":["\ufdd0","i"],"children":{"\ufdd0":{"type":"leaf","weight":896,"entries":[{"key":"just","weight":896,"content":"just"}]},"i":{"type":"leaf","weight":117,"entries":[{"key":"justice","weight":117,"content":"justice"}]}}}}}}},"o":{"type":"internal","weight":749,"values":["h","b"],"children":{"h":{"type":"leaf","weight":749,"entries":[{"key":"john","weight":749,"content":"john"}]},"b":{"type":"leaf","weight":616,"entries":[{"key":"job","weight":616,"content":"job"}]}}}}},"p":{"type":"internal","weight":894,"values":["e","l","a","u","o","r","i","h"],"children":{"e":{"type":"internal","weight":894,"values":["o","r","a"],"children":{"o":{"type":"leaf","weight":894,"entries":[{"key":"people","weight":894,"content":"people"}]},"r":{"type":"internal","weight":759,"values":["\ufdd0","h","i","s","f"],"children":{"\ufdd0":{"type":"leaf","weight":759,"entries":[{"key":"per","weight":759,"content":"per"}]},"h":{"type":"leaf","weight":703,"entries":[{"key":"perhaps","weight":703,"content":"perhaps"}]},"i":{"type":"leaf","weight":655,"entries":[{"key":"period","weight":655,"content":"period"}]},"s":{"type":"internal","weight":524,"values":["o"],"children":{"o":{"type":"internal","weight":524,"values":["n"],"children":{"n":{"type":"internal","weight":524,"values":["a","\ufdd0","s"],"children":{"a":{"type":"leaf","weight":524,"entries":[{"key":"personal","weight":524,"content":"personal"}]},"\ufdd0":{"type":"leaf","weight":455,"entries":[{"key":"person","weight":455,"content":"person"}]},"s":{"type":"leaf","weight":172,"entries":[{"key":"persons","weight":172,"content":"persons"}]}}}}}}},"f":{"type":"leaf","weight":175,"entries":[{"key":"performance","weight":175,"content":"performance"}]}}},"a":{"type":"leaf","weight":531,"entries":[{"key":"peace","weight":531,"content":"peace"}]}}},"l":{"type":"internal","weight":842,"values":["a"],"children":{"a":{"type":"internal","weight":842,"values":["c","n","y"],"children":{"c":{"type":"internal","weight":842,"values":["e"],"children":{"e":{"type":"internal","weight":842,"values":["\ufdd0","d"],"children":{"\ufdd0":{"type":"leaf","weight":842,"entries":[{"key":"place","weight":842,"content":"place"}]},"d":{"type":"leaf","weight":202,"entries":[{"key":"placed","weight":202,"content":"placed"}]}}}}},"n":{"type":"internal","weight":551,"values":["\ufdd0","n","t","e","s"],"children":{"\ufdd0":{"type":"leaf","weight":551,"entries":[{"key":"plan","weight":551,"content":"plan"}]},"n":{"type":"leaf","weight":232,"entries":[{"key":"planning","weight":232,"content":"planning"}]},"t":{"type":"leaf","weight":197,"entries":[{"key":"plant","weight":197,"content":"plant"}]},"e":{"type":"leaf","weight":113,"entries":[{"key":"plane","weight":113,"content":"plane"}]},"s":{"type":"leaf","weight":94,"entries":[{"key":"plans","weight":94,"content":"plans"}]}}},"y":{"type":"internal","weight":537,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":537,"entries":[{"key":"play","weight":537,"content":"play"}]},"e":{"type":"leaf","weight":14,"entries":[{"key":"played","weight":14,"content":"played"}]}}}}}}},"a":{"type":"internal","weight":832,"values":["r","s","y","p","i","t"],"children":{"r":{"type":"internal","weight":832,"values":["t"],"children":{"t":{"type":"internal","weight":832,"values":["\ufdd0","y","i","s"],"children":{"\ufdd0":{"type":"leaf","weight":832,"entries":[{"key":"part","weight":832,"content":"part"}]},"y":{"type":"leaf","weight":577,"entries":[{"key":"party","weight":577,"content":"party"}]},"i":{"type":"internal","weight":474,"values":["c"],"children":{"c":{"type":"internal","weight":474,"values":["u"],"children":{"u":{"type":"internal","weight":474,"values":["l"],"children":{"l":{"type":"internal","weight":474,"values":["a"],"children":{"a":{"type":"internal","weight":474,"values":["r"],"children":{"r":{"type":"internal","weight":474,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":474,"entries":[{"key":"particular","weight":474,"content":"particular"}]},"l":{"type":"leaf","weight":338,"entries":[{"key":"particularly","weight":338,"content":"particularly"}]}}}}}}}}}}}}},"s":{"type":"leaf","weight":98,"entries":[{"key":"parts","weight":98,"content":"parts"}]}}}}},"s":{"type":"internal","weight":677,"values":["t","s"],"children":{"t":{"type":"leaf","weight":677,"entries":[{"key":"past","weight":677,"content":"past"}]},"s":{"type":"leaf","weight":389,"entries":[{"key":"passed","weight":389,"content":"passed"}]}}},"y":{"type":"leaf","weight":441,"entries":[{"key":"pay","weight":441,"content":"pay"}]},"p":{"type":"leaf","weight":387,"entries":[{"key":"paper","weight":387,"content":"paper"}]},"i":{"type":"leaf","weight":329,"entries":[{"key":"paid","weight":329,"content":"paid"}]},"t":{"type":"leaf","weight":101,"entries":[{"key":"pattern","weight":101,"content":"pattern"}]}}},"u":{"type":"internal","weight":811,"values":["b","t","r"],"children":{"b":{"type":"leaf","weight":811,"entries":[{"key":"public","weight":811,"content":"public"}]},"t":{"type":"leaf","weight":810,"entries":[{"key":"put","weight":810,"content":"put"}]},"r":{"type":"leaf","weight":355,"entries":[{"key":"purpose","weight":355,"content":"purpose"}]}}},"o":{"type":"internal","weight":784,"values":["i","s","w","l","p","o"],"children":{"i":{"type":"internal","weight":784,"values":["n"],"children":{"n":{"type":"internal","weight":784,"values":["t"],"children":{"t":{"type":"internal","weight":784,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":784,"entries":[{"key":"point","weight":784,"content":"point"}]},"s":{"type":"leaf","weight":325,"entries":[{"key":"points","weight":325,"content":"points"}]}}}}}}},"s":{"type":"internal","weight":763,"values":["s","i"],"children":{"s":{"type":"leaf","weight":763,"entries":[{"key":"possible","weight":763,"content":"possible"}]},"i":{"type":"leaf","weight":621,"entries":[{"key":"position","weight":621,"content":"position"}]}}},"w":{"type":"leaf","weight":734,"entries":[{"key":"power","weight":734,"content":"power"}]},"l":{"type":"internal","weight":645,"values":["i"],"children":{"i":{"type":"internal","weight":645,"values":["t","c"],"children":{"t":{"type":"leaf","weight":645,"entries":[{"key":"political","weight":645,"content":"political"}]},"c":{"type":"internal","weight":590,"values":["y","e"],"children":{"y":{"type":"leaf","weight":590,"entries":[{"key":"policy","weight":590,"content":"policy"}]},"e":{"type":"leaf","weight":381,"entries":[{"key":"police","weight":381,"content":"police"}]}}}}}}},"p":{"type":"leaf","weight":276,"entries":[{"key":"population","weight":276,"content":"population"}]},"o":{"type":"internal","weight":95,"values":["r","l"],"children":{"r":{"type":"leaf","weight":95,"entries":[{"key":"poor","weight":95,"content":"poor"}]},"l":{"type":"leaf","weight":87,"entries":[{"key":"pool","weight":87,"content":"pool"}]}}}}},"r":{"type":"internal","weight":781,"values":["o","e","i"],"children":{"o":{"type":"internal","weight":781,"values":["g","b","v","c","p","d","f"],"children":{"g":{"type":"internal","weight":781,"values":["r"],"children":{"r":{"type":"internal","weight":781,"values":["a","e"],"children":{"a":{"type":"internal","weight":781,"values":["m"],"children":{"m":{"type":"internal","weight":781,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":781,"entries":[{"key":"program","weight":781,"content":"program"}]},"s":{"type":"leaf","weight":292,"entries":[{"key":"programs","weight":292,"content":"programs"}]}}}}},"e":{"type":"leaf","weight":165,"entries":[{"key":"progress","weight":165,"content":"progress"}]}}}}},"b":{"type":"internal","weight":715,"values":["l","a"],"children":{"l":{"type":"internal","weight":715,"values":["e"],"children":{"e":{"type":"internal","weight":715,"values":["m"],"children":{"m":{"type":"internal","weight":715,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":715,"entries":[{"key":"problem","weight":715,"content":"problem"}]},"s":{"type":"leaf","weight":636,"entries":[{"key":"problems","weight":636,"content":"problems"}]}}}}}}},"a":{"type":"leaf","weight":651,"entries":[{"key":"probably","weight":651,"content":"probably"}]}}},"v":{"type":"internal","weight":576,"values":["i"],"children":{"i":{"type":"internal","weight":576,"values":["d"],"children":{"d":{"type":"internal","weight":576,"values":["e"],"children":{"e":{"type":"internal","weight":576,"values":["\ufdd0","d"],"children":{"\ufdd0":{"type":"leaf","weight":576,"entries":[{"key":"provide","weight":576,"content":"provide"}]},"d":{"type":"leaf","weight":252,"entries":[{"key":"provided","weight":252,"content":"provided"}]}}}}}}}}},"c":{"type":"leaf","weight":522,"entries":[{"key":"process","weight":522,"content":"process"}]},"p":{"type":"leaf","weight":383,"entries":[{"key":"property","weight":383,"content":"property"}]},"d":{"type":"internal","weight":346,"values":["u"],"children":{"u":{"type":"internal","weight":346,"values":["c"],"children":{"c":{"type":"internal","weight":346,"values":["t"],"children":{"t":{"type":"internal","weight":346,"values":["i","s"],"children":{"i":{"type":"leaf","weight":346,"entries":[{"key":"production","weight":346,"content":"production"}]},"s":{"type":"leaf","weight":57,"entries":[{"key":"products","weight":57,"content":"products"}]}}}}}}}}},"f":{"type":"leaf","weight":29,"entries":[{"key":"professional","weight":29,"content":"professional"}]}}},"e":{"type":"internal","weight":771,"values":["s","t"],"children":{"s":{"type":"internal","weight":771,"values":["i","e","s"],"children":{"i":{"type":"leaf","weight":771,"entries":[{"key":"president","weight":771,"content":"president"}]},"e":{"type":"leaf","weight":767,"entries":[{"key":"present","weight":767,"content":"present"}]},"s":{"type":"leaf","weight":491,"entries":[{"key":"pressure","weight":491,"content":"pressure"},{"key":"press","weight":208,"content":"press"}]}}},"t":{"type":"leaf","weight":47,"entries":[{"key":"pretty","weight":47,"content":"pretty"}]}}},"i":{"type":"internal","weight":507,"values":["v","n","c"],"children":{"v":{"type":"leaf","weight":507,"entries":[{"key":"private","weight":507,"content":"private"}]},"n":{"type":"leaf","weight":70,"entries":[{"key":"principle","weight":70,"content":"principle"}]},"c":{"type":"leaf","weight":62,"entries":[{"key":"price","weight":62,"content":"price"}]}}}}},"i":{"type":"internal","weight":404,"values":["c","e"],"children":{"c":{"type":"leaf","weight":404,"entries":[{"key":"picture","weight":404,"content":"picture"}]},"e":{"type":"leaf","weight":228,"entries":[{"key":"piece","weight":228,"content":"piece"}]}}},"h":{"type":"leaf","weight":286,"entries":[{"key":"physical","weight":286,"content":"physical"}]}}},"g":{"type":"internal","weight":889,"values":["o","e","r","i","a","u"],"children":{"o":{"type":"internal","weight":889,"values":["o","\ufdd0","t","v","i","d","n"],"children":{"o":{"type":"leaf","weight":889,"entries":[{"key":"good","weight":889,"content":"good"}]},"\ufdd0":{"type":"leaf","weight":856,"entries":[{"key":"go","weight":856,"content":"go"}]},"t":{"type":"leaf","weight":824,"entries":[{"key":"got","weight":824,"content":"got"}]},"v":{"type":"leaf","weight":800,"entries":[{"key":"government","weight":800,"content":"government"}]},"i":{"type":"leaf","weight":787,"entries":[{"key":"going","weight":787,"content":"going"}]},"d":{"type":"leaf","weight":717,"entries":[{"key":"god","weight":717,"content":"god"}]},"n":{"type":"leaf","weight":515,"entries":[{"key":"gone","weight":515,"content":"gone"}]}}},"e":{"type":"internal","weight":878,"values":["t","n","o"],"children":{"t":{"type":"internal","weight":878,"values":["\ufdd0","t"],"children":{"\ufdd0":{"type":"leaf","weight":878,"entries":[{"key":"get","weight":878,"content":"get"}]},"t":{"type":"leaf","weight":417,"entries":[{"key":"getting","weight":417,"content":"getting"}]}}},"n":{"type":"internal","weight":830,"values":["e"],"children":{"e":{"type":"internal","weight":830,"values":["r"],"children":{"r":{"type":"internal","weight":830,"values":["a"],"children":{"a":{"type":"internal","weight":830,"values":["l"],"children":{"l":{"type":"internal","weight":830,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":830,"entries":[{"key":"general","weight":830,"content":"general"}]},"l":{"type":"leaf","weight":255,"entries":[{"key":"generally","weight":255,"content":"generally"}]}}}}}}}}}}},"o":{"type":"leaf","weight":225,"entries":[{"key":"george","weight":225,"content":"george"}]}}},"r":{"type":"internal","weight":863,"values":["e","o"],"children":{"e":{"type":"internal","weight":863,"values":["a","e"],"children":{"a":{"type":"internal","weight":863,"values":["t"],"children":{"t":{"type":"internal","weight":863,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":863,"entries":[{"key":"great","weight":863,"content":"great"}]},"e":{"type":"leaf","weight":501,"entries":[{"key":"greater","weight":501,"content":"greater"}]}}}}},"e":{"type":"leaf","weight":130,"entries":[{"key":"green","weight":130,"content":"green"}]}}},"o":{"type":"internal","weight":778,"values":["u","w"],"children":{"u":{"type":"internal","weight":778,"values":["p","n"],"children":{"p":{"type":"internal","weight":778,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":778,"entries":[{"key":"group","weight":778,"content":"group"}]},"s":{"type":"leaf","weight":194,"entries":[{"key":"groups","weight":194,"content":"groups"}]}}},"n":{"type":"leaf","weight":493,"entries":[{"key":"ground","weight":493,"content":"ground"}]}}},"w":{"type":"internal","weight":376,"values":["t","i"],"children":{"t":{"type":"leaf","weight":376,"entries":[{"key":"growth","weight":376,"content":"growth"}]},"i":{"type":"leaf","weight":66,"entries":[{"key":"growing","weight":66,"content":"growing"}]}}}}}}},"i":{"type":"internal","weight":777,"values":["v","r"],"children":{"v":{"type":"internal","weight":777,"values":["e"],"children":{"e":{"type":"internal","weight":777,"values":["\ufdd0","n","s"],"children":{"\ufdd0":{"type":"leaf","weight":777,"entries":[{"key":"give","weight":777,"content":"give"}]},"n":{"type":"leaf","weight":768,"entries":[{"key":"given","weight":768,"content":"given"}]},"s":{"type":"leaf","weight":112,"entries":[{"key":"gives","weight":112,"content":"gives"}]}}}}},"r":{"type":"internal","weight":586,"values":["l"],"children":{"l":{"type":"internal","weight":586,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":586,"entries":[{"key":"girl","weight":586,"content":"girl"}]},"s":{"type":"leaf","weight":310,"entries":[{"key":"girls","weight":310,"content":"girls"}]}}}}}}},"a":{"type":"internal","weight":685,"values":["v","m"],"children":{"v":{"type":"leaf","weight":685,"entries":[{"key":"gave","weight":685,"content":"gave"}]},"m":{"type":"leaf","weight":183,"entries":[{"key":"game","weight":183,"content":"game"}]}}},"u":{"type":"leaf","weight":140,"entries":[{"key":"gun","weight":140,"content":"gun"}]}}},"v":{"type":"internal","weight":888,"values":["e","o","a","i"],"children":{"e":{"type":"leaf","weight":888,"entries":[{"key":"very","weight":888,"content":"very"}]},"o":{"type":"internal","weight":597,"values":["i","l"],"children":{"i":{"type":"leaf","weight":597,"entries":[{"key":"voice","weight":597,"content":"voice"}]},"l":{"type":"leaf","weight":271,"entries":[{"key":"volume","weight":271,"content":"volume"}]}}},"a":{"type":"internal","weight":543,"values":["r","l"],"children":{"r":{"type":"leaf","weight":543,"entries":[{"key":"various","weight":543,"content":"various"}]},"l":{"type":"internal","weight":539,"values":["u"],"children":{"u":{"type":"internal","weight":539,"values":["e"],"children":{"e":{"type":"internal","weight":539,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":539,"entries":[{"key":"value","weight":539,"content":"value"}]},"s":{"type":"leaf","weight":495,"entries":[{"key":"values","weight":495,"content":"values"}]}}}}}}}}},"i":{"type":"internal","weight":496,"values":["e","s"],"children":{"e":{"type":"leaf","weight":496,"entries":[{"key":"view","weight":496,"content":"view"}]},"s":{"type":"leaf","weight":75,"entries":[{"key":"visit","weight":75,"content":"visit"}]}}}}},"k":{"type":"internal","weight":868,"values":["n","i","e"],"children":{"n":{"type":"internal","weight":868,"values":["o","e"],"children":{"o":{"type":"internal","weight":868,"values":["w"],"children":{"w":{"type":"internal","weight":868,"values":["\ufdd0","n","l"],"children":{"\ufdd0":{"type":"leaf","weight":868,"entries":[{"key":"know","weight":868,"content":"know"}]},"n":{"type":"leaf","weight":628,"entries":[{"key":"known","weight":628,"content":"known"}]},"l":{"type":"leaf","weight":334,"entries":[{"key":"knowledge","weight":334,"content":"knowledge"}]}}}}},"e":{"type":"leaf","weight":783,"entries":[{"key":"knew","weight":783,"content":"knew"}]}}},"i":{"type":"leaf","weight":714,"entries":[{"key":"kind","weight":714,"content":"kind"}]},"e":{"type":"internal","weight":654,"values":["e","p","n"],"children":{"e":{"type":"leaf","weight":654,"entries":[{"key":"keep","weight":654,"content":"keep"}]},"p":{"type":"leaf","weight":494,"entries":[{"key":"kept","weight":494,"content":"kept"}]},"n":{"type":"leaf","weight":293,"entries":[{"key":"kennedy","weight":293,"content":"kennedy"}]}}}}},"r":{"type":"internal","weight":854,"values":["i","o","a","e","u","h"],"children":{"i":{"type":"internal","weight":854,"values":["g","v"],"children":{"g":{"type":"leaf","weight":854,"entries":[{"key":"right","weight":854,"content":"right"}]},"v":{"type":"leaf","weight":418,"entries":[{"key":"river","weight":418,"content":"river"}]}}},"o":{"type":"internal","weight":773,"values":["o","a","l"],"children":{"o":{"type":"leaf","weight":773,"entries":[{"key":"room","weight":773,"content":"room"}]},"a":{"type":"leaf","weight":527,"entries":[{"key":"road","weight":527,"content":"road"}]},"l":{"type":"leaf","weight":18,"entries":[{"key":"role","weight":18,"content":"role"}]}}},"a":{"type":"internal","weight":762,"values":["t","n","d","c"],"children":{"t":{"type":"internal","weight":762,"values":["h","e"],"children":{"h":{"type":"leaf","weight":762,"entries":[{"key":"rather","weight":762,"content":"rather"}]},"e":{"type":"leaf","weight":561,"entries":[{"key":"rate","weight":561,"content":"rate"}]}}},"n":{"type":"leaf","weight":386,"entries":[{"key":"range","weight":386,"content":"range"},{"key":"ran","weight":264,"content":"ran"}]},"d":{"type":"leaf","weight":159,"entries":[{"key":"radio","weight":159,"content":"radio"}]},"c":{"type":"leaf","weight":2,"entries":[{"key":"race","weight":2,"content":"race"}]}}},"e":{"type":"internal","weight":670,"values":["a","s","d","q","t","c","p","l","m"],"children":{"a":{"type":"internal","weight":670,"values":["l","s","d","c"],"children":{"l":{"type":"leaf","weight":670,"entries":[{"key":"really","weight":670,"content":"really"},{"key":"real","weight":647,"content":"real"}]},"s":{"type":"internal","weight":622,"values":["o"],"children":{"o":{"type":"internal","weight":622,"values":["n"],"children":{"n":{"type":"internal","weight":622,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":622,"entries":[{"key":"reason","weight":622,"content":"reason"}]},"s":{"type":"leaf","weight":12,"entries":[{"key":"reasons","weight":12,"content":"reasons"}]}}}}}}},"d":{"type":"internal","weight":457,"values":["\ufdd0","y","i"],"children":{"\ufdd0":{"type":"leaf","weight":457,"entries":[{"key":"read","weight":457,"content":"read"}]},"y":{"type":"leaf","weight":320,"entries":[{"key":"ready","weight":320,"content":"ready"}]},"i":{"type":"leaf","weight":300,"entries":[{"key":"reading","weight":300,"content":"reading"}]}}},"c":{"type":"internal","weight":429,"values":["h","t"],"children":{"h":{"type":"leaf","weight":429,"entries":[{"key":"reached","weight":429,"content":"reached"},{"key":"reach","weight":27,"content":"reach"}]},"t":{"type":"leaf","weight":189,"entries":[{"key":"reaction","weight":189,"content":"reaction"}]}}}}},"s":{"type":"internal","weight":625,"values":["u","e","t","p"],"children":{"u":{"type":"internal","weight":625,"values":["l"],"children":{"l":{"type":"internal","weight":625,"values":["t"],"children":{"t":{"type":"internal","weight":625,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":625,"entries":[{"key":"result","weight":625,"content":"result"}]},"s":{"type":"leaf","weight":352,"entries":[{"key":"results","weight":352,"content":"results"}]}}}}}}},"e":{"type":"leaf","weight":433,"entries":[{"key":"research","weight":433,"content":"research"}]},"t":{"type":"leaf","weight":412,"entries":[{"key":"rest","weight":412,"content":"rest"}]},"p":{"type":"internal","weight":198,"values":["e","o"],"children":{"e":{"type":"leaf","weight":198,"entries":[{"key":"respect","weight":198,"content":"respect"}]},"o":{"type":"leaf","weight":146,"entries":[{"key":"responsibility","weight":146,"content":"responsibility"}]}}}}},"d":{"type":"leaf","weight":526,"entries":[{"key":"red","weight":526,"content":"red"}]},"q":{"type":"leaf","weight":484,"entries":[{"key":"required","weight":484,"content":"required"}]},"t":{"type":"internal","weight":477,"values":["u"],"children":{"u":{"type":"internal","weight":477,"values":["r"],"children":{"r":{"type":"internal","weight":477,"values":["n"],"children":{"n":{"type":"internal","weight":477,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":477,"entries":[{"key":"return","weight":477,"content":"return"}]},"e":{"type":"leaf","weight":123,"entries":[{"key":"returned","weight":123,"content":"returned"}]}}}}}}}}},"c":{"type":"internal","weight":475,"values":["e","o"],"children":{"e":{"type":"internal","weight":475,"values":["n","i"],"children":{"n":{"type":"internal","weight":475,"values":["t"],"children":{"t":{"type":"internal","weight":475,"values":["\ufdd0","l"],"children":{"\ufdd0":{"type":"leaf","weight":475,"entries":[{"key":"recent","weight":475,"content":"recent"}]},"l":{"type":"leaf","weight":186,"entries":[{"key":"recently","weight":186,"content":"recently"}]}}}}},"i":{"type":"leaf","weight":413,"entries":[{"key":"received","weight":413,"content":"received"}]}}},"o":{"type":"leaf","weight":280,"entries":[{"key":"record","weight":280,"content":"record"}]}}},"p":{"type":"internal","weight":460,"values":["o"],"children":{"o":{"type":"internal","weight":460,"values":["r"],"children":{"r":{"type":"internal","weight":460,"values":["t"],"children":{"t":{"type":"internal","weight":460,"values":["\ufdd0","e"],"children":{"\ufdd0":{"type":"leaf","weight":460,"entries":[{"key":"report","weight":460,"content":"report"}]},"e":{"type":"leaf","weight":156,"entries":[{"key":"reported","weight":156,"content":"reported"}]}}}}}}}}},"l":{"type":"internal","weight":419,"values":["i"],"children":{"i":{"type":"internal","weight":419,"values":["g"],"children":{"g":{"type":"internal","weight":419,"values":["i"],"children":{"i":{"type":"internal","weight":419,"values":["o"],"children":{"o":{"type":"internal","weight":419,"values":["u","n"],"children":{"u":{"type":"leaf","weight":419,"entries":[{"key":"religious","weight":419,"content":"religious"}]},"n":{"type":"leaf","weight":158,"entries":[{"key":"religion","weight":158,"content":"religion"}]}}}}}}}}}}},"m":{"type":"internal","weight":287,"values":["e","a"],"children":{"e":{"type":"leaf","weight":287,"entries":[{"key":"remember","weight":287,"content":"remember"}]},"a":{"type":"leaf","weight":42,"entries":[{"key":"remained","weight":42,"content":"remained"}]}}}}},"u":{"type":"internal","weight":572,"values":["n"],"children":{"n":{"type":"internal","weight":572,"values":["\ufdd0","n"],"children":{"\ufdd0":{"type":"leaf","weight":572,"entries":[{"key":"run","weight":572,"content":"run"}]},"n":{"type":"leaf","weight":181,"entries":[{"key":"running","weight":181,"content":"running"}]}}}}},"h":{"type":"leaf","weight":22,"entries":[{"key":"rhode","weight":22,"content":"rhode"}]}}},"q":{"type":"internal","weight":679,"values":["u"],"children":{"u":{"type":"internal","weight":679,"values":["i","e","a"],"children":{"i":{"type":"leaf","weight":679,"entries":[{"key":"quite","weight":679,"content":"quite"}]},"e":{"type":"internal","weight":644,"values":["s"],"children":{"s":{"type":"internal","weight":644,"values":["t"],"children":{"t":{"type":"internal","weight":644,"values":["i"],"children":{"i":{"type":"internal","weight":644,"values":["o"],"children":{"o":{"type":"internal","weight":644,"values":["n"],"children":{"n":{"type":"internal","weight":644,"values":["\ufdd0","s"],"children":{"\ufdd0":{"type":"leaf","weight":644,"entries":[{"key":"question","weight":644,"content":"question"}]},"s":{"type":"leaf","weight":297,"entries":[{"key":"questions","weight":297,"content":"questions"}]}}}}}}}}}}}}},"a":{"type":"leaf","weight":107,"entries":[{"key":"quality","weight":107,"content":"quality"}]}}}}}}} + })); +}()); diff --git a/web/testing/regression-tests/package-lock.json b/web/testing/regression-tests/package-lock.json index 81845837ebaa7229da1dc1a4fd79c7193b59d599..d14e9cf1da95691f290508b262febc6443274b59 100644 --- a/web/testing/regression-tests/package-lock.json +++ b/web/testing/regression-tests/package-lock.json @@ -1270,7 +1270,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1291,12 +1292,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1311,17 +1314,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1438,7 +1444,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1450,6 +1457,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1464,6 +1472,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1471,12 +1480,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -1495,6 +1506,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1575,7 +1587,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1587,6 +1600,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -1672,7 +1686,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -1708,6 +1723,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1727,6 +1743,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -1770,12 +1787,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2395,9 +2414,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "log-symbols": { @@ -2644,9 +2663,9 @@ "dev": true }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", diff --git a/web/testing/regression-tests/src/known-failures.js b/web/testing/regression-tests/src/known-failures.js index a5ba9a948862635dc905ad63868a0c5296e82d3a..3af277205f8600ff3bac5e37a0b667fc3baa08ad 100644 --- a/web/testing/regression-tests/src/known-failures.js +++ b/web/testing/regression-tests/src/known-failures.js @@ -4,6 +4,7 @@ * keyboards in this file does not stop them being tested but it does stop the * test framework from failing. * + * TODO: this is not yet supported --> `knownGood*Version` properties * When the issue is resolved, add a `knownGood*Version` property to the * keyboard with the first *stable* release version number. If the version * being tested is >= the `knownGood*Version`, then the test suite will fail if @@ -12,13 +13,20 @@ * Hint: searching for "FAILED TO LOAD" in logs finds the first reference to the * failure for any given keyboard. */ + const knownFailures = { - 'fv_gwichin': { /*, knownGoodCompilerVersion: '12.0.333.0', knownGoodEngineVersion: '12.0.444'*/ reason: 'Chrome ladder bug #183?' }, - 'fv_han': { reason: 'Chrome ladder bug #183?' }, - 'fv_northern_tutchone': { reason: 'Chrome ladder bug #183?' }, - 'fv_southern_tutchone': { reason: 'Chrome ladder bug #183?' }, - 'fv_tagizi_dene': { reason: 'Chrome ladder bug #183?' }, - 'hieroglyphic': { reason: 'Chrome ladder bug #183' }, + 'clavbur9': { reason: 'KCCM generated but not supported #1711' }, + //'fv_gwichin': { /*, knownGoodCompilerVersion: '12.0.333.0', knownGoodEngineVersion: '12.0.444'*/ reason: 'Chrome ladder bug #183?' }, // Fixed 23 Apr 2019, knownGoodCompilerVersion: 11.0.1353.0, keyboard release 9.1.1 + //'fv_han': { reason: 'Chrome ladder bug #183?' }, // Fixed 23 Apr 2019, knownGoodCompilerVersion: 11.0.1353.0, keyboard release 9.1.1 + //'fv_northern_tutchone': { reason: 'Chrome ladder bug #183?' }, // Fixed 23 Apr 2019, knownGoodCompilerVersion: 11.0.1353.0, keyboard release 9.1.1 + //'fv_southern_tutchone': { reason: 'Chrome ladder bug #183?' }, // Fixed 23 Apr 2019, knownGoodCompilerVersion: 11.0.1353.0, keyboard release 9.1.1 + //'fv_tagizi_dene': { reason: 'Chrome ladder bug #183?' }, // Fixed 23 Apr 2019, knownGoodCompilerVersion: 11.0.1353.0, keyboard release 9.1.1 + //'hieroglyphic': { reason: 'Chrome ladder bug #183' }, // Fixed 23 Apr 2019, knownGoodCompilerVersion: 11.0.1353.0, keyboard release 1.3.1 'nailangs': { reason: 'kmanalyze is corrupting the .tests file' }, 'sil_ipa': { reason: 'kmanalyze is corrupting the .tests file' } -}; \ No newline at end of file +}; + +// Node compatibility +if(typeof module === 'object') { + module.exports = knownFailures; +} \ No newline at end of file diff --git a/web/testing/regression-tests/test-builder.js b/web/testing/regression-tests/test-builder.js index b85e1292f7ab1786ef896d19b030c14d1c3c34d3..a61725f781a26dd92326651fa1be8c183851a768 100644 --- a/web/testing/regression-tests/test-builder.js +++ b/web/testing/regression-tests/test-builder.js @@ -41,7 +41,7 @@ keyboards.forEach(function(keyboard) { it('should generate a set of results for "all" possible inputs', function() { return windowLoad .then(() => testRunner.loadTests(locator)) - .then((shouldRun) => { if(shouldRun) { testRunner.runTests(id); } return shouldRun; }) + .then((shouldRun) => { if(shouldRun) { return testRunner.runTests(id); } }) .then(() => testRunner.saveTestResults(locator, (testRunner.keyboards[id] || {}).results)); }).timeout(0); }); diff --git a/web/testing/regression-tests/test.js b/web/testing/regression-tests/test.js index ec1273eac3f211b7157dc25b39b2d397386659a5..adca5e9fcb093a0d7253de7994005ca90de80e3a 100644 --- a/web/testing/regression-tests/test.js +++ b/web/testing/regression-tests/test.js @@ -14,6 +14,7 @@ const rimraf = require('rimraf'); const config = require('./node_src/config.js'); const util = require('./node_src/util.js'); const keyname = require('./node_src/keyname.js'); +const knownFailures = require('./src/known-failures.js'); function list(val) { return val.split(','); @@ -25,6 +26,7 @@ program .option('-e, --engine-versions [versions]', 'Specify KeymanWeb engine version(s) to test. Can specify "stable", "source" or a specific version number.', list, ['stable','source']) .option('-k, --keyboards [keyboards]', 'Builds and tests specific keyboard source files. If -k is not specified, then test all keyboards in the keyboards repository.', list, []) .option('-f, --fail-fast', "Don't attempt to continue tests after the first keyboard test fails") + .option('-d, --debug', "Build keyboard with debug symbols") .option('--deep', "Compare all version combinations against base version, instead of just one; only valid when comparing 1 version of each against base") .option('--skip-analysis', "Don't create .tests files, assume they are already present") .option('-l, --log-all-failures', "Log all test failures to console, not just the first failure for each keyboard"); @@ -189,7 +191,7 @@ cleanKeyboards.then(() => { return util.runProcess( `${bash.command}`, - [].concat(bash.params, ['build.sh', /*TODO: waiting on keyboards repo support for this param: '-T', 'kmn',*/ keyboard]), + [].concat(bash.params, ['build.sh'], program.debug?['-d']:[], [/*TODO: waiting on keyboards repo support for this param: '-T', 'kmn',*/ keyboard]), { cwd: config.KEYBOARDS_ROOT }); }; @@ -326,6 +328,12 @@ cleanKeyboards.then(() => { keyboards.forEach((keyboard) => { if(!program.keyboards.length || program.keyboards.indexOf(keyboard.shortname+'/'+keyboard.id) >= 0) { // Validate each of the test files against the first tested compiler+engine version + + let localFailCount = 0; + const localFail = knownFailures.hasOwnProperty([keyboard.id]) ? + (msg) => { if(++localFailCount == 1) console.warn(`WARN: Not failing test because ${keyboard.id} is in known-failures.`); console.warn(`WARN: ${msg}`); } : + fail; + try { const baseResultFilename = path.join(KEYBOARDS_ROOT, keyboard.shortname, keyboard.id, 'tests', `${keyboard.id}-${baseCompilerVersion}-${baseEngineVersion}.results`); const baseResult = fs.readFileSync(baseResultFilename, 'utf8'); @@ -333,15 +341,21 @@ cleanKeyboards.then(() => { const testsFilename = path.join(KEYBOARDS_ROOT, keyboard.shortname, keyboard.id, 'tests', `${keyboard.id}.tests`); const testsJSON = JSON.parse(fs.readFileSync(testsFilename, 'utf8')); + const numTests = Object.keys(testsJSON.inputTests).length; // First, check the base result for errors for(let k in baseResultJSON) { if(typeof baseResultJSON[k] !== 'string') { let input = `${testsJSON.inputTests[k].context ? `"${testsJSON.inputTests[k].context}" ` : ""}+ ${keyname(testsJSON.inputTests[k].modifier, testsJSON.inputTests[k].key)}`; - fail(`${keyboard.shortname}/${keyboard.id}[${k}]: error in test: ${input}: ${baseResultJSON[k].error}`, 5); + localFail(`${keyboard.shortname}/${keyboard.id}[${k}]: error in test: ${input}: ${baseResultJSON[k].error}`, 5); } } + // Make sure every test is in the base result set + if(Object.keys(baseResultJSON).length != numTests) { + localFail(`${keyboard.shortname}/${keyboard.id}: base result set has fewer results (${Object.keys(baseResultJSON).length}) than expected (${numTests})`, 6); + } + //console.log(baseResultFilename, baseResult); testedCompilerVersions.forEach((cv) => { testedEngineVersions.forEach((ev) => { @@ -365,13 +379,12 @@ cleanKeyboards.then(() => { } } } - fail(`${keyboard.shortname}/${keyboard.id} ${errors} test(s) mismatched between (${baseCompilerVersion} / ${baseEngineVersion}) and (${cv} / ${ev})`, 4); + localFail(`${keyboard.shortname}/${keyboard.id} ${errors}/${numTests} test(s) mismatched between (${baseCompilerVersion} / ${baseEngineVersion}) and (${cv} / ${ev})`, 4); } }); }); } catch(e) { - // TODO: only continue if in known-failures? - console.warn(`Failed to load test results for ${keyboard.shortname}/${keyboard.id}: ${typeof e == 'object' ? e.message : e}`); + localFail(`Failed to load test results for ${keyboard.shortname}/${keyboard.id}: ${typeof e == 'object' ? e.message : e}`, 7); } } }); diff --git a/web/unit_tests/cases/attachmentAPI.js b/web/unit_tests/cases/attachmentAPI.js index e43f890a3eb41aa132e3982707a159fd0aa7981b..a61b40e6905618c5cc87788c9c16a2ec8f331d1f 100644 --- a/web/unit_tests/cases/attachmentAPI.js +++ b/web/unit_tests/cases/attachmentAPI.js @@ -214,7 +214,9 @@ Modernizr.on('touchevents', function(result) { DynamicElements.assertAttached(ele, done); }); - it(' -
- -
- - - keyman:footer_cancel - 70px - -
-
- - - - + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='S_DownloadKeyboard_Title']"/> + + config.css + + + + + +
+ +
+ +
+ + + keyman:footer_cancel + 70px + +
+
+ + +
+
diff --git a/windows/src/desktop/kmshell/xml/elements.xsl b/windows/src/desktop/kmshell/xml/elements.xsl index 9dad2198537f9125a5f15b679e4c8deccad34275..b9bb85b073049ca56b57d0602ee3a40e36fabf79 100644 --- a/windows/src/desktop/kmshell/xml/elements.xsl +++ b/windows/src/desktop/kmshell/xml/elements.xsl @@ -1,186 +1,186 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - submit - button - - - button_ - location.href=""; - - - - width: ; - font-size: 11px; - height: 25px; - display: inline-block; - margin-right: 8px; - - - - - - - - - - - - - - - javascript:menuitemover(); - javascript:menuitemout(); - javascript:menuitemdown(false); - javascript:menuitemover(); - javascript:menuitemout(); - javascript:return menuitem_keydown(0); - - javascript:HideMenu();return menuitemdown(true); - - - - - - - - - - - - - - - - ShowMenu('','',0,0); return false; - javascript:ShowMenu('','',0,0); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + submit + button + + + button_ + location.href=""; + + + + width: ; + font-size: 11px; + height: 25px; + display: inline-block; + margin-right: 8px; + + + + + + + + + + + + + + + javascript:menuitemover(); + javascript:menuitemout(); + javascript:menuitemdown(false); + javascript:menuitemover(); + javascript:menuitemout(); + javascript:return menuitem_keydown(0); + + javascript:HideMenu();return menuitemdown(true); + + + + + + + + + + + + + + + + ShowMenu('','',0,0); return false; + javascript:ShowMenu('','',0,0); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/windows/src/desktop/kmshell/xml/fonthelper.xsl b/windows/src/desktop/kmshell/xml/fonthelper.xsl index 173f6f61b0639fe2ce4063a4d4bb2c3584339183..51eb8c685b9ba7562bdd964e7311ab8d7b95f06f 100644 --- a/windows/src/desktop/kmshell/xml/fonthelper.xsl +++ b/windows/src/desktop/kmshell/xml/fonthelper.xsl @@ -1,211 +1,211 @@ - - - - - - - - - - - - - - - - fonts - - - - - - - - - -
-
-
- -
-
-
-
- - - -
- - - - - -
-
- -
-
- - - - - -
-
- - - -
-
- -
- -
-
- - - -
-
-
-
-
- -
-
- - - - - - -
-
- - - -
-
-
-
- -
-
-
-
- - - - -
-
-
-
-
-
-
- -
-
-
- - - info.png - - - - -
-
-
-
- -
-
-
-
-
-
-
-
-
- - - - -
- - - - font_ - - - - - % - - - - - - - char excluded - U+ - - - - - -
+ + + + + + + + + + + + + + + + fonts + + + + + + + + + +
+
+
+ +
+
+
+
+ + + +
+ + + + + +
+
+ +
+
+ + + + + +
+
+ + + +
+
+ +
+ +
+
+ + + +
+
+
+
+
+ +
+
+ + + + + + +
+
+ + + +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+
+
+
+
+ +
+
+
+ + + info.png + + + + +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + +
+ + + + font_ + + + + + % + + + + + + + char excluded + U+ + + + + + +
diff --git a/windows/src/desktop/kmshell/xml/help.xsl b/windows/src/desktop/kmshell/xml/help.xsl index 9d41ddde59973b20b42e53b816948864cdaa21c2..73c76354f62eff6d764958f0f71316732c01b04c 100644 --- a/windows/src/desktop/kmshell/xml/help.xsl +++ b/windows/src/desktop/kmshell/xml/help.xsl @@ -1,191 +1,191 @@ - - - - - - - - - - - - - - - <xsl:value-of select="$locale/String[@Id='S_HelpTitle']" /> - config.css - - - - -
-
-
- - -
- - - -
- - - -
-
- - -
- - - -
- -
+ + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='S_HelpTitle']" /> + config.css + + + + +
+
+
+ + +
+ + + +
+ + + +
+
+ + +
+ + + +
+ +
diff --git a/windows/src/desktop/kmshell/xml/hint.xsl b/windows/src/desktop/kmshell/xml/hint.xsl index 5bc9d999d8fe6e7b0815866cb6c98e2948e19a7b..46253eebac445cfd86a9e4e2ff91c0e07ad22e41 100644 --- a/windows/src/desktop/kmshell/xml/hint.xsl +++ b/windows/src/desktop/kmshell/xml/hint.xsl @@ -1,115 +1,115 @@ - - - - - - - - HintTitle_ - Hint_ - - - - - - - - <xsl:value-of select="$locale/String[@Id=$HintTitle]" /> - config.css - hint.css - - - - - -
-
- - - -
- -
- - -
- - - -
- - - - - - - -
+ + + + + + + + HintTitle_ + Hint_ + + + + + + + + <xsl:value-of select="$locale/String[@Id=$HintTitle]" /> + config.css + hint.css + + + + + +
+
+ + + +
+ +
+ + +
+ + + +
+ + + + + + + +
diff --git a/windows/src/desktop/kmshell/xml/installkeyboard.xsl b/windows/src/desktop/kmshell/xml/installkeyboard.xsl index e36f89b6270a47830d0e279ac49e9e52844ca049..20e32ef1cd7fb90f67f873388f42cc52d3051cf1 100644 --- a/windows/src/desktop/kmshell/xml/installkeyboard.xsl +++ b/windows/src/desktop/kmshell/xml/installkeyboard.xsl @@ -1,213 +1,213 @@ - - - - - - - - - - - - - - <xsl:value-of select="$locale/String[@Id='S_InstallKeyboard_Title']"/> - config.css - installkeyboard.css - - - - - -
-
-
- - has_readme - -
- - - - defaultkeyboard.gif - - - - height: 250px; width: 140px; border: solid 1px black - - - defaultpackage.gif - - - -
- - -
-
-
-
-
- -
-
-
-
- - - - - - - -
- - - - - - - - - no_icon.gif - - - - - -
-
-
-
- -
- - -
- - -
-
- - -
-
- - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - keyman:link?url= - - - - - - - - - - - - + + + + + + + + + + + + + + <xsl:value-of select="$locale/String[@Id='S_InstallKeyboard_Title']"/> + config.css + installkeyboard.css + + + + + +
+
+
+ + has_readme + +
+ + + + defaultkeyboard.gif + + + + height: 250px; width: 140px; border: solid 1px black + + + defaultpackage.gif + + + +
+ + +
+
+
+
+
+ +
+
+
+
+ + + + + + + +
+ + + + + + + + + no_icon.gif + + + + + +
+
+
+
+ +
+ + +
+ + +
+
+ + +
+
+ + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + keyman:link?url= + + + + + + + + + + + +
\ No newline at end of file diff --git a/windows/src/desktop/kmshell/xml/keyman.xsl b/windows/src/desktop/kmshell/xml/keyman.xsl index 9521d4a0b53bb71e5ce36e3cc65b9a6e06af0534..e27139a12cbbb5cffad51a1a0fd051f8c0b8db13 100644 --- a/windows/src/desktop/kmshell/xml/keyman.xsl +++ b/windows/src/desktop/kmshell/xml/keyman.xsl @@ -1,11 +1,11 @@ - + - + @@ -15,11 +15,13 @@ - + + + <xsl:value-of select="$locale/String[@Id='S_ConfigurationTitle']"/> config.css menu.css @@ -27,10 +29,10 @@ - - + + - +