package Ġnet . shar pl ab . ep ub translator . app . config Ċ Ċ import Ġnet . shar pl ab . ep ub translator . app . E Pub Translator Setting Ċ import Ġnet . shar pl ab . ep ub translator . core . driver . ep ub . E Pub Reader Ċ import Ġnet . shar pl ab . ep ub translator . core . driver . ep ub . E Pub Writer Ċ import Ġnet . shar pl ab . ep ub translator . core . driver . translator . Deep L Translator Ċ import Ġnet . shar pl ab . ep ub translator . core . driver . translator . Translator Ċ import Ġnet . shar pl ab . ep ub translator . core . provider . ep ub . Default E Pub Content File Provider Ċ import Ġnet . shar pl ab . ep ub translator . core . provider . ep ub . E Pub Chapter Provider Ċ import Ġjava . util .* Ċ import Ġjavax . enterprise . context . Dependent Ċ import Ġjavax . enterprise . inject . Produces Ċ Ċ @ Dependent Ċ class ĠApp Config ( private Ġval Ġe Pub Translator Setting : ĠE Pub Translator Setting ) Ġ{ ĊĠĠĠ Ġ@ Produces ĊĠĠĠ Ġfun Ġtranslator (): ĠTrans lator Ġ{ ĊĠĠĠĠĠĠĠ Ġvar Ġapi Endpoint Ġ= Ġe Pub Translator Setting . deep L Api Endpoint ĊĠĠĠĠĠĠĠ Ġval ĠapiKey Ġ= Ġe Pub Translator Setting . deep L ApiKey ĊĠĠĠĠĠĠĠ Ġif ( api Endpoint Ġ== Ġnull ){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthrow ĠRuntimeException (" e Pub Translator . deep L . api Endpoint Ġmust Ġbe Ġprovided Ġin Ġapplication . yml ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġif ( apiKey Ġ== Ġnull ){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthrow ĠRuntimeException (" e Pub Translator . deep L . apiKey Ġmust Ġbe Ġprovided Ġin Ġapplication . yml ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn ĠDeep L Translator ( api Endpoint , ĠapiKey ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Produces ĊĠĠĠ Ġfun Ġe Pub Reader (): ĠE Pub Reader Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontent File Providers Ġ= ĠlistOf ( E Pub Chapter Provider (), ĠDefault E Pub Content File Provider ()) ĊĠĠĠĠĠĠĠ Ġreturn ĠE Pub Reader ( content File Providers ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Produces ĊĠĠĠ Ġfun Ġe Pub Writer (): ĠE Pub Writer Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠE Pub Writer () ĊĠĠĠ Ġ} Ċ Ċ }