import{g as L}from"./@ui-core-DKdciH1Z.js";function w(h){throw new Error('Could not dynamically require "'+h+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var E={exports:{}},x;function M(){return x||(x=1,(function(h,C){(function(p){h.exports=p()})(function(){return(function(){function p(l,u,i){function y(a,b){if(!u[a]){if(!l[a]){var g=typeof w=="function"&&w;if(!b&&g)return g(a,!0);if(v)return v(a,!0);var o=new Error("Cannot find module '"+a+"'");throw o.code="MODULE_NOT_FOUND",o}var e=u[a]={exports:{}};l[a][0].call(e.exports,function(r){var t=l[a][1][r];return y(t||r)},e,e.exports,p,l,u,i)}return u[a].exports}for(var v=typeof w=="function"&&w,d=0;d<i.length;d++)y(i[d]);return y}return p})()({1:[function(p,l,u){Object.defineProperty(u,"__esModule",{value:!0}),u.default=void 0;function i(o){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(o)}function y(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function v(o,e){for(var r=0;r<e.length;r++){var t=e[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,a(t.key),t)}}function d(o,e,r){return e&&v(o.prototype,e),Object.defineProperty(o,"prototype",{writable:!1}),o}function a(o){var e=b(o,"string");return i(e)=="symbol"?e:e+""}function b(o,e){if(i(o)!="object"||!o)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var t=r.call(o,e);if(i(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}u.default=(function(){function o(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.defaultLayoutOptions,n=t===void 0?{}:t,s=r.algorithms,m=s===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking","vertiflex"]:s,f=r.workerFactory,c=r.workerUrl;if(y(this,o),this.defaultLayoutOptions=n,this.initialized=!1,typeof c>"u"&&typeof f>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var k=f;typeof c<"u"&&typeof f>"u"&&(k=function(j){return new Worker(j)});var _=k(c);if(typeof _.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new g(_),this.worker.postMessage({cmd:"register",algorithms:m}).then(function(O){return e.initialized=!0}).catch(console.err)}return d(o,[{key:"layout",value:function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.layoutOptions,s=n===void 0?this.defaultLayoutOptions:n,m=t.logging,f=m===void 0?!1:m,c=t.measureExecutionTime,k=c===void 0?!1:c;return r?this.worker.postMessage({cmd:"layout",graph:r,layoutOptions:s,options:{logging:f,measureExecutionTime:k}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])})();var g=(function(){function o(e){var r=this;if(y(this,o),e===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=e,this.worker.onmessage=function(t){setTimeout(function(){r.receive(r,t)},0)}}return d(o,[{key:"postMessage",value:function(r){var t=this.id||0;this.id=t+1,r.id=t;var n=this;return new Promise(function(s,m){n.resolvers[t]=function(f,c){f?(n.convertGwtStyleError(f),m(f)):s(c)},n.worker.postMessage(r)})}},{key:"receive",value:function(r,t){var n=t.data,s=r.resolvers[n.id];s&&(delete r.resolvers[n.id],n.error?s(n.error):s(null,n.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(r){if(r){var t=r.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(r.cause=t.cause.backingJsObject,this.convertGwtStyleError(r.cause)),delete r.__java$exception)}}}])})()},{}],2:[function(p,l,u){var i=p("./elk-api.js").default;Object.defineProperty(l.exports,"__esModule",{value:!0}),l.exports=i,i.default=i},{"./elk-api.js":1}]},{},[2])(2)})})(E)),E.exports}var P=M();const q=L(P),T="/assets/elk-worker.min-DGCccKuH.js";export{q as E,w as c,T as w};
