"use strict";(self.webpackChunknet_vis=self.webpackChunknet_vis||[]).push([[509],{509:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateVersion=t.parseGraphData=t.NetVisMimeRenderer=t.MIME_TYPE=t.mimeExtension=void 0;var a=n(634);Object.defineProperty(t,"mimeExtension",{enumerable:!0,get:function(){return o(a).default}}),Object.defineProperty(t,"MIME_TYPE",{enumerable:!0,get:function(){return a.MIME_TYPE}}),Object.defineProperty(t,"NetVisMimeRenderer",{enumerable:!0,get:function(){return a.NetVisMimeRenderer}}),Object.defineProperty(t,"parseGraphData",{enumerable:!0,get:function(){return a.parseGraphData}}),Object.defineProperty(t,"validateVersion",{enumerable:!0,get:function(){return a.validateVersion}}),i(n(686),t),i(n(797),t)},686:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{d(r.next(e))}catch(e){o(e)}}function s(e){try{d(r.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetVisRenderer=t.MIME_TYPE=void 0;const i=n(247),o=n(593);t.MIME_TYPE="application/vnd.netvis+json";class a extends i.Widget{constructor(e){super(),this._mimeType=e.mimeType,this.addClass("jp-NetVisRenderer")}renderModel(e){return r(this,void 0,void 0,function*(){try{const t=e.data[this._mimeType];if(!t||!t.data)throw new Error("Invalid MIME bundle: missing data field");const n=JSON.parse(t.data);if(!n.nodes||!n.links)throw new Error("Invalid graph data: missing nodes or links");if(n.nodes.length>0&&!n.nodes[0].id)throw new Error('Invalid graph data: nodes must have "id" field');this.node.textContent="",(0,o.renderGraph)(this.node,n)}catch(e){throw this.node.innerHTML=`\n        <div style="color: red; padding: 10px; border: 1px solid red; border-radius: 4px;">\n          <strong>NetVis Error:</strong><br/>\n          ${e.message||"Unknown error occurred"}\n        </div>\n      `,e}})}}t.NetVisRenderer=a},797:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MODULE_NAME=t.MODULE_VERSION=void 0;const r=n(330);t.MODULE_VERSION=r.version,t.MODULE_NAME=r.name}}]);