text: //! AlaSQLN v0.4.11 | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
  !function(r,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():r.alasqlp=e()}(this,function(){function r(e,t,o){t=t||[],"function"==typeof t&&(scope=o,o=t,t=[]),"object"!=typeof t&&(t=[t]);var n=r.lastid++;r.buffer[n]=o,r.webworker.postMessage({id:n,sql:e,params:t})}if(r.options={},r.options.progress=function(){},isArray=function(r){return"[object Array]"===Object.prototype.toString.call(r)},r.promise=function(){throw new Error("Please include a Promise/A+ library")},"undefined"!=typeof Promise){var e=function(e,t,o,n){return new Promise(function(s,i){r(e,t,function(e,t){t?i(t):(o&&n&&!1!==r.options.progress&&r.options.progress(o,n),s(e))})})},t=function(r){if(!(r.length<1)){for(var t,o,n,s=[],i=0;i<r.length;i++){if(t=r[i],"string"==typeof t&&(t=[t]),!isArray(t)||t.length<1||2<t.length)throw new Error("Error in .promise parameter");o=t[0],n=t[1]||void 0,s.push(e(o,n,i,r.length))}return Promise.all(s)}};r.promise=function(r,o){if("undefined"==typeof Promise)throw new Error("Please include a Promise/A+ library");if("string"==typeof r)return e(r,o);if(!isArray(r)||r.length<1||void 0!==o)throw new Error("Error in .promise parameters");return t(r)}}if(!(r=r||!1))throw new Error("alasqlp was not found");return r.worker=function(){throw new Error("Can find webworker in this enviroment")},"undefined"!=typeof Worker&&(r.worker=function(e,t,o){if(!0===e&&(e=void 0),void 0===e)for(var n=document.getElementsByTagName("script"),s=0;s<n.length;s++){if("alasqlp-worker.js"===n[s].src.substr(-16).toLowerCase()){e=n[s].src.substr(0,n[s].src.length-16)+"alasqlp.js";break}if("alasqlp-worker.min.js"===n[s].src.substr(-20).toLowerCase()){e=n[s].src.substr(0,n[s].src.length-20)+"alasqlp.min.js";break}if("alasqlp.js"===n[s].src.substr(-9).toLowerCase()){e=n[s].src;break}if("alasqlp.min.js"===n[s].src.substr(-13).toLowerCase()){e=n[s].src.substr(0,n[s].src.length-13)+"alasqlp.min.js";break}}if(void 0===e)throw new Error("Path to alasqlp.js is not specified");if(!1!==e){var i="importScripts('";i+=e,i+="');self.onmessage = function(event) {alasqlp(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}";var a=new Blob([i],{type:"text/plain"});if(r.webworker=new Worker(URL.createObjectURL(a)),r.webworker.onmessage=function(e){var t=e.data.id;r.buffer[t](e.data.data),delete r.buffer[t]},r.webworker.onerror=function(r){throw r},arguments.length>1){r("REQUIRE "+t.map(function(r){return'"'+r+'"'}).join(","),[],o)}}else if(!1===e)return void delete r.webworker}),r.lastid=0,r.buffer={},r.worker(),r});