├── CNAME ├── .gitignore ├── favicon.ico ├── images ├── screenshot1.png ├── screenshot2.png └── screenshot3.png ├── css ├── fontawesome │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ └── font-awesome.min.css ├── googlefonts │ ├── S6uyw4BMUTPHjx4wXg.woff2 │ ├── S6uyw4BMUTPHjxAwXjeu.woff2 │ └── lato.css └── site │ └── style.css ├── js ├── tesseract │ ├── tesseract.min.js.LICENSE.txt │ ├── tesseract.min.js │ └── tesseract.min.js.map ├── site │ └── script.js └── fuse │ └── fuse.js ├── LICENSE ├── README.md └── index.html /CNAME: -------------------------------------------------------------------------------- 1 | www.checkjebon.nl -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | web.config 3 | data/supermarkets/ -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/favicon.ico -------------------------------------------------------------------------------- /images/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/images/screenshot1.png -------------------------------------------------------------------------------- /images/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/images/screenshot2.png -------------------------------------------------------------------------------- /images/screenshot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/images/screenshot3.png -------------------------------------------------------------------------------- /css/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/css/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /css/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/css/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /css/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/css/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /css/googlefonts/S6uyw4BMUTPHjx4wXg.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/css/googlefonts/S6uyw4BMUTPHjx4wXg.woff2 -------------------------------------------------------------------------------- /css/fontawesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/css/fontawesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /css/googlefonts/S6uyw4BMUTPHjxAwXjeu.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supermarkt/checkjebon/HEAD/css/googlefonts/S6uyw4BMUTPHjxAwXjeu.woff2 -------------------------------------------------------------------------------- /js/tesseract/tesseract.min.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ -------------------------------------------------------------------------------- /css/site/style.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | font-family: "Lato", sans-serif; 4 | } 5 | 6 | .caps 7 | { 8 | text-transform: uppercase; 9 | } 10 | 11 | .smallcaps 12 | { 13 | font-variant-caps: all-small-caps; 14 | } 15 | 16 | .strike 17 | { 18 | text-decoration: line-through; 19 | } 20 | 21 | .noline 22 | { 23 | text-decoration: none; 24 | } 25 | 26 | footer { 27 | width: 100%; 28 | } 29 | 30 | footer > div { 31 | box-sizing: border-box; 32 | } 33 | -------------------------------------------------------------------------------- /css/googlefonts/lato.css: -------------------------------------------------------------------------------- 1 | /* latin-ext */ 2 | @font-face { 3 | font-family: 'Lato'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: url(S6uyw4BMUTPHjxAwXjeu.woff2) format('woff2'); 7 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 8 | } 9 | /* latin */ 10 | @font-face { 11 | font-family: 'Lato'; 12 | font-style: normal; 13 | font-weight: 400; 14 | src: url(S6uyw4BMUTPHjx4wXg.woff2) format('woff2'); 15 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 16 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 supermarkt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Checkjebon.nl 2 | 3 | Comparing food prices across multiple supermarkets is made a lot simpler using Checkjebon.nl. Simply scan your receipt, or enter your shopping list manually and you can instantly compare how much you would spend at each supermarket on the exact same products. You can query for generic products like `milk` or be more exact and specify the brand and amount. 4 | 5 | The project can freely be used on https://www.checkjebon.nl/ 6 | 7 | 8 | 9 | This will bring up the amount due per supermarket for the shopping list. 10 | 11 | 12 | 13 | After setting up your shopping list and selecting your preferred supermarket, simply check off items as you collect them from the store. 14 | 15 | 16 | 17 | You can share your current shopping list with family members or friends at any time, or use the sharing functionality to use the shopping list created on your desktop or tablet to your phone as you go out to get groceries. 18 | 19 | # Including in other products 20 | 21 | To include Checkjebon.nl in other products, use the [checkjebon-js](https://github.com/supermarkt/checkjebon-js) library as a starting point. This library will take care of loading the latest data and exposing it in a format that is easy to use. 22 | 23 | # Supported supermarkets 24 | 25 | Checkjebon.nl is aimed at the Dutch market, and currently aims to provide accurate and recent prices for: 26 | 27 | * [AH](https://www.ah.nl/) 28 | * [ALDI](https://www.aldi.nl/) - Note; limited assortment due to not all products being available online. 29 | * [Coop](https://www.coop.nl/) 30 | * [DekaMarkt](https://www.dekamarkt.nl/) - Note; limited assortment due to not all products being available online. 31 | * [Dirk](https://www.dirk.nl/) 32 | * [Hoogvliet](https://www.hoogvliet.com/) 33 | * [Jan Linders](https://www.janlinders.nl/) 34 | * [Jumbo](https://www.jumbo.com/) 35 | * [Picnic](http://picnic.nl/) - Note; no links to products 36 | * [Plus](https://www.plus.nl/) 37 | * [SPAR](https://www.spar.nl/) 38 | * [Vomar](https://www.vomar.nl/) 39 | 40 | Some supermarkets do not provide prices for their products online or are not yet indexed on a daily basis, and therefor are currently not included in the data set: 41 | 42 | * [Boni](https://bonisupermarkt.nl/) - No online assortment. 43 | * [Boon's Markt (MCD)](https://www.boonsmarkt.nl/) - No online assortment. 44 | * [Butlon](https://butlon.com/) - Not yet indexed. 45 | * [Crisp](https://www.crisp.nl/) - No online assortment without an account. 46 | * [Dagwinkel](https://www.lekkermakkelijk.nl/) - Not yet indexed. 47 | * [EkoPlaza](https://www.ekoplaza.nl/) - Not yet indexed. 48 | * [Flink](https://www.goflink.com/) - Not yet indexed. 49 | * [GORILLAS](https://gorillas.io/nl) - No online assortment without an account. 50 | * [Hanos](https://hanos.nl/) - No online assortment without an account. 51 | * [Makro](https://www.makro.nl/) - Not yet indexed. 52 | * [Marqt](https://www.marqt.nl/) - No online assortment. 53 | * [LIDL](https://www.lidl.nl/) - No online assortment. 54 | * [Nettorama](https://www.nettorama.nl/) - No online assortment. 55 | * [Odin](https://www.odin.nl/) - Not yet indexed. 56 | * [Poiesz](https://www.poiesz-supermarkten.nl/) - Not yet indexed. 57 | * [Sligro](https://www.sligro.nl/) - No online assortment without an account. 58 | 59 | # Product selection algorithm 60 | 61 | For any product added to the shopping list, Checkjebon.nl tries to take a best guess at what you actually meant. Sometimes this may result in not seeing what you expect, simply because other products come up cheaper. In general, first an exact match by name is attempted. If there was no exact match, a fuzzy search will be applied, compiling a list of all products that contain the words from the shopping list item. The fuzzy search finds products based on if they contain all the letters from your shopping list item in the same order as they are given, but not necessarily right next to each other. For example, `milk` will find `skiM mILK` as well as `whole MILK`. When an amount in liter or kilogram is given, all products below the given amount are filtered out unless this returns zero results, in which case the filter is undone. Finally, products are first ordered by the string length of the fuzzy search (so `whole MILK`=>4 goes before `skiM mILK`=>6) in an attempt to find the closed possible match, those results are then ordered by price, and finally the top item from that list is returned. 62 | 63 | The algorithm works better when supplying exactly what you are looking for. Note that generic names like `milk` are not well suited for this even though in in day to day live that would be enough to write down since you will make the choice between `skim milk` or `whole milk` once you get to the cooling compartment. The same goes for products like `butter` (`salted butter`, `whipped butter`, `cream butter`, etc). 64 | 65 | When no prices are found for a specific product for any of the given supermarkets, a price estimate is used based on the average price for that product among other supermarkets. 66 | 67 | # Receipt scanning 68 | 69 | When scanning receipts, [Tesseract.js](https://github.com/naptha/tesseract.js/) is used in order to detect text. After that, some processing is done to align the recognized text with true product names. Adjust any errors where necessary. 70 | 71 | # Privacy 72 | 73 | When entering your shopping list, you data never leaves your computer. All processing is done in the browser. This means no one can keep track of your purchases or build an advertisement profile based on your searches. Upon opening Checkjebon.nl, all available prices will be downloaded. You will notice that reloading the page will not empty your shopping list; this is stored in your browser using the [localStorage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). 74 | 75 | # Open data 76 | 77 | Product [price data](https://github.com/supermarkt/checkjebon/blob/main/data/supermarkets.json?raw=true) is updated frequently and may be reused in other projects. For example, you can get a price alert when a product you don't buy often is discounted, such as cleaning supplies or personal care products, or more expensive products with long expiration dates such as (soft) drinks or bake-off pizzas. Data journalists may use the data to see trends or verify claims from supermarkets. 78 | -------------------------------------------------------------------------------- /js/site/script.js: -------------------------------------------------------------------------------- 1 | // Global filters 2 | Vue.filter('formatPrice', function(value) 3 | { 4 | if (value && value > 0) 5 | { 6 | return value.toFixed(2).replace(".", ","); 7 | } 8 | else 9 | { 10 | return "-"; 11 | } 12 | }); 13 | 14 | Vue.filter('formatAmount', function(value) 15 | { 16 | var pattern = new RegExp("([\\d]+) (gram|milliliter)", "i"); 17 | 18 | if (value && pattern.test(value)) 19 | { 20 | var amount = value.match(pattern); 21 | if (amount[2].toLowerCase() == "gram" && amount[1] >= 1000) 22 | { 23 | return (amount[1] / 1000) + " kilogram"; 24 | } 25 | else if (amount[2].toLowerCase() == "milliliter" && amount[1] >= 1000) 26 | { 27 | return (amount[1] / 1000) + " liter"; 28 | } 29 | else 30 | { 31 | return value.toLowerCase(); 32 | } 33 | } 34 | else 35 | { 36 | return value?.toLowerCase(); 37 | } 38 | }); 39 | 40 | Vue.filter('formatCount', function(value) 41 | { 42 | // Add thousand separator 43 | return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); 44 | }); 45 | 46 | Vue.component('share-button', { 47 | template: '#share-button-template' 48 | }); 49 | 50 | Vue.component('supermarket-products', { 51 | template: '#supermarket-products-template', 52 | props: ['supermarket', 'showShareButton'] 53 | }); 54 | 55 | var app = new Vue( 56 | { 57 | el: "#checkjebon", 58 | data: 59 | { 60 | prices: [], 61 | pricesLastUpdated: null, 62 | shoppinglist: "", 63 | products: [], 64 | supermarkets: [], 65 | selectedSupermarket: null, 66 | isSearching: false, 67 | shopMultipleSupermarkets: false, 68 | maxSupermarkets: null, 69 | availableSupermarkets: [], 70 | selectedSupermarketCodes: [], 71 | shoppingPlan: null, 72 | showSupermarketSelection: false 73 | }, 74 | watch: 75 | { 76 | shopMultipleSupermarkets: function(val) 77 | { 78 | if (!val) 79 | { 80 | this.showSupermarketSelection = false; 81 | this.shoppingPlan = null; 82 | } 83 | this.supermarkets = []; 84 | this.selectedSupermarket = null; 85 | this.saveShoppinglist(); 86 | } 87 | }, 88 | methods: 89 | { 90 | loadSupermarkets: async function() 91 | { 92 | try { 93 | this.availableSupermarkets = await checkjebon.getSupermarkets(); 94 | } catch (e) { 95 | console.error("Failed to load supermarkets", e); 96 | } 97 | }, 98 | createShoppingPlan: async function(scrollToResults = true) 99 | { 100 | if (this.selectedSupermarketCodes.length === 0) { 101 | this.shoppingPlan = null; 102 | return; 103 | } 104 | 105 | this.isSearching = true; 106 | const productNames = this.shoppinglist.split("\n").filter(product => product.trim() !== ""); 107 | 108 | try { 109 | const result = await checkjebon.getOptimalShoppingPlan( 110 | productNames, 111 | this.maxSupermarkets, 112 | this.selectedSupermarketCodes 113 | ); 114 | 115 | // Initialize checked state based on originalQuery 116 | result.supermarkets.forEach(s => { 117 | s.products.forEach(p => { 118 | p.checked = p.originalQuery && p.originalQuery.startsWith("x "); 119 | }); 120 | }); 121 | 122 | this.shoppingPlan = result; 123 | // Ensure each supermarket in the shopping plan has totalPrice and notFound properties 124 | this.shoppingPlan.supermarkets = this.shoppingPlan.supermarkets.map(s => ({ 125 | ...s, 126 | products: s.products.map(p => (p)), 127 | totalPrice: s.products.reduce((sum, p) => sum + (p.price || 0), 0), 128 | notFound: s.products.filter(p => p.isEstimate).length 129 | })); 130 | this.selectedSupermarket = null; // Clear single selection 131 | 132 | // Compute aggregate values for the shopping plan 133 | // totalCost: sum of assigned products' prices 134 | this.shoppingPlan.totalCost = this.shoppingPlan.supermarkets.reduce((sum, s) => sum + (s.totalPrice || 0), 0); 135 | 136 | // Compute best single-supermarket total using current product list and selected supermarket codes 137 | try { 138 | const allPricesResults = await checkjebon.getPricesForProducts(productNames); 139 | // Filter to only supermarkets that were selectable for this plan (selectedSupermarketCodes) 140 | const filtered = allPricesResults.filter(s => this.selectedSupermarketCodes.includes(s.code)); 141 | const singleTotals = filtered.map(s => ({ 142 | code: s.code, 143 | name: s.name, 144 | totalPrice: s.products.reduce((sum, p) => sum + (p.price || 0), 0) 145 | })); 146 | if (singleTotals.length > 0) { 147 | const best = singleTotals.reduce((min, s) => s.totalPrice < min.totalPrice ? s : min, singleTotals[0]); 148 | this.shoppingPlan.bestSingleTotal = best.totalPrice; 149 | this.shoppingPlan.bestSingleName = best.name; 150 | this.shoppingPlan.totalSavings = (this.shoppingPlan.bestSingleTotal || 0) - this.shoppingPlan.totalCost; 151 | } else { 152 | this.shoppingPlan.bestSingleTotal = null; 153 | this.shoppingPlan.bestSingleName = null; 154 | this.shoppingPlan.totalSavings = 0; 155 | } 156 | } catch (e) { 157 | console.error('Failed to compute single-shop totals', e); 158 | this.shoppingPlan.bestSingleTotal = null; 159 | this.shoppingPlan.totalSavings = 0; 160 | } 161 | 162 | if (scrollToResults) { 163 | setTimeout(function() 164 | { 165 | document.getElementById("shopping-plan").scrollIntoView({behavior: "smooth", block: "start"}); 166 | }, 100); 167 | } 168 | 169 | } catch (e) { 170 | alert('Er is een fout opgetreden bij het maken van het winkelplan.'); 171 | console.error(e); 172 | } 173 | this.isSearching = false; 174 | }, 175 | updateShoppingPlan: function() 176 | { 177 | if (this.shoppingPlan) 178 | { 179 | this.createShoppingPlan(false); 180 | } 181 | }, 182 | example: function() 183 | { 184 | this.shoppinglist = "1,5 liter halfvolle melk\nKnoflooksaus\n400 g shoarma\nPita brood\nKipschnitzel\n250 gram kipfilet\n1 kilo bananen\n1 liter coca cola\nkokosbrood\n500 ml soep\nhalvarine\n"; 185 | this.saveShoppinglist(); 186 | }, 187 | scan: function() 188 | { 189 | if (this.prices.length == 0) 190 | { 191 | setTimeout(function() 192 | { 193 | // Still loading prices, wait and retry 194 | app.scan(); 195 | }, 100); 196 | return; 197 | } 198 | 199 | var fileSelector = document.getElementById("file-selector"); 200 | 201 | fileSelector.addEventListener("change", (event) => 202 | { 203 | var fileList = event.target.files; 204 | if (fileList.length > 0) 205 | { 206 | var fileReader = new FileReader(); 207 | fileReader.addEventListener("load", (event) => 208 | { 209 | var imageData = event.target.result; 210 | Tesseract.recognize( 211 | imageData, 212 | "nld", 213 | { 214 | logger: m => 215 | { 216 | this.shoppinglist = m.status + ": " + (m.progress * 100).toFixed(0) + "%"; 217 | } 218 | } 219 | ).then(({ data: { text } }) => 220 | { 221 | // Remove all non-text characters 222 | text = text.toLowerCase().replace(/([^a-zA-Z\s])+/g, ""); 223 | // Remove all words that are 3 or less characters 224 | text = text.replace(/\b([a-zA-Z]){0,3}\b/g, ""); 225 | // Trim results 226 | text = text.split("\n").map(t => t.trim()).join("\n"); 227 | // Remove empty lines 228 | text = text.trim().replace(/\n{2,}/g, "\n"); 229 | // Use fuzzy search logic to find closest match in an attempt to fix reading errors 230 | var words = [... new Set(app.prices.map(p => p.d).flat().map(p => p.n.toLowerCase().split(" ")).flat())].filter(p => p.length > 4); 231 | var ignoredWords = ["prijs", "aantal", "e-prijs", "actieprijs", "kassa", "lade", "omschrijving", "subtotaal", "totaal"]; 232 | words = words.concat(ignoredWords); 233 | text = text.split("\n").filter(line => line.trim() != "").map((line, i) => 234 | { 235 | // Update status 236 | this.shoppinglist = "matching: " + (i / text.split("\n").length * 100).toFixed(0) + "%"; 237 | // Find closest match 238 | return line.split(/\s/).map(word => 239 | { 240 | const options = { 241 | shouldSort: true, 242 | threshold: 0.4, 243 | }; 244 | // Find closest match using words that somewhat match in length 245 | const fuse = new Fuse(words.filter(w => Math.abs(w.length - word.length) < 3), options); 246 | var results = fuse.search(word); 247 | // Exclude ignored words 248 | var result = results[0]?.item || word 249 | if (ignoredWords.includes(result)) 250 | { 251 | return ""; 252 | } 253 | // Return result 254 | return result; 255 | }).join(" "); 256 | }).join("\n"); 257 | // Capitalize first letter of each word 258 | text = text.replace(/\b[a-z]/g, letter => letter.toUpperCase()); 259 | // Update shoppinglist 260 | this.shoppinglist = text; 261 | }) 262 | 263 | }); 264 | fileReader.readAsDataURL(fileList[0]); 265 | } 266 | }); 267 | 268 | fileSelector.showPicker(); 269 | }, 270 | search: async function() 271 | { 272 | if (!this.shoppinglist || this.shoppinglist.trim() === "") { 273 | this.supermarkets = []; 274 | return; 275 | } 276 | 277 | if (this.shopMultipleSupermarkets) { 278 | this.showSupermarketSelection = true; 279 | this.shoppingPlan = null; 280 | this.selectedSupermarket = null; 281 | this.supermarkets = []; 282 | if (this.availableSupermarkets.length === 0) { 283 | await this.loadSupermarkets(); 284 | } 285 | setTimeout(function() 286 | { 287 | const el = document.getElementById("supermarket-selection"); 288 | if(el) el.scrollIntoView({behavior: "smooth", block: "start"}); 289 | }, 100); 290 | return; 291 | } 292 | 293 | this.isSearching = true; 294 | this.showSupermarketSelection = false; 295 | this.shoppingPlan = null; 296 | const productNames = this.shoppinglist.split("\n").filter(product => product.trim() !== ""); 297 | try { 298 | const results = await checkjebon.getPricesForProducts(productNames); 299 | this.pricesLastUpdated = checkjebon.pricesLastUpdated(); 300 | this.supermarkets = results.map(s => ({ 301 | ...s, 302 | products: s.products.map(p => { 303 | p.checked = p.originalQuery.startsWith("x "); 304 | return p; 305 | }), 306 | totalPrice: s.products.reduce((sum, p) => sum + (p.price || 0), 0), 307 | notFound: s.products.filter(p => p.isEstimate).length 308 | })); 309 | this.supermarkets.sort((a, b) => a.totalPrice - b.totalPrice); 310 | if (!this.selectedSupermarket) { 311 | setTimeout(function() 312 | { 313 | document.getElementById("supermarkets").scrollIntoView({behavior: "smooth", block: "start"}); 314 | }, 100); 315 | } 316 | } catch (e) { 317 | alert('Er is een fout opgetreden bij het zoeken naar prijzen.'); 318 | console.error(e); 319 | } 320 | this.isSearching = false; 321 | }, 322 | select: function() 323 | { 324 | setTimeout(function() 325 | { 326 | document.getElementById("articles").scrollIntoView({behavior: "smooth", block: "start"}); 327 | }, 100); 328 | }, 329 | check: function(product, event) 330 | { 331 | // Process checking and unchecking of products 332 | product.checked = event.target.checked; 333 | this.shoppinglist = this.shoppinglist.split("\n").map(line => 334 | { 335 | if (line.includes(product.originalQuery)) 336 | { 337 | if (line.startsWith("x ")) 338 | { 339 | line = line.substring(2); 340 | } 341 | if (product.checked) 342 | { 343 | line = "x " + line; 344 | } 345 | } 346 | return line; 347 | }).join("\n"); 348 | this.saveShoppinglist(); 349 | }, 350 | edit: async function(product, event, message) 351 | { 352 | var newProduct = window.prompt(message, product.originalQuery?.replace(/^x\s/, '')); 353 | if (newProduct) 354 | { 355 | this.shoppinglist = this.shoppinglist.split("\n").map(line => 356 | { 357 | if (line.includes(product.originalQuery)) 358 | { 359 | line = (product.originalQuery.startsWith("x ") ? "x " : "") + newProduct; 360 | } 361 | return line; 362 | }).join("\n"); 363 | this.saveShoppinglist(); 364 | 365 | const currentCode = this.selectedSupermarket ? this.selectedSupermarket.code : null; 366 | await this.search(); 367 | 368 | if (currentCode) { 369 | this.selectedSupermarket = this.supermarkets.find(s => s.code == currentCode); 370 | } 371 | } 372 | }, 373 | share: async function() 374 | { 375 | var hash = this.shoppinglist.replace(/\n/g, "%0A"); 376 | if (this.shopMultipleSupermarkets) { 377 | hash += "|" + (this.shopMultipleSupermarkets ? "1" : "0"); 378 | hash += "|" + this.maxSupermarkets; 379 | hash += "|" + this.selectedSupermarketCodes.join(","); 380 | } 381 | window.location.hash = hash; 382 | var shared = false; 383 | // Share the shoppinglist using the device's share functionality 384 | if (navigator.share) 385 | { 386 | try 387 | { 388 | await navigator.share( 389 | { 390 | title: "Checkjebon.nl", 391 | text: "Je boodschappenlijst van Checkjebon.nl", 392 | url: window.location.href 393 | }); 394 | shared = true; 395 | } 396 | catch(e) 397 | { 398 | console.log('Error sharing link', e); 399 | } 400 | } 401 | // Share the shoppinglist via email 402 | if (!shared) 403 | { 404 | var body = `Hoi, hier is je boodschappenlijst:`; 405 | body += `%0A%0A`; 406 | body += encodeURIComponent(this.shoppinglist.split("\n").map(p => "- " + p.trim()).filter(p => p).join("\n")); 407 | if (this.selectedSupermarket) 408 | { 409 | body += `%0A%0A`; 410 | body += `De totaalprijs bij ${this.selectedSupermarket.c} komt uit op ${this.$options.filters.formatPrice(this.selectedSupermarket.totalPrice)} euro.`; 411 | } 412 | body += `%0A%0A`; 413 | body += `Ga verder met deze boodschappenlijst via de link hieronder.%0A%0A`; 414 | body += encodeURIComponent(window.location.href); 415 | window.location = `mailto:?subject=Checkjebon.nl - boodschappenlijst&body=${body}`; 416 | } 417 | window.location.hash = ""; 418 | }, 419 | saveShoppinglist: function() 420 | { 421 | localStorage.setItem("shoppinglist", this.shoppinglist); 422 | localStorage.setItem("shopMultipleSupermarkets", this.shopMultipleSupermarkets); 423 | localStorage.setItem("maxSupermarkets", this.maxSupermarkets); 424 | localStorage.setItem("selectedSupermarketCodes", JSON.stringify(this.selectedSupermarketCodes)); 425 | }, 426 | loadShoppinglist: async function() 427 | { 428 | // Populate shoppinglist from memory 429 | this.shoppinglist = localStorage.getItem("shoppinglist"); 430 | this.shopMultipleSupermarkets = localStorage.getItem("shopMultipleSupermarkets") === "true"; 431 | this.maxSupermarkets = parseInt(localStorage.getItem("maxSupermarkets")) || null; 432 | try { 433 | this.selectedSupermarketCodes = JSON.parse(localStorage.getItem("selectedSupermarketCodes")) || []; 434 | } catch(e) { 435 | this.selectedSupermarketCodes = []; 436 | } 437 | 438 | // Override shoppinglist from URL hash, if present 439 | if (window.location.hash) 440 | { 441 | if (!this.shoppinglist || window.confirm("Druk op OK om de lijst die je net opent te gebruiken of Annuleren om verder te gaan met de lijst die je eerder hebt gemaakt.")) 442 | { 443 | var hashContent = decodeURI(window.location.hash).substr(1); 444 | var parts = hashContent.split("|"); 445 | this.shoppinglist = parts[0]; 446 | if (parts.length > 1) { 447 | this.shopMultipleSupermarkets = parts[1] === "1"; 448 | this.maxSupermarkets = parseInt(parts[2]) || null; 449 | this.selectedSupermarketCodes = parts[3] ? parts[3].split(",") : []; 450 | } 451 | } 452 | window.location.hash = ""; 453 | } 454 | 455 | if (this.shopMultipleSupermarkets && this.shoppinglist && this.shoppinglist.trim() !== '') { 456 | // Only show the supermarket selection on load when there is a non-empty shopping list. 457 | this.showSupermarketSelection = true; 458 | if (this.availableSupermarkets.length === 0) { 459 | await this.loadSupermarkets(); 460 | } 461 | 462 | if (this.maxSupermarkets && this.selectedSupermarketCodes.length > 0) { 463 | this.createShoppingPlan(true); 464 | } 465 | } else { 466 | // Ensure the supermarket selection and any results are hidden when there's 467 | // no shopping list during initial page load. 468 | this.showSupermarketSelection = false; 469 | this.shoppingPlan = null; 470 | this.supermarkets = []; 471 | this.selectedSupermarket = null; 472 | } 473 | }, 474 | update: function() 475 | { 476 | this.selectedSupermarket = null; 477 | this.supermarkets = []; 478 | 479 | if (this.shopMultipleSupermarkets) 480 | { 481 | this.showSupermarketSelection = false; 482 | this.shoppingPlan = null; 483 | } 484 | 485 | this.saveShoppinglist(); 486 | }, 487 | clear: function() 488 | { 489 | this.shoppinglist = ""; 490 | this.update(); 491 | } 492 | }, 493 | created: function() 494 | { 495 | this.loadShoppinglist(); 496 | } 497 | }); 498 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Checkjebon.nl - Goedkopere boodschappen 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 31 | 32 |
33 |
34 |
35 |
36 |

Checkjebon.nl

37 |

Bekijk wat je kwijt zou zijn voor dezelfde boodschappen bij een andere supermarkt en bespaar elke keer dat je naar de winkel gaat.

38 |
39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 | 51 |
52 | 57 | 62 | 66 |
67 |
68 |
69 |
70 | 71 |
72 |
73 |

Winkelplan opstellen

74 | 75 |
76 | 77 | 81 |
82 | 83 |
84 |
85 | 86 |
87 |
88 | 89 | 93 |
94 |
95 |
96 | 97 |
98 | 102 |
103 |
104 |
105 |
106 | 107 |
108 |
109 |

Supermarkten

110 |
    111 |
  • 112 | 113 |
    114 | 115 | {{supermarket.name}} 116 | 117 |
    118 | 119 | {{supermarket.notFound}} van {{supermarket.products.length | formatCount}} niet gevonden in {{supermarket.totalProducts | formatCount}} producten 120 | 121 | 122 | {{supermarket.totalProducts | formatCount}} producten 123 | 124 |
    125 |
    126 |
    127 | {{ supermarket.totalPrice | formatPrice }} 128 |
    129 |
  • 130 |
131 |

132 | Waarom sommige supermarkten ontbreken, zoals Nettorama, Boni, etc. 133 |

134 |
135 |
136 | 137 |
138 | 139 |
140 | 141 |
142 |
143 |
144 |

Winkelplan overzicht

145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 |
{{ s.name }}{{ s.totalPrice | formatPrice }}
Totaal{{ shoppingPlan.totalCost | formatPrice }}
Als je alle producten bij de goedkoopste winkel koopt ({{ shoppingPlan.bestSingleName }}){{ shoppingPlan.bestSingleTotal | formatPrice }}
Extra besparing{{ shoppingPlan.totalSavings | formatPrice }}
166 |
167 |
168 | 169 |
170 |
171 |
172 |

Totaalprijs: {{ shoppingPlan.totalCost | formatPrice }}

173 |

Aantal winkels: {{ shoppingPlan.supermarkets.length }}

174 |
175 |
176 |
177 | 178 |
179 |
180 | 181 |
182 |
183 | 189 | 196 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /js/fuse/fuse.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io) 3 | * 4 | * Copyright (c) 2022 Kiro Risk (http://kiro.me) 5 | * All Rights Reserved. Apache Software License 2.0 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | */ 9 | var e,t;e=this,t=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(C).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),c=parseFloat(Math.round(o*r)/r);return n.set(i,c),c},clear:function(){n.clear()}}}var $=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?I.getFn:n,o=t.fieldNormWeight,c=void 0===o?I.fieldNormWeight:o;r(this,e),this.norm=E(c,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return o(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?I.getFn:r,o=n.fieldNormWeight,c=void 0===o?I.fieldNormWeight:o,a=new $({getFn:i,fieldNormWeight:c});return a.setKeys(e.map(_)),a.setSources(t),a.create(),a}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?I.distance:s,h=t.ignoreLocation,l=void 0===h?I.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(a-o);return u?f+d/u:d?1:f}function N(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}var P=32;function W(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?I.location:o,a=i.threshold,s=void 0===a?I.threshold:a,u=i.distance,h=void 0===u?I.distance:u,l=i.includeMatches,f=void 0===l?I.includeMatches:l,d=i.findAllMatches,v=void 0===d?I.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?I.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?I.isCaseSensitive:p,k=i.ignoreLocation,M=void 0===k?I.ignoreLocation:k;if(r(this,e),this.options={location:c,threshold:s,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){n.chunks.push({pattern:e,alphabet:W(e),startIndex:t})},x=this.pattern.length;if(x>P){for(var w=0,L=x%P,S=x-L;w3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?I.location:i,c=r.distance,a=void 0===c?I.distance:c,s=r.threshold,u=void 0===s?I.threshold:s,h=r.findAllMatches,l=void 0===h?I.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?I.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?I.includeMatches:v,y=r.ignoreLocation,p=void 0===y?I.ignoreLocation:y;if(t.length>P)throw new Error(w(P));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,L=b,S=d>1||g,_=S?Array(M):[];(m=e.indexOf(t,L))>-1;){var O=R(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(O,x),L=m+k,S)for(var j=0;j=z;q-=1){var B=q-1,J=n[e.charAt(B)];if(S&&(_[B]=+!!J),K[q]=(K[q+1]<<1|1)&J,F&&(K[q]|=(A[q+1]|A[q])<<1|1|A[q+1]),K[q]&$&&(C=R(t,{errors:F,currentLocation:B,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=C,(L=B)<=b)break;z=Math.max(1,2*b-L)}}if(R(t,{errors:F+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p})>x)break;A=K}var U={isMatch:L>=0,score:Math.max(.001,C)};if(S){var V=N(_,d);V.length?g&&(U.indices=V):U.isMatch=!1}return U}(e,n,i,{location:c+o,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r,ignoreLocation:l}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(f(d),f(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),z=function(){function e(t){r(this,e),this.pattern=t}return o(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return D(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return D(e,this.singleRegex)}}]),e}();function D(e,t){var n=e.match(t);return n?n[1]:null}var K=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),n}(z),q=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),n}(z),B=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),n}(z),J=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),n}(z),U=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),n}(z),V=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),n}(z),G=function(e){a(n,e);var t=l(n);function n(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?I.location:c,s=o.threshold,u=void 0===s?I.threshold:s,h=o.distance,l=void 0===h?I.distance:h,f=o.includeMatches,d=void 0===f?I.includeMatches:f,v=o.findAllMatches,g=void 0===v?I.findAllMatches:v,y=o.minMatchCharLength,p=void 0===y?I.minMatchCharLength:y,m=o.isCaseSensitive,k=void 0===m?I.isCaseSensitive:m,M=o.ignoreLocation,b=void 0===M?I.ignoreLocation:M;return r(this,n),(i=t.call(this,e))._bitapSearch=new T(e,{location:a,threshold:u,distance:l,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),i}return o(n,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),n}(z),H=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),n}(z),Q=[K,H,B,J,V,U,q,G],X=Q.length,Y=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Y).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=n.isCaseSensitive,o=void 0===i?I.isCaseSensitive:i,c=n.includeMatches,a=void 0===c?I.includeMatches:c,s=n.minMatchCharLength,u=void 0===s?I.minMatchCharLength:s,h=n.ignoreLocation,l=void 0===h?I.ignoreLocation:h,f=n.findAllMatches,d=void 0===f?I.findAllMatches:f,v=n.location,g=void 0===v?I.location:v,y=n.threshold,p=void 0===y?I.threshold:y,m=n.distance,k=void 0===m?I.distance:m;r(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:d,ignoreLocation:l,location:g,threshold:p,distance:k},this.pattern=o?t:t.toLowerCase(),this.query=Z(this.pattern,this.options)}return o(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function ve(e,t){t.score=e.score}function ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?I.includeMatches:r,o=n.includeScore,c=void 0===o?I.includeScore:o,a=[];return i&&a.push(de),c&&a.push(ve),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}var ye=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;r(this,e),this.options=t(t({},I),i),this.options.useExtendedSearch,this._keyStore=new S(this.options.keys),this.setCollection(n,o)}return o(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof $))throw new Error("Incorrect 'index' type");this._myIndex=t||F(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){k(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=i.ignoreFieldNorm,h=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return fe(h,{ignoreFieldNorm:u}),a&&h.sort(s),y(r)&&r>-1&&(h=h.slice(0,r)),ge(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=re(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(k(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,r=void 0===n||n,i=function e(n){var i=Object.keys(n),o=ue(n);if(!o&&i.length>1&&!se(n))return e(le(n));if(he(n)){var c=o?n[ce]:i[0],a=o?n[ae]:n[c];if(!g(a))throw new Error(x(c));var s={keyId:j(c),pattern:a};return r&&(s.searcher=re(a,t)),s}var u={children:[],operator:i[0]};return i.forEach((function(t){var r=n[t];v(r)&&r.forEach((function(t){u.children.push(e(t))}))})),u};return se(e)||(e=le(e)),i(e)}(e,this.options),r=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,a=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return a&&a.length?[{idx:i,item:r,matches:a}]:[]}for(var s=[],u=0,h=n.children.length;u1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?I.getFn:n,i=t.fieldNormWeight,o=void 0===i?I.fieldNormWeight:i,c=e.keys,a=e.records,s=new $({getFn:r,fieldNormWeight:o});return s.setKeys(c),s.setIndexRecords(a),s},ye.config=I,function(){ne.push.apply(ne,arguments)}(te),ye},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t(); -------------------------------------------------------------------------------- /css/fontawesome/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */@font-face{font-family:'FontAwesome';src:url('fontawesome-webfont.eot?v=4.7.0');src:url('fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('fontawesome-webfont.woff?v=4.7.0') format('woff'),url('fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} -------------------------------------------------------------------------------- /js/tesseract/tesseract.min.js: -------------------------------------------------------------------------------- 1 | /*! For license information please see tesseract.min.js.LICENSE.txt */ 2 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Tesseract=e():t.Tesseract=e()}(self,(()=>(()=>{var t={670:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}t.exports=function(){return"undefined"!=typeof window&&"object"===e(window.process)&&"renderer"===window.process.type||!("undefined"==typeof process||"object"!==e(process.versions)||!process.versions.electron)||"object"===("undefined"==typeof navigator?"undefined":e(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0}},760:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var o=function(t){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),a=new P(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===y)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=y;var u=f(t,e,r);if("normal"===u.type){if(n=r.done?d:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function g(){}function m(){}function w(){}var b={};s(b,a,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(N([])));L&&L!==r&&o.call(L,a)&&(b=L);var O=w.prototype=g.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(i,a,c,u){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"===n(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}("object"===n(t=r.nmd(t))?t.exports:{});try{regeneratorRuntime=o}catch(t){"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},927:function(t,e,r){var n,o;n=function(){return function(){var t=arguments.length;if(0===t)throw new Error("resolveUrl requires at least one argument; got none.");var e=document.createElement("base");if(e.href=arguments[0],1===t)return e.href;var r=document.getElementsByTagName("head")[0];r.insertBefore(e,r.firstChild);for(var n,o=document.createElement("a"),i=1;i{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){"use strict";o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function p(){}function y(){}function d(){}var v={};s(v,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&r.call(m,a)&&(v=m);var w=d.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(i,a,c,u){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==n(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function L(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function i(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)}))}}var c=r(311),u=function(){var t=a(o().mark((function t(e,r,n){var i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=c(n),t.next=3,i.load();case 3:return t.next=5,i.loadLanguage(r);case 5:return t.next=7,i.initialize(r);case 7:return t.abrupt("return",i.recognize(e).finally(a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.terminate();case 2:case"end":return t.stop()}}),t)})))));case 8:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),s=function(){var t=a(o().mark((function t(e,r){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c(r),t.next=3,n.load();case 3:return t.next=5,n.loadLanguage("osd");case 5:return t.next=7,n.initialize("osd");case 7:return t.abrupt("return",n.detect(e).finally(a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.terminate();case 2:case"end":return t.stop()}}),t)})))));case 8:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();t.exports={recognize:u,detect:s}},847:t=>{t.exports={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}},711:t=>{t.exports={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12"}},214:(t,e,r)=>{var n=r(847);t.exports={defaultOEM:n.DEFAULT}},341:t=>{t.exports={langPath:"https://tessdata.projectnaptha.com/4.0.0",workerBlobURL:!0,logger:function(){}}},5:t=>{t.exports={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}},106:(t,e,r)=>{var n=r(313),o=0;t.exports=function(t){var e=t.id,r=t.action,i=t.payload,a=void 0===i?{}:i,c=e;return void 0===c&&(c=n("Job",o),o+=1),{id:c,action:r,payload:a}}},936:function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var o=this;function i(){"use strict";i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function p(){}function y(){}function d(){}var v={};s(v,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&r.call(m,a)&&(v=m);var w=d.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(i,a,c,u){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==n(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function L(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1?n-1:0),a=1;a=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function a(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)}))}}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var h=r(187),p=r(549),y=r(106),d=r(185).log,v=r(313),g=r(214).defaultOEM,m=r(581),w=m.defaultOptions,b=m.spawnWorker,x=m.terminateWorker,L=m.onMessage,O=m.loadImage,E=m.send,j=0;t.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=v("Worker",j),r=h(s(s({},w),t)),n=r.logger,a=r.errorHandler,u=f(r,o),l={},m={},S=b(u);j+=1;var k=function(t,e){l[t]=e},_=function(t,e){m[t]=e},P=function(t){var r=t.id,n=t.action,o=t.payload;return new Promise((function(t,i){d("[".concat(e,"]: Start ").concat(r,", action=").concat(n)),k(n,t),_(n,i),E(S,{workerId:e,jobId:r,action:n,payload:o})}))},N=function(t){return P(y({id:t,action:"load",payload:{options:u}}))},A=function(t,e,r){return P(y({id:r,action:"FS",payload:{method:"writeFile",args:[t,e]}}))},T=function(t,e){return P(y({id:e,action:"FS",payload:{method:"readFile",args:[t,{encoding:"utf8"}]}}))},G=function(t,e){return P(y({id:e,action:"FS",payload:{method:"unlink",args:[t]}}))},I=function(t,e,r){return P(y({id:r,action:"FS",payload:{method:t,args:e}}))},F=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eng",e=arguments.length>1?arguments[1]:void 0;return P(y({id:e,action:"loadLanguage",payload:{langs:t,options:u}}))},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eng",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,r=arguments.length>2?arguments[2]:void 0;return P(y({id:r,action:"initialize",payload:{langs:t,oem:e}}))},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return P(y({id:e,action:"setParameters",payload:{params:t}}))},M=function(){var t=c(i().mark((function t(e){var r,n,o=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=o.length>2?o[2]:void 0,t.t0=P,t.t1=y,t.t2=n,t.next=7,O(e);case 7:return t.t3=t.sent,t.t4=r,t.t5={image:t.t3,options:t.t4},t.t6={id:t.t2,action:"recognize",payload:t.t5},t.t7=(0,t.t1)(t.t6),t.abrupt("return",(0,t.t0)(t.t7));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Tesseract OCR Result",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;return P(y({id:r,action:"getPDF",payload:{title:t,textonly:e}}))},C=function(){var t=c(i().mark((function t(e,r){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=P,t.t1=y,t.t2=r,t.next=5,O(e);case 5:return t.t3=t.sent,t.t4={image:t.t3},t.t5={id:t.t2,action:"detect",payload:t.t4},t.t6=(0,t.t1)(t.t5),t.abrupt("return",(0,t.t0)(t.t6));case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),Y=function(){var t=c(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return null!==S&&(x(S),S=null),t.abrupt("return",Promise.resolve());case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return L(S,(function(t){var e=t.workerId,r=t.jobId,o=t.status,i=t.action,c=t.data;if("resolve"===o){d("[".concat(e,"]: Complete ").concat(r));var u=c;"recognize"===i?u=p(c):"getPDF"===i&&(u=Array.from(s(s({},c),{},{length:Object.keys(c).length}))),l[i]({jobId:r,data:u})}else if("reject"===o){if(m[i](c),!a)throw Error(c);a(c)}else"progress"===o&&n(s(s({},c),{},{userJobId:r}))})),{id:e,worker:S,setResolve:k,setReject:_,load:N,writeText:A,readText:T,removeFile:G,FS:I,loadLanguage:F,initialize:R,setParameters:D,recognize:M,getPDF:U,detect:C,terminate:Y}}},352:(t,e,r)=>{function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r(760);var i=r(936),a=r(311),c=r(793),u=r(5),s=r(847),l=r(711),f=r(185).setLogging;t.exports=function(t){for(var e=1;e{function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var o=r(670);t.exports=function(t){var e={};return"undefined"!=typeof WorkerGlobalScope?e.type="webworker":o()?e.type="electron":"object"===("undefined"==typeof window?"undefined":n(window))?e.type="browser":"object"===("undefined"==typeof process?"undefined":n(process))&&(e.type="node"),void 0===t?e:e[t]}},313:t=>{t.exports=function(t,e){return"".concat(t,"-").concat(e,"-").concat(Math.random().toString(16).slice(3,8))}},185:function(t,e){var r=this,n=!1;e.logging=n,e.setLogging=function(t){n=t},e.log=function(){for(var t=arguments.length,e=new Array(t),o=0;o{function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i="browser"===r(129)("type")?r(927):function(t){return t};t.exports=function(t){var e=function(t){for(var e=1;e{function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e{var n=r(854),o=r(676),i=r(100),a=r(202),c=r(772),u=r(931);t.exports={defaultOptions:n,spawnWorker:o,terminateWorker:i,onMessage:a,send:c,loadImage:u}},931:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){"use strict";o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function p(){}function y(){}function d(){}var v={};s(v,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&r.call(m,a)&&(v=m);var w=d.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(i,a,c,u){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==n(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function L(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function i(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)}))}}var c=r(927),u=function(t){return new Promise((function(e,r){var n=new FileReader;n.onload=function(){e(n.result)},n.onerror=function(t){var e=t.target.error.code;r(Error("File could not be read! Code=".concat(e)))},n.readAsArrayBuffer(t)}))},s=function(){var t=a(o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e,void 0!==e){t.next=3;break}return t.abrupt("return","undefined");case 3:if("string"!=typeof e){t.next=16;break}if(!/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(e)){t.next=8;break}r=atob(e.split(",")[1]).split("").map((function(t){return t.charCodeAt(0)})),t.next=14;break;case 8:return t.next=10,fetch(c(e));case 10:return n=t.sent,t.next=13,n.arrayBuffer();case 13:r=t.sent;case 14:t.next=34;break;case 16:if(!(e instanceof HTMLElement)){t.next=30;break}if("IMG"!==e.tagName){t.next=21;break}return t.next=20,s(e.src);case 20:r=t.sent;case 21:if("VIDEO"!==e.tagName){t.next=25;break}return t.next=24,s(e.poster);case 24:r=t.sent;case 25:if("CANVAS"!==e.tagName){t.next=28;break}return t.next=28,new Promise((function(t){e.toBlob(function(){var e=a(o().mark((function e(n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u(n);case 2:r=e.sent,t();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}));case 28:t.next=34;break;case 30:if(!(e instanceof File||e instanceof Blob)){t.next=34;break}return t.next=33,u(e);case 33:r=t.sent;case 34:return t.abrupt("return",new Uint8Array(r));case 35:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();t.exports=s},202:t=>{t.exports=function(t,e){t.onmessage=function(t){var r=t.data;e(r)}}},772:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(){"use strict";r=function(){return t};var t={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function p(){}function y(){}function d(){}var v={};s(v,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==n&&o.call(m,a)&&(v=m);var w=d.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,r){function n(i,a,c,u){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==e(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function L(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(){var t,e=(t=r().mark((function t(e,n){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.postMessage(n);case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))});return function(t,r){return e.apply(this,arguments)}}()},676:t=>{t.exports=function(t){var e,r=t.workerPath,n=t.workerBlobURL;if(Blob&&URL&&n){var o=new Blob(['importScripts("'.concat(r,'");')],{type:"application/javascript"});e=new Worker(URL.createObjectURL(o))}else e=new Worker(r);return e}},100:t=>{t.exports=function(t){t.terminate()}},147:t=>{"use strict";t.exports=JSON.parse('{"name":"tesseract.js","version":"3.0.3","description":"Pure Javascript Multilingual OCR","main":"src/index.js","types":"src/index.d.ts","unpkg":"dist/tesseract.min.js","jsdelivr":"dist/tesseract.min.js","scripts":{"start":"node scripts/server.js","build":"rimraf dist && webpack --config scripts/webpack.config.prod.js && rollup -c scripts/rollup.esm.js","profile:tesseract":"webpack-bundle-analyzer dist/tesseract-stats.json","profile:worker":"webpack-bundle-analyzer dist/worker-stats.json","prepublishOnly":"npm run build","wait":"rimraf dist && wait-on http://localhost:3000/dist/tesseract.dev.js","test":"npm-run-all -p -r start test:all","test:all":"npm-run-all wait test:browser:* test:node:all","test:node":"nyc mocha --exit --bail --require ./scripts/test-helper.js","test:node:all":"npm run test:node -- ./tests/*.test.js","test:browser-tpl":"mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -a disable-logging -t 300000","test:browser:detect":"npm run test:browser-tpl -- -f ./tests/detect.test.html","test:browser:recognize":"npm run test:browser-tpl -- -f ./tests/recognize.test.html","test:browser:scheduler":"npm run test:browser-tpl -- -f ./tests/scheduler.test.html","test:browser:FS":"npm run test:browser-tpl -- -f ./tests/FS.test.html","lint":"eslint src","lint:fix":"eslint --fix src","postinstall":"opencollective-postinstall || true"},"browser":{"./src/worker/node/index.js":"./src/worker/browser/index.js"},"author":"","contributors":["jeromewu"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.18.7","@babel/preset-env":"^7.18.7","@rollup/plugin-commonjs":"^22.0.2","acorn":"^6.4.0","babel-loader":"^8.2.0","buffer":"^6.0.3","cors":"^2.8.5","eslint":"^7.2.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.1","expect.js":"^0.3.1","express":"^4.17.1","mocha":"^8.1.3","mocha-headless-chrome":"^2.0.3","npm-run-all":"^4.1.5","nyc":"^15.1.0","rimraf":"^2.7.1","rollup":"^2.79.0","wait-on":"^3.3.0","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.0","webpack-cli":"^4.10.0","webpack-dev-middleware":"^5.3.3"},"dependencies":{"babel-eslint":"^10.1.0","bmp-js":"^0.1.0","file-type":"^12.4.1","idb-keyval":"^3.2.0","is-electron":"^2.2.0","is-url":"^1.2.4","node-fetch":"^2.6.0","opencollective-postinstall":"^2.0.2","regenerator-runtime":"^0.13.3","resolve-url":"^0.2.1","tesseract.js-core":"^3.0.2","wasm-feature-detect":"^1.2.11","zlibjs":"^0.3.1"},"repository":{"type":"git","url":"https://github.com/naptha/tesseract.js.git"},"bugs":{"url":"https://github.com/naptha/tesseract.js/issues"},"homepage":"https://github.com/naptha/tesseract.js","collective":{"type":"opencollective","url":"https://opencollective.com/tesseractjs"}}')}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r(352)})())); 3 | //# sourceMappingURL=tesseract.min.js.map -------------------------------------------------------------------------------- /js/tesseract/tesseract.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"tesseract.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAmB,UAAID,IAEvBD,EAAgB,UAAIC,GACrB,CATD,CASGK,MAAM,+PCWTH,EAAOD,QAnBP,WAEI,MAAsB,oBAAXK,QAAoD,WAA1B,EAAOA,OAAOC,UAAgD,aAAxBD,OAAOC,QAAQC,QAKnE,oBAAZD,SAAuD,WAA5B,EAAOA,QAAQE,YAA2BF,QAAQE,SAASC,WAKxE,YAArB,oBAAOC,UAAP,cAAOA,aAAyD,iBAAxBA,UAAUC,WAA0BD,UAAUC,UAAUC,QAAQ,aAAe,CAK9H,uPCXD,IAAIC,EAAW,SAAUb,GACvB,aAEA,IAEIc,EAFAC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,CAAC,EACnDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASzB,EAAO0B,EAAKC,EAAKC,GAOxB,OANAd,OAAOe,eAAeH,EAAKC,EAAK,CAC9BC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IAELN,EAAIC,EACZ,CACD,IAEE3B,EAAO,CAAC,EAAG,GAKZ,CAJC,MAAOiC,GACPjC,EAAS,SAAS0B,EAAKC,EAAKC,GAC1B,OAAOF,EAAIC,GAAOC,CACnB,CACF,CAED,SAASM,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AAOD,QAAP,gCAAiB,WAAO8K,EAAQiQ,GAAf,iEACfjQ,EAAOkQ,YAAYD,GADJ,yNAAjB,iECAA9a,EAAOD,QAAU,YAAmC,IAC9C8K,EADckO,EAAgC,EAAhCA,WAAYvM,EAAoB,EAApBA,cAE9B,GAAIkO,MAAQM,KAAOxO,EAAe,CAChC,IAAM2M,EAAO,IAAIuB,KAAK,CAAC,kBAAD,OAAmB3B,EAAnB,QAAqC,CACzDzY,KAAM,2BAERuK,EAAS,IAAIoQ,OAAOD,IAAIE,gBAAgB/B,GACzC,MACCtO,EAAS,IAAIoQ,OAAOlC,GAGtB,OAAOlO,CACR,WCZD7K,EAAOD,QAAU,SAAC8K,GAChBA,EAAOK,WACR,4sFCRGiQ,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBxa,IAAjBya,EACH,OAAOA,EAAavb,QAGrB,IAAIC,EAASmb,EAAyBE,GAAY,CACjDlI,GAAIkI,EACJE,QAAQ,EACRxb,QAAS,CAAC,GAUX,OANAyb,EAAoBH,GAAUjX,KAAKpE,EAAOD,QAASC,EAAQA,EAAOD,QAASqb,GAG3Epb,EAAOub,QAAS,EAGTvb,EAAOD,OACf,QCzBAqb,EAAoBK,IAAOzb,IAC1BA,EAAO0b,MAAQ,GACV1b,EAAO2b,WAAU3b,EAAO2b,SAAW,IACjC3b,GCAkBob,EAAoB","sources":["webpack://Tesseract/webpack/universalModuleDefinition","webpack://Tesseract/./node_modules/is-electron/index.js","webpack://Tesseract/./node_modules/regenerator-runtime/runtime.js","webpack://Tesseract/./node_modules/resolve-url/resolve-url.js","webpack://Tesseract/./src/Tesseract.js","webpack://Tesseract/./src/constants/OEM.js","webpack://Tesseract/./src/constants/PSM.js","webpack://Tesseract/./src/constants/config.js","webpack://Tesseract/./src/constants/defaultOptions.js","webpack://Tesseract/./src/constants/languages.js","webpack://Tesseract/./src/createJob.js","webpack://Tesseract/./src/createScheduler.js","webpack://Tesseract/./src/createWorker.js","webpack://Tesseract/./src/index.js","webpack://Tesseract/./src/utils/circularize.js","webpack://Tesseract/./src/utils/getEnvironment.js","webpack://Tesseract/./src/utils/getId.js","webpack://Tesseract/./src/utils/log.js","webpack://Tesseract/./src/utils/resolvePaths.js","webpack://Tesseract/./src/worker/browser/defaultOptions.js","webpack://Tesseract/./src/worker/browser/index.js","webpack://Tesseract/./src/worker/browser/loadImage.js","webpack://Tesseract/./src/worker/browser/onMessage.js","webpack://Tesseract/./src/worker/browser/send.js","webpack://Tesseract/./src/worker/browser/spawnWorker.js","webpack://Tesseract/./src/worker/browser/terminateWorker.js","webpack://Tesseract/webpack/bootstrap","webpack://Tesseract/webpack/runtime/node module decorator","webpack://Tesseract/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Tesseract\"] = factory();\n\telse\n\t\troot[\"Tesseract\"] = factory();\n})(self, () => {\nreturn ","// https://github.com/electron/electron/issues/2288\nfunction isElectron() {\n // Renderer process\n if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {\n return true;\n }\n\n // Main process\n if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) {\n return true;\n }\n\n // Detect the user agent when the `nodeIntegration` option is set to true\n if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isElectron;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Copyright 2014 Simon Lydell\r\n// X11 (“MIT”) Licensed. (See LICENSE.)\r\n\r\nvoid (function(root, factory) {\r\n if (typeof define === \"function\" && define.amd) {\r\n define(factory)\r\n } else if (typeof exports === \"object\") {\r\n module.exports = factory()\r\n } else {\r\n root.resolveUrl = factory()\r\n }\r\n}(this, function() {\r\n\r\n function resolveUrl(/* ...urls */) {\r\n var numUrls = arguments.length\r\n\r\n if (numUrls === 0) {\r\n throw new Error(\"resolveUrl requires at least one argument; got none.\")\r\n }\r\n\r\n var base = document.createElement(\"base\")\r\n base.href = arguments[0]\r\n\r\n if (numUrls === 1) {\r\n return base.href\r\n }\r\n\r\n var head = document.getElementsByTagName(\"head\")[0]\r\n head.insertBefore(base, head.firstChild)\r\n\r\n var a = document.createElement(\"a\")\r\n var resolved\r\n\r\n for (var index = 1; index < numUrls; index++) {\r\n a.href = arguments[index]\r\n resolved = a.href\r\n base.href = resolved\r\n }\r\n\r\n head.removeChild(base)\r\n\r\n return resolved\r\n }\r\n\r\n return resolveUrl\r\n\r\n}));\r\n","const createWorker = require('./createWorker');\n\nconst recognize = async (image, langs, options) => {\n const worker = createWorker(options);\n await worker.load();\n await worker.loadLanguage(langs);\n await worker.initialize(langs);\n return worker.recognize(image)\n .finally(async () => {\n await worker.terminate();\n });\n};\n\nconst detect = async (image, options) => {\n const worker = createWorker(options);\n await worker.load();\n await worker.loadLanguage('osd');\n await worker.initialize('osd');\n return worker.detect(image)\n .finally(async () => {\n await worker.terminate();\n });\n};\n\nmodule.exports = {\n recognize,\n detect,\n};\n","/*\n * OEM = OCR Engine Mode, and there are 4 possible modes.\n *\n * By default tesseract.js uses LSTM_ONLY mode.\n *\n */\nmodule.exports = {\n TESSERACT_ONLY: 0,\n LSTM_ONLY: 1,\n TESSERACT_LSTM_COMBINED: 2,\n DEFAULT: 3,\n};\n","/*\n * PSM = Page Segmentation Mode\n */\nmodule.exports = {\n OSD_ONLY: '0',\n AUTO_OSD: '1',\n AUTO_ONLY: '2',\n AUTO: '3',\n SINGLE_COLUMN: '4',\n SINGLE_BLOCK_VERT_TEXT: '5',\n SINGLE_BLOCK: '6',\n SINGLE_LINE: '7',\n SINGLE_WORD: '8',\n CIRCLE_WORD: '9',\n SINGLE_CHAR: '10',\n SPARSE_TEXT: '11',\n SPARSE_TEXT_OSD: '12',\n};\n","const OEM = require('./OEM');\n\nmodule.exports = {\n defaultOEM: OEM.DEFAULT,\n};\n","module.exports = {\n /*\n * default path for downloading *.traineddata\n */\n langPath: 'https://tessdata.projectnaptha.com/4.0.0',\n /*\n * Use BlobURL for worker script by default\n * TODO: remove this option\n *\n */\n workerBlobURL: true,\n logger: () => {},\n};\n","/*\n * languages with existing tesseract traineddata\n * https://tesseract-ocr.github.io/tessdoc/Data-Files#data-files-for-version-400-november-29-2016\n */\n\n/**\n * @typedef {object} Languages\n * @property {string} AFR Afrikaans\n * @property {string} AMH Amharic\n * @property {string} ARA Arabic\n * @property {string} ASM Assamese\n * @property {string} AZE Azerbaijani\n * @property {string} AZE_CYRL Azerbaijani - Cyrillic\n * @property {string} BEL Belarusian\n * @property {string} BEN Bengali\n * @property {string} BOD Tibetan\n * @property {string} BOS Bosnian\n * @property {string} BUL Bulgarian\n * @property {string} CAT Catalan; Valencian\n * @property {string} CEB Cebuano\n * @property {string} CES Czech\n * @property {string} CHI_SIM Chinese - Simplified\n * @property {string} CHI_TRA Chinese - Traditional\n * @property {string} CHR Cherokee\n * @property {string} CYM Welsh\n * @property {string} DAN Danish\n * @property {string} DEU German\n * @property {string} DZO Dzongkha\n * @property {string} ELL Greek, Modern (1453-)\n * @property {string} ENG English\n * @property {string} ENM English, Middle (1100-1500)\n * @property {string} EPO Esperanto\n * @property {string} EST Estonian\n * @property {string} EUS Basque\n * @property {string} FAS Persian\n * @property {string} FIN Finnish\n * @property {string} FRA French\n * @property {string} FRK German Fraktur\n * @property {string} FRM French, Middle (ca. 1400-1600)\n * @property {string} GLE Irish\n * @property {string} GLG Galician\n * @property {string} GRC Greek, Ancient (-1453)\n * @property {string} GUJ Gujarati\n * @property {string} HAT Haitian; Haitian Creole\n * @property {string} HEB Hebrew\n * @property {string} HIN Hindi\n * @property {string} HRV Croatian\n * @property {string} HUN Hungarian\n * @property {string} IKU Inuktitut\n * @property {string} IND Indonesian\n * @property {string} ISL Icelandic\n * @property {string} ITA Italian\n * @property {string} ITA_OLD Italian - Old\n * @property {string} JAV Javanese\n * @property {string} JPN Japanese\n * @property {string} KAN Kannada\n * @property {string} KAT Georgian\n * @property {string} KAT_OLD Georgian - Old\n * @property {string} KAZ Kazakh\n * @property {string} KHM Central Khmer\n * @property {string} KIR Kirghiz; Kyrgyz\n * @property {string} KOR Korean\n * @property {string} KUR Kurdish\n * @property {string} LAO Lao\n * @property {string} LAT Latin\n * @property {string} LAV Latvian\n * @property {string} LIT Lithuanian\n * @property {string} MAL Malayalam\n * @property {string} MAR Marathi\n * @property {string} MKD Macedonian\n * @property {string} MLT Maltese\n * @property {string} MSA Malay\n * @property {string} MYA Burmese\n * @property {string} NEP Nepali\n * @property {string} NLD Dutch; Flemish\n * @property {string} NOR Norwegian\n * @property {string} ORI Oriya\n * @property {string} PAN Panjabi; Punjabi\n * @property {string} POL Polish\n * @property {string} POR Portuguese\n * @property {string} PUS Pushto; Pashto\n * @property {string} RON Romanian; Moldavian; Moldovan\n * @property {string} RUS Russian\n * @property {string} SAN Sanskrit\n * @property {string} SIN Sinhala; Sinhalese\n * @property {string} SLK Slovak\n * @property {string} SLV Slovenian\n * @property {string} SPA Spanish; Castilian\n * @property {string} SPA_OLD Spanish; Castilian - Old\n * @property {string} SQI Albanian\n * @property {string} SRP Serbian\n * @property {string} SRP_LATN Serbian - Latin\n * @property {string} SWA Swahili\n * @property {string} SWE Swedish\n * @property {string} SYR Syriac\n * @property {string} TAM Tamil\n * @property {string} TEL Telugu\n * @property {string} TGK Tajik\n * @property {string} TGL Tagalog\n * @property {string} THA Thai\n * @property {string} TIR Tigrinya\n * @property {string} TUR Turkish\n * @property {string} UIG Uighur; Uyghur\n * @property {string} UKR Ukrainian\n * @property {string} URD Urdu\n * @property {string} UZB Uzbek\n * @property {string} UZB_CYRL Uzbek - Cyrillic\n * @property {string} VIE Vietnamese\n * @property {string} YID Yiddish\n */\n\n/**\n * @type {Languages}\n */\nmodule.exports = {\n AFR: 'afr',\n AMH: 'amh',\n ARA: 'ara',\n ASM: 'asm',\n AZE: 'aze',\n AZE_CYRL: 'aze_cyrl',\n BEL: 'bel',\n BEN: 'ben',\n BOD: 'bod',\n BOS: 'bos',\n BUL: 'bul',\n CAT: 'cat',\n CEB: 'ceb',\n CES: 'ces',\n CHI_SIM: 'chi_sim',\n CHI_TRA: 'chi_tra',\n CHR: 'chr',\n CYM: 'cym',\n DAN: 'dan',\n DEU: 'deu',\n DZO: 'dzo',\n ELL: 'ell',\n ENG: 'eng',\n ENM: 'enm',\n EPO: 'epo',\n EST: 'est',\n EUS: 'eus',\n FAS: 'fas',\n FIN: 'fin',\n FRA: 'fra',\n FRK: 'frk',\n FRM: 'frm',\n GLE: 'gle',\n GLG: 'glg',\n GRC: 'grc',\n GUJ: 'guj',\n HAT: 'hat',\n HEB: 'heb',\n HIN: 'hin',\n HRV: 'hrv',\n HUN: 'hun',\n IKU: 'iku',\n IND: 'ind',\n ISL: 'isl',\n ITA: 'ita',\n ITA_OLD: 'ita_old',\n JAV: 'jav',\n JPN: 'jpn',\n KAN: 'kan',\n KAT: 'kat',\n KAT_OLD: 'kat_old',\n KAZ: 'kaz',\n KHM: 'khm',\n KIR: 'kir',\n KOR: 'kor',\n KUR: 'kur',\n LAO: 'lao',\n LAT: 'lat',\n LAV: 'lav',\n LIT: 'lit',\n MAL: 'mal',\n MAR: 'mar',\n MKD: 'mkd',\n MLT: 'mlt',\n MSA: 'msa',\n MYA: 'mya',\n NEP: 'nep',\n NLD: 'nld',\n NOR: 'nor',\n ORI: 'ori',\n PAN: 'pan',\n POL: 'pol',\n POR: 'por',\n PUS: 'pus',\n RON: 'ron',\n RUS: 'rus',\n SAN: 'san',\n SIN: 'sin',\n SLK: 'slk',\n SLV: 'slv',\n SPA: 'spa',\n SPA_OLD: 'spa_old',\n SQI: 'sqi',\n SRP: 'srp',\n SRP_LATN: 'srp_latn',\n SWA: 'swa',\n SWE: 'swe',\n SYR: 'syr',\n TAM: 'tam',\n TEL: 'tel',\n TGK: 'tgk',\n TGL: 'tgl',\n THA: 'tha',\n TIR: 'tir',\n TUR: 'tur',\n UIG: 'uig',\n UKR: 'ukr',\n URD: 'urd',\n UZB: 'uzb',\n UZB_CYRL: 'uzb_cyrl',\n VIE: 'vie',\n YID: 'yid',\n};\n","const getId = require('./utils/getId');\n\nlet jobCounter = 0;\n\nmodule.exports = ({\n id: _id,\n action,\n payload = {},\n}) => {\n let id = _id;\n if (typeof id === 'undefined') {\n id = getId('Job', jobCounter);\n jobCounter += 1;\n }\n\n return {\n id,\n action,\n payload,\n };\n};\n","const createJob = require('./createJob');\nconst { log } = require('./utils/log');\nconst getId = require('./utils/getId');\n\nlet schedulerCounter = 0;\n\nmodule.exports = () => {\n const id = getId('Scheduler', schedulerCounter);\n const workers = {};\n const runningWorkers = {};\n let jobQueue = [];\n\n schedulerCounter += 1;\n\n const getQueueLen = () => jobQueue.length;\n const getNumWorkers = () => Object.keys(workers).length;\n\n const dequeue = () => {\n if (jobQueue.length !== 0) {\n const wIds = Object.keys(workers);\n for (let i = 0; i < wIds.length; i += 1) {\n if (typeof runningWorkers[wIds[i]] === 'undefined') {\n jobQueue[0](workers[wIds[i]]);\n break;\n }\n }\n }\n };\n\n const queue = (action, payload) => (\n new Promise((resolve, reject) => {\n const job = createJob({ action, payload });\n jobQueue.push(async (w) => {\n jobQueue.shift();\n runningWorkers[w.id] = job;\n try {\n resolve(await w[action].apply(this, [...payload, job.id]));\n } catch (err) {\n reject(err);\n } finally {\n delete runningWorkers[w.id];\n dequeue();\n }\n });\n log(`[${id}]: Add ${job.id} to JobQueue`);\n log(`[${id}]: JobQueue length=${jobQueue.length}`);\n dequeue();\n })\n );\n\n const addWorker = (w) => {\n workers[w.id] = w;\n log(`[${id}]: Add ${w.id}`);\n log(`[${id}]: Number of workers=${getNumWorkers()}`);\n dequeue();\n return w.id;\n };\n\n const addJob = async (action, ...payload) => {\n if (getNumWorkers() === 0) {\n throw Error(`[${id}]: You need to have at least one worker before adding jobs`);\n }\n return queue(action, payload);\n };\n\n const terminate = async () => {\n Object.keys(workers).forEach(async (wid) => {\n await workers[wid].terminate();\n });\n jobQueue = [];\n };\n\n return {\n addWorker,\n addJob,\n terminate,\n getQueueLen,\n getNumWorkers,\n };\n};\n","const resolvePaths = require('./utils/resolvePaths');\nconst circularize = require('./utils/circularize');\nconst createJob = require('./createJob');\nconst { log } = require('./utils/log');\nconst getId = require('./utils/getId');\nconst { defaultOEM } = require('./constants/config');\nconst {\n defaultOptions,\n spawnWorker,\n terminateWorker,\n onMessage,\n loadImage,\n send,\n} = require('./worker/node');\n\nlet workerCounter = 0;\n\nmodule.exports = (_options = {}) => {\n const id = getId('Worker', workerCounter);\n const {\n logger,\n errorHandler,\n ...options\n } = resolvePaths({\n ...defaultOptions,\n ..._options,\n });\n const resolves = {};\n const rejects = {};\n let worker = spawnWorker(options);\n\n workerCounter += 1;\n\n const setResolve = (action, res) => {\n resolves[action] = res;\n };\n\n const setReject = (action, rej) => {\n rejects[action] = rej;\n };\n\n const startJob = ({ id: jobId, action, payload }) => (\n new Promise((resolve, reject) => {\n log(`[${id}]: Start ${jobId}, action=${action}`);\n setResolve(action, resolve);\n setReject(action, reject);\n send(worker, {\n workerId: id,\n jobId,\n action,\n payload,\n });\n })\n );\n\n const load = (jobId) => (\n startJob(createJob({\n id: jobId, action: 'load', payload: { options },\n }))\n );\n\n const writeText = (path, text, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'FS',\n payload: { method: 'writeFile', args: [path, text] },\n }))\n );\n\n const readText = (path, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'FS',\n payload: { method: 'readFile', args: [path, { encoding: 'utf8' }] },\n }))\n );\n\n const removeFile = (path, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'FS',\n payload: { method: 'unlink', args: [path] },\n }))\n );\n\n const FS = (method, args, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'FS',\n payload: { method, args },\n }))\n );\n\n const loadLanguage = (langs = 'eng', jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'loadLanguage',\n payload: { langs, options },\n }))\n );\n\n const initialize = (langs = 'eng', oem = defaultOEM, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'initialize',\n payload: { langs, oem },\n }))\n );\n\n const setParameters = (params = {}, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'setParameters',\n payload: { params },\n }))\n );\n\n const recognize = async (image, opts = {}, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'recognize',\n payload: { image: await loadImage(image), options: opts },\n }))\n );\n\n const getPDF = (title = 'Tesseract OCR Result', textonly = false, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'getPDF',\n payload: { title, textonly },\n }))\n );\n\n const detect = async (image, jobId) => (\n startJob(createJob({\n id: jobId,\n action: 'detect',\n payload: { image: await loadImage(image) },\n }))\n );\n\n const terminate = async () => {\n if (worker !== null) {\n /*\n await startJob(createJob({\n id: jobId,\n action: 'terminate',\n }));\n */\n terminateWorker(worker);\n worker = null;\n }\n return Promise.resolve();\n };\n\n onMessage(worker, ({\n workerId, jobId, status, action, data,\n }) => {\n if (status === 'resolve') {\n log(`[${workerId}]: Complete ${jobId}`);\n let d = data;\n if (action === 'recognize') {\n d = circularize(data);\n } else if (action === 'getPDF') {\n d = Array.from({ ...data, length: Object.keys(data).length });\n }\n resolves[action]({ jobId, data: d });\n } else if (status === 'reject') {\n rejects[action](data);\n if (errorHandler) {\n errorHandler(data);\n } else {\n throw Error(data);\n }\n } else if (status === 'progress') {\n logger({ ...data, userJobId: jobId });\n }\n });\n\n return {\n id,\n worker,\n setResolve,\n setReject,\n load,\n writeText,\n readText,\n removeFile,\n FS,\n loadLanguage,\n initialize,\n setParameters,\n recognize,\n getPDF,\n detect,\n terminate,\n };\n};\n","/**\n *\n * Entry point for tesseract.js, should be the entry when bundling.\n *\n * @fileoverview entry point for tesseract.js\n * @author Kevin Kwok \n * @author Guillermo Webster \n * @author Jerome Wu \n */\nrequire('regenerator-runtime/runtime');\nconst createScheduler = require('./createScheduler');\nconst createWorker = require('./createWorker');\nconst Tesseract = require('./Tesseract');\nconst languages = require('./constants/languages');\nconst OEM = require('./constants/OEM');\nconst PSM = require('./constants/PSM');\nconst { setLogging } = require('./utils/log');\n\nmodule.exports = {\n languages,\n OEM,\n PSM,\n createScheduler,\n createWorker,\n setLogging,\n ...Tesseract,\n};\n","/**\n * In the recognition result of tesseract, there\n * is a deep JSON object for details, it has around\n *\n * The result of dump.js is a big JSON tree\n * which can be easily serialized (for instance\n * to be sent from a webworker to the main app\n * or through Node's IPC), but we want\n * a (circular) DOM-like interface for walking\n * through the data.\n *\n * @fileoverview DOM-like interface for walking through data\n * @author Kevin Kwok \n * @author Guillermo Webster \n * @author Jerome Wu \n */\n\nmodule.exports = (page) => {\n const blocks = [];\n const paragraphs = [];\n const lines = [];\n const words = [];\n const symbols = [];\n\n page.blocks.forEach((block) => {\n block.paragraphs.forEach((paragraph) => {\n paragraph.lines.forEach((line) => {\n line.words.forEach((word) => {\n word.symbols.forEach((sym) => {\n symbols.push({\n ...sym, page, block, paragraph, line, word,\n });\n });\n words.push({\n ...word, page, block, paragraph, line,\n });\n });\n lines.push({\n ...line, page, block, paragraph,\n });\n });\n paragraphs.push({\n ...paragraph, page, block,\n });\n });\n blocks.push({\n ...block, page,\n });\n });\n\n return {\n ...page, blocks, paragraphs, lines, words, symbols,\n };\n};\n","const isElectron = require('is-electron');\n\nmodule.exports = (key) => {\n const env = {};\n\n if (typeof WorkerGlobalScope !== 'undefined') {\n env.type = 'webworker';\n } else if (isElectron()) {\n env.type = 'electron';\n } else if (typeof window === 'object') {\n env.type = 'browser';\n } else if (typeof process === 'object' && typeof require === 'function') {\n env.type = 'node';\n }\n\n if (typeof key === 'undefined') {\n return env;\n }\n\n return env[key];\n};\n","module.exports = (prefix, cnt) => (\n `${prefix}-${cnt}-${Math.random().toString(16).slice(3, 8)}`\n);\n","let logging = false;\n\nexports.logging = logging;\n\nexports.setLogging = (_logging) => {\n logging = _logging;\n};\n\nexports.log = (...args) => (logging ? console.log.apply(this, args) : null);\n","const isBrowser = require('./getEnvironment')('type') === 'browser';\nconst resolveURL = isBrowser ? require('resolve-url') : s => s; // eslint-disable-line\n\nmodule.exports = (options) => {\n const opts = { ...options };\n ['corePath', 'workerPath', 'langPath'].forEach((key) => {\n if (options[key]) {\n opts[key] = resolveURL(opts[key]);\n }\n });\n return opts;\n};\n","const resolveURL = require('resolve-url');\nconst { version } = require('../../../package.json');\nconst defaultOptions = require('../../constants/defaultOptions');\n\n/*\n * Default options for browser worker\n */\nmodule.exports = {\n ...defaultOptions,\n workerPath: (typeof process !== 'undefined' && process.env.TESS_ENV === 'development')\n ? resolveURL(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`)\n : `https://unpkg.com/tesseract.js@v${version}/dist/worker.min.js`,\n /*\n * If browser doesn't support WebAssembly,\n * load ASM version instead\n */\n corePath: null,\n};\n","/**\n *\n * Tesseract Worker adapter for browser\n *\n * @fileoverview Tesseract Worker adapter for browser\n * @author Kevin Kwok \n * @author Guillermo Webster \n * @author Jerome Wu \n */\nconst defaultOptions = require('./defaultOptions');\nconst spawnWorker = require('./spawnWorker');\nconst terminateWorker = require('./terminateWorker');\nconst onMessage = require('./onMessage');\nconst send = require('./send');\nconst loadImage = require('./loadImage');\n\nmodule.exports = {\n defaultOptions,\n spawnWorker,\n terminateWorker,\n onMessage,\n send,\n loadImage,\n};\n","const resolveURL = require('resolve-url');\n\n/**\n * readFromBlobOrFile\n *\n * @name readFromBlobOrFile\n * @function\n * @access private\n */\nconst readFromBlobOrFile = (blob) => (\n new Promise((resolve, reject) => {\n const fileReader = new FileReader();\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n fileReader.onerror = ({ target: { error: { code } } }) => {\n reject(Error(`File could not be read! Code=${code}`));\n };\n fileReader.readAsArrayBuffer(blob);\n })\n);\n\n/**\n * loadImage\n *\n * @name loadImage\n * @function load image from different source\n * @access private\n */\nconst loadImage = async (image) => {\n let data = image;\n if (typeof image === 'undefined') {\n return 'undefined';\n }\n\n if (typeof image === 'string') {\n // Base64 Image\n if (/data:image\\/([a-zA-Z]*);base64,([^\"]*)/.test(image)) {\n data = atob(image.split(',')[1])\n .split('')\n .map((c) => c.charCodeAt(0));\n } else {\n const resp = await fetch(resolveURL(image));\n data = await resp.arrayBuffer();\n }\n } else if (image instanceof HTMLElement) {\n if (image.tagName === 'IMG') {\n data = await loadImage(image.src);\n }\n if (image.tagName === 'VIDEO') {\n data = await loadImage(image.poster);\n }\n if (image.tagName === 'CANVAS') {\n await new Promise((resolve) => {\n image.toBlob(async (blob) => {\n data = await readFromBlobOrFile(blob);\n resolve();\n });\n });\n }\n } else if (image instanceof File || image instanceof Blob) {\n data = await readFromBlobOrFile(image);\n }\n\n return new Uint8Array(data);\n};\n\nmodule.exports = loadImage;\n","module.exports = (worker, handler) => {\n worker.onmessage = ({ data }) => { // eslint-disable-line\n handler(data);\n };\n};\n","/**\n * send\n *\n * @name send\n * @function send packet to worker and create a job\n * @access public\n */\nmodule.exports = async (worker, packet) => {\n worker.postMessage(packet);\n};\n","/**\n * spawnWorker\n *\n * @name spawnWorker\n * @function create a new Worker in browser\n * @access public\n */\nmodule.exports = ({ workerPath, workerBlobURL }) => {\n let worker;\n if (Blob && URL && workerBlobURL) {\n const blob = new Blob([`importScripts(\"${workerPath}\");`], {\n type: 'application/javascript',\n });\n worker = new Worker(URL.createObjectURL(blob));\n } else {\n worker = new Worker(workerPath);\n }\n\n return worker;\n};\n","/**\n * terminateWorker\n *\n * @name terminateWorker\n * @function terminate worker\n * @access public\n */\nmodule.exports = (worker) => {\n worker.terminate();\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(352);\n"],"names":["root","factory","exports","module","define","amd","self","window","process","type","versions","electron","navigator","userAgent","indexOf","runtime","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","numUrls","arguments","base","document","createElement","href","head","getElementsByTagName","insertBefore","firstChild","resolved","a","index","removeChild","createWorker","require","recognize","image","langs","options","worker","load","loadLanguage","initialize","finally","terminate","detect","TESSERACT_ONLY","LSTM_ONLY","TESSERACT_LSTM_COMBINED","DEFAULT","OSD_ONLY","AUTO_OSD","AUTO_ONLY","AUTO","SINGLE_COLUMN","SINGLE_BLOCK_VERT_TEXT","SINGLE_BLOCK","SINGLE_LINE","SINGLE_WORD","CIRCLE_WORD","SINGLE_CHAR","SPARSE_TEXT","SPARSE_TEXT_OSD","OEM","defaultOEM","langPath","workerBlobURL","logger","AFR","AMH","ARA","ASM","AZE","AZE_CYRL","BEL","BEN","BOD","BOS","BUL","CAT","CEB","CES","CHI_SIM","CHI_TRA","CHR","CYM","DAN","DEU","DZO","ELL","ENG","ENM","EPO","EST","EUS","FAS","FIN","FRA","FRK","FRM","GLE","GLG","GRC","GUJ","HAT","HEB","HIN","HRV","HUN","IKU","IND","ISL","ITA","ITA_OLD","JAV","JPN","KAN","KAT","KAT_OLD","KAZ","KHM","KIR","KOR","KUR","LAO","LAT","LAV","LIT","MAL","MAR","MKD","MLT","MSA","MYA","NEP","NLD","NOR","ORI","PAN","POL","POR","PUS","RON","RUS","SAN","SIN","SLK","SLV","SPA","SPA_OLD","SQI","SRP","SRP_LATN","SWA","SWE","SYR","TAM","TEL","TGK","TGL","THA","TIR","TUR","UIG","UKR","URD","UZB","UZB_CYRL","VIE","YID","getId","jobCounter","_id","id","action","payload","createJob","log","schedulerCounter","workers","runningWorkers","jobQueue","getNumWorkers","dequeue","wIds","queue","job","w","shift","apply","addJob","wid","addWorker","getQueueLen","resolvePaths","circularize","defaultOptions","spawnWorker","terminateWorker","onMessage","loadImage","send","workerCounter","_options","errorHandler","resolves","rejects","setResolve","res","setReject","rej","startJob","jobId","workerId","writeText","path","text","args","readText","encoding","removeFile","FS","oem","setParameters","params","opts","getPDF","title","textonly","status","data","d","Array","from","userJobId","createScheduler","Tesseract","languages","PSM","setLogging","page","blocks","paragraphs","lines","words","symbols","block","paragraph","line","word","sym","isElectron","env","WorkerGlobalScope","prefix","cnt","Math","random","toString","logging","_logging","console","resolveURL","s","version","workerPath","TESS_ENV","corePath","readFromBlobOrFile","blob","fileReader","FileReader","onload","onerror","code","target","readAsArrayBuffer","test","atob","split","map","c","charCodeAt","fetch","resp","arrayBuffer","HTMLElement","tagName","src","poster","toBlob","File","Blob","Uint8Array","handler","onmessage","packet","postMessage","URL","Worker","createObjectURL","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","nmd","paths","children"],"sourceRoot":""} --------------------------------------------------------------------------------