@owox/web 0.24.0-next-20260429160913 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,243 @@
1
+ var Xi=Object.defineProperty;var Ji=(e,t,n)=>t in e?Xi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>Ji(e,typeof t!="symbol"?t+"":t,n);import{c as cn,g as Qi,t as Re,r as g,a as Le,R as xn,j as z,B as Xe,M as eo,b as to,h as no,d as ro,C as io,I as oo,E as ao,e as so,f as uo}from"./index-D5aLo6qw.js";/**
2
+ * @license lucide-react v0.475.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const co=[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}]],lo=cn("Locate",co);/**
7
+ * @license lucide-react v0.475.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const fo=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],po=cn("ZoomIn",fo);/**
12
+ * @license lucide-react v0.475.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const ho=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],vo=cn("ZoomOut",ho);function On(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function M(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(u){On(o,r,i,a,s,"next",u)}function s(u){On(o,r,i,a,s,"throw",u)}a(void 0)})}}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(e)}function mo(e,t){if(oe(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oe(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zr(e){var t=mo(e,"string");return oe(t)=="symbol"?t:t+""}function yo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zr(r.key),r)}}function B(e,t,n){return t&&yo(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function go(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ye(e,t){if(t&&(oe(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return go(e)}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},q(e)}function Gt(e,t){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Gt(e,t)}function ae(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gt(e,t)}function C(e,t,n){return(t=zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt={exports:{}},Ot={exports:{}},Sn;function Dr(){return Sn||(Sn=1,(function(e){function t(n,r){this.v=n,this.k=r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ot)),Ot.exports}var St={exports:{}},Ct={exports:{}},Cn;function Mr(){return Cn||(Cn=1,(function(e){function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch{a=0}e.exports=t=function(u,c,l,f){function d(p,h){t(u,p,function(y){return this._invoke(p,h,y)})}c?a?a(u,c,{value:l,enumerable:!f,configurable:!f,writable:!f}):u[c]=l:(d("next",0),d("throw",1),d("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ct)),Ct.exports}var $n;function Tr(){return $n||($n=1,(function(e){var t=Mr();function n(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var r,i,o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function u(v,k,m,b){var j=k&&k.prototype instanceof l?k:l,P=Object.create(j.prototype);return t(P,"_invoke",(function(I,O,E){var R,A,D,K=0,F=E||[],$=!1,S={p:0,n:0,v:r,a:_,f:_.bind(r,4),d:function(H,V){return R=H,A=0,D=r,S.n=V,c}};function _(x,H){for(A=x,D=H,i=0;!$&&K&&!V&&i<F.length;i++){var V,T=F[i],re=S.p,Y=T[2];x>3?(V=Y===H)&&(D=T[(A=T[4])?5:(A=3,3)],T[4]=T[5]=r):T[0]<=re&&((V=x<2&&re<T[1])?(A=0,S.v=H,S.n=T[1]):re<Y&&(V=x<3||T[0]>H||H>Y)&&(T[4]=x,T[5]=H,S.n=Y,A=0))}if(V||x>1)return c;throw $=!0,H}return function(x,H,V){if(K>1)throw TypeError("Generator is already running");for($&&H===1&&_(H,V),A=H,D=V;(i=A<2?r:D)||!$;){R||(A?A<3?(A>1&&(S.n=-1),_(A,D)):S.n=D:S.v=D);try{if(K=2,R){if(A||(x="next"),i=R[x]){if(!(i=i.call(R,D)))throw TypeError("iterator result is not an object");if(!i.done)return i;D=i.value,A<2&&(A=0)}else A===1&&(i=R.return)&&i.call(R),A<2&&(D=TypeError("The iterator does not provide a '"+x+"' method"),A=1);R=r}else if((i=($=S.n<0)?D:I.call(O,S))!==c)break}catch(T){R=r,A=1,D=T}finally{K=1}}return{value:i,done:$}}})(v,m,b),!0),P}var c={};function l(){}function f(){}function d(){}i=Object.getPrototypeOf;var p=[][a]?i(i([][a]())):(t(i={},a,function(){return this}),i),h=d.prototype=l.prototype=Object.create(p);function y(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,d):(v.__proto__=d,t(v,s,"GeneratorFunction")),v.prototype=Object.create(h),v}return f.prototype=d,t(h,"constructor",d),t(d,"constructor",f),f.displayName="GeneratorFunction",t(d,s,"GeneratorFunction"),t(h),t(h,s,"Generator"),t(h,a,function(){return this}),t(h,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:u,m:y}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(St)),St.exports}var $t={exports:{}},Pt={exports:{}},jt={exports:{}},Pn;function Lr(){return Pn||(Pn=1,(function(e){var t=Dr(),n=Mr();function r(i,o){function a(u,c,l,f){try{var d=i[u](c),p=d.value;return p instanceof t?o.resolve(p.v).then(function(h){a("next",h,l,f)},function(h){a("throw",h,l,f)}):o.resolve(p).then(function(h){d.value=h,l(d)},function(h){return a("throw",h,l,f)})}catch(h){f(h)}}var s;this.next||(n(r.prototype),n(r.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(u,c,l){function f(){return new o(function(d,p){a(u,l,d,p)})}return s=s?s.then(f,f):f()},!0)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(jt)),jt.exports}var jn;function Br(){return jn||(jn=1,(function(e){var t=Tr(),n=Lr();function r(i,o,a,s,u){return new n(t().w(i,o,a,s),u||Promise)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Pt)),Pt.exports}var _n;function bo(){return _n||(_n=1,(function(e){var t=Br();function n(r,i,o,a,s){var u=t(r,i,o,a,s);return u.next().then(function(c){return c.done?c.value:u.next()})}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})($t)),$t.exports}var _t={exports:{}},En;function wo(){return En||(En=1,(function(e){function t(n){var r=Object(n),i=[];for(var o in r)i.unshift(o);return function a(){for(;i.length;)if((o=i.pop())in r)return a.value=o,a.done=!1,a;return a.done=!0,a}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(_t)),_t.exports}var Et={exports:{}},Rt={exports:{}},Rn;function ko(){return Rn||(Rn=1,(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Rt)),Rt.exports}var In;function xo(){return In||(In=1,(function(e){var t=ko().default;function n(r){if(r!=null){var i=r[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],o=0;if(i)return i.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length))return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}}}throw new TypeError(t(r)+" is not iterable")}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Et)),Et.exports}var An;function Oo(){return An||(An=1,(function(e){var t=Dr(),n=Tr(),r=bo(),i=Br(),o=Lr(),a=wo(),s=xo();function u(){var c=n(),l=c.m(u),f=(Object.getPrototypeOf?Object.getPrototypeOf(l):l.__proto__).constructor;function d(y){var v=typeof y=="function"&&y.constructor;return!!v&&(v===f||(v.displayName||v.name)==="GeneratorFunction")}var p={throw:1,return:2,break:3,continue:3};function h(y){var v,k;return function(m){v||(v={stop:function(){return k(m.a,2)},catch:function(){return m.v},abrupt:function(j,P){return k(m.a,p[j],P)},delegateYield:function(j,P,I){return v.resultName=P,k(m.d,s(j),I)},finish:function(j){return k(m.f,j)}},k=function(j,P,I){m.p=v.prev,m.n=v.next;try{return j(P,I)}finally{v.next=m.n}}),v.resultName&&(v[v.resultName]=m.v,v.resultName=void 0),v.sent=m.v,v.next=m.n;try{return y.call(this,v)}finally{m.p=v.prev,m.n=v.next}}}return(e.exports=u=function(){return{wrap:function(k,m,b,j){return c.w(h(k),m,b,j&&j.reverse())},isGeneratorFunction:d,mark:c.m,awrap:function(k,m){return new t(k,m)},AsyncIterator:o,async:function(k,m,b,j,P){return(d(m)?i:r)(h(k),m,b,j,P)},keys:a,values:s}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports})(xt)),xt.exports}var It,Nn;function So(){if(Nn)return It;Nn=1;var e=Oo()();It=e;try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}return It}var Co=So();const w=Qi(Co);/*!
17
+ * rete v2.0.5
18
+ * (c) 2025 Vitaliy Stoliarov
19
+ * Released under the MIT license.
20
+ * */function $o(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Po(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Po(e,t){if(e){if(typeof e=="string")return zn(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zn(e,t):void 0}}function zn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jo(){return{debug:function(t){}}}var _o=(function(){function e(){L(this,e),C(this,"pipes",[])}return B(e,[{key:"addPipe",value:function(n){this.pipes.push(n)}},{key:"emit",value:(function(){var t=M(w.mark(function r(i){var o,a,s,u;return w.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:o=i,a=$o(this.pipes),l.prev=2,a.s();case 4:if((s=a.n()).done){l.next=13;break}return u=s.value,l.next=8,u(o);case 8:if(o=l.sent,!(typeof o>"u")){l.next=11;break}return l.abrupt("return");case 11:l.next=4;break;case 13:l.next=18;break;case 15:l.prev=15,l.t0=l.catch(2),a.e(l.t0);case 18:return l.prev=18,a.f(),l.finish(18);case 21:return l.abrupt("return",o);case 22:case"end":return l.stop()}},r,this,[[2,15,18,21]])}));function n(r){return t.apply(this,arguments)}return n})()}])})(),Ze=(function(){function e(t){L(this,e),C(this,"signal",new _o),this.name=t}return B(e,[{key:"addPipe",value:function(n){this.signal.addPipe(n)}},{key:"use",value:function(n){if(!(n instanceof e))throw new Error("cannot use non-Scope instance");return n.setParent(this),this.addPipe(function(r){return n.signal.emit(r)}),jo()}},{key:"setParent",value:function(n){this.parent=n}},{key:"emit",value:function(n){return this.signal.emit(n)}},{key:"hasParent",value:function(){return!!this.parent}},{key:"parentScope",value:function(n){if(!this.parent)throw new Error("cannot find parent");if(n&&this.parent instanceof n)return this.parent;if(n)throw new Error("actual parent is not instance of type");return this.parent}}])})();function Dn(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Eo(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Eo(e,t){if(e){if(typeof e=="string")return Mn(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mn(e,t):void 0}}function Mn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ro(e,t,n){return t=q(t),ye(e,Fr()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function Fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fr=function(){return!!e})()}var Pe=(function(e){function t(){var n;return L(this,t),n=Ro(this,t,["NodeEditor"]),C(n,"nodes",[]),C(n,"connections",[]),n}return ae(t,e),B(t,[{key:"getNode",value:function(r){return this.nodes.find(function(i){return i.id===r})}},{key:"getNodes",value:function(){return this.nodes.slice()}},{key:"getConnections",value:function(){return this.connections.slice()}},{key:"getConnection",value:function(r){return this.connections.find(function(i){return i.id===r})}},{key:"addNode",value:(function(){var n=M(w.mark(function i(o){return w.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!this.getNode(o.id)){s.next=2;break}throw new Error("node has already been added");case 2:return s.next=4,this.emit({type:"nodecreate",data:o});case 4:if(s.sent){s.next=6;break}return s.abrupt("return",!1);case 6:return this.nodes.push(o),s.next=9,this.emit({type:"nodecreated",data:o});case 9:return s.abrupt("return",!0);case 10:case"end":return s.stop()}},i,this)}));function r(i){return n.apply(this,arguments)}return r})()},{key:"addConnection",value:(function(){var n=M(w.mark(function i(o){return w.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!this.getConnection(o.id)){s.next=2;break}throw new Error("connection has already been added");case 2:return s.next=4,this.emit({type:"connectioncreate",data:o});case 4:if(s.sent){s.next=6;break}return s.abrupt("return",!1);case 6:return this.connections.push(o),s.next=9,this.emit({type:"connectioncreated",data:o});case 9:return s.abrupt("return",!0);case 10:case"end":return s.stop()}},i,this)}));function r(i){return n.apply(this,arguments)}return r})()},{key:"removeNode",value:(function(){var n=M(w.mark(function i(o){var a,s;return w.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(a=this.nodes.find(function(l){return l.id===o}),a){c.next=3;break}throw new Error("cannot find node");case 3:return c.next=5,this.emit({type:"noderemove",data:a});case 5:if(c.sent){c.next=7;break}return c.abrupt("return",!1);case 7:return s=this.nodes.indexOf(a),this.nodes.splice(s,1),c.next=11,this.emit({type:"noderemoved",data:a});case 11:return c.abrupt("return",!0);case 12:case"end":return c.stop()}},i,this)}));function r(i){return n.apply(this,arguments)}return r})()},{key:"removeConnection",value:(function(){var n=M(w.mark(function i(o){var a,s;return w.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(a=this.connections.find(function(l){return l.id===o}),a){c.next=3;break}throw new Error("cannot find connection");case 3:return c.next=5,this.emit({type:"connectionremove",data:a});case 5:if(c.sent){c.next=7;break}return c.abrupt("return",!1);case 7:return s=this.connections.indexOf(a),this.connections.splice(s,1),c.next=11,this.emit({type:"connectionremoved",data:a});case 11:return c.abrupt("return",!0);case 12:case"end":return c.stop()}},i,this)}));function r(i){return n.apply(this,arguments)}return r})()},{key:"clear",value:(function(){var n=M(w.mark(function i(){var o,a,s,u,c,l;return w.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.emit({type:"clear"});case 2:if(d.sent){d.next=6;break}return d.next=5,this.emit({type:"clearcancelled"});case 5:return d.abrupt("return",!1);case 6:o=Dn(this.connections.slice()),d.prev=7,o.s();case 9:if((a=o.n()).done){d.next=15;break}return s=a.value,d.next=13,this.removeConnection(s.id);case 13:d.next=9;break;case 15:d.next=20;break;case 17:d.prev=17,d.t0=d.catch(7),o.e(d.t0);case 20:return d.prev=20,o.f(),d.finish(20);case 23:u=Dn(this.nodes.slice()),d.prev=24,u.s();case 26:if((c=u.n()).done){d.next=32;break}return l=c.value,d.next=30,this.removeNode(l.id);case 30:d.next=26;break;case 32:d.next=37;break;case 34:d.prev=34,d.t1=d.catch(24),u.e(d.t1);case 37:return d.prev=37,u.f(),d.finish(37);case 40:return d.next=42,this.emit({type:"cleared"});case 42:return d.abrupt("return",!0);case 43:case"end":return d.stop()}},i,this,[[7,17,20,23],[24,34,37,40]])}));function r(){return n.apply(this,arguments)}return r})()}])})(Ze),At=globalThis.crypto;function je(){if("randomBytes"in At)return At.randomBytes(8).toString("hex");var e=At.getRandomValues(new Uint8Array(8)),t=Array.from(e),n=t.map(function(r){return r.toString(16).padStart(2,"0")});return n.join("")}function ln(e,t,n){return t=q(t),ye(e,Hr()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function Hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hr=function(){return!!e})()}var Io=B(function e(t){L(this,e),this.name=t}),dn=B(function e(t,n,r){L(this,e),this.socket=t,this.label=n,this.multipleConnections=r,this.id=je()}),Ao=(function(e){function t(n,r,i){var o;return L(this,t),o=ln(this,t,[n,r,i]),C(o,"control",null),C(o,"showControl",!0),o.socket=n,o.label=r,o.multipleConnections=i,o}return ae(t,e),B(t,[{key:"addControl",value:function(r){if(this.control)throw new Error("control already added for this input");this.control=r}},{key:"removeControl",value:function(){this.control=null}}])})(dn),No=(function(e){function t(n,r,i){return L(this,t),ln(this,t,[n,r,i!==!1])}return ae(t,e),B(t)})(dn),Vr=B(function e(){L(this,e),this.id=je()}),zo=(function(e){function t(n,r){var i,o;return L(this,t),o=ln(this,t),o.type=n,o.options=r,o.id=je(),o.readonly=(i=r==null?void 0:r.readonly)!==null&&i!==void 0?i:!1,typeof(r==null?void 0:r.initial)<"u"&&(o.value=r.initial),o}return ae(t,e),B(t,[{key:"setValue",value:function(r){var i;this.value=r,(i=this.options)!==null&&i!==void 0&&i.change&&this.options.change(r)}}])})(Vr),Do=(function(){function e(t){L(this,e),C(this,"inputs",{}),C(this,"outputs",{}),C(this,"controls",{}),this.label=t,this.id=je()}return B(e,[{key:"hasInput",value:function(n){return Object.prototype.hasOwnProperty.call(this.inputs,n)}},{key:"addInput",value:function(n,r){if(this.hasInput(n))throw new Error("input with key '".concat(String(n),"' already added"));Object.defineProperty(this.inputs,n,{value:r,enumerable:!0,configurable:!0})}},{key:"removeInput",value:function(n){delete this.inputs[n]}},{key:"hasOutput",value:function(n){return Object.prototype.hasOwnProperty.call(this.outputs,n)}},{key:"addOutput",value:function(n,r){if(this.hasOutput(n))throw new Error("output with key '".concat(String(n),"' already added"));Object.defineProperty(this.outputs,n,{value:r,enumerable:!0,configurable:!0})}},{key:"removeOutput",value:function(n){delete this.outputs[n]}},{key:"hasControl",value:function(n){return Object.prototype.hasOwnProperty.call(this.controls,n)}},{key:"addControl",value:function(n,r){if(this.hasControl(n))throw new Error("control with key '".concat(String(n),"' already added"));Object.defineProperty(this.controls,n,{value:r,enumerable:!0,configurable:!0})}},{key:"removeControl",value:function(n){delete this.controls[n]}}])})(),Mo=B(function e(t,n,r,i){if(L(this,e),this.sourceOutput=n,this.targetInput=i,!t.outputs[n])throw new Error("source node doesn't have output with a key ".concat(String(n)));if(!r.inputs[i])throw new Error("target node doesn't have input with a key ".concat(String(i)));this.id=je(),this.source=t.id,this.target=r.id}),Ie=Object.freeze({__proto__:null,Socket:Io,Port:dn,Input:Ao,Output:No,Control:Vr,InputControl:zo,Node:Do,Connection:Mo});function Wt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function To(e){if(Array.isArray(e))return Wt(e)}function Lo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gr(e,t){if(e){if(typeof e=="string")return Wt(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wt(e,t):void 0}}function Bo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fe(e){return To(e)||Lo(e)||Gr(e)||Bo()}/*!
24
+ * rete-area-plugin v2.1.4
25
+ * (c) 2025 Vitaliy Stoliarov
26
+ * Released under the MIT license.
27
+ * */var Fo=(function(){function e(t){L(this,e),this.reordered=t,this.holder=document.createElement("div"),this.holder.style.transformOrigin="0 0"}return B(e,[{key:"getPointerFrom",value:function(n){var r=this.holder.getBoundingClientRect(),i=r.left,o=r.top,a=n.clientX-i,s=n.clientY-o;return{x:a,y:s}}},{key:"add",value:function(n){this.holder.appendChild(n)}},{key:"reorder",value:(function(){var t=M(w.mark(function r(i,o){return w.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(this.holder.contains(i)){s.next=2;break}throw new Error("content doesn't have 'target' for reordering");case 2:if(!(o!==null&&!this.holder.contains(o))){s.next=4;break}throw new Error("content doesn't have 'next' for reordering");case 4:return this.holder.insertBefore(i,o),s.next=7,this.reordered(i);case 7:case"end":return s.stop()}},r,this)}));function n(r,i){return t.apply(this,arguments)}return n})()},{key:"remove",value:function(n){this.holder.contains(n)&&this.holder.removeChild(n)}}])})();function Ho(e,t){var n=function(a){t.move(a)},r=function(a){window.removeEventListener("pointermove",n),window.removeEventListener("pointerup",r),window.removeEventListener("pointercancel",r),t.up(a)},i=function(a){window.addEventListener("pointermove",n),window.addEventListener("pointerup",r),window.addEventListener("pointercancel",r),t.down(a)};return e.addEventListener("pointerdown",i),{destroy:function(){e.removeEventListener("pointerdown",i),window.removeEventListener("pointermove",n),window.removeEventListener("pointerup",r),window.removeEventListener("pointercancel",r)}}}var Tn=function(t){return t.length===0?0:Math.min.apply(Math,fe(t))},Ln=function(t){return t.length===0?0:Math.max.apply(Math,fe(t))};function Wr(e){var t=Tn(e.map(function(o){return o.position.x})),n=Tn(e.map(function(o){return o.position.y})),r=Ln(e.map(function(o){return o.position.x+o.width})),i=Ln(e.map(function(o){return o.position.y+o.height}));return{left:t,right:r,top:n,bottom:i,width:Math.abs(t-r),height:Math.abs(n-i),center:{x:(t+r)/2,y:(n+i)/2}}}function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bn(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var qr=(function(){function e(t){var n=this;L(this,e),C(this,"down",function(r){n.guards.down(r)&&(r.stopPropagation(),n.pointerStart={x:r.pageX,y:r.pageY},n.startPosition=Vo({},n.config.getCurrentPosition()),n.events.start(r))}),C(this,"move",function(r){if(!(!n.pointerStart||!n.startPosition)&&n.guards.move(r)){r.preventDefault();var i={x:r.pageX-n.pointerStart.x,y:r.pageY-n.pointerStart.y},o=n.config.getZoom(),a=n.startPosition.x+i.x/o,s=n.startPosition.y+i.y/o;n.events.translate(a,s,r)}}),C(this,"up",function(r){n.pointerStart&&(delete n.pointerStart,n.events.drag(r))}),this.guards=t||{down:function(i){return!(i.pointerType==="mouse"&&i.button!==0)},move:function(){return!0}}}return B(e,[{key:"initialize",value:function(n,r,i){this.config=r,this.events=i,n.style.touchAction="none",this.pointerListener=Ho(n,{down:this.down,move:this.move,up:this.up})}},{key:"destroy",value:function(){this.pointerListener.destroy()}}])})(),Go=(function(){function e(t){var n=this;L(this,e),C(this,"previous",null),C(this,"pointers",[]),C(this,"wheel",function(r){r.preventDefault();var i=n.element.getBoundingClientRect(),o=i.left,a=i.top,s=r.deltaY<0,u=s?n.intensity:-n.intensity,c=(o-r.clientX)*u,l=(a-r.clientY)*u;n.onzoom(u,c,l,"wheel")}),C(this,"down",function(r){n.pointers.push(r)}),C(this,"move",function(r){if(n.pointers=n.pointers.map(function(h){return h.pointerId===r.pointerId?r:h}),!!n.isTranslating()){var i=n.element.getBoundingClientRect(),o=i.left,a=i.top,s=n.getTouches(),u=s.cx,c=s.cy,l=s.distance;if(n.previous!==null&&n.previous.distance>0){var f=l/n.previous.distance-1,d=(o-u)*f,p=(a-c)*f;n.onzoom(f,d-(n.previous.cx-u),p-(n.previous.cy-c),"touch")}n.previous={cx:u,cy:c,distance:l}}}),C(this,"contextmenu",function(){n.pointers=[]}),C(this,"up",function(r){n.previous=null,n.pointers=n.pointers.filter(function(i){return i.pointerId!==r.pointerId})}),C(this,"dblclick",function(r){r.preventDefault();var i=n.element.getBoundingClientRect(),o=i.left,a=i.top,s=4*n.intensity,u=(o-r.clientX)*s,c=(a-r.clientY)*s;n.onzoom(s,u,c,"dblclick")}),this.intensity=t}return B(e,[{key:"initialize",value:function(n,r,i){this.container=n,this.element=r,this.onzoom=i,this.container.addEventListener("wheel",this.wheel),this.container.addEventListener("pointerdown",this.down),this.container.addEventListener("dblclick",this.dblclick),window.addEventListener("pointermove",this.move),window.addEventListener("pointerup",this.up),window.addEventListener("pointercancel",this.up),window.addEventListener("contextmenu",this.contextmenu)}},{key:"getTouches",value:function(){var n={touches:this.pointers},r=[n.touches[0].clientX,n.touches[0].clientY],i=r[0],o=r[1],a=[n.touches[1].clientX,n.touches[1].clientY],s=a[0],u=a[1],c=Math.sqrt(Math.pow(i-s,2)+Math.pow(o-u,2));return{cx:(i+s)/2,cy:(o+u)/2,distance:c}}},{key:"isTranslating",value:function(){return this.pointers.length>=2}},{key:"destroy",value:function(){this.container.removeEventListener("wheel",this.wheel),this.container.removeEventListener("pointerdown",this.down),this.container.removeEventListener("dblclick",this.dblclick),window.removeEventListener("pointermove",this.move),window.removeEventListener("pointerup",this.up),window.removeEventListener("pointercancel",this.up),window.removeEventListener("contextmenu",this.contextmenu)}}])})(),Wo=(function(){function e(t,n,r){var i=this;L(this,e),C(this,"transform",{k:1,x:0,y:0}),C(this,"pointer",{x:0,y:0}),C(this,"zoomHandler",null),C(this,"dragHandler",null),C(this,"pointerdown",function(o){i.setPointerFrom(o),i.events.pointerDown(i.pointer,o)}),C(this,"pointermove",function(o){i.setPointerFrom(o),i.events.pointerMove(i.pointer,o)}),C(this,"pointerup",function(o){i.setPointerFrom(o),i.events.pointerUp(i.pointer,o)}),C(this,"resize",function(o){i.events.resize(o)}),C(this,"onTranslate",function(o,a){var s;(s=i.zoomHandler)!==null&&s!==void 0&&s.isTranslating()||i.translate(o,a)}),C(this,"onZoom",function(o,a,s,u){i.zoom(i.transform.k*(1+o),a,s,u),i.update()}),this.container=t,this.events=n,this.guards=r,this.content=new Fo(function(o){return i.events.reordered(o)}),this.content.holder.style.transformOrigin="0 0",this.setZoomHandler(new Go(.1)),this.setDragHandler(new qr),this.container.addEventListener("pointerdown",this.pointerdown),this.container.addEventListener("pointermove",this.pointermove),window.addEventListener("pointerup",this.pointerup),window.addEventListener("resize",this.resize),t.appendChild(this.content.holder),this.update()}return B(e,[{key:"update",value:function(){var n=this.transform,r=n.x,i=n.y,o=n.k;this.content.holder.style.transform="translate(".concat(r,"px, ").concat(i,"px) scale(").concat(o,")")}},{key:"setDragHandler",value:function(n){var r=this;this.dragHandler&&this.dragHandler.destroy(),this.dragHandler=n,this.dragHandler&&this.dragHandler.initialize(this.container,{getCurrentPosition:function(){return r.transform},getZoom:function(){return 1}},{start:function(){return null},translate:this.onTranslate,drag:function(){return null}})}},{key:"setZoomHandler",value:function(n){this.zoomHandler&&this.zoomHandler.destroy(),this.zoomHandler=n,this.zoomHandler&&this.zoomHandler.initialize(this.container,this.content.holder,this.onZoom)}},{key:"setPointerFrom",value:function(n){var r=this.content.getPointerFrom(n),i=r.x,o=r.y,a=this.transform.k;this.pointer={x:i/a,y:o/a}}},{key:"translate",value:(function(){var t=M(w.mark(function r(i,o){var a,s;return w.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return a={x:i,y:o},c.next=3,this.guards.translate({previous:this.transform,position:a});case 3:if(s=c.sent,s){c.next=6;break}return c.abrupt("return",!1);case 6:return this.transform.x=s.data.position.x,this.transform.y=s.data.position.y,this.update(),c.next=11,this.events.translated(s.data);case 11:return c.abrupt("return",!0);case 12:case"end":return c.stop()}},r,this)}));function n(r,i){return t.apply(this,arguments)}return n})()},{key:"zoom",value:(function(){var t=M(w.mark(function r(i){var o,a,s,u,c,l,f=arguments;return w.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return o=f.length>1&&f[1]!==void 0?f[1]:0,a=f.length>2&&f[2]!==void 0?f[2]:0,s=f.length>3?f[3]:void 0,u=this.transform.k,p.next=6,this.guards.zoom({previous:this.transform,zoom:i,source:s});case 6:if(c=p.sent,c){p.next=9;break}return p.abrupt("return",!0);case 9:return l=(u-c.data.zoom)/(u-i||1),this.transform.k=c.data.zoom||1,this.transform.x+=o*l,this.transform.y+=a*l,this.update(),p.next=16,this.events.zoomed(c.data);case 16:return p.abrupt("return",!1);case 17:case"end":return p.stop()}},r,this)}));function n(r){return t.apply(this,arguments)}return n})()},{key:"destroy",value:function(){this.container.removeEventListener("pointerdown",this.pointerdown),this.container.removeEventListener("pointermove",this.pointermove),window.removeEventListener("pointerup",this.pointerup),window.removeEventListener("resize",this.resize),this.dragHandler&&this.dragHandler.destroy(),this.zoomHandler&&this.zoomHandler.destroy(),this.content.holder.innerHTML=""}}])})();function qo(e,t,n){return t=q(t),ye(e,Kr()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function Kr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kr=function(){return!!e})()}var ft=(function(e){function t(){return L(this,t),qo(this,t,arguments)}return ae(t,e),B(t)})(Ze),Ko=B(function e(t){L(this,e),this.element=document.createElement("div"),this.element.style.position="absolute",this.element.style.left="0",this.element.style.top="0",this.element.addEventListener("contextmenu",function(n){return t.contextmenu(n)})}),Yo=(function(){function e(){L(this,e),C(this,"views",new WeakMap),C(this,"viewsElements",new Map)}return B(e,[{key:"set",value:function(n){var r=n.element,i=n.type,o=n.payload;o!=null&&o.id&&(this.views.set(r,n),this.viewsElements.set("".concat(i,"_").concat(o.id),r))}},{key:"get",value:function(n,r){var i=this.viewsElements.get("".concat(n,"_").concat(r));return i&&this.views.get(i)}},{key:"delete",value:function(n){var r,i=this.views.get(n);i&&(r=i.payload)!==null&&r!==void 0&&r.id&&(this.views.delete(n),this.viewsElements.delete("".concat(i.type,"_").concat(i.payload.id)))}}])})();function Fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fn(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Zo=(function(){function e(t,n,r){var i=this;L(this,e),C(this,"translate",(function(){var o=M(w.mark(function a(s,u){var c,l;return w.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=Hn({},i.position),d.next=3,i.guards.translate({previous:c,position:{x:s,y:u}});case 3:if(l=d.sent,l){d.next=6;break}return d.abrupt("return",!1);case 6:return i.position=Hn({},l.data.position),i.element.style.transform="translate(".concat(i.position.x,"px, ").concat(i.position.y,"px)"),d.next=10,i.events.translated({position:i.position,previous:c});case 10:return d.abrupt("return",!0);case 11:case"end":return d.stop()}},a)}));return function(a,s){return o.apply(this,arguments)}})()),C(this,"resize",(function(){var o=M(w.mark(function a(s,u){var c,l;return w.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c={width:s,height:u},d.next=3,i.guards.resize({size:c});case 3:if(d.sent){d.next=5;break}return d.abrupt("return",!1);case 5:if(l=i.element.querySelector("*:not(span):not([fragment])"),!(!l||!(l instanceof HTMLElement))){d.next=8;break}return d.abrupt("return",!1);case 8:return l.style.width="".concat(s,"px"),l.style.height="".concat(u,"px"),d.next=12,i.events.resized({size:c});case 12:return d.abrupt("return",!0);case 13:case"end":return d.stop()}},a)}));return function(a,s){return o.apply(this,arguments)}})()),this.getZoom=t,this.events=n,this.guards=r,this.element=document.createElement("div"),this.element.style.position="absolute",this.position={x:0,y:0},this.translate(0,0),this.element.addEventListener("contextmenu",function(o){return i.events.contextmenu(o)}),this.dragHandler=new qr,this.dragHandler.initialize(this.element,{getCurrentPosition:function(){return i.position},getZoom:function(){return i.getZoom()}},{start:this.events.picked,translate:this.translate,drag:this.events.dragged})}return B(e,[{key:"destroy",value:function(){this.dragHandler.destroy()}}])})();function Yr(e,t){return e.map(function(n){return{view:t.get(n.id),node:n}}).filter(function(n){return n.view}).map(function(n){var r=n.view,i=n.node,o=i.width,a=i.height;return typeof o<"u"&&typeof a<"u"?{position:r.position,width:o,height:a}:{position:r.position,width:r.element.clientWidth,height:r.element.clientHeight}})}function Uo(e,t){var n=e.parentScope(Pe),r=t.map(function(o){return oe(o)==="object"?o:n.getNode(o)}),i=Yr(r,e.nodeViews);return Wr(i)}function Xo(e){var t=e;t.addPipe(function(n){if(!n||oe(n)!=="object"||!("type"in n))return n;if(n.type==="nodepicked"){var r=t.nodeViews.get(n.data.id),i=t.area.content;r&&i.reorder(r.element,null)}if(n.type==="connectioncreated"){var o=t.connectionViews.get(n.data.id),a=t.area.content;o&&a.reorder(o.element,a.holder.firstChild)}return n})}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vn(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jo(e,t){var n=t!=null&&t.scaling?t.scaling===!0?{min:.1,max:1}:t.scaling:!1,r=t!=null&&t.translation?t.translation===!0?{left:0,top:0,right:1e3,bottom:1e3}:t.translation:!1;function i(a){if(!n)throw new Error("scaling param isnt defined");var s=typeof n=="function"?n():n,u=s.min,c=s.max;return a<u?u:a>c?c:a}function o(a){if(!r)throw new Error("translation param isnt defined");var s=he({},a),u=typeof r=="function"?r():r,c=u.left,l=u.top,f=u.right,d=u.bottom;return s.x<c&&(s.x=c),s.x>f&&(s.x=f),s.y<l&&(s.y=l),s.y>d&&(s.y=d),s}e.addPipe(function(a){if(!a||oe(a)!=="object"||!("type"in a))return a;if(n&&a.type==="zoom")return he(he({},a),{},{data:he(he({},a.data),{},{zoom:i(a.data.zoom)})});if(r&&a.type==="zoomed"){var s=o(e.area.transform);e.area.translate(s.x,s.y)}return r&&a.type==="translate"?he(he({},a),{},{data:he(he({},a.data),{},{position:o(a.data.position)})}):a})}function Qo(){var e=!1;function t(r){(r.key==="Control"||r.key==="Meta")&&(e=!0)}function n(r){(r.key==="Control"||r.key==="Meta")&&(e=!1)}return document.addEventListener("keydown",t),document.addEventListener("keyup",n),{active:function(){return e},destroy:function(){document.removeEventListener("keydown",t),document.removeEventListener("keyup",n)}}}var Zr=(function(){function e(){L(this,e),C(this,"entities",new Map),C(this,"pickId",null)}return B(e,[{key:"isSelected",value:function(n){return this.entities.has("".concat(n.label,"_").concat(n.id))}},{key:"add",value:(function(){var t=M(w.mark(function r(i,o){return w.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(o){s.next=3;break}return s.next=3,this.unselectAll();case 3:this.entities.set("".concat(i.label,"_").concat(i.id),i);case 4:case"end":return s.stop()}},r,this)}));function n(r,i){return t.apply(this,arguments)}return n})()},{key:"remove",value:(function(){var t=M(w.mark(function r(i){var o,a;return w.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(o="".concat(i.label,"_").concat(i.id),a=this.entities.get(o),!a){u.next=6;break}return this.entities.delete(o),u.next=6,a.unselect();case 6:case"end":return u.stop()}},r,this)}));function n(r){return t.apply(this,arguments)}return n})()},{key:"unselectAll",value:(function(){var t=M(w.mark(function r(){var i=this;return w.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Promise.all(fe(Array.from(this.entities.values())).map(function(s){return i.remove(s)}));case 2:case"end":return a.stop()}},r,this)}));function n(){return t.apply(this,arguments)}return n})()},{key:"translate",value:(function(){var t=M(w.mark(function r(i,o){var a=this;return w.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Promise.all(Array.from(this.entities.values()).map(function(c){return!a.isPicked(c)&&c.translate(i,o)}));case 2:case"end":return u.stop()}},r,this)}));function n(r,i){return t.apply(this,arguments)}return n})()},{key:"pick",value:function(n){this.pickId="".concat(n.label,"_").concat(n.id)}},{key:"release",value:function(){this.pickId=null}},{key:"isPicked",value:function(n){return this.pickId==="".concat(n.label,"_").concat(n.id)}}])})();function ea(){return new Zr}function ta(e,t,n){var r=null,i=e,o=function(){return r||(r=i.parentScope(Pe))},a=0;function s(p){p.selected||(p.selected=!0,i.update("node",p.id))}function u(p){p.selected&&(p.selected=!1,i.update("node",p.id))}function c(p,h){return l.apply(this,arguments)}function l(){return l=M(w.mark(function p(h,y){var v;return w.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(v=o().getNode(h),v){m.next=3;break}return m.abrupt("return");case 3:return m.next=5,t.add({label:"node",id:v.id,translate:function(j,P){return M(w.mark(function I(){var O,E;return w.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(O=i.nodeViews.get(v.id),E=O==null?void 0:O.position,!E){A.next=5;break}return A.next=5,O.translate(E.x+j,E.y+P);case 5:case"end":return A.stop()}},I)}))()},unselect:function(){u(v)}},y);case 5:s(v);case 6:case"end":return m.stop()}},p)})),l.apply(this,arguments)}function f(p){return d.apply(this,arguments)}function d(){return d=M(w.mark(function p(h){return w.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,t.remove({id:h,label:"node"});case 2:case"end":return v.stop()}},p)})),d.apply(this,arguments)}return i.addPipe((function(){var p=M(w.mark(function h(y){var v,k,m,b,j,P,I,O;return w.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(!y||oe(y)!=="object"||!("type"in y))){R.next=2;break}return R.abrupt("return",y);case 2:if(y.type!=="nodepicked"){R.next=11;break}return v=y.data.id,k=n.accumulating.active(),t.pick({id:v,label:"node"}),a=null,R.next=9,c(v,k);case 9:R.next=33;break;case 11:if(y.type!=="nodetranslated"){R.next=20;break}if(m=y.data,b=m.id,j=m.position,P=m.previous,I=j.x-P.x,O=j.y-P.y,!t.isPicked({id:b,label:"node"})){R.next=18;break}return R.next=18,t.translate(I,O);case 18:R.next=33;break;case 20:if(y.type!=="pointerdown"){R.next=24;break}a=0,R.next=33;break;case 24:if(y.type!=="pointermove"){R.next=28;break}a!==null&&a++,R.next=33;break;case 28:if(y.type!=="pointerup"){R.next=33;break}if(!(a!==null&&a<4)){R.next=32;break}return R.next=32,t.unselectAll();case 32:a=null;case 33:return R.abrupt("return",y);case 34:case"end":return R.stop()}},h)}));return function(h){return p.apply(this,arguments)}})()),{select:c,unselect:f}}function na(e,t){var n=null,r=function(){return n||(n=e.parentScope(Pe))};function i(o,a){var s=r().getNode(o);if(s){var u=s.inputs[a];if(!u)throw new Error("cannot find input");var c=u.showControl,l=r().getConnections(),f=!!l.find(function(d){return d.target===o&&d.targetInput===a});u.showControl=t?t({hasAnyConnection:f,input:u}):!f,u.showControl!==c&&e.update("node",s.id)}}e.addPipe(function(o){return(o.type==="connectioncreated"||o.type==="connectionremoved")&&i(o.data.target,o.data.targetInput),o})}function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gn(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ra(e,t){var n=e,r=typeof(t==null?void 0:t.size)>"u"?16:t.size,i=typeof(t==null?void 0:t.dynamic)>"u"?!0:t.dynamic;function o(a){return Math.round(a/r)*r}n.addPipe(function(a){if(!a||oe(a)!=="object"||!("type"in a))return a;if(i&&a.type==="nodetranslate"){var s=a.data.position,u=o(s.x),c=o(s.y);return Je(Je({},a),{},{data:Je(Je({},a.data),{},{position:{x:u,y:c}})})}if(!i&&a.type==="nodedragged"){var l=n.nodeViews.get(a.data.id);if(l){var f=l.position,d=f.x,p=f.y;l.translate(o(d),o(p))}}return a})}function ia(e,t,n){return qt.apply(this,arguments)}function qt(){return qt=M(w.mark(function e(t,n,r){var i,o,a,s,u,c,l,f,d,p,h,y,v;return w.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return i=r||{},o=i.scale,a=o===void 0?.9:o,s=t.parentScope(Pe),u=n.map(function(b){return oe(b)==="object"?b:s.getNode(b)}),c=Yr(u,t.nodeViews),l=Wr(c),f=[t.container.clientWidth,t.container.clientHeight],d=f[0],p=f[1],h=d/l.width,y=p/l.height,v=Math.min(y*a,h*a,1),t.area.transform.x=d/2-l.center.x*v,t.area.transform.y=p/2-l.center.y*v,m.next=12,t.area.zoom(v,0,0);case 12:case"end":return m.stop()}},e)})),qt.apply(this,arguments)}var Qe=Object.freeze({__proto__:null,getBoundingBox:Uo,simpleNodesOrder:Xo,restrictor:Jo,accumulateOnCtrl:Qo,selectableNodes:ta,Selector:Zr,selector:ea,showInputControl:na,snapGrid:ra,zoomAt:ia});function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wn(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oa(e,t,n){return t=q(t),ye(e,Ur()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function Ur(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ur=function(){return!!e})()}var Xr=(function(e){function t(n){var r;return L(this,t),r=oa(this,t,["area"]),C(r,"nodeViews",new Map),C(r,"connectionViews",new Map),C(r,"elements",new Yo),C(r,"onContextMenu",function(i){r.emit({type:"contextmenu",data:{event:i,context:"root"}})}),r.container=n,n.style.overflow="hidden",n.addEventListener("contextmenu",r.onContextMenu),r.addPipe(function(i){return!i||!(oe(i)==="object"&&"type"in i)||(i.type==="nodecreated"&&r.addNodeView(i.data),i.type==="noderemoved"&&r.removeNodeView(i.data.id),i.type==="connectioncreated"&&r.addConnectionView(i.data),i.type==="connectionremoved"&&r.removeConnectionView(i.data.id),i.type==="render"&&r.elements.set(i.data),i.type==="unmount"&&r.elements.delete(i.data.element)),i}),r.area=new Wo(n,{zoomed:function(o){return r.emit({type:"zoomed",data:o})},pointerDown:function(o,a){return void r.emit({type:"pointerdown",data:{position:o,event:a}})},pointerMove:function(o,a){return void r.emit({type:"pointermove",data:{position:o,event:a}})},pointerUp:function(o,a){return void r.emit({type:"pointerup",data:{position:o,event:a}})},resize:function(o){return void r.emit({type:"resized",data:{event:o}})},translated:function(o){return r.emit({type:"translated",data:o})},reordered:function(o){return r.emit({type:"reordered",data:{element:o}})}},{translate:function(o){return r.emit({type:"translate",data:o})},zoom:function(o){return r.emit({type:"zoom",data:o})}}),r}return ae(t,e),B(t,[{key:"addNodeView",value:function(r){var i=this,o=r.id,a=new Zo(function(){return i.area.transform.k},{picked:function(){return void i.emit({type:"nodepicked",data:{id:o}})},translated:function(u){return i.emit({type:"nodetranslated",data:qn({id:o},u)})},dragged:function(){return void i.emit({type:"nodedragged",data:r})},contextmenu:function(u){return void i.emit({type:"contextmenu",data:{event:u,context:r}})},resized:function(u){var c=u.size;return i.emit({type:"noderesized",data:{id:r.id,size:c}})}},{translate:function(u){return i.emit({type:"nodetranslate",data:qn({id:o},u)})},resize:function(u){var c=u.size;return i.emit({type:"noderesize",data:{id:r.id,size:c}})}});return this.nodeViews.set(o,a),this.area.content.add(a.element),this.emit({type:"render",data:{element:a.element,type:"node",payload:r}}),a}},{key:"removeNodeView",value:function(r){var i=this.nodeViews.get(r);i&&(this.emit({type:"unmount",data:{element:i.element}}),this.nodeViews.delete(r),this.area.content.remove(i.element))}},{key:"addConnectionView",value:function(r){var i=this,o=new Ko({contextmenu:function(s){return void i.emit({type:"contextmenu",data:{event:s,context:r}})}});return this.connectionViews.set(r.id,o),this.area.content.add(o.element),this.emit({type:"render",data:{element:o.element,type:"connection",payload:r}}),o}},{key:"removeConnectionView",value:function(r){var i=this.connectionViews.get(r);i&&(this.emit({type:"unmount",data:{element:i.element}}),this.connectionViews.delete(r),this.area.content.remove(i.element))}},{key:"update",value:(function(){var n=M(w.mark(function i(o,a){var s;return w.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(s=this.elements.get(o,a),!s){c.next=4;break}return c.next=4,this.emit({type:"render",data:s});case 4:case"end":return c.stop()}},i,this)}));function r(i,o){return n.apply(this,arguments)}return r})()},{key:"resize",value:(function(){var n=M(w.mark(function i(o,a,s){var u;return w.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(u=this.nodeViews.get(o),!u){l.next=5;break}return l.next=4,u.resize(a,s);case 4:return l.abrupt("return",l.sent);case 5:case"end":return l.stop()}},i,this)}));function r(i,o,a){return n.apply(this,arguments)}return r})()},{key:"translate",value:(function(){var n=M(w.mark(function i(o,a){var s,u,c;return w.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(s=a.x,u=a.y,c=this.nodeViews.get(o),!c){f.next=6;break}return f.next=5,c.translate(s,u);case 5:return f.abrupt("return",f.sent);case 6:case"end":return f.stop()}},i,this)}));function r(i,o){return n.apply(this,arguments)}return r})()},{key:"destroy",value:function(){var r=this;this.container.removeEventListener("contextmenu",this.onContextMenu),Array.from(this.connectionViews.keys()).forEach(function(i){return r.removeConnectionView(i)}),Array.from(this.nodeViews.keys()).forEach(function(i){return r.removeNodeView(i)}),this.area.destroy()}}])})(ft);function aa(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=q(e))!==null;);return e}function qe(){return qe=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=aa(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qe.apply(null,arguments)}function sa(e){if(Array.isArray(e))return e}function ua(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function ca(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ie(e,t){return sa(e)||ua(e,t)||Gr(e,t)||ca()}/*!
29
+ * rete-connection-plugin v2.0.4
30
+ * (c) 2024 Vitaliy Stoliarov
31
+ * Released under the MIT license.
32
+ * */function Kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kn(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function la(e){var t=null,n=null;function r(o){n&&o.removeConnectionView(n),t=null,n=null}function i(o){r(o),n="pseudo_".concat(je())}return{isMounted:function(){return!!n},mount:i,render:function(a,s,u){var c=s.x,l=s.y,f=u.side==="output",d={x:c+(f?-3:3),y:l};if(!n)throw new Error("pseudo connection id wasn't generated");var p=f?Nt({id:n,source:u.nodeId,sourceOutput:u.key,target:"",targetInput:""},e??{}):Nt({id:n,target:u.nodeId,targetInput:u.key,source:"",sourceOutput:""},e??{});if(!t){var h=a.addConnectionView(p);t=h.element}t&&a.emit({type:"render",data:Nt({element:t,type:"connection",payload:p},f?{end:d}:{start:d})})},unmount:r}}function da(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=fa(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function fa(e,t){if(e){if(typeof e=="string")return Yn(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yn(e,t):void 0}}function Yn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pa(e,t){var n=da(t),r;try{for(n.s();!(r=n.n()).done;){var i=r.value,o=e.get(i);if(o)return o}}catch(a){n.e(a)}finally{n.f()}}function Jr(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document,i=r.elementsFromPoint(e,t),o=(n=i[0])===null||n===void 0?void 0:n.shadowRoot;return o&&o!==r&&i.unshift.apply(i,fe(Jr(e,t,o))),i}var fn=(function(){function e(){L(this,e)}return B(e,[{key:"setContext",value:function(n){this.context=n}}])})();function Qr(e,t){var n=e.side==="output"&&t.side==="input",r=e.side==="input"&&t.side==="output",i=n?[e,t]:r?[t,e]:[],o=ie(i,2),a=o[0],s=o[1];if(a&&s)return[a,s]}function ha(e,t){return!!Qr(e,t)}function va(e,t,n){var r=Qr(e,t)||[null,null],i=ie(r,2),o=i[0],a=i[1];if(o&&a)return n.editor.addConnection({id:je(),source:o.nodeId,sourceOutput:o.key,target:a.nodeId,targetInput:a.key}),!0}function ma(e,t){var n=t.getNode(e.nodeId);if(!n)throw new Error("cannot find node");var r=e.side==="input"?n.inputs:n.outputs;return r[e.key]}function ya(e,t){var n=e.nodeId,r=e.side,i=e.key;return t.getConnections().filter(function(o){if(r==="input")return o.target===n&&o.targetInput===i;if(r==="output")return o.source===n&&o.sourceOutput===i})}function Kt(e,t){var n=e.map(function(r){var i=ma(r,t),o=i==null?void 0:i.multipleConnections;return o?[]:ya(r,t)}).flat();return{commit:function(){var i=Array.from(new Set(n.map(function(o){var a=o.id;return a})));i.forEach(function(o){return void t.removeConnection(o)})}}}function pn(e,t,n){return t=q(t),ye(e,ei()?Reflect.construct(t,[],q(e).constructor):t.apply(e,n))}function ei(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ei=function(){return!!e})()}var ga=(function(e){function t(n,r){var i;return L(this,t),i=pn(this,t),i.initial=n,i.params=r,i}return ae(t,e),B(t,[{key:"pick",value:(function(){var n=M(w.mark(function i(o,a){var s,u;return w.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:s=o.socket,this.params.canMakeConnection(this.initial,s)&&(Kt([this.initial,s],a.editor).commit(),u=this.params.makeConnection(this.initial,s,a),this.drop(a,u?s:null,u));case 2:case"end":return l.stop()}},i,this)}));function r(i,o){return n.apply(this,arguments)}return r})()},{key:"drop",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.initial&&r.scope.emit({type:"connectiondrop",data:{initial:this.initial,socket:i,created:o}}),this.context.switchTo(new hn(this.params))}}])})(fn),ba=(function(e){function t(n,r,i){var o;L(this,t),o=pn(this,t),o.connection=n,o.params=r;var a=Array.from(i.socketsCache.values()).find(function(s){return s.nodeId===o.connection.source&&s.side==="output"&&s.key===o.connection.sourceOutput});if(!a)throw new Error("cannot find output socket");return o.outputSocket=a,o}return ae(t,e),B(t,[{key:"init",value:(function(){var n=M(w.mark(function i(o){var a=this;return w.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:o.scope.emit({type:"connectionpick",data:{socket:this.outputSocket}}).then(function(c){c?(o.editor.removeConnection(a.connection.id),a.initial=a.outputSocket):a.drop(o)});case 1:case"end":return u.stop()}},i,this)}));function r(i){return n.apply(this,arguments)}return r})()},{key:"pick",value:(function(){var n=M(w.mark(function i(o,a){var s,u,c,l,f,d;return w.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:s=o.socket,u=o.event,this.initial&&!(s.side==="input"&&this.connection.target===s.nodeId&&this.connection.targetInput===s.key)?this.params.canMakeConnection(this.initial,s)&&(Kt([this.initial,s],a.editor).commit(),c=this.params.makeConnection(this.initial,s,a),l=c?s:null,this.drop(a,l,c)):u==="down"&&this.initial&&(Kt([this.initial,s],a.editor).commit(),f=this.params.makeConnection(this.initial,s,a),d=f?null:s,this.drop(a,d,f));case 2:case"end":return h.stop()}},i,this)}));function r(i,o){return n.apply(this,arguments)}return r})()},{key:"drop",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.initial&&r.scope.emit({type:"connectiondrop",data:{initial:this.initial,socket:i,created:o}}),this.context.switchTo(new hn(this.params))}}])})(fn),hn=(function(e){function t(n){var r;return L(this,t),r=pn(this,t),r.params=n,r}return ae(t,e),B(t,[{key:"pick",value:(function(){var n=M(w.mark(function i(o,a){var s,u,c,l;return w.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(s=o.socket,u=o.event,u==="down"){d.next=3;break}return d.abrupt("return");case 3:if(s.side!=="input"){d.next=11;break}if(c=a.editor.getConnections().find(function(p){return p.target===s.nodeId&&p.targetInput===s.key}),!c){d.next=11;break}return l=new ba(c,this.params,a),d.next=9,l.init(a);case 9:return this.context.switchTo(l),d.abrupt("return");case 11:return d.next=13,a.scope.emit({type:"connectionpick",data:{socket:s}});case 13:if(!d.sent){d.next=17;break}this.context.switchTo(new ga(s,this.params)),d.next=18;break;case 17:this.drop(a);case 18:case"end":return d.stop()}},i,this)}));function r(i,o){return n.apply(this,arguments)}return r})()},{key:"drop",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.initial&&r.scope.emit({type:"connectiondrop",data:{initial:this.initial,socket:i,created:o}}),delete this.initial}}])})(fn),wa=(function(){function e(t){L(this,e);var n=(t==null?void 0:t.canMakeConnection)||ha,r=(t==null?void 0:t.makeConnection)||va;this.switchTo(new hn({canMakeConnection:n,makeConnection:r}))}return B(e,[{key:"pick",value:(function(){var t=M(w.mark(function r(i,o){return w.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,this.currentState.pick(i,o);case 2:case"end":return s.stop()}},r,this)}));function n(r,i){return t.apply(this,arguments)}return n})()},{key:"getPickedSocket",value:function(){return this.currentState.initial}},{key:"switchTo",value:function(n){n.setContext(this),this.currentState=n}},{key:"drop",value:function(n){this.currentState.drop(n)}}])})();function ka(){return function(){return new wa}}var xa=Object.freeze({__proto__:null,setup:ka}),Oa=Object.freeze({__proto__:null,classic:xa});function Sa(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ca(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
34
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Ca(e,t){if(e){if(typeof e=="string")return Zn(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(e,t):void 0}}function Zn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $a(e,t,n){return t=q(t),ye(e,ti()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function ti(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ti=function(){return!!e})()}function Pa(e,t,n,r){var i=qe(q(e.prototype),t,n);return typeof i=="function"?function(o){return i.apply(n,o)}:i}var ja=(function(e){function t(){var n;return L(this,t),n=$a(this,t,["connection"]),C(n,"presets",[]),C(n,"currentFlow",null),C(n,"preudoconnection",la({isPseudo:!0})),C(n,"socketsCache",new Map),n}return ae(t,e),B(t,[{key:"addPreset",value:function(r){this.presets.push(r)}},{key:"findPreset",value:function(r){var i=Sa(this.presets),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a(r);if(s)return s}}catch(u){i.e(u)}finally{i.f()}return null}},{key:"update",value:function(){if(this.currentFlow){var r=this.currentFlow.getPickedSocket();r&&this.preudoconnection.render(this.areaPlugin,this.areaPlugin.area.pointer,r)}}},{key:"drop",value:function(){var r={editor:this.editor,scope:this,socketsCache:this.socketsCache};this.currentFlow&&(this.currentFlow.drop(r),this.preudoconnection.unmount(this.areaPlugin),this.currentFlow=null)}},{key:"pick",value:(function(){var n=M(w.mark(function i(o,a){var s,u,c;return w.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(s={editor:this.editor,scope:this,socketsCache:this.socketsCache},u=Jr(o.clientX,o.clientY),c=pa(this.socketsCache,u),!c){f.next=13;break}if(o.preventDefault(),o.stopPropagation(),this.currentFlow=this.currentFlow||this.findPreset(c),!this.currentFlow){f.next=11;break}return f.next=10,this.currentFlow.pick({socket:c,event:a},s);case 10:this.preudoconnection.mount(this.areaPlugin);case 11:f.next=14;break;case 13:this.currentFlow&&this.currentFlow.drop(s);case 14:this.currentFlow&&!this.currentFlow.getPickedSocket()&&(this.preudoconnection.unmount(this.areaPlugin),this.currentFlow=null),this.update();case 16:case"end":return f.stop()}},i,this)}));function r(i,o){return n.apply(this,arguments)}return r})()},{key:"setParent",value:function(r){var i=this;Pa(t,"setParent",this)([r]),this.areaPlugin=this.parentScope(ft),this.editor=this.areaPlugin.parentScope(Pe);var o=function(s){i.pick(s,"down")};this.addPipe(function(a){if(!a||oe(a)!=="object"||!("type"in a))return a;if(a.type==="pointermove")i.update();else if(a.type==="pointerup")i.pick(a.data.event,"up");else if(a.type==="render"){if(a.data.type==="socket"){var s=a.data.element;s.addEventListener("pointerdown",o),i.socketsCache.set(s,a.data)}}else if(a.type==="unmount"){var u=a.data.element;u.removeEventListener("pointerdown",o),i.socketsCache.delete(u)}return a})}}])})(Ze);/*!
35
+ * rete-minimap-plugin v2.0.2
36
+ * (c) 2024 Vitaliy Stoliarov
37
+ * Released under the MIT license.
38
+ * */function _a(e){var t=e.map(function(c){return c.left}),n=e.map(function(c){return c.left+c.width}),r=e.map(function(c){return c.top}),i=e.map(function(c){return c.top+c.height}),o=Math.min.apply(Math,fe(t)),a=Math.max.apply(Math,fe(n)),s=Math.min.apply(Math,fe(r)),u=Math.max.apply(Math,fe(i));return{left:o,right:a,top:s,bottom:u,width:a-o,height:u-s}}function Ea(e,t,n){var r=_a(e),i=Math.max(t,Math.max(r.width,r.height*n)),o=(i-r.width)/2-r.left,a=(i/n-r.height)/2-r.top,s=function(l){return l/i},u=function(l){return l*i};return{origin:{x:o,y:a},scale:s,invert:u}}function Ra(e,t,n){return t=q(t),ye(e,ni()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function ni(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ni=function(){return!!e})()}function Ia(e,t,n,r){var i=qe(q(e.prototype),t,n);return typeof i=="function"?function(o){return i.apply(n,o)}:i}var Aa=(function(e){function t(n){var r,i,o,a,s,u;return L(this,t),u=Ra(this,t,["minimap"]),u.props=n,u.ratio=(r=(i=u.props)===null||i===void 0?void 0:i.ratio)!==null&&r!==void 0?r:1,u.minDistance=(o=(a=u.props)===null||a===void 0?void 0:a.minDistance)!==null&&o!==void 0?o:2e3,u.boundViewport=!!(!((s=u.props)===null||s===void 0)&&s.boundViewport),u}return ae(t,e),B(t,[{key:"setParent",value:function(r){var i=this;Ia(t,"setParent",this)([r]),this.area=this.parentScope(Xr),this.editor=this.area.parentScope(Pe),this.element=document.createElement("div"),this.area.container.appendChild(this.element),this.addPipe(function(o){return"type"in o&&(o.type==="render"&&o.data.type==="node"||o.type==="nodetranslated"||o.type==="nodecreated"||o.type==="noderemoved"||o.type==="translated"||o.type==="resized"||o.type==="noderesized"||o.type==="zoomed")&&i.render(),o})}},{key:"getNodesRect",value:function(){var r=this;return this.editor.getNodes().map(function(i){var o=r.area.nodeViews.get(i.id);return o?{width:i.width,height:i.height,left:o.position.x,top:o.position.y}:null}).filter(Boolean)}},{key:"render",value:function(){var r=this,i=this.parentScope(),o=this.getNodesRect(),a=this.area.area.transform,s=this.area.container,u=s.clientWidth,c=s.clientHeight,l=this.minDistance,f=this.ratio,d={left:-a.x/a.k,top:-a.y/a.k,width:u/a.k,height:c/a.k},p=this.boundViewport?[].concat(fe(o),[d]):o,h=Ea(p,l,f),y=h.origin,v=h.scale,k=h.invert;i.emit({type:"render",data:{type:"minimap",element:this.element,ratio:f,start:function(){return a},nodes:o.map(function(m){return{left:v(m.left+y.x),top:v(m.top+y.y),width:v(m.width),height:v(m.height)}}),viewport:{left:v(d.left+y.x),top:v(d.top+y.y),width:v(d.width),height:v(d.height)},translate:function(b,j){var P=a.x,I=a.y,O=a.k;r.area.area.translate(P+k(b)*O,I+k(j)*O)},point:function(b,j){var P={x:(y.x-k(b))*a.k,y:(y.y-k(j))*a.k},I={x:P.x+u/2,y:P.y+c/2};r.area.area.translate(I.x,I.y)}}})}}])})(Ze);/*!
39
+ * rete-render-utils v2.0.2
40
+ * (c) 2024 Vitaliy Stoliarov
41
+ * Released under the MIT license.
42
+ * */function Na(e,t){var n=ie(e,2),r=n[0],i=r.x,o=r.y,a=n[1],s=a.x,u=a.y,c=Math.abs(o-u),l=i+Math.max(c/2,Math.abs(s-i))*t,f=s-Math.max(c/2,Math.abs(s-i))*t;return"M ".concat(i," ").concat(o," C ").concat(l," ").concat(o," ").concat(f," ").concat(u," ").concat(s," ").concat(u)}function za(e,t,n){var r=ie(e,2),i=r[0],o=i.x,a=i.y,s=r[1],u=s.x,c=s.y,l=c>a?1:-1,f=n+Math.abs(o-u)/(n/2),d=(o+u)/2,p=a-l*f,h=(c-a)*t;return`
43
+ M `.concat(o," ").concat(a,`
44
+ C `).concat(o+f," ").concat(a,`
45
+ `).concat(o+f," ").concat(p-h,`
46
+ `).concat(d," ").concat(p,`
47
+ C `).concat(u-f," ").concat(p+h,`
48
+ `).concat(u-f," ").concat(c,`
49
+ `).concat(u," ").concat(c,`
50
+ `)}function Da(e,t){return Yt.apply(this,arguments)}function Yt(){return Yt=M(w.mark(function e(t,n){var r,i,o,a,s;return w.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(t.offsetParent){c.next=5;break}return c.next=3,new Promise(function(l){return setTimeout(l,0)});case 3:c.next=0;break;case 5:if(r=t.offsetLeft,i=t.offsetTop,o=t.offsetParent,o){c.next=10;break}throw new Error("child has null offsetParent");case 10:for(;o!==null&&o!==n;)r+=o.offsetLeft+o.clientLeft,i+=o.offsetTop+o.clientTop,o=o.offsetParent;return a=t.offsetWidth,s=t.offsetHeight,c.abrupt("return",{x:r+a/2,y:i+s/2});case 14:case"end":return c.stop()}},e)})),Yt.apply(this,arguments)}var Ma=(function(){function e(){L(this,e),C(this,"listeners",new Set)}return B(e,[{key:"emit",value:function(n){this.listeners.forEach(function(r){r(n)})}},{key:"listen",value:function(n){var r=this;return this.listeners.add(n),function(){r.listeners.delete(n)}}}])})(),Ta=(function(){function e(){L(this,e),C(this,"elements",new Map)}return B(e,[{key:"getPosition",value:function(n){var r,i,o=Array.from(this.elements.values()).flat(),a=o.filter(function(s){return s.side===n.side&&s.nodeId===n.nodeId&&s.key===n.key});return a.length>1&&console.warn(["Found more than one element for socket with same key and side.","Probably it was not unmounted correctly"].join(" "),n),(r=(i=a.pop())===null||i===void 0?void 0:i.position)!==null&&r!==void 0?r:null}},{key:"add",value:function(n){var r=this.elements.get(n.element);this.elements.set(n.element,r?[].concat(fe(r.filter(function(i){return!(i.nodeId===n.nodeId&&i.key===n.key&&i.side===n.side)})),[n]):[n])}},{key:"remove",value:function(n){this.elements.delete(n)}},{key:"snapshot",value:function(){return Array.from(this.elements.values()).flat()}}])})(),La=(function(){function e(){L(this,e),C(this,"sockets",new Ta),C(this,"emitter",new Ma),C(this,"area",null)}return B(e,[{key:"attach",value:function(n){var r=this;this.area||n.hasParent()&&(this.area=n.parentScope(ft),this.area.addPipe((function(){var i=M(w.mark(function o(a){var s,u,c,l,f,d,p,h,y,v,k;return w.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(!(a.type==="rendered"&&a.data.type==="socket")){b.next=8;break}return s=a.data,u=s.nodeId,c=s.key,l=s.side,f=s.element,b.next=4,r.calculatePosition(u,l,c,f);case 4:d=b.sent,d&&(r.sockets.add({nodeId:u,key:c,side:l,element:f,position:d}),r.emitter.emit({nodeId:u,key:c,side:l})),b.next=24;break;case 8:if(a.type!=="unmount"){b.next=12;break}r.sockets.remove(a.data.element),b.next=24;break;case 12:if(a.type!=="nodetranslated"){b.next=16;break}r.emitter.emit({nodeId:a.data.id}),b.next=24;break;case 16:if(a.type!=="noderesized"){b.next=23;break}return p=a.data.id,b.next=20,Promise.all(r.sockets.snapshot().filter(function(j){return j.nodeId===a.data.id&&j.side==="output"}).map((function(){var j=M(w.mark(function P(I){var O,E,R,A;return w.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return O=I.side,E=I.key,R=I.element,K.next=3,r.calculatePosition(p,O,E,R);case 3:A=K.sent,A&&(I.position=A);case 5:case"end":return K.stop()}},P)}));return function(P){return j.apply(this,arguments)}})()));case 20:r.emitter.emit({nodeId:p}),b.next=24;break;case 23:a.type==="render"&&a.data.type==="connection"&&(h=a.data.payload,y=h.source,v=h.target,k=y||v,r.emitter.emit({nodeId:k}));case 24:return b.abrupt("return",a);case 25:case"end":return b.stop()}},o)}));return function(o){return i.apply(this,arguments)}})()))}},{key:"listen",value:function(n,r,i,o){var a=this,s=this.emitter.listen(function(u){if(u.nodeId===n&&(!u.key||u.side===r)&&(!u.side||u.key===i)){var c,l=a.sockets.getPosition({side:r,nodeId:n,key:i});if(!l)return;var f=l.x,d=l.y,p=(c=a.area)===null||c===void 0?void 0:c.nodeViews.get(n);p&&o({x:f+p.position.x,y:d+p.position.y})}});return this.sockets.snapshot().forEach(function(u){u.nodeId===n&&a.emitter.emit(u)}),s}}])})();function Ba(e,t,n){return t=q(t),ye(e,ri()?Reflect.construct(t,[],q(e).constructor):t.apply(e,n))}function ri(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ri=function(){return!!e})()}var Fa=(function(e){function t(n){var r;return L(this,t),r=Ba(this,t),r.props=n,r}return ae(t,e),B(t,[{key:"calculatePosition",value:(function(){var n=M(w.mark(function i(o,a,s,u){var c,l,f,d;return w.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(f=(c=this.area)===null||c===void 0?void 0:c.nodeViews.get(o),f!=null&&f.element){h.next=3;break}return h.abrupt("return",null);case 3:return h.next=5,Da(u,f.element);case 5:if(d=h.sent,!((l=this.props)!==null&&l!==void 0&&l.offset)){h.next=8;break}return h.abrupt("return",this.props.offset(d,o,a,s));case 8:return h.abrupt("return",{x:d.x+12*(a==="input"?-1:1),y:d.y});case 9:case"end":return h.stop()}},i,this)}));function r(i,o,a,s){return n.apply(this,arguments)}return r})()}])})(La);function Ha(e){return new Fa(e)}function Q(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var W="-ms-",Ve="-moz-",G="-webkit-",ii="comm",pt="rule",vn="decl",Va="@import",Ga="@namespace",oi="@keyframes",Wa="@layer",ai=Math.abs,mn=String.fromCharCode,Zt=Object.assign;function qa(e,t){return X(e,0)^45?(((t<<2^X(e,0))<<2^X(e,1))<<2^X(e,2))<<2^X(e,3):0}function si(e){return e.trim()}function ve(e,t){return(e=t.exec(e))?e[0]:e}function N(e,t,n){return e.replace(t,n)}function it(e,t,n){return e.indexOf(t,n)}function X(e,t){return e.charCodeAt(t)|0}function Ce(e,t,n){return e.slice(t,n)}function ue(e){return e.length}function ui(e){return e.length}function Be(e,t){return t.push(e),e}function Ka(e,t){return e.map(t).join("")}function Un(e,t){return e.filter(function(n){return!ve(n,t)})}var ht=1,Ne=1,ci=0,se=0,Z=0,Me="";function vt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ht,column:Ne,length:a,return:"",siblings:s}}function we(e,t){return Zt(vt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function _e(e){for(;e.root;)e=we(e.root,{children:[e]});Be(e,e.siblings)}function Ya(){return Z}function Za(){return Z=se>0?X(Me,--se):0,Ne--,Z===10&&(Ne=1,ht--),Z}function ce(){return Z=se<ci?X(Me,se++):0,Ne++,Z===10&&(Ne=1,ht++),Z}function ke(){return X(Me,se)}function ot(){return se}function mt(e,t){return Ce(Me,e,t)}function Ke(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ua(e){return ht=Ne=1,ci=ue(Me=e),se=0,[]}function Xa(e){return Me="",e}function zt(e){return si(mt(se-1,Ut(e===91?e+2:e===40?e+1:e)))}function Ja(e){for(;(Z=ke())&&Z<33;)ce();return Ke(e)>2||Ke(Z)>3?"":" "}function Qa(e,t){for(;--t&&ce()&&!(Z<48||Z>102||Z>57&&Z<65||Z>70&&Z<97););return mt(e,ot()+(t<6&&ke()==32&&ce()==32))}function Ut(e){for(;ce();)switch(Z){case e:return se;case 34:case 39:e!==34&&e!==39&&Ut(Z);break;case 40:e===41&&Ut(e);break;case 92:ce();break}return se}function es(e,t){for(;ce()&&e+Z!==57;)if(e+Z===84&&ke()===47)break;return"/*"+mt(t,se-1)+"*"+mn(e===47?e:ce())}function ts(e){for(;!Ke(ke());)ce();return mt(e,se)}function ns(e){return Xa(at("",null,null,null,[""],e=Ua(e),0,[0],e))}function at(e,t,n,r,i,o,a,s,u){for(var c=0,l=0,f=a,d=0,p=0,h=0,y=1,v=1,k=1,m=0,b="",j=i,P=o,I=r,O=b;v;)switch(h=m,m=ce()){case 40:if(h!=108&&X(O,f-1)==58){it(O+=N(zt(m),"&","&\f"),"&\f",ai(c?s[c-1]:0))!=-1&&(k=-1);break}case 34:case 39:case 91:O+=zt(m);break;case 9:case 10:case 13:case 32:O+=Ja(h);break;case 92:O+=Qa(ot()-1,7);continue;case 47:switch(ke()){case 42:case 47:Be(rs(es(ce(),ot()),t,n,u),u),(Ke(h||1)==5||Ke(ke()||1)==5)&&ue(O)&&Ce(O,-1,void 0)!==" "&&(O+=" ");break;default:O+="/"}break;case 123*y:s[c++]=ue(O)*k;case 125*y:case 59:case 0:switch(m){case 0:case 125:v=0;case 59+l:k==-1&&(O=N(O,/\f/g,"")),p>0&&(ue(O)-f||y===0&&h===47)&&Be(p>32?Jn(O+";",r,n,f-1,u):Jn(N(O," ","")+";",r,n,f-2,u),u);break;case 59:O+=";";default:if(Be(I=Xn(O,t,n,c,l,i,s,b,j=[],P=[],f,o),o),m===123)if(l===0)at(O,t,I,I,j,o,f,s,P);else{switch(d){case 99:if(X(O,3)===110)break;case 108:if(X(O,2)===97)break;default:l=0;case 100:case 109:case 115:}l?at(e,I,I,r&&Be(Xn(e,I,I,0,0,i,s,b,i,j=[],f,P),P),i,P,f,s,r?j:P):at(O,I,I,I,[""],P,0,s,P)}}c=l=p=0,y=k=1,b=O="",f=a;break;case 58:f=1+ue(O),p=h;default:if(y<1){if(m==123)--y;else if(m==125&&y++==0&&Za()==125)continue}switch(O+=mn(m),m*y){case 38:k=l>0?1:(O+="\f",-1);break;case 44:s[c++]=(ue(O)-1)*k,k=1;break;case 64:ke()===45&&(O+=zt(ce())),d=ke(),l=f=ue(b=O+=ts(ot())),m++;break;case 45:h===45&&ue(O)==2&&(y=0)}}return o}function Xn(e,t,n,r,i,o,a,s,u,c,l,f){for(var d=i-1,p=i===0?o:[""],h=ui(p),y=0,v=0,k=0;y<r;++y)for(var m=0,b=Ce(e,d+1,d=ai(v=a[y])),j=e;m<h;++m)(j=si(v>0?p[m]+" "+b:N(b,/&\f/g,p[m])))&&(u[k++]=j);return vt(e,t,n,i===0?pt:s,u,c,l,f)}function rs(e,t,n,r){return vt(e,t,n,ii,mn(Ya()),Ce(e,2,-2),0,r)}function Jn(e,t,n,r,i){return vt(e,t,n,vn,Ce(e,0,r),Ce(e,r+1,-1),r,i)}function li(e,t,n){switch(qa(e,t)){case 5103:return G+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return G+e+e;case 4855:return G+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Ve+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return G+e+Ve+e+W+e+e;case 5936:switch(X(e,t+11)){case 114:return G+e+W+N(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return G+e+W+N(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return G+e+W+N(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return G+e+W+e+e;case 6165:return G+e+W+"flex-"+e+e;case 5187:return G+e+N(e,/(\w+).+(:[^]+)/,G+"box-$1$2"+W+"flex-$1$2")+e;case 5443:return G+e+W+"flex-item-"+N(e,/flex-|-self/g,"")+(ve(e,/flex-|baseline/)?"":W+"grid-row-"+N(e,/flex-|-self/g,""))+e;case 4675:return G+e+W+"flex-line-pack"+N(e,/align-content|flex-|-self/g,"")+e;case 5548:return G+e+W+N(e,"shrink","negative")+e;case 5292:return G+e+W+N(e,"basis","preferred-size")+e;case 6060:return G+"box-"+N(e,"-grow","")+G+e+W+N(e,"grow","positive")+e;case 4554:return G+N(e,/([^-])(transform)/g,"$1"+G+"$2")+e;case 6187:return N(N(N(e,/(zoom-|grab)/,G+"$1"),/(image-set)/,G+"$1"),e,"")+e;case 5495:case 3959:return N(e,/(image-set\([^]*)/,G+"$1$`$1");case 4968:return N(N(e,/(.+:)(flex-)?(.*)/,G+"box-pack:$3"+W+"flex-pack:$3"),/space-between/,"justify")+G+e+e;case 4200:if(!ve(e,/flex-|baseline/))return W+"grid-column-align"+Ce(e,t)+e;break;case 2592:case 3360:return W+N(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,i){return t=i,ve(r.props,/grid-\w+-end/)})?~it(e+(n=n[t].value),"span",0)?e:W+N(e,"-start","")+e+W+"grid-row-span:"+(~it(n,"span",0)?ve(n,/\d+/):+ve(n,/\d+/)-+ve(e,/\d+/))+";":W+N(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return ve(r.props,/grid-\w+-start/)})?e:W+N(N(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return N(e,/(.+)-inline(.+)/,G+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ue(e)-1-t>6)switch(X(e,t+1)){case 109:if(X(e,t+4)!==45)break;case 102:return N(e,/(.+:)(.+)-([^]+)/,"$1"+G+"$2-$3$1"+Ve+(X(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~it(e,"stretch",0)?li(N(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return N(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,o,a,s,u,c){return W+i+":"+o+c+(a?W+i+"-span:"+(s?u:+u-+o)+c:"")+e});case 4949:if(X(e,t+6)===121)return N(e,":",":"+G)+e;break;case 6444:switch(X(e,X(e,14)===45?18:11)){case 120:return N(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+G+(X(e,14)===45?"inline-":"")+"box$3$1"+G+"$2$3$1"+W+"$2box$3")+e;case 100:return N(e,":",":"+W)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return N(e,"scroll-","scroll-snap-")+e}return e}function lt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function is(e,t,n,r){switch(e.type){case Wa:if(e.children.length)break;case Va:case Ga:case vn:return e.return=e.return||e.value;case ii:return"";case oi:return e.return=e.value+"{"+lt(e.children,r)+"}";case pt:if(!ue(e.value=e.props.join(",")))return""}return ue(n=lt(e.children,r))?e.return=e.value+"{"+n+"}":""}function os(e){var t=ui(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function as(e){return function(t){t.root||(t=t.return)&&e(t)}}function ss(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case vn:e.return=li(e.value,e.length,n);return;case oi:return lt([we(e,{value:N(e.value,"@","@"+G)})],r);case pt:if(e.length)return Ka(n=e.props,function(i){switch(ve(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":_e(we(e,{props:[N(i,/:(read-\w+)/,":"+Ve+"$1")]})),_e(we(e,{props:[i]})),Zt(e,{props:Un(n,r)});break;case"::placeholder":_e(we(e,{props:[N(i,/:(plac\w+)/,":"+G+"input-$1")]})),_e(we(e,{props:[N(i,/:(plac\w+)/,":"+Ve+"$1")]})),_e(we(e,{props:[N(i,/:(plac\w+)/,W+"input-$1")]})),_e(we(e,{props:[i]})),Zt(e,{props:Un(n,r)});break}return""})}}var Ae={},Dt,Mt;const ze=typeof process<"u"&&Ae!==void 0&&(Ae.REACT_APP_SC_ATTR||Ae.SC_ATTR)||"data-styled",di="active",fi="data-styled-version",yt="6.4.1",yn=`/*!sc*/
51
+ `,Ge=typeof window<"u"&&typeof document<"u";function Qn(e){if(typeof process<"u"&&Ae!==void 0){const t=Ae[e];if(t!==void 0&&t!=="")return t!=="false"}}const us=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:(Mt=(Dt=Qn("REACT_APP_SC_DISABLE_SPEEDY"))!==null&&Dt!==void 0?Dt:Qn("SC_DISABLE_SPEEDY"))!==null&&Mt!==void 0?Mt:typeof process>"u"||Ae===void 0),cs="sc-keyframes-";function gt(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let st=new Map,dt=new Map,ut=1;const et=e=>{if(st.has(e))return st.get(e);for(;dt.has(ut);)ut++;const t=ut++;return st.set(e,t),dt.set(t,e),t},ls=e=>dt.get(e),ds=(e,t)=>{ut=t+1,st.set(e,t),dt.set(t,e)},gn=Object.freeze([]),De=Object.freeze({});function fs(e,t,n=De){return e.theme!==n.theme&&e.theme||t||n.theme}const ps=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,hs=/(^-|-$)/g;function pi(e){return e.replace(ps,"-").replace(hs,"")}const vs=/(a)(d)/gi,er=e=>String.fromCharCode(e+(e>25?39:97));function hi(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=er(t%52)+n;return(er(t%52)+n).replace(vs,"$1-$2")}const Xt=5381,Oe=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},vi=e=>Oe(Xt,e);function ms(e){return hi(vi(e)>>>0)}function ys(e){return e.displayName||e.name||"Component"}function Jt(e){return typeof e=="string"&&!0}function gs(e){return Jt(e)?`styled.${e}`:`Styled(${ys(e)})`}const mi=Symbol.for("react.memo"),bs=Symbol.for("react.forward_ref"),ws={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},ks={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yi={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},xs={[bs]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[mi]:yi};function tr(e){return("type"in(t=e)&&t.type.$$typeof)===mi?yi:"$$typeof"in e?xs[e.$$typeof]:ws;var t}const Os=Object.defineProperty,Ss=Object.getOwnPropertyNames,Cs=Object.getOwnPropertySymbols,$s=Object.getOwnPropertyDescriptor,Ps=Object.getPrototypeOf,js=Object.prototype;function gi(e,t,n){if(typeof t!="string"){const r=Ps(t);r&&r!==js&&gi(e,r,n);const i=Ss(t).concat(Cs(t)),o=tr(e),a=tr(t);for(let s=0;s<i.length;++s){const u=i[s];if(!(u in ks||n&&n[u]||a&&u in a||o&&u in o)){const c=$s(t,u);try{Os(e,u,c)}catch{}}}}return e}function bt(e){return typeof e=="function"}function bi(e){return typeof e=="object"&&"styledComponentId"in e}function Fe(e,t){return e&&t?e+" "+t:e||t||""}function nr(e,t){return e.join("")}function Ye(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Qt(e,t,n=!1){if(!n&&!Ye(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let r=0;r<t.length;r++)e[r]=Qt(e[r],t[r]);else if(Ye(t))for(const r in t)e[r]=Qt(e[r],t[r]);return e}function wi(e,t){Object.defineProperty(e,"toString",{value:t})}const _s=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const i=this.groupSizes,o=i.length;let a=o;for(;e>=a;)if(a<<=1,a<0)throw gt(16,`${e}`);this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(let s=o;s<a;s++)this.groupSizes[s]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let i=n;i<r;i++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||this.groupSizes[e]===0)return t;const n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let o=r;o<i;o++)t+=this.tag.getRule(o)+yn;return t}},Es=`style[${ze}][${fi}="${yt}"]`,Rs=new RegExp(`^${ze}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),rr=e=>typeof ShadowRoot<"u"&&e instanceof ShadowRoot||"host"in e&&e.nodeType===11,en=e=>{if(!e)return document;if(rr(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(rr(t))return t}return document},Is=(e,t,n)=>{const r=n.split(",");let i;for(let o=0,a=r.length;o<a;o++)(i=r[o])&&e.registerName(t,i)},As=(e,t)=>{var n;const r=((n=t.textContent)!==null&&n!==void 0?n:"").split(yn),i=[];for(let o=0,a=r.length;o<a;o++){const s=r[o].trim();if(!s)continue;const u=s.match(Rs);if(u){const c=0|parseInt(u[1],10),l=u[2];c!==0&&(ds(l,c),Is(e,l,u[3]),e.getTag().insertRules(c,i)),i.length=0}else i.push(s)}},Tt=e=>{const t=en(e.options.target).querySelectorAll(Es);for(let n=0,r=t.length;n<r;n++){const i=t[n];i&&i.getAttribute(ze)!==di&&(As(e,i),i.parentNode&&i.parentNode.removeChild(i))}};let Te=!1;function Ns(){if(Te!==!1)return Te;if(typeof document<"u"){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Te=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return Te=t.getAttribute("content")||void 0}return Te=typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}const ki=(e,t)=>{const n=document.head,r=e||n,i=document.createElement("style"),o=(u=>{const c=Array.from(u.querySelectorAll(`style[${ze}]`));return c[c.length-1]})(r),a=o!==void 0?o.nextSibling:null;i.setAttribute(ze,di),i.setAttribute(fi,yt);const s=t||Ns();return s&&i.setAttribute("nonce",s),r.insertBefore(i,a),i},zs=class{constructor(e,t){this.element=ki(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(n=>{var r;if(n.sheet)return n.sheet;const i=(r=n.getRootNode().styleSheets)!==null&&r!==void 0?r:document.styleSheets;for(let o=0,a=i.length;o<a;o++){const s=i[o];if(s.ownerNode===n)return s}throw gt(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Ds=class{constructor(e,t){this.element=ki(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let ir=Ge;const Ms={isServer:!Ge,useCSSOMInjection:!us};class wt{static registerId(t){return et(t)}constructor(t=De,n={},r){this.options=Object.assign(Object.assign({},Ms),t),this.gs=n,this.keyframeIds=new Set,this.names=new Map(r),this.server=!!t.isServer,!this.server&&Ge&&ir&&(ir=!1,Tt(this)),wi(this,()=>(i=>{const o=i.getTag(),{length:a}=o;let s="";for(let u=0;u<a;u++){const c=ls(u);if(c===void 0)continue;const l=i.names.get(c);if(l===void 0||!l.size)continue;const f=o.getGroup(u);if(f.length===0)continue;const d=ze+".g"+u+'[id="'+c+'"]';let p="";for(const h of l)h.length>0&&(p+=h+",");s+=f+d+'{content:"'+p+'"}'+yn}return s})(this))}rehydrate(){!this.server&&Ge&&Tt(this)}reconstructWithOptions(t,n=!0){const r=new wt(Object.assign(Object.assign({},this.options),t),this.gs,n&&this.names||void 0);return r.keyframeIds=new Set(this.keyframeIds),!this.server&&Ge&&t.target!==this.options.target&&en(this.options.target)!==en(t.target)&&Tt(r),r}allocateGSInstance(t){return this.gs[t]=(this.gs[t]||0)+1}getTag(){return this.tag||(this.tag=(t=(({useCSSOMInjection:n,target:r,nonce:i})=>n?new zs(r,i):new Ds(r,i))(this.options),new _s(t)));var t}hasNameForId(t,n){var r,i;return(i=(r=this.names.get(t))===null||r===void 0?void 0:r.has(n))!==null&&i!==void 0&&i}registerName(t,n){et(t),t.startsWith(cs)&&this.keyframeIds.add(t);const r=this.names.get(t);r?r.add(n):this.names.set(t,new Set([n]))}insertRules(t,n,r){this.registerName(t,n),this.getTag().insertRules(et(t),r)}clearNames(t){this.names.has(t)&&this.names.get(t).clear()}clearRules(t){this.getTag().clearGroup(et(t)),this.clearNames(t)}clearTag(){this.tag=void 0}}const xi=new WeakSet,Ts={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ls(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t!="number"||t===0||e in Ts||e.startsWith("--")?String(t).trim():t+"px"}const xe=47;function or(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}const Bs=Symbol.for("sc-keyframes");function Fs(e){return typeof e=="object"&&e!==null&&Bs in e}function Oi(e){return bt(e)&&!(e.prototype&&e.prototype.isReactComponent)}const Si=e=>e==null||e===!1||e==="",Hs=Symbol.for("react.client.reference");function ar(e){return e.$$typeof===Hs}function Ci(e,t){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&!Si(r)&&(Array.isArray(r)&&xi.has(r)||bt(r)?t.push(or(n)+":",r,";"):Ye(r)?(t.push(n+" {"),Ci(r,t),t.push("}")):t.push(or(n)+": "+Ls(n,r)+";"))}}function Se(e,t,n,r,i=[]){if(Si(e))return i;const o=typeof e;if(o==="string")return i.push(e),i;if(o==="function"){if(ar(e))return i;if(Oi(e)&&t){const a=e(t);return Se(a,t,n,r,i)}return i.push(e),i}if(Array.isArray(e)){for(let a=0;a<e.length;a++)Se(e[a],t,n,r,i);return i}return bi(e)?(i.push(`.${e.styledComponentId}`),i):Fs(e)?(n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i):ar(e)?i:Ye(e)?(Ci(e,i),i):(i.push(e.toString()),i)}const Vs=vi(yt);class Gs{constructor(t,n,r){this.rules=t,this.componentId=n,this.baseHash=Oe(Vs,n),this.baseStyle=r,wt.registerId(n)}generateAndInjectStyles(t,n,r){let i=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,n,r):"";{let o="";for(let a=0;a<this.rules.length;a++){const s=this.rules[a];if(typeof s=="string")o+=s;else if(s)if(Oi(s)){const u=s(t);typeof u=="string"?o+=u:u!=null&&u!==!1&&(o+=nr(Se(u,t,n,r)))}else o+=nr(Se(s,t,n,r))}if(o){this.dynamicNameCache||(this.dynamicNameCache=new Map);const a=r.hash?r.hash+o:o;let s=this.dynamicNameCache.get(a);if(!s){if(s=hi(Oe(Oe(this.baseHash,r.hash),o)>>>0),this.dynamicNameCache.size>=200){const u=this.dynamicNameCache.keys().next().value;u!==void 0&&this.dynamicNameCache.delete(u)}this.dynamicNameCache.set(a,s)}if(!n.hasNameForId(this.componentId,s)){const u=r(o,"."+s,void 0,this.componentId);n.insertRules(this.componentId,s,u)}i=Fe(i,s)}}return i}}const Ws=/&/g;function $i(e,t){let n=0;for(;--t>=0&&e.charCodeAt(t)===92;)n++;return!(1&~n)}function Lt(e){const t=e.length;let n="",r=0,i=0,o=0,a=!1,s=!1;for(let u=0;u<t;u++){const c=e.charCodeAt(u);if(o!==0||a||c!==xe||e.charCodeAt(u+1)!==42)if(a)c===42&&e.charCodeAt(u+1)===xe&&(a=!1,u++);else if(c!==34&&c!==39||$i(e,u)){if(o===0)if(c===123)i++;else if(c===125){if(i--,i<0){s=!0;let l=u+1;for(;l<t;){const f=e.charCodeAt(l);if(f===59||f===10)break;l++}l<t&&e.charCodeAt(l)===59&&l++,i=0,u=l-1,r=l;continue}i===0&&(n+=e.substring(r,u+1),r=u+1)}else c===59&&i===0&&(n+=e.substring(r,u+1),r=u+1)}else o===0?o=c:o===c&&(o=0);else a=!0,u++}return s||i!==0||o!==0?(r<t&&i===0&&o===0&&(n+=e.substring(r)),n):e}function Pi(e,t){const n=t+" ",r=","+n;for(let i=0;i<e.length;i++){const o=e[i];if(o.type==="rule"){o.value=(n+o.value).replaceAll(",",r);const a=o.props,s=[];for(let u=0;u<a.length;u++)s[u]=n+a[u];o.props=s}Array.isArray(o.children)&&o.type!=="@keyframes"&&Pi(o.children,t)}return e}function qs({options:e=De,plugins:t=gn}=De){let n,r,i;const o=(d,p,h)=>h.startsWith(r)&&h.endsWith(r)&&h.replaceAll(r,"").length>0?`.${n}`:d,a=t.slice();a.push(d=>{d.type===pt&&d.value.includes("&")&&(i||(i=new RegExp(`\\${r}\\b`,"g")),d.props[0]=d.props[0].replace(Ws,r).replace(i,o))}),e.prefix&&a.push(ss),a.push(is);let s=[];const u=os(a.concat(as(d=>s.push(d)))),c=(d,p="",h="",y="&")=>{n=y,r=p,i=void 0;const v=(function(m){const b=m.indexOf("//")!==-1,j=m.indexOf("}")!==-1;if(!b&&!j)return m;if(!b)return Lt(m);const P=m.length;let I="",O=0,E=0,R=0,A=0,D=0,K=!1;for(;E<P;){const F=m.charCodeAt(E);if(F!==34&&F!==39||$i(m,E))if(R===0)if(F===xe&&E+1<P&&m.charCodeAt(E+1)===42){for(E+=2;E+1<P&&(m.charCodeAt(E)!==42||m.charCodeAt(E+1)!==xe);)E++;E+=2}else if(F!==40)if(F!==41)if(A>0)E++;else if(F===42&&E+1<P&&m.charCodeAt(E+1)===xe)I+=m.substring(O,E),E+=2,O=E,K=!0;else if(F===xe&&E+1<P&&m.charCodeAt(E+1)===xe){for(I+=m.substring(O,E);E<P&&m.charCodeAt(E)!==10;)E++;O=E,K=!0}else F===123?D++:F===125&&D--,E++;else A>0&&A--,E++;else A++,E++;else E++;else R===0?R=F:R===F&&(R=0),E++}return K?(O<P&&(I+=m.substring(O)),D===0?I:Lt(I)):D===0?m:Lt(m)})(d);let k=ns(h||p?h+" "+p+" { "+v+" }":v);return e.namespace&&(k=Pi(k,e.namespace)),s=[],lt(k,u),s},l=e;let f=Xt;for(let d=0;d<t.length;d++)t[d].name||gt(15),f=Oe(f,t[d].name);return l!=null&&l.namespace&&(f=Oe(f,l.namespace)),l!=null&&l.prefix&&(f=Oe(f,"p")),c.hash=f!==Xt?f.toString():"",c}const Ks=new wt,Ys=qs(),ji=Re.createContext({shouldForwardProp:void 0,styleSheet:Ks,stylis:Ys,stylisPlugins:void 0});ji.Consumer;function Zs(){return Re.useContext(ji)}const _i=Re.createContext(void 0);_i.Consumer;const sr=Object.prototype.hasOwnProperty,Bt={};function Us(e,t){const n=typeof e!="string"?"sc":pi(e);Bt[n]=(Bt[n]||0)+1;const r=n+"-"+ms(yt+n+Bt[n]);return t?t+"-"+r:r}function Xs(e,t,n){const r=bi(e),i=e,o=!Jt(e),{attrs:a=gn,componentId:s=Us(t.displayName,t.parentComponentId),displayName:u=gs(e)}=t,c=t.displayName&&t.componentId?pi(t.displayName)+"-"+t.componentId:t.componentId||s,l=r&&i.attrs?i.attrs.concat(a).filter(Boolean):a;let{shouldForwardProp:f}=t;if(r&&i.shouldForwardProp){const y=i.shouldForwardProp;if(t.shouldForwardProp){const v=t.shouldForwardProp;f=(k,m)=>y(k,m)&&v(k,m)}else f=y}const d=new Gs(n,c,r?i.componentStyle:void 0);function p(y,v){return(function(k,m,b){const{attrs:j,componentStyle:P,defaultProps:I,foldedComponentIds:O,styledComponentId:E,target:R}=k,A=Re.useContext(_i),D=Zs(),K=k.shouldForwardProp||D.shouldForwardProp,F=fs(m,A,I)||De;let $,S;{const V=Re.useRef(null),T=V.current;if(T!==null&&T[1]===F&&T[2]===D.styleSheet&&T[3]===D.stylis&&T[7]===P&&(function(re,Y,J){const ee=re,U=Y;let ge=0;for(const le in U)if(sr.call(U,le)&&(ge++,ee[le]!==U[le]))return!1;return ge===J})(T[0],m,T[4]))$=T[5],S=T[6];else{$=(function(Y,J,ee){const U=Object.assign(Object.assign({},J),{className:void 0,theme:ee}),ge=Y.length>1;for(let le=0;le<Y.length;le++){const kt=Y[le],Ue=bt(kt)?kt(ge?Object.assign({},U):U):kt;for(const be in Ue)be==="className"?U.className=Fe(U.className,Ue[be]):be==="style"?U.style=Object.assign(Object.assign({},U.style),Ue[be]):be in J&&J[be]===void 0||(U[be]=Ue[be])}return"className"in J&&typeof J.className=="string"&&(U.className=Fe(U.className,J.className)),U})(j,m,F),S=(function(Y,J,ee,U){return Y.generateAndInjectStyles(J,ee,U)})(P,$,D.styleSheet,D.stylis);let re=0;for(const Y in m)sr.call(m,Y)&&re++;V.current=[m,F,D.styleSheet,D.stylis,re,$,S,P]}}const _=$.as||R,x=(function(V,T,re,Y){const J={};for(const ee in V)V[ee]===void 0||ee[0]==="$"||ee==="as"||ee==="theme"&&V.theme===re||(ee==="forwardedAs"?J.as=V.forwardedAs:Y&&!Y(ee,T)||(J[ee]=V[ee]));return J})($,_,F,K);let H=Fe(O,E);return S&&(H+=" "+S),$.className&&(H+=" "+$.className),x[Jt(_)&&_.includes("-")?"class":"className"]=H,b&&(x.ref=b),g.createElement(_,x)})(h,y,v)}p.displayName=u;let h=Re.forwardRef(p);return h.attrs=l,h.componentStyle=d,h.displayName=u,h.shouldForwardProp=f,h.foldedComponentIds=r?Fe(i.foldedComponentIds,i.styledComponentId):"",h.styledComponentId=c,h.target=r?i.target:e,Object.defineProperty(h,"defaultProps",{get(){return this._foldedDefaultProps},set(y){this._foldedDefaultProps=r?(function(v,...k){for(const m of k)Qt(v,m,!0);return v})({},i.defaultProps,y):y}}),wi(h,()=>`.${h.styledComponentId}`),o&&gi(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),h}var Js=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function ur(e,t){const n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}const cr=e=>(xi.add(e),e);function bn(e,...t){if(bt(e)||Ye(e))return cr(Se(ur(gn,[e,...t])));const n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Se(n):cr(Se(ur(n,t)))}function tn(e,t,n=De){if(!t)throw gt(1,t);const r=(i,...o)=>e(t,n,bn(i,...o));return r.attrs=i=>tn(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)})),r.withConfig=i=>tn(e,t,Object.assign(Object.assign({},n),i)),r}const Ei=e=>tn(Xs,e),ne=Ei;Js.forEach(e=>{ne[e]=Ei(e)});function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e.apply(null,arguments)}function Qs(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wn(e,t){if(e==null)return{};var n,r,i=Qs(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}/*!
52
+ * rete-react-plugin v2.0.7
53
+ * (c) 2025 Vitaliy Stoliarov
54
+ * Released under the MIT license.
55
+ * */function eu(e){var t=e==null?void 0:e.createRoot,n=new WeakMap;function r(a){var s=n.get(a);if(s)return s;var u=document.createElement("span");return a.appendChild(u),n.set(a,u),u}function i(a){var s=n.get(a);s&&(s.remove(),n.delete(a))}if(t){var o=new WeakMap;return{mount:function(s,u){var c,l=r(u),f=o.get(l);return f||(f=t(l),o.set(l,f)),f.render(s),(c=l.firstElementChild)!==null&&c!==void 0?c:l},unmount:function(s){var u=r(s),c=o.get(u);c&&(c.unmount(),o.delete(u)),i(s)}}}return{mount:function(s,u){var c=r(u);if("render"in xn&&typeof Le.render=="function"){var l=Le.render(s,c);return l||c}throw new Error("ReactDOM.render is not available")},unmount:function(s){var u=r(s);if("unmountComponentAtNode"in xn&&typeof Le.unmountComponentAtNode=="function")Le.unmountComponentAtNode(u);else throw new Error("ReactDOM.unmountComponentAtNode is not available");i(s)}}}function tu(e){var t=e.children,n=e.rendered;return g.useEffect(function(){n()}),t}function nu(){var e=g.useRef(!1);return g.useEffect(function(){e.current=!0},[]),{apply:function(n){e.current?queueMicrotask(function(){Le.flushSync(n)}):n()}}}var Ri=g.createContext({start:null,end:null,path:null});function ru(e){var t=e.children,n=g.useState(null),r=ie(n,2),i=r[0],o=r[1],a=g.useState(null),s=ie(a,2),u=s[0],c=s[1],l=g.useState(null),f=ie(l,2),d=f[0],p=f[1],h="x"in e.start?e.start:i,y="x"in e.end?e.end:u,v=nu();return g.useEffect(function(){var k=typeof e.start=="function"&&e.start(function(b){v.apply(function(){o(b)})}),m=typeof e.end=="function"&&e.end(function(b){v.apply(function(){c(b)})});return function(){k&&k(),m&&m()}},[]),g.useEffect(function(){h&&y&&e.path(h,y).then(function(k){v.apply(function(){p(k)})})},[h,y]),g.createElement(Ri.Provider,{value:{start:h,end:y,path:d}},t)}function Ii(){return g.useContext(Ri)}var lr,dr,iu=ne.svg(lr||(lr=Q([`
56
+ overflow: visible !important;
57
+ position: absolute;
58
+ pointer-events: none;
59
+ width: 9999px;
60
+ height: 9999px;
61
+ `]))),ou=ne.path(dr||(dr=Q([`
62
+ fill: none;
63
+ stroke-width: 5px;
64
+ stroke: steelblue;
65
+ pointer-events: auto;
66
+ `,`
67
+ `])),function(e){var t;return(t=e.styles)===null||t===void 0?void 0:t.call(e,e)});function Ai(e){var t=Ii(),n=t.path;return n?g.createElement(iu,{"data-testid":"connection"},g.createElement(ou,{styles:e.styles,d:n})):null}function au(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=su(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
68
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function su(e,t){if(e){if(typeof e=="string")return fr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fr(e,t):void 0}}function fr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uu(e){for(var t=new e.constructor(e.type),n=t;n=Object.getPrototypeOf(n);){var r=Object.getOwnPropertyNames(n),i=au(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=t[a];typeof s!="function"&&Object.defineProperty(t,a,{value:e[a]})}}catch(u){i.e(u)}finally{i.f()}}return t}var cu="__reactContainer$";function lu(e){for(var t=e;t;){if(t._reactRootContainer||Object.keys(t).some(function(n){return n.startsWith(cu)}))return t;t=t.parentElement}}function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pr(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ni(e,t){return{start:function(r){var i=hr({},t(r));function o(s){var u=hr({},t(s)),c=u.x-i.x,l=u.y-i.y;i=u,e(c,l)}function a(){window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a)}window.addEventListener("pointermove",o),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a)}}}function du(e,t){g.useEffect(function(){var n=function(o){if(!t){var a=lu(o.target),s=g.version.startsWith("16")?document:a;s&&(o.stopPropagation(),s.dispatchEvent(uu(o)))}},r=e.current;return r==null||r.addEventListener("pointerdown",n),function(){r==null||r.removeEventListener("pointerdown",n)}},[e,t])}var vr,fu=ne.input(vr||(vr=Q([`
69
+ width: 100%;
70
+ border-radius: 30px;
71
+ background-color: white;
72
+ padding: 2px 6px;
73
+ border: 1px solid #999;
74
+ font-size: 110%;
75
+ box-sizing: border-box;
76
+ `,`
77
+ `])),function(e){var t;return(t=e.styles)===null||t===void 0?void 0:t.call(e,e)});function nn(e){var t=g.useState(e.data.value),n=ie(t,2),r=n[0],i=n[1],o=g.useRef(null);return du(o),g.useEffect(function(){i(e.data.value)},[e.data.value]),g.createElement(fu,{value:r,type:e.data.type,ref:o,readOnly:e.data.readonly,onChange:function(s){var u=e.data.type==="number"?+s.target.value:s.target.value;i(u),e.data.setValue(u)},styles:e.styles})}var rn="rgba(110,136,255,0.8)",zi="#ffd92c",de=24,me=6,Di="#96b38a",Mi=180,pu=Object.freeze({__proto__:null,$nodecolor:rn,$nodecolorselected:zi,$socketsize:de,$socketmargin:me,$socketcolor:Di,$nodewidth:Mi}),hu=["init","unmount"];function Ti(e){var t=e.init,n=e.unmount,r=wn(e,hu),i=g.useRef(null);return g.useEffect(function(){var o=i.current;return function(){o&&n(o)}},[]),g.useEffect(function(){i.current&&t(i.current)}),g.createElement("span",$e({},r,{ref:i}))}var vu=["name","emit","payload"];function on(e){var t=e.name,n=e.emit,r=e.payload,i=wn(e,vu);return g.createElement(Ti,$e({},i,{className:t,init:function(a){n({type:"render",data:{type:"control",element:a,payload:r}})},unmount:function(a){n({type:"unmount",data:{element:a}})}}))}var mu=["name","emit","nodeId","side","socketKey","payload"];function an(e){var t=e.name,n=e.emit,r=e.nodeId,i=e.side,o=e.socketKey,a=e.payload,s=wn(e,mu);return g.createElement(Ti,$e({},s,{className:t,init:function(c){n({type:"render",data:{type:"socket",side:i,key:o,nodeId:r,element:c,payload:a}})},unmount:function(c){n({type:"unmount",data:{element:c}})}}))}var mr,yr,Li=ne.div(mr||(mr=Q([`
78
+ background: `,`;
79
+ border: 2px solid #4e58bf;
80
+ border-radius: 10px;
81
+ cursor: pointer;
82
+ box-sizing: border-box;
83
+ width: `,`;
84
+ height: `,`;
85
+ padding-bottom: 6px;
86
+ position: relative;
87
+ user-select: none;
88
+ line-height: initial;
89
+ font-family: Arial;
90
+
91
+ &:hover {
92
+ background: lighten(`,`,4%);
93
+ }
94
+ `,`
95
+ .title {
96
+ color: white;
97
+ font-family: sans-serif;
98
+ font-size: 18px;
99
+ padding: 8px;
100
+ }
101
+ .output {
102
+ text-align: right;
103
+ }
104
+ .input {
105
+ text-align: left;
106
+ }
107
+ .output-socket {
108
+ text-align: right;
109
+ margin-right: -`,`px;
110
+ display: inline-block;
111
+ }
112
+ .input-socket {
113
+ text-align: left;
114
+ margin-left: -`,`px;
115
+ display: inline-block;
116
+ }
117
+ .input-title,.output-title {
118
+ vertical-align: middle;
119
+ color: white;
120
+ display: inline-block;
121
+ font-family: sans-serif;
122
+ font-size: 14px;
123
+ margin: `,`px;
124
+ line-height: `,`px;
125
+ }
126
+ .input-control {
127
+ z-index: 1;
128
+ width: calc(100% - `,`px);
129
+ vertical-align: middle;
130
+ display: inline-block;
131
+ }
132
+ .control {
133
+ display: block;
134
+ padding: `,"px ",`px;
135
+ }
136
+ `,`
137
+ `])),rn,function(e){return Number.isFinite(e.width)?"".concat(e.width,"px"):"".concat(Mi,"px")},function(e){return Number.isFinite(e.height)?"".concat(e.height,"px"):"auto"},rn,function(e){return e.selected&&bn(yr||(yr=Q([`
138
+ background: `,`;
139
+ border-color: #e3c000;
140
+ `])),zi)},de/2+me,de/2+me,me,de,de+2*me,me,de/2+me,function(e){var t;return(t=e.styles)===null||t===void 0?void 0:t.call(e,e)});function Ft(e){e.sort(function(t,n){var r,i,o=((r=t[1])===null||r===void 0?void 0:r.index)||0,a=((i=n[1])===null||i===void 0?void 0:i.index)||0;return o-a})}function Bi(e){var t=Object.entries(e.data.inputs),n=Object.entries(e.data.outputs),r=Object.entries(e.data.controls),i=e.data.selected||!1,o=e.data,a=o.id,s=o.label,u=o.width,c=o.height;return Ft(t),Ft(n),Ft(r),g.createElement(Li,{selected:i,width:u,height:c,styles:e.styles,"data-testid":"node"},g.createElement("div",{className:"title","data-testid":"title"},s),n.map(function(l){var f=ie(l,2),d=f[0],p=f[1];return p&&g.createElement("div",{className:"output",key:d,"data-testid":"output-".concat(d)},g.createElement("div",{className:"output-title","data-testid":"output-title"},p.label),g.createElement(an,{name:"output-socket",side:"output",socketKey:d,nodeId:a,emit:e.emit,payload:p.socket,"data-testid":"output-socket"}))}),r.map(function(l){var f=ie(l,2),d=f[0],p=f[1];return p?g.createElement(on,{key:d,name:"control",emit:e.emit,payload:p,"data-testid":"control-".concat(d)}):null}),t.map(function(l){var f=ie(l,2),d=f[0],p=f[1];return p&&g.createElement("div",{className:"input",key:d,"data-testid":"input-".concat(d)},g.createElement(an,{name:"input-socket",side:"input",socketKey:d,nodeId:a,emit:e.emit,payload:p.socket,"data-testid":"input-socket"}),p&&(!p.control||!p.showControl)&&g.createElement("div",{className:"input-title","data-testid":"input-title"},p.label),p.control&&p.showControl&&g.createElement(on,{key:d,name:"input-control",emit:e.emit,payload:p.control,"data-testid":"input-control"}))}))}var gr,br,Fi=ne.div(gr||(gr=Q([`
141
+ display: inline-block;
142
+ cursor: pointer;
143
+ border: 1px solid white;
144
+ border-radius: `,`px;
145
+ width: `,`px;
146
+ height: `,`px;
147
+ vertical-align: middle;
148
+ background: `,`;
149
+ z-index: 2;
150
+ box-sizing: border-box;
151
+ &:hover {
152
+ border-width: 4px;
153
+ }
154
+ &.multiple {
155
+ border-color: yellow;
156
+ }
157
+ `])),de/2,de,de,Di),yu=ne.div(br||(br=Q([`
158
+ border-radius: `,`px;
159
+ padding: `,`px;
160
+ &:hover `,` {
161
+ border-width: 4px;
162
+ }
163
+ `])),(de+me*2)/2,me,Fi);function Hi(e){return g.createElement(yu,null,g.createElement(Fi,{title:e.data.name}))}function gu(e){var t=typeof(e==null?void 0:e.socketPositionWatcher)>"u"?Ha():e.socketPositionWatcher,n=(e==null?void 0:e.customize)||{},r=n.node,i=n.connection,o=n.socket,a=n.control;return{attach:function(u){t.attach(u)},render:function(u,c){if(u.data.type==="node"){var l=c.parentScope(),f=r?r(u.data):Bi;return f&&g.createElement(f,{data:u.data.payload,emit:function(P){return void l.emit(P)}})}else if(u.data.type==="connection"){var d=i?i(u.data):Ai,p=u.data.payload,h=p.sourceOutput,y=p.targetInput,v=p.source,k=p.target;return d&&g.createElement(ru,{start:u.data.start||function(j){return t.listen(v,"output",h,j)},end:u.data.end||function(j){return t.listen(k,"input",y,j)},path:(function(){var j=M(w.mark(function P(I,O){var E,R,A,D,K;return w.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.next=1,c.emit({type:"connectionpath",data:{payload:p,points:[I,O]}});case 1:if(E=F.sent,E){F.next=2;break}return F.abrupt("return","");case 2:if(R=E.data,A=R.path,D=R.points,K=.3,!(!A&&D.length!==2)){F.next=3;break}throw new Error("cannot render connection with a custom number of points");case 3:if(A){F.next=4;break}return F.abrupt("return",p.isLoop?za(D,K,120):Na(D,K));case 4:return F.abrupt("return",A);case 5:case"end":return F.stop()}},P)}));return function(P,I){return j.apply(this,arguments)}})()},g.createElement(d,{data:u.data.payload}))}else if(u.data.type==="socket"){var m=o?o(u.data):Hi;return m&&u.data.payload&&g.createElement(m,{data:u.data.payload})}else if(u.data.type==="control"){var b=a&&u.data.payload?a(u.data):u.data.payload instanceof Ie.InputControl?nn:null;return b&&g.createElement(b,{data:u.data.payload})}}}}var bu=Object.freeze({__proto__:null,vars:pu,setup:gu,Connection:Ai,useConnection:Ii,Control:nn,InputControl:nn,Node:Bi,NodeStyles:Li,RefControl:on,RefSocket:an,Socket:Hi});function Vi(e,t){var n=g.useRef(void 0);function r(){n.current&&clearTimeout(n.current)}var i=function(){r(),n.current=setTimeout(function(){e()},t)};return g.useEffect(function(){return r},[]),[i,r]}var wu="rgba(110,136,255,0.8)",ku="rgba(130, 153, 255, 0.8)",xu="rgba(69, 103, 255, 0.8)",tt="5px",sn=120,wr,kn=ne.div(wr||(wr=Q([`
164
+ color: #fff;
165
+ padding: 4px;
166
+ border-bottom: 1px solid `,`;
167
+ background-color: `,`;
168
+ cursor: pointer;
169
+ width: 100%;
170
+ position: relative;
171
+ &:first-child {
172
+ border-top-left-radius: `,`;
173
+ border-top-right-radius: `,`;
174
+ }
175
+ &:last-child {
176
+ border-bottom-left-radius: `,`;
177
+ border-bottom-right-radius: `,`;
178
+ }
179
+ &:hover {
180
+ background-color: `,`;
181
+ }
182
+ `])),xu,wu,tt,tt,tt,tt,ku),kr,xr,Or,Gi=ne(kn)(kr||(kr=Q([`
183
+ `,`
184
+ `])),function(e){return e.hasSubitems&&bn(xr||(xr=Q([`&:after {
185
+ content: '►';
186
+ position: absolute;
187
+ opacity: 0.6;
188
+ right: 5px;
189
+ top: 5px;
190
+ }`])))}),Wi=ne.div(Or||(Or=Q([`
191
+ position: absolute;
192
+ top: 0;
193
+ left: 100%;
194
+ width: `,`px;
195
+ `])),sn);function qi(e){var t,n,r,i,o=g.useState(!1),a=ie(o,2),s=a[0],u=a[1],c=g.useCallback(function(){u(!1)},[u]),l=Vi(c,e.delay),f=ie(l,2),d=f[0],p=f[1],h=((t=e.components)===null||t===void 0||(n=t.item)===null||n===void 0?void 0:n.call(t,e.data))||Gi,y=((r=e.components)===null||r===void 0||(i=r.subitems)===null||i===void 0?void 0:i.call(r,e.data))||Wi;return g.createElement(h,{onClick:function(k){k.stopPropagation(),e.data.handler(),e.hide()},hasSubitems:!!e.data.subitems,onPointerDown:function(k){k.stopPropagation()},onPointerOver:function(){p(),u(!0)},onPointerLeave:function(){d&&d()},"data-testid":"context-menu-item"},e.children,e.data.subitems&&s&&g.createElement(y,null,e.data.subitems.map(function(v){return g.createElement(qi,{key:v.key,data:v,delay:e.delay,hide:e.hide,components:e.components},v.label)})))}var Sr,Ki=ne.input(Sr||(Sr=Q([`
196
+ color: white;
197
+ padding: 1px 8px;
198
+ border: 1px solid white;
199
+ border-radius: 10px;
200
+ font-size: 16px;
201
+ font-family: serif;
202
+ width: 100%;
203
+ box-sizing: border-box;
204
+ background: transparent;
205
+ `])));function Ou(e){var t=e.component||Ki;return g.createElement(t,{value:e.value,onInput:function(r){e.onChange(r.target.value)},onPointerDown:function(r){r.stopPropagation()},"data-testid":"context-menu-search-input"})}var Cr,Yi=ne.div(Cr||(Cr=Q([`
206
+ padding: 10px;
207
+ width: `,`px;
208
+ margin-top: -20px;
209
+ margin-left: -`,`px;
210
+ `])),sn,sn/2);function Su(e){var t,n,r,i,o,a,s=Vi(e.onHide,e.delay),u=ie(s,2),c=u[0],l=u[1],f=g.useState(""),d=ie(f,2),p=d[0],h=d[1],y=new RegExp(p,"i"),v=e.items.filter(function(b){return b.label.match(y)}),k=((t=e.components)===null||t===void 0||(n=t.main)===null||n===void 0?void 0:n.call(t))||Yi,m=((r=e.components)===null||r===void 0||(i=r.common)===null||i===void 0?void 0:i.call(r))||kn;return g.createElement(k,{onMouseOver:function(){l()},onMouseLeave:function(){c==null||c()},onWheel:function(j){j.stopPropagation()},"data-testid":"context-menu"},e.searchBar&&g.createElement(m,null,g.createElement(Ou,{value:p,onChange:h,component:(o=e.components)===null||o===void 0||(a=o.search)===null||a===void 0?void 0:a.call(o)})),v.map(function(b){return g.createElement(qi,{key:b.key,data:b,delay:e.delay,hide:e.onHide,components:e.components},b.label)}))}function Cu(e){var t=typeof(e==null?void 0:e.delay)>"u"?1e3:e.delay;return{render:function(r){if(r.data.type==="contextmenu")return g.createElement(Su,{items:r.data.items,delay:t,searchBar:r.data.searchBar,onHide:r.data.onHide,components:e==null?void 0:e.customize})}}}var $u=Object.freeze({__proto__:null,setup:Cu,Item:Gi,Subitems:Wi,Menu:Yi,Search:Ki,Common:kn}),nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Pu=typeof nt=="object"&&nt&&nt.Object===Object&&nt,ju=typeof self=="object"&&self&&self.Object===Object&&self;Pu||ju||Function("return this")();function _u(){const e=g.useRef(!1);return g.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),g.useCallback(()=>e.current,[])}var $r={width:void 0,height:void 0};function Eu(e){const{ref:t,box:n="content-box"}=e,[{width:r,height:i},o]=g.useState($r),a=_u(),s=g.useRef({...$r}),u=g.useRef(void 0);return u.current=e.onResize,g.useEffect(()=>{if(!t.current||typeof window>"u"||!("ResizeObserver"in window))return;const c=new ResizeObserver(([l])=>{const f=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",d=Pr(l,f,"inlineSize"),p=Pr(l,f,"blockSize");if(s.current.width!==d||s.current.height!==p){const y={width:d,height:p};s.current.width=d,s.current.height=p,u.current?u.current(y):a()&&o(y)}});return c.observe(t.current,{box:n}),()=>{c.disconnect()}},[n,t,a]),{width:r,height:i}}function Pr(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function pe(e){return"".concat(e,"px")}var jr,Ru=ne.div(jr||(jr=Q([`
211
+ position: absolute;
212
+ background: rgba(110, 136, 255, 0.8);
213
+ border: 1px solid rgb(192 206 212 / 60%);
214
+ `])));function Iu(e){return g.createElement(Ru,{style:{left:pe(e.left),top:pe(e.top),width:pe(e.width),height:pe(e.height)},"data-testid":"minimap-node"})}var _r,Au=ne.div(_r||(_r=Q([`
215
+ position: absolute;
216
+ background: rgba(255, 251, 128, 0.32);
217
+ border: 1px solid #ffe52b;
218
+ `])));function Nu(e){var t=function(o){return o*e.containerWidth},n=function(o){return o/e.containerWidth},r=Ni(function(i,o){e.translate(n(-i),n(-o))},function(i){return{x:i.pageX,y:i.pageY}});return g.createElement(Au,{onPointerDown:r.start,style:{left:pe(t(e.left)),top:pe(t(e.top)),width:pe(t(e.width)),height:pe(t(e.height))},"data-testid":"minimap-viewport"})}var Er,zu=ne.div(Er||(Er=Q([`
219
+ position: absolute;
220
+ right: 24px;
221
+ bottom: 24px;
222
+ background: rgba(229, 234, 239, 0.65);
223
+ padding: 20px;
224
+ overflow: hidden;
225
+ border: 1px solid #b1b7ff;
226
+ border-radius: 8px;
227
+ box-sizing: border-box;
228
+ `])));function Du(e){var t,n=g.useRef(null),r=Eu({ref:n}),i=r.width,o=i===void 0?0:i,a=((t=n.current)===null||t===void 0?void 0:t.clientWidth)||o,s=g.useCallback(function(u){return u*a},[a]);return g.createElement(zu,{size:e.size,style:{width:pe(e.size*e.ratio),height:pe(e.size)},onPointerDown:function(c){c.stopPropagation(),c.preventDefault()},onDoubleClick:function(c){if(c.stopPropagation(),c.preventDefault(),!!n.current){var l=n.current.getBoundingClientRect(),f=(c.clientX-l.left)/(e.size*e.ratio),d=(c.clientY-l.top)/(e.size*e.ratio);e.point(f,d)}},ref:n,"data-testid":"minimap"},a?e.nodes.map(function(u,c){return g.createElement(Iu,{key:c,left:s(u.left),top:s(u.top),width:s(u.width),height:s(u.height)})}):null,g.createElement(Nu,$e({},e.viewport,{start:e.start,containerWidth:a,translate:e.translate})))}function Mu(e){return{render:function(n){if(n.data.type==="minimap")return g.createElement(Du,{nodes:n.data.nodes,size:(e==null?void 0:e.size)||200,ratio:n.data.ratio,viewport:n.data.viewport,start:n.data.start,translate:n.data.translate,point:n.data.point})}}}var Tu=Object.freeze({__proto__:null,setup:Mu}),Rr,We=20,Lu=ne.div(Rr||(Rr=Q([`
229
+ width: `,`px;
230
+ height: `,`px;
231
+ box-sizing: border-box;
232
+ background: `,`;
233
+ border: 2px solid white;
234
+ border-radius: `,`px;
235
+ `])),We,We,function(e){return e.selected?"#ffd92c":"steelblue"},We);function Bu(e){var t=Ni(function(o,a){e.translate(o,a)},e.pointer),n=e.position,r=n.x,i=n.y;return g.createElement(Lu,{onPointerDown:function(a){a.stopPropagation(),a.preventDefault(),t.start(a),e.pointerdown()},onContextMenu:function(a){a.stopPropagation(),a.preventDefault(),e.contextMenu()},selected:e.selected,style:{position:"absolute",top:"".concat(i-We/2,"px"),left:"".concat(r-We/2,"px")},"data-testid":"pin"})}function Fu(e){function t(n,r){return g.createElement(g.Fragment,null,n.pins.map(function(i){return g.createElement(Bu,$e({},i,{key:i.id,contextMenu:function(){var a;e==null||(a=e.contextMenu)===null||a===void 0||a.call(e,i.id)},translate:function(a,s){var u;e==null||(u=e.translate)===null||u===void 0||u.call(e,i.id,a,s)},pointerdown:function(){var a;e==null||(a=e.pointerdown)===null||a===void 0||a.call(e,i.id)},pointer:r}))}))}return{render:function(r,i){var o=r.data,a=i.parentScope(ft);if(o.type==="reroute-pins")return t(o.data,function(){return a.area.pointer})}}}var Hu=Object.freeze({__proto__:null,setup:Fu}),ct=Object.freeze({__proto__:null,classic:bu,contextMenu:$u,minimap:Tu,reroute:Hu});function Vu(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Gu(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
236
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Gu(e,t){if(e){if(typeof e=="string")return Ir(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ir(e,t):void 0}}function Ir(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ar(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wu(e,t,n){return t=q(t),ye(e,Zi()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function Zi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zi=function(){return!!e})()}function qu(e,t,n,r){var i=qe(q(e.prototype),t,n);return typeof i=="function"?function(o){return i.apply(n,o)}:i}var Ku=(function(e){function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=i[0];return L(this,t),n=Wu(this,t,["react-render"]),C(n,"presets",[]),n.renderer=eu({createRoot:a==null?void 0:a.createRoot}),n.addPipe(function(s){if(!s||oe(s)!=="object"||!("type"in s))return s;if(s.type==="unmount")n.unmount(s.data.element);else if(s.type==="render"){if("filled"in s.data&&s.data.filled)return s;if(n.mount(s.data.element,s))return rt(rt({},s),{},{data:rt(rt({},s.data),{},{filled:!0})})}return s}),n}return ae(t,e),B(t,[{key:"setParent",value:function(r){var i=this;qu(t,"setParent",this)([r]),this.presets.forEach(function(o){o.attach&&o.attach(i)})}},{key:"mount",value:function(r,i){var o=this.parentScope(),a=Vu(this.presets),s;try{for(a.s();!(s=a.n()).done;){var u=s.value,c=u.render(i,this);if(c){var l=g.createElement(tu,{rendered:function(){return void o.emit({type:"rendered",data:i.data})}},c);return this.renderer.mount(l,r),!0}}}catch(f){a.e(f)}finally{a.f()}}},{key:"unmount",value:function(r){this.renderer.unmount(r)}},{key:"addPreset",value:function(r){var i=r;i.attach&&i.attach(this),this.presets.push(i)}}])})(Ze);const Nr=new Ie.Socket("rel"),Ui=240,Yu=48,Zu=74,Uu=280,Ht=24,un="#9ca3af",Ee="#3b82f6",He="#f97316";class Xu extends Ie.Node{constructor(n,r,i,o,a){super(n);te(this,"width",Ui);te(this,"height",Yu);te(this,"isSource");te(this,"dmId");te(this,"depth");te(this,"targetAlias");te(this,"fieldCount");te(this,"description");te(this,"onOpenExternal");te(this,"isDraft");te(this,"isBlocked");te(this,"isJoinNotConfigured");te(this,"isCycleStub");te(this,"highlighted",!1);te(this,"dimmed",!1);this.dmId=r,this.isSource=i,this.depth=o,this.targetAlias=a==null?void 0:a.targetAlias,this.fieldCount=a==null?void 0:a.fieldCount,this.description=a==null?void 0:a.description,this.onOpenExternal=a==null?void 0:a.onOpenExternal,this.isDraft=(a==null?void 0:a.isDraft)??!1,this.isBlocked=(a==null?void 0:a.isBlocked)??!1,this.isJoinNotConfigured=(a==null?void 0:a.isJoinNotConfigured)??!1,this.isCycleStub=(a==null?void 0:a.isCycleStub)??!1,i||(this.height=Zu)}}const{RefSocket:Vt}=ct.classic;function Ju(e){const t=e.data;function n(s){var u;s.stopPropagation(),s.preventDefault(),(u=t.onOpenExternal)==null||u.call(t)}const r=Object.entries(t.outputs),i=Object.entries(t.inputs);if(t.isSource)return z.jsxs("div",{className:"text-primary flex items-center",style:{width:t.width,height:t.height,borderRadius:8,border:`2px solid ${t.highlighted?Ee:t.isDraft?He:un}`,boxShadow:t.highlighted?`0 0 0 3px ${Ee}40, 0 0 12px ${Ee}60`:"0 1px 4px 0 rgba(0,0,0,0.12)",background:"#eff6ff",fontSize:13,fontWeight:600,position:"relative",opacity:t.dimmed?.15:1,filter:t.dimmed?"grayscale(0.8)":void 0,animation:t.highlighted?"node-pulse 1.5s ease-in-out infinite":void 0,transition:"opacity 0.2s, filter 0.2s"},children:[t.isDraft&&z.jsx("span",{style:{position:"absolute",top:-18,right:4,fontSize:10,fontWeight:600,color:He,lineHeight:1},children:"Draft"}),z.jsx("div",{className:"truncate",style:{flex:1,padding:"0 14px"},title:t.label,children:t.label}),r.map(([s,u])=>u&&z.jsx("div",{style:{position:"absolute",right:-5,top:"50%",marginTop:-5},children:z.jsx(Vt,{name:"output-socket",side:"output",socketKey:s,nodeId:t.id,emit:e.emit,payload:u.socket})},s))]});const o=no(t)?He:un,a=ro(t);return z.jsxs("div",{title:t.isCycleStub?io:void 0,style:{width:t.width,height:t.height,borderRadius:8,border:`2px solid ${t.highlighted?Ee:o}`,background:"var(--background)",boxShadow:t.highlighted?`0 0 0 3px ${Ee}40, 0 0 12px ${Ee}60`:"0 1px 4px 0 rgba(0,0,0,0.12)",cursor:"default",position:"relative",opacity:t.dimmed?.15:1,filter:t.dimmed?"grayscale(0.8)":void 0,animation:t.highlighted?"node-pulse 1.5s ease-in-out infinite":void 0,transition:"opacity 0.2s, filter 0.2s"},children:[a&&z.jsx("span",{style:{position:"absolute",top:-18,right:4,fontSize:10,fontWeight:600,color:He,lineHeight:1,whiteSpace:"nowrap"},children:a}),i.map(([s,u])=>u&&z.jsx("div",{style:{position:"absolute",left:-5,top:"50%",marginTop:-5,zIndex:1},children:z.jsx(Vt,{name:"input-socket",side:"input",socketKey:s,nodeId:t.id,emit:e.emit,payload:u.socket})},s)),z.jsxs("div",{className:"bg-muted flex items-center justify-between",style:{padding:"8px 10px 8px 14px",fontSize:13,fontWeight:600,borderRadius:"6px 6px 0 0"},children:[z.jsx("span",{className:"truncate",title:t.label,children:t.label}),z.jsxs("div",{className:"ml-2 flex shrink-0 items-center gap-0.5",children:[t.description&&z.jsx("span",{className:"text-muted-foreground hover:text-foreground inline-flex cursor-default rounded p-0.5 transition-colors",title:t.description,children:z.jsx(oo,{style:{width:14,height:14}})}),z.jsx("button",{className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-0.5 transition-colors",onPointerDown:s=>{s.stopPropagation()},onClick:n,title:"Open in new tab","aria-label":"Open in new tab",children:z.jsx(ao,{style:{width:14,height:14}})})]})]}),z.jsxs("div",{className:"text-muted-foreground flex items-center gap-2",style:{padding:"6px 14px 8px",fontSize:11,minWidth:0},children:[t.targetAlias&&z.jsx(so,{variant:"secondary",className:"inline-block max-w-[120px] truncate px-1.5 py-0 text-[10px]",title:t.targetAlias,children:t.targetAlias}),z.jsxs("span",{className:"ml-auto shrink-0",children:[t.fieldCount??0," field",t.fieldCount!==1?"s":""]})]}),r.map(([s,u])=>u&&z.jsx("div",{style:{position:"absolute",right:-5,top:"50%",marginTop:-5,zIndex:1},children:z.jsx(Vt,{name:"output-socket",side:"output",socketKey:s,nodeId:t.id,emit:e.emit,payload:u.socket})},s))]})}function Qu(){return z.jsx("div",{style:{width:10,height:10,borderRadius:"50%",background:un,border:"2px solid var(--background)"}})}async function ec(e,t,n,r,i,o,a,s,u){const c=new Pe,l=new Xr(e),f=new ja,d=new Ku({createRoot:to.createRoot}),p=new Aa,{useConnection:h}=ct.classic;function y($){const{path:S}=h();if(!S)return null;const _=c.getNode($.data.source),x=c.getNode($.data.target),H=(_==null?void 0:_.isDraft)===!0||(_==null?void 0:_.isBlocked)===!0||(_==null?void 0:_.isJoinNotConfigured)===!0||(_==null?void 0:_.isCycleStub)===!0||(x==null?void 0:x.isDraft)===!0||(x==null?void 0:x.isBlocked)===!0||(x==null?void 0:x.isJoinNotConfigured)===!0||(x==null?void 0:x.isCycleStub)===!0,V=((_==null?void 0:_.dimmed)===!0||_===void 0)&&((x==null?void 0:x.dimmed)===!0||x===void 0);return z.jsx("svg",{"data-testid":"connection",style:{overflow:"visible",position:"absolute",pointerEvents:"none",width:9999,height:9999},children:z.jsx("path",{d:S,fill:"none",strokeWidth:"5px",stroke:H?He:"steelblue",strokeDasharray:H?"8 4":void 0,opacity:V?.15:1,style:{pointerEvents:"auto",transition:"opacity 0.2s"}})})}d.addPreset(ct.classic.setup({customize:{node(){return Ju},socket(){return Qu},connection(){return y}}})),d.addPreset(ct.minimap.setup()),f.addPreset(Oa.classic.setup()),c.use(l),l.use(f),l.use(d),l.use(p);const v=new Map,k=[],m=new Set,b=i==="DRAFT";v.set(t,{id:t,dmId:t,title:n,description:r,depth:0,isSource:!0,isDraft:b});let j=0;async function P($,S,_,x,H){S.length>0&&m.add($);for(const V of S){const T=V.targetDataMart.id,re=`${T}-${j++}`,Y=V.targetDataMart.status==="DRAFT",J=V.joinConditions.length===0,ee=H,U=x.has(T);if(k.push({sourceId:$,targetId:re}),v.set(re,{id:re,dmId:T,title:V.targetDataMart.title,description:V.targetDataMart.description,depth:_,isSource:!1,targetAlias:V.targetAlias,fieldCount:(a==null?void 0:a.get(V.id))??0,isDraft:Y,isBlocked:ee,isJoinNotConfigured:J,isCycleStub:U}),u&&!U)try{const ge=await uo.getRelationships(T,{skipLoadingIndicator:!0});if(ge.length>0){const le=new Set(x);le.add(T),await P(re,ge,_+1,le,H||Y||J)}}catch{}}}await P(t,o,1,new Set([t]),b);const I=new Map,O=new Map;for(const[$,S]of v){const _=new Xu(S.title,S.dmId,S.isSource,S.depth,{targetAlias:S.targetAlias,fieldCount:S.fieldCount,description:S.description,isDraft:S.isDraft,isBlocked:S.isBlocked,isJoinNotConfigured:S.isJoinNotConfigured,isCycleStub:S.isCycleStub,onOpenExternal:()=>{s(S.dmId)}});m.has($)&&!S.isCycleStub&&_.addOutput("out",new Ie.Output(Nr)),S.isSource||_.addInput("in",new Ie.Input(Nr)),await c.addNode(_),I.set($,_);const x=O.get(S.depth)??[];O.has(S.depth)||O.set(S.depth,x),x.push(_)}for(const $ of k){const S=I.get($.sourceId),_=I.get($.targetId);S&&_&&await c.addConnection(new Ie.Connection(S,"out",_,"in"))}const E=Math.max(...Array.from(O.keys()));for(let $=0;$<=E;$++){const S=O.get($)??[];let _=0;for(const x of S)await l.translate(x.id,{x:$*(Ui+Uu),y:_}),_+=x.height+Ht;if($===0&&S.length===1){const H=(O.get(1)??[]).reduce((V,T)=>V+T.height+Ht,-Ht);await l.translate(S[0].id,{x:0,y:Math.max(0,H/2-S[0].height/2)})}}const R=16,A=()=>{const{x:$,y:S,k:_}=l.area.transform,x=R*_;e.style.backgroundSize=`${x}px ${x}px`,e.style.backgroundPosition=`${$}px ${S}px`},D=async()=>{await Qe.zoomAt(l,c.getNodes(),{scale:.85}),A()};await D();const K=async $=>{const S=e.clientWidth/2,_=e.clientHeight/2,{k:x}=l.area.transform,H=x*(1+$);H<.33||H>3||(await l.area.zoom(H,S*$,_*$),A())};return Qe.restrictor(l,{translation:()=>{const{k:$}=l.area.transform,S=Qe.getBoundingBox(l,c.getNodes()),_=e.getBoundingClientRect(),x=150;return{left:x-S.right*$,right:_.width-x-S.left*$,top:x-S.bottom*$,bottom:_.height-x-S.top*$}}}),l.addPipe($=>{if($.type==="zoom"){if($.data.source==="dblclick")return;const S=$.data.zoom;if(S<.33||S>3)return}if($.type!=="nodetranslate")return($.type==="translated"||$.type==="zoomed")&&A(),$}),{destroy:()=>{l.destroy()},fitView:D,zoomBy:K,highlightNodes:$=>{const S=$.toLowerCase(),_=[];for(const x of c.getNodes()){const H={h:x.highlighted,d:x.dimmed};x.highlighted=S!==""&&x.label.toLowerCase().includes(S),x.dimmed=S!==""&&!x.highlighted,x.highlighted&&_.push(x),(H.h!==x.highlighted||H.d!==x.dimmed)&&l.update("node",x.id)}for(const x of c.getConnections())l.update("connection",x.id);_.length>0&&Qe.zoomAt(l,_,{scale:.85})}}}function rc({dataMartId:e,dataMartTitle:t,dataMartDescription:n,dataMartStatus:r,relationships:i,connectedFieldCounts:o,searchQuery:a,showTransient:s,onRequestFullscreen:u,className:c,style:l}){const f=g.useRef(null),d=g.useRef(null),p=g.useRef(a);p.current=a;const h=g.useCallback(y=>{const v=window.location.pathname.replace(/\/data-marts\/.*/,"");window.open(`${v}/data-marts/${y}/data-setup`,"_blank")},[]);return g.useEffect(()=>{const y=f.current;if(!(!y||i.length===0))return ec(y,e,t,n,r,i,o,h,s).then(v=>{d.current=v,p.current&&v.highlightNodes(p.current)}),()=>{var v;(v=d.current)==null||v.destroy(),d.current=null,y.replaceChildren()}},[e,t,n,r,i,o,h,s]),g.useEffect(()=>{var y;(y=d.current)==null||y.highlightNodes(a)},[a]),i.length===0?null:z.jsxs("div",{className:`rel-canvas relative overflow-hidden rounded-lg border ${c??""}`,style:l??{height:480},children:[z.jsx("style",{children:`
237
+ .rel-canvas svg path { stroke-width: 1.5px !important; }
238
+ .rel-canvas [data-testid="minimap"] { transform: scale(0.5); transform-origin: bottom right; }
239
+ @keyframes node-pulse {
240
+ 0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 0 12px rgba(59, 130, 246, 0.4); }
241
+ 50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15), 0 0 20px rgba(59, 130, 246, 0.5); }
242
+ }
243
+ `}),z.jsx("div",{className:"absolute top-3 right-3 z-10 flex items-start gap-2",children:z.jsxs("div",{className:"flex flex-col gap-1.5",children:[z.jsx(Xe,{variant:"outline",size:"icon",className:"h-12 w-12",onClick:()=>{var y;(y=d.current)==null||y.fitView()},"aria-label":"Fit to view",children:z.jsx(lo,{className:"h-6 w-6"})}),z.jsx(Xe,{variant:"outline",size:"icon",className:"h-12 w-12",onClick:()=>{var y;(y=d.current)==null||y.zoomBy(.25)},"aria-label":"Zoom in",children:z.jsx(po,{className:"h-6 w-6"})}),z.jsx(Xe,{variant:"outline",size:"icon",className:"h-12 w-12",onClick:()=>{var y;(y=d.current)==null||y.zoomBy(-.25)},"aria-label":"Zoom out",children:z.jsx(vo,{className:"h-6 w-6"})}),u&&z.jsx(Xe,{variant:"outline",size:"icon",className:"h-12 w-12",onClick:u,"aria-label":"Expand diagram",children:z.jsx(eo,{className:"h-6 w-6"})})]})}),z.jsx("div",{ref:f,style:{width:"100%",height:"100%",backgroundImage:"linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px)",backgroundSize:"16px 16px"}})]})}export{rc as RelationshipCanvas};