{"_id":"alpheios-embedded","_rev":"77-13a909b0a380da3a799912286795e12e","name":"alpheios-embedded","dist-tags":{"latest":"3.4.2-incr-3.4.x.20220429024","beta":"3.3.0-20200618500","dev":"3.3.0-githubactions.20200814408","qa":"3.3.1-qa.20230312469","rc":"3.3.1-20200821383","previous":"3.3.0-20200618500","incr-3.3.x":"3.3.1-incr-3.3.x.20210806328","paideia":"3.4.2-incr-3.4.x.20220429024","incr-3.4.x":"3.4.5-incr-3.4.x.20220504216"},"versions":{"0.3.0":{"name":"alpheios-embedded","version":"0.3.0","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git","alpheios-lexicon-client":"github:alpheios-project/lexicon-client","alpheios-morph-client":"github:alpheios-project/morph-client","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"fd5ea1e042c100a30351a1d395613e1bbf2a6ecc","_id":"alpheios-embedded@0.3.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios","email":"support@alpheios.net"},"dist":{"integrity":"sha512-GLvX/+YAkibWOAdXYDwFJZCJdiwLNjhjytldBFAA4ZCGXKSv+SMmATFhPRqxZm0wSftjny81yJsLJ6MfTb3zUA==","shasum":"d4d57feb3543f06f08c23ed4b22a23bcec42bc13","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.3.0.tgz","fileCount":25,"unpackedSize":10437822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtngjCRA9TVsSAnZWagAAAhYP/0teBtbS5WIEdcS7yeCn\nN79aMVv3dS8F2h1rFuV5vHmo6/1A9iuFu4maj9kZOWrEa3SdQ1H3YnjCdR/f\nmU/lFYBSOSw/Ot1PmuEE4025j2vZg1hhaWqiKflEWQvFC7Thv2NR0KxGm+67\nHuQv7d76xNP0DfIFeu2XEnGgI4W5qAiAj2ExOGau1FRMcspAKIlT/nasW2fI\nr8d9B05ixaJW+45QsFTunDfRCTktbe2wWcIR2CraHt7pIJg1plhXHY2Klx7U\n2DKPuKK6kD1vwvu63TfVQQohjW8ScT6fpQWmIkMvp6NAKgjW1Y6xQt1vHGiH\nS5hRO4gaWCILAgzaLtBblBoEOW+k17UM48IPeJaVY1pV8LmYsK+f43lsvaZO\nX3CPJaF12QBaf80MzT6nw5UocP13SMygkaUWLuu6FcKsTAwcTQMugZgZy5I4\nKmStAbi2/kr/l+3CAuNEvQWvhaLjALbLJybSGVkYPNe3ZEtFoPUNUdJUlf00\nhvioEUjZW82+C2JF0dZPB02Dw4Pi8zldpGMFKKrnYrnS+8eCNcuIiNUknGLn\nX95hM91F+VHA2SEx56hmyMvEuqXRNEFLrvHhHPXW6nh00ZF1VScoUDpfP2CW\nMJb5BGftAuVmkB8LLgft0HJBURKGHg4TYnTf2AsAESa8kRxoPtdtBQtXwLVL\nLMEq\r\n=Owd8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4yaTgnYjm67efTma+vC1WzV7Hr/V9mFp8+kPZ3ixSFQIgNqBJTPGn22kOejXGUZK/9GgmsLHPV2domQZZYRnUXV4="}]},"maintainers":[{"name":"alpheios","email":"support@alpheios.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.3.0_1538684962185_0.7863442456162324"},"_hasShrinkwrap":false},"0.4.0":{"name":"alpheios-embedded","version":"0.4.0","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git","alpheios-lexicon-client":"github:alpheios-project/lexicon-client","alpheios-morph-client":"github:alpheios-project/morph-client","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"b42e329acf47aacd600cf19ae5eff8f59a4abd5f","_id":"alpheios-embedded@0.4.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios","email":"support@alpheios.net"},"dist":{"integrity":"sha512-uyz2gH9gZzmOKbnXtt+grpu2S1Pi9lCZ5/D6Azxi4DqiRgVjMA9MdYr0gEUuTb+ZFhGTMOuorD/M7lBc1rWvaA==","shasum":"7e507342a05ba0e893c5f83315f3dbc882fe52d8","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.4.0.tgz","fileCount":23,"unpackedSize":10434848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbt7ilCRA9TVsSAnZWagAA7S0QAJeWXjsIE5IDMHVSafzr\nABbyaKAhTD4PX//tNOeEaSHSgiy3o/wmjDEcl7BLKv0Qst6Zrpd/erVQH+Yr\nG+ZPkw2ug0ybNPL0DQl7cV77PveZEgax0NM20pPxH+pMhW52R0voqDrgZwyL\n4n60JZ5ee4F4s4BcweLSmdBgoahugCPEJZT7dw+xfQG4rh2cuaMApcruW+vn\nCSOkmmUi26wN3Ad8Ew62nrgkfJNJgrZnh/qAlcRbf4uC5bbaBLHL2bSBrHj3\nReoZR92sSabyfaq0+L9ioTbK0kqLP4B8wvBM/4U7qJWqy4HxR/vQq/HySesa\nb/iZZtyurghxaFTNYc3y2btSC/dfvi+x5h9kGlZne1KxJLpF9hHrILf9fNfC\n0zb6Hk9vGAS419Al+4lbzQUfMwB1OuOydm9YTKaVmWcaNzQ4Nv9PYONKlVvn\no9iawAOpl+7oIF9OlsV+sDLhKBsjrhvvDEkEbLz0df3zS2Gn8zqZjMnoaTE7\nF32JAyhViGD4ts8Tz8VU3QdkNSsiE7tNIgWAaant0pa7Y3jp5skuZGPFgnAK\nve9Uj4mJNLTL9ahuAJIDgXEFt37WdS3pcmjy8r18EjldNWfcC9PReCUH5DF7\nOTPdr6p9N8mGD3Sci2dj2A8vvieFHHGm/pupo3qDYXJ1gO5GlGk6not2PELa\nl4Bb\r\n=HK7N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtgtB2+Bc/Me1cHh5ywM3Nts7MJe1pFe1eMAdTR91tyQIhAK1ie1uc+xTrwiLvkNHsodrMAg+q9iJH7xm/pf109seL"}]},"maintainers":[{"name":"alpheios","email":"support@alpheios.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.4.0_1538767012835_0.605385200117524"},"_hasShrinkwrap":false},"0.4.1":{"name":"alpheios-embedded","version":"0.4.1","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"file:../components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git","alpheios-lexicon-client":"github:alpheios-project/lexicon-client","alpheios-morph-client":"github:alpheios-project/morph-client","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"590bbf336919d1d1afacebaa3aeebcf60610b2b1","_id":"alpheios-embedded@0.4.1","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-crAajpdUoft1JH+HsxdyJzoWSaj0/UcHR1jNDTBGTs4+pMxwp4EoJ5+RpUHyHI/13FAxhMzhLhEvJmyjPwk3sg==","shasum":"666634cf6e2c1f6c1659f4041d2b4a7e7b30cd8c","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.4.1.tgz","fileCount":23,"unpackedSize":10695811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbv3cACRA9TVsSAnZWagAAKoEQAJYx0Hyo8QkVzWK/l2i3\nZIUlFEM41dysswU8GnKyjuuSP6Zu44VW+GVAH9aCA66Mt8qNshCUAhNAG348\nKGyfOFi0H/9EU/0rDqiZDtah2Tw6TYOza4DOXmTNirgjzUZ45FXdn3LUYqrj\n7HV2WHojaOdvnws1r1WbW8gDqda7c2nT/YDHkM8aW5vkb3nd5ROd1+qr3JW2\nudpYo2zZc1nTWDKJ2kD6oPI4U3WZEAN2GAJ3mWmky32DLot1DMlHEDcdK+XA\nF3z3LfER1gcg5iyUuPbqYGVhDBkuA+/29sPfO2NBJ2EyFpgU0caqDJ21SQK5\ndDI718r4UBNor8mExrYbik3pkgSO4Ur0/ZykykECfNgGPJkWD/kMVImUM9SE\nYn2UrBY3padjLs5SwTrWV17x8sYLllVEapmsmEkOu0jX1EiKBlt7QJs9bR3y\n0yJ5kZLwz0O98pNbBBMaBFk4mOn2rlN/AZxb1nreR7lj7EhO4x+DsMqF/5Qe\no+j1hkRdSZpUMQAwE2K623MgKIWp+R0I9EqR9rJVF7PpobFYQxsYvjSY78gp\nay2uUFGZKe99Thk6fUpSZVouG8rzFXfYUQQUPkdBNqUTl9iuDTN+Mclw/zGm\n1HzU3JILR7HFJYgQUf1K+/v45KRa7XY44TStGf6/oaRk/OZOZEdc21imy9lR\nGn31\r\n=nMbo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqc+B2r9mJzsSQLVFsAVJSwBnrgJ8UYJ8aKmOOUFjqzwIgNWck4gHvvFleEAgm7gsrzjnVQgIi7LU/B3twsTz/NyY="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.4.1_1539274495619_0.8272447969617824"},"_hasShrinkwrap":false},"0.5.0":{"name":"alpheios-embedded","version":"0.5.0","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git","alpheios-lexicon-client":"github:alpheios-project/lexicon-client","alpheios-morph-client":"github:alpheios-project/morph-client","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"2072730d6b51c54d24848ff236ec3189d33cb7d8","_id":"alpheios-embedded@0.5.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-3Ple3Fjeo0bO/m8ca587Am9M8SUnySg31pvSZfCMy6Q10g1njqsNh/WzwHPxl3z3W7RE90Xn4PB/8kIB9Phzog==","shasum":"d6641bd8e4f8e503bd33d6c63c8fba8ed656ff45","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.5.0.tgz","fileCount":23,"unpackedSize":10810899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwKygCRA9TVsSAnZWagAAUDAQAJY341hap5xeC6Tw8qi7\nIEG1kcsxFIcy/bS0SVQRHIw0UD4inrN3sJK+6wE4W75xBdQK2M8x6/NvZHz3\n9LEN4KjMeV2ZlLvpt+kNdbngLt+NVR3jYLDJHjPlOYpu4oqBDPVtXCpCY8ij\nYxhGrgzXwK29mXUOFRTrlJ17M6J9Mt1yCi17Lv0y5gv7p9JBRNnDKP4PRoVN\nmSvOobPvVi934qI6OgRTj37koH7vOlJjJpw1PLIb8cs+6CWTXy9gG0Pxd40O\ni2UPBhnds/To6clOJ07ydkHohdcTH4HAt+DoReurJ+CXVEXRXKz1ckt+0v3W\nJ7Pz7nzkV/keFaZp/xTPbbBAvvWsd5mdGXqX1LL6voC96qXQCXxMWmSgTJ0+\ndnHn5WSMjlakpKwtNeg4jZaHFG0i/U4g/p1JaKozk7wepHQiNmBmaVjCx9GF\nZnqY6c3rdT9ys1y3siPtu9RHCjj1Dv3h+5ufG1juO6CWo1aXP8sltrnrzLeK\nJvVMhfOz8f8R3JZ3f/R4ISPDiHLNKrVFbCVifvUL2+eXVvXJ0X9Cap5p0uJO\n/Jo3Jl2brtdPo18U1lS05VdluGeRRbDyXeT9mjObnjpdJZ+zXJwLA9kQQhJi\nQDiL520AFtbq5JJEsLZ3r3NbGS3xpcXjvvlCOqHDIz2pBjAZ5G7efxVeFBjh\nSX3R\r\n=DUtd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8WtSOqbX12tDgdjgea0BAjfTuZ9i9/8rETmiyjRb0FAiB8DuzLeH+3FYqLwc0rDZhYcf4/c5vZwgLeOFaKgQCZ8A=="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.5.0_1539353759615_0.08553679963626148"},"_hasShrinkwrap":false},"0.5.1":{"name":"alpheios-embedded","version":"0.5.1","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git","alpheios-lexicon-client":"github:alpheios-project/lexicon-client","alpheios-morph-client":"github:alpheios-project/morph-client","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"10558b93afb08f1742c519834e3311d0fa8a8310","_id":"alpheios-embedded@0.5.1","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-QmlMc6r//Hqbpfm8QdL/whWbLdKwLQtzRksB5939pYmBesb9l6wwJAJHDC5SfUXj3ojbhNlly1htNu1izPlhjQ==","shasum":"8c0e797faf29544c6916ce6ff2d10899987bd1be","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.5.1.tgz","fileCount":23,"unpackedSize":10571471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwK7LCRA9TVsSAnZWagAAo0kQAKCeedrqUYuAhOaMfxvL\n/lcstVUSrXvvgh+6zhgOBE1hKnFZk3SJA3F6rdGSThXF5g6rXhEDIsjtp/gr\ngz2gtduDQo1YxMfDRgataA5IvVe4D+7h1O1sCGUNEdwziFCssEBnvZ56YUTg\nM+ViLlqBQBqvHsr0yO4cFlqUvWHb7R2Mf4hBX0lt8OJdSm0r0uqB8n+Drqa4\naDDGkpMgjW2IswRNeJbdqoCoKx3UbbXJwccmlkAmk9kUkXtPnpkRSfQ0yi+3\nZKAWzOTTjrxX2WQ967halERuCoujIkd3QPxR5aQ00urW4zptiCpg3iMk0SwJ\npExAHRJOhq041i5bLsmXvWmnCEqDPJ21nTTmebHPs0G0phbooWIOa+j+syB4\n0mUbTcCx5QiGBI5+dSOnX47VrDpwjSpEJe9liaUe0gNDQHJKDjzUAkEZs61k\nzHN/R1y2v5ojF3+izGZlBH+HtKZGAcwo7d6lz/BtJ1/RHLHyfSqEuQhipL9M\nVFpF7ofz7zn+5A3Y8bFlUsMVUDG5IukC0MYBnN4mSqh8B2Sa7Qhpbi+dQAuc\nPN822HI7uBHDh7IPhj5pjvIbQIwi1DmTCwt1N+Z0ZBZ5OytsMQebMcyzeJfn\nq/iHdu6EHi1u1+9Mo9c5VjFS9fuDGF45r2fDXE73mG+owgqRyioMamcrbMgd\n980F\r\n=I6EO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNWGOANdC3ILX1z84MH5NGhm/J6Mmc9XPckLZ79FBA7AIhAMKUaV+V9tWV36y0CpNwYmLTD+yZ1m0H9lKf75l4DW5a"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.5.1_1539354314622_0.6002264132285957"},"_hasShrinkwrap":false},"0.5.2":{"name":"alpheios-embedded","version":"0.5.2","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git","alpheios-lexicon-client":"github:alpheios-project/lexicon-client","alpheios-morph-client":"github:alpheios-project/morph-client","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"31bfcca4bfe1c07085cc60ab6879e4862df1c77d","_id":"alpheios-embedded@0.5.2","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-RY9Avy5/eDHIKCnMoj24FSlfskK7DEmLVof9ahKr16No60GXqzFIfx3WiZ8i8s+BPvksEmdS9+jxwuhi4odBZg==","shasum":"c6b3c9e7c1b855de4c15c7823b1962261bf00352","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.5.2.tgz","fileCount":24,"unpackedSize":10571767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwLLuCRA9TVsSAnZWagAAC4cQAJppNB0nqYEpUQIIq34P\nZihCWcn5h4zATnGKm4L+6VVQ562A2KZoAVQpdIFofJcgdVEVSZCkxYlEgPhO\nnHpD2jyeZ5Re1cRl7ZVJcr6woMQOGfdclbJWNev8+hBmg66qyzYlM89eGSNo\nwpr8vgc5QsjLySF9M8keieC6P2TimCd5kkIY7AokR4h2VJMz/PqnqpYN9zu9\nCJ3NPXk1yOWbjO1/wiaPHrcWOoDpeKNtSSQ4t5DwpVk8QNZjiAs3do1391fJ\nbHIeyj4gq1FnBRKE2N7il5elekp0K4NQYxeLbsMeZjQF8kCnQDBvPcuj0WOv\nyVSUvsAGsTlPePKgmidyDINUUekrh2uc3yNQrM/m672QmEmN67ju3GYn8pCW\nlUVo6Bxo1JZaz+bCtR4F+pWXF93CK0aPZndc3hDZ2xl5a5OfH66zkjeZilGO\nwcBkDdfgwTmrrRh9wpjV367nuxfXIqUK4NDoQ69w+UnzB+M81/VgFMH9/zfj\nCQfdRK2kd1yWd0wJhtB8RVaqapRWzFkj8N4i8lBiBDrRWHw6Hl3OGo7ExaYG\nh7bc2HpNkxLG8IM7EJmX6vpdEwDtO8TF7ix+h+aX7fLd0fSnzes0ris18ORW\nXODtW39uizyNk3AXvuM9oTbc4zq2z3HsTvggj7KqvO0uKPr7OpFTjrNEZEfM\nccrb\r\n=8fWp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHxN2JGekEoGqkAv8o8dZmrnPyMJuGgRbOLMlplpFrZwIhALdWbu8HC/wIMHwV61YDpscIHL3LXtZOllPl6m8zTDWA"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.5.2_1539355373246_0.15329826331899676"},"_hasShrinkwrap":false},"0.5.3":{"name":"alpheios-embedded","version":"0.5.3","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v0.4.7","alpheios-data-models":"github:alpheios-project/data-models#v1.1.13","alpheios-experience":"github:alpheios-project/experience#v1.1.0","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git#v1.4.11","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git#v1.17.0","alpheios-lexicon-client":"github:alpheios-project/lexicon-client#v1.1.0","alpheios-morph-client":"github:alpheios-project/morph-client#v1.1.5","alpheios-node-build":"github:alpheios-project/node-build#v0.1.0","alpheios-res-client":"github:alpheios-project/res-client#v1.1.1","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"78e0ae5e9392359d4bf84e624ffcfa3b1869631e","_id":"alpheios-embedded@0.5.3","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-hH2orB3HySfvcPKGua2vpq/3lc3Q3PoCCi+qSaBX2i+UD+9DvuForE3fX/KmIC3F0mJOp8JIUqyeA+DI/R5cmw==","shasum":"d6488e0b0fcfccfcd7fa6ef1dcddfebfa6e128c4","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.5.3.tgz","fileCount":24,"unpackedSize":10571941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwLWvCRA9TVsSAnZWagAAEz0QAJMVS1ARb/1ielbT8Uiv\nZvPG19V+9mFIaBHaIDVZPf/n1rPEerjLf8sfQ/dWS60zq6BvprBYwY1yzdDg\nqOophG8UDAyHWs0nn3fU4uyF2/FfnbDVQzMo+h06DAFNGdQxuZ8XgtGaPzj6\nP30pr4s8jPo8RPoOvkTj3igDHlISuZDNLaCTLivi9ohfdCLr6+ShJq27BScb\nvafxtP7o+Vb54lWL+yEk+5J8IHyG83hxhZ84rTt52zMePfP/9/GS7kINv1/p\nFb+0PSREAc/TqR3fL9Zg17cPX6zoPg5V3g2TfT9NNZngvphWPvmb8A7UaYgl\nSZZcbTXli+oS1DYTy/XLE/IIKujb0wfAMv2P96fuQmcivALzKx3VdWorJPQw\nQAtx00hTJyajqMNAz8Awl7PErDbNrtF1CFQVk4xVXgu59irPZowaLYONA0XL\nAvzuO0axbs9No6zopDrqj7RI357Hjmc2DUUezWRrhWmiF+9EQzqh1BNAjrIY\n0bAw9YTmNlXc5LQRnjytlD0LDjbpbnKd7AbpxyS2kXbL/NQ+ArVFKQ68KfKc\nvQRSAka7wAqp/kY9TJ/amT+XW39HVfrpqunG3PwqqBz7wvBaYBc37rSQZVnq\n3y9G2ZsiVvSK3DPHHQLTiRm/qOLNLxcsy5/VmuOU5CT6r8BGz27jPUDEBbVw\n1SOS\r\n=lkta\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzblHs+PDlKVTSsMGRzgRm86nTz9nnUZkfUyvfNPggGgIhANXirlPcSbKVSUcxaFthV0A9EguVpyEAKvxIgfuckhfF"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.5.3_1539356078413_0.08788406605122212"},"_hasShrinkwrap":false},"0.5.4":{"name":"alpheios-embedded","version":"0.5.4","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v0.4.7","alpheios-data-models":"github:alpheios-project/data-models#v1.1.13","alpheios-experience":"github:alpheios-project/experience#v1.1.0","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git#v1.4.11","alpheios-lemma-client":"git://github.com/alpheios-project/lemma-client.git#v1.17.0","alpheios-lexicon-client":"github:alpheios-project/lexicon-client#v1.1.0","alpheios-morph-client":"github:alpheios-project/morph-client#v1.1.6","alpheios-node-build":"github:alpheios-project/node-build#v0.1.0","alpheios-res-client":"github:alpheios-project/res-client#v1.1.1","coveralls":"^3.0.2","css-loader":"^0.28.11","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^22.4.4","jest-fetch-mock":"1.3.3","onchange":"^2.4.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^11.0.1","style-loader":"^0.21.0","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.5.0","webpack-dev-server":"^3.1.9"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.9.3"},"gitHead":"de851759c22dadfc02e2ae16a349e73e8f2f48cf","_id":"alpheios-embedded@0.5.4","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-AcYMPV6k2+gIIXrF8MOY6fBXO0qXWWyGX2qQ8nm4kku/LjUOhySrBPjRj/IWm7S+t+dMAKZ1UsXNXvGMz+i30w==","shasum":"03acdca0e32b9b9d22328bb04675d37808bf023f","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.5.4.tgz","fileCount":24,"unpackedSize":10574647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxOq9CRA9TVsSAnZWagAAyfYQAINsykYIL1OEI9WQTBAj\nTvdsFMlN/0L7qcx3G6txldjOAbh6oGPni5Q7q+/uwCw03yw/UcfW3JC+xaT4\nKjeblZW4FObHDMHCP4OsE3ufb1pp3dEy8VRJOeWZVen5lheaexgqlOVKQ11Z\nc/1GgIDTzUxrnu35q/HHV4+EOfyk/Px2ox0Xcsd7pqeM0Vcz5NpHwd2cpqtk\nrTFz7OBCKv5zM4P1+nTBKmKckwGeW+tB8Jwrq+fuHtSw9dGvsdEZMZdlX1eD\ncPAtr84AC6C7OkYWdySw2RiFetD28lzRUDK5PxOKb7pbLYLXTRCEZ9SR8+Xp\n5Rf6Uks3tZIn8zm6sQh4N81jM1w4+U3nyjzHzZXr/eV+kkzbBTvrxpzppXNl\noRKai+uZsDEMO6y5aWSsgxbr+61QqIOKGkaBev2ckbe4W+o/8/6EpWgGGSyD\nWm2nP1cwjHFUYR5aySMnCKhBK+dnryzLmju36wB7kFq9+QCHoo27dQg1WYHh\nsahxP+EIIts6wJYAVenZTYqxek44s4WsBptRLkm1bCdo/dg/VEqffS7/rN8D\nUxchwi4eBSfexM0FLiXjQU00kmndWI9d3TqrUFfW9nDkSQChqP4WTvy1tWY9\n6q9CoMbj2uzw13G/1B1IV9mvFh5VHzEJ+KXn4UzNRuiLOvTjLDgnXYd2T0oh\nQK31\r\n=ObKv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6+JGjLpu9XSeSnVdotvKPiOenrZCqBt4fzYcRj2NGKAiEA/Z4hev5VliLDTfbckdUdDCyFhFwnMFEol5T3apy1mwg="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.5.4_1539631804394_0.9425211361284371"},"_hasShrinkwrap":false},"0.6.0":{"name":"alpheios-embedded","version":"0.6.0","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v0.6.3","alpheios-data-models":"github:alpheios-project/data-models#v1.2.0","alpheios-experience":"github:alpheios-project/experience#v1.1.0","alpheios-inflection-tables":"github:alpheios-project/inflection-tables#v1.4.14","alpheios-lemma-client":"github:alpheios-project/lemma-client#v1.17.0","alpheios-lexicon-client":"github:alpheios-project/lexicon-client#v1.1.0","alpheios-morph-client":"github:alpheios-project/morph-client#v1.1.6","alpheios-node-build":"github:alpheios-project/node-build#v0.2.0","alpheios-res-client":"github:alpheios-project/res-client#v1.1.1","coveralls":"^3.0.2","css-loader":"^1.0.1","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^23.6.0","jest-fetch-mock":"2.0.1","onchange":"^5.2.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^12.0.1","style-loader":"^0.23.1","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.11.0","webpack-dev-server":"^3.1.10"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.11.0"},"gitHead":"820804f477e838f7e6a91f8a391713d626227f40","_id":"alpheios-embedded@0.6.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-/IJHAJnGFxgXvYs15nkkUj6XnuoqCU400bBX2GBtN6YAaLz2M6nuH4MK17CVZ44Ic/ri7C4lIi9xoDEvqdEtlg==","shasum":"4a36b8e0d299f5fb49d815c645ae8059696a7237","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.6.0.tgz","fileCount":24,"unpackedSize":10972306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGRGGCRA9TVsSAnZWagAAheUP/3KcwkIdOaiX/kTYbgak\n1Yz43FE999dJHwpWC5z4Gu8pLcb2oW/yoJZjwotLW+DDNhARsPdhsx023sZt\nQKFH8YYsfv/flKK0TLnOVREX1Wx4mroe3LfFJl7zJ0Doc1do6uJ4Xy7troPO\nxFZZsmIh2GPBe1ZRMJ7soDluVKV0Neq1VgWECMGEmqbP8pZF/j9BLCrxF/ov\niJozOQSpPqoqTbbh088GsgEpk9YYsryoea3Nzv8++CglTog4Rqz+PptfvCmF\nlD/hOr+d9K51CFarcM5E95DVQTtPMSFM156+OVIty6YOBqK//oiWBoVCKq83\noMjChiTyt4zPK6ZtJM9ao+OErl9/MrKzHi3wUIBu2aX5HPPmOL1q4EEdyTkT\noL2dcOEUqMe+rm+Th3V3vR0e0TaNCSZNkwDFGHXfkFlZIdQE6jqen6kB++KE\n+/TqNX6CNRG3+vUUMjGpAJgFgndtFYo99Tfdh+YX63dsBC86sW2CHSA4eF7+\nIF2SQt4FhEwH0x2TI9lnbsAS/NG+qftL/jJ6/iS9zC9Fm99ouioCrQLwH73O\nW6Yekoym4jLBCtH6KczN10zv1X2BodyUtxparyeLmFx2R1d53gr2gtsRfspt\nuAodEPo0MqNd97USqNL8+MKptWk0M+3azytLu3RqMUq0c9S5PrJQr/vLPnwl\ngGxq\r\n=1Jr9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4p1SN4padjRIPEoDf14WGjv+AbvvTXow6kQq/pY32UAIgRsn8IdQTRAHlX6HGwhLfHplRrIpcORZD5u6dFBo9gvg="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.6.0_1545146757429_0.6246969509273028"},"_hasShrinkwrap":false},"0.6.1":{"name":"alpheios-embedded","version":"0.6.1","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"standard --fix && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue","build-prod":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue","build-dev":"standard --fix && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue","lint":"standard --fix","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v0.6.3","alpheios-data-models":"github:alpheios-project/data-models#v1.2.0","alpheios-experience":"github:alpheios-project/experience#v1.1.0","alpheios-inflection-tables":"github:alpheios-project/inflection-tables#v1.4.14","alpheios-lemma-client":"github:alpheios-project/lemma-client#v1.17.0","alpheios-lexicon-client":"github:alpheios-project/lexicon-client#v1.1.0","alpheios-morph-client":"github:alpheios-project/morph-client#v1.1.6","alpheios-node-build":"github:alpheios-project/node-build#v0.2.0","alpheios-res-client":"github:alpheios-project/res-client#v1.1.1","coveralls":"^3.0.2","css-loader":"^1.0.1","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.3.4","intl-messageformat":"^2.2.0","jest":"^23.6.0","jest-fetch-mock":"2.0.1","onchange":"^5.2.0","raw-loader":"^0.5.1","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","standard":"^12.0.1","style-loader":"^0.23.1","url-loader":"^1.1.1","vue-loader":"^15.4.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.11.0","webpack-dev-server":"^3.1.10"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"testEnvironment":"jest-environment-jsdom-11.0.0","transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.11.0"},"gitHead":"4f57c9d712a5293f17b623db6afc4b0d164f354d","_id":"alpheios-embedded@0.6.1","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-U3onP0A5OSyegl3U0BcPUsv6RoCohYIHUpi+KgnZU8nMnmiMo2v1a/ZO0feey95Ma2uDsaZTj8lC5uXIkX5+rg==","shasum":"9f919b69f2045db9f80d5f95f165fd7822539e3d","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-0.6.1.tgz","fileCount":20,"unpackedSize":10457417,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGUfkCRA9TVsSAnZWagAAe4AP/1z3yXpYiS//YHE8S3xx\n2ID3ZqB8YFT98Go6YTXmJFEySMnLLXYSTtXGvtzWaqesD5jsbc86P2BoT/ca\nWLAwKWQ0yPpNhkgG+BhsqxfI+KvYGAl2WHyDml7YUMSWP1IHkkCYGSuQag2A\nzT5Ov0aAyV2JGgGUuMJ8hcTc42cGR2SmZm7kdXnPvRtWQpuvXaVrtBTGbs/T\ngLwvle8FEUQlS6Bs6JEKmfKUPjVHBlneu/w6SYNiT0LMo+EdtCFk8ynaDSgA\nHFBFlS6lZIg/wLKhlxLOW3PluQPb8zbwMy26/PO1t8k0rxRyhTlGkmgR+kj0\nk+j6MsMzVdeWtlVRBLLbkIgyvykNuZezkjHdRLQ4mAKvYdOH0fBUrd9UOAkh\n2upCnFhrKRi3qyGHwSxbf82JopWe6TuavyeLxZx0x0kTr8OWQRhZTGTkBZqy\np7ryRQMtchBc1aYVE7qvkQGn3+cMuR4zhmtr1P33ODhFmP7umFuc8z3m8Zj7\nVGD+wlx29bAFYABEV5Yn5CGZNG/khAF1Q+dXl087vB6nFejMiD6NGEkjWyMY\nvb4mepm4mS+hmhfRyrLgko6TKIwGDw6Bt0O322b404FRXCIEyrBMRWafF4L9\nU1RpCeocgSbDX7WkqtVEKxbDgAD2C5N+7+gwNRhVZDxeQnwu06WEADWcJKyO\n1ZAn\r\n=muOx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFj5EmZY0LLHU11uGtYtkt+udyR4ykAzymxykMdhr3mLAiAYpr6j5O7aD3c72XkmIVpDO2/RS4zgI4NmkRekU9lOOA=="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_0.6.1_1545160675388_0.07949930015049311"},"_hasShrinkwrap":false},"1.0.0-beta.0":{"name":"alpheios-embedded","version":"1.0.0-beta.0","build":"20","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"eslint --fix src/**/*.js && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-prod":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-dev":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-client-adapters":"github:alpheios-project/client-adapters","alpheios-components":"github:alpheios-project/components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","alpheios-wordlist":"github:alpheios-project/wordlist","coveralls":"^3.0.3","css-loader":"^2.1.1","eslint":"^5.15.3","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.3","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","eslint-plugin-vue":"^5.2.2","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.4.4","intl-messageformat":"^2.2.0","jest":"^24.8.0","jest-fetch-mock":"^2.1.2","onchange":"^5.2.0","raw-loader":"^2.0.0","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","style-loader":"^0.23.1","url-loader":"^1.1.2","vue-loader":"^15.7.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.4.1"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2018,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.12.0"},"gitHead":"8eb6f64dfa6da0a462e4e9addf39c90e1bc4e51f","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the user to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe functionality currently works best in the browser on laptops and desktops. Support for mobile devices is under active development.\n\n## Including alpheios-embedded\n\nSee also sample files `sample.html` and `sample-cdn.html` at the root of this repository.\n\n**1. Add the stylesheets and script to your HTML page:**\n\n**Via jsdelivr CDN**\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n\n**Or install from NPM**\n\n```\nnpm install alpheios-embedded\n```\n\n```\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"path_to_node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n**2. Activate Alpheios**\n\nAdd the following Javascript to your page activate Alpheios:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded({clientId:\"yourclientname\"}).activate();\n    });\n</script>\n```\n\nThis will activate the Alpheios functionality for any elements on your page (including their child elements) which have the class `alpheios-enabled`.  \nYou must include a string identifier for the embedding site as a property of the configuration object which gets\npassed to the `activate` function. The class used to identify which elements to activate for Alpheios, as well as\nother aspects can be customized by additional optional properties in the configuration object:\n\n```\n   {\n     clientId:           a unique identifier string for the embedding site or client\n                         Required.\n     documentObject:     the parent document.\n                         Optional.\n                         Default: window.document\n     enabledSelector:    a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                         Optional.\n                         Default: \".alpheios-enabled\"\n     disabledSelector:   a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                         Optional.\n                         Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:       a CSS class to apply to alpheios enabled elements\n                         Optional.\n                         Default: \"\"\n     disabledClass:      a CSS class to apply to alpheios disabled elements\n                         Optional.\n                         Default: \"\"\n     eventTriggers:      a comma-separated list of DOM events to which Alpheios functionality should be attached\n                         Optional.\n                         Default: \"dblclick\"\n     triggerPreCallback: a callback function which is called when the trigger event handler is invoked, prior to initiating\n                         Optional.\n                         Alpheios functionality. It should return true to proced with lookup or false to abort.\n                         Default: no-op, returns true\n      popupData:         popup data overrides (currently only positioning properties supported, top and left)\n                         Optional.\n                         Default: { top: '10vh', left: '10vw'}\n      panelData:         panel data overrides (none currently supported. reserved for future use)\n                         Optional.\n                         Default: {}\n      mobileRedirectUrl  A URL to which requests for the page from mobile devices can be redirected\n                         Optional.\n                         Default: null\n  }\n\n```\n\n## Customizing Alpheios Functionality\n\n**1. Precise Elements to Include**\nBy default Alpheios will be enabled on all elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `activate` configuration object.\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           enabledSelector: \".myalpheioselements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**2. Precise Elements to Ignore**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. You can specifiy additional elements to ignore by including the `disabledSelector` property in the `activate` configuration object:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           disabledSelector: \".mydisabledelements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**3. Specifying Language**\n\nIndicate to Alpheios which language text is by using the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code:\n\n```\n<div lang=\"grc\">Ὅμηρος, ὁ ποιητὴς</div>\n<div lang=\"lat>Tunc fletibus eius adsuspirans anus sic incipit</div>\n<div lang=\"ara\" dir=\"rtl\">هوأبوالفرجعليبنالحسین</div>\n<div lang=\"per\" dir=\"rtl\">به نام خداوند جان و خرد</div>\n```\n\n**4. Use a different trigger event**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nBy default, the `dblclick` event triggers Alpheios functionality. If this conflicts with your site's features, you can choose a different event by including the `triggerEvents` property in the `activate` configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\n**5. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-morph-client](https://github.com/alpheios-project/morph-client) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**6. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Authentication\n\nFor tasks related to authentication and authorization, embedded lib relies on an Auth0 Lock widget. Its script must\nbe loaded by the page that integrates the embedded lib, before the script of an embedded lib itself. \nIt can be loaded from an Auth0 CDN:\n`<script src=\"https://cdn.auth0.com/js/lock/xx.yy.z/lock.js\"></script>`\nHere xx, yy, and z are major, minor, and patch versions correspondingly. see more details in \n[Lock v11 for Web](https://auth0.com/docs/libraries/lock/v11).\n\nAuthentication module also requires an Auth0 configuration file to be loaded before the embedded library script.\n\n## Outstanding Issues/Future Plans\n\n**Mobile DeviceSupport**: Currently the displays and user interface elements provided by the Alpheios Embedded Library are optimized for online use with desktop/laptop screens and keyboards. We are actively working on adding our Progressive Web Application prototype functionality to the library so that Alpheios will seamlessly transition for use on mobile devices. In the meantime, if you want to redirect users to an alternative page for use with mobile devices, you can pass the `mobileRedirectUrl` property to the `activate` function.\n\nSee also our open [issues](https://github.com/alpheios-project/embed-lib).\n\n# Pre-release Features\n\n## Protected User Data Retrieval\n\nEmbedded lib can pull user information from remote protected storage. This require user to be authenticated with Auth0.\nEmbedded lib includes functions for logging in, out, and for making user info retrieval. Use `auth.html` located in `demo`\ndirectory for testing and as an example of code to handle such functionality.\n\n**Attention:** Protected user data retrieval requires `env-embed.js` configuration file to be installed into\n`dist\\auth0` directory. In a development environment you can use `npm run auth0-env-update` command to copy\nor update this file to `dist\\auth0`.\n\n\n# Developer Instructions\n\n## Prerequisites\n\n  * Node 10.5.0 or higher\n\n## Install Dependencies\n\n```\nnpm install\n```\n\n## Build\n\n```\nnpm run test\nnpm run build\n```\n\n## Develop\n\n```\nnpm run dev\n```\n\nruns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the \ncode will be dynamically rebuilt.\n\n## Testing authentication on a local host\n\nAs localhost is not a verifiable first-party, Auth0 will require a user's approval for an app to access user\ninformation (a user consent). As a workaround for this, to simplify testing, a `hosts` file can be modified as below:\n`127.0.0.1    appname.example`\n\nAn app should be accessed then trough `appname.example`, not `localhost`.","readmeFilename":"README.md","_id":"alpheios-embedded@1.0.0-beta.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-vrDk94uyOKiXf4ca4dCk8VikDMhlAlylfd5zxISBkmc1ticgRx1ex+eaM6GKXcIWRIpV3hqVXT1Bqs2BJ65Bjg==","shasum":"35fdcc37e2dcaa2738bf31bc0bcdb18ce967fff7","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-1.0.0-beta.0.tgz","fileCount":26,"unpackedSize":13225237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7vw7CRA9TVsSAnZWagAAni4P/RoJ/HwYGzVsfNdV6RVy\nK1Mnlx20pQdcvlidT/a7s3lRMwaQHxOPHr9kbdKJ/mTH5Js+doh1s9hC9rvs\nnH+SDIfImgHonFteAd5rkUgE/NS1MOmOMSi3peI7zoFXu3DEQV2+npePq5FD\nur7ARGLEhZIU7c8bbMFolTGWv07V75qNSzOAK2mU6IPfRkcx1EXGu3x9P28D\n3KbUa+qDKMYlc0wu5XYRgaqUfbx3n2oLetE4+E9cyRU1gMfoHder0kuclxh+\nCBRdXpU4O9q7/o+WDzI6m+7FFMGrXhKUHPT3P6vmpz6BUW1XE4sZvIBwP/Ly\neRbatJu41fWi4XWEn7rGBC8w/uVptjWCLcRPsAZc0Ug5YVdYf7CDUCWITGhL\nytdEtl9Ms/7Tlk+CY7Ud6sZUWF6iPkv+kFBIXBJwDYBMc+YwCOp4gUdbMbnQ\n4lboW8Qvr+3gi1cNjwHcf/kO6VVgGGtK1wS0h6j6UdZ9uQUM/fRtY7g7vlI5\nU1Vk4wvkaj96lWnRhkokWc/zMqbm6TVGeHsOkRSMq+HOEMi1AeY8IU+zThW3\nbrAqtCEITagJevL0hujUBNaA6me7Ej4kEx8eh0z4/ergw7T1OihW9agmS150\nHIVMKiuF6GJW2BtKvcGQWBaSY2pqfz/oNXuWC2EJXTl2F3qk5g6J5RbL2eq7\nzuRO\r\n=VJwU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEc6YxDr9pYoPQCKEGDJLjmGMQkxGHdX49dZx0w2nLGwIhAOtANm/5nWKcMsac5PTyGgHdxDw5lxra29jYf8qrPi4A"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_1.0.0-beta.0_1559166010565_0.8447243785841159"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"alpheios-embedded","version":"1.0.0-beta.1","build":"24","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"eslint --fix src/**/*.js && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-prod":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-dev":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-client-adapters":"github:alpheios-project/client-adapters","alpheios-components":"github:alpheios-project/components#embed-lib-1.0.0-beta.1","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","alpheios-wordlist":"github:alpheios-project/wordlist","coveralls":"^3.0.4","css-loader":"^2.1.1","eslint":"^5.15.3","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.18.0","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.0","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.4.11","intl-messageformat":"^2.2.0","jest":"^24.8.0","jest-fetch-mock":"^2.1.2","onchange":"^5.2.0","raw-loader":"^2.0.0","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","style-loader":"^0.23.1","url-loader":"^1.1.2","vue-loader":"^15.7.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.7.2"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2018,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.12.0"},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the user to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe functionality currently works best in the browser on laptops and desktops. Support for mobile devices is under active development.\n\n## Including alpheios-embedded\n\nSee also sample files `sample.html` and `sample-cdn.html` at the root of this repository.\n\n**1. Add the stylesheets and script to your HTML page:**\n\n**Via jsdelivr CDN**\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded@1.0.0-beta.1/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded@1.0.0-beta.1/dist/style/style-embedded.min.css\"/>\n<script src=\"https://cdn.jsdelivr.net/npm/alpheios-embedded@1.0.0-beta.1/dist/alpheios-embedded.min.js\"></script>\n```\n\n**Or install from NPM**\n\n```\nnpm install alpheios-embedded@1.0.0-beta.1\n```\n\n```\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"path_to_node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n\n**Note**: in order to enable mobile-responsive behavior, please also be sure to include the following meta tag to the head of the page:\n\n```\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n**2. Activate Alpheios**\n\nAdd the following Javascript to your page activate Alpheios:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded({clientId:\"yourclientname\"}).activate();\n    });\n</script>\n```\n\nThis will activate the Alpheios functionality for any elements on your page (including their child elements) which have the class `alpheios-enabled`.  \nYou must include a string identifier for the embedding site as a property of the configuration object which gets\npassed to the `activate` function. The class used to identify which elements to activate for Alpheios, as well as\nother aspects can be customized by additional optional properties in the configuration object:\n\n```\n   {\n     clientId:           a unique identifier string for the embedding site or client\n                         Required.\n     documentObject:     the parent document.\n                         Optional.\n                         Default: window.document\n     enabledSelector:    a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                         Optional.\n                         Default: \".alpheios-enabled\"\n     disabledSelector:   a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                         Optional.\n                         Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:       a CSS class to apply to alpheios enabled elements\n                         Optional.\n                         Default: \"\"\n     disabledClass:      a CSS class to apply to alpheios disabled elements\n                         Optional.\n                         Default: \"\"\n     eventTriggers:      a comma-separated list of DOM events to which Alpheios functionality should be attached\n                         Optional.\n                         Default: \"dblclick\"\n     triggerPreCallback: a callback function which is called when the trigger event handler is invoked, prior to initiating\n                         Optional.\n                         Alpheios functionality. It should return true to proced with lookup or false to abort.\n                         Default: no-op, returns true\n     popupInitialPos:    an object specifying css positioning properties for the popup (on desktop displays).\n                         Optional.\n                         Default: { top: '10vh', left: '10vw'}\n     toolbarInitialPos:  an object specifying css positioning properties for the toolbar\n                         Optional.\n                         Default: { top: '10px', right: '15px'}\n  }\n\n```\n\n## Customizing Alpheios Functionality\n\n**1. Precise Elements to Include**\nBy default Alpheios will be enabled on all elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `activate` configuration object.\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           enabledSelector: \".myalpheioselements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**2. Precise Elements to Ignore**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. You can specifiy additional elements to ignore by including the `disabledSelector` property in the `activate` configuration object:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           disabledSelector: \".mydisabledelements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**3. Specifying Language**\n\nIndicate to Alpheios which language text is by using the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code:\n\n```\n<div lang=\"grc\">Ὅμηρος, ὁ ποιητὴς</div>\n<div lang=\"lat>Tunc fletibus eius adsuspirans anus sic incipit</div>\n<div lang=\"ara\" dir=\"rtl\">هوأبوالفرجعليبنالحسین</div>\n<div lang=\"per\" dir=\"rtl\">به نام خداوند جان و خرد</div>\n```\n\n**4. Use a different trigger event**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nBy default, the `dblclick` event triggers Alpheios functionality. If this conflicts with your site's features, you can choose a different event by including the `triggerEvents` property in the `activate` configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\n**5. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-morph-client](https://github.com/alpheios-project/morph-client) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**6. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n# Developer Instructions\n\n## Prerequisites\n\n  * Node 10.5.0 or higher\n\n## Install Dependencies\n\n```\nnpm install\n```\n\n## Build\n\n```\nnpm run test\nnpm run build\n```\n\n## Develop\n\n```\nnpm run dev\n```\n\nruns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"a6c22e3a1ff45b8d3929c9bd37862f182e244b36","_id":"alpheios-embedded@1.0.0-beta.1","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-bucxFXAgVrxuU8x5IQScpkk8EMIbxKCTUWGm264ApW6W+ep2C8/SlzXasiAz9qCmQ9H6aZyzC7kQpfvpw7XHnA==","shasum":"45a72eeb0de04551d228290a64f7674d13ff28ad","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-1.0.0-beta.1.tgz","fileCount":26,"unpackedSize":13333197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE6AbCRA9TVsSAnZWagAAZKsP/04R1nYCBPGE8WM4of6p\nYzaneBCHCkD/RrTrDf2am8xCBsdMVOxXlXh5nD/Cm0Ug4bd8jjQo49vvbNcV\nXTfcu7+ezsbREvh6vGF5YSMl0ggeelJLLRCSGl7y3CMTPESKRNLl7JK9Iy0j\nwgG1ki7M36XZxBTjIfR67CX+3IaDPtOi5HQCaUPqj/Bfily+KJ2AoKhthb+n\ndmxoI8P+hmNQGokW/Le/bjrfvQOEPvrVXEFLH09v9rjBai9idjPUM556ND2t\np753Zb6fyRj3D+vSLqLqnkbCNIdu5CWiNWVoOWA/xhO6OrOGV8zSg4bbPTTw\n1EaOaL1xVz0BA+7Glg0RZ9m4hahLbUJ7afTfK/UxzPDa2nuwjXXLX6nu/FGY\ntM1muqG7XdDTTLjMx3bcB1trqa5PWbDuQltrUF7L66P1d6IP8V4GRC6wmgwV\nQCEGxIx0QxGbJ69rmKHvKJzWiZINy0P/Pd4borqjjs/uy3cWfBu/nu6ds24w\nkG6KZMoUYRl+AsyH/P3spPp2bKr40BJ+eJ//E7Uvw3HyebLVogtdz7sxVP2k\nLpG2kJ98H+/wAHaApppotkgD3/OYHQ9ObWLgE3Gm5hrPtWvB4acQq7JqtJad\n2ZJ5018JfaKuOb0GBIcxe7/Xp2Y8FHff9WTmlSII0oyiziIKTBqZCvHpETNj\nadQ1\r\n=r9UF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDb0YcmZvIRcbP3IA85lVgHvwnyCE5SmBDQYajke3LVCAiEA4uWSB5xD7r2LHilyOmrSiXpO2wwta7gxWlUZDxB7k/8="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_1.0.0-beta.1_1561567258408_0.07658657820908621"},"_hasShrinkwrap":false},"1.0.0-beta.2":{"name":"alpheios-embedded","version":"1.0.0-beta.2","build":"24","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"eslint --fix src/**/*.js && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all all vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-prod":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-dev":"eslint --fix src/**/*.js && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development vue && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","dev":"npm run build-dev && http-server -c-1 -p 8888 & onchange src -- npm run build-dev"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-client-adapters":"github:alpheios-project/client-adapters","alpheios-components":"github:alpheios-project/components#embed-lib-1.0.0-beta.1","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"git://github.com/alpheios-project/inflection-tables.git","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","alpheios-wordlist":"github:alpheios-project/wordlist","coveralls":"^3.0.4","css-loader":"^2.1.1","eslint":"^5.15.3","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.18.0","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.0","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.4.11","intl-messageformat":"^2.2.0","jest":"^24.8.0","jest-fetch-mock":"^2.1.2","onchange":"^5.2.0","raw-loader":"^2.0.0","sass-loader":"^7.1.0","source-map-loader":"^0.2.4","style-loader":"^0.23.1","url-loader":"^1.1.2","vue-loader":"^15.7.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.7.2"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parserOptions":{"ecmaVersion":2018,"sourceType":"module"}},"standard":{"ignore":["**/dist","**/support"]},"dependencies":{"node-sass":"^4.12.0"},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the user to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe functionality currently works best in the browser on laptops and desktops. Support for mobile devices is under active development.\n\n## Including alpheios-embedded\n\nSee also sample files `sample.html` and `sample-cdn.html` at the root of this repository.\n\n**1. Add the stylesheets and script to your HTML page:**\n\n**Via jsdelivr CDN**\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded@1.0.0-beta.1/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded@1.0.0-beta.1/dist/style/style-embedded.min.css\"/>\n<script src=\"https://cdn.jsdelivr.net/npm/alpheios-embedded@1.0.0-beta.1/dist/alpheios-embedded.min.js\"></script>\n```\n\n**Or install from NPM**\n\n```\nnpm install alpheios-embedded@1.0.0-beta.1\n```\n\n```\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"path_to_node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n\n**Note**: in order to enable mobile-responsive behavior, please also be sure to include the following meta tag to the head of the page:\n\n```\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n**2. Activate Alpheios**\n\nAdd the following Javascript to your page activate Alpheios:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded({clientId:\"yourclientname\"}).activate();\n    });\n</script>\n```\n\nThis will activate the Alpheios functionality for any elements on your page (including their child elements) which have the class `alpheios-enabled`.  \nYou must include a string identifier for the embedding site as a property of the configuration object which gets\npassed to the `activate` function. The class used to identify which elements to activate for Alpheios, as well as\nother aspects can be customized by additional optional properties in the configuration object:\n\n```\n   {\n     clientId:           a unique identifier string for the embedding site or client\n                         Required.\n     documentObject:     the parent document.\n                         Optional.\n                         Default: window.document\n     enabledSelector:    a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                         Optional.\n                         Default: \".alpheios-enabled\"\n     disabledSelector:   a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                         Optional.\n                         Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:       a CSS class to apply to alpheios enabled elements\n                         Optional.\n                         Default: \"\"\n     disabledClass:      a CSS class to apply to alpheios disabled elements\n                         Optional.\n                         Default: \"\"\n     eventTriggers:      a comma-separated list of DOM events to which Alpheios functionality should be attached\n                         Optional.\n                         Default: \"dblclick\"\n     triggerPreCallback: a callback function which is called when the trigger event handler is invoked, prior to initiating\n                         Optional.\n                         Alpheios functionality. It should return true to proced with lookup or false to abort.\n                         Default: no-op, returns true\n     popupInitialPos:    an object specifying css positioning properties for the popup (on desktop displays).\n                         Optional.\n                         Default: { top: '10vh', left: '10vw'}\n     toolbarInitialPos:  an object specifying css positioning properties for the toolbar\n                         Optional.\n                         Default: { top: '10px', right: '15px'}\n  }\n\n```\n\n## Customizing Alpheios Functionality\n\n**1. Precise Elements to Include**\nBy default Alpheios will be enabled on all elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `activate` configuration object.\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           enabledSelector: \".myalpheioselements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**2. Precise Elements to Ignore**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. You can specifiy additional elements to ignore by including the `disabledSelector` property in the `activate` configuration object:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           disabledSelector: \".mydisabledelements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**3. Specifying Language**\n\nIndicate to Alpheios which language text is by using the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code:\n\n```\n<div lang=\"grc\">Ὅμηρος, ὁ ποιητὴς</div>\n<div lang=\"lat>Tunc fletibus eius adsuspirans anus sic incipit</div>\n<div lang=\"ara\" dir=\"rtl\">هوأبوالفرجعليبنالحسین</div>\n<div lang=\"per\" dir=\"rtl\">به نام خداوند جان و خرد</div>\n```\n\n**4. Use a different trigger event**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nBy default, the `dblclick` event triggers Alpheios functionality. If this conflicts with your site's features, you can choose a different event by including the `triggerEvents` property in the `activate` configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\n**5. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-morph-client](https://github.com/alpheios-project/morph-client) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**6. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n# Developer Instructions\n\n## Prerequisites\n\n  * Node 10.5.0 or higher\n\n## Install Dependencies\n\n```\nnpm install\n```\n\n## Build\n\n```\nnpm run test\nnpm run build\n```\n\n## Develop\n\n```\nnpm run dev\n```\n\nruns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"24010d521dba02d226927ed0cd892deeea3e9c4b","_id":"alpheios-embedded@1.0.0-beta.2","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"dist":{"integrity":"sha512-xWJWIU6nAcZe4Z85UEECx3D1PsH6o+jUjEkXnf/vetwjNEvFmnTpFrE5rOmr3n81H0sadnTihaHUofvIBkYmnQ==","shasum":"bfdfd4d1f6db076efdf36307339dec3da1d91411","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-1.0.0-beta.2.tgz","fileCount":26,"unpackedSize":13333197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE7sGCRA9TVsSAnZWagAAxZ8P/jQRoqrN0/j9qUTa3z8p\nLkNU8ZdiFN1WFL79FBeXJrCU8L1JfukwsYvmntFoJtiRrXP4B5wpA04wOTa6\nypeHf/bo8lV13bbDGDsrhdtED6arFnRCntIIOjvubxiA4L+iCXn/xAB2ZbAD\nZ0oYEq395aaGdNM7flcwfnCsicQn5zj6sfQVQ1wWecOjw//psGtJX0RsPu5G\nozT2iTm6XTsHWuL7+fMA4niLUMskhkS37qWHm4bGWTcUogKgDNu7yxNHPPij\nYYqKub8b4ppUlA4/vHueNOsjghxefiW+6ZPFj/DtsO1rHAaRszPTtWaLl5nY\nM0XxYI3sv+CMrtG39kE9SvPGGHHiMC34LbxbZHrSyagGzAwm8XOscJR6Xw49\nFX8rAS82AV/WrKgu5In/lTOHUHuMrGiXzvOQ16t620HOISpNKpbgXLbLiKOT\nlLM2YlIeIx6/c+kaKRgZ3jWjkYmU2LCzS9ZNRqhQcfn64033heSYQlYXnBrk\nE3YHc1QTylqK59awuFz5S4pHjhEX4WK9Jd0kbnjvmwwSrcauXdpsf831tZ04\nnEVK+Tr7fF5i1UwA6mOrXKUwGD5cSa28ULtGF91vHWaJYoTGEHPZakXlKw6a\nqi44TEGCH5gMgob7DX+01oGURHl4eDh+Tl2710ZaEhvCcCBiD+3pIB71y0cl\nInFB\r\n=tkIV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCY9vMaaIdEEn++ET99hOPVOpwo8Xscfla2RowaPNxbCQIgWyBx/uimDc7Nm1KBtcHGl2uPIFm0Sz4dxzshlLHDMbU="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_1.0.0-beta.2_1561574149749_0.40265143646550805"},"_hasShrinkwrap":false},"3.0.0-beta.1":{"name":"alpheios-embedded","version":"3.0.0-beta.1","build":"38","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-client-adapters":"github:alpheios-project/client-adapters","alpheios-components":"github:alpheios-project/components","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"github:alpheios-project/inflection-tables","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","alpheios-wordlist":"github:alpheios-project/wordlist","copy-webpack-plugin":"^5.0.4","coveralls":"^3.0.6","css-loader":"^3.2.0","eslint":"^6.2.2","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^9.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.5.4","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.0.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^0.23.1","url-loader":"^2.1.0","vue-loader":"^15.7.1","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.8.0"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the user to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe functionality currently works best in the browser on laptops and desktops. Support for mobile devices is under active development.\n\n## Including alpheios-embedded\n\nSee also sample files `sample.html` and `sample-cdn.html` at the root of this repository.\n\n**1. Add the stylesheets and script to your HTML page:**\n\n**Via jsdelivr CDN**\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n\n**Or install from NPM**\n\n```\nnpm install alpheios-embedded\n```\n\n```\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"path_to_node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n**2. Activate Alpheios**\n\nAdd the following Javascript to your page activate Alpheios:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded({clientId:\"yourclientname\"}).activate();\n    });\n</script>\n```\n\nThis will activate the Alpheios functionality for any elements on your page (including their child elements) which have the class `alpheios-enabled`.  \nYou must include a string identifier for the embedding site as a property of the configuration object which gets\npassed to the `activate` function. The class used to identify which elements to activate for Alpheios, as well as\nother aspects can be customized by additional optional properties in the configuration object:\n\n```\n   {\n     clientId:           a unique identifier string for the embedding site or client\n                         Required.\n     documentObject:     the parent document.\n                         Optional.\n                         Default: window.document\n     enabledSelector:    a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                         Optional.\n                         Default: \".alpheios-enabled\"\n     disabledSelector:   a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                         Optional.\n                         Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:       a CSS class to apply to alpheios enabled elements\n                         Optional.\n                         Default: \"\"\n     disabledClass:      a CSS class to apply to alpheios disabled elements\n                         Optional.\n                         Default: \"\"\n     eventTriggers:      a comma-separated list of DOM events to which Alpheios functionality should be attached\n                         Optional.\n                         Default: \"dblclick\"\n     triggerPreCallback: a callback function which is called when the trigger event handler is invoked, prior to initiating\n                         Optional.\n                         Alpheios functionality. It should return true to proced with lookup or false to abort.\n                         Default: no-op, returns true\n      popupData:         popup data overrides (currently only positioning properties supported, top and left)\n                         Optional.\n                         Default: { top: '10vh', left: '10vw'}\n      panelData:         panel data overrides (none currently supported. reserved for future use)\n                         Optional.\n                         Default: {}\n      mobileRedirectUrl  A URL to which requests for the page from mobile devices can be redirected\n                         Optional.\n                         Default: null\n  }\n\n```\n\n## Customizing Alpheios Functionality\n\n**1. Precise Elements to Include**\nBy default Alpheios will be enabled on all elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `activate` configuration object.\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           enabledSelector: \".myalpheioselements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**2. Precise Elements to Ignore**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. You can specifiy additional elements to ignore by including the `disabledSelector` property in the `activate` configuration object:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           disabledSelector: \".mydisabledelements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**3. Specifying Language**\n\nIndicate to Alpheios which language text is by using the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code:\n\n```\n<div lang=\"grc\">Ὅμηρος, ὁ ποιητὴς</div>\n<div lang=\"lat>Tunc fletibus eius adsuspirans anus sic incipit</div>\n<div lang=\"ara\" dir=\"rtl\">هوأبوالفرجعليبنالحسین</div>\n<div lang=\"per\" dir=\"rtl\">به نام خداوند جان و خرد</div>\n```\n\n**4. Use a different trigger event**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nBy default, the `dblclick` event triggers Alpheios functionality. If this conflicts with your site's features, you can choose a different event by including the `triggerEvents` property in the `activate` configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\n**5. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-morph-client](https://github.com/alpheios-project/morph-client) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**6. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Authentication\n\nFor tasks related to authentication and authorization, embedded lib relies on an Auth0 Lock widget. Its script must\nbe loaded by the page that integrates the embedded lib, before the script of an embedded lib itself. \nIt can be loaded from an Auth0 CDN:\n`<script src=\"https://cdn.auth0.com/js/lock/xx.yy.z/lock.js\"></script>`\nHere xx, yy, and z are major, minor, and patch versions correspondingly. see more details in \n[Lock v11 for Web](https://auth0.com/docs/libraries/lock/v11).\n\nAuthentication module also requires an Auth0 configuration file to be loaded before the embedded library script.\n\n## Outstanding Issues/Future Plans\n\n**Mobile DeviceSupport**: Currently the displays and user interface elements provided by the Alpheios Embedded Library are optimized for online use with desktop/laptop screens and keyboards. We are actively working on adding our Progressive Web Application prototype functionality to the library so that Alpheios will seamlessly transition for use on mobile devices. In the meantime, if you want to redirect users to an alternative page for use with mobile devices, you can pass the `mobileRedirectUrl` property to the `activate` function.\n\nSee also our open [issues](https://github.com/alpheios-project/embed-lib).\n\n# Pre-release Features\n\n## Protected User Data Retrieval\n\nEmbedded lib can pull user information from remote protected storage. This require user to be authenticated with Auth0.\nEmbedded lib includes functions for logging in, out, and for making user info retrieval. Use `auth.html` located in `demo`\ndirectory for testing and as an example of code to handle such functionality.\n\n**Attention:** Protected user data retrieval requires `env-embed.js` configuration file to be installed into\n`dist\\auth0` directory. In a development environment you can use `npm run auth0-env-update` command to copy\nor update this file to `dist\\auth0`.\n\n\n# Developer Instructions\n\n## Prerequisites\n\n  * Node 10.5.0 or higher\n\n## Install Dependencies\n\n```\nnpm install\n```\n\n## Build\n\n```\nnpm run test\nnpm run build\n```\n\n## Develop\n\n```\nnpm run dev\n```\n\nruns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the \ncode will be dynamically rebuilt.\n\n## Testing authentication on a local host\n\nAs localhost is not a verifiable first-party, Auth0 will require a user's approval for an app to access user\ninformation (a user consent). As a workaround for this, to simplify testing, a `hosts` file can be modified as below:\n`127.0.0.1    appname.example`\n\nAn app should be accessed then trough `appname.example`, not `localhost`.","readmeFilename":"README.md","gitHead":"b5b934534ddb2ee22912d4966ccea98993cb5256","_id":"alpheios-embedded@3.0.0-beta.1","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-d1GVwwZMmjhdhyeu7K5QySOZYSQ1jBKqmhOxEY/yTc/NiktbQ0fLOy4S4BsVk9l6kzoqt2hANEVX7Wti28e+LQ==","shasum":"289a61c657c2c48c7e0dc945aa7928f8d0340673","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.0.0-beta.1.tgz","fileCount":28,"unpackedSize":13004561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcRTJCRA9TVsSAnZWagAA4PkP/0StMZUQhS/wC4f7+nRq\nAGfiUQ/8SZ9wCrQmwovcG8n5vJiEzdtpIizYPrYeDmNlFteA6GpaSBjwzcRB\nsQP/L8qaCCac0BLFS/kXCSyfx7/uYOc3uUg73kc8BvtjiDowK99qSmyICJYz\ndxuSmuFjmXHCvR7HUjTlZtFDzGTOjnscGzEoVrDIcpCh+X/nTUoUhRMOCGuF\nXO8iFJt7RMT+pSeuvRH+y43JLafuT1/f3j/Vvp4b4F6R6qYvmhbVVspsJ9GV\n1dosp8hazHEpIOZApuyDaP5/Aca6jvDucAFumvt+4EeJrdv0tZz+50rhoWOX\nXQAth6/Z6rM3tFvAeV5KLGOMFviGxgCZmOB5HhsbqhzxH7mCW7fxyYFmRxAC\nUYawCDuLrR8TnFawxh0KsPoqazJUafXc7CXXlTysnoHnEEeiMA+7nnl+Yqzm\nSUFryCYznXfbsgZgSSJ4IkxaYskAMeFioM+weQ7trSyuQENjdx8RBCFDv+Qv\nLGV5vSv+MqfGxVNgV4p0D7tjHlA6IqwzTYMuZrXmpRQy9Ht1+OEpMi2PxAdE\nL6/jZKagIOqdz0inyLVCx77NcOCNeVYVOuhe5/H0VOKC2fQ9OPrV7yhh9HWi\ns9U7tqaAgvFfKRnXG+zATyISdY9C3SHTyTQJWFCWsf5pRaM6sTJ/TA7OTiFS\nPM+E\r\n=sOoE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbm+hLZZ/n+f7bwQ8Udl5yaMUuDOSwu2KyXzSBxOFWdAiEAl7DViGmCLaTSwK8rIZ25c3FRKuCGdd3C2KgM2/hChzk="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.0.0-beta.1_1567691976410_0.7459341037294254"},"_hasShrinkwrap":false},"3.0.0-beta.2":{"name":"alpheios-embedded","version":"3.0.0-beta.2","build":"38","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-client-adapters":"github:alpheios-project/client-adapters","alpheios-components":"github:alpheios-project/components#alpheios-release-3.0","alpheios-data-models":"github:alpheios-project/data-models","alpheios-experience":"github:alpheios-project/experience","alpheios-inflection-tables":"github:alpheios-project/inflection-tables","alpheios-node-build":"github:alpheios-project/node-build","alpheios-res-client":"github:alpheios-project/res-client","alpheios-wordlist":"github:alpheios-project/wordlist","copy-webpack-plugin":"^5.0.4","coveralls":"^3.0.6","css-loader":"^3.2.0","eslint":"^6.3.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^9.2.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.6.1","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^0.23.1","url-loader":"^2.1.0","vue-loader":"^15.7.1","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.8.0"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the user to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe functionality currently works best in the browser on laptops and desktops. Support for mobile devices is under active development.\n\n## Including alpheios-embedded\n\nSee also sample files `sample.html` and `sample-cdn.html` at the root of this repository.\n\n**1. Add the stylesheets and script to your HTML page:**\n\n**Via jsdelivr CDN**\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"https://cdn.jsdelivr.net/npm/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n\n**Or install from NPM**\n\n```\nnpm install alpheios-embedded\n```\n\n```\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style.min.css\"/>\n<link rel=\"stylesheet\" href=\"path_to_node_modules/alpheios-embedded/dist/style/style-embedded.min.css\"/>\n<script src=\"path_to_node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\"></script>\n```\n**2. Activate Alpheios**\n\nAdd the following Javascript to your page activate Alpheios:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded({clientId:\"yourclientname\"}).activate();\n    });\n</script>\n```\n\nThis will activate the Alpheios functionality for any elements on your page (including their child elements) which have the class `alpheios-enabled`.  \nYou must include a string identifier for the embedding site as a property of the configuration object which gets\npassed to the `activate` function. The class used to identify which elements to activate for Alpheios, as well as\nother aspects can be customized by additional optional properties in the configuration object:\n\n```\n   {\n     clientId:           a unique identifier string for the embedding site or client\n                         Required.\n     documentObject:     the parent document.\n                         Optional.\n                         Default: window.document\n     enabledSelector:    a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                         Optional.\n                         Default: \".alpheios-enabled\"\n     disabledSelector:   a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                         Optional.\n                         Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:       a CSS class to apply to alpheios enabled elements\n                         Optional.\n                         Default: \"\"\n     disabledClass:      a CSS class to apply to alpheios disabled elements\n                         Optional.\n                         Default: \"\"\n     eventTriggers:      a comma-separated list of DOM events to which Alpheios functionality should be attached\n                         Optional.\n                         Default: \"dblclick\"\n     triggerPreCallback: a callback function which is called when the trigger event handler is invoked, prior to initiating\n                         Optional.\n                         Alpheios functionality. It should return true to proced with lookup or false to abort.\n                         Default: no-op, returns true\n      popupData:         popup data overrides (currently only positioning properties supported, top and left)\n                         Optional.\n                         Default: { top: '10vh', left: '10vw'}\n      panelData:         panel data overrides (none currently supported. reserved for future use)\n                         Optional.\n                         Default: {}\n      mobileRedirectUrl  A URL to which requests for the page from mobile devices can be redirected\n                         Optional.\n                         Default: null\n  }\n\n```\n\n## Customizing Alpheios Functionality\n\n**1. Precise Elements to Include**\nBy default Alpheios will be enabled on all elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `activate` configuration object.\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           enabledSelector: \".myalpheioselements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**2. Precise Elements to Ignore**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. You can specifiy additional elements to ignore by including the `disabledSelector` property in the `activate` configuration object:\n\n```\n<script type=\"text/javascript\">\n  document.addEventListener(\"DOMContentLoaded\", function(event) {\n      new Alpheios.Embedded(\n         {\n           clientId: \"myclientid\",\n           disabledSelector: \".mydisabledelements\"\n         }\n      ).activate();\n    });\n</script>\n```\n\n**3. Specifying Language**\n\nIndicate to Alpheios which language text is by using the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code:\n\n```\n<div lang=\"grc\">Ὅμηρος, ὁ ποιητὴς</div>\n<div lang=\"lat>Tunc fletibus eius adsuspirans anus sic incipit</div>\n<div lang=\"ara\" dir=\"rtl\">هوأبوالفرجعليبنالحسین</div>\n<div lang=\"per\" dir=\"rtl\">به نام خداوند جان و خرد</div>\n```\n\n**4. Use a different trigger event**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nBy default, the `dblclick` event triggers Alpheios functionality. If this conflicts with your site's features, you can choose a different event by including the `triggerEvents` property in the `activate` configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\n**5. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-morph-client](https://github.com/alpheios-project/morph-client) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**6. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Authentication\n\nFor tasks related to authentication and authorization, embedded lib relies on an Auth0 Lock widget. Its script must\nbe loaded by the page that integrates the embedded lib, before the script of an embedded lib itself. \nIt can be loaded from an Auth0 CDN:\n`<script src=\"https://cdn.auth0.com/js/lock/xx.yy.z/lock.js\"></script>`\nHere xx, yy, and z are major, minor, and patch versions correspondingly. see more details in \n[Lock v11 for Web](https://auth0.com/docs/libraries/lock/v11).\n\nAuthentication module also requires an Auth0 configuration file to be loaded before the embedded library script.\n\n## Outstanding Issues/Future Plans\n\n**Mobile DeviceSupport**: Currently the displays and user interface elements provided by the Alpheios Embedded Library are optimized for online use with desktop/laptop screens and keyboards. We are actively working on adding our Progressive Web Application prototype functionality to the library so that Alpheios will seamlessly transition for use on mobile devices. In the meantime, if you want to redirect users to an alternative page for use with mobile devices, you can pass the `mobileRedirectUrl` property to the `activate` function.\n\nSee also our open [issues](https://github.com/alpheios-project/embed-lib).\n\n# Pre-release Features\n\n## Protected User Data Retrieval\n\nEmbedded lib can pull user information from remote protected storage. This require user to be authenticated with Auth0.\nEmbedded lib includes functions for logging in, out, and for making user info retrieval. Use `auth.html` located in `demo`\ndirectory for testing and as an example of code to handle such functionality.\n\n**Attention:** Protected user data retrieval requires `env-embed.js` configuration file to be installed into\n`dist\\auth0` directory. In a development environment you can use `npm run auth0-env-update` command to copy\nor update this file to `dist\\auth0`.\n\n\n# Developer Instructions\n\n## Prerequisites\n\n  * Node 10.5.0 or higher\n\n## Install Dependencies\n\n```\nnpm install\n```\n\n## Build\n\n```\nnpm run test\nnpm run build\n```\n\n## Develop\n\n```\nnpm run dev\n```\n\nruns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the \ncode will be dynamically rebuilt.\n\n## Testing authentication on a local host\n\nAs localhost is not a verifiable first-party, Auth0 will require a user's approval for an app to access user\ninformation (a user consent). As a workaround for this, to simplify testing, a `hosts` file can be modified as below:\n`127.0.0.1    appname.example`\n\nAn app should be accessed then trough `appname.example`, not `localhost`.","readmeFilename":"README.md","gitHead":"f8e8952a053c71611413f75d590eb496976ba777","_id":"alpheios-embedded@3.0.0-beta.2","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-p5F2DKBnwuHVd/19jgPXB41FDmhKVVwfFELDJ6+PTUBwmDIDW9lprh3jJHaa76DllJjzH1R0vufSAUewZl2V3g==","shasum":"d7cf6a3e7509ebebd3e0d95909dc74ba0d981b8b","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.0.0-beta.2.tgz","fileCount":28,"unpackedSize":13027036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeOPxCRA9TVsSAnZWagAAU1sP/iJxdoms0iMLa7lKQ3dy\nVqeqrYhIy29gFX7IAxwfXZ2hKMTnhvQFsyJuaDhJHKISp6QlQ6OfAF1Uss9+\nMifp94of6e2YjqAcVgpa/YL7sFkFr1FHY0ZX2JXiTYs2+QeP+3DqLGwu5l8R\niV7Mc8oancN3TCCcaBWg7x0o1a26FE6PO5GcOvzkFmlA/vGAERhSOZpMx2EZ\nSeO+iIp2kk3WUXD11FL6axIEY6/NrPr0feI+JfkYMSISS/7NAp/Tm5FvzcTm\nZCgC277H0UoNplfme0PNnEyldXij/hkdREK3e+bbuEeaY6Ld1/yza0xBUkon\nzy0wRz1U5hRuBG2K1MnAXVOqmIHcr4HBk/07brUjZjqKXYkQOfQfoL8zNaa/\n/LMyqjlb+tw5UilZKTlCZmTALs4BYPMItrnPIxzQaeuCbZNvF8IQIy56AJNU\npQCHtG3/xBCGwadCG+ASnpo+Zlt63uuYZHO1Y0f2GmyETdtzzRWJoTBjdtlk\neq8bt1/YibkJ2/hi8AkkfUfKcYgJJ3N+D7PjCnJtY7pdSznxeycz45apzjhC\nmM7aI7PswljaJYyRKa/E6StSdz38Lsa4mmBWKVQiH+lPPBRon3GJlTeMk2te\nsDgP/sGtRUjiiT1iq83rCQt6eG1qAuijgKzH8+E2Q7y9yt9YjsEDuA00aqQy\noP4O\r\n=4PYe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC6TTf7b+Mrjy2FezVkZuRqGl7vqPTWAJxRvYCpFwaGRAiEAyDep4FQYYgBFZws+1f99RVJj6au2q7dMWMpkNI39G7Q="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.0.0-beta.2_1568203760971_0.3817362492311609"},"_hasShrinkwrap":false},"3.0.0-rc.2":{"name":"alpheios-embedded","version":"3.0.0-rc.2","build":"39","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v1.2.45","alpheios-node-build":"github:alpheios-project/node-build#v0.6.3","copy-webpack-plugin":"^5.0.4","coveralls":"^3.0.6","css-loader":"^3.2.0","eslint":"^6.3.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^9.2.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.6.1","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^0.23.1","url-loader":"^2.1.0","vue-loader":"^15.7.1","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.8.0"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"gitHead":"4575e4caa045abe7a4dd55e2a8a5444c1a760941","_id":"alpheios-embedded@3.0.0-rc.2","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-DSBuXIZwPVBTo70EnJ+0lAn8wcvLD7BgurxGUzIfMOsf05JmMdpiTcrjtMNIE9cX6brjVs3+lOQSqABobGSqow==","shasum":"3d438ea76311e3c3758c4a893ae5e4caea1cd90f","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.0.0-rc.2.tgz","fileCount":28,"unpackedSize":13034729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdglA0CRA9TVsSAnZWagAALhMP/1HZn+dFnymb3Dk/KjX4\nRpkryghfT96FjaHAqIiWwdjjCzBWfpZ5fXk19BzFlOIiSOyAdHedM67BrVTg\n4ICe6doqyXvYFKgsNbaLi39BXLAOpXPtlx8koISCGUK3h7d58IVOB64ZoOiN\nbh24/rLXNII+20+c9K1B1h87w5aNAWxq1z+4GAybgubQ8cFveKxcC4U3Vx01\nJhOPO1pGXqje/dPXtt0KziIbKltvqN/Qahmr57lwc21zqzjXCNuPR8PtTwRo\naXiOKF3ls1E+vpKAkrs0n0kCYSJ7ad44x7sTQAyefSeQSJjqAuh4qR/D/3/D\n4ddV50WJL2SNkQ0OhQermzNFhtFt0/HpRGZb0dAWppe6Ks2U0zC+6oKdTfKG\nMhKFL5Swkmlmyl2ChTOLAQMF+5Y2VUR8NOVTCIVXh4e7BmsMWx8n2gMjpiea\nTfs7xAt/2PfEgrzOQsnM27JNqzL+sg7oEbIjvC9SK/2w7CkbNbPtmgOWdb+8\n4FcgFNvOR/ndQOV/EwdKIgN+uny/hHoDrzONXOdv47E5gHBwMSj2SZRKZEoM\nQD02ri+Tl0mIipleiE2SKdkGf3VlXpi/dKK5cYH4UcfC5hng6fSD/rDcA4bF\njwbaS/VZ8eFP7yQHSL400tGT+riuaqxCYva8j9xRrcz42if33vDfyGA0sqlM\naHgI\r\n=6oxC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwdkAkKLUL/HmtQQgmqLeND6/QUgoh5LDQxmqUfWe3jAIgTiFw/XGi1aOZ4NtZDKROO3tFBGo4W8kPpxvGrWU+gDc="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.0.0-rc.2_1568821299700_0.622247094417888"},"_hasShrinkwrap":false},"3.1.1":{"name":"alpheios-embedded","version":"3.1.1","build":"42","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-node-build":"github:alpheios-project/node-build","copy-webpack-plugin":"^5.0.4","coveralls":"^3.0.6","css-loader":"^3.2.0","eslint":"^6.5.1","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.6.2","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^1.0.0","url-loader":"^2.1.0","vue-loader":"^15.7.1","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.8.2"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"08d677fd3d0b342c50c07db750ba5adbdfe73be5","_id":"alpheios-embedded@3.1.1","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wntAtGecPD9faR2nutZT3Rs8/5O0ehg/29ib8x04jJEqRBsm0WYpmrrd4s1HY+e9SVVyIDGCjw8z12GWT5AbfQ==","shasum":"a1b633382787bd5222d6265befa9f61d87d86e0a","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.1.tgz","fileCount":28,"unpackedSize":12870144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdle6zCRA9TVsSAnZWagAAChgP/0kvLOv+oSMluHRFebaY\n9ppp+K7Sz9KGY74XrTIBtGVyHjnR1yYbZ4Dbjx+LjEr8PneeDCsDBNtvVCp/\nYPkrJ+7t3qhr7zFRhd99cRNi90CIlLSMYimgBLQ+duSZY+hn0whgDk301zcQ\nm49QucbEmVXQuW3sAmMy2gk7Y1kVoc+pPBUp2ulm3fcmb7MrtZtraqoMY2ks\nOy0HlQpMQkJc6RsYufXTD5jn4M0D90yoXiozal/mlzCLVUrZUW7kai5vhq6x\n5xNVHjf96hVQi6uDkdL9aS1m5SMi9p8GiRHJZWEXNu0syrpV73L9UykPXHZN\nRG6rj1AAPeqWstnumnBH1S0o2zsQ70mVEhaMOYI31CHEYfIVMj5Dtu81Xaql\ntRBascyBwHVTjgMRwGPm1vPpvjzvxDG9BKkSfxjRBf0kt6TlgyGQyAuivzTK\nNMm2/s2wqC4+sOXQJx6XYKhmFkSTbb/oBeu9ZPYTCqNCVj9MLGA3+FNTHaB3\nxA/PWapef11+x65LRN9vlV9dKiTyJ7T4vXRVlqewHO4P+eKKsPgME2VyzQ+9\nTs8APdN+T3Tuc8gqj4YtCLDq8Pz5WfOZpJjptoFOBLzhjQ1mlkjRB/R6fGuE\nJ8L3Mn+27TOehjND1dX6b2HTqdOH4w+MIe8hWljdcy22tuO193qbENZT1MVq\nIV0L\r\n=aiFK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoqBXyGEecvPktjRtVoe8HisbQsl9W0/0+0kusAQQb5AiBhD9+K+qRMSFO/MGF73nKAPdLhvOKY3cIP33xQn6AkHQ=="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.1_1570107058454_0.6692018543505611"},"_hasShrinkwrap":false},"3.1.2":{"name":"alpheios-embedded","version":"3.1.2","build":"43","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v1.4.1","alpheios-node-build":"github:alpheios-project/node-build#v0.6.6","copy-webpack-plugin":"^5.0.4","coveralls":"^3.0.7","css-loader":"^3.2.0","eslint":"^6.5.1","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.6.2","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^1.0.0","url-loader":"^2.2.0","vue-loader":"^15.7.1","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.8.2"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"gitHead":"3c70323f3154f10630aa1b40d12cfbc3eb3feac1","_id":"alpheios-embedded@3.1.2","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-zBZ1Ww1TUwFElenEppVKgggdFuu085S91G+VQBXbalzMNKxI5cfCuH0sPuFwn2y/eJRKvrYZyaXlpkhgsoW+pw==","shasum":"4608e1146bbf09d6bf4ce758e720d8b2ae7ed3f5","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.2.tgz","fileCount":28,"unpackedSize":12877288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpcR+CRA9TVsSAnZWagAA2P8P/iLCWcKLa3Ulk7HaqcVY\nQR15zTBXA4iX67yshhlvsjQaCcyIZ8EVnDargDRlO0lRzrKR+lbzxce1YOhe\nnWlK3EvcXFgpDOs4dn3JMDGgjtqehH6I6Fz9YjNctAxMh3j1Rm/0+0OrXxSk\nz/tG+ChBHD4DqxjALoZ3etM/KHuWthLA3Mcq7TLScS7HF4ce204g/emcO65/\nsfveV7ZfMBTq1YHOH8nqQxq5CDC5VzyUALYFaSSzuF2wBNAR9N+yEUxwVc12\n/Vm7Vs7ACPwvPtIIBn1WJ1em3y9ixCkrqhqre4Q9soGy0QGeim5txcSkar1X\nMgie6dDj6dg7rQM7jA0RNlns0ymbCLORWJZ6vXJseKN1q3C5OT6qIg4+7uWM\nT63nCXVddeY0FU6UtL2SQhqd4QgjT1gNKWZr9sJe4CklBgGGnt3xkDsfQQ11\npOjl7Lg+TpeqtPGEwC9seS6DH0BI9QGDBtmIupcMlD6P6I8++gPWp5aVxCTp\ngxzUskBODaE9bArLPPqhfsG6mfLAQt0V2kIHX5M/NmE2Q7mKyw775m1oHHhn\nOQRcxR/nDGbYlbLi0KW79dGp2vCCNKzjYke0Pyd25LlpMXDq3oAztnCBOcoH\nzUnrKWNioynWCkIxDLoy/nfKa1SkSfeVWVCpibPsokW7reM/xGf25Gg0sR0q\nFIF+\r\n=789f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkOFE/axrDcfUESiyuLOCyM1BZXqyce2jXf/yVA8CrLAIhAMZLBO7dZENrlGmHhZqiBfPbVKShGTDo2jdzFc0Tjure"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.2_1571144829851_0.373370625943779"},"_hasShrinkwrap":false},"3.1.3":{"name":"alpheios-embedded","version":"3.1.3","build":"44","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v1.4.7","alpheios-node-build":"github:alpheios-project/node-build","copy-webpack-plugin":"^5.0.5","coveralls":"^3.0.7","css-loader":"^3.2.0","eslint":"^6.6.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.7.0","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^1.0.0","url-loader":"^2.2.0","vue-loader":"^15.7.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.9.0"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"b325134f823abcb404209e800ba5878551165b10","_id":"alpheios-embedded@3.1.3","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-dnfa7X8wP9Zn4r+D+kfFPv7HC4CbqsxrLvJ1NbORS+x6fHENXgpBVFKb0dNkAcfDTllH/PgyUJtWF6cUU2FxZQ==","shasum":"fde0d0e0db4f2d04306d5637ffec8e213391da93","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.3.tgz","fileCount":36,"unpackedSize":94437928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1BZpCRA9TVsSAnZWagAANuMP/i2Z6YBRrQwuNkVfVk+C\nNxsviBEhszZOLEGTdEnREw2UjqWVbdOCSUeVYf3bao+Z2ik1fvKLU1yPXT8X\nn7HVlzoIfECmgD6pzxbQugGhDYYwA+P63vITKY4Tjk0SpzZxxDkvzTPNF+LT\ndvXG0WvK05cHCKaFbLc1QvR3eiMDPjuu+HW1Pooa0yHMgJhqjJp6tYarKHoG\nF3SmG8AlnSYtQn/ydxRNkANHSoljfrl083zKs7Ud6uQ19jahLm8VyxO7dqXG\n+mw/0S/qXuVYeoh0j2RGO9eWZm5dmg2H/l4Nwis9/YMcVlR+vewVHvDEkZC7\nAR95pDOnGwySbHzeQ+BdIgkjnWCSfTdVtV4ShC5jM5lPOescGVqY+CJ6XSAu\nIV5h4HPAPjESZpcTFj76/PPnjBj4qUqo0dsML5chdu00roxp8KBAo/LJCo5X\nOSG5qk/3Iu6k/yMssUznmWW3wiPGmjaiZj1IjDT3Tlps5X4pbICCbiCM/cBv\nl65T7OrLgtQMWpB9YH+KSzW60tZU4f0caaVa+Zwqu4iNEtG07nmxn8lvevN6\nUvXeE+f4JyaSGAvnKE0ydoH1WrfEr2WbGmI1O8ulhMnhBPMb1dL+pZDm+k29\nyoZoagIzG1rQo/44/pwxY2611kwAeD8DgTQ6kQytRJCjpH6D/iH6Pi3ei2hl\nsplW\r\n=PdIl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFBUJDDM+C4kD4aRrUTMxnfvsisScmAZxCHBt62nExlsAiAvgq+eDDBdf4bhnAGboKu7spYTJMF0TvfDMcIIef6i2A=="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.3_1574180456649_0.669692155928511"},"_hasShrinkwrap":false},"3.1.4":{"name":"alpheios-embedded","version":"3.1.4","build":"45","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components#v1.4.7","alpheios-node-build":"github:alpheios-project/node-build","copy-webpack-plugin":"^5.0.5","coveralls":"^3.0.7","css-loader":"^3.2.0","eslint":"^6.6.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.7.0","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^1.0.0","url-loader":"^2.2.0","vue-loader":"^15.7.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.9.0"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"gitHead":"a8e128c3dcca7576d3d58621c34cbc3c604c2274","_id":"alpheios-embedded@3.1.4","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-1WjclgDr6+PD2M/aIRkSGJymUHEAV7jV9AEsm9g4xz+Si/AhIxlZNtdp12v72S38lgFW8FrNEEbzc5H/G9NjjA==","shasum":"e3636db15631a4e6bdb6b80264664c426862dfa7","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.4.tgz","fileCount":15,"unpackedSize":176980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1Bh6CRA9TVsSAnZWagAAzIgQAJiiLre4yPEeZYJ1nVyP\n58BaPKaom8X6ReRL8wqScVQfUTntTYafXM6FAGxDTs6NkK8WgV+bfcmL7VLO\nmWZ3j/wBSHLHRyFEYLNyPaNXbYPpJxKZ1nNMo9B3oYU0BwtzR3EXIvjGVmpW\nMss+O2QuYL93x2GwmDlYphdji15v6t5OJCCL/X0kZ++xY9UaxQySQN2pyMwC\nqpp9JNuc4xMMVF+2+dtB9sWWIeWlwjcEl0PZli5k1xZPbzOrVgB+HfbYRM09\niaHBVTVbgHGoo18ns+/Ed7AdxC3TMIT1Udn5i3PV+VDznHarWUq0smOwkwp0\nc9I/aLi5qNXd7Ue8Q2PS2I2cFAkVbx+1jBork0sAE2faLt2TSl1plNbwd+EH\nBUFiWyn61DGGnH0zsGJzUTSXjyCecwGghgqTFyXFPN6q5bxExoLF0zua1ZWV\nj3FvBIMS+rkDN+hroCtpJ/d3kAr14rhrhegETSNaxC5eTh0mVq28azF5dta/\nOCAolFRETWv4PCVrryIhvD65IMwfybjL6Q9n6IfxzF+NeHfK+dEQECHFjeet\nHJ5pxbkKjD3ob2wscVBassLi+XNuVfLhIZOflPxD6aYKXr8baD+SqGMXPG75\nOyu30Q0/zmgt9rv2D5y+AU+Lctwl3Ol7yylXkYTLU7JOP82QLS42SHqpYUPD\nCRCP\r\n=qCcg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEslVhzJULSa6hXoYltlGFeZoIIoy6sUpf4kJFXNNyQwAiEAvgKJXnu6jgR9iF474NIWunVXcWYk19NSYQaQFyEFDIQ="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.4_1574180986201_0.2328890620162618"},"_hasShrinkwrap":false},"3.1.5":{"name":"alpheios-embedded","version":"3.1.5","build":"46","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-node-build":"github:alpheios-project/node-build","copy-webpack-plugin":"^5.1.0","coveralls":"^3.0.9","css-loader":"^3.3.0","eslint":"^6.7.2","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.19.1","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.7.2","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^1.0.1","url-loader":"^2.3.0","vue-loader":"^15.7.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.9.0"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"bf727deea412dd15afc3ffaaf415fb0a0d8350a4","_id":"alpheios-embedded@3.1.5","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-HjAWOGHSJjtnrayLTwxaPdIDqZ2r1ioZJuB3pOfoQXO/9nF4DlyzDeSbnmhihJoc4dIOOuT/DEAICi1TCKhuaw==","shasum":"233130f5d41f54b350eb0becd259ac66367d7343","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.5.tgz","fileCount":15,"unpackedSize":176966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd764ZCRA9TVsSAnZWagAAqksP+gLoqM6nwYqW6CWUCLns\nKqkQhtf2gumUGb5vO5i2NfyC7hECq2jChqRhjFxTJNCcVjOqQMFwq8D/K2Wa\nx6bikRVGL3rqjkm53cE0nOvbNu8Yqs0DxdlMrkl253hGGEroxOf6muMGxYC/\neQtPdk0FIBJqgGyx/Ud+9mgFNdZ5WTPeSNnh7r1Bcp7Dgd7HlYdagCTLQ/me\nDakQm+imWsKw9MRZyep8cusGSp6Qr837zGJPq05UqM3QD9GbMbDqTPR0HNbI\n/Smd6lM600wKPkJTLEmDgpA8nKpesAer+UdD3TA+jteXfntVYNqnLB7cviUR\nwfMsSYvYvOQnP7R+2eZ8sZ2E6/mquv2524Nv6qtJAaJX6BfHMwBGKf+vnWdq\nm9g/qGU+KH1nNw5R/VxNoiFQOhhyuspa8DNdmGzQi8KU8mXYuoFbtm8hCQxJ\ncemCTNbikpKcIW8VJsTTf8+XSBCGUWaNs/RSo5Cgl+4iMCUr0QB8N5p+dI2n\nkqGOTY2LlzXSLL+xmQvI6S0JdJb5bp5hi4Aa3EiOBwfsfD4IJ1c8bWVWaZs+\nMm76afhVyvblvucuI15HMmmBrQfu/9pcXrfN4ynScZBOyXzi32TH0uBw1SSB\nJukmE/hVIQls5asewjdT9n7BX36fKDb+Uy1UIS0+NobhX1FFkPnW4s+oCeCR\nBVQL\r\n=zZwO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEim2I2N1vq8N2bIT5vdXp7341w8F6CEZNHaR1VPoNTZAiEAnJV50FTj6ZKGYNoJkbnC6QxhsHZDBKsG39EXMXV7wdw="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.5_1575988760554_0.7979984267450777"},"_hasShrinkwrap":false},"3.2.0-dev":{"name":"alpheios-embedded","version":"3.2.0-dev","build":"47","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-node-build":"github:alpheios-project/node-build","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.8.2","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^2.3.0","vue-loader":"^15.8.3","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.10.1"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"4ce03db4c88080f4e94c6a9566ebca425adbaedd","_id":"alpheios-embedded@3.2.0-dev","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Hf0C9s6e7beH7V+wInUMPCcKUextLg5ZGr/tFLsl5Wfm6FJRAsuLaTvP4aZYm1Eo5f3JzXUbGORdej4jsQj2kQ==","shasum":"840a9b1e6fd5ffb6982340184ae90ec9a998857a","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.2.0-dev.tgz","fileCount":15,"unpackedSize":176976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMF+WCRA9TVsSAnZWagAAkxQP/jrMfGuEcAiBlbNVpGIL\n5dkSJnR2a2aOz5Vg/sZm9tGjSPeW6hqjV0Lkakf+KvyKKvxOPn5YzDevCSn0\nwec2fHIAF+viGQRQDqy/LBrJxHb3RkjdEWHQWntJuY4I8CiWLfy8lQLqPMPr\nFMspM+1Ey3yY/ixH4Ch2ToLlQuR3eNTr8KmugSjLFoT2rMt+M11DYb6jZrh/\nvR+rkMfbF2Y223CaPG9xDsX4FRaI9s603dawYb7a27CP7ijWH+stR6n/w4Nf\nDrQzTzJh2uN2h0P78y5r2kDumB01QySIdiPN+3c2Zkm6aoIuRd8aBr/9MPLz\n3iqcWs07wlN24drEKId8Y5fY7MMQvU0vuGZoOkx82fyCr6nvD9D8yXffKusn\nzCxYY9JqLXkWScfgqFUwcXF84uzoRzsRb9OFVz3F7Udyk1wB7sL6es+Z85Z7\neLGOpQb8asMDbpThkud7iCOKcXk+4ioKZs/8S/j3blDdnvegA0xXVuLZkxua\n7HoCZjdTf5OPlY9Ye5thazBq1rxT0D64CnT+/o09JLuSC3cI+PB1PUmPrBwW\nP/DWvU7EetUin8EqnZ8mLGTuK621Wgq9xt2WZ06jLxOSAyngd53deSYTBbf8\nx6PKbO7zjexCyNKCYzaPC6WTksPpK1UCODYapeR08oVBdC5FAAuyFTsKTK+P\nh8/u\r\n=iJY2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEjQB553Ft+lmcejOX2LS2r+Qh0z8LxN+ljuL2caHP+lAiEAiil8aWV6yaf7+VUhMS6JcMFALj021ZgCW84cJUZZwPw="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.2.0-dev_1580228501818_0.504703610912884"},"_hasShrinkwrap":false},"3.1.6":{"name":"alpheios-embedded","version":"3.1.6","build":"47","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"alpheios-components":"github:alpheios-project/components","alpheios-node-build":"github:alpheios-project/node-build","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","interactjs":"^1.8.4","intl-messageformat":"^2.2.0","jest":"^24.9.0","jest-fetch-mock":"^2.1.2","onchange":"^6.1.0","raw-loader":"^3.1.0","sass-loader":"^7.3.1","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^2.3.0","vue-loader":"^15.8.3","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.12.0","webpack-dev-server":"^3.10.3"},"engines":{"node":">= 9.10.1","npm":">= 5.6.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"2048394bee6396a21e2594ebee9794f9d095a4f1","_id":"alpheios-embedded@3.1.6","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-+xHHfxBG628oRy1/APJIQQ3fWwFkLMOLWmPPGAJT7o1tbPmp2nMYmml7eRLP/Nr/FsOv0jsXOlvnO2H4gpiW/w==","shasum":"d1de2348c1c45e889eaf0bff7aaacccbe393180d","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6.tgz","fileCount":15,"unpackedSize":177850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOtKuCRA9TVsSAnZWagAA/gkP/iHwCk9KLMnh1vFhV1pT\n2vo+krh08aFsuLT9UDmL7TBLttj6w3uY8Gl2glise4AwMP8W6qOdChRg/gJh\nUyV551RTugBnND1Pfz/Vo7MOpbAkmS5FrDmeNA2hvC4vNcoZ9nfb3tQ+2ZCg\n1f7CZ8qoQ3gFk0/yLwBpwl1Vt5J0i9FWD047FgZfo/sFasCU7S06QKUgpC5J\nEJ1noxbiTFZVHlSv9rDkZNgnFzbMUuWlnHJDT4FnIciq/sux8D51UgNJI1MU\nzmEZjcZOVm/QC0ha9UgRtVVIOYYYHCcgl8EsggiqaUx7zAYAsrKBvqdIu+gC\n3pvy+UzNzmg8vueQJG9c9gp0wZtY4HEy3i9/fdsZa957W9mKYsfLnLY+f8R4\ntuJaj5SYGJFr6GkKvK2uujxKlZYCFBbHgUDy2HhMN49oNh7xLyRnO3iVCW6Y\nh9+myIsvzyROjwOPno87ZlVNE3hmOmr/FuFaOJnr1313Ju9d/N4/5IgEkpVf\nv8MPmWYnzZ7JKV0fNEdmvI3BGYxcnPOdGIGgDSSNQfZgFOW3NTICARG42/k6\nb2k95n/PExtJ1cBEZV4B4DDkaV2LUd8Oc2NL2S6UwC0I3mQf2sAm15mhDoqF\n4U4x+9b1aB03x8mZkII1JUL1BD4y1RD1hyz6kVhigZhRHCvLMIozqCsfQcok\nmWmN\r\n=CPti\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvtdgCaXq/sJMxUR9ry52UbKJGV1BTpRWyM5RLWe2ahQIgK6XBK7UYzC1yCiy2PiS9wpxrpCiy0gpZfiS2R0dGaeE="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6_1580913326094_0.5342660911673642"},"_hasShrinkwrap":false},"3.1.7":{"name":"alpheios-embedded","version":"3.1.7","build":"48","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"npm run lint && jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all production app config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs all development app config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs webpack development app config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.8.4","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/register":"^7.8.3","@babel/runtime":"^7.8.4","alpheios-core":"github:alpheios-project/alpheios-core#feat-syriac","alpheios-node-build":"github:alpheios-project/node-build#v2.0.0","archiver":"^3.1.1","babel-eslint":"^10.0.3","babel-loader":"^8.0.6","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","fibers":"^4.0.2","fs-extra":"^8.1.0","html-loader":"^0.5.5","html-loader-jest":"^0.2.1","http-server":"^0.11.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.0.0","inspectpack":"^4.3.1","interactjs":"^1.8.4","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.1","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^3.1.0","sass":"^1.25.0","sass-loader":"^8.0.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.0.0","webpack":"^4.41.6","webpack-bundle-analyzer":"^3.6.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.htmlf$":"html-loader-jest","^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"8b331f85534ef4ac44b676622914f2404ecb7f31","_id":"alpheios-embedded@3.1.7","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-rB8g4ThhCveYp/0Lz8NK8htbz2VSeKFGYqV3X9LkTE4t0hXXT0bbaXXPQrDuwcPHFRPO7k0unl7l0C7T31NfkA==","shasum":"007b4ce676ea17711d49c4f63faa18b922e3b0d9","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.7.tgz","fileCount":15,"unpackedSize":13188156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSvsECRA9TVsSAnZWagAAbtQP/iPhHs+Bj+PzG1CajRHj\n3b1953qMQzZ+jLQhURhtWsHDZGcQnaxH+PPkMUo8hDiAmnEPe/rMpuL1Fgo1\ncasUP92VsdNHND97dWBSP0/oj7yhD/n5tYKuX2FyXK2YwG59huBCFH2RKdr+\n7Xtrz6Uu6AFFqYDzAgJe1zT7F1NX7QKmNFZnTq2X+qpPXGCIxKLX2g5gr/zi\nkoEtJcJ/wSLBODcpEkzODLfKRc0h5AwX5JPEtihPzisKj7FFRBUvvcNW+4n4\ntzKlzXFZNHrg6sXf8EM0p5nMrWsCOohwLiQOzx60VNola2B996JBmtWIyULm\n8LWmVxtq7xx4i5vQJ5rUqWmFGNCoAJRKpHIsvKQxtQD+IsEjDIdcp+vLev/k\nwZdkMItJgKnLFqXInZeCn5fwrWIbJl59IyNGc+BNAAk75TSI27P/8Uf1atkM\ni3IL6L1NnBEQrXzKwr4H1YinDcSK0NGVXO4Q1i+h4AYdg9/v068At6dhOFMm\nTObkJEbzAHbarCpJ6wU0QBX5fDxO/EaYzuztxhlZTN1nbJSYgLZYIXVEjNE4\nu6bYsbU34sNhjTl1RJhnEkxrhbnm/KWyp2S4/HSkIcqd8nritncbEGFV5GLG\n0Kj3wZrQCGFx/cLoINT7TN9XmY6bD3yzRVP8wKp6KZKThsV7UJT8xz1J+tNa\nmGAP\r\n=sqV8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCw5uTAQlMH71yWWDKII8oIqec+mFIsbNC+aB5vt7FQvAIhAK5nMaZS31qjEnG7Kwy+PFkZn5OxOjf+Y7dLS6yJJVif"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.7_1581972228388_0.5718309831936841"},"_hasShrinkwrap":false},"3.1.6-dev-cd.20200305534":{"name":"alpheios-embedded","version":"3.1.6-dev-cd.20200305534","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.8.6","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/register":"^7.8.6","@babel/runtime":"^7.8.4","alpheios-core":"github:alpheios-project/alpheios-core","alpheios-node-build":"github:alpheios-project/node-build#v2","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.0.6","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.1","fibers":"^4.0.2","fs-extra":"^8.1.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.8.5","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.1","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.2","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.0.0","webpack":"^4.42.0","webpack-bundle-analyzer":"^3.6.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"79282d780f878790be167a6e9e466b164ac5912c","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-dev-cd.20200305534","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-RiEwqrG1IV97bPy/U3x7nh6bU07kVALdqYxj0v5agVJ7XeEX1xGonn2DPxp/fU8I0DFywikf8xl9dhnbPYghvQ==","shasum":"76740f9ba15660b4b56058e4669af5e7fe3be87f","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-dev-cd.20200305534.tgz","fileCount":17,"unpackedSize":13185761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYQO4CRA9TVsSAnZWagAAkXYP/0EEPFYs13npxooIp9No\n56t3K7SByHTMOK3rQi4tKpG2vFstnqNueMR62GJvJ2eeQvxX5CQXqXpmx1sA\nhO/pK7dlSn9jMf+jT7q0D161zMxYoHxY0K45Oop76kaqryotC1Rx+4IBTiP4\n+ha7PUBQjhg31whwDOQKZTzxbVs/JLnrVlRN/UQewitEjkbRZGaWvnok56pd\nor9F8kVlK2i4SA6/cu3ZgIBQsU0qNV70gX8n1Q+oH0hdr7NtgeP9dzQuzqM5\nFoKiZ8kqPSG9xjv7al4SvjT5zxQD76jDDNHWm62VriCf0WaZ9fyclUcCx28k\nI1ptzh1qJaVbSDhYZLl6am8+2nAbF8sG4eQ6uehN/FnbVwgNIk1pQWB+EY+q\nZzfQS4YFJ7Yctx65Ebd9UIG5ApQ81xvW/U0aYukfxw8YZOQtkyYtKLTzXkd1\nUU1lpCpMjtWqgn5kYRyJ3WfN85u1xVQlFum94k4Ei1Uz6YqqzmzNMwwGhcGh\n4uFMYE13CVSgOI1IBCF+cHgED/eFPIG6TiN32zQrmbOG4YgZ39X8OnoaTFFH\nh579ck0x/gdKjov+76bDqZXeo/UHwyL8UZG3AzPrbXwsi+KdHqK/tE2YmxiB\niToCdpb2JLE7h48h0IBYiu4haIbpUSoIrdF/Gvy+K9gnB1Mu0utc3zK3wFfD\n+wzq\r\n=ozRX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1nL47aIC4+g+0Wd0GYYL57Zxu2V3LdjZ71c1QRRHUSAiEAkMfLinNOLh/sHdK9qGkkRWDK2zP7SFF/mzxdeqfF6rA="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-dev-cd.20200305534_1583416247412_0.0016780492954726611"},"_hasShrinkwrap":false},"3.1.6-dev-cd.20200305545":{"name":"alpheios-embedded","version":"3.1.6-dev-cd.20200305545","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.8.6","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/register":"^7.8.6","@babel/runtime":"^7.8.4","alpheios-core":"github:alpheios-project/alpheios-core","alpheios-node-build":"github:alpheios-project/node-build#v2","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.0.6","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.1","fibers":"^4.0.2","fs-extra":"^8.1.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.8.5","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.1","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.2","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.0.0","webpack":"^4.42.0","webpack-bundle-analyzer":"^3.6.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"0a7380f763e447f67d87a74823b8189def0793b0","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-dev-cd.20200305545","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-PzQ432uOZzTPpLqt20AytSrSoRORphWI8Ze75UX1PE5KUOPrml7hu/wC6+WSkr6Qo2zY9RFLTH0TEpwl+KzR+w==","shasum":"438ba9efc36eccf112ca44e061c2046a535eef42","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-dev-cd.20200305545.tgz","fileCount":17,"unpackedSize":13185794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYQkBCRA9TVsSAnZWagAAN0oQAKG8VDjr7AV/uFgJjE32\nQpR62Ezpt8JS6/2kkirm3eIhykSvLQBR7GMzHmXWUmnwUtEjTfZOC0hI25qQ\n8d/5b7Un2oQpRwVWSbiu+WmF+U5a5B/5ab20+3j9BFcyO9IBFv0gq5uEHs04\n5/sNxJfwvDgDpcbz4Sjo9mnt8SEq/IIkFBU2P83dRa8YNmFeqhRCtQv3Pa7Q\nMIcwuLAnzb7iIyf8KEpeVr8WsaTGJqm7iojPCGpz0F1vdbuqV14dmAooA75g\nssRxaUnYT+RYOQBmsUVgKHUPlEO+IQEzRiwCOCIFbT+BfXRkR+sVxmk/m/z8\nE8aWaTbEgoo1K7BoavoISi5jwoazlgpPyLhvYADVxbPWAJ1SfU9J+MWGCvUR\nmdKSKobehUuHUO4zPPz6JE3g/HJd1Q6a8oILxR4PqqnvBqu9VmZfQ55z7KqZ\nOgI3ODGIXY7+9A6VDztLGrFzTd2yyHI5WAqxbkzyFK5XkU4Y5fnYL5Z4XPVp\n7V2fmaoY6+1pQZOq8N942BRKHLXpjB1kzDSwdTDaS8g7swb9ByPunV2lanfX\nG09TWeBy9kf0CZU/uDhmBfIegXVqsEDLtz0orv8G5YGpEvyd7qPOH1KLIyqd\nsMPjGlm0GQ7t+2/yFptgcgReO1hVmuxrhSZyRhBLZ/QbaX+TM6avewLdZMcK\nol+R\r\n=L/0d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBP0ucs4MsclW8yHVs1Vk+TiwYTs2Zjj/G9eicfJDW75AiEAlYu4TGcIvc2dm4KTJmd4dE0RZZdHzUmdgAjjuTDsQis="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-dev-cd.20200305545_1583417600850_0.16271677807795903"},"_hasShrinkwrap":false},"3.1.6-qa.20200305332":{"name":"alpheios-embedded","version":"3.1.6-qa.20200305332","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.8.6","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/register":"^7.8.6","@babel/runtime":"^7.8.4","alpheios-core":"github:alpheios-project/alpheios-core","alpheios-node-build":"github:alpheios-project/node-build#v2","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.0.6","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.1","fibers":"^4.0.2","fs-extra":"^8.1.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.8.5","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.1","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.2","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.0.0","webpack":"^4.42.0","webpack-bundle-analyzer":"^3.6.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"bd4e6ee200207e27fa5f5e2aac42df9e309c3915","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200305332","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-hI4jQtAdi8FwxEFuzQl6fbRogcwtVOmvN8pIcQX6yelpR2cXPYnc385Ef/OmlvyegfyFjAFRWdZSnI0PvKlYhA==","shasum":"daf85cab53d17715ae4f2791a90350b8ebe99f31","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200305332.tgz","fileCount":17,"unpackedSize":12955385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYSOMCRA9TVsSAnZWagAA+JwP/2+5bOzAdW90XUzHnlEo\n6KA2pa+MHyZiulprQldwRUCAOR+9cxjqHsyfvvJAPggrHrB1CVX8mx57eBwx\nZzommOnr0k3N0AtriJ/OSgIwJRBuvmv1ZgUAPdpG9m8Udp+3uqrWt3cdNOJN\nJd8mLHNIGgMlzxEAIzH8HFmiaRtrzOpFX/ifRVjLY5u9/SjGjC6uSGV222Le\nLZKZItFq0BiWC/TbLszM6dqNVaKCcoUUbdbAxQeVwB1anLYLSkCjByMjm/GO\nFS+rNquv8SztLHQ4XwCaggHpIDKLLo2ynEOPYCrIHakxRSh0S2XO5HdBVojr\nI64Lv/gE2hwCOjpaDc8qOUbzCLlmV8cnhs87O1tx9Cjt95IkRTIdhtb9nFGJ\nmsRj73gS94D53AYkoPP21Jo8mY9e44LELJnOLImQ3lcaRlLwrCvvhTE7PLDp\nPyIyne3+PsCJG/rNjeQwrJvVTW9T+uBzeufAVeCV0lOvmgTGySt7LInh6t3i\nYroPajiBqCWdm/pygjIZGBZXNcPrZY8qSCRBMq14MjhP0SsPyoAj4eESAHM/\nRWIpuZRfEVgvOtvyNeUSjtMK61rf16x1HatpsauY9dfwhS3hJb/CSxi0FDB5\nrBxWFwKK7+2yR604E9Hk/boVpAsb6yi6f5mqOgk9khUpAWv4bNOqcEhIaGNb\ngZy8\r\n=njY3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb2vXh9iONto2juEj3YS4/qOE7y5+ZUXcAUzCIcsFI5gIgK8MNyHBqzNeJ7MirO1BMGt1OO/nqGl8zaqMc08jdVKw="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200305332_1583424395648_0.21568347087183692"},"_hasShrinkwrap":false},"3.1.6-qa.20200305423":{"name":"alpheios-embedded","version":"3.1.6-qa.20200305423","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"echo No tests","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.8.6","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/register":"^7.8.6","@babel/runtime":"^7.8.4","alpheios-components":"qa","alpheios-node-build":"github:alpheios-project/node-build#v2","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.0.6","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.1","fibers":"^4.0.2","fs-extra":"^8.1.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.8.5","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.1","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.2","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.0.0","webpack":"^4.42.0","webpack-bundle-analyzer":"^3.6.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"e77e1ac08c1c42ad0615ba22c61a05ee15fe5f83","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200305423","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-TiXnT3+tmEa/tVNLoDHOTza99Of6CqsWSg9xNp9uwN/+O/sE70J8umDpzogAnbAPvYekwPO2QaKTkkXE84pi+w==","shasum":"4e164afd7ae1a8019ba85477abe7a0f4323d7199","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200305423.tgz","fileCount":17,"unpackedSize":12955313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYU4ZCRA9TVsSAnZWagAAxFQP/0sTrhzH24Pe6OlMHdXZ\nzotzEbAU1DwQjNYx8GqZFFsm+3/RGZz0GiJfW0x7/XrVDX4916Mdid0RJR4E\nasHLZGiDbzy5cz8Z+Ngii9fXwmIzRwnotBeMBH1KzcUOoYjm8ei+gLceZSB0\nLTVTA9qKfVRDv5p7vJBItdNSDnQF5mvdF9UCPSuK2z1qqEYOshWlsToB/yWJ\nfhXStaQgYLVRdAxY4bSHkJ4y70g4XgDIgqcbWIpGlxGtmnEY8/ib+wA8XutK\nPUBZVrqES73eFIC9fP1FlD6lWl2nhoOluIiLu2ftWmiEOqiNSa60PN0+81uM\n+smoDjDcsNwlNvdLclvZZ3B+eSiX2Dkw/Yp+jQmJ4JNJ13MJx5lCpCNEjuvi\n428K7iLs/dBCQ2JSLHI5fSrh0z18bf0oTqrnZdpwtqF8BD96+hoT+NIHNLQT\nkWJwb4oPxRVSqWyRDhX6o6y0F4xbnfxv+zv0T3yBVYSVn4F5RKIdcDH9Mk63\npOL4NkQVu2fkhJVWIt4bq5kswOZLjgtzvIrAUflRgQazhXy4gpCPpfzW6HYz\n60D5hgCi33HU7Dty1DScOT+1D77m01BN8zn8LskjexxATFXr1O1PED8SKuJu\nuIrltqxjDL07mUOQ/51jQkaLImbBa4Bh4ZcVi3t4E7zFPLgeCfA3L0KkReFv\nLs2P\r\n=6V5z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHRW+MaqiIK4h+fWs1cjcRlGmO/vvnuFvU2O119I21U7AiEA3IPneS5ICAUqNl+u/N3Z5MEYatJm/xaD/B+C69DPok8="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200305423_1583435288468_0.5817845028429633"},"_hasShrinkwrap":false},"3.1.6-qa.20200309403":{"name":"alpheios-embedded","version":"3.1.6-qa.20200309403","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"echo No tests","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.8.6","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/register":"^7.8.6","@babel/runtime":"^7.8.4","alpheios-components":"qa","alpheios-node-build":"github:alpheios-project/node-build#v2","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.0.6","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.1","fibers":"^4.0.2","fs-extra":"^8.1.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.8.5","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.1","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.2","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.0.0","webpack":"^4.42.0","webpack-bundle-analyzer":"^3.6.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{"alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"badd282bffe9148ee2fee5bd306240837bc5e54d","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200309403","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-/CC0jMNkCg7XCtq6u3JMEo/mRby2mH98urbL1Xg9YGnKKjztby8NXb5NHxSEZRj7uune4llRNtDQQmrvGjFC4A==","shasum":"0d1dc782589e05bee2c631dfeccbbd5b0c9ed60e","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200309403.tgz","fileCount":17,"unpackedSize":12955566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZo2lCRA9TVsSAnZWagAAsKEQAI71eoVO07fY5QHhMaQ/\nwJEE40A4ESdN3K56dv2atsbXuKgHcx6pK/tBYXaPMqsgUh4yrB9EjOeWQoE0\nZD9fzF1a2zLGnYJDRBxUMta6NhMv1CRlj0bpld7zPvf1+UH5YRrvbx32aUjL\n3nfPCGakDX/S4A5xK8nUJrWsv4cR/0G0bJ4HO/c/l9lWaZyJlQv5T8KESKpP\n7QKze3aJF4sk4aM/TKQw0ZnTLmI7ysH+HvDJt+awiAhopqY3yhCQyn4u2GZS\nmm1K0w7Xcn5TtatOo0Bh3BMZsNcjosKHdXurCa6CktgSFQxb0bFb1lOw4DJp\nFT562cOPb4z1c1fSUTWUaAltNbpczm6web+n1Z9+opuR2G/CZRqguiQsfubn\nRC2s4tjv6QgsEzyVSZTthTpNrfSk1bMMz2MRm6Z0wYrYW61hcRA2dDcaji9D\n5+2FJl8fcKNmizfVPVdUms3P2fANVCSfORUluZ/OgpYE4gKFLi4diOEYDCy6\ngLFvb6b41d1EpVDOupDsmDS3iqbwjrkc6W6Oq8hCiGoovgpIBZlODDEOuKeR\nyZVVPLvTiSTdGYl03GzJgcNKmyUYV66V9mHpsnEENuBQzxiUMpu/z3aPLZi2\nLewyjH2bgL/KbuLpJD5RA1gJYWJDxIGxQcAHXBFJFmvJjTN7gUIe2Bt6vnmr\nxQCl\r\n=tTju\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGhJoPWoyr6wvy79gBzscxvRFtciJlmh5QTN2PVxB/t9AiEAyx752FXdh+jfIERIVZG3uCg20KhgmQQW+7FrzrZjdXA="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200309403_1583779236585_0.42976333878710915"},"_hasShrinkwrap":false},"3.1.6-qa.20200309439":{"name":"alpheios-embedded","version":"3.1.6-qa.20200309439","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/register":"^7.8.6","@babel/runtime":"^7.8.7","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#v2","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.0.6","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.9","css-loader":"^3.4.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^4.0.2","fs-extra":"^8.1.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.9.0","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.2","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.2","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.0","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.0.0","webpack":"^4.42.0","webpack-bundle-analyzer":"^3.6.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"1263d6d77699ae4d13675cc1c359e31d971e2e5a","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200309439","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-OzOoN6HnEwOokek9vfJKT27IXNHgIqRuimUgb3h3QL/XfbXkQ0gMMBq4nlO1HoFSmvaty36LOpbyK8pAEGkrXQ==","shasum":"19a50f735118488c2ca2cc76d24ba6cb792bd803","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200309439.tgz","fileCount":15,"unpackedSize":136136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZo24CRA9TVsSAnZWagAAFIYP/0CTyawM1KZKCEnh5C3s\nMq4hnt4hjKy4wUxP58hQmJG+UzCYi/8uCCuZN59OYxn3ViwVOWM+lxTHMng5\nMi/HWPL0mThLJC2zIBTXod7PJrQz5QwCVHTCZL77ttp32YFeK9SWVuEOEOfA\n58p37XUg29de/0RcGq0OGqCTqrx6I+KpesIiTJANaT8lRznI1nN24jQYcICU\nVh/+ybkaPc5TOZiss1bAib8/eJrHIKnh6JHawQqjnOcIuZw10yKHhJOzBg2F\nIdOSH9wB/DoGms1rhHYKb3WpiF8pI7xBfTuqtdbKZFtauMYmOIOH+8Ql6l6M\n/tf0LE1w+Bufvbrn5CXxVvbm4zMiRgCSi5obLxVOckHX5JdGWdO0Xoymi5RN\ndVZE3Ub8KnIItA8sm9fysQc3oJNf3j4tL1sF+zhz9wEb/49gPAKnd8z5ckxy\nXHJx74d8zbTsQPg8ZIVGXlEOmQxELmtJtPZSLK5WLv2nH9AJWudIHhKTiiPX\nD0uOwSXvN0V3lYJUxo3DcjJNQuP9+vRqjzJtwDBAiN4em/HC2Ye3M3J6UDc7\nrbc/M3TCx6lmEybxM/gDt/btu+bfyZyplqSbhk1/BDdGRF4JDxEdkfib6nMp\nkrz8GLLpgWXvUEElsOwuMyyL5bTK/JKGRdJWXpnfQ0hi9XT4yRsTdNrSxeOU\noJrn\r\n=MRzc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVJQbOfDmOlMtRrERlXjNV4fS79IOlGd2emnuhEU654AiEA6B3sPCUnQLitL0t276qvItZPjtqF83fGKfJiLELDK0c="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200309439_1583779255629_0.132651309014006"},"_hasShrinkwrap":false},"3.1.6-qa.20200320372":{"name":"alpheios-embedded","version":"3.1.6-qa.20200320372","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.9.0","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/plugin-transform-modules-commonjs":"^7.9.0","@babel/plugin-transform-runtime":"^7.9.0","@babel/preset-env":"^7.9.0","@babel/register":"^7.9.0","@babel/runtime":"^7.9.0","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#v2","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^3.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.4.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^4.0.2","fs-extra":"^8.1.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.9.7","intl-messageformat":"^2.2.0","jest":"^25.1.0","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.3","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^3.0.0","vue-loader":"^15.9.1","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.42.0","webpack-bundle-analyzer":"^3.6.1","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"6b8f5247a75dc1971117d1a3a679923a05311cb3","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200320372","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-L56Y3ZqS0WmWQKRjW+02WBWk5I82NvvrBC2esEnPyt76AvnQ63qYmGRw6kZMvhCI8IP1lDMRg+USPXCxtPDAoQ==","shasum":"1d9fd2839bdc27023b8b6f48c5731a625758e35c","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200320372.tgz","fileCount":15,"unpackedSize":136138,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedO+BCRA9TVsSAnZWagAAz8kP/A0FW8rJWpf0aT7mvwWd\n0N2f8/c83IfwPjEegR0M4cBsm4LvdkPpR4vkhAw/lLjn50XtDFx3c0c0dBJU\ndKjbAHXkh0y8hoW3YvOyAysKiJSzXoiHw6ga/aCx0FkhGAUVhuc4+klUVIun\neV5jrnTG4yfoBw17Y0B464ymzJ5drbBVwDi5uTA0casTWd9iyAxebH9oVKC3\nwqhc8cbGzAm7UUUEzX/twtHNvDbHSaboSS+Jhv/h6T0eKxww/q+JQS3igIw4\nTTFCQXWeYJM9yWo/N5LDD9RK+IqnJBTADeiEfxghS3wi9vLoGDGI/0EtfABE\nE7aIOLzqUD7qdABH+Bd3OysFBtNN8SP3Oot6AJrOKmKSD2I4f4NvjxC0dEwe\nYY1HClAcu8UzGE42ubxOGNR8pUuvp75BEOziNWYPCpiLDZlTa6taTSd/cUEw\n7AETN22j5+nVWknWQs9RO7ZpkyIBWqhIkg9IOfsdM4oHuo9yxiRsHHdUAPvX\nUov2mvHtVBh/Cz2hqkyTqoSX/Wkwifiv3zvoc3cZ7ILspdMf3BZuAWOnqugc\nVoyk9DFbICl/IIbAsdxdSdIBr6ifjO1F2a3Lxf2XkW53TF+RISshhihshLZL\newi6qgYrKVJ+HYZrHwUhQeSYrgkbdel+qrhrmrms5FnDbntD/2zkfblYH71m\nTHZ8\r\n=cder\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+ZH0TXaPtJcABY8gASokVIUFbx5o1wSrXiVZlY7/rYAiEAtFGTME0FLZY0E97VtYd9hBOUyJpObM0snDFZktxd8Kk="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200320372_1584721792582_0.2917925193524018"},"_hasShrinkwrap":false},"3.1.6-qa.20200410472":{"name":"alpheios-embedded","version":"3.1.6-qa.20200410472","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.9.0","@babel/plugin-proposal-object-rest-spread":"^7.9.5","@babel/plugin-transform-modules-commonjs":"^7.9.0","@babel/plugin-transform-runtime":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/register":"^7.9.0","@babel/runtime":"^7.9.2","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#v3","archiver":"^3.1.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.0","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.5.2","cz-conventional-changelog":"^3.1.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^4.0.2","fs-extra":"^9.0.0","git-branch":"^2.0.1","http-server":"^0.12.1","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.9.9","intl-messageformat":"^2.2.0","jest":"^25.3.0","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.3","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.1","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.42.1","webpack-bundle-analyzer":"^3.6.1","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.10.3","webpack-merge":"^4.2.2"},"engines":{"node":">= 13.2.0","npm":">= 6.9.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"d8bc6baea409a6b4338f04d642298425156b180a","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200410472","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-FsS6PEDzrVjru4VP55gDPFiJT4ngTHV7Gbfbnorxkc7oiydy2bx1nAaCPUspZ/N8BRfnXmE2HyalXrEzjyM5Cw==","shasum":"2afd686275d5cdb4fae8cf9298c4698a60b634ce","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200410472.tgz","fileCount":15,"unpackedSize":136907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekM0wCRA9TVsSAnZWagAAVtQP/i2Swoa3dMViXN13J9Zp\nZgRDiVeUWhxMdKSB+D2wgMoGdCGw7TDDKXvZedXagclZrjv2JBNj3uDs+aV+\nabSI4B+tmbZsbUDoMlaYW2m4z7AE11u60B4B6+MX7rSbm3KFIKzx4zZPSHNc\nfGqe2ZSsDESx1g28+P0MLDK4UOy9q/MrSrlvjwWdO3q0Xw4AjrFZfuaZxfxP\nr7pmC/PEmIyjuXa0V2nrCIeeR5Qziy0MZRgWW362v6wcdCvWlm5HAxMDUV0o\n/kWxlwUsWxbNQSSUTW4WJrnqoZ66iViQ9QrEfUVJitxrecE9F/UhggiQrNTz\nYc1PXyCfobMReDwG9RbpJKxpTgd0qYhDIT+6UoQihtOK7x8zm0vH5h/kw3zg\nm0rXOrPK5SXtPwq5X0QypnidmvqxEOtSWyqT5DGXPZbzCUgIBtDYzgJ32crM\nLpNMiSJ5UfmDEPQtz3XsniDRLnz4x7fhgHP3E0CU3sX7ZsDmgbJAR8D3sEcM\nSK56LoYgyjx7/35LD5ywpiBPOeqHIjLfmwFVTuRiPcr+3bWjoCKYbpDeBXCJ\nnqJi/OD/u7mTnXrHDBAAivHTjV29A8Vkh9QQ04kFHKOjQ0KDP2nCKhG6H3ir\n1Kk91RltiYSKB5E6VWawDFEpzrxbcOMG83WxP/rW9tONjGktrG2RE/ts0b9J\nALq1\r\n=TyZm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAM3pwI/7fyL7hrOZ3hmrwTp0pU4KuJpbhcJ0i55HHgAIgLbBcK670iJvU9Rkcix5MDsFUZeQ8VcxsFMWP/i3C/k4="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200410472_1586548016439_0.7152149544802373"},"_hasShrinkwrap":false},"3.1.6-qa.20200514440":{"name":"alpheios-embedded","version":"3.1.6-qa.20200514440","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.9.6","@babel/plugin-proposal-object-rest-spread":"^7.9.5","@babel/plugin-transform-modules-commonjs":"^7.9.6","@babel/plugin-transform-runtime":"^7.9.6","@babel/preset-env":"^7.9.6","@babel/register":"^7.9.0","@babel/runtime":"^7.9.2","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.2.0","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.5.3","cz-conventional-changelog":"^3.1.0","eslint":"^7.0.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.4.0","interactjs":"^1.9.9","intl-messageformat":"^2.2.0","jest":"^26.0.1","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.0.0","raw-loader":"^4.0.0","sass":"^1.26.5","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.7.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"058e8b46a70e261174f4426d7b6c621cb72b0009","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200514440","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-9QtmGeWDz/zoawe8JKGyh9Yu/rQZOhv3Y5nGzz/5PLMzFImbnx1qf9uHOa+dBqZobplqS2y7hmt1TM1lEFapJA==","shasum":"0a407ae5bb895cdbb537372e83b2940faf8861bd","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200514440.tgz","fileCount":15,"unpackedSize":137049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevZJ3CRA9TVsSAnZWagAAx14QAIljy9ETdkFGR4Imf77/\nJ8oG/ShJxAzMlkaaaEjVuCxsp1BmdftN7EYFpZncADC8qc44mXn+KweIPBRE\nnFDiVOSjA/Jk4RM4vtZqRUzgIe5KTx2OnWdyh8G6LI26nvQQ9durUS+9AxLR\niWnsp1UD1de1Hoyna5TBrEI/wEj4a0CeJKoDh3akO9TjLywBXfxIMx3UKGR0\n/rSLo0dI+E7jn+XuLSIRhF6KkYTy067J3UO8VHLKWDCt4XNm/4tbk4hnFJTt\npL9P4FGgdwfVZu/x2qycEKVFw9z4FT+aNoaDGQpiBIZZ8yhAdPLihlOWS9lB\nhuEH+Lip+00vT2Mt7a6D4JuQlgz1b2D4TiSh/MoWxnr4ryVd0K9+YM/O2Y/4\nUo4lBHbNilPz3TTb7Qa8oOW7VDarcXjrpRNOdjj8DXmkdE4eqKTVUezLeQEh\nP0Y8AHoymMjNMuVu3y3ERQazXsJKnl29QtLWHhekA6vq3vR+iICc54zzpDvf\nUpAtMJrdTDhMQrp8KbKvcfgrHlAGYPZCqOIoLqLedNEwuh9HzUxdhr0PjP5b\n86mOgsXQj57XiuQnZN+rN8ZZ4l0/zylr/JgL3DSZ48yduE80x7Kwu+kNRONi\nvLQCXtryIdjhO8mxispNVwjkAL+OKj8T8bblWeSVGPfylPAlQ20IchV2zrtC\nUW3u\r\n=sxmB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn1o0113wOb8C0Q5kS6vLg1MhQl8Im4APivYA5BaS/ugIhAKM8i/EAPkvdofjGb/9Cda/md1/+MMlUSbqxPqjOfE2W"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200514440_1589482103050_0.08291351097296373"},"_hasShrinkwrap":false},"3.1.6-qa.20200527420":{"name":"alpheios-embedded","version":"3.1.6-qa.20200527420","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.10.0","@babel/plugin-proposal-object-rest-spread":"^7.10.0","@babel/plugin-transform-modules-commonjs":"^7.9.6","@babel/plugin-transform-runtime":"^7.10.0","@babel/preset-env":"^7.10.0","@babel/register":"^7.9.0","@babel/runtime":"^7.10.0","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.2.0","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.0.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.5.3","cz-conventional-changelog":"^3.1.0","eslint":"^7.1.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.5.2","interactjs":"^1.9.18","intl-messageformat":"^2.2.0","jest":"^26.0.1","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.5","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"896b06f43e9d2da9ecf72b0514fe9fd008a064b2","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.1.6-qa.20200527420","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-Z/ZS5GT1WQpxBquq/GRoXXGZeYTrJuNaxnT8Qv3umU8lANQC5eMmM8cT78PnAWQMNvh18B0/DsN8XEgOUGlA5A==","shasum":"84dcad8300091f4549a290893d9266ff26870679","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.1.6-qa.20200527420.tgz","fileCount":15,"unpackedSize":138821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezqy5CRA9TVsSAnZWagAAsRcQAJsXhCwzD8JE2vj62XlJ\ngZEcVUqEZqHg4H/2mMJz3+uHnCEI0XElx99edei1vUhAR6OEW+5IDnXyqIk2\nUECUwqkhKAMfWcYYZ/EZcGy0FC8QV7Da6blt0hX0Ky6RmELvV8D3gvQ7SwyC\n3cBUglkKNIUHHUHD++BmRCk34Ek+7LCi6CUT1sbyZySb9Hqm6VIC9raNsTTi\nXXv0lHhkNInumz4Nky+Av5vJ2FRK9qREQwPsgEUEit44zp5T5JEhS3S3lAQd\nr2BGc/UvSQtS8dMaiVWmaiGz5ocpVgUa7AA3NX7eECGMGp8NfSeS0LyfJjQm\n/RQ8oWgbEGoBoxWueQOcZKRP7YDroUkSDFpYkWJbBbr6GV/+SsakrbtHH/JQ\ngqU0NXx5CcxBlZDNnxS1Haggk2tSf6ztJqkvmSjHfUZhhY6l/1jSwvCm4oNf\nVDW1oMjx/rCOcWqogdRNE2JKugWoleiaNPX2cZREU6h819ehlJj98iyJk4EE\nQTtp9zM049CyBlq1grNwpQ4LOB0yJ0CYjpE+y/NVK3E0uL0cwxafbc6DpSnZ\nvIJiM1q2mwkrF1Asw2WP9doNaBsO+b7xCOuBN/PYQbtjSRGlX7KEsXk6yxxu\nf81f9IBrpjk9mJzM7MDN8Jvcghz10Dxq3j42Zy4beCpWCDLkQ/jBOLLETqI5\nj2zE\r\n=FgF0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkog2nRc9egK1mFnceuMtX/fU4HLAfN3QLann7qoSHqAIhAInrYxu2+V+E3BDKNWdti9Jp/Bgu8ECmva9zccpHpe1K"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.1.6-qa.20200527420_1590602937207_0.710762671215436"},"_hasShrinkwrap":false},"3.3.0-20200609524":{"name":"alpheios-embedded","version":"3.3.0-20200609524","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.10.2","@babel/plugin-proposal-object-rest-spread":"^7.10.1","@babel/plugin-transform-modules-commonjs":"^7.10.1","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@babel/runtime":"^7.10.2","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#production","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.2.0","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.5.3","cz-conventional-changelog":"^3.1.0","eslint":"^7.2.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.21.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","intl-messageformat":"^2.2.0","jest":"^26.0.1","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.8","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"62befecbad89147503a9b13cac43fd7349a71147","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.3.0-20200609524","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-KYgHO/N5jBVmMlsfGCvkyuFfnxTG3NF1zGCgsI22HZHlqkl6uml8lAa1/9VLOkcClmFViVfsst3w0CeUWRMtbg==","shasum":"3510800c6f14068ed2bba8b4506399eb1e9ad94f","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-20200609524.tgz","fileCount":16,"unpackedSize":138934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3/9VCRA9TVsSAnZWagAAf/IQAJGRdQyoQOXiIJUQYkgG\nmdguuZuawrx/tEFUB8NuobfLn7AvgIE0wJGzueyvw0fxvkmMUezE5r7EKd1r\nOacw7vof4ZjSIAczyLqWJbHX1m7xmJdC+Cm8rgGjsXrzArNsAuXCb4iDylKn\nM7ArrAnSPFSZMDg6B9MHMie2XJ9PEMgeLnU47xMNAJEJgxlH9bp4XaN2Ta29\nOPqeQEzcAzkJ3rlsIJ9nHXrpVG9/3x/0QOs15RQVWC6ePnVTQEyjCe/4XE54\nXzxZcTjlSRIqajlk3O0vxeyW/+IONa4cp8NwcLTaKuHXHPZsn1AXkcdrnZu9\nQqKygpkVU5Otz359kwUNXLpzE4cdnbgL6Zt0XBlo7d05WEopsSLVntL1pDAT\nYP17rXnol/mO2jiUoZeaZqNG/pChOvO3CZ63r9uu8DB5U456hdr5hUVxlSaN\nmN1fI0YjT7XQiHX1K8bh9dHiqx565d20DhHKfUG7XY/RjWaBrBW2j1X5SXuu\n5Yzwaw5acdSfNXY4Zi5WI3ev74cvYfPlOOr++Bsp7CPJ+AIEA4s1+YUU1nzw\n9zvagH/5sogoWGmPKKmBSX/djRTlZJjfgBIU9Fe97oJLPf/XJZk8/XAXmCxP\nS82kbGtFHazL1luu+7Q7zxeBDnPHhOEeKEkaO9SqrfAbzcbEJNBJu01vD7Ft\nD7Xp\r\n=k3uf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFk5aPlms8FCHcaTvZGlHB9SjE2qlDUgbe2GtV9PG/svAiEAnV0hpDvMwd3UI6EJI9dKuP+InoS9YMAArRopoYjrT7g="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-20200609524_1591738196983_0.7239391625007301"},"_hasShrinkwrap":false},"3.3.0-20200609574":{"name":"alpheios-embedded","version":"3.3.0-20200609574","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.10.2","@babel/plugin-proposal-object-rest-spread":"^7.10.1","@babel/plugin-transform-modules-commonjs":"^7.10.1","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@babel/runtime":"^7.10.2","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#production","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.2.0","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.5.3","cz-conventional-changelog":"^3.1.0","eslint":"^7.2.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.21.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","intl-messageformat":"^2.2.0","jest":"^26.0.1","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.8","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"95e3cb7349dac31a18a79fadf0cb4e4015e6c043","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.3.0-20200609574","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-D7SSfd4nP4x4XhNQ/HM97dzYmtDfzedUe/FWSrOc020O/mMcos3Ipo8EXAwhuvwGdg0rYWoEc+A5DqZ8o0MSqA==","shasum":"2c6dcd66c812dc82e9dda70fa98fb9caadcd39fd","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-20200609574.tgz","fileCount":16,"unpackedSize":138934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe69KmCRA9TVsSAnZWagAAuMYP/ApfcRl43NuvMeMDymwl\nMz7uWroG6ty9bammTbJgrOYQT6962N6DYm51GWXH5CDIYb/EkbpaqO+GcZ7H\nnvWDsx6MojUa0dSSv+pAnXWUd53dPQp7r5jTf32yfv4TkHRmHu5CbO9pCOOj\nb5mrNSInSFEICNA/FOV6G2AfRxFIQn1xnmbks+ElbSNonXjUHZaj5nciQ+JN\n1l3kWZACYxSeUfSYQTiTv2NvYO1wrIKjMlFw4nw/717u9PpH4f+0GWgscOAD\niijnMzm9amEkyXPJwz13nUJeCr5pexN2zll+rYsJjw1b7b2V2B3+UIx2kGuy\n6I6biYC3p9j9SAB2knhDKN4EzNIDBkTD3QCswhBikKlWRWt08ewxVPsS+k6h\nzi3nc+64IcFc0PW7OvjcrbiJdT02rl7ixj+dc7i6QSxV6BJFTQdEjOPRrzMR\nlNtr4k+DWbqgygBNjUsbgnLYYjaJtinSfAHmNw7354bBSuYjGwUfmmWXPTdA\nOvApHZC+myIEFOBQmIz8o/jTkTqwQebu6Vc8p/ViHKWUVsKsrYvXReuJCMli\nu/wW98DA7Am0IZo2VRGN5FvOhTjTdqtr5GNpRNHjRdxqZdVAQ5KOy7bpwkBI\nFl+KvihP05zfUhqvtUlTTzwt4bU1Ib54T4olS4RtBg+BmiInmPDxrJPu3a/e\n9zIs\r\n=PSTN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAylduZv9siKke0DE6x9he2dejQm0xb2Z0nWm14eYNbtAiB808oOfQnai6nfRD6o8rxmAUVk1iOaVIW9uqIN17tiRw=="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-20200609574_1592513190094_0.06717571537873823"},"_hasShrinkwrap":false},"3.3.0-qa.20200618500":{"name":"alpheios-embedded","version":"3.3.0-qa.20200618500","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.10.2","@babel/plugin-proposal-object-rest-spread":"^7.10.1","@babel/plugin-transform-modules-commonjs":"^7.10.1","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@babel/runtime":"^7.10.2","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.2.0","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.6.0","cz-conventional-changelog":"^3.1.0","eslint":"^7.2.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.21.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","intl-messageformat":"^2.2.0","jest":"^26.0.1","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.8","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"d95e983a78b10c93a526f9910c4078850bfe4f60","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data using the [Arethusa Treebank Viewer](https://alpheios.net/pages/tools/#alpheios-treebank-editor) and/or use the treebank data to disambiguate morphological parser results.\n\nPrerequisites:\n\n* Treebank data which:\n    * Has been aligned to your text at the word and sentence level\n    * Adheres to the [Perseus/Alpheios Treebank Schema](https://raw.githubusercontent.com/alpheios-project/schemas/master/xsd/treebank-1.7.xsd)\n    * Uses one of the [tagsets supported by Arethusa](https://github.com/alpheios-project/arethusa-configs/tree/master/configs)\n    * For viewing diagrams, is accessible via an instance of Arethusa (for viewing)\n    * For disambiguating morphological parser results, is accessible via a webservice which takes a filename and word identifier as input and returns the treebank annotation data formatted according to the [Alpheios Lexicon Schema](https://github.com/alpheios-project/schemas/blob/master/xsd/lexicon.xsd)\n            * If you want to use your own webservice for this it will currently require a custom build of the alpheios-embedded library to configure the address of the service for the alpheios-morph-client library.\n            * If you are interested in loading your treebank data in the Alpheios-hosted treebank data services, please contact the Alpheios support address.\n\nIf the prerequisites are met, you can activate the functionality by adding instructions to the page.\n\nTo activate the use of Arethusa, you should:\n\nA. add a `meta` tag to the header which identifies the URL template for the viewer as the value of the `data-alpheios_tb_src` attribute.\n\nThe syntax for the URL template is as follows:\n\n```\nhttp://example.com/{arethusaPath}/{docPathOrParam}DOC{sentencePathParam}SENTENCE{wordPathoOParam}WORD\n```\n\nFor example:\n\n```\n<meta name=\"alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n```\n\nB. add a `data-alpheios_tb_ref` attribute to words which should be linked for viewing in Arethusa.\n\nThe template syntax for the attribute value is as follows:\n\n\n```\n{documentIdentifier}#{sentenceIdentifier}-{wordIdentifier}\n```\n\nFor example:\n\n```\ndata-alpheios_tb_ref=\"1999.02.0066#1-1\"\n```\n\nthe `documentIdentifier` will be used as the replacement value for the DOC item in the Arethusa URL template. The `sentenceIdentifier` will be used as the replacement value for the SENTENCE item in the Arethusa URL template. The `wordIdentifier` will be used as the replacement value for the WORD item in the Arethusa URL template.\n\nA full example:\n\n```\n<meta name=alpheios-v2-treebank-url\" data-alpheios_tb_src=\"https://alpheios.net/alpheios-treebanks/DOC.html?chunk=SENTENCE&amp;w=WORD\"></meta>\n\n<span data-alpheios_tb_ref=\"1999.02.0066#1-2\">prima</span>\n```\n\nAlpheios will convert this to the following URL request to retrieve Arethusa and display the results in the Diagram tab on the Alpheios panel when the user double-clicks on the word `prima`:\n\n```\nhttps://alpheios.net/alpheios-treebanks/1999.02.0066.html?chunk=1&w=2\n```\n\nThe above steps also trigger activation of the use of the treebank data for disamibugating the morphological parser results in the Alpheios popup.  If the `documentIdentifier` is one which is configured as available via webservice for the `AlpheiosTreebankAdapter` in the [alpheios-client-adapters](https://github.com/alpheios-project/client-adapters) library, then the treebank morphology tag will be used to disambiguate the morphological parser results.\n\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 12.8.1 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.3.0-qa.20200618500","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-1tbodUOUSUZQPoKJzA2DqYFv7hRCgBJ94TBjFPpO45cwPUgRGOrEvB9n+q63/RHnje2qb7LIfI2FEp68FProfQ==","shasum":"8c3947c6fdaf7c3b8962bb91a9b267f785c2148d","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-qa.20200618500.tgz","fileCount":16,"unpackedSize":138918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe69M1CRA9TVsSAnZWagAASTEQAI/cpVSVS3B7UHJyTIa8\niLqBvFbPhokEawBZkkyimHTYHPP8ih8CoqH/PGQ5qY+Pji9toJe1TAXEZoQ/\niufqWAxG733gOxtdbNYKbvdGaSuNBKugPqCF3st3PJNyOTvSqjKJCLrBVmEA\nCPtcj96kx368N6f2inuA/+PoWkesmvubgQcgcQ9A8mtPzfjlt4dimxScGB03\nJbdjykzbduPlBu2B2YMKCh4/v4+7agkWzbLtARFubUqwOlw8passHUMg5MH8\nsbAFxZAWmShT+tOQIi2/DT3nUvib8PE1EEJfLc5RhREJ4SaH3U5+n4KoBOSn\nO8TqFN5cCnEwbOPcftfcahKgVH1VH9QlUq3K1b+tUbdAdSMvdWMp50XjFT1v\noAAxB1o/O78w22hELgCpL6bIcC9ZvPffZKKYbBxdjZYyn7sK/fh7FuWPm7fC\nQKhON0qfMjVAaqO/vM4lG+x2zE7nlxSZCveY9IZg1cODkVb/7ZPJ/jTzVAiC\nRIKCctSfORQLHl5aqEF4C2Z8UlOcwjvLcpm7Yu7B++rTkqIJMVcjlu/aRi9A\nBSq7U3xQsTwzhcYTTI6Jc+Qef1UJ9oPpEyq2XjCbf8bTtkAp8w9AzWueMYaG\nU0i+z5eX1AmNxKrAPktP+6+ZjFcir/ujDq6Lgg/5nEplo2WxhYoBZWfbw229\n9Fb0\r\n=lhYx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFj92wl+LGlXwG8y8WaZE8cPtK20Clx00Re0/tQl4TwCAiBZ3WIcQfbls0B7zWT8rrJIH2xI5huzDJZET2jH+M4JTA=="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-qa.20200618500_1592513332879_0.1432816624928266"},"_hasShrinkwrap":false},"3.3.0-20200618500":{"name":"alpheios-embedded","version":"3.3.0-20200618500","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.10.2","@babel/plugin-proposal-object-rest-spread":"^7.10.1","@babel/plugin-transform-modules-commonjs":"^7.10.1","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@babel/runtime":"^7.10.2","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#production","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.2.0","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^5.1.1","coveralls":"^3.0.11","css-loader":"^3.5.3","cz-conventional-changelog":"^3.1.0","eslint":"^7.2.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.21.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^6.0.0","imagemin-optipng":"^7.1.0","imagemin-svgo":"^7.1.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","intl-messageformat":"^2.2.0","jest":"^26.0.1","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^6.1.0","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.8","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^0.2.4","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"84f1eb626d96848d17a2b56753ca8b4dd37e47a4","_id":"alpheios-embedded@3.3.0-20200618500","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-WfitJcjcCyLZvWS1dnCEJQmZflGlAQVsd1VkefjxzdzbShbc9df1WqWhAeZiZHdJSHE+U4/EpvO3gnvDPR/Wvg==","shasum":"2d1f7b45a054eed50e4f9544e2fb1186006f0a9b","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-20200618500.tgz","fileCount":16,"unpackedSize":138934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe69NLCRA9TVsSAnZWagAApN4QAJreANK6fMUXr0GxtwmW\nMYW9HmD8H6yBnduYv2hdg4NM4CMPYsmbbStcX3ByW0YVI1ZxuySicvEAKD3/\nLNG6Vz2wVSLt33nWhUyax1OaoDopLGgJGpa3tO/5K4VzaoWIHiEDaW7UiEQA\nGI3/e8zH7k0UFUBdh1jlvEImIZx8tDhWZWGqwT6EVox5zgU7C3+11/P/Su63\niXYkoPZ55ZR+Epkqjd/8nfc9bnQpuzmcPl3DJEGWjhckbGkxxJQSvuvyZEPQ\nzQ+xhONvrYh1QaWXFmvk3w8u9m92qw46tW0c7gJGKnrWpl38ErVyD8lGs2HD\nHxYCPpLOyhKJcdnDaBG3BfLyvIOmbztLW9xTAdwd8oTA1ZffFTZhqLwbPxRN\nMV4JrqdEBSfAF7y9RcdgV4z8bjGzJXgf+P7GktH9CkNs94MCmhtn+YRZKTTE\n60BK8sXjQU4tbuzXfXSwlsrJJ9ejdTRFLIUEJw9B4EkaYRknV5awSLhFBj0D\nHhsK57FzDYeSy6nf5LyOc4pp6aDPWnvaMbQDNQX6hpIhzKvixx5LK0jmWJUa\n4p/GZ8pOc2dgoMD1YTdR1iz1XTbRt1y6AGwaoOmEOYoRJZyWZlWcC5co2CzZ\nnjRqx5CJB2S9hCN6zu8Ps9SCuW5A1to6YK+sLr1sAsTanTSfdBnbsocc4kS/\niPl4\r\n=ilv7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9PSUn5HCQGoRepA/9wwzJabwgISA6rDzxMTVJ6PTbZQIgGGSbY89rlmguMS4OBCJTJ73EOU37fqUxXBz+E91YMbk="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-20200618500_1592513355533_0.06302090492461931"},"_hasShrinkwrap":false},"3.3.0-qa.20200807266":{"name":"alpheios-embedded","version":"3.3.0-qa.20200807266","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.10.4","@babel/plugin-transform-runtime":"^7.10.4","@babel/preset-env":"^7.10.4","@babel/register":"^7.10.4","@babel/runtime":"^7.10.4","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.5.1","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.0.3","coveralls":"^3.0.11","css-loader":"^3.6.0","cz-conventional-changelog":"^3.1.0","eslint":"^7.3.1","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","jest":"^26.1.0","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^7.0.2","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.9","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^1.0.1","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.3","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"933b0939d9dac3dcda35b56805ecc756df293a32","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 13.7.0 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.3.0-qa.20200807266","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-0YDVR7Js6hM10/4kuqy5xe2NVbGe7JVstzOaedmTqpp6vhaPsqLvx/R20lQQUL/YgJ6APsl/ZfzmGOerCfZImA==","shasum":"4ac76b367bb63b0c8f635f1787231f1938cd11fd","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-qa.20200807266.tgz","fileCount":16,"unpackedSize":135908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLU+ACRA9TVsSAnZWagAACWcP/A+L5xD6dCRN1X2qjHm8\nOmsCSaCOyTLfXAdyvqu9HsXinvecIb7vpv1YBiqVLLsioXDLqsQyqbBb5RiF\n+xbhQv4nTqiJfmiTMqHN0yNi4CU+MS7K/gXQr9guhGtvoIaxzV/zE1kRzac/\n447vvUAn35uNF+fEsEJzrRtkeQL+/uc7B30TMbSQ7auzM5unVXL42p6+xZQs\neJH5Da3GtfNMkWRJUnjQlHGsod8vjX8NVCUbTn6cxfOnuiyB5y1pXcXodC7O\ndDkFVSKNCzmmJ1GXpQuPSeB8/+N7eu0rwiIvMnCNN2M2IZU3oNQkWA6V2Gsy\nxtCVwsyfDB4CrbLulCxAdDbLoMnzILq65NKlJJ8WeJPhNG/EdMjHFlN83U66\niyiQm5AGhRX22urKWKJI2XR1nm411l03a89zjNI7Pe9oMLzUIyzOrOcKhcmd\ncAJCoetkSMn/6fY6t6cEFXcIHTC41jFZnY4S/uhbgfmNd5PeVXzt3hi8RYvn\nNpRs3iUgu227QLNfjIrfmuot8D1T9+0RsFbC9mXP5yb3qqg2wzoYo6RsfHow\nMgCGKLTs8jnPXZcNmIr5gcGPj+3/kNh0h1TEz0lD3Yq0Y74t2tkoGGAgvHKs\nO1w3WlQTZjNj93eE1uG9v52Ewo4uv6Awmc+wQWcbN1IVWromBC4+En74yhF8\nYQKi\r\n=FYR8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHSxd1FTHJxACOxr6Ve/UqrWeyI2y7ZJIX+CTJrnNS0gIhAMur9J6j9zbsVofyTKONksQL1tKfdFQqWgchjk86LmjF"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-qa.20200807266_1596804991941_0.06059459997804528"},"_hasShrinkwrap":false},"3.3.0-qa.20200813461":{"name":"alpheios-embedded","version":"3.3.0-qa.20200813461","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@babel/core":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.10.4","@babel/plugin-transform-runtime":"^7.10.4","@babel/preset-env":"^7.10.4","@babel/register":"^7.10.4","@babel/runtime":"^7.10.4","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.5.1","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.0.3","coveralls":"^3.0.11","css-loader":"^3.6.0","cz-conventional-changelog":"^3.1.0","eslint":"^7.3.1","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","jest":"^26.1.0","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^7.0.2","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.9","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^1.0.1","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.3","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"0d7c684b68a0c88e75caae9b7cde449087011044","readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 13.7.0 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","_id":"alpheios-embedded@3.3.0-qa.20200813461","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-fZz3xwx//Iz1+OVeS1Y/hqpVa/HfaJ3Ye/SXDCeJpNbxVjf70H7Qjg+kARNNlX5YJ2mJBF11WPUVXwW6zw0lng==","shasum":"4a5dd6058fef734565d5ea7e076864083b7502f3","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-qa.20200813461.tgz","fileCount":16,"unpackedSize":136393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNZNQCRA9TVsSAnZWagAA/+IQAIbHbVeoPYV+cDuxuVCX\n9y2U/aazvjmRpUtz7L8sE7DhOOmhtJwRkWYuuCFYI2uhRhLtVaeoC1hA1hTg\n8KH2g1EzWTo32MfzdpPMK1c3R86283MqLmih9/uHaF/ufmNLes1E6Vm6qexr\nNh2R5gO3arnFZEI27ehd3nCZRMXhrlFA1TFt/7mENyB6lxSD1lZfRnYbNxxg\nHs670LBLxlBSxdZUaK9C1+SIL7Q6AInUTBuEIbjzCK/X1m2DfEJnwy65+mjd\nDXS/cVZ3VV23jzkwYEE1ohUJvW2MPV6xyb+qXQR15+V7gbRY9QUcyrkeqjEe\naLp28zu4+dE76cpLtB341NN8IC97eXrK7LDu01ouwg7NjwK/TqyTBbvhi/gQ\nEo4jcSwRVNndvwarBxNT33WBCQJEy/ekfP58ldKF/aQpe+Utb4DQ0TyNtxEM\nHZawQmvhk4G2pVWjaCZWAFuF8DORJ6k2pfcNOXEVzipOy0y1rsPDelKCTUav\nhRBVcggCgVGR2zrn2PWTyWyZ/kkP9fN0gHtnGIYV1uBqIv7I4EdS4X/V5BBs\nZToabiZasdjZju815SxilELDodED9gdhZucfoeXJIrdtZxHkVgRQjLNKWrPs\nJAhoH21httMeUAO9pgsI7NDPC5eMVxaYFy+enQeOb7LrBOt6G6NwOr4RD9GT\nPv6L\r\n=azQW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCp+4e+YWwXYuHIYOEUzHG3GRt7ef0qhFAkhwvHlVzXJgIhAKk/lL/wHcP6NMvZ1Fhi+eFer9erk1RGXziRr7YIdhCp"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"kirlat","email":"kirlat@yula.media"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-qa.20200813461_1597346639376_0.4272818136618932"},"_hasShrinkwrap":false},"3.3.0-githubactions.20200814408":{"name":"alpheios-embedded","version":"3.3.0-githubactions.20200814408","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.2.4","@babel/core":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.10.4","@babel/plugin-transform-runtime":"^7.10.4","@babel/preset-env":"^7.10.4","@babel/register":"^7.10.4","@babel/runtime":"^7.10.4","alpheios-core":"github:alpheios-project/alpheios-core","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.5.1","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.0.3","coveralls":"^3.0.11","css-loader":"^3.6.0","cz-conventional-changelog":"^3.1.0","eslint":"^7.3.1","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","jest":"^26.1.0","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^7.0.2","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.9","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^1.0.1","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.3","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 13.7.0 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"49fc7075d7b184346473aec9423b6dfcc74f7475","_id":"alpheios-embedded@3.3.0-githubactions.20200814408","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-4ffPKWm4ie1jPXyhqRcTDAVEgwolavIKWvmhWyRsFyel9xQ9DTjZWtBEzYV7lteyb5xxEkmnq1GC7XrDAt45eQ==","shasum":"cc82304dde7b3f9a633f8b5a477aa621d3b62c4c","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-githubactions.20200814408.tgz","fileCount":17,"unpackedSize":138426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNpNXCRA9TVsSAnZWagAAqr4P/idb/TOS6pWx5jiilY/4\nznvAaLtyIblu61wzk0xwyf20SpBgoE1p1F3cCYCUeWBxdI4a7g71Es1MmaFr\ni4VsnTyaegDX9HxLsDalP57dXIXvAyX8zVpk5B+E7YGdrTCZfblHkEmyxSkL\nDTh4997wHc0mWlQ2dVxkCY2FvuoeI3m9TSbkSW6Pb+EvYBLhvxYXJOZN1BeH\nwPAZ3O7IXr30zTdt5v6eFSCECdGG82hSSM+gBDvKuNQk7IFw/58CblN98xk5\nX7q1n/12q9TbCTwot5QV3tPJ3tdtbC4CgaRzpl8JthYNiS4OuYyxdMOd2nRz\n9+Fg+pTT4TjUi5kGJiNljsdbv3NELonqVrl/E1pO6/f/9Mi/giqYiyvAxzT4\nmQEkfOQFEk3y5xsGXCiUC2pzoqfgK7sYd8K1LHrqgONkydSDl7a8i9jq+4ih\nunybgawX8rffkfzuxGedJ4fbu6QzBoOW/BA1RS//ReGgvXGPHPw5q4KJsM90\n1RTXIBVwpOqK6dNpJvPr3hY0UkbmggcrQkV43EeSHM9JL5BTWLijuwfm5Lm4\n1ABK0fhNesri/kQExiMbWrIVPYU57DbB0JSRg0GE74c8qawAFZ28CxqsW9zo\nOSeZ7Ohba3UW7ypKV8taeFIAj5hH8TwR80quZ99yEDMFwJvaubGJ0uk8Wx+k\n1yEn\r\n=4zm+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWNM8+gPsnQ0QpDg55JjQZSlohGt6H/6eWj6+Ll5Q3iwIgba3Emap1SW1FjaIEvd3UeHup0A8jH/8fQ9Hz+7lPQo4="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-githubactions.20200814408_1597412182517_0.7897232481886158"},"_hasShrinkwrap":false},"3.3.0-qa.20200814435":{"name":"alpheios-embedded","version":"3.3.0-qa.20200814435","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.2.4","@babel/core":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.10.4","@babel/plugin-transform-runtime":"^7.10.4","@babel/preset-env":"^7.10.4","@babel/register":"^7.10.4","@babel/runtime":"^7.10.4","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.5.1","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.0.3","coveralls":"^3.0.11","css-loader":"^3.6.0","cz-conventional-changelog":"^3.1.0","eslint":"^7.3.1","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.5.2","interactjs":"^1.9.19","jest":"^26.1.0","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^7.0.2","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.9","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^1.0.1","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.3","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.11","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\n### Prerequisites to build the Alpheios Embedded Library from source:\n\n  * Node 13.7.0 or higher\n\n### Install Dependencies\n\n```\nnpm install\n```\n\n### Build\n\n```\nnpm run test\nnpm run build\n```\n\n### Develop\n\n```\nnpm run dev\n```\n\nRuns a local web server on port 8888. Load the sample.html file at the root of the directory. Changes made to the\ncode will be dynamically rebuilt.\n","readmeFilename":"README.md","gitHead":"98fe713e9fbed50342f86a309d8eee5be2026db4","_id":"alpheios-embedded@3.3.0-qa.20200814435","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-TVVaR/jbBSXWyA7luOJ5MG2yY3fYkhxS8Vf1Zu35PhZU6T2fMu7k1rSaqglFuRZmuJJ+JoeCFtw0yH1ubY0x6w==","shasum":"07ceae765200c9a81d23c42390a9b3424a17d6ec","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.0-qa.20200814435.tgz","fileCount":17,"unpackedSize":138379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNp/MCRA9TVsSAnZWagAATkkP/20olxWipItAgJ24WZEB\n64cStJ4lYdKPlCS5ILJ8mZ6UA3AgDr8CzEP+S3AytPP8MQQjEkGZSH7YskKz\nmmvxsKuf3sEyccGiba6oic/UO65RqgSzJ7lcuYHjn7zRuveeZicz87G/XDHe\n7X780HXUT+wYzZa+4LhRmBUAJtw/wCcheeXeeEMshgrXqKClyBn2e5DkXY0P\ncKPcI0X2Uoj0oXyP6dKKfzCxwKNRu/wjPcOhABrYb7PqcHU/fMYE3DyM42l7\nofTHafYpxWMW4ou+qMGpmMFafNeBeciTEnn2HYs+kmfrKneCb2nrxbVn1PQW\ninyeW+JQokCl5I4xRJ0kYy+n8AqzlTasA47QmZUywcEkZUBGtrnQSQh1oG9r\nvuzCUC0ZArMH1zb2dW0H7Balp8fDq8eYZgL7TWMZgDk4OzkOvhvgHGDSyqPF\nOU1hZ3o2mfWMmDf6ZFg0zbA0nn/7PiOoS6TBEaN9Qs75Y7aZpICJQ/p95Eqd\n4Jq/2g05dwaUrDEbA0It5Fwz1GrLxvrHroTteQe2XiA2S3zaahOXIz8e/R5D\nYI0nVqRgKq+dc1909xpF+EZWl0vcy90lKhwLxgXvWvJX2aVGJW76qTT3YeMO\na/6PtS6BLPDHZzUyfWk5pZWItreVjXwBCWRVWcP/iY75f/zMYcGga6oIC7Ez\nGGhe\r\n=Z6ac\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2MfZF8x0Crmo37/3Vt40EDzcgx+bh+oIPWHpcmnXlRAIhANLAAnuuHycKfGU4Zliy/ubJzQAQG+rmrGUj8GhtoSsh"}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.0-qa.20200814435_1597415371994_0.9555464794356465"},"_hasShrinkwrap":false},"3.3.1-20200821383":{"name":"alpheios-embedded","version":"3.3.1-20200821383","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.2.4","@babel/core":"^7.11.4","@babel/plugin-proposal-object-rest-spread":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.10.4","@babel/plugin-transform-runtime":"^7.10.4","@babel/preset-env":"^7.10.4","@babel/register":"^7.10.4","@babel/runtime":"^7.10.4","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#production","alpheios-node-build":"github:alpheios-project/node-build#semver:^3.5.1","archiver":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.0.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.0.3","coveralls":"^3.0.11","css-loader":"^3.6.0","cz-conventional-changelog":"^3.1.0","eslint":"^7.7.0","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^6.2.2","fibers":"^5.0.0","fs-extra":"^9.0.1","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.5.2","interactjs":"^1.9.22","jest":"^26.4.1","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^0.9.0","onchange":"^7.0.2","optimize-css-assets-webpack-plugin":"^5.0.3","path":"^0.12.7","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-safe-important":"^1.2.0","postcss-scss":"^2.1.1","raw-loader":"^4.0.0","sass":"^1.26.9","sass-loader":"^8.0.2","shx":"^0.3.2","source-map-loader":"^1.0.2","style-loader":"^1.1.3","url-loader":"^4.1.0","vue-loader":"^15.9.3","vue-style-loader":"^4.1.2","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.12","vue-template-loader":"^1.1.0","webpack":"^4.43.0","webpack-bundle-analyzer":"^3.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.0","webpack-merge":"^4.2.2"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"1084e9840a8ce04bb5ce5bda5ff141ba87a9735d","_id":"alpheios-embedded@3.3.1-20200821383","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-hG1E1L5lrZZPjLaXFO9gu49TjFLSOMM8lehFR5dVh7ALc1KYmIghMFHUE09PY2c/Jh4MBHDCz4S+YdAO9pzPqg==","shasum":"51a2aa04cf5aa9f354134690b5b125c5ff354edc","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-20200821383.tgz","fileCount":17,"unpackedSize":138574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP8INCRA9TVsSAnZWagAA8ogP+wZzTgi47joBh93ktTKB\nNu5WvJ3xougj6O+9ku/F1JXPWMjbFkRtegfEOAiQjKazczWVuzUUQ3pcopXb\nJd9VvwkttMg+ImfSPZ6FOt07PZ0IldxZWr/MOiR7HjolPH4KpidjCZUnx+gs\nQWhym9AfNBC1v+Uqn7Px0PUPAUHP9ITAMEdnAIDsm5AW8pjlBq4wErT5Bg6I\nFtSg+9IB7IEjrvVhXICljKUZayUM6Sz3D+go8Qdx8MLCVnqmEgxnk+y/nC/H\nNi2ucqCKu0csTwH7qFyje0ETsNRgd5oOpFBVIeA2PxwBTwuMamUd2JKfG0uq\nVbTLxRil/A+yZ4jiam63PPVKP4Hwk3iwR3ZzW6B91cwXvX/ckWbG+r+3/wWO\n+1uZeERlH76enCshJ68aOnW6QKNTSPNC0IF08WinzNqv8caXZX6VXrXePpY9\nNfsqeZSHPXWnkpaIjhw9ZoeQrX0VBqKyucBS5MPIUpimT67cmDr/R+1n6C6z\ne2SoAad5grBnPGvhlK/p1z/jdyXaHkB5hrRj1POsYp7hrAD2TT/r9fzX7vf2\nkdlfUCVkA6j663nmAxyFjPpanprPqAdsmeSD0uz1obSXuqW8yQ6yhPS3e5PJ\nlO7HTtvL3YIxWPy+W/IwrzNojT20exl9G5NfiEEXTNr8sBeGxYXPrriDifso\nEpu7\r\n=iYNu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/83OxLa4qudGG366WvaVX4Kad6HxtM5PNv3ZN7ZTnjAIgTUon7i3fF5bazMzd8luwAuKX5/Fx1cEzS1R9r7oC0+M="}]},"maintainers":[{"email":"support@alpheios.net","name":"alpheios-project"},{"email":"balmas@gmail.com","name":"balmas"},{"email":"kirlat@yula.media","name":"kirlat"}],"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-20200821383_1598013965545_0.8993115526867068"},"_hasShrinkwrap":false},"3.3.1-incr-3.3.x.20210326324":{"name":"alpheios-embedded","version":"3.3.1-incr-3.3.x.20210326324","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.2.6","@babel/core":"^7.13.10","@babel/plugin-proposal-object-rest-spread":"^7.13.8","@babel/plugin-transform-modules-commonjs":"^7.13.8","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@babel/register":"^7.13.8","@babel/runtime":"^7.13.10","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.3.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.0.11","css-loader":"^5.2.0","cz-conventional-changelog":"^3.3.0","eslint":"^7.22.0","eslint-config-standard":"^16.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.8.0","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.8","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.3.9","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.4","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.2.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.32.8","sass-loader":"^10.1.1","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.6","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.12","vue-template-loader":"^1.1.0","webpack":"^5.28.0","webpack-bundle-analyzer":"^4.4.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.2","webpack-merge":"^5.7.3"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"db67853c14575409abd59aa352d94a05169dbdaf","_id":"alpheios-embedded@3.3.1-incr-3.3.x.20210326324","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-1j2zi6obiFAqEcXYbrLIR04zsQeAUsmRe2Hdw6H3bDPh+2xYuSNpE6IZVbuIDKexNesPJwlEss3O/9Ajo2TtGQ==","shasum":"de69b7c828b65128ff7448a6ee8273654a2edc47","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-incr-3.3.x.20210326324.tgz","fileCount":18,"unpackedSize":139694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXbvyCRA9TVsSAnZWagAAu9gP/RqiKKkHUaUtSNxmPqfx\nteZ8oqctyrOs5i+vEX+zirXfFMk1Ho1DE5vonRXVVUn9lyXFMUHXQNBsQe6D\n5/OPyoGpQTwgnD0GuQj5Qoc0254hmhV7BOcqw3be0MWOSaKOL2Rw6wIGYTfO\nl4HUc03ONFz3zBuJ/By5Lm6U4B2yOiTUkyJSv/PisygEwTRhRH3IiHztWSkN\ndQS4kNHp7t9WPT7xbaZia6coRXK97T5OkXeqj0TurB5BgI0wxIB8EyAdLdhZ\nCApGa7Dsx3ZdZ9AUHantaJYVxHMVcpie7GrbP4S7gdVmzreFRETejo1uUIps\n+WIjX20BJh04ik2swdUpMEzWQdRY4O38AS3AGxs8qku5nA6wClJRCU6WeCMA\n6aFZj7o06DO5g6HWD5zuMPxw7osknMSR8w8TOzk22+y686XdmalSyR2tVZIv\nPSvB0IxSStG8oMU3P+FXqvdrfdwJVmUgEAOh8Ois/NrZkdGKyI2OOHmH76t9\nLsm//jH7hgVOxuVd5mM/giPu1NaKkv3RhLE+L8/Eam49fV1y3oFHiG3DgVnf\n0RQ1XSKi/huCRNSdsQ/a0m1XahoLCsqO43N/Nvq7Odyj/UUNtURfCuPdnRf+\nli4iqO19VJlnDVrAv2U8YJTmRtVJ5YYt5YyCWXP7d6y3kBACmGry2qBZw62N\njJgy\r\n=BRYM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2D9Le1MpgnztlZx39Pq9/LcXUFBIwXh0vKoW6F+Vw8AiB2L3sJ0FkPj//DJsxZJaGNrAqaVuTbQQvt4oT3CBexqA=="}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"kirlat","email":"kirlat@yula.media"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-incr-3.3.x.20210326324_1616755698366_0.8589474358825835"},"_hasShrinkwrap":false},"3.3.1-incr-3.3.x.20210331295":{"name":"alpheios-embedded","version":"3.3.1-incr-3.3.x.20210331295","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.2.6","@babel/core":"^7.13.14","@babel/plugin-proposal-object-rest-spread":"^7.13.8","@babel/plugin-transform-modules-commonjs":"^7.13.8","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@babel/register":"^7.13.14","@babel/runtime":"^7.13.10","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.3.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.0.11","css-loader":"^5.2.0","cz-conventional-changelog":"^3.3.0","eslint":"^7.23.0","eslint-config-standard":"^16.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.8.0","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.9","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.4.0","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.4","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.2.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.32.8","sass-loader":"^10.1.1","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.6","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.12","vue-template-loader":"^1.1.0","webpack":"^5.28.0","webpack-bundle-analyzer":"^4.4.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.2","webpack-merge":"^5.7.3"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"cfff522513ce46d81c02de7564d7e153c75d0280","_id":"alpheios-embedded@3.3.1-incr-3.3.x.20210331295","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-7JXhKxXdSXsuDb8t5LnGo1njXE1LGB5txxUbtF1osNiQJLPDa5y1DNZE6cs0NwrhSrOtTA3RT0HC9FNb3v+J+w==","shasum":"b6fea51f39685eb6ad0512dff2e60282fa486abd","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-incr-3.3.x.20210331295.tgz","fileCount":18,"unpackedSize":139697,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZEXpCRA9TVsSAnZWagAAjpAP/3ZBqQrCIZ34n2zZtSEF\naFTdi7XEFG40yNAI4SaTVGvFWn8eZWE+nQRJXS1dlT6ZBL/Ebknh9tAiItiy\n+f6GB+jce6H942s+VVWXa+FGHFzVQnjVmqDsgE3BOBPNhxQIsdenKYz/0ih0\nxvADkqOqM+ITTwmVSEBXm0h3JWoE4S3eDeVH1/OZYm+GSYRGSTX7fh08Rlip\nGKqQDt+ywxs4I1tYmFbzdZFFEJlLkNxZDFTKRht46IyUQ+HPxeS0gMvaJM3x\nKRkIgZRXPYJ9Em2nUm5Ebbh/qGRVTzt/5VWkQ8KNJvR++5t4N/FYp6t41Z+k\nsvqN2UyIxS73lnlTFCyBBwwbAZXkSUfQnG0ORErKF1cpgja+ymLS/6jJTXXk\njFKCbdZfqfjnfp8ROVTlc7kVohrXdnFTTjbOXXC7W2M64eKES47h4bnLb++y\nWursSo44nKRoshsy5RieTiUfZevmqdDQfRYc94P+thbFHsm3Empo2ySX9CBt\n9ST1T/N6nadCgoJyt8YOPOnCwb24MLix/5QwyOMlRR0/wcuZ4pTb6Npn3dtL\nSv3cXiONmmIYFVK0SaftufrsTOPryd3N1H5Hdpeeq2EqZ7/FYDamQyvaiMAv\nGDdGteqgXjO+lcx7AX54UyI+b9p31vGyVoc6zUoBZut8pE01fonWAv3kjIgC\nS/v0\r\n=pZlV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmIhh43G7Y3SB1XnH6fTRYE3EIAuLwTkRGURSURZYahgIgMJzn9YZW8K9yk1g7dto7P8BD82+ncTVVwBYAiGMZrSo="}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"kirlat","email":"kirlat@yula.media"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-incr-3.3.x.20210331295_1617184232947_0.15663805368061134"},"_hasShrinkwrap":false},"3.3.1-incr-3.3.x.20210415085":{"name":"alpheios-embedded","version":"3.3.1-incr-3.3.x.20210415085","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.2.7","@babel/core":"^7.13.15","@babel/plugin-proposal-object-rest-spread":"^7.13.8","@babel/plugin-transform-modules-commonjs":"^7.13.8","@babel/plugin-transform-runtime":"^7.13.15","@babel/preset-env":"^7.13.15","@babel/register":"^7.13.14","@babel/runtime":"^7.13.10","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.3.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.0","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.0.11","css-loader":"^5.2.1","cz-conventional-changelog":"^3.3.0","eslint":"^7.24.0","eslint-config-standard":"^16.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.9.0","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.4.1","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.4","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.2.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.32.8","sass-loader":"^10.1.1","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.6","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.12","vue-template-loader":"^1.1.0","webpack":"^5.33.2","webpack-bundle-analyzer":"^4.4.1","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.2","webpack-merge":"^5.7.3"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"0fd4009ff0bbbfe752b5113b753e668e512fd65a","_id":"alpheios-embedded@3.3.1-incr-3.3.x.20210415085","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-8kIXSo7UYBmfE43fDqUHP4d8TBuGNN4dCtKria0k1DUeeJBYj5BL8J7+mkSeyXbZ1USudd3sdop55nFMBPmQAA==","shasum":"a6df072c1903b0ec9d7bdb2d203665ac4aa44a8e","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-incr-3.3.x.20210415085.tgz","fileCount":18,"unpackedSize":139700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd6o3CRA9TVsSAnZWagAA9NYQAJ8TaN/87qiICUGOCdO5\nD5+7OKiGEPC1bBh9G9t31PpFh1mpoeK4bWU32TxTgY8K8v2v7jVoM/1udAGR\n4RxKfHxqiA5nUyE/pLy0HlptPeTD4zRFPARnQWJFJ7FnWleOUlFqaFOv0rwP\nJU0ERivR8Kbje+BVw+Q3LT8D+0XsUi/BQ1RWx1/H47HTXcNgbn4XEIjI4EnH\nSy0pNN08wV1ctu5V/HDPS+ZAUUm80tSEnt/PmCNEbf74IdBfLXcRinK00nym\n9ZsF1zD/30YYEShlDLfOpdG/5DLG5wZiFuAG3UdNt5sPmdQZPDokYSiRBeuw\nRWdJnehn1gXktG6uz+lY3h2R456hxVnI98H+ktwZG6NRcamrvfR1fr4wYBC2\n5of/mxi5AA3tiUC87P3+75VaKe+4T73pH2D+IQo66oNVTJ4IttIGx81m4Zhb\nfHlz62yYgNzFIg1+0sp2OgA3YHq9O/8aHYJwJ7V8SiwgsEwAVIDNj9O/PPN/\nNRdnNtrpUEyAl+SV6MygBMrsa6jk1Tsb82UKU4EQp0XK3+ScP8zeeyKcxwqV\neaNHicGP3+0PPnAbRWcBBMY5hjRAoQoqbuBWBo0tjWYCBp8Ca3FqbSa0jWJb\n1//UPRaFUmndpqovT4MMt0slMz5N+u2RxyJ8n1lL28IJHuSF5nehT0k3C55R\nvDPz\r\n=wASi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE57cj20KsIKvH16nWIazH1TOnlppGz1sy0XaZLkvKBbAiBSPWoW5lw+HjKWnzJxXLrcPWYkFYYQ/lq+PjIxCszyNQ=="}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"kirlat","email":"kirlat@yula.media"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-incr-3.3.x.20210415085_1618455094738_0.7197502392259945"},"_hasShrinkwrap":false},"3.3.1-incr-3.3.x.20210629308":{"name":"alpheios-embedded","version":"3.3.1-incr-3.3.x.20210629308","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.4.0","@babel/core":"^7.14.6","@babel/plugin-proposal-object-rest-spread":"^7.14.7","@babel/plugin-transform-modules-commonjs":"^7.14.5","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@babel/register":"^7.14.5","@babel/runtime":"^7.14.6","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.3.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.1","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.6","cz-conventional-changelog":"^3.3.0","eslint":"^7.29.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.23.4","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.12.1","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.35.1","sass-loader":"^10.2.0","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.7","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.41.0","webpack-bundle-analyzer":"^4.4.2","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.2","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"aff7763aa03aa4e369be420820867bf373859666","_id":"alpheios-embedded@3.3.1-incr-3.3.x.20210629308","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-oENO4WdYXC8VZ7LixH66IOolIQnm1kqouI2SMkHjsOnejI4bKXB7L0ISEfvjjWgnj2z9/E2YjIdn2hvxjzOLug==","shasum":"1c10f21ea699f01e63f9392ad198577c6542d48a","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-incr-3.3.x.20210629308.tgz","fileCount":18,"unpackedSize":139883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2vMhCRA9TVsSAnZWagAAjkcP/2akD3tM5wXwjui+rmB1\nT8LcKV4KdcpJmRTc3prnyN1s0xpAga0k64O928USD+4BFoCmZpXM5jYsNYtY\nQAzCZiT47mnsSaUZKjGiERU2eK7fVO8RC+W1nAE+kD4dBIaxgpQfHZMW4Dd3\ngMnSmmQTcTB7f7eGzkaHEp3dADERlY5/zpITJDzkv6ge3B8P5Y0SEfl3ZYY3\nD+FtavBU3oDSFvKzHhgJCPibpMOmuqjldukZDvE7zKkML1vMpQ96+XjGXHkd\noyoI2DgzUXFBcATidks/WldhWhc5LQW7ZEg3gcV86U/BOIU/ITJhPnaWrsHl\nsiWiHpdInAwH+9skvxqx4/bOpxkKma2NzITb5kZ8pwgQ2sdIrEA5NRmRVAqA\nEkS06DlYiMCMAoWxpE/Yq0QWC6zu1Oqhbr0WG5CplKpR4Dsmk8gvmFYAN2XV\nFiL27k6P+51BC3JBKj/yO2eHVOhgy8caoXXcIC8Z/Y6DU8wwO+ObNUmQzm6P\ncx0iKrjMbeEUBw+mrQtv+1bZxf437SvJjzrs/rWUOGXUGcFriRptA3V5nOJ8\n/hxqeiqMzi3k+N99ayAYO26jqtTEH8UI3Z/mfa83F11DLzD3YkrRs9laPzzl\nfnkbQ2i6tpPw9kBRYiwAiVVLq8Um4+5ca31J0fTUNwrBLaCQoBdWnrPlku1D\nTHK0\r\n=pknF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg/RA3lSOhABAIh9VaLF2kXO4f4kJo2TbrNIw3TA48FwIgIIOHGI0ExD8eft3Fd99EnZf2fXKGzAQ5Y0WrD+OGXos="}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"kirlat","email":"kirlat@yula.media"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-incr-3.3.x.20210629308_1624961824834_0.32280861776255754"},"_hasShrinkwrap":false},"3.3.1-incr-3.3.x.20210702316":{"name":"alpheios-embedded","version":"3.3.1-incr-3.3.x.20210702316","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.4.0","@babel/core":"^7.14.6","@babel/plugin-proposal-object-rest-spread":"^7.14.7","@babel/plugin-transform-modules-commonjs":"^7.14.5","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@babel/register":"^7.14.5","@babel/runtime":"^7.14.6","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.3.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.1","command-line-args":"^5.1.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.6","cz-conventional-changelog":"^3.3.0","eslint":"^7.29.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.23.4","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.12.1","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.35.1","sass-loader":"^10.2.0","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.7","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.42.0","webpack-bundle-analyzer":"^4.4.2","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.2","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"8d4b42cab73cb4f69e9a02dc8577c0cd5b9fc218","_id":"alpheios-embedded@3.3.1-incr-3.3.x.20210702316","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-CpFXYzzGYif5UUm9QGTmfc3Ke+LL9mpkF27QkGQsz/L61KO7f+4DgXYbqezr12/bA5fzC+RnKyzfi3F1IzpBOQ==","shasum":"e1fc85a6e04b8069d1f9c7086bfa72a5f7ee03d2","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-incr-3.3.x.20210702316.tgz","fileCount":18,"unpackedSize":139883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3utFCRA9TVsSAnZWagAA08sP/13eq3gvHqtu35QZ2DzS\neMtP40Tj4NiaMbuSjvpvLkuV+HT9aD0Sgx4C+ikyAjyw1CYnA1DDECwZYe5r\nH4iqIKw2lTT8sfvdjw1wbGtZuJ7YVTtjFPp+5j6gBqNdNlhPe6LAE9TWR99v\nKBnz9ju12sSWObJsfrSLGPl2+xmwVbIrK258ND4qIAm3VkyN2hqS5ZcKFOl9\nlDg34KS2W2kpJtzUgLjXEAGYfvkYx5oV0gj2OGTrMYnShS8RqGYuZkNxYBYv\n2Z61egVsJGw5SGmDDNFHWA0zVYy3oHdiTzMUTmEGcuts20fPAzcQvE4cbz+S\n8KCUVRxDGDLDD7qYQrpamOBHbGzlmwnEOW8tEUCSz8SggsFeztbRCHUtONQ/\nsUZhqmbGbo0xqwr5luiUrhVPujYwjy7LYH8Hknd/yUNRIInJPmqES8HTCH+7\nPZT46l6LVwA44BriG2+ho9fhu4mhwxjBK1oa6lJ7S8rlzpg2+8eWk41I4diB\nJr022cYhUo4EhJwF/JYxdcboKOowj3rmwkrvOifQc1j/Bm/axnXFhKJV424b\n2cAFT6Lup5q/yi+vUG6uOIxejuBA/ktK9u8j+MOSxlrEvNK3IV4dO2fCmqFN\nx6d+BTcDYSOif/KxHRIQKBsdpPyD7rm6viJA41+doT9pFSdnetmJcuFawSXp\nX4rs\r\n=BU4v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrDz7r2E1VIe67TsKRfPcWu7XTTgTTJfuYLqgqrbbjFwIhAJrhD8UGDLFE4dUWHGCuKL9EGIRK324+gBHw6SkAXM3x"}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"irinaskl0609","email":"irina060981@yandex.ru"},{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-incr-3.3.x.20210702316_1625221956857_0.38990261575955176"},"_hasShrinkwrap":false},"3.3.1-incr-3.3.x.20210806328":{"name":"alpheios-embedded","version":"3.3.1-incr-3.3.x.20210806328","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.4.0","@babel/core":"^7.15.0","@babel/plugin-proposal-object-rest-spread":"^7.14.7","@babel/plugin-transform-modules-commonjs":"^7.15.0","@babel/plugin-transform-runtime":"^7.15.0","@babel/preset-env":"^7.15.0","@babel/register":"^7.14.5","@babel/runtime":"^7.14.8","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.3.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.2","command-line-args":"^5.2.0","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.7","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.23.4","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.15.1","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.37.5","sass-loader":"^10.2.0","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.48.0","webpack-bundle-analyzer":"^4.4.2","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.2","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"9d84c26028a52fad79bbdfca0793cf302b251eeb","_id":"alpheios-embedded@3.3.1-incr-3.3.x.20210806328","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-zCzSRHdlm9JcnV37E9WyK3eC3a+GTQjL+FWDSkOjqAXX6IlxyRyo9I0tMOigG1QhXOp0JwwAPgtNJTy4jkmvXA==","shasum":"454512f7a87fd9ffa6c4e69a938c37d3921834a1","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-incr-3.3.x.20210806328.tgz","fileCount":18,"unpackedSize":140036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDRVnCRA9TVsSAnZWagAATB4QAJvaj19ps8MGbbhqVArx\n4sP0SVKHGRb//FB+pDrGaVR9z5HwcnTbupK5pLDUjRv8N9441imor4vo0bJD\nG0eaVCklU9j+LyN04rd+6CtNUB116PF/fKoOVJHW45Pm1Bt+KjqWwJMaprQ2\nN86S7G7qJP6DES40jeW9LaFiGazO+imlpHw8d5gM9gmoNUN2AP1SKXAYPHWa\nhbqj1Ouxtg40pP5uEv9VHbnjqh0IHfffNQu0YQBrDN2IXcpIvWc8GW4uYd49\n3Cn5v9I8UlKcgZ8L6fN4L4BjFDAPtDUV6n5XwjMoyxsdGi5Y8NqOT/rjfDUN\nmiaUjHmDs3kXgrx/+7kIXbwKjKeOfmN32ss+RPGN92YhW9O8BsM4yt94Hutq\nY/sylBLQVimPRTOWPM1HFEmTsw3+k24V8TCxJLzamKb4jycI5t0qnqdAntKV\nV5LVpbDWp1LF8L1IBpR670kErhbhDYAMp6RPVg8P29kKUFZJd28V21HXr1rU\nepMpf9cnFSwcvxVcKP+lXhUFcXO36aQC64xnE7zzvc4OKwqyZ9UoPeu/tyY0\n3qK27tliogI0tfiVjzuuJNTMcKV/p7tTHw23/f8wBpmEgswbahCfUQfEmdJV\nV6mN7S48Ux7hJKe/zkf2cxDIxARNIZe82+9vNan5E2k3RUN6VADbKReds39X\nGdUr\r\n=sNQw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFgNZ85HAttIHn5tDC5IONIVbvpCSvzEghUMmr32hA3gIgEQukZOPk0xwYRJ1xHbb/ZAvrprGZsMekrUFUrLkEdSo="}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-incr-3.3.x.20210806328_1628247399667_0.29765931619845754"},"_hasShrinkwrap":false},"3.4.1-incr-3.4.x.20211126119":{"name":"alpheios-embedded","version":"3.4.1-incr-3.4.x.20211126119","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.6.0","@babel/core":"^7.16.0","@babel/plugin-proposal-object-rest-spread":"^7.16.0","@babel/plugin-transform-modules-commonjs":"^7.16.0","@babel/plugin-transform-runtime":"^7.16.4","@babel/preset-env":"^7.16.4","@babel/register":"^7.16.0","@babel/runtime":"^7.16.3","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.4.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.3","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.2","command-line-args":"^5.2.0","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.7","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.25.3","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.20.0","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.43.5","sass-loader":"^10.2.0","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.64.4","webpack-bundle-analyzer":"^4.5.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.3","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"d46afba8e6d2abd065e7f66a37ea7f3e8577a5df","_id":"alpheios-embedded@3.4.1-incr-3.4.x.20211126119","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-xnogvb21IGw+ycnC7UF4DKIabpozvMtQUTKQlXnP7+N0LEVQhB/I2hId2sCg6MXhK7suw7bpEKv3AKlnLmXmPQ==","shasum":"bd88b6870ef50d3e201c31fbdfb8df4bc3333dba","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.4.1-incr-3.4.x.20211126119.tgz","fileCount":18,"unpackedSize":140029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoFs0CRA9TVsSAnZWagAAbuIP/0PQUYqSOAw9c4xCV4G3\n71nC6Ox9aLAa9YmgDatE7lPYY87zm52uSt7LGoHdvIsRnKLEIOZUiEaIEgVm\n7WVcNBqky/btJ9Ov1unHRegHoHH4nXHjRYxTSPIYIpxE+SucAL2DehgN9h4l\nxitaBjbHhyT+v4kNIJvCJF2FgVPwOnWMlIhe86HQHrX+PgfelBRm3AUFCe/U\nBcMP6htropaIB6UwbAXwx4QM28kKX6WbXlsYr2adkSaXHRvhm6IEpSJmuWVZ\n3x3gwf0H12f05GS0Lky6CoVllJFlvwT+GnRuk0ypB/UQw0b7JxRoW9KEu60l\nwZXNAdJAgjwDE1KoJPg2odExv/QFOQcTAcq7eGmTTgEzpgO4Rxp/+bpLxLnf\n9vY+0MeJBc/DfdSHcnblt2qkPa76k29ChIQDctPjr2DW/4OF+CIz7rGTSrxl\nas/bBgkw3IXvO4y+/Hsf5ivwuTm7ZU0Hfqnmc/sKYEyC1jFG3LZB4fwcVZos\nzPRLd+Hk8LGWlRo+MKvvo9vmm2QYmSq3BuHxmksOYbvtsqKRZhwIyxfyraM6\ny+WWUPC2GTIQyZ95IZjYRcJ1oCwgqpfsXRW9W3rl3gU0EevoGaVxfovxDEE8\n6/aJKujtnDpWtGCkPvnTZQJhwrIOAzh1NIZ/tDMLWrcUxG4LO5yLUgQwo7oS\n9aSU\r\n=WN+r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWNX0zaKl2A0F+OjCRV91jIfIvtt49INsgob+mcSUwTAiEA+BmHwcjpfahkP9opvLkMEBFPQeGiABlfSeQrf4qFdAM="}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.4.1-incr-3.4.x.20211126119_1637899060148_0.37586794545185054"},"_hasShrinkwrap":false},"3.4.1-incr-3.4.x.20211126130":{"name":"alpheios-embedded","version":"3.4.1-incr-3.4.x.20211126130","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.6.0","@babel/core":"^7.16.0","@babel/plugin-proposal-object-rest-spread":"^7.16.0","@babel/plugin-transform-modules-commonjs":"^7.16.0","@babel/plugin-transform-runtime":"^7.16.4","@babel/preset-env":"^7.16.4","@babel/register":"^7.16.0","@babel/runtime":"^7.16.3","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.4.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.3","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.2","command-line-args":"^5.2.0","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.7","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.25.3","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.20.0","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.43.5","sass-loader":"^10.2.0","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.64.4","webpack-bundle-analyzer":"^4.5.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.3","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"cf0f69590bfd11442b5f324c0499aa94d5175ed4","_id":"alpheios-embedded@3.4.1-incr-3.4.x.20211126130","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FptILD6a/ySwAUd+UnvqWZb5LoGZtO05iRrTNohtH/kR9mv7D3MWbcOStvsetBzs3gVMUC6av9KxM/dXMVTVHQ==","shasum":"02a2c4b4981b8afad111dc326d94fd3e07e74825","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.4.1-incr-3.4.x.20211126130.tgz","fileCount":18,"unpackedSize":140023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoGBiCRA9TVsSAnZWagAA22IQAJW53iItypwLfFOEMrJ0\nSQjFECBcS5r5WWF+Xt4U3FvN21FfX2pqtFgCwKnMYuQK8a58HE53DqVXUG/p\nJFmOrjfaDTDGYCGneNkbA99Bhr1PqFPbnVralk1mqjlzfbvp9n5VQzHzdQFw\nsjWHog4wYK0mVA9Ivn5KYzjr890vfF8iRLpJCRxXEvlVHfRq5Vy6yKx8lI+J\nvsqA3jDG/fEwTkjJQMs8a9Fyxa2tY3GVKeoI/20IQXIoirO9r2nSqvKR5+7N\n7JcL9A1FXp+Z6EYSH9FaNqS3r4K9vegTX0RL4VKYF9a7i8WJTUoWFzzgmvad\n0UD782HtiRcS0ik8VpyPQIiot0tJ32i46YXdW3NbuOcKIYAPS+GGXE3pd5DA\nz+7S+O8Eozt6toenYZNHI/M0MKEJ4c95guC/Kl/glH/zU5+U/aGLXceS1Ob6\nt6RXhxdb3VX7mr3OaHNm4W3DXgmAN2Nlzwwu//8R3200hNFuGO8T+gy2Vn1q\njdwdCzSa0S5BbFoHbP48sWENWrSEPRLHZxyOSgeb2OH70LVbItsCWXTLIYec\nD+ODZnbWszTK9MNgW2fEal8NCqFZ/2izyXIVW/gkqJPJ9aKybUiAR8Wh79z2\n6dVFmak18g8THeotMt9ay9l9uFuUwHGMvotPwFSFJCu1+nIN52eOfqcKX5Ik\nDnN1\r\n=paf+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEgDDHP/hHZ0Pm02cVITczp9yeirKgzemWwZAmgh7nT3AiBYMpnDzWggHJUykCn1kCFERJ5m7atjzWhTLvwQWJ913A=="}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.4.1-incr-3.4.x.20211126130_1637900386710_0.478233628419241"},"_hasShrinkwrap":false},"3.4.1-incr-3.4.x.20211202196":{"name":"alpheios-embedded","version":"3.4.1-incr-3.4.x.20211202196","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.6.0","@babel/core":"^7.16.0","@babel/plugin-proposal-object-rest-spread":"^7.16.0","@babel/plugin-transform-modules-commonjs":"^7.16.0","@babel/plugin-transform-runtime":"^7.16.4","@babel/preset-env":"^7.16.4","@babel/register":"^7.16.0","@babel/runtime":"^7.16.3","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.4.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.2.3","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.2","command-line-args":"^5.2.0","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.7","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.25.3","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.20.0","fibers":"^5.0.0","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.44.0","sass-loader":"^10.2.0","shx":"^0.3.3","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.64.4","webpack-bundle-analyzer":"^4.5.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.3","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"9ebbd3a68d927203bdffcc1cb7edfe458f965c35","_id":"alpheios-embedded@3.4.1-incr-3.4.x.20211202196","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-1RgHdVI9A3KRo+/L2qxxh+yr+Wuydd5RfmPyi/aPe+8VEZK/KaH/hZX2aq3fNXJgAujuzODoPl/B4Ssn88fmow==","shasum":"05577647b8c3ace47af0df8d1e80aa0d5257a11e","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.4.1-incr-3.4.x.20211202196.tgz","fileCount":18,"unpackedSize":140023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqGhUCRA9TVsSAnZWagAAy+UP/Rgp57BmygZYhs1Pb7yN\nYKDyB8Q5EKxng1nMp0bNEgd4tjxA61352M/DT6kbJCZ9NEI5BgQSzFA+S753\nxeMpuN7SNAZ6cFMIXibe2eHNJsYGL7P6F4hd5kWemcn3w+peWGoZQm0lZCH+\nK2yBR4RCLbC0A4daWUSDgBBo/y3S09J3HHtQ39IxZlF2xSu1ZRjYpYLmlSYl\nYSY4co9vOxxWd+0KKy2lfh2tfaIlxjQ37Cn0cmrpy6aBbu2NMSILRkxFyHKT\nKNJJ0g7Yr1q9oYVXUcbgVrOc2zIsgdB7JiozAcSXoannTuL2THn7j7E+qzcN\ndWkzGewKIrNuT7+re5mp19VLoz8M4CS+bZgyWF10KVVJFPDO8On7kT93iFll\nwX4tZVg7qC1BZWkK3BJXS6tmUKhC6zeVQhAUwUaTZ74o2uEkGu4KteO3Ona+\nPFN+Eo7A6XMJM4k3AWJ/uZvWtKatcrvcDtvS6UqFWNsdx362MuGdjy60b2Nw\nJwpDdeJbe6NnsNgceRbSi5aB2CFJMmcQIvGR/DTpw+e2UYJbE1XxMjUWg0Bg\nAsTpgQSsTtb+EZKKgJy9nEvwacgeTWwP9rOLme7fjwo5XuQKGVpwYoE67tnA\nFPU/JpMGaqGp8CqljvV9PVPUIw+lC5/nLUBC3ThynBBVDzf661tOFahP0pIP\nV7Q6\r\n=zR/L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0ajJQE+jYK2QEy9DCSR1oz49KIkvsT8/k9i4zcDHVQgIhAJTxd/T6/soRM2A+YH/uVTFt/VVu2orTgG2EilwRX45B"}]},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.4.1-incr-3.4.x.20211202196_1638426707959_0.7559090022857062"},"_hasShrinkwrap":false},"3.4.2-incr-3.4.x.20220429024":{"name":"alpheios-embedded","version":"3.4.2-incr-3.4.x.20220429024","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps@v2.0.2 alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.7.0","@babel/core":"^7.17.9","@babel/plugin-proposal-object-rest-spread":"^7.17.3","@babel/plugin-transform-modules-commonjs":"^7.17.9","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@babel/register":"^7.17.7","@babel/runtime":"^7.17.9","@vue/compiler-sfc":"^3.2.33","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.4.x","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^5.3.1","babel-eslint":"^10.1.0","babel-loader":"^8.2.5","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.2","command-line-args":"^5.2.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.7","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.26.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.20.0","fibers":"^5.0.1","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.51.0","sass-loader":"^10.2.1","shx":"^0.3.4","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.72.0","webpack-bundle-analyzer":"^4.5.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.3","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"37950d921bed75392692829f4e42a81f6ede06e9","_id":"alpheios-embedded@3.4.2-incr-3.4.x.20220429024","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-uIRD76J4ONnwCD978pK1omh9lYPBgVI33UqJMYKhOaP5djaGVRH8maVtZ9gg2kJv0/PEkgmEmVH/s7Tozk4bzQ==","shasum":"6ba1b8b75bbf7b3f779f2584894776c28e138972","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.4.2-incr-3.4.x.20220429024.tgz","fileCount":18,"unpackedSize":140100,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAITLVdtTUBHlPDLNzHhsUYGeswb5kjb66PaTzVQyMUQAiBVnSgGC7Lq3cgAUIkMmnRgzOmSq5xDZT3OzRMsDRCyHQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiazX4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLzw/+I111+LenImMkJLvF7Z9GECFXW5ko8UluRhv1BZopDUeY7+RG\r\n8UgKsK5W8VkATsVDbx/QJk6HkMo7ZcudR0dKsSv9j1hvNsO2OQvAEiaucO1g\r\nMr4a3i6YU/h26nZoCw/NwT4k4dd+lGbNS9G7tIoHc7abewsMRbDXyaDr/nJC\r\nsf0KI++qACMqUr3biyqjBE0m5ttqngva653Kcgxvnf53ndcBGnELw2VOTMbX\r\nKEw7/A9pM9oMHx9QCknQWfzUg/EhJZrRg0hrjOsF/ctIuKfXEVFkowUA6wgM\r\nwXP9ZUruVHTO+KPQvWgeUFekOe8xRAQH/1ET7kIObq47jhS112i7icRxyQYu\r\nslDhY1mF34IIgVsxn63okOM4r0uwROOhqTPZHBfaxmTBCzpdQFuI4i890QGg\r\nr2bMJ2WQKccbW2lF23NUqUHsAR7r0XJpKAUZFqT1/oxuHCqQ0b8CRq00nGRU\r\nGlgzmCY2JVKaFa9nSewRMnvaV6/TmDoGeOUnlYviX/oa7iZcMBYx2hLBb+l4\r\nYWuAgcVT7BTfQfADeE791hfBSQD8zTO6YxzTFHvk64rpcNV87r3TdOfdWg9v\r\nxUhGPlFNUAR2dDosjIIycMSCmevHe1d2C0AM3jaS9ndavjfQNFKJguilA3oV\r\n35VH1KqovzpmtI+DWUmvPP7qsUy2iEEKAsk=\r\n=o5qT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.4.2-incr-3.4.x.20220429024_1651193336024_0.5103279471381861"},"_hasShrinkwrap":false},"3.4.2-incr-3.4.x.20220504210":{"name":"alpheios-embedded","version":"3.4.2-incr-3.4.x.20220504210","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps@v2.0.2 alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.7.0","@babel/core":"^7.17.10","@babel/plugin-proposal-object-rest-spread":"^7.17.3","@babel/plugin-transform-modules-commonjs":"^7.17.9","@babel/plugin-transform-runtime":"^7.17.10","@babel/preset-env":"^7.17.10","@babel/register":"^7.17.7","@babel/runtime":"^7.17.9","@vue/compiler-sfc":"^3.2.33","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.4.x","alpheios-node-build":"git+https://github.com/alpheios-project/node-build.git#v5","archiver":"^5.3.1","babel-eslint":"^10.1.0","babel-loader":"^8.2.5","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^5.0.1","command-line-args":"^5.2.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^6.7.1","css-minimizer-webpack-plugin":"^3.4.1","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.26.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.20.0","fibers":"^5.0.1","fs-extra":"^10.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^8.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^10.0.1","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^2.6.0","node-sass":"^7.0.1","onchange":"^7.1.0","path":"^0.12.7","postcss":"^8.4.13","postcss-import":"^14.1.0","postcss-loader":"^6.2.1","postcss-safe-important":"^1.2.1","postcss-scss":"^4.0.4","raw-loader":"^4.0.2","sass":"^1.51.0","sass-loader":"^12.6.0","shx":"^0.3.4","source-map-loader":"^3.0.1","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.72.0","webpack-bundle-analyzer":"^4.5.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.3","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"e7f022a6adfb60c326eb5f7aecf643a99e521588","_id":"alpheios-embedded@3.4.2-incr-3.4.x.20220504210","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-YHqMuH2PJCTmTda1dmve1dqBZNJRM8+G+GWAPcDR03xUO8KPx9V4wxsCi216zrFuECvSNVp3AgMo8p7/9wQ+HA==","shasum":"5805f4bfd0461ee3fef7ea95d7971e6143a46814","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.4.2-incr-3.4.x.20220504210.tgz","fileCount":18,"unpackedSize":140231,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpu0kLp9YITXvObCUxBCOTBPf9+tXoaVNGOt471ycLKAIgPtlRM23yh/dNq0XHXafDxmtnXhm8m54kvieWGrvJXQs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiciSYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrlyw/9FpdYafPwfn6vFaaUVVva0TGhf5QVRIR36HRC8g8IDXjfxS39\r\nNN+v6IrItFhGT95CZ8c6D0ZICpEleFnMFboZt+SrX5vMdD3xomHBLGjBTnXw\r\n3etpnLdotiJ342Wbwr3yFoBStRMxuDbqv2v95tCggvIUpIh7gH5Mi8EtMoRt\r\n+GhoSAqeJkq/HHw+zNSHGQDPU3GlISHzfKqnSSbeRxsAEt6fKYv3Ie4Sjs7A\r\n+lyTSk2Wncu+2JvhdcnzFdy8/cjX7SuEt3qmOkvXYQSZNH50UTlES3yvJJ4o\r\nwY8EEOt/Vgmq8eMbtjsz/fwcZYG8UsgdobJK+0Pt8tPPxV33Bnf1FfKBVuiI\r\nlYBJRoerwbjZgFI2MXhVyP1r/enK38uTaN5tzqxAUiQAy6TRZ5ZMEbHsoctx\r\nrjr84vkKeusZnriZvq978Nba4YcosBOgvudM4/gKx+NXPNVyoTLB9BHcJalG\r\nzLxKarIEngDeBoCjhujVh1SLT+ovwHs+2CpS9+KMzxPl/6lpFOZG2hhR0apn\r\nFvMNgfd60xol6+vw6B1PGK3cDBjNPiJRniymzkT34KrcrVBtj1+tEocm8ttV\r\nru9uwfpQBzk/urMkytSlqS6F0FGiPMIS9opAohb2SqL5Ap929cZG3ixzcNdF\r\n0OhFZRk+0T0+aslI0up2rbsHKGcFLAk/mYg=\r\n=v7m3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.4.2-incr-3.4.x.20220504210_1651647639848_0.7001321118144417"},"_hasShrinkwrap":false},"3.4.5-incr-3.4.x.20220504216":{"name":"alpheios-embedded","version":"3.4.5-incr-3.4.x.20220504216","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps@v2.0.2 alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.7.0","@babel/core":"^7.17.10","@babel/plugin-proposal-object-rest-spread":"^7.17.3","@babel/plugin-transform-modules-commonjs":"^7.17.9","@babel/plugin-transform-runtime":"^7.17.10","@babel/preset-env":"^7.17.10","@babel/register":"^7.17.7","@babel/runtime":"^7.17.9","@vue/compiler-sfc":"^3.2.33","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#incr-3.4.x","alpheios-node-build":"git+https://github.com/alpheios-project/node-build.git#v5","archiver":"^5.3.1","babel-eslint":"^10.1.0","babel-loader":"^8.2.5","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^5.0.1","command-line-args":"^5.2.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^6.7.1","css-minimizer-webpack-plugin":"^3.4.1","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.26.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.20.0","fibers":"^5.0.1","fs-extra":"^10.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^8.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^10.0.1","inspectpack":"^4.7.1","interactjs":"^1.10.11","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^2.6.0","node-sass":"^7.0.1","onchange":"^7.1.0","path":"^0.12.7","postcss":"^8.4.13","postcss-import":"^14.1.0","postcss-loader":"^6.2.1","postcss-safe-important":"^1.2.1","postcss-scss":"^4.0.4","raw-loader":"^4.0.2","sass":"^1.51.0","sass-loader":"^12.6.0","shx":"^0.3.4","source-map-loader":"^3.0.1","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.6.14","vue-template-loader":"^1.1.0","webpack":"^5.72.0","webpack-bundle-analyzer":"^4.5.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.3","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"b114b8065d3eef1ed2c1d8c490ffa3539ca5d7f7","_id":"alpheios-embedded@3.4.5-incr-3.4.x.20220504216","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Rwtz0lOSLkhn6FmTWRzluN9YSlpQowywVbM0tnftGmdzJ/qI5qEgclGCER7vcq6XWRdkHeCFF83Tn2TvChIIzg==","shasum":"82b67f21130a15905586dbbd4e373d364fa2b563","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.4.5-incr-3.4.x.20220504216.tgz","fileCount":18,"unpackedSize":140231,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlK5e0hHog9Rl1V7WcqVUhz9K+SaYsjwSxb6udlLgkzAiEA1W7hxGl9ESF0bw/pI9F9ywSgpklRNd9IyPGdBgKBnkU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicidPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5xw//X0OmGX5/WcHCA0r0jD4ayq+t4gyyiuYdhLdICwIhVJUwh/Tf\r\nALFMte2wQXnh73TDgMsVtAjRRoa7n/2WD1Z1325UL3kkiufkQ+MoWP36EoeQ\r\nnrIDgSq1mSF/SG5YYb0HfyJCUu70uhhh/c/RErn5EnKYIs5t8HYrZIU2cPl2\r\nTDbWkzgJbDVctnaatfwOkR1Pq3VRq7ajefrjG/Ht0g0FgTzTYcafTCW1shDf\r\nVVQzrhoFqb2jZ++O7l81HNP1cd4fvUseTStcYVf2rCY8HodatyHOHhl+xn3P\r\nOC5gPccWjn02djMO2s0opU3s7LcYq5E85T+UusYDCyeVaBrMRcbGsBe9oMhE\r\ni7rfcEbTSFm3E+CzSdEbp2YNpcms278Pe2ago/OK7E5LPWQyHnvtHEYYyoG1\r\nZyzWd/XT+Fkv3/2BqgIBS4KFezKSqzATVqi2UTPOeP15TPP8K+KgT1Eat6QQ\r\ntBSE76xHP8OBuusXNDTKUrjad7vOGO/DNyvgQ72F3RdjkHh/w3wtCSdv9zxb\r\nsT0919Yxgo3+Vw0CjrCREVwiTdz+IOLB8bAeSv9zplMFYtdFWKXhDAieU+sG\r\n1CrRGhhUw8QLihurSW68DwAVK1qrvjlvUwhU3bI/9vMnznGBqT7j54yzeNXa\r\n9yZ/BS4sfL/ogEspgQAez/WCTwQoH3wB3DI=\r\n=rL0G\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.4.5-incr-3.4.x.20220504216_1651648334918_0.12590897561252135"},"_hasShrinkwrap":false},"3.3.1-qa.20230312469":{"name":"alpheios-embedded","version":"3.3.1-qa.20230312469","description":"Alpheios Embedded Library","main":"dist/alpheios-embedded.js","directories":{"doc":"doc"},"scripts":{"set-node-build-deps":"npx install-peerdeps alpheios-node-build --dev --only-peers","test":"jest","build":"npm run build-dev && npm run build-prod","build-prod":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M production -p app -c config.mjs","build-dev":"npm run lint && node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m all -M development -p app -c config.mjs","auth0-env-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/prod --t=dist/auth0 --f=env-embed.js","auth0-env-dev-update":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=../protected-config/auth0/dev --t=dist/auth0 --f=env-embed.js","lint":"eslint --fix src/**/*.js","update-dependencies":"node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/ --t=dist/lib && node --experimental-modules ./node_modules/alpheios-node-build/dist/files.mjs replace --s=./node_modules/alpheios-core/packages/components/dist/style --t=dist/style","build-experimental":"node --experimental-modules ./node_modules/alpheios-node-build/dist/build.mjs -m webpack -M development -p app -c config.mjs","dev":"npm run build-experimental && http-server -c-1 -p 8888 & onchange src -- npm run build-experimental","conventional-commit":"npx git-cz","version-set-major":"npm version major","version-set-minor":"npm version minor","version-set-patch":"npm version patch","tagged-commit":"node --experimental-modules --experimental-json-modules ./tagged-commit.mjs","github-build":"node --experimental-modules --experimental-json-modules ./github-build.mjs"},"repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"author":{"name":"The Alpheios Project, Ltd."},"license":"ISC","bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"homepage":"https://github.com/alpheios-project/wordsvc#readme","devDependencies":{"@actions/core":"^1.10.0","@babel/core":"^7.21.0","@babel/plugin-proposal-object-rest-spread":"^7.20.7","@babel/plugin-transform-modules-commonjs":"^7.21.2","@babel/plugin-transform-runtime":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@babel/runtime":"^7.21.0","alpheios-core":"git+https://github.com/alpheios-project/alpheios-core.git#qa","alpheios-node-build":"github:alpheios-project/node-build#v4","archiver":"^4.0.2","babel-eslint":"^10.1.0","babel-loader":"^8.3.0","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-module-resolver":"^4.1.0","chalk":"^4.1.2","command-line-args":"^5.2.1","copy-webpack-plugin":"^6.4.1","coveralls":"^3.1.1","css-loader":"^5.2.7","cz-conventional-changelog":"^3.3.0","eslint":"^7.32.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.27.5","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.20.0","fibers":"^5.0.3","fs-extra":"^9.1.0","git-branch":"^2.0.1","http-server":"^0.12.3","imagemin":"^7.0.1","imagemin-jpegtran":"^7.0.0","imagemin-optipng":"^8.0.0","imagemin-svgo":"^8.0.0","inspectpack":"^4.7.1","interactjs":"^1.10.17","jest":"^26.6.3","jest-fetch-mock":"^3.0.3","mini-css-extract-plugin":"^1.6.2","onchange":"^7.1.0","optimize-css-assets-webpack-plugin":"^5.0.8","path":"^0.12.7","postcss-import":"^13.0.0","postcss-loader":"^4.3.0","postcss-safe-important":"^1.2.1","postcss-scss":"^3.0.5","raw-loader":"^4.0.2","sass":"^1.59.2","sass-loader":"^10.4.1","shx":"^0.3.4","source-map-loader":"^1.1.3","style-loader":"^2.0.0","url-loader":"^4.1.1","vue-loader":"^15.10.1","vue-style-loader":"^4.1.3","vue-svg-loader":"^0.16.0","vue-template-compiler":"^2.7.14","vue-template-loader":"^1.1.0","webpack":"^5.76.1","webpack-bundle-analyzer":"^4.8.0","webpack-cleanup-plugin":"^0.5.1","webpack-dev-server":"^3.11.3","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.1.0","npm":">= 6.13.0"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"transformIgnorePatterns":["node_modules/alpheios-core/packages/components/"]},"eslintConfig":{"env":{"browser":true,"node":true},"parser":"babel-eslint","parserOptions":{"sourceType":"module","ecmaVersion":2019,"allowImportExportEverywhere":true}},"eslintIgnore":["**/dist"],"dependencies":{},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"readme":"# Alpheios Embedded Library\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThe Alpheios Embedded Library is a javascript library that provides complete Alpheios functionality on any page to which it has been added without the need for the end-users of the page to install the Alpheios browser extensions. It provides clickable access to dictionary entries, morphological analyses, inflection tables and grammars for Latin and Ancient Greek. A subset of these resources are available for Classical Arabic and Persian with additional languages and resources currently under development.\n\nThe library is fully open source under [ISC License](https://opensource.org/licenses/ISC) and can be easily extended with support for additional languages if web services adhering to Alpheios service APIs are or can be made available.  Documentation on how to do so is forthcoming. In the meantime please contact us (contact info available at https://alpheios.net/) if you are interested in extending the language support.\n\nUse of this library is governed by the [Alpheios API Terms of Service](http://www.alpheios.net/pages/apiterms/). Please review those terms before using it.\n\nThe library has been tested under the latest releases (as of September 2019) of the Chrome, Firefox and Safari browsers on desktops/laptops and mobile devices. Internet Explorer and proprietary mobile device browsers are not supported.\n\n## Adding Alpheios to your page\n\nFor most websites, we recommend that you include Alpheios by referencing the library and its related files from the Content Delivery Network (CDN). This is the least complicated setup.  The following steps are the minimum needed to activate the default Alpheios functionality for your page, pulling the Alpheios code from the CDN. Later sections describe alternate configurations using the library from a local installation.\n\nThe [sample-cdn.html](sample-cdn.html) file at the root of this directory uses this setup.\n\n1. Make sure you include the following `meta` elements in the `<head>` of your page\n\n```\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n2. Add the link the stylesheet for the alpheios components library to the `<head>` of your page:\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css\"/>\n```\n\n3. Add the following Javascript to your page to import the Embedded Library code and dependencies and activate it. Normally a good place to put this is at the end of the `<body>` element.\n\n```\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'cdn'\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n3. **VERY IMPORTANT** in your copy of the above activation code, replace the `null` value for the clientId parameter with a unique string identifying your site. For now, this can be any string you choose. In the future we may assign clientIds to registered users of the Alpheios Embedded Library.\n\n\n4. Add the CSS class `alpheios-enabled` to any elements on your site's page(s) for which you would like Alpheios to be active. E.g.\n\n```\n<div class=\"alpheios-enabled\">\n<p lang=\"lat\">Arma virumque canō...</p>\n</div>\n```\n\n5. Add the `lang` attribute identifying the language of your text.\n\nWhen a user looks up a word by double-clicking or tapping on it on the page, Alpheios looks for the presence of a `lang` attribute on the enclosing element and its parent and ancestor elements. If it does not find it, it will use the user's default preferred language. To ensure Alpheios identifies the correct language for your text, particularly if your page contains text in multiple languages, add the `lang` attribute on a parent or ancestor element of the text. The attribute value should be the ISO 639-2 3-character language code. The following languages are currently supported:\n\nLanguage|ISO Code\n--------|--------\nLatin | lat\nAncient Greek | grc\nClassical Arabic | ara\nPersian | per\nAncient Ethiopic | gez\nChinese | zhu, zh, zh-Hant, zh-Hans\nSyriac | syc, syr, syr-Syrj\n\n```\n\nExample:\n\n<div class=\"alpheios-enabled\">\n  <p lang=\"grc\">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>\n  <p lang=\"lat\">Arma virumque canō</p>\n  <p lang=\"ara\" dir=\"rtl\">بسماللهالرحمنالرحيم</p>\n  <p lang=\"per\" dir=\"rtl\">الا یا ایها الساقی ادر کاساً و ناولها</p>\n</div>\n```\n\n6. Add the `data-alpheios-ignore=all` attribute to any subsections of your page on which Alpheios should NOT be active.\nBy default, Alpheios will be active for the entire contents, including children elements, of any element with the `alpheios-enabled` class. If your page is made up of more than just the Latin (or Greek, etc.) text that you want your users to read, then it can sometimes be necessary to tell Alpheios to ignore subset of the page. The following example tells Alpheios to be inactive for the instructional text in English, but active for everything else in the parent `div` element.\n\n```\n<div class=\"alpheios-enabled\" lang=\"lat\">\n<p>Arma virumque canō...</p>\n<p lang=\"eng\">(You can double-click on any Latin word on the page to see the Alpheios features)</p>\n<p>...Trōiae quī prīmus ab ōrīs</p>\n</div>\n```\n\nAfter you have made the above changes to your website page(s), when you load your page in the browser, the Alpheios toolbar should appear and the sections of text you specified should have Alpheios activated for them.  On a desktop/laptop computer, double-clicking on an enabled word should produce the popup and on a mobile device, doing a long tap on a word should produce the panel.\n\n\n## Customizing Alpheios Functionality\n\nIn addition to the required clientId property, the object that is passed to the Alpheios `Embedded` constructor can contain a number of other optional properties to customize the behavior of the library for your page.\n\n```\n        new Embedded({}).activate();\n```\n\n\nThe full available list of properties for this configuration object are as follows:\n\n```\n   {\n     clientId:               a unique identifier string for the embedding site or client\n                             Required.\n     documentObject:         the parent document.\n                             Optional.\n                             Default: window.document\n     enabledSelector:        a CSS Selector string identifying the page elements for which Alpheios should be activated.\n                             Optional.\n                             Default: \".alpheios-enabled\"\n     disabledSelector:       a CSS Selector string identifying the page elements for which Alpheios should be deactivated\n                             Optional.\n                             Default: \"[data-alpheios-ignore=all]\"\n     enabledClass:           a CSS class to apply to alpheios enabled elements\n                             Optional.\n                             Default: \"\"\n     disabledClass:          a CSS class to apply to alpheios disabled elements\n                             Optional.\n                             Default: \"\"\n     mobileTriggerEvent:     the DOM event to which Alpheios functionality should be attached on mobile devices\n                             Optional.\n                             Default: longtap\n     desktopTriggerEvent:    the DOM event to which the Alpheios functionality should be attached on desktop/laptop browsers\n                             Optional.\n                             Default: dblclick\n     triggerPreCallback:     a callback function which is called when the trigger event handler is invoked, prior to initiating\n                             Optional.\n                             Alpheios functionality. It should return true to proced with lookup or false to abort.\n                             Default: no-op, returns true\n      popupInitialPos:       The initial position of the Alpheios popup (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10vh', left: '10vw'}\n      toolbarInitialPos      The initial position of the Alpheios panel (on desktop/laptop devices)\n                             Optional.\n                             Default: { top: '10px', right: '15px'}\n      actionPanelInitialPos: The initial position of the Alpheios action panel (on mobilde devices)\n                             Optional.\n                             Default: { bottom: '120px', right: '20px'}\n      layoutType:            a preconfigured layout (currently the only supported values are 'default' and 'readingTools'\n                             Optional.\n                             Default: 'default' ('readingTools' is used for the Alpheios Mobile Reader)\n      disableTextSelection:  can be used to disable default browser text selection behavior (not recommended)\n                             Optional.\n                             Default: false\n      textLangCode:          Can be used to specify which language should be used for lookups from the toolbar\n                             Optional.\n                             Default: null\n      overrideHelp:          Set this to true if you want to replace the Alpheios default help function with your own.\n                             Optional.\n                             Default: false\n      simpleMode:            Set this to true if you want the Alpheios UI to default to Simple Mode.\n                             Optional.\n                             Default: false\n  }\n\n```\n\nSome common scenarios which motivate use of one or more of these optional configuration properties are described further below\n\n\n**1. Tell Alpheios which language to use for toolbar lookups**\n\nUsers can enter words they want to look up directly into the lookup field on the Alpheios toolbar. By default, Alpheios will use the user's preferred page language to interpret these lookups.  You can override this behavior and identify the default language for lookups from the toolbar by specifying the `textLangCode` property, set to the ISO 639-2 3-character language code for the language.  For example, to configure Alpheios to default to Greek for lookups on your page:\n\n```\nnew Embedded({\n    clientId: 'myclientid',\n    textLangCode: 'grc'\n}).activate();\n```\n\n\n**2. Tell Alpheios the page elements for which it should be active**\n\nBy default Alpheios will be only be enabled on elements (and their children) matching the CSS selector \".alpheios-enabled\". You can use a different CSS selector by including the `enabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be enabled on all elements which have the class `myalpheioselements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    enabledSelector: \".myalpheioselements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**3.Tell Alpheios to ignore certain page elements**\n\nBy default, Alpheios will deactivate itself for any elements on the page, even if they are children of the activated elements, if they have the attribute `data-alpheios-ignore=\"all\"`. So the simplest way to tell Alpheios to ignore an element is to add the `data-alpheios-ignore=\"all\"` attribute name/value pair to the element. However, if you prefer, you can specifiy additional elements to ignore by including the `disabledSelector` property in the `Embedded` constructor configuration object.\n\nFor example, to configure Alpheios to be disabled on all elements which have the class `mydisabledelements`:\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    disabledSelector: \".mydisabledelements\"\n})\n```\n\nSee also the [demo/index.html](index.html) file in the demos directory.\n\n**4. Tell Alpheios to use a different trigger event**\n\nBy default, the `dblclick` event triggers Alpheios functionality on desktop/laptop devices, and a `longtap` event triggers Alpheios functionality on mobile devices. If this conflicts with your site's features, you can choose a different event by including the `desktopTriggerEvent` and/or `mobileTriggerEvent` property in the `Embedded` constructor configuration object. You may find you need to use this in combination with the `triggerPreCallback` argument which specificies a callback which is executed prior to executing the Alpheios trigger. For example, if you wanted to use a `Ctrl+Click` to activate Alpheios on the desktop, you would have to have code in a `triggerPreCallback` function which kept track of whether or not the user had pressed the `Ctrl` key prior to clicking.\n\nSee also the [demo/ctrlclick.html](ctrlclick.html) file in the demos directory.\n\n**5. Use your own Help function**\n\nThe Alpheios toolbar has a help icon which opens our standard help panel (desktop)/popup (mobile). You may wish to write your own help instructions for users of your site. You can override the default Alpheios help behavior by setting `overrideHelp:true` in the `Embedded` constructor configuration object.  This will disable the Alpheios handler for user clicks/taps on the Alpheios help icon. You will then need to write your own Javascript function and add a handler to the Alpheio help icon, which is identified by the css class `alpheios-toolbar__help-control`.  \n\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n})\n\n...\n\nlet helpControl = document.querySelector(\".alpheios-toolbar__help-control\")\nif (helpControl) {\n    helpControl.addEventListener('click', function() { alert('This is a custom help popup.') })\n}\n```\n\n**6. Simplify the Alpheios interface -- BETA FEATURE**\n\nIf you do not wish to expose your site's users to the full Alpheios feature set, but still would like to give them access to the morphological details and short definitions for words, you can set `simpleMode:true` in the `Embedded` constructor configuration object.  This will reduce the Alpheios interface to just the morphology popup/panel.  We recommend you use this feature in combination with `overrideHelp:true` (described above) because the default help screen describes the full Alpheios feature set.\n\n```\nnew Embedded({\n    clientId: \"myclientid\",\n    overrideHelp: true\n    simpleMode: true\n})\n```\n\nSee also the [demo/simple.html](simple.html) file in the demos directory.\n\n**7. Use your own branding on the Alpheios interface -- BETA FEATURE**\n\nYou may wish to rebrand the Alpheios interface with different colors and fonts.  This feature is still experimental. See our [skinning documentation](docs/skinning.md) for further details.\n\nSee also the [demo/skinned.html](skinned.html) file in the demos directory.\n\n## Alternate Installation Configurations\n\nAlthough we recommend you include the Alpheios Embedded Library by referencing the latest version from the CDN, if you have a need to use a specific version or to install it as part of your web application, you can do so.\n\n**1. Use a different CDN version**\n\nWe will update the Alpheios Embedded Library and its dependencies from time to time, and if you use the `@latest` tag to include Alpheios, your page will automatically get the latest code.  If you wish to insulate your page from releases of the Alpheios functionality, you can do so by referencing the specific version of the code you wish to include.\n\nFor example, to freeze your installation at the `3.0.0-rc.2` version of the Alpheios Embedded Library, and the `1.2.45` version of the Alpheios Components Library dependency, you would use the following code. Note that instead of using the `cdn` mode when importing the dependencies, you need to use `custom` and also specify the explicit versioned url for the `alpheios-components.min.js` via the `libs` object.\n\n```\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"https://cdn.jsdelivr.net/npm/alpheios-embedded@3.0.0-rc.2/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"https://cdn.jsdelivr.net/npm/alpheios-components@1.2.44/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n**2. Use a local installation**\n\nIf your web site is a web application using its own javascript libraries, you may prefer to install Alpheios as part of your own environment.  You can install the Alpheios Embedded library using NPM, via `npm install` and then you can configure a custom path to the library and its dependencies.\n\nFor example, if your environment installs its javascript npm dependencies at the path `/assets/node_modules` you would use the following configuration:\n\n```\n<link rel=\"stylesheet\" href=\"/assets/node_modules/alpheios-components/dist/style/style-components.min.css\"/>\n\n<script type=\"text/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n      import (\"/assets/node_modules/alpheios-embedded/dist/alpheios-embedded.min.js\").then(embedLib => {\n        window.AlpheiosEmbed.importDependencies({\n          mode: 'custom',\n          libs: { components: \"/assets/node_modules/alpheios-components/dist/alpheios-components.min.js\" }\n        }).then(Embedded => {\n          new Embedded({clientId: null}).activate();\n        }).catch(e => {\n          console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)\n        })\n\n      }).catch(e => {\n        console.error(`Import of Alpheios Embedded library failed: ${e}`)\n      })\n    });\n</script>\n```\n\n\n## Advanced Alpheios Functionality\n\n**1. Connect a Treebank**\n\nIf your text has been aligned with a treebank annotation, Alpheios can be instructed to display the corresponding treebank data.\n\n1. Deploy your treebank data using the [Perseids Treebank Template](https://perseids-publications.github.io/treebank-template/getting-started).\n\n2. Align your text according to the [Alpheios Integration Instructions](https://perseids-publications.github.io/treebank-template/examples/alpheios-integration).\n\n**2. Add an Aligned Translation**\n\n**NB: This is experimental functionality. Instructions and syntax for configuration, etc. are currently in flux.**\n\nSee also the [demo/treebank-translation.html](treebank-translation.html) file in the demos directory.\n\nYou can include an aligned translation in your page and have Alpheios activate mouseover highlighting of the aligned words or phrases. Use the `data-alpheios_align_ref` attribute on elements which have been aligned.\n\nThe attribute value should be is a space separated list of CSS selectors for the elements within the same page which contain the aligned translation. It can be bi-directional or uni-directional.\n\nIn the following example, the Latin word `cupidinibus` in a child of the element with the id `aligned-text-lat` is aligned to the English words `by` and `passion` which are children of the element with the id `aligned-text-eng`. Similarly the English words are reverse-aligned to the Latin.  When Alpheios is active in a page with this data, mousing over the word `cupidnibus` will highight `by` and `passion` and vice-versa. Clicking on a highlighted word will anchor highlight in place until a second click removes it.\n\n```\n<div id=\"aligned-text-lat\" lang=\"lat\">\n  ...\n  <span data-alpheios_align_word=\"s1_w12\"\n    data-alpheios_align_ref=\"#aligned-text-eng *[data-alpheios_align_word=s1_w13],#aligned-text-eng *[data-alpheios_align_word=s1_w15]\">\n    cupidinibus\n  </span>\n  ...\n</div>\n<div id=\"aligned-text-eng\" lang=\"eng\">\n  ...\n  <span  data-alpheios_align_word=\"s1_w13\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    by\n  </span>\n  ...\n  <span class=\"alpheios-aligned-word\" data-alpheios_align_word=\"s1_w15\"\n    data-alpheios_align_ref=\"#aligned-text-lat *[data-alpheios_align_word=s1_w12]\">\n    passion\n  </span>\n  ...\n</div>\n```\n\n## Outstanding Issues\n\nSee our [FAQ pages](http://www.alpheios.net/pages/faq/)\n\n\n## Developer Instructions\n\nSee [BUILD.md](BUILD.md)\n","readmeFilename":"README.md","gitHead":"957de90a00439d0e11f0a97b7ec7d74357a891d1","_id":"alpheios-embedded@3.3.1-qa.20230312469","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-7JnesbsnB39FRHsb89X2VRctzOicdrsoOEoxqElibEeXOmgb44H6zAypHlUmzbLp3sOJOgTbNa8UGW+pIiDtzQ==","shasum":"b5996d65651a41d92e4c436584a4ff126eab0183","tarball":"https://registry.npmjs.org/alpheios-embedded/-/alpheios-embedded-3.3.1-qa.20230312469.tgz","fileCount":18,"unpackedSize":139888,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEMFTkanLvppgChjJXomSDnEbNvlXYSuHfH9X+9OOETQIhANEYMNDAec4SatoXGzgWQy+6b+qLkrzPZpVRO+4z30KU"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDfHzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBeQ//UajLvKU3p2e5/++de7lRu5yFS3r0Ug1EsaUOjHKBvNPHrgmL\r\ns8VFRrX8iHAbkjmLRZOQ2vHjfzJwOD0hC40/2eyFdfcRZwM2Z5RZj497pxbc\r\nVDA+07ldVzAHfNRnUHXvm3GXFU3HI6/NPFQmJzdL7KWlLoF/XY9aw4pB+eqM\r\n3/ZYO2VXSJeTuXTBxDqbVZdRpxlcHxCQtruvbWyxjc/mIy2l6l66A/cvHM7Y\r\n15b92GexJDy0mI/K1iMJ3DhcOm9CwnPzdCIAarSPLbhdaw5EewRrC9dwFcDy\r\n34313q6A/j2rQheQt8F6fZYPncR2DriPII+AQrKbHwFW1MYHV9wcacSHzTIn\r\nVgpMG7F9PkaYzhLuBZAL6mrmfKhFZUxX+GClgP5ZLcqdTTrKIyn0Ow1OX+CV\r\nKbsLmlXAXzEK4D+bDm7YpthwdypgwnhdOHchur/Z4EdIhSrpTWkJaLryhl/7\r\nEzzgICd6JQIM3MutennRmA1TBWP8ly4IuyrtOiKlCeiWk5KEZ7uUCMC3rKn1\r\nGCml0RJBjj0eSSrY2UnCysMzQLJIYOaxw9AvRqe2HTzbuWTpGddOLA1rO/L+\r\nKA1aNtb1q7HgRbKdqBkYlIFZq5q+uV64PfhRQmBP5clOKhtcFyy7UAIW7iob\r\n0omXq9D7dCWMiNUauNuR3FEjg5FP3g0zwVM=\r\n=35sH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alpheios-project","email":"support@alpheios.net"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alpheios-embedded_3.3.1-qa.20230312469_1678635507285_0.1545550131868969"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-04T20:29:22.184Z","0.3.0":"2018-10-04T20:29:22.409Z","modified":"2023-03-12T15:38:27.596Z","0.4.0":"2018-10-05T19:16:53.046Z","0.4.1":"2018-10-11T16:14:55.842Z","0.5.0":"2018-10-12T14:15:59.845Z","0.5.1":"2018-10-12T14:25:15.026Z","0.5.2":"2018-10-12T14:42:53.440Z","0.5.3":"2018-10-12T14:54:38.585Z","0.5.4":"2018-10-15T19:30:04.645Z","0.6.0":"2018-12-18T15:25:57.678Z","0.6.1":"2018-12-18T19:17:55.592Z","1.0.0-beta.0":"2019-05-29T21:40:10.772Z","1.0.0-beta.1":"2019-06-26T16:40:58.618Z","1.0.0-beta.2":"2019-06-26T18:35:49.900Z","3.0.0":"2019-09-05T13:56:58.809Z","3.0.0-beta.1":"2019-09-05T13:59:36.636Z","3.0.0-beta.2":"2019-09-11T12:09:21.188Z","3.0.0-rc.2":"2019-09-18T15:41:39.866Z","3.1.1":"2019-10-03T12:50:58.687Z","3.1.2":"2019-10-15T13:07:10.076Z","3.1.3":"2019-11-19T16:20:57.276Z","3.1.4":"2019-11-19T16:29:46.343Z","3.1.5":"2019-12-10T14:39:20.701Z","3.2.0-dev":"2020-01-28T16:21:41.979Z","3.1.6":"2020-02-05T14:35:26.264Z","3.1.7":"2020-02-17T20:43:48.576Z","3.1.6-dev-cd.20200305534":"2020-03-05T13:50:47.747Z","3.1.6-dev-cd.20200305545":"2020-03-05T14:13:21.038Z","3.1.6-qa.20200305332":"2020-03-05T16:06:35.950Z","3.1.6-qa.20200305423":"2020-03-05T19:08:08.725Z","3.1.6-qa.20200309403":"2020-03-09T18:40:36.855Z","3.1.6-qa.20200309439":"2020-03-09T18:40:55.792Z","3.1.6-qa.20200320372":"2020-03-20T16:29:52.803Z","3.1.6-qa.20200410472":"2020-04-10T19:46:56.652Z","3.1.6-qa.20200514440":"2020-05-14T18:48:23.172Z","3.1.6-qa.20200527420":"2020-05-27T18:08:57.344Z","3.3.0-20200609524":"2020-06-09T21:29:57.171Z","3.3.0-20200609574":"2020-06-18T20:46:30.288Z","3.3.0-qa.20200618500":"2020-06-18T20:48:53.039Z","3.3.0-20200618500":"2020-06-18T20:49:15.629Z","3.3.0-qa.20200807266":"2020-08-07T12:56:32.088Z","3.3.0-qa.20200813461":"2020-08-13T19:23:59.537Z","3.3.0-githubactions.20200814408":"2020-08-14T13:36:22.700Z","3.3.0-qa.20200814435":"2020-08-14T14:29:32.096Z","3.3.1-20200821383":"2020-08-21T12:46:05.740Z","3.3.1-incr-3.3.x.20210326324":"2021-03-26T10:48:18.603Z","3.3.1-incr-3.3.x.20210331295":"2021-03-31T09:50:33.179Z","3.3.1-incr-3.3.x.20210415085":"2021-04-15T02:51:34.971Z","3.3.1-incr-3.3.x.20210629308":"2021-06-29T10:17:04.960Z","3.3.1-incr-3.3.x.20210702316":"2021-07-02T10:32:37.019Z","3.3.1-incr-3.3.x.20210806328":"2021-08-06T10:56:39.800Z","3.4.1-incr-3.4.x.20211126119":"2021-11-26T03:57:40.282Z","3.4.1-incr-3.4.x.20211126130":"2021-11-26T04:19:46.859Z","3.4.1-incr-3.4.x.20211202196":"2021-12-02T06:31:48.157Z","3.4.2-incr-3.4.x.20220429024":"2022-04-29T00:48:56.192Z","3.4.2-incr-3.4.x.20220504210":"2022-05-04T07:00:40.027Z","3.4.5-incr-3.4.x.20220504216":"2022-05-04T07:12:15.052Z","3.3.1-qa.20230312469":"2023-03-12T15:38:27.467Z"},"maintainers":[{"name":"alpheios-project","email":"support@alpheios.net"},{"name":"balmas","email":"balmas@gmail.com"},{"name":"irinaskl0609","email":"irina060981@yandex.ru"}],"description":"Alpheios Embedded Library","homepage":"https://github.com/alpheios-project/wordsvc#readme","repository":{"type":"git","url":"git+https://github.com/alpheios-project/wordsvc.git"},"bugs":{"url":"https://github.com/alpheios-project/wordsvc/issues"},"license":"ISC","readme":"","readmeFilename":"","author":{"name":"The Alpheios Project, Ltd."}}