{ "version": 3, "sources": ["src/app/book-reader/_services/book.service.ts"], "sourcesContent": ["import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { TextResonse } from 'src/app/_types/text-response';\r\nimport { environment } from 'src/environments/environment';\r\nimport { BookChapterItem } from '../_models/book-chapter-item';\r\nimport { BookInfo } from '../_models/book-info';\r\n\r\nexport interface FontFamily {\r\n /**\r\n * What the user should see\r\n */\r\n title: string;\r\n /**\r\n * The actual font face\r\n */\r\n family: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class BookService {\r\n\r\n baseUrl = environment.apiUrl;\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n getFontFamilies(): Array {\r\n return [{title: 'default', family: 'default'}, {title: 'EBGaramond', family: 'EBGaramond'}, {title: 'Fira Sans', family: 'Fira_Sans'},\r\n {title: 'Lato', family: 'Lato'}, {title: 'Libre Baskerville', family: 'Libre_Baskerville'}, {title: 'Merriweather', family: 'Merriweather'},\r\n {title: 'Nanum Gothic', family: 'Nanum_Gothic'}, {title: 'RocknRoll One', family: 'RocknRoll_One'}, {title: 'Open Dyslexic', family: 'OpenDyslexic2'}];\r\n }\r\n\r\n getBookChapters(chapterId: number) {\r\n return this.http.get>(this.baseUrl + 'book/' + chapterId + '/chapters');\r\n }\r\n\r\n getBookPage(chapterId: number, page: number) {\r\n return this.http.get(this.baseUrl + 'book/' + chapterId + '/book-page?page=' + page, TextResonse);\r\n }\r\n\r\n getBookInfo(chapterId: number) {\r\n return this.http.get(this.baseUrl + 'book/' + chapterId + '/book-info');\r\n }\r\n\r\n getBookPageUrl(chapterId: number, page: number) {\r\n return this.baseUrl + 'book/' + chapterId + '/book-page?page=' + page;\r\n }\r\n}\r\n"], "mappings": "uGAqBA,IAAaA,GAAW,IAAA,CAAlB,MAAOA,CAAW,CAItBC,YAAoBC,EAAgB,CAAhB,KAAAA,KAAAA,EAFpB,KAAAC,QAAUC,EAAYC,MAEkB,CAExCC,iBAAe,CACb,MAAO,CAAC,CAACC,MAAO,UAAWC,OAAQ,SAAS,EAAG,CAACD,MAAO,aAAcC,OAAQ,YAAY,EAAG,CAACD,MAAO,YAAaC,OAAQ,WAAW,EACpI,CAACD,MAAO,OAAQC,OAAQ,MAAM,EAAG,CAACD,MAAO,oBAAqBC,OAAQ,mBAAmB,EAAG,CAACD,MAAO,eAAgBC,OAAQ,cAAc,EAC1I,CAACD,MAAO,eAAgBC,OAAQ,cAAc,EAAG,CAACD,MAAO,gBAAiBC,OAAQ,eAAe,EAAG,CAACD,MAAO,gBAAiBC,OAAQ,eAAe,CAAC,CACvJ,CAEAC,gBAAgBC,EAAiB,CAC/B,OAAO,KAAKR,KAAKS,IAA4B,KAAKR,QAAU,QAAUO,EAAY,WAAW,CAC/F,CAEAE,YAAYF,EAAmBG,EAAY,CACzC,OAAO,KAAKX,KAAKS,IAAY,KAAKR,QAAU,QAAUO,EAAY,mBAAqBG,EAAMC,CAAW,CAC1G,CAEAC,YAAYL,EAAiB,CAC3B,OAAO,KAAKR,KAAKS,IAAc,KAAKR,QAAU,QAAUO,EAAY,YAAY,CAClF,CAEAM,eAAeN,EAAmBG,EAAY,CAC5C,OAAO,KAAKV,QAAU,QAAUO,EAAY,mBAAqBG,CACnE,iDA1BWb,GAAWiB,EAAAC,CAAA,CAAA,CAAA,CAAA,iCAAXlB,EAAWmB,QAAXnB,EAAWoB,UAAAC,WAFV,MAAM,CAAA,CAAA,SAEPrB,CAAW,GAAA", "names": ["BookService", "constructor", "http", "baseUrl", "environment", "apiUrl", "getFontFamilies", "title", "family", "getBookChapters", "chapterId", "get", "getBookPage", "page", "TextResonse", "getBookInfo", "getBookPageUrl", "\u0275\u0275inject", "HttpClient", "factory", "\u0275fac", "providedIn"] }