new version
This commit is contained in:
parent
072932cde4
commit
71eda197fe
13
config.xml
13
config.xml
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget android-versionCode="17" id="link.silas.wordrotator" version="1.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget android-versionCode="18" id="link.silas.wordrotator" version="1.3.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>WordRotator</name>
|
||||
<description>
|
||||
A word-game
|
||||
@ -9,8 +9,8 @@
|
||||
</author>
|
||||
<content src="index.html" />
|
||||
<icon src="src/client/img/logo.png" />
|
||||
<plugin name="cordova-plugin-whitelist" spec="1" />
|
||||
<access origin="*" />
|
||||
<access origin="cdvfile://*" />
|
||||
<allow-intent href="http://*/*" />
|
||||
<allow-intent href="https://*/*" />
|
||||
<allow-intent href="tel:*" />
|
||||
@ -27,13 +27,4 @@
|
||||
<allow-intent href="itms:*" />
|
||||
<allow-intent href="itms-apps:*" />
|
||||
</platform>
|
||||
<plugin name="cordova-plugin-whitelist" spec="^1" />
|
||||
<plugin name="cordova-plugin-webpack" spec="^0.4.7" />
|
||||
<plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
|
||||
<plugin name="cordova-plugin-tts" spec="^0.2.3" />
|
||||
<plugin name="cordova-plugin-file" spec="^6.0.2" />
|
||||
<plugin name="cordova-sqlite-storage" spec="^5.0.0" />
|
||||
<plugin name="cordova-plugin-device" spec="^2.0.3" />
|
||||
<engine name="browser" spec="^6.0.0" />
|
||||
<engine name="ios" spec="^5.1.1" />
|
||||
</widget>
|
||||
|
||||
77
package.json
77
package.json
@ -1,8 +1,7 @@
|
||||
{
|
||||
"name": "wordrotator",
|
||||
"displayName": "WordRotator",
|
||||
"version": "1.3.0",
|
||||
"main": "index.js",
|
||||
"version": "1.3.2",
|
||||
"scripts": {
|
||||
"server": "ts-node src/server/index.ts",
|
||||
"run browser": "cordova run browser",
|
||||
@ -17,45 +16,45 @@
|
||||
"typeorm": "ts-node ./node_modules/typeorm/cli -f ./ormconfig.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "^14.14.27",
|
||||
"@types/node": "^15.3.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"cordova-android": "^9.0.0",
|
||||
"cordova-browser": "^6.0.0",
|
||||
"cordova-ios": "^6.1.1",
|
||||
"cordova-android": "^8.1.0",
|
||||
"cordova-ios": "^5.1.1",
|
||||
"cordova-plugin-webpack": "^1.0.5",
|
||||
"cordova-sites": "git+https://github.com/Ainias/cordova-sites.git#0.7.10",
|
||||
"cordova-sites-database": "git+https://github.com/Ainias/cordova-sites-database.git#0.4.4",
|
||||
"cordova-sites-easy-sync": "git+https://github.com/Ainias/cordova-sites-easy-sync.git#0.6.7",
|
||||
"cordova-sites-user-management": "git+https://github.com/Ainias/cordova-sites-user-management.git#0.5.4",
|
||||
"crypto": "^1.0.1",
|
||||
"cs-event-manager": "git+https://git@github.com/Ainias/event-manager.git#0.2",
|
||||
"dotenv": "^8.2.0",
|
||||
"dotenv": "^9.0.2",
|
||||
"express": "^4.17.1",
|
||||
"js-helper": "git+https://github.com/Ainias/js-helper.git#0.6.6",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"mysql": "^2.18.1",
|
||||
"nodemailer": "^6.4.14",
|
||||
"ts-node": "9.1.1",
|
||||
"typeorm": "^0.2.31",
|
||||
"typescript": "^4.1.5"
|
||||
"nodemailer": "^6.6.0",
|
||||
"ts-node": "^9.1.1",
|
||||
"typeorm": "^0.2.32",
|
||||
"typescript": "^4.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.13.15",
|
||||
"@babel/plugin-transform-runtime": "^7.13.15",
|
||||
"@babel/core": "^7.14.2",
|
||||
"@babel/plugin-transform-runtime": "^7.14.2",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@babel/preset-env": "^7.13.15",
|
||||
"@wdio/appium-service": "^7.4.2",
|
||||
"@wdio/cli": "^7.4.6",
|
||||
"@wdio/jasmine-framework": "^7.4.6",
|
||||
"@wdio/local-runner": "^7.4.6",
|
||||
"@wdio/selenium-standalone-service": "^7.4.2",
|
||||
"@wdio/spec-reporter": "^7.4.3",
|
||||
"appium": "1.20.2",
|
||||
"@babel/preset-env": "^7.14.2",
|
||||
"@wdio/appium-service": "^7.5.7",
|
||||
"@wdio/cli": "^7.5.7",
|
||||
"@wdio/jasmine-framework": "^ 7.5.3",
|
||||
"@wdio/local-runner": "^7.5.7",
|
||||
"@wdio/selenium-standalone-service": "^7.5.7",
|
||||
"@wdio/spec-reporter": "^7.5.7",
|
||||
"appium": "^1.21.0",
|
||||
"appium-doctor": "^1.16.0",
|
||||
"autoprefixer": "^10.2.5",
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-loader": "^8.2.2",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^6.2.1",
|
||||
"copy-webpack-plugin": "^5.1.2",
|
||||
"cordova-plugin-device": "^2.0.3",
|
||||
"cordova-plugin-file": "^6.0.2",
|
||||
"cordova-plugin-nativestorage": "^2.3.2",
|
||||
@ -63,37 +62,37 @@
|
||||
"cordova-plugin-tts": "^0.2.3",
|
||||
"cordova-plugin-webpack": "^1.0.5",
|
||||
"cordova-plugin-whitelist": "^1.3.4",
|
||||
"cordova-sqlite-storage": "^5.1.0",
|
||||
"css-loader": "^5.0.0",
|
||||
"cordova-serve": "^4.0.0",
|
||||
"cordova-sqlite-storage": "^6.0.0",
|
||||
"css-loader": "^5.2.4",
|
||||
"enhanced-resolve": "^5.8.2",
|
||||
"extract-loader": "^5.1.0",
|
||||
"file-loader": "^6.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"foundation-sites": "^6.6.3",
|
||||
"html-loader": "^1.3.2",
|
||||
"html-webpack-plugin": "^4.5.0",
|
||||
"html-webpack-plugin": "^4.5.2",
|
||||
"jasmine": "^3.7.0",
|
||||
"localforage": "^1.9.0",
|
||||
"node-sass": "^5.0.0",
|
||||
"postcss-loader": "^5.2.0",
|
||||
"sass-loader": "^10.0.3",
|
||||
"sql.js": "1.3.2",
|
||||
"terser-webpack-plugin": "^5.0.0",
|
||||
"ts-loader": "^8.0.17",
|
||||
"node-sass": "^6.0.0",
|
||||
"postcss-loader": "^4.3.0",
|
||||
"sass-loader": "^10.2.0",
|
||||
"sql.js": "1.5.0",
|
||||
"terser-webpack-plugin": "^5.1.2",
|
||||
"ts-loader": "^8.2.0",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-dev-server": "^3.11.0",
|
||||
"workbox-precaching": "^5.1.4",
|
||||
"workbox-webpack-plugin": "^5.1.4"
|
||||
"webpack-dev-server": "^3.11.2"
|
||||
},
|
||||
"cordova": {
|
||||
"plugins": {
|
||||
"cordova-plugin-webpack": {},
|
||||
"cordova-plugin-whitelist": {},
|
||||
"cordova-plugin-nativestorage": {},
|
||||
"cordova-plugin-keyboard": {},
|
||||
"cordova-plugin-tts": {},
|
||||
"nl.madebymark.share": {},
|
||||
"cordova-plugin-device": {},
|
||||
"cordova-plugin-file": {},
|
||||
"cordova-sqlite-storage": {}
|
||||
"cordova-sqlite-storage": {},
|
||||
"cordova-plugin-whitelist": {}
|
||||
},
|
||||
"platforms": [
|
||||
"browser",
|
||||
|
||||
@ -125,6 +125,7 @@ export class LevelSite extends MenuSite {
|
||||
|
||||
let continueButton = this.findBy("#continue-button");
|
||||
continueButton.addEventListener("click", () => {
|
||||
continueButton.style.opacity = 0;
|
||||
this.nextLevel();
|
||||
});
|
||||
|
||||
@ -300,19 +301,18 @@ export class LevelSite extends MenuSite {
|
||||
try {
|
||||
const savePromise = LevelPlayed.setPlayed(level.getLevelData());
|
||||
|
||||
savePromise.then((r) => console.log("levelSaved!", r));
|
||||
// savePromise.then((r) => console.log("levelSaved!", r));
|
||||
|
||||
this.levelCounter++;
|
||||
await NativeStoragePromise.setItem("levelCounter", this.levelCounter);
|
||||
|
||||
//Todo richtiges Element aufrufen?
|
||||
this._view.classList.add('won');
|
||||
await NativeStoragePromise.remove("currentLevel");
|
||||
|
||||
let continueButton = this.findBy("#continue-button");
|
||||
continueButton.style.transition = "none";
|
||||
continueButton.style.opacity = 0;
|
||||
|
||||
//Todo richtiges Element aufrufen?
|
||||
this._view.classList.add('won');
|
||||
ViewHelper.removeAllChildren(this.coinContainer);
|
||||
let coinsPerLevel = await NativeStoragePromise.getItem("coinsPerLevel", 5);
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ import translationGerman from '../translations/de.json';
|
||||
import translationEn from '../translations/en.json';
|
||||
import {App, Translator, DataManager, Toast} from "cordova-sites/dist/client";
|
||||
|
||||
|
||||
import "cordova-sites-user-management/dist/client/js/translationInit"
|
||||
import "cordova-sites/dist/client/js/translationInit"
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ export class Level {
|
||||
});
|
||||
|
||||
this.segmentClickedListener = () => {
|
||||
console.log("clicked")
|
||||
// console.log("clicked")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import {ViewHelper} from "js-helper/dist/client/ViewHelper";
|
||||
export class ParentSegment extends Segment {
|
||||
static initListener() {
|
||||
window.addEventListener("mousedown", (e) => {
|
||||
console.log("mousedown");
|
||||
// console.log("mousedown");
|
||||
ParentSegment.mouseDownTarget = e.target;
|
||||
ParentSegment.clickPosition = {x: e.pageX, y: e.pageY};
|
||||
});
|
||||
@ -66,7 +66,7 @@ export class ParentSegment extends Segment {
|
||||
this.mouseupListener = (e) => {
|
||||
let now = new Date().getTime();
|
||||
|
||||
console.log("mouseup", ParentSegment.mouseDownTarget);
|
||||
// console.log("mouseup", ParentSegment.mouseDownTarget);
|
||||
if (ParentSegment.mouseDownTarget !== null && this.element.contains(ParentSegment.mouseDownTarget) && this.element.contains(e.target)) {
|
||||
let position = {x: e.pageX, y: e.pageY};
|
||||
e.stopPropagation();
|
||||
@ -269,4 +269,4 @@ export class ParentSegment extends Segment {
|
||||
}
|
||||
}
|
||||
|
||||
ParentSegment.initListener();
|
||||
ParentSegment.initListener();
|
||||
|
||||
@ -52,6 +52,10 @@ body.theme-blue{
|
||||
background: $primaryColor;
|
||||
color: $textColor;
|
||||
|
||||
label{
|
||||
color: $textColor;
|
||||
}
|
||||
|
||||
.toast .message{
|
||||
background: $secondaryColor;
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"choose-theme-dialog-title": "Theme auswählen:",
|
||||
"install": "Installieren",
|
||||
"share-dialog": "Teilen:",
|
||||
"credits-text": "Ein großer Dank geht an Hanna, denn ohne sie sähe die App nicht so aus, wie sie aussieht. Danke für deine guten Vorschlä und Ratschläge für das Design!",
|
||||
"credits-text": "Ein großer Dank geht an Hanna, denn ohne sie sähe die App nicht so aus, wie sie aussieht. Danke für deine guten Vorschläge und Ratschläge für das Design!",
|
||||
"credits-coin-text": "Sound:<br/>Der Münz-Sound ist von der Webseite <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a>. Alle Rechte für diesen Münz-Sound gehören <a target='_blank' rel='noopener' href = '{0}' class = 'link'>{0}</a>.",
|
||||
"credits-music-text": "Musik:<br/>Bright And Beautiful - GEMAfreie Musik von <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a><br/>Licensed under Creative Commons: By Attribution 4.0 International (CC BY 4.0)<br/><a href = '{1}' target='_blank' rel='noopener' class = 'link'>{1}</a><br/>Angepasst (geschnitten) für diese App",
|
||||
"storage-info": "Fortschritt {0} dauerhaft gespeichert",
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
src/server/public/bundle.js.map
Normal file
1
src/server/public/bundle.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget android-versionCode="17" id="link.silas.wordrotator" version="1.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget android-versionCode="18" id="link.silas.wordrotator" version="1.3.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>WordRotator</name>
|
||||
<description>
|
||||
A word-game
|
||||
@ -10,6 +10,7 @@
|
||||
<content src="index.html" />
|
||||
<icon src="src/client/img/logo.png" />
|
||||
<access origin="*" />
|
||||
<access origin="cdvfile://*" />
|
||||
<allow-intent href="http://*/*" />
|
||||
<allow-intent href="https://*/*" />
|
||||
<allow-intent href="tel:*" />
|
||||
|
||||
107
src/server/public/cordova_plugins.js
vendored
107
src/server/public/cordova_plugins.js
vendored
@ -18,14 +18,6 @@ module.exports = [
|
||||
"id": "cordova-plugin-nativestorage.NativeStorageError",
|
||||
"pluginId": "cordova-plugin-nativestorage"
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-keyboard/www/keyboard.js",
|
||||
"id": "cordova-plugin-keyboard.keyboard",
|
||||
"pluginId": "cordova-plugin-keyboard",
|
||||
"clobbers": [
|
||||
"window.Keyboard"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-tts/www/tts.js",
|
||||
"id": "cordova-plugin-tts.tts",
|
||||
@ -34,6 +26,14 @@ module.exports = [
|
||||
"TTS"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/nl.madebymark.share/www/share.js",
|
||||
"id": "nl.madebymark.share.Share",
|
||||
"pluginId": "nl.madebymark.share",
|
||||
"clobbers": [
|
||||
"window.navigator.share"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-device/www/device.js",
|
||||
"id": "cordova-plugin-device.device",
|
||||
@ -246,102 +246,19 @@ module.exports = [
|
||||
"id": "cordova-sqlite-storage.SQLiteProxy",
|
||||
"pluginId": "cordova-sqlite-storage",
|
||||
"runs": true
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-statusbar/www/statusbar.js",
|
||||
"id": "cordova-plugin-statusbar.statusbar",
|
||||
"pluginId": "cordova-plugin-statusbar",
|
||||
"clobbers": [
|
||||
"window.StatusBar"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-statusbar/src/browser/StatusBarProxy.js",
|
||||
"id": "cordova-plugin-statusbar.StatusBarProxy",
|
||||
"pluginId": "cordova-plugin-statusbar",
|
||||
"runs": true
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-calendar/www/Calendar.js",
|
||||
"id": "cordova-plugin-calendar.Calendar",
|
||||
"pluginId": "cordova-plugin-calendar",
|
||||
"clobbers": [
|
||||
"Calendar"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-badge/www/badge.js",
|
||||
"id": "cordova-plugin-badge.Badge",
|
||||
"pluginId": "cordova-plugin-badge",
|
||||
"clobbers": [
|
||||
"cordova.plugins.notification.badge"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-badge/src/browser/favico.min.js",
|
||||
"id": "cordova-plugin-badge.Badge.Favico",
|
||||
"pluginId": "cordova-plugin-badge",
|
||||
"clobbers": [
|
||||
"cordova.plugins.notification.badge.Favico"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-badge/src/browser/BadgeProxy.js",
|
||||
"id": "cordova-plugin-badge.Badge.Proxy",
|
||||
"pluginId": "cordova-plugin-badge",
|
||||
"runs": true
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-local-notification/www/local-notification.js",
|
||||
"id": "cordova-plugin-local-notification.LocalNotification",
|
||||
"pluginId": "cordova-plugin-local-notification",
|
||||
"clobbers": [
|
||||
"cordova.plugins.notification.local"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-local-notification/www/local-notification-core.js",
|
||||
"id": "cordova-plugin-local-notification.LocalNotification.Core",
|
||||
"pluginId": "cordova-plugin-local-notification",
|
||||
"clobbers": [
|
||||
"cordova.plugins.notification.local.core",
|
||||
"plugin.notification.local.core"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-local-notification/www/local-notification-util.js",
|
||||
"id": "cordova-plugin-local-notification.LocalNotification.Util",
|
||||
"pluginId": "cordova-plugin-local-notification",
|
||||
"merges": [
|
||||
"cordova.plugins.notification.local.core",
|
||||
"plugin.notification.local.core"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "plugins/cordova-plugin-background-fetch/www/BackgroundFetch.js",
|
||||
"id": "cordova-plugin-background-fetch.BackgroundFetch",
|
||||
"pluginId": "cordova-plugin-background-fetch",
|
||||
"clobbers": [
|
||||
"window.BackgroundFetch"
|
||||
]
|
||||
}
|
||||
];
|
||||
module.exports.metadata =
|
||||
// TOP OF METADATA
|
||||
{
|
||||
"cordova-plugin-whitelist": "1.3.4",
|
||||
"cordova-plugin-webpack": "1.0.5",
|
||||
"cordova-plugin-nativestorage": "2.3.2",
|
||||
"cordova-plugin-keyboard": "1.2.0",
|
||||
"cordova-plugin-tts": "0.2.3",
|
||||
"nl.madebymark.share": "0.1.1",
|
||||
"cordova-plugin-device": "2.0.3",
|
||||
"cordova-plugin-file": "6.0.2",
|
||||
"cordova-sqlite-storage": "5.1.0",
|
||||
"cordova-plugin-statusbar": "2.4.3",
|
||||
"cordova-plugin-calendar": "5.1.5",
|
||||
"cordova-plugin-badge": "0.8.8",
|
||||
"cordova-plugin-local-notification": "0.9.0-beta.2",
|
||||
"cordova-plugin-background-fetch": "6.1.1",
|
||||
"cordova-plugin-wkwebview-file-xhr": "3.0.0"
|
||||
"cordova-sqlite-storage": "6.0.0",
|
||||
"cordova-plugin-whitelist": "1.3.4"
|
||||
}
|
||||
// BOTTOM OF METADATA
|
||||
});
|
||||
@ -1,24 +1 @@
|
||||
<div class="window-container">
|
||||
<div class="flex-container">
|
||||
<span class="window-resize edge nw" data-direction="-1,-1"> </span>
|
||||
<span class="window-resize top grow" data-direction="0,-1"> </span>
|
||||
<span class="window-resize edge ne" data-direction="1,-1"> </span>
|
||||
</div>
|
||||
|
||||
<div class="flex-container grow overflow-hidden">
|
||||
<div class="window-resize left" data-direction="-1,0"> </div>
|
||||
<div class="grow flex-container flex-dir-column max-width-100">
|
||||
<div class="flex-container"><h4 id="title" class="grow"> </h4></div>
|
||||
<div class="window">
|
||||
<span id="child-view"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="window-resize right" data-direction="1,0"> </div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container">
|
||||
<div class="window-resize edge sw" data-direction="-1,1"> </div>
|
||||
<div class="window-resize bottom grow" data-direction="0,1"> </div>
|
||||
<div class="window-resize edge se" data-direction="1,1"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="window-container"> <div class="flex-container"> <span class="window-resize edge nw" data-direction="-1,-1"> </span> <span class="window-resize top grow" data-direction="0,-1"> </span> <span class="window-resize edge ne" data-direction="1,-1"> </span> </div> <div class="flex-container grow overflow-hidden"> <div class="window-resize left" data-direction="-1,0"> </div> <div class="grow flex-container flex-dir-column max-width-100"> <div class="flex-container"><h4 id="title" class="grow"> </h4></div> <div class="window"> <span id="child-view"></span> </div> </div> <div class="window-resize right" data-direction="1,0"> </div> </div> <div class="flex-container"> <div class="window-resize edge sw" data-direction="-1,1"> </div> <div class="window-resize bottom grow" data-direction="0,1"> </div> <div class="window-resize edge se" data-direction="1,1"> </div> </div> </div>
|
||||
@ -1,59 +1 @@
|
||||
<div class="flex-container alphabetic-list">
|
||||
<article class="grow alphabetic-list-container">
|
||||
<span id ='alphabetic-list-heading'></span>
|
||||
<span class='alphabet-section A'></span>
|
||||
<span class='alphabet-section B'></span>
|
||||
<span class='alphabet-section C'></span>
|
||||
<span class='alphabet-section D'></span>
|
||||
<span class='alphabet-section E'></span>
|
||||
<span class='alphabet-section F'></span>
|
||||
<span class='alphabet-section G'></span>
|
||||
<span class='alphabet-section H'></span>
|
||||
<span class='alphabet-section I'></span>
|
||||
<span class='alphabet-section J'></span>
|
||||
<span class='alphabet-section K'></span>
|
||||
<span class='alphabet-section L'></span>
|
||||
<span class='alphabet-section M'></span>
|
||||
<span class='alphabet-section N'></span>
|
||||
<span class='alphabet-section O'></span>
|
||||
<span class='alphabet-section P'></span>
|
||||
<span class='alphabet-section Q'></span>
|
||||
<span class='alphabet-section R'></span>
|
||||
<span class='alphabet-section S'></span>
|
||||
<span class='alphabet-section T'></span>
|
||||
<span class='alphabet-section U'></span>
|
||||
<span class='alphabet-section V'></span>
|
||||
<span class='alphabet-section W'></span>
|
||||
<span class='alphabet-section X'></span>
|
||||
<span class='alphabet-section Y'></span>
|
||||
<span class='alphabet-section Z'></span>
|
||||
</article>
|
||||
<span class="alphabetic-list-sidealphabet">
|
||||
<span class="alphabet-scroll-to" data-letter="A">A</span>
|
||||
<span class="alphabet-scroll-to" data-letter="B">B</span>
|
||||
<span class="alphabet-scroll-to" data-letter="C">C</span>
|
||||
<span class="alphabet-scroll-to" data-letter="D">D</span>
|
||||
<span class="alphabet-scroll-to" data-letter="E">E</span>
|
||||
<span class="alphabet-scroll-to" data-letter="F">F</span>
|
||||
<span class="alphabet-scroll-to" data-letter="G">G</span>
|
||||
<span class="alphabet-scroll-to" data-letter="H">H</span>
|
||||
<span class="alphabet-scroll-to" data-letter="I">I</span>
|
||||
<span class="alphabet-scroll-to" data-letter="J">J</span>
|
||||
<span class="alphabet-scroll-to" data-letter="K">K</span>
|
||||
<span class="alphabet-scroll-to" data-letter="L">L</span>
|
||||
<span class="alphabet-scroll-to" data-letter="M">M</span>
|
||||
<span class="alphabet-scroll-to" data-letter="N">N</span>
|
||||
<span class="alphabet-scroll-to" data-letter="O">O</span>
|
||||
<span class="alphabet-scroll-to" data-letter="P">P</span>
|
||||
<span class="alphabet-scroll-to" data-letter="Q">Q</span>
|
||||
<span class="alphabet-scroll-to" data-letter="R">R</span>
|
||||
<span class="alphabet-scroll-to" data-letter="S">S</span>
|
||||
<span class="alphabet-scroll-to" data-letter="T">T</span>
|
||||
<span class="alphabet-scroll-to" data-letter="U">U</span>
|
||||
<span class="alphabet-scroll-to" data-letter="V">V</span>
|
||||
<span class="alphabet-scroll-to" data-letter="W">W</span>
|
||||
<span class="alphabet-scroll-to" data-letter="X">X</span>
|
||||
<span class="alphabet-scroll-to" data-letter="Y">Y</span>
|
||||
<span class="alphabet-scroll-to" data-letter="Z">Z</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex-container alphabetic-list"> <article class="grow alphabetic-list-container"> <span id="alphabetic-list-heading"></span> <span class="alphabet-section A"></span> <span class="alphabet-section B"></span> <span class="alphabet-section C"></span> <span class="alphabet-section D"></span> <span class="alphabet-section E"></span> <span class="alphabet-section F"></span> <span class="alphabet-section G"></span> <span class="alphabet-section H"></span> <span class="alphabet-section I"></span> <span class="alphabet-section J"></span> <span class="alphabet-section K"></span> <span class="alphabet-section L"></span> <span class="alphabet-section M"></span> <span class="alphabet-section N"></span> <span class="alphabet-section O"></span> <span class="alphabet-section P"></span> <span class="alphabet-section Q"></span> <span class="alphabet-section R"></span> <span class="alphabet-section S"></span> <span class="alphabet-section T"></span> <span class="alphabet-section U"></span> <span class="alphabet-section V"></span> <span class="alphabet-section W"></span> <span class="alphabet-section X"></span> <span class="alphabet-section Y"></span> <span class="alphabet-section Z"></span> </article> <span class="alphabetic-list-sidealphabet"> <span class="alphabet-scroll-to" data-letter="A">A</span> <span class="alphabet-scroll-to" data-letter="B">B</span> <span class="alphabet-scroll-to" data-letter="C">C</span> <span class="alphabet-scroll-to" data-letter="D">D</span> <span class="alphabet-scroll-to" data-letter="E">E</span> <span class="alphabet-scroll-to" data-letter="F">F</span> <span class="alphabet-scroll-to" data-letter="G">G</span> <span class="alphabet-scroll-to" data-letter="H">H</span> <span class="alphabet-scroll-to" data-letter="I">I</span> <span class="alphabet-scroll-to" data-letter="J">J</span> <span class="alphabet-scroll-to" data-letter="K">K</span> <span class="alphabet-scroll-to" data-letter="L">L</span> <span class="alphabet-scroll-to" data-letter="M">M</span> <span class="alphabet-scroll-to" data-letter="N">N</span> <span class="alphabet-scroll-to" data-letter="O">O</span> <span class="alphabet-scroll-to" data-letter="P">P</span> <span class="alphabet-scroll-to" data-letter="Q">Q</span> <span class="alphabet-scroll-to" data-letter="R">R</span> <span class="alphabet-scroll-to" data-letter="S">S</span> <span class="alphabet-scroll-to" data-letter="T">T</span> <span class="alphabet-scroll-to" data-letter="U">U</span> <span class="alphabet-scroll-to" data-letter="V">V</span> <span class="alphabet-scroll-to" data-letter="W">W</span> <span class="alphabet-scroll-to" data-letter="X">X</span> <span class="alphabet-scroll-to" data-letter="Y">Y</span> <span class="alphabet-scroll-to" data-letter="Z">Z</span> </span> </div>
|
||||
@ -1,17 +1 @@
|
||||
<div>
|
||||
<h1 id = "username"></h1>
|
||||
<div class="grid-x">
|
||||
<div class="small-6" id = "has-role-container">
|
||||
<div class="grid-x has-role" id = "has-role-template">
|
||||
<span class="small-10 role-name"></span>
|
||||
<button class="small-2 button remove-role">-></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="small-6" id = "available-role-container">
|
||||
<div class="grid-x has-role" id = "available-role-template">
|
||||
<button class="small-2 add-role button"><-</button>
|
||||
<span class="small-10 role-name"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div> <h1 id="username"></h1> <div class="grid-x"> <div class="small-6" id="has-role-container"> <div class="grid-x has-role" id="has-role-template"> <span class="small-10 role-name"></span> <button class="small-2 button remove-role">-></button> </div> </div> <div class="small-6" id="available-role-container"> <div class="grid-x has-role" id="available-role-template"> <button class="small-2 add-role button"><-</button> <span class="small-10 role-name"></span> </div> </div> </div> </div>
|
||||
@ -1,7 +1 @@
|
||||
<div>
|
||||
<div id='choose-container'>
|
||||
<div id='choose-value-template' class = 'choose-dialog-value-row grid-x'>
|
||||
<div class='choose-dialog-value column small-12'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div> <div id="choose-container"> <div id="choose-value-template" class="choose-dialog-value-row grid-x"> <div class="choose-dialog-value column small-12"></div> </div> </div> </div>
|
||||
@ -1,21 +1 @@
|
||||
<h1 class = "translation">contact</h1>
|
||||
<p id = "contactText">
|
||||
</p>
|
||||
<form class="grid-x" id = "contact-form">
|
||||
<label class="small-12 medium-6 right">
|
||||
<input type="checkbox" value="1" required name="policy">
|
||||
<span>
|
||||
<a class = "link translation" href="/?s=privacyPolicy">privacy-policy</a>
|
||||
<span class = "translation">privacy policy accepted</span>
|
||||
</span>
|
||||
</label>
|
||||
<label class = "small-12 medium-6">
|
||||
<input type="email" required name="email">
|
||||
<span class="translation">e-mail</span>
|
||||
</label>
|
||||
<label class="small-12">
|
||||
<textarea required name="message"></textarea>
|
||||
<span class="translation">message</span>
|
||||
</label>
|
||||
<button class="small-12 button translation">send</button>
|
||||
</form>
|
||||
<h1 class="translation">contact</h1> <p id="contactText"> </p> <form class="grid-x" id="contact-form"> <label class="small-12 medium-6 right"> <input type="checkbox" value="1" required name="policy"> <span> <a class="link translation" href="/?s=privacyPolicy">privacy-policy</a> <span class="translation">privacy policy accepted</span> </span> </label> <label class="small-12 medium-6"> <input type="email" required name="email"> <span class="translation">e-mail</span> </label> <label class="small-12"> <textarea required name="message"></textarea> <span class="translation">message</span> </label> <button class="small-12 button translation">send</button> </form>
|
||||
@ -1,7 +1 @@
|
||||
<div class="grid-x grid-padding-x grid-padding-y grow grid-container" id="main-content-container">
|
||||
<div class="cell small-12 max-height-100" id="main-content">
|
||||
<!--site-_content wird ersetzt, daher keine wirklichen attribute-->
|
||||
<span id="site-content">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x grid-padding-y grow grid-container" id="main-content-container"> <div class="cell small-12 max-height-100" id="main-content"> <span id="site-content"> </span> </div> </div>
|
||||
@ -1,5 +1 @@
|
||||
<div>
|
||||
<p class="translation" data-translation="credits-text"></p>
|
||||
<p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p>
|
||||
<p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p>
|
||||
</div>
|
||||
<div> <p class="translation" data-translation="credits-text"></p> <p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p> <p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p> </div>
|
||||
@ -1,3 +1 @@
|
||||
<div class = 'max-height flex-center'>
|
||||
<div data-translation="game-ended" class = 'center translation'></div>
|
||||
</div>
|
||||
<div class="max-height flex-center"> <div data-translation="game-ended" class="center translation"></div> </div>
|
||||
@ -1,26 +1 @@
|
||||
<article >
|
||||
<section id = "forgot-password">
|
||||
<h2 class="translation">password forgotten</h2>
|
||||
<form id="forgot-password-form">
|
||||
<label>
|
||||
<input type="text" name='email' required>
|
||||
<span class="translation">Email</span>
|
||||
</label>
|
||||
<button class="translation button">Request new password</button>
|
||||
</form>
|
||||
</section>
|
||||
<section id = "reset-password" class="hidden">
|
||||
<h2 class="translation">reset password</h2>
|
||||
<form id="reset-password-form">
|
||||
<label>
|
||||
<input type="password" name='password1' required>
|
||||
<span class="translation">Password</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="password" name='password2' required>
|
||||
<span class="translation">Repeat Password</span>
|
||||
</label>
|
||||
<button class="translation button">Reset password</button>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
<article> <section id="forgot-password"> <h2 class="translation">password forgotten</h2> <form id="forgot-password-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <button class="translation button">Request new password</button> </form> </section> <section id="reset-password" class="hidden"> <h2 class="translation">reset password</h2> <form id="reset-password-form"> <label> <input type="password" name="password1" required> <span class="translation">Password</span> </label> <label> <input type="password" name="password2" required> <span class="translation">Repeat Password</span> </label> <button class="translation button">Reset password</button> </form> </section> </article>
|
||||
@ -1,11 +1 @@
|
||||
<div>
|
||||
<h2>Impressum</h2>
|
||||
<p>Silas Günther<br />
|
||||
Mariabrunnstraße 48<br />
|
||||
52064 Aachen<br/>
|
||||
Deutschland
|
||||
</p>
|
||||
<p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/>
|
||||
<a href = "?s=contact" class = "link">Kontaktformular</a>
|
||||
</p>
|
||||
</div>
|
||||
<div> <h2>Impressum</h2> <p>Silas Günther<br/> Mariabrunnstraße 48<br/> 52064 Aachen<br/> Deutschland </p> <p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/> <a href="?s=contact" class="link">Kontaktformular</a> </p> </div>
|
||||
@ -1,54 +1 @@
|
||||
<div class='max-height overflow-hidden'>
|
||||
<!-- Templates for segments-->
|
||||
<div id='segment-leaf-template' class='segment segment-leaf'>
|
||||
<div class='leaf-element'></div>
|
||||
</div>
|
||||
<div id='segment-parent-template' class='segment segment-parent'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-row-template' class='segment segment-row'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-column-template' class='segment segment-column'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-triangle-template' class='segment segment-triangle'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
|
||||
<div id = 'tutorial-pointer'></div>
|
||||
<!-- Site Content -->
|
||||
<div class='max-height fill-me'>
|
||||
<!-- <div class="text-right max-width">-->
|
||||
<!-- <button class="button show-while-playing" id='help-button'>-->
|
||||
<!-- <img src = "../../img/help.png"/>-->
|
||||
<!-- </button>-->
|
||||
<!-- </div>-->
|
||||
<div class = 'height-20 no-transition tutorial-text center flex-center hidden'>
|
||||
<div class = 'step-1 hidden translation' data-translation="tutorial-step-1"></div>
|
||||
<div class = 'step-2 hidden translation' data-translation="tutorial-step-2"></div>
|
||||
<div class = 'step-3 hidden translation' data-translation="tutorial-step-3"></div>
|
||||
<div class = 'step-4 hidden translation' data-translation="tutorial-step-4"></div>
|
||||
</div>
|
||||
<div class='height-20 show-when-won center flex-center fill-me' style = 'min-height: 45px'>
|
||||
<div class = 'grow max-width'>
|
||||
<b class="translation" data-translation="won" id="won-text"></b>
|
||||
</div>
|
||||
<div id='coin-container'>
|
||||
<div id='coin-template' class='coin' style="opacity: 0">
|
||||
<img src='img/coin.png'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-center level-container grow">
|
||||
<div id='level'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='show-when-won flex-center height-20'>
|
||||
<button class='button max-width translation' id='continue-button' data-translation="continue"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class = 'tutorial-blanket'></div>
|
||||
|
||||
</div>
|
||||
<div class="max-height overflow-hidden"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-column-template" class="segment segment-column"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div id="tutorial-pointer"></div> <div class="max-height fill-me"> <div class="height-20 no-transition tutorial-text center flex-center hidden"> <div class="step-1 hidden translation" data-translation="tutorial-step-1"></div> <div class="step-2 hidden translation" data-translation="tutorial-step-2"></div> <div class="step-3 hidden translation" data-translation="tutorial-step-3"></div> <div class="step-4 hidden translation" data-translation="tutorial-step-4"></div> </div> <div class="height-20 show-when-won center flex-center fill-me" style="min-height:45px"> <div class="grow max-width"> <b class="translation" data-translation="won" id="won-text"></b> </div> <div id="coin-container"> <div id="coin-template" class="coin" style="opacity:0"> <img src="img/coin.png"/> </div> </div> </div> <div class="flex-center level-container grow"> <div id="level"> </div> </div> <div class="show-when-won flex-center height-20"> <button class="button max-width translation" id="continue-button" data-translation="continue"></button> </div> </div> <div class="tutorial-blanket"></div> </div>
|
||||
@ -1,21 +1 @@
|
||||
<article >
|
||||
<section>
|
||||
<h2 class="translation">Login</h2>
|
||||
<form id="login-form">
|
||||
<label>
|
||||
<input type="text" name='email' required>
|
||||
<span class="translation">Email</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="password" name='password' required>
|
||||
<span class="translation">password</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" checked name='saveLogin'>
|
||||
<span class="translation">stay logged in</span>
|
||||
</label>
|
||||
<button class="translation button">Login</button>
|
||||
</form>
|
||||
<button class="translation link" id = "forgot-pw">Passwort vergessen?</button>
|
||||
</section>
|
||||
</article>
|
||||
<article> <section> <h2 class="translation">Login</h2> <form id="login-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <label> <input type="password" name="password" required> <span class="translation">password</span> </label> <label> <input type="checkbox" checked="checked" name="saveLogin"> <span class="translation">stay logged in</span> </label> <button class="translation button">Login</button> </form> <button class="translation link" id="forgot-pw">Passwort vergessen?</button> </section> </article>
|
||||
@ -1,39 +1 @@
|
||||
<div class='max-height flex-center'>
|
||||
<!--<b>WordRotator</b>-->
|
||||
|
||||
<div id='segment-leaf-template' class='segment segment-leaf'>
|
||||
<div class='leaf-element'></div>
|
||||
</div>
|
||||
<div id='segment-parent-template' class='segment segment-parent'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-row-template' class='segment segment-row'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-triangle-template' class='segment segment-triangle'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
|
||||
<div class='height-60 max-width flex-center relative-level-number'>
|
||||
<div id='level'></div>
|
||||
<span id='level-number-container' class='visible in-main-menu'>
|
||||
<span id='level-number'>1</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class='height-30 flex-center fill-me'>
|
||||
<button class='button grow text-center' id='play-button'><span class="translation" data-translation="play"></span></button>
|
||||
<div class='max-width line-height-1 fill-me vertical'>
|
||||
<label class="switch">
|
||||
<div data-view="img/speaker.svg"></div>
|
||||
<input type="checkbox" class="setting" id="play-sound">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<div class="grow center" id = "share-button"><span data-view="img/share.svg"></span></div>
|
||||
<label class="switch right">
|
||||
<div data-view="img/music.svg"></div>
|
||||
<input type="checkbox" class="setting" id="play-music">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="max-height flex-center"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div class="height-60 max-width flex-center relative-level-number"> <div id="level"></div> <span id="level-number-container" class="visible in-main-menu"> <span id="level-number">1</span> </span> </div> <div class="height-30 flex-center fill-me"> <button class="button grow text-center" id="play-button"><span class="translation" data-translation="play"></span></button> <div class="max-width line-height-1 fill-me vertical"> <label class="switch"> <div data-view="img/speaker.svg"></div> <input type="checkbox" class="setting" id="play-sound"> <span class="slider"></span> </label> <div class="grow center" id="share-button"><span data-view="img/share.svg"></span></div> <label class="switch right"> <div data-view="img/music.svg"></div> <input type="checkbox" class="setting" id="play-music"> <span class="slider"></span> </label> </div> </div> </div>
|
||||
@ -1,12 +1 @@
|
||||
<!--<div class="flex-dir-column flex-container height-100">-->
|
||||
<div class="grid-container flex-dir-column flex-container height-100" id="main-content-container">
|
||||
<span id="navbar-fragment"></span>
|
||||
<div class="grid-x grid-padding-x grid-padding-y grow max-height-100">
|
||||
<div class="cell small-12" id="main-content">
|
||||
<!--site-_content wird ersetzt, daher keine wirklichen attribute-->
|
||||
<span id="site-content">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
<div class="grid-container flex-dir-column flex-container height-100" id="main-content-container"> <span id="navbar-fragment"></span> <div class="grid-x grid-padding-x grid-padding-y grow max-height-100"> <div class="cell small-12" id="main-content"> <span id="site-content"> </span> </div> </div> </div>
|
||||
@ -1,37 +1 @@
|
||||
<nav class="top-bar">
|
||||
<img class="background-img">
|
||||
<span class="grid-container width-100">
|
||||
<span class="grid-padding-x ">
|
||||
<span class="small-12 cell">
|
||||
<div class="hidden back-button">
|
||||
<img data-view="img/arrowLeft.svg" alt="back">
|
||||
</div>
|
||||
<div class="hidden logo">
|
||||
<img class = "logo-img">
|
||||
</div>
|
||||
<div class="top-bar-title grow">
|
||||
<strong>
|
||||
<a class="hidden-link" href="?">
|
||||
<span class="" id='title-element-container'></span>
|
||||
</a>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div id='navbar-close-listener-container' style="display: none">
|
||||
<div id='navbar-close-listener'></div>
|
||||
</div>
|
||||
|
||||
<ul class="dropdown menu horizontal navbar-menu" id='navbar-menu-visible'>
|
||||
<div id='navbar-menu-visible-close-listener'></div>
|
||||
</ul>
|
||||
<span id="responsive-menu-toggle" class="right">
|
||||
<button class="menu-icon" type="button" data-toggle=""></button>
|
||||
</span>
|
||||
<div id="responsive-menu">
|
||||
<ul class="menu vertical accordion-menu navbar-menu hidden-menu" id="navbar-menu-hidden">
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</nav>
|
||||
<nav class="top-bar"> <img class="background-img"> <span class="grid-container width-100"> <span class="grid-padding-x"> <span class="small-12 cell"> <div class="hidden back-button"> <img data-view="img/arrowLeft.svg" alt="back"> </div> <div class="hidden logo"> <img class="logo-img"> </div> <div class="top-bar-title grow"> <strong> <a class="hidden-link" href="?"> <span class="" id="title-element-container"></span> </a> </strong> </div> <div id="navbar-close-listener-container" style="display:none"> <div id="navbar-close-listener"></div> </div> <ul class="dropdown menu horizontal navbar-menu" id="navbar-menu-visible"> <div id="navbar-menu-visible-close-listener"></div> </ul> <span id="responsive-menu-toggle" class="right"> <button class="menu-icon" type="button" data-toggle=""></button> </span> <div id="responsive-menu"> <ul class="menu vertical accordion-menu navbar-menu hidden-menu" id="navbar-menu-hidden"> </ul> </div> </span> </span> </span> </nav>
|
||||
@ -1,9 +1 @@
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<h2 class="translation">Not allowed</h2>
|
||||
<p class="translation">You don't have the rights to do this!</p>
|
||||
<p class="translation">If you are not logged in, please log in and try again.</p>
|
||||
<br/> <br/> <br/> <br/> <br/> <h2 class="translation">Not allowed</h2> <p class="translation">You don't have the rights to do this!</p> <p class="translation">If you are not logged in, please log in and try again.</p>
|
||||
File diff suppressed because one or more lines are too long
@ -1,28 +1 @@
|
||||
<article >
|
||||
<section>
|
||||
<h2 class="translation">registration</h2>
|
||||
<form id = "registration-form">
|
||||
<label>
|
||||
<input type="text" name='email' required>
|
||||
<span class="translation">Email</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="text" name='username' required>
|
||||
<span class="translation">username</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="password" name='password' required>
|
||||
<span class="translation">password</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="password" name='password2' required>
|
||||
<span class="translation">retype password</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" name='agbAccepted' required>
|
||||
<span class="translation">I have read and accepted the terms and conditions.</span>
|
||||
</label>
|
||||
<button class="translation button">registration</button>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
<article> <section> <h2 class="translation">registration</h2> <form id="registration-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <label> <input type="text" name="username" required> <span class="translation">username</span> </label> <label> <input type="password" name="password" required> <span class="translation">password</span> </label> <label> <input type="password" name="password2" required> <span class="translation">retype password</span> </label> <label> <input type="checkbox" name="agbAccepted" required> <span class="translation">I have read and accepted the terms and conditions.</span> </label> <button class="translation button">registration</button> </form> </section> </article>
|
||||
@ -1,10 +1 @@
|
||||
<div>
|
||||
<form id = "user-search">
|
||||
<input type = "text" id = "username-input">
|
||||
</form>
|
||||
<div id = "user-container">
|
||||
<div id = "user-template">
|
||||
<span class = "name"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div> <form id="user-search"> <input type="text" id="username-input"> </form> <div id="user-container"> <div id="user-template"> <span class="name"></span> </div> </div> </div>
|
||||
@ -1,61 +1 @@
|
||||
<div class='max-height fill-me'>
|
||||
<div class='grid-x max-width grow flex-center'>
|
||||
<div class='columns small-centered small-12 smedium-11 medium-9 large-7'>
|
||||
<label class="switch grid-x setting-row">
|
||||
<span class='columns small-6 translation'>sound</span>
|
||||
<span class='columns small-6 text-right'>
|
||||
<input type="checkbox" class="setting" id="play-sound" name='play-sound' value="1"
|
||||
data-default="1">
|
||||
<span class="slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
<label class="switch grid-x setting-row">
|
||||
<span class='columns small-6 translation' >music</span>
|
||||
<span class='columns small-6 text-right'>
|
||||
<input type="checkbox" class="setting" id="play-music" name='play-music' value="1"
|
||||
data-default="1">
|
||||
<span class="slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
<div class='grid-x setting-row' id='tutorial-button'>
|
||||
<span class='columns small-6 translation'>tutorial</span>
|
||||
<span class='columns small-6 text-right translation'>></span>
|
||||
</div>
|
||||
<div class='grid-x setting-row' id='credits-button'>
|
||||
<span class='columns small-6 translation' >credits</span>
|
||||
<span class='columns small-6 text-right translation'>></span>
|
||||
</div>
|
||||
<div class='grid-x setting-row' id='privacy-policy-button'>
|
||||
<span class='columns small-6 translation'>privacy-policy</span>
|
||||
<span class='columns small-6 text-right translation'>></span>
|
||||
</div>
|
||||
<div class='grid-x setting-row' id='impressum-button'>
|
||||
<span class='columns small-6 translation' >impressum</span>
|
||||
<span class='columns small-6 text-right translation'>></span>
|
||||
</div>
|
||||
<div class='grid-x setting-row' id='contact-button'>
|
||||
<span class='columns small-6 translation'>contact</span>
|
||||
<span class='columns small-6 text-right translation'>></span>
|
||||
</div>
|
||||
<label class="switch grid-x setting-row">
|
||||
<span class='columns small-6 translation'>track</span>
|
||||
<span class='columns small-6 text-right'>
|
||||
<input type="checkbox" class="setting" id="track-switch" name='matomoShouldTrack' value="1"
|
||||
data-default="1" data-raw="1">
|
||||
<span class="slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
<div class='grid-x setting-row hidden' >
|
||||
<span class = "column small-10" id='storage-info'></span>
|
||||
<span class='columns small-2 text-right translation'>></span>
|
||||
</div>
|
||||
|
||||
<div class='grid-x setting-row' >
|
||||
<span class = "column small-6 translation">version-label</span>
|
||||
<span class = "column small-6 text-right" id='version-info'></span>
|
||||
</div>
|
||||
|
||||
<button id='reset-levels' class="button hidden">reset-levels</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="max-height fill-me"> <div class="grid-x max-width grow flex-center"> <div class="columns small-centered small-12 smedium-11 medium-9 large-7"> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">sound</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-sound" name="play-sound" value="1" data-default="1"> <span class="slider"></span> </span> </label> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">music</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-music" name="play-music" value="1" data-default="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row" id="tutorial-button"> <span class="columns small-6 translation">tutorial</span> <span class="columns small-6 text-right translation">></span> </div> <div class="grid-x setting-row" id="credits-button"> <span class="columns small-6 translation">credits</span> <span class="columns small-6 text-right translation">></span> </div> <div class="grid-x setting-row" id="privacy-policy-button"> <span class="columns small-6 translation">privacy-policy</span> <span class="columns small-6 text-right translation">></span> </div> <div class="grid-x setting-row" id="impressum-button"> <span class="columns small-6 translation">impressum</span> <span class="columns small-6 text-right translation">></span> </div> <div class="grid-x setting-row" id="contact-button"> <span class="columns small-6 translation">contact</span> <span class="columns small-6 text-right translation">></span> </div> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">track</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="track-switch" name="matomoShouldTrack" value="1" data-default="1" data-raw="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row hidden"> <span class="column small-10" id="storage-info"></span> <span class="columns small-2 text-right translation">></span> </div> <div class="grid-x setting-row"> <span class="column small-6 translation">version-label</span> <span class="column small-6 text-right" id="version-info"></span> </div> <button id="reset-levels" class="button hidden">reset-levels</button> </div> </div> </div>
|
||||
@ -1,3 +1 @@
|
||||
<div class="height-100">
|
||||
<div id = "wordRotatorSettings" class="height-100" ></div>
|
||||
</div>
|
||||
<div class="height-100"> <div id="wordRotatorSettings" class="height-100"></div> </div>
|
||||
@ -1,9 +1 @@
|
||||
<div class = 'max-width center'>
|
||||
<a class="share-icon" id = "whatsapp-share">
|
||||
<img data-view="img/whatsapp.svg">
|
||||
</a>
|
||||
<a class="share-icon" id = "telegram-share">
|
||||
<img data-view="img/telegram.svg">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="max-width center"> <a class="share-icon" id="whatsapp-share"> <img data-view="img/whatsapp.svg"> </a> <a class="share-icon" id="telegram-share"> <img data-view="img/telegram.svg"> </a> </div>
|
||||
@ -1 +1 @@
|
||||
<div class = "swipe-container height-100"></div>
|
||||
<div class="swipe-container height-100"></div>
|
||||
@ -1,9 +1 @@
|
||||
<div class="tab-fragment">
|
||||
<div class="tab-names flex-container flex-dir-row">
|
||||
<div class="tab-button tab-button-template"></div>
|
||||
<div class="grow border-bottom"> </div>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-site tab-site-template active"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-fragment"> <div class="tab-names flex-container flex-dir-row"> <div class="tab-button tab-button-template"></div> <div class="grow border-bottom"> </div> </div> <div class="tab-content"> <div class="tab-site tab-site-template active"></div> </div> </div>
|
||||
@ -1,39 +1 @@
|
||||
<article id=tutorial-site>
|
||||
<section>
|
||||
<div id='segment-leaf-template' class='segment segment-leaf'>
|
||||
<div class='leaf-element'></div>
|
||||
</div>
|
||||
<div id='segment-parent-template' class='segment segment-parent'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-row-template' class='segment segment-row'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-column-template' class='segment segment-column'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
<div id='segment-triangle-template' class='segment segment-triangle'>
|
||||
<div class='child-container'></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="tutorial-1">
|
||||
<div class="tutorial-text translation">tutorial-1</div>
|
||||
<div class="level-container"></div>
|
||||
</section>
|
||||
<section id="tutorial-2">
|
||||
<div class="tutorial-text translation">tutorial-2</div>
|
||||
<div class="tutorial-wrapper">
|
||||
<button class="help-action">
|
||||
<img src="img/help.png" class="action-image">
|
||||
</button>
|
||||
<div class="level-container"></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="tutorial-3">
|
||||
<div class="tutorial-text translation">tutorial-3</div>
|
||||
<div class="tutorial-wrapper">
|
||||
<div id='tutorial-pointer'></div>
|
||||
<div class="level-container"></div>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
<article id="tutorial-site"> <section> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-column-template" class="segment segment-column"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> </section> <section id="tutorial-1"> <div class="tutorial-text translation">tutorial-1</div> <div class="level-container"></div> </section> <section id="tutorial-2"> <div class="tutorial-text translation">tutorial-2</div> <div class="tutorial-wrapper"> <button class="help-action"> <img src="img/help.png" class="action-image"> </button> <div class="level-container"></div> </div> </section> <section id="tutorial-3"> <div class="tutorial-text translation">tutorial-3</div> <div class="tutorial-wrapper"> <div id="tutorial-pointer"></div> <div class="level-container"></div> </div> </section> </article>
|
||||
File diff suppressed because one or more lines are too long
@ -1,42 +1 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="icon" type="image/png" href="img/logo.png">
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||||
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval';
|
||||
style-src 'self' 'unsafe-inline';
|
||||
media-src *; img-src 'self' * data: cdvfile: content:;
|
||||
script-src 'self' data: 'unsafe-eval'" ;>
|
||||
|
||||
<!--Element, mit dem Foundation die ViewQueries mitteilt-->
|
||||
<meta class='foundation-mq'>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="index.css">
|
||||
<title>WordRotator</title>
|
||||
<script src="scripts/sql-wasm.js"></script>
|
||||
<script src="scripts/localforage.js"></script>
|
||||
</head>
|
||||
<body class="theme-blue">
|
||||
<div id="toast-container">
|
||||
<div class='toast toast-template' style="opacity: 0">
|
||||
<span class='message'></span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='site'>
|
||||
<div class="loader overlay">
|
||||
<svg viewBox="0 0 32 32" width="32" height="32">
|
||||
<circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke: black;"></circle>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<script src='https://vjs.zencdn.net/7.4.1/video.js'></script>-->
|
||||
<script type="text/javascript" src="cordova.js"></script>
|
||||
<script src="bundle.js"></script></body>
|
||||
</html>
|
||||
<!doctype html><html><head><link rel="icon" type="image/png" href="img/logo.png"><meta charset="utf-8"/><meta name="format-detection" content="telephone=no"><meta name="msapplication-tap-highlight" content="no"><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' * data: cdvfile: content:; script-src 'self' data: 'unsafe-eval'" ;><meta class="foundation-mq"><link rel="stylesheet" href="index.css"><title>WordRotator</title><script src="scripts/sql-wasm.js"></script><script src="scripts/localforage.js"></script></head><body class="theme-blue"><div id="toast-container"><div class="toast toast-template" style="opacity:0"><span class="message"></span></div></div><div id="site"><div class="loader overlay"><svg viewBox="0 0 32 32" width="32" height="32"><circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke:#000"></circle></svg></div></div><script src="cordova.js"></script><script src="bundle.js"></script></body></html>
|
||||
@ -1,95 +0,0 @@
|
||||
cordova.define("cordova-plugin-background-fetch.BackgroundFetch", function(require, exports, module) { /***
|
||||
* Custom Cordova Background Fetch plugin.
|
||||
* @author <chris@transistorsoft.com>
|
||||
* iOS native-side is largely based upon http://www.mindsizzlers.com/2011/07/ios-background-location/
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
var exec = require("cordova/exec");
|
||||
|
||||
var EMPTY_FN = function() {}
|
||||
|
||||
var MODULE = "BackgroundFetch";
|
||||
module.exports = {
|
||||
STATUS_RESTRICTED: 0,
|
||||
STATUS_DENIED: 1,
|
||||
STATUS_AVAILABLE: 2,
|
||||
|
||||
FETCH_RESULT_NEW_DATA: 0,
|
||||
FETCH_RESULT_NO_DATA: 1,
|
||||
FETCH_RESULT_FAILED: 2,
|
||||
|
||||
NETWORK_TYPE_NONE: 0,
|
||||
NETWORK_TYPE_ANY: 1,
|
||||
NETWORK_TYPE_UNMETERED: 2,
|
||||
NETWORK_TYPE_NOT_ROAMING: 3,
|
||||
NETWORK_TYPE_CELLULAR: 4,
|
||||
|
||||
configure: function(callback, failure, config) {
|
||||
if (typeof(callback) !== 'function') {
|
||||
throw "BackgroundFetch configure error: You must provide a callback function as 1st argument";
|
||||
}
|
||||
config = config || {};
|
||||
failure = failure || EMPTY_FN;
|
||||
exec(callback, failure, MODULE, 'configure', [config]);
|
||||
},
|
||||
|
||||
finish: function(taskId, success, failure) {
|
||||
if (typeof(taskId) !== 'string') {
|
||||
throw "BackgroundGeolocation.finish now requires a String taskId as first argument";
|
||||
}
|
||||
success = success || EMPTY_FN;
|
||||
failure = failure || EMPTY_FN;
|
||||
exec(success, failure, MODULE, 'finish',[taskId]);
|
||||
},
|
||||
|
||||
start: function(success, failure) {
|
||||
success = success || EMPTY_FN;
|
||||
failure = failure || EMPTY_FN;
|
||||
exec(success, failure, MODULE, 'start',[]);
|
||||
},
|
||||
|
||||
stop: function(success, failure) {
|
||||
success = success || EMPTY_FN;
|
||||
failure = failure || EMPTY_FN;
|
||||
exec(success, failure, MODULE, 'stop', []);
|
||||
},
|
||||
|
||||
scheduleTask: function(config, success, failure) {
|
||||
if (typeof(config) !== 'object') throw "[BackgroundFetch stopTask] ERROR: The 1st argument to scheduleTask is a config {}";
|
||||
success = success || EMPTY_FN;
|
||||
failure = failure || EMPTY_FN;
|
||||
exec(success, failure, MODULE, 'scheduleTask', [config]);
|
||||
},
|
||||
|
||||
stopTask: function(taskId, success, failure) {
|
||||
if (typeof(taskId) !== 'string') throw "[BackgroundFetch stopTask] ERROR: The 1st argument must be a taskId:String";
|
||||
success = success || EMPTY_FN;
|
||||
failure = failure || EMPTY_FN;
|
||||
exec(success, failure, MODULE, 'stop', [taskId]);
|
||||
},
|
||||
|
||||
status: function(success, failure) {
|
||||
success = success || EMPTY_FN;
|
||||
failure = failure || EMPTY_FN;
|
||||
exec(success, failure, MODULE, 'status',[]);
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
@ -1,117 +0,0 @@
|
||||
cordova.define("cordova-plugin-badge.Badge.Proxy", function(require, exports, module) { /*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apache License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Instance of the Favico.js libary
|
||||
exports.favico = new cordova.plugins.notification.badge.Favico({
|
||||
animation: 'none'
|
||||
});
|
||||
|
||||
// Holds the current badge number
|
||||
var BADGE_KEY = 'cordova_badge_number';
|
||||
// Holds the saved badge config
|
||||
var CONFIG_KEY = 'APPBadgeConfigKey';
|
||||
|
||||
/**
|
||||
* Clears the badge of the app icon.
|
||||
*
|
||||
* @param [ Function ] success Success callback
|
||||
* @param [ Function ] error Error callback
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.clear = function (success, error) {
|
||||
exports.set(success, error, [0]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the badge of the app icon.
|
||||
*
|
||||
* @param [ Function ] success Success callback
|
||||
* @param [ Function ] error Error callback
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.get = function (success, error) {
|
||||
var badge = localStorage[BADGE_KEY];
|
||||
|
||||
success(badge || 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the badge of the app icon.
|
||||
*
|
||||
* @param [ Function ] success Success callback
|
||||
* @param [ Function ] error Error callback
|
||||
* @param [ Int ] badge The badge number
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.set = function (success, error, args) {
|
||||
var badge = args[0];
|
||||
|
||||
exports.saveBadge(badge);
|
||||
exports.favico.badge(badge);
|
||||
|
||||
success(badge);
|
||||
};
|
||||
|
||||
/**
|
||||
* Save the badge config.
|
||||
*
|
||||
* @param [ Function ] success Success callback
|
||||
* @param [ Function ] error Error callback
|
||||
* @param [ Int ] config The config map
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.save = function (success, error, args) {
|
||||
var config = args[0] || null,
|
||||
json = JSON.stringify(config);
|
||||
|
||||
localStorage[CONFIG_KEY] = json;
|
||||
};
|
||||
|
||||
/**
|
||||
* Load the badge config.
|
||||
*
|
||||
* @param [ Function ] success Success callback
|
||||
* @param [ Function ] error Error callback
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.load = function (success, error) {
|
||||
var json = localStorage[CONFIG_KEY],
|
||||
config = JSON.parse(json || null);
|
||||
|
||||
success(config);
|
||||
};
|
||||
|
||||
/**
|
||||
* Persist the badge of the app icon so that `getBadge` is able to return the
|
||||
* badge number back to the client.
|
||||
*
|
||||
* @param [ Int ] badge The badge number
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.saveBadge = function (badge) {
|
||||
localStorage[BADGE_KEY] = badge;
|
||||
};
|
||||
|
||||
cordova.commandProxy.add('Badge', exports);
|
||||
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@ -1,281 +0,0 @@
|
||||
cordova.define("cordova-plugin-badge.Badge", function(require, exports, module) { /*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apache License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var exec = require('cordova/exec'),
|
||||
channel = require('cordova/channel'),
|
||||
ua = navigator.userAgent.toLowerCase(),
|
||||
isIOS = ua.indexOf('ipad') > -1 || ua.indexOf('iphone') > -1,
|
||||
isMac = ua.indexOf('macintosh') > -1,
|
||||
isWin = window.Windows !== undefined,
|
||||
isAndroid = !isWin && ua.indexOf('android') > -1,
|
||||
isWinPC = isWin && Windows.System.Profile.AnalyticsInfo.versionInfo.deviceFamily.includes('Desktop'),
|
||||
isDesktop = isMac || isWinPC;
|
||||
|
||||
// Default settings
|
||||
exports._config = { indicator: 'badge', autoClear: false };
|
||||
|
||||
/**
|
||||
* Clears the badge number.
|
||||
*
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.clear = function (callback, scope) {
|
||||
this.exec('clear', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the badge number.
|
||||
*
|
||||
* @param [ Int ] badge The new badge number.
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.set = function (badge, callback, scope) {
|
||||
var args = [parseInt(badge) || 0];
|
||||
|
||||
this.requestPermission(function (granted) {
|
||||
if (granted) {
|
||||
this.exec('set', args, callback, scope);
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the badge of the app icon.
|
||||
*
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.get = function (callback, scope) {
|
||||
this.exec('get', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Increases the badge number.
|
||||
*
|
||||
* @param [ Int ] count Number to add to the badge number.
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.increase = function (count, callback, scope) {
|
||||
this.get(function (badge) {
|
||||
this.set(badge + (count || 1), callback, scope);
|
||||
}, this);
|
||||
};
|
||||
|
||||
/**
|
||||
* Decreases the badge number.
|
||||
*
|
||||
* @param [ Int ] count Number to substract to the badge number.
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.decrease = function (count, callback, scope) {
|
||||
this.get(function (badge) {
|
||||
this.set(Math.max(0, badge - (count || 1)), callback, scope);
|
||||
}, this);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check support to show badges.
|
||||
*
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.isSupported = function (callback, scope) {
|
||||
if (isAndroid) {
|
||||
this.exec('check', null, callback, scope);
|
||||
} else {
|
||||
this.createCallbackFn(callback, scope)(true);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Check permission to show badges.
|
||||
*
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.hasPermission = function (callback, scope) {
|
||||
if (isIOS) {
|
||||
this.exec('check', null, callback, scope);
|
||||
} else {
|
||||
this.createCallbackFn(callback, scope)(true);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Request permission to show badges.
|
||||
*
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.requestPermission = function (callback, scope) {
|
||||
if (isIOS) {
|
||||
this.exec('request', null, callback, scope);
|
||||
} else {
|
||||
this.createCallbackFn(callback, scope)(true);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Configures the plugin's platform options.
|
||||
*
|
||||
* @param [ Hash ] object Optional config settings.
|
||||
*
|
||||
* @return [ Hash ] The merged config settings.
|
||||
*/
|
||||
exports.configure = function (config) {
|
||||
this.mergeConfig(config);
|
||||
this.exec('save', this._config);
|
||||
|
||||
return this._config;
|
||||
};
|
||||
|
||||
/**
|
||||
* Merge the config values with the current ones.
|
||||
*
|
||||
* @param [ Hash ] object Optional config settings.
|
||||
*
|
||||
* @return [ Hash ] The merged config settings.
|
||||
*/
|
||||
exports.mergeConfig = function (config) {
|
||||
return Object.assign(this._config, config);
|
||||
};
|
||||
|
||||
/**
|
||||
* Create callback, which will be executed within a specific scope.
|
||||
*
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Function ] The new callback function
|
||||
*/
|
||||
exports.createCallbackFn = function (callbackFn, scope) {
|
||||
if (typeof callbackFn != 'function')
|
||||
return;
|
||||
|
||||
return function () {
|
||||
callbackFn.apply(scope || this, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear the badge if autoClear is on and the indicator type is badge.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.clearIf = function () {
|
||||
if (this._config.autoClear && this._config.indicator == 'badge') {
|
||||
this.clear();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Execute the native counterpart.
|
||||
*
|
||||
* @param [ String ] action The name of the action to execute.
|
||||
* @param [ Array ] args Array of arguments to pass with.
|
||||
* @param [ Function ] callback The callback function to be execute later.
|
||||
* @param [ Function ] scope Optional scope for the callback function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.exec = function (action, args, callback, scope) {
|
||||
var fn = this.createCallbackFn(callback, scope),
|
||||
params = [];
|
||||
|
||||
if (Array.isArray(args)) {
|
||||
params = args;
|
||||
} else if (args) {
|
||||
params.push(args);
|
||||
}
|
||||
|
||||
exec(fn, null, 'Badge', action, params);
|
||||
};
|
||||
|
||||
// Clear badge on app start if autoClear is set to true
|
||||
channel.onCordovaReady.subscribe(function () {
|
||||
exports.exec('load', null, function (config) {
|
||||
this.mergeConfig(config);
|
||||
this.clearIf();
|
||||
}, exports);
|
||||
});
|
||||
|
||||
// Clear badge on app resume if autoClear is set to true
|
||||
channel.onResume.subscribe(function () {
|
||||
exports.clearIf();
|
||||
});
|
||||
|
||||
// Clear badge on app resume if autoClear is set to true
|
||||
channel.onActivated.subscribe(function () {
|
||||
exports.clearIf();
|
||||
});
|
||||
|
||||
if (isDesktop) {
|
||||
// Clear badge on app resume if autoClear is set to true
|
||||
document.addEventListener('visibilitychange', function () {
|
||||
if (!document.hidden) { exports.clearIf(); }
|
||||
}, false);
|
||||
|
||||
// Clear badge on app resume if autoClear is set to true
|
||||
window.addEventListener('focus', function () {
|
||||
exports.clearIf();
|
||||
}, false);
|
||||
}
|
||||
|
||||
// Polyfill for Object.assign
|
||||
if (typeof Object.assign != 'function') {
|
||||
Object.assign = function(target) {
|
||||
'use strict';
|
||||
if (target == null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
target = Object(target);
|
||||
for (var index = 1; index < arguments.length; index++) {
|
||||
var source = arguments[index];
|
||||
if (source != null) {
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
@ -1,304 +0,0 @@
|
||||
cordova.define("cordova-plugin-calendar.Calendar", function(require, exports, module) { "use strict";
|
||||
function Calendar() {
|
||||
}
|
||||
|
||||
Calendar.prototype.getCreateCalendarOptions = function () {
|
||||
return {
|
||||
calendarName: null,
|
||||
calendarColor: null // optional, the OS will choose one if left empty, example: pass "#FF0000" for red
|
||||
};
|
||||
};
|
||||
|
||||
Calendar.prototype.hasReadPermission = function (successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "hasReadPermission", []);
|
||||
};
|
||||
|
||||
Calendar.prototype.requestReadPermission = function (successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "requestReadPermission", []);
|
||||
};
|
||||
|
||||
Calendar.prototype.hasWritePermission = function (successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "hasWritePermission", []);
|
||||
};
|
||||
|
||||
Calendar.prototype.requestWritePermission = function (successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "requestWritePermission", []);
|
||||
};
|
||||
|
||||
Calendar.prototype.hasReadWritePermission = function (successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "hasReadWritePermission", []);
|
||||
};
|
||||
|
||||
Calendar.prototype.requestReadWritePermission = function (successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "requestReadWritePermission", []);
|
||||
};
|
||||
|
||||
Calendar.prototype.createCalendar = function (calendarNameOrOptionsObject, successCallback, errorCallback) {
|
||||
var options;
|
||||
if (typeof calendarNameOrOptionsObject == "string") {
|
||||
options = {
|
||||
"calendarName": calendarNameOrOptionsObject
|
||||
};
|
||||
} else {
|
||||
options = calendarNameOrOptionsObject;
|
||||
}
|
||||
// merge passed options with defaults
|
||||
var mergedOptions = Calendar.prototype.getCreateCalendarOptions();
|
||||
for (var val in options) {
|
||||
if (options.hasOwnProperty(val)) {
|
||||
mergedOptions[val] = options[val];
|
||||
}
|
||||
}
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "createCalendar", [mergedOptions]);
|
||||
};
|
||||
|
||||
Calendar.prototype.deleteCalendar = function (calendarName, successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteCalendar", [{
|
||||
"calendarName": calendarName
|
||||
}]);
|
||||
};
|
||||
|
||||
Calendar.prototype.openCalendar = function (date, successCallback, errorCallback) {
|
||||
// default: today
|
||||
if (!(date instanceof Date)) {
|
||||
date = new Date();
|
||||
}
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "openCalendar", [{
|
||||
"date": date.getTime()
|
||||
}]);
|
||||
};
|
||||
|
||||
Calendar.prototype.getCalendarOptions = function () {
|
||||
return {
|
||||
firstReminderMinutes: 60,
|
||||
secondReminderMinutes: null,
|
||||
recurrence: null, // options are: 'daily', 'weekly', 'monthly', 'yearly'
|
||||
recurrenceInterval: 1, // only used when recurrence is set
|
||||
recurrenceWeekstart: "MO",
|
||||
recurrenceByDay: null,
|
||||
recurrenceByMonthDay: null,
|
||||
recurrenceEndDate: null,
|
||||
recurrenceCount: null,
|
||||
calendarName: null,
|
||||
calendarId: null,
|
||||
url: null
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* This method can be used if you want more control over the event details.
|
||||
* Pass in an options object which you can easily override as follow:
|
||||
* var options = window.plugins.calendar.getCalendarOptions();
|
||||
* options.firstReminderMinutes = 150;
|
||||
*/
|
||||
Calendar.prototype.createEventWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
|
||||
if (!(startDate instanceof Date && endDate instanceof Date)) {
|
||||
errorCallback("startDate and endDate must be JavaScript Date Objects");
|
||||
return;
|
||||
}
|
||||
|
||||
// merge passed options with defaults
|
||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
||||
for (var val in options) {
|
||||
if (options.hasOwnProperty(val)) {
|
||||
mergedOptions[val] = options[val];
|
||||
}
|
||||
}
|
||||
if (options.recurrenceEndDate != null) {
|
||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
||||
}
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "createEventWithOptions", [{
|
||||
"title": title,
|
||||
"location": location,
|
||||
"notes": notes,
|
||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
||||
"options": mergedOptions
|
||||
}]);
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated use createEventWithOptions instead
|
||||
*/
|
||||
Calendar.prototype.createEventInNamedCalendar = function (title, location, notes, startDate, endDate, calendarName, successCallback, errorCallback) {
|
||||
Calendar.prototype.createEventWithOptions(title, location, notes, startDate, endDate, {calendarName:calendarName}, successCallback, errorCallback);
|
||||
};
|
||||
|
||||
Calendar.prototype.createEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
||||
Calendar.prototype.createEventWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
|
||||
};
|
||||
|
||||
Calendar.prototype.createEventInteractively = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
||||
Calendar.prototype.createEventInteractivelyWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
|
||||
};
|
||||
|
||||
Calendar.prototype.createEventInteractivelyWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
|
||||
// merge passed options with defaults
|
||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
||||
for (var val in options) {
|
||||
if (options.hasOwnProperty(val)) {
|
||||
mergedOptions[val] = options[val];
|
||||
}
|
||||
}
|
||||
if (options.recurrenceEndDate != null) {
|
||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
||||
}
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "createEventInteractively", [{
|
||||
"title": title,
|
||||
"location": location,
|
||||
"notes": notes,
|
||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
||||
"options": mergedOptions
|
||||
}])
|
||||
};
|
||||
|
||||
Calendar.prototype.findEventWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
|
||||
// merge passed options with defaults
|
||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
||||
for (var val in options) {
|
||||
if (options.hasOwnProperty(val)) {
|
||||
mergedOptions[val] = options[val];
|
||||
}
|
||||
}
|
||||
if (options.recurrenceEndDate != null) {
|
||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
||||
}
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "findEventWithOptions", [{
|
||||
"title": title,
|
||||
"location": location,
|
||||
"notes": notes,
|
||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
||||
"options": mergedOptions
|
||||
}])
|
||||
};
|
||||
|
||||
Calendar.prototype.findEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
||||
Calendar.prototype.findEventWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
|
||||
};
|
||||
|
||||
Calendar.prototype.findAllEventsInNamedCalendar = function (calendarName, successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "findAllEventsInNamedCalendar", [{
|
||||
"calendarName": calendarName
|
||||
}]);
|
||||
};
|
||||
|
||||
Calendar.prototype.deleteEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
|
||||
if (!(startDate instanceof Date && endDate instanceof Date)) {
|
||||
errorCallback("startDate and endDate must be JavaScript Date Objects");
|
||||
}
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEvent", [{
|
||||
"title": title,
|
||||
"location": location,
|
||||
"notes": notes,
|
||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
||||
"endTime": endDate instanceof Date ? endDate.getTime() : null
|
||||
}])
|
||||
};
|
||||
|
||||
Calendar.prototype.deleteEventFromNamedCalendar = function (title, location, notes, startDate, endDate, calendarName, successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEventFromNamedCalendar", [{
|
||||
"title": title,
|
||||
"location": location,
|
||||
"notes": notes,
|
||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
||||
"calendarName": calendarName
|
||||
}])
|
||||
};
|
||||
|
||||
Calendar.prototype.deleteEventById = function (id, fromDate, successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEventById", [{
|
||||
"id": id,
|
||||
"fromTime": fromDate instanceof Date ? fromDate.getTime() : null
|
||||
}]);
|
||||
};
|
||||
|
||||
Calendar.prototype.modifyEventWithOptions = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, options, newOptions, successCallback, errorCallback) {
|
||||
if (!(newStartDate instanceof Date && newEndDate instanceof Date)) {
|
||||
errorCallback("newStartDate and newEndDate must be JavaScript Date Objects");
|
||||
return;
|
||||
}
|
||||
// merge passed options with defaults
|
||||
var mergedOptions = Calendar.prototype.getCalendarOptions();
|
||||
for (var val in options) {
|
||||
if (options.hasOwnProperty(val)) {
|
||||
mergedOptions[val] = options[val];
|
||||
}
|
||||
}
|
||||
if (options.recurrenceEndDate != null) {
|
||||
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
|
||||
}
|
||||
// and also merge passed newOptions with defaults
|
||||
var newMergedOptions = Calendar.prototype.getCalendarOptions();
|
||||
for (var val2 in newOptions) {
|
||||
if (newOptions.hasOwnProperty(val2)) {
|
||||
newMergedOptions[val2] = newOptions[val2];
|
||||
}
|
||||
}
|
||||
if (newOptions.recurrenceEndDate != null) {
|
||||
newMergedOptions.recurrenceEndTime = newOptions.recurrenceEndDate.getTime();
|
||||
}
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "modifyEventWithOptions", [{
|
||||
"title": title,
|
||||
"location": location,
|
||||
"notes": notes,
|
||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
||||
"endTime": endDate instanceof Date ? endDate.getTime() : null,
|
||||
"newTitle": newTitle,
|
||||
"newLocation": newLocation,
|
||||
"newNotes": newNotes,
|
||||
"newStartTime": newStartDate instanceof Date ? newStartDate.getTime() : null,
|
||||
"newEndTime": newEndDate instanceof Date ? newEndDate.getTime() : null,
|
||||
"options": mergedOptions,
|
||||
"newOptions": newMergedOptions
|
||||
}])
|
||||
};
|
||||
|
||||
Calendar.prototype.modifyEvent = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, successCallback, errorCallback) {
|
||||
Calendar.prototype.modifyEventWithOptions(title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, {}, successCallback, errorCallback);
|
||||
};
|
||||
|
||||
Calendar.prototype.modifyEventInNamedCalendar = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, calendarName, successCallback, errorCallback) {
|
||||
var options = Calendar.prototype.getCalendarOptions();
|
||||
options.calendarName = calendarName;
|
||||
Calendar.prototype.modifyEventWithOptions(title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, options, successCallback, errorCallback);
|
||||
};
|
||||
|
||||
Calendar.prototype.listEventsInRange = function (startDate, endDate, successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "listEventsInRange", [{
|
||||
"startTime": startDate instanceof Date ? startDate.getTime() : null,
|
||||
"endTime": endDate instanceof Date ? endDate.getTime() : null
|
||||
}])
|
||||
};
|
||||
|
||||
Calendar.prototype.listCalendars = function (successCallback, errorCallback) {
|
||||
cordova.exec(successCallback, errorCallback, "Calendar", "listCalendars", []);
|
||||
};
|
||||
|
||||
Calendar.prototype.parseEventDate = function (dateStr) {
|
||||
// Handle yyyyMMddTHHmmssZ iCalendar UTC format
|
||||
var icalRegExp = /\b(\d{4})(\d{2})(\d{2}T\d{2})(\d{2})(\d{2}Z)\b/;
|
||||
if (icalRegExp.test(dateStr))
|
||||
return new Date(String(dateStr).replace(icalRegExp, '$1-$2-$3:$4:$5'));
|
||||
|
||||
var spl;
|
||||
// Handle yyyy-MM-dd HH:mm:ss format returned by AbstractCalendarAccessor.java L66 and Calendar.m L378, and yyyyMMddTHHmmss iCalendar local format, and similar
|
||||
return (spl = /^\s*(\d{4})\D?(\d{2})\D?(\d{2})\D?(\d{2})\D?(\d{2})\D?(\d{2})\s*$/.exec(dateStr))
|
||||
&& new Date(spl[1], spl[2] - 1, spl[3], spl[4], spl[5], spl[6])
|
||||
|| new Date(dateStr);
|
||||
};
|
||||
|
||||
Calendar.install = function () {
|
||||
if (!window.plugins) {
|
||||
window.plugins = {};
|
||||
}
|
||||
|
||||
window.plugins.calendar = new Calendar();
|
||||
return window.plugins.calendar;
|
||||
};
|
||||
|
||||
cordova.addConstructor(Calendar.install);
|
||||
|
||||
});
|
||||
@ -1,108 +0,0 @@
|
||||
cordova.define("cordova-plugin-keyboard.keyboard", function(require, exports, module) { /*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
var argscheck = require('cordova/argscheck'),
|
||||
utils = require('cordova/utils'),
|
||||
exec = require('cordova/exec');
|
||||
|
||||
var Keyboard = function() {
|
||||
};
|
||||
|
||||
Keyboard.shrinkView = function(shrink, success) {
|
||||
if (shrink !== null && shrink !== undefined) {
|
||||
exec(success, null, "Keyboard", "shrinkView", [shrink]);
|
||||
} else {
|
||||
exec(success, null, "Keyboard", "shrinkView", []);
|
||||
}
|
||||
};
|
||||
|
||||
Keyboard.hideFormAccessoryBar = function(hide, success) {
|
||||
if (hide !== null && hide !== undefined){
|
||||
exec(success, null, "Keyboard", "hideFormAccessoryBar", [hide]);
|
||||
} else {
|
||||
exec(success, null, "Keyboard", "hideFormAccessoryBar", []);
|
||||
}
|
||||
};
|
||||
|
||||
Keyboard.disableScrollingInShrinkView = function(disable, success) {
|
||||
if (disable !== null && disable !== undefined) {
|
||||
exec(success, null, "Keyboard", "disableScrollingInShrinkView", [disable]);
|
||||
} else {
|
||||
exec(success, null, "Keyboard", "disableScrollingInShrinkView", []);
|
||||
}
|
||||
};
|
||||
|
||||
Keyboard.fireOnShow = function() {
|
||||
Keyboard.isVisible = true;
|
||||
cordova.fireWindowEvent('keyboardDidShow');
|
||||
|
||||
if(Keyboard.onshow) {
|
||||
Keyboard.onshow();
|
||||
}
|
||||
};
|
||||
|
||||
Keyboard.fireOnHide = function() {
|
||||
Keyboard.isVisible = false;
|
||||
cordova.fireWindowEvent('keyboardDidHide');
|
||||
|
||||
if(Keyboard.onhide) {
|
||||
Keyboard.onhide();
|
||||
}
|
||||
};
|
||||
|
||||
Keyboard.fireOnHiding = function() {
|
||||
// Automatic scroll to the top of the page
|
||||
// to prevent quirks when using position:fixed elements
|
||||
// inside WebKit browsers (iOS specifically).
|
||||
// See CB-6444 for context.
|
||||
if (Keyboard.automaticScrollToTopOnHiding) {
|
||||
document.body.scrollLeft = 0;
|
||||
}
|
||||
|
||||
cordova.fireWindowEvent('keyboardWillHide');
|
||||
|
||||
if(Keyboard.onhiding) {
|
||||
Keyboard.onhiding();
|
||||
}
|
||||
};
|
||||
|
||||
Keyboard.fireOnShowing = function() {
|
||||
cordova.fireWindowEvent('keyboardWillShow');
|
||||
|
||||
if(Keyboard.onshowing) {
|
||||
Keyboard.onshowing();
|
||||
}
|
||||
};
|
||||
|
||||
Keyboard.show = function() {
|
||||
exec(null, null, "Keyboard", "show", []);
|
||||
};
|
||||
|
||||
Keyboard.hide = function() {
|
||||
exec(null, null, "Keyboard", "hide", []);
|
||||
};
|
||||
|
||||
Keyboard.isVisible = false;
|
||||
Keyboard.automaticScrollToTopOnHiding = false;
|
||||
|
||||
module.exports = Keyboard;
|
||||
|
||||
});
|
||||
@ -1,416 +0,0 @@
|
||||
cordova.define("cordova-plugin-local-notification.LocalNotification.Core", function(require, exports, module) { /*
|
||||
* Apache 2.0 License
|
||||
*
|
||||
* Copyright (c) Sebastian Katzer 2017
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apache License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var exec = require('cordova/exec');
|
||||
|
||||
/**
|
||||
* Check permission to show notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.hasPermission = function (callback, scope) {
|
||||
var fn = this.createCallbackFn(callback, scope);
|
||||
|
||||
exec(fn, null, 'LocalNotification', 'check', []);
|
||||
};
|
||||
|
||||
/**
|
||||
* Request permission to show notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.requestPermission = function (callback, scope) {
|
||||
var fn = this.createCallbackFn(callback, scope);
|
||||
|
||||
exec(fn, null, 'LocalNotification', 'request', []);
|
||||
};
|
||||
|
||||
/**
|
||||
* Schedule notifications.
|
||||
*
|
||||
* @param [ Array ] notifications The notifications to schedule.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
* @param [ Object ] args Optional flags how to schedule.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.schedule = function (msgs, callback, scope, args) {
|
||||
var fn = function (granted) {
|
||||
var toasts = this.toArray(msgs);
|
||||
|
||||
if (!granted && callback) {
|
||||
callback.call(scope || this, false);
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0, len = toasts.length; i < len; i++) {
|
||||
var toast = toasts[i];
|
||||
this.mergeWithDefaults(toast);
|
||||
this.convertProperties(toast);
|
||||
}
|
||||
|
||||
this.exec('schedule', toasts, callback, scope);
|
||||
};
|
||||
|
||||
if (args && args.skipPermission) {
|
||||
fn.call(this, true);
|
||||
} else {
|
||||
this.requestPermission(fn, this);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Schedule notifications.
|
||||
*
|
||||
* @param [ Array ] notifications The notifications to schedule.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
* @param [ Object ] args Optional flags how to schedule.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.update = function (msgs, callback, scope, args) {
|
||||
var fn = function(granted) {
|
||||
var toasts = this.toArray(msgs);
|
||||
|
||||
if (!granted && callback) {
|
||||
callback.call(scope || this, false);
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0, len = toasts.length; i < len; i++) {
|
||||
this.convertProperties(toasts[i]);
|
||||
}
|
||||
|
||||
this.exec('update', toasts, callback, scope);
|
||||
};
|
||||
|
||||
if (args && args.skipPermission) {
|
||||
fn.call(this, true);
|
||||
} else {
|
||||
this.requestPermission(fn, this);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear the specified notifications by id.
|
||||
*
|
||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.clear = function (ids, callback, scope) {
|
||||
ids = this.toArray(ids);
|
||||
ids = this.convertIds(ids);
|
||||
|
||||
this.exec('clear', ids, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear all triggered notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.clearAll = function (callback, scope) {
|
||||
this.exec('clearAll', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear the specified notifications by id.
|
||||
*
|
||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.cancel = function (ids, callback, scope) {
|
||||
ids = this.toArray(ids);
|
||||
ids = this.convertIds(ids);
|
||||
|
||||
this.exec('cancel', ids, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Cancel all scheduled notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.cancelAll = function (callback, scope) {
|
||||
this.exec('cancelAll', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a notification is present.
|
||||
*
|
||||
* @param [ Int ] id The ID of the notification.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.isPresent = function (id, callback, scope) {
|
||||
var fn = this.createCallbackFn(callback, scope);
|
||||
|
||||
this.getType(id, function (type) {
|
||||
fn(type != 'unknown');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a notification has a given type.
|
||||
*
|
||||
* @param [ Int ] id The ID of the notification.
|
||||
* @param [ String ] type The type of the notification.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.hasType = function (id, type, callback, scope) {
|
||||
var fn = this.createCallbackFn(callback, scope);
|
||||
|
||||
this.getType(id, function (type2) {
|
||||
fn(type == type2);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the type (triggered, scheduled) for the notification.
|
||||
*
|
||||
* @param [ Int ] id The ID of the notification.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getType = function (id, callback, scope) {
|
||||
this.exec('type', id, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all notification ids.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getIds = function (callback, scope) {
|
||||
this.exec('ids', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all scheduled notification IDs.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getScheduledIds = function (callback, scope) {
|
||||
this.exec('scheduledIds', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all triggered notification IDs.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getTriggeredIds = function (callback, scope) {
|
||||
this.exec('triggeredIds', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of local notifications specified by id.
|
||||
* If called without IDs, all notification will be returned.
|
||||
*
|
||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.get = function () {
|
||||
var args = Array.apply(null, arguments);
|
||||
|
||||
if (typeof args[0] == 'function') {
|
||||
args.unshift([]);
|
||||
}
|
||||
|
||||
var ids = args[0],
|
||||
callback = args[1],
|
||||
scope = args[2];
|
||||
|
||||
if (!Array.isArray(ids)) {
|
||||
this.exec('notification', Number(ids), callback, scope);
|
||||
return;
|
||||
}
|
||||
|
||||
ids = this.convertIds(ids);
|
||||
|
||||
this.exec('notifications', ids, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List for all notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getAll = function (callback, scope) {
|
||||
this.exec('notifications', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all scheduled notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*/
|
||||
exports.getScheduled = function (callback, scope) {
|
||||
this.exec('scheduledNotifications', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all triggered notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*/
|
||||
exports.getTriggered = function (callback, scope) {
|
||||
this.exec('triggeredNotifications', null, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Register an group of actions by id.
|
||||
*
|
||||
* @param [ String ] id The Id of the group.
|
||||
* @param [ Array] actions The action config settings.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.addActionGroup = function (id, actions, callback, scope) {
|
||||
var config = { actionGroupId: id, actions: actions };
|
||||
this.exec('actions', config, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* The (platform specific) default settings.
|
||||
*
|
||||
* @return [ Object ]
|
||||
*/
|
||||
exports.getDefaults = function () {
|
||||
var map = Object.assign({}, this._defaults);
|
||||
|
||||
for (var key in map) {
|
||||
if (Array.isArray(map[key])) {
|
||||
map[key] = Array.from(map[key]);
|
||||
} else
|
||||
if (Object.prototype.isPrototypeOf(map[key])) {
|
||||
map[key] = Object.assign({}, map[key]);
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
};
|
||||
|
||||
/**
|
||||
* Overwrite default settings.
|
||||
*
|
||||
* @param [ Object ] newDefaults New default values.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.setDefaults = function (newDefaults) {
|
||||
Object.assign(this._defaults, newDefaults);
|
||||
};
|
||||
|
||||
/**
|
||||
* Register callback for given event.
|
||||
*
|
||||
* @param [ String ] event The name of the event.
|
||||
* @param [ Function ] callback The function to be exec as callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.on = function (event, callback, scope) {
|
||||
|
||||
if (typeof callback !== "function")
|
||||
return;
|
||||
|
||||
if (!this._listener[event]) {
|
||||
this._listener[event] = [];
|
||||
}
|
||||
|
||||
var item = [callback, scope || window];
|
||||
|
||||
this._listener[event].push(item);
|
||||
};
|
||||
|
||||
/**
|
||||
* Unregister callback for given event.
|
||||
*
|
||||
* @param [ String ] event The name of the event.
|
||||
* @param [ Function ] callback The function to be exec as callback.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.un = function (event, callback) {
|
||||
var listener = this._listener[event];
|
||||
|
||||
if (!listener)
|
||||
return;
|
||||
|
||||
for (var i = 0; i < listener.length; i++) {
|
||||
var fn = listener[i][0];
|
||||
|
||||
if (fn == callback) {
|
||||
listener.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
@ -1,553 +0,0 @@
|
||||
cordova.define("cordova-plugin-local-notification.LocalNotification.Util", function(require, exports, module) { /*
|
||||
* Apache 2.0 License
|
||||
*
|
||||
* Copyright (c) Sebastian Katzer 2017
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apache License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var exec = require('cordova/exec'),
|
||||
channel = require('cordova/channel');
|
||||
|
||||
// Default values
|
||||
exports._defaults = {
|
||||
actionGroupId : null,
|
||||
actions : [],
|
||||
attachments : [],
|
||||
autoClear : true,
|
||||
badge : null,
|
||||
channel : null,
|
||||
color : null,
|
||||
data : null,
|
||||
defaults : 0,
|
||||
foreground : false,
|
||||
group : null,
|
||||
groupSummary : false,
|
||||
icon : null,
|
||||
id : 0,
|
||||
launch : true,
|
||||
led : true,
|
||||
lockscreen : true,
|
||||
mediaSession : null,
|
||||
number : 0,
|
||||
priority : 0,
|
||||
progressBar : false,
|
||||
showWhen : true,
|
||||
silent : false,
|
||||
smallIcon : 'res://icon',
|
||||
sound : true,
|
||||
sticky : false,
|
||||
summary : null,
|
||||
text : '',
|
||||
title : '',
|
||||
trigger : { type : 'calendar' },
|
||||
vibrate : false,
|
||||
wakeup : true
|
||||
};
|
||||
|
||||
// Listener
|
||||
exports._listener = {};
|
||||
|
||||
/**
|
||||
* Merge custom properties with the default values.
|
||||
*
|
||||
* @param [ Object ] options Set of custom values.
|
||||
*
|
||||
* @retrun [ Object ]
|
||||
*/
|
||||
exports.mergeWithDefaults = function (options) {
|
||||
var values = this.getDefaults();
|
||||
|
||||
if (values.hasOwnProperty('sticky')) {
|
||||
options.sticky = this.getValueFor(options, 'sticky', 'ongoing');
|
||||
}
|
||||
|
||||
if (options.sticky && options.autoClear !== true) {
|
||||
options.autoClear = false;
|
||||
}
|
||||
|
||||
Object.assign(values, options);
|
||||
|
||||
for (var key in values) {
|
||||
if (values[key] !== null) {
|
||||
options[key] = values[key];
|
||||
} else {
|
||||
delete options[key];
|
||||
}
|
||||
|
||||
if (!this._defaults.hasOwnProperty(key)) {
|
||||
console.warn('Unknown property: ' + key);
|
||||
}
|
||||
}
|
||||
|
||||
options.meta = {
|
||||
plugin: 'cordova-plugin-local-notification',
|
||||
version: '0.9-beta.2'
|
||||
};
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert the passed values to their required type.
|
||||
*
|
||||
* @param [ Object ] options Properties to convert for.
|
||||
*
|
||||
* @return [ Object ] The converted property list
|
||||
*/
|
||||
exports.convertProperties = function (options) {
|
||||
var parseToInt = function (prop, options) {
|
||||
if (isNaN(options[prop])) {
|
||||
console.warn(prop + ' is not a number: ' + options[prop]);
|
||||
return this._defaults[prop];
|
||||
} else {
|
||||
return Number(options[prop]);
|
||||
}
|
||||
};
|
||||
|
||||
if (options.id) {
|
||||
options.id = parseToInt('id', options);
|
||||
}
|
||||
|
||||
if (options.title) {
|
||||
options.title = options.title.toString();
|
||||
}
|
||||
|
||||
if (options.badge) {
|
||||
options.badge = parseToInt('badge', options);
|
||||
}
|
||||
|
||||
if (options.priority) {
|
||||
options.priority = parseToInt('priority', options);
|
||||
}
|
||||
|
||||
if (options.foreground === true) {
|
||||
options.priority = Math.max(options.priority, 1);
|
||||
}
|
||||
|
||||
if (options.foreground === false) {
|
||||
options.priority = Math.min(options.priority, 0);
|
||||
}
|
||||
|
||||
if (options.defaults) {
|
||||
options.defaults = parseToInt('defaults', options);
|
||||
}
|
||||
|
||||
if (options.smallIcon && !options.smallIcon.match(/^res:/)) {
|
||||
console.warn('Property "smallIcon" must be of kind res://...');
|
||||
}
|
||||
|
||||
options.data = JSON.stringify(options.data);
|
||||
|
||||
this.convertTrigger(options);
|
||||
this.convertActions(options);
|
||||
this.convertProgressBar(options);
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert the passed values to their required type, modifying them
|
||||
* directly for Android and passing the converted list back for iOS.
|
||||
*
|
||||
* @param [ Map ] options Set of custom values.
|
||||
*
|
||||
* @return [ Map ] Interaction object with category & actions.
|
||||
*/
|
||||
exports.convertActions = function (options) {
|
||||
var actions = [];
|
||||
|
||||
if (!options.actions)
|
||||
return null;
|
||||
|
||||
for (var i = 0, len = options.actions.length; i < len; i++) {
|
||||
var action = options.actions[i];
|
||||
|
||||
if (!action.id) {
|
||||
console.warn('Action with title ' + action.title + ' ' +
|
||||
'has no id and will not be added.');
|
||||
continue;
|
||||
}
|
||||
|
||||
action.id = action.id.toString();
|
||||
|
||||
actions.push(action);
|
||||
}
|
||||
|
||||
options.actions = actions;
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert the passed values for the trigger to their required type.
|
||||
*
|
||||
* @param [ Map ] options Set of custom values.
|
||||
*
|
||||
* @return [ Map ] Interaction object with trigger spec.
|
||||
*/
|
||||
exports.convertTrigger = function (options) {
|
||||
var trigger = options.trigger || {},
|
||||
date = this.getValueFor(trigger, 'at', 'firstAt', 'date');
|
||||
|
||||
var dateToNum = function (date) {
|
||||
var num = typeof date == 'object' ? date.getTime() : date;
|
||||
return Math.round(num);
|
||||
};
|
||||
|
||||
if (!options.trigger)
|
||||
return;
|
||||
|
||||
if (!trigger.type) {
|
||||
trigger.type = trigger.center ? 'location' : 'calendar';
|
||||
}
|
||||
|
||||
var isCal = trigger.type == 'calendar';
|
||||
|
||||
if (isCal && !date) {
|
||||
date = this.getValueFor(options, 'at', 'firstAt', 'date');
|
||||
}
|
||||
|
||||
if (isCal && !trigger.every && options.every) {
|
||||
trigger.every = options.every;
|
||||
}
|
||||
|
||||
if (isCal && (trigger.in || trigger.every)) {
|
||||
date = null;
|
||||
}
|
||||
|
||||
if (isCal && date) {
|
||||
trigger.at = dateToNum(date);
|
||||
}
|
||||
|
||||
if (isCal && trigger.firstAt) {
|
||||
trigger.firstAt = dateToNum(trigger.firstAt);
|
||||
}
|
||||
|
||||
if (isCal && trigger.before) {
|
||||
trigger.before = dateToNum(trigger.before);
|
||||
}
|
||||
|
||||
if (isCal && trigger.after) {
|
||||
trigger.after = dateToNum(trigger.after);
|
||||
}
|
||||
|
||||
if (!trigger.count && device.platform == 'windows') {
|
||||
trigger.count = trigger.every ? 5 : 1;
|
||||
}
|
||||
|
||||
if (trigger.count && device.platform == 'iOS') {
|
||||
console.warn('trigger: { count: } is not supported on iOS.');
|
||||
}
|
||||
|
||||
if (!isCal) {
|
||||
trigger.notifyOnEntry = !!trigger.notifyOnEntry;
|
||||
trigger.notifyOnExit = trigger.notifyOnExit === true;
|
||||
trigger.radius = trigger.radius || 5;
|
||||
trigger.single = !!trigger.single;
|
||||
}
|
||||
|
||||
if (!isCal || trigger.at) {
|
||||
delete trigger.every;
|
||||
}
|
||||
|
||||
delete options.every;
|
||||
delete options.at;
|
||||
delete options.firstAt;
|
||||
delete options.date;
|
||||
|
||||
options.trigger = trigger;
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert the passed values for the progressBar to their required type.
|
||||
*
|
||||
* @param [ Map ] options Set of custom values.
|
||||
*
|
||||
* @return [ Map ] Interaction object with trigger spec.
|
||||
*/
|
||||
exports.convertProgressBar = function (options) {
|
||||
var isAndroid = device.platform == 'Android',
|
||||
cfg = options.progressBar;
|
||||
|
||||
if (cfg === undefined)
|
||||
return;
|
||||
|
||||
if (typeof cfg === 'boolean') {
|
||||
cfg = options.progressBar = { enabled: cfg };
|
||||
}
|
||||
|
||||
if (typeof cfg.enabled !== 'boolean') {
|
||||
cfg.enabled = !!(cfg.value || cfg.maxValue || cfg.indeterminate !== null);
|
||||
}
|
||||
|
||||
cfg.value = cfg.value || 0;
|
||||
|
||||
if (isAndroid) {
|
||||
cfg.maxValue = cfg.maxValue || 100;
|
||||
cfg.indeterminate = !!cfg.indeterminate;
|
||||
}
|
||||
|
||||
cfg.enabled = !!cfg.enabled;
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a callback function to get executed within a specific scope.
|
||||
*
|
||||
* @param [ Function ] fn The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Function ]
|
||||
*/
|
||||
exports.createCallbackFn = function (fn, scope) {
|
||||
|
||||
if (typeof fn != 'function')
|
||||
return;
|
||||
|
||||
return function () {
|
||||
fn.apply(scope || this, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert the IDs to numbers.
|
||||
*
|
||||
* @param [ Array ] ids
|
||||
*
|
||||
* @return [ Array<Number> ]
|
||||
*/
|
||||
exports.convertIds = function (ids) {
|
||||
var convertedIds = [];
|
||||
|
||||
for (var i = 0, len = ids.length; i < len; i++) {
|
||||
convertedIds.push(Number(ids[i]));
|
||||
}
|
||||
|
||||
return convertedIds;
|
||||
};
|
||||
|
||||
/**
|
||||
* First found value for the given keys.
|
||||
*
|
||||
* @param [ Object ] options Object with key-value properties.
|
||||
* @param [ *Array<String> ] keys List of keys.
|
||||
*
|
||||
* @return [ Object ]
|
||||
*/
|
||||
exports.getValueFor = function (options) {
|
||||
var keys = Array.apply(null, arguments).slice(1);
|
||||
|
||||
for (var i = 0, key = keys[i], len = keys.length; i < len; key = keys[++i]) {
|
||||
if (options.hasOwnProperty(key)) {
|
||||
return options[key];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert a value to an array.
|
||||
*
|
||||
* @param [ Object ] obj Any kind of object.
|
||||
*
|
||||
* @return [ Array ] An array with the object as first item.
|
||||
*/
|
||||
exports.toArray = function (obj) {
|
||||
return Array.isArray(obj) ? Array.from(obj) : [obj];
|
||||
};
|
||||
|
||||
/**
|
||||
* Fire the event with given arguments.
|
||||
*
|
||||
* @param [ String ] event The event's name.
|
||||
* @param [ *Array] args The callback's arguments.
|
||||
*
|
||||
* @return [ Void]
|
||||
*/
|
||||
exports.fireEvent = function (event) {
|
||||
var args = Array.apply(null, arguments).slice(1),
|
||||
listener = this._listener[event];
|
||||
|
||||
if (!listener)
|
||||
return;
|
||||
|
||||
if (args[0] && typeof args[0].data === 'string') {
|
||||
args[0].data = JSON.parse(args[0].data);
|
||||
}
|
||||
|
||||
for (var i = 0; i < listener.length; i++) {
|
||||
var fn = listener[i][0],
|
||||
scope = listener[i][1];
|
||||
|
||||
fn.apply(scope, args);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Execute the native counterpart.
|
||||
*
|
||||
* @param [ String ] action The name of the action.
|
||||
* @param [ Array ] args Array of arguments.
|
||||
* @param [ Function] callback The callback function.
|
||||
* @param [ Object ] scope The scope for the function.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.exec = function (action, args, callback, scope) {
|
||||
var fn = this.createCallbackFn(callback, scope),
|
||||
params = [];
|
||||
|
||||
if (Array.isArray(args)) {
|
||||
params = args;
|
||||
} else if (args) {
|
||||
params.push(args);
|
||||
}
|
||||
|
||||
exec(fn, null, 'LocalNotification', action, params);
|
||||
};
|
||||
|
||||
exports.setLaunchDetails = function () {
|
||||
exports.exec('launch', null, function (details) {
|
||||
if (details) {
|
||||
cordova.plugins.notification.local.launchDetails = details;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Called after 'deviceready' event
|
||||
channel.deviceready.subscribe(function () {
|
||||
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
|
||||
exports.exec('ready');
|
||||
}
|
||||
});
|
||||
|
||||
// Called before 'deviceready' event
|
||||
channel.onCordovaReady.subscribe(function () {
|
||||
channel.onCordovaInfoReady.subscribe(function () {
|
||||
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
|
||||
exports.setLaunchDetails();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Polyfill for Object.assign
|
||||
if (typeof Object.assign != 'function') {
|
||||
Object.assign = function(target) {
|
||||
'use strict';
|
||||
if (target == null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
target = Object(target);
|
||||
for (var index = 1; index < arguments.length; index++) {
|
||||
var source = arguments[index];
|
||||
if (source != null) {
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
// Production steps of ECMA-262, Edition 6, 22.1.2.1
|
||||
// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
|
||||
if (!Array.from) {
|
||||
Array.from = (function () {
|
||||
var toStr = Object.prototype.toString;
|
||||
var isCallable = function (fn) {
|
||||
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
|
||||
};
|
||||
var toInteger = function (value) {
|
||||
var number = Number(value);
|
||||
if (isNaN(number)) { return 0; }
|
||||
if (number === 0 || !isFinite(number)) { return number; }
|
||||
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
|
||||
};
|
||||
var maxSafeInteger = Math.pow(2, 53) - 1;
|
||||
var toLength = function (value) {
|
||||
var len = toInteger(value);
|
||||
return Math.min(Math.max(len, 0), maxSafeInteger);
|
||||
};
|
||||
|
||||
// The length property of the from method is 1.
|
||||
return function from(arrayLike/*, mapFn, thisArg */) {
|
||||
// 1. Let C be the this value.
|
||||
var C = this;
|
||||
|
||||
// 2. Let items be ToObject(arrayLike).
|
||||
var items = Object(arrayLike);
|
||||
|
||||
// 3. ReturnIfAbrupt(items).
|
||||
if (arrayLike == null) {
|
||||
throw new TypeError("Array.from requires an array-like object - not null or undefined");
|
||||
}
|
||||
|
||||
// 4. If mapfn is undefined, then let mapping be false.
|
||||
var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
|
||||
var T;
|
||||
if (typeof mapFn !== 'undefined') {
|
||||
// 5. else
|
||||
// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
|
||||
if (!isCallable(mapFn)) {
|
||||
throw new TypeError('Array.from: when provided, the second argument must be a function');
|
||||
}
|
||||
|
||||
// 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
if (arguments.length > 2) {
|
||||
T = arguments[2];
|
||||
}
|
||||
}
|
||||
|
||||
// 10. Let lenValue be Get(items, "length").
|
||||
// 11. Let len be ToLength(lenValue).
|
||||
var len = toLength(items.length);
|
||||
|
||||
// 13. If IsConstructor(C) is true, then
|
||||
// 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.
|
||||
// 14. a. Else, Let A be ArrayCreate(len).
|
||||
var A = isCallable(C) ? Object(new C(len)) : new Array(len);
|
||||
|
||||
// 16. Let k be 0.
|
||||
var k = 0;
|
||||
// 17. Repeat, while k < len… (also steps a - h)
|
||||
var kValue;
|
||||
while (k < len) {
|
||||
kValue = items[k];
|
||||
if (mapFn) {
|
||||
A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
|
||||
} else {
|
||||
A[k] = kValue;
|
||||
}
|
||||
k += 1;
|
||||
}
|
||||
// 18. Let putStatus be Put(A, "length", len, true).
|
||||
A.length = len;
|
||||
// 20. Return A.
|
||||
return A;
|
||||
};
|
||||
}());
|
||||
}
|
||||
|
||||
});
|
||||
@ -1,317 +0,0 @@
|
||||
cordova.define("cordova-plugin-local-notification.LocalNotification", function(require, exports, module) { /*
|
||||
* Apache 2.0 License
|
||||
*
|
||||
* Copyright (c) Sebastian Katzer 2017
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apache License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Request permission to show notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.hasPermission = function (callback, scope) {
|
||||
this.core.hasPermission(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Request permission to show notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.requestPermission = function (callback, scope) {
|
||||
this.core.requestPermission(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Schedule notifications.
|
||||
*
|
||||
* @param [ Array ] notifications The notifications to schedule.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
* @param [ Object ] args Optional flags how to schedule.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.schedule = function (notifications, callback, scope, args) {
|
||||
this.core.schedule(notifications, callback, scope, args);
|
||||
};
|
||||
|
||||
/**
|
||||
* Update notifications.
|
||||
*
|
||||
* @param [ Array ] notifications The notifications to schedule.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
* @param [ Object ] args Optional flags how to schedule.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.update = function (notifications, callback, scope, args) {
|
||||
this.core.update(notifications, callback, scope, args);
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear the specified notifications by id.
|
||||
*
|
||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.clear = function (ids, callback, scope) {
|
||||
this.core.clear(ids, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear all triggered notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.clearAll = function (callback, scope) {
|
||||
this.core.clearAll(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Cancel the specified notifications by id.
|
||||
*
|
||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.cancel = function (ids, callback, scope) {
|
||||
this.core.cancel(ids, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Cancel all scheduled notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.cancelAll = function (callback, scope) {
|
||||
this.core.cancelAll(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a notification is present.
|
||||
*
|
||||
* @param [ Int ] id The ID of the notification.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.isPresent = function (id, callback, scope) {
|
||||
this.core.isPresent(id, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a notification is scheduled.
|
||||
*
|
||||
* @param [ Int ] id The ID of the notification.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.isScheduled = function (id, callback, scope) {
|
||||
this.core.hasType(id, 'scheduled', callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a notification was triggered.
|
||||
*
|
||||
* @param [ Int ] id The ID of the notification.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.isTriggered = function (id, callback, scope) {
|
||||
this.core.hasType(id, 'triggered', callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the type (triggered, scheduled) for the notification.
|
||||
*
|
||||
* @param [ Int ] id The ID of the notification.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getType = function (id, callback, scope) {
|
||||
this.core.getType(id, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all notification ids.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getIds = function (callback, scope) {
|
||||
this.core.getIds(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all scheduled notification IDs.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getScheduledIds = function (callback, scope) {
|
||||
this.core.getScheduledIds(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all triggered notification IDs.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getTriggeredIds = function (callback, scope) {
|
||||
this.core.getTriggeredIds(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of local notifications specified by id.
|
||||
* If called without IDs, all notification will be returned.
|
||||
*
|
||||
* @param [ Array<Int> ] ids The IDs of the notifications.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.get = function (ids, callback, scope) {
|
||||
this.core.get(ids, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List for all notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.getAll = function (callback, scope) {
|
||||
this.core.getAll(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all scheduled notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*/
|
||||
exports.getScheduled = function (callback, scope) {
|
||||
this.core.getScheduled(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* List of all triggered notifications.
|
||||
*
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*/
|
||||
exports.getTriggered = function (callback, scope) {
|
||||
this.core.getTriggered(callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Register an group of actions by id.
|
||||
*
|
||||
* @param [ String ] id The Id of the group.
|
||||
* @param [ Array] actions The action config settings.
|
||||
* @param [ Function ] callback The function to be exec as the callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.addActionGroup = function (id, actions, callback, scope) {
|
||||
this.core.addActionGroup(id, actions, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* The (platform specific) default settings.
|
||||
*
|
||||
* @return [ Object ]
|
||||
*/
|
||||
exports.getDefaults = function () {
|
||||
return this.core.getDefaults();
|
||||
};
|
||||
|
||||
/**
|
||||
* Overwrite default settings.
|
||||
*
|
||||
* @param [ Object ] newDefaults New default values.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.setDefaults = function (defaults) {
|
||||
this.core.setDefaults(defaults);
|
||||
};
|
||||
|
||||
/**
|
||||
* Register callback for given event.
|
||||
*
|
||||
* @param [ String ] event The name of the event.
|
||||
* @param [ Function ] callback The function to be exec as callback.
|
||||
* @param [ Object ] scope The callback function's scope.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.on = function (event, callback, scope) {
|
||||
this.core.on(event, callback, scope);
|
||||
};
|
||||
|
||||
/**
|
||||
* Unregister callback for given event.
|
||||
*
|
||||
* @param [ String ] event The name of the event.
|
||||
* @param [ Function ] callback The function to be exec as callback.
|
||||
*
|
||||
* @return [ Void ]
|
||||
*/
|
||||
exports.un = function (event, callback) {
|
||||
this.core.un(event, callback);
|
||||
};
|
||||
|
||||
});
|
||||
@ -1,52 +0,0 @@
|
||||
cordova.define("cordova-plugin-statusbar.StatusBarProxy", function(require, exports, module) { /*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
function notSupported(win,fail) {
|
||||
//
|
||||
console.log('StatusBar is not supported');
|
||||
setTimeout(function(){
|
||||
if (win) {
|
||||
win();
|
||||
}
|
||||
// note that while it is not explicitly supported, it does not fail
|
||||
// this is really just here to allow developers to test their code in the browser
|
||||
// and if we fail, then their app might as well. -jm
|
||||
},0);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isVisible: false,
|
||||
styleBlackTranslucent:notSupported,
|
||||
styleDefault:notSupported,
|
||||
styleLightContent:notSupported,
|
||||
styleBlackOpaque:notSupported,
|
||||
overlaysWebView:notSupported,
|
||||
styleLightContect: notSupported,
|
||||
backgroundColorByName: notSupported,
|
||||
backgroundColorByHexString: notSupported,
|
||||
hide: notSupported,
|
||||
show: notSupported,
|
||||
_ready:notSupported
|
||||
};
|
||||
|
||||
require("cordova/exec/proxy").add("StatusBar", module.exports);
|
||||
|
||||
|
||||
});
|
||||
@ -1,115 +0,0 @@
|
||||
cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { /*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/* global cordova */
|
||||
|
||||
var exec = require('cordova/exec');
|
||||
|
||||
var namedColors = {
|
||||
"black": "#000000",
|
||||
"darkGray": "#A9A9A9",
|
||||
"lightGray": "#D3D3D3",
|
||||
"white": "#FFFFFF",
|
||||
"gray": "#808080",
|
||||
"red": "#FF0000",
|
||||
"green": "#00FF00",
|
||||
"blue": "#0000FF",
|
||||
"cyan": "#00FFFF",
|
||||
"yellow": "#FFFF00",
|
||||
"magenta": "#FF00FF",
|
||||
"orange": "#FFA500",
|
||||
"purple": "#800080",
|
||||
"brown": "#A52A2A"
|
||||
};
|
||||
|
||||
var StatusBar = {
|
||||
|
||||
isVisible: true,
|
||||
|
||||
overlaysWebView: function (doOverlay) {
|
||||
exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]);
|
||||
},
|
||||
|
||||
styleDefault: function () {
|
||||
// dark text ( to be used on a light background )
|
||||
exec(null, null, "StatusBar", "styleDefault", []);
|
||||
},
|
||||
|
||||
styleLightContent: function () {
|
||||
// light text ( to be used on a dark background )
|
||||
exec(null, null, "StatusBar", "styleLightContent", []);
|
||||
},
|
||||
|
||||
styleBlackTranslucent: function () {
|
||||
// #88000000 ? Apple says to use lightContent instead
|
||||
exec(null, null, "StatusBar", "styleBlackTranslucent", []);
|
||||
},
|
||||
|
||||
styleBlackOpaque: function () {
|
||||
// #FF000000 ? Apple says to use lightContent instead
|
||||
exec(null, null, "StatusBar", "styleBlackOpaque", []);
|
||||
},
|
||||
|
||||
backgroundColorByName: function (colorname) {
|
||||
return StatusBar.backgroundColorByHexString(namedColors[colorname]);
|
||||
},
|
||||
|
||||
backgroundColorByHexString: function (hexString) {
|
||||
if (hexString.charAt(0) !== "#") {
|
||||
hexString = "#" + hexString;
|
||||
}
|
||||
|
||||
if (hexString.length === 4) {
|
||||
var split = hexString.split("");
|
||||
hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3];
|
||||
}
|
||||
|
||||
exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]);
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
exec(null, null, "StatusBar", "hide", []);
|
||||
StatusBar.isVisible = false;
|
||||
},
|
||||
|
||||
show: function () {
|
||||
exec(null, null, "StatusBar", "show", []);
|
||||
StatusBar.isVisible = true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// prime it. setTimeout so that proxy gets time to init
|
||||
window.setTimeout(function () {
|
||||
exec(function (res) {
|
||||
if (typeof res == 'object') {
|
||||
if (res.type == 'tap') {
|
||||
cordova.fireWindowEvent('statusTap');
|
||||
}
|
||||
} else {
|
||||
StatusBar.isVisible = res;
|
||||
}
|
||||
}, null, "StatusBar", "_ready", []);
|
||||
}, 0);
|
||||
|
||||
module.exports = StatusBar;
|
||||
|
||||
});
|
||||
14
src/server/public/plugins/nl.madebymark.share/www/share.js
Normal file
14
src/server/public/plugins/nl.madebymark.share/www/share.js
Normal file
@ -0,0 +1,14 @@
|
||||
cordova.define("nl.madebymark.share.Share", function(require, exports, module) { module.exports = function(text,title,mimetype,success,error){
|
||||
if(typeof text !== "string") {
|
||||
text = "";
|
||||
}
|
||||
if(typeof title !== "string") {
|
||||
title = "Share";
|
||||
}
|
||||
if(typeof mimetype !== "string") {
|
||||
mimetype = "text/plain";
|
||||
}
|
||||
cordova.exec(success,error,"Share","share",[text,title,mimetype]);
|
||||
return true;
|
||||
};
|
||||
});
|
||||
@ -71,111 +71,114 @@ var initSqlJs = function (moduleConfig) {
|
||||
// meaning that all of it runs inside of this promise. If anything throws an exception, our promise will abort
|
||||
|
||||
var e;e||(e=typeof Module !== 'undefined' ? Module : {});null;
|
||||
e.onRuntimeInitialized=function(){function a(h,l){this.Pa=h;this.db=l;this.Oa=1;this.gb=[]}function b(h){this.filename="dbfile_"+(4294967295*Math.random()>>>0);if(null!=h){var l=this.filename,r=l?k("//"+l):"/";l=aa(!0,!0);r=ba(r,(void 0!==l?l:438)&4095|32768,0);if(h){if("string"===typeof h){for(var q=Array(h.length),A=0,da=h.length;A<da;++A)q[A]=h.charCodeAt(A);h=q}ca(r,l|146);q=m(r,"w");fa(q,h,0,h.length,0,void 0);ja(q);ca(r,l)}}this.handleError(f(this.filename,c));this.db=p(c,"i32");mc(this.db);
|
||||
this.eb={};this.Va={}}var c=u(4),d=e.cwrap,f=d("sqlite3_open","number",["string","number"]),g=d("sqlite3_close_v2","number",["number"]),n=d("sqlite3_exec","number",["number","string","number","number","number"]),t=d("sqlite3_changes","number",["number"]),w=d("sqlite3_prepare_v2","number",["number","string","number","number","number"]),v=d("sqlite3_prepare_v2","number",["number","number","number","number","number"]),B=d("sqlite3_bind_text","number",["number","number","number","number","number"]),H=
|
||||
d("sqlite3_bind_blob","number",["number","number","number","number","number"]),ea=d("sqlite3_bind_double","number",["number","number","number"]),nc=d("sqlite3_bind_int","number",["number","number","number"]),oc=d("sqlite3_bind_parameter_index","number",["number","string"]),pc=d("sqlite3_step","number",["number"]),qc=d("sqlite3_errmsg","string",["number"]),rc=d("sqlite3_column_count","number",["number"]),sc=d("sqlite3_data_count","number",["number"]),tc=d("sqlite3_column_double","number",["number",
|
||||
"number"]),uc=d("sqlite3_column_text","string",["number","number"]),vc=d("sqlite3_column_blob","number",["number","number"]),wc=d("sqlite3_column_bytes","number",["number","number"]),xc=d("sqlite3_column_type","number",["number","number"]),yc=d("sqlite3_column_name","string",["number","number"]),zc=d("sqlite3_reset","number",["number"]),Ac=d("sqlite3_clear_bindings","number",["number"]),Bc=d("sqlite3_finalize","number",["number"]),Cc=d("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),
|
||||
Dc=d("sqlite3_value_type","number",["number"]),Ec=d("sqlite3_value_bytes","number",["number"]),Fc=d("sqlite3_value_text","string",["number"]),Gc=d("sqlite3_value_blob","number",["number"]),Hc=d("sqlite3_value_double","number",["number"]),Ic=d("sqlite3_result_double","",["number","number"]),pb=d("sqlite3_result_null","",["number"]),Jc=d("sqlite3_result_text","",["number","string","number","number"]),Kc=d("sqlite3_result_blob","",["number","number","number","number"]),Lc=d("sqlite3_result_int","",["number",
|
||||
"number"]),qb=d("sqlite3_result_error","",["number","string","number"]),mc=d("RegisterExtensionFunctions","number",["number"]);a.prototype.bind=function(h){if(!this.Pa)throw"Statement closed";this.reset();return Array.isArray(h)?this.ub(h):null!=h&&"object"===typeof h?this.vb(h):!0};a.prototype.step=function(){if(!this.Pa)throw"Statement closed";this.Oa=1;var h=pc(this.Pa);switch(h){case 100:return!0;case 101:return!1;default:throw this.db.handleError(h);}};a.prototype.Bb=function(h){null==h&&(h=
|
||||
this.Oa,this.Oa+=1);return tc(this.Pa,h)};a.prototype.Cb=function(h){null==h&&(h=this.Oa,this.Oa+=1);return uc(this.Pa,h)};a.prototype.getBlob=function(h){null==h&&(h=this.Oa,this.Oa+=1);var l=wc(this.Pa,h);h=vc(this.Pa,h);for(var r=new Uint8Array(l),q=0;q<l;)r[q]=x[h+q],q+=1;return r};a.prototype.get=function(h){null!=h&&this.bind(h)&&this.step();h=[];for(var l=0,r=sc(this.Pa);l<r;){switch(xc(this.Pa,l)){case 1:case 2:h.push(this.Bb(l));break;case 3:h.push(this.Cb(l));break;case 4:h.push(this.getBlob(l));
|
||||
break;default:h.push(null)}l+=1}return h};a.prototype.getColumnNames=function(){for(var h=[],l=0,r=rc(this.Pa);l<r;)h.push(yc(this.Pa,l)),l+=1;return h};a.prototype.getAsObject=function(h){h=this.get(h);for(var l=this.getColumnNames(),r={},q=0,A=l.length;q<A;)r[l[q]]=h[q],q+=1;return r};a.prototype.run=function(h){null!=h&&this.bind(h);this.step();return this.reset()};a.prototype.yb=function(h,l){null==l&&(l=this.Oa,this.Oa+=1);h=ka(h);var r=la(h);this.gb.push(r);this.db.handleError(B(this.Pa,l,r,
|
||||
h.length-1,0))};a.prototype.tb=function(h,l){null==l&&(l=this.Oa,this.Oa+=1);var r=la(h);this.gb.push(r);this.db.handleError(H(this.Pa,l,r,h.length,0))};a.prototype.xb=function(h,l){null==l&&(l=this.Oa,this.Oa+=1);this.db.handleError((h===(h|0)?nc:ea)(this.Pa,l,h))};a.prototype.wb=function(h){null==h&&(h=this.Oa,this.Oa+=1);H(this.Pa,h,0,0,0)};a.prototype.mb=function(h,l){null==l&&(l=this.Oa,this.Oa+=1);switch(typeof h){case "string":this.yb(h,l);return;case "number":case "boolean":this.xb(h+0,l);
|
||||
return;case "object":if(null===h){this.wb(l);return}if(null!=h.length){this.tb(h,l);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+h+").";};a.prototype.vb=function(h){var l=this;Object.keys(h).forEach(function(r){var q=oc(l.Pa,r);0!==q&&l.mb(h[r],q)});return!0};a.prototype.ub=function(h){for(var l=0;l<h.length;)this.mb(h[l],l+1),l+=1;return!0};a.prototype.reset=function(){return 0===Ac(this.Pa)&&0===zc(this.Pa)};a.prototype.freemem=function(){for(var h;void 0!==(h=this.gb.pop());)ma(h)};
|
||||
a.prototype.free=function(){var h=0===Bc(this.Pa);delete this.db.eb[this.Pa];this.Pa=0;return h};b.prototype.run=function(h,l){if(!this.db)throw"Database closed";if(l){h=this.prepare(h,l);try{h.step()}finally{h.free()}}else this.handleError(n(this.db,h,0,0,c));return this};b.prototype.exec=function(h,l){if(!this.db)throw"Database closed";var r=na(),q=null;try{var A=oa(h)+1,da=u(A);pa(h,x,da,A);var D=da;var ha=u(4);for(h=[];0!==p(D,"i8");){qa(c);qa(ha);this.handleError(v(this.db,D,-1,c,ha));var ia=
|
||||
p(c,"i32");D=p(ha,"i32");if(0!==ia){A=null;q=new a(ia,this);for(null!=l&&q.bind(l);q.step();)null===A&&(A={columns:q.getColumnNames(),values:[]},h.push(A)),A.values.push(q.get());q.free()}}return h}catch(E){throw q&&q.free(),E;}finally{ra(r)}};b.prototype.each=function(h,l,r,q){"function"===typeof l&&(q=r,r=l,l=void 0);h=this.prepare(h,l);try{for(;h.step();)r(h.getAsObject())}finally{h.free()}if("function"===typeof q)return q()};b.prototype.prepare=function(h,l){qa(c);this.handleError(w(this.db,h,
|
||||
-1,c,0));h=p(c,"i32");if(0===h)throw"Nothing to prepare";var r=new a(h,this);null!=l&&r.bind(l);return this.eb[h]=r};b.prototype["export"]=function(){Object.values(this.eb).forEach(function(l){l.free()});Object.values(this.Va).forEach(sa);this.Va={};this.handleError(g(this.db));var h=ta(this.filename);this.handleError(f(this.filename,c));this.db=p(c,"i32");return h};b.prototype.close=function(){null!==this.db&&(Object.values(this.eb).forEach(function(h){h.free()}),Object.values(this.Va).forEach(sa),
|
||||
this.Va={},this.handleError(g(this.db)),ua("/"+this.filename),this.db=null)};b.prototype.handleError=function(h){if(0===h)return null;h=qc(this.db);throw Error(h);};b.prototype.getRowsModified=function(){return t(this.db)};b.prototype.create_function=function(h,l){Object.prototype.hasOwnProperty.call(this.Va,h)&&(va(this.Va[h]),delete this.Va[h]);var r=wa(function(q,A,da){for(var D,ha=[],ia=0;ia<A;ia+=1){var E=p(da+4*ia,"i32"),P=Dc(E);if(1===P||2===P)E=Hc(E);else if(3===P)E=Fc(E);else if(4===P){P=
|
||||
E;E=Ec(P);P=Gc(P);for(var vb=new Uint8Array(E),Ca=0;Ca<E;Ca+=1)vb[Ca]=x[P+Ca];E=vb}else E=null;ha.push(E)}try{D=l.apply(null,ha)}catch(Oc){qb(q,Oc,-1);return}switch(typeof D){case "boolean":Lc(q,D?1:0);break;case "number":Ic(q,D);break;case "string":Jc(q,D,-1,-1);break;case "object":null===D?pb(q):null!=D.length?(A=la(D),Kc(q,A,D.length,-1),ma(A)):qb(q,"Wrong API use : tried to return a value of an unknown type ("+D+").",-1);break;default:pb(q)}});this.Va[h]=r;this.handleError(Cc(this.db,h,l.length,
|
||||
1,0,r,0,0,0));return this};e.Database=b};var xa={},y;for(y in e)e.hasOwnProperty(y)&&(xa[y]=e[y]);var ya="./this.program",za=!1,z=!1,Aa=!1,Ba=!1;za="object"===typeof window;z="function"===typeof importScripts;Aa="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;Ba=!za&&!Aa&&!z;var C="",Da,Ea,Fa,Ga;
|
||||
if(Aa)C=z?require("path").dirname(C)+"/":__dirname+"/",Da=function(a,b){Fa||(Fa=require("fs"));Ga||(Ga=require("path"));a=Ga.normalize(a);return Fa.readFileSync(a,b?null:"utf8")},Ea=function(a){a=Da(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1<process.argv.length&&(ya=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),"undefined"!==typeof module&&(module.exports=e),e.inspect=function(){return"[Emscripten Module object]"};else if(Ba)"undefined"!=typeof read&&(Da=function(a){return read(a)}),
|
||||
Ea=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");assert("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(za||z)z?C=self.location.href:document.currentScript&&(C=document.currentScript.src),C=0!==C.indexOf("blob:")?C.substr(0,C.lastIndexOf("/")+1):"",Da=function(a){var b=new XMLHttpRequest;b.open("GET",
|
||||
a,!1);b.send(null);return b.responseText},z&&(Ea=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var Ha=e.print||console.log.bind(console),F=e.printErr||console.warn.bind(console);for(y in xa)xa.hasOwnProperty(y)&&(e[y]=xa[y]);xa=null;e.thisProgram&&(ya=e.thisProgram);var Ia=[],G;function va(a){G.delete(Ja.get(a));Ia.push(a)}
|
||||
function wa(a){var b=Ja;if(!G){G=new WeakMap;for(var c=0;c<b.length;c++){var d=b.get(c);d&&G.set(d,c)}}if(G.has(a))a=G.get(a);else{if(Ia.length)c=Ia.pop();else{c=b.length;try{b.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}}try{b.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"===typeof WebAssembly.Function){var f={i:"i32",j:"i64",f:"f32",d:"f64"},g={parameters:[],results:[]};for(d=1;4>d;++d)g.parameters.push(f["viii"[d]]);
|
||||
d=new WebAssembly.Function(g,a)}else{f=[1,0,1,96];g={i:127,j:126,f:125,d:124};f.push(3);for(d=0;3>d;++d)f.push(g["iii"[d]]);f.push(0);f[1]=f.length-2;d=new Uint8Array([0,97,115,109,1,0,0,0].concat(f,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));d=new WebAssembly.Module(d);d=(new WebAssembly.Instance(d,{e:{f:a}})).exports.f}b.set(c,d)}G.set(a,c);a=c}return a}function sa(a){va(a)}var Ka;e.wasmBinary&&(Ka=e.wasmBinary);var noExitRuntime;e.noExitRuntime&&(noExitRuntime=e.noExitRuntime);
|
||||
"object"!==typeof WebAssembly&&I("no native wasm support detected");
|
||||
function qa(a){var b="i32";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":x[a>>0]=0;break;case "i8":x[a>>0]=0;break;case "i16":La[a>>1]=0;break;case "i32":J[a>>2]=0;break;case "i64":K=[0,(L=0,1<=+Math.abs(L)?0<L?(Math.min(+Math.floor(L/4294967296),4294967295)|0)>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)];J[a>>2]=K[0];J[a+4>>2]=K[1];break;case "float":Ma[a>>2]=0;break;case "double":Na[a>>3]=0;break;default:I("invalid type for setValue: "+b)}}
|
||||
function p(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return x[a>>0];case "i8":return x[a>>0];case "i16":return La[a>>1];case "i32":return J[a>>2];case "i64":return J[a>>2];case "float":return Ma[a>>2];case "double":return Na[a>>3];default:I("invalid type for getValue: "+b)}return null}var M,Ja,Oa=!1;function assert(a,b){a||I("Assertion failed: "+b)}function Pa(a){var b=e["_"+a];assert(b,"Cannot call unknown function "+a+", make sure it is exported");return b}
|
||||
function Qa(a,b,c,d){var f={string:function(v){var B=0;if(null!==v&&void 0!==v&&0!==v){var H=(v.length<<2)+1;B=u(H);pa(v,N,B,H)}return B},array:function(v){var B=u(v.length);x.set(v,B);return B}},g=Pa(a),n=[];a=0;if(d)for(var t=0;t<d.length;t++){var w=f[c[t]];w?(0===a&&(a=na()),n[t]=w(d[t])):n[t]=d[t]}c=g.apply(null,n);c=function(v){return"string"===b?O(v):"boolean"===b?!!v:v}(c);0!==a&&ra(a);return c}var Ra=0,Sa=1;
|
||||
function la(a){var b=Ra==Sa?u(a.length):Ta(a.length);a.subarray||a.slice?N.set(a,b):N.set(new Uint8Array(a),b);return b}var Ua="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
||||
function Va(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.subarray&&Ua)return Ua.decode(a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|g);else{var n=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|n:(f&7)<<18|g<<12|n<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function O(a){return a?Va(N,a,void 0):""}
|
||||
function pa(a,b,c,d){if(!(0<d))return 0;var f=c;d=c+d-1;for(var g=0;g<a.length;++g){var n=a.charCodeAt(g);if(55296<=n&&57343>=n){var t=a.charCodeAt(++g);n=65536+((n&1023)<<10)|t&1023}if(127>=n){if(c>=d)break;b[c++]=n}else{if(2047>=n){if(c+1>=d)break;b[c++]=192|n>>6}else{if(65535>=n){if(c+2>=d)break;b[c++]=224|n>>12}else{if(c+3>=d)break;b[c++]=240|n>>18;b[c++]=128|n>>12&63}b[c++]=128|n>>6&63}b[c++]=128|n&63}}b[c]=0;return c-f}
|
||||
function oa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function Wa(a){var b=oa(a)+1,c=Ta(b);c&&pa(a,x,c,b);return c}var Xa,x,N,La,J,Ma,Na;
|
||||
function Ya(a){Xa=a;e.HEAP8=x=new Int8Array(a);e.HEAP16=La=new Int16Array(a);e.HEAP32=J=new Int32Array(a);e.HEAPU8=N=new Uint8Array(a);e.HEAPU16=new Uint16Array(a);e.HEAPU32=new Uint32Array(a);e.HEAPF32=Ma=new Float32Array(a);e.HEAPF64=Na=new Float64Array(a)}var Za=e.INITIAL_MEMORY||16777216;e.wasmMemory?M=e.wasmMemory:M=new WebAssembly.Memory({initial:Za/65536,maximum:32768});M&&(Xa=M.buffer);Za=Xa.byteLength;Ya(Xa);var $a=[],ab=[],bb=[],cb=[];function db(){var a=e.preRun.shift();$a.unshift(a)}
|
||||
var eb=0,fb=null,gb=null;e.preloadedImages={};e.preloadedAudios={};function I(a){if(e.onAbort)e.onAbort(a);F(a);Oa=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function hb(a){var b=ib;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function jb(){return hb("data:application/octet-stream;base64,")}var ib="sql-wasm.wasm";if(!jb()){var kb=ib;ib=e.locateFile?e.locateFile(kb,C):C+kb}
|
||||
function lb(){try{if(Ka)return new Uint8Array(Ka);if(Ea)return Ea(ib);throw"both async and sync fetching of the wasm failed";}catch(a){I(a)}}function mb(){return Ka||!za&&!z||"function"!==typeof fetch||hb("file://")?Promise.resolve().then(lb):fetch(ib,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+ib+"'";return a.arrayBuffer()}).catch(function(){return lb()})}var L,K;
|
||||
function nb(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(e);else{var c=b.Ab;"number"===typeof c?void 0===b.hb?Ja.get(c)():Ja.get(c)(b.hb):c(void 0===b.hb?null:b.hb)}}}function ob(a){return a.replace(/\b_Z[\w\d_]+/g,function(b){return b===b?b:b+" ["+b+"]"})}
|
||||
function rb(){function a(g){return(g=g.toTimeString().match(/\(([A-Za-z ]+)\)$/))?g[1]:"GMT"}if(!sb){sb=!0;J[tb()>>2]=60*(new Date).getTimezoneOffset();var b=(new Date).getFullYear(),c=new Date(b,0,1);b=new Date(b,6,1);J[ub()>>2]=Number(c.getTimezoneOffset()!=b.getTimezoneOffset());var d=a(c),f=a(b);d=Wa(d);f=Wa(f);b.getTimezoneOffset()<c.getTimezoneOffset()?(J[wb()>>2]=d,J[wb()+4>>2]=f):(J[wb()>>2]=f,J[wb()+4>>2]=d)}}var sb;
|
||||
function xb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function k(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=xb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}
|
||||
function yb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function zb(a){if("/"===a)return"/";a=k(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function Ab(a){J[Bb()>>2]=a}
|
||||
function Cb(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(Aa)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){I("randomDevice")}}
|
||||
function Db(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=xb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var Eb=[];function Fb(a,b){Eb[a]={input:[],output:[],$a:b};Gb(a,Hb)}
|
||||
var Hb={open:function(a){var b=Eb[a.node.rdev];if(!b)throw new Q(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.$a.flush(a.tty)},flush:function(a){a.tty.$a.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.$a.qb)throw new Q(60);for(var f=0,g=0;g<d;g++){try{var n=a.tty.$a.qb(a.tty)}catch(t){throw new Q(29);}if(void 0===n&&0===f)throw new Q(6);if(null===n||void 0===n)break;f++;b[c+g]=n}f&&(a.node.timestamp=Date.now());return f},write:function(a,b,c,d){if(!a.tty||!a.tty.$a.jb)throw new Q(60);
|
||||
try{for(var f=0;f<d;f++)a.tty.$a.jb(a.tty,b[c+f])}catch(g){throw new Q(29);}d&&(a.node.timestamp=Date.now());return f}},Ib={qb:function(a){if(!a.input.length){var b=null;if(Aa){var c=Buffer.sb?Buffer.sb(256):new Buffer(256),d=0;try{d=Fa.readSync(process.stdin.fd,c,0,256,null)}catch(f){if(-1!=f.toString().indexOf("EOF"))d=0;else throw f;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==
|
||||
typeof readline&&(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=ka(b,!0)}return a.input.shift()},jb:function(a,b){null===b||10===b?(Ha(Va(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(Ha(Va(a.output,0)),a.output=[])}},Jb={jb:function(a,b){null===b||10===b?(F(Va(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(F(Va(a.output,0)),a.output=[])}},R={Ta:null,Ua:function(){return R.createNode(null,
|
||||
"/",16895,0)},createNode:function(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new Q(63);R.Ta||(R.Ta={dir:{node:{Sa:R.La.Sa,Ra:R.La.Ra,lookup:R.La.lookup,ab:R.La.ab,rename:R.La.rename,unlink:R.La.unlink,rmdir:R.La.rmdir,readdir:R.La.readdir,symlink:R.La.symlink},stream:{Xa:R.Ma.Xa}},file:{node:{Sa:R.La.Sa,Ra:R.La.Ra},stream:{Xa:R.Ma.Xa,read:R.Ma.read,write:R.Ma.write,lb:R.Ma.lb,bb:R.Ma.bb,cb:R.Ma.cb}},link:{node:{Sa:R.La.Sa,Ra:R.La.Ra,readlink:R.La.readlink},stream:{}},nb:{node:{Sa:R.La.Sa,
|
||||
Ra:R.La.Ra},stream:Kb}});c=Lb(a,b,c,d);S(c.mode)?(c.La=R.Ta.dir.node,c.Ma=R.Ta.dir.stream,c.Ka={}):32768===(c.mode&61440)?(c.La=R.Ta.file.node,c.Ma=R.Ta.file.stream,c.Qa=0,c.Ka=null):40960===(c.mode&61440)?(c.La=R.Ta.link.node,c.Ma=R.Ta.link.stream):8192===(c.mode&61440)&&(c.La=R.Ta.nb.node,c.Ma=R.Ta.nb.stream);c.timestamp=Date.now();a&&(a.Ka[b]=c);return c},Lb:function(a){if(a.Ka&&a.Ka.subarray){for(var b=[],c=0;c<a.Qa;++c)b.push(a.Ka[c]);return b}return a.Ka},Mb:function(a){return a.Ka?a.Ka.subarray?
|
||||
a.Ka.subarray(0,a.Qa):new Uint8Array(a.Ka):new Uint8Array(0)},ob:function(a,b){var c=a.Ka?a.Ka.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ka,a.Ka=new Uint8Array(b),0<a.Qa&&a.Ka.set(c.subarray(0,a.Qa),0))},Ib:function(a,b){if(a.Qa!=b)if(0==b)a.Ka=null,a.Qa=0;else{if(!a.Ka||a.Ka.subarray){var c=a.Ka;a.Ka=new Uint8Array(b);c&&a.Ka.set(c.subarray(0,Math.min(b,a.Qa)))}else if(a.Ka||(a.Ka=[]),a.Ka.length>b)a.Ka.length=b;else for(;a.Ka.length<b;)a.Ka.push(0);a.Qa=
|
||||
b}},La:{Sa:function(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;S(a.mode)?b.size=4096:32768===(a.mode&61440)?b.size=a.Qa:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.zb=4096;b.blocks=Math.ceil(b.size/b.zb);return b},Ra:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&R.Ib(a,
|
||||
b.size)},lookup:function(){throw Mb[44];},ab:function(a,b,c,d){return R.createNode(a,b,c,d)},rename:function(a,b,c){if(S(a.mode)){try{var d=Nb(b,c)}catch(g){}if(d)for(var f in d.Ka)throw new Q(55);}delete a.parent.Ka[a.name];a.name=c;b.Ka[c]=a;a.parent=b},unlink:function(a,b){delete a.Ka[b]},rmdir:function(a,b){var c=Nb(a,b),d;for(d in c.Ka)throw new Q(55);delete a.Ka[b]},readdir:function(a){var b=[".",".."],c;for(c in a.Ka)a.Ka.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=R.createNode(a,
|
||||
b,41471,0);a.link=c;return a},readlink:function(a){if(40960!==(a.mode&61440))throw new Q(28);return a.link}},Ma:{read:function(a,b,c,d,f){var g=a.node.Ka;if(f>=a.node.Qa)return 0;a=Math.min(a.node.Qa-f,d);if(8<a&&g.subarray)b.set(g.subarray(f,f+a),c);else for(d=0;d<a;d++)b[c+d]=g[f+d];return a},write:function(a,b,c,d,f,g){b.buffer===x.buffer&&(g=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Ka||a.Ka.subarray)){if(g)return a.Ka=b.subarray(c,c+d),a.Qa=d;if(0===a.Qa&&0===f)return a.Ka=
|
||||
b.slice(c,c+d),a.Qa=d;if(f+d<=a.Qa)return a.Ka.set(b.subarray(c,c+d),f),d}R.ob(a,f+d);if(a.Ka.subarray&&b.subarray)a.Ka.set(b.subarray(c,c+d),f);else for(g=0;g<d;g++)a.Ka[f+g]=b[c+g];a.Qa=Math.max(a.Qa,f+d);return d},Xa:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.Qa);if(0>b)throw new Q(28);return b},lb:function(a,b,c){R.ob(a.node,b+c);a.node.Qa=Math.max(a.node.Qa,b+c)},bb:function(a,b,c,d,f,g){assert(0===b);if(32768!==(a.node.mode&61440))throw new Q(43);a=a.node.Ka;
|
||||
if(g&2||a.buffer!==Xa){if(0<d||d+c<a.length)a.subarray?a=a.subarray(d,d+c):a=Array.prototype.slice.call(a,d,d+c);d=!0;g=16384*Math.ceil(c/16384);for(b=Ta(g);c<g;)x[b+c++]=0;c=b;if(!c)throw new Q(48);x.set(a,c)}else d=!1,c=a.byteOffset;return{Hb:c,fb:d}},cb:function(a,b,c,d,f){if(32768!==(a.node.mode&61440))throw new Q(43);if(f&2)return 0;R.Ma.write(a,b,0,d,c,!1);return 0}}},Ob=null,Pb={},T=[],Qb=1,U=null,Rb=!0,V={},Q=null,Mb={};
|
||||
function W(a,b){a=Db("/",a);b=b||{};if(!a)return{path:"",node:null};var c={pb:!0,kb:0},d;for(d in c)void 0===b[d]&&(b[d]=c[d]);if(8<b.kb)throw new Q(32);a=xb(a.split("/").filter(function(n){return!!n}),!1);var f=Ob;c="/";for(d=0;d<a.length;d++){var g=d===a.length-1;if(g&&b.parent)break;f=Nb(f,a[d]);c=k(c+"/"+a[d]);f.Ya&&(!g||g&&b.pb)&&(f=f.Ya.root);if(!g||b.Wa)for(g=0;40960===(f.mode&61440);)if(f=Sb(c),c=Db(yb(c),f),f=W(c,{kb:b.kb}).node,40<g++)throw new Q(32);}return{path:c,node:f}}
|
||||
function Tb(a){for(var b;;){if(a===a.parent)return a=a.Ua.rb,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}}function Ub(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%U.length}function Vb(a){var b=Ub(a.parent.id,a.name);if(U[b]===a)U[b]=a.Za;else for(b=U[b];b;){if(b.Za===a){b.Za=a.Za;break}b=b.Za}}
|
||||
function Nb(a,b){var c;if(c=(c=Wb(a,"x"))?c:a.La.lookup?0:2)throw new Q(c,a);for(c=U[Ub(a.id,b)];c;c=c.Za){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.La.lookup(a,b)}function Lb(a,b,c,d){a=new Xb(a,b,c,d);b=Ub(a.parent.id,a.name);a.Za=U[b];return U[b]=a}function S(a){return 16384===(a&61440)}var Yb={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};
|
||||
function Zb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Wb(a,b){if(Rb)return 0;if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0}function $b(a,b){try{return Nb(a,b),20}catch(c){}return Wb(a,"wx")}function ac(a,b,c){try{var d=Nb(a,b)}catch(f){return f.Na}if(a=Wb(a,"wx"))return a;if(c){if(!S(d.mode))return 54;if(d===d.parent||"/"===Tb(d))return 10}else if(S(d.mode))return 31;return 0}
|
||||
function bc(a){var b=4096;for(a=a||0;a<=b;a++)if(!T[a])return a;throw new Q(33);}function cc(a,b){dc||(dc=function(){},dc.prototype={});var c=new dc,d;for(d in a)c[d]=a[d];a=c;b=bc(b);a.fd=b;return T[b]=a}var Kb={open:function(a){a.Ma=Pb[a.node.rdev].Ma;a.Ma.open&&a.Ma.open(a)},Xa:function(){throw new Q(70);}};function Gb(a,b){Pb[a]={Ma:b}}
|
||||
function ec(a,b){var c="/"===b,d=!b;if(c&&Ob)throw new Q(10);if(!c&&!d){var f=W(b,{pb:!1});b=f.path;f=f.node;if(f.Ya)throw new Q(10);if(!S(f.mode))throw new Q(54);}b={type:a,Nb:{},rb:b,Fb:[]};a=a.Ua(b);a.Ua=b;b.root=a;c?Ob=a:f&&(f.Ya=b,f.Ua&&f.Ua.Fb.push(b))}function ba(a,b,c){var d=W(a,{parent:!0}).node;a=zb(a);if(!a||"."===a||".."===a)throw new Q(28);var f=$b(d,a);if(f)throw new Q(f);if(!d.La.ab)throw new Q(63);return d.La.ab(d,a,b,c)}function X(a,b){ba(a,(void 0!==b?b:511)&1023|16384,0)}
|
||||
function fc(a,b,c){"undefined"===typeof c&&(c=b,b=438);ba(a,b|8192,c)}function hc(a,b){if(!Db(a))throw new Q(44);var c=W(b,{parent:!0}).node;if(!c)throw new Q(44);b=zb(b);var d=$b(c,b);if(d)throw new Q(d);if(!c.La.symlink)throw new Q(63);c.La.symlink(c,b,a)}
|
||||
function ua(a){var b=W(a,{parent:!0}).node,c=zb(a),d=Nb(b,c),f=ac(b,c,!1);if(f)throw new Q(f);if(!b.La.unlink)throw new Q(63);if(d.Ya)throw new Q(10);try{V.willDeletePath&&V.willDeletePath(a)}catch(g){F("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.La.unlink(b,c);Vb(d);try{if(V.onDeletePath)V.onDeletePath(a)}catch(g){F("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}}
|
||||
function Sb(a){a=W(a).node;if(!a)throw new Q(44);if(!a.La.readlink)throw new Q(28);return Db(Tb(a.parent),a.La.readlink(a))}function ic(a,b){a=W(a,{Wa:!b}).node;if(!a)throw new Q(44);if(!a.La.Sa)throw new Q(63);return a.La.Sa(a)}function jc(a){return ic(a,!0)}function ca(a,b){var c;"string"===typeof a?c=W(a,{Wa:!0}).node:c=a;if(!c.La.Ra)throw new Q(63);c.La.Ra(c,{mode:b&4095|c.mode&-4096,timestamp:Date.now()})}
|
||||
function kc(a){var b;"string"===typeof a?b=W(a,{Wa:!0}).node:b=a;if(!b.La.Ra)throw new Q(63);b.La.Ra(b,{timestamp:Date.now()})}function lc(a,b){if(0>b)throw new Q(28);var c;"string"===typeof a?c=W(a,{Wa:!0}).node:c=a;if(!c.La.Ra)throw new Q(63);if(S(c.mode))throw new Q(31);if(32768!==(c.mode&61440))throw new Q(28);if(a=Wb(c,"w"))throw new Q(a);c.La.Ra(c,{size:b,timestamp:Date.now()})}
|
||||
function m(a,b,c,d){if(""===a)throw new Q(44);if("string"===typeof b){var f=Yb[b];if("undefined"===typeof f)throw Error("Unknown file open mode: "+b);b=f}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var g=a;else{a=k(a);try{g=W(a,{Wa:!(b&131072)}).node}catch(n){}}f=!1;if(b&64)if(g){if(b&128)throw new Q(20);}else g=ba(a,c,0),f=!0;if(!g)throw new Q(44);8192===(g.mode&61440)&&(b&=-513);if(b&65536&&!S(g.mode))throw new Q(54);if(!f&&(c=g?40960===(g.mode&61440)?32:S(g.mode)&&
|
||||
("r"!==Zb(b)||b&512)?31:Wb(g,Zb(b)):44))throw new Q(c);b&512&&lc(g,0);b&=-131713;d=cc({node:g,path:Tb(g),flags:b,seekable:!0,position:0,Ma:g.Ma,Kb:[],error:!1},d);d.Ma.open&&d.Ma.open(d);!e.logReadFiles||b&1||(Mc||(Mc={}),a in Mc||(Mc[a]=1,F("FS.trackingDelegate error on read file: "+a)));try{V.onOpenFile&&(g=0,1!==(b&2097155)&&(g|=1),0!==(b&2097155)&&(g|=2),V.onOpenFile(a,g))}catch(n){F("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+n.message)}return d}
|
||||
function ja(a){if(null===a.fd)throw new Q(8);a.ib&&(a.ib=null);try{a.Ma.close&&a.Ma.close(a)}catch(b){throw b;}finally{T[a.fd]=null}a.fd=null}function Nc(a,b,c){if(null===a.fd)throw new Q(8);if(!a.seekable||!a.Ma.Xa)throw new Q(70);if(0!=c&&1!=c&&2!=c)throw new Q(28);a.position=a.Ma.Xa(a,b,c);a.Kb=[]}
|
||||
function Pc(a,b,c,d,f){if(0>d||0>f)throw new Q(28);if(null===a.fd)throw new Q(8);if(1===(a.flags&2097155))throw new Q(8);if(S(a.node.mode))throw new Q(31);if(!a.Ma.read)throw new Q(28);var g="undefined"!==typeof f;if(!g)f=a.position;else if(!a.seekable)throw new Q(70);b=a.Ma.read(a,b,c,d,f);g||(a.position+=b);return b}
|
||||
function fa(a,b,c,d,f,g){if(0>d||0>f)throw new Q(28);if(null===a.fd)throw new Q(8);if(0===(a.flags&2097155))throw new Q(8);if(S(a.node.mode))throw new Q(31);if(!a.Ma.write)throw new Q(28);a.seekable&&a.flags&1024&&Nc(a,0,2);var n="undefined"!==typeof f;if(!n)f=a.position;else if(!a.seekable)throw new Q(70);b=a.Ma.write(a,b,c,d,f,g);n||(a.position+=b);try{if(a.path&&V.onWriteToFile)V.onWriteToFile(a.path)}catch(t){F("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+t.message)}return b}
|
||||
function ta(a){var b={encoding:"binary"};b=b||{};b.flags=b.flags||"r";b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=m(a,b.flags);a=ic(a).size;var f=new Uint8Array(a);Pc(d,f,0,a,0);"utf8"===b.encoding?c=Va(f,0):"binary"===b.encoding&&(c=f);ja(d);return c}
|
||||
function Qc(){Q||(Q=function(a,b){this.node=b;this.Jb=function(c){this.Na=c};this.Jb(a);this.message="FS error"},Q.prototype=Error(),Q.prototype.constructor=Q,[44].forEach(function(a){Mb[a]=new Q(a);Mb[a].stack="<generic error, no stack>"}))}var Rc;function aa(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}
|
||||
function Sc(a,b,c){a=k("/dev/"+a);var d=aa(!!b,!!c);Tc||(Tc=64);var f=Tc++<<8|0;Gb(f,{open:function(g){g.seekable=!1},close:function(){c&&c.buffer&&c.buffer.length&&c(10)},read:function(g,n,t,w){for(var v=0,B=0;B<w;B++){try{var H=b()}catch(ea){throw new Q(29);}if(void 0===H&&0===v)throw new Q(6);if(null===H||void 0===H)break;v++;n[t+B]=H}v&&(g.node.timestamp=Date.now());return v},write:function(g,n,t,w){for(var v=0;v<w;v++)try{c(n[t+v])}catch(B){throw new Q(29);}w&&(g.node.timestamp=Date.now());return v}});
|
||||
fc(a,d,f)}var Tc,Y={},dc,Mc,Uc={};
|
||||
function Vc(a,b,c){try{var d=a(b)}catch(f){if(f&&f.node&&k(b)!==k(Tb(f.node)))return-54;throw f;}J[c>>2]=d.dev;J[c+4>>2]=0;J[c+8>>2]=d.ino;J[c+12>>2]=d.mode;J[c+16>>2]=d.nlink;J[c+20>>2]=d.uid;J[c+24>>2]=d.gid;J[c+28>>2]=d.rdev;J[c+32>>2]=0;K=[d.size>>>0,(L=d.size,1<=+Math.abs(L)?0<L?(Math.min(+Math.floor(L/4294967296),4294967295)|0)>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)];J[c+40>>2]=K[0];J[c+44>>2]=K[1];J[c+48>>2]=4096;J[c+52>>2]=d.blocks;J[c+56>>2]=d.atime.getTime()/1E3|0;J[c+60>>2]=
|
||||
0;J[c+64>>2]=d.mtime.getTime()/1E3|0;J[c+68>>2]=0;J[c+72>>2]=d.ctime.getTime()/1E3|0;J[c+76>>2]=0;K=[d.ino>>>0,(L=d.ino,1<=+Math.abs(L)?0<L?(Math.min(+Math.floor(L/4294967296),4294967295)|0)>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)];J[c+80>>2]=K[0];J[c+84>>2]=K[1];return 0}var Wc=void 0;function Xc(){Wc+=4;return J[Wc-4>>2]}function Z(a){a=T[a];if(!a)throw new Q(8);return a}var Yc={};
|
||||
function Zc(){if(!$c){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ya||"./this.program"},b;for(b in Yc)a[b]=Yc[b];var c=[];for(b in a)c.push(b+"="+a[b]);$c=c}return $c}var $c,ad;Aa?ad=function(){var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:"undefined"!==typeof dateNow?ad=dateNow:ad=function(){return performance.now()};
|
||||
function bd(a){for(var b=ad();ad()-b<a/1E3;);}e._usleep=bd;function Xb(a,b,c,d){a||(a=this);this.parent=a;this.Ua=a.Ua;this.Ya=null;this.id=Qb++;this.name=b;this.mode=c;this.La={};this.Ma={};this.rdev=d}Object.defineProperties(Xb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}}});Qc();U=Array(4096);ec(R,"/");X("/tmp");X("/home");X("/home/web_user");
|
||||
(function(){X("/dev");Gb(259,{read:function(){return 0},write:function(b,c,d,f){return f}});fc("/dev/null",259);Fb(1280,Ib);Fb(1536,Jb);fc("/dev/tty",1280);fc("/dev/tty1",1536);var a=Cb();Sc("random",a);Sc("urandom",a);X("/dev/shm");X("/dev/shm/tmp")})();X("/proc");X("/proc/self");X("/proc/self/fd");
|
||||
ec({Ua:function(){var a=Lb("/proc/self","fd",16895,73);a.La={lookup:function(b,c){var d=T[+c];if(!d)throw new Q(8);b={parent:null,Ua:{rb:"fake"},La:{readlink:function(){return d.path}}};return b.parent=b}};return a}},"/proc/self/fd");function ka(a,b){var c=Array(oa(a)+1);a=pa(a,c,0,c.length);b&&(c.length=a);return c}ab.push({Ab:function(){cd()}});
|
||||
var fd={b:function(a,b,c,d){I("Assertion failed: "+O(a)+", at: "+[b?O(b):"unknown filename",c,d?O(d):"unknown function"])},q:function(a,b){rb();a=new Date(1E3*J[a>>2]);J[b>>2]=a.getSeconds();J[b+4>>2]=a.getMinutes();J[b+8>>2]=a.getHours();J[b+12>>2]=a.getDate();J[b+16>>2]=a.getMonth();J[b+20>>2]=a.getFullYear()-1900;J[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);J[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;J[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();
|
||||
c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;J[b+32>>2]=a;a=J[wb()+(a?4:0)>>2];J[b+40>>2]=a;return b},I:function(a,b){try{a=O(a);if(b&-8)var c=-28;else{var d;(d=W(a,{Wa:!0}).node)?(a="",b&4&&(a+="r"),b&2&&(a+="w"),b&1&&(a+="x"),c=a&&Wb(d,a)?-2:0):c=-44}return c}catch(f){return"undefined"!==typeof Y&&f instanceof Q||I(f),-f.Na}},t:function(a,b){try{return a=O(a),ca(a,b),0}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),-c.Na}},z:function(a){try{return a=O(a),
|
||||
kc(a),0}catch(b){return"undefined"!==typeof Y&&b instanceof Q||I(b),-b.Na}},u:function(a,b){try{var c=T[a];if(!c)throw new Q(8);ca(c.node,b);return 0}catch(d){return"undefined"!==typeof Y&&d instanceof Q||I(d),-d.Na}},B:function(a){try{var b=T[a];if(!b)throw new Q(8);kc(b.node);return 0}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),-c.Na}},c:function(a,b,c){Wc=c;try{var d=Z(a);switch(b){case 0:var f=Xc();return 0>f?-28:m(d.path,d.flags,0,f).fd;case 1:case 2:return 0;case 3:return d.flags;
|
||||
case 4:return f=Xc(),d.flags|=f,0;case 12:return f=Xc(),La[f+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Ab(28),-1;default:return-28}}catch(g){return"undefined"!==typeof Y&&g instanceof Q||I(g),-g.Na}},w:function(a,b){try{var c=Z(a);return Vc(ic,c.path,b)}catch(d){return"undefined"!==typeof Y&&d instanceof Q||I(d),-d.Na}},F:function(a,b,c){try{var d=T[a];if(!d)throw new Q(8);if(0===(d.flags&2097155))throw new Q(28);lc(d.node,c);return 0}catch(f){return"undefined"!==typeof Y&&
|
||||
f instanceof Q||I(f),-f.Na}},J:function(a,b){try{if(0===b)return-28;if(b<oa("/")+1)return-68;pa("/",N,a,b);return a}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),-c.Na}},D:function(){return 0},e:function(){return 42},v:function(a,b){try{return a=O(a),Vc(jc,a,b)}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),-c.Na}},s:function(a,b){try{return a=O(a),a=k(a),"/"===a[a.length-1]&&(a=a.substr(0,a.length-1)),X(a,b),0}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),
|
||||
-c.Na}},j:function(a,b,c,d,f,g){try{a:{g<<=12;var n=!1;if(0!==(d&16)&&0!==a%16384)var t=-28;else{if(0!==(d&32)){var w=dd(16384,b);if(!w){t=-48;break a}ed(w,0,b);n=!0}else{var v=T[f];if(!v){t=-8;break a}var B=g;if(0!==(c&2)&&0===(d&2)&&2!==(v.flags&2097155))throw new Q(2);if(1===(v.flags&2097155))throw new Q(2);if(!v.Ma.bb)throw new Q(43);var H=v.Ma.bb(v,a,b,B,c,d);w=H.Hb;n=H.fb}Uc[w]={Eb:w,Db:b,fb:n,fd:f,Gb:c,flags:d,offset:g};t=w}}return t}catch(ea){return"undefined"!==typeof Y&&ea instanceof Q||
|
||||
I(ea),-ea.Na}},k:function(a,b){try{if(-1===(a|0)||0===b)var c=-28;else{var d=Uc[a];if(d&&b===d.Db){var f=T[d.fd];if(d.Gb&2){var g=d.flags,n=d.offset,t=N.slice(a,a+b);f&&f.Ma.cb&&f.Ma.cb(f,t,n,b,g)}Uc[a]=null;d.fb&&ma(d.Eb)}c=0}return c}catch(w){return"undefined"!==typeof Y&&w instanceof Q||I(w),-w.Na}},i:function(a,b,c){Wc=c;try{var d=O(a),f=Xc();return m(d,b,f).fd}catch(g){return"undefined"!==typeof Y&&g instanceof Q||I(g),-g.Na}},x:function(a,b,c){try{var d=Z(a);return Pc(d,x,b,c)}catch(f){return"undefined"!==
|
||||
typeof Y&&f instanceof Q||I(f),-f.Na}},C:function(a,b,c){try{a=O(a);if(0>=c)var d=-28;else{var f=Sb(a),g=Math.min(c,oa(f)),n=x[b+g];pa(f,N,b,c+1);x[b+g]=n;d=g}return d}catch(t){return"undefined"!==typeof Y&&t instanceof Q||I(t),-t.Na}},H:function(a){try{a=O(a);var b=W(a,{parent:!0}).node,c=zb(a),d=Nb(b,c),f=ac(b,c,!0);if(f)throw new Q(f);if(!b.La.rmdir)throw new Q(63);if(d.Ya)throw new Q(10);try{V.willDeletePath&&V.willDeletePath(a)}catch(g){F("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+
|
||||
g.message)}b.La.rmdir(b,c);Vb(d);try{if(V.onDeletePath)V.onDeletePath(a)}catch(g){F("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}return 0}catch(g){return"undefined"!==typeof Y&&g instanceof Q||I(g),-g.Na}},g:function(a,b){try{return a=O(a),Vc(ic,a,b)}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),-c.Na}},G:function(a){try{return a=O(a),ua(a),0}catch(b){return"undefined"!==typeof Y&&b instanceof Q||I(b),-b.Na}},m:function(a,b,c){N.copyWithin(a,b,b+c)},
|
||||
d:function(a){a>>>=0;var b=N.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{M.grow(Math.min(2147483648,d)-Xa.byteLength+65535>>>16);Ya(M.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},o:function(a,b){var c=0;Zc().forEach(function(d,f){var g=b+c;f=J[a+4*f>>2]=g;for(g=0;g<d.length;++g)x[f++>>0]=d.charCodeAt(g);x[f>>0]=0;c+=d.length+1});return 0},p:function(a,b){var c=
|
||||
Zc();J[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});J[b>>2]=d;return 0},f:function(a){try{var b=Z(a);ja(b);return 0}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),c.Na}},n:function(a,b){try{var c=Z(a);x[b>>0]=c.tty?2:S(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof Y&&d instanceof Q||I(d),d.Na}},l:function(a,b,c,d,f){try{var g=Z(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Nc(g,a,d);K=[g.position>>>
|
||||
0,(L=g.position,1<=+Math.abs(L)?0<L?(Math.min(+Math.floor(L/4294967296),4294967295)|0)>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)];J[f>>2]=K[0];J[f+4>>2]=K[1];g.ib&&0===a&&0===d&&(g.ib=null);return 0}catch(n){return"undefined"!==typeof Y&&n instanceof Q||I(n),n.Na}},E:function(a){try{var b=Z(a);return b.Ma&&b.Ma.fsync?-b.Ma.fsync(b):0}catch(c){return"undefined"!==typeof Y&&c instanceof Q||I(c),c.Na}},y:function(a,b,c,d){try{a:{for(var f=Z(a),g=a=0;g<c;g++){var n=fa(f,x,J[b+8*g>>2],J[b+(8*
|
||||
g+4)>>2],void 0);if(0>n){var t=-1;break a}a+=n}t=a}J[d>>2]=t;return 0}catch(w){return"undefined"!==typeof Y&&w instanceof Q||I(w),w.Na}},h:function(a){var b=Date.now();J[a>>2]=b/1E3|0;J[a+4>>2]=b%1E3*1E3|0;return 0},a:M,K:function(a,b){if(0===a)return Ab(28),-1;var c=J[a>>2];a=J[a+4>>2];if(0>a||999999999<a||0>c)return Ab(28),-1;0!==b&&(J[b>>2]=0,J[b+4>>2]=0);return bd(1E6*c+a/1E3)},A:function(a){switch(a){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;
|
||||
e.onRuntimeInitialized=function(){function a(h,l){this.Ra=h;this.db=l;this.Qa=1;this.lb=[]}function b(h,l){this.db=l;l=aa(h)+1;this.eb=ba(l);if(null===this.eb)throw Error("Unable to allocate memory for the SQL string");k(h,m,this.eb,l);this.jb=this.eb;this.$a=this.pb=null}function c(h){this.filename="dbfile_"+(4294967295*Math.random()>>>0);if(null!=h){var l=this.filename,p=l?r("//"+l):"/";l=ca(!0,!0);p=da(p,(void 0!==l?l:438)&4095|32768,0);if(h){if("string"===typeof h){for(var q=Array(h.length),B=
|
||||
0,ha=h.length;B<ha;++B)q[B]=h.charCodeAt(B);h=q}ea(p,l|146);q=u(p,"w");fa(q,h,0,h.length,0,void 0);ka(q);ea(p,l)}}this.handleError(g(this.filename,d));this.db=x(d,"i32");nc(this.db);this.fb={};this.Xa={}}var d=y(4),f=e.cwrap,g=f("sqlite3_open","number",["string","number"]),n=f("sqlite3_close_v2","number",["number"]),t=f("sqlite3_exec","number",["number","string","number","number","number"]),w=f("sqlite3_changes","number",["number"]),v=f("sqlite3_prepare_v2","number",["number","string","number","number",
|
||||
"number"]),C=f("sqlite3_sql","string",["number"]),H=f("sqlite3_normalized_sql","string",["number"]),Y=f("sqlite3_prepare_v2","number",["number","number","number","number","number"]),oc=f("sqlite3_bind_text","number",["number","number","number","number","number"]),pb=f("sqlite3_bind_blob","number",["number","number","number","number","number"]),pc=f("sqlite3_bind_double","number",["number","number","number"]),qc=f("sqlite3_bind_int","number",["number","number","number"]),rc=f("sqlite3_bind_parameter_index",
|
||||
"number",["number","string"]),sc=f("sqlite3_step","number",["number"]),tc=f("sqlite3_errmsg","string",["number"]),uc=f("sqlite3_column_count","number",["number"]),vc=f("sqlite3_data_count","number",["number"]),wc=f("sqlite3_column_double","number",["number","number"]),xc=f("sqlite3_column_text","string",["number","number"]),yc=f("sqlite3_column_blob","number",["number","number"]),zc=f("sqlite3_column_bytes","number",["number","number"]),Ac=f("sqlite3_column_type","number",["number","number"]),Bc=
|
||||
f("sqlite3_column_name","string",["number","number"]),Cc=f("sqlite3_reset","number",["number"]),Dc=f("sqlite3_clear_bindings","number",["number"]),Ec=f("sqlite3_finalize","number",["number"]),Fc=f("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),Gc=f("sqlite3_value_type","number",["number"]),Hc=f("sqlite3_value_bytes","number",["number"]),Ic=f("sqlite3_value_text","string",["number"]),Jc=f("sqlite3_value_blob","number",["number"]),
|
||||
Kc=f("sqlite3_value_double","number",["number"]),Lc=f("sqlite3_result_double","",["number","number"]),qb=f("sqlite3_result_null","",["number"]),Mc=f("sqlite3_result_text","",["number","string","number","number"]),Nc=f("sqlite3_result_blob","",["number","number","number","number"]),Oc=f("sqlite3_result_int","",["number","number"]),rb=f("sqlite3_result_error","",["number","string","number"]),nc=f("RegisterExtensionFunctions","number",["number"]);a.prototype.bind=function(h){if(!this.Ra)throw"Statement closed";
|
||||
this.reset();return Array.isArray(h)?this.Bb(h):null!=h&&"object"===typeof h?this.Cb(h):!0};a.prototype.step=function(){if(!this.Ra)throw"Statement closed";this.Qa=1;var h=sc(this.Ra);switch(h){case 100:return!0;case 101:return!1;default:throw this.db.handleError(h);}};a.prototype.Ib=function(h){null==h&&(h=this.Qa,this.Qa+=1);return wc(this.Ra,h)};a.prototype.Jb=function(h){null==h&&(h=this.Qa,this.Qa+=1);return xc(this.Ra,h)};a.prototype.getBlob=function(h){null==h&&(h=this.Qa,this.Qa+=1);var l=
|
||||
zc(this.Ra,h);h=yc(this.Ra,h);for(var p=new Uint8Array(l),q=0;q<l;q+=1)p[q]=z[h+q];return p};a.prototype.get=function(h){null!=h&&this.bind(h)&&this.step();h=[];for(var l=vc(this.Ra),p=0;p<l;p+=1)switch(Ac(this.Ra,p)){case 1:case 2:h.push(this.Ib(p));break;case 3:h.push(this.Jb(p));break;case 4:h.push(this.getBlob(p));break;default:h.push(null)}return h};a.prototype.getColumnNames=function(){for(var h=[],l=uc(this.Ra),p=0;p<l;p+=1)h.push(Bc(this.Ra,p));return h};a.prototype.getAsObject=function(h){h=
|
||||
this.get(h);for(var l=this.getColumnNames(),p={},q=0;q<l.length;q+=1)p[l[q]]=h[q];return p};a.prototype.getSQL=function(){return C(this.Ra)};a.prototype.getNormalizedSQL=function(){return H(this.Ra)};a.prototype.run=function(h){null!=h&&this.bind(h);this.step();return this.reset()};a.prototype.Fb=function(h,l){null==l&&(l=this.Qa,this.Qa+=1);h=la(h);var p=ma(h);this.lb.push(p);this.db.handleError(oc(this.Ra,l,p,h.length-1,0))};a.prototype.Ab=function(h,l){null==l&&(l=this.Qa,this.Qa+=1);var p=ma(h);
|
||||
this.lb.push(p);this.db.handleError(pb(this.Ra,l,p,h.length,0))};a.prototype.Eb=function(h,l){null==l&&(l=this.Qa,this.Qa+=1);this.db.handleError((h===(h|0)?qc:pc)(this.Ra,l,h))};a.prototype.Db=function(h){null==h&&(h=this.Qa,this.Qa+=1);pb(this.Ra,h,0,0,0)};a.prototype.tb=function(h,l){null==l&&(l=this.Qa,this.Qa+=1);switch(typeof h){case "string":this.Fb(h,l);return;case "number":case "boolean":this.Eb(h+0,l);return;case "object":if(null===h){this.Db(l);return}if(null!=h.length){this.Ab(h,l);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+
|
||||
h+").";};a.prototype.Cb=function(h){var l=this;Object.keys(h).forEach(function(p){var q=rc(l.Ra,p);0!==q&&l.tb(h[p],q)});return!0};a.prototype.Bb=function(h){for(var l=0;l<h.length;l+=1)this.tb(h[l],l+1);return!0};a.prototype.reset=function(){return 0===Dc(this.Ra)&&0===Cc(this.Ra)};a.prototype.freemem=function(){for(var h;void 0!==(h=this.lb.pop());)na(h)};a.prototype.free=function(){var h=0===Ec(this.Ra);delete this.db.fb[this.Ra];this.Ra=0;return h};b.prototype.next=function(){if(null===this.eb)return{done:!0};
|
||||
null!==this.$a&&(this.$a.free(),this.$a=null);if(!this.db.db)throw this.nb(),Error("Database closed");var h=oa(),l=y(4);pa(d);pa(l);try{this.db.handleError(Y(this.db.db,this.jb,-1,d,l));this.jb=x(l,"i32");var p=x(d,"i32");if(0===p)return this.nb(),{done:!0};this.$a=new a(p,this.db);this.db.fb[p]=this.$a;return{value:this.$a,done:!1}}catch(q){throw this.pb=A(this.jb),this.nb(),q;}finally{qa(h)}};b.prototype.nb=function(){na(this.eb);this.eb=null};b.prototype.getRemainingSQL=function(){return null!==
|
||||
this.pb?this.pb:A(this.jb)};"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator&&(b.prototype[Symbol.iterator]=function(){return this});c.prototype.run=function(h,l){if(!this.db)throw"Database closed";if(l){h=this.prepare(h,l);try{h.step()}finally{h.free()}}else this.handleError(t(this.db,h,0,0,d));return this};c.prototype.exec=function(h,l){if(!this.db)throw"Database closed";var p=oa(),q=null;try{var B=aa(h)+1,ha=y(B);k(h,z,ha,B);var D=ha;var ia=y(4);for(h=[];0!==x(D,"i8");){pa(d);pa(ia);
|
||||
this.handleError(Y(this.db,D,-1,d,ia));var ja=x(d,"i32");D=x(ia,"i32");if(0!==ja){B=null;q=new a(ja,this);for(null!=l&&q.bind(l);q.step();)null===B&&(B={columns:q.getColumnNames(),values:[]},h.push(B)),B.values.push(q.get());q.free()}}return h}catch(E){throw q&&q.free(),E;}finally{qa(p)}};c.prototype.each=function(h,l,p,q){"function"===typeof l&&(q=p,p=l,l=void 0);h=this.prepare(h,l);try{for(;h.step();)p(h.getAsObject())}finally{h.free()}if("function"===typeof q)return q()};c.prototype.prepare=function(h,
|
||||
l){pa(d);this.handleError(v(this.db,h,-1,d,0));h=x(d,"i32");if(0===h)throw"Nothing to prepare";var p=new a(h,this);null!=l&&p.bind(l);return this.fb[h]=p};c.prototype.iterateStatements=function(h){return new b(h,this)};c.prototype["export"]=function(){Object.values(this.fb).forEach(function(l){l.free()});Object.values(this.Xa).forEach(ra);this.Xa={};this.handleError(n(this.db));var h=sa(this.filename);this.handleError(g(this.filename,d));this.db=x(d,"i32");return h};c.prototype.close=function(){null!==
|
||||
this.db&&(Object.values(this.fb).forEach(function(h){h.free()}),Object.values(this.Xa).forEach(ra),this.Xa={},this.handleError(n(this.db)),ta("/"+this.filename),this.db=null)};c.prototype.handleError=function(h){if(0===h)return null;h=tc(this.db);throw Error(h);};c.prototype.getRowsModified=function(){return w(this.db)};c.prototype.create_function=function(h,l){Object.prototype.hasOwnProperty.call(this.Xa,h)&&(ua(this.Xa[h]),delete this.Xa[h]);var p=va(function(q,B,ha){for(var D,ia=[],ja=0;ja<B;ja+=
|
||||
1){var E=x(ha+4*ja,"i32"),R=Gc(E);if(1===R||2===R)E=Kc(E);else if(3===R)E=Ic(E);else if(4===R){R=E;E=Hc(R);R=Jc(R);for(var wb=new Uint8Array(E),Ea=0;Ea<E;Ea+=1)wb[Ea]=z[R+Ea];E=wb}else E=null;ia.push(E)}try{D=l.apply(null,ia)}catch(Rc){rb(q,Rc,-1);return}switch(typeof D){case "boolean":Oc(q,D?1:0);break;case "number":Lc(q,D);break;case "string":Mc(q,D,-1,-1);break;case "object":null===D?qb(q):null!=D.length?(B=ma(D),Nc(q,B,D.length,-1),na(B)):rb(q,"Wrong API use : tried to return a value of an unknown type ("+
|
||||
D+").",-1);break;default:qb(q)}});this.Xa[h]=p;this.handleError(Fc(this.db,h,l.length,1,0,p,0,0,0));return this};e.Database=c};var wa={},F;for(F in e)e.hasOwnProperty(F)&&(wa[F]=e[F]);var xa="./this.program",ya=!1,G=!1,za=!1,Aa=!1;ya="object"===typeof window;G="function"===typeof importScripts;za="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;Aa=!ya&&!za&&!G;var I="",Ba,Ca,Da,Fa;
|
||||
if(za)I=G?require("path").dirname(I)+"/":__dirname+"/",Ba=function(a,b){Da||(Da=require("fs"));Fa||(Fa=require("path"));a=Fa.normalize(a);return Da.readFileSync(a,b?null:"utf8")},Ca=function(a){a=Ba(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1<process.argv.length&&(xa=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),"undefined"!==typeof module&&(module.exports=e),e.inspect=function(){return"[Emscripten Module object]"};else if(Aa)"undefined"!=typeof read&&(Ba=function(a){return read(a)}),
|
||||
Ca=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");assert("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ya||G)G?I=self.location.href:document.currentScript&&(I=document.currentScript.src),I=0!==I.indexOf("blob:")?I.substr(0,I.lastIndexOf("/")+1):"",Ba=function(a){var b=new XMLHttpRequest;b.open("GET",
|
||||
a,!1);b.send(null);return b.responseText},G&&(Ca=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var Ga=e.print||console.log.bind(console),J=e.printErr||console.warn.bind(console);for(F in wa)wa.hasOwnProperty(F)&&(e[F]=wa[F]);wa=null;e.thisProgram&&(xa=e.thisProgram);var Ha=[],Ia;function ua(a){Ia.delete(Ja.get(a));Ha.push(a)}
|
||||
function va(a){var b=Ja;if(!Ia){Ia=new WeakMap;for(var c=0;c<b.length;c++){var d=b.get(c);d&&Ia.set(d,c)}}if(Ia.has(a))a=Ia.get(a);else{if(Ha.length)c=Ha.pop();else{c=b.length;try{b.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}}try{b.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"===typeof WebAssembly.Function){var f={i:"i32",j:"i64",f:"f32",d:"f64"},g={parameters:[],results:[]};for(d=1;4>d;++d)g.parameters.push(f["viii"[d]]);
|
||||
d=new WebAssembly.Function(g,a)}else{f=[1,0,1,96];g={i:127,j:126,f:125,d:124};f.push(3);for(d=0;3>d;++d)f.push(g["iii"[d]]);f.push(0);f[1]=f.length-2;d=new Uint8Array([0,97,115,109,1,0,0,0].concat(f,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));d=new WebAssembly.Module(d);d=(new WebAssembly.Instance(d,{e:{f:a}})).exports.f}b.set(c,d)}Ia.set(a,c);a=c}return a}function ra(a){ua(a)}var Ka;e.wasmBinary&&(Ka=e.wasmBinary);var noExitRuntime;e.noExitRuntime&&(noExitRuntime=e.noExitRuntime);
|
||||
"object"!==typeof WebAssembly&&K("no native wasm support detected");
|
||||
function pa(a){var b="i32";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":z[a>>0]=0;break;case "i8":z[a>>0]=0;break;case "i16":La[a>>1]=0;break;case "i32":L[a>>2]=0;break;case "i64":M=[0,(N=0,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[a>>2]=M[0];L[a+4>>2]=M[1];break;case "float":Ma[a>>2]=0;break;case "double":Na[a>>3]=0;break;default:K("invalid type for setValue: "+b)}}
|
||||
function x(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return z[a>>0];case "i8":return z[a>>0];case "i16":return La[a>>1];case "i32":return L[a>>2];case "i64":return L[a>>2];case "float":return Ma[a>>2];case "double":return Na[a>>3];default:K("invalid type for getValue: "+b)}return null}var Oa,Ja,Pa=!1;function assert(a,b){a||K("Assertion failed: "+b)}function Qa(a){var b=e["_"+a];assert(b,"Cannot call unknown function "+a+", make sure it is exported");return b}
|
||||
function Ra(a,b,c,d){var f={string:function(v){var C=0;if(null!==v&&void 0!==v&&0!==v){var H=(v.length<<2)+1;C=y(H);k(v,m,C,H)}return C},array:function(v){var C=y(v.length);z.set(v,C);return C}},g=Qa(a),n=[];a=0;if(d)for(var t=0;t<d.length;t++){var w=f[c[t]];w?(0===a&&(a=oa()),n[t]=w(d[t])):n[t]=d[t]}c=g.apply(null,n);c=function(v){return"string"===b?A(v):"boolean"===b?!!v:v}(c);0!==a&&qa(a);return c}var Sa=0,Ta=1;
|
||||
function ma(a){var b=Sa==Ta?y(a.length):ba(a.length);a.subarray||a.slice?m.set(a,b):m.set(new Uint8Array(a),b);return b}var Ua="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
||||
function Va(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.subarray&&Ua)return Ua.decode(a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|g);else{var n=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|n:(f&7)<<18|g<<12|n<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function A(a,b){return a?Va(m,a,b):""}
|
||||
function k(a,b,c,d){if(!(0<d))return 0;var f=c;d=c+d-1;for(var g=0;g<a.length;++g){var n=a.charCodeAt(g);if(55296<=n&&57343>=n){var t=a.charCodeAt(++g);n=65536+((n&1023)<<10)|t&1023}if(127>=n){if(c>=d)break;b[c++]=n}else{if(2047>=n){if(c+1>=d)break;b[c++]=192|n>>6}else{if(65535>=n){if(c+2>=d)break;b[c++]=224|n>>12}else{if(c+3>=d)break;b[c++]=240|n>>18;b[c++]=128|n>>12&63}b[c++]=128|n>>6&63}b[c++]=128|n&63}}b[c]=0;return c-f}
|
||||
function aa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function Wa(a){var b=aa(a)+1,c=ba(b);c&&k(a,z,c,b);return c}var Xa,z,m,La,L,Ma,Na;
|
||||
function Ya(a){Xa=a;e.HEAP8=z=new Int8Array(a);e.HEAP16=La=new Int16Array(a);e.HEAP32=L=new Int32Array(a);e.HEAPU8=m=new Uint8Array(a);e.HEAPU16=new Uint16Array(a);e.HEAPU32=new Uint32Array(a);e.HEAPF32=Ma=new Float32Array(a);e.HEAPF64=Na=new Float64Array(a)}var Za=e.INITIAL_MEMORY||16777216;e.wasmMemory?Oa=e.wasmMemory:Oa=new WebAssembly.Memory({initial:Za/65536,maximum:32768});Oa&&(Xa=Oa.buffer);Za=Xa.byteLength;Ya(Xa);var $a=[],ab=[],bb=[],cb=[];
|
||||
function db(){var a=e.preRun.shift();$a.unshift(a)}var eb=0,fb=null,gb=null;e.preloadedImages={};e.preloadedAudios={};function K(a){if(e.onAbort)e.onAbort(a);J(a);Pa=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function hb(a){var b=ib;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function jb(){return hb("data:application/octet-stream;base64,")}var ib="sql-wasm.wasm";
|
||||
if(!jb()){var kb=ib;ib=e.locateFile?e.locateFile(kb,I):I+kb}function lb(){try{if(Ka)return new Uint8Array(Ka);if(Ca)return Ca(ib);throw"both async and sync fetching of the wasm failed";}catch(a){K(a)}}function mb(){return Ka||!ya&&!G||"function"!==typeof fetch||hb("file://")?Promise.resolve().then(lb):fetch(ib,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+ib+"'";return a.arrayBuffer()}).catch(function(){return lb()})}var N,M;
|
||||
function nb(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(e);else{var c=b.Hb;"number"===typeof c?void 0===b.mb?Ja.get(c)():Ja.get(c)(b.mb):c(void 0===b.mb?null:b.mb)}}}function ob(a){return a.replace(/\b_Z[\w\d_]+/g,function(b){return b===b?b:b+" ["+b+"]"})}
|
||||
function sb(){function a(g){return(g=g.toTimeString().match(/\(([A-Za-z ]+)\)$/))?g[1]:"GMT"}if(!tb){tb=!0;L[ub()>>2]=60*(new Date).getTimezoneOffset();var b=(new Date).getFullYear(),c=new Date(b,0,1);b=new Date(b,6,1);L[vb()>>2]=Number(c.getTimezoneOffset()!=b.getTimezoneOffset());var d=a(c),f=a(b);d=Wa(d);f=Wa(f);b.getTimezoneOffset()<c.getTimezoneOffset()?(L[xb()>>2]=d,L[xb()+4>>2]=f):(L[xb()>>2]=f,L[xb()+4>>2]=d)}}var tb;
|
||||
function yb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function r(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=yb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}
|
||||
function zb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function Ab(a){if("/"===a)return"/";a=r(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function Bb(a){L[Cb()>>2]=a}
|
||||
function Db(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(za)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){K("randomDevice")}}
|
||||
function Eb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=yb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var Fb=[];function Gb(a,b){Fb[a]={input:[],output:[],cb:b};Hb(a,Ib)}
|
||||
var Ib={open:function(a){var b=Fb[a.node.rdev];if(!b)throw new O(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.cb.flush(a.tty)},flush:function(a){a.tty.cb.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.cb.xb)throw new O(60);for(var f=0,g=0;g<d;g++){try{var n=a.tty.cb.xb(a.tty)}catch(t){throw new O(29);}if(void 0===n&&0===f)throw new O(6);if(null===n||void 0===n)break;f++;b[c+g]=n}f&&(a.node.timestamp=Date.now());return f},write:function(a,b,c,d){if(!a.tty||!a.tty.cb.qb)throw new O(60);
|
||||
try{for(var f=0;f<d;f++)a.tty.cb.qb(a.tty,b[c+f])}catch(g){throw new O(29);}d&&(a.node.timestamp=Date.now());return f}},Jb={xb:function(a){if(!a.input.length){var b=null;if(za){var c=Buffer.zb?Buffer.zb(256):new Buffer(256),d=0;try{d=Da.readSync(process.stdin.fd,c,0,256,null)}catch(f){if(-1!=f.toString().indexOf("EOF"))d=0;else throw f;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==
|
||||
typeof readline&&(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=la(b,!0)}return a.input.shift()},qb:function(a,b){null===b||10===b?(Ga(Va(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(Ga(Va(a.output,0)),a.output=[])}},Kb={qb:function(a,b){null===b||10===b?(J(Va(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(J(Va(a.output,0)),a.output=[])}},P={Va:null,Wa:function(){return P.createNode(null,
|
||||
"/",16895,0)},createNode:function(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new O(63);P.Va||(P.Va={dir:{node:{Ua:P.Na.Ua,Ta:P.Na.Ta,lookup:P.Na.lookup,gb:P.Na.gb,rename:P.Na.rename,unlink:P.Na.unlink,rmdir:P.Na.rmdir,readdir:P.Na.readdir,symlink:P.Na.symlink},stream:{Za:P.Oa.Za}},file:{node:{Ua:P.Na.Ua,Ta:P.Na.Ta},stream:{Za:P.Oa.Za,read:P.Oa.read,write:P.Oa.write,sb:P.Oa.sb,hb:P.Oa.hb,ib:P.Oa.ib}},link:{node:{Ua:P.Na.Ua,Ta:P.Na.Ta,readlink:P.Na.readlink},stream:{}},ub:{node:{Ua:P.Na.Ua,
|
||||
Ta:P.Na.Ta},stream:Lb}});c=Mb(a,b,c,d);Q(c.mode)?(c.Na=P.Va.dir.node,c.Oa=P.Va.dir.stream,c.Ma={}):32768===(c.mode&61440)?(c.Na=P.Va.file.node,c.Oa=P.Va.file.stream,c.Sa=0,c.Ma=null):40960===(c.mode&61440)?(c.Na=P.Va.link.node,c.Oa=P.Va.link.stream):8192===(c.mode&61440)&&(c.Na=P.Va.ub.node,c.Oa=P.Va.ub.stream);c.timestamp=Date.now();a&&(a.Ma[b]=c);return c},Sb:function(a){if(a.Ma&&a.Ma.subarray){for(var b=[],c=0;c<a.Sa;++c)b.push(a.Ma[c]);return b}return a.Ma},Tb:function(a){return a.Ma?a.Ma.subarray?
|
||||
a.Ma.subarray(0,a.Sa):new Uint8Array(a.Ma):new Uint8Array(0)},vb:function(a,b){var c=a.Ma?a.Ma.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ma,a.Ma=new Uint8Array(b),0<a.Sa&&a.Ma.set(c.subarray(0,a.Sa),0))},Pb:function(a,b){if(a.Sa!=b)if(0==b)a.Ma=null,a.Sa=0;else{if(!a.Ma||a.Ma.subarray){var c=a.Ma;a.Ma=new Uint8Array(b);c&&a.Ma.set(c.subarray(0,Math.min(b,a.Sa)))}else if(a.Ma||(a.Ma=[]),a.Ma.length>b)a.Ma.length=b;else for(;a.Ma.length<b;)a.Ma.push(0);a.Sa=
|
||||
b}},Na:{Ua:function(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;Q(a.mode)?b.size=4096:32768===(a.mode&61440)?b.size=a.Sa:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.Gb=4096;b.blocks=Math.ceil(b.size/b.Gb);return b},Ta:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&P.Pb(a,
|
||||
b.size)},lookup:function(){throw Nb[44];},gb:function(a,b,c,d){return P.createNode(a,b,c,d)},rename:function(a,b,c){if(Q(a.mode)){try{var d=Ob(b,c)}catch(g){}if(d)for(var f in d.Ma)throw new O(55);}delete a.parent.Ma[a.name];a.name=c;b.Ma[c]=a;a.parent=b},unlink:function(a,b){delete a.Ma[b]},rmdir:function(a,b){var c=Ob(a,b),d;for(d in c.Ma)throw new O(55);delete a.Ma[b]},readdir:function(a){var b=[".",".."],c;for(c in a.Ma)a.Ma.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=P.createNode(a,
|
||||
b,41471,0);a.link=c;return a},readlink:function(a){if(40960!==(a.mode&61440))throw new O(28);return a.link}},Oa:{read:function(a,b,c,d,f){var g=a.node.Ma;if(f>=a.node.Sa)return 0;a=Math.min(a.node.Sa-f,d);if(8<a&&g.subarray)b.set(g.subarray(f,f+a),c);else for(d=0;d<a;d++)b[c+d]=g[f+d];return a},write:function(a,b,c,d,f,g){b.buffer===z.buffer&&(g=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Ma||a.Ma.subarray)){if(g)return a.Ma=b.subarray(c,c+d),a.Sa=d;if(0===a.Sa&&0===f)return a.Ma=
|
||||
b.slice(c,c+d),a.Sa=d;if(f+d<=a.Sa)return a.Ma.set(b.subarray(c,c+d),f),d}P.vb(a,f+d);if(a.Ma.subarray&&b.subarray)a.Ma.set(b.subarray(c,c+d),f);else for(g=0;g<d;g++)a.Ma[f+g]=b[c+g];a.Sa=Math.max(a.Sa,f+d);return d},Za:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.Sa);if(0>b)throw new O(28);return b},sb:function(a,b,c){P.vb(a.node,b+c);a.node.Sa=Math.max(a.node.Sa,b+c)},hb:function(a,b,c,d,f,g){assert(0===b);if(32768!==(a.node.mode&61440))throw new O(43);a=a.node.Ma;
|
||||
if(g&2||a.buffer!==Xa){if(0<d||d+c<a.length)a.subarray?a=a.subarray(d,d+c):a=Array.prototype.slice.call(a,d,d+c);d=!0;g=16384*Math.ceil(c/16384);for(b=ba(g);c<g;)z[b+c++]=0;c=b;if(!c)throw new O(48);z.set(a,c)}else d=!1,c=a.byteOffset;return{Ob:c,kb:d}},ib:function(a,b,c,d,f){if(32768!==(a.node.mode&61440))throw new O(43);if(f&2)return 0;P.Oa.write(a,b,0,d,c,!1);return 0}}},Pb=null,Qb={},S=[],Rb=1,T=null,Sb=!0,U={},O=null,Nb={};
|
||||
function V(a,b){a=Eb("/",a);b=b||{};if(!a)return{path:"",node:null};var c={wb:!0,rb:0},d;for(d in c)void 0===b[d]&&(b[d]=c[d]);if(8<b.rb)throw new O(32);a=yb(a.split("/").filter(function(n){return!!n}),!1);var f=Pb;c="/";for(d=0;d<a.length;d++){var g=d===a.length-1;if(g&&b.parent)break;f=Ob(f,a[d]);c=r(c+"/"+a[d]);f.ab&&(!g||g&&b.wb)&&(f=f.ab.root);if(!g||b.Ya)for(g=0;40960===(f.mode&61440);)if(f=Tb(c),c=Eb(zb(c),f),f=V(c,{rb:b.rb}).node,40<g++)throw new O(32);}return{path:c,node:f}}
|
||||
function Ub(a){for(var b;;){if(a===a.parent)return a=a.Wa.yb,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}}function Vb(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%T.length}function Wb(a){var b=Vb(a.parent.id,a.name);if(T[b]===a)T[b]=a.bb;else for(b=T[b];b;){if(b.bb===a){b.bb=a.bb;break}b=b.bb}}
|
||||
function Ob(a,b){var c;if(c=(c=Xb(a,"x"))?c:a.Na.lookup?0:2)throw new O(c,a);for(c=T[Vb(a.id,b)];c;c=c.bb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Na.lookup(a,b)}function Mb(a,b,c,d){a=new Yb(a,b,c,d);b=Vb(a.parent.id,a.name);a.bb=T[b];return T[b]=a}function Q(a){return 16384===(a&61440)}var Zb={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};
|
||||
function $b(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Xb(a,b){if(Sb)return 0;if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0}function ac(a,b){try{return Ob(a,b),20}catch(c){}return Xb(a,"wx")}function bc(a,b,c){try{var d=Ob(a,b)}catch(f){return f.Pa}if(a=Xb(a,"wx"))return a;if(c){if(!Q(d.mode))return 54;if(d===d.parent||"/"===Ub(d))return 10}else if(Q(d.mode))return 31;return 0}
|
||||
function cc(a){var b=4096;for(a=a||0;a<=b;a++)if(!S[a])return a;throw new O(33);}function dc(a,b){ec||(ec=function(){},ec.prototype={});var c=new ec,d;for(d in a)c[d]=a[d];a=c;b=cc(b);a.fd=b;return S[b]=a}var Lb={open:function(a){a.Oa=Qb[a.node.rdev].Oa;a.Oa.open&&a.Oa.open(a)},Za:function(){throw new O(70);}};function Hb(a,b){Qb[a]={Oa:b}}
|
||||
function fc(a,b){var c="/"===b,d=!b;if(c&&Pb)throw new O(10);if(!c&&!d){var f=V(b,{wb:!1});b=f.path;f=f.node;if(f.ab)throw new O(10);if(!Q(f.mode))throw new O(54);}b={type:a,Ub:{},yb:b,Mb:[]};a=a.Wa(b);a.Wa=b;b.root=a;c?Pb=a:f&&(f.ab=b,f.Wa&&f.Wa.Mb.push(b))}function da(a,b,c){var d=V(a,{parent:!0}).node;a=Ab(a);if(!a||"."===a||".."===a)throw new O(28);var f=ac(d,a);if(f)throw new O(f);if(!d.Na.gb)throw new O(63);return d.Na.gb(d,a,b,c)}function W(a,b){da(a,(void 0!==b?b:511)&1023|16384,0)}
|
||||
function hc(a,b,c){"undefined"===typeof c&&(c=b,b=438);da(a,b|8192,c)}function ic(a,b){if(!Eb(a))throw new O(44);var c=V(b,{parent:!0}).node;if(!c)throw new O(44);b=Ab(b);var d=ac(c,b);if(d)throw new O(d);if(!c.Na.symlink)throw new O(63);c.Na.symlink(c,b,a)}
|
||||
function ta(a){var b=V(a,{parent:!0}).node,c=Ab(a),d=Ob(b,c),f=bc(b,c,!1);if(f)throw new O(f);if(!b.Na.unlink)throw new O(63);if(d.ab)throw new O(10);try{U.willDeletePath&&U.willDeletePath(a)}catch(g){J("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.Na.unlink(b,c);Wb(d);try{if(U.onDeletePath)U.onDeletePath(a)}catch(g){J("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}}
|
||||
function Tb(a){a=V(a).node;if(!a)throw new O(44);if(!a.Na.readlink)throw new O(28);return Eb(Ub(a.parent),a.Na.readlink(a))}function jc(a,b){a=V(a,{Ya:!b}).node;if(!a)throw new O(44);if(!a.Na.Ua)throw new O(63);return a.Na.Ua(a)}function kc(a){return jc(a,!0)}function ea(a,b){var c;"string"===typeof a?c=V(a,{Ya:!0}).node:c=a;if(!c.Na.Ta)throw new O(63);c.Na.Ta(c,{mode:b&4095|c.mode&-4096,timestamp:Date.now()})}
|
||||
function lc(a){var b;"string"===typeof a?b=V(a,{Ya:!0}).node:b=a;if(!b.Na.Ta)throw new O(63);b.Na.Ta(b,{timestamp:Date.now()})}function mc(a,b){if(0>b)throw new O(28);var c;"string"===typeof a?c=V(a,{Ya:!0}).node:c=a;if(!c.Na.Ta)throw new O(63);if(Q(c.mode))throw new O(31);if(32768!==(c.mode&61440))throw new O(28);if(a=Xb(c,"w"))throw new O(a);c.Na.Ta(c,{size:b,timestamp:Date.now()})}
|
||||
function u(a,b,c,d){if(""===a)throw new O(44);if("string"===typeof b){var f=Zb[b];if("undefined"===typeof f)throw Error("Unknown file open mode: "+b);b=f}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var g=a;else{a=r(a);try{g=V(a,{Ya:!(b&131072)}).node}catch(n){}}f=!1;if(b&64)if(g){if(b&128)throw new O(20);}else g=da(a,c,0),f=!0;if(!g)throw new O(44);8192===(g.mode&61440)&&(b&=-513);if(b&65536&&!Q(g.mode))throw new O(54);if(!f&&(c=g?40960===(g.mode&61440)?32:Q(g.mode)&&
|
||||
("r"!==$b(b)||b&512)?31:Xb(g,$b(b)):44))throw new O(c);b&512&&mc(g,0);b&=-131713;d=dc({node:g,path:Ub(g),flags:b,seekable:!0,position:0,Oa:g.Oa,Rb:[],error:!1},d);d.Oa.open&&d.Oa.open(d);!e.logReadFiles||b&1||(Pc||(Pc={}),a in Pc||(Pc[a]=1,J("FS.trackingDelegate error on read file: "+a)));try{U.onOpenFile&&(g=0,1!==(b&2097155)&&(g|=1),0!==(b&2097155)&&(g|=2),U.onOpenFile(a,g))}catch(n){J("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+n.message)}return d}
|
||||
function ka(a){if(null===a.fd)throw new O(8);a.ob&&(a.ob=null);try{a.Oa.close&&a.Oa.close(a)}catch(b){throw b;}finally{S[a.fd]=null}a.fd=null}function Qc(a,b,c){if(null===a.fd)throw new O(8);if(!a.seekable||!a.Oa.Za)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.Oa.Za(a,b,c);a.Rb=[]}
|
||||
function Sc(a,b,c,d,f){if(0>d||0>f)throw new O(28);if(null===a.fd)throw new O(8);if(1===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.read)throw new O(28);var g="undefined"!==typeof f;if(!g)f=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.read(a,b,c,d,f);g||(a.position+=b);return b}
|
||||
function fa(a,b,c,d,f,g){if(0>d||0>f)throw new O(28);if(null===a.fd)throw new O(8);if(0===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.write)throw new O(28);a.seekable&&a.flags&1024&&Qc(a,0,2);var n="undefined"!==typeof f;if(!n)f=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.write(a,b,c,d,f,g);n||(a.position+=b);try{if(a.path&&U.onWriteToFile)U.onWriteToFile(a.path)}catch(t){J("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+t.message)}return b}
|
||||
function sa(a){var b={encoding:"binary"};b=b||{};b.flags=b.flags||"r";b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=u(a,b.flags);a=jc(a).size;var f=new Uint8Array(a);Sc(d,f,0,a,0);"utf8"===b.encoding?c=Va(f,0):"binary"===b.encoding&&(c=f);ka(d);return c}
|
||||
function Tc(){O||(O=function(a,b){this.node=b;this.Qb=function(c){this.Pa=c};this.Qb(a);this.message="FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(function(a){Nb[a]=new O(a);Nb[a].stack="<generic error, no stack>"}))}var Uc;function ca(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}
|
||||
function Vc(a,b,c){a=r("/dev/"+a);var d=ca(!!b,!!c);Wc||(Wc=64);var f=Wc++<<8|0;Hb(f,{open:function(g){g.seekable=!1},close:function(){c&&c.buffer&&c.buffer.length&&c(10)},read:function(g,n,t,w){for(var v=0,C=0;C<w;C++){try{var H=b()}catch(Y){throw new O(29);}if(void 0===H&&0===v)throw new O(6);if(null===H||void 0===H)break;v++;n[t+C]=H}v&&(g.node.timestamp=Date.now());return v},write:function(g,n,t,w){for(var v=0;v<w;v++)try{c(n[t+v])}catch(C){throw new O(29);}w&&(g.node.timestamp=Date.now());return v}});
|
||||
hc(a,d,f)}var Wc,X={},ec,Pc,Xc={};
|
||||
function Yc(a,b,c){try{var d=a(b)}catch(f){if(f&&f.node&&r(b)!==r(Ub(f.node)))return-54;throw f;}L[c>>2]=d.dev;L[c+4>>2]=0;L[c+8>>2]=d.ino;L[c+12>>2]=d.mode;L[c+16>>2]=d.nlink;L[c+20>>2]=d.uid;L[c+24>>2]=d.gid;L[c+28>>2]=d.rdev;L[c+32>>2]=0;M=[d.size>>>0,(N=d.size,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[c+40>>2]=M[0];L[c+44>>2]=M[1];L[c+48>>2]=4096;L[c+52>>2]=d.blocks;L[c+56>>2]=d.atime.getTime()/1E3|0;L[c+60>>2]=
|
||||
0;L[c+64>>2]=d.mtime.getTime()/1E3|0;L[c+68>>2]=0;L[c+72>>2]=d.ctime.getTime()/1E3|0;L[c+76>>2]=0;M=[d.ino>>>0,(N=d.ino,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[c+80>>2]=M[0];L[c+84>>2]=M[1];return 0}var Zc=void 0;function $c(){Zc+=4;return L[Zc-4>>2]}function Z(a){a=S[a];if(!a)throw new O(8);return a}var ad={};
|
||||
function bd(){if(!cd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xa||"./this.program"},b;for(b in ad)a[b]=ad[b];var c=[];for(b in a)c.push(b+"="+a[b]);cd=c}return cd}var cd,dd;za?dd=function(){var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:"undefined"!==typeof dateNow?dd=dateNow:dd=function(){return performance.now()};
|
||||
function ed(a){for(var b=dd();dd()-b<a/1E3;);}e._usleep=ed;function Yb(a,b,c,d){a||(a=this);this.parent=a;this.Wa=a.Wa;this.ab=null;this.id=Rb++;this.name=b;this.mode=c;this.Na={};this.Oa={};this.rdev=d}Object.defineProperties(Yb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}}});Tc();T=Array(4096);fc(P,"/");W("/tmp");W("/home");W("/home/web_user");
|
||||
(function(){W("/dev");Hb(259,{read:function(){return 0},write:function(b,c,d,f){return f}});hc("/dev/null",259);Gb(1280,Jb);Gb(1536,Kb);hc("/dev/tty",1280);hc("/dev/tty1",1536);var a=Db();Vc("random",a);Vc("urandom",a);W("/dev/shm");W("/dev/shm/tmp")})();W("/proc");W("/proc/self");W("/proc/self/fd");
|
||||
fc({Wa:function(){var a=Mb("/proc/self","fd",16895,73);a.Na={lookup:function(b,c){var d=S[+c];if(!d)throw new O(8);b={parent:null,Wa:{yb:"fake"},Na:{readlink:function(){return d.path}}};return b.parent=b}};return a}},"/proc/self/fd");function la(a,b){var c=Array(aa(a)+1);a=k(a,c,0,c.length);b&&(c.length=a);return c}ab.push({Hb:function(){fd()}});
|
||||
var id={b:function(a,b,c,d){K("Assertion failed: "+A(a)+", at: "+[b?A(b):"unknown filename",c,d?A(d):"unknown function"])},q:function(a,b){sb();a=new Date(1E3*L[a>>2]);L[b>>2]=a.getSeconds();L[b+4>>2]=a.getMinutes();L[b+8>>2]=a.getHours();L[b+12>>2]=a.getDate();L[b+16>>2]=a.getMonth();L[b+20>>2]=a.getFullYear()-1900;L[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);L[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;L[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();
|
||||
c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;L[b+32>>2]=a;a=L[xb()+(a?4:0)>>2];L[b+40>>2]=a;return b},z:function(a,b){try{a=A(a);if(b&-8)var c=-28;else{var d;(d=V(a,{Ya:!0}).node)?(a="",b&4&&(a+="r"),b&2&&(a+="w"),b&1&&(a+="x"),c=a&&Xb(d,a)?-2:0):c=-44}return c}catch(f){return"undefined"!==typeof X&&f instanceof O||K(f),-f.Pa}},i:function(a,b){try{return a=A(a),ea(a,b),0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},t:function(a){try{return a=A(a),
|
||||
lc(a),0}catch(b){return"undefined"!==typeof X&&b instanceof O||K(b),-b.Pa}},j:function(a,b){try{var c=S[a];if(!c)throw new O(8);ea(c.node,b);return 0}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),-d.Pa}},u:function(a){try{var b=S[a];if(!b)throw new O(8);lc(b.node);return 0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},c:function(a,b,c){Zc=c;try{var d=Z(a);switch(b){case 0:var f=$c();return 0>f?-28:u(d.path,d.flags,0,f).fd;case 1:case 2:return 0;case 3:return d.flags;
|
||||
case 4:return f=$c(),d.flags|=f,0;case 12:return f=$c(),La[f+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Bb(28),-1;default:return-28}}catch(g){return"undefined"!==typeof X&&g instanceof O||K(g),-g.Pa}},K:function(a,b){try{var c=Z(a);return Yc(jc,c.path,b)}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),-d.Pa}},v:function(a,b,c){try{var d=S[a];if(!d)throw new O(8);if(0===(d.flags&2097155))throw new O(28);mc(d.node,c);return 0}catch(f){return"undefined"!==typeof X&&
|
||||
f instanceof O||K(f),-f.Pa}},w:function(a,b){try{if(0===b)return-28;if(b<aa("/")+1)return-68;k("/",m,a,b);return a}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},s:function(){return 0},e:function(){return 42},J:function(a,b){try{return a=A(a),Yc(kc,a,b)}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},I:function(a,b){try{return a=A(a),a=r(a),"/"===a[a.length-1]&&(a=a.substr(0,a.length-1)),W(a,b),0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),
|
||||
-c.Pa}},G:function(a,b,c,d,f,g){try{a:{g<<=12;var n=!1;if(0!==(d&16)&&0!==a%16384)var t=-28;else{if(0!==(d&32)){var w=gd(16384,b);if(!w){t=-48;break a}hd(w,0,b);n=!0}else{var v=S[f];if(!v){t=-8;break a}var C=g;if(0!==(c&2)&&0===(d&2)&&2!==(v.flags&2097155))throw new O(2);if(1===(v.flags&2097155))throw new O(2);if(!v.Oa.hb)throw new O(43);var H=v.Oa.hb(v,a,b,C,c,d);w=H.Ob;n=H.kb}Xc[w]={Lb:w,Kb:b,kb:n,fd:f,Nb:c,flags:d,offset:g};t=w}}return t}catch(Y){return"undefined"!==typeof X&&Y instanceof O||K(Y),
|
||||
-Y.Pa}},H:function(a,b){try{if(-1===(a|0)||0===b)var c=-28;else{var d=Xc[a];if(d&&b===d.Kb){var f=S[d.fd];if(d.Nb&2){var g=d.flags,n=d.offset,t=m.slice(a,a+b);f&&f.Oa.ib&&f.Oa.ib(f,t,n,b,g)}Xc[a]=null;d.kb&&na(d.Lb)}c=0}return c}catch(w){return"undefined"!==typeof X&&w instanceof O||K(w),-w.Pa}},k:function(a,b,c){Zc=c;try{var d=A(a),f=$c();return u(d,b,f).fd}catch(g){return"undefined"!==typeof X&&g instanceof O||K(g),-g.Pa}},D:function(a,b,c){try{var d=Z(a);return Sc(d,z,b,c)}catch(f){return"undefined"!==
|
||||
typeof X&&f instanceof O||K(f),-f.Pa}},C:function(a,b,c){try{a=A(a);if(0>=c)var d=-28;else{var f=Tb(a),g=Math.min(c,aa(f)),n=z[b+g];k(f,m,b,c+1);z[b+g]=n;d=g}return d}catch(t){return"undefined"!==typeof X&&t instanceof O||K(t),-t.Pa}},E:function(a){try{a=A(a);var b=V(a,{parent:!0}).node,c=Ab(a),d=Ob(b,c),f=bc(b,c,!0);if(f)throw new O(f);if(!b.Na.rmdir)throw new O(63);if(d.ab)throw new O(10);try{U.willDeletePath&&U.willDeletePath(a)}catch(g){J("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+
|
||||
g.message)}b.Na.rmdir(b,c);Wb(d);try{if(U.onDeletePath)U.onDeletePath(a)}catch(g){J("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}return 0}catch(g){return"undefined"!==typeof X&&g instanceof O||K(g),-g.Pa}},g:function(a,b){try{return a=A(a),Yc(jc,a,b)}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},y:function(a){try{return a=A(a),ta(a),0}catch(b){return"undefined"!==typeof X&&b instanceof O||K(b),-b.Pa}},m:function(a,b,c){m.copyWithin(a,b,b+c)},
|
||||
d:function(a){a>>>=0;var b=m.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{Oa.grow(Math.min(2147483648,d)-Xa.byteLength+65535>>>16);Ya(Oa.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},o:function(a,b){var c=0;bd().forEach(function(d,f){var g=b+c;f=L[a+4*f>>2]=g;for(g=0;g<d.length;++g)z[f++>>0]=d.charCodeAt(g);z[f>>0]=0;c+=d.length+1});return 0},p:function(a,b){var c=
|
||||
bd();L[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});L[b>>2]=d;return 0},f:function(a){try{var b=Z(a);ka(b);return 0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),c.Pa}},n:function(a,b){try{var c=Z(a);z[b>>0]=c.tty?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),d.Pa}},l:function(a,b,c,d,f){try{var g=Z(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Qc(g,a,d);M=[g.position>>>
|
||||
0,(N=g.position,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[f>>2]=M[0];L[f+4>>2]=M[1];g.ob&&0===a&&0===d&&(g.ob=null);return 0}catch(n){return"undefined"!==typeof X&&n instanceof O||K(n),n.Pa}},x:function(a){try{var b=Z(a);return b.Oa&&b.Oa.fsync?-b.Oa.fsync(b):0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),c.Pa}},F:function(a,b,c,d){try{a:{for(var f=Z(a),g=a=0;g<c;g++){var n=fa(f,z,L[b+8*g>>2],L[b+(8*
|
||||
g+4)>>2],void 0);if(0>n){var t=-1;break a}a+=n}t=a}L[d>>2]=t;return 0}catch(w){return"undefined"!==typeof X&&w instanceof O||K(w),w.Pa}},h:function(a){var b=Date.now();L[a>>2]=b/1E3|0;L[a+4>>2]=b%1E3*1E3|0;return 0},a:Oa,A:function(a,b){if(0===a)return Bb(28),-1;var c=L[a>>2];a=L[a+4>>2];if(0>a||999999999<a||0>c)return Bb(28),-1;0!==b&&(L[b>>2]=0,L[b+4>>2]=0);return ed(1E6*c+a/1E3)},B:function(a){switch(a){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;
|
||||
case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;
|
||||
case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}Ab(28);return-1},
|
||||
L:function(a){var b=Date.now()/1E3|0;a&&(J[a>>2]=b);return b},r:function(a,b){if(b){var c=1E3*J[b+8>>2];c+=J[b+12>>2]/1E3}else c=Date.now();a=O(a);try{b=c;var d=W(a,{Wa:!0}).node;d.La.Ra(d,{timestamp:Math.max(b,c)});return 0}catch(f){a=f;if(!(a instanceof Q)){a+=" : ";a:{d=Error();if(!d.stack){try{throw Error();}catch(g){d=g}if(!d.stack){d="(no stack trace available)";break a}}d=d.stack.toString()}e.extraStackTrace&&(d+="\n"+e.extraStackTrace());d=ob(d);throw a+d;}Ab(a.Na);return-1}}};
|
||||
(function(){function a(f){e.asm=f.exports;Ja=e.asm.M;eb--;e.monitorRunDependencies&&e.monitorRunDependencies(eb);0==eb&&(null!==fb&&(clearInterval(fb),fb=null),gb&&(f=gb,gb=null,f()))}function b(f){a(f.instance)}function c(f){return mb().then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){F("failed to asynchronously prepare wasm: "+g);I(g)})}var d={a:fd};eb++;e.monitorRunDependencies&&e.monitorRunDependencies(eb);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return F("Module.instantiateWasm callback failed with error: "+
|
||||
f),!1}(function(){if(Ka||"function"!==typeof WebAssembly.instantiateStreaming||jb()||hb("file://")||"function"!==typeof fetch)return c(b);fetch(ib,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){F("wasm streaming compile failed: "+g);F("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
|
||||
var cd=e.___wasm_call_ctors=function(){return(cd=e.___wasm_call_ctors=e.asm.N).apply(null,arguments)},ed=e._memset=function(){return(ed=e._memset=e.asm.O).apply(null,arguments)};e._sqlite3_free=function(){return(e._sqlite3_free=e.asm.P).apply(null,arguments)};var Bb=e.___errno_location=function(){return(Bb=e.___errno_location=e.asm.Q).apply(null,arguments)};e._sqlite3_finalize=function(){return(e._sqlite3_finalize=e.asm.R).apply(null,arguments)};
|
||||
case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}Bb(28);return-1},
|
||||
L:function(a){var b=Date.now()/1E3|0;a&&(L[a>>2]=b);return b},r:function(a,b){if(b){var c=1E3*L[b+8>>2];c+=L[b+12>>2]/1E3}else c=Date.now();a=A(a);try{b=c;var d=V(a,{Ya:!0}).node;d.Na.Ta(d,{timestamp:Math.max(b,c)});return 0}catch(f){a=f;if(!(a instanceof O)){a+=" : ";a:{d=Error();if(!d.stack){try{throw Error();}catch(g){d=g}if(!d.stack){d="(no stack trace available)";break a}}d=d.stack.toString()}e.extraStackTrace&&(d+="\n"+e.extraStackTrace());d=ob(d);throw a+d;}Bb(a.Pa);return-1}}};
|
||||
(function(){function a(f){e.asm=f.exports;Ja=e.asm.M;eb--;e.monitorRunDependencies&&e.monitorRunDependencies(eb);0==eb&&(null!==fb&&(clearInterval(fb),fb=null),gb&&(f=gb,gb=null,f()))}function b(f){a(f.instance)}function c(f){return mb().then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){J("failed to asynchronously prepare wasm: "+g);K(g)})}var d={a:id};eb++;e.monitorRunDependencies&&e.monitorRunDependencies(eb);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return J("Module.instantiateWasm callback failed with error: "+
|
||||
f),!1}(function(){if(Ka||"function"!==typeof WebAssembly.instantiateStreaming||jb()||hb("file://")||"function"!==typeof fetch)return c(b);fetch(ib,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){J("wasm streaming compile failed: "+g);J("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
|
||||
var fd=e.___wasm_call_ctors=function(){return(fd=e.___wasm_call_ctors=e.asm.N).apply(null,arguments)},hd=e._memset=function(){return(hd=e._memset=e.asm.O).apply(null,arguments)};e._sqlite3_free=function(){return(e._sqlite3_free=e.asm.P).apply(null,arguments)};var Cb=e.___errno_location=function(){return(Cb=e.___errno_location=e.asm.Q).apply(null,arguments)};e._sqlite3_finalize=function(){return(e._sqlite3_finalize=e.asm.R).apply(null,arguments)};
|
||||
e._sqlite3_reset=function(){return(e._sqlite3_reset=e.asm.S).apply(null,arguments)};e._sqlite3_clear_bindings=function(){return(e._sqlite3_clear_bindings=e.asm.T).apply(null,arguments)};e._sqlite3_value_blob=function(){return(e._sqlite3_value_blob=e.asm.U).apply(null,arguments)};e._sqlite3_value_text=function(){return(e._sqlite3_value_text=e.asm.V).apply(null,arguments)};e._sqlite3_value_bytes=function(){return(e._sqlite3_value_bytes=e.asm.W).apply(null,arguments)};
|
||||
e._sqlite3_value_double=function(){return(e._sqlite3_value_double=e.asm.X).apply(null,arguments)};e._sqlite3_value_int=function(){return(e._sqlite3_value_int=e.asm.Y).apply(null,arguments)};e._sqlite3_value_type=function(){return(e._sqlite3_value_type=e.asm.Z).apply(null,arguments)};e._sqlite3_result_blob=function(){return(e._sqlite3_result_blob=e.asm._).apply(null,arguments)};e._sqlite3_result_double=function(){return(e._sqlite3_result_double=e.asm.$).apply(null,arguments)};
|
||||
e._sqlite3_result_error=function(){return(e._sqlite3_result_error=e.asm.aa).apply(null,arguments)};e._sqlite3_result_int=function(){return(e._sqlite3_result_int=e.asm.ba).apply(null,arguments)};e._sqlite3_result_int64=function(){return(e._sqlite3_result_int64=e.asm.ca).apply(null,arguments)};e._sqlite3_result_null=function(){return(e._sqlite3_result_null=e.asm.da).apply(null,arguments)};e._sqlite3_result_text=function(){return(e._sqlite3_result_text=e.asm.ea).apply(null,arguments)};
|
||||
e._sqlite3_step=function(){return(e._sqlite3_step=e.asm.fa).apply(null,arguments)};e._sqlite3_column_count=function(){return(e._sqlite3_column_count=e.asm.ga).apply(null,arguments)};e._sqlite3_data_count=function(){return(e._sqlite3_data_count=e.asm.ha).apply(null,arguments)};e._sqlite3_column_blob=function(){return(e._sqlite3_column_blob=e.asm.ia).apply(null,arguments)};e._sqlite3_column_bytes=function(){return(e._sqlite3_column_bytes=e.asm.ja).apply(null,arguments)};
|
||||
e._sqlite3_column_double=function(){return(e._sqlite3_column_double=e.asm.ka).apply(null,arguments)};e._sqlite3_column_text=function(){return(e._sqlite3_column_text=e.asm.la).apply(null,arguments)};e._sqlite3_column_type=function(){return(e._sqlite3_column_type=e.asm.ma).apply(null,arguments)};e._sqlite3_column_name=function(){return(e._sqlite3_column_name=e.asm.na).apply(null,arguments)};e._sqlite3_bind_blob=function(){return(e._sqlite3_bind_blob=e.asm.oa).apply(null,arguments)};
|
||||
e._sqlite3_bind_double=function(){return(e._sqlite3_bind_double=e.asm.pa).apply(null,arguments)};e._sqlite3_bind_int=function(){return(e._sqlite3_bind_int=e.asm.qa).apply(null,arguments)};e._sqlite3_bind_text=function(){return(e._sqlite3_bind_text=e.asm.ra).apply(null,arguments)};e._sqlite3_bind_parameter_index=function(){return(e._sqlite3_bind_parameter_index=e.asm.sa).apply(null,arguments)};e._sqlite3_errmsg=function(){return(e._sqlite3_errmsg=e.asm.ta).apply(null,arguments)};
|
||||
e._sqlite3_exec=function(){return(e._sqlite3_exec=e.asm.ua).apply(null,arguments)};e._sqlite3_prepare_v2=function(){return(e._sqlite3_prepare_v2=e.asm.va).apply(null,arguments)};e._sqlite3_changes=function(){return(e._sqlite3_changes=e.asm.wa).apply(null,arguments)};e._sqlite3_close_v2=function(){return(e._sqlite3_close_v2=e.asm.xa).apply(null,arguments)};e._sqlite3_create_function_v2=function(){return(e._sqlite3_create_function_v2=e.asm.ya).apply(null,arguments)};
|
||||
e._sqlite3_open=function(){return(e._sqlite3_open=e.asm.za).apply(null,arguments)};var Ta=e._malloc=function(){return(Ta=e._malloc=e.asm.Aa).apply(null,arguments)},ma=e._free=function(){return(ma=e._free=e.asm.Ba).apply(null,arguments)};e._RegisterExtensionFunctions=function(){return(e._RegisterExtensionFunctions=e.asm.Ca).apply(null,arguments)};
|
||||
var wb=e.__get_tzname=function(){return(wb=e.__get_tzname=e.asm.Da).apply(null,arguments)},ub=e.__get_daylight=function(){return(ub=e.__get_daylight=e.asm.Ea).apply(null,arguments)},tb=e.__get_timezone=function(){return(tb=e.__get_timezone=e.asm.Fa).apply(null,arguments)},na=e.stackSave=function(){return(na=e.stackSave=e.asm.Ga).apply(null,arguments)},ra=e.stackRestore=function(){return(ra=e.stackRestore=e.asm.Ha).apply(null,arguments)},u=e.stackAlloc=function(){return(u=e.stackAlloc=e.asm.Ia).apply(null,
|
||||
arguments)},dd=e._memalign=function(){return(dd=e._memalign=e.asm.Ja).apply(null,arguments)};e.cwrap=function(a,b,c,d){c=c||[];var f=c.every(function(g){return"number"===g});return"string"!==b&&f&&!d?Pa(a):function(){return Qa(a,b,c,arguments)}};e.stackSave=na;e.stackRestore=ra;e.stackAlloc=u;var gd;gb=function hd(){gd||id();gd||(gb=hd)};
|
||||
function id(){function a(){if(!gd&&(gd=!0,e.calledRun=!0,!Oa)){e.noFSInit||Rc||(Rc=!0,Qc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?Sc("stdin",e.stdin):hc("/dev/tty","/dev/stdin"),e.stdout?Sc("stdout",null,e.stdout):hc("/dev/tty","/dev/stdout"),e.stderr?Sc("stderr",null,e.stderr):hc("/dev/tty1","/dev/stderr"),m("/dev/stdin","r"),m("/dev/stdout","w"),m("/dev/stderr","w"));nb(ab);Rb=!1;nb(bb);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&
|
||||
(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();cb.unshift(b)}nb(cb)}}if(!(0<eb)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)db();nb($a);0<eb||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1);a()},1)):a())}}e.run=id;if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();noExitRuntime=!0;id();
|
||||
e._sqlite3_bind_double=function(){return(e._sqlite3_bind_double=e.asm.pa).apply(null,arguments)};e._sqlite3_bind_int=function(){return(e._sqlite3_bind_int=e.asm.qa).apply(null,arguments)};e._sqlite3_bind_text=function(){return(e._sqlite3_bind_text=e.asm.ra).apply(null,arguments)};e._sqlite3_bind_parameter_index=function(){return(e._sqlite3_bind_parameter_index=e.asm.sa).apply(null,arguments)};e._sqlite3_sql=function(){return(e._sqlite3_sql=e.asm.ta).apply(null,arguments)};
|
||||
e._sqlite3_normalized_sql=function(){return(e._sqlite3_normalized_sql=e.asm.ua).apply(null,arguments)};e._sqlite3_errmsg=function(){return(e._sqlite3_errmsg=e.asm.va).apply(null,arguments)};e._sqlite3_exec=function(){return(e._sqlite3_exec=e.asm.wa).apply(null,arguments)};e._sqlite3_prepare_v2=function(){return(e._sqlite3_prepare_v2=e.asm.xa).apply(null,arguments)};e._sqlite3_changes=function(){return(e._sqlite3_changes=e.asm.ya).apply(null,arguments)};
|
||||
e._sqlite3_close_v2=function(){return(e._sqlite3_close_v2=e.asm.za).apply(null,arguments)};e._sqlite3_create_function_v2=function(){return(e._sqlite3_create_function_v2=e.asm.Aa).apply(null,arguments)};e._sqlite3_open=function(){return(e._sqlite3_open=e.asm.Ba).apply(null,arguments)};var ba=e._malloc=function(){return(ba=e._malloc=e.asm.Ca).apply(null,arguments)},na=e._free=function(){return(na=e._free=e.asm.Da).apply(null,arguments)};
|
||||
e._RegisterExtensionFunctions=function(){return(e._RegisterExtensionFunctions=e.asm.Ea).apply(null,arguments)};
|
||||
var xb=e.__get_tzname=function(){return(xb=e.__get_tzname=e.asm.Fa).apply(null,arguments)},vb=e.__get_daylight=function(){return(vb=e.__get_daylight=e.asm.Ga).apply(null,arguments)},ub=e.__get_timezone=function(){return(ub=e.__get_timezone=e.asm.Ha).apply(null,arguments)},oa=e.stackSave=function(){return(oa=e.stackSave=e.asm.Ia).apply(null,arguments)},qa=e.stackRestore=function(){return(qa=e.stackRestore=e.asm.Ja).apply(null,arguments)},y=e.stackAlloc=function(){return(y=e.stackAlloc=e.asm.Ka).apply(null,
|
||||
arguments)},gd=e._memalign=function(){return(gd=e._memalign=e.asm.La).apply(null,arguments)};e.cwrap=function(a,b,c,d){c=c||[];var f=c.every(function(g){return"number"===g});return"string"!==b&&f&&!d?Qa(a):function(){return Ra(a,b,c,arguments)}};e.UTF8ToString=A;e.stackSave=oa;e.stackRestore=qa;e.stackAlloc=y;var jd;gb=function kd(){jd||ld();jd||(gb=kd)};
|
||||
function ld(){function a(){if(!jd&&(jd=!0,e.calledRun=!0,!Pa)){e.noFSInit||Uc||(Uc=!0,Tc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?Vc("stdin",e.stdin):ic("/dev/tty","/dev/stdin"),e.stdout?Vc("stdout",null,e.stdout):ic("/dev/tty","/dev/stdout"),e.stderr?Vc("stderr",null,e.stderr):ic("/dev/tty1","/dev/stderr"),u("/dev/stdin","r"),u("/dev/stdout","w"),u("/dev/stderr","w"));nb(ab);Sb=!1;nb(bb);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&
|
||||
(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();cb.unshift(b)}nb(cb)}}if(!(0<eb)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)db();nb($a);0<eb||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1);a()},1)):a())}}e.run=ld;if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();noExitRuntime=!0;ld();
|
||||
|
||||
|
||||
// The shell-pre.js and emcc-generated code goes above
|
||||
|
||||
@ -1,247 +0,0 @@
|
||||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// If the loader is already loaded, just stop.
|
||||
if (!self.define) {
|
||||
const singleRequire = name => {
|
||||
if (name !== 'require') {
|
||||
name = name + '.js';
|
||||
}
|
||||
let promise = Promise.resolve();
|
||||
if (!registry[name]) {
|
||||
|
||||
promise = new Promise(async resolve => {
|
||||
if ("document" in self) {
|
||||
const script = document.createElement("script");
|
||||
script.src = name;
|
||||
document.head.appendChild(script);
|
||||
script.onload = resolve;
|
||||
} else {
|
||||
importScripts(name);
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return promise.then(() => {
|
||||
if (!registry[name]) {
|
||||
throw new Error(`Module ${name} didn’t register its module`);
|
||||
}
|
||||
return registry[name];
|
||||
});
|
||||
};
|
||||
|
||||
const require = (names, resolve) => {
|
||||
Promise.all(names.map(singleRequire))
|
||||
.then(modules => resolve(modules.length === 1 ? modules[0] : modules));
|
||||
};
|
||||
|
||||
const registry = {
|
||||
require: Promise.resolve(require)
|
||||
};
|
||||
|
||||
self.define = (moduleName, depsNames, factory) => {
|
||||
if (registry[moduleName]) {
|
||||
// Module is already loading or loaded.
|
||||
return;
|
||||
}
|
||||
registry[moduleName] = Promise.resolve().then(() => {
|
||||
let exports = {};
|
||||
const module = {
|
||||
uri: location.origin + moduleName.slice(1)
|
||||
};
|
||||
return Promise.all(
|
||||
depsNames.map(depName => {
|
||||
switch(depName) {
|
||||
case "exports":
|
||||
return exports;
|
||||
case "module":
|
||||
return module;
|
||||
default:
|
||||
return singleRequire(depName);
|
||||
}
|
||||
})
|
||||
).then(deps => {
|
||||
const facValue = factory(...deps);
|
||||
if(!exports.default) {
|
||||
exports.default = facValue;
|
||||
}
|
||||
return exports;
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
define("./service-worker.js",['./workbox-3b8b670f'], function (workbox) { 'use strict';
|
||||
|
||||
/**
|
||||
* Welcome to your Workbox-powered service worker!
|
||||
*
|
||||
* You'll need to register this file in your web app.
|
||||
* See https://goo.gl/nhQhGp
|
||||
*
|
||||
* The rest of the code is auto-generated. Please don't update this file
|
||||
* directly; instead, make changes to your Workbox build configuration
|
||||
* and re-run your build process.
|
||||
* See https://goo.gl/2aRDsh
|
||||
*/
|
||||
|
||||
self.addEventListener('message', event => {
|
||||
if (event.data && event.data.type === 'SKIP_WAITING') {
|
||||
self.skipWaiting();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* The precacheAndRoute() method efficiently caches and responds to
|
||||
* requests for URLs in the manifest.
|
||||
* See https://goo.gl/S9QRab
|
||||
*/
|
||||
|
||||
workbox.precacheAndRoute([{
|
||||
"url": "bundle.js",
|
||||
"revision": "f2aa7987aaf0c1368bd16e29b26e0800"
|
||||
}, {
|
||||
"url": "html/abstractWindowTemplate.html",
|
||||
"revision": "00bb2496dac07a457654781fa8c6948c"
|
||||
}, {
|
||||
"url": "html/alphabeticListFragment.html",
|
||||
"revision": "05e1a0c8574de51e0de78277af030920"
|
||||
}, {
|
||||
"url": "html/changeUserSite.html",
|
||||
"revision": "b416ddd8f231490201243a26afa49ca8"
|
||||
}, {
|
||||
"url": "html/chooseDialog.html",
|
||||
"revision": "0171b83550d8a21f1332a5360c10baf5"
|
||||
}, {
|
||||
"url": "html/contactSite.html",
|
||||
"revision": "b8acb685882c2cb4a970e5a7615a5c5d"
|
||||
}, {
|
||||
"url": "html/container.html",
|
||||
"revision": "a7285c607fdacd912f47738462150efe"
|
||||
}, {
|
||||
"url": "html/credits.html",
|
||||
"revision": "efb301e087d02b5dcd97ecda45e661ca"
|
||||
}, {
|
||||
"url": "html/end.html",
|
||||
"revision": "8aa547874fa8716e1ddb8d29276dcc91"
|
||||
}, {
|
||||
"url": "html/forgotPasswordSite.html",
|
||||
"revision": "b063ea7614dce48ed6794400d34b135f"
|
||||
}, {
|
||||
"url": "html/impressum.html",
|
||||
"revision": "d0e2e95559a8820115ac92659e3d2590"
|
||||
}, {
|
||||
"url": "html/level.html",
|
||||
"revision": "481bf599c219a9f2d94eae4096fc6d79"
|
||||
}, {
|
||||
"url": "html/loginSite.html",
|
||||
"revision": "4d8c2f02ba16dbf38ad679827cbd62f2"
|
||||
}, {
|
||||
"url": "html/menu.html",
|
||||
"revision": "06cf7df2e0e4918542d0d83f21a1c2b0"
|
||||
}, {
|
||||
"url": "html/menuSite.html",
|
||||
"revision": "8dae573b1dcba5727f4bc598b1a09007"
|
||||
}, {
|
||||
"url": "html/navbar.html",
|
||||
"revision": "482d5ac8a3b6ea9ae3f06543d3eed977"
|
||||
}, {
|
||||
"url": "html/notAllowedSite.html",
|
||||
"revision": "2a65f4f3da6f1f508736bd63c3d093ea"
|
||||
}, {
|
||||
"url": "html/privacyPolicy.html",
|
||||
"revision": "f55a77320c0744ac684231107bd51012"
|
||||
}, {
|
||||
"url": "html/registrationSite.html",
|
||||
"revision": "5d732604002df8c6eb1f206709bc4b9a"
|
||||
}, {
|
||||
"url": "html/selectUserDialog.html",
|
||||
"revision": "3cd8fc58c0d2c6a260747475f861b855"
|
||||
}, {
|
||||
"url": "html/settings.html",
|
||||
"revision": "5a7cf19679ca839e4badd6624b6c35aa"
|
||||
}, {
|
||||
"url": "html/settingsSite.html",
|
||||
"revision": "c20c185a3dd15b8e5a62d9934f0402f5"
|
||||
}, {
|
||||
"url": "html/shareDialog.html",
|
||||
"revision": "49fd3d7553c48ecc11c3861afc0b0771"
|
||||
}, {
|
||||
"url": "html/swipeFragment.html",
|
||||
"revision": "3278efb5dd279a359cdd950fa002b234"
|
||||
}, {
|
||||
"url": "html/tabFragment.html",
|
||||
"revision": "733ad585b3927993d15cbd04e9c135da"
|
||||
}, {
|
||||
"url": "html/tutorialSite.html",
|
||||
"revision": "24b319cd6fbb2d54fa57fdf46176287a"
|
||||
}, {
|
||||
"url": "img/arrowLeft.svg",
|
||||
"revision": "6bbb4f0e313bb88cd0cc80c2b3cd36fc"
|
||||
}, {
|
||||
"url": "img/brightAndBeautifull__.mp3",
|
||||
"revision": "2b40fd6c076d254cf639f8f46819d5ca"
|
||||
}, {
|
||||
"url": "img/coin.png",
|
||||
"revision": "5b380862ff8349f6b4b8d5241893f508"
|
||||
}, {
|
||||
"url": "img/coinTower.png",
|
||||
"revision": "50cef0780a1affcd301c2c4be09ccb25"
|
||||
}, {
|
||||
"url": "img/errorIcon.png",
|
||||
"revision": "b48a01a1871b83b30c317f0fc4aed555"
|
||||
}, {
|
||||
"url": "img/help.png",
|
||||
"revision": "45a8dc0493279dc37f72f8026af5bc10"
|
||||
}, {
|
||||
"url": "img/logo.png",
|
||||
"revision": "5246599497de18a878951e1e98083493"
|
||||
}, {
|
||||
"url": "img/music.svg",
|
||||
"revision": "ce36074e94a8d19dfa383f98bd66a1f4"
|
||||
}, {
|
||||
"url": "img/settings.png",
|
||||
"revision": "c44ce577ac56632e53208833ff78e67f"
|
||||
}, {
|
||||
"url": "img/share.svg",
|
||||
"revision": "ac8fc0221ee400fc843090a834df7c9d"
|
||||
}, {
|
||||
"url": "img/single_coin_fall_on_concrete_.mp3",
|
||||
"revision": "7f0de4f503644a7fc14de7e307bbf722"
|
||||
}, {
|
||||
"url": "img/speaker.svg",
|
||||
"revision": "0d926850f1558dd431e1c6b10fe0c2ef"
|
||||
}, {
|
||||
"url": "img/telegram.svg",
|
||||
"revision": "e366fed4603e06142a2d6b8221be51b8"
|
||||
}, {
|
||||
"url": "img/whatsapp.svg",
|
||||
"revision": "0fa4092ac1f91a5390e74a3c2c03d5e3"
|
||||
}, {
|
||||
"url": "index.css",
|
||||
"revision": "6fc107452ad861200f8193f85e7709c2"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "5f8832bceb6eae4ba8126bf5b03e0d38"
|
||||
}, {
|
||||
"url": "scripts/localforage.js",
|
||||
"revision": "7e2a4110781376e372c538e67787773a"
|
||||
}, {
|
||||
"url": "scripts/sql-wasm.js",
|
||||
"revision": "7da4edc42b013dcff1b48e8c02867e26"
|
||||
}, {
|
||||
"url": "sql-wasm.wasm",
|
||||
"revision": "bff856e0a3429d33cfb88d20b7f9fcff"
|
||||
}], {});
|
||||
|
||||
});
|
||||
//# sourceMappingURL=service-worker.js.map
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
BIN
tests/misc/android/chromedriver_90
Executable file
BIN
tests/misc/android/chromedriver_90
Executable file
Binary file not shown.
@ -56,7 +56,7 @@ exports.config = {
|
||||
|
||||
appium: {
|
||||
args: {
|
||||
chromedriverExecutable: path.join(__dirname, "misc/chromedriver"),
|
||||
chromedriverExecutable: path.join(__dirname, "misc/android/chromedriver_90"),
|
||||
}
|
||||
},
|
||||
|
||||
@ -65,7 +65,7 @@ exports.config = {
|
||||
capabilities: [{
|
||||
automationName: "UiAutomator2",
|
||||
// automationName: "Espresso",
|
||||
chromedriverExecutable: path.join(__dirname, "misc/chromedriver"),
|
||||
chromedriverExecutable: path.join(__dirname, "misc/android/chromedriver_90"),
|
||||
|
||||
// For Android, Appium uses the first device it finds using "adb devices". So, this
|
||||
// string simply needs to be non-empty.
|
||||
@ -103,4 +103,4 @@ exports.config = {
|
||||
console.log("tearing down...");
|
||||
await Service.tearDown();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#export MODE=production
|
||||
export MODE=production
|
||||
export HOST_URI=https://wordRotator.silas.link/api/v1/
|
||||
export CONTACT_EMAIL=wordrotator@silas.link
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const webpack = require('webpack');
|
||||
const path = require("path");
|
||||
const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||
// const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||
|
||||
const os = require('os');
|
||||
const ifaces = os.networkInterfaces();
|
||||
@ -55,7 +55,7 @@ let moduleExports = {
|
||||
},
|
||||
|
||||
optimization: {
|
||||
// minimize: false,
|
||||
minimize: false,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
@ -90,8 +90,7 @@ let moduleExports = {
|
||||
//Delete www before every Build (to only have nessesary files)
|
||||
new CleanWebpackPlugin({cleanOnceBeforeBuildPatterns: ['**/*', '!**/.gitkeep']}),
|
||||
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve("./node_modules/sql.js/dist/sql-wasm.js"),
|
||||
to: "scripts/"
|
||||
@ -104,7 +103,7 @@ let moduleExports = {
|
||||
from: path.resolve("./node_modules/localforage/dist/localforage.js"),
|
||||
to: "scripts/"
|
||||
},]
|
||||
}),
|
||||
),
|
||||
|
||||
new webpack.NormalModuleReplacementPlugin(/typeorm$/, function (result) {
|
||||
result.request = result.request.replace(/typeorm/, "typeorm/browser");
|
||||
@ -114,6 +113,7 @@ let moduleExports = {
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'src/client/index.html'
|
||||
}),
|
||||
|
||||
new webpack.DefinePlugin({
|
||||
__HOST_ADDRESS__: "'" + (process.env.HOST_URI || ((process.env.HOST || ("http://" + getIp())) + ":" + (process.env.REQUEST_PORT || process.env.PORT || "3000") + "/api/v1/")) + "'",
|
||||
__SYNCHRONIZE_DB__: mode !== "production",
|
||||
@ -121,9 +121,9 @@ let moduleExports = {
|
||||
__CONTACT_EMAIL__: "'" + process.env.CONTACT_EMAIL + "'",
|
||||
}),
|
||||
|
||||
new WorkboxPlugin.GenerateSW({
|
||||
maximumFileSizeToCacheInBytes: 1024 * 1024 * 1024 * 5
|
||||
}),
|
||||
// new WorkboxPlugin.GenerateSW({
|
||||
// maximumFileSizeToCacheInBytes: 1024 * 1024 * 1024 * 5
|
||||
// }),
|
||||
|
||||
// new webpack.ProvidePlugin({
|
||||
// 'window.initSqlJs': path.join(__dirname, 'node_modules/sql.js/dist/sql-asm.js'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user