├── .all-contributorsrc
├── .github
└── workflows
│ ├── build.yml
│ └── prettier.yml
├── .gitignore
├── .prettierignore
├── LICENSE.md
├── README.md
├── application
├── app.js
├── assets
│ ├── css
│ │ ├── grid.css
│ │ ├── main.css
│ │ └── qr_reader.css
│ ├── exclude-js
│ │ ├── BitMatrix.d.ts
│ │ ├── binarizer
│ │ │ └── index.d.ts
│ │ ├── decoder
│ │ │ ├── decodeData
│ │ │ │ ├── BitStream.d.ts
│ │ │ │ ├── index.d.ts
│ │ │ │ └── shiftJISTable.d.ts
│ │ │ ├── decoder.d.ts
│ │ │ ├── reedsolomon
│ │ │ │ ├── GenericGF.d.ts
│ │ │ │ ├── GenericGFPoly.d.ts
│ │ │ │ └── index.d.ts
│ │ │ └── version.d.ts
│ │ ├── extractor
│ │ │ └── index.d.ts
│ │ ├── index.d.ts
│ │ ├── jsQR.js
│ │ └── locator
│ │ │ └── index.d.ts
│ ├── fonts
│ │ ├── Lato-Black.ttf
│ │ ├── Lato-BlackItalic.ttf
│ │ ├── Lato-Bold.ttf
│ │ ├── Lato-BoldItalic.ttf
│ │ ├── Lato-Italic.ttf
│ │ ├── Lato-Light.ttf
│ │ ├── Lato-LightItalic.ttf
│ │ ├── Lato-Regular.ttf
│ │ ├── Lato-Thin.ttf
│ │ ├── Lato-ThinItalic.ttf
│ │ └── OFL.txt
│ └── js
│ │ ├── IntersectionObserver-polyfill.js
│ │ ├── applait.finder.min.js
│ │ ├── backend_api.js
│ │ ├── helper.js
│ │ ├── install.js
│ │ ├── jQuery-3.1.0.js
│ │ ├── jquery.autocomplete.min.js
│ │ ├── lazyload.js
│ │ ├── moments.min.js
│ │ ├── mustache.js
│ │ ├── ratings.js
│ │ ├── scan.js
│ │ └── search.js
├── icons
│ ├── donation.svg
│ ├── icon-112-112.png
│ ├── icon-112-112.svg
│ ├── icon-56-56.png
│ ├── icon-56-56.svg
│ └── icon.png
├── index.html
└── manifest.webapp
├── formatting.sh
├── images
├── bitcoin_rcv.png
├── image-1.png
├── image-2.png
├── image-3.png
├── image-4.png
├── logo.png
├── paypal.png
└── support.svg
├── npm-debug.log
├── package-lock.json
├── package.json
└── tools
├── build.sh
└── package.sh
/.all-contributorsrc:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | "README.md"
4 | ],
5 | "imageSize": 100,
6 | "commit": false,
7 | "contributors": [
8 | {
9 | "login": "farooqkz",
10 | "name": "Farooq Karimi Zadeh",
11 | "avatar_url": "https://avatars0.githubusercontent.com/u/15038218?v=4",
12 | "profile": "https://notabug.org/farooqkz",
13 | "contributions": [
14 | "ideas"
15 | ]
16 | },
17 | {
18 | "login": "Simon-Laux",
19 | "name": "Simon Laux",
20 | "avatar_url": "https://avatars2.githubusercontent.com/u/18725968?v=4",
21 | "profile": "https://github.com/Simon-Laux",
22 | "contributions": [
23 | "code"
24 | ]
25 | },
26 | {
27 | "login": "strukturart",
28 | "name": "John-David Deubl",
29 | "avatar_url": "https://avatars0.githubusercontent.com/u/5286893?v=4",
30 | "profile": "http://strukturart.com",
31 | "contributions": [
32 | "code"
33 | ]
34 | }
35 | ],
36 | "contributorsPerLine": 7,
37 | "projectName": "bHacker-store-client",
38 | "projectOwner": "strukturart",
39 | "repoType": "github",
40 | "repoHost": "https://github.com",
41 | "skipCi": true
42 | }
43 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build and upload artifact
2 | on: push
3 |
4 | jobs:
5 | build:
6 | name: Build
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - name: Checkout
12 | uses: actions/checkout@v2
13 |
14 | - name: Set Node.js 12.x
15 | uses: actions/setup-node@v1
16 | with:
17 | node-version: 12.x
18 |
19 | - name: npm install
20 | run: npm install
21 |
22 | - name: build
23 | run: npm run package
24 |
25 | - uses: actions/upload-artifact@v2
26 | with:
27 | name: App
28 | path: build/bhacker-store.zip
29 |
--------------------------------------------------------------------------------
/.github/workflows/prettier.yml:
--------------------------------------------------------------------------------
1 | name: Prettier - Check Code Formatting
2 | on: push
3 |
4 | jobs:
5 | check-formatting:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - name: Checkout
10 | uses: actions/checkout@v2
11 |
12 | - name: Set Node.js 12.x
13 | uses: actions/setup-node@v1
14 | with:
15 | node-version: 12.x
16 |
17 | - name: npm install
18 | run: npm install
19 |
20 | - name: check formatting
21 | run: npm run formatting:test
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | tmp
3 | node_modules
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 |
2 | **/jQuery-3.1.0.js
3 | **/applait.finder.min.js
4 | **/jquery.autocomplete.min.js
5 | **/moments.min.js
6 |
7 | build
8 | node_modules
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2020 John-David Deubl
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 | 
2 |
3 |
4 |
5 | [](#contributors-)
6 |
7 |
8 |
9 | ## bHacker-store
10 |
11 | An alternative app store by free developers for free devices.
12 | The database of apps is hosted [here](https://gitlab.com/banana-hackers/store-db/-/tree/master), further can be added by a pull request.
13 |
14 | ### Features
15 |
16 | - Install apps from the coders source
17 |
18 | 
19 | 
20 | 
21 | 
22 |
23 | ## How to sideload the app on your device
24 |
25 | ### Omni SD
26 |
27 | Download [bHackerStore App](https://github.com/strukturart/bHacker-store/releases/latest).
28 | Copy this zip file to the apps directory of the memory card.
29 | Open "OmniSD" and install this zip.
30 |
31 | ### Web IDE
32 |
33 | Download [bHackerStore App](https://github.com/strukturart/bHacker-store/releases/latest).
34 | Extract this zip to a folder.
35 | Click "Open Packaged App" and select the folder from the previous step.
36 | Click "Install and Run" button.
37 |
38 | ## Thank you
39 |
40 | - SimonLaux and the discord [community](https://discord.gg/t2CBPb)
41 |
42 | ## Contributing
43 |
44 | ### Setup
45 |
46 | first install the dependencies
47 |
48 | ```sh
49 | npm install
50 | ```
51 |
52 | ### Packaging
53 |
54 | This only works on linux(and maybe osx) at the moment
55 |
56 | ```sh
57 | npm run package
58 | ```
59 |
60 | The resulting package can be found in the build folder.
61 |
62 | ### Formatting
63 |
64 | This project uses code formatting. Make sure to run the formatter before commiting, otherwise the CI will be sad 😢.
65 |
66 | ```sh
67 | # check it
68 | npm run formatting:test
69 | # run the formatter
70 | npm run formatting:fix
71 | ```
72 |
73 | ## Contributors ✨
74 |
75 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
76 |
77 |
78 |
79 |
80 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
94 |
95 | ## Donation
96 |
97 | If you use the app often, please donate an amount.
98 |
99 |
100 |
101 |
102 |
103 |
108 | |
109 |
110 |
111 | Bitcoin
112 | 
113 |
114 | |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/application/app.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | let page = 0;
4 | let window_status = "article-list";
5 | let dataSet;
6 | let panels = ["All", "ratings"];
7 | let current_panel = 0;
8 | let app_slug;
9 | let offline = false;
10 | let apps_data = new Array();
11 | let update_time;
12 | let apps_rating = new Array();
13 | let co;
14 | let contributors = new Array();
15 | let potato = "";
16 | let after_installation = false;
17 |
18 | //background colors
19 | let col = [
20 | "rgba(240, 221, 50,1)",
21 | "rgba(120, 120, 151,1)",
22 | "rgba(221,91,169,1)",
23 | "rgba(129,204,177,1)",
24 | "rgba(100,175,130,1)",
25 | "rgba(206,94,66,1)",
26 | "rgba(136,196,162,1)",
27 | ];
28 |
29 | //store current article
30 | let article_id;
31 | //////////////////////////////
32 | //fetch-database////
33 | //////////////////////////////
34 |
35 | function init() {
36 | BackendApi.setStatusCallback(toaster);
37 |
38 | function loadData() {
39 | dataSet = BackendApi.getData();
40 | addAppList(addAppList_callback);
41 | document.querySelector("div#message-box").style.animationPlayState =
42 | "running";
43 | document.querySelector(
44 | "div#message-box img.icon-2"
45 | ).style.animationPlayState = "running";
46 | document.querySelector(
47 | "div#message-box img.icon-1"
48 | ).style.animationPlayState = "running";
49 | }
50 |
51 | if (!BackendApi.getData()) {
52 | if (!navigator.onLine) {
53 | } else {
54 | BackendApi.update()
55 | .then(loadData)
56 | .catch((error) => {
57 | console.log(error);
58 | toaster(error instanceof Error ? error.message : error, 3000);
59 | });
60 | }
61 | } else {
62 | if (navigator.onLine) {
63 | BackendApi.update()
64 | .then(loadData)
65 | .catch((error) => {
66 | console.log(error);
67 | toaster(error instanceof Error ? error.message : error, 3000);
68 | loadData();
69 | });
70 | } else {
71 | offline = true;
72 | toaster(
73 | "
your device is offline, you can view the app but you cannot install it.",
74 | 3000
75 | );
76 |
77 | loadData();
78 | }
79 | }
80 | }
81 |
82 | let pep = new Array();
83 | let counter = 0;
84 |
85 | function addAppList(callback) {
86 | dataSet.apps.forEach(function (value, index) {
87 | let data = dataSet.apps[index];
88 | let item_title = data.name;
89 | let item_summary = data.description;
90 | let item_link = data.download.url;
91 | let item_url;
92 | let item_donation = data.donation;
93 | let item_ads = data.has_ads;
94 | let item_tracking = data.has_tracking;
95 | let tag = data.meta.categories;
96 | let item_category = data.meta.categories.toString().replace(",", " ");
97 | let item_tags = tag.toString().replace(",", " ");
98 | let item_author = data.author.toString();
99 | let item_maintainer;
100 | let item_icon = data.icon;
101 | let item_license = data.license;
102 | let item_type = data.type;
103 | let donation_icon = "none";
104 | let item_slug = data.slug;
105 | let images = "";
106 |
107 | //bad hack
108 | if (data.meta.categories != "undefinedutility") {
109 | pep += data.meta.categories + ",";
110 | }
111 |
112 | if (data.screenshots != "") {
113 | images = data.screenshots.toString().split(",");
114 | }
115 |
116 | if (data.git_repo != "") {
117 | item_url = data.git_repo;
118 | }
119 |
120 | //unique author list
121 | let just_author_name = item_author.split("<")[0].trim();
122 | if (contributors.indexOf(just_author_name) === -1) {
123 | contributors.push(just_author_name);
124 | }
125 |
126 | //extract email@author
127 | // false for mustache.js logic
128 | let item_author_email = item_author.match(
129 | /([a-zA-Z0-9._+-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi
130 | );
131 | if (item_author_email == null) {
132 | item_author_email = false;
133 | }
134 |
135 | //author
136 | if (data.author) {
137 | item_author = data.author.toString();
138 | var regex = /(<)(.*?)(>)/g;
139 | var matches = item_author.match(regex);
140 | if (matches != null) {
141 | for (var i = 0; i < 20; i++) {
142 | item_author = item_author.replace(matches[i], "");
143 | }
144 | }
145 | }
146 |
147 | //maintainer
148 | if (data.maintainer) {
149 | item_maintainer = data.maintainer.toString();
150 |
151 | var regex = /(<)(.*?)(>)/g;
152 | var matches = item_maintainer.match(regex);
153 |
154 | if (matches != null) {
155 | for (var i = 0; i < 20; i++) {
156 | item_maintainer = item_maintainer.replace(matches[i], "");
157 | }
158 | }
159 | }
160 |
161 | //donation
162 | if (item_donation == "") {
163 | donation_icon = "no";
164 | } else {
165 | donation_icon = "yes";
166 | }
167 | //ads
168 | if (item_ads) {
169 | item_ads = "yes";
170 | } else {
171 | item_ads = "no";
172 | }
173 | //tracking
174 | if (item_tracking) {
175 | item_tracking = "yes";
176 | } else {
177 | item_tracking = "no";
178 | }
179 | //call ratings
180 | get_ratings(item_slug, ratings_callback);
181 |
182 | counter++;
183 | apps_data.push({
184 | images: images,
185 | title: item_title,
186 | author: item_author,
187 | maintainer: item_maintainer,
188 | author_email: item_author_email,
189 | summary: item_summary,
190 | category: item_category,
191 | link: item_link,
192 | license: item_license,
193 | ads: item_ads,
194 | donation_url: item_donation,
195 | donation: donation_icon,
196 | tracking: item_tracking,
197 | type: item_type,
198 | summarie: item_summary,
199 | icon: item_icon,
200 | slug: item_slug,
201 | tags: item_tags,
202 | url: item_url,
203 | index: counter,
204 | });
205 | });
206 |
207 | update_time = moment(dataSet.generated_at).format("DD.MM.YYYY, HH:mm");
208 | co = contributors.sort().join(", ");
209 |
210 | callback("done");
211 | }
212 |
213 | document.addEventListener("DOMContentLoaded", (event) => {
214 | init();
215 | });
216 |
217 | function addAppList_callback(data) {
218 | //categories - panels
219 | pep = pep.split(",");
220 | pep.forEach((c) => {
221 | if (!panels.includes(c)) {
222 | panels.push(c);
223 | }
224 | });
225 | panels.pop(panels.length);
226 |
227 | document.querySelector("#update").textContent = update_time;
228 | document.querySelector(
229 | "div#about div#inner div#contributors"
230 | ).textContent = co;
231 | document.querySelector("article#search input").focus();
232 |
233 | bottom_bar("scan", "select", "about");
234 |
235 | setTimeout(() => {
236 | renderHello();
237 | article_animation();
238 | //panel indicator
239 | for (let i = 0; i < panels.length; i++) {
240 | let pra = document.createElement("div");
241 | document.getElementById("panels-indicator-inner").appendChild(pra);
242 | }
243 |
244 | document.querySelector(
245 | "#panels-indicator-inner"
246 | ).firstChild.style.background = "pink ";
247 |
248 | DownloadCounter.load().then((_) => {
249 | const apps_article = document.querySelectorAll("div#apps article");
250 | for (let i = 0; i < apps_article.length; i++) {
251 | const appId = apps_article[i].getAttribute("data-slug");
252 |
253 | if (appId) {
254 | const dl_section = apps_article[i].querySelector("div.dl-cnt");
255 | const count = DownloadCounter.getForApp(appId);
256 | dl_section.innerHTML = "Downloads " + count;
257 |
258 | if (dl_section && count !== -1) {
259 | dl_section.innerHTML = "Downloads " + count;
260 | }
261 | }
262 | }
263 | });
264 | }, 1000);
265 | }
266 |
267 | ////////////////////////
268 | //Animation start//////
269 | ///////////////////////
270 | function article_animation() {
271 | let pe = document.querySelectorAll("article");
272 | for (let i = 0; i < pe.length; i++) {
273 | setTimeout(() => {
274 | pe[i].style.opacity = "1";
275 | }, i * 100);
276 | }
277 | }
278 |
279 | ////////////////////////
280 | ////SET TABINDEX////////
281 | ///////////////////////
282 |
283 | function set_tabindex() {
284 | let articles_panel = document.querySelectorAll("article");
285 |
286 | //focused = 0;
287 |
288 | var tab = 0;
289 | for (let i = 0; i < articles_panel.length; i++)
290 | if (articles_panel[i].style.display === "block") {
291 | tab++;
292 | articles_panel[i].setAttribute("tabindex", tab);
293 | } else {
294 | articles_panel[i].removeAttribute("tabindex");
295 | }
296 |
297 | let focusme = document.querySelectorAll("article[tabindex]");
298 | focusme[0].focus();
299 | }
300 |
301 | //////////////////////////
302 | ////WRITE HTML LIST///////
303 | //////////////////////////
304 |
305 | function renderHello() {
306 | var template = document.getElementById("template").innerHTML;
307 | var rendered = Mustache.render(template, { data: apps_data });
308 | document.getElementById("apps").innerHTML = rendered;
309 | //searchGetData();
310 | }
311 |
312 | //////////////////////////
313 | //////PANELS//////////////
314 | //////////////////////////
315 |
316 | function panels_list(panel) {
317 | let articles = document.querySelectorAll("article");
318 |
319 | let elements = document.getElementsByClassName(panel);
320 |
321 | for (let k = 0; k < articles.length; k++) {
322 | articles[k].style.display = "none";
323 | }
324 |
325 | for (let i = 0; i < elements.length; i++) {
326 | elements[i].style.display = "block";
327 | }
328 | set_tabindex();
329 | }
330 |
331 | ////////////////////////
332 | //NAVIGATION///////////
333 | /////////////////////////
334 |
335 | function randomNumber(min, max) {
336 | return Math.floor(Math.random() * (max - min) + min);
337 | }
338 |
339 | function nav_panels(left_right) {
340 | window.scrollTo(0, 0);
341 | focused = 0;
342 |
343 | document.getElementById("navigation").style.display = "none!important";
344 |
345 | if (left_right == "left") {
346 | current_panel--;
347 | }
348 |
349 | if (left_right == "right") {
350 | current_panel++;
351 | }
352 |
353 | current_panel = current_panel % panels.length;
354 | if (current_panel < 0) {
355 | current_panel += panels.length;
356 | }
357 |
358 | document.querySelector("div#navigation div").textContent =
359 | panels[current_panel];
360 | panels_list(panels[current_panel]);
361 |
362 | if (current_panel == 0) {
363 | //document.querySelector("input").focus();
364 |
365 | let articles = document.querySelectorAll("article");
366 | articles[1].focus();
367 | focused = 1;
368 | document.getElementById("navigation").style.display = "none";
369 | //document.querySelector("div#app").style.margin = "5px 0 0 0";
370 | }
371 | //rating view
372 | if (current_panel == 1) {
373 | document.querySelector("input").focus();
374 | document.querySelector("div#navigation").style.display = "none";
375 | document.querySelector("div#app").style.margin = "5px 0 0 0";
376 |
377 | let elm2 = document.querySelectorAll("div.single-article");
378 | for (var i = 0; i < elm2.length; i++) {
379 | elm2[i].style.display = "none";
380 | }
381 |
382 | let elm3 = document.querySelectorAll("div.article-list");
383 | for (var i = 0; i < elm3.length; i++) {
384 | elm3[i].style.display = "none";
385 | }
386 |
387 | let elm4 = document.querySelectorAll("div.article-list");
388 | for (var i = 0; i < elm4.length; i++) {
389 | elm4[i].style.display = "none";
390 | }
391 |
392 | let elm5 = document.querySelectorAll("ul.ratings");
393 | for (var i = 0; i < elm5.length; i++) {
394 | elm5[i].style.display = "block";
395 | }
396 | }
397 |
398 | if (current_panel > 1 || current_panel == 0) {
399 | let elm2 = document.querySelectorAll("div.single-article");
400 | for (var i = 0; i < elm2.length; i++) {
401 | elm2[i].style.display = "none";
402 | }
403 |
404 | let elm3 = document.querySelectorAll("div.article-list");
405 | for (var i = 0; i < elm3.length; i++) {
406 | elm3[i].style.display = "block";
407 | }
408 |
409 | let elm4 = document.querySelectorAll("ul.ratings");
410 | for (var i = 0; i < elm4.length; i++) {
411 | elm4[i].style.display = "none";
412 | }
413 | }
414 |
415 | if (current_panel > 1) {
416 | document.querySelector("div#navigation").style.display = "block";
417 | document.querySelector("div#app").style.margin = "30px 0 0 0";
418 | }
419 |
420 | //indicator
421 | let indicator_item = document.querySelector("#panels-indicator-inner");
422 | let indicator_items = indicator_item.getElementsByTagName("DIV");
423 | for (let i = 0; i < indicator_items.length; i++) {
424 | indicator_items[i].style.background = "black";
425 | }
426 |
427 | indicator_items[current_panel].style.background = col[randomNumber(0, 5)];
428 |
429 | random_background();
430 | }
431 |
432 | ///////////////
433 | //up - down
434 | ///////////////
435 | let focused = 0;
436 |
437 | function nav(param) {
438 | let articles;
439 |
440 | if (window_status == "article-list" || window_status == "search") {
441 | articles = document.querySelectorAll("article[tabindex]");
442 | }
443 | if (window_status == "options") {
444 | let k = document.activeElement.parentElement.id;
445 | articles = document.getElementById(k).children;
446 | }
447 |
448 | if (window_status == "rating") {
449 | let k = document.activeElement.parentElement.children;
450 | articles = k;
451 | }
452 |
453 | if (param == "+1" && focused < articles.length - 1) {
454 | focused++;
455 | articles[focused].focus();
456 |
457 | var scrollDiv = articles[focused].offsetTop + 20;
458 | window.scrollTo({ top: scrollDiv, behavior: "smooth" });
459 | }
460 |
461 | if (param == "-1" && focused > 0) {
462 | focused--;
463 | articles[focused].focus();
464 |
465 | var scrollDiv = articles[focused].offsetTop + 30;
466 | window.scrollTo({ top: scrollDiv, behavior: "smooth" });
467 | }
468 |
469 | random_background();
470 | }
471 |
472 | function random_background() {
473 | function randomNumber(min, max) {
474 | return Math.floor(Math.random() * (max - min) + min);
475 | }
476 | let elem = document.querySelectorAll("article");
477 |
478 | if (document.activeElement.tagName == "ARTICLE") {
479 | for (let i = 1; i < elem.length; i++) {
480 | elem[i].style.background = "white";
481 | }
482 | document.activeElement.style.background = col[randomNumber(0, 5)];
483 | } else {
484 | for (let i = 1; i < elem.length; i++) {
485 | elem[i].style.background = "white";
486 | }
487 | }
488 | }
489 |
490 | ////////////////////
491 | ////ROUTING///
492 | ///////////////////
493 |
494 | //to do get vars in url
495 | //to pass article ids
496 |
497 | window.addEventListener(
498 | "hashchange",
499 | function () {
500 | //home
501 | if (location.hash === "#home") {
502 | document.querySelector("div#about").style.display = "none";
503 | document.querySelector("article#search").focus();
504 | bottom_bar("scan", "", "about");
505 | }
506 | //list
507 | if (location.hash === "#list") {
508 | show_article_list();
509 | }
510 | //article
511 | if (location.hash.includes("#article")) {
512 | let getVar = location.hash.split("/");
513 | show_article(getVar[1]);
514 | }
515 | //about
516 | if (location.hash === "#about") {
517 | document.querySelector("div#about").style.display = "block";
518 | document.querySelector("div#about div#inner").focus();
519 | document.getElementById("top").scrollIntoView();
520 | article_id = document.activeElement.getAttribute("id");
521 | bottom_bar("", "", "");
522 | }
523 | //rating
524 | if (location.hash === "#rating") {
525 | open_rating();
526 | }
527 | //options
528 | if (location.hash === "#options") {
529 | open_options();
530 | }
531 | //scan
532 | if (location.hash === "#scan") {
533 | console.log("article");
534 | }
535 | },
536 | false
537 | );
538 |
539 | ////////////////////
540 | ////SHOW ARTICLE///
541 | ///////////////////
542 |
543 | function show_article(app) {
544 | window.location.hash = "#article/" + app;
545 |
546 | window_status = "single-article";
547 | document.getElementById(app).focus();
548 |
549 | document.getElementById("app-panels-inner").style.height = "98vh";
550 | document.querySelector("div#app-panels-inner").scrollTo(0, 0);
551 | document.querySelector("div#app").style.margin = "0 0 0 0";
552 | document.querySelector("div#panels-indicator").style.display = "none";
553 |
554 | article_id = document.activeElement.getAttribute("id");
555 |
556 | if (document.activeElement.getAttribute("class") != "About") {
557 | document.querySelector("div#navigation").style.display = "none";
558 |
559 | let elm1 = document.querySelectorAll("article");
560 | for (var i = 0; i < elm1.length; i++) {
561 | elm1[i].style.display = "none";
562 | }
563 |
564 | document.activeElement.style.display = "block";
565 |
566 | let elm2 = document.querySelectorAll("div.single-article");
567 | for (var i = 0; i < elm2.length; i++) {
568 | elm2[i].style.display = "block";
569 | }
570 |
571 | let elm3 = document.querySelectorAll("div.article-list");
572 | for (var i = 0; i < elm3.length; i++) {
573 | elm3[i].style.display = "none";
574 | }
575 |
576 | let elm4 = document.querySelectorAll("ul.ratings");
577 | for (var i = 0; i < elm4.length; i++) {
578 | elm4[i].style.display = "block";
579 | }
580 |
581 | if (!offline) {
582 | bottom_bar("options", "", "install");
583 | } else {
584 | bottom_bar("", "you are offline", "");
585 | }
586 | window_status = "single-article";
587 | }
588 | }
589 |
590 | /////////////////////
591 | ///SHOW ARTICLE-LIST
592 | ////////////////////
593 |
594 | function show_article_list() {
595 | after_installation = false;
596 | article_id = document.activeElement.getAttribute("id");
597 |
598 | window.location.hash = "#list";
599 | document.querySelector("div#panels-indicator").style.display = "block";
600 |
601 | if (article_id) {
602 | document.getElementById(article_id).focus();
603 | focused = document.getElementById(article_id).getAttribute("tabindex") - 1;
604 | }
605 |
606 | document.getElementById("app-panels-inner").style.height = "84vh";
607 | if (current_panel == 0) {
608 | document.querySelector("div#app").style.margin = "5px 0 0 0";
609 | }
610 |
611 | let elm1 = document.querySelectorAll("article");
612 | for (var i = 0; i < elm1.length; i++) {
613 | elm1[i].style.display = "block";
614 | }
615 |
616 | let elm2 = document.querySelectorAll("div.single-article");
617 | for (var i = 0; i < elm2.length; i++) {
618 | elm2[i].style.display = "none";
619 | }
620 |
621 | let elm3 = document.querySelectorAll("div.article-list");
622 | for (var i = 0; i < elm3.length; i++) {
623 | elm3[i].style.display = "block";
624 | }
625 |
626 | let elm4 = document.querySelectorAll("ul.ratings");
627 | for (var i = 0; i < elm4.length; i++) {
628 | elm4[i].style.display = "none";
629 | }
630 |
631 | if (current_panel > 1) {
632 | document.getElementById("navigation").style.display = "block";
633 | document.querySelector("div#app").style.margin = "30px 0 0 0";
634 | }
635 |
636 | panels_list(panels[current_panel]);
637 | bottom_bar("", "select", "about");
638 | window_status = "article-list";
639 | }
640 |
641 | function open_rating() {
642 | document.querySelector("div#rating-wrapper").style.display = "block";
643 | document.querySelector("div#rating-wrapper input").focus();
644 | rating_stars = 0;
645 | get_userId();
646 |
647 | bottom_bar("send", "", "close");
648 | window_status = "rating";
649 | }
650 |
651 | function close_rating() {
652 | document.querySelector("div#rating-wrapper").style.display = "none";
653 | document.querySelector("div#rating-wrapper input").value = "";
654 | document.querySelector("div#rating-wrapper textarea").value = "";
655 | rating_stars = 0;
656 |
657 | bottom_bar("", "", "");
658 | close_options();
659 | }
660 |
661 | function close_options() {
662 | let elm = document.querySelectorAll("div.options");
663 | for (var i = 0; i < elm.length; i++) {
664 | elm[i].style.display = "none";
665 | }
666 | document.querySelector("article#" + article_id).focus();
667 | let elm1 = document.querySelectorAll("div.single-article");
668 | for (var i = 0; i < elm1.length; i++) {
669 | elm1[i].style.display = "block";
670 | }
671 |
672 | let elm2 = document.querySelectorAll("div.article-list");
673 | for (var i = 0; i < elm2.length; i++) {
674 | elm2[i].style.display = "noe";
675 | }
676 |
677 | bottom_bar("options", "", "install");
678 | window_status = "single-article";
679 | }
680 |
681 | function open_options() {
682 | window_status = "options";
683 | window.location.hash = "#options";
684 |
685 | let elm = document.querySelectorAll("div.options");
686 | for (var i = 0; i < elm.length; i++) {
687 | elm[i].style.display = "none";
688 | }
689 | focused = 0;
690 | document.getElementById(
691 | "options-" + document.activeElement.getAttribute("data-slug")
692 | ).style.display = "block";
693 | document
694 | .getElementById(
695 | "options-" + document.activeElement.getAttribute("data-slug")
696 | )
697 | .children[0].focus();
698 |
699 | bottom_bar("", "", "");
700 | }
701 |
702 | //search listener
703 |
704 | document.querySelector("article#search").onfocus = function () {
705 | document.querySelector("article#search input").focus();
706 | };
707 |
708 | const search_listener = document.querySelector("article#search input");
709 |
710 | search_listener.addEventListener("focus", (event) => {
711 | bottom_bar("scan", "select", "about");
712 | window.scrollTo(0, 0);
713 | window_status = "search";
714 | document.getElementById("navigation").style.display = "none";
715 | document.querySelector("div#app").style.margin = "0px 0 0 0";
716 | document.querySelector("article#search input").style.border =
717 | "2px inset silver";
718 | });
719 |
720 | search_listener.addEventListener("blur", (event) => {
721 | bottom_bar("", "select", "about");
722 | window_status = "article-list";
723 | document.querySelector("article#search").style.background = "gray";
724 | document.querySelector("article#search input").style.border = "none";
725 | });
726 |
727 | ////////////////////
728 | ///Read Rating/////
729 | ///////////////////
730 |
731 | function ratings_callback(data) {
732 | if (data.ratings.length > 0) {
733 | let ofind = apps_data.find((o) => o.slug === data.appid);
734 | if (ofind) ofind["rating"] = data.ratings;
735 | }
736 | }
737 |
738 | //////////////////
739 | //download app///
740 | /////////////////
741 |
742 | function install_app() {
743 | if (!offline) {
744 | install.download_file(
745 | document.activeElement.getAttribute("data-download"),
746 | document.activeElement.getAttribute("data-slug")
747 | );
748 | }
749 | }
750 |
751 | function open_url() {
752 | let url = document.activeElement.getAttribute("data-url");
753 | if (url.startsWith("mailto:")) {
754 | var mail = new MozActivity({
755 | name: "view",
756 | data: {
757 | type: "url",
758 | url: url,
759 | },
760 | });
761 | mail.onerror = () => {
762 | console.log("Error: " + this.error, 3000);
763 | };
764 | return;
765 | }
766 | window.open(document.activeElement.getAttribute("data-url"), "_self ");
767 | }
768 |
769 | ///launch app after installation
770 |
771 | function launch_app() {
772 | var request = window.navigator.mozApps.mgmt.getAll();
773 | request.onerror = function (e) {
774 | console.log("Error calling getInstalled: " + request.error.name);
775 | };
776 | request.onsuccess = function (e) {
777 | var appsRecord = request.result;
778 | appsRecord[appsRecord.length - 1].launch();
779 | };
780 | }
781 |
782 | jQuery(function () {
783 | //////////////////////////
784 | ////KEYPAD TRIGGER////////////
785 | /////////////////////////
786 |
787 | function handleKeyDown(evt) {
788 | const isInSearchField = evt.target.id == "search" && evt.target.value != "";
789 |
790 | if ("0123456789".search(evt.key) !== -1) {
791 | potato += evt.key;
792 | if (potato.search("768286") !== -1) {
793 | alert("You are a POTATO!");
794 | potato = "";
795 | }
796 | if (potato.length > 12) {
797 | potato = "";
798 | }
799 | }
800 |
801 | switch (evt.key) {
802 | case "Enter":
803 | if (
804 | window.location.hash == "about" ||
805 | window.location.hash == "search" ||
806 | window.location.hash == "scan"
807 | ) {
808 | break;
809 | }
810 | if (window.location.hash == "#list" || window.location.hash == "") {
811 | window.location.hash =
812 | "#article/" + document.activeElement.getAttribute("data-slug");
813 | }
814 |
815 | if (window.location.hash == "#options") {
816 | if (document.activeElement.hasAttribute("data-slug")) {
817 | window.location.hash = "#rating";
818 | }
819 | if (document.activeElement.hasAttribute("data-url")) {
820 | open_url();
821 | }
822 | }
823 | break;
824 |
825 | case "ArrowDown":
826 | if (
827 | window.location.hash == "#about" ||
828 | window.location.hash == "#scan"
829 | ) {
830 | break;
831 | }
832 |
833 | if (window.location.hash.includes("#article")) {
834 | document.querySelector("div#app-panels-inner").scrollBy(0, 15);
835 | break;
836 | }
837 |
838 | if (
839 | window.location.hash !== "#scan" ||
840 | window.location.hash !== "#about" ||
841 | window.location.hash == ""
842 | ) {
843 | nav("+1");
844 | break;
845 | }
846 |
847 | break;
848 |
849 | case "ArrowUp":
850 | if (window.location.hash === "#scan") break;
851 | if (window.location.hash === "#about") break;
852 |
853 | if (window.location.hash.includes("#article")) {
854 | document.querySelector("div#app-panels-inner").scrollBy(0, -15);
855 | break;
856 | }
857 |
858 | if (
859 | window.location.hash !== "#scan" ||
860 | window.location.hash !== "#about" ||
861 | window.location.hash === ""
862 | ) {
863 | nav("-1");
864 | break;
865 | }
866 |
867 | break;
868 |
869 | case "ArrowLeft":
870 | if (window_status == "scan") break;
871 |
872 | if (isInSearchField) {
873 | evt.preventDefault;
874 | break;
875 | }
876 | if (evt.target.id == "search" && evt.target.value == "") {
877 | nav_panels("left");
878 | break;
879 | }
880 |
881 | if (window_status == "article-list") {
882 | nav_panels("left");
883 | }
884 | break;
885 |
886 | case "ArrowRight":
887 | if (window_status == "scan") break;
888 |
889 | if (isInSearchField) break;
890 |
891 | if (evt.target.id == "search" && evt.target.value == "") {
892 | nav_panels("right");
893 | break;
894 | }
895 | if (window_status == "article-list") {
896 | nav_panels("right");
897 | }
898 |
899 | break;
900 |
901 | case "8":
902 | case "SoftLeft":
903 | if (window_status == "about") break;
904 | if (window_status == "scan") break;
905 |
906 | if (window_status == "search") {
907 | window_status = "scan";
908 |
909 | qr.start_scan(function (callback) {
910 | let slug = callback.replace("bhackers:", "");
911 | show_article(slug);
912 | window_status = "single-article";
913 | });
914 |
915 | bottom_bar("", "", "");
916 | break;
917 | }
918 |
919 | if (window_status == "rating") {
920 | //sanitizer
921 | let body = $("div#rating-wrapper textarea").val(),
922 | temp = document.createElement("div");
923 | temp.innerHTML = body;
924 | let comment = temp.textContent || temp.innerText;
925 | send_rating(
926 | get_userId(),
927 | get_userId(),
928 | $("#" + article_id).data("slug"),
929 | $("#" + article_id).data("name"),
930 | Number(rating_stars),
931 | comment,
932 | rating_write_callback
933 | );
934 |
935 | break;
936 | }
937 |
938 | if (window_status == "single-article") {
939 | open_options();
940 | break;
941 | }
942 |
943 | case "9":
944 | case "SoftRight":
945 | if (window_status == "scan") break;
946 |
947 | if (window_status == "about") break;
948 |
949 | if (after_installation == true) {
950 | launch_app();
951 | break;
952 | }
953 |
954 | if (window_status == "article-list" || window_status == "search") {
955 | //open_about();
956 | window.location.hash = "#about";
957 |
958 | break;
959 | }
960 |
961 | if (window.location.hash.includes("#article")) {
962 | install_app();
963 | break;
964 | }
965 |
966 | if ((window_status = "rating")) {
967 | close_rating();
968 | break;
969 | }
970 |
971 | break;
972 |
973 | case "Backspace":
974 | if (window_status == "scan") {
975 | evt.preventDefault();
976 | qr.stop_scan("search");
977 | show_article_list();
978 | break;
979 | }
980 |
981 | if (isInSearchField) break;
982 | if (evt.target.id == "search" && evt.target.value == "") {
983 | evt.preventDefault();
984 | $("article:not(article#search)").css("display", "block");
985 | }
986 |
987 | if (location.hash.includes("#article")) {
988 | evt.preventDefault();
989 | window.location.hash = "#list";
990 | //show_article_list();
991 | break;
992 | }
993 |
994 | if (window.location.hash == "#about") {
995 | evt.preventDefault();
996 | window.location.hash = "#home";
997 | break;
998 | }
999 |
1000 | if (window.location.hash == "#options") {
1001 | evt.preventDefault();
1002 | window.location.hash =
1003 | "#article/" + document.activeElement.getAttribute("data-slug");
1004 | close_options();
1005 | break;
1006 | }
1007 | if (
1008 | window.location.hash == "#list" &&
1009 | !$("input#search").is(":focus")
1010 | ) {
1011 | window.close();
1012 | }
1013 | break;
1014 | }
1015 | }
1016 |
1017 | document.addEventListener("keydown", handleKeyDown);
1018 | });
1019 |
--------------------------------------------------------------------------------
/application/assets/css/grid.css:
--------------------------------------------------------------------------------
1 | /* G R I D */
2 |
3 | .grid-col-1 {
4 | min-width: 10px;
5 | max-width: 10px;
6 | }
7 |
8 | .grid-col-2 {
9 | min-width: 20px;
10 | max-width: 20px;
11 | }
12 |
13 | .grid-col-3 {
14 | min-width: 30px;
15 | max-width: 30px;
16 | }
17 |
18 | .grid-col-4 {
19 | min-width: 40px;
20 | max-width: 40px;
21 | }
22 |
23 | .grid-col-5 {
24 | min-width: 50px;
25 | max-width: 50px;
26 | }
27 |
28 | .grid-col-6 {
29 | min-width: 60px;
30 | max-width: 60px;
31 | }
32 |
33 | .grid-col-7 {
34 | min-width: 70px;
35 | max-width: 70px;
36 | }
37 |
38 | .grid-col-8 {
39 | min-width: 80px;
40 | max-width: 80px;
41 | }
42 |
43 | .grid-col-9 {
44 | min-width: 90px;
45 | max-width: 90px;
46 | }
47 |
48 | .grid-col-10 {
49 | min-width: 100px;
50 | max-width: 100px;
51 | }
52 |
53 | .grid-col-11 {
54 | min-width: 110px;
55 | max-width: 110px;
56 | }
57 |
58 | .grid-col-12 {
59 | min-width: 120px;
60 | max-width: 120px;
61 | }
62 |
63 | .grid-col-13 {
64 | min-width: 130px;
65 | max-width: 130px;
66 | }
67 |
68 | .grid-col-14 {
69 | min-width: 140px;
70 | max-width: 140px;
71 | }
72 |
73 | .grid-col-15 {
74 | min-width: 150px;
75 | max-width: 150px;
76 | }
77 |
78 | .grid-col-16 {
79 | min-width: 160px;
80 | max-width: 160px;
81 | }
82 |
83 | .grid-col-17 {
84 | min-width: 170px;
85 | max-width: 170px;
86 | }
87 |
88 | .grid-col-18 {
89 | min-width: 180px;
90 | max-width: 180px;
91 | }
92 |
93 | .grid-col-19 {
94 | min-width: 190px;
95 | max-width: 190px;
96 | }
97 |
98 | .grid-col-20 {
99 | min-width: 200px;
100 | max-width: 200px;
101 | }
102 |
103 | .grid-col-21 {
104 | min-width: 210px;
105 | max-width: 210px;
106 | }
107 |
108 | .grid-col-22 {
109 | min-width: 220px;
110 | max-width: 220px;
111 | }
112 |
113 | .grid-col-23 {
114 | min-width: 230px;
115 | max-width: 230px;
116 | }
117 |
118 | .grid-col-24 {
119 | min-width: 240px;
120 | max-width: 240px;
121 | }
122 |
123 | .grid-col-25 {
124 | min-width: 250px;
125 | max-width: 250px;
126 | }
127 |
128 | .grid-col-26 {
129 | min-width: 260px;
130 | max-width: 260px;
131 | }
132 |
133 | .grid-col-27 {
134 | min-width: 270px;
135 | max-width: 270px;
136 | }
137 |
138 | .grid-col-28 {
139 | min-width: 280px;
140 | max-width: 280px;
141 | }
142 |
143 | .grid-col-29 {
144 | min-width: 290px;
145 | max-width: 290px;
146 | }
147 |
148 | .grid-col-30 {
149 | min-width: 300px;
150 | max-width: 300px;
151 | }
152 |
153 | .grid-col-31 {
154 | min-width: 310px;
155 | max-width: 310px;
156 | }
157 |
158 | .grid-col-32 {
159 | min-width: 320px;
160 | max-width: 320px;
161 | }
162 |
163 | .grid-col-33 {
164 | min-width: 330px;
165 | max-width: 330px;
166 | }
167 |
168 | .grid-col-34 {
169 | min-width: 340px;
170 | max-width: 340px;
171 | }
172 |
173 | .grid-col-35 {
174 | min-width: 350px;
175 | max-width: 350px;
176 | }
177 |
178 | .grid-col-36 {
179 | min-width: 360px;
180 | max-width: 360px;
181 | }
182 |
183 | .grid-col-37 {
184 | min-width: 370px;
185 | max-width: 370px;
186 | }
187 |
188 | .grid-col-38 {
189 | min-width: 380px;
190 | max-width: 380px;
191 | }
192 |
193 | .grid-col-39 {
194 | min-width: 390px;
195 | max-width: 390px;
196 | }
197 |
198 | .grid-col-40 {
199 | min-width: 400px;
200 | max-width: 400px;
201 | }
202 |
203 | .grid-col-41 {
204 | min-width: 410px;
205 | max-width: 410px;
206 | }
207 |
208 | .grid-col-42 {
209 | min-width: 420px;
210 | max-width: 420px;
211 | }
212 |
213 | .grid-col-43 {
214 | min-width: 430px;
215 | max-width: 430px;
216 | }
217 |
218 | .grid-col-44 {
219 | min-width: 440px;
220 | max-width: 440px;
221 | }
222 |
223 | .grid-col-45 {
224 | min-width: 450px;
225 | max-width: 450px;
226 | }
227 |
228 | .grid-col-46 {
229 | min-width: 460px;
230 | max-width: 460px;
231 | }
232 |
233 | .grid-col-47 {
234 | min-width: 470px;
235 | max-width: 470px;
236 | }
237 |
238 | .grid-col-48 {
239 | min-width: 480px;
240 | max-width: 480px;
241 | }
242 |
243 | .grid-col-49 {
244 | min-width: 490px;
245 | max-width: 490px;
246 | }
247 |
248 | .grid-col-50 {
249 | min-width: 500px;
250 | max-width: 500px;
251 | }
252 |
253 | .grid-col-51 {
254 | min-width: 510px;
255 | max-width: 510px;
256 | }
257 |
258 | .grid-col-52 {
259 | min-width: 520px;
260 | max-width: 520px;
261 | }
262 |
263 | .grid-col-53 {
264 | min-width: 530px;
265 | max-width: 530px;
266 | }
267 |
268 | .grid-col-54 {
269 | min-width: 540px;
270 | max-width: 540px;
271 | }
272 |
273 | .grid-col-55 {
274 | min-width: 550px;
275 | max-width: 550px;
276 | }
277 |
278 | .grid-col-56 {
279 | min-width: 560px;
280 | max-width: 560px;
281 | }
282 |
283 | .grid-col-57 {
284 | min-width: 570px;
285 | max-width: 570px;
286 | }
287 |
288 | .grid-col-58 {
289 | min-width: 580px;
290 | max-width: 580px;
291 | }
292 |
293 | .grid-col-59 {
294 | min-width: 590px;
295 | max-width: 590px;
296 | }
297 |
298 | .grid-col-60 {
299 | min-width: 600px;
300 | max-width: 600px;
301 | }
302 |
303 | .grid-col-61 {
304 | min-width: 610px;
305 | max-width: 610px;
306 | }
307 |
308 | .grid-col-62 {
309 | min-width: 620px;
310 | max-width: 620px;
311 | }
312 |
313 | .grid-col-63 {
314 | min-width: 630px;
315 | max-width: 630px;
316 | }
317 |
318 | .grid-col-64 {
319 | min-width: 640px;
320 | max-width: 640px;
321 | }
322 |
323 | .grid-col-65 {
324 | min-width: 650px;
325 | max-width: 650px;
326 | }
327 |
328 | .grid-col-66 {
329 | min-width: 660px;
330 | max-width: 660px;
331 | }
332 |
333 | .grid-col-67 {
334 | min-width: 670px;
335 | max-width: 670px;
336 | }
337 |
338 | .grid-col-68 {
339 | min-width: 680px;
340 | max-width: 680px;
341 | }
342 |
343 | .grid-col-69 {
344 | min-width: 690px;
345 | max-width: 690px;
346 | }
347 |
348 | .grid-col-70 {
349 | min-width: 700px;
350 | max-width: 700px;
351 | }
352 |
353 | .grid-col-71 {
354 | min-width: 710px;
355 | max-width: 710px;
356 | }
357 |
358 | .grid-col-72 {
359 | min-width: 720px;
360 | max-width: 720px;
361 | }
362 |
363 | .grid-col-73 {
364 | min-width: 730px;
365 | max-width: 730px;
366 | }
367 |
368 | .grid-col-74 {
369 | min-width: 740px;
370 | max-width: 740px;
371 | }
372 |
373 | .grid-col-75 {
374 | min-width: 750px;
375 | max-width: 750px;
376 | }
377 |
378 | .grid-col-76 {
379 | min-width: 760px;
380 | max-width: 760px;
381 | }
382 |
383 | .grid-col-77 {
384 | min-width: 770px;
385 | max-width: 770px;
386 | }
387 |
388 | .grid-col-78 {
389 | min-width: 780px;
390 | max-width: 780px;
391 | }
392 |
393 | .grid-col-79 {
394 | min-width: 790px;
395 | max-width: 790px;
396 | }
397 |
398 | .grid-col-80 {
399 | min-width: 800px;
400 | max-width: 800px;
401 | }
402 |
403 | .grid-col-81 {
404 | min-width: 810px;
405 | max-width: 810px;
406 | }
407 |
408 | .grid-col-82 {
409 | min-width: 820px;
410 | max-width: 820px;
411 | }
412 |
413 | .grid-col-83 {
414 | min-width: 830px;
415 | max-width: 830px;
416 | }
417 |
418 | .grid-col-84 {
419 | min-width: 840px;
420 | max-width: 840px;
421 | }
422 |
423 | .grid-col-85 {
424 | min-width: 850px;
425 | max-width: 850px;
426 | }
427 |
428 | .grid-col-86 {
429 | min-width: 860px;
430 | max-width: 860px;
431 | }
432 |
433 | .grid-col-87 {
434 | min-width: 870px;
435 | max-width: 870px;
436 | }
437 |
438 | .grid-col-88 {
439 | min-width: 880px;
440 | max-width: 880px;
441 | }
442 |
443 | .grid-col-88 {
444 | min-width: 880px;
445 | max-width: 880px;
446 | }
447 |
448 | .grid-col-89 {
449 | min-width: 890px;
450 | max-width: 890px;
451 | }
452 |
453 | .grid-col-90 {
454 | min-width: 900px;
455 | max-width: 900px;
456 | }
457 |
458 | .grid-col-91 {
459 | min-width: 910px;
460 | max-width: 910px;
461 | }
462 |
463 | .grid-col-92 {
464 | min-width: 920px;
465 | max-width: 920px;
466 | }
467 |
468 | .grid-col-93 {
469 | min-width: 930px;
470 | max-width: 930px;
471 | }
472 |
473 | .grid-col-94 {
474 | min-width: 940px;
475 | max-width: 940px;
476 | }
477 |
478 | .grid-col-95 {
479 | min-width: 950px;
480 | max-width: 950px;
481 | }
482 |
483 | .grid-col-96 {
484 | min-width: 960px;
485 | max-width: 960px;
486 | }
487 |
488 | .text-center {
489 | text-align: center;
490 | }
491 |
492 | .flex {
493 | display: -webkit-flex;
494 | display: flex;
495 | -webkit-flex-direction: row;
496 | flex-direction: row;
497 | -webkit-flex-wrap: wrap;
498 | flex-wrap: wrap;
499 | }
500 |
501 | .flex-column {
502 | -webkit-flex-direction: column;
503 | -ms-flex-direction: column;
504 | flex-direction: column;
505 | }
506 |
507 | .flex-shrink-1 {
508 | //flex: 1 1
509 | min-width: 50%;
510 | max-width: 50%;
511 | outline: 2px solid red;
512 | }
513 |
514 | .justify-content-start {
515 | -webkit-align-items: flex-start;
516 | align-items: flex-start;
517 | }
518 |
519 | .justify-content-end {
520 | -webkit-justify-content: flex-end;
521 | justify-content: flex-end;
522 | }
523 |
524 | .algin-item-start {
525 | -webkit-align-items: flex-start;
526 | align-items: flex-start;
527 | }
528 |
529 | .algin-item-end {
530 | -webkit-align-items: flex-end;
531 | align-items: flex-end;
532 | }
533 |
534 | .align-item-center {
535 | -webkit-align-items: center;
536 | -ms-flex-align: center;
537 | align-items: center;
538 | }
539 |
540 | .justify-content-spacebetween {
541 | -webkit-justify-content: space-between;
542 | justify-content: space-between;
543 | }
544 |
545 | .justify-content-spacearound {
546 | -webkit-justify-content: space-around;
547 | -ms-flex-pack: distribute;
548 | justify-content: space-around;
549 | -webkit-align-content: space-around;
550 | -ms-flex-line-pack: distribute;
551 | align-content: space-around;
552 | }
553 |
554 | .justify-content-center {
555 | -webkit-justify-content: center;
556 | -ms-flex-pack: center;
557 | justify-content: center;
558 | }
559 |
560 | .grow-1 {
561 | flex-grow: 1;
562 | }
563 |
564 | .width-100 {
565 | min-width: 100vw;
566 | }
567 |
568 | .height-100 {
569 | min-height: 100vh;
570 | }
571 |
572 | .width-50 {
573 | min-width: 50%;
574 | }
575 |
576 | .width-30 {
577 | min-width: 30%;
578 | max-width: 30%;
579 | }
580 |
581 | .center {
582 | transform: translate(50%, -0%);
583 | }
584 |
585 | .col-3 {
586 | -webkit-column-count: 3;
587 | -moz-column-count: 3;
588 | column-count: 3;
589 | -webkit-column-count: 3;
590 | -webkit-column-gap: 30px;
591 | -moz-column-count: 3;
592 | -moz-column-gap: 30px;
593 | column-count: 3;
594 | column-gap: 30px;
595 | }
596 |
597 | .col-dont-break-inside {
598 | -webkit-column-break-inside: avoid;
599 | /* Chrome, Safari, Opera */
600 | page-break-inside: avoid;
601 | /* Firefox */
602 | break-inside: avoid;
603 | /* IE 10+ */
604 | }
605 |
606 | .block {
607 | display: block;
608 | }
609 |
610 | [class*="grid-"] {
611 | }
612 |
--------------------------------------------------------------------------------
/application/assets/css/main.css:
--------------------------------------------------------------------------------
1 | /*GENERAL*/
2 |
3 | :root {
4 | --color-one: black;
5 | --color-two: yellow;
6 | --color-three: silver;
7 | --color-four: rgb(99, 99, 99);
8 | --color-five: rgb(38, 38, 38);
9 | --color-six: rgb(78, 206, 144);
10 | --color-seven: gainsboro;
11 | scrollbar-color: #0a4c95 #c2d2e4;
12 | }
13 |
14 | @font-face {
15 | font-family: "Lato-Regular";
16 | src: url("../fonts/Lato-Regular.ttf");
17 | }
18 |
19 | *,
20 | *:before,
21 | *:after {
22 | border: 0px;
23 | padding: 0px;
24 | margin: 0px;
25 | box-sizing: border-box;
26 | -webkit-appearance: none;
27 | }
28 |
29 | :focus {
30 | outline: none;
31 | }
32 |
33 | ::-moz-focus-inner {
34 | border: 0;
35 | }
36 |
37 | img[src=""] {
38 | display: none;
39 | }
40 |
41 | input[type="range"]::-moz-focus-outer {
42 | border: 0;
43 | }
44 |
45 | html,
46 | body {
47 | font-family: "Lato-Regular";
48 | font-weight: 100;
49 | width: 100vw;
50 | max-width: 100vw;
51 | max-height: 100vh;
52 | height: 100%;
53 | position: relative;
54 | margin: 0px;
55 | padding: 0px;
56 | font-size: 1rem;
57 | line-height: 1.4rem;
58 | overflow: hidden;
59 | }
60 |
61 | h1 {
62 | font-size: 1rem;
63 | }
64 |
65 | img {
66 | max-width: 90vw;
67 | height: auto;
68 | display: block;
69 | }
70 |
71 | .debug {
72 | outline: 1px solid red;
73 | }
74 |
75 | div.autocomplete-suggestions {
76 | background: gray;
77 | overflow: auto;
78 | color: black;
79 | padding: 5px 0px 0px 0;
80 | white-space: nowrap;
81 | overflow: hidden;
82 | font-size: 1.1rem;
83 | }
84 |
85 | div.no-result {
86 | position: fixed;
87 | top: 90px;
88 | border: 3px solid white;
89 | background: silver;
90 | padding: 3px;
91 | width: 90%;
92 | left: 5%;
93 | }
94 |
95 | div.autocomplete-suggestions div {
96 | border: 3px solid white;
97 | background: silver;
98 | }
99 |
100 | .autocomplete-selected {
101 | background: silver;
102 | color: black;
103 | font-weight: bold;
104 | }
105 |
106 | .autocomplete-suggestions strong {
107 | font-weight: normal;
108 | }
109 |
110 | .autocomplete-group {
111 | padding: 2px 5px;
112 | color: black;
113 | margin: 0 0 10px 0;
114 | }
115 |
116 | .autocomplete-group strong {
117 | display: block;
118 | border-bottom: 1px solid #000;
119 | }
120 |
121 | /*///////////////////////////
122 | ///HELPER////////////////*/
123 |
124 | div#toast {
125 | position: fixed;
126 | height: auto;
127 | overflow: none;
128 | top: -100px;
129 | background: black;
130 | color: white;
131 | z-index: 5000;
132 | min-width: 100%;
133 | padding: 5px;
134 | }
135 |
136 | /*///////////////////////////
137 | ///APPS////////////////*/
138 |
139 | div#panels-indicator {
140 | height: 5px;
141 | position: fixed;
142 | z-index: 3000000;
143 | background-color: black;
144 | bottom: 30px;
145 | max-width: 100%;
146 | padding: 0px 0 0 0;
147 | }
148 |
149 | div#panels-indicator div {
150 | position: relative;
151 | width: 100%;
152 | display: flex;
153 | }
154 |
155 | div#panels-indicator div div {
156 | background-color: black;
157 | width: 7px;
158 | height: 8px;
159 | flex-grow: 1;
160 | }
161 |
162 | div#panels-indicator div div:first-child {
163 | margin: 0 0 0 -10px;
164 | }
165 |
166 | div#navigation {
167 | position: fixed;
168 | height: 30px;
169 | background: black;
170 | width: 100%;
171 | top: 0px;
172 | left: 0px;
173 | display: none;
174 | }
175 |
176 | div#navigation div {
177 | height: 20px;
178 | color: yellow;
179 | text-align: center;
180 | }
181 |
182 | div#about {
183 | position: fixed;
184 | top: 0;
185 | left: 0;
186 | background: white;
187 | z-index: 1;
188 | overflow-y: scroll;
189 | height: 100%;
190 | margin: 0 0 50px 0;
191 | display: none;
192 | }
193 |
194 | div#about div#inner {
195 | position: relative;
196 | padding: 5px 5px 55px 5px;
197 | margin: 0 0 80px 0;
198 | overflow-y: scroll;
199 | height: 98%;
200 | background: silver;
201 | }
202 |
203 | div#about div#update {
204 | width: 100%;
205 | height: 20px;
206 | background: black;
207 | text-align: center;
208 | position: absolute;
209 | bottom: 0;
210 | left: 0;
211 | color: white;
212 | }
213 |
214 | div#about h1 {
215 | margin: 15px 0 0 0;
216 | text-align: center;
217 | font-size: 1rem;
218 | }
219 |
220 | div#about h2 {
221 | margin: 15px 0 0 0;
222 | text-align: center;
223 | font-size: 1rem;
224 | }
225 |
226 | div#app {
227 | position: relative;
228 | background: white;
229 | padding: 0px;
230 | color: black;
231 | height: 95vh;
232 | width: 100vw;
233 | overflow: hidden;
234 | font-weight: normal;
235 | margin: 0px 0 0 0;
236 | }
237 |
238 | div#app-panels div#app-panels-inner {
239 | height: 84vh;
240 | overflow-y: hidden;
241 | overflow-x: hidden;
242 | }
243 |
244 | div#app div#app-panels article {
245 | margin: 0px 0 10px 0px;
246 | font-weight: normal;
247 | min-width: 100vw;
248 | max-height: 97%;
249 | padding: 4px 4px 4px 4px;
250 | overflow-y: hidden;
251 | overflow-x: hidden;
252 | position: relative;
253 | opacity: 0;
254 | }
255 |
256 | article#search {
257 | font-weight: normal;
258 | min-width: 100vw;
259 | height: 47px;
260 | background: silver;
261 | overflow: hidden;
262 | text-align: center;
263 | }
264 |
265 | article#search input {
266 | margin: 5px 0 0 0;
267 | height: 30px;
268 | padding: 3px;
269 | width: 70%;
270 | overflow: hidden;
271 | border-radius: 5px;
272 | }
273 |
274 | div#app div#app-panels {
275 | margin: 0px 0 50px 0px;
276 | position: relative;
277 | }
278 |
279 | div#app div#app-panels article h1 {
280 | font-size: 1rem;
281 | font-weight: bold;
282 | }
283 |
284 | div#app div#app-panels article div.meta-data {
285 | font-size: 0.8rem;
286 | }
287 |
288 | div#app div#app-panels article div.meta-data span {
289 | font-size: 0.8rem;
290 | font-weight: bold;
291 | }
292 |
293 | div#app div#app-panels article div.icon {
294 | margin: 0 0 10px 0;
295 | }
296 |
297 | div#app div#app-panels article div.icon img {
298 | width: 30px;
299 | margin: 7px 0 7px 0 !important;
300 | }
301 |
302 | div#app div#app-panels article div.channel {
303 | font-size: 0.8rem;
304 | font-weight: bold;
305 | color: rgb(2, 2, 43);
306 | }
307 |
308 | div#app div#app-panels article div.summary {
309 | padding: 0 10px 20px 0px;
310 | }
311 |
312 | div.single-article {
313 | display: none;
314 | }
315 |
316 | div#app div#app-panels article ul.images {
317 | padding: 20px 0 20px 0;
318 | display: block;
319 | }
320 |
321 | div#app div#app-panels article ul.images li {
322 | margin: 0 0 10px 0;
323 | min-width: 100%;
324 | }
325 |
326 | div#app div#app-panels article ul.images li img {
327 | min-width: 100%;
328 | display: block;
329 | }
330 |
331 | ul.ratings {
332 | display: none;
333 | }
334 |
335 | li.rating-description {
336 | margin: 0 0 10px 0;
337 | }
338 |
339 | li.rating-points-0:after {
340 | content: "";
341 | }
342 |
343 | li.rating-points-1:after {
344 | content: "★";
345 | }
346 |
347 | li.rating-points-2:after {
348 | content: "★ ★";
349 | }
350 |
351 | li.rating-points-3:after {
352 | content: "★ ★ ★";
353 | }
354 |
355 | li.rating-points-4:after {
356 | content: "★ ★ ★ ★";
357 | }
358 |
359 | li.rating-points-5:after {
360 | content: "★ ★ ★ ★ ★";
361 | }
362 |
363 | /*////////////
364 | ///options
365 | ///////////*/
366 |
367 | div.options {
368 | width: 100vw;
369 | height: 100vh;
370 | background: black;
371 | position: fixed;
372 | top: 0px;
373 | left: 0px;
374 | display: none;
375 | padding: 10px;
376 | }
377 |
378 | div.options div {
379 | width: 90vw;
380 | height: 30px;
381 | background: white;
382 | color: black;
383 | position: relative;
384 | padding: 3px;
385 | border: 3px solid black;
386 | margin: 0px auto;
387 | display: none;
388 | }
389 |
390 | div.options div[data-url] {
391 | display: block;
392 | }
393 |
394 | div.options div[data-donation] {
395 | display: block;
396 | }
397 |
398 | div.options div[data-slug] {
399 | display: block;
400 | }
401 |
402 | div.options div[data-url=""] {
403 | display: none;
404 | }
405 |
406 | div.options div[data-donation=""] {
407 | display: none;
408 | }
409 |
410 | div.options div:focus {
411 | background: silver;
412 | }
413 |
414 | /*/////////////////
415 | ///RATING////
416 | ////////////////*/
417 |
418 | div#rating-wrapper {
419 | display: none;
420 | position: fixed;
421 | top: 0;
422 | left: 0;
423 | z-index: 2;
424 | background: black;
425 | color: white;
426 | padding: 10px;
427 | }
428 |
429 | div#rating-wrapper textarea.text {
430 | margin: 50px 0 0 0;
431 | padding: 5px;
432 | width: 100%;
433 | }
434 |
435 | div#rating-wrapper input {
436 | position: fixed;
437 | top: -600px;
438 | }
439 |
440 | div#rating-wrapper div#stars {
441 | position: absolute;
442 | top: 10px;
443 | }
444 |
445 | div.rating-item {
446 | margin: 0 0 30px 0;
447 | }
448 |
449 | div.rating-item div div {
450 | height: 15px;
451 | color: black;
452 | font-size: 1.1rem;
453 | margin: 0 0 5px 0;
454 | }
455 |
456 | div.rating-item {
457 | font-size: 0.8rem;
458 | }
459 |
460 | div.points-1 {
461 | content: "hello";
462 | padding: 2px;
463 | }
464 |
465 | div.points-2 {
466 | content: "hello";
467 | }
468 |
469 | div.points-3 {
470 | content: "•";
471 | }
472 |
473 | div.points-4 {
474 | content: "hello";
475 | }
476 |
477 | /*/////////////////
478 | ///BOTTOM BAR////
479 | ////////////////*/
480 |
481 | div#bottom-bar {
482 | position: fixed;
483 | z-index: 2000;
484 | bottom: 10px;
485 | left: 0px;
486 | height: 18px;
487 | z-index: 2;
488 | background: black;
489 | }
490 |
491 | div#bottom-bar div#inner {
492 | position: relative;
493 | }
494 |
495 | div#bottom-bar div {
496 | background: black;
497 | color: white;
498 | padding: 2px;
499 | }
500 |
501 | div#bottom-bar div#button-center {
502 | background: black;
503 | color: white;
504 | padding: 2px;
505 | width: 30%;
506 | text-align: center;
507 | }
508 |
509 | div#bottom-bar div#button-left {
510 | background: black;
511 | color: white;
512 | padding: 2px;
513 | width: 20px;
514 | text-align: left;
515 | width: 30%;
516 | }
517 |
518 | div#bottom-bar div#button-right {
519 | background: black;
520 | color: white;
521 | padding: 2px;
522 | width: 30%;
523 | text-align: right;
524 | }
525 |
526 | /*/////////////////
527 | ///INTRO////
528 | ////////////////*/
529 |
530 | div#message-box {
531 | animation-name: example3;
532 | display: block;
533 | position: fixed;
534 | top: 0px;
535 | left: 0px;
536 | padding: 40px 10px 10px 10px;
537 | min-width: 100vw;
538 | height: 100vh;
539 | background: black;
540 | color: white;
541 | z-index: 3;
542 | animation-duration: 2s;
543 | animation-timing-function: ease-in;
544 | animation-fill-mode: forwards;
545 | animation-iteration-count: 1;
546 | animation-play-state: paused;
547 | }
548 |
549 | div#message-box img.icon-1 {
550 | animation-name: example;
551 | animation-duration: 1s;
552 | animation-timing-function: ease-out;
553 | animation-fill-mode: forwards;
554 | animation-play-state: paused;
555 | position: absolute;
556 | width: 90px;
557 | left: 30%;
558 | top: 40%;
559 | }
560 |
561 | div#message-box img.icon-2 {
562 | animation-name: example2;
563 | animation-duration: 1s;
564 | animation-timing-function: ease-out;
565 | animation-fill-mode: forwards;
566 | position: absolute;
567 | animation-play-state: paused;
568 | transform: rotate(120deg);
569 | width: 90px;
570 | z-index: 5;
571 | left: 30%;
572 | top: 40%;
573 | }
574 |
575 | @keyframes example {
576 | from {
577 | left: 30%;
578 | top: 40%;
579 | }
580 | to {
581 | left: 200px;
582 | top: 300px;
583 | }
584 | }
585 |
586 | @keyframes example2 {
587 | from {
588 | left: 30%;
589 | top: 40%;
590 | }
591 | to {
592 | left: -100px;
593 | top: 300px;
594 | }
595 | }
596 |
597 | @keyframes example3 {
598 | from {
599 | opacity: 100;
600 | }
601 | to {
602 | opacity: 0;
603 | }
604 | }
605 |
606 | /*///Loading bar////////
607 | //////////////////////*/
608 |
609 | div#loading {
610 | height: 15px;
611 | width: 100vw;
612 | background: pink;
613 | position: fixed;
614 | top: 0;
615 | z-index: 10000;
616 | display: none;
617 | animation: loading 1s infinite alternate;
618 | }
619 |
620 | @keyframes loading {
621 | from {
622 | background-color: blue;
623 | width: 10px;
624 | }
625 | to {
626 | background-color: yellow;
627 | width: 100vw;
628 | }
629 | }
630 |
--------------------------------------------------------------------------------
/application/assets/css/qr_reader.css:
--------------------------------------------------------------------------------
1 | #video {
2 | bottom: 0;
3 | height: auto;
4 | min-height: 100%;
5 | min-width: 100%;
6 | position: fixed;
7 | right: 0;
8 | width: auto;
9 | }
10 |
11 | #startDecoding {
12 | background: #0095dd;
13 | border-radius: 40px;
14 | color: #fff;
15 | font-family: Arial, sans;
16 | font-size: 20px;
17 | left: 50%;
18 | margin: -30px 0 0 -95px;
19 | padding: 20px;
20 | position: fixed;
21 | text-align: center;
22 | top: 50%;
23 | width: 150px;
24 | }
25 |
26 | #corner-nw,
27 | #corner-no,
28 | #corner-so,
29 | #corner-sw {
30 | border: #fff 6px solid;
31 | height: 30px;
32 | position: fixed;
33 | width: 30px;
34 | }
35 |
36 | #corner-nw {
37 | border-bottom: 0;
38 | border-right: 0;
39 | border-top-left-radius: 20px;
40 | left: 20px;
41 | top: 20px;
42 | }
43 |
44 | #corner-no {
45 | border-bottom: 0;
46 | border-left: 0;
47 | border-top-right-radius: 20px;
48 | right: 20px;
49 | top: 20px;
50 | }
51 |
52 | #corner-so {
53 | border-bottom-right-radius: 20px;
54 | border-left: 0;
55 | border-top: 0;
56 | bottom: 20px;
57 | right: 20px;
58 | }
59 |
60 | #corner-sw {
61 | border-bottom-left-radius: 20px;
62 | border-right: 0;
63 | border-top: 0;
64 | bottom: 20px;
65 | left: 20px;
66 | }
67 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/BitMatrix.d.ts:
--------------------------------------------------------------------------------
1 | export declare class BitMatrix {
2 | static createEmpty(width: number, height: number): BitMatrix;
3 | width: number;
4 | height: number;
5 | private data;
6 | constructor(data: Uint8ClampedArray, width: number);
7 | get(x: number, y: number): boolean;
8 | set(x: number, y: number, v: boolean): void;
9 | setRegion(
10 | left: number,
11 | top: number,
12 | width: number,
13 | height: number,
14 | v: boolean
15 | ): void;
16 | }
17 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/binarizer/index.d.ts:
--------------------------------------------------------------------------------
1 | import { BitMatrix } from "../BitMatrix";
2 | export declare function binarize(
3 | data: Uint8ClampedArray,
4 | width: number,
5 | height: number,
6 | returnInverted: boolean
7 | ):
8 | | {
9 | binarized: BitMatrix;
10 | inverted: BitMatrix;
11 | }
12 | | {
13 | binarized: BitMatrix;
14 | inverted?: undefined;
15 | };
16 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/decodeData/BitStream.d.ts:
--------------------------------------------------------------------------------
1 | export declare class BitStream {
2 | private bytes;
3 | private byteOffset;
4 | private bitOffset;
5 | constructor(bytes: Uint8ClampedArray);
6 | readBits(numBits: number): number;
7 | available(): number;
8 | }
9 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/decodeData/index.d.ts:
--------------------------------------------------------------------------------
1 | export interface Chunk {
2 | type: Mode;
3 | text: string;
4 | }
5 | export interface ByteChunk {
6 | type: Mode.Byte | Mode.Kanji;
7 | bytes: number[];
8 | }
9 | export interface ECIChunk {
10 | type: Mode.ECI;
11 | assignmentNumber: number;
12 | }
13 | export declare type Chunks = Array;
14 | export interface DecodedQR {
15 | text: string;
16 | bytes: number[];
17 | chunks: Chunks;
18 | }
19 | export declare enum Mode {
20 | Numeric = "numeric",
21 | Alphanumeric = "alphanumeric",
22 | Byte = "byte",
23 | Kanji = "kanji",
24 | ECI = "eci",
25 | }
26 | export declare function decode(
27 | data: Uint8ClampedArray,
28 | version: number
29 | ): DecodedQR;
30 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/decodeData/shiftJISTable.d.ts:
--------------------------------------------------------------------------------
1 | export declare const shiftJISTable: {
2 | [key: number]: number;
3 | };
4 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/decoder.d.ts:
--------------------------------------------------------------------------------
1 | import { BitMatrix } from "../BitMatrix";
2 | import { DecodedQR } from "./decodeData";
3 | export declare function decode(matrix: BitMatrix): DecodedQR;
4 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/reedsolomon/GenericGF.d.ts:
--------------------------------------------------------------------------------
1 | import GenericGFPoly from "./GenericGFPoly";
2 | export declare function addOrSubtractGF(a: number, b: number): number;
3 | export default class GenericGF {
4 | primitive: number;
5 | size: number;
6 | generatorBase: number;
7 | zero: GenericGFPoly;
8 | one: GenericGFPoly;
9 | private expTable;
10 | private logTable;
11 | constructor(primitive: number, size: number, genBase: number);
12 | multiply(a: number, b: number): number;
13 | inverse(a: number): number;
14 | buildMonomial(degree: number, coefficient: number): GenericGFPoly;
15 | log(a: number): number;
16 | exp(a: number): number;
17 | }
18 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/reedsolomon/GenericGFPoly.d.ts:
--------------------------------------------------------------------------------
1 | import GenericGF from "./GenericGF";
2 | export default class GenericGFPoly {
3 | private field;
4 | private coefficients;
5 | constructor(field: GenericGF, coefficients: Uint8ClampedArray);
6 | degree(): number;
7 | isZero(): boolean;
8 | getCoefficient(degree: number): number;
9 | addOrSubtract(other: GenericGFPoly): GenericGFPoly;
10 | multiply(scalar: number): GenericGFPoly;
11 | multiplyPoly(other: GenericGFPoly): GenericGFPoly;
12 | multiplyByMonomial(degree: number, coefficient: number): GenericGFPoly;
13 | evaluateAt(a: number): number;
14 | }
15 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/reedsolomon/index.d.ts:
--------------------------------------------------------------------------------
1 | export declare function decode(
2 | bytes: number[],
3 | twoS: number
4 | ): Uint8ClampedArray;
5 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/decoder/version.d.ts:
--------------------------------------------------------------------------------
1 | export interface Version {
2 | infoBits: number;
3 | versionNumber: number;
4 | alignmentPatternCenters: number[];
5 | errorCorrectionLevels: Array<{
6 | ecCodewordsPerBlock: number;
7 | ecBlocks: Array<{
8 | numBlocks: number;
9 | dataCodewordsPerBlock: number;
10 | }>;
11 | }>;
12 | }
13 | export declare const VERSIONS: Version[];
14 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/extractor/index.d.ts:
--------------------------------------------------------------------------------
1 | import { BitMatrix } from "../BitMatrix";
2 | import { QRLocation } from "../locator";
3 | export declare function extract(
4 | image: BitMatrix,
5 | location: QRLocation
6 | ): {
7 | matrix: BitMatrix;
8 | mappingFunction: (
9 | x: number,
10 | y: number
11 | ) => {
12 | x: number;
13 | y: number;
14 | };
15 | };
16 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/index.d.ts:
--------------------------------------------------------------------------------
1 | import { Chunks } from "./decoder/decodeData";
2 | import { Point } from "./locator";
3 | export interface QRCode {
4 | binaryData: number[];
5 | data: string;
6 | chunks: Chunks;
7 | location: {
8 | topRightCorner: Point;
9 | topLeftCorner: Point;
10 | bottomRightCorner: Point;
11 | bottomLeftCorner: Point;
12 | topRightFinderPattern: Point;
13 | topLeftFinderPattern: Point;
14 | bottomLeftFinderPattern: Point;
15 | bottomRightAlignmentPattern?: Point;
16 | };
17 | }
18 | export interface Options {
19 | inversionAttempts?:
20 | | "dontInvert"
21 | | "onlyInvert"
22 | | "attemptBoth"
23 | | "invertFirst";
24 | }
25 | declare function jsQR(
26 | data: Uint8ClampedArray,
27 | width: number,
28 | height: number,
29 | providedOptions?: Options
30 | ): QRCode | null;
31 | export default jsQR;
32 |
--------------------------------------------------------------------------------
/application/assets/exclude-js/locator/index.d.ts:
--------------------------------------------------------------------------------
1 | import { BitMatrix } from "../BitMatrix";
2 | export interface Point {
3 | x: number;
4 | y: number;
5 | }
6 | export interface QRLocation {
7 | topRight: Point;
8 | bottomLeft: Point;
9 | topLeft: Point;
10 | alignmentPattern: Point;
11 | dimension: number;
12 | }
13 | export declare function locate(matrix: BitMatrix): QRLocation[];
14 |
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-Black.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-BlackItalic.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-Bold.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-BoldItalic.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-Italic.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-Light.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-LightItalic.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-Regular.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-Thin.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/Lato-ThinItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strukturart/bHacker-store-client/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/fonts/Lato-ThinItalic.ttf
--------------------------------------------------------------------------------
/application/assets/fonts/OFL.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato"
2 |
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 | This license is copied below, and is also available with a FAQ at:
5 | http://scripts.sil.org/OFL
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/application/assets/js/IntersectionObserver-polyfill.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Google Inc. All Rights Reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | (function (window, document) {
18 | "use strict";
19 |
20 | // Exits early if all IntersectionObserver and IntersectionObserverEntry
21 | // features are natively supported.
22 | if (
23 | "IntersectionObserver" in window &&
24 | "IntersectionObserverEntry" in window &&
25 | "intersectionRatio" in window.IntersectionObserverEntry.prototype
26 | ) {
27 | // Minimal polyfill for Edge 15's lack of `isIntersecting`
28 | // See: https://github.com/w3c/IntersectionObserver/issues/211
29 | if (!("isIntersecting" in window.IntersectionObserverEntry.prototype)) {
30 | Object.defineProperty(
31 | window.IntersectionObserverEntry.prototype,
32 | "isIntersecting",
33 | {
34 | get: function () {
35 | return this.intersectionRatio > 0;
36 | },
37 | }
38 | );
39 | }
40 | return;
41 | }
42 |
43 | /**
44 | * An IntersectionObserver registry. This registry exists to hold a strong
45 | * reference to IntersectionObserver instances currently observering a target
46 | * element. Without this registry, instances without another reference may be
47 | * garbage collected.
48 | */
49 | var registry = [];
50 |
51 | /**
52 | * Creates the global IntersectionObserverEntry constructor.
53 | * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
54 | * @param {Object} entry A dictionary of instance properties.
55 | * @constructor
56 | */
57 | function IntersectionObserverEntry(entry) {
58 | this.time = entry.time;
59 | this.target = entry.target;
60 | this.rootBounds = entry.rootBounds;
61 | this.boundingClientRect = entry.boundingClientRect;
62 | this.intersectionRect = entry.intersectionRect || getEmptyRect();
63 | this.isIntersecting = !!entry.intersectionRect;
64 |
65 | // Calculates the intersection ratio.
66 | var targetRect = this.boundingClientRect;
67 | var targetArea = targetRect.width * targetRect.height;
68 | var intersectionRect = this.intersectionRect;
69 | var intersectionArea = intersectionRect.width * intersectionRect.height;
70 |
71 | // Sets intersection ratio.
72 | if (targetArea) {
73 | this.intersectionRatio = intersectionArea / targetArea;
74 | } else {
75 | // If area is zero and is intersecting, sets to 1, otherwise to 0
76 | this.intersectionRatio = this.isIntersecting ? 1 : 0;
77 | }
78 | }
79 |
80 | /**
81 | * Creates the global IntersectionObserver constructor.
82 | * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
83 | * @param {Function} callback The function to be invoked after intersection
84 | * changes have queued. The function is not invoked if the queue has
85 | * been emptied by calling the `takeRecords` method.
86 | * @param {Object=} opt_options Optional configuration options.
87 | * @constructor
88 | */
89 | function IntersectionObserver(callback, opt_options) {
90 | var options = opt_options || {};
91 |
92 | if (typeof callback != "function") {
93 | throw new Error("callback must be a function");
94 | }
95 |
96 | if (options.root && options.root.nodeType != 1) {
97 | throw new Error("root must be an Element");
98 | }
99 |
100 | // Binds and throttles `this._checkForIntersections`.
101 | this._checkForIntersections = throttle(
102 | this._checkForIntersections.bind(this),
103 | this.THROTTLE_TIMEOUT
104 | );
105 |
106 | // Private properties.
107 | this._callback = callback;
108 | this._observationTargets = [];
109 | this._queuedEntries = [];
110 | this._rootMarginValues = this._parseRootMargin(options.rootMargin);
111 |
112 | // Public properties.
113 | this.thresholds = this._initThresholds(options.threshold);
114 | this.root = options.root || null;
115 | this.rootMargin = this._rootMarginValues
116 | .map(function (margin) {
117 | return margin.value + margin.unit;
118 | })
119 | .join(" ");
120 | }
121 |
122 | /**
123 | * The minimum interval within which the document will be checked for
124 | * intersection changes.
125 | */
126 | IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;
127 |
128 | /**
129 | * The frequency in which the polyfill polls for intersection changes.
130 | * this can be updated on a per instance basis and must be set prior to
131 | * calling `observe` on the first target.
132 | */
133 | IntersectionObserver.prototype.POLL_INTERVAL = null;
134 |
135 | /**
136 | * Starts observing a target element for intersection changes based on
137 | * the thresholds values.
138 | * @param {Element} target The DOM element to observe.
139 | */
140 | IntersectionObserver.prototype.observe = function (target) {
141 | // If the target is already being observed, do nothing.
142 | if (
143 | this._observationTargets.some(function (item) {
144 | return item.element == target;
145 | })
146 | ) {
147 | return;
148 | }
149 |
150 | if (!(target && target.nodeType == 1)) {
151 | throw new Error("target must be an Element");
152 | }
153 |
154 | this._registerInstance();
155 | this._observationTargets.push({ element: target, entry: null });
156 | this._monitorIntersections();
157 | this._checkForIntersections();
158 | };
159 |
160 | /**
161 | * Stops observing a target element for intersection changes.
162 | * @param {Element} target The DOM element to observe.
163 | */
164 | IntersectionObserver.prototype.unobserve = function (target) {
165 | this._observationTargets = this._observationTargets.filter(function (item) {
166 | return item.element != target;
167 | });
168 | if (!this._observationTargets.length) {
169 | this._unmonitorIntersections();
170 | this._unregisterInstance();
171 | }
172 | };
173 |
174 | /**
175 | * Stops observing all target elements for intersection changes.
176 | */
177 | IntersectionObserver.prototype.disconnect = function () {
178 | this._observationTargets = [];
179 | this._unmonitorIntersections();
180 | this._unregisterInstance();
181 | };
182 |
183 | /**
184 | * Returns any queue entries that have not yet been reported to the
185 | * callback and clears the queue. This can be used in conjunction with the
186 | * callback to obtain the absolute most up-to-date intersection information.
187 | * @return {Array} The currently queued entries.
188 | */
189 | IntersectionObserver.prototype.takeRecords = function () {
190 | var records = this._queuedEntries.slice();
191 | this._queuedEntries = [];
192 | return records;
193 | };
194 |
195 | /**
196 | * Accepts the threshold value from the user configuration object and
197 | * returns a sorted array of unique threshold values. If a value is not
198 | * between 0 and 1 and error is thrown.
199 | * @private
200 | * @param {Array|number=} opt_threshold An optional threshold value or
201 | * a list of threshold values, defaulting to [0].
202 | * @return {Array} A sorted list of unique and valid threshold values.
203 | */
204 | IntersectionObserver.prototype._initThresholds = function (opt_threshold) {
205 | var threshold = opt_threshold || [0];
206 | if (!Array.isArray(threshold)) threshold = [threshold];
207 |
208 | return threshold.sort().filter(function (t, i, a) {
209 | if (typeof t != "number" || isNaN(t) || t < 0 || t > 1) {
210 | throw new Error(
211 | "threshold must be a number between 0 and 1 inclusively"
212 | );
213 | }
214 | return t !== a[i - 1];
215 | });
216 | };
217 |
218 | /**
219 | * Accepts the rootMargin value from the user configuration object
220 | * and returns an array of the four margin values as an object containing
221 | * the value and unit properties. If any of the values are not properly
222 | * formatted or use a unit other than px or %, and error is thrown.
223 | * @private
224 | * @param {string=} opt_rootMargin An optional rootMargin value,
225 | * defaulting to '0px'.
226 | * @return {Array