All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.vendor.altair.9-es2018.js Maven / Gradle / Ivy

(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{C2QD:function(t,e){function n(t){this.ms=(t=t||{}).min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},HsqM:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null!==t&&"object"==typeof t}},JPdj:function(t,e,n){"use strict";n.r(e),(function(t){var i,o=n("LjlU");i="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:t;var r=Object(o.a)(i);e.default=r}).call(this,n("3UD+")(t))},LjlU:function(t,e,n){"use strict";function i(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",function(){return i})},Nj7N:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(){throw new Error("Static Class")}return t.GQL_CONNECTION_INIT="connection_init",t.GQL_CONNECTION_ACK="connection_ack",t.GQL_CONNECTION_ERROR="connection_error",t.GQL_CONNECTION_KEEP_ALIVE="ka",t.GQL_CONNECTION_TERMINATE="connection_terminate",t.GQL_START="start",t.GQL_DATA="data",t.GQL_ERROR="error",t.GQL_COMPLETE="complete",t.GQL_STOP="stop",t.SUBSCRIPTION_START="subscription_start",t.SUBSCRIPTION_DATA="subscription_data",t.SUBSCRIPTION_SUCCESS="subscription_success",t.SUBSCRIPTION_FAIL="subscription_fail",t.SUBSCRIPTION_END="subscription_end",t.INIT="init",t.INIT_SUCCESS="init_success",t.INIT_FAIL="init_fail",t.KEEP_ALIVE="keepalive",t}()},Qcyp:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return"string"==typeof t}},Yzoe:function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0){var c=o.shift();c&&c.applyMiddleware.apply(r,[t,s])}else n(t)})()})},t.prototype.use=function(t){var e=this;return t.map(function(t){if("function"!=typeof t.applyMiddleware)throw new Error("Middleware must implement the applyMiddleware function.");e.middlewares.push(t)}),this},t.prototype.getConnectionParams=function(t){return function(){return new Promise(function(e,n){if("function"==typeof t)try{return e(t.call(null))}catch(i){return n(i)}e(t)})}},t.prototype.executeOperation=function(t,e){var n=this;null===this.client&&this.connect();var i=this.generateOperationId();return this.operations[i]={options:t,handler:e},this.applyMiddlewares(t).then(function(t){n.checkOperationOptions(t,e),n.operations[i]&&(n.operations[i]={options:t,handler:e},n.sendMessage(i,m.default.GQL_START,t))}).catch(function(t){n.unsubscribe(i),e(n.formatErrors(t))}),i},t.prototype.getObserver=function(t,e,n){return"function"==typeof t?{next:function(e){return t(e)},error:function(t){return e&&e(t)},complete:function(){return n&&n()}}:t},t.prototype.createMaxConnectTimeGenerator=function(){return new a({min:1e3,max:this.wsTimeout,factor:1.2})},t.prototype.clearCheckConnectionInterval=function(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)},t.prototype.clearMaxConnectTimeout=function(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)},t.prototype.clearTryReconnectTimeout=function(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)},t.prototype.clearInactivityTimeout=function(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)},t.prototype.setInactivityTimeout=function(){var t=this;this.inactivityTimeout>0&&0===Object.keys(this.operations).length&&(this.inactivityTimeoutId=setTimeout(function(){0===Object.keys(t.operations).length&&t.close()},this.inactivityTimeout))},t.prototype.checkOperationOptions=function(t,e){var n=t.query,i=t.variables,o=t.operationName;if(!n)throw new Error("Must provide a query.");if(!e)throw new Error("Must provide an handler.");if(!l.default(n)&&!f.getOperationAST(n,o)||o&&!l.default(o)||i&&!h.default(i))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")},t.prototype.buildMessage=function(t,e,n){return{id:t,type:e,payload:n&&n.query?i({},n,{query:"string"==typeof n.query?n.query:p.print(n.query)}):n}},t.prototype.formatErrors=function(t){return Array.isArray(t)?t:t&&t.errors?this.formatErrors(t.errors):t&&t.message?[t]:[{name:"FormatedError",message:"Unknown error",originalError:t}]},t.prototype.sendMessage=function(t,e,n){this.sendMessageRaw(this.buildMessage(t,e,n))},t.prototype.sendMessageRaw=function(t){switch(this.status){case this.wsImpl.OPEN:var e=JSON.stringify(t);try{JSON.parse(e)}catch(n){this.eventEmitter.emit("error",new Error("Message must be JSON-serializable. Got: "+t))}this.client.send(e);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(t);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(t)))}},t.prototype.generateOperationId=function(){return String(++this.nextOperationId)},t.prototype.tryReconnect=function(){var t=this;if(this.reconnect&&!(this.backoff.attempts>=this.reconnectionAttempts)){this.reconnecting||(Object.keys(this.operations).forEach(function(e){t.unsentMessagesQueue.push(t.buildMessage(e,m.default.GQL_START,t.operations[e].options))}),this.reconnecting=!0),this.clearTryReconnectTimeout();var e=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout(function(){t.connect()},e)}},t.prototype.flushUnsentMessagesQueue=function(){var t=this;this.unsentMessagesQueue.forEach(function(e){t.sendMessageRaw(e)}),this.unsentMessagesQueue=[]},t.prototype.checkConnection=function(){this.wasKeepAliveReceived?this.wasKeepAliveReceived=!1:this.reconnecting||this.close(!1,!0)},t.prototype.checkMaxConnectTimeout=function(){var t=this;this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout(function(){t.status!==t.wsImpl.OPEN&&(t.reconnecting=!0,t.close(!1,!0))},this.maxConnectTimeGenerator.duration())},t.prototype.connect=function(){var t=this;this.client=new this.wsImpl(this.url,this.wsProtocols),this.checkMaxConnectTimeout(),this.client.onopen=function(){return o(t,void 0,void 0,function(){var t,e;return r(this,function(n){switch(n.label){case 0:if(this.status!==this.wsImpl.OPEN)return[3,4];this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.connectionParams()];case 2:return t=n.sent(),this.sendMessage(void 0,m.default.GQL_CONNECTION_INIT,t),this.flushUnsentMessagesQueue(),[3,4];case 3:return e=n.sent(),this.sendMessage(void 0,m.default.GQL_CONNECTION_ERROR,e),this.flushUnsentMessagesQueue(),[3,4];case 4:return[2]}})})},this.client.onclose=function(){t.closedByUser||t.close(!1,!1)},this.client.onerror=function(e){t.eventEmitter.emit("error",e)},this.client.onmessage=function(e){t.processReceivedData(e.data)}},t.prototype.processReceivedData=function(t){var e,n;try{n=(e=JSON.parse(t)).id}catch(s){throw new Error("Message must be JSON-parseable. Got: "+t)}if(-1===[m.default.GQL_DATA,m.default.GQL_COMPLETE,m.default.GQL_ERROR].indexOf(e.type)||this.operations[n])switch(e.type){case m.default.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(e.payload);break;case m.default.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected"),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case m.default.GQL_COMPLETE:this.operations[n].handler(null,null),delete this.operations[n];break;case m.default.GQL_ERROR:this.operations[n].handler(this.formatErrors(e.payload),null),delete this.operations[n];break;case m.default.GQL_DATA:var o=e.payload.errors?i({},e.payload,{errors:this.formatErrors(e.payload.errors)}):e.payload;this.operations[n].handler(null,o);break;case m.default.GQL_CONNECTION_KEEP_ALIVE:var r=void 0===this.wasKeepAliveReceived;this.wasKeepAliveReceived=!0,r&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}else this.unsubscribe(n)},t.prototype.unsubscribe=function(t){this.operations[t]&&(delete this.operations[t],this.setInactivityTimeout(),this.sendMessage(t,m.default.GQL_STOP,void 0))},t}()},eiGN:function(t,e,n){"use strict";n.r(e),n.d(e,"WebsocketSubscriptionProvider",function(){return s});var i=n("1CyG"),o=n("Yzoe"),r=n("HDdC");class s extends i.a{createClient(){var t;this.client=new o.SubscriptionClient(this.subscriptionUrl,{reconnect:!0,connectionParams:this.connectionParams,connectionCallback:null===(t=this.extraOptions)||void 0===t?void 0:t.onConnected})}execute(t){if(this.createClient(),!this.client)throw new Error("Could not create subscription client!");return new r.a(e=>this.client.request({query:t.query,variables:t.variables,operationName:t.operationName}).subscribe({next:(...t)=>e.next(...t),error:(...t)=>e.error(...t),complete:()=>e.complete()}))}close(){var t,e;null===(t=this.client)||void 0===t||t.unsubscribeAll(),null===(e=this.client)||void 0===e||e.close(),this.client=void 0}}},jZto:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WS_TIMEOUT=3e4},uhBA:function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty,o="~";function r(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function c(t,e,n,i,r){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new s(n,i||t,r),a=o?o+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],c]:t._events[a].push(c):(t._events[a]=c,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function u(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(o=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=this._events[o?o+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,i=e.length,r=new Array(i);n




© 2015 - 2024 Weber Informatics LLC | Privacy Policy