Commit 3b7acc0a authored by Jacob Durrant's avatar Jacob Durrant

Working code.

parents
node_modules
old_delme
.DS_Store
testing_openbabel
Porting process of Vina required no modification of the source code.
Vina source code only utilizes Boost libraries as dependencies.
Some parts of Boost libraries are header-only and require no preliminary compilation to include them with Emscripten-compiled projects.
However, those directly called by Vina were not the case.
Hence we had to compile them first as static libraries (for performance considerations).
Also, Vina code base had no modifications since 2011 and the project webpage mentions boost version 1.44 as the one they used for successful compilation.
Boost uses bjam/b2 building system for compilation and there were major changes in the compilation system since version 1.42.
Since we used boost version 1.41 for the compilation.
The following libraries had to be compiled: \emph{system, filesystem, serialization, program\_options and thread/pthread}.
Except for a small (insignificant) bugs with the boost code itself (mostly incompatibilities with C++11) the only “trick” here was to provide boost include files for emscripten.
We used emscripten version 1.38.48 and that required included headers to be linked/copied under \emph{<emsdk\_path>/fastcomp/emscripten/system/include/} The following command been used to compile boost libraries: ./bjam link=static variant=release threading=multi runtime-link=static thread program_options filesystem system serialization The resulting binaries (placed by bjam under <boost>/bin.v2/libs/<lib\_name>/build/gcc-1.38.48/release/link-static/runtime-link-static/threading-multi) had to be linked to em++ during the compilation process.
Since vina uses make to compile and build we modified Makefile to the following contents:
\hl{Also need to mention which browsers it works on.
Webassembly is supported in all major browsers except for Internet Explorer (https://developer.mozilla.org/en-US/docs/WebAssembly - see Browser compatibility). However, older versions of browsers have SharedArrayBuffer disabled since 5 January 2018. That is important since webina uses pthreads - i.\,e.~multithreading and SharedArray is mechanism that allows processes to exchange data. As of the time of writing SharedArrayBuffer is disabled in Mozilla browsers starting from version 52 and newer.
Good to mention Firefox not currently (why?) but that they plan to restore support soon.}
// There are a few variables and functions from vina.js that I want to easily
// access from here.
var WEBINA_Module;
// A shiv for decodeBase64.
var decodeBase64 = "function" == typeof atob ? atob : function (r) {
var e, t, a, i, n, o, f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", m = "", s = 0;
for (r = r.replace(/[^A-Za-z0-9\+\/\=]/g, ""); e = f.indexOf(r.charAt(s++)) << 2 | (i = f.indexOf(r.charAt(s++))) >> 4, t = (15 & i) << 4 | (n = f.indexOf(r.charAt(s++))) >> 2, a = (3 & n) << 6 | (o = f.indexOf(r.charAt(s++))), m += String.fromCharCode(e), 64 !== n && (m += String.fromCharCode(t)), 64 !== o && (m += String.fromCharCode(a)), s < r.length;)
return m;
};
// Make Webina global namespace.
var Webina = (function () {
return {
WEBINA_ENVIRONMENT_IS_NODE: window["WEBINA_ENVIRONMENT_IS_NODE"],
WEBINA_lengthBytesUTF8: window["WEBINA_lengthBytesUTF8"],
WEBINA_stringToUTF8Array: window["WEBINA_stringToUTF8Array"],
WEBINA_assert: window["WEBINA_assert"],
WEBINA_ASSERTIONS: 1,
WEBINA_DATA_URI_PREFIX: "data:application/octet-stream;base64,",
WEBINA_BASE_URL: "./",
FS: window["FS"],
start: function start(vinaParams, receptorPDBQTTxt, ligandPDBQTTxt, onDone, onError, baseUrl) {
if (baseUrl !== undefined) {
if (baseUrl.slice(baseUrl.length - 1) !== "/") {
baseUrl += "/";
}
this.WEBINA_BASE_URL = baseUrl;
console.log("Webina: Using baseUrl = " + baseUrl);
}
else {
console.warn("Webina: No baseUrl specified, so using the main directory ./");
}
if (onError === undefined) {
onError = function () {
console.log("Webina encountered an error! Does your browser support WebAssembly?");
};
}
// Create a module object for WASM.
WEBINA_Module = {
"preRun": [],
"postRun": [],
"stdOut": "",
"stdErr": "",
"print": function () {
return function (e) {
1 < arguments.length && (e = Array.prototype.slice.call(arguments).join(" ")),
window["WEBINA_Module"]["stdOut"] += e + "\n";
};
}(),
"printErr": function (e) {
// 1 < arguments.length && (e = Array.prototype.slice.call(arguments).join(" ")), console.error(e)
1 < arguments.length && (e = Array.prototype.slice.call(arguments).join(" ")),
window["WEBINA_Module"]["stdErr"] += e + "\n";
},
"setStatus": function (e) {
if (e === "") {
// This happens when it is done running.
if (onDone !== undefined) {
var outTxt = new TextDecoder("utf-8").decode(window["FS"]["readFile"]('ligand_out.pdbqt'));
var stdOut = window["WEBINA_Module"]["stdOut"];
var stdErr = window["WEBINA_Module"]["stdErr"];
onDone(outTxt, stdOut, stdErr);
}
}
},
"onError": onError,
"catchError": function (n) {
onError(n);
// throw n; // Don't throw the errr. You're catching it now.
},
"receptorPDBQTTxt": receptorPDBQTTxt,
"ligandPDBQTTxt": ligandPDBQTTxt
};
// Initialize the memory
var memoryInitializer = this.WEBINA_BASE_URL + "vina.html.mem";
memoryInitializer = WEBINA_Module["locateFile"] ? WEBINA_Module["locateFile"](memoryInitializer, "") : memoryInitializer, WEBINA_Module["memoryInitializerRequestURL"] = memoryInitializer;
var meminitXHR = WEBINA_Module["memoryInitializerRequest"] = new XMLHttpRequest;
meminitXHR.open("GET", memoryInitializer, !0), meminitXHR.responseType = "arraybuffer", meminitXHR.send(null);
if (vinaParams["receptor"] !== undefined) {
console.warn("Webina does not support Vina's --receptor parameter. Instead, pass the content of the receptor file as a string to the webina.start() function.");
}
if (vinaParams["receptor"] !== undefined) {
console.warn("Webina does not support Vina's --ligand parameter. Instead, pass the content of the ligand file as a string to the webina.start() function.");
}
// Receptor and ligand files are always the same.
WEBINA_Module['arguments'] = [
'--receptor', '/receptor.pdbqt',
'--ligand', '/ligand.pdbqt',
];
// For some reason, WebAssembly always uses one more processor
// than specified. Compensate for that here. But sometimes it
// doesn't, so commenting out... Confusing.
// if ((vinaParams["cpu"] !== undefined) && (vinaParams["cpu"] > 1)) {
// vinaParams["cpu"] = vinaParams["cpu"] - 1;
// }
// Add in the remaining values. Note that there is no validation here.
var paramNames = Object.keys(vinaParams);
var paramNamesLen = paramNames.length;
for (var i = 0; i < paramNamesLen; i++) {
var key = paramNames[i];
var val = vinaParams[key];
WEBINA_Module['arguments'].push('--' + key);
if (typeof (val) !== "boolean") {
WEBINA_Module['arguments'].push(String(val));
}
}
window["WEBINA_Module"] = WEBINA_Module;
var script = document.createElement("script");
script.src = this.WEBINA_BASE_URL + "vina.js";
document.body.appendChild(script);
},
isDataURI: function (r) {
return String.prototype.startsWith ? r.startsWith(this.WEBINA_DATA_URI_PREFIX) : 0 === r.indexOf(this.WEBINA_DATA_URI_PREFIX);
},
intArrayFromBase64: function (e) {
if ("boolean" == typeof this.WEBINA_ENVIRONMENT_IS_NODE && this.WEBINA_ENVIRONMENT_IS_NODE) {
var t;
try {
t = Buffer.from(e, "base64");
}
catch (r) {
t = new Buffer(e, "base64");
}
return new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
}
try {
for (var r = decodeBase64(e), a = new Uint8Array(r.length), i = 0; i < r.length; ++i)
a[i] = r.charCodeAt(i);
return a;
}
catch (r) {
throw new Error("Converting base64 string to bytes failed.");
}
},
// Not used?
tryParseAsDataURI: function (r) {
if (this.isDataURI(r))
return this.intArrayFromBase64(r.slice(this.WEBINA_DATA_URI_PREFIX.length));
},
// Not used?
intArrayFromString: function (r, e, t) {
var a = 0 < t ? t : this.WEBINA_lengthBytesUTF8(r) + 1, i = new Array(a), n = this.WEBINA_stringToUTF8Array(r, i, 0, i.length);
return e && (i.length = n), i;
},
// Not used?
intArrayToString: function (r) {
for (var e = [], t = 0; t < r.length; t++) {
var a = r[t];
255 < a && (this.WEBINA_ASSERTIONS && this.WEBINA_assert(!1, "Character code " + a + " (" + String.fromCharCode(a) + ") at offset " + t + " not in 0x00-0xFF."), a &= 255), e.push(String.fromCharCode(a));
}
return e.join("");
}
};
})();
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){a!=Array.prototype&&a!=Object.prototype&&(a[c]=b.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$jscomp.SymbolClass=function(a,c){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:c})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function a(b){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(b||"")+"_"+c++,b)}var c=0;return a}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
$jscomp.iteratorFromArray=function(a,c){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var b=0,d={next:function(){if(b<a.length){var e=b++;return{value:c(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};
$jscomp.polyfill=function(a,c,b,d){if(c){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];c=c(d);c!=d&&null!=c&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:c})}};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");
var WEBINA_Module,decodeBase64="function"==typeof atob?atob:function(a){var c,b,d,e,f,h,g="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(k++))<<2|(e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(k++)))>>4,b=(15&e)<<4|(f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(k++)))>>2,d=(3&f)<<6|(h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(k++))),
g+=String.fromCharCode(c),64!==f&&(g+=String.fromCharCode(b)),64!==h&&(g+=String.fromCharCode(d)),k<a.length;)return g},Webina=function(){return{WEBINA_ENVIRONMENT_IS_NODE:window.WEBINA_ENVIRONMENT_IS_NODE,WEBINA_lengthBytesUTF8:window.WEBINA_lengthBytesUTF8,WEBINA_stringToUTF8Array:window.WEBINA_stringToUTF8Array,WEBINA_assert:window.WEBINA_assert,WEBINA_ASSERTIONS:1,WEBINA_DATA_URI_PREFIX:"data:application/octet-stream;base64,",WEBINA_BASE_URL:"./",FS:window.FS,start:function(a,c,b,d,e,f){void 0!==
f?("/"!==f.slice(f.length-1)&&(f+="/"),this.WEBINA_BASE_URL=f,console.log("Webina: Using baseUrl = "+f)):console.warn("Webina: No baseUrl specified, so using the main directory ./");void 0===e&&(e=function(){console.log("Webina encountered an error! Does your browser support WebAssembly?")});WEBINA_Module={preRun:[],postRun:[],stdOut:"",stdErr:"",print:function(){return function(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments).join(" "));window.WEBINA_Module.stdOut+=a+"\n"}}(),printErr:function(a){1<
arguments.length&&(a=Array.prototype.slice.call(arguments).join(" "));window.WEBINA_Module.stdErr+=a+"\n"},setStatus:function(a){""===a&&void 0!==d&&(a=(new TextDecoder("utf-8")).decode(window.FS.readFile("ligand_out.pdbqt")),d(a,window.WEBINA_Module.stdOut,window.WEBINA_Module.stdErr))},onError:e,catchError:function(a){e(a)},receptorPDBQTTxt:c,ligandPDBQTTxt:b};c=this.WEBINA_BASE_URL+"vina.html.mem";c=WEBINA_Module.locateFile?WEBINA_Module.locateFile(c,""):c;WEBINA_Module.memoryInitializerRequestURL=
c;b=WEBINA_Module.memoryInitializerRequest=new XMLHttpRequest;b.open("GET",c,!0);b.responseType="arraybuffer";b.send(null);void 0!==a.receptor&&console.warn("Webina does not support Vina's --receptor parameter. Instead, pass the content of the receptor file as a string to the webina.start() function.");void 0!==a.receptor&&console.warn("Webina does not support Vina's --ligand parameter. Instead, pass the content of the ligand file as a string to the webina.start() function.");WEBINA_Module.arguments=
["--receptor","/receptor.pdbqt","--ligand","/ligand.pdbqt"];c=Object.keys(a);b=c.length;for(f=0;f<b;f++){var h=c[f],g=a[h];WEBINA_Module.arguments.push("--"+h);"boolean"!==typeof g&&WEBINA_Module.arguments.push(String(g))}window.WEBINA_Module=WEBINA_Module;a=document.createElement("script");a.src=this.WEBINA_BASE_URL+"vina.min.js";document.body.appendChild(a)},isDataURI:function(a){return String.prototype.startsWith?a.startsWith(this.WEBINA_DATA_URI_PREFIX):0===a.indexOf(this.WEBINA_DATA_URI_PREFIX)},
intArrayFromBase64:function(a){if("boolean"==typeof this.WEBINA_ENVIRONMENT_IS_NODE&&this.WEBINA_ENVIRONMENT_IS_NODE){try{var c=Buffer.from(a,"base64")}catch(e){c=new Buffer(a,"base64")}return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}try{var b=decodeBase64(a),d=new Uint8Array(b.length);for(a=0;a<b.length;++a)d[a]=b.charCodeAt(a);return d}catch(e){throw Error("Converting base64 string to bytes failed.");}},tryParseAsDataURI:function(a){if(this.isDataURI(a))return this.intArrayFromBase64(a.slice(this.WEBINA_DATA_URI_PREFIX.length))},
intArrayFromString:function(a,c,b){b=0<b?b:this.WEBINA_lengthBytesUTF8(a)+1;b=Array(b);a=this.WEBINA_stringToUTF8Array(a,b,0,b.length);return c&&(b.length=a),b},intArrayToString:function(a){for(var c=[],b=0;b<a.length;b++){var d=a[b];255<d&&(this.WEBINA_ASSERTIONS&&this.WEBINA_assert(!1,"Character code "+d+" ("+String.fromCharCode(d)+") at offset "+b+" not in 0x00-0xFF."),d&=255);c.push(String.fromCharCode(d))}return c.join("")}}}();
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
var threadInfoStruct=0,selfThreadId=0,parentThreadId=0,tempDoublePtr=0,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,buffer,DYNAMICTOP_PTR=0,DYNAMIC_BASE=0,noExitRuntime,PthreadWorkerInit={},__performance_now_clock_drift=0,WEBINA_Module={};function WEBINA_assert(a,b){a||abort("Assertion failed: "+b)}
this.addEventListener("error",function(a){if(-1!=a.message.indexOf("SimulateInfiniteLoop"))return a.preventDefault();var b=" in "+a.filename+":"+a.lineno+":"+a.colno;console.error("Pthread "+selfThreadId+" uncaught exception"+(a.filename||a.lineno||a.colno?b:"")+": "+a.message+". Error object:");console.error(a.error)});function threadPrintErr(){var a=Array.prototype.slice.call(arguments).join(" ");console.error(a);console.error(Error().stack)}
function threadAlert(){var a=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:a,threadId:selfThreadId})}var err=threadPrintErr;this.alert=threadAlert;function resetPrototype(a,b){a=Object.create(a.prototype);for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return a}WEBINA_Module.instantiateWasm=function(a,b){a=new WebAssembly.Instance(wasmModule,a);wasmModule=null;b(a);return a.exports};var wasmModule,wasmMemory;
this.onmessage=function(a){try{if("load"===a.data.cmd){tempDoublePtr=a.data.tempDoublePtr;DYNAMIC_BASE=a.data.DYNAMIC_BASE;DYNAMICTOP_PTR=a.data.DYNAMICTOP_PTR;WEBINA_Module.STACK_MAX=WEBINA_Module.STACKTOP=2147483647;wasmModule=a.data.wasmModule;wasmMemory=a.data.wasmMemory;buffer=wasmMemory.buffer;PthreadWorkerInit=a.data.PthreadWorkerInit;WEBINA_Module.ENVIRONMENT_IS_PTHREAD=!0;if("string"===typeof a.data.urlOrBlob)importScripts(a.data.urlOrBlob);else{var b=URL.createObjectURL(a.data.urlOrBlob);
importScripts(b);URL.revokeObjectURL(b)}"undefined"!==typeof FS&&"function"===typeof FS.createStandardStreams&&FS.createStandardStreams();postMessage({cmd:"loaded"})}else if("objectTransfer"===a.data.cmd)PThread.receiveObjectTransfer(a.data);else if("run"===a.data.cmd){__performance_now_clock_drift=performance.now()-a.data.time;threadInfoStruct=a.data.threadInfoStruct;__register_pthread_ptr(threadInfoStruct,0,0);selfThreadId=a.data.selfThreadId;parentThreadId=a.data.parentThreadId;var d=a.data.stackBase+
a.data.stackSize,e=a.data.stackBase;STACKTOP=STACK_BASE=e;STACK_MAX=d;WEBINA_assert(threadInfoStruct);WEBINA_assert(selfThreadId);WEBINA_assert(parentThreadId);WEBINA_assert(0!=STACK_BASE);WEBINA_assert(d>a.data.stackBase);WEBINA_assert(d>e);WEBINA_assert(a.data.stackBase===e);WEBINA_Module.establishStackSpace(a.data.stackBase,a.data.stackBase+a.data.stackSize);writeStackCookie();PThread.receiveObjectTransfer(a.data);PThread.setThreadStatus(_pthread_self(),1);try{var f=WEBINA_Module.dynCall_ii(a.data.start_routine,
a.data.arg);checkStackCookie()}catch(c){if("Canceled!"===c){PThread.threadCancel();return}if("SimulateInfiniteLoop"===c||"pthread_exit"===c)return;Atomics.store(HEAPU32,threadInfoStruct+4>>2,c instanceof ExitStatus?c.status:-2);Atomics.store(HEAPU32,threadInfoStruct+0>>2,1);if("function"!==typeof _emscripten_futex_wake)throw err("Thread Initialisation failed."),c;_emscripten_futex_wake(threadInfoStruct+0,2147483647);if(!(c instanceof ExitStatus))throw c;}noExitRuntime||PThread.threadExit(f)}else"cancel"===
a.data.cmd?threadInfoStruct&&0==PThread.thisThreadCancelState&&PThread.threadCancel():"setimmediate"!==a.data.target&&("processThreadQueue"===a.data.cmd?threadInfoStruct&&_emscripten_current_thread_process_queued_calls():(err("worker.min.js received unknown command "+a.data.cmd),console.error(a.data)))}catch(c){throw console.error("worker.min.js onmessage() captured an uncaught exception: "+c),console.error(c.stack),c;}};
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Webina</title>
<link href="vendors.2d1e57019b9e85a8e983.1.css" rel="stylesheet"><link href="styles.2d1e57019b9e85a8e983.3.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
<!-- <script src="https://code.jquery.com/jquery-1.12.4.js"></script> -->
<!-- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/web-streams-polyfill@2.0.2/dist/ponyfill.min.js"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/streamsaver@2.0.3/StreamSaver.min.js"></script> -->
<script src="Webina/Webina.min.js"></script>
<script src="vue.min.js"></script>
<script src="vuex.min.js"></script>
<script src="bootstrap-vue.min.js"></script>
<script type="text/javascript" src="runtime.2d1e57019b9e85a8e983.js"></script><script type="text/javascript" src="vendors.2d1e57019b9e85a8e983.js"></script><script type="text/javascript" src="app.2d1e57019b9e85a8e983.js"></script><script type="text/javascript" src="styles.2d1e57019b9e85a8e983.js"></script><script type="text/javascript" src="styles.css.2d1e57019b9e85a8e983.js"></script></body>
</html>
This diff is collapsed.
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 0: 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // run deferred modules from other chunks
/******/ checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ([]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
/***/ 1:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("+eM2");
__webpack_require__("LdiE");
__webpack_require__("GwUf");
module.exports = __webpack_require__("8Lv4");
/***/ }),
/***/ "8Lv4":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "GwUf":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ })
}]);
\ No newline at end of file
(function(){'use strict';(window.webpackJsonp=window.webpackJsonp||[]).push([[4],[],[[1,0,1,3]]]);}).call(this || window)
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
/**
* vuex v3.1.1
* (c) 2019 Evan You
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}var n=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},o={namespaced:{configurable:!0}};o.namespaced.get=function(){return!!this._rawModule.namespaced},n.prototype.addChild=function(t,e){this._children[t]=e},n.prototype.removeChild=function(t){delete this._children[t]},n.prototype.getChild=function(t){return this._children[t]},n.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},n.prototype.forEachChild=function(t){e(this._children,t)},n.prototype.forEachGetter=function(t){this._rawModule.getters&&e(this._rawModule.getters,t)},n.prototype.forEachAction=function(t){this._rawModule.actions&&e(this._rawModule.actions,t)},n.prototype.forEachMutation=function(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)},Object.defineProperties(n.prototype,o);var i,r=function(t){this.register([],t,!1)};r.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},r.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},r.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},r.prototype.register=function(t,o,i){var r=this;void 0===i&&(i=!0);var s=new n(o,i);0===t.length?this.root=s:this.get(t.slice(0,-1)).addChild(t[t.length-1],s);o.modules&&e(o.modules,function(e,n){r.register(t.concat(n),e,i)})},r.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var s=function(e){var n=this;void 0===e&&(e={}),!i&&"undefined"!=typeof window&&window.Vue&&d(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var s=e.strict;void 0===s&&(s=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new r(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new i;var a=this,c=this.dispatch,u=this.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=s;var h=this._modules.root.state;p(this,h,[],this._modules.root),f(this,h),o.forEach(function(t){return t(n)}),(void 0!==e.devtools?e.devtools:i.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",function(t){e.replaceState(t)}),e.subscribe(function(e,n){t.emit("vuex:mutation",e,n)}))}(this)},a={state:{configurable:!0}};function c(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),f(t,n,e)}function f(t,n,o){var r=t._vm;t.getters={};var s=t._wrappedGetters,a={};e(s,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var c=i.config.silent;i.config.silent=!0,t._vm=new i({data:{$$state:n},computed:a}),i.config.silent=c,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),r&&(o&&t._withCommit(function(){r._data.$$state=null}),i.nextTick(function(){return r.$destroy()}))}function p(t,e,n,o,r){var s=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a]=o),!s&&!r){var c=h(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){i.set(c,u,o.state)})}var f=o.context=function(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:o?t.commit:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){var n={},o=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),n}(t,e)}},state:{get:function(){return h(t.state,n)}}}),i}(t,a,n);o.forEachMutation(function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}(t,a+n,e,f)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,i=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e,i){var r,s=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e,i);return(r=s)&&"function"==typeof r.then||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):s})}(t,o,i,f)}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)}),o.forEachChild(function(o,i){p(t,e,n.concat(i),o,r)})}function h(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function l(t,e,n){var o;return null!==(o=t)&&"object"==typeof o&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function d(t){i&&t===i||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(i=t)}a.state.get=function(){return this._vm._data.$$state},a.state.set=function(t){},s.prototype.commit=function(t,e,n){var o=this,i=l(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(a,o.state)}))},s.prototype.dispatch=function(t,e){var n=this,o=l(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},s.prototype.subscribe=function(t){return c(t,this._subscribers)},s.prototype.subscribeAction=function(t){return c("function"==typeof t?{before:t}:t,this._actionSubscribers)},s.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},s.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),f(this,this.state)},s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=h(e.state,t.slice(0,-1));i.delete(n,t[t.length-1])}),u(this)},s.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(s.prototype,a);var m=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=w(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),v=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=w(this.$store,"mapMutations",t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),_=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||w(this.$store,"mapGetters",t))return this.$store.getters[i]},n[o].vuex=!0}),n}),y=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=w(this.$store,"mapActions",t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});function g(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function b(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function w(t,e,n){return t._modulesNamespaceMap[n]}return{Store:s,install:d,version:"3.1.1",mapState:m,mapMutations:v,mapGetters:_,mapActions:y,createNamespacedHelpers:function(t){return{mapState:m.bind(null,t),mapGetters:_.bind(null,t),mapMutations:v.bind(null,t),mapActions:y.bind(null,t)}}}});
\ No newline at end of file
This diff is collapsed.
{
"name": "webina",
"version": "1.0.0",
"description": "",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build_old": "utils/build/before.sh; webpack --config ./utils/webpack.configs/webpack.prod.js; utils/build/after_build.sh",
"build": "export NODE_OPTIONS=--max_old_space_size=4096; webpack --config ./utils/webpack.configs/webpack.prod.js",
"start": "utils/build/before.sh; webpack-dashboard -- webpack-dev-server --open --config ./utils/webpack.configs/webpack.dev.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/jquery": "^3.3.31",
"clean-webpack-plugin": "^3.0.0",
"closure-webpack-plugin": "^2.0.1",
"copy-webpack-plugin": "^5.0.4",
"css-loader": "^3.2.0",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"google-closure-compiler": "^20190929.0.0",
"html-webpack-plugin": "^3.2.0",
"jquery": "^3.4.1",
"mini-css-extract-plugin": "^0.8.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"raw-loader": "^3.1.0",
"style-loader": "^1.0.0",
"ts-loader": "^6.2.0",
"typescript": "^3.6.3",
"vuex": "^3.1.1",
"webpack": "^4.41.0",