New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mindsdb-js-sdk

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mindsdb-js-sdk - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

dist/mindsdb-sdk.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).MindsDB=e()}(this,function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};var e=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var n=function(t){if(Array.isArray(t)){for(var e=0,n=[];t.length>e;e++)n[e]=t[e];return n}};var r=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var o=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var a=function(t){return n(t)||r(t)||o()};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var u=i(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n,r){var o=Object.create((e&&e.prototype instanceof m?e:m).prototype),a=new j(r||[]);return o._invoke=function(t,e,n){var r=f;return function(o,a){if(r===l)throw Error("Generator is already running");if(r===h){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var u=L(i,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=l;var c=s(t,e,n);if("normal"===c.type){if(r=n.done?h:p,c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",l="executing",h="completed",d={};function m(){}function y(){}function v(){}var w={};w[a]=function(){return this};var g=Object.getPrototypeOf,b=g&&g(g(R([])));b&&b!==n&&r.call(b,a)&&(w=b);var x=v.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function E(t){var e;this._invoke=function(n,o){function a(){return new Promise(function(e,a){!function e(n,o,a,i){var u=s(t[n],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then(function(t){e("next",t,a,i)},function(t){e("throw",t,a,i)}):Promise.resolve(f).then(function(t){c.value=t,a(c)},function(t){return e("throw",t,a,i)})}i(u.arg)}(n,o,e,a)})}return e=e?e.then(a,a):a()}}function L(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function R(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:e,done:!0}}return y.prototype=x.constructor=v,v.constructor=y,v[u]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(E.prototype),E.prototype[i]=function(){return this},t.AsyncIterator=E,t.async=function(e,n,r,o){var a=new E(c(e,n,r,o));return t.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(x),x[u]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=R,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return o(i.catchLoc,!0);if(i.finallyLoc>this.prev)return o(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return o(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var a=o;break}}!a||"break"!==t&&"continue"!==t||a.tryLoc>e||e>a.finallyLoc||(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),c=i(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return t.exports=n="function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?function(t){return e(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n});function s(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}var f=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var a=t.apply(e,n);function i(t){s(a,r,o,i,u,"next",t)}function u(t){s(a,r,o,i,u,"throw",t)}i(void 0)})}},p=function(t,e){return function(){for(var n=[],r=0;n.length>r;r++)n[r]=arguments[r];return t.apply(e,n)}},l=Object.prototype.toString;function h(t){return"[object Array]"===l.call(t)}function d(t){return null!==t&&"object"==typeof t}function m(t){return"[object Function]"===l.call(t)}function y(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),h(t))for(var n=0,r=t.length;r>n;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var v={isArray:h,isArrayBuffer:function(t){return"[object ArrayBuffer]"===l.call(t)},isBuffer:function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:d,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===l.call(t)},isFile:function(t){return"[object File]"===l.call(t)},isBlob:function(t){return"[object Blob]"===l.call(t)},isFunction:m,isStream:function(t){return d(t)&&m(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:y,merge:function t(){var e={};function n(n,r){e[r]="object"==typeof e[r]&&"object"==typeof n?t(e[r],n):n}for(var r=0,o=arguments.length;o>r;r++)y(arguments[r],n);return e},extend:function(t,e,n){return y(e,function(e,r){t[r]=n&&"function"==typeof e?p(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}},w=function(t,e,n,r,o){return function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}(Error(t),e,n,r,o)};function g(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var b=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],x=v.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=v.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},k=v.isStandardBrowserEnv()?{write:function(t,e,n,r,o,a){var i=[];i.push(t+"="+encodeURIComponent(e)),v.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),v.isString(r)&&i.push("path="+r),v.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read:function(t){var e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},E=function(t){return new Promise(function(e,n){var r=t.data,o=t.headers;v.isFormData(r)&&delete o["Content-Type"];var a=new XMLHttpRequest;t.auth&&(o.Authorization="Basic "+btoa((t.auth.username||"")+":"+(t.auth.password||"")));if(a.open(t.method.toUpperCase(),function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(v.isURLSearchParams(e))r=""+e;else{var o=[];v.forEach(e,function(t,e){null!=t&&(v.isArray(t)?e+="[]":t=[t],v.forEach(t,function(t){v.isDate(t)?t=t.toISOString():v.isObject(t)&&(t=JSON.stringify(t)),o.push(g(e)+"="+g(t))}))}),r=o.join("&")}return r&&(t+=(-1===t.indexOf("?")?"?":"&")+r),t}(t.url,t.params,t.paramsSerializer),!0),a.timeout=t.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var r,o,i,u,c,s="getAllResponseHeaders"in a?(r=a.getAllResponseHeaders(),c={},r?(v.forEach(r.split("\n"),function(t){if(u=t.indexOf(":"),o=v.trim(t.substr(0,u)).toLowerCase(),i=v.trim(t.substr(u+1)),o){if(c[o]&&b.indexOf(o)>=0)return;c[o]="set-cookie"===o?(c[o]?c[o]:[]).concat([i]):c[o]?c[o]+", "+i:i}}),c):c):null;!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(w("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,{data:t.responseType&&"text"!==t.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:s,config:t,request:a}),a=null}},a.onerror=function(){n(w("Network Error",t,null,a)),a=null},a.ontimeout=function(){n(w("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",a)),a=null},v.isStandardBrowserEnv()){var i=k,u=(t.withCredentials||x(t.url))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;u&&(o[t.xsrfHeaderName]=u)}if("setRequestHeader"in a&&v.forEach(o,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:a.setRequestHeader(e,t)}),t.withCredentials&&(a.withCredentials=!0),t.responseType)try{a.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&a.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){a&&(a.abort(),n(t),a=null)}),void 0===r&&(r=null),a.send(r)})},L={"Content-Type":"application/x-www-form-urlencoded"};function _(t,e){!v.isUndefined(t)&&v.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var S,j={adapter:("undefined"!=typeof XMLHttpRequest?S=E:"undefined"!=typeof process&&(S=E),S),transformRequest:[function(t,e){return function(t,e){v.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}(e,"Content-Type"),v.isFormData(t)||v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t)?t:v.isArrayBufferView(t)?t.buffer:v.isURLSearchParams(t)?(_(e,"application/x-www-form-urlencoded;charset=utf-8"),""+t):v.isObject(t)?(_(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&300>t}};j.headers={common:{Accept:"application/json, text/plain, */*"}},v.forEach(["delete","get","head"],function(t){j.headers[t]={}}),v.forEach(["post","put","patch"],function(t){j.headers[t]=v.merge(L)});var R=j;function O(){this.handlers=[]}O.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},O.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},O.prototype.forEach=function(t){v.forEach(this.handlers,function(e){null!==e&&t(e)})};var C=O,T=function(t,e,n){return v.forEach(n,function(n){t=n(t,e)}),t},U=function(t){return!(!t||!t.__CANCEL__)};function A(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var P=function(t){var e,n;return A(t),t.baseURL&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t.url)&&(t.url=(e=t.baseURL,(n=t.url)?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e)),t.headers=t.headers||{},t.data=T(t.data,t.headers,t.transformRequest),t.headers=v.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),v.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||R.adapter)(t).then(function(e){return A(t),e.data=T(e.data,e.headers,t.transformResponse),e},function(e){return U(e)||(A(t),e&&e.response&&(e.response.data=T(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})};function N(t){this.defaults=t,this.interceptors={request:new C,response:new C}}N.prototype.request=function(t){"string"==typeof t&&(t=v.merge({url:arguments[0]},arguments[1])),(t=v.merge(R,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[P,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},v.forEach(["delete","get","head","options"],function(t){N.prototype[t]=function(e,n){return this.request(v.merge(n||{},{method:t,url:e}))}}),v.forEach(["post","put","patch"],function(t){N.prototype[t]=function(e,n,r){return this.request(v.merge(r||{},{method:t,url:e,data:n}))}});var F=N;function B(t){this.message=t}B.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},B.prototype.__CANCEL__=!0;var D=B;function q(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new D(t),e(n.reason))})}q.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},q.source=function(){var t;return{token:new q(function(e){t=e}),cancel:t}};var I=q;function G(t){var e=new F(t),n=p(F.prototype.request,e);return v.extend(n,F.prototype,e),v.extend(n,e),n}var H=G(R);H.Axios=F,H.create=function(t){return G(v.merge(R,t))},H.Cancel=D,H.CancelToken=I,H.isCancel=U,H.all=function(t){return Promise.all(t)},H.spread=function(t){return function(e){return t.apply(null,e)}};var z=H;z.default=H;var M=z,K=function(t,e){var n="";return t?(t.forEach(function(t,e){if(t.value){var r=encodeURIComponent(t.key)+"="+encodeURIComponent(t.value);n=n.concat(e>0?"&".concat(r):r)}}),"/"===e.slice(-1)&&(e=e.substring(0,e.length-1)),n.length>0?e+"?"+n:e):e},X={url:null,api:null,token:{key:"apiKey",value:null},version:.2},V=function(t){return new Q(t)},$=function(t){return new Y(t)},J=function(t,e){var n=window.URL.createObjectURL(new Blob([t.data])),r=document.createElement("a");r.href=n;var o=t.headers["content-disposition"],a=null;if(o){var i=o.match(/filename="?(.+)"?/);2===i.length&&(a=i[1])}if(!a&&e){var u=e.split("/"),c=u[u.length-1];u=c.split("\\"),a=c=u[u.length-1]}r.setAttribute("download",a=a||"unknown"),document.body.appendChild(r),r.click(),r.remove(),window.URL.revokeObjectURL(n)},Q=function n(r){var o=this;t(this,n),e(this,"loaded",!1),e(this,"name",""),e(this,"version",""),e(this,"is_active",!1),e(this,"data_source",""),e(this,"predict",null),e(this,"accuracy",0),e(this,"status",""),e(this,"train_end_at",null),e(this,"updated_at",null),e(this,"created_at",null),e(this,"data_preparation",null),e(this,"data_analysis",null),e(this,"model_analysis",null),e(this,"columns",null),e(this,"load",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/predictors/".concat(o.name)),t.next=4,X.api.get(r);case 4:return Object.assign(o,t.sent.data),t.abrupt("return",o);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"rename",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/predictors/".concat(e.oldName,"/rename?new_name=").concat(e.newName)),t.next=4,X.api.get(r);case 4:return t.abrupt("return",t.sent.data);case 6:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"loadColumns",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/predictors/".concat(o.name,"/columns")),t.next=4,X.api.get(r);case 4:return o.columns=t.sent.data,t.abrupt("return",o);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"learn",function(){var t=f(u.mark(function t(e,n){var r,i,c,s,f,p;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.dataSourceName,i=e.fromData,s={to_predict:e.toPredict},(c=e.kwargs)&&(s.kwargs=c),r?s.data_source_name=r:i&&(s.from_data=i),f=n?[].concat(a(n),[X.token]):[X.token],p=K(f,"/predictors/".concat(o.name)),t.next=8,X.api.put(p,s);case 8:return t.abrupt("return",t.sent.data);case 10:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()),e(this,"queryPredict",function(){var t=f(u.mark(function t(e,n){var r,i;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?[].concat(a(n),[X.token]):[X.token],i=K(r,"/predictors/".concat(o.name,"/predict")),t.next=4,X.api.post(i,{when:e});case 4:return t.abrupt("return",t.sent.data);case 6:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()),e(this,"delete",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/predictors/".concat(o.name)),t.next=4,X.api.delete(r);case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"upload",function(){var t=f(u.mark(function t(e,n,r){var o,i,c,s;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=r?[].concat(a(r),[X.token]):[X.token],(i=new FormData).append("file",e),c={onUploadProgress:function(t){n&&n(Math.round(100*t.loaded/t.total))}},s=K(o,"/predictors/upload"),t.next=7,X.api.post(s,i,c);case 7:case"end":return t.stop()}},t)}));return function(e,n,r){return t.apply(this,arguments)}}()),e(this,"download",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/predictors/".concat(o.name,"/download")),t.next=4,X.api.get(r,{responseType:"blob"});case 4:return J(t.sent),t.abrupt("return",o);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"getDownloadUrl",function(){return"".concat(X.url,"/predictors/").concat(o.name,"/download")}),Object.assign(this,r)},Y=function n(r){var o=this;t(this,n),e(this,"loaded",!1),e(this,"source_type","url"),e(this,"name",""),e(this,"source",""),e(this,"missed_files",!1),e(this,"created_at",null),e(this,"updated_at",null),e(this,"row_count",0),e(this,"columns",null),e(this,"data",null),e(this,"missedFileList",null),e(this,"load",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/datasources/".concat(o.name)),t.next=4,X.api.get(r);case 4:return Object.assign(o,t.sent.data),t.abrupt("return",o);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"upload",function(){var t=f(u.mark(function t(e,n,r){var i,c,s,f;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.source_type="file",o.source=e.name,i=r?[].concat(a(r),[X.token]):[X.token],(c=new FormData).append("name",o.name),c.append("source_type",o.source_type),c.append("source",o.source),c.append("file",e),s={onUploadProgress:function(t){n&&n(Math.round(100*t.loaded/t.total))}},f=K(i,"/datasources/".concat(o.name)),t.next=12,X.api.put(f,c,s);case 12:case"end":return t.stop()}},t)}));return function(e,n,r){return t.apply(this,arguments)}}()),e(this,"uploadFromUrl",function(){var t=f(u.mark(function t(e,n){var r,i,c;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o.source_type="url",o.source=e,r={name:o.name,source_type:o.source_type,source:o.source},i=n?[].concat(a(n),[X.token]):[X.token],c=K(i,"/datasources/".concat(o.name)),t.next=7,X.api.put(c,r);case 7:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()),e(this,"download",function(){var t=f(u.mark(function t(e){var n,r,i;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.getDownloadUrl(),r=e?[].concat(a(e),[X.token]):[X.token],i=K(r,n),t.next=5,X.api.get(i,{responseType:"blob"});case 5:return J(t.sent,o.source),t.abrupt("return",o);case 8:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"getDownloadUrl",function(){return"url"===o.source_type?o.source:"".concat(X.url,"/datasources/").concat(o.name,"/download")}),e(this,"delete",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/datasources/".concat(o.name)),t.next=4,X.api.delete(r);case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"loadData",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/datasources/".concat(o.name,"/data")),t.next=4,X.api.get(r);case 4:return o.data=t.sent.data,t.abrupt("return",o.data);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"loadDataQuality",function(){var t=f(u.mark(function t(e){var n,r,i,c;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/datasources/".concat(o.name,"/analyze")),t.next=4,X.api.get(r);case 4:i=t.sent;try{c=i.data.data_analysis.input_columns_metadata}catch(t){c=null}return o.dataQuality=c,t.abrupt("return",c);case 8:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"loadMissedFileList",function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/datasources/".concat(o.name,"/missed_files")),t.next=4,X.api.get(r);case 4:return o.missedFileList=t.sent.data,t.abrupt("return",o.missedFileList);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),e(this,"uploadFile",function(){var t=f(u.mark(function t(e,n){var r,i,c,s,f,p,l;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.column,i=e.rowIndex,c=e.extension,s=e.file,(f=new FormData).append("file",s),f.append("extension",c),p=n?[].concat(a(n),[X.token]):[X.token],l=K(p,"/datasources/".concat(o.name,"/files/").concat(r,":").concat(i)),t.next=8,X.api.put(l,f);case 8:return t.abrupt("return",200===t.sent.status);case 10:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()),Object.assign(this,r)};return{connect:function(t,e){X.token.value=e.find(function(t){return"apiKey"===t.key}).value,X.url=K([X.token],t),X.api=M.create({baseURL:t,timeout:2e4})},disconnect:function(){X.url=null,X.token={key:"apiKey",value:null},X.api=null},ping:function(){var t=f(u.mark(function t(e){var n,r;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=K([X.token],"/util/ping"),t.next=3,X.api.get(n);case 3:if(200!==(r=t.sent).status||"object"!==c(r.data)||"ok"!==r.data.status){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),predictors:function(){var t=f(u.mark(function t(e){var n,r,o;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/predictors"),t.next=4,X.api.get(r);case 4:return o=(t.sent.data||[]).map(V),t.abrupt("return",o);case 8:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),dataSources:function(){var t=f(u.mark(function t(e){var n,r,o;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(a(e),[X.token]):[X.token],r=K(n,"/datasources"),t.next=4,X.api.get(r);case 4:return o=(t.sent.data||[]).map($),t.abrupt("return",o);case 8:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),DataSource:$,Predictor:V}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).MindsDB=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};var e=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var n=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);e>n;n++)r[n]=t[n];return r};var r=function(t){if(Array.isArray(t))return n(t)};var o=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)};var a=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}};var i=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var u=function(t){return r(t)||o(t)||a(t)||i()};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var s=c((function(t){var e=function(t){var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function u(t,e,n,r){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new k(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return L()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var u=g(i,n);if(u){if(u===s)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=c(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===s)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function l(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,m=h&&h(h(E([])));m&&m!==e&&n.call(m,o)&&(d=m);var v=l.prototype=f.prototype=Object.create(d);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function w(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,u){var s=c(t[o],t,a);if("throw"!==s.type){var f=s.arg,p=f.value;return p&&"object"==typeof p&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(p).then((function(t){f.value=t,i(f)}),(function(t){return r("throw",t,i,u)}))}u(s.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function g(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=v.constructor=l,l.constructor=p,l[i]=p.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,i in t||(t[i]="GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},y(w.prototype),w.prototype[a]=function(){return this},t.AsyncIterator=w,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new w(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},y(v),v[i]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(this.prev>=a.tryLoc){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(a.catchLoc>this.prev)return r(a.catchLoc,!0);if(a.finallyLoc>this.prev)return r(a.finallyLoc)}else if(u){if(a.catchLoc>this.prev)return r(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(a.finallyLoc>this.prev)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var a=o;break}}!a||"break"!==t&&"continue"!==t||a.tryLoc>e||e>a.finallyLoc||(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;b(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})),f=c((function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));function p(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}var l=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){p(a,r,o,i,u,"next",t)}function u(t){p(a,r,o,i,u,"throw",t)}i(void 0)}))}},d=function(t,e){return function(){for(var n=Array(arguments.length),r=0;n.length>r;r++)n[r]=arguments[r];return t.apply(e,n)}},h=Object.prototype.toString;function m(t){return"[object Array]"===h.call(t)}function v(t){return null!==t&&"object"==typeof t}function y(t){return"[object Function]"===h.call(t)}function w(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),m(t))for(var n=0,r=t.length;r>n;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var g={isArray:m,isArrayBuffer:function(t){return"[object ArrayBuffer]"===h.call(t)},isBuffer:function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:v,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===h.call(t)},isFile:function(t){return"[object File]"===h.call(t)},isBlob:function(t){return"[object Blob]"===h.call(t)},isFunction:y,isStream:function(t){return v(t)&&y(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:w,merge:function t(){var e={};function n(n,r){e[r]="object"==typeof e[r]&&"object"==typeof n?t(e[r],n):n}for(var r=0,o=arguments.length;o>r;r++)w(arguments[r],n);return e},extend:function(t,e,n){return w(e,(function(e,r){t[r]=n&&"function"==typeof e?d(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}},x=function(t,e,n,r,o){return function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}(Error(t),e,n,r,o)};function b(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var k=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],E=g.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=g.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},L=g.isStandardBrowserEnv()?{write:function(t,e,n,r,o,a){var i=[];i.push(t+"="+encodeURIComponent(e)),g.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),g.isString(r)&&i.push("path="+r),g.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read:function(t){var e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},_=function(t){return new Promise((function(e,n){var r=t.data,o=t.headers;g.isFormData(r)&&delete o["Content-Type"];var a=new XMLHttpRequest;t.auth&&(o.Authorization="Basic "+btoa((t.auth.username||"")+":"+(t.auth.password||"")));if(a.open(t.method.toUpperCase(),function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(g.isURLSearchParams(e))r=""+e;else{var o=[];g.forEach(e,(function(t,e){null!=t&&(g.isArray(t)?e+="[]":t=[t],g.forEach(t,(function(t){g.isDate(t)?t=t.toISOString():g.isObject(t)&&(t=JSON.stringify(t)),o.push(b(e)+"="+b(t))})))})),r=o.join("&")}return r&&(t+=(-1===t.indexOf("?")?"?":"&")+r),t}(t.url,t.params,t.paramsSerializer),!0),a.timeout=t.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var r,o,i,u,c,s="getAllResponseHeaders"in a?(r=a.getAllResponseHeaders(),c={},r?(g.forEach(r.split("\n"),(function(t){if(u=t.indexOf(":"),o=g.trim(t.substr(0,u)).toLowerCase(),i=g.trim(t.substr(u+1)),o){if(c[o]&&k.indexOf(o)>=0)return;c[o]="set-cookie"===o?(c[o]?c[o]:[]).concat([i]):c[o]?c[o]+", "+i:i}})),c):c):null;!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(x("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,{data:t.responseType&&"text"!==t.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:s,config:t,request:a}),a=null}},a.onerror=function(){n(x("Network Error",t,null,a)),a=null},a.ontimeout=function(){n(x("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",a)),a=null},g.isStandardBrowserEnv()){var i=L,u=(t.withCredentials||E(t.url))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;u&&(o[t.xsrfHeaderName]=u)}if("setRequestHeader"in a&&g.forEach(o,(function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:a.setRequestHeader(e,t)})),t.withCredentials&&(a.withCredentials=!0),t.responseType)try{a.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&a.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){a&&(a.abort(),n(t),a=null)})),void 0===r&&(r=null),a.send(r)}))},S={"Content-Type":"application/x-www-form-urlencoded"};function j(t,e){!g.isUndefined(t)&&g.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var R,O={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process)&&(R=_),R),transformRequest:[function(t,e){return function(t,e){g.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}(e,"Content-Type"),g.isFormData(t)||g.isArrayBuffer(t)||g.isBuffer(t)||g.isStream(t)||g.isFile(t)||g.isBlob(t)?t:g.isArrayBufferView(t)?t.buffer:g.isURLSearchParams(t)?(j(e,"application/x-www-form-urlencoded;charset=utf-8"),""+t):g.isObject(t)?(j(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&300>t}};O.headers={common:{Accept:"application/json, text/plain, */*"}},g.forEach(["delete","get","head"],(function(t){O.headers[t]={}})),g.forEach(["post","put","patch"],(function(t){O.headers[t]=g.merge(S)}));var C=O;function A(){this.handlers=[]}A.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},A.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},A.prototype.forEach=function(t){g.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var U=A,T=function(t,e,n){return g.forEach(n,(function(n){t=n(t,e)})),t},N=function(t){return!(!t||!t.__CANCEL__)};function P(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var F=function(t){var e,n;return P(t),t.baseURL&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t.url)&&(t.url=(e=t.baseURL,(n=t.url)?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e)),t.headers=t.headers||{},t.data=T(t.data,t.headers,t.transformRequest),t.headers=g.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),g.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||C.adapter)(t).then((function(e){return P(t),e.data=T(e.data,e.headers,t.transformResponse),e}),(function(e){return N(e)||(P(t),e&&e.response&&(e.response.data=T(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))};function B(t){this.defaults=t,this.interceptors={request:new U,response:new U}}B.prototype.request=function(t){"string"==typeof t&&(t=g.merge({url:arguments[0]},arguments[1])),(t=g.merge(C,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[F,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},g.forEach(["delete","get","head","options"],(function(t){B.prototype[t]=function(e,n){return this.request(g.merge(n||{},{method:t,url:e}))}})),g.forEach(["post","put","patch"],(function(t){B.prototype[t]=function(e,n,r){return this.request(g.merge(r||{},{method:t,url:e,data:n}))}}));var D=B;function q(t){this.message=t}q.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},q.prototype.__CANCEL__=!0;var I=q;function G(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new I(t),e(n.reason))}))}G.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},G.source=function(){var t;return{token:new G((function(e){t=e})),cancel:t}};var H=G;function M(t){var e=new D(t),n=d(D.prototype.request,e);return g.extend(n,D.prototype,e),g.extend(n,e),n}var z=M(C);z.Axios=D,z.create=function(t){return M(g.merge(C,t))},z.Cancel=I,z.CancelToken=H,z.isCancel=N,z.all=function(t){return Promise.all(t)},z.spread=function(t){return function(e){return t.apply(null,e)}};var K=z;K.default=z;var X=K,$=function(t,e){var n="";return t?(t.forEach((function(t,e){if(t.value){var r=encodeURIComponent(t.key)+"="+encodeURIComponent(t.value);n=n.concat(e>0?"&".concat(r):r)}})),"/"===e.slice(-1)&&(e=e.substring(0,e.length-1)),n.length>0?e+"?"+n:e):e},V={url:null,api:null,token:{key:"apiKey",value:null},version:.2},J=function(t){return new W(t)},Q=function(t){return new Z(t)},Y=function(t,e){var n=window.URL.createObjectURL(new Blob([t.data])),r=document.createElement("a");r.href=n;var o=t.headers["content-disposition"],a=null;if(o){var i=o.match(/filename="?(.+)"?/);2===i.length&&(a=i[1])}if(!a&&e){var u=e.split("/"),c=u[u.length-1];u=c.split("\\"),a=c=u[u.length-1]}r.setAttribute("download",a=a||"unknown"),document.body.appendChild(r),r.click(),r.remove(),window.URL.revokeObjectURL(n)},W=function n(r){var o=this;t(this,n),e(this,"loaded",!1),e(this,"name",""),e(this,"version",""),e(this,"is_active",!1),e(this,"data_source",""),e(this,"predict",null),e(this,"accuracy",0),e(this,"status",""),e(this,"train_end_at",null),e(this,"updated_at",null),e(this,"created_at",null),e(this,"data_preparation",null),e(this,"data_analysis",null),e(this,"model_analysis",null),e(this,"columns",null),e(this,"load",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/predictors/".concat(o.name)),t.next=4,V.api.get(r);case 4:return Object.assign(o,t.sent.data),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"rename",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/predictors/".concat(e.oldName,"/rename?new_name=").concat(e.newName)),t.next=4,V.api.get(r);case 4:return t.abrupt("return",t.sent.data);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"loadColumns",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/predictors/".concat(o.name,"/columns")),t.next=4,V.api.get(r);case 4:return o.columns=t.sent.data,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"learn",function(){var t=l(s.mark((function t(e,n){var r,a,i,c,f,p;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.dataSourceName,a=e.fromData,c={to_predict:e.toPredict},(i=e.kwargs)&&(c.kwargs=i),r?c.data_source_name=r:a&&(c.from_data=a),f=n?[].concat(u(n),[V.token]):[V.token],p=$(f,"/predictors/".concat(o.name)),t.next=8,V.api.put(p,c);case 8:return t.abrupt("return",t.sent.data);case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),e(this,"queryPredict",function(){var t=l(s.mark((function t(e,n){var r,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?[].concat(u(n),[V.token]):[V.token],a=$(r,"/predictors/".concat(o.name,"/predict")),t.next=4,V.api.post(a,{when:e});case 4:return t.abrupt("return",t.sent.data);case 6:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),e(this,"delete",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/predictors/".concat(o.name)),t.next=4,V.api.delete(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"upload",function(){var t=l(s.mark((function t(e,n,r){var o,a,i,c;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=r?[].concat(u(r),[V.token]):[V.token],(a=new FormData).append("file",e),i={onUploadProgress:function(t){n&&n(Math.round(100*t.loaded/t.total))}},c=$(o,"/predictors/upload"),t.next=7,V.api.post(c,a,i);case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()),e(this,"download",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/predictors/".concat(o.name,"/download")),t.next=4,V.api.get(r,{responseType:"blob"});case 4:return Y(t.sent),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"getDownloadUrl",(function(){return"".concat(V.url,"/predictors/").concat(o.name,"/download")})),Object.assign(this,r)},Z=function n(r){var o=this;t(this,n),e(this,"loaded",!1),e(this,"source_type","url"),e(this,"name",""),e(this,"source",""),e(this,"missed_files",!1),e(this,"created_at",null),e(this,"updated_at",null),e(this,"row_count",0),e(this,"columns",null),e(this,"data",null),e(this,"missedFileList",null),e(this,"load",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/datasources/".concat(o.name)),t.next=4,V.api.get(r);case 4:return Object.assign(o,t.sent.data),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"upload",function(){var t=l(s.mark((function t(e,n,r){var a,i,c,f;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o.source_type="file",o.source=e.name,a=r?[].concat(u(r),[V.token]):[V.token],(i=new FormData).append("name",o.name),i.append("source_type",o.source_type),i.append("source",o.source),i.append("file",e),c={onUploadProgress:function(t){n&&n(Math.round(100*t.loaded/t.total))}},f=$(a,"/datasources/".concat(o.name)),t.next=12,V.api.put(f,i,c);case 12:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()),e(this,"uploadFromUrl",function(){var t=l(s.mark((function t(e,n){var r,a,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o.source_type="url",o.source=e,r={name:o.name,source_type:o.source_type,source:o.source},a=n?[].concat(u(n),[V.token]):[V.token],i=$(a,"/datasources/".concat(o.name)),t.next=7,V.api.put(i,r);case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),e(this,"download",function(){var t=l(s.mark((function t(e){var n,r,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.getDownloadUrl(),r=e?[].concat(u(e),[V.token]):[V.token],a=$(r,n),t.next=5,V.api.get(a,{responseType:"blob"});case 5:return Y(t.sent,o.source),t.abrupt("return",o);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"getDownloadUrl",(function(){return"url"===o.source_type?o.source:"".concat(V.url,"/datasources/").concat(o.name,"/download")})),e(this,"delete",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/datasources/".concat(o.name)),t.next=4,V.api.delete(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"loadData",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/datasources/".concat(o.name,"/data")),t.next=4,V.api.get(r);case 4:return o.data=t.sent.data,t.abrupt("return",o.data);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"loadDataQuality",function(){var t=l(s.mark((function t(e){var n,r,a,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/datasources/".concat(o.name,"/analyze")),t.next=4,V.api.get(r);case 4:a=t.sent;try{i=a.data.data_analysis.input_columns_metadata}catch(t){i=null}return o.dataQuality=i,t.abrupt("return",i);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"loadMissedFileList",function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/datasources/".concat(o.name,"/missed_files")),t.next=4,V.api.get(r);case 4:return o.missedFileList=t.sent.data,t.abrupt("return",o.missedFileList);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(this,"uploadFile",function(){var t=l(s.mark((function t(e,n){var r,a,i,c,f,p,l;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.column,a=e.rowIndex,i=e.extension,c=e.file,(f=new FormData).append("file",c),f.append("extension",i),p=n?[].concat(u(n),[V.token]):[V.token],l=$(p,"/datasources/".concat(o.name,"/files/").concat(r,":").concat(a)),t.next=8,V.api.put(l,f);case 8:return t.abrupt("return",200===t.sent.status);case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),Object.assign(this,r)};return{connect:function(t,e){V.token.value=e.find((function(t){return"apiKey"===t.key})).value,V.url=$([V.token],t),V.api=X.create({baseURL:t,timeout:2e4})},disconnect:function(){V.url=null,V.token={key:"apiKey",value:null},V.api=null},ping:function(){var t=l(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=$([V.token],"/util/ping"),t.next=3,V.api.get(n);case 3:if(200!==(r=t.sent).status||"object"!==f(r.data)||"ok"!==r.data.status){t.next=6;break}return t.abrupt("return",!0);case 6:return t.abrupt("return",!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),predictors:function(){var t=l(s.mark((function t(e){var n,r,o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/predictors"),t.next=4,V.api.get(r);case 4:return o=(t.sent.data||[]).map(J),t.abrupt("return",o);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),dataSources:function(){var t=l(s.mark((function t(e){var n,r,o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e?[].concat(u(e),[V.token]):[V.token],r=$(n,"/datasources"),t.next=4,V.api.get(r);case 4:return o=(t.sent.data||[]).map(Q),t.abrupt("return",o);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),DataSource:Q,Predictor:J}}));
import axios from 'axios';
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {

@@ -75,19 +77,32 @@ _typeof = function (obj) {

function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
}
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

@@ -148,8 +163,4 @@

var ping =
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(params) {
var ping = /*#__PURE__*/function () {
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(params) {
var request, response;

@@ -198,8 +209,4 @@ return regeneratorRuntime.wrap(function _callee$(_context) {

var predictors =
/*#__PURE__*/
function () {
var _ref2 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2(params) {
var predictors = /*#__PURE__*/function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(params) {
var mergeParams, request, response, rawData, predictorList;

@@ -234,8 +241,4 @@ return regeneratorRuntime.wrap(function _callee2$(_context2) {

var dataSources =
/*#__PURE__*/
function () {
var _ref3 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3(params) {
var dataSources = /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(params) {
var mergeParams, request, response, rawData, dataSourceList;

@@ -336,8 +339,4 @@ return regeneratorRuntime.wrap(function _callee3$(_context3) {

_defineProperty(this, "load",
/*#__PURE__*/
function () {
var _ref4 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee4(params) {
_defineProperty(this, "load", /*#__PURE__*/function () {
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(params) {
var mergeParams, request, response;

@@ -371,8 +370,4 @@ return regeneratorRuntime.wrap(function _callee4$(_context4) {

_defineProperty(this, "rename",
/*#__PURE__*/
function () {
var _ref5 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee5(params) {
_defineProperty(this, "rename", /*#__PURE__*/function () {
var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(params) {
var mergeParams, request, response;

@@ -405,8 +400,4 @@ return regeneratorRuntime.wrap(function _callee5$(_context5) {

_defineProperty(this, "loadColumns",
/*#__PURE__*/
function () {
var _ref6 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee6(params) {
_defineProperty(this, "loadColumns", /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(params) {
var mergeParams, request, response;

@@ -440,8 +431,4 @@ return regeneratorRuntime.wrap(function _callee6$(_context6) {

_defineProperty(this, "learn",
/*#__PURE__*/
function () {
var _ref8 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee7(_ref7, params) {
_defineProperty(this, "learn", /*#__PURE__*/function () {
var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_ref7, params) {
var dataSourceName, fromData, toPredict, kwargs, data, mergeParams, request, response;

@@ -489,8 +476,4 @@ return regeneratorRuntime.wrap(function _callee7$(_context7) {

_defineProperty(this, "queryPredict",
/*#__PURE__*/
function () {
var _ref9 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee8(when, params) {
_defineProperty(this, "queryPredict", /*#__PURE__*/function () {
var _ref9 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(when, params) {
var mergeParams, request, response;

@@ -525,8 +508,4 @@ return regeneratorRuntime.wrap(function _callee8$(_context8) {

_defineProperty(this, "delete",
/*#__PURE__*/
function () {
var _ref10 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee9(params) {
_defineProperty(this, "delete", /*#__PURE__*/function () {
var _ref10 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(params) {
var mergeParams, request;

@@ -555,8 +534,4 @@ return regeneratorRuntime.wrap(function _callee9$(_context9) {

_defineProperty(this, "upload",
/*#__PURE__*/
function () {
var _ref11 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee10(file, onProgress, params) {
_defineProperty(this, "upload", /*#__PURE__*/function () {
var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(file, onProgress, params) {
var mergeParams, fd, config, request;

@@ -595,8 +570,4 @@ return regeneratorRuntime.wrap(function _callee10$(_context10) {

_defineProperty(this, "download",
/*#__PURE__*/
function () {
var _ref12 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee11(params) {
_defineProperty(this, "download", /*#__PURE__*/function () {
var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(params) {
var mergeParams, request, response;

@@ -666,8 +637,4 @@ return regeneratorRuntime.wrap(function _callee11$(_context11) {

_defineProperty(this, "load",
/*#__PURE__*/
function () {
var _ref13 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee12(params) {
_defineProperty(this, "load", /*#__PURE__*/function () {
var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(params) {
var mergeParams, request, response;

@@ -701,8 +668,4 @@ return regeneratorRuntime.wrap(function _callee12$(_context12) {

_defineProperty(this, "upload",
/*#__PURE__*/
function () {
var _ref14 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee13(file, onProgress, params) {
_defineProperty(this, "upload", /*#__PURE__*/function () {
var _ref14 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(file, onProgress, params) {
var mergeParams, fd, config, request;

@@ -746,8 +709,4 @@ return regeneratorRuntime.wrap(function _callee13$(_context13) {

_defineProperty(this, "uploadFromUrl",
/*#__PURE__*/
function () {
var _ref15 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee14(url, params) {
_defineProperty(this, "uploadFromUrl", /*#__PURE__*/function () {
var _ref15 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(url, params) {
var data, mergeParams, request;

@@ -783,8 +742,4 @@ return regeneratorRuntime.wrap(function _callee14$(_context14) {

_defineProperty(this, "download",
/*#__PURE__*/
function () {
var _ref16 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee15(params) {
_defineProperty(this, "download", /*#__PURE__*/function () {
var _ref16 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(params) {
var url, mergeParams, request, response;

@@ -825,8 +780,4 @@ return regeneratorRuntime.wrap(function _callee15$(_context15) {

_defineProperty(this, "delete",
/*#__PURE__*/
function () {
var _ref17 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee16(params) {
_defineProperty(this, "delete", /*#__PURE__*/function () {
var _ref17 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(params) {
var mergeParams, request;

@@ -855,8 +806,4 @@ return regeneratorRuntime.wrap(function _callee16$(_context16) {

_defineProperty(this, "loadData",
/*#__PURE__*/
function () {
var _ref18 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee17(params) {
_defineProperty(this, "loadData", /*#__PURE__*/function () {
var _ref18 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(params) {
var mergeParams, request, response;

@@ -890,8 +837,4 @@ return regeneratorRuntime.wrap(function _callee17$(_context17) {

_defineProperty(this, "loadDataQuality",
/*#__PURE__*/
function () {
var _ref19 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee18(params) {
_defineProperty(this, "loadDataQuality", /*#__PURE__*/function () {
var _ref19 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18(params) {
var mergeParams, request, response, data;

@@ -932,8 +875,4 @@ return regeneratorRuntime.wrap(function _callee18$(_context18) {

_defineProperty(this, "loadMissedFileList",
/*#__PURE__*/
function () {
var _ref20 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee19(params) {
_defineProperty(this, "loadMissedFileList", /*#__PURE__*/function () {
var _ref20 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19(params) {
var mergeParams, request, response;

@@ -967,8 +906,4 @@ return regeneratorRuntime.wrap(function _callee19$(_context19) {

_defineProperty(this, "uploadFile",
/*#__PURE__*/
function () {
var _ref22 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee20(_ref21, params) {
_defineProperty(this, "uploadFile", /*#__PURE__*/function () {
var _ref22 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(_ref21, params) {
var column, rowIndex, extension, file, fd, mergeParams, request, response;

@@ -975,0 +910,0 @@ return regeneratorRuntime.wrap(function _callee20$(_context20) {

@@ -66,8 +66,4 @@ 'use strict';

var ping =
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee(params) {
var ping = /*#__PURE__*/function () {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
var request, response;

@@ -116,8 +112,4 @@ return _regeneratorRuntime.wrap(function _callee$(_context) {

var predictors =
/*#__PURE__*/
function () {
var _ref2 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee2(params) {
var predictors = /*#__PURE__*/function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(params) {
var mergeParams, request, response, rawData, predictorList;

@@ -152,8 +144,4 @@ return _regeneratorRuntime.wrap(function _callee2$(_context2) {

var dataSources =
/*#__PURE__*/
function () {
var _ref3 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee3(params) {
var dataSources = /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(params) {
var mergeParams, request, response, rawData, dataSourceList;

@@ -254,8 +242,4 @@ return _regeneratorRuntime.wrap(function _callee3$(_context3) {

_defineProperty(this, "load",
/*#__PURE__*/
function () {
var _ref4 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee4(params) {
_defineProperty(this, "load", /*#__PURE__*/function () {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(params) {
var mergeParams, request, response;

@@ -289,8 +273,4 @@ return _regeneratorRuntime.wrap(function _callee4$(_context4) {

_defineProperty(this, "rename",
/*#__PURE__*/
function () {
var _ref5 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee5(params) {
_defineProperty(this, "rename", /*#__PURE__*/function () {
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(params) {
var mergeParams, request, response;

@@ -323,8 +303,4 @@ return _regeneratorRuntime.wrap(function _callee5$(_context5) {

_defineProperty(this, "loadColumns",
/*#__PURE__*/
function () {
var _ref6 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee6(params) {
_defineProperty(this, "loadColumns", /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(params) {
var mergeParams, request, response;

@@ -358,8 +334,4 @@ return _regeneratorRuntime.wrap(function _callee6$(_context6) {

_defineProperty(this, "learn",
/*#__PURE__*/
function () {
var _ref8 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee7(_ref7, params) {
_defineProperty(this, "learn", /*#__PURE__*/function () {
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref7, params) {
var dataSourceName, fromData, toPredict, kwargs, data, mergeParams, request, response;

@@ -407,8 +379,4 @@ return _regeneratorRuntime.wrap(function _callee7$(_context7) {

_defineProperty(this, "queryPredict",
/*#__PURE__*/
function () {
var _ref9 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee8(when, params) {
_defineProperty(this, "queryPredict", /*#__PURE__*/function () {
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(when, params) {
var mergeParams, request, response;

@@ -443,8 +411,4 @@ return _regeneratorRuntime.wrap(function _callee8$(_context8) {

_defineProperty(this, "delete",
/*#__PURE__*/
function () {
var _ref10 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee9(params) {
_defineProperty(this, "delete", /*#__PURE__*/function () {
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(params) {
var mergeParams, request;

@@ -473,8 +437,4 @@ return _regeneratorRuntime.wrap(function _callee9$(_context9) {

_defineProperty(this, "upload",
/*#__PURE__*/
function () {
var _ref11 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee10(file, onProgress, params) {
_defineProperty(this, "upload", /*#__PURE__*/function () {
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(file, onProgress, params) {
var mergeParams, fd, config, request;

@@ -513,8 +473,4 @@ return _regeneratorRuntime.wrap(function _callee10$(_context10) {

_defineProperty(this, "download",
/*#__PURE__*/
function () {
var _ref12 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee11(params) {
_defineProperty(this, "download", /*#__PURE__*/function () {
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(params) {
var mergeParams, request, response;

@@ -584,8 +540,4 @@ return _regeneratorRuntime.wrap(function _callee11$(_context11) {

_defineProperty(this, "load",
/*#__PURE__*/
function () {
var _ref13 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee12(params) {
_defineProperty(this, "load", /*#__PURE__*/function () {
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
var mergeParams, request, response;

@@ -619,8 +571,4 @@ return _regeneratorRuntime.wrap(function _callee12$(_context12) {

_defineProperty(this, "upload",
/*#__PURE__*/
function () {
var _ref14 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee13(file, onProgress, params) {
_defineProperty(this, "upload", /*#__PURE__*/function () {
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(file, onProgress, params) {
var mergeParams, fd, config, request;

@@ -664,8 +612,4 @@ return _regeneratorRuntime.wrap(function _callee13$(_context13) {

_defineProperty(this, "uploadFromUrl",
/*#__PURE__*/
function () {
var _ref15 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee14(url, params) {
_defineProperty(this, "uploadFromUrl", /*#__PURE__*/function () {
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(url, params) {
var data, mergeParams, request;

@@ -701,8 +645,4 @@ return _regeneratorRuntime.wrap(function _callee14$(_context14) {

_defineProperty(this, "download",
/*#__PURE__*/
function () {
var _ref16 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee15(params) {
_defineProperty(this, "download", /*#__PURE__*/function () {
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(params) {
var url, mergeParams, request, response;

@@ -743,8 +683,4 @@ return _regeneratorRuntime.wrap(function _callee15$(_context15) {

_defineProperty(this, "delete",
/*#__PURE__*/
function () {
var _ref17 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee16(params) {
_defineProperty(this, "delete", /*#__PURE__*/function () {
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(params) {
var mergeParams, request;

@@ -773,8 +709,4 @@ return _regeneratorRuntime.wrap(function _callee16$(_context16) {

_defineProperty(this, "loadData",
/*#__PURE__*/
function () {
var _ref18 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee17(params) {
_defineProperty(this, "loadData", /*#__PURE__*/function () {
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(params) {
var mergeParams, request, response;

@@ -808,8 +740,4 @@ return _regeneratorRuntime.wrap(function _callee17$(_context17) {

_defineProperty(this, "loadDataQuality",
/*#__PURE__*/
function () {
var _ref19 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee18(params) {
_defineProperty(this, "loadDataQuality", /*#__PURE__*/function () {
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(params) {
var mergeParams, request, response, data;

@@ -850,8 +778,4 @@ return _regeneratorRuntime.wrap(function _callee18$(_context18) {

_defineProperty(this, "loadMissedFileList",
/*#__PURE__*/
function () {
var _ref20 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee19(params) {
_defineProperty(this, "loadMissedFileList", /*#__PURE__*/function () {
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(params) {
var mergeParams, request, response;

@@ -885,8 +809,4 @@ return _regeneratorRuntime.wrap(function _callee19$(_context19) {

_defineProperty(this, "uploadFile",
/*#__PURE__*/
function () {
var _ref22 = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee20(_ref21, params) {
_defineProperty(this, "uploadFile", /*#__PURE__*/function () {
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref21, params) {
var column, rowIndex, extension, file, fd, mergeParams, request, response;

@@ -893,0 +813,0 @@ return _regeneratorRuntime.wrap(function _callee20$(_context20) {

{
"name": "mindsdb-js-sdk",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",

@@ -46,3 +46,3 @@ "homepage": "https://github.com/mindsdb/mindsdb_sdks#readme",

"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-terser": "^4.0.4"
"rollup-plugin-terser": "^5.3.0"
},

@@ -49,0 +49,0 @@ "dependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc